@staix/agent-hub 0.46.0 → 0.46.1

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ Issue and pull request numbers in the entries for 0.7.7 and earlier refer to the
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.46.1
8
+
9
+ - Resolve `@staix/agent-mem` 0.38.0 in `bun.lock` so the repository's tests and CI run on the version a fresh install resolves; the declared range `>=0.33.0 <1.0.0` is unchanged. The recovery package refuses a ranged `@staix/cli-output` pin with the output message again when agent-mem declares it. Refs #1664, hub task 1084.
10
+
11
+ - Let the recovery package accept agent-mem 0.37.0 and later, which declares exactly the pinned `@staix/cli-output`, so `ahub upgrade`, restart staging and conductor recovery work on a fresh install; any other dependency, a range or a nested `node_modules` is still refused. Closes #1664, hub task 1083.
12
+
7
13
  ## 0.46.0
8
14
 
9
15
  - Release N-1 for 0.46.x is published 0.45.0, which declares agent-mem `>=0.33.0 <1.0.0`; its fixture lock pins the 0.33.0 that the 0.45.0 release resolved, with control protocol 17 (descriptor floor 16). The N-1 fixture and matrix pin that package, and the matrix now records the declared range apart from the resolved version; the separate protocol-16 fixture stays at 0.25.0. The isolated compatibility fixture covers old clients and plugins against the new daemon and new clients and plugins against the old daemon; it does not prove live-agent, rollback, or shared-home compatibility. The protocol window is unchanged; the daemon adds the `instructed_intent`, `instructed_exact` and `roadmap_instructed` features, and a recovery target without `roadmap_instructed` (0.45.0) is refused while an instructed milestone history entry is retained. The CLI adds `ahub instructed run`, the internal `ahub instruction-hook`, `ahub setup --undo`, `ahub init --no-jcode-home`, the `ahub roster add` preflight with `--yes`, `ahub roadmap decompose --publish` and `ahub budget execution configure --reason`; a 0.45.0 CLI does not offer these. The MCP tool set is unchanged; only the `hub_roadmap_decompose` and `hub_task_decline` descriptions changed. The declared agent-mem range is unchanged, and no memory home or sync format floor is raised.
package/README.md CHANGED
@@ -5,7 +5,7 @@ Code, Codex, Kimi Code, Pi and a hub-owned local worker (plus Qwen Code, Jcode a
5
5
  Antigravity if you want them) share a message bus, a task board and a memory, each
6
6
  connected through its own native interface.
7
7
 
8
- Status: 0.46.0, control protocol 17 (accepts 16). Bun + TypeScript, one loopback daemon per
8
+ Status: 0.46.1, control protocol 17 (accepts 16). Bun + TypeScript, one loopback daemon per
9
9
  project. Site: [agent-hub.staix.net](https://agent-hub.staix.net).
10
10
 
11
11
  Inspect bounded task and attempt metadata with `ahub lineage show`; admit external
@@ -121,7 +121,7 @@ Scope: the operator console, control WS and its protocol, state files, the dashb
121
121
  - `native_hook_launch` (#543) is console-only and needs a definition with `hooks.factsHook`; one launch per peer. Refuse `begin` during recovery or shutdown, off roster or while the peer is attached. `end` needs the matching `launchId` and is the only request besides `status` and `kill` a stopping hub admits; closing the launcher's socket ends its launch. Both settle an open run `interrupted` once. Accept `native_facts` only from the tools role for the current `instanceId` and `launchId`, the latched native session and socket generation, and workspace paths whose `realPath` is the project. When a launch records `nativeHome`, its transcript index must be exactly `<nativeHome>/session_index.jsonl`. Close a `ws-pull` peer's hello without `channel: false` with 4403.
122
122
  - `native_tui_launch` (#464) is console-only and resolves only a running owned `JcodePeer` under its own kind id (`tuiLaunch`). Refuse it while stopping, during recovery, off roster, during that peer's roster change or requested stop, or when `jcodeMcpReady` fails against the daemon's `SERVER_JS`; a `binding` must name the current `launchId` and `sessionId`. Failures answer fixed errors with details withheld (a `JcodeOptionMismatch` names only the flag in `option`, #559) plus one closed cause `code` (a `JcodeTuiRefusalCode`, or `hub_busy`, `not_running`, `mcp_stale`, `bad_request`), logged as one `hub.log` line (#1093), and the launch tuple (socket, env) goes only into that console reply, never into `status`, `status.json` or a log. A launcher sends it only when the hub's `features` list `native_tui_launch`.
123
123
 
124
- - When preserving a recovery source, copy only the hub's declared first-party `@staix/agent-mem` and exact `@staix/cli-output` packages through `preserveRuntimeDependencies` in `src/cli/recovery-package.ts`; include their identities and runtime bytes in `packageDigest` without changing digests of older packages that lack the output dependency. Never copy the whole node_modules tree or link a preserved source to a mutable installation. Verify preserved sources with `ownDependencies: true` so a missing or symlinked dependency cannot resolve an ancestor installation. Verify staged releases with `dependencyRoot` bound to their retained install directory; never resolve beyond it. Keep no-dependency release digests compatible.
124
+ - When preserving a recovery source, copy only the hub's declared first-party `@staix/agent-mem` and exact `@staix/cli-output` packages through `preserveRuntimeDependencies` in `src/cli/recovery-package.ts`; include their identities and runtime bytes in `packageDigest` without changing digests of older packages that lack the output dependency. Never copy the whole node_modules tree or link a preserved source to a mutable installation. Verify preserved sources with `ownDependencies: true` so a missing or symlinked dependency cannot resolve an ancestor installation. Verify staged releases with `dependencyRoot` bound to their retained install directory; never resolve beyond it. Keep no-dependency release digests compatible. agent-mem may declare only `@staix/cli-output` at the hub's exact pin (0.37.0 and later do); refuse any other entry, a range, or a nested `node_modules` under agent-mem, because the digest hashes only the shared top-level copy (#1664).
125
125
  - Release checker and committed release policy (#1120, #1381): `scripts/check-docs.mjs` is the one file outside `RUNTIME_ASSETS` that a capture carries (`RELEASE_CHECKER` in `src/cli/recovery-package.ts`, copied only when the source has it and refused when it is not a regular file), and `captureLayout` in `src/hub/runtime-capture-prune.ts` accepts an optional `scripts/` holding exactly that file, so captures made before #1120 still prune. It is deliberately not in `packageDigest`: widening the digest makes every already-staged release refuse as "cached release changed". `readDocEvidenceDetailed` returns `{ unavailable }` for a missing or failing checker and `ReleaseAuthorizations` turns that into its own refusal; only evidence that was read and is not fresh may say "stale documentation". Keep its spawn arguments unchanged (seed `release-committed-doc-metadata`). For the complete policy, receipt and `releasePolicyNotices` contract, read `tasks.md`'s Release authorization rule when changing that boundary. The production `ReleaseAuthorizations` host port in `daemon.ts` reads policy from the candidate commit; keep that injected port fail-closed.
126
126
 
127
127
  - Render staleness only through the call-scoped privacy preflight and bounded metadata probe (`memory-staleness.ts`); on a tree not modified during the call, private/denied/observed-symlink/unknown paths never produce a marker. Retain the explicit same-user concurrent-swap ceiling in docs/memory.md and the probe-loop ponytail. Keep hints out of stored rows and route native brief decoration after selection so one batch shares its probe budget.
@@ -2107,7 +2107,7 @@ ahub memory forget 1a2b3c4d # also promote, demote, supersede, rebu
2107
2107
 
2108
2108
  `"memory": { "native": false }` in `.agenthub/config.json` turns it off for a project.
2109
2109
 
2110
- The declared `@staix/agent-mem` range (`>=0.33.0 <1.0.0` in `package.json`, resolved to 0.33.0 by `bun.lock`) resolves `AMEM_HOME`, then `$AGENTHUB_HOME/memory`, then `~/.agenthub/memory`. A plain release inside that range opens memory without a hub release when its host API range intersects the supported `[1, 1]`; an out-of-range, unattested, prerelease or host-API-incompatible package refuses to open it. A new minor can raise the store format floor: an older hub or amem cannot read a store a newer one wrote, so roll back the hub together with the store. An absent `M/profile.json` selects shared v1; an explicit generation selects `M/generations/G` with the package's readonly legacy bridge. All daemon memory consumers and the hub memory/goal CLI use that selected profile. Invalid metadata or a missing selected generation makes native memory unavailable while the bus and board continue; there is no fallback to legacy writes. Inspect the daemon's memory binding/availability before interpreting missing memory as an empty store.
2110
+ The declared `@staix/agent-mem` range (`>=0.33.0 <1.0.0` in `package.json`, resolved to 0.38.0 by `bun.lock`) resolves `AMEM_HOME`, then `$AGENTHUB_HOME/memory`, then `~/.agenthub/memory`. A plain release inside that range opens memory without a hub release when its host API range intersects the supported `[1, 1]`; an out-of-range, unattested, prerelease or host-API-incompatible package refuses to open it. A new minor can raise the store format floor: an older hub or amem cannot read a store a newer one wrote, so roll back the hub together with the store. An absent `M/profile.json` selects shared v1; an explicit generation selects `M/generations/G` with the package's readonly legacy bridge. All daemon memory consumers and the hub memory/goal CLI use that selected profile. Invalid metadata or a missing selected generation makes native memory unavailable while the bus and board continue; there is no fallback to legacy writes. Inspect the daemon's memory binding/availability before interpreting missing memory as an empty store.
2111
2111
 
2112
2112
  The daemon checks its selector at hub operation entry and before candidate/counter writes. It does not hot-switch handles or provide an atomic fence against selection changes during an in-flight core call. Quiesce consumers and close their handles before migration or selection changes; reopen through the supported session-preserving lifecycle afterward. Candidate/counter storage remains `M/candidates.db`, independent of `G`; since agent-mem 0.7.0 `amem review` also lists and accepts candidates on a selected generation. Every running hub using this home needs an authenticated receipt: a matching ready binding, or a generation-capable unbound receipt (`disabled` when native memory is off, `unavailable` when opening failed) proving it holds no memory handle. An unbound daemon and zero running hubs are quiesced for memory; a stale bound handle, unreadable registry or unknown runtime is not ready. Existing JSON memory/goal results remain unchanged; the additive binding receipt belongs to daemon status, profile-check and the decay object. This source integration does not authorize installing a new runtime, migrating real memory, restarting sessions or claiming real-machine sync/capture receipts. Migration/deactivation and their limits belong to [agent-mem](https://github.com/STAIxBWLB/agent-mem); see [the hub profile contract](memory.md#selected-memory-profile).
2113
2113
 
@@ -18,7 +18,7 @@ Or use the matching GitHub release:
18
18
 
19
19
  <!-- facts:install-tag -->
20
20
  ```bash
21
- bun add -g github:STAIxBWLB/agent-hub#v0.46.0
21
+ bun add -g github:STAIxBWLB/agent-hub#v0.46.1
22
22
  ahub setup
23
23
  ```
24
24
  <!-- /facts:install-tag -->
@@ -54,6 +54,12 @@ A project whose hub is stopped is upgraded without starting it: `ahub upgrade
54
54
  --all-stopped --to <version>` does that for every stopped project at once
55
55
  (`--dry-run` lists each one first).
56
56
 
57
+ ## Upgrading to 0.46.1
58
+
59
+ Fixes `ahub upgrade`, restart and conductor recovery on an install that resolved agent-mem 0.37.0 or later. Those versions declare `@staix/cli-output`, and 0.46.0 refused them with `memory runtime dependency identity/version mismatch`. On such an install, the 0.46.0 `ahub upgrade` fails on that same error before it plans anything. Install 0.46.1 globally first (`bun add -g @staix/agent-hub@0.46.1`, then `ahub setup`), then run `ahub upgrade` from the new CLI. Nothing else changes, and the declared agent-mem range stays `>=0.33.0 <1.0.0`.
60
+
61
+ `ahub upgrade` does not update the global CLI or the shared Claude plugin: run `bun add -g @staix/agent-hub@0.46.1` and then `ahub setup` yourself, and `ahub doctor` warns while either is older than a running daemon.
62
+
57
63
  ## Upgrading to 0.46.0
58
64
 
59
65
  A managed Claude session can now run hub commands on your instruction: `/agent-hub:ahub run <command>` runs the exact command you typed, and `/agent-hub:ahub <what you want>` lets the agent pick supported commands, at most ten per instruction. A project with no retained choice starts in `intent` mode; turn it off from a terminal with `ahub settings set instructed.mode off`, or narrow it with `exact`. Permission, trust, execution paths, release and merge, irreversible deletion, identity, PII tasks and private turns stay closed in every mode, and spending stays closed in intent mode (exact mode admits only the listed task spending settings) (operations guide, "Claude plugin skills"). `ahub setup` now also installs the hub's skills into the user skill directories of Codex, Kimi, Qwen, Jcode, Pi and agy behind a `.ahub-skill.json` marker, and `ahub setup --undo` removes only unmodified trees it wrote. `ahub init` creates a separate hub-owned jcode home when jcode is installed or on the roster and the project still uses your own jcode home, unless you pass `--no-jcode-home`; after the `jcode login` step it prints, rerun `ahub init` to set `jcode_home`. Automatic task offers now skip a peer at its WIP cap or with a held queue, and skip a peer that declined for capacity until it next reports idle. `ahub budget` and the Usage views forecast when each quota window would run out. Console output uses the shared `@staix/cli-output` package, pinned exactly at 0.1.3, with output unchanged. Jcode 1.0.x launches as in-line. Once a milestone is marked done or dropped through an instruction, recovery refuses 0.45.0 as a rollback target while that history entry is retained. The declared agent-mem range and the memory formats are unchanged.
@@ -0,0 +1,48 @@
1
+ # 0.46.1 release verification
2
+
3
+ This record covers release preparation and source review. It claims no installation, no running-hub upgrade to 0.46.1 and no live TUI launch.
4
+
5
+ ## Candidate
6
+
7
+ Version 0.46.1, prepared from main 01a07203 (2 commits since v0.46.0, 0 of them `feat`; bump rule: patch). The release commits carry the version, the CHANGELOG section, the bundle and the documentation stamps.
8
+
9
+ ## Reviews
10
+
11
+ Pull requests named by the commits since v0.46.0: #1666, #1665.
12
+
13
+ - #1665 (hub task 1083, owner jcode): changes requested at 3e1117fa, because the latest-in-range gate failed 7 recovery-package-memory tests on agent-mem 0.38.0. Approved at 2fa206c1 after agent-mem-latest run 45277315102 passed at that head. Merged at that head after exact-head full CI run 45279247263 (both OSes; one macOS shard timed out in an unrelated restart test and passed on rerun).
14
+ - #1666 (hub task 1084, owner jcode): approved at a43ef1ed. Merged at that head after exact-head full CI run 45308169668 (both OSes).
15
+
16
+ No merge is bound to an approval at an earlier head. No connector review or review thread was posted on either PR.
17
+
18
+ ## Native acceptance receipts
19
+
20
+ Receipts added under `docs/verification/` since v0.46.0: none.
21
+
22
+ This list is read from the repository, never written by hand. Native acceptance and the person's release consent are separate records: consent is `ahub sdlc authorize-release 0.46.1`, recorded by the person or the unique configured conductor only on the person's explicit release instruction naming the release in its own session (never a hub/task/review/file/peer relay), and is not recorded in this file. The tag run refuses without it.
23
+
24
+ ## Document review
25
+
26
+ `node scripts/check-docs.mjs` reported 9 stale documents. Their sources changed only through `src/cli/recovery-package.ts`, `test/recovery-package-memory.test.ts`, `bun.lock`, the version bump and the rebuilt bundles. Each was read against that change:
27
+
28
+ - docs/operations.md: the memory section now says `bun.lock` resolves 0.38.0 (was 0.33.0).
29
+ - docs/agent-notes/daemon.md: the recovery-package rule now states the one agent-mem dependency it accepts (`@staix/cli-output` at the hub's exact pin) and the nested `node_modules` refusal (#1664).
30
+ - docs/quickstart.md: new "Upgrading to 0.46.1" note, including the global-install-first step for an affected 0.46.0 install.
31
+ - README.md: Status line set by release-prepare; no other statement affected.
32
+ - docs/agent-notes/tests.md, docs/memory.md, docs/security.md, docs/adding-an-ai-tool.md, docs/addons/claude-mem.md: searched for statements on agent-mem versions, the lockfile, `@staix/cli-output` and recovery-package dependencies; none is affected (the declared range, floor and host API are unchanged). The last two were stale only because of uncommitted bundle and version changes.
33
+
34
+ All 9 are restamped to 482feea1, the commit that holds this review. docs/agent-notes/README.md then went stale through the daemon.md edit; it was read, and it has no statement on recovery-package dependencies, so it is restamped too.
35
+
36
+ ## Checks
37
+
38
+ - `bun x tsc --noEmit`: exit 0.
39
+ - `bun scripts/build.mjs --check`: exit 0.
40
+ - `node scripts/check-package.mjs` with the CI-pinned npm 11.20.0: `package: OK (1013 files, @staix/agent-hub@0.46.1)`. The Mac's npm 12.2.2 prints a different `npm pack` shape, and the script refuses it by design.
41
+ - `node scripts/check-docs.mjs --require-fresh`: run after the restamp commit; result in the release PR.
42
+ - Release PR exact-head CI: recorded on the PR.
43
+
44
+ ## Known gaps, not blocking
45
+
46
+ - The dgx02 `scripts/check.sh --changed` gate for #1666 hit its 45-minute hang backstop without a failing test; the merge rests on exact-head full CI on both OSes.
47
+ - No live upgrade of a 0.46.0 install that resolved agent-mem 0.37.0 or later was run; the fix is proven by the recovery-package tests and by agent-mem-latest run 45277315102 on agent-mem 0.38.0.
48
+ - Native acceptance: none added; this release changes no native adapter.
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "documents": {
4
4
  "README.md": {
5
- "verifiedAgainst": "90114588a482b46009120d199c919137bae4e4cf",
5
+ "verifiedAgainst": "482feea1951d5e3280597097283413b12a4ee5a3",
6
6
  "paths": [
7
7
  "package.json",
8
8
  "src/",
@@ -11,14 +11,14 @@
11
11
  ]
12
12
  },
13
13
  "docs/security.md": {
14
- "verifiedAgainst": "90114588a482b46009120d199c919137bae4e4cf",
14
+ "verifiedAgainst": "482feea1951d5e3280597097283413b12a4ee5a3",
15
15
  "paths": [
16
16
  "src/",
17
17
  "templates/"
18
18
  ]
19
19
  },
20
20
  "docs/operations.md": {
21
- "verifiedAgainst": "90114588a482b46009120d199c919137bae4e4cf",
21
+ "verifiedAgainst": "482feea1951d5e3280597097283413b12a4ee5a3",
22
22
  "paths": [
23
23
  "package.json",
24
24
  "src/",
@@ -35,7 +35,7 @@
35
35
  ]
36
36
  },
37
37
  "docs/quickstart.md": {
38
- "verifiedAgainst": "90114588a482b46009120d199c919137bae4e4cf",
38
+ "verifiedAgainst": "482feea1951d5e3280597097283413b12a4ee5a3",
39
39
  "paths": [
40
40
  "package.json",
41
41
  "src/",
@@ -43,7 +43,7 @@
43
43
  ]
44
44
  },
45
45
  "docs/adding-an-ai-tool.md": {
46
- "verifiedAgainst": "90114588a482b46009120d199c919137bae4e4cf",
46
+ "verifiedAgainst": "482feea1951d5e3280597097283413b12a4ee5a3",
47
47
  "paths": [
48
48
  "src/adapters/registry-types.ts",
49
49
  "src/adapters/registry.ts",
@@ -62,7 +62,7 @@
62
62
  ]
63
63
  },
64
64
  "docs/addons/claude-mem.md": {
65
- "verifiedAgainst": "90114588a482b46009120d199c919137bae4e4cf",
65
+ "verifiedAgainst": "482feea1951d5e3280597097283413b12a4ee5a3",
66
66
  "paths": [
67
67
  "src/hub/tooling.ts",
68
68
  "src/adapters/definitions/native-policy-aux.ts",
@@ -183,7 +183,7 @@
183
183
  ]
184
184
  },
185
185
  "docs/memory.md": {
186
- "verifiedAgainst": "90114588a482b46009120d199c919137bae4e4cf",
186
+ "verifiedAgainst": "482feea1951d5e3280597097283413b12a4ee5a3",
187
187
  "paths": [
188
188
  "package.json",
189
189
  "src/memory/",
@@ -368,7 +368,7 @@
368
368
  ]
369
369
  },
370
370
  "docs/agent-notes/daemon.md": {
371
- "verifiedAgainst": "90114588a482b46009120d199c919137bae4e4cf",
371
+ "verifiedAgainst": "482feea1951d5e3280597097283413b12a4ee5a3",
372
372
  "paths": [
373
373
  "src/hub/daemon.ts",
374
374
  "src/hub/control-client.ts",
@@ -527,7 +527,7 @@
527
527
  ]
528
528
  },
529
529
  "docs/agent-notes/tests.md": {
530
- "verifiedAgainst": "90114588a482b46009120d199c919137bae4e4cf",
530
+ "verifiedAgainst": "482feea1951d5e3280597097283413b12a4ee5a3",
531
531
  "paths": [
532
532
  "test/",
533
533
  "scripts/check.sh",
@@ -556,7 +556,7 @@
556
556
  ]
557
557
  },
558
558
  "docs/agent-notes/README.md": {
559
- "verifiedAgainst": "90114588a482b46009120d199c919137bae4e4cf",
559
+ "verifiedAgainst": "7dbc4dc0d9e166a7074e773f50014a210db80b4d",
560
560
  "paths": [
561
561
  "src/cli/console-state.ts",
562
562
  "src/cli/attention.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staix/agent-hub",
3
- "version": "0.46.0",
3
+ "version": "0.46.1",
4
4
  "description": "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-hub",
3
- "version": "0.46.0",
3
+ "version": "0.46.1",
4
4
  "description": "Channel between Claude Code and the agent-hub daemon: peer messages from Codex, Kimi and the local worker arrive as channel events; hub_send replies.",
5
5
  "author": {
6
6
  "name": "Young Joon Lee",
@@ -14703,7 +14703,7 @@ var package_default;
14703
14703
  var init_package = __esm(() => {
14704
14704
  package_default = {
14705
14705
  name: "@staix/agent-hub",
14706
- version: "0.46.0",
14706
+ version: "0.46.1",
14707
14707
  description: "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
14708
14708
  license: "MIT",
14709
14709
  type: "module",
@@ -15000,7 +15000,6 @@ var init_brief_curated = __esm(() => {
15000
15000
  init_brief_cache();
15001
15001
  MAX_AGE = 24 * 60 * 60 * 1000;
15002
15002
  });
15003
-
15004
15003
  // node_modules/@staix/agent-mem/src/memory/home-identity.ts
15005
15004
  var resolved;
15006
15005
  var init_home_identity = __esm(() => {
@@ -15058,6 +15057,22 @@ var init_mutation = __esm(() => {
15058
15057
  init_platform();
15059
15058
  mutations = new WeakMap;
15060
15059
  });
15060
+
15061
+ // node_modules/@staix/agent-mem/src/memory/formats.ts
15062
+ import { closeSync as closeSync9, constants as constants8, fstatSync as fstatSync8, openSync as openSync9, readFileSync as readFileSync8, readSync as readSync6 } from "fs";
15063
+ var MAX_BYTES4, SEMVER, READER_VERSION;
15064
+ var init_formats = __esm(() => {
15065
+ MAX_BYTES4 = 64 * 1024;
15066
+ SEMVER = /^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/;
15067
+ READER_VERSION = (() => {
15068
+ try {
15069
+ const { version } = JSON.parse(readFileSync8(new URL("../../package.json", import.meta.url), "utf8"));
15070
+ return typeof version === "string" && SEMVER.test(version) ? version : undefined;
15071
+ } catch {
15072
+ return;
15073
+ }
15074
+ })();
15075
+ });
15061
15076
  // node_modules/@staix/agent-mem/src/memory/sync-placement-bound.ts
15062
15077
  var PLACEMENT_SOURCE_MAX_BYTES;
15063
15078
  var init_sync_placement_bound = __esm(() => {
@@ -15068,6 +15083,7 @@ var init_sync_placement_bound = __esm(() => {
15068
15083
  // node_modules/@staix/agent-mem/src/memory/sync-placement-publication-plan.ts
15069
15084
  var init_sync_placement_publication_plan = __esm(() => {
15070
15085
  init_generation();
15086
+ init_formats();
15071
15087
  init_sync_placement_journal_format();
15072
15088
  init_sync_placement_bound();
15073
15089
  });
@@ -15079,12 +15095,12 @@ var init_sync_placement_projection = __esm(() => {
15079
15095
  });
15080
15096
 
15081
15097
  // node_modules/@staix/agent-mem/src/memory/sync-placement-writers.ts
15082
- var MAX_BYTES4, MAX_PACKAGE;
15098
+ var MAX_BYTES5, MAX_PACKAGE;
15083
15099
  var init_sync_placement_writers = __esm(() => {
15084
15100
  init_generation();
15085
15101
  init_platform();
15086
15102
  init_sync_placement_format();
15087
- MAX_BYTES4 = 64 * 1024 * 1024;
15103
+ MAX_BYTES5 = 64 * 1024 * 1024;
15088
15104
  MAX_PACKAGE = 64 * 1024;
15089
15105
  });
15090
15106
 
@@ -15145,22 +15161,6 @@ var init_sync_placement_batch_intent = __esm(() => {
15145
15161
  PLACEMENT_BATCH_INTENT_MAX_BYTES = 20 * 1024 * 1024;
15146
15162
  });
15147
15163
 
15148
- // node_modules/@staix/agent-mem/src/memory/formats.ts
15149
- import { closeSync as closeSync9, constants as constants8, fstatSync as fstatSync8, openSync as openSync9, readFileSync as readFileSync8, readSync as readSync6 } from "fs";
15150
- var MAX_BYTES5, SEMVER, READER_VERSION;
15151
- var init_formats = __esm(() => {
15152
- MAX_BYTES5 = 64 * 1024;
15153
- SEMVER = /^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/;
15154
- READER_VERSION = (() => {
15155
- try {
15156
- const { version } = JSON.parse(readFileSync8(new URL("../../package.json", import.meta.url), "utf8"));
15157
- return typeof version === "string" && SEMVER.test(version) ? version : undefined;
15158
- } catch {
15159
- return;
15160
- }
15161
- })();
15162
- });
15163
-
15164
15164
  // node_modules/@staix/agent-mem/src/memory/sync-placement-journal-storage.ts
15165
15165
  var inflight, publicationDurability;
15166
15166
  var init_sync_placement_journal_storage = __esm(() => {
@@ -15607,35 +15607,35 @@ var init_capture = __esm(() => {
15607
15607
  SPOOL_MAX_BYTES = 256 * 1024;
15608
15608
  });
15609
15609
 
15610
- // node_modules/@staix/agent-mem/src/memory/style.ts
15611
- function paint(role, text, color) {
15612
- return color && ROLE_SGR[role] ? `${ROLE_SGR[role]}${text}${SGR_RESET}` : text;
15613
- }
15614
- function style(color, ascii = true) {
15615
- return {
15616
- color,
15617
- ascii,
15618
- ok: (text) => paint("success", text, color),
15619
- attention: (text) => paint("warning", text, color),
15620
- error: (text) => paint("error", text, color),
15621
- dim: (text) => paint("hint", text, color),
15622
- bold: (text) => paint("value", text, color)
15623
- };
15624
- }
15625
- var ESC, SGR_RESET, ROLE_SGR, MARKERS, PLAIN;
15626
- var init_style = __esm(() => {
15627
- ESC = String.fromCharCode(27);
15628
- SGR_RESET = `${ESC}[0m`;
15610
+ // node_modules/@staix/cli-output/src/index.ts
15611
+ function terminalText(value, options = {}) {
15612
+ const text = String(value ?? "").replace(/\r\n?/g, `
15613
+ `).replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\|$)/g, "").replace(/\x1b[P_X^][\s\S]*?(?:\x1b\\|$)/g, "").replace(/(?:\x1b\[|\x9b)[0-?]*[ -/]*(?:[@-~]|(?=\n|$))/g, "").replace(/\x1b[^\n]?/g, "");
15614
+ return options.singleLine ? text.replace(/[\x00-\x1f\x7f-\x9f]/g, " ") : text.replace(/[\x00-\x08\x0b-\x1f\x7f-\x9f]/g, "");
15615
+ }
15616
+ function paint(spans, color, styles = {}) {
15617
+ return spans.map((span) => {
15618
+ const text = terminalText(span.text);
15619
+ const role = span.role && Object.hasOwn(ROLE_SGR, span.role) ? ROLE_SGR[span.role] : undefined;
15620
+ const custom = span.style && Object.hasOwn(styles, span.style) ? styles[span.style] : undefined;
15621
+ if (custom && !/^\x1b\[[0-9;]+m$/.test(custom))
15622
+ throw new Error(`invalid SGR for style ${span.style}`);
15623
+ const sgr = role !== undefined ? role : custom;
15624
+ return color && sgr && text ? sgr + text + SGR_RESET : text;
15625
+ }).join("");
15626
+ }
15627
+ var SGR_RESET = "\x1B[0m", ROLE_SGR, MARKERS, EXIT;
15628
+ var init_src = __esm(() => {
15629
15629
  ROLE_SGR = Object.freeze({
15630
- header: `${ESC}[1;34m`,
15631
- section: `${ESC}[1;35m`,
15632
- key: `${ESC}[34m`,
15630
+ header: "\x1B[1;34m",
15631
+ section: "\x1B[1;35m",
15632
+ key: "\x1B[34m",
15633
15633
  value: "",
15634
- success: `${ESC}[1;32m`,
15635
- warning: `${ESC}[1;33m`,
15636
- error: `${ESC}[1;31m`,
15637
- hint: `${ESC}[90m`,
15638
- accent: `${ESC}[36m`
15634
+ success: "\x1B[1;32m",
15635
+ warning: "\x1B[1;33m",
15636
+ error: "\x1B[1;31m",
15637
+ hint: "\x1B[90m",
15638
+ accent: "\x1B[36m"
15639
15639
  });
15640
15640
  MARKERS = Object.freeze({
15641
15641
  ok: { glyph: "\u2713", ascii: "ok", role: "success" },
@@ -15647,7 +15647,26 @@ var init_style = __esm(() => {
15647
15647
  active: { glyph: "*", ascii: "*", role: "success" },
15648
15648
  next: { glyph: "\u2192", ascii: "->", role: "accent" }
15649
15649
  });
15650
+ EXIT = Object.freeze({ ok: 0, fail: 1, usage: 2, tempfail: 75 });
15651
+ });
15652
+
15653
+ // node_modules/@staix/agent-mem/src/memory/style.ts
15654
+ function style(color, ascii = true) {
15655
+ return {
15656
+ color,
15657
+ ascii,
15658
+ ok: (text) => paint([{ role: "success", text }], color),
15659
+ attention: (text) => paint([{ role: "warning", text }], color),
15660
+ error: (text) => paint([{ role: "error", text }], color),
15661
+ dim: (text) => paint([{ role: "hint", text }], color),
15662
+ bold: (text) => paint([{ role: "value", text }], color)
15663
+ };
15664
+ }
15665
+ var PLAIN, CLI_MEMORY_RENDER;
15666
+ var init_style = __esm(() => {
15667
+ init_src();
15650
15668
  PLAIN = style(false);
15669
+ CLI_MEMORY_RENDER = Symbol("cli-memory-render");
15651
15670
  });
15652
15671
 
15653
15672
  // node_modules/@staix/agent-mem/src/memory/prune.ts
@@ -15795,10 +15814,13 @@ var init_catalog = __esm(() => {
15795
15814
  var init_hook_resources = () => {};
15796
15815
 
15797
15816
  // node_modules/@staix/agent-mem/src/memory/metrics.ts
15798
- var METRICS_MAX_BYTES;
15817
+ var METRICS_MAX_BYTES, HOOK_BYTES, SEARCH_BYTES, PHASE_BYTES;
15799
15818
  var init_metrics = __esm(() => {
15800
15819
  init_hook_resources();
15801
- METRICS_MAX_BYTES = 64 * 1024;
15820
+ METRICS_MAX_BYTES = 128 * 1024;
15821
+ HOOK_BYTES = 74 * 1024;
15822
+ SEARCH_BYTES = 30 * 1024;
15823
+ PHASE_BYTES = 6 * 1024;
15802
15824
  });
15803
15825
 
15804
15826
  // node_modules/@staix/agent-mem/src/memory/capacity.ts
@@ -15810,6 +15832,7 @@ var init_capacity = __esm(() => {
15810
15832
  init_lifecycle();
15811
15833
  init_capture();
15812
15834
  init_style();
15835
+ init_src();
15813
15836
  });
15814
15837
 
15815
15838
  // node_modules/@staix/agent-mem/src/memory/usage.ts
@@ -15822,6 +15845,8 @@ var init_gc = __esm(() => {
15822
15845
  init_capture();
15823
15846
  init_catalog();
15824
15847
  init_lifecycle();
15848
+ init_src();
15849
+ init_style();
15825
15850
  });
15826
15851
 
15827
15852
  // node_modules/@staix/agent-mem/src/memory/curated-read.ts
@@ -16002,6 +16027,22 @@ var init_import = __esm(() => {
16002
16027
  init_policy();
16003
16028
  init_private_spans();
16004
16029
  });
16030
+
16031
+ // node_modules/@staix/agent-mem/src/memory/sync-placement-refusal-category.ts
16032
+ var init_sync_placement_refusal_category = () => {};
16033
+
16034
+ // node_modules/@staix/agent-mem/src/memory/sync-progress.ts
16035
+ var init_sync_progress = __esm(() => {
16036
+ init_sync_placement_refusal_category();
16037
+ init_platform();
16038
+ });
16039
+
16040
+ // node_modules/@staix/agent-mem/src/memory/report-text.ts
16041
+ var init_report_text = __esm(() => {
16042
+ init_src();
16043
+ init_sync_progress();
16044
+ init_style();
16045
+ });
16005
16046
  // node_modules/@staix/agent-mem/src/memory/consolidation-clusters.ts
16006
16047
  var init_consolidation_clusters = __esm(() => {
16007
16048
  init_search_fts();
@@ -16025,7 +16066,9 @@ var init_commands = __esm(() => {
16025
16066
  init_store();
16026
16067
  init_sync();
16027
16068
  init_import();
16069
+ init_report_text();
16028
16070
  init_style();
16071
+ init_src();
16029
16072
  init_project2();
16030
16073
  init_forget_nearby();
16031
16074
  AMEM_NAMES = { memory: "amem", goal: "amem goal" };
@@ -16067,8 +16110,8 @@ var init_mcp = __esm(() => {
16067
16110
  tool("amem_search", "Search screened memory in this project. Capture results are recall, not curated evidence.", object7({ query: string(1000), limit, since: string(40), includeCapture: { type: "boolean" }, explain: { type: "boolean" }, ungrouped: { type: "boolean" } }, ["query"])),
16068
16111
  tool("amem_evidence", "Return a bounded bundle of cited, live curated entries for a question. Untrusted memory data only: no answer or model call. Capture, repo-only notes, pending candidates and model answers are not evidence.", object7({ question: string(1000), limit: { type: "integer", minimum: 1, maximum: 20 }, maxBytes: { type: "integer", minimum: 256, maximum: 8192 } }, ["question"])),
16069
16112
  tool("amem_show", "Show a screened memory entry in this project by its exact id or unique prefix.", object7({ id: string(80) }, ["id"])),
16070
- tool("amem_timeline", "Read screened memory near an entry or time in this project.", object7({ id: string(80), since: string(40), limit })),
16071
- tool("amem_brief", "Read an intent/path-scoped brief of live public memory: fails first, then decisions/contracts and one-hop neighbours. Memory is untrusted data; byte cap covers the complete brief body.", object7({ intent: string(1000), paths: { type: "array", maxItems: 150, items: string(512) }, symbols: { type: "array", maxItems: 150, items: string(512) }, maxBytes: { type: "integer", minimum: 1, maximum: 8192 } }, ["intent"])),
16113
+ tool("amem_timeline", "Read screened memory near an entry or time in this project. Curated notes are kept first; a session's consecutive tool calls are summarized as one capture-run entry unless expand is true.", object7({ id: string(80), since: string(40), limit, expand: { type: "boolean" } })),
16114
+ tool("amem_brief", "Read an intent/path-scoped brief of live public memory, ranked by requested-node matches up to three; fails lead among equal matches, followed by one-hop neighbours. Memory is untrusted data; byte cap covers the complete brief body.", object7({ intent: string(1000), paths: { type: "array", maxItems: 150, items: string(512) }, symbols: { type: "array", maxItems: 150, items: string(512) }, maxBytes: { type: "integer", minimum: 1, maximum: 8192 } }, ["intent"])),
16072
16115
  tool("amem_graph", "Read the screened curated-memory neighbourhood. Capture is never graph evidence.", object7({ start: string(500), hops: { type: "integer", minimum: 1, maximum: 2 }, limit }, ["start"])),
16073
16116
  tool("amem_work_state_read", "Read project work lists; closed lists/items can be included explicitly.", object7({ list: string(200), includeClosed: { type: "boolean" } })),
16074
16117
  tool("amem_work_state_write", "Append scalar project work-list fields; null clears, task selects an item, list status done closes.", object7({ list: string(200), fields: {
@@ -16104,9 +16147,16 @@ var init_plan_guard = __esm(() => {
16104
16147
  init_project2();
16105
16148
  });
16106
16149
 
16150
+ // node_modules/@staix/agent-mem/src/memory/intent-node-matcher.ts
16151
+ var init_intent_node_matcher = __esm(() => {
16152
+ init_plan_guard();
16153
+ init_project2();
16154
+ });
16155
+
16107
16156
  // node_modules/@staix/agent-mem/src/memory/intent-brief.ts
16108
16157
  var init_intent_brief = __esm(() => {
16109
16158
  init_plan_guard();
16159
+ init_intent_node_matcher();
16110
16160
  init_policy();
16111
16161
  });
16112
16162
 
@@ -16144,6 +16194,7 @@ var init_repo_scope = __esm(() => {
16144
16194
  });
16145
16195
 
16146
16196
  // node_modules/@staix/agent-mem/src/mcp-memory.ts
16197
+ var TOOL_EVENTS;
16147
16198
  var init_mcp_memory = __esm(() => {
16148
16199
  init_evidence();
16149
16200
  init_intent_brief();
@@ -16168,6 +16219,7 @@ var init_mcp_memory = __esm(() => {
16168
16219
  init_vault();
16169
16220
  init_candidate_origin();
16170
16221
  init_work_lists();
16222
+ TOOL_EVENTS = new Set(["PreToolUse", "PostToolUse", "PostToolUseFailure"]);
16171
16223
  });
16172
16224
 
16173
16225
  // node_modules/@staix/agent-mem/src/memory/record-variant-log.ts
@@ -16195,6 +16247,22 @@ var init_hook_contract = __esm(() => {
16195
16247
  HOOK_INPUT_BYTES = 64 * 1024;
16196
16248
  });
16197
16249
 
16250
+ // node_modules/@staix/agent-mem/src/amem-read-tools.ts
16251
+ var AMEM_READ_TOOL_NAMES;
16252
+ var init_amem_read_tools = __esm(() => {
16253
+ AMEM_READ_TOOL_NAMES = new Set([
16254
+ "amem_search",
16255
+ "amem_evidence",
16256
+ "amem_show",
16257
+ "amem_timeline",
16258
+ "amem_brief",
16259
+ "amem_graph",
16260
+ "amem_work_state_read",
16261
+ "amem_vault_candidates",
16262
+ "amem_capacity"
16263
+ ]);
16264
+ });
16265
+
16198
16266
  // node_modules/@staix/agent-mem/src/hook-spool.ts
16199
16267
  var RECORD_BYTES, MAX_BYTES7, HOOK_REPLAY_MAX_BYTES, CAPACITY_BYTES, RETIRE_AFTER_MS;
16200
16268
  var init_hook_spool = __esm(() => {
@@ -16210,6 +16278,7 @@ var init_hook_spool = __esm(() => {
16210
16278
  init_metrics();
16211
16279
  init_lifecycle();
16212
16280
  init_hook_contract();
16281
+ init_amem_read_tools();
16213
16282
  RECORD_BYTES = HOOK_INPUT_BYTES + 8192;
16214
16283
  MAX_BYTES7 = 2 * 1024 * 1024;
16215
16284
  HOOK_REPLAY_MAX_BYTES = 256 * 1024;
@@ -16322,6 +16391,11 @@ var init_brief_curated_native = __esm(() => {
16322
16391
  init_shard();
16323
16392
  });
16324
16393
 
16394
+ // node_modules/@staix/agent-mem/src/memory/home-binding-fence.ts
16395
+ var init_home_binding_fence = __esm(() => {
16396
+ init_public_prune_view();
16397
+ });
16398
+
16325
16399
  // node_modules/@staix/agent-mem/src/session-brief.ts
16326
16400
  var init_session_brief = __esm(() => {
16327
16401
  init_brief_cache();
@@ -16331,6 +16405,7 @@ var init_session_brief = __esm(() => {
16331
16405
  init_brief_capture();
16332
16406
  init_brief_work();
16333
16407
  init_formats();
16408
+ init_home_binding_fence();
16334
16409
  init_generation();
16335
16410
  init_home();
16336
16411
  init_platform();
@@ -16656,6 +16731,26 @@ var init_sync_placement_journal = __esm(() => {
16656
16731
  init_sync_placement_writer_revision_format();
16657
16732
  });
16658
16733
 
16734
+ // node_modules/@staix/agent-mem/src/setup-gemini.ts
16735
+ var init_setup_gemini = () => {};
16736
+
16737
+ // node_modules/@staix/agent-mem/src/setup-paths.ts
16738
+ var init_setup_paths = __esm(() => {
16739
+ init_platform();
16740
+ init_setup_gemini();
16741
+ });
16742
+
16743
+ // node_modules/@staix/agent-mem/src/skills-install.ts
16744
+ import { fileURLToPath } from "url";
16745
+ var maxBytes, defaultRoot;
16746
+ var init_skills_install = __esm(() => {
16747
+ init_platform();
16748
+ init_home();
16749
+ init_setup_paths();
16750
+ maxBytes = 1024 * 1024;
16751
+ defaultRoot = fileURLToPath(new URL("..", import.meta.url));
16752
+ });
16753
+
16659
16754
  // node_modules/@staix/agent-mem/src/setup-toml.ts
16660
16755
  var SETUP_CONFIG_BYTES, temporal;
16661
16756
  var init_setup_toml = __esm(() => {
@@ -16901,18 +16996,11 @@ var init_setup_owned = __esm(() => {
16901
16996
  qwenHookControls = new Set(["enabled", "disabled", "notifications"]);
16902
16997
  });
16903
16998
 
16904
- // node_modules/@staix/agent-mem/src/setup-gemini.ts
16905
- var init_setup_gemini = () => {};
16906
-
16907
- // node_modules/@staix/agent-mem/src/setup-paths.ts
16908
- var init_setup_paths = __esm(() => {
16909
- init_platform();
16910
- init_setup_gemini();
16911
- });
16912
-
16913
16999
  // node_modules/@staix/agent-mem/src/setup.ts
16914
17000
  var SETUP_TARGETS, SETUP_ALL_TARGETS, MAX2, JOURNAL_MAX, PACKAGE_JSON_MAX;
16915
17001
  var init_setup = __esm(() => {
17002
+ init_skills_install();
17003
+ init_src();
16916
17004
  init_cli_attribution();
16917
17005
  init_config();
16918
17006
  init_setup_toml();
@@ -16922,6 +17010,8 @@ var init_setup = __esm(() => {
16922
17010
  init_setup_paths();
16923
17011
  init_setup_jcode();
16924
17012
  init_hook_contract();
17013
+ init_sync_placement_effective_writers();
17014
+ init_sync_placement_guard();
16925
17015
  init_home();
16926
17016
  init_style();
16927
17017
  init_platform();
@@ -16937,6 +17027,7 @@ var init_sync_placement_writer_context = __esm(() => {
16937
17027
  init_platform();
16938
17028
  init_generation();
16939
17029
  init_setup();
17030
+ init_sync_placement_guard();
16940
17031
  init_sync_placement_writers();
16941
17032
  init_sync_placement_effective_writers();
16942
17033
  init_sync_placement_prerequisites();
@@ -16945,7 +17036,7 @@ var init_sync_placement_writer_context = __esm(() => {
16945
17036
  });
16946
17037
 
16947
17038
  // node_modules/@staix/agent-mem/src/index.ts
16948
- var init_src = __esm(() => {
17039
+ var init_src2 = __esm(() => {
16949
17040
  init_platform();
16950
17041
  init_cli_attribution();
16951
17042
  init_search_fts();
@@ -16962,6 +17053,7 @@ var init_src = __esm(() => {
16962
17053
  init_sync_placement_writer_context();
16963
17054
  init_capture_input();
16964
17055
  init_record_instruction();
17056
+ init_skills_install();
16965
17057
  init_store();
16966
17058
  init_capture();
16967
17059
  init_shard();
@@ -17167,7 +17259,7 @@ var init_deliverables = __esm(() => {
17167
17259
  // src/hub/research-experiments.ts
17168
17260
  var BODY2;
17169
17261
  var init_research_experiments = __esm(() => {
17170
- init_src();
17262
+ init_src2();
17171
17263
  init_packs();
17172
17264
  init_research2();
17173
17265
  init_events();
@@ -17635,8 +17727,8 @@ var init_memory_policy = __esm(() => {
17635
17727
  init_envelope();
17636
17728
  init_routing();
17637
17729
  init_path_policy();
17638
- init_src();
17639
- init_src();
17730
+ init_src2();
17731
+ init_src2();
17640
17732
  });
17641
17733
 
17642
17734
  // src/models/route/decision-evidence.ts
@@ -17720,7 +17812,7 @@ function buildDecisionEvidence(messages, stageDimensions, publicText) {
17720
17812
  }
17721
17813
  var SOURCE_BYTES, USER_BYTES = 2048, ASSISTANT_BYTES = 1024, TOOL_BYTES = 2048, TOTAL_BYTES = 8192, TOOL_NAMES = 16, TOOL_NAME_BYTES = 64, TOOL_MESSAGE_WINDOW = 32, TOOL_IDENTIFIER;
17722
17814
  var init_decision_evidence = __esm(() => {
17723
- init_src();
17815
+ init_src2();
17724
17816
  SOURCE_BYTES = 64 * 1024;
17725
17817
  TOOL_IDENTIFIER = /^[A-Za-z_][A-Za-z0-9_.:-]*$/;
17726
17818
  });
@@ -14685,7 +14685,7 @@ var package_default;
14685
14685
  var init_package = __esm(() => {
14686
14686
  package_default = {
14687
14687
  name: "@staix/agent-hub",
14688
- version: "0.46.0",
14688
+ version: "0.46.1",
14689
14689
  description: "Native multi-agent hub: Claude Code, Codex, Kimi Code, Pi and local inference as peers in one project",
14690
14690
  license: "MIT",
14691
14691
  type: "module",
@@ -14982,7 +14982,6 @@ var init_brief_curated = __esm(() => {
14982
14982
  init_brief_cache();
14983
14983
  MAX_AGE = 24 * 60 * 60 * 1000;
14984
14984
  });
14985
-
14986
14985
  // node_modules/@staix/agent-mem/src/memory/home-identity.ts
14987
14986
  var resolved;
14988
14987
  var init_home_identity = __esm(() => {
@@ -15040,6 +15039,22 @@ var init_mutation = __esm(() => {
15040
15039
  init_platform();
15041
15040
  mutations = new WeakMap;
15042
15041
  });
15042
+
15043
+ // node_modules/@staix/agent-mem/src/memory/formats.ts
15044
+ import { closeSync as closeSync9, constants as constants8, fstatSync as fstatSync8, openSync as openSync9, readFileSync as readFileSync8, readSync as readSync6 } from "fs";
15045
+ var MAX_BYTES4, SEMVER, READER_VERSION;
15046
+ var init_formats = __esm(() => {
15047
+ MAX_BYTES4 = 64 * 1024;
15048
+ SEMVER = /^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/;
15049
+ READER_VERSION = (() => {
15050
+ try {
15051
+ const { version } = JSON.parse(readFileSync8(new URL("../../package.json", import.meta.url), "utf8"));
15052
+ return typeof version === "string" && SEMVER.test(version) ? version : undefined;
15053
+ } catch {
15054
+ return;
15055
+ }
15056
+ })();
15057
+ });
15043
15058
  // node_modules/@staix/agent-mem/src/memory/sync-placement-bound.ts
15044
15059
  var PLACEMENT_SOURCE_MAX_BYTES;
15045
15060
  var init_sync_placement_bound = __esm(() => {
@@ -15050,6 +15065,7 @@ var init_sync_placement_bound = __esm(() => {
15050
15065
  // node_modules/@staix/agent-mem/src/memory/sync-placement-publication-plan.ts
15051
15066
  var init_sync_placement_publication_plan = __esm(() => {
15052
15067
  init_generation();
15068
+ init_formats();
15053
15069
  init_sync_placement_journal_format();
15054
15070
  init_sync_placement_bound();
15055
15071
  });
@@ -15061,12 +15077,12 @@ var init_sync_placement_projection = __esm(() => {
15061
15077
  });
15062
15078
 
15063
15079
  // node_modules/@staix/agent-mem/src/memory/sync-placement-writers.ts
15064
- var MAX_BYTES4, MAX_PACKAGE;
15080
+ var MAX_BYTES5, MAX_PACKAGE;
15065
15081
  var init_sync_placement_writers = __esm(() => {
15066
15082
  init_generation();
15067
15083
  init_platform();
15068
15084
  init_sync_placement_format();
15069
- MAX_BYTES4 = 64 * 1024 * 1024;
15085
+ MAX_BYTES5 = 64 * 1024 * 1024;
15070
15086
  MAX_PACKAGE = 64 * 1024;
15071
15087
  });
15072
15088
 
@@ -15127,22 +15143,6 @@ var init_sync_placement_batch_intent = __esm(() => {
15127
15143
  PLACEMENT_BATCH_INTENT_MAX_BYTES = 20 * 1024 * 1024;
15128
15144
  });
15129
15145
 
15130
- // node_modules/@staix/agent-mem/src/memory/formats.ts
15131
- import { closeSync as closeSync9, constants as constants8, fstatSync as fstatSync8, openSync as openSync9, readFileSync as readFileSync8, readSync as readSync6 } from "fs";
15132
- var MAX_BYTES5, SEMVER, READER_VERSION;
15133
- var init_formats = __esm(() => {
15134
- MAX_BYTES5 = 64 * 1024;
15135
- SEMVER = /^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/;
15136
- READER_VERSION = (() => {
15137
- try {
15138
- const { version } = JSON.parse(readFileSync8(new URL("../../package.json", import.meta.url), "utf8"));
15139
- return typeof version === "string" && SEMVER.test(version) ? version : undefined;
15140
- } catch {
15141
- return;
15142
- }
15143
- })();
15144
- });
15145
-
15146
15146
  // node_modules/@staix/agent-mem/src/memory/sync-placement-journal-storage.ts
15147
15147
  var inflight, publicationDurability;
15148
15148
  var init_sync_placement_journal_storage = __esm(() => {
@@ -15589,35 +15589,35 @@ var init_capture = __esm(() => {
15589
15589
  SPOOL_MAX_BYTES = 256 * 1024;
15590
15590
  });
15591
15591
 
15592
- // node_modules/@staix/agent-mem/src/memory/style.ts
15593
- function paint(role, text, color) {
15594
- return color && ROLE_SGR[role] ? `${ROLE_SGR[role]}${text}${SGR_RESET}` : text;
15595
- }
15596
- function style(color, ascii = true) {
15597
- return {
15598
- color,
15599
- ascii,
15600
- ok: (text) => paint("success", text, color),
15601
- attention: (text) => paint("warning", text, color),
15602
- error: (text) => paint("error", text, color),
15603
- dim: (text) => paint("hint", text, color),
15604
- bold: (text) => paint("value", text, color)
15605
- };
15606
- }
15607
- var ESC, SGR_RESET, ROLE_SGR, MARKERS, PLAIN;
15608
- var init_style = __esm(() => {
15609
- ESC = String.fromCharCode(27);
15610
- SGR_RESET = `${ESC}[0m`;
15592
+ // node_modules/@staix/cli-output/src/index.ts
15593
+ function terminalText(value, options = {}) {
15594
+ const text = String(value ?? "").replace(/\r\n?/g, `
15595
+ `).replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\|$)/g, "").replace(/\x1b[P_X^][\s\S]*?(?:\x1b\\|$)/g, "").replace(/(?:\x1b\[|\x9b)[0-?]*[ -/]*(?:[@-~]|(?=\n|$))/g, "").replace(/\x1b[^\n]?/g, "");
15596
+ return options.singleLine ? text.replace(/[\x00-\x1f\x7f-\x9f]/g, " ") : text.replace(/[\x00-\x08\x0b-\x1f\x7f-\x9f]/g, "");
15597
+ }
15598
+ function paint(spans, color, styles = {}) {
15599
+ return spans.map((span) => {
15600
+ const text = terminalText(span.text);
15601
+ const role = span.role && Object.hasOwn(ROLE_SGR, span.role) ? ROLE_SGR[span.role] : undefined;
15602
+ const custom = span.style && Object.hasOwn(styles, span.style) ? styles[span.style] : undefined;
15603
+ if (custom && !/^\x1b\[[0-9;]+m$/.test(custom))
15604
+ throw new Error(`invalid SGR for style ${span.style}`);
15605
+ const sgr = role !== undefined ? role : custom;
15606
+ return color && sgr && text ? sgr + text + SGR_RESET : text;
15607
+ }).join("");
15608
+ }
15609
+ var SGR_RESET = "\x1B[0m", ROLE_SGR, MARKERS, EXIT;
15610
+ var init_src = __esm(() => {
15611
15611
  ROLE_SGR = Object.freeze({
15612
- header: `${ESC}[1;34m`,
15613
- section: `${ESC}[1;35m`,
15614
- key: `${ESC}[34m`,
15612
+ header: "\x1B[1;34m",
15613
+ section: "\x1B[1;35m",
15614
+ key: "\x1B[34m",
15615
15615
  value: "",
15616
- success: `${ESC}[1;32m`,
15617
- warning: `${ESC}[1;33m`,
15618
- error: `${ESC}[1;31m`,
15619
- hint: `${ESC}[90m`,
15620
- accent: `${ESC}[36m`
15616
+ success: "\x1B[1;32m",
15617
+ warning: "\x1B[1;33m",
15618
+ error: "\x1B[1;31m",
15619
+ hint: "\x1B[90m",
15620
+ accent: "\x1B[36m"
15621
15621
  });
15622
15622
  MARKERS = Object.freeze({
15623
15623
  ok: { glyph: "\u2713", ascii: "ok", role: "success" },
@@ -15629,7 +15629,26 @@ var init_style = __esm(() => {
15629
15629
  active: { glyph: "*", ascii: "*", role: "success" },
15630
15630
  next: { glyph: "\u2192", ascii: "->", role: "accent" }
15631
15631
  });
15632
+ EXIT = Object.freeze({ ok: 0, fail: 1, usage: 2, tempfail: 75 });
15633
+ });
15634
+
15635
+ // node_modules/@staix/agent-mem/src/memory/style.ts
15636
+ function style(color, ascii = true) {
15637
+ return {
15638
+ color,
15639
+ ascii,
15640
+ ok: (text) => paint([{ role: "success", text }], color),
15641
+ attention: (text) => paint([{ role: "warning", text }], color),
15642
+ error: (text) => paint([{ role: "error", text }], color),
15643
+ dim: (text) => paint([{ role: "hint", text }], color),
15644
+ bold: (text) => paint([{ role: "value", text }], color)
15645
+ };
15646
+ }
15647
+ var PLAIN, CLI_MEMORY_RENDER;
15648
+ var init_style = __esm(() => {
15649
+ init_src();
15632
15650
  PLAIN = style(false);
15651
+ CLI_MEMORY_RENDER = Symbol("cli-memory-render");
15633
15652
  });
15634
15653
 
15635
15654
  // node_modules/@staix/agent-mem/src/memory/prune.ts
@@ -15777,10 +15796,13 @@ var init_catalog = __esm(() => {
15777
15796
  var init_hook_resources = () => {};
15778
15797
 
15779
15798
  // node_modules/@staix/agent-mem/src/memory/metrics.ts
15780
- var METRICS_MAX_BYTES;
15799
+ var METRICS_MAX_BYTES, HOOK_BYTES, SEARCH_BYTES, PHASE_BYTES;
15781
15800
  var init_metrics = __esm(() => {
15782
15801
  init_hook_resources();
15783
- METRICS_MAX_BYTES = 64 * 1024;
15802
+ METRICS_MAX_BYTES = 128 * 1024;
15803
+ HOOK_BYTES = 74 * 1024;
15804
+ SEARCH_BYTES = 30 * 1024;
15805
+ PHASE_BYTES = 6 * 1024;
15784
15806
  });
15785
15807
 
15786
15808
  // node_modules/@staix/agent-mem/src/memory/capacity.ts
@@ -15792,6 +15814,7 @@ var init_capacity = __esm(() => {
15792
15814
  init_lifecycle();
15793
15815
  init_capture();
15794
15816
  init_style();
15817
+ init_src();
15795
15818
  });
15796
15819
 
15797
15820
  // node_modules/@staix/agent-mem/src/memory/usage.ts
@@ -15804,6 +15827,8 @@ var init_gc = __esm(() => {
15804
15827
  init_capture();
15805
15828
  init_catalog();
15806
15829
  init_lifecycle();
15830
+ init_src();
15831
+ init_style();
15807
15832
  });
15808
15833
 
15809
15834
  // node_modules/@staix/agent-mem/src/memory/curated-read.ts
@@ -15984,6 +16009,22 @@ var init_import = __esm(() => {
15984
16009
  init_policy();
15985
16010
  init_private_spans();
15986
16011
  });
16012
+
16013
+ // node_modules/@staix/agent-mem/src/memory/sync-placement-refusal-category.ts
16014
+ var init_sync_placement_refusal_category = () => {};
16015
+
16016
+ // node_modules/@staix/agent-mem/src/memory/sync-progress.ts
16017
+ var init_sync_progress = __esm(() => {
16018
+ init_sync_placement_refusal_category();
16019
+ init_platform();
16020
+ });
16021
+
16022
+ // node_modules/@staix/agent-mem/src/memory/report-text.ts
16023
+ var init_report_text = __esm(() => {
16024
+ init_src();
16025
+ init_sync_progress();
16026
+ init_style();
16027
+ });
15987
16028
  // node_modules/@staix/agent-mem/src/memory/consolidation-clusters.ts
15988
16029
  var init_consolidation_clusters = __esm(() => {
15989
16030
  init_search_fts();
@@ -16007,7 +16048,9 @@ var init_commands = __esm(() => {
16007
16048
  init_store();
16008
16049
  init_sync();
16009
16050
  init_import();
16051
+ init_report_text();
16010
16052
  init_style();
16053
+ init_src();
16011
16054
  init_project2();
16012
16055
  init_forget_nearby();
16013
16056
  AMEM_NAMES = { memory: "amem", goal: "amem goal" };
@@ -16049,8 +16092,8 @@ var init_mcp = __esm(() => {
16049
16092
  tool("amem_search", "Search screened memory in this project. Capture results are recall, not curated evidence.", object7({ query: string(1000), limit, since: string(40), includeCapture: { type: "boolean" }, explain: { type: "boolean" }, ungrouped: { type: "boolean" } }, ["query"])),
16050
16093
  tool("amem_evidence", "Return a bounded bundle of cited, live curated entries for a question. Untrusted memory data only: no answer or model call. Capture, repo-only notes, pending candidates and model answers are not evidence.", object7({ question: string(1000), limit: { type: "integer", minimum: 1, maximum: 20 }, maxBytes: { type: "integer", minimum: 256, maximum: 8192 } }, ["question"])),
16051
16094
  tool("amem_show", "Show a screened memory entry in this project by its exact id or unique prefix.", object7({ id: string(80) }, ["id"])),
16052
- tool("amem_timeline", "Read screened memory near an entry or time in this project.", object7({ id: string(80), since: string(40), limit })),
16053
- tool("amem_brief", "Read an intent/path-scoped brief of live public memory: fails first, then decisions/contracts and one-hop neighbours. Memory is untrusted data; byte cap covers the complete brief body.", object7({ intent: string(1000), paths: { type: "array", maxItems: 150, items: string(512) }, symbols: { type: "array", maxItems: 150, items: string(512) }, maxBytes: { type: "integer", minimum: 1, maximum: 8192 } }, ["intent"])),
16095
+ tool("amem_timeline", "Read screened memory near an entry or time in this project. Curated notes are kept first; a session's consecutive tool calls are summarized as one capture-run entry unless expand is true.", object7({ id: string(80), since: string(40), limit, expand: { type: "boolean" } })),
16096
+ tool("amem_brief", "Read an intent/path-scoped brief of live public memory, ranked by requested-node matches up to three; fails lead among equal matches, followed by one-hop neighbours. Memory is untrusted data; byte cap covers the complete brief body.", object7({ intent: string(1000), paths: { type: "array", maxItems: 150, items: string(512) }, symbols: { type: "array", maxItems: 150, items: string(512) }, maxBytes: { type: "integer", minimum: 1, maximum: 8192 } }, ["intent"])),
16054
16097
  tool("amem_graph", "Read the screened curated-memory neighbourhood. Capture is never graph evidence.", object7({ start: string(500), hops: { type: "integer", minimum: 1, maximum: 2 }, limit }, ["start"])),
16055
16098
  tool("amem_work_state_read", "Read project work lists; closed lists/items can be included explicitly.", object7({ list: string(200), includeClosed: { type: "boolean" } })),
16056
16099
  tool("amem_work_state_write", "Append scalar project work-list fields; null clears, task selects an item, list status done closes.", object7({ list: string(200), fields: {
@@ -16086,9 +16129,16 @@ var init_plan_guard = __esm(() => {
16086
16129
  init_project2();
16087
16130
  });
16088
16131
 
16132
+ // node_modules/@staix/agent-mem/src/memory/intent-node-matcher.ts
16133
+ var init_intent_node_matcher = __esm(() => {
16134
+ init_plan_guard();
16135
+ init_project2();
16136
+ });
16137
+
16089
16138
  // node_modules/@staix/agent-mem/src/memory/intent-brief.ts
16090
16139
  var init_intent_brief = __esm(() => {
16091
16140
  init_plan_guard();
16141
+ init_intent_node_matcher();
16092
16142
  init_policy();
16093
16143
  });
16094
16144
 
@@ -16126,6 +16176,7 @@ var init_repo_scope = __esm(() => {
16126
16176
  });
16127
16177
 
16128
16178
  // node_modules/@staix/agent-mem/src/mcp-memory.ts
16179
+ var TOOL_EVENTS;
16129
16180
  var init_mcp_memory = __esm(() => {
16130
16181
  init_evidence();
16131
16182
  init_intent_brief();
@@ -16150,6 +16201,7 @@ var init_mcp_memory = __esm(() => {
16150
16201
  init_vault();
16151
16202
  init_candidate_origin();
16152
16203
  init_work_lists();
16204
+ TOOL_EVENTS = new Set(["PreToolUse", "PostToolUse", "PostToolUseFailure"]);
16153
16205
  });
16154
16206
 
16155
16207
  // node_modules/@staix/agent-mem/src/memory/record-variant-log.ts
@@ -16177,6 +16229,22 @@ var init_hook_contract = __esm(() => {
16177
16229
  HOOK_INPUT_BYTES = 64 * 1024;
16178
16230
  });
16179
16231
 
16232
+ // node_modules/@staix/agent-mem/src/amem-read-tools.ts
16233
+ var AMEM_READ_TOOL_NAMES;
16234
+ var init_amem_read_tools = __esm(() => {
16235
+ AMEM_READ_TOOL_NAMES = new Set([
16236
+ "amem_search",
16237
+ "amem_evidence",
16238
+ "amem_show",
16239
+ "amem_timeline",
16240
+ "amem_brief",
16241
+ "amem_graph",
16242
+ "amem_work_state_read",
16243
+ "amem_vault_candidates",
16244
+ "amem_capacity"
16245
+ ]);
16246
+ });
16247
+
16180
16248
  // node_modules/@staix/agent-mem/src/hook-spool.ts
16181
16249
  var RECORD_BYTES, MAX_BYTES7, HOOK_REPLAY_MAX_BYTES, CAPACITY_BYTES, RETIRE_AFTER_MS;
16182
16250
  var init_hook_spool = __esm(() => {
@@ -16192,6 +16260,7 @@ var init_hook_spool = __esm(() => {
16192
16260
  init_metrics();
16193
16261
  init_lifecycle();
16194
16262
  init_hook_contract();
16263
+ init_amem_read_tools();
16195
16264
  RECORD_BYTES = HOOK_INPUT_BYTES + 8192;
16196
16265
  MAX_BYTES7 = 2 * 1024 * 1024;
16197
16266
  HOOK_REPLAY_MAX_BYTES = 256 * 1024;
@@ -16304,6 +16373,11 @@ var init_brief_curated_native = __esm(() => {
16304
16373
  init_shard();
16305
16374
  });
16306
16375
 
16376
+ // node_modules/@staix/agent-mem/src/memory/home-binding-fence.ts
16377
+ var init_home_binding_fence = __esm(() => {
16378
+ init_public_prune_view();
16379
+ });
16380
+
16307
16381
  // node_modules/@staix/agent-mem/src/session-brief.ts
16308
16382
  var init_session_brief = __esm(() => {
16309
16383
  init_brief_cache();
@@ -16313,6 +16387,7 @@ var init_session_brief = __esm(() => {
16313
16387
  init_brief_capture();
16314
16388
  init_brief_work();
16315
16389
  init_formats();
16390
+ init_home_binding_fence();
16316
16391
  init_generation();
16317
16392
  init_home();
16318
16393
  init_platform();
@@ -16638,6 +16713,26 @@ var init_sync_placement_journal = __esm(() => {
16638
16713
  init_sync_placement_writer_revision_format();
16639
16714
  });
16640
16715
 
16716
+ // node_modules/@staix/agent-mem/src/setup-gemini.ts
16717
+ var init_setup_gemini = () => {};
16718
+
16719
+ // node_modules/@staix/agent-mem/src/setup-paths.ts
16720
+ var init_setup_paths = __esm(() => {
16721
+ init_platform();
16722
+ init_setup_gemini();
16723
+ });
16724
+
16725
+ // node_modules/@staix/agent-mem/src/skills-install.ts
16726
+ import { fileURLToPath } from "url";
16727
+ var maxBytes, defaultRoot;
16728
+ var init_skills_install = __esm(() => {
16729
+ init_platform();
16730
+ init_home();
16731
+ init_setup_paths();
16732
+ maxBytes = 1024 * 1024;
16733
+ defaultRoot = fileURLToPath(new URL("..", import.meta.url));
16734
+ });
16735
+
16641
16736
  // node_modules/@staix/agent-mem/src/setup-toml.ts
16642
16737
  var SETUP_CONFIG_BYTES, temporal;
16643
16738
  var init_setup_toml = __esm(() => {
@@ -16883,18 +16978,11 @@ var init_setup_owned = __esm(() => {
16883
16978
  qwenHookControls = new Set(["enabled", "disabled", "notifications"]);
16884
16979
  });
16885
16980
 
16886
- // node_modules/@staix/agent-mem/src/setup-gemini.ts
16887
- var init_setup_gemini = () => {};
16888
-
16889
- // node_modules/@staix/agent-mem/src/setup-paths.ts
16890
- var init_setup_paths = __esm(() => {
16891
- init_platform();
16892
- init_setup_gemini();
16893
- });
16894
-
16895
16981
  // node_modules/@staix/agent-mem/src/setup.ts
16896
16982
  var SETUP_TARGETS, SETUP_ALL_TARGETS, MAX2, JOURNAL_MAX, PACKAGE_JSON_MAX;
16897
16983
  var init_setup = __esm(() => {
16984
+ init_skills_install();
16985
+ init_src();
16898
16986
  init_cli_attribution();
16899
16987
  init_config();
16900
16988
  init_setup_toml();
@@ -16904,6 +16992,8 @@ var init_setup = __esm(() => {
16904
16992
  init_setup_paths();
16905
16993
  init_setup_jcode();
16906
16994
  init_hook_contract();
16995
+ init_sync_placement_effective_writers();
16996
+ init_sync_placement_guard();
16907
16997
  init_home();
16908
16998
  init_style();
16909
16999
  init_platform();
@@ -16919,6 +17009,7 @@ var init_sync_placement_writer_context = __esm(() => {
16919
17009
  init_platform();
16920
17010
  init_generation();
16921
17011
  init_setup();
17012
+ init_sync_placement_guard();
16922
17013
  init_sync_placement_writers();
16923
17014
  init_sync_placement_effective_writers();
16924
17015
  init_sync_placement_prerequisites();
@@ -16927,7 +17018,7 @@ var init_sync_placement_writer_context = __esm(() => {
16927
17018
  });
16928
17019
 
16929
17020
  // node_modules/@staix/agent-mem/src/index.ts
16930
- var init_src = __esm(() => {
17021
+ var init_src2 = __esm(() => {
16931
17022
  init_platform();
16932
17023
  init_cli_attribution();
16933
17024
  init_search_fts();
@@ -16944,6 +17035,7 @@ var init_src = __esm(() => {
16944
17035
  init_sync_placement_writer_context();
16945
17036
  init_capture_input();
16946
17037
  init_record_instruction();
17038
+ init_skills_install();
16947
17039
  init_store();
16948
17040
  init_capture();
16949
17041
  init_shard();
@@ -17149,7 +17241,7 @@ var init_deliverables = __esm(() => {
17149
17241
  // src/hub/research-experiments.ts
17150
17242
  var BODY2;
17151
17243
  var init_research_experiments = __esm(() => {
17152
- init_src();
17244
+ init_src2();
17153
17245
  init_packs();
17154
17246
  init_research2();
17155
17247
  init_events();
@@ -17617,8 +17709,8 @@ var init_memory_policy = __esm(() => {
17617
17709
  init_envelope();
17618
17710
  init_routing();
17619
17711
  init_path_policy();
17620
- init_src();
17621
- init_src();
17712
+ init_src2();
17713
+ init_src2();
17622
17714
  });
17623
17715
 
17624
17716
  // src/models/route/decision-evidence.ts
@@ -17702,7 +17794,7 @@ function buildDecisionEvidence(messages, stageDimensions, publicText) {
17702
17794
  }
17703
17795
  var SOURCE_BYTES, USER_BYTES = 2048, ASSISTANT_BYTES = 1024, TOOL_BYTES = 2048, TOTAL_BYTES = 8192, TOOL_NAMES = 16, TOOL_NAME_BYTES = 64, TOOL_MESSAGE_WINDOW = 32, TOOL_IDENTIFIER;
17704
17796
  var init_decision_evidence = __esm(() => {
17705
- init_src();
17797
+ init_src2();
17706
17798
  SOURCE_BYTES = 64 * 1024;
17707
17799
  TOOL_IDENTIFIER = /^[A-Za-z_][A-Za-z0-9_.:-]*$/;
17708
17800
  });
@@ -31915,7 +32007,7 @@ init_board();
31915
32007
  init_roadmap();
31916
32008
 
31917
32009
  // src/hub/tasks.ts
31918
- init_src();
32010
+ init_src2();
31919
32011
  init_guidance_variants();
31920
32012
 
31921
32013
  // src/hub/guidance-probe-store.ts
@@ -31967,14 +32059,14 @@ init_research_runner();
31967
32059
  init_queue_backpressure();
31968
32060
 
31969
32061
  // src/memory/record-provenance.ts
31970
- init_src();
32062
+ init_src2();
31971
32063
  var GENERATED_NOTE_LIMITS = Object.freeze({ notes: 1024, anchors: 64, anchorBytes: 512, queryAnchors: 1024, matches: 32 });
31972
32064
 
31973
32065
  // src/hub/memory-symbols.ts
31974
32066
  init_deny();
31975
32067
  init_permission_mode();
31976
32068
  init_path_policy();
31977
- init_src();
32069
+ init_src2();
31978
32070
 
31979
32071
  // src/hub/tasks.ts
31980
32072
  init_packs();
@@ -32008,8 +32100,8 @@ init_plan_conformance();
32008
32100
  // src/hub/sdlc-release.ts
32009
32101
  init_child_process();
32010
32102
  init_git();
32011
- import { fileURLToPath } from "url";
32012
- var CHECKER_PATH = fileURLToPath(new URL("../../scripts/check-docs.mjs", import.meta.url));
32103
+ import { fileURLToPath as fileURLToPath2 } from "url";
32104
+ var CHECKER_PATH = fileURLToPath2(new URL("../../scripts/check-docs.mjs", import.meta.url));
32013
32105
 
32014
32106
  // src/hub/tasks.ts
32015
32107
  init_cost_governance();
@@ -32073,14 +32165,14 @@ init_deny();
32073
32165
  init_permission_mode();
32074
32166
 
32075
32167
  // src/hub/memory-candidates.ts
32076
- init_src();
32168
+ init_src2();
32077
32169
  init_tool_refusal();
32078
32170
 
32079
32171
  // src/hub/tasks.ts
32080
32172
  init_memory_policy();
32081
32173
 
32082
32174
  // src/hub/memory-sync-policy.ts
32083
- init_src();
32175
+ init_src2();
32084
32176
  var GENERATED2 = new Set(["id", "schema", "op", "at", "machine", "actor", "target", "promotedFrom", "supersedes", "expires", "by", "tier", "scope", "kind", "source"]);
32085
32177
 
32086
32178
  // src/hub/tasks.ts
@@ -32105,7 +32197,7 @@ var CHUNK = 1024 * 1024;
32105
32197
  var NOFOLLOW = constants12.O_NOFOLLOW ?? 0;
32106
32198
 
32107
32199
  // src/hub/tasks.ts
32108
- init_src();
32200
+ init_src2();
32109
32201
  init_board();
32110
32202
  init_envelope();
32111
32203
  init_routing();
@@ -75,7 +75,12 @@ function memoryRuntime(root: string, dependencyRoot?: string): string | undefine
75
75
  if (!agentMemHostApiOk(host.min, host.version))
76
76
  throw new Error(`memory runtime host API ${host.min ?? "missing"}..${host.version ?? "missing"} does not intersect the supported ${AGENT_MEM_HOST_API_RANGE[0]}..${AGENT_MEM_HOST_API_RANGE[1]}`);
77
77
  }
78
- if (!accepted || Object.keys(memory.dependencies ?? {}).length) throw new Error("memory runtime dependency identity/version mismatch");
78
+ // #1664: agent-mem 0.37.0+ declares exactly the hub's own pinned @staix/cli-output (hashed once by outputRuntime); nothing else, and no nested node_modules the digest would not cover.
79
+ const memoryDeps = Object.entries(memory.dependencies ?? {}), outputPin = deps["@staix/cli-output"];
80
+ // A ranged hub pin is the output package's refusal to make, not a memory mismatch (outputRuntime says the same).
81
+ if (memoryDeps.length && typeof outputPin === "string" && !/^\d+\.\d+\.\d+$/.test(outputPin)) throw new Error("output runtime dependency must be an exact version");
82
+ const depsOk = memoryDeps.length === 0 || (memoryDeps.length === 1 && typeof outputPin === "string" && memoryDeps[0]?.[0] === "@staix/cli-output" && memoryDeps[0][1] === outputPin);
83
+ if (!accepted || !depsOk || (memoryDeps.length > 0 && existsSync(join(dir, "node_modules")))) throw new Error("memory runtime dependency identity/version mismatch");
79
84
  return realPath(dir);
80
85
  }
81
86
  }