@agenticprimitives/devkit 0.0.0-alpha.13 → 0.0.0-alpha.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticprimitives/devkit",
3
- "version": "0.0.0-alpha.13",
3
+ "version": "0.0.0-alpha.15",
4
4
  "description": "The Developer Kit core (spec 398 §10 / spec 399 §3): `ap doctor` runs the doctrine gates as data + pure rules over any tree, `ap doctor --rules` projects one pinned rules source into AGENTS.md / CLAUDE.md / .cursor/rules by digest, `ap upgrade` rewrites every @agenticprimitives/* pin to one coherent exact set, and `ap conform` / `ap test` dispatch to the packages that own conformance and live gates.",
5
5
  "homepage": "https://agenticprimitives.dev",
6
6
  "bugs": {
@@ -40,15 +40,15 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
- "@agenticprimitives/capability-claims": "0.0.0-alpha.28",
43
+ "@agenticprimitives/capability-claims": "0.0.0-alpha.29",
44
44
  "@agenticprimitives/mcp-protocol": "0.0.0-alpha.4"
45
45
  },
46
46
  "peerDependencies": {
47
- "@agenticprimitives/a2a": "0.0.0-alpha.28",
47
+ "@agenticprimitives/a2a": "0.0.0-alpha.30",
48
48
  "@agenticprimitives/evaluation": "0.0.0-alpha.5",
49
- "@agenticprimitives/harness": "0.0.0-alpha.10",
50
- "@agenticprimitives/orchestration": "0.0.0-alpha.9",
51
- "@agenticprimitives/provenance-node": "0.0.0-alpha.6"
49
+ "@agenticprimitives/harness": "0.0.0-alpha.11",
50
+ "@agenticprimitives/orchestration": "0.0.0-alpha.10",
51
+ "@agenticprimitives/provenance-node": "0.0.0-alpha.7"
52
52
  },
53
53
  "peerDependenciesMeta": {
54
54
  "@agenticprimitives/a2a": {
@@ -68,8 +68,8 @@
68
68
  }
69
69
  },
70
70
  "devDependencies": {
71
- "vitest": "^4.1.8",
72
- "@agenticprimitives/harness": "0.0.0-alpha.10"
71
+ "vitest": "^4.1.11",
72
+ "@agenticprimitives/harness": "0.0.0-alpha.11"
73
73
  },
74
74
  "keywords": [
75
75
  "agentic",
@@ -0,0 +1,76 @@
1
+ # A service agent is born with its storage, its door, its playbook and its harness
2
+
3
+ **Applies to every path that creates a Service Agent** (`.svc`, `.treasury`, `.workspace`, `.registry`, and any
4
+ `prov:SoftwareAgent`): the Home's "Add an agent" ceremony, `createAgentWithBirthrights`, the KMS bootstrap, the
5
+ runtime's `child-agent.create` step, and **every charter script** in a product or demo repository
6
+ (`charter-services.mjs`, `mint-workspace-persona.mjs`, `provision-naming-service.mts`, the next one).
7
+
8
+ ## One sentence
9
+
10
+ **Chartering a service agent is not finished when the account is deployed and named.** It is finished when the
11
+ agent can be asked, can record what it did, and its Home can show it — the same four birthrights every person,
12
+ organization and treasury already receive at creation, applied to services with no exception for "it is only a script".
13
+
14
+ ## Why this keeps getting re-derived
15
+
16
+ A service "works" the moment its endpoint answers. Nobody notices that nothing lands until its steward opens
17
+ Activities and reads **"No runs yet"** — after a hundred asks. It happened to `ligonier.svc` (spec 386/387: stewardship
18
+ and the vault-key ceremony had to be run by hand before `assign-org-archetype` would even work) and again to
19
+ `scripture-resolver.svc` on 2026-10-08 (chartered 2026-09-21 under `ruth.me`; no vault key, a pre-widening grant, no
20
+ playbook, its own ask loop outside the harness; Ruth's Home empty). The Home's own ceremony has the same hole: in
21
+ `createAgentWithBirthrights` the storage enable runs only for `kind === 'org'`, the content-read grant only for a
22
+ team, and the default-playbook map has no entry for a service.
23
+
24
+ Every one of those is a working system honestly enforcing a birthright nobody gave.
25
+
26
+ ## The birthrights — all four, at charter, whoever charters
27
+
28
+ | # | Birthright | What it is | Without it |
29
+ | --- | --- | --- | --- |
30
+ | 1 | **Identity + standing** | the account deployed; its typed name bought or claimed; its public records written (`atl:agentType`, `a2aEndpoint`, `atl:cardUri`, `atl:mcpEndpoint` when it serves one, `siteUrl` when it has a site); the **stewardship link** from the service to its steward recorded in the steward's vault | nobody can reach it by name; its steward's Home does not list it; "only the agent's custodian…" |
31
+ | 2 | **Storage** | the **vault key binding** (spec 278: provision + bind, signed by the custodian, ERC-1271 against the service's account) and the **standing interactions grant** to its own door (spec 322 plane B, the scope list the Home builds today) | `vault_key_unauthorized` on every read; `record_scope_denied` on every write; nothing it does can be recorded |
32
+ | 3 | **Playbook** | the archetype assignment in its vault, by definition digest (spec 354 §4.3): the default for its kind, or the one its charter names (`content-catalog` for a catalog, `treasury-steward` for a treasury, the app's own for an app) | the bare harness — a service that moves value and tells nobody (spec 360's incident) |
33
+ | 4 | **Harness** | the agent runs **the** harness, not a loop of its own: hosted by the runtime (records name its MCP; nothing to deploy) or self-hosted with the Service Host embedded (spec 433) — either way runs, receipts and `run.provenance:<runRef>` land in **its** DO and **its** vault. **A self-hosted agent also issues its READ WIRE to its steward's Home** (spec 433 W2): a delegation from the agent to the Home runtime's interactions-session key, pinned `harness.read` only, signed by the custodian the way its storage grant is (`issue-self-host-read-wire.mts`) — the Home cannot verify its own session at another host, so the steward's Activities page reads the agent's runs under the agent's own wire, or not at all | an endpoint that answers and an estate that never saw it; runs kept at a host the steward's Home is refused at ("this host admits no Home session") |
34
+
35
+ A charter that cannot complete a birthright **says so and stops**, the way the Home's org-create says "storage
36
+ not enabled — Enable (steward)". It does not deploy, name and walk away. A script that mints a key, deploys and
37
+ prints "next, at the Home: …" has handed the operator a list it should have run.
38
+
39
+ ## The pattern (for a script or a ceremony)
40
+
41
+ ```
42
+ deploy → name + records → stewardship link
43
+ → vault-key bind (278) → interactions grant (322 §2 B, current scopes)
44
+ → archetype assignment (354 §4.3, by digest)
45
+ → the harness: records name the MCP (hosted) │ the app embeds the Service Host (433)
46
+ │ + the read wire to the steward's Home (433 W2: issue-self-host-read-wire.mts)
47
+ → verify: /harness/ask on the new agent answers; its steward's Home lists it with 0 runs, not "not enabled"
48
+ ```
49
+
50
+ Each leg is idempotent and re-runnable (`is-bound`, the grant's `current`, the assignment's digest); a repair is
51
+ the same script run again. The recovery scripts that exist today — `bind-vault-key.mts`, `reissue-service-grant.mts`,
52
+ `record-service-stewardship.mts`, `assign-org-archetype.mts` — are the legs of this one ceremony, and a charter
53
+ script calls them (or their library form) rather than leaving them for later.
54
+
55
+ ## What this rule does NOT say
56
+
57
+ - It does not make a service a person. Storage for a service holds **its** records (its runs, its catalog, its
58
+ receipts) and never a client's (the runtime refuses a service that files a client's study records in its own
59
+ cabinet). A client's data lives in the client's vault, under the client's grant.
60
+ - It does not grant authority. Every birthright is a precondition of being *accountable*; none of them lets the
61
+ agent do anything a mandate would not. A service with all four still parks on a step that needs its steward's
62
+ signature.
63
+ - It does not pick the hosting shape. Hosted (default; no app) or self-hosted (an app with the Service Host) are
64
+ both allowed; a self-hosted service that runs its own loop outside the harness is not.
65
+
66
+ ## Enforcement
67
+
68
+ - Product repos: `ap doctor` rule `service-birthrights` (spec 433 W3) — a charter path that deploys a service kind
69
+ without calling every leg, or a `.svc` app that mounts an A2A surface without the Service Host, is a finding.
70
+ - The runtime: a service with no vault key binding cannot start a run (`vault_key_unauthorized`, fail closed —
71
+ already true); the Service Host refuses to start for the same reason.
72
+ - The Home (spec 433 W3): `createAgentWithBirthrights` runs legs 2 and 3 for `kind === 'service'` and every service
73
+ kind, not only `org`; the default-playbook map gains the service kinds.
74
+
75
+ Related: spec 433 · spec 354 §3 (born with a playbook) · spec 321/322 (storage at create) · spec 278 (vault key) ·
76
+ spec 346 (typed names + `atl:agentType`) · ADR-0055 (the vault is the record) · [`demo-person-org-distinct.md`](./demo-person-org-distinct.md).