@agent-custody/state 0.16.5 → 0.16.6

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
@@ -158,7 +158,7 @@ agent-custody-memory review --verify-case refund.case.json --issuer-key keys/gat
158
158
  agent-custody-memory review --verify-case refund.case.html --issuer-key keys/gateway.pub --principal-key keys/principal.pub
159
159
  ```
160
160
 
161
- Filters combine with AND, match exact case-sensitive ids, and search only public arguments, results, and gateway facts. Times must be ISO 8601 date-times with `Z` or a UTC offset. An identifier withheld by a capture rule cannot be searched. A record that lacks a part the pages read (it fails the verifier's structural check) is shown as NOT VERIFIED with the reason, and it does not stop an export. A ledger or file error is not a defect of the record: it fails the export, and the live page answers 500. Search stops at 64 levels of nesting and ignores JSON text longer than 64 KiB, so one hostile argument cannot stall the index. A receipt with a value that search skipped is marked "partially indexed", and an id filter keeps it in the list, because the id may be in the skipped value. The index never drops a record: a file whose receipt id differs from its name is listed as NOT VERIFIED ("file name does not match receipt id"), and the header counts the files that could not be read. `--out <dir>` writes an index, receipt pages and bundles, and each receipt's `.case.html` and `.case.json`; its browser search covers only the receipts included in that export. Add `--approval-key` (once for each human approver) when the receipts are for calls that a human approved: without those keys such a receipt is NOT VERIFIED. Add `--log-key`, `--log-id`, and `--upstream-key` when those signatures need independent keys.
161
+ Filters combine with AND, match exact case-sensitive ids, and search only public arguments, results, and gateway facts. Times must be ISO 8601 date-times with `Z` or a UTC offset. The two date fields on the review page are date and time inputs; the page reads their values as UTC and the labels say so, and the route also reads a value without an offset (for example `2026-10-01T00:00`) as UTC. The page and the offline case file share one header: the logo, the theme toggle with the portal's saved choice, and the token palette. An identifier withheld by a capture rule cannot be searched. A record that lacks a part the pages read (it fails the verifier's structural check) is shown as NOT VERIFIED with the reason, and it does not stop an export. A ledger or file error is not a defect of the record: it fails the export, and the live page answers 500. Search stops at 64 levels of nesting and ignores JSON text longer than 64 KiB, so one hostile argument cannot stall the index. A receipt with a value that search skipped is marked "partially indexed", and an id filter keeps it in the list, because the id may be in the skipped value. The index never drops a record: a file whose receipt id differs from its name is listed as NOT VERIFIED ("file name does not match receipt id"), and the header counts the files that could not be read. `--out <dir>` writes an index, receipt pages and bundles, and each receipt's `.case.html` and `.case.json`; its browser search covers only the receipts included in that export. Add `--approval-key` (once for each human approver) when the receipts are for calls that a human approved: without those keys such a receipt is NOT VERIFIED. Add `--log-key`, `--log-id`, and `--upstream-key` when those signatures need independent keys.
162
162
 
163
163
  A portable HTML case contains the signed receipts, embedded signed authorizations, inclusion proofs, signed log heads, public keys (issuer, principal, approval, log, and upstream) and their fingerprints, the ten answers, and any ledger snapshot. Open it locally: its embedded WebCrypto verifier runs fresh checks on the signed evidence without external requests. That result is not independent, because the script is in the same file as the data: whoever edits the file can edit the script too, and the page does not compare the ten answers with the receipts. `review --verify-case` is the independent check. It takes the format from the file name: a name that ends in `.json` is read as JSON, and every other name as a page. Content that does not match the name fails. It reads the file, rebuilds the ten answers from the signed receipt and prints them (a saved answer that differs fails the check "ten answers match the signed receipt and the unsigned ledger snapshot"), and exits 1 on failed verification. For a `.case.html` it also fails unless the page is exactly what its data renders, so a changed visible answer or a second copy of the data fails. Trust the answers that the command prints, not the page. The check covers the answers that come from the signed receipt. The belief, dependency, and reversal lines come from the ledger snapshot in the file, which nobody signs, so a forged snapshot with matching answers passes: those lines are not attested. Without key flags it uses the bundled keys; supplied public keys replace the entire bundled trust set. Confirm bundled fingerprints through a trusted source. The explanation and ledger snapshot are unsigned exporter assertions; verification establishes the recorded gateway decision and detects receipt tampering, not that an external payment occurred. Without a ledger, belief dependencies remain `unknown without a ledger`. Capture keys, private keys, salts, and restored withheld values are never added to a case file.
164
164
 
@@ -343,6 +343,6 @@ tsconfig.build.json emits dist/ for consumers; the repo itself runs the .ts dir
343
343
  - Quarantine: facts carry `attested` or `claimed` provenance; claimed facts are hidden from reads by default and a gateway-only `memory.confirm` lifts them, as a recorded event.
344
344
 
345
345
  **Next, in the order it pays off**
346
-
346
+ <!-- #region state-next -->
347
347
  1. The hosted plane, behind early access: tenanted log, then memory, then reports and a control plane, with SSO, SCIM, residency, and SIEM export. [Issue #6](https://github.com/svayatta/agent-custody/issues/6).
348
-
348
+ <!-- #endregion state-next -->
package/dist/case-file.js CHANGED
@@ -4,7 +4,7 @@ import { readFileSync } from "node:fs";
4
4
  import * as nodeModule from "node:module";
5
5
  import { join } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
- import { keyidOf, publicKeyFromPem, publicKeyToPem, verifyBundle } from "@agent-custody/receipts";
7
+ import { APP_HEADER_CSS, appHeader, DESIGN_CSS, THEME_SCRIPT, keyidOf, publicKeyFromPem, publicKeyToPem, verifyBundle } from "@agent-custody/receipts";
8
8
  import { buildActionPack, formatExplain } from "./explain.js";
9
9
  // Keep this pure and self-contained: the same validation function runs inside the offline page.
10
10
  function caseProblem(file) {
@@ -203,10 +203,10 @@ export function renderCaseFile(file) {
203
203
  const data = JSON.stringify(file).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
204
204
  // HTML normalizes CRLF before CSP hashing in the browser, including files exported on Windows.
205
205
  const script = `"use strict";\n${browserVerifierSource()}\nconst caseProblem = ${caseProblem.toString()};\n${BROWSER_CASE_SCRIPT}`.replace(/\r\n?/g, "\n");
206
- const hash = createHash("sha256").update(script).digest("base64");
206
+ const hash = [script, THEME_SCRIPT].map((s) => `'sha256-${createHash("sha256").update(s).digest("base64")}'`).join(" ");
207
207
  const text = (value) => escapeHtml(typeof value === "string" ? value : JSON.stringify(value, null, 2));
208
208
  const keyText = problem ? "Malformed public key set" : Object.entries(file.keys).filter(([role]) => role !== "logId").map(([role, keys]) => `${role}:\n${keys.map((key) => `SHA-256 ${key.keyid}\n${key.pem}`).join("\n") || "(none)"}`).join("\n\n");
209
- return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'sha256-${hash}'; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'"><title>Custody case ${text(file?.receiptId ?? "invalid")}</title><style>body{font:16px/1.6 system-ui,sans-serif;max-width:1040px;margin:2rem auto;padding:0 1rem;color:#202020;background:#faf9f6}h1,h2{line-height:1.2}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#fff;border:1px solid #ccc;border-radius:6px;padding:1rem}button{font:inherit;padding:.5rem 1rem;cursor:pointer}summary{cursor:pointer}#fresh-report{border-left:4px solid #a66c00}small{color:#555}</style></head><body><h1>Custody case file</h1><p>Receipt <code>${text(file?.receiptId ?? "invalid")}</code>. Saved ${text(file?.generatedAt ?? "unknown")}.</p><p>This file contains signed receipts, embedded signed authorizations, log heads and inclusion proofs, and public keys. It works offline when opened locally.</p><p><strong>Trust:</strong> bundled keys demonstrate internal consistency. Confirm each SHA-256 fingerprint with the issuer, principal, log operator, or upstream through an independent channel before trusting their identity. A signed receipt records a claim about execution; it does not by itself prove that an external side effect occurred.</p><p>Withheld values remain commitments; their hidden contents are not recomputed here. The ten answers and belief/ledger data are an exporter snapshot, not independently attested facts. The exporter report below is historical; the browser recomputes signatures, authorizations, digests and inclusion proofs.</p><h2>Fresh browser verification</h2><p><strong>This page does not check itself independently.</strong> Its result comes from the script in this same file, and whoever edits the file can edit the script and the answers too. This page does not compare the ten answers with the receipts. To check this file, run <code>agent-custody-memory review --verify-case &lt;this file&gt; --issuer-key &lt;issuer.pub&gt; --principal-key &lt;principal.pub&gt;</code>. The command reads this .html file and checks that the page is exactly what its data renders. It prints the ten answers that it rebuilds from the signed receipt. Trust the answers that the command prints, not the answers on this page.</p><button id="verify" type="button">Verify again offline</button><pre id="fresh-report" role="status" aria-live="polite">NOT CHECKED: waiting for WebCrypto verification. If this stays unchanged, this browser could not run the verifier.</pre><noscript><p>NOT CHECKED: JavaScript is disabled. Use the independent command-line verifier: <code>agent-custody-memory review --verify-case &lt;this file&gt; --issuer-key &lt;issuer.pub&gt; --principal-key &lt;principal.pub&gt;</code>.</p></noscript><h2>Ten answers (saved text, NOT CHECKED in this page)</h2><pre>${text(problem ?? file.explanation)}</pre><h2>Export-time verification (recomputed when rendering)</h2><pre>${text(report)}</pre><h2>Public keys and fingerprints</h2><pre>${text(keyText)}</pre><details><summary>All receipts, authorizations, proofs and ledger snapshot (JSON)</summary><pre>${text(file)}</pre></details><script id="case-data" type="application/json">${data}</script><script>${script}</script></body></html>`;
209
+ return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src ${hash}; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'"><title>Custody case ${text(file?.receiptId ?? "invalid")}</title><style>${DESIGN_CSS}${APP_HEADER_CSS}body{font-size:var(--text-md);line-height:1.6}main{max-width:1040px;margin:2rem auto;padding:0 1rem}h2{margin-top:var(--space-6)}pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius-sm);padding:1rem;font-size:var(--text-sm)}summary{cursor:pointer}#fresh-report{border-left:4px solid var(--accent)}small{color:var(--ink2)}</style></head><body>${appHeader("Case file")}<main><h1>Custody case file</h1><p>Receipt <code>${text(file?.receiptId ?? "invalid")}</code>. Saved ${text(file?.generatedAt ?? "unknown")}.</p><p>This file contains signed receipts, embedded signed authorizations, log heads and inclusion proofs, and public keys. It works offline when opened locally.</p><p><strong>Trust:</strong> bundled keys demonstrate internal consistency. Confirm each SHA-256 fingerprint with the issuer, principal, log operator, or upstream through an independent channel before trusting their identity. A signed receipt records a claim about execution; it does not by itself prove that an external side effect occurred.</p><p>Withheld values remain commitments; their hidden contents are not recomputed here. The ten answers and belief/ledger data are an exporter snapshot, not independently attested facts. The exporter report below is historical; the browser recomputes signatures, authorizations, digests and inclusion proofs.</p><h2>Fresh browser verification</h2><p><strong>This page does not check itself independently.</strong> Its result comes from the script in this same file, and whoever edits the file can edit the script and the answers too. This page does not compare the ten answers with the receipts. To check this file, run <code>agent-custody-memory review --verify-case &lt;this file&gt; --issuer-key &lt;issuer.pub&gt; --principal-key &lt;principal.pub&gt;</code>. The command reads this .html file and checks that the page is exactly what its data renders. It prints the ten answers that it rebuilds from the signed receipt. Trust the answers that the command prints, not the answers on this page.</p><button id="verify" type="button">Verify again offline</button><pre id="fresh-report" role="status" aria-live="polite">NOT CHECKED: waiting for WebCrypto verification. If this stays unchanged, this browser could not run the verifier.</pre><noscript><p>NOT CHECKED: JavaScript is disabled. Use the independent command-line verifier: <code>agent-custody-memory review --verify-case &lt;this file&gt; --issuer-key &lt;issuer.pub&gt; --principal-key &lt;principal.pub&gt;</code>.</p></noscript><h2>Ten answers (saved text, NOT CHECKED in this page)</h2><pre>${text(problem ?? file.explanation)}</pre><h2>Export-time verification (recomputed when rendering)</h2><pre>${text(report)}</pre><h2>Public keys and fingerprints</h2><pre>${text(keyText)}</pre><details><summary>All receipts, authorizations, proofs and ledger snapshot (JSON)</summary><pre>${text(file)}</pre></details></main><script id="case-data" type="application/json">${data}</script><script>${script}</script><script>${THEME_SCRIPT}</script></body></html>`;
210
210
  }
211
211
  const BROWSER_CASE_SCRIPT = `
212
212
  const caseFile = JSON.parse(document.getElementById("case-data").textContent);
package/dist/review.js CHANGED
@@ -7,7 +7,7 @@ import { readdirSync, readFileSync, mkdirSync, writeFileSync } from "node:fs";
7
7
  import { createServer } from "node:http";
8
8
  import { join } from "node:path";
9
9
  import { createHash } from "node:crypto";
10
- import { structuralProblem, verifyBundle } from "@agent-custody/receipts";
10
+ import { APP_HEADER_CSS, appHeader, DESIGN_CSS, THEME_SCRIPT, structuralProblem, verifyBundle } from "@agent-custody/receipts";
11
11
  import { buildActionPack, decodeStatement, formatExplain } from "./explain.js";
12
12
  import { matchesReceiptSearch, receiptSearchTerms, validateReceiptSearch } from "./search.js";
13
13
  import { buildCaseFile, renderCaseFile } from "./case-file.js";
@@ -46,28 +46,23 @@ export function scanReceipts(o, query = o.search ?? {}) {
46
46
  return { rows: rows.sort((a, b) => b.timestamp.localeCompare(a.timestamp)), unreadable };
47
47
  }
48
48
  export const listReceipts = (o, query = o.search ?? {}) => scanReceipts(o, query).rows;
49
- const STYLE = `
50
- :root { color-scheme: light dark; --ink: #1b2430; --ink2: #5b6b7a; --line: #d7dfe5; --bg: #fafbfc; --panel: #ffffff; --accent: #0f6e63; --bad: #b3261e; --mono: ui-monospace, Menlo, monospace; }
51
- @media (prefers-color-scheme: dark) { :root { --ink: #e6ecf0; --ink2: #9fb0bd; --line: #27333c; --bg: #0e1418; --panel: #151d23; --accent: #4fc3b0; --bad: #ff8a80; } }
52
- body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, sans-serif; }
49
+ const STYLE = `${DESIGN_CSS}${APP_HEADER_CSS}
53
50
  main { max-width: 74rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
54
- h1 { font-size: 1.4rem; margin: 0 0 .25rem; } h2 { font-size: 1.05rem; margin: 1.75rem 0 .6rem; }
51
+ h1 { margin: 0 0 .25rem; } h2 { margin: 1.75rem 0 .6rem; }
55
52
  .sub { color: var(--ink2); margin: 0 0 1.25rem; }
56
- a { color: var(--accent); }
57
53
  table { border-collapse: collapse; width: 100%; font-size: .93rem; }
58
54
  th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
59
- th { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); }
60
- code, pre, .mono { font-family: var(--mono); font-size: .88em; }
61
- pre { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: .9rem 1rem; overflow-x: auto; white-space: pre-wrap; }
55
+ th { font-size: var(--text-xs); font-weight: 600; color: var(--ink2); } th::first-letter { text-transform: uppercase; }
56
+ code, pre, .mono { font-size: .88em; }
57
+ pre { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; overflow-x: auto; white-space: pre-wrap; }
62
58
  dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0; }
63
- dt { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); padding-top: .15rem; }
59
+ dt { font-size: var(--text-xs); font-weight: 600; color: var(--ink2); padding-top: .15rem; } dt::first-letter { text-transform: uppercase; }
64
60
  dd { margin: 0; white-space: pre-wrap; }
65
- .ok { color: var(--accent); font-weight: 600; } .bad { color: var(--bad); font-weight: 600; } .muted { color: var(--ink2); }
61
+ .ok { color: var(--ok); font-weight: 600; } .bad { color: var(--bad); font-weight: 600; } .muted { color: var(--ink2); }
66
62
  .wrap { overflow-x: auto; }
67
- form { display: flex; flex-wrap: wrap; gap: .8rem; padding: 1rem; border: 1px solid var(--line); margin-bottom: 1rem; }
68
- label { display: grid; gap: .25rem; font-size: .85rem; }
69
- input, button { font: inherit; padding: .45rem; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 3px; }
70
- button { cursor: pointer; align-self: end; }
63
+ form { display: flex; flex-wrap: wrap; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); margin-bottom: 1rem; }
64
+ label { display: grid; gap: .25rem; font-size: var(--text-xs); font-weight: 600; color: var(--ink2); }
65
+ form button { align-self: end; }
71
66
  [hidden] { display: none !important; }
72
67
  @media (max-width: 40rem) { dl { grid-template-columns: 1fr; } }
73
68
  `;
@@ -78,7 +73,8 @@ const form = document.getElementById('receipt-search');
78
73
  form.addEventListener('submit', (event) => {
79
74
  event.preventDefault();
80
75
  const value = (name) => form.elements.namedItem(name).value.trim();
81
- const from = value('from'), to = value('to');
76
+ const utc = (v) => v ? (v.length === 16 ? v + ':00' : v) + 'Z' : '';
77
+ const from = utc(value('from')), to = utc(value('to'));
82
78
  const error = document.getElementById('search-error');
83
79
  try {
84
80
  validateReceiptSearch({ ...(from ? { from } : {}), ...(to ? { to } : {}) });
@@ -106,15 +102,21 @@ form.addEventListener('reset', () => {
106
102
  queueMicrotask(() => form.requestSubmit());
107
103
  });
108
104
  `.replace(/\r\n?/g, "\n");
109
- const REVIEW_CSP = `default-src 'none'; style-src 'unsafe-inline'; script-src 'sha256-${createHash("sha256").update(SEARCH_SCRIPT).digest("base64")}'; img-src data:; form-action 'self'; base-uri 'none'`;
105
+ const REVIEW_CSP = `default-src 'none'; style-src 'unsafe-inline'; script-src ${[SEARCH_SCRIPT, THEME_SCRIPT].map((s) => `'sha256-${createHash("sha256").update(s).digest("base64")}'`).join(" ")}; img-src data:; form-action 'self'; base-uri 'none'`;
110
106
  const page = (title, body, script = "") => `<!doctype html>
107
+ <html lang="en">
111
108
  <meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
112
109
  <meta http-equiv="content-security-policy" content="${esc(REVIEW_CSP)}">
113
110
  <title>${esc(title)}</title>
114
111
  <style>${STYLE}</style>
112
+ ${appHeader("Review")}
115
113
  <main>${body}</main>
116
114
  ${script ? `<script>${script}</script>` : ""}
115
+ <script>${THEME_SCRIPT}</script>
117
116
  `;
117
+ // The date inputs hold a local-looking value without an offset. The review reads that value as UTC.
118
+ const asUtc = (v) => (/^\d{4}-\d\d-\d\dT\d\d:\d\d(:\d\d)?$/.test(v) ? `${v.length === 16 ? `${v}:00` : v}Z` : v);
119
+ const inputValue = (v) => (v && Number.isFinite(Date.parse(v)) ? new Date(Date.parse(v)).toISOString().slice(0, 19) : "");
118
120
  /** The index: one row per receipt, newest first. */
119
121
  export function renderIndex(rows, o, link, staticPage = false, unreadable = 0) {
120
122
  const withKeys = !!o.keys;
@@ -125,8 +127,9 @@ export function renderIndex(rows, o, link, staticPage = false, unreadable = 0) {
125
127
  <h1>${esc(o.title ?? "Receipts")}</h1>
126
128
  <p class="sub"><span id="receipt-count">${rows.length} receipt(s)</span> in ${esc(o.receiptsDir)}${withKeys ? ", each checked against the keys given" : ", not checked: start the review with the gateway's and principal's public keys to verify"}${o.ledger ? "; beliefs from the ledger" : "; no ledger, so what depended on a call is not known here"}.</p>
127
129
  ${unreadable ? `<p class="bad" role="alert">${unreadable} file(s) could not be read and are not in this list.</p>\n` : ""}<form id="receipt-search" method="get">
128
- ${[['transaction', 'Transaction ID', 're_… / pi_… / charge ID'], ['customer', 'Customer ID', 'cust_…'], ['agent', 'Agent', 'support-agent'], ['from', 'From (inclusive)', '2026-10-14T00:00:00Z'], ['to', 'To (inclusive)', '2026-10-15T00:00:00Z']].map(([name, label, placeholder]) => `<label>${label}<input name="${name}" value="${esc(o.search?.[name] ?? "")}" placeholder="${placeholder}"${name === 'from' || name === 'to' ? ' pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}T.+(Z|[+-][0-9]{2}:[0-9]{2})"' : ''}></label>`).join("\n")}
129
- <button type="submit">Search receipts</button>${staticPage ? '<button type="reset">Clear filters</button>' : '<a href="/?transaction=&amp;customer=&amp;agent=&amp;from=&amp;to=">Clear filters</a>'}
130
+ ${[['transaction', 'Transaction ID', 're_… / pi_… / charge ID'], ['customer', 'Customer ID', 'cust_…'], ['agent', 'Agent', 'support-agent']].map(([name, label, placeholder]) => `<label>${label}<input name="${name}" value="${esc(o.search?.[name] ?? "")}" placeholder="${placeholder}"></label>`).join("\n")}
131
+ ${[['from', 'From (UTC, inclusive)'], ['to', 'To (UTC, inclusive)']].map(([name, label]) => `<label>${label}<input type="datetime-local" step="1" name="${name}" value="${esc(inputValue(o.search?.[name]))}"></label>`).join("\n")}
132
+ <button type="submit">Search receipts</button>${staticPage ? '<button class="quiet" type="reset">Clear filters</button>' : '<a href="/?transaction=&amp;customer=&amp;agent=&amp;from=&amp;to=">Clear filters</a>'}
130
133
  </form>
131
134
  <p class="muted">Filters combine and match exact IDs. Search covers public arguments, results and gateway facts; identifiers withheld by a capture rule are unavailable.${staticPage ? ' This export searches only the receipts included here.' : ''}</p>
132
135
  <p id="search-error" role="alert" class="bad"></p>
@@ -211,7 +214,7 @@ export function reviewHandler(o) {
211
214
  for (const name of ['transaction', 'customer', 'agent', 'from', 'to']) {
212
215
  if (!url.searchParams.has(name))
213
216
  continue;
214
- const value = url.searchParams.get(name).trim();
217
+ const value = asUtc(url.searchParams.get(name).trim());
215
218
  if (value)
216
219
  search[name] = value;
217
220
  else
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-custody/state",
3
- "version": "0.16.5",
3
+ "version": "0.16.6",
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": {
@@ -34,7 +34,7 @@
34
34
  "node": ">=22"
35
35
  },
36
36
  "dependencies": {
37
- "@agent-custody/receipts": "0.16.5",
37
+ "@agent-custody/receipts": "0.16.6",
38
38
  "@modelcontextprotocol/sdk": "1.30.0",
39
39
  "zod": "4.5.4"
40
40
  },