@agenticprimitives/devkit 0.0.0-alpha.3 → 0.0.0-alpha.31
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/README.md +50 -0
- package/bin/ap.mjs +645 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -9
- package/dist/config.js.map +1 -1
- package/dist/definitions.d.ts +85 -0
- package/dist/definitions.d.ts.map +1 -0
- package/dist/definitions.js +90 -0
- package/dist/definitions.js.map +1 -0
- package/dist/developer-mcp.d.ts +16 -0
- package/dist/developer-mcp.d.ts.map +1 -0
- package/dist/developer-mcp.js +215 -0
- package/dist/developer-mcp.js.map +1 -0
- package/dist/dispatch.d.ts +156 -0
- package/dist/dispatch.d.ts.map +1 -1
- package/dist/dispatch.js +55 -1
- package/dist/dispatch.js.map +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/lock.d.ts +4 -0
- package/dist/lock.d.ts.map +1 -1
- package/dist/lock.js +2 -1
- package/dist/lock.js.map +1 -1
- package/dist/rules/web-no-direct-mcp.d.ts.map +1 -1
- package/dist/rules/web-no-direct-mcp.js +2 -1
- package/dist/rules/web-no-direct-mcp.js.map +1 -1
- package/dist/rules-projection.d.ts.map +1 -1
- package/dist/rules-projection.js +5 -1
- package/dist/rules-projection.js.map +1 -1
- package/dist/upgrade.d.ts +10 -0
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +111 -4
- package/dist/upgrade.js.map +1 -1
- package/package.json +31 -8
- package/rules/hard-rules.md +3 -3
- package/rules/service-agent-birthrights.md +76 -0
- package/rules/vault-is-the-record-apps-hold-references.md +47 -0
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @agenticprimitives/devkit
|
|
2
2
|
|
|
3
|
+
> Part of **[Agentic Primitives](https://agenticprimitives.dev)** — the open-source trust substrate for agentic applications: identity that can sign, authority checked at act time, evidence the owner carries. [Developer kit](https://github.com/agentictrustlabs/agentic-primitives) · [All packages](https://agenticprimitives.dev/developers)
|
|
4
|
+
|
|
3
5
|
The Developer Kit core — `ap`, the CLI that is the packages' own front door (spec 398 §10, spec 399 §3, ADR-0063).
|
|
4
6
|
|
|
5
7
|
```
|
|
@@ -56,6 +58,54 @@ a consumer uses the copy bundled in the package.
|
|
|
56
58
|
`packages` is the coherent set `ap upgrade` maintains; `rules` the source digests; `doctor` the product's rule
|
|
57
59
|
config (each section replaces the reference section whole).
|
|
58
60
|
|
|
61
|
+
## Pinned definitions — `ap upgrade` stops for review (398 §10.3)
|
|
62
|
+
|
|
63
|
+
`ap upgrade --pin-definitions <registry> agentic-trust/org-steward,agentic-trust/person-steward` records, in
|
|
64
|
+
`agentic.lock.json#definitions`, each archetype definition's digest and the **authority shape** of every tool (risk,
|
|
65
|
+
action, requirement type, resource and authority args, approval policy, effects, idempotency). Every later `ap upgrade`
|
|
66
|
+
reads the registry first: a wording change is a version bump; a change to any of those fields stops the upgrade with the
|
|
67
|
+
change named per tool (`treasury.payment.execute: authorityArg payer → org`), and `--accept-definitions` re-pins once a
|
|
68
|
+
reviewer has read it. The pin is a reviewer's memory, never a verifier's input.
|
|
69
|
+
|
|
70
|
+
## The Developer MCP (`ap mcp`)
|
|
71
|
+
|
|
72
|
+
A coding agent's host spawns `ap mcp` (stdio JSON-RPC) and gets a **read-only** server: `packages_list`,
|
|
73
|
+
`package_exports` (the names each entry's `.d.ts` declares), `ontology_term` (T-box IRI, label, comment — what a term
|
|
74
|
+
means and what it is not), `contract_deployments` (addresses per chain), `recipes` (the agent rules and each
|
|
75
|
+
package's spec), `doctor` (the same report, redacted). Everything is answered from the packages installed beside it.
|
|
76
|
+
It is the **third** MCP — not the runtime's private MCP behind admission (ADR-0057), not the Home MCP (spec 397) —
|
|
77
|
+
and its `ap://developer-mcp/doctrine` resource says so first: no signing key, no vault, no authority, no production
|
|
78
|
+
effect (spec 398 §10.4, T23). Claude Code: `claude mcp add ap-dev -- npx ap mcp --root .`
|
|
79
|
+
|
|
80
|
+
## `ap generate client|cli|parity` — the fourth and fifth surfaces of one contract (398 §7.2)
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
ap generate client --registry https://<skills-registry> --definition agentic-trust/person-steward --only web.search,person.memory.remember --out src/lib/agent-client.ts
|
|
84
|
+
ap generate cli --registry … --definition agentic-trust/org-steward --only treasury.payment.execute
|
|
85
|
+
ap generate parity --registry … --definition agentic-trust/org-steward --json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Projected FROM the compiled definition (the registry's, or `--file <definition.json>`) by `@agenticprimitives/harness`'s
|
|
89
|
+
pure `generateCapabilityClient` / `cliArgumentSchema` / `generateParityCases` — the kit dispatches to the consumer's
|
|
90
|
+
install (absent ⇒ `E_MODULE_ABSENT`). The client's every operation posts an intent to the app's `/harness/run` boundary
|
|
91
|
+
through an injected port and carries no authority; the parity cases are the positive pair (screen intent vs Ask
|
|
92
|
+
sentence → the same normalized plan digest) and the negative pair (a forged `surface`, a changed party after approval).
|
|
93
|
+
Regenerate after `ap upgrade` moves a pinned definition.
|
|
94
|
+
|
|
95
|
+
## `ap eval` — cases as data against a live Home (398 §10 / P1.3)
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
ap eval evals/faithnet.eval.json --home https://www.faithnet.me --persona alice --report live-gates-reports/eval-faithnet-latest.json
|
|
99
|
+
ap eval --from-runs --home https://www.faithnet.me --persona alice --out evals/from-runs.eval.json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
A case is `{ id, incident, persona | (the --session bearer), addressee?, message, plan?, truth?, checks[] }`; a check is
|
|
103
|
+
one of the deterministic judges by name (`answered`, `replyKindIs`, `neverClaims`, `claimsRequire`, `falseEmptiness`,
|
|
104
|
+
`emptinessCarriesReason`, `evidenceFromTool`, `evidenceCountAgrees`, `noPlaceholderLeaks`, `textIncludes`,
|
|
105
|
+
`textExcludes`, `evidenceNoneFrom`). An act's correct outcome in a case is `authority_required` — the twin, as a test;
|
|
106
|
+
an eval never signs. An unrunnable case is a FAILING case. `--from-runs` turns an agent's live run records into case
|
|
107
|
+
skeletons to edit. Exit 1 on any failing case.
|
|
108
|
+
|
|
59
109
|
## What it will not do
|
|
60
110
|
|
|
61
111
|
Hold a key, read a vault, mint authority, invoke a production effect. A doctor finding is a review checkpoint;
|