blun-king-cli 9.1.563 → 9.1.565
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/agent-spine-plugin/.claude-plugin/marketplace.json +20 -20
- package/agent-spine-plugin/.claude-plugin/plugin.json +14 -14
- package/agent-spine-plugin/.codex-plugin/plugin.json +34 -34
- package/agent-spine-plugin/.mcp.json +8 -8
- package/agent-spine-plugin/CONTRIBUTING.md +52 -0
- package/agent-spine-plugin/LICENSE +186 -186
- package/agent-spine-plugin/README.md +394 -0
- package/agent-spine-plugin/SECURITY.md +47 -0
- package/agent-spine-plugin/assets/agentspine-banner.svg +32 -32
- package/agent-spine-plugin/bin/agentspine-mcp.js +4 -4
- package/agent-spine-plugin/bin/agentspine.js +7 -7
- package/agent-spine-plugin/blun.plugin.json +33 -33
- package/agent-spine-plugin/hooks/codex.json +47 -47
- package/agent-spine-plugin/hooks/hooks.json +106 -106
- package/agent-spine-plugin/hooks/version.json +5 -5
- package/agent-spine-plugin/package.json +69 -69
- package/agent-spine-plugin/scripts/check-hosts.js +199 -199
- package/agent-spine-plugin/skill/SKILL.md +76 -76
- package/agent-spine-plugin/skills/agent-spine/SKILL.md +85 -85
- package/agent-spine-plugin/src/cli.js +1488 -1442
- package/agent-spine-plugin/src/hook.js +886 -812
- package/agent-spine-plugin/src/index.js +93 -93
- package/agent-spine-plugin/src/lib/acceptance.js +333 -333
- package/agent-spine-plugin/src/lib/attention.js +755 -755
- package/agent-spine-plugin/src/lib/audit.js +351 -342
- package/agent-spine-plugin/src/lib/authentication.js +515 -515
- package/agent-spine-plugin/src/lib/briefing.js +317 -317
- package/agent-spine-plugin/src/lib/catalog.js +167 -167
- package/agent-spine-plugin/src/lib/channel-runtime.js +665 -665
- package/agent-spine-plugin/src/lib/context.js +154 -154
- package/agent-spine-plugin/src/lib/continuity.js +338 -338
- package/agent-spine-plugin/src/lib/coordination.js +577 -577
- package/agent-spine-plugin/src/lib/documents.js +217 -217
- package/agent-spine-plugin/src/lib/feed-transport.js +499 -499
- package/agent-spine-plugin/src/lib/filesystem-retry.js +32 -32
- package/agent-spine-plugin/src/lib/gateway-runtime.js +1119 -760
- package/agent-spine-plugin/src/lib/graph.js +337 -337
- package/agent-spine-plugin/src/lib/hook-audit.js +29 -0
- package/agent-spine-plugin/src/lib/https-transport.js +392 -392
- package/agent-spine-plugin/src/lib/indexed-memory-offline.js +40 -40
- package/agent-spine-plugin/src/lib/indexed-memory.js +281 -281
- package/agent-spine-plugin/src/lib/learning.js +6923 -6466
- package/agent-spine-plugin/src/lib/object-transport.js +206 -206
- package/agent-spine-plugin/src/lib/owned-file-lock.js +143 -143
- package/agent-spine-plugin/src/lib/paths.js +109 -109
- package/agent-spine-plugin/src/lib/peer-transport.js +283 -283
- package/agent-spine-plugin/src/lib/persona-runtime.js +581 -581
- package/agent-spine-plugin/src/lib/preflight.js +702 -702
- package/agent-spine-plugin/src/lib/runtime.js +13 -13
- package/agent-spine-plugin/src/lib/selfstarter.js +892 -819
- package/agent-spine-plugin/src/lib/sharing.js +969 -969
- package/agent-spine-plugin/src/lib/source-roots.js +529 -482
- package/agent-spine-plugin/src/lib/sqlite-transport.js +501 -501
- package/agent-spine-plugin/src/lib/telegram-adapter.js +119 -119
- package/agent-spine-plugin/src/lib/voice-runtime.js +39 -39
- package/agent-spine-plugin/src/mcp.js +597 -572
- package/agent-spine-plugin/src/version.js +1 -1
- package/agent-spine-plugin/src/worker.js +202 -195
- package/bin/active-steer-priority-policy.cjs +24 -0
- package/bin/launcher-runtime.js +8 -1
- package/bin/mnemo-tool-agent-policy.cjs +22 -0
- package/bin/thinking-activity-status-policy.cjs +132 -0
- package/bin/thinking-only-guard.cjs +75 -0
- package/bin/tool-call-loop-policy.cjs +53 -0
- package/bin/turn-thinking-policy.cjs +25 -1
- package/blun.mjs +554 -64
- package/package.json +4 -1
- package/standard-skills/translate-native/LICENSE +21 -21
- package/standard-skills/translate-native/references/evaluation-protocol.md +95 -95
- package/standard-skills/translate-native/references/native-orthography.md +79 -79
- package/standard-skills/translate-native/references/native-translation-standard.md +94 -94
- package/standard-skills/translate-native/references/structured-content.md +72 -72
- package/standard-skills/translate-native/references/translationese-review.md +77 -77
- package/standard-skills/translate-native/scripts/blun_language_guard.py +697 -697
- package/standard-skills/translate-native/scripts/check_diacritics.py +353 -353
- package/standard-skills/translate-native/scripts/guard_service_client.py +264 -264
- package/standard-skills/translate-native/scripts/language_gateway.py +62 -62
- package/standard-skills/translate-native/scripts/language_quality.py +377 -377
- package/standard-skills/translate-native/scripts/pre_output_guard.py +64 -64
- package/standard-skills/translate-native/scripts/translation_guard.py +916 -916
- package/standard-tools/language-guard/blun_language_guard.py +697 -697
- package/standard-tools/language-guard/check_diacritics.py +353 -353
- package/standard-tools/language-guard/guard_service_client.py +264 -264
- package/standard-tools/language-guard/language_quality.py +377 -377
- package/standard-tools/language-guard/translation_guard.py +916 -916
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/agentspine-banner.svg" alt="AgentSpine — identity that persists, memory that stays grounded" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/Maykbiletti/AgentSpine/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/Maykbiletti/AgentSpine/ci.yml?branch=main&style=flat-square&label=CI" alt="CI status"></a>
|
|
7
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-22c55e?style=flat-square" alt="Apache-2.0 license"></a>
|
|
8
|
+
<img src="https://img.shields.io/badge/Node.js-%E2%89%A520.9-3c873a?style=flat-square" alt="Node.js 20.9 or newer">
|
|
9
|
+
<img src="https://img.shields.io/badge/sources-read--only-67e8f9?style=flat-square" alt="Source documents are read-only">
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
A local-first, host-neutral context spine for agents that already have a history.
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
AgentSpine discovers the Markdown files an agent already relies on, fingerprints them, preserves the host's native hierarchy, follows explicit links, and serves only the relevant context through a CLI, lifecycle hooks, and MCP.
|
|
17
|
+
|
|
18
|
+
It does **not** replace your agent. It gives existing identity and memory a dependable structure without rewriting a single source byte.
|
|
19
|
+
|
|
20
|
+
## Why AgentSpine
|
|
21
|
+
|
|
22
|
+
Most agent memory systems begin by asking you to migrate everything into a new database or a new canonical file. AgentSpine begins with a stricter promise:
|
|
23
|
+
|
|
24
|
+
> Your existing `SOUL.md`, `AGENTS.md`, `CLAUDE.md`, `MEMORY.md`, and linked Markdown remain where they are, exactly as they are.
|
|
25
|
+
|
|
26
|
+
That makes AgentSpine suitable for long-lived agents, mixed Claude Code/Codex environments, repositories with nested instruction files, and teams that cannot afford silent identity drift.
|
|
27
|
+
|
|
28
|
+
## How it fits together
|
|
29
|
+
|
|
30
|
+
```mermaid
|
|
31
|
+
flowchart TB
|
|
32
|
+
A["Existing Markdown sources"] --> B["Read-only discovery"]
|
|
33
|
+
B --> C["Provenance catalog"]
|
|
34
|
+
C --> D["Host-aware resolver"]
|
|
35
|
+
F["Relationships + attention + safe learning + tasks + reviewed sharing"] --> G["Budgeted session briefing"]
|
|
36
|
+
D --> G
|
|
37
|
+
P["Separate default-deny delegation policy"] --> F
|
|
38
|
+
Y["Exact local execution policy"] --> J["Leased job + atomic checkpoint"] --> G
|
|
39
|
+
W["Authenticated channel event"] --> K["Exact route + durable lease"] --> G
|
|
40
|
+
X["Optional provider-neutral adapter"] --> S["Optional Ed25519 origin check"] --> Q["Local import quarantine"] --> F
|
|
41
|
+
G --> E["Claude Code · Codex · MCP"]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The resolver keeps three concerns separate:
|
|
45
|
+
|
|
46
|
+
| Layer | Purpose | Typical sources | Can grant rights? |
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| Constitution | Fixed instructions and dated directives | `CLAUDE.md`, `AGENTS.md`, `RULES.md` | Only the real host policy can |
|
|
49
|
+
| Soul | Stable voice, identity, goals, character | `SOUL.md`, existing persona files | No |
|
|
50
|
+
| Memory | Small linked facts and an index | `MEMORY.md`, `memory/**/*.md` | Never |
|
|
51
|
+
|
|
52
|
+
Other Markdown remains discoverable as reference material. Names and folders provide initial hints only: the agent itself can classify documents and connect them in a reversible overlay graph. A document becomes protected when it is a native instruction, soul, memory source, or is explicitly linked from one.
|
|
53
|
+
|
|
54
|
+
## Quick start
|
|
55
|
+
|
|
56
|
+
Requires Node.js 20.9 or newer.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git clone https://github.com/Maykbiletti/AgentSpine.git
|
|
60
|
+
cd AgentSpine
|
|
61
|
+
npm install
|
|
62
|
+
npm test
|
|
63
|
+
npm link
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Then point AgentSpine at any existing project:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
agentspine scan /path/to/project
|
|
70
|
+
agentspine context /path/to/project --host codex
|
|
71
|
+
agentspine briefing /path/to/project --host codex --max-bytes 16384
|
|
72
|
+
agentspine verify /path/to/project
|
|
73
|
+
agentspine audit /path/to/project
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The generated catalog is written to the operating system's user state directory, never into the scanned project. Set `AGENTSPINE_STATE_DIR` if you want a custom location.
|
|
77
|
+
|
|
78
|
+
## Install for Claude Code
|
|
79
|
+
|
|
80
|
+
Add this repository as a marketplace and install the plugin:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
/plugin marketplace add Maykbiletti/AgentSpine
|
|
84
|
+
/plugin install agent-spine@agent-spine
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
For local development:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
claude --plugin-dir .
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Claude Code discovers the bundled skill, hooks, and MCP server. Review and trust executable components when the host asks.
|
|
94
|
+
|
|
95
|
+
Version `0.54.0` adds durable, evidence-classified knowledge-gap handling to hierarchical goal plans. A host can pause the exact current step with one bounded question and an objective reason; reconciliation does not ask again, and the step resumes only after an exact locally confirmed answer. Owner input and objective observations remain distinct, objective answers require a SHA-256 source digest, and every answer is context-only. Conflicts, state tampering, secrets and authority-shaped answers fail closed.
|
|
96
|
+
|
|
97
|
+
Version `0.53.0` adds durable hierarchical goal plans to the optional gateway worker. An owner can precommit a bounded dependency graph of objective steps; the worker leases only the current ready step, advances after its explicit success result, resumes the exact step after restart, and reconstructs one missing wake after a torn write. Cycles, definition drift and stale-step completion fail closed, while the plan remains context-only and cannot grant tools, rights or delegation.
|
|
98
|
+
|
|
99
|
+
Version `0.52.1` keeps PreToolUse available when a bounded source or self-starter filesystem scan encounters an inaccessible or disappearing path. EPERM, EACCES, and ENOENT entries are skipped and reported without exposing file content; scan failures on Edit, Write, apply_patch, Bash, and exec_command are allowed and recorded in the local diagnostic audit log. Policy violations and protected-source writes remain fail-closed.
|
|
100
|
+
|
|
101
|
+
Version `0.52.0` makes every locally attested user-feedback or objective-test anchor single-use for experiment admission within its exact scope. Evaluation v28 and bounded retry v29 atomically register content-free lineage tombstones and bind them into candidate admission v4. They survive candidate deletion and subject purge, so a fresh candidate or recreated contract cannot reuse the same evidence or independence identity; parallel races yield one contract, manipulation fails closed after restart, and foreign scopes remain independent with zero matching diagnostics.
|
|
102
|
+
|
|
103
|
+
Version `0.51.0` adds precise local withdrawal of a mistaken evidence-source attestation. `learn-evidence-source-attestation-revoke` binds the exact attestation, candidate admission, evaluation, target and scope without retaining its explanation. The affected lesson is withheld immediately; measurements, projections, deliveries, outcomes and renewal are blocked, and the next locked evaluation pass rolls back the dependent lineage while restoring a safe predecessor. Parallel withdrawal is idempotent, manipulation fails closed after restart, and foreign scopes receive zero diagnostics.
|
|
104
|
+
|
|
105
|
+
Version `0.50.0` requires an explicit local attestation of every qualifying user-feedback or objective-test source before a behavior experiment can begin. Evaluation v26 and bounded retry v27 bind content-free source-class attestations to the exact evidence cohort, target, scope and admission time. Self-labeled chat or model claims cannot open a measurement contract without that confirmation; re-signed class manipulation fails closed after restart, parallel registration remains idempotent, and foreign scopes receive zero diagnostics.
|
|
106
|
+
|
|
107
|
+
Version `0.49.0` prevents chat, memory-like interaction history, or documents alone from opening a behavior experiment. Evaluation v24 and bounded retry v25 freeze a content-free source policy requiring at least one fresh independent explicit-user statement or objective-test anchor before any measurement contract exists. Source-policy manipulation fails closed after restart, parallel registration remains idempotent, and foreign scopes receive zero diagnostics.
|
|
108
|
+
|
|
109
|
+
Version `0.48.0` makes the blocking-defect rule immutable and phase-complete. Evaluation v22 and bounded retry v23 freeze a content-free policy requiring any eligible blocking defect to override cohort averages: a Before defect prevents Canary admission, while After and revalidation defects retain automatic rollback. Policy manipulation fails closed after restart, favorable replay cannot replace a defective evaluator slot, and foreign scopes receive zero diagnostics.
|
|
110
|
+
|
|
111
|
+
Version `0.47.0` freezes the exact fresh evidence cohort before a behavior experiment can start. Evaluation v20 and bounded retry v21 exclude stale evidence, reject future observation times and retain only content-free evidence, independence, class and time metadata under a frozen age policy. Cohort manipulation fails closed after restart, configuration drift cannot move the window, and foreign scopes receive zero diagnostics.
|
|
112
|
+
|
|
113
|
+
Version `0.46.0` requires a candidate to satisfy its frozen confidence and independent-evidence gates before an evaluation contract or measurement lineage can exist. Evaluation v18 and bounded retry v19 embed a content-free candidate-admission receipt bound to the exact target and scope; parallel registration is idempotent, rewritten counts fail closed after restart, and foreign scopes receive zero diagnostics.
|
|
114
|
+
|
|
115
|
+
Version `0.45.0` freezes minimum confidence and independent-evidence requirements in every new behavior evaluation before any benchmark outcome is admitted. Evaluation v16 and bounded retry v17 use those immutable gates despite later configuration changes; scoped status and Context MCP expose only matching content-free counts and digests, while Doctor and audit remain project-wide.
|
|
116
|
+
|
|
117
|
+
Version `0.44.0` makes scoped learning diagnostics fully group-isolated. Every top-level evaluator, binding, lease, retry, exhaustion, staleness and revocation count returned by `learn-status` or the read-only Context MCP is now derived only from candidate records visible to that exact scope; foreign scopes receive zeros without learning whether protected state exists. Unscoped Doctor and audit remain project-wide for local operators.
|
|
118
|
+
|
|
119
|
+
Version `0.43.0` freezes outcome freshness and Canary lifetime in each new evaluation contract. Evaluation v14 and bounded retry v15 carry a digested, content-free staleness policy; later configuration changes affect only future contracts and cannot revive old evidence or extend a registered Canary. Retry comparisons include the policy digest, while scoped status, Doctor and audit expose only counts and digests.
|
|
120
|
+
|
|
121
|
+
Version `0.42.0` protects learning mutations with an owner-bound renewable file lease. A live process keeps its lock beyond the stale threshold, a crashed owner can be recovered, and a process that loses ownership aborts before replacing learning state or deleting the successor's lock.
|
|
122
|
+
|
|
123
|
+
Version `0.41.0` makes the fixed corrective-trial budget independently auditable. A failed attempt 2-of-2 atomically creates one content-free terminal receipt bound to the root evaluation, exact corrective contract, failure, target and scope. Timeout revocation cannot erase the exhausted budget, and foreign groups receive neither the receipt nor its count.
|
|
124
|
+
Version `0.40.0` makes large image reads quiet: an oversized optional PostToolUse payload is drained and skipped with exit 0, no output and no partial state. Mandatory prompt, source-protection, compaction and completion hooks keep the strict 64 KiB fail-closed boundary.
|
|
125
|
+
|
|
126
|
+
Version `0.39.0` makes corrective trials finite: `agentspine.learning-evaluation/v13` binds the only retry as attempt 2 of 2 to its exact root evaluation and objective comparison contract. A failed corrective Canary cannot be retried again, even when its timeout is locally revoked.
|
|
127
|
+
Version `0.38.0` keeps a confirmed retry objectively comparable: `agentspine.learning-evaluation/v12` binds its metric, benchmark, case floor, evaluator roots, pairing rules and promotion thresholds to the failed predecessor. A corrected completion timeout is allowed, while moving the measurement goalposts fails closed.
|
|
128
|
+
Version `0.37.0` makes the retry requirement enforceable. A repeated failed behavior and exact scope can receive `agentspine.learning-evaluation/v11` only after explicit local confirmation binds the latest timeout revocation to a distinct candidate, newly observed evidence and a new contract; the old Canary remains terminal and the safe predecessor stays active.
|
|
129
|
+
Version `0.36.0` adds locally confirmed withdrawal of one exact invalid initial-trial timeout receipt. The false proof is marked content-free without deleting it, the rolled-back Canary stays terminal, the safe predecessor remains active, and any retry requires a fresh candidate and evaluation contract.
|
|
130
|
+
Version `0.35.0` adds locally confirmed withdrawal of one exact validation decision, including any dependent renewed lease chain. The lesson is withheld before the next matching context pass and rolled back atomically while its evaluation, measurements, outcomes and user-owned sources remain unchanged.
|
|
131
|
+
Version `0.34.0` retains the `agentspine.preflight/v2` pre-answer contract, self-healing authenticated persona-to-graph reconciliation, and provider-neutral outcome-bound behavior loop. Every automatic behavior experiment starts with an immutable, locally confirmed evaluation contract and registered evaluator roots. Its content-free target digest freezes the exact evidence-backed candidate revision that the experiment is allowed to prove; later evidence or guidance cannot inherit an earlier result. Locally confirmed evaluation, evidence, measurement, application, delivery and outcome revocation receipts can withdraw one exact invalid contract or proof without storing the explanation in plaintext: any dependent lesson is withheld from the next matching context pass and rolled back atomically, while foreign groups receive neither content nor diagnostics. A revoked contract cannot accept measurements, projections, deliveries, outcomes, promotion or validation renewal; already recorded evidence remains immutable. The initial Before/After cohort precommits each evaluator, principal root, provider run ID, benchmark digest and exact case count before any result or Canary projection exists. A content-free completion policy also freezes the delivery and outcome deadlines before the trial starts. The first exact-scope projections carry the target and policy digests and are admitted atomically; a missing or revoked `Stop`, crash, unmeasured outcome or failed trial creates a blocking condition, removes the Canary from context and rolls it back instead of accepting a later favorable result. Validation remains current only while its content-free evidence lease, exact target, scope, benchmark, evaluator binding and expiry are intact, and renewal keeps the same trial-bound guarantees. Measurement sources and evaluator/run pairs are globally single-use, aliases cannot manufacture independent votes, and no average can hide a blocking defect. All learning remains context-only and cannot create identity, permissions, delegation, credentials, tools, production access, payments or policy exceptions. The installed hook keeps bounded home scanning, excludes configured AgentSpine state only at the exact user home, preserves host-native rules byte-for-byte, and never delegates preflight to model-side MCP. See [safe learning](docs/learning.md), [pre-answer recall gate](docs/preflight-recall.md), and [durable gateway worker](docs/gateway-runtime.md).
|
|
132
|
+
|
|
133
|
+
Verify the installed registration from a checkout with:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npm run host:check
|
|
137
|
+
npm run host:install-check
|
|
138
|
+
claude plugin list
|
|
139
|
+
claude mcp list
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
If AgentSpine is installed but absent from `/mcp`, refresh the cached marketplace copy, reinstall the plugin, start a new Claude Code session, and approve the `agent-spine` server in `/mcp`:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
claude plugin marketplace update agent-spine
|
|
146
|
+
claude plugin uninstall agent-spine@agent-spine
|
|
147
|
+
claude plugin install agent-spine@agent-spine
|
|
148
|
+
claude mcp list
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
An unapproved server may appear as `Pending approval`; approval remains a user action and AgentSpine never bypasses Claude Code's trust boundary.
|
|
152
|
+
|
|
153
|
+
After that one host trust decision, enable automatic continuity once for a known local identity:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
agentspine entity person:me --kind person --name "Me" --privacy shared
|
|
157
|
+
agentspine continuity-config /path/to/project --enabled true --entity person:me --confirm-local-opt-in
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
From the next prompt onward, installed lifecycle hooks scan and inject the real scoped `session_briefing` at start, resume, prompt submission, and compaction boundaries. The model does not need to choose `scan`, `context`, or `session_briefing`. The opt-in is separate from host trust because learning conversation signals is a user-controlled privacy decision.
|
|
161
|
+
|
|
162
|
+
Source discovery is independent of the installation `cwd`: Claude uses `CLAUDE_CONFIG_DIR` plus the active project and evidenced project-memory binding; Codex uses `CODEX_HOME` plus its native root-to-`cwd` instruction chain. Inspect the result with `agentspine source-status --host claude|codex --cwd /active/project --json`. See [host-native source roots](docs/source-roots.md).
|
|
163
|
+
|
|
164
|
+
## Install for Codex
|
|
165
|
+
|
|
166
|
+
AgentSpine ships a native `.codex-plugin/plugin.json`. Add the repository to a configured marketplace, open the Codex plugin browser with `/plugins`, install AgentSpine, and start a fresh session. For development, the CLI and MCP server can be used directly:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npm link
|
|
170
|
+
agentspine-mcp
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
See [host integration](docs/host-integration.md) for exact component paths and trust behavior.
|
|
174
|
+
|
|
175
|
+
## Preservation contract
|
|
176
|
+
|
|
177
|
+
AgentSpine's first release is intentionally narrow and testable:
|
|
178
|
+
|
|
179
|
+
- source Markdown is opened read-only;
|
|
180
|
+
- symlinks are not followed during discovery;
|
|
181
|
+
- generated state is stored outside ordinary projects; an exact user-home root may contain its explicitly scan-excluded AgentSpine state subtree;
|
|
182
|
+
- every source receives a SHA-256 fingerprint, byte size, path, layer, and provenance;
|
|
183
|
+
- native host precedence is retained rather than flattened;
|
|
184
|
+
- broken links and competing candidates are exposed as findings, never auto-resolved;
|
|
185
|
+
- linked files are resolved transitively without loading unrelated Markdown;
|
|
186
|
+
- oversized context stays available through exact ranged reads;
|
|
187
|
+
- agent write tools are blocked from protected sources by lifecycle hooks;
|
|
188
|
+
- uninstalling AgentSpine leaves every source file untouched.
|
|
189
|
+
|
|
190
|
+
Read the full [preservation contract](docs/preservation-contract.md), including threat boundaries and deliberate non-goals.
|
|
191
|
+
|
|
192
|
+
## CLI
|
|
193
|
+
|
|
194
|
+
| Command | Outcome |
|
|
195
|
+
|---|---|
|
|
196
|
+
| `agentspine scan [root]` | Discover, classify, fingerprint, and save an external catalog |
|
|
197
|
+
| `agentspine context [root] --host …` | Resolve relevant sources in deterministic order |
|
|
198
|
+
| `agentspine briefing [root] …` | Assemble one scoped, privacy-filtered, byte-budgeted session packet |
|
|
199
|
+
| `agentspine read <path>` | Read an indexed source range with SHA-256 provenance |
|
|
200
|
+
| `agentspine verify [root]` | Report added, removed, or byte-changed Markdown |
|
|
201
|
+
| `agentspine link …` | Add an agent-inferred document relationship to the overlay graph |
|
|
202
|
+
| `agentspine annotate …` | Add a reversible semantic classification with confidence |
|
|
203
|
+
| `agentspine entity …` | Add or update a person, agent, group, channel, or project |
|
|
204
|
+
| `agentspine relate …` | Connect two known entities with privacy and confidence |
|
|
205
|
+
| `agentspine relationships …` | Read one privacy-filtered relationship neighborhood |
|
|
206
|
+
| `agentspine attention [root]` | Read sparse due cues after privacy, focus, quiet-hour, and repeat filters |
|
|
207
|
+
| `agentspine attention-add …` | Record an unanswered question, promise, check-in, or meaningful change |
|
|
208
|
+
| `agentspine attention-touch …` | Record only that an entity interaction occurred |
|
|
209
|
+
| `agentspine attention-config …` | Configure limits, quiet hours, silence threshold, or disable attention |
|
|
210
|
+
| `agentspine attention-delete …` | Permanently remove a cue and its retained attention history |
|
|
211
|
+
| `agentspine attention-events …` | Inspect durable heartbeat, promise, and blocker events plus optional history |
|
|
212
|
+
| `agentspine attention-event-delete …` | Permanently remove one lifecycle event, its receipts, history, and presentation state |
|
|
213
|
+
| `agentspine learn-propose …` | Store an evidence-backed candidate outside accepted context |
|
|
214
|
+
| `agentspine learn-evidence …` | Append evidence while retaining the previous candidate version |
|
|
215
|
+
| `agentspine learn-review …` | Explicitly accept or reject a candidate |
|
|
216
|
+
| `agentspine learn-context …` | Read only accepted, privacy-filtered learning |
|
|
217
|
+
| `agentspine learn-evaluate …` | Run the default-off low-risk automatic policy |
|
|
218
|
+
| `agentspine learn-evaluator-register …` | Locally confirm one content-free evaluator principal root |
|
|
219
|
+
| `agentspine learn-evaluator-revoke …` | Revoke a root, block new evidence, and retain its prior record |
|
|
220
|
+
| `agentspine learn-evaluation …` | Register an immutable fixed-task contract, or explicitly bind one fresh retry after a revoked trial failure |
|
|
221
|
+
| `agentspine learn-measurement …` | Register one immutable, content-free external measurement run locally |
|
|
222
|
+
| `agentspine learn-measurement-revoke …` | Locally revoke one exact invalid measurement and trigger fail-closed withholding |
|
|
223
|
+
| `agentspine learn-application-revoke …` | Locally revoke one exact invalid turn projection and block every dependent proof |
|
|
224
|
+
| `agentspine learn-evaluation-revoke …` | Locally revoke one exact invalid evaluation contract and block its complete lineage |
|
|
225
|
+
| `agentspine learn-validation-revoke …` | Locally revoke one exact invalid validation decision through its renewal chain |
|
|
226
|
+
| `agentspine learn-trial-failure-revoke …` | Locally withdraw one exact false initial-trial timeout without resurrecting its Canary |
|
|
227
|
+
| `agentspine learn-delivery-revoke …` | Locally revoke one exact invalid model-turn delivery and trigger fail-closed withholding |
|
|
228
|
+
| `agentspine learn-outcome-revoke …` | Locally revoke one exact invalid measured result while retaining its immutable measurement |
|
|
229
|
+
| `agentspine learn-outcome …` | Consume one exact measurement receipt into a contract-, application-, and delivery-bound outcome |
|
|
230
|
+
| `agentspine learn-measurement-purge …` | Locally purge only stale, unconsumed measurement receipts |
|
|
231
|
+
| `agentspine learn-status …` | Diagnose contradictions, receipt counts, canary health, and staleness |
|
|
232
|
+
| `agentspine learn-rollback …` | Restore the accepted fact replaced by a learning |
|
|
233
|
+
| `agentspine learn-config …` | Configure auto-promotion thresholds, initial-trial outcome deadlines, and context limits |
|
|
234
|
+
| `agentspine learn-delete …` | Permanently remove one candidate and its learning history |
|
|
235
|
+
| `agentspine continuity-config …` | Enable, disable, scope, and budget automatic continuity after local opt-in |
|
|
236
|
+
| `agentspine continuity-status …` | Inspect configuration and minimal signal counts without transcript content |
|
|
237
|
+
| `agentspine continuity-purge …` | Permanently remove one identity's automatic signals and learned context |
|
|
238
|
+
| `agentspine source-status …` | Inspect host-native user, project, and memory roots without exposing source contents |
|
|
239
|
+
| `agentspine source-bind …` | Bind existing user-wide continuity after an explicit local confirmation |
|
|
240
|
+
| `agentspine source-rollback …` | Disable one source binding while retaining its append-only audit history |
|
|
241
|
+
| `agentspine source-purge …` | Permanently remove one binding while retaining only its non-reversible digest receipt |
|
|
242
|
+
| `agentspine delegation-check …` | Check explicit actor/action/target coordination policy; default deny |
|
|
243
|
+
| `agentspine delegation-grant …` | Owner-confirmed local CLI grant for task coordination only |
|
|
244
|
+
| `agentspine delegation-revoke …` | Revoke future coordination and retain policy history |
|
|
245
|
+
| `agentspine task-create …` | Create a context-only task, open thread, or handoff |
|
|
246
|
+
| `agentspine task-update …` | Update status, assignee, or details while retaining the prior version |
|
|
247
|
+
| `agentspine tasks …` | Read privacy-filtered current coordination context |
|
|
248
|
+
| `agentspine execution-grant …` | Create one exact local owner-confirmed job grant; never inferred from context |
|
|
249
|
+
| `agentspine execution-revoke …` | Revoke future start, resume, and effects while retaining policy history |
|
|
250
|
+
| `agentspine job-register …` | Register a waiting job with its initial content-bound checkpoint |
|
|
251
|
+
| `agentspine jobs …` | Inspect durable status, retry, blocker, lease, and checkpoint metadata |
|
|
252
|
+
| `agentspine job-cancel …` | Stop a job through an explicit local owner decision |
|
|
253
|
+
| `agentspine job-delete …` | Permanently purge an unleased job, history, and receipts |
|
|
254
|
+
| `agentspine channel-bind …` | Create or replace one exact locally confirmed provider-to-agent route |
|
|
255
|
+
| `agentspine channel-revoke …` | Revoke a route and cancel its pending or leased events |
|
|
256
|
+
| `agentspine channel-policy …` | Inspect local channel bindings without exposing secret values |
|
|
257
|
+
| `agentspine channel-events …` | Inspect the exact-scope durable ingress queue and leases |
|
|
258
|
+
| `agentspine persona-sync …` | Synchronize an explicitly approved external authenticated roster |
|
|
259
|
+
| `agentspine personas …` | Inspect active and historical persona identities and provenance |
|
|
260
|
+
| `agentspine goal-assign …` | Assign one authenticated focused goal or dependency-bound plan to an active agent |
|
|
261
|
+
| `agentspine goal-clarify …` | Resolve one exact plan-bound knowledge gap with locally confirmed context |
|
|
262
|
+
| `agentspine gateway-control …` | Enable, stop, or kill-switch the local worker under explicit owner control |
|
|
263
|
+
| `agentspine gateway-status …` | Inspect goals, queue, delivery receipts, and independent health gates |
|
|
264
|
+
| `agentspine share-init …` | Initialize an optional provider-neutral directory adapter outside the project |
|
|
265
|
+
| `agentspine share-keygen …` | Create or explicitly rotate a local Ed25519 signing identity |
|
|
266
|
+
| `agentspine share-trust …` | Trust one exported public identity for the current project |
|
|
267
|
+
| `agentspine share-trust-revoke …` | Revoke a trusted key without turning signatures into authority |
|
|
268
|
+
| `agentspine share-publish …` | Publish one explicitly selected accepted, non-private learning |
|
|
269
|
+
| `agentspine share-pull …` | Import immutable events into local quarantine, never active context |
|
|
270
|
+
| `agentspine share-snapshot-export …` | Export one immutable signed snapshot outside the scanned project |
|
|
271
|
+
| `agentspine share-https-publish …` | Create a content-addressed HTTPS object and verify it by read-back |
|
|
272
|
+
| `agentspine share-https-pull …` | Fetch a bounded signed snapshot through hardened HTTPS into quarantine |
|
|
273
|
+
| `agentspine share-feed-publish …` | Append one immutable snapshot to a signed ETag-protected feed |
|
|
274
|
+
| `agentspine share-feed-pull …` | Verify feed continuity and import its latest snapshot into quarantine |
|
|
275
|
+
| `agentspine share-feed-state …` | Inspect local rollback-protection receipts and retained history |
|
|
276
|
+
| `agentspine share-peer-serve …` | Answer one live signed snapshot challenge over stdin/stdout |
|
|
277
|
+
| `agentspine share-peer-pull …` | Pull through an owner-selected executable without invoking a shell |
|
|
278
|
+
| `agentspine share-sqlite-init …` | Bind an external SQLite file to one authenticated adapter |
|
|
279
|
+
| `agentspine share-sqlite-publish …` | Append a verified snapshot and atomically advance its hash-linked head |
|
|
280
|
+
| `agentspine share-sqlite-inspect …` | Validate and inspect the complete local database history |
|
|
281
|
+
| `agentspine share-sqlite-pull …` | Import the latest fully verified database snapshot into quarantine |
|
|
282
|
+
| `agentspine share-inbox …` | Review pending, accepted, rejected, superseded, or rolled-back imports |
|
|
283
|
+
| `agentspine share-review …` | Accept or reject one import through a second local decision |
|
|
284
|
+
| `agentspine share-context …` | Read only locally accepted, privacy-filtered shared memory |
|
|
285
|
+
| `agentspine share-rollback …` | Roll back shared supersession and restore the prior record |
|
|
286
|
+
| `agentspine audit [root]` | Run ten deterministic quality and preservation gates |
|
|
287
|
+
| `agentspine acceptance` | Run the visible synthetic Claude/Codex lifecycle acceptance and print reproducible receipts |
|
|
288
|
+
| `agentspine doctor` | Check runtime and preservation mode |
|
|
289
|
+
| `agentspine mcp` | Start the stdio MCP server |
|
|
290
|
+
|
|
291
|
+
Every command supports `--json` where structured output is useful.
|
|
292
|
+
|
|
293
|
+
The optional SQLite commands use Node.js `node:sqlite` and therefore require Node.js 22.13 or newer; core discovery, CLI, MCP, and the other transports retain the package's declared Node.js support. See the [SQLite transport contract](docs/sqlite-transport.md).
|
|
294
|
+
|
|
295
|
+
## MCP tools
|
|
296
|
+
|
|
297
|
+
```mermaid
|
|
298
|
+
flowchart LR
|
|
299
|
+
S["scan"] --> R["resolve_context"]
|
|
300
|
+
R --> B["session_briefing"]
|
|
301
|
+
B --> Q["read_document"]
|
|
302
|
+
Q --> V["verify"]
|
|
303
|
+
E["upsert_entity"] --> L["link_entities"]
|
|
304
|
+
L --> C["relationship_context"]
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
- `scan` builds the source map.
|
|
308
|
+
- `resolve_context` selects constitution, soul, memory index, and linked facts for the current host and directory.
|
|
309
|
+
- `session_briefing` combines only the relevant native sources, current tasks, relationships, accepted learning, reviewed shared memory, and optional cues within a hard compact-JSON byte budget.
|
|
310
|
+
- `read_document` retrieves exact byte ranges that did not fit the context budget.
|
|
311
|
+
- `verify` proves whether source bytes changed since the last scan.
|
|
312
|
+
- `link_documents` and `annotate_document` let agents build their own semantic map without editing sources.
|
|
313
|
+
- `upsert_entity`, `link_entities`, and `relationship_context` maintain a privacy-scoped social and responsibility map outside the project.
|
|
314
|
+
- `upsert_attention`, `record_activity`, `attention_context`, `resolve_attention`, `configure_attention`, and `delete_attention` provide sparse follow-up suggestions without sending messages or granting authority.
|
|
315
|
+
- `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.
|
|
316
|
+
- `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.
|
|
317
|
+
- `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.
|
|
318
|
+
- `audit` runs the same ten gates available through the CLI.
|
|
319
|
+
|
|
320
|
+
Relationship updates supersede the active view but retain the previous observation in append-only graph history. Permission-like and credential-like attributes are rejected recursively. See [relationships and learning](docs/relationships.md).
|
|
321
|
+
|
|
322
|
+
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).
|
|
323
|
+
|
|
324
|
+
Safe learning is evidence-first: general candidates remain invisible until reviewed. Low-risk behavior candidates additionally require a locally confirmed immutable evaluation contract and independent fixed-task measurements before and after an exact-scope Canary. After-results count only when they bind to that unchanged contract, distinct preflight-bound projection receipts and exact-session model-stop delivery receipts. The contract freezes completion deadlines before the first trial; missing delivery or outcome evidence becomes a blocking receipt and automatic rollback. Model self-evaluation cannot promote a lesson, later configuration cannot lower frozen thresholds, and no average can hide a blocking defect. 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).
|
|
325
|
+
|
|
326
|
+
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).
|
|
327
|
+
|
|
328
|
+
Shared memory is transport-neutral and double-reviewed: only accepted non-private learning may be published, every import enters quarantine, and the receiving installation must confirm it again before it can appear in context. The reference directory adapter works without a cloud account. Signed adapters can be exported as immutable snapshots, published as create-only content-addressed HTTPS objects, discovered through signed ETag-protected feeds with local rollback receipts, or requested live through a challenge-response stdio peer. HTTPS pulling uses pinned DNS, SSRF protection, strict limits, verified read-back, and optional environment-supplied bearer authentication. Peer pulling delegates the carrier to one explicit owner-selected executable without AgentSpine invoking a shell. Digests and Ed25519 envelopes protect transport integrity and configured origins; neither grants authority or approves content. See [shared memory adapters](docs/shared-memory.md), [HTTPS snapshots](docs/https-transport.md), [immutable HTTPS objects](docs/object-transport.md), [signed mutable feeds](docs/feed-transport.md), and [peer transport](docs/peer-transport.md).
|
|
329
|
+
|
|
330
|
+
Session briefing keeps that growing context usable: one scoped read prioritizes the current request, explicit stops, and current task; deduplicates local and shared facts; defaults to focus mode; enforces exact group audiences; and measures the entire compact JSON result against the requested byte ceiling. Native lifecycle hooks now inject this packet automatically instead of asking the model to call MCP. See [session briefing](docs/session-briefing.md).
|
|
331
|
+
|
|
332
|
+
The authenticated channel-wake runtime prevents an incoming provider message from losing its recipient or origin. A locally confirmed binding fixes provider, tenant, account, chat, thread, sender, agent, project, group, and session; HMAC-authenticated events enter one durable leased lane and the installed host hook injects the exact message with its compact voice brief. The optional `agentspine-worker` now supplies the missing gateway responsibilities: automatic external-roster synchronization, Telegram polling, exact host-run requests, bounded checkpoints, crash recovery, and idempotent delivery back to the origin. It runs only when the owner starts or supervises it and remains outside MCP. See [authenticated channel wake](docs/channel-runtime.md), [durable gateway worker](docs/gateway-runtime.md), and the [OpenClaw/Hermes reference study](docs/harness-reference.md).
|
|
333
|
+
|
|
334
|
+
The rights-bound self-starter is a separate execution path. A genuine local owner action must grant one exact actor, job, task, target, project, host, and finite tool-capability set. Installed hooks then acquire one lease, recheck authority before every effect, checkpoint the workspace after every result, and resume only an unchanged checkpoint. Memory, Markdown, relationships, learning, attention, task text, previous approvals, and MCP can never create that grant. See [rights-bound self-starter](docs/selfstarter.md).
|
|
335
|
+
|
|
336
|
+
## Optional four-layer starter
|
|
337
|
+
|
|
338
|
+
New agents that do not have identity files yet can start with the included [`spine-example/`](spine-example/) template:
|
|
339
|
+
|
|
340
|
+
| Layer | Holds | Expected change rate |
|
|
341
|
+
|---|---|---|
|
|
342
|
+
| Identity | Name, purpose, stable principles | Almost never |
|
|
343
|
+
| Voice | Tone, language, and expression | Rarely |
|
|
344
|
+
| Conduct | Working behavior and verification habits | On explicit feedback |
|
|
345
|
+
| Grown history | Dated experience and corrections | Append-only |
|
|
346
|
+
|
|
347
|
+
The manual [`skill/SKILL.md`](skill/SKILL.md) can scaffold and audit this optional layout. It is only for an agent with no existing spine. AgentSpine never migrates an established agent into the example, and the normal plugin resolver continues to discover and preserve whatever files already exist.
|
|
348
|
+
|
|
349
|
+
## Design principles
|
|
350
|
+
|
|
351
|
+
1. **Preserve before learning.** No useful memory feature justifies destroying the history it is meant to protect.
|
|
352
|
+
2. **Memory is data, never authority.** A remembered sentence cannot create permissions, bypass review, or widen access.
|
|
353
|
+
3. **Relevance changes; history does not disappear.** New information adjusts confidence and relevance instead of silently overwriting old records.
|
|
354
|
+
4. **Identity is contextual.** People, agents, groups, and channels receive separate stable identities until an explicit link proves otherwise.
|
|
355
|
+
5. **Human warmth cannot outrank the task.** Relationship context stays small and yields first when context is tight.
|
|
356
|
+
6. **Local operation is complete.** Remote or shared-memory adapters are optional extensions, not hidden requirements.
|
|
357
|
+
|
|
358
|
+
## Project status
|
|
359
|
+
|
|
360
|
+
AgentSpine is in active early development. `v0.8` adds authenticated persona synchronization, a compact voice bridge, an optional durable gateway worker, exact Telegram ingress and delivery, focused goals, per-agent lanes, leases, recovery, and independent health gates. Automatic lifecycle behavior requires the host to discover and trust the current hook definition; a staged direct hook invocation is not treated as proof of that real host decision. Every external effect remains current-rights-bound and default-deny, and existing source Markdown remains immutable.
|
|
361
|
+
|
|
362
|
+
## Documentation
|
|
363
|
+
|
|
364
|
+
| Goal | Start here |
|
|
365
|
+
|---|---|
|
|
366
|
+
| Understand the system | [Architecture](docs/architecture.md) |
|
|
367
|
+
| Audit non-destructive behavior | [Preservation contract](docs/preservation-contract.md) |
|
|
368
|
+
| Integrate a host | [Claude Code and Codex](docs/host-integration.md) |
|
|
369
|
+
| Bind an authenticated external message | [Authenticated channel wake](docs/channel-runtime.md) |
|
|
370
|
+
| Run automatic roster, goal, and Telegram work | [Durable gateway worker](docs/gateway-runtime.md) |
|
|
371
|
+
| Compare harness design choices | [OpenClaw and Hermes reference study](docs/harness-reference.md) |
|
|
372
|
+
| Reproduce the complete host behavior | [Visible cross-host acceptance](docs/acceptance.md) |
|
|
373
|
+
| Enable automatic continuity | [Automatic continuity](docs/automatic-continuity.md) |
|
|
374
|
+
| Load one compact session packet | [Session briefing](docs/session-briefing.md) |
|
|
375
|
+
| Resume one exactly authorized job | [Rights-bound self-starter](docs/selfstarter.md) |
|
|
376
|
+
| Understand relationships and history | [Relationships](docs/relationships.md) |
|
|
377
|
+
| Configure sparse follow-ups | [Attention](docs/attention.md) |
|
|
378
|
+
| Review evidence-backed observations | [Safe learning](docs/learning.md) |
|
|
379
|
+
| Coordinate agents without memory-based authority | [Delegation and coordination](docs/coordination.md) |
|
|
380
|
+
| Exchange reviewed context between installations | [Shared memory adapters](docs/shared-memory.md) |
|
|
381
|
+
| Publish or pull signed static snapshots | [HTTPS snapshot transport](docs/https-transport.md) |
|
|
382
|
+
| Publish immutable content-addressed objects | [HTTPS object transport](docs/object-transport.md) |
|
|
383
|
+
| Discover successive snapshots safely | [Signed mutable feeds](docs/feed-transport.md) |
|
|
384
|
+
| Pull directly from another installation | [Challenge-response peer transport](docs/peer-transport.md) |
|
|
385
|
+
| Verify or cut a release | [Release process](docs/releasing.md) |
|
|
386
|
+
| Run the Definition of Done | [Ten quality gates](docs/quality-gates.md) |
|
|
387
|
+
| See planned capabilities | [Roadmap](docs/roadmap.md) |
|
|
388
|
+
| Cut a release | [Release process](docs/releasing.md) |
|
|
389
|
+
| Contribute safely | [Contributing](CONTRIBUTING.md) |
|
|
390
|
+
| Report a vulnerability | [Security policy](SECURITY.md) |
|
|
391
|
+
|
|
392
|
+
## License
|
|
393
|
+
|
|
394
|
+
Apache License 2.0. See [LICENSE](LICENSE).
|
|
@@ -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,32 +1,32 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="360" viewBox="0 0 1200 360" role="img" aria-labelledby="title desc">
|
|
2
|
-
<title id="title">AgentSpine</title>
|
|
3
|
-
<desc id="desc">A layered identity and memory spine for AI agents</desc>
|
|
4
|
-
<defs>
|
|
5
|
-
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
6
|
-
<stop stop-color="#07111f"/>
|
|
7
|
-
<stop offset="1" stop-color="#111c35"/>
|
|
8
|
-
</linearGradient>
|
|
9
|
-
<linearGradient id="line" x1="0" y1="0" x2="0" y2="1">
|
|
10
|
-
<stop stop-color="#67e8f9"/>
|
|
11
|
-
<stop offset=".52" stop-color="#8b5cf6"/>
|
|
12
|
-
<stop offset="1" stop-color="#f472b6"/>
|
|
13
|
-
</linearGradient>
|
|
14
|
-
<filter id="glow"><feGaussianBlur stdDeviation="7" result="b"/><feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge></filter>
|
|
15
|
-
</defs>
|
|
16
|
-
<rect width="1200" height="360" rx="30" fill="url(#bg)"/>
|
|
17
|
-
<g opacity=".13" stroke="#9cc8ff"><path d="M0 64h1200M0 128h1200M0 192h1200M0 256h1200M0 320h1200"/><path d="M96 0v360M192 0v360M288 0v360M384 0v360M480 0v360M576 0v360M672 0v360M768 0v360M864 0v360M960 0v360M1056 0v360"/></g>
|
|
18
|
-
<g transform="translate(116 42)" filter="url(#glow)">
|
|
19
|
-
<path d="M74 14c-26 24-26 48 0 72s26 48 0 72-26 48 0 72 26 48 0 72" fill="none" stroke="url(#line)" stroke-width="12" stroke-linecap="round"/>
|
|
20
|
-
<path d="M74 14c26 24 26 48 0 72s-26 48 0 72 26 48 0 72-26 48 0 72" fill="none" stroke="#eef7ff" stroke-opacity=".68" stroke-width="5" stroke-linecap="round"/>
|
|
21
|
-
<g fill="#07111f" stroke="#baf5ff" stroke-width="4"><circle cx="74" cy="14" r="10"/><circle cx="74" cy="86" r="10"/><circle cx="74" cy="158" r="10"/><circle cx="74" cy="230" r="10"/><circle cx="74" cy="302" r="10"/></g>
|
|
22
|
-
</g>
|
|
23
|
-
<g fill="#f8fbff" font-family="Inter,Segoe UI,Arial,sans-serif">
|
|
24
|
-
<text x="286" y="139" font-size="76" font-weight="750" letter-spacing="-3">AgentSpine</text>
|
|
25
|
-
<text x="290" y="194" font-size="26" fill="#b9c9e5">Identity that persists. Memory that stays grounded.</text>
|
|
26
|
-
<g transform="translate(290 238)" font-size="16" font-weight="600">
|
|
27
|
-
<rect width="150" height="38" rx="19" fill="#67e8f9" fill-opacity=".13" stroke="#67e8f9" stroke-opacity=".5"/><text x="75" y="25" text-anchor="middle" fill="#9af2fb">NON-DESTRUCTIVE</text>
|
|
28
|
-
<rect x="166" width="112" height="38" rx="19" fill="#8b5cf6" fill-opacity=".15" stroke="#a78bfa" stroke-opacity=".55"/><text x="222" y="25" text-anchor="middle" fill="#c4b5fd">LOCAL-FIRST</text>
|
|
29
|
-
<rect x="294" width="136" height="38" rx="19" fill="#f472b6" fill-opacity=".13" stroke="#f9a8d4" stroke-opacity=".5"/><text x="362" y="25" text-anchor="middle" fill="#fbcfe8">HOST-NEUTRAL</text>
|
|
30
|
-
</g>
|
|
31
|
-
</g>
|
|
32
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="360" viewBox="0 0 1200 360" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">AgentSpine</title>
|
|
3
|
+
<desc id="desc">A layered identity and memory spine for AI agents</desc>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
6
|
+
<stop stop-color="#07111f"/>
|
|
7
|
+
<stop offset="1" stop-color="#111c35"/>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
<linearGradient id="line" x1="0" y1="0" x2="0" y2="1">
|
|
10
|
+
<stop stop-color="#67e8f9"/>
|
|
11
|
+
<stop offset=".52" stop-color="#8b5cf6"/>
|
|
12
|
+
<stop offset="1" stop-color="#f472b6"/>
|
|
13
|
+
</linearGradient>
|
|
14
|
+
<filter id="glow"><feGaussianBlur stdDeviation="7" result="b"/><feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge></filter>
|
|
15
|
+
</defs>
|
|
16
|
+
<rect width="1200" height="360" rx="30" fill="url(#bg)"/>
|
|
17
|
+
<g opacity=".13" stroke="#9cc8ff"><path d="M0 64h1200M0 128h1200M0 192h1200M0 256h1200M0 320h1200"/><path d="M96 0v360M192 0v360M288 0v360M384 0v360M480 0v360M576 0v360M672 0v360M768 0v360M864 0v360M960 0v360M1056 0v360"/></g>
|
|
18
|
+
<g transform="translate(116 42)" filter="url(#glow)">
|
|
19
|
+
<path d="M74 14c-26 24-26 48 0 72s26 48 0 72-26 48 0 72 26 48 0 72" fill="none" stroke="url(#line)" stroke-width="12" stroke-linecap="round"/>
|
|
20
|
+
<path d="M74 14c26 24 26 48 0 72s-26 48 0 72 26 48 0 72-26 48 0 72" fill="none" stroke="#eef7ff" stroke-opacity=".68" stroke-width="5" stroke-linecap="round"/>
|
|
21
|
+
<g fill="#07111f" stroke="#baf5ff" stroke-width="4"><circle cx="74" cy="14" r="10"/><circle cx="74" cy="86" r="10"/><circle cx="74" cy="158" r="10"/><circle cx="74" cy="230" r="10"/><circle cx="74" cy="302" r="10"/></g>
|
|
22
|
+
</g>
|
|
23
|
+
<g fill="#f8fbff" font-family="Inter,Segoe UI,Arial,sans-serif">
|
|
24
|
+
<text x="286" y="139" font-size="76" font-weight="750" letter-spacing="-3">AgentSpine</text>
|
|
25
|
+
<text x="290" y="194" font-size="26" fill="#b9c9e5">Identity that persists. Memory that stays grounded.</text>
|
|
26
|
+
<g transform="translate(290 238)" font-size="16" font-weight="600">
|
|
27
|
+
<rect width="150" height="38" rx="19" fill="#67e8f9" fill-opacity=".13" stroke="#67e8f9" stroke-opacity=".5"/><text x="75" y="25" text-anchor="middle" fill="#9af2fb">NON-DESTRUCTIVE</text>
|
|
28
|
+
<rect x="166" width="112" height="38" rx="19" fill="#8b5cf6" fill-opacity=".15" stroke="#a78bfa" stroke-opacity=".55"/><text x="222" y="25" text-anchor="middle" fill="#c4b5fd">LOCAL-FIRST</text>
|
|
29
|
+
<rect x="294" width="136" height="38" rx="19" fill="#f472b6" fill-opacity=".13" stroke="#f9a8d4" stroke-opacity=".5"/><text x="362" y="25" text-anchor="middle" fill="#fbcfe8">HOST-NEUTRAL</text>
|
|
30
|
+
</g>
|
|
31
|
+
</g>
|
|
32
|
+
</svg>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { startMcpServer } from "../src/mcp.js";
|
|
3
|
-
|
|
4
|
-
startMcpServer();
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { startMcpServer } from "../src/mcp.js";
|
|
3
|
+
|
|
4
|
+
startMcpServer();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { run } from "../src/cli.js";
|
|
3
|
-
|
|
4
|
-
run().catch((error) => {
|
|
5
|
-
process.stderr.write(`AgentSpine: ${error.message}\n`);
|
|
6
|
-
process.exitCode = 1;
|
|
7
|
-
});
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { run } from "../src/cli.js";
|
|
3
|
+
|
|
4
|
+
run().catch((error) => {
|
|
5
|
+
process.stderr.write(`AgentSpine: ${error.message}\n`);
|
|
6
|
+
process.exitCode = 1;
|
|
7
|
+
});
|