@agent-custody/receipts 0.6.14 → 0.6.16

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 CHANGED
@@ -5,14 +5,14 @@ Chain of custody for AI agents: a signed receipt for every tool call, checkable
5
5
  Two producers, one receipt format, one verifier.
6
6
 
7
7
  - **The gateway** is an MCP proxy between an agent and the systems it can affect. For every tool call, allowed or denied, it checks a delegation grant signed by the human principal, gathers the facts the policy needs by calling upstream itself, evaluates a Cedar policy that fails closed, forwards the call only on allow, and emits a signed receipt appended to a Merkle transparency log.
8
- - **The SDK** is an interceptor inside the agent's own process, hooked into the framework's tool-call callbacks: Claude Code, the Claude Agent SDK, the OpenAI Agents SDK, the Vercel AI SDK, LangChain, or any function you wrap. It reaches everything the gateway cannot see and issues the same receipts, labelled as self-reported.
8
+ - **The SDK** is an interceptor inside the agent's own process, hooked into the framework's tool-call callbacks: Claude Code, the Claude Agent SDK, the OpenAI Agents SDK, the Vercel AI SDK, OpenClaw, Hermes, LangChain, or any function you wrap. It reaches everything the gateway cannot see and issues the same receipts, labelled as self-reported.
9
9
 
10
10
  Anyone holding the public keys can verify a receipt offline. The agent is not trusted. The layer around it is, and the receipt says exactly how far that trust extends, starting with who issued it.
11
11
 
12
12
  - [Reference](https://docs.agent-custody.dev/reference/): every function, endpoint, MCP tool, and command with its request and response
13
13
  - [Tutorials](docs/tutorials.md): twenty runnable examples, one per aspect of the code, all executed by the test suite
14
14
  - [Usage guide](docs/usage.md): gateway setup, wiring into Claude Desktop, Claude Code, or your own agent loop
15
- - [The interceptor SDK](docs/sdk.md): Claude Code hooks, the Claude Agent SDK, adapters for the OpenAI Agents SDK, Vercel AI SDK and LangChain, and wrapping tool functions in anything else
15
+ - [The interceptor SDK](docs/sdk.md): Claude Code hooks, the Claude Agent SDK, adapters for the OpenAI Agents SDK, Vercel AI SDK, LangChain and OpenClaw, a Hermes Agent plugin through the Python package, and wrapping tool functions in anything else
16
16
  - [Writing policies](docs/policies.md): how a tool call becomes a Cedar request, with tested examples
17
17
  - [Verifying a receipt](docs/verification.md): what each check means and what a verified receipt does and does not prove
18
18
  - [What the evidence satisfies](docs/compliance.md): the receipts, packs, and certificates mapped to SOC 2, ISO 27001, the EU AI Act, and UK GDPR, with what none of them claims
@@ -47,7 +47,7 @@ const bundle = JSON.parse(readFileSync("receipts/<id>.json", "utf8"));
47
47
  verifyBundle(bundle, { issuerKeys: [loadPublicKey("keys/app.pub")], logFile: "log.jsonl" }).ok; // true
48
48
  ```
49
49
 
50
- Framework hooks and adapters, including Claude Code, the OpenAI Agents SDK, the Vercel AI SDK and LangChain, are in [docs/sdk.md](docs/sdk.md). To enforce rather than record, put the gateway between the agent and its tools: `npx agent-custody gateway --config gateway.json`, set up in [docs/usage.md](docs/usage.md). The gateway is listed in the [MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.svayatta/agent-custody`; its entry is [server.json](server.json), published with `mcp-publisher publish` after each npm release.
50
+ Framework hooks and adapters, including Claude Code, the OpenAI Agents SDK, the Vercel AI SDK, LangChain, OpenClaw and Hermes, are in [docs/sdk.md](docs/sdk.md). To enforce rather than record, put the gateway between the agent and its tools: `npx agent-custody gateway --config gateway.json`, set up in [docs/usage.md](docs/usage.md). The gateway is listed in the [MCP Registry](https://registry.modelcontextprotocol.io/) as `io.github.svayatta/agent-custody`; its entry is [server.json](server.json), published after each npm release by running the `mcp-registry` workflow from the Actions tab (GitHub OIDC, no token).
51
51
 
52
52
  ## How it fits together
53
53
 
@@ -107,6 +107,8 @@ Every receipt names its issuer, and the verifier prints what that issuer kind is
107
107
  | OpenAI Agents SDK (JS) | SDK | `wrapTools` | `observeRunner` | a real `Runner` with a scripted model |
108
108
  | Vercel AI SDK | SDK | `wrapTools` | | a real `generateText` loop over the SDK's mock model |
109
109
  | LangChain / LangGraph (JS) | SDK | `tool(issuer.wrap(fn))` | `ReceiptCallbackHandler` | real `StructuredTool` invocations |
110
+ | OpenClaw | SDK | `registerOpenClaw` / `openclawHooks`: `before_tool_call` deny | `after_tool_call` | OpenClaw's documented hook contract, in the plugin's process |
111
+ | Hermes Agent | sidecar + [Python package](../python/README.md) | `agent_custody.hermes`: `pre_tool_call` block | `post_tool_call` | the documented hook contract, against a live sidecar |
110
112
  | anything else | SDK | `issuer.wrap(name, fn)` | `issuer.record` | plain functions |
111
113
  | Python: LangChain, OpenAI Agents SDK, CrewAI, Claude Agent SDK | sidecar + [Python package](../python/README.md) | `wrap_tools` (OpenAI Agents, CrewAI), `claude_hook` PreToolUse deny, `client.wrap` | `ReceiptCallbackHandler` | the real Python packages, receipts checked by this verifier |
112
114
  | Go, Java, Rust, any language with HTTP | sidecar | decide then record | record | [examples/languages](examples/languages), each run against a live sidecar |
package/dist/config.d.ts CHANGED
@@ -169,6 +169,10 @@ export declare const GatewayConfigSchema: z.ZodObject<{
169
169
  optional: z.ZodDefault<z.ZodBoolean>;
170
170
  }, z.core.$strip>>>;
171
171
  precommit: z.ZodDefault<z.ZodArray<z.ZodString>>;
172
+ mode: z.ZodOptional<z.ZodEnum<{
173
+ enforce: "enforce";
174
+ observe: "observe";
175
+ }>>;
172
176
  receiptsDir: z.ZodString;
173
177
  logFile: z.ZodOptional<z.ZodString>;
174
178
  log: z.ZodOptional<z.ZodObject<{
@@ -202,6 +206,10 @@ export declare const SdkConfigSchema: z.ZodObject<{
202
206
  keyFile: z.ZodString;
203
207
  }, z.core.$strip>;
204
208
  policyFile: z.ZodOptional<z.ZodString>;
209
+ mode: z.ZodOptional<z.ZodEnum<{
210
+ enforce: "enforce";
211
+ observe: "observe";
212
+ }>>;
205
213
  receiptsDir: z.ZodString;
206
214
  logFile: z.ZodOptional<z.ZodString>;
207
215
  log: z.ZodOptional<z.ZodObject<{
package/dist/config.js CHANGED
@@ -63,6 +63,13 @@ export const GatewayConfigSchema = z.object({
63
63
  * authorization to the log and refuses the call if the log will not take it. Evidence then precedes the side effect.
64
64
  */
65
65
  precommit: z.array(z.string().min(1)).default([]),
66
+ /**
67
+ * "enforce" (the default when absent) denies what the policy denies. "observe" forwards every call the grant allows and records the
68
+ * decision the policy would have made, with `enforced: false` on the receipt: the way to run a new policy against
69
+ * real traffic before turning it on. A log that refuses a consequential call's authorization does not withhold the
70
+ * call in observe mode; it is printed.
71
+ */
72
+ mode: z.enum(["enforce", "observe"]).optional(),
66
73
  receiptsDir: z.string(),
67
74
  logFile: z.string().optional(),
68
75
  log: LogSchema.optional(),
@@ -91,6 +98,8 @@ export const SdkConfigSchema = z.object({
91
98
  identity: z.object({ keyFile: z.string() }),
92
99
  /** optional Cedar policy; when present, wrapped tools and PreToolUse hooks can deny */
93
100
  policyFile: z.string().optional(),
101
+ /** "observe" records the policy's decision with `enforced: false` and never blocks; "enforce" (default) blocks a deny */
102
+ mode: z.enum(["enforce", "observe"]).optional(),
94
103
  receiptsDir: z.string(),
95
104
  logFile: z.string().optional(),
96
105
  log: LogSchema.optional(),
package/dist/gateway.js CHANGED
@@ -189,6 +189,11 @@ export async function createGatewayHost(cfg, options = {}) {
189
189
  policy = { decision: "deny", reasons: [], errors: [String(e instanceof Error ? e.message : e)], policyDigest: pDigest };
190
190
  }
191
191
  }
192
+ // Observe mode: the decision is recorded, never enforced. The receipt says so on every call, so a verifier can
193
+ // tell a policy that was being tested from one that was in force.
194
+ if (cfg.mode === "observe")
195
+ policy = { ...policy, enforced: false };
196
+ const forward = policy.decision === "allow" || policy.enforced === false;
192
197
  const head = {
193
198
  receiptId,
194
199
  timestamp,
@@ -203,18 +208,22 @@ export async function createGatewayHost(cfg, options = {}) {
203
208
  };
204
209
  if (policy.decision === "allow" && consequential(tool)) {
205
210
  // A consequential call is committed to the log before it goes out, so that evidence of the side effect exists
206
- // before the side effect does. If the log will not take the authorization, the call is not forwarded.
211
+ // before the side effect does. If the log will not take the authorization, the call is not forwarded; in
212
+ // observe mode nothing is withheld, and the missing authorization is printed instead.
207
213
  try {
208
214
  authorization = await issuer.authorize({ ...head, policy: { ...policy, provenance: "observed" } });
209
215
  }
210
216
  catch (e) {
211
- execution = { status: "withheld", reason: `the log did not commit the authorization, so the call was not forwarded: ${String(e instanceof Error ? e.message : e)}`, provenance: "observed" };
217
+ if (cfg.mode === "observe")
218
+ console.error(`agent-custody gateway (observe mode): the log did not commit the authorization for ${tool}, receipt ${receiptId}; the call was forwarded without it: ${String(e instanceof Error ? e.message : e)}`);
219
+ else
220
+ execution = { status: "withheld", reason: `the log did not commit the authorization, so the call was not forwarded: ${String(e instanceof Error ? e.message : e)}`, provenance: "observed" };
212
221
  }
213
222
  }
214
223
  if (execution) {
215
224
  // withheld: nothing was forwarded
216
225
  }
217
- else if (policy.decision === "allow") {
226
+ else if (forward) {
218
227
  try {
219
228
  // The upstream learns which receipt this call is, and who the grant says is calling. An upstream that keeps
220
229
  // state, such as the memory server, cites the receipt as the source of what it stores.
package/dist/policy.d.ts CHANGED
@@ -5,6 +5,8 @@ export interface PolicyDecision {
5
5
  /** evaluation errors; non-empty always yields deny */
6
6
  errors: string[];
7
7
  policyDigest: string;
8
+ /** false when the issuer ran in observe mode: the decision was recorded but a deny was not enforced. Absent means enforced. */
9
+ enforced?: boolean;
8
10
  }
9
11
  export interface PolicyRequest {
10
12
  agentId: string;
@@ -1,6 +1,6 @@
1
1
  // Adapter for Claude Code hooks (command hooks over stdin/stdout) and the Claude Agent SDK (in-process hooks).
2
2
  // Both use the same input and output JSON, so one handler serves both.
3
- import { createSdkIssuer, receiptIdOf } from "./index.js";
3
+ import { createSdkIssuer, receiptIdOf, denies } from "./index.js";
4
4
  function toEvent(input) {
5
5
  const raw = input.tool_input;
6
6
  const args = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : { input: raw ?? null };
@@ -16,7 +16,7 @@ export async function handleHookEvent(issuer, input) {
16
16
  switch (input.hook_event_name) {
17
17
  case "PreToolUse": {
18
18
  const policy = issuer.decide(ev);
19
- if (policy && policy.decision === "deny") {
19
+ if (denies(policy)) {
20
20
  const reason = [...policy.reasons, ...policy.errors].join("; ") || "no permit policy matched";
21
21
  const bundle = await issuer.record(ev, { status: "denied", reason }, policy);
22
22
  return {
@@ -34,6 +34,10 @@ export interface SdkIssuer {
34
34
  /** Wraps a tool function: decide, run, record. Throws PolicyDeniedError on deny, after issuing the denial receipt. */
35
35
  wrap<A extends Record<string, unknown>, R>(tool: string, fn: (args: A) => R | Promise<R>, meta?: Omit<ToolEvent, "tool" | "args">): (args: A) => Promise<R>;
36
36
  }
37
+ /** True when a decision is a deny that must be enforced: a deny made in observe mode (`enforced: false`) is recorded, not acted on. */
38
+ export declare function denies(policy: PolicyDecision | null | undefined): policy is PolicyDecision & {
39
+ decision: "deny";
40
+ };
37
41
  export declare class PolicyDeniedError extends Error {
38
42
  readonly tool: string;
39
43
  readonly reason: string;
package/dist/sdk/index.js CHANGED
@@ -8,6 +8,10 @@ import { openExporter } from "../otel.js";
8
8
  import { openLog } from "../log-sink.js";
9
9
  import { evaluate } from "../policy.js";
10
10
  export const SDK_VERSION = "0.1.0";
11
+ /** True when a decision is a deny that must be enforced: a deny made in observe mode (`enforced: false`) is recorded, not acted on. */
12
+ export function denies(policy) {
13
+ return !!policy && policy.decision === "deny" && policy.enforced !== false;
14
+ }
11
15
  export class PolicyDeniedError extends Error {
12
16
  tool;
13
17
  reason;
@@ -24,7 +28,12 @@ export function createSdkIssuer(cfg) {
24
28
  const key = loadPrivateKey(cfg.identity.keyFile);
25
29
  const issuer = createIssuer(key, cfg.receiptsDir, openLog(cfg, key), { exporter: openExporter(cfg) });
26
30
  const policyText = cfg.policyFile ? readFileSync(cfg.policyFile, "utf8") : null;
27
- const decide = (ev) => policyText === null ? null : evaluate(policyText, { agentId: cfg.agentId, tool: ev.tool, context: { args: ev.args, facts: {} } });
31
+ const decide = (ev) => {
32
+ if (policyText === null)
33
+ return null;
34
+ const d = evaluate(policyText, { agentId: cfg.agentId, tool: ev.tool, context: { args: ev.args, facts: {} } });
35
+ return cfg.mode === "observe" ? { ...d, enforced: false } : d;
36
+ };
28
37
  function record(ev, outcome, policy = null) {
29
38
  const execution = outcome.status === "denied"
30
39
  ? { status: "denied", reason: outcome.reason, provenance: "claimed" }
@@ -56,7 +65,7 @@ export function createSdkIssuer(cfg) {
56
65
  return async (args) => {
57
66
  const ev = { tool, args, ...meta };
58
67
  const policy = decide(ev);
59
- if (policy && policy.decision === "deny") {
68
+ if (denies(policy)) {
60
69
  const reason = [...policy.reasons, ...policy.errors].join("; ") || "no permit policy matched";
61
70
  const bundle = await record(ev, { status: "denied", reason }, policy);
62
71
  throw new PolicyDeniedError(tool, reason, receiptIdOf(bundle));
@@ -4,7 +4,7 @@
4
4
  // observeRunner: receipts only, from the runner's agent_tool_start / agent_tool_end events. Cannot block, so it
5
5
  // evaluates no policy. Use one or the other per tool, not both.
6
6
  // Typed structurally so this file does not import the package.
7
- import { receiptIdOf } from "./index.js";
7
+ import { receiptIdOf, denies } from "./index.js";
8
8
  function parseArgs(input) {
9
9
  if (!input)
10
10
  return {};
@@ -31,7 +31,7 @@ export function wrapTools(issuer, tools) {
31
31
  const invoke = async (ctx, input, details) => {
32
32
  const ev = { tool: t.name, args: parseArgs(input), session: { id: null, toolUseId: details?.toolCall?.callId ?? null } };
33
33
  const policy = issuer.decide(ev);
34
- if (policy && policy.decision === "deny") {
34
+ if (denies(policy)) {
35
35
  const reason = [...policy.reasons, ...policy.errors].join("; ") || "no permit policy matched";
36
36
  const bundle = await issuer.record(ev, { status: "denied", reason }, policy);
37
37
  return `Denied by policy: ${reason} (receipt ${receiptIdOf(bundle)})`;
@@ -0,0 +1,50 @@
1
+ import { type SdkIssuer } from "./index.ts";
2
+ /** What OpenClaw passes as the hook context (PluginHookToolContext), the fields this adapter reads. */
3
+ export interface OpenClawToolContext {
4
+ agentId?: string;
5
+ sessionKey?: string;
6
+ sessionId?: string;
7
+ runId?: string;
8
+ toolName?: string;
9
+ toolCallId?: string;
10
+ [k: string]: unknown;
11
+ }
12
+ /** PluginHookBeforeToolCallEvent */
13
+ export interface OpenClawBeforeToolCallEvent {
14
+ toolName: string;
15
+ params: Record<string, unknown>;
16
+ runId?: string;
17
+ toolCallId?: string;
18
+ [k: string]: unknown;
19
+ }
20
+ /** PluginHookAfterToolCallEvent */
21
+ export interface OpenClawAfterToolCallEvent {
22
+ toolName: string;
23
+ params: Record<string, unknown>;
24
+ runId?: string;
25
+ toolCallId?: string;
26
+ result?: unknown;
27
+ error?: string;
28
+ durationMs?: number;
29
+ [k: string]: unknown;
30
+ }
31
+ /** The part of PluginHookBeforeToolCallResult this adapter produces. */
32
+ export interface OpenClawBeforeToolCallResult {
33
+ block: true;
34
+ blockReason: string;
35
+ }
36
+ /**
37
+ * The two handlers. `before_tool_call` evaluates the policy: on deny it issues a denial receipt and blocks with the
38
+ * reason and the receipt id, which OpenClaw shows the model as the tool's result; on allow, or with no policy, it
39
+ * returns nothing, so OpenClaw's own approvals and other plugins still apply. It never auto-approves. If the receipt
40
+ * cannot be issued (the log refused it) the call is blocked too: nothing runs without evidence. `after_tool_call`
41
+ * issues the receipt for the completed or failed call; a refused leaf is thrown, which OpenClaw logs.
42
+ */
43
+ export declare function openclawHooks(issuer: SdkIssuer): {
44
+ before_tool_call: (event: OpenClawBeforeToolCallEvent, ctx?: OpenClawToolContext) => Promise<OpenClawBeforeToolCallResult | undefined>;
45
+ after_tool_call: (event: OpenClawAfterToolCallEvent, ctx?: OpenClawToolContext) => Promise<void>;
46
+ };
47
+ /** Registers both hooks on a plugin api (`api.on(name, handler)`), for a plugin's `register(api)`. */
48
+ export declare function registerOpenClaw(api: {
49
+ on: (name: string, handler: (event: any, ctx?: any) => unknown) => unknown;
50
+ }, issuer: SdkIssuer): void;
@@ -0,0 +1,52 @@
1
+ // Adapter for OpenClaw plugin hooks. OpenClaw runs plugins in the agent's own process and offers two tool hooks:
2
+ // `before_tool_call`, which may block a call with a reason the model sees, and `after_tool_call`, which carries the
3
+ // result or the error. Both are awaited. This file mirrors OpenClaw's typed hook contract (src/plugins/hook-types.ts)
4
+ // loosely, on purpose, so it does not depend on the openclaw package; a plugin entry wires it with `api.on`.
5
+ //
6
+ // import { definePluginEntry } from "openclaw/plugin-sdk/plugin-sdk";
7
+ // import { createSdkIssuer, loadSdkConfig } from "@agent-custody/receipts";
8
+ // import { registerOpenClaw } from "@agent-custody/receipts/sdk/openclaw";
9
+ // export default definePluginEntry({ id: "agent-custody", name: "agent-custody", description: "A receipt for every tool call",
10
+ // register(api) { registerOpenClaw(api, createSdkIssuer(loadSdkConfig(process.env.AGENT_CUSTODY_CONFIG!))); } });
11
+ import { denies, receiptIdOf } from "./index.js";
12
+ function toEvent(event, ctx) {
13
+ const raw = event.params;
14
+ const args = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : { input: raw ?? null };
15
+ return { tool: event.toolName, args, session: { id: ctx?.sessionId ?? ctx?.sessionKey ?? null, toolUseId: event.toolCallId ?? ctx?.toolCallId ?? null } };
16
+ }
17
+ /**
18
+ * The two handlers. `before_tool_call` evaluates the policy: on deny it issues a denial receipt and blocks with the
19
+ * reason and the receipt id, which OpenClaw shows the model as the tool's result; on allow, or with no policy, it
20
+ * returns nothing, so OpenClaw's own approvals and other plugins still apply. It never auto-approves. If the receipt
21
+ * cannot be issued (the log refused it) the call is blocked too: nothing runs without evidence. `after_tool_call`
22
+ * issues the receipt for the completed or failed call; a refused leaf is thrown, which OpenClaw logs.
23
+ */
24
+ export function openclawHooks(issuer) {
25
+ return {
26
+ before_tool_call: async (event, ctx) => {
27
+ const ev = toEvent(event, ctx);
28
+ const policy = issuer.decide(ev);
29
+ if (!denies(policy))
30
+ return undefined;
31
+ const reason = [...policy.reasons, ...policy.errors].join("; ") || "no permit policy matched";
32
+ try {
33
+ const bundle = await issuer.record(ev, { status: "denied", reason }, policy);
34
+ return { block: true, blockReason: `agent-custody: ${reason} (receipt ${receiptIdOf(bundle)})` };
35
+ }
36
+ catch (e) {
37
+ return { block: true, blockReason: `agent-custody: ${reason}; the denial receipt could not be issued (${e instanceof Error ? e.message : String(e)})` };
38
+ }
39
+ },
40
+ after_tool_call: async (event, ctx) => {
41
+ const ev = toEvent(event, ctx);
42
+ const outcome = event.error !== undefined ? { status: "failed", result: event.error } : { status: "executed", result: event.result ?? null };
43
+ await issuer.record(ev, outcome, issuer.decide(ev));
44
+ },
45
+ };
46
+ }
47
+ /** Registers both hooks on a plugin api (`api.on(name, handler)`), for a plugin's `register(api)`. */
48
+ export function registerOpenClaw(api, issuer) {
49
+ const hooks = openclawHooks(issuer);
50
+ api.on("before_tool_call", hooks.before_tool_call);
51
+ api.on("after_tool_call", hooks.after_tool_call);
52
+ }
@@ -1,6 +1,6 @@
1
1
  // Vercel AI SDK adapter: wraps every tool's execute() in a ToolSet. Decides, runs, records.
2
2
  // Typed structurally so this file does not import the `ai` package.
3
- import { PolicyDeniedError, receiptIdOf } from "./index.js";
3
+ import { PolicyDeniedError, receiptIdOf, denies } from "./index.js";
4
4
  /** Returns a new ToolSet. Tools without execute (client-side or provider-executed) pass through unchanged. */
5
5
  export function wrapTools(issuer, tools) {
6
6
  const out = {};
@@ -14,7 +14,7 @@ export function wrapTools(issuer, tools) {
14
14
  const args = input && typeof input === "object" && !Array.isArray(input) ? input : { input };
15
15
  const ev = { tool: name, args, session: { id: null, toolUseId: options?.toolCallId ?? null } };
16
16
  const policy = issuer.decide(ev);
17
- if (policy && policy.decision === "deny") {
17
+ if (denies(policy)) {
18
18
  const reason = [...policy.reasons, ...policy.errors].join("; ") || "no permit policy matched";
19
19
  const bundle = await issuer.record(ev, { status: "denied", reason }, policy);
20
20
  throw new PolicyDeniedError(name, reason, receiptIdOf(bundle));
package/dist/sidecar.js CHANGED
@@ -37,7 +37,7 @@ function parsePolicy(v) {
37
37
  return null;
38
38
  if (!isRecord(v) || (v.decision !== "allow" && v.decision !== "deny") || !Array.isArray(v.reasons) || !Array.isArray(v.errors) || typeof v.policyDigest !== "string")
39
39
  throw new Error("policy must be a PolicyDecision from /decide");
40
- return { decision: v.decision, reasons: v.reasons.map(String), errors: v.errors.map(String), policyDigest: v.policyDigest };
40
+ return { decision: v.decision, reasons: v.reasons.map(String), errors: v.errors.map(String), policyDigest: v.policyDigest, ...(typeof v.enforced === "boolean" ? { enforced: v.enforced } : {}) };
41
41
  }
42
42
  export function sidecarHandler(issuer) {
43
43
  return async (req, res) => {
package/dist/verify.js CHANGED
@@ -64,8 +64,9 @@ export function verifyBundle(bundle, opts) {
64
64
  }
65
65
  }
66
66
  if (p.policy) {
67
- const consistent = p.policy.decision === "allow" ? p.execution.status !== "denied" : p.execution.status === "denied";
68
- add("policy decision consistent with execution", consistent, `${p.policy.decision} -> ${p.execution.status}`);
67
+ // a deny that was not enforced (observe mode, enforced: false on the receipt) may sit beside an executed call; an enforced one never does
68
+ const consistent = p.policy.decision === "allow" ? p.execution.status !== "denied" : p.policy.enforced === false ? p.execution.status !== "denied" : p.execution.status === "denied";
69
+ add("policy decision consistent with execution", consistent, `${p.policy.decision}${p.policy.enforced === false ? " (observe mode, not enforced)" : ""} -> ${p.execution.status}`);
69
70
  add("no policy errors on an allow", !(p.policy.decision === "allow" && p.policy.errors.length > 0));
70
71
  }
71
72
  const logKeys = opts.logKeys ?? [];
@@ -174,7 +175,7 @@ export function formatReport(r) {
174
175
  for (const [k, f] of Object.entries(p.facts))
175
176
  row(`fact.${k}`, f.provenance, f.value);
176
177
  if (p.policy)
177
- row("policy", p.policy.provenance, `${p.policy.decision} [${p.policy.reasons.join(",")}] policy ${short(p.policy.policyDigest)}`);
178
+ row("policy", p.policy.provenance, `${p.policy.decision}${p.policy.enforced === false ? " (observe mode, not enforced)" : ""} [${p.policy.reasons.join(",")}] policy ${short(p.policy.policyDigest)}`);
178
179
  else
179
180
  row("policy", "-", "(none evaluated)");
180
181
  if (p.consumed)
package/docs/sdk.md CHANGED
@@ -34,6 +34,8 @@ Use the SDK for reach. Use the gateway for anything that moves money, touches pr
34
34
 
35
35
  Policies see `context.args` and an empty `context.facts`. A policy that reads `context.facts` or `context.grant` errors, which is a deny. That is intended: an SDK policy cannot pretend it checked something outside the agent's process.
36
36
 
37
+ `"mode": "observe"` in the SDK config records the policy's decision without acting on it: `decide` returns it with `enforced: false`, `wrap` runs the function on a deny and records it as executed, and every hook adapter below returns no block. Run a policy that way first, read the receipts that say "would have been denied", then remove the line.
38
+
37
39
  ## Claude Code
38
40
 
39
41
  Register the hook command in `.claude/settings.json`. The same command handles all three events.
@@ -130,6 +132,35 @@ const refund = tool(issuer.wrap("stripe.refund", fn), { name: "stripe.refund", s
130
132
 
131
133
  LangChain callbacks cannot block a tool, so the handler evaluates no policy; it records what happened, including the `tool_call_id` when one is present, and unwraps `ToolMessage` outputs. For enforcement wrap the function at construction. Do not do both on one tool or it will be recorded twice.
132
134
 
135
+ ## OpenClaw
136
+
137
+ [src/sdk/openclaw.ts](../src/sdk/openclaw.ts). OpenClaw runs plugins in the agent's process and awaits two tool hooks: `before_tool_call`, which can block a call with a reason the model sees, and `after_tool_call`, which carries the result or the error. A plugin is three files: `package.json` with `"openclaw": { "extensions": ["./index.ts"] }`, `openclaw.plugin.json`, and the entry:
138
+
139
+ ```ts
140
+ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-sdk";
141
+ import { createSdkIssuer, loadSdkConfig } from "@agent-custody/receipts";
142
+ import { registerOpenClaw } from "@agent-custody/receipts/sdk/openclaw";
143
+
144
+ export default definePluginEntry({
145
+ id: "agent-custody",
146
+ name: "agent-custody",
147
+ description: "A signed receipt for every tool call; a policy can deny one before it runs",
148
+ register(api) {
149
+ registerOpenClaw(api, createSdkIssuer(loadSdkConfig(process.env.AGENT_CUSTODY_CONFIG ?? "./sdk.json")));
150
+ },
151
+ });
152
+ ```
153
+
154
+ ```json
155
+ { "id": "agent-custody", "name": "agent-custody", "activation": { "onStartup": true }, "configSchema": { "type": "object", "additionalProperties": false } }
156
+ ```
157
+
158
+ Then `openclaw plugins install --link ./agent-custody-plugin && openclaw plugins enable agent-custody`. `before_tool_call` evaluates the policy: on deny it issues a denial receipt and returns `{ block: true, blockReason: "agent-custody: … (receipt <id>)" }`; on allow, or with no policy, it returns nothing, so OpenClaw's own approvals and other plugins still apply. It never auto-approves, and if the denial receipt cannot be issued the call is blocked all the same. `after_tool_call` issues the receipt for the executed or failed call, with OpenClaw's `sessionId` and `toolCallId` as the receipt's session. `openclawHooks(issuer)` returns the two handlers for a plugin that registers them itself. Typed loosely on purpose, mirroring OpenClaw's `hook-types.ts`, so the package does not depend on `openclaw`; exercised against that contract in [example 21](../examples/21-openclaw.ts) and the test.
159
+
160
+ ## Hermes Agent
161
+
162
+ [packages/python/agent_custody/hermes.py](../../python/agent_custody/hermes.py), through the sidecar like every Python adapter. Hermes runs Python plugins in the agent's process and fires `pre_tool_call(tool_name, args, task_id, **kwargs)`, which may return `{"action": "block", "message": …}`, and `post_tool_call(tool_name, args, result, task_id, duration_ms, **kwargs)`. The plugin is the directory [packages/python/hermes-plugin](../../python/hermes-plugin/): a `plugin.yaml` declaring both hooks and a `sidecar_url` setting, and an `__init__.py` that is one line, `from agent_custody.hermes import register`. Copy it to `~/.hermes/plugins/agent-custody/`, `pip install agent-custody`, start the sidecar, `hermes plugins enable agent-custody`. A denied call is blocked before it runs with the receipt id in the message; an allowed one gets no action, so Hermes's own guardrails and approvals still apply; every completed call is recorded with the Hermes `task_id` as the receipt's session. `hermes_hooks(client)` returns the two callables; `register_hermes(ctx, client)` registers them on a plugin context.
163
+
133
164
  ## Any other framework: wrap the function
134
165
 
135
166
  Every agent framework ends up calling a function. Wrap it.
package/docs/tutorials.md CHANGED
@@ -30,6 +30,7 @@ Suggested reading order is the numbering. Output lands in `examples-out/`, which
30
30
  | 18 | OpenTelemetry export | [18-opentelemetry.ts](../examples/18-opentelemetry.ts) | a stand-in OTLP collector, `otel` in the config, one span per receipt with the receipt id as trace id, the collector going away and the next receipt still issued | `src/otel.ts`, `src/issue.ts` |
31
31
  | 19 | Splunk export | [19-splunk.ts](../examples/19-splunk.ts) | a stand-in HTTP Event Collector, `splunk` in the config with the token from the environment, one event per receipt with the receipt id and log position as fields, the collector going away and the next receipt still issued | `src/splunk.ts`, `src/otel.ts` |
32
32
  | 20 | one gateway for many agents, over HTTP | [20-http-gateway.ts](../examples/20-http-gateway.ts) | a gateway host served over Streamable HTTP, two agents connecting with their own grants and seeing their own tools, receipts naming the right agent, a refusal by grant, and a stranger's grant getting no session | `src/gateway-http.ts`, `src/gateway.ts` |
33
+ | 21 | OpenClaw plugin hooks | [21-openclaw.ts](../examples/21-openclaw.ts) | the two hooks driven with OpenClaw's event shapes: an allowed call gets no result, a denied one is blocked with the receipt id, executed and failed calls are recorded, every receipt verifies | `src/sdk/openclaw.ts` |
33
34
 
34
35
  ## How policies are defined, in one paragraph
35
36
 
package/docs/usage.md CHANGED
@@ -115,6 +115,8 @@ Exactly one of the two. The bearer token comes from the named environment variab
115
115
 
116
116
  `facts` tells the gateway which upstream tool to call before evaluating policy for a given tool. `$args.<key>` copies a value from the intercepted call. The result appears in Cedar as `context.facts.<name>` and in the receipt with its own digest, labelled `observed`. If a fact lookup fails, the call is denied and the receipt says why. A lookup with `"optional": true` is skipped when a `$args.<key>` it needs is absent from the call, and the fact is then simply not present, which a policy tests with `context.facts has <name>`; this is how a policy sees the fact a `memory.write` is about to supersede without denying every write that supersedes nothing.
117
117
 
118
+ `mode` is `"enforce"` by default. Set it to `"observe"` to run a new policy against real traffic before turning it on: every call the grant allows is forwarded, the decision the policy would have made is recorded on the receipt with `enforced: false`, and nothing is withheld. The verifier accepts such a receipt and names the mode; strip the flag and the same receipt fails. Switch to `"enforce"` when the receipts stop saying "would have been denied" for calls you meant to allow.
119
+
118
120
  `precommit` names the consequential tools, or `["*"]` for all of them. For every other tool the gateway forwards the call and then records it, so if the log is unreachable at that moment the side effect exists before its evidence does. For a tool in `precommit` the gateway first signs an authorization statement, everything the receipt will say except the outcome, and appends it to the log. Only if the log took it does the call go upstream. The receipt then embeds that authorization with its own inclusion proof, and a verifier checks that it names this call and sits in the log before the receipt does. If the log will not take it, the call is not forwarded, the agent is told `Not executed`, and the receipt records `execution.status: "withheld"` with the policy's `allow` beside it. The authorization is also written on its own as `receipts/<receiptId>.authorization.json`, which is the evidence that survives if the gateway dies between forwarding and the receipt. Use it for money, for anything irreversible, and for anything a counterparty could later dispute; the cost is one extra log append per call.
119
121
 
120
122
  **5. Run the gateway.** It speaks MCP on stdin/stdout and logs to stderr only.
@@ -76,7 +76,7 @@ execution observed executed
76
76
  | executed tool within delegated scope | if the tool ran, the grant covered it. Denied calls pass this check by construction | a gateway that forwarded out of scope |
77
77
  | principal is claimed, not attested | SDK receipts only: there is no delegation, so the principal is a config string and is labelled as such | an SDK receipt pretending to an attested principal |
78
78
  | request args digest | the args in the predicate hash to the digest in the subject | edited arguments |
79
- | policy decision consistent with execution | allow went with executed or failed; deny went with denied. Skipped when no policy was evaluated | an issuer that executed after a deny |
79
+ | policy decision consistent with execution | allow went with executed or failed; an enforced deny went with denied; a deny carrying `enforced: false` (observe mode) went with anything but denied, and the detail says "observe mode, not enforced". Skipped when no policy was evaluated | an issuer that executed after a deny |
80
80
  | no policy errors on an allow | an allow was not produced while Cedar reported errors | broken fail-closed behaviour |
81
81
  | authorization signature (issuer key) | pre-commit receipts only: the embedded authorization statement was signed by the same issuer key as the receipt | an authorization from another gateway, or none the issuer signed |
82
82
  | authorization names this call | the committed authorization names this receipt id, tool, argument digest, agent, and principal, and recorded an allow | an authorization spliced in from a different call |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-custody/receipts",
3
- "version": "0.6.14",
3
+ "version": "0.6.16",
4
4
  "mcpName": "io.github.svayatta/agent-custody",
5
5
  "description": "Chain of custody for AI agents: signed, independently verifiable receipts for tool calls. MCP gateway + Cedar policy + Merkle transparency log",
6
6
  "license": "Apache-2.0",
@@ -41,6 +41,10 @@
41
41
  "types": "./dist/sdk/langchain.d.ts",
42
42
  "default": "./dist/sdk/langchain.js"
43
43
  },
44
+ "./sdk/openclaw": {
45
+ "types": "./dist/sdk/openclaw.d.ts",
46
+ "default": "./dist/sdk/openclaw.js"
47
+ },
44
48
  "./cli": {
45
49
  "types": "./dist/cli.d.ts",
46
50
  "default": "./dist/cli.js"
@@ -7,26 +7,26 @@
7
7
  "description": "The tree head from the first remote receipt and the log's later head, with the proof the log served.",
8
8
  "older": {
9
9
  "payloadType": "application/vnd.agent-custody.treehead+json",
10
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiODdiZTMxNDY1OTU2MDYyZmFiY2FiMTNhMzdiZWE2NDYwZTgwZDVkODU4YTU1ZDhiMzkzNTA2NGNlY2YwN2NjNiIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjZUMTc6NTE6MjYuNTQ0WiIsInRyZWVTaXplIjoxfQ==",
10
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMjk5NmQ2ZmU5MGQ2YmI5YmIwMzEyYmEyZWExMTk2YzkyZDE2Mjk1N2Q4OTRiYWM2NTQ4NDkwOTFmYWQ2Y2FiOSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjhUMTY6MTQ6MzIuNDQzWiIsInRyZWVTaXplIjoxfQ==",
11
11
  "signatures": [
12
12
  {
13
- "keyid": "27e4e80dbd49e866f4e30d5d7d172c0b4b9d130e1ef74420a2cb8f22e0e549ba",
14
- "sig": "Jvyh0cZC04MAmBqCsZtcq3Qh2OQP5ly0TIIlxtcqmy+QdLfoNGbxOyksEZ3D1yITFualDWNgOB/V4hk9Ii9KBw=="
13
+ "keyid": "54ce521545c24dbfbfa478f75821466ba15a1cb3ec3f1b639242f706ecb2a918",
14
+ "sig": "nQERFI1dOltqOe+5V4deEY1rkA5H4AXM6T7WcJd2zCLJ/q5untcdquhCskYa3U8bkXD7iIpmvXGWt7Az5V1qDA=="
15
15
  }
16
16
  ]
17
17
  },
18
18
  "newer": {
19
19
  "payloadType": "application/vnd.agent-custody.treehead+json",
20
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNWZhYjAwZGM4NzVkY2ExZjAzMGRhZGMwYWE0MjQyN2Q5YWRmYjhhOThlZTA1OWIyYWEyMDljODEzMzg0MDc1ZSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjZUMTc6NTE6MjYuNTQ5WiIsInRyZWVTaXplIjoyfQ==",
20
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiZGVhNTg3OGViYzdjODg4NGNlYWJmOTE1NTQ4NTA0ZmJiNzk2MTcxMjliNmU0MDE0MGEyYWVlZWViZjY1ODUwZSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjhUMTY6MTQ6MzIuNDQ3WiIsInRyZWVTaXplIjoyfQ==",
21
21
  "signatures": [
22
22
  {
23
- "keyid": "27e4e80dbd49e866f4e30d5d7d172c0b4b9d130e1ef74420a2cb8f22e0e549ba",
24
- "sig": "D5gGBJGgZ3vgx/lUTabGLpQZVLQL52nXrHThWOolNJD7THa+oiItUAqVGKRFZl0iZog8zEwMC2yily+xz6yeDg=="
23
+ "keyid": "54ce521545c24dbfbfa478f75821466ba15a1cb3ec3f1b639242f706ecb2a918",
24
+ "sig": "tFOaFh+RwpFtTR+g0cxKKvHrwmnfnHNsOkFHjhRH5HyZKdFct435JYlzhKO2M2WRvOgYzFIOyJm1vVqsRLcOCw=="
25
25
  }
26
26
  ]
27
27
  },
28
28
  "proof": [
29
- "3d549ac46dd00f77add2766bc8eddd5cddd4028c2c158667759a78ac8003f561"
29
+ "1835eb9e73e9c76ac7b734cbbaf67cdc2fa8cbf85155d92bb648f6901ba049aa"
30
30
  ],
31
31
  "keys": [
32
32
  "log"
@@ -41,26 +41,26 @@
41
41
  "description": "The same heads the wrong way round.",
42
42
  "older": {
43
43
  "payloadType": "application/vnd.agent-custody.treehead+json",
44
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNWZhYjAwZGM4NzVkY2ExZjAzMGRhZGMwYWE0MjQyN2Q5YWRmYjhhOThlZTA1OWIyYWEyMDljODEzMzg0MDc1ZSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjZUMTc6NTE6MjYuNTQ5WiIsInRyZWVTaXplIjoyfQ==",
44
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiZGVhNTg3OGViYzdjODg4NGNlYWJmOTE1NTQ4NTA0ZmJiNzk2MTcxMjliNmU0MDE0MGEyYWVlZWViZjY1ODUwZSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjhUMTY6MTQ6MzIuNDQ3WiIsInRyZWVTaXplIjoyfQ==",
45
45
  "signatures": [
46
46
  {
47
- "keyid": "27e4e80dbd49e866f4e30d5d7d172c0b4b9d130e1ef74420a2cb8f22e0e549ba",
48
- "sig": "D5gGBJGgZ3vgx/lUTabGLpQZVLQL52nXrHThWOolNJD7THa+oiItUAqVGKRFZl0iZog8zEwMC2yily+xz6yeDg=="
47
+ "keyid": "54ce521545c24dbfbfa478f75821466ba15a1cb3ec3f1b639242f706ecb2a918",
48
+ "sig": "tFOaFh+RwpFtTR+g0cxKKvHrwmnfnHNsOkFHjhRH5HyZKdFct435JYlzhKO2M2WRvOgYzFIOyJm1vVqsRLcOCw=="
49
49
  }
50
50
  ]
51
51
  },
52
52
  "newer": {
53
53
  "payloadType": "application/vnd.agent-custody.treehead+json",
54
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiODdiZTMxNDY1OTU2MDYyZmFiY2FiMTNhMzdiZWE2NDYwZTgwZDVkODU4YTU1ZDhiMzkzNTA2NGNlY2YwN2NjNiIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjZUMTc6NTE6MjYuNTQ0WiIsInRyZWVTaXplIjoxfQ==",
54
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMjk5NmQ2ZmU5MGQ2YmI5YmIwMzEyYmEyZWExMTk2YzkyZDE2Mjk1N2Q4OTRiYWM2NTQ4NDkwOTFmYWQ2Y2FiOSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjhUMTY6MTQ6MzIuNDQzWiIsInRyZWVTaXplIjoxfQ==",
55
55
  "signatures": [
56
56
  {
57
- "keyid": "27e4e80dbd49e866f4e30d5d7d172c0b4b9d130e1ef74420a2cb8f22e0e549ba",
58
- "sig": "Jvyh0cZC04MAmBqCsZtcq3Qh2OQP5ly0TIIlxtcqmy+QdLfoNGbxOyksEZ3D1yITFualDWNgOB/V4hk9Ii9KBw=="
57
+ "keyid": "54ce521545c24dbfbfa478f75821466ba15a1cb3ec3f1b639242f706ecb2a918",
58
+ "sig": "nQERFI1dOltqOe+5V4deEY1rkA5H4AXM6T7WcJd2zCLJ/q5untcdquhCskYa3U8bkXD7iIpmvXGWt7Az5V1qDA=="
59
59
  }
60
60
  ]
61
61
  },
62
62
  "proof": [
63
- "3d549ac46dd00f77add2766bc8eddd5cddd4028c2c158667759a78ac8003f561"
63
+ "1835eb9e73e9c76ac7b734cbbaf67cdc2fa8cbf85155d92bb648f6901ba049aa"
64
64
  ],
65
65
  "keys": [
66
66
  "log"
@@ -77,26 +77,26 @@
77
77
  "description": "Tree heads checked against the app key, which did not sign them.",
78
78
  "older": {
79
79
  "payloadType": "application/vnd.agent-custody.treehead+json",
80
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiODdiZTMxNDY1OTU2MDYyZmFiY2FiMTNhMzdiZWE2NDYwZTgwZDVkODU4YTU1ZDhiMzkzNTA2NGNlY2YwN2NjNiIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjZUMTc6NTE6MjYuNTQ0WiIsInRyZWVTaXplIjoxfQ==",
80
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMjk5NmQ2ZmU5MGQ2YmI5YmIwMzEyYmEyZWExMTk2YzkyZDE2Mjk1N2Q4OTRiYWM2NTQ4NDkwOTFmYWQ2Y2FiOSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjhUMTY6MTQ6MzIuNDQzWiIsInRyZWVTaXplIjoxfQ==",
81
81
  "signatures": [
82
82
  {
83
- "keyid": "27e4e80dbd49e866f4e30d5d7d172c0b4b9d130e1ef74420a2cb8f22e0e549ba",
84
- "sig": "Jvyh0cZC04MAmBqCsZtcq3Qh2OQP5ly0TIIlxtcqmy+QdLfoNGbxOyksEZ3D1yITFualDWNgOB/V4hk9Ii9KBw=="
83
+ "keyid": "54ce521545c24dbfbfa478f75821466ba15a1cb3ec3f1b639242f706ecb2a918",
84
+ "sig": "nQERFI1dOltqOe+5V4deEY1rkA5H4AXM6T7WcJd2zCLJ/q5untcdquhCskYa3U8bkXD7iIpmvXGWt7Az5V1qDA=="
85
85
  }
86
86
  ]
87
87
  },
88
88
  "newer": {
89
89
  "payloadType": "application/vnd.agent-custody.treehead+json",
90
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNWZhYjAwZGM4NzVkY2ExZjAzMGRhZGMwYWE0MjQyN2Q5YWRmYjhhOThlZTA1OWIyYWEyMDljODEzMzg0MDc1ZSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjZUMTc6NTE6MjYuNTQ5WiIsInRyZWVTaXplIjoyfQ==",
90
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiZGVhNTg3OGViYzdjODg4NGNlYWJmOTE1NTQ4NTA0ZmJiNzk2MTcxMjliNmU0MDE0MGEyYWVlZWViZjY1ODUwZSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjhUMTY6MTQ6MzIuNDQ3WiIsInRyZWVTaXplIjoyfQ==",
91
91
  "signatures": [
92
92
  {
93
- "keyid": "27e4e80dbd49e866f4e30d5d7d172c0b4b9d130e1ef74420a2cb8f22e0e549ba",
94
- "sig": "D5gGBJGgZ3vgx/lUTabGLpQZVLQL52nXrHThWOolNJD7THa+oiItUAqVGKRFZl0iZog8zEwMC2yily+xz6yeDg=="
93
+ "keyid": "54ce521545c24dbfbfa478f75821466ba15a1cb3ec3f1b639242f706ecb2a918",
94
+ "sig": "tFOaFh+RwpFtTR+g0cxKKvHrwmnfnHNsOkFHjhRH5HyZKdFct435JYlzhKO2M2WRvOgYzFIOyJm1vVqsRLcOCw=="
95
95
  }
96
96
  ]
97
97
  },
98
98
  "proof": [
99
- "3d549ac46dd00f77add2766bc8eddd5cddd4028c2c158667759a78ac8003f561"
99
+ "1835eb9e73e9c76ac7b734cbbaf67cdc2fa8cbf85155d92bb648f6901ba049aa"
100
100
  ],
101
101
  "keys": [
102
102
  "app"
@@ -114,21 +114,21 @@
114
114
  "description": "A proof with a hash removed.",
115
115
  "older": {
116
116
  "payloadType": "application/vnd.agent-custody.treehead+json",
117
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiODdiZTMxNDY1OTU2MDYyZmFiY2FiMTNhMzdiZWE2NDYwZTgwZDVkODU4YTU1ZDhiMzkzNTA2NGNlY2YwN2NjNiIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjZUMTc6NTE6MjYuNTQ0WiIsInRyZWVTaXplIjoxfQ==",
117
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiMjk5NmQ2ZmU5MGQ2YmI5YmIwMzEyYmEyZWExMTk2YzkyZDE2Mjk1N2Q4OTRiYWM2NTQ4NDkwOTFmYWQ2Y2FiOSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjhUMTY6MTQ6MzIuNDQzWiIsInRyZWVTaXplIjoxfQ==",
118
118
  "signatures": [
119
119
  {
120
- "keyid": "27e4e80dbd49e866f4e30d5d7d172c0b4b9d130e1ef74420a2cb8f22e0e549ba",
121
- "sig": "Jvyh0cZC04MAmBqCsZtcq3Qh2OQP5ly0TIIlxtcqmy+QdLfoNGbxOyksEZ3D1yITFualDWNgOB/V4hk9Ii9KBw=="
120
+ "keyid": "54ce521545c24dbfbfa478f75821466ba15a1cb3ec3f1b639242f706ecb2a918",
121
+ "sig": "nQERFI1dOltqOe+5V4deEY1rkA5H4AXM6T7WcJd2zCLJ/q5untcdquhCskYa3U8bkXD7iIpmvXGWt7Az5V1qDA=="
122
122
  }
123
123
  ]
124
124
  },
125
125
  "newer": {
126
126
  "payloadType": "application/vnd.agent-custody.treehead+json",
127
- "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiNWZhYjAwZGM4NzVkY2ExZjAzMGRhZGMwYWE0MjQyN2Q5YWRmYjhhOThlZTA1OWIyYWEyMDljODEzMzg0MDc1ZSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjZUMTc6NTE6MjYuNTQ5WiIsInRyZWVTaXplIjoyfQ==",
127
+ "payload": "eyJsb2ciOiJ2ZWN0b3JzLWxvZyIsInJvb3RIYXNoIjoiZGVhNTg3OGViYzdjODg4NGNlYWJmOTE1NTQ4NTA0ZmJiNzk2MTcxMjliNmU0MDE0MGEyYWVlZWViZjY1ODUwZSIsInRpbWVzdGFtcCI6IjIwMjYtMDktMjhUMTY6MTQ6MzIuNDQ3WiIsInRyZWVTaXplIjoyfQ==",
128
128
  "signatures": [
129
129
  {
130
- "keyid": "27e4e80dbd49e866f4e30d5d7d172c0b4b9d130e1ef74420a2cb8f22e0e549ba",
131
- "sig": "D5gGBJGgZ3vgx/lUTabGLpQZVLQL52nXrHThWOolNJD7THa+oiItUAqVGKRFZl0iZog8zEwMC2yily+xz6yeDg=="
130
+ "keyid": "54ce521545c24dbfbfa478f75821466ba15a1cb3ec3f1b639242f706ecb2a918",
131
+ "sig": "tFOaFh+RwpFtTR+g0cxKKvHrwmnfnHNsOkFHjhRH5HyZKdFct435JYlzhKO2M2WRvOgYzFIOyJm1vVqsRLcOCw=="
132
132
  }
133
133
  ]
134
134
  },