Skip to content

Commit dc99236

Browse files
committed
Harden production launch install path
1 parent bf293c3 commit dc99236

7 files changed

Lines changed: 88 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
66

7+
## [6.2.0] - 2026-05-15 — Production launch hardening
8+
9+
- Marked the public package metadata as `Development Status :: 5 -
10+
Production/Stable` for the Product Hunt launch.
11+
- Fixed the release wheel so the bundled `engram_bus` handoff package is
12+
actually included instead of being pruned from the source distribution.
13+
- Hardened `install.sh` with a verified handoff-bus check, a GitHub repair
14+
fallback if PyPI is stale or broken, `DHEE_INSTALL_PACKAGE` for reproducible
15+
installer smoke tests, and `DHEE_INIT_REPO` for non-interactive repo wire-up.
16+
- The installer now explicitly points new users at `dhee ui` after install so
17+
they can open the local command center, folders canvas, and firewall without
18+
hunting through docs.
19+
720
## Unreleased — Developer Brain split
821

922
- Public Dhee is now positioned and packaged as **Dhee Developer Brain**:

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
prune dhee/ui/web/node_modules
2-
prune dhee/ui
32
prune enterprise
4-
prune engram-bus
53
prune engram-bridge
64
prune engram-enterprise
75
prune engram-failure

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
<p align="center">
1010
<a href="https://pypi.org/project/dhee"><img src="https://img.shields.io/pypi/v/dhee?style=flat-square&color=orange" alt="PyPI"></a>
11+
<a href="https://github.com/Sankhya-AI/Dhee/releases"><img src="https://img.shields.io/badge/status-production--ready-brightgreen?style=flat-square" alt="Production ready"></a>
1112
<a href="https://pypi.org/project/dhee"><img src="https://img.shields.io/badge/python-3.9%2B-blue.svg?style=flat-square" alt="Python 3.9+"></a>
1213
<a href="https://github.com/Sankhya-AI/Dhee/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="MIT License"></a>
1314
<a href="benchmarks/longmemeval/"><img src="https://img.shields.io/badge/LongMemEval-R%401%2094.8%25-brightgreen.svg?style=flat-square" alt="LongMemEval R@1 94.8%"></a>
@@ -92,6 +93,10 @@ One command:
9293
curl -fsSL https://raw.githubusercontent.com/Sankhya-AI/Dhee/main/install.sh | sh
9394
```
9495

96+
The installer creates the managed local runtime, verifies the handoff bus, wires
97+
detected harnesses, and ends with the two commands most people need first:
98+
`cd /path/to/repo && dhee init` and `dhee ui`.
99+
95100
Or via pip:
96101

97102
```bash

dhee/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# Default: CoreMemory (lightest, zero-config)
3535
Memory = CoreMemory
3636

37-
__version__ = "6.1.0"
37+
__version__ = "6.2.0"
3838
__all__ = [
3939
# Memory classes
4040
"Engram",

install.sh

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@
1010
# 4. Wires Claude Code (hooks + MCP + router) if available
1111
# 5. Runs `dhee onboard` — provider picker, API key paste,
1212
# and optional git repo linking
13+
# 6. Shows `dhee ui` so the developer can inspect the local brain
1314
#
1415
# Non-interactive: pass DHEE_PROVIDER=openai DHEE_API_KEY=sk-... to skip
15-
# the prompts entirely (CI-friendly).
16+
# the prompts entirely (CI-friendly). Set DHEE_INIT_REPO=/path/to/repo to
17+
# wire a git repo non-interactively after install. Set
18+
# DHEE_INIT_SKIP_INGEST=1 for CI smoke tests that should link the repo without
19+
# calling an embedding provider.
1620
#
1721
# Requires: Python 3.9+ (Claude Code CLI optional)
1822
set -e
@@ -21,7 +25,9 @@ DHEE_HOME="$HOME/.dhee"
2125
VENV_DIR="$DHEE_HOME/.venv"
2226
BIN_DIR="$HOME/.local/bin"
2327
MIN_PYTHON="3.9"
24-
PACKAGE="dhee>=6.1.0"
28+
DEFAULT_PACKAGE="dhee>=6.2.0"
29+
PACKAGE="${DHEE_INSTALL_PACKAGE:-$DEFAULT_PACKAGE}"
30+
FALLBACK_PACKAGE="${DHEE_FALLBACK_PACKAGE:-git+https://github.com/Sankhya-AI/Dhee.git@main}"
2531

2632
# --- Colors ---
2733
if [ -t 1 ]; then
@@ -35,6 +41,19 @@ warn() { printf "${YELLOW}!${RESET} %s\n" "$1"; }
3541
error() { printf "${RED}x${RESET} %s\n" "$1" >&2; exit 1; }
3642
done_() { printf "${GREEN}${RESET} %s\n" "$1"; }
3743

44+
pip_install_package() {
45+
"$VENV_DIR/bin/pip" install --upgrade --force-reinstall --no-cache-dir "$1" -q
46+
}
47+
48+
verify_handoff_bus() {
49+
"$VENV_DIR/bin/python" - <<'PY' >/dev/null 2>&1
50+
from dhee.core.kernel import _get_bus
51+
52+
bus = _get_bus()
53+
bus.close()
54+
PY
55+
}
56+
3857
# --- OS check ---
3958
OS="$(uname -s)"
4059
case "$OS" in
@@ -73,20 +92,30 @@ fi
7392

7493
# --- Install package ---
7594
"$VENV_DIR/bin/pip" install --upgrade pip -q 2>/dev/null
76-
"$VENV_DIR/bin/pip" install --upgrade --no-cache-dir "$PACKAGE" -q
77-
done_ "Installed dhee"
95+
if pip_install_package "$PACKAGE"; then
96+
done_ "Installed dhee"
97+
else
98+
if [ -n "${DHEE_INSTALL_PACKAGE:-}" ]; then
99+
error "Could not install Dhee from DHEE_INSTALL_PACKAGE=$DHEE_INSTALL_PACKAGE"
100+
fi
101+
warn "PyPI install failed — trying the current GitHub release path"
102+
command -v git >/dev/null 2>&1 || error "Git is required for the fallback installer. Install git, then rerun the command."
103+
pip_install_package "$FALLBACK_PACKAGE" || error "Could not install Dhee from PyPI or GitHub fallback"
104+
done_ "Installed dhee from GitHub fallback"
105+
fi
78106

79107
# --- Verify bundled handoff bus ---
80-
if "$VENV_DIR/bin/python" - <<'PY' >/dev/null 2>&1
81-
from dhee.core.kernel import _get_bus
82-
83-
bus = _get_bus()
84-
bus.close()
85-
PY
86-
then
108+
if verify_handoff_bus; then
87109
done_ "Cross-agent handoff bus ready"
88110
else
89-
error "Dhee installed, but the bundled handoff bus failed to import. Please rerun the installer or report this build."
111+
if [ -n "${DHEE_INSTALL_PACKAGE:-}" ]; then
112+
error "Dhee installed, but the bundled handoff bus failed to import from DHEE_INSTALL_PACKAGE=$DHEE_INSTALL_PACKAGE"
113+
fi
114+
warn "PyPI package failed handoff-bus verification — repairing from GitHub"
115+
command -v git >/dev/null 2>&1 || error "Git is required for the repair installer. Install git, then rerun the command."
116+
pip_install_package "$FALLBACK_PACKAGE" || error "Dhee installed, but GitHub repair failed. Please report this installer output."
117+
verify_handoff_bus || error "Dhee installed, but the bundled handoff bus still failed to import after repair."
118+
done_ "Cross-agent handoff bus ready"
90119
fi
91120

92121
# --- Symlink binaries ---
@@ -170,9 +199,23 @@ else
170199
fi
171200
fi
172201

202+
if [ -n "${DHEE_INIT_REPO:-}" ]; then
203+
info "Wiring git repo: ${DHEE_INIT_REPO}"
204+
INIT_FLAGS=""
205+
[ "${DHEE_INIT_SKIP_INGEST:-}" = "1" ] && INIT_FLAGS="$INIT_FLAGS --skip-ingest"
206+
[ "${DHEE_INIT_SKIP_FIRST_LIGHT:-}" = "1" ] && INIT_FLAGS="$INIT_FLAGS --skip-first-light"
207+
# shellcheck disable=SC2086 # intentional flag splitting for the small managed flag set above.
208+
if "$VENV_DIR/bin/dhee" init "$DHEE_INIT_REPO" $INIT_FLAGS >/dev/null 2>&1; then
209+
done_ "Repo wired into Dhee"
210+
else
211+
warn "Repo wire-up failed — run 'cd ${DHEE_INIT_REPO} && dhee init' manually for details"
212+
fi
213+
fi
214+
173215
# --- Done ---
174216
printf "\n${BOLD}${GREEN}Dhee is ready.${RESET}\n"
175217
printf " Wire up a repo: ${BOLD}cd /path/to/repo && dhee init${RESET}\n"
218+
printf " Open the UI: ${BOLD}dhee ui${RESET} ${DIM}(local command center, folders canvas, firewall)${RESET}\n"
176219
printf " Update later: ${BOLD}dhee update${RESET}\n\n"
177220
printf "${DIM} Status: dhee status (savings + brain health)${RESET}\n"
178221
printf "${DIM} Recall: dhee recall \"<query>\" (your personal cross-repo brain)${RESET}\n"

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "dhee"
7-
version = "6.1.0"
7+
version = "6.2.0"
88
description = "Dhee Developer Brain — local memory, handoff, and git-backed context for AI coding agents"
99
readme = "README.md"
1010
requires-python = ">=3.9"
1111
license = {text = "MIT"}
1212
authors = [
1313
{name = "Sankhya AI Labs"}
1414
]
15-
keywords = ["memory-layer", "cognition", "mcp", "self-evolving", "hyperagent", "ai", "agents", "plugin", "llm", "edge"]
15+
keywords = ["context-firewall", "developer-brain", "coding-agents", "mcp", "claude-code", "codex", "local-first", "memory-layer", "ai", "agents"]
1616
classifiers = [
17-
"Development Status :: 4 - Beta",
17+
"Development Status :: 5 - Production/Stable",
1818
"Intended Audience :: Developers",
1919
"License :: OSI Approved :: MIT License",
2020
"Programming Language :: Python :: 3",

tests/test_packaging.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,23 @@
88

99
def test_handoff_bus_is_bundled_not_external_dependency():
1010
pyproject = (ROOT / "pyproject.toml").read_text(encoding="utf-8")
11+
manifest = (ROOT / "MANIFEST.in").read_text(encoding="utf-8")
1112

1213
assert '"engram-bus>=' not in pyproject
1314
assert 'engram-bus = "engram_bus.server:main"' in pyproject
1415
assert "bus = []" in pyproject
1516

1617
assert 'where = [".", "engram-bus"]' in pyproject
1718
assert 'include = ["dhee*", "engram*", "engram_bus*"]' in pyproject
19+
assert "prune dhee/ui\n" not in manifest
20+
assert "prune engram-bus" not in manifest
1821
assert '"dhee.ui*"' not in pyproject
1922
assert 'dhee-ui = "dhee.ui.cli:main"' in pyproject
2023
assert '"web/dist/*"' in pyproject
2124
assert '"web/dist/assets/*"' in pyproject
2225
assert '"web/src/components/canvas/*"' in pyproject
2326
assert (ROOT / "engram-bus" / "engram_bus" / "__init__.py").exists()
27+
assert (ROOT / "engram-bus" / "engram_bus" / "bus.py").exists()
2428

2529

2630
def test_curl_installer_verifies_handoff_bus():
@@ -29,4 +33,11 @@ def test_curl_installer_verifies_handoff_bus():
2933
assert "Cross-agent handoff bus ready" in installer
3034
assert "from dhee.core.kernel import _get_bus" in installer
3135
assert "for bin_name in dhee dhee-mcp engram-bus" in installer
36+
assert 'DEFAULT_PACKAGE="dhee>=6.2.0"' in installer
37+
assert "DHEE_INSTALL_PACKAGE" in installer
38+
assert "FALLBACK_PACKAGE" in installer
39+
assert "DHEE_INIT_REPO" in installer
40+
assert "DHEE_INIT_SKIP_INGEST" in installer
41+
assert "Open the UI:" in installer
42+
assert "dhee ui" in installer
3243
assert "dhee uninstall --yes" in installer

0 commit comments

Comments
 (0)