@animalabs/connectome-host 0.3.9 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/.env.example +7 -0
  2. package/.github/PULL_REQUEST_TEMPLATE.md +26 -0
  3. package/.github/workflows/changelog.yml +32 -0
  4. package/.github/workflows/publish.yml +46 -0
  5. package/CHANGELOG.md +140 -0
  6. package/CONTRIBUTING.md +126 -0
  7. package/HEADLESS-FLEET-PLAN.md +1 -1
  8. package/README.md +52 -5
  9. package/UNIFIED-TREE-PLAN.md +2 -0
  10. package/docs/AGENT-ONBOARDING.md +9 -8
  11. package/docs/DEPLOYMENTS.md +2 -2
  12. package/docs/DEV-ENVIRONMENT.md +28 -26
  13. package/docs/LOCUS-ROUTING-DESIGN.md +8 -2
  14. package/package.json +5 -4
  15. package/scripts/release-changelog.ts +32 -0
  16. package/src/codex-subscription-adapter.ts +938 -0
  17. package/src/commands.ts +95 -4
  18. package/src/extensions.ts +201 -0
  19. package/src/framework-agent-config.ts +20 -9
  20. package/src/framework-strategy.ts +24 -0
  21. package/src/index.ts +111 -19
  22. package/src/logging-bedrock-adapter.ts +145 -0
  23. package/src/modules/channel-mode-module.ts +9 -6
  24. package/src/modules/subscription-gc-module.ts +163 -34
  25. package/src/modules/tts-relay-module.ts +481 -0
  26. package/src/modules/web-ui-module.ts +45 -1
  27. package/src/recipe.ts +196 -10
  28. package/src/tui.ts +527 -137
  29. package/src/web/protocol.ts +35 -0
  30. package/test/codex-subscription-adapter.test.ts +226 -0
  31. package/test/commands-checkpoint-restore.test.ts +118 -0
  32. package/test/fast-command.test.ts +39 -0
  33. package/test/recipe-extensions.test.ts +295 -0
  34. package/test/recipe-provider.test.ts +14 -1
  35. package/test/subscription-gc-module.test.ts +156 -1
  36. package/test/tui-quit-confirm.test.ts +42 -0
  37. package/test/tui-short-agent-name.test.ts +36 -0
  38. package/test/web-ui-observers.test.ts +14 -0
  39. package/test/web-ui-protocol.test.ts +0 -0
  40. package/web/src/App.tsx +235 -20
  41. package/web/src/Branches.tsx +150 -0
  42. package/web/src/Context.tsx +21 -13
  43. package/web/src/Health.tsx +274 -0
  44. package/web/src/Lessons.tsx +2 -1
@@ -1,6 +1,6 @@
1
1
  # Connectome Dev Environment — Setup Guide
2
2
 
3
- **Status:** Working notes, uncommitted. Snapshot of the dev layout as of 2026-05-30.
3
+ **Status:** Working notes. Snapshot of the dev layout as of 2026-07-22 (originally 2026-05-30; all feature branches in the original table have since merged to `main`).
4
4
  **Goal:** Reproduce the current development state — every component as a local git
5
5
  checkout, wired together so the host runs against editable source.
6
6
 
@@ -24,17 +24,22 @@ that holds a recipe + `.env` + chronicle data and references the code by absolut
24
24
 
25
25
  All cloned as siblings under `~/connectome-local/`:
26
26
 
27
- | Dir | GitHub repo | Branch | Ver | Role |
27
+ | Dir | GitHub repo | Branch | Ver (2026-07-22) | Role |
28
28
  |---|---|---|---|---|
29
- | `forking-knowledge-miner` | `anima-research/connectome-host` | `feat/tui-mem-stats-and-strategy-passthrough` | 0.3.0 | the host app (run via **bun**) |
30
- | `agent-framework` | `anima-research/agent-framework` | `fix/lazy-register-locus-and-send-failure-marker` | 0.5.0 | host runtime: gate, MCPL orchestration, locus routing, `think` |
31
- | `discord-mcpl` | `anima-research/discord-mcpl` | `main` | 0.1.0 | Discord surface (MCPL server) |
32
- | `heartbeat-mcpl` | `anima-research/heartbeat-mcpl` | `main` | 0.1.0 | periodic self-wake (MCPL server) |
33
- | `terminal-sessions-mcp` | `antra-tess/terminal-sessions-mcp` ⚠️ | `main` | 1.0.1 | shell: session daemon (ws://localhost:3100) + per-agent MCP stdio frontend |
34
- | `membrane` | `antra-tess/membrane` ⚠️ | `fix/before-request-hook-on-stream-paths` | 0.5.47 | LLM client lib — **single shared instance required** |
35
- | `context-manager` | `anima-research/context-manager` | `feat/adaptive-resolution` | 0.4.0 | context compilation / autobiographical memory |
36
- | `chronicle` | `anima-research/chronicle` | `main` | 0.1.1 | record / chronicle store |
37
- | `mcpl-core-ts` | `anima-research/mcpl-core-ts` | `main` | 0.1.0 | MCPL protocol types (discord-mcpl path dep) |
29
+ | `forking-knowledge-miner` | `anima-research/connectome-host` | `main` | 0.3.10 | the host app (run via **bun**) |
30
+ | `agent-framework` | `anima-research/agent-framework` | `main` | 0.6.10 | host runtime: gate, MCPL orchestration, locus routing, `think` |
31
+ | `discord-mcpl` | `anima-research/discord-mcpl` | `main` | 0.1.4 | Discord surface (MCPL server) |
32
+ | `heartbeat-mcpl` | `anima-research/heartbeat-mcpl` | `main` | 0.1.3 | periodic self-wake (MCPL server) |
33
+ | `terminal-sessions-mcp` | `antra-tess/terminal-sessions-mcp` ⚠️ | `main` | 1.6.0 | shell: session daemon (ws://localhost:3100) + per-agent MCP stdio frontend |
34
+ | `membrane` | `antra-tess/membrane` ⚠️ | `main` | 0.5.74 | LLM client lib — **single shared instance required** |
35
+ | `context-manager` | `anima-research/context-manager` | `main` | 0.5.14 | context compilation / autobiographical memory |
36
+ | `chronicle` | `anima-research/chronicle` | `main` | 0.2.7 | record / chronicle store |
37
+ | `mcpl-core-ts` | `anima-research/mcpl-core-ts` | `main` | 0.2.1 | MCPL protocol types |
38
+
39
+ > Versions drift; treat the column as a dated snapshot. The published npm
40
+ > releases now track `main` closely (typically within a patch), so the
41
+ > stock `bun install` path is sufficient for host-level work — use the
42
+ > checkout layout below when editing the libraries themselves.
38
43
 
39
44
  > ⚠️ **Org note:** `terminal-sessions-mcp` and `membrane` still live under the
40
45
  > personal `antra-tess` org, not `anima-research`. Consider migrating them for
@@ -51,19 +56,15 @@ All cloned as siblings under `~/connectome-local/`:
51
56
  ```bash
52
57
  mkdir -p ~/connectome-local && cd ~/connectome-local
53
58
 
54
- git clone -b feat/tui-mem-stats-and-strategy-passthrough \
55
- git@github.com:anima-research/connectome-host.git forking-knowledge-miner
56
- git clone -b fix/lazy-register-locus-and-send-failure-marker \
57
- git@github.com:anima-research/agent-framework.git
58
- git clone -b main git@github.com:anima-research/discord-mcpl.git
59
- git clone -b main git@github.com:anima-research/heartbeat-mcpl.git
60
- git clone -b main git@github.com:antra-tess/terminal-sessions-mcp.git
61
- git clone -b fix/before-request-hook-on-stream-paths \
62
- git@github.com:antra-tess/membrane.git
63
- git clone -b feat/adaptive-resolution \
64
- git@github.com:anima-research/context-manager.git
65
- git clone -b main git@github.com:anima-research/chronicle.git
66
- git clone -b main git@github.com:anima-research/mcpl-core-ts.git
59
+ git clone git@github.com:anima-research/connectome-host.git forking-knowledge-miner
60
+ git clone git@github.com:anima-research/agent-framework.git
61
+ git clone git@github.com:anima-research/discord-mcpl.git
62
+ git clone git@github.com:anima-research/heartbeat-mcpl.git
63
+ git clone git@github.com:antra-tess/terminal-sessions-mcp.git
64
+ git clone git@github.com:antra-tess/membrane.git
65
+ git clone git@github.com:anima-research/context-manager.git
66
+ git clone git@github.com:anima-research/chronicle.git
67
+ git clone git@github.com:anima-research/mcpl-core-ts.git
67
68
  ```
68
69
 
69
70
  ---
@@ -82,8 +83,9 @@ terminal-sessions-mcp
82
83
 
83
84
  In each: `npm install && npm run build` (build script is `tsc`).
84
85
 
85
- > `discord-mcpl` depends on `@connectome/mcpl-core` via `file:../mcpl-core-ts`
86
- > (a path dep), so build `mcpl-core-ts` first.
86
+ > `discord-mcpl` now depends on `@animalabs/mcpl-core` as a regular npm
87
+ > dependency (the old `file:../mcpl-core-ts` path dep is gone). A sibling
88
+ > `mcpl-core-ts` checkout is only needed when changing mcpl-core itself.
87
89
 
88
90
  ---
89
91
 
@@ -1,7 +1,10 @@
1
1
  # Conversational Locus & Output Routing — Design Note
2
2
 
3
- **Status:** Agreed design, implementation deferred.
4
- **Date:** 2026-05-29
3
+ **Status:** Implemented the locus now lives in `agent-framework`
4
+ (`src/mcpl/channel-registry.ts`; `routeSpeech` fires at turn completion in
5
+ `framework.ts`) and has grown beyond this note (global-locus fallback for
6
+ heartbeats, fork/home-channel semantics). Kept as design rationale.
7
+ **Date:** 2026-05-29 (status updated 2026-07-21)
5
8
  **Context:** Surfaced while wiring periodic heartbeats for an agent instance
6
9
  running headless on a Linux VPS.
7
10
 
@@ -95,6 +98,9 @@ discord-mcpl patch.
95
98
 
96
99
  ## Bugs found in passing (separate fixes, worth upstreaming)
97
100
 
101
+ *(Update 2026-07-21: #3 has been fixed upstream — `agent-framework`'s
102
+ feature-set-manager now normalizes array→record on ingest.)*
103
+
98
104
  1. **discord-mcpl `connect()` race** — resolved on `login()` (before gateway
99
105
  READY), so `registerDiscordChannels` enumerated an empty `guilds.cache`.
100
106
  *Fixed*: `connect()` now awaits the `ready` event. (Not yet
package/package.json CHANGED
@@ -1,22 +1,23 @@
1
1
  {
2
2
  "name": "@animalabs/connectome-host",
3
- "version": "0.3.9",
3
+ "version": "0.4.0",
4
4
  "description": "General-purpose agent TUI host with recipe-based configuration",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "start": "bun src/index.ts",
8
8
  "dev": "bun --watch src/index.ts",
9
9
  "test": "bun test",
10
+ "version": "bun scripts/release-changelog.ts && git add CHANGELOG.md",
10
11
  "build:web": "npm --prefix web install && npm --prefix web run build",
11
12
  "build:web:ci": "npm ci --prefix web && npm --prefix web run build",
12
13
  "relock:web": "rm -rf web/node_modules web/package-lock.json && npm --prefix web install",
13
14
  "postinstall": "test -d web && npm --prefix web install && npm --prefix web run build || true"
14
15
  },
15
16
  "dependencies": {
16
- "@animalabs/agent-framework": "^0.6.8",
17
+ "@animalabs/agent-framework": "^0.7.0",
17
18
  "@animalabs/chronicle": "^0.2.0",
18
- "@animalabs/context-manager": "^0.5.13",
19
- "@animalabs/membrane": "^0.5.73",
19
+ "@animalabs/context-manager": "^0.6.0",
20
+ "@animalabs/membrane": "^0.5.75",
20
21
  "@opentui/core": "^0.1.82"
21
22
  },
22
23
  "devDependencies": {
@@ -0,0 +1,32 @@
1
+ // Runs as npm's `version` lifecycle hook (see package.json): at that point
2
+ // package.json already carries the new version, and files staged here are
3
+ // included in the release commit that `npm version` then creates and tags.
4
+ import { readFileSync, writeFileSync } from "node:fs";
5
+
6
+ const { version } = JSON.parse(readFileSync("package.json", "utf8"));
7
+ const path = "CHANGELOG.md";
8
+ const text = readFileSync(path, "utf8");
9
+
10
+ const header = text.match(/^## Unreleased[ \t]*$/m);
11
+ if (!header || header.index === undefined) {
12
+ console.error("CHANGELOG.md: no '## Unreleased' section — add one before releasing.");
13
+ process.exit(1);
14
+ }
15
+
16
+ const escaped = version.replace(/[.]/g, "\\.");
17
+ if (new RegExp(`^## ${escaped}([^0-9]|$)`, "m").test(text)) {
18
+ console.error(`CHANGELOG.md: a '## ${version}' section already exists.`);
19
+ process.exit(1);
20
+ }
21
+
22
+ const afterHeader = text.slice(header.index + header[0].length);
23
+ const nextSection = afterHeader.search(/^## /m);
24
+ const unreleasedBody = nextSection === -1 ? afterHeader : afterHeader.slice(0, nextSection);
25
+ if (!/^\s*[-*] /m.test(unreleasedBody)) {
26
+ console.error(`CHANGELOG.md: '## Unreleased' has no entries — nothing to release as ${version}.`);
27
+ process.exit(1);
28
+ }
29
+
30
+ const date = new Date().toISOString().slice(0, 10);
31
+ writeFileSync(path, text.replace(header[0], `## Unreleased\n\n## ${version} — ${date}`));
32
+ console.log(`CHANGELOG.md: cut Unreleased into '## ${version} — ${date}'.`);