blun-king-cli 9.1.523 → 9.1.526

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 (54) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LIESMICH.txt +4 -2
  3. package/README.md +4 -2
  4. package/agent-spine-plugin/.claude-plugin/marketplace.json +1 -1
  5. package/agent-spine-plugin/.claude-plugin/plugin.json +1 -1
  6. package/agent-spine-plugin/.codex-plugin/plugin.json +1 -2
  7. package/agent-spine-plugin/CHANGELOG.md +81 -14
  8. package/agent-spine-plugin/CONTRIBUTING.md +52 -0
  9. package/agent-spine-plugin/README.md +6 -4
  10. package/agent-spine-plugin/SECURITY.md +47 -0
  11. package/agent-spine-plugin/blun.plugin.json +1 -1
  12. package/agent-spine-plugin/docs/acceptance.md +2 -2
  13. package/agent-spine-plugin/docs/architecture.md +1 -1
  14. package/agent-spine-plugin/docs/gateway-runtime.md +2 -2
  15. package/agent-spine-plugin/docs/host-integration.md +2 -2
  16. package/agent-spine-plugin/docs/learning.md +37 -2
  17. package/agent-spine-plugin/docs/preflight-recall.md +1 -1
  18. package/agent-spine-plugin/docs/quality-gates.md +1 -1
  19. package/agent-spine-plugin/docs/relationships.md +1 -1
  20. package/agent-spine-plugin/docs/session-briefing.md +1 -1
  21. package/agent-spine-plugin/docs/source-roots.md +1 -1
  22. package/agent-spine-plugin/hooks/version.json +1 -1
  23. package/agent-spine-plugin/package.json +1 -1
  24. package/agent-spine-plugin/scripts/check-hosts.js +2 -2
  25. package/agent-spine-plugin/skills/agent-spine/SKILL.md +3 -3
  26. package/agent-spine-plugin/src/cli.js +69 -5
  27. package/agent-spine-plugin/src/hook.js +41 -23
  28. package/agent-spine-plugin/src/index.js +2 -1
  29. package/agent-spine-plugin/src/lib/acceptance.js +2 -3
  30. package/agent-spine-plugin/src/lib/attention.js +4 -4
  31. package/agent-spine-plugin/src/lib/audit.js +12 -3
  32. package/agent-spine-plugin/src/lib/authentication.js +4 -2
  33. package/agent-spine-plugin/src/lib/briefing.js +20 -8
  34. package/agent-spine-plugin/src/lib/catalog.js +28 -3
  35. package/agent-spine-plugin/src/lib/channel-runtime.js +2 -2
  36. package/agent-spine-plugin/src/lib/continuity.js +18 -13
  37. package/agent-spine-plugin/src/lib/documents.js +23 -5
  38. package/agent-spine-plugin/src/lib/feed-transport.js +4 -2
  39. package/agent-spine-plugin/src/lib/graph.js +47 -12
  40. package/agent-spine-plugin/src/lib/learning.js +422 -48
  41. package/agent-spine-plugin/src/lib/paths.js +50 -1
  42. package/agent-spine-plugin/src/lib/persona-runtime.js +20 -14
  43. package/agent-spine-plugin/src/lib/preflight.js +50 -26
  44. package/agent-spine-plugin/src/lib/source-roots.js +38 -7
  45. package/agent-spine-plugin/src/mcp.js +50 -4
  46. package/agent-spine-plugin/src/version.js +1 -1
  47. package/bin/reload-plugin-bootstrap.cjs +18 -0
  48. package/blun.mjs +92 -4
  49. package/package.json +7 -2
  50. package/scripts/check-bundled-agent-spine-regression.js +48 -0
  51. package/scripts/check-reload-agent-spine-regression.js +76 -0
  52. package/scripts/check-session-picker-resume-metrics-regression.js +97 -0
  53. package/scripts/check-shell-terminal-isolation-regression.js +81 -0
  54. package/scripts/check-telegram-loop-exactly-once-regression.js +71 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.1.526 - 2026-09-01
4
+
5
+ - Materializes the AgentSpine version bundled with the current package before `/reload` rebuilds the plugin catalogue and MCP configuration.
6
+ - Preserves unrelated plugin records and reuses an unchanged managed AgentSpine tree without rewriting `installed.json`.
7
+ - Adds a red-to-green regression against 9.1.525 for bootstrap ordering, managed-plugin adoption, and idempotent reload behavior.
8
+
9
+ ## 9.1.525 - 2026-09-01
10
+
11
+ - Starts every local shell command in its own process group on Windows as well as POSIX, so programs cannot attach to the BLUN TUI's controlling console and consume `Escape`, `Ctrl+S`, or other editor input.
12
+ - Keeps stdin, stdout, and stderr on private pipes; interactive commands receive EOF and fail or time out without competing with the editor.
13
+ - Adapts DeepAgents' local-shell terminal isolation to Windows and adds an executable regression for both platform branches plus a real captured-process probe.
14
+
15
+ ## 9.1.524 - 2026-09-01
16
+
17
+ - Keeps the immediate prompt created by a Telegram `/loop` command inside the protected remote-command delivery path, so it cannot survive as a second plain queue item.
18
+ - Shows each session's resume-checkpoint size, retained message and token counts, Wire size, and missing, invalid, or stale checkpoint state directly in the resume picker.
19
+ - Updates the bundled AgentSpine runtime to the verified official 0.11.4 source at commit `8034487cdd24498076bac48d3f24400bca5e6ae4`, while preserving BLUN's 180-second background `SessionStart` completion budget.
20
+ - Adds executable regressions for Telegram loop exactly-once delivery and all resume-metric states while preserving the existing local busy-loop queue behavior.
21
+
3
22
  ## 9.1.523 - 2026-09-01
4
23
 
5
24
  - Makes `Escape` cancel an open slash-command menu and clear its slash draft in one action instead of leaving the command text behind.
package/LIESMICH.txt CHANGED
@@ -9,10 +9,12 @@ Installation
9
9
  ------------
10
10
  Die geprüfte Version exakt global installieren:
11
11
 
12
- npm install -g blun-king-cli@9.1.523
12
+ npm install -g blun-king-cli@9.1.526
13
13
 
14
- AgentSpine 0.10.1
14
+ AgentSpine 0.11.4
15
15
  -----------------
16
+ Version 9.1.524 aktualisiert die gebündelte AgentSpine-Laufzeit auf 0.11.4 aus dem offiziellen Commit `8034487cdd24498076bac48d3f24400bca5e6ae4`. Vor der Aufnahme in BLUN King wurden die hermetischen Tests, die Host- und Installationsprüfungen, die Acceptance-Suite, das Audit und der Release-Check erfolgreich abgeschlossen.
17
+
16
18
  Version 9.1.519 enthält weiterhin AgentSpine 0.10.1 als inhaltsadressierte Pluginfassung. Der Preflight prüft jede aktive Host-Anweisungsdatei weiterhin race-sicher und bindet SHA-256 sowie Dateiidentität an den Zug, dupliziert den bereits vom Host geladenen Volltext aber nicht im Laufzeitkontext. Die reale Probe mit einer 15.519 Byte großen `CLAUDE.md` blieb dadurch bei 5.667 injizierten Byte. Der Stand enthält außerdem den selbstheilenden Persona- und Beziehungsgraphen, die begrenzte Telegram-Mnemo-Abfrage und eine sichtbare Fünf-Sekunden-Grenze für lokale Beziehungsabfragen.
17
19
 
18
20
  Start
package/README.md CHANGED
@@ -9,10 +9,12 @@ Voraussetzung ist Node.js 24.15 oder neuer. Die geprüfte Version wird exakt
9
9
  installiert:
10
10
 
11
11
  ```powershell
12
- npm install -g blun-king-cli@9.1.523
12
+ npm install -g blun-king-cli@9.1.526
13
13
  ```
14
14
 
15
- ## AgentSpine 0.10.1
15
+ ## AgentSpine 0.11.4
16
+
17
+ Version 9.1.524 aktualisiert die gebündelte AgentSpine-Laufzeit auf 0.11.4 aus dem offiziellen Commit `8034487cdd24498076bac48d3f24400bca5e6ae4`. Vor der Aufnahme in BLUN King wurden die hermetischen Tests, die Host- und Installationsprüfungen, die Acceptance-Suite, das Audit und der Release-Check erfolgreich abgeschlossen.
16
18
 
17
19
  Version 9.1.519 enthält weiterhin AgentSpine 0.10.1 als inhaltsadressierte Pluginfassung. Der Preflight prüft jede aktive Host-Anweisungsdatei weiterhin race-sicher und bindet SHA-256 sowie Dateiidentität an den Zug, dupliziert den bereits vom Host geladenen Volltext aber nicht im Laufzeitkontext. Die reale Probe mit einer 15.519 Byte großen `CLAUDE.md` blieb dadurch bei 5.667 injizierten Byte. Der Stand enthält außerdem den selbstheilenden Persona- und Beziehungsgraphen, die begrenzte Telegram-Mnemo-Abfrage und eine sichtbare Fünf-Sekunden-Grenze für lokale Beziehungsabfragen.
18
20
 
@@ -9,7 +9,7 @@
9
9
  "name": "agent-spine",
10
10
  "source": ".",
11
11
  "description": "Map existing rules, soul, and memory without rewriting source files.",
12
- "version": "0.10.1",
12
+ "version": "0.11.4",
13
13
  "author": {
14
14
  "name": "Mayk Biletti"
15
15
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-spine",
3
- "version": "0.10.1",
3
+ "version": "0.11.4",
4
4
  "description": "A non-destructive identity and memory spine for Claude Code agents.",
5
5
  "author": {
6
6
  "name": "Mayk Biletti",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-spine",
3
- "version": "0.10.1",
3
+ "version": "0.11.4",
4
4
  "description": "A non-destructive identity and memory spine for Codex agents.",
5
5
  "author": {
6
6
  "name": "Mayk Biletti",
@@ -11,7 +11,6 @@
11
11
  "license": "Apache-2.0",
12
12
  "keywords": ["identity", "memory", "mcp", "agents"],
13
13
  "skills": "./skills/",
14
- "hooks": "./hooks/codex.json",
15
14
  "mcpServers": {
16
15
  "agent-spine": {
17
16
  "command": "node",
@@ -2,18 +2,80 @@
2
2
 
3
3
  All notable changes to AgentSpine will be documented here. The project follows [Semantic Versioning](https://semver.org/).
4
4
 
5
- ## [Unreleased]
6
-
7
- ## [0.10.1] - 2026-08-31
8
-
9
- ### Fixed
10
-
11
- - Mandatory host-instruction files are still race-safely reread, hashed, identity-bound, and verified for each exact turn, but their already host-loaded bytes are no longer duplicated into the injected preflight briefing.
12
- - Large native `CLAUDE.md` and `AGENTS.md` hierarchies no longer fail merely because their instruction text exceeds the runtime context budget; only bounded descriptors enter the hook context.
13
-
14
- ### Security
15
-
16
- - Unreadable, changed, replaced, symlinked, out-of-scope, individually oversized, or descriptor-overflowing mandatory instruction files continue to fail closed.
5
+ ## [Unreleased]
6
+
7
+ ## [0.11.4] - 2026-09-01
8
+
9
+ ### Fixed
10
+
11
+ - Nonexistent descendants inherit the canonical identity of their nearest existing ancestor, preventing macOS aliases and Windows namespace normalization from misclassifying an internal state directory as external before its first write.
12
+
13
+ ## [0.11.3] - 2026-09-01
14
+
15
+ ### Fixed
16
+
17
+ - Scanner exclusion roots are canonicalized before comparison, so macOS `/var` → `/private/var` aliases and Windows path normalization cannot reintroduce private AgentSpine state into a home-root catalog.
18
+
19
+ ## [0.11.2] - 2026-09-01
20
+
21
+ ### Fixed
22
+
23
+ - Exact user-home working directories may keep authenticated AgentSpine state below the home only when that state root is explicitly excluded from source discovery; the installed hook no longer deadlocks on its own signing identity.
24
+ - Generic catalog discovery now prunes the configured AgentSpine state subtree before opening Markdown, so signing keys, persona rosters, receipts, and generated state cannot become project context.
25
+
26
+ ### Security
27
+
28
+ - The exception is limited to an exact OS/`HOME`/`USERPROFILE` home root. State inside an ordinary nested project remains fail-closed, symlinks remain untraversed, and user Markdown remains byte-preserved.
29
+
30
+ ## [0.11.1] - 2026-09-01
31
+
32
+ ### Fixed
33
+
34
+ - Installed hooks reuse the already bounded host-source catalog throughout scope, continuity, learning, attention, persona, relationship, and briefing reads instead of recursively rebuilding it from the active working directory.
35
+ - Windows profile homes are recognized through canonical OS, `USERPROFILE`, `HOME`, and `HOMEDRIVE`/`HOMEPATH` identities, including case-insensitive paths and homes that contain a project marker; their recursive project tree is never enumerated.
36
+
37
+ ### Security
38
+
39
+ - Direct host-native `CLAUDE.md` and `AGENTS.md` chain files remain fully injected and byte-preserved while unrelated home descendants are excluded from context and indexing.
40
+
41
+ ## [0.11.0] - 2026-08-31
42
+
43
+ ### Added
44
+
45
+ - Provider-neutral `agentspine.learning-outcome/v1` receipts for content-free, normalized fixed-task before/after measurements bound to exact persona, user, tenant, project, group, task, metric, and evaluator scopes
46
+ - Default-off outcome-gated `behavior` candidates with independent-evaluator thresholds, objective-evidence requirements, bounded canary application, measured validation, contradiction detection, staleness gates, and read-only MCP diagnostics
47
+ - Local CLI commands for recording outcome receipts and inspecting promotion, canary, regression, and expiry state
48
+
49
+ ### Changed
50
+
51
+ - Session briefings project outcome-gated behavior only into the exact matching scope and exclude expired canaries with a visible degraded diagnostic
52
+ - Learning-state upgrades add outcome configuration and receipts without rewriting existing candidates or user-authored Markdown
53
+
54
+ ### Security
55
+
56
+ - Model suggestions are retained separately but never count toward automatic promotion or canary validation
57
+ - Any blocking defect overrides aggregate scores and immediately rolls back the canary; regressions, insufficient improvement, and expiry also fail closed through rollback
58
+ - Outcome receipts contain no prompts, answers, transcripts, credentials, rights, delegation, tool access, production, payment, or policy authority
59
+ - Codex plugin metadata omits the validator-rejected `hooks` field; the separate versioned Codex host adapter remains packaged and independently validated
60
+
61
+ ## [0.10.1] - 2026-08-31
62
+
63
+ ### Changed
64
+
65
+ - Claude mandatory instructions retain the 8 KiB standard budget but may use one explicit, receipt-bound overflow up to 16 KiB; Codex and generic instruction hosts remain capped at 8 KiB
66
+ - Relationship deadlines return a visible `degraded` context and abort the active graph read instead of aborting the turn
67
+
68
+ ### Fixed
69
+
70
+ - Relationship CLI and MCP reads no longer rebuild the complete project catalog before reading the bounded graph state
71
+ - An unmarked home-directory working directory no longer becomes a recursive project scan; known user rules are still loaded through their exact host-native paths
72
+ - Dropbox, OneDrive, dependency, build and embedded repository directories are excluded from bounded project source traversal
73
+ - Oversized mandatory instructions now block immediately with the measured and allowed byte counts instead of an opaque budget message
74
+
75
+ ### Security
76
+
77
+ - Automatic group neighborhoods continue to exclude explicit cross-group edges, inactive personas, private records and every entity outside the exact authenticated group audience
78
+ - The Claude overflow mode, byte usage and hard limit are HMAC-receipt-bound and revalidated immediately before one-time consumption
17
79
 
18
80
  ## [0.10.0] - 2026-08-30
19
81
 
@@ -325,8 +387,13 @@ All notable changes to AgentSpine will be documented here. The project follows [
325
387
  - Dual Claude Code and Codex plugin manifests
326
388
  - Cross-platform preservation, hook, graph, and MCP tests
327
389
 
328
- [Unreleased]: https://github.com/Maykbiletti/AgentSpine/compare/v0.10.1...HEAD
329
- [0.10.1]: https://github.com/Maykbiletti/AgentSpine/compare/v0.10.0...v0.10.1
390
+ [Unreleased]: https://github.com/Maykbiletti/AgentSpine/compare/v0.11.4...HEAD
391
+ [0.11.4]: https://github.com/Maykbiletti/AgentSpine/compare/v0.11.3...v0.11.4
392
+ [0.11.3]: https://github.com/Maykbiletti/AgentSpine/compare/v0.11.2...v0.11.3
393
+ [0.11.2]: https://github.com/Maykbiletti/AgentSpine/compare/v0.11.1...v0.11.2
394
+ [0.11.1]: https://github.com/Maykbiletti/AgentSpine/compare/v0.11.0...v0.11.1
395
+ [0.11.0]: https://github.com/Maykbiletti/AgentSpine/compare/v0.10.1...v0.11.0
396
+ [0.10.1]: https://github.com/Maykbiletti/AgentSpine/compare/v0.10.0...v0.10.1
330
397
  [0.10.0]: https://github.com/Maykbiletti/AgentSpine/compare/v0.9.0...v0.10.0
331
398
  [0.9.0]: https://github.com/Maykbiletti/AgentSpine/compare/v0.8.0...v0.9.0
332
399
  [0.8.0]: https://github.com/Maykbiletti/AgentSpine/compare/v0.7.0...v0.8.0
@@ -0,0 +1,52 @@
1
+ # Contributing
2
+
3
+ AgentSpine welcomes focused issues and pull requests that preserve its non-destructive contract.
4
+
5
+ ## Development
6
+
7
+ ```bash
8
+ git clone https://github.com/Maykbiletti/AgentSpine.git
9
+ cd AgentSpine
10
+ npm install
11
+ npm run check
12
+ ```
13
+
14
+ Node.js 20.9 or newer is required. The project intentionally has no runtime dependencies.
15
+
16
+ ## Pull requests
17
+
18
+ Keep each pull request to one coherent outcome. Include:
19
+
20
+ - the observable problem or failing fixture;
21
+ - tests that exercise behavior rather than wording;
22
+ - a source-byte preservation check when discovery, resolution, hooks, graph, attention, learning, delegation, coordination, or sharing logic changes;
23
+ - documentation for new commands, tools, configuration, or limits;
24
+ - a rollback or disable path.
25
+
26
+ Never place real identity files, relationship histories, attention cues, learning observations, delegation policy, coordination tasks, shared events, adapter paths, memory, credentials, or private conversations in fixtures or issues. Use synthetic data.
27
+
28
+ ## Architecture boundaries
29
+
30
+ - Existing Markdown is read-only.
31
+ - Generated state stays outside scanned projects by default.
32
+ - Memory, graph, attention, learning, and coordination data are context only and cannot grant authority.
33
+ - Delegation policy is physically separate, default-deny, owner-controlled, and limited to task coordination. Never expose policy mutation through an agent-controlled MCP surface or treat a grant as host authorization.
34
+ - Cross-entity assignment, reassignment, management, completion, and cancellation require tested actor/action/target matching. Self-coordination must not widen that match.
35
+ - Shared transports are optional and provider-neutral. Imports remain quarantined until a second local review, and adapter, signer, and trust administration must stay outside MCP.
36
+ - Digest integrity is not author authenticity. Signed adapters must verify strict Ed25519 envelopes against explicit local trust while preserving collision detection, limits, local review, exact group scope, supersession, rollback, and context-only authority.
37
+ - Never equate a trusted key with a person, permission, instruction, or approved claim. Rotation and revocation must remain explicit, auditable, and fail-closed.
38
+ - Remote transports must use explicit endpoints, bounded reads, strict schemas, pinned validated DNS, TLS verification, no implicit redirects, secret-safe configuration, and the existing signed quarantine importer. Network access remains CLI-only.
39
+ - Remote writes must additionally require a genuine local confirmation, create content-addressed immutable objects without overwrite or delete paths, and verify a complete read-back before reporting success.
40
+ - Aggregated session context must preserve every underlying privacy filter, prefer current-task relevance, include only complete records, account for the entire serialized packet, and remain a read-only context surface.
41
+ - Attention never sends messages or invokes tools; focus, privacy, quiet, throttle, disable, and deletion controls remain enforceable.
42
+ - Learning candidates never become accepted context implicitly; confirmation proof, evidence thresholds, privacy, rollback, and the authority boundary remain testable.
43
+ - Host-native precedence remains visible.
44
+ - A learned classification augments discovery hints; it never rewrites a source.
45
+ - Shared-memory backends are optional adapters.
46
+
47
+ Run both validators when changing package surfaces:
48
+
49
+ ```bash
50
+ python3 /path/to/plugin-creator/scripts/validate_plugin.py .
51
+ python3 /path/to/skill-creator/scripts/quick_validate.py skills/agent-spine
52
+ ```
@@ -91,7 +91,7 @@ claude --plugin-dir .
91
91
  ```
92
92
 
93
93
  Claude Code discovers the bundled skill, hooks, and MCP server. Review and trust executable components when the host asks.
94
- Version `0.10.1` retains the `agentspine.preflight/v2` pre-answer contract, removes duplicate host-instruction injection, and includes self-healing authenticated persona-to-graph reconciliation. Exact roster groups are materialized as context-only entities, stale membership edges are repaired, inactive personas disappear from current relationship reads, and an exact group-scoped briefing includes visible team peers without exposing another group. Claude uses `hooks/hooks.json`; Codex selects `hooks/codex.json` so Claude-only events never enter Codex configuration. Fresh-install and upgrade checks prove package containment and entrypoint behavior; actual hook discovery and trust remain host-controlled and must be inspected in the live host. Claude project memory remains `MEMORY.md`-indexed, lazy, race-safe, persistently cached outside the project, and independent of unrelated file count. See [pre-answer recall gate](docs/preflight-recall.md) and [durable gateway worker](docs/gateway-runtime.md).
94
+ Version `0.11.4` retains the `agentspine.preflight/v2` pre-answer contract, self-healing authenticated persona-to-graph reconciliation, and provider-neutral outcome-bound behavior loop. The installed hook reuses one bounded source catalog through scope, continuity, learning, attention, persona, relationship, and briefing reads. Canonical Windows home identities are excluded from recursive project enumeration even when the home contains a project marker. When the working root is exactly the user home, the configured AgentSpine state subtree is an explicit scanner exclusion, so authenticated state remains usable without entering context; state inside an ordinary nested project still fails closed. Direct host-native rules remain fully injected and byte-preserved. Exact roster groups remain context-only and isolated; model suggestions never count as promotion evidence; blocking defects and regressions still roll back canaries. Claude keeps an 8 KiB instruction standard with one signed, revalidated overflow up to 16 KiB. Claude uses `hooks/hooks.json`; Codex ships the separate validated `hooks/codex.json` adapter. Fresh-install and upgrade checks prove package containment and entrypoint behavior; actual hook discovery and trust remain host-controlled and must be inspected in the live host. See [safe learning](docs/learning.md), [pre-answer recall gate](docs/preflight-recall.md), and [durable gateway worker](docs/gateway-runtime.md).
95
95
 
96
96
  Verify the installed registration from a checkout with:
97
97
 
@@ -141,7 +141,7 @@ AgentSpine's first release is intentionally narrow and testable:
141
141
 
142
142
  - source Markdown is opened read-only;
143
143
  - symlinks are not followed during discovery;
144
- - generated state is stored outside the project;
144
+ - generated state is stored outside ordinary projects; an exact user-home root may contain its explicitly scan-excluded AgentSpine state subtree;
145
145
  - every source receives a SHA-256 fingerprint, byte size, path, layer, and provenance;
146
146
  - native host precedence is retained rather than flattened;
147
147
  - broken links and competing candidates are exposed as findings, never auto-resolved;
@@ -178,6 +178,8 @@ Read the full [preservation contract](docs/preservation-contract.md), including
178
178
  | `agentspine learn-review …` | Explicitly accept or reject a candidate |
179
179
  | `agentspine learn-context …` | Read only accepted, privacy-filtered learning |
180
180
  | `agentspine learn-evaluate …` | Run the default-off low-risk automatic policy |
181
+ | `agentspine learn-outcome …` | Record a content-free fixed-task before/after measurement locally |
182
+ | `agentspine learn-status …` | Diagnose contradictions, receipt counts, canary health, and staleness |
181
183
  | `agentspine learn-rollback …` | Restore the accepted fact replaced by a learning |
182
184
  | `agentspine learn-config …` | Configure auto-promotion thresholds and context limits |
183
185
  | `agentspine learn-delete …` | Permanently remove one candidate and its learning history |
@@ -260,7 +262,7 @@ flowchart LR
260
262
  - `link_documents` and `annotate_document` let agents build their own semantic map without editing sources.
261
263
  - `upsert_entity`, `link_entities`, and `relationship_context` maintain a privacy-scoped social and responsibility map outside the project.
262
264
  - `upsert_attention`, `record_activity`, `attention_context`, `resolve_attention`, `configure_attention`, and `delete_attention` provide sparse follow-up suggestions without sending messages or granting authority.
263
- - `propose_learning`, `add_learning_evidence`, `review_learning`, `learning_context`, `evaluate_learning`, `rollback_learning`, `configure_learning`, and `delete_learning` keep observations separate from accepted context and preserve every relevance change.
265
+ - `propose_learning`, `add_learning_evidence`, `review_learning`, `learning_context`, `learning_outcome_status`, `evaluate_learning`, `rollback_learning`, `configure_learning`, and `delete_learning` keep observations separate from accepted context and preserve every relevance change. Outcome writes remain local runtime/CLI operations; MCP receives only their read-only status.
264
266
  - `check_delegation`, `create_task`, `update_task`, and `task_context` coordinate work under a separate default-deny policy. MCP intentionally has no policy grant, revoke, or permanent task-delete tool.
265
267
  - `shared_context` reads only locally reviewed shared memory. MCP intentionally cannot initialize adapters, publish, pull, inspect the pending inbox, review imports, roll back, or delete.
266
268
  - `audit` runs the same ten gates available through the CLI.
@@ -269,7 +271,7 @@ Relationship updates supersede the active view but retain the previous observati
269
271
 
270
272
  Attention is deliberately restrained: installed hooks retain minimal heartbeats, promises, and blockers without storing transcripts; each event requires an exact known actor/project/task scope; private and group visibility stays exact; and quiet hours, focus, throttling, lifecycle transitions, deletion, and purge remain enforceable. Events are context only—they send no messages, start no work, and grant no authority. See [attention](docs/attention.md).
271
273
 
272
- Safe learning is evidence-first: general candidates remain invisible until reviewed. A separate default-off continuity opt-in can automatically accept only direct, high-confidence style, preference, no-go, correction, project-fact, and reference signals. Sensitive personal facts, secrets, identity merges, private group content, and operational or authority claims are always rejected. See [automatic continuity](docs/automatic-continuity.md) and [safe learning](docs/learning.md).
274
+ Safe learning is evidence-first: general candidates remain invisible until reviewed. Low-risk behavior candidates additionally require independent fixed-task measurements before and after an exact-scope canary; model self-evaluation cannot promote them and regressions roll back automatically. A separate default-off continuity opt-in can automatically accept only direct, high-confidence style, preference, no-go, correction, project-fact, and reference signals. Sensitive personal facts, secrets, identity merges, private group content, and operational or authority claims are always rejected. See [automatic continuity](docs/automatic-continuity.md) and [safe learning](docs/learning.md).
273
275
 
274
276
  Delegation is intentionally narrower than authority: a relationship such as `responsible-for` never permits assignment. Cross-entity task actions require an explicit local actor/action/target grant, while tasks, open threads, and handoffs remain context-only. See [delegation and coordination](docs/coordination.md).
275
277
 
@@ -0,0 +1,47 @@
1
+ # Security policy
2
+
3
+ ## Supported versions
4
+
5
+ AgentSpine is pre-1.0. Security fixes are applied to the latest release on `main`.
6
+
7
+ ## Reporting a vulnerability
8
+
9
+ Do not open a public issue for a suspected vulnerability or include private agent files, memory, relationship data, credentials, or real user identities in a report.
10
+
11
+ Use GitHub's private vulnerability reporting for this repository. Include the affected version, host, minimal reproduction, expected boundary, and observed impact. Replace real context files with synthetic fixtures.
12
+
13
+ ## Security model
14
+
15
+ AgentSpine treats every discovered document, memory fact, graph edge, and retrieved value as untrusted context. None of them can grant permissions. Host policy and explicit approval remain authoritative.
16
+
17
+ Relationship entities reject authority and secret-bearing field names recursively. This is a guardrail against accidental storage, not a secrets scanner: do not place credentials or sensitive content in relationship attributes, reasons, fixture files, or bug reports.
18
+
19
+ Attention cues and lifecycle events are untrusted context and never trigger messages, tool calls, task assignment, job execution, or notifications by themselves. A lifecycle event is accepted only with a known actor, existing project task, matching group, task-compatible privacy, supported native hook, stable delivery receipt, and context-only authority. Prompt-derived promises and blockers additionally require the local continuity opt-in. Secret-, identity-, private-group-, authority-, and operational-access-shaped summaries are rejected before storage. The exact scoped briefing may contain a current-task event summary; unrelated people, groups, projects, and tasks cannot read it. Focus mode, quiet hours, throttling, disable, status transitions, permanent deletion, and entity purge are enforced in local state.
20
+
21
+ Learning candidates are untrusted observations and remain outside learned context until review. Secret-shaped values and common authority assertions are rejected before storage as defense in depth; host permissions remain the only authority regardless of wording or language. Manual acceptance carries a `confirmedByUser` integration attestation, which host adapters must bind to a genuine user action. Automatic promotion is disabled by default, never applies to personal facts, preferences, goals, corrections, or no-gos, and cannot perform code, network, deployment, billing, or permission changes.
22
+
23
+ Delegation is a narrow, separate, default-deny policy for AgentSpine coordination records. Relationships, responsibilities, memory, Markdown, learning, attention, and tasks cannot create grants. Policy mutation is intentionally absent from MCP; the local CLI confirmation marker must be bound by an integration to a genuine owner action and is not authentication by itself. A matching grant permits only assignment or task-state coordination—it never authorizes tools, files, networks, production, deployment, billing, spending, credentials, or messages. Policy and task state are locked, atomically replaced, secret-filtered, audited, and fail closed when malformed.
24
+
25
+ The optional self-starter uses a separate default-deny execution policy and durable job state. A local owner integration must bind the exact actor, start/resume/effect actions, job, current assigned task, target, project, optional group, host, and finite `tool:<name>` capabilities; wildcards are forbidden. Native hooks acquire one expiring session lease, record a pending effect before tool execution, and atomically checkpoint the resulting workspace digest and bounded result digest. They recheck the current grant, assignment, scope, lease, capability, and content-bound workspace before every effect and resume. Revocation, expiry, changed tasks, conflicts, retry exhaustion, malformed state, workspace drift, and changed files after an uncheckpointed crash fail closed. Memory, Markdown, learning, relationships, attention, tasks, prior approvals, model claims, and MCP responses cannot create or widen the grant. Execution-policy and job administration are local CLI-only. The confirmation flag is an integration attestation, not authentication, and must never be inferred. Host and operating-system permissions remain authoritative.
26
+
27
+ Shared adapters export only explicitly selected, accepted, non-private learning. Imports enter a local quarantine and remain absent from context until a second local user review. MCP exposes only already reviewed shared context and cannot initialize adapters, publish, pull, inspect pending imports, review, roll back, or delete. Adapter and event SHA-256 digests detect corruption but are not signatures or author authentication; anyone with directory write access can recompute them. Keep adapter access restricted, use encrypted transport where needed, and treat every event as untrusted until local review. Shared memory never carries delegation policy, tasks, source files, evidence text, credentials, or host authority.
28
+
29
+ Optional signed adapters wrap manifests and events in Ed25519 envelopes. Private keys remain under the installation state directory with owner-only mode where the platform exposes POSIX permissions; they never enter projects, adapters, MCP, hooks, logs, or command output. Public identities are trusted per receiving project through an explicit local CLI action. Pull verifies the manifest signer and every event signer before writing quarantine state, and the audit replays retained event signatures against the stored public identity. Unknown, revoked, swapped, malformed, or mismatched keys fail closed. A signature authenticates the holder of a configured key—it does not establish a real-world identity, approve the claim, grant delegation, or replace the receiving user's review. Key distribution, device security, encrypted transport, and real-world identity verification remain deployment responsibilities.
30
+
31
+ The optional HTTPS snapshot transport accepts only an explicit TLS URL and signed immutable snapshots. Public mode rejects private, loopback, link-local, reserved, multicast, and documentation address ranges, validates every DNS answer, and pins the actual connection to a vetted address. Redirects, compression, embedded URL credentials, query strings, ambiguous directory URLs, non-JSON responses, oversized bodies, unsigned documents, and mixed or untrusted signers fail before local quarantine mutation. Private-network access requires explicit local confirmation. Optional bearer credentials come only from a named environment variable and are never returned, persisted, exposed through MCP, or added to hooks. HTTPS protects transit, not snapshot storage; server authorization, retention, logging, certificate operations, and endpoint availability remain deployment responsibilities.
32
+
33
+ The immutable HTTPS object transport adds network writes only to the local CLI. Every publish requires explicit local owner confirmation, derives a content-addressed object URL, sends `If-None-Match: *`, accepts only create or precondition-failed outcomes, and performs a hardened signed read-back before reporting success. There is no overwrite, deletion, listing, mutable pointer, endpoint state, token state, MCP tool, or hook action. A service must enforce atomic create-only semantics and independently authenticate writers; the request digest header is not authorization. A `412` is considered idempotent only when read-back verifies the exact intended snapshot. Upload status, TLS, bearer authentication, digest equality, and signatures still create no rights or content approval.
34
+
35
+ The optional mutable feed adds one deliberately constrained overwrite surface above immutable objects. Its entire bounded reference window is Ed25519-signed, updates require a strong previously observed ETag, and a `412` is exposed as a concurrency conflict. Receivers pin the feed ID, scope, adapter, signer identity, last sequence, entry digest, and snapshot digest in external local state while retaining prior receipts. Rollback, same-sequence equivocation, signer replacement, broken chains, and a window that no longer contains the locally observed tip fail closed before snapshot import. Corrupt receipt state is reported by the audit and never replaced automatically. Feed pulls still import only into quarantine. Feed state and remote authentication are context-only and cannot grant rights. Endpoint, token, publish, pull, and reset capabilities remain absent from MCP and hooks.
36
+
37
+ The optional peer transport executes one owner-selected local program, which is a privileged operation independent of AgentSpine's content checks. Both serving and carrier execution require explicit local confirmation. AgentSpine passes a bounded executable/argument array directly with the shell disabled and a minimal environment that omits unrelated application secrets, bounds and discards stderr, enforces time and frame limits, and opens no listener. A fresh 256-bit challenge is bound by an Ed25519 response whose key must match the snapshot manifest and local trust. This prevents captured-response replay but does not sandbox a malicious chosen executable or carrier; operators must verify and constrain it using operating-system and SSH controls. Valid responses still enter quarantine, grant no rights, and require local content review. Peer controls remain absent from MCP and hooks.
38
+
39
+ The optional local SQLite transport stores signed snapshots only in an owner-selected regular file outside the scanned project. Initialization and publication require explicit local confirmation; inspection and pull validate the exact schema, SQLite integrity result, immutable signed-manifest binding, all retained snapshots, the full revision hash chain, and its atomic head. Symbolic links, hard links, unexpected schema objects, malformed rows, oversized state, identity changes, tampering, and chain discontinuity fail closed. Extension loading is disabled, `trusted_schema` is off, and bound parameters carry values. File permissions, backups, encryption, copying, external rollback checkpoints, and filesystem availability remain operator responsibilities. A restored older but internally consistent database is not detectable without an external checkpoint. SQLite controls remain absent from MCP and hooks, imports still enter quarantine, and database state can never grant rights.
40
+
41
+ Session briefing composes only existing privacy-filtered read models. It never reads pending learning or shared imports, delegation policy, assignment proof, credentials, adapter configuration, or signer material. Direct private context is explicit. Group context rejects private inclusion, requires an exact visible membership audience, excludes other groups, and emits source metadata without arbitrary Markdown content. The complete compact JSON output is byte-bounded and records are never truncated. Briefing reads do not consume attention cues or mutate any state. The resulting packet remains untrusted, context-only input to the host.
42
+
43
+ Lifecycle hooks cover participating direct-write tools and common shell mutation forms. They also persist minimal heartbeat, promise, blocker, lease, and checkpoint state without storing transcripts, tool arguments, or tool output. For a leased self-starter session, all host tool events are resolved against the session automatically and must pass the exact capability check. Hooks remain defense in depth, not a shell parser, user authenticator, or operating-system sandbox. Encoded commands, custom tools outside the installed lifecycle, subprocesses, or programs outside the host can bypass them. Users should review plugin code, restrict tool access, protect credentials, use version control, and keep host approval controls enabled.
44
+
45
+ The visible acceptance runner uses fictional identities and isolated temporary directories. Its SHA-256 receipts prove that bounded synthetic evidence passed a named gate; they are not signatures, user authentication, host trust, policy grants, or proof about a real deployment. The runner cannot approve executable components or create rights for an installed project. Fresh-install and upgrade tests use the same production hook adapter and require zero model-side MCP calls, exactly one MCP registration, exactly one hook set, source-hash preservation, and cleanup of staged state.
46
+
47
+ Release workflows are tag-only and pin every external action to a full commit SHA. The build job can read repository content and mint short-lived OIDC attestations but cannot modify repository contents; the isolated publication job can write GitHub Release assets but cannot mint attestations. The local release gate rejects user-owned agent Markdown, generated AgentSpine state, tests, workflow internals, environment files, and key material from the npm tarball. GitHub attestations prove workflow provenance, not software correctness or authority. Consumers must still verify checksums, the repository identity, the expected tag, and the attestation.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-spine",
3
- "version": "0.10.1",
3
+ "version": "0.11.4",
4
4
  "description": "A non-destructive identity and memory spine for BLUN King agents.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  # Visible cross-host acceptance
2
2
 
3
- AgentSpine `0.10.1` runs a visible, reproducible 15-gate acceptance scenario for the lifecycle adapter, including exact host-instruction identity verification without duplicate context injection, required provider recall and a fail-closed missing-provider probe. Staged installed-entrypoint source-root and indexed-memory scaling smoke tests execute the same bundled adapter used by Claude Code and Codex and never select an MCP tool, but they do not substitute for the hosts' own plugin discovery and hook-trust UI.
3
+ AgentSpine `0.11.4` runs a visible, reproducible 15-gate acceptance scenario for the lifecycle adapter, including complete mandatory host instructions, required provider recall and a fail-closed missing-provider probe. Staged installed-entrypoint source-root and indexed-memory scaling smoke tests execute the same bundled adapter used by Claude Code and Codex and never select an MCP tool, but they do not substitute for the hosts' own plugin discovery and hook-trust UI.
4
4
 
5
5
  ```bash
6
6
  agentspine acceptance
@@ -52,7 +52,7 @@ Every line includes a SHA-256 receipt derived from the acceptance schema, gate I
52
52
 
53
53
  ## Installation proof
54
54
 
55
- `npm run host:install-check` stages both a fresh installation and an upgrade from `0.7.0`. Each installed `0.10.1` bundle must contain exactly one MCP server, one hook set, and one worker entrypoint, then pass the complete visible acceptance run with `mcpCalls: 0`. It directly invokes the packaged hook entrypoint from an AgentSpine checkout and a foreign `cwd` with sources only in a custom Claude profile, and repeats the Codex-shaped event path with a custom home, two Git projects, a fallback name, and a nested override. Uninstall removes only staged plugin and generated state; all synthetic source hashes remain unchanged. A real Codex session must separately show the plugin source in `/hooks`, record trust for the current definition hash, and inject the briefing after a new session starts.
55
+ `npm run host:install-check` stages both a fresh installation and an upgrade from `0.7.0`. Each installed `0.8.0` bundle must contain exactly one MCP server, one hook set, and one worker entrypoint, then pass the complete visible acceptance run with `mcpCalls: 0`. It directly invokes the packaged hook entrypoint from an AgentSpine checkout and a foreign `cwd` with sources only in a custom Claude profile, and repeats the Codex-shaped event path with a custom home, two Git projects, a fallback name, and a nested override. Uninstall removes only staged plugin and generated state; all synthetic source hashes remain unchanged. A real Codex session must separately show the plugin source in `/hooks`, record trust for the current definition hash, and inject the briefing after a new session starts.
56
56
 
57
57
  ## Deliberate trust boundaries
58
58
 
@@ -136,7 +136,7 @@ Generated catalogs live outside the scanned repository:
136
136
  <key-fingerprint>.pem
137
137
  ```
138
138
 
139
- `source-roots.json` retains only explicit or host-evidenced source/state bindings, profile digests, provenance, rollback, and purge history; it never stores source content or authority. `indexed-memory-cache.json` is a bounded private cache of integrity-checked indexed-memory snapshots and file identities. It is invalidated by index changes, correction, deletion, binding rollback, or purge; it remains context-only and cannot grant identity, rights, trust, or execution. `catalog.json` is reproducible provenance. `graph.json` stores reversible annotations, relationships, privacy scopes, confidence, and superseded observations. `attention.json` stores bounded follow-up cues, minimal interaction timestamps, quiet-hour policy, presentation throttles, and hook-driven heartbeat, promise, and blocker lifecycles with idempotent receipts and retained prior values. `learning.json` separates evidence-backed candidates from accepted context and records review, promotion, supersession, and rollback history. `continuity.json` stores only opt-in configuration and minimal signal receipts with prompt digests, never transcripts. `coordination.json` stores context-only tasks, open threads, handoffs, and their prior versions. `delegation-policy.json` is physically separate and contains only explicit local task-coordination grants. `execution-policy.json` contains exact locally confirmed self-starter grants; `selfstarter.json` contains leased jobs, content-bound checkpoints, retry state, retained prior versions, and idempotent receipts. Neither is context authority, and neither is writable through MCP. `sharing.json` quarantines imports and retains local review, supersession, rollback, and signature proof. `sharing-trust.json` is a project-local allowlist of public signing keys; the installation-wide signer registry keeps private keys separate. Policy, trust, keys, and adapter administration are not writable through MCP. All are private user state. This gives uninstall a simple, auditable property: removing AgentSpine state cannot remove or alter original agent files.
139
+ `source-roots.json` retains only explicit or host-evidenced source/state bindings, profile digests, provenance, rollback, and purge history; it never stores source content or authority. `indexed-memory-cache.json` is a bounded private cache of integrity-checked indexed-memory snapshots and file identities. It is invalidated by index changes, correction, deletion, binding rollback, or purge; it remains context-only and cannot grant identity, rights, trust, or execution. `catalog.json` is reproducible provenance. `graph.json` stores reversible annotations, relationships, privacy scopes, confidence, and superseded observations. `attention.json` stores bounded follow-up cues, minimal interaction timestamps, quiet-hour policy, presentation throttles, and hook-driven heartbeat, promise, and blocker lifecycles with idempotent receipts and retained prior values. `learning.json` separates evidence-backed candidates from accepted context and records review, promotion, supersession, rollback, content-free outcome receipts, and bounded canary history. `continuity.json` stores only opt-in configuration and minimal signal receipts with prompt digests, never transcripts. `coordination.json` stores context-only tasks, open threads, handoffs, and their prior versions. `delegation-policy.json` is physically separate and contains only explicit local task-coordination grants. `execution-policy.json` contains exact locally confirmed self-starter grants; `selfstarter.json` contains leased jobs, content-bound checkpoints, retry state, retained prior versions, and idempotent receipts. Neither is context authority, and neither is writable through MCP. `sharing.json` quarantines imports and retains local review, supersession, rollback, and signature proof. `sharing-trust.json` is a project-local allowlist of public signing keys; the installation-wide signer registry keeps private keys separate. Policy, trust, keys, and adapter administration are not writable through MCP. All are private user state. This gives uninstall a simple, auditable property: removing AgentSpine state cannot remove or alter original agent files.
140
140
 
141
141
  Task mutations read and validate policy while holding the policy lock, then write coordination state under a second lock. This lock order prevents a policy revocation from racing a new assignment. Invalid or malformed policy and coordination state fails closed and is never automatically overwritten.
142
142
 
@@ -33,9 +33,9 @@ Set `AGENTSPINE_PERSONA_ROSTER_FILE` or pass `--persona-roster` to the worker. T
33
33
 
34
34
  Every tick synchronizes authenticated identities before any work is reconciled. New bindings append `join` events; renames retain the stable persona ID; omitted members in the same explicit roster scope become `left`; `"deactivated": true` records a distinct deactivation; reappearance appends `rejoin`. A binding may describe a `person`, `agent`, or `bot`; equal display names never merge identities. Names, Markdown, memory, and chat text cannot create identity or rights. Existing source files are never changed.
35
35
 
36
- Version `0.10.0` reconciles the authenticated roster into the relationship graph on every sync, including an otherwise unchanged replay. An exact `groupId` creates a missing group-scoped, context-only group entity; a conflicting non-group or private group fails visibly. Missing persona entities and membership edges are recreated, stale memberships are removed, and left or deactivated personas remain in append-only identity history but disappear from current relationship context. Reconciliation reports whether the roster changed separately from graph repair, so a previously partial installation can self-heal instead of remaining a permanent duplicate.
36
+ Version `0.10.1` reconciles the authenticated roster into the relationship graph on every sync, including an otherwise unchanged replay. An exact `groupId` creates a missing group-scoped, context-only group entity; a conflicting non-group or private group fails visibly. Missing persona entities and membership edges are recreated, stale memberships are removed, and left or deactivated personas remain in append-only identity history but disappear from current relationship context. Reconciliation reports whether the roster changed separately from graph repair, so a previously partial installation can self-heal instead of remaining a permanent duplicate.
37
37
 
38
- When a hook supplies the same exact `groupId`, `relationship_context` and `session_briefing` include current visible co-members reached through authenticated `member-of` edges. They do not infer friendships, merge names, cross tenants, expose another group, or turn membership into delegation. A direct session without an exact group scope does not receive group-private peers. Relationship reads have a five-second local state deadline and return a clear error instead of waiting indefinitely on a stalled read.
38
+ When a hook supplies the same exact `groupId`, `relationship_context` and `session_briefing` include current visible co-members reached through authenticated `member-of` edges. They do not infer friendships, merge names, cross tenants, expose another group, or turn membership into delegation. A direct session without an exact group scope does not receive group-private peers. Relationship reads bypass project discovery, abort the graph read after a five-second local deadline, and return a visible `degraded` status instead of aborting the turn or waiting indefinitely.
39
39
 
40
40
  The same approved envelope may contain `nativeDiscovery` scopes. AgentSpine then checks only the officially documented direct agent-manifest directories: Claude Code `~/.claude/agents/` or `<project>/.claude/agents/`, and Codex `~/.codex/agents/` or `<project>/.codex/agents/`. `CLAUDE_CONFIG_DIR` and `CODEX_HOME` replace only their matching user scope. Each scope fixes issuer, tenant, profile, agent/bot kind, and optional group; those authenticated scope fields plus the exact source binding form the stable identity. The manifest contributes only its declared display name and an exact source descriptor; its instructions remain host-native context. Direct regular `.md` or `.toml` files are bounded to 128 entries and 256 KiB each; symlinks and files exchanged during a read fail closed. No other home or project directory is enumerated. See the official [Claude Code custom subagent locations](https://code.claude.com/docs/en/sub-agents) and [Codex custom agent locations](https://developers.openai.com/codex/agent-configuration/subagents).
41
41
 
@@ -21,7 +21,7 @@ claude plugin install agent-spine@agent-spine
21
21
 
22
22
  Use `claude plugin validate .` in a checkout to validate the manifest and marketplace. Claude Code asks the user to approve executable plugin components according to its trust model.
23
23
 
24
- The Claude manifest explicitly references `./.mcp.json`. The hook bundle remains at Claude Code's native auto-discovery path `hooks/hooks.json`; it is deliberately not registered a second time through the manifest. Version `0.10.1` replaces the `0.10.0` plugin cache identity. The hook definition contains only portable documented hook fields; `hooks/version.json` carries the separately validated bundle release and preflight contract. The repository checks resolve installed-root variables, perform a real MCP `initialize` handshake, validate exactly one native hook command per event, and exercise staged clean install, previous-version cache rejection, upgrade, host-native source resolution, indexed and lazy Claude memory, automatic multilingual briefing, pre-answer recall, authenticated persona graph reconciliation, attention, exact job start, tool checkpoint, new-session resume, purge, and uninstall preservation:
24
+ The Claude manifest explicitly references `./.mcp.json`. The hook bundle remains at Claude Code's native auto-discovery path `hooks/hooks.json`; it is deliberately not registered a second time through the manifest. Codex keeps its host-specific adapter in `hooks/codex.json`, while `.codex-plugin/plugin.json` omits the unsupported `hooks` field and passes the official plugin validator. Version `0.11.4` replaces the `0.11.2` plugin cache identity. The hook definitions contain only portable documented fields; `hooks/version.json` carries the separately validated bundle release and preflight contract. The repository checks resolve installed-root variables, perform a real MCP `initialize` handshake, validate exactly one native hook command per event, and exercise staged clean install, previous-version cache rejection, upgrade, host-native source resolution, indexed and lazy Claude memory, automatic multilingual briefing, pre-answer recall, authenticated persona graph reconciliation, attention, exact job start, tool checkpoint, new-session resume, purge, and uninstall preservation:
25
25
 
26
26
  ```bash
27
27
  npm run host:check
@@ -110,7 +110,7 @@ The audit exits non-zero when a required gate fails, making it suitable for inst
110
110
 
111
111
  Use `agentspine doctor --host claude|codex --cwd /active/project --json` or `agentspine source-status --host claude|codex --cwd /active/project --json` to see the checked scope counts and a concrete empty/fail-closed reason. The lifecycle adapter never substitutes the installation directory for the active host hierarchy. Details and official host references are in [host-native source roots](source-roots.md).
112
112
 
113
- The provider-neutral lifecycle adapter covers `SessionStart` (including resume and compact starts), `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PreCompact`, `PostCompact`, `Stop`, and `SubagentStop`. Claude Code additionally registers its documented `InstructionsLoaded` observability event; Codex does not. `UserPromptSubmit` is the blocking boundary. Before a prompt can proceed, `agentspine.preflight/v2` verifies the complete mandatory host-instruction hierarchy without reinjecting its bytes, loads confirmed Must-Remember entries and every locally required retrieval provider, then consumes one exact-turn receipt. Start and compaction boundaries retain the scoped `session_briefing`; no model-side MCP selection is required. Full behavior and the documented command-hook timeout limitation are in [pre-answer recall gate](preflight-recall.md).
113
+ The provider-neutral lifecycle adapter covers `SessionStart` (including resume and compact starts), `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PreCompact`, `PostCompact`, `Stop`, and `SubagentStop`. Claude Code additionally registers its documented `InstructionsLoaded` observability event; Codex does not. `UserPromptSubmit` is the blocking boundary. Before a prompt can proceed, `agentspine.preflight/v2` loads complete mandatory host instructions, confirmed Must-Remember entries and every locally required retrieval provider, then consumes one exact-turn receipt. Start and compaction boundaries retain the scoped `session_briefing`; no model-side MCP selection is required. Full behavior and the documented command-hook timeout limitation are in [pre-answer recall gate](preflight-recall.md).
114
114
 
115
115
  When an exact locally registered job is waiting, `SessionStart` acquires its lease and injects its real checkpoint automatically. Subsequent tool and stop hooks resolve that job from the native host session; the model does not need to repeat a job envelope. `PreToolUse` first retains the protected-source guard, then rechecks the current execution grant, assignment, scope, capability, lease, and workspace. `PostToolUse` checkpoints exactly one matching result. A new session resumes only after the same checks. Grant and job administration remain local CLI operations and are absent from MCP. No hook creates permissions.
116
116
 
@@ -1,6 +1,6 @@
1
1
  # Safe learning
2
2
 
3
- AgentSpine separates an observation from a fact that may enter future context. An agent can propose a candidate and append evidence, but the candidate remains invisible to `learning_context` until it passes an explicit review or the narrowly scoped, default-off automatic policy.
3
+ AgentSpine separates an observation from a fact that may enter future context. An agent can propose a candidate and append evidence, but the candidate remains invisible to `learning_context` until it passes an explicit review or the narrowly scoped, default-off automatic policy. Version 0.11 adds an outcome-bound path for low-risk behavior: a lesson is useful only when fixed, externally measured tasks improve after a limited canary application.
4
4
 
5
5
  ```mermaid
6
6
  flowchart LR
@@ -9,7 +9,12 @@ flowchart LR
9
9
  E --> R{"Review gate"}
10
10
  R -->|"explicit user confirmation"| A["Accepted context"]
11
11
  R -->|"reject"| X["Rejected history"]
12
- R -->|"opt-in low-risk policy"| A
12
+ R -->|"opt-in fact policy"| A
13
+ E --> M["Independent before receipts"]
14
+ M --> K["Scoped canary"]
15
+ K --> N["Independent after receipts"]
16
+ N -->|"measured improvement"| A
17
+ N -->|"regression or blocking defect"| B["Automatic rollback"]
13
18
  A --> S["Supersede without erasing"]
14
19
  S --> B["Rollback restores prior fact"]
15
20
  ```
@@ -25,6 +30,7 @@ flowchart LR
25
30
  | `personal-fact` | Explicit confirmation | Never |
26
31
  | `project-fact` | Explicit confirmation | Opt-in, evidence-gated |
27
32
  | `reference` | Explicit confirmation | Opt-in, evidence-gated |
33
+ | `behavior` | Explicit confirmation | Opt-in, outcome-gated canary |
28
34
 
29
35
  Every candidate and evidence record carries `authority: context-only`. Accepted learning can improve relevance and consistency, but it cannot grant permissions, delegation, production access, spending rights, policy exceptions, or instructions to act.
30
36
 
@@ -72,6 +78,35 @@ The accepted record stores the policy thresholds, evidence count, and evaluation
72
78
 
73
79
  This evaluator is separate from [automatic continuity](automatic-continuity.md). After its own local privacy opt-in, the lifecycle adapter may accept only direct, high-confidence style preferences, no-gos, corrections, project facts, and references with a recorded threshold proof. Personal facts, group conversation content, identity claims, secrets, authority, access, and operational permissions are never eligible. The continuity path is not exposed through MCP.
74
80
 
81
+ ## Measured behavior loop
82
+
83
+ `behavior` candidates use `agentspine.learning-outcome/v1` receipts. A receipt stores no prompt, answer, transcript, credential, or source content. It binds a normalized metric to one exact persona, user, tenant, project, group, task, evaluator, phase, and time. Metric values are normalized to `0..1`; the direction states whether higher or lower is better. Objective measurements, explicit user feedback, and model suggestions remain separate. Model suggestions are retained for diagnosis but never count toward automatic promotion or validation.
84
+
85
+ Before promotion, the candidate needs the configured number of independent, fresh, non-model receipts for the same metric and exact scope, including at least one objective evaluator. It also needs the normal distinct-evidence and confidence thresholds. A conflicting active candidate blocks automatic promotion. Security, safety, identity, authentication, authorization, credential, policy, production, deployment, payment, and access lessons are marked for local review and can never enter this automatic path. Successful evaluation creates a time-limited canary rather than a final unmeasured claim. Only that exact scope receives the canary in its next briefing.
86
+
87
+ ```bash
88
+ agentspine learn-propose learning:check-invariant \
89
+ --kind behavior \
90
+ --claim "Check the fixed invariant before answering." \
91
+ --evidence "Two fixture runs missed the invariant." \
92
+ --privacy shared \
93
+ --persona agent:synthetic --user user:synthetic --tenant tenant:synthetic \
94
+ --project project:synthetic --task task:synthetic
95
+
96
+ agentspine learn-outcome learning:check-invariant \
97
+ --phase before --metric fixed-task-success --direction higher --value 0.40 \
98
+ --measurement objective --evaluator evaluator:test-a \
99
+ --persona agent:synthetic --user user:synthetic --tenant tenant:synthetic \
100
+ --project project:synthetic --task task:synthetic
101
+
102
+ agentspine learn-evaluate . --json
103
+ agentspine learn-status . --json
104
+ ```
105
+
106
+ After canary use, the host records `after` receipts for the same metric and scope. Independent receipts meeting `minImprovement` validate the lesson. Any blocking defect rolls it back immediately; a regression beyond `regressionTolerance`, insufficient measured improvement, or expiry before validation also rolls it back. A superseded lesson is restored atomically. No average score can override a blocking defect.
107
+
108
+ Outcome recording and policy changes are local CLI/runtime operations. MCP exposes only the read-only `learning_outcome_status` view for this loop; model-side MCP cannot manufacture outcome evidence. `learning_context` returns only active, unexpired or validated, exact-scope behavior lessons and reports stale canaries as degraded instead of silently projecting them.
109
+
75
110
  ## Supersession and rollback
76
111
 
77
112
  New information does not overwrite an accepted fact. Propose a new candidate with `--supersedes` and the same kind, subject, and privacy scope. Acceptance marks the prior record `superseded` and retains both versions. Rollback deactivates the replacement and restores the prior accepted record atomically.
@@ -6,7 +6,7 @@ The receipt binds agent and optional persona, user, tenant, host, instruction ho
6
6
 
7
7
  ## Host instructions
8
8
 
9
- Claude Code uses its resolved user and project `CLAUDE.md` hierarchy. Codex uses the corresponding `AGENTS.override.md`/`AGENTS.md` hierarchy. A generic host must explicitly bind `instruction_host` to `claude` or `codex`; AgentSpine does not guess. The preflight race-safely rereads and hashes every active host instruction document, binds its exact file identity into the receipt, and emits only bounded `host-native` descriptors. It never duplicates the already host-loaded instruction bytes into hook context. An unreadable, replaced, deleted, oversized, out-of-scope, or symlinked mandatory file still blocks the turn.
9
+ Claude Code uses its resolved user and project `CLAUDE.md` hierarchy. Codex uses the corresponding `AGENTS.override.md`/`AGENTS.md` hierarchy. A generic host must explicitly bind `instruction_host` to `claude` or `codex`; AgentSpine does not guess. The mandatory preflight section contains the complete bytes of every active instruction document. Its standard hard budget is 8 KiB. Claude instructions may use one explicit aggregate overflow up to 16 KiB; the mode, used bytes, overflow and hard limit are bound into the signed exact-turn receipt and revalidated before consumption. Codex and generic instruction hosts remain capped at 8 KiB. An unreadable, replaced, deleted, oversized, out-of-scope, or symlinked mandatory file blocks immediately with a visible bounded diagnostic instead of degrading to a descriptor or waiting silently.
10
10
 
11
11
  Claude Code's `InstructionsLoaded` lifecycle event is registered as an additional observability signal, while `UserPromptSubmit` remains the blocking and injection boundary. Codex uses its own manifest-selected hook set without that unsupported Claude-only event. The preflight does not rely on the model remembering to read a file or call a tool.
12
12
 
@@ -16,7 +16,7 @@ agentspine audit /path/to/project --json
16
16
  | 5 | Markdown link integrity | An indexed local `.md` link has no target |
17
17
  | 6 | Conflict visibility | Precedence and competing candidates are surfaced for review |
18
18
  | 7 | Authority boundary | Context or shared state claims authority; a delegation, execution, channel, persona, or goal policy lacks explicit local provenance; or a task/job/channel/gateway snapshot has no valid policy binding |
19
- | 8 | Context privacy | Graph, attention, learning, coordination, self-starter, channel, persona, gateway queue/lane/checkpoint/delivery, sharing, signer, trust, signature, group binding, local-review proof, or safety boundary is invalid |
19
+ | 8 | Context privacy | Graph, attention, learning candidate, outcome receipt, canary scope, coordination, self-starter, channel, persona, gateway queue/lane/checkpoint/delivery, sharing, signer, trust, signature, group binding, local-review proof, or safety boundary is invalid |
20
20
  | 9 | Context budget | Resolved source bytes or the complete compact session briefing exceed the requested ceiling |
21
21
  | 10 | Byte preservation | A source hash changed during the audit or differs from the saved scan |
22
22
 
@@ -67,7 +67,7 @@ With an exact `groupId`, a relationship read returns the requested entity's dire
67
67
 
68
68
  - The graph is local user state and is not synchronized automatically.
69
69
  - Authenticated roster state is synchronized only when an owner-configured roster or native manifest scope is active; chat names never create entities.
70
- - Relationship reads stop with a visible error after a five-second local state deadline.
70
+ - Relationship reads bypass project discovery, abort the graph read after a five-second local deadline, and return a visible `degraded` status without aborting the turn.
71
71
  - A 5 MiB graph ceiling stops unbounded growth instead of discarding history.
72
72
  - Attribute-key rejection cannot determine whether innocent-looking prose contains a secret.
73
73
  - Group-specific recipient policy and notification delivery are not implemented.
@@ -38,7 +38,7 @@ The packet contains:
38
38
  - the current task first, followed by other visible scoped work;
39
39
  - the requested entity and its visible relationship neighborhood;
40
40
  - a voice brief containing only visible persona descriptors, allowed voice fields, accepted preferences, corrections, no-gos, the current task, and active promise or blocker signals;
41
- - accepted local learning relevant to the entity or project;
41
+ - accepted local learning relevant to the exact persona, user, tenant, project, group, and task scope; outcome-gated behavior is included only while its canary is active and unexpired or after measured validation;
42
42
  - locally reviewed shared memory, deduplicated against equivalent local learning;
43
43
  - due attention suggestions only when focus mode is explicitly disabled.
44
44
 
@@ -36,7 +36,7 @@ Every direct index link is counted as indexed, but its target is opened only whe
36
36
 
37
37
  An exact person, project, group, or task ID must match the current hook scope. Prompt relevance requires a normalized keyword match against the link label, filename, or explicit `keywords` marker. If relevance is uncertain, the target remains unopened. The index itself is always loaded so the host retains its native memory overview.
38
38
 
39
- The persistent cache lives under AgentSpine's platform state directory, outside every agent project. It stores integrity-checked snapshots keyed by an opaque root digest and relative path. A cache hit still opens and validates the original path and file identity, but does not reread or rehash unchanged source bytes. Corrections, deletion, link removal, source-binding rollback, purge, restart, and compaction invalidate or prune the affected cache record immediately. Cache contents and relevance markers are context-only.
39
+ The persistent cache lives under AgentSpine's platform state directory, outside ordinary agent projects. If the active project root is exactly a recognized user home, the configured AgentSpine state subtree may be below that root but is explicitly pruned before source enumeration; it is never context. The exception does not apply to nested project roots. The cache stores integrity-checked snapshots keyed by an opaque root digest and relative path. A cache hit still opens and validates the original path and file identity, but does not reread or rehash unchanged source bytes. Corrections, deletion, link removal, source-binding rollback, purge, restart, and compaction invalidate or prune the affected cache record immediately. Cache contents and relevance markers are context-only.
40
40
 
41
41
  Indexed targets use no-follow open semantics. Parent components, canonical scope, regular-file status, size, identity, modification metadata, and the pathname-to-handle identity are checked around the same read. A changing target is retried a bounded number of times and then rejected as a race; mixed snapshots are never injected.
42
42