signafaide 0.2.1 → 0.3.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.
@@ -300,6 +300,62 @@ declare class Client {
300
300
  /** GET a JSON document (used for `--keys <url>`). */
301
301
  declare function fetchJson(url: string, timeoutMs?: number): Promise<any>;
302
302
 
303
+ /**
304
+ * Tool declarations (SPEC §2.6) and the coverage they give (§7): which of an agent's tools are
305
+ * recorded, read from envelopes alone (kind, name, seq), so it holds for hash-only records.
306
+ * Pure: no I/O. The same names, rules and wording as the Rust core and the Python SDK.
307
+ *
308
+ * Coverage is a note, never a failure, and never a claim of completeness: a declaration is the
309
+ * client's own signed statement of the tools the agent has.
310
+ */
311
+ /** The name of the note that starts a new tool declaration for the agent's chain. */
312
+ declare const TOOLS = "signafaide.tools";
313
+ /** `signafaide.tool/<tool name>`: the agent has this tool and calls to it are recorded. */
314
+ declare const TOOL_PREFIX = "signafaide.tool/";
315
+ /** `signafaide.tool_unrecorded/<tool name>`: the agent has this tool and calls to it are not recorded. */
316
+ declare const TOOL_UNRECORDED_PREFIX = "signafaide.tool_unrecorded/";
317
+ /** The longest tool name a declaration holds as it is, in characters (Unicode code points): an
318
+ * envelope name is at most 128 and the longer prefix takes 27. */
319
+ declare const MAX_DECLARED_NAME = 101;
320
+ /** A tool's name as a declaration holds it: the name itself when it has at most 101 characters,
321
+ * else its first 92 characters, `~`, and the first 8 hex characters of sha256(UTF-8 tool name).
322
+ * A name that is already short maps to itself. */
323
+ declare function declaredName(tool: string): string;
324
+ /** The envelope name of the note that declares `tool`. */
325
+ declare function toolNoteName(tool: string, recorded: boolean): string;
326
+ /** What a record says about the agent's tool list, from its kind and name alone: `"header"`,
327
+ * a tool, or null when it is not a tool-declaration note. */
328
+ declare function toolNote(kind: unknown, name: unknown): "header" | {
329
+ name: string;
330
+ recorded: boolean;
331
+ } | null;
332
+ interface DeclaredTool {
333
+ name: string;
334
+ recorded: boolean;
335
+ }
336
+ /** What one agent's records show about its tools (§7 tool coverage). */
337
+ interface Coverage {
338
+ /** The tools of the agent's current declaration, in name order; empty when there is none. */
339
+ declared: DeclaredTool[];
340
+ /** The names of decision records that are not in the current declaration, in name order. */
341
+ undeclared_recorded: string[];
342
+ /** The seq of the `signafaide.tools` note that starts the current declaration, or null. */
343
+ declared_at_seq: number | null;
344
+ }
345
+ /** The coverage of one agent's records, given in seq order. The current declaration is the one
346
+ * started by the last `signafaide.tools` note; tool notes before the first such note belong to a
347
+ * declaration the records do not hold and are ignored. Inside a declaration a later note for the
348
+ * same tool replaces an earlier one. A `decision` counts as a recorded tool unless its name
349
+ * starts with `signafaide.`; it is compared by its declared name. */
350
+ declare function coverage(records: Iterable<{
351
+ seq: number;
352
+ kind: unknown;
353
+ name: unknown;
354
+ }>): Coverage;
355
+ /** The coverage of `agent` in words (§7), one line each: what was declared, then the recorded
356
+ * tools the declaration does not list. */
357
+ declare function coverageLines(agent: string, c: Coverage): string[];
358
+
303
359
  declare const MAX_PROOF_BYTES = 65536;
304
360
  declare const MAX_NODES = 1024;
305
361
  type Attestation = ({
@@ -460,6 +516,9 @@ declare class Report {
460
516
  notSent: number;
461
517
  /** The project's name from the signed export statement, when the pack has one. */
462
518
  projectName: string | null;
519
+ /** Tool coverage per agent (§7; per chain for local state): the agent's current tool
520
+ * declaration and the recorded tools it does not list. A note, never a failure. */
521
+ coverage: Record<string, Coverage>;
463
522
  constructor(checks: Check[], project?: string | null, env?: string | null, records?: number, warnings?: string[], notes?: string[], independent?: {
464
523
  service_keys: boolean;
465
524
  agent_keys: boolean;
@@ -471,6 +530,9 @@ declare class Report {
471
530
  get result(): "PASS" | "FAIL" | "BLOCKED";
472
531
  check(id: CheckId): Check;
473
532
  firstFailed(): CheckId | null;
533
+ /** Tool coverage in words (§7), agent by agent: what each agent declared, then the recorded
534
+ * tools its declaration does not list. */
535
+ coverageLines(): string[];
474
536
  lines(): string[];
475
537
  toString(): string;
476
538
  toJSON(): object;
@@ -585,6 +647,6 @@ declare function clientHeader(opts?: {
585
647
  env?: Env;
586
648
  }): string;
587
649
 
588
- declare const VERSION = "0.2.1";
650
+ declare const VERSION = "0.3.0";
589
651
 
590
- export { countsText as $, type AgentKeyEntry as A, type BlockHeader as B, Client as C, DEFAULT_TIMESTAMP_URL as D, type Envelope as E, b64urlDecode as F, blockAttestations as G, HEADER as H, blockHeader as I, JsonNumber as J, type Kind as K, type LocalContent as L, MAX_NODES as M, NOT_INDEPENDENT as N, canonicalBytes as O, type PackFilter as P, canonicalize as Q, type Receipt as R, SigningKey as S, checkContent as T, checkHeader as U, VERSION as V, checkRoundTime as W, clampTime as X, clientHeader as Y, contentFromText as Z, contentHash as _, type SignedRecord as a, detectAgent as a0, draftErrors as a1, envelopeErrors as a2, exportStatement as a3, fetchJson as a4, hashJson as a5, isLoopbackUrl as a6, keyEntryErrors as a7, keyId as a8, leafHash as a9, signedMessage as aA, target as aB, telemetryEnabled as aC, timestampHeights as aD, validProjectId as aE, validTime as aF, verifyInclusion as aG, verifyLocalState as aH, verifyPack as aI, verifySig as aJ, wireRecord as aK, withWallTime as aL, loadDrandVerifier as aa, lookupTimestamps as ab, makeDraft as ac, makeRecord as ad, manifestEntry as ae, manifestErrors as af, merkleRoot as ag, newSalt as ah, now as ai, otsStatus as aj, parseAgentKeys as ak, parseHeadFile as al, parseJson as am, parseOts as an, parseServiceKeys as ao, receiptErrors as ap, recordErrors as aq, recordHash as ar, recordsHash as as, registration as at, resultLine as au, rootsFromVector as av, scopeText as aw, serviceKeysHash as ax, sha256Hex as ay, signDraft as az, SignafaideError as b, Report as c, type KeyDoc as d, AGENT_RE as e, ANCHOR_WINDOW_MS as f, type BlockRoots as g, CHECKS as h, type Check as i, type CheckId as j, DEFAULT_URL as k, type Domain as l, type DrandBeacon as m, type DrandVerifier as n, type KeySource as o, KeysRequired as p, MAX_PROOF_BYTES as q, MAX_ROUND as r, type PackOptions as s, type RecordFields as t, type SignedHeadDoc as u, type Status as v, agentName as w, assertPortableNumbers as x, auditPath as y, b64url as z };
652
+ export { checkHeader as $, type AgentKeyEntry as A, type BlockHeader as B, Client as C, DEFAULT_TIMESTAMP_URL as D, type Envelope as E, TOOL_UNRECORDED_PREFIX as F, agentName as G, HEADER as H, assertPortableNumbers as I, JsonNumber as J, type Kind as K, type LocalContent as L, MAX_DECLARED_NAME as M, NOT_INDEPENDENT as N, auditPath as O, type PackFilter as P, b64url as Q, type Receipt as R, SigningKey as S, TOOLS as T, b64urlDecode as U, VERSION as V, blockAttestations as W, blockHeader as X, canonicalBytes as Y, canonicalize as Z, checkContent as _, type SignedRecord as a, checkRoundTime as a0, clampTime as a1, clientHeader as a2, contentFromText as a3, contentHash as a4, countsText as a5, coverage as a6, coverageLines as a7, declaredName as a8, detectAgent as a9, recordHash as aA, recordsHash as aB, registration as aC, resultLine as aD, rootsFromVector as aE, scopeText as aF, serviceKeysHash as aG, sha256Hex as aH, signDraft as aI, signedMessage as aJ, target as aK, telemetryEnabled as aL, timestampHeights as aM, toolNote as aN, toolNoteName as aO, validProjectId as aP, validTime as aQ, verifyInclusion as aR, verifyLocalState as aS, verifyPack as aT, verifySig as aU, wireRecord as aV, withWallTime as aW, draftErrors as aa, envelopeErrors as ab, exportStatement as ac, fetchJson as ad, hashJson as ae, isLoopbackUrl as af, keyEntryErrors as ag, keyId as ah, leafHash as ai, loadDrandVerifier as aj, lookupTimestamps as ak, makeDraft as al, makeRecord as am, manifestEntry as an, manifestErrors as ao, merkleRoot as ap, newSalt as aq, now as ar, otsStatus as as, parseAgentKeys as at, parseHeadFile as au, parseJson as av, parseOts as aw, parseServiceKeys as ax, receiptErrors as ay, recordErrors as az, SignafaideError as b, Report as c, type KeyDoc as d, AGENT_RE as e, ANCHOR_WINDOW_MS as f, type BlockRoots as g, CHECKS as h, type Check as i, type CheckId as j, type Coverage as k, DEFAULT_URL as l, type DeclaredTool as m, type Domain as n, type DrandBeacon as o, type DrandVerifier as p, type KeySource as q, KeysRequired as r, MAX_NODES as s, MAX_PROOF_BYTES as t, MAX_ROUND as u, type PackOptions as v, type RecordFields as w, type SignedHeadDoc as x, type Status as y, TOOL_PREFIX as z };
package/dist/core.cjs CHANGED
@@ -38,6 +38,7 @@ __export(core_exports, {
38
38
  HEADER: () => HEADER,
39
39
  JsonNumber: () => JsonNumber,
40
40
  KeysRequired: () => KeysRequired,
41
+ MAX_DECLARED_NAME: () => MAX_DECLARED_NAME,
41
42
  MAX_NODES: () => MAX_NODES,
42
43
  MAX_PROOF_BYTES: () => MAX_PROOF_BYTES,
43
44
  MAX_ROUND: () => MAX_ROUND,
@@ -45,6 +46,9 @@ __export(core_exports, {
45
46
  Report: () => Report,
46
47
  SignafaideError: () => SignafaideError,
47
48
  SigningKey: () => SigningKey,
49
+ TOOLS: () => TOOLS,
50
+ TOOL_PREFIX: () => TOOL_PREFIX,
51
+ TOOL_UNRECORDED_PREFIX: () => TOOL_UNRECORDED_PREFIX,
48
52
  VERSION: () => VERSION,
49
53
  agentName: () => agentName,
50
54
  assertPortableNumbers: () => assertPortableNumbers,
@@ -62,6 +66,9 @@ __export(core_exports, {
62
66
  contentFromText: () => contentFromText,
63
67
  contentHash: () => contentHash,
64
68
  countsText: () => countsText,
69
+ coverage: () => coverage,
70
+ coverageLines: () => coverageLines,
71
+ declaredName: () => declaredName,
65
72
  detectAgent: () => detectAgent,
66
73
  draftErrors: () => draftErrors,
67
74
  envelopeErrors: () => envelopeErrors,
@@ -101,6 +108,8 @@ __export(core_exports, {
101
108
  target: () => target,
102
109
  telemetryEnabled: () => telemetryEnabled,
103
110
  timestampHeights: () => timestampHeights,
111
+ toolNote: () => toolNote,
112
+ toolNoteName: () => toolNoteName,
104
113
  validProjectId: () => validProjectId,
105
114
  validTime: () => validTime,
106
115
  verifyInclusion: () => verifyInclusion,
@@ -1110,7 +1119,7 @@ function manifestErrors(doc) {
1110
1119
  }
1111
1120
 
1112
1121
  // src/version.ts
1113
- var VERSION = "0.2.1";
1122
+ var VERSION = "0.3.0";
1114
1123
 
1115
1124
  // src/telemetry.ts
1116
1125
  var HEADER = "X-Signafaide-Client";
@@ -1279,6 +1288,72 @@ async function fetchJson(url, timeoutMs = 1e4) {
1279
1288
  return new Client(u.origin, void 0, timeoutMs, `signafaide-js/${VERSION}`).request("GET", u.pathname + u.search, { auth: false });
1280
1289
  }
1281
1290
 
1291
+ // src/plural.ts
1292
+ var plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
1293
+
1294
+ // src/coverage.ts
1295
+ var TOOLS = "signafaide.tools";
1296
+ var TOOL_PREFIX = "signafaide.tool/";
1297
+ var TOOL_UNRECORDED_PREFIX = "signafaide.tool_unrecorded/";
1298
+ var RESERVED_PREFIX = "signafaide.";
1299
+ var MAX_DECLARED_NAME = 101;
1300
+ var KEPT = MAX_DECLARED_NAME - 9;
1301
+ function declaredName(tool) {
1302
+ const chars = [...tool];
1303
+ if (chars.length <= MAX_DECLARED_NAME) return tool;
1304
+ return `${chars.slice(0, KEPT).join("")}~${sha256Hex(new TextEncoder().encode(tool)).slice(0, 8)}`;
1305
+ }
1306
+ function toolNoteName(tool, recorded) {
1307
+ return (recorded ? TOOL_PREFIX : TOOL_UNRECORDED_PREFIX) + declaredName(tool);
1308
+ }
1309
+ function toolNote(kind, name) {
1310
+ if (kind !== "note" || typeof name !== "string") return null;
1311
+ if (name === TOOLS) return "header";
1312
+ const recorded = name.startsWith(TOOL_PREFIX);
1313
+ if (!recorded && !name.startsWith(TOOL_UNRECORDED_PREFIX)) return null;
1314
+ const rest = name.slice((recorded ? TOOL_PREFIX : TOOL_UNRECORDED_PREFIX).length);
1315
+ return rest ? { name: rest, recorded } : null;
1316
+ }
1317
+ function byCodePoint(a, b) {
1318
+ const [x, y] = [[...a], [...b]];
1319
+ for (let i = 0; i < x.length && i < y.length; i++) {
1320
+ const d = x[i].codePointAt(0) - y[i].codePointAt(0);
1321
+ if (d) return d;
1322
+ }
1323
+ return x.length - y.length;
1324
+ }
1325
+ function coverage(records) {
1326
+ let at = null;
1327
+ let tools = /* @__PURE__ */ new Map();
1328
+ const called = /* @__PURE__ */ new Set();
1329
+ for (const { seq, kind, name } of records) {
1330
+ const t = toolNote(kind, name);
1331
+ if (t === "header") {
1332
+ at = seq;
1333
+ tools = /* @__PURE__ */ new Map();
1334
+ } else if (t) {
1335
+ if (at !== null) tools.set(t.name, t.recorded);
1336
+ } else if (kind === "decision" && typeof name === "string" && !name.startsWith(RESERVED_PREFIX)) called.add(declaredName(name));
1337
+ }
1338
+ if (at === null) return { declared: [], undeclared_recorded: [], declared_at_seq: null };
1339
+ return {
1340
+ declared: [...tools.keys()].sort(byCodePoint).map((name) => ({ name, recorded: tools.get(name) })),
1341
+ undeclared_recorded: [...called].filter((n) => !tools.has(n)).sort(byCodePoint),
1342
+ declared_at_seq: at
1343
+ };
1344
+ }
1345
+ var countIs = (n, one) => `${plural(n, one)} ${n === 1 ? "is" : "are"}`;
1346
+ function coverageLines(agent, c) {
1347
+ if (c.declared_at_seq === null) return [`${agent}: no tool list was declared, so the pack cannot show which of the agent's tools are recorded`];
1348
+ const unrecorded = c.declared.filter((t) => !t.recorded).map((t) => t.name);
1349
+ const out = [];
1350
+ if (!c.declared.length) out.push(`${agent}: the declared tool list is empty`);
1351
+ else if (!unrecorded.length) out.push(`${agent}: ${c.declared.length === 1 ? "the" : "all"} ${countIs(c.declared.length, "declared tool")} recorded`);
1352
+ else out.push(`${agent}: ${countIs(unrecorded.length, "declared tool")} not recorded: ${unrecorded.join(", ")}`);
1353
+ if (c.undeclared_recorded.length) out.push(`${agent}: ${countIs(c.undeclared_recorded.length, "recorded tool")} not in the declared tool list: ${c.undeclared_recorded.join(", ")}`);
1354
+ return out;
1355
+ }
1356
+
1282
1357
  // src/ots.ts
1283
1358
  var import_legacy = require("@noble/hashes/legacy");
1284
1359
  var import_sha22 = require("@noble/hashes/sha2");
@@ -1463,11 +1538,6 @@ function rootsFromVector(m) {
1463
1538
 
1464
1539
  // src/verifier.ts
1465
1540
  var import_utils4 = require("@noble/hashes/utils");
1466
-
1467
- // src/plural.ts
1468
- var plural = (n, one, many = `${one}s`) => `${n} ${n === 1 ? one : many}`;
1469
-
1470
- // src/verifier.ts
1471
1541
  var CHECKS = [
1472
1542
  ["schema", "Envelope schema"],
1473
1543
  ["record_hash", "Record hashes"],
@@ -1596,6 +1666,9 @@ var Report = class {
1596
1666
  notSent = 0;
1597
1667
  /** The project's name from the signed export statement, when the pack has one. */
1598
1668
  projectName = null;
1669
+ /** Tool coverage per agent (§7; per chain for local state): the agent's current tool
1670
+ * declaration and the recorded tools it does not list. A note, never a failure. */
1671
+ coverage = {};
1599
1672
  /** e.g. `PASS: export of every agent, all records, generated <t>`, or
1600
1673
  * `PASS (agent keys taken from the pack, not independent): export of ...` (§7). */
1601
1674
  get resultLine() {
@@ -1619,6 +1692,11 @@ var Report = class {
1619
1692
  firstFailed() {
1620
1693
  return this.checks.find((c) => c.status === "fail")?.id ?? null;
1621
1694
  }
1695
+ /** Tool coverage in words (§7), agent by agent: what each agent declared, then the recorded
1696
+ * tools its declaration does not list. */
1697
+ coverageLines() {
1698
+ return Object.entries(this.coverage).flatMap(([agent, c]) => coverageLines(agent, c));
1699
+ }
1622
1700
  lines() {
1623
1701
  const out = [...this.notes];
1624
1702
  if (this.project && this.env) {
@@ -1634,6 +1712,7 @@ var Report = class {
1634
1712
  if (c.failures.length > 20) out.push(` ... and ${c.failures.length - 20} more`);
1635
1713
  }
1636
1714
  if (this.checks.some((c) => c.status === "pending")) out.push(PENDING_MEANS);
1715
+ out.push(...this.coverageLines().map((l) => `coverage: ${l}`));
1637
1716
  out.push(...this.after);
1638
1717
  out.push(...this.blocked.map((b) => `BLOCKED ${b}`));
1639
1718
  out.push(this.resultLine);
@@ -1656,6 +1735,7 @@ var Report = class {
1656
1735
  independent: this.independent,
1657
1736
  notes: this.notes,
1658
1737
  checks: this.checks,
1738
+ coverage: this.coverage,
1659
1739
  ...this.after.length ? { not_yet: this.after } : {},
1660
1740
  ...this.blocked.length ? { blocked: this.blocked } : {}
1661
1741
  };
@@ -1784,6 +1864,7 @@ function verifyPack(pack, serviceKeys, opts = {}) {
1784
1864
  byService
1785
1865
  });
1786
1866
  report.projectName = typeof pack.project_name === "string" ? pack.project_name : null;
1867
+ report.coverage = v.coverage;
1787
1868
  return report;
1788
1869
  }
1789
1870
  function earliest(a, b) {
@@ -1797,6 +1878,7 @@ function verifyLocalState(local, serviceKeys, drand = null, serviceKeysPlainHttp
1797
1878
  const checks = v.run(local.records, [], local.chainIds);
1798
1879
  const report = new Report(checks, null, null, local.records.length, [], [], { service_keys: !serviceKeysPlainHttp, agent_keys: true });
1799
1880
  report.nothingCosigned = v.nothingCosigned;
1881
+ report.coverage = v.coverage;
1800
1882
  return report;
1801
1883
  }
1802
1884
  var isU64 = (x) => typeof x === "number" && Number.isInteger(x) && x >= 0;
@@ -1927,6 +2009,8 @@ var Verifier = class {
1927
2009
  firstKey = /* @__PURE__ */ new Map();
1928
2010
  drafts = 0;
1929
2011
  nothingCosigned = false;
2012
+ /** Tool coverage per chain (§7), filled by `run`. */
2013
+ coverage = {};
1930
2014
  /** Local state: chain id -> the witness's signed head a chain continues after (§8). */
1931
2015
  localBases = {};
1932
2016
  /** A chain may start after seq 1 only when the export's from is after the agent's first key. */
@@ -2113,6 +2197,11 @@ var Verifier = class {
2113
2197
  if (starts.length) acc.notes.push(`${INSTANCE_NOTE}: ${starts.join(", ")}`);
2114
2198
  if (clean.length) acc.notes.push(`${CLEAN_RESTART_NOTE}: ${clean.join(", ")}`);
2115
2199
  if (based.length) acc.notes.push(`continues after a co-signed record this machine does not hold: ${based.join(", ")} (the witness's signed head, see signed heads)`);
2200
+ for (const agent of [...chains.keys()].sort()) {
2201
+ const chain = chains.get(agent);
2202
+ const seqs = [...chain.keys()].sort((x, y) => x - y);
2203
+ this.coverage[agent] = coverage(seqs.map((seq) => ({ seq, kind: chain.get(seq).r.envelope.kind, name: chain.get(seq).r.envelope.name })));
2204
+ }
2116
2205
  return chains;
2117
2206
  }
2118
2207
  // 5
@@ -2534,6 +2623,7 @@ async function loadDrandVerifier() {
2534
2623
  HEADER,
2535
2624
  JsonNumber,
2536
2625
  KeysRequired,
2626
+ MAX_DECLARED_NAME,
2537
2627
  MAX_NODES,
2538
2628
  MAX_PROOF_BYTES,
2539
2629
  MAX_ROUND,
@@ -2541,6 +2631,9 @@ async function loadDrandVerifier() {
2541
2631
  Report,
2542
2632
  SignafaideError,
2543
2633
  SigningKey,
2634
+ TOOLS,
2635
+ TOOL_PREFIX,
2636
+ TOOL_UNRECORDED_PREFIX,
2544
2637
  VERSION,
2545
2638
  agentName,
2546
2639
  assertPortableNumbers,
@@ -2558,6 +2651,9 @@ async function loadDrandVerifier() {
2558
2651
  contentFromText,
2559
2652
  contentHash,
2560
2653
  countsText,
2654
+ coverage,
2655
+ coverageLines,
2656
+ declaredName,
2561
2657
  detectAgent,
2562
2658
  draftErrors,
2563
2659
  envelopeErrors,
@@ -2597,6 +2693,8 @@ async function loadDrandVerifier() {
2597
2693
  target,
2598
2694
  telemetryEnabled,
2599
2695
  timestampHeights,
2696
+ toolNote,
2697
+ toolNoteName,
2600
2698
  validProjectId,
2601
2699
  validTime,
2602
2700
  verifyInclusion,
package/dist/core.d.cts CHANGED
@@ -1 +1 @@
1
- export { e as AGENT_RE, f as ANCHOR_WINDOW_MS, A as AgentKeyEntry, B as BlockHeader, g as BlockRoots, h as CHECKS, i as Check, j as CheckId, C as Client, k as DEFAULT_URL, l as Domain, m as DrandBeacon, n as DrandVerifier, E as Envelope, H as HEADER, J as JsonNumber, d as KeyDoc, o as KeySource, p as KeysRequired, K as Kind, M as MAX_NODES, q as MAX_PROOF_BYTES, r as MAX_ROUND, N as NOT_INDEPENDENT, P as PackFilter, s as PackOptions, R as Receipt, t as RecordFields, c as Report, b as SignafaideError, u as SignedHeadDoc, a as SignedRecord, S as SigningKey, v as Status, V as VERSION, w as agentName, x as assertPortableNumbers, y as auditPath, z as b64url, F as b64urlDecode, G as blockAttestations, O as canonicalBytes, Q as canonicalize, T as checkContent, U as checkHeader, W as checkRoundTime, X as clampTime, Y as clientHeader, Z as contentFromText, _ as contentHash, $ as countsText, a0 as detectAgent, a1 as draftErrors, a2 as envelopeErrors, a3 as exportStatement, a4 as fetchJson, a5 as hashJson, a6 as isLoopbackUrl, a7 as keyEntryErrors, a8 as keyId, a9 as leafHash, aa as loadDrandVerifier, ac as makeDraft, ad as makeRecord, ae as manifestEntry, af as manifestErrors, ag as merkleRoot, ah as newSalt, ai as now, aj as otsStatus, ak as parseAgentKeys, al as parseHeadFile, am as parseJson, an as parseOts, ao as parseServiceKeys, ap as receiptErrors, aq as recordErrors, ar as recordHash, as as recordsHash, at as registration, au as resultLine, av as rootsFromVector, aw as scopeText, ax as serviceKeysHash, ay as sha256Hex, az as signDraft, aA as signedMessage, aB as target, aC as telemetryEnabled, aD as timestampHeights, aE as validProjectId, aF as validTime, aG as verifyInclusion, aH as verifyLocalState, aI as verifyPack, aJ as verifySig, aK as wireRecord, aL as withWallTime } from './core-BMfko_ex.cjs';
1
+ export { e as AGENT_RE, f as ANCHOR_WINDOW_MS, A as AgentKeyEntry, B as BlockHeader, g as BlockRoots, h as CHECKS, i as Check, j as CheckId, C as Client, k as Coverage, l as DEFAULT_URL, m as DeclaredTool, n as Domain, o as DrandBeacon, p as DrandVerifier, E as Envelope, H as HEADER, J as JsonNumber, d as KeyDoc, q as KeySource, r as KeysRequired, K as Kind, M as MAX_DECLARED_NAME, s as MAX_NODES, t as MAX_PROOF_BYTES, u as MAX_ROUND, N as NOT_INDEPENDENT, P as PackFilter, v as PackOptions, R as Receipt, w as RecordFields, c as Report, b as SignafaideError, x as SignedHeadDoc, a as SignedRecord, S as SigningKey, y as Status, T as TOOLS, z as TOOL_PREFIX, F as TOOL_UNRECORDED_PREFIX, V as VERSION, G as agentName, I as assertPortableNumbers, O as auditPath, Q as b64url, U as b64urlDecode, W as blockAttestations, Y as canonicalBytes, Z as canonicalize, _ as checkContent, $ as checkHeader, a0 as checkRoundTime, a1 as clampTime, a2 as clientHeader, a3 as contentFromText, a4 as contentHash, a5 as countsText, a6 as coverage, a7 as coverageLines, a8 as declaredName, a9 as detectAgent, aa as draftErrors, ab as envelopeErrors, ac as exportStatement, ad as fetchJson, ae as hashJson, af as isLoopbackUrl, ag as keyEntryErrors, ah as keyId, ai as leafHash, aj as loadDrandVerifier, al as makeDraft, am as makeRecord, an as manifestEntry, ao as manifestErrors, ap as merkleRoot, aq as newSalt, ar as now, as as otsStatus, at as parseAgentKeys, au as parseHeadFile, av as parseJson, aw as parseOts, ax as parseServiceKeys, ay as receiptErrors, az as recordErrors, aA as recordHash, aB as recordsHash, aC as registration, aD as resultLine, aE as rootsFromVector, aF as scopeText, aG as serviceKeysHash, aH as sha256Hex, aI as signDraft, aJ as signedMessage, aK as target, aL as telemetryEnabled, aM as timestampHeights, aN as toolNote, aO as toolNoteName, aP as validProjectId, aQ as validTime, aR as verifyInclusion, aS as verifyLocalState, aT as verifyPack, aU as verifySig, aV as wireRecord, aW as withWallTime } from './core-BTJGPYVW.cjs';
package/dist/core.d.ts CHANGED
@@ -1 +1 @@
1
- export { e as AGENT_RE, f as ANCHOR_WINDOW_MS, A as AgentKeyEntry, B as BlockHeader, g as BlockRoots, h as CHECKS, i as Check, j as CheckId, C as Client, k as DEFAULT_URL, l as Domain, m as DrandBeacon, n as DrandVerifier, E as Envelope, H as HEADER, J as JsonNumber, d as KeyDoc, o as KeySource, p as KeysRequired, K as Kind, M as MAX_NODES, q as MAX_PROOF_BYTES, r as MAX_ROUND, N as NOT_INDEPENDENT, P as PackFilter, s as PackOptions, R as Receipt, t as RecordFields, c as Report, b as SignafaideError, u as SignedHeadDoc, a as SignedRecord, S as SigningKey, v as Status, V as VERSION, w as agentName, x as assertPortableNumbers, y as auditPath, z as b64url, F as b64urlDecode, G as blockAttestations, O as canonicalBytes, Q as canonicalize, T as checkContent, U as checkHeader, W as checkRoundTime, X as clampTime, Y as clientHeader, Z as contentFromText, _ as contentHash, $ as countsText, a0 as detectAgent, a1 as draftErrors, a2 as envelopeErrors, a3 as exportStatement, a4 as fetchJson, a5 as hashJson, a6 as isLoopbackUrl, a7 as keyEntryErrors, a8 as keyId, a9 as leafHash, aa as loadDrandVerifier, ac as makeDraft, ad as makeRecord, ae as manifestEntry, af as manifestErrors, ag as merkleRoot, ah as newSalt, ai as now, aj as otsStatus, ak as parseAgentKeys, al as parseHeadFile, am as parseJson, an as parseOts, ao as parseServiceKeys, ap as receiptErrors, aq as recordErrors, ar as recordHash, as as recordsHash, at as registration, au as resultLine, av as rootsFromVector, aw as scopeText, ax as serviceKeysHash, ay as sha256Hex, az as signDraft, aA as signedMessage, aB as target, aC as telemetryEnabled, aD as timestampHeights, aE as validProjectId, aF as validTime, aG as verifyInclusion, aH as verifyLocalState, aI as verifyPack, aJ as verifySig, aK as wireRecord, aL as withWallTime } from './core-BMfko_ex.js';
1
+ export { e as AGENT_RE, f as ANCHOR_WINDOW_MS, A as AgentKeyEntry, B as BlockHeader, g as BlockRoots, h as CHECKS, i as Check, j as CheckId, C as Client, k as Coverage, l as DEFAULT_URL, m as DeclaredTool, n as Domain, o as DrandBeacon, p as DrandVerifier, E as Envelope, H as HEADER, J as JsonNumber, d as KeyDoc, q as KeySource, r as KeysRequired, K as Kind, M as MAX_DECLARED_NAME, s as MAX_NODES, t as MAX_PROOF_BYTES, u as MAX_ROUND, N as NOT_INDEPENDENT, P as PackFilter, v as PackOptions, R as Receipt, w as RecordFields, c as Report, b as SignafaideError, x as SignedHeadDoc, a as SignedRecord, S as SigningKey, y as Status, T as TOOLS, z as TOOL_PREFIX, F as TOOL_UNRECORDED_PREFIX, V as VERSION, G as agentName, I as assertPortableNumbers, O as auditPath, Q as b64url, U as b64urlDecode, W as blockAttestations, Y as canonicalBytes, Z as canonicalize, _ as checkContent, $ as checkHeader, a0 as checkRoundTime, a1 as clampTime, a2 as clientHeader, a3 as contentFromText, a4 as contentHash, a5 as countsText, a6 as coverage, a7 as coverageLines, a8 as declaredName, a9 as detectAgent, aa as draftErrors, ab as envelopeErrors, ac as exportStatement, ad as fetchJson, ae as hashJson, af as isLoopbackUrl, ag as keyEntryErrors, ah as keyId, ai as leafHash, aj as loadDrandVerifier, al as makeDraft, am as makeRecord, an as manifestEntry, ao as manifestErrors, ap as merkleRoot, aq as newSalt, ar as now, as as otsStatus, at as parseAgentKeys, au as parseHeadFile, av as parseJson, aw as parseOts, ax as parseServiceKeys, ay as receiptErrors, az as recordErrors, aA as recordHash, aB as recordsHash, aC as registration, aD as resultLine, aE as rootsFromVector, aF as scopeText, aG as serviceKeysHash, aH as sha256Hex, aI as signDraft, aJ as signedMessage, aK as target, aL as telemetryEnabled, aM as timestampHeights, aN as toolNote, aO as toolNoteName, aP as validProjectId, aQ as validTime, aR as verifyInclusion, aS as verifyLocalState, aT as verifyPack, aU as verifySig, aV as wireRecord, aW as withWallTime } from './core-BTJGPYVW.js';
package/dist/core.js CHANGED
@@ -4,12 +4,16 @@ import {
4
4
  CHECKS,
5
5
  JsonNumber,
6
6
  KeysRequired,
7
+ MAX_DECLARED_NAME,
7
8
  MAX_NODES,
8
9
  MAX_PROOF_BYTES,
9
10
  MAX_ROUND,
10
11
  NOT_INDEPENDENT,
11
12
  Report,
12
13
  SigningKey,
14
+ TOOLS,
15
+ TOOL_PREFIX,
16
+ TOOL_UNRECORDED_PREFIX,
13
17
  agentName,
14
18
  assertPortableNumbers,
15
19
  auditPath,
@@ -25,6 +29,9 @@ import {
25
29
  contentFromText,
26
30
  contentHash,
27
31
  countsText,
32
+ coverage,
33
+ coverageLines,
34
+ declaredName,
28
35
  draftErrors,
29
36
  envelopeErrors,
30
37
  exportStatement,
@@ -61,6 +68,8 @@ import {
61
68
  signedMessage,
62
69
  target,
63
70
  timestampHeights,
71
+ toolNote,
72
+ toolNoteName,
64
73
  validProjectId,
65
74
  validTime,
66
75
  verifyInclusion,
@@ -69,7 +78,7 @@ import {
69
78
  verifySig,
70
79
  wireRecord,
71
80
  withWallTime
72
- } from "./chunk-MBXHRQ2J.js";
81
+ } from "./chunk-6UDL5LZL.js";
73
82
  import {
74
83
  Client,
75
84
  DEFAULT_URL,
@@ -80,7 +89,7 @@ import {
80
89
  detectAgent,
81
90
  fetchJson,
82
91
  telemetryEnabled
83
- } from "./chunk-S2RSID5F.js";
92
+ } from "./chunk-DRRRZNIH.js";
84
93
  export {
85
94
  AGENT_RE,
86
95
  ANCHOR_WINDOW_MS,
@@ -90,6 +99,7 @@ export {
90
99
  HEADER,
91
100
  JsonNumber,
92
101
  KeysRequired,
102
+ MAX_DECLARED_NAME,
93
103
  MAX_NODES,
94
104
  MAX_PROOF_BYTES,
95
105
  MAX_ROUND,
@@ -97,6 +107,9 @@ export {
97
107
  Report,
98
108
  SignafaideError,
99
109
  SigningKey,
110
+ TOOLS,
111
+ TOOL_PREFIX,
112
+ TOOL_UNRECORDED_PREFIX,
100
113
  VERSION,
101
114
  agentName,
102
115
  assertPortableNumbers,
@@ -114,6 +127,9 @@ export {
114
127
  contentFromText,
115
128
  contentHash,
116
129
  countsText,
130
+ coverage,
131
+ coverageLines,
132
+ declaredName,
117
133
  detectAgent,
118
134
  draftErrors,
119
135
  envelopeErrors,
@@ -153,6 +169,8 @@ export {
153
169
  target,
154
170
  telemetryEnabled,
155
171
  timestampHeights,
172
+ toolNote,
173
+ toolNoteName,
156
174
  validProjectId,
157
175
  validTime,
158
176
  verifyInclusion,
@@ -5,7 +5,7 @@ import {
5
5
  SignafaideError,
6
6
  fetchJson,
7
7
  fetchTransport
8
- } from "./chunk-S2RSID5F.js";
8
+ } from "./chunk-DRRRZNIH.js";
9
9
  export {
10
10
  Client,
11
11
  DEFAULT_URL,