@agent-custody/state 0.10.0 → 0.12.0

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.
@@ -70,6 +70,7 @@ export interface Options {
70
70
  github?: string;
71
71
  };
72
72
  logId?: string;
73
+ requireStrict?: boolean;
73
74
  logLeaves?: (string | {
74
75
  pruned?: string;
75
76
  hash?: string;
@@ -453,6 +453,12 @@ export async function verifyBundle(bundle, opts) {
453
453
  const p = st.predicate;
454
454
  add("issuer kind is known", p.issuer.kind === "gateway" || p.issuer.kind === "sdk", `${p.issuer.kind}${p.issuer.framework ? ` / ${p.issuer.framework}` : ""}`);
455
455
  add("issuer keyid matches signer", p.issuer.keyid === sig.keyid);
456
+ if (opts.requireStrict) {
457
+ add("strict mode in force", p.issuer.kind === "gateway" && p.issuer.strict === true, p.issuer.strict === true ? undefined : "the issuer does not say it ran in strict mode");
458
+ // under strict mode every call is precommitted; a provider read the operator ran is a lookup, not a call
459
+ const forwarded = p.execution.status === "executed" || p.execution.status === "failed" || p.execution.status === "error";
460
+ add("strict: call precommitted before forwarding", !forwarded || !!p.reconciliation || !!p.authorization, forwarded && !p.reconciliation && !p.authorization ? `the call was ${p.execution.status} with no authorization committed first` : undefined);
461
+ }
456
462
  if (p.operation) {
457
463
  add("operation observed by gateway", p.issuer.kind === "gateway" && p.operation.provenance === "observed");
458
464
  if (!p.reconciliation) {
@@ -826,7 +832,7 @@ export function formatReport(r) {
826
832
  if (!r.statement)
827
833
  return lines.join("\n");
828
834
  const p = r.statement.predicate;
829
- lines.push("", `ISSUER: ${p.issuer.kind}${p.issuer.framework ? ` (${p.issuer.framework})` : ""}, ${r.issuerNote}`, "", "field provenance value");
835
+ lines.push("", `ISSUER: ${p.issuer.kind}${p.issuer.framework ? ` (${p.issuer.framework})` : ""}${p.issuer.strict ? ", strict mode" : ""}, ${r.issuerNote}`, "", "field provenance value");
830
836
  const row = (f, prov, v) => lines.push(`${f.padEnd(15)} ${prov.padEnd(11)} ${typeof v === "string" ? v : JSON.stringify(v)}`);
831
837
  row("principal", p.principal.provenance, p.principal.id ?? "(none)");
832
838
  row("agent", p.agent.provenance, p.agent.id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-custody/state",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Governed memory for AI agents: a fact ledger with provenance, valid time, rollback, lineage, certified forget, and a store that is a JSONL file, SQLite, or Postgres, built on @agent-custody/receipts",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  "node": ">=22"
34
34
  },
35
35
  "dependencies": {
36
- "@agent-custody/receipts": "0.10.0",
36
+ "@agent-custody/receipts": "0.12.0",
37
37
  "@modelcontextprotocol/sdk": "^1.30.0",
38
38
  "zod": "^4.5.4"
39
39
  },