@paybond/kit 0.11.4 → 0.11.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.
Files changed (44) hide show
  1. package/README.md +2 -3
  2. package/dist/agent/interceptor.js +12 -3
  3. package/dist/cli/commands/agent.js +22 -14
  4. package/dist/cli/help.js +1 -1
  5. package/dist/cli/http-error-message.d.ts +13 -0
  6. package/dist/cli/http-error-message.js +93 -0
  7. package/dist/cli/offline-session.d.ts +9 -0
  8. package/dist/cli/offline-session.js +33 -0
  9. package/dist/cli/router.js +32 -1
  10. package/dist/gateway-retry.d.ts +16 -0
  11. package/dist/gateway-retry.js +83 -0
  12. package/dist/index.js +40 -111
  13. package/dist/mcp-server.js +1 -1
  14. package/dist/policy/sandbox-bootstrap.js +3 -2
  15. package/package.json +4 -2
  16. package/templates/manifest.json +9 -9
  17. package/templates/openai-shopping-agent/README.md +1 -1
  18. package/templates/openai-shopping-agent/package-lock.json +6 -5
  19. package/templates/openai-shopping-agent/package.json +2 -2
  20. package/templates/paybond-aws-operator/README.md +1 -1
  21. package/templates/paybond-aws-operator/package-lock.json +15 -5
  22. package/templates/paybond-aws-operator/package.json +2 -2
  23. package/templates/paybond-claude-agents-demo/README.md +1 -1
  24. package/templates/paybond-claude-agents-demo/package-lock.json +6 -5
  25. package/templates/paybond-claude-agents-demo/package.json +2 -2
  26. package/templates/paybond-invoice-agent/.github/workflows/smoke.yml +1 -1
  27. package/templates/paybond-invoice-agent/README.md +1 -1
  28. package/templates/paybond-invoice-agent/package.json +1 -1
  29. package/templates/paybond-invoice-agent/requirements.txt +1 -1
  30. package/templates/paybond-mcp-coding-agent/README.md +1 -1
  31. package/templates/paybond-mcp-coding-agent/package-lock.json +15 -5
  32. package/templates/paybond-mcp-coding-agent/package.json +2 -2
  33. package/templates/paybond-openai-agents-demo/README.md +1 -1
  34. package/templates/paybond-openai-agents-demo/package-lock.json +6 -5
  35. package/templates/paybond-openai-agents-demo/package.json +2 -2
  36. package/templates/paybond-procurement-agent/README.md +1 -1
  37. package/templates/paybond-procurement-agent/package-lock.json +15 -5
  38. package/templates/paybond-procurement-agent/package.json +2 -2
  39. package/templates/paybond-travel-agent/README.md +1 -1
  40. package/templates/paybond-travel-agent/package-lock.json +6 -5
  41. package/templates/paybond-travel-agent/package.json +2 -2
  42. package/templates/paybond-vercel-shopping-agent/README.md +1 -1
  43. package/templates/paybond-vercel-shopping-agent/package-lock.json +6 -5
  44. package/templates/paybond-vercel-shopping-agent/package.json +2 -2
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ import { buildSignedCreateIntentBody, buildSignedCreateIntentBodyWithPolicyBindi
6
6
  import { signPayeeEvidenceBinding } from "./payee-evidence.js";
7
7
  import { PaybondAgentRunFacade, PaybondInstrumentBuilder, createGuardedAgent, createGuardedAgentRunner, createPaybondAgent, createPaybondToolRegistry, instrumentPaybondAgent, instrumentPaybondClaudeAgents, instrumentPaybondLangGraph, instrumentPaybondMCP, instrumentPaybondOpenAI, instrumentPaybondVercel, resolveAgentPolicySource, wrapPaybondTools, } from "./agent/index.js";
8
8
  import { GatewayAgentRunTraceReporter, } from "./agent/gateway-trace-reporter.js";
9
+ import { fetchWithGatewayRetries, gatewayRetryDelayMs, shouldRetryGatewayResponse, } from "./gateway-retry.js";
9
10
  import { parsePolicyRemoteValidateResponse, policyValidateQueryString, } from "./policy/validate-remote.js";
10
11
  import { parsePolicyEffectiveResolveResponse, } from "./policy/load-effective.js";
11
12
  import { paybondPolicyPresets } from "./policy/policy-api.js";
@@ -187,19 +188,6 @@ function protocolHTTPErrorMessage(prefix, statusCode, bodyText) {
187
188
  function normalizeBase(url) {
188
189
  return requireSecureGatewayUrl(url);
189
190
  }
190
- function backoffMs(attempt) {
191
- const base = 200 * 2 ** attempt;
192
- const jitter = Math.random() * 100;
193
- return Math.min(base + jitter, 5000);
194
- }
195
- function parseRetryAfterSeconds(v) {
196
- if (!v)
197
- return null;
198
- const n = Number.parseFloat(v.trim());
199
- if (!Number.isFinite(n))
200
- return null;
201
- return Math.min(n, 30);
202
- }
203
191
  function normalizeExpectedEnvironment(value) {
204
192
  if (value === undefined)
205
193
  return null;
@@ -462,16 +450,17 @@ export class HarborClient {
462
450
  lastErr = e;
463
451
  if (attempt + 1 >= this.maxRetries)
464
452
  throw e;
465
- await new Promise((r) => setTimeout(r, backoffMs(attempt)));
453
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, null)));
466
454
  continue;
467
455
  }
468
456
  if ([429, 500, 502, 503, 504].includes(res.status)) {
469
457
  if (attempt + 1 >= this.maxRetries) {
470
458
  return res;
471
459
  }
472
- const raSec = parseRetryAfterSeconds(res.headers.get("retry-after"));
473
- const delayMs = raSec != null ? raSec * 1000 : backoffMs(attempt);
474
- await new Promise((r) => setTimeout(r, delayMs));
460
+ if (!(await shouldRetryGatewayResponse(res))) {
461
+ return res;
462
+ }
463
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, res.headers.get("retry-after"))));
475
464
  continue;
476
465
  }
477
466
  return res;
@@ -494,16 +483,17 @@ export class HarborClient {
494
483
  lastErr = e;
495
484
  if (attempt + 1 >= this.maxRetries)
496
485
  throw e;
497
- await new Promise((r) => setTimeout(r, backoffMs(attempt)));
486
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, null)));
498
487
  continue;
499
488
  }
500
489
  if ([429, 500, 502, 503, 504].includes(res.status)) {
501
490
  if (attempt + 1 >= this.maxRetries) {
502
491
  return res;
503
492
  }
504
- const raSec = parseRetryAfterSeconds(res.headers.get("retry-after"));
505
- const delayMs = raSec != null ? raSec * 1000 : backoffMs(attempt);
506
- await new Promise((r) => setTimeout(r, delayMs));
493
+ if (!(await shouldRetryGatewayResponse(res))) {
494
+ return res;
495
+ }
496
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, res.headers.get("retry-after"))));
507
497
  if (retryBodyText !== undefined) {
508
498
  init = {
509
499
  ...init,
@@ -804,28 +794,7 @@ export class GatewayHarborClient {
804
794
  return headers;
805
795
  }
806
796
  async fetchWithRetries(url, init) {
807
- let lastErr;
808
- for (let attempt = 0; attempt < this.maxRetries; attempt++) {
809
- let res;
810
- try {
811
- res = await fetch(url, init);
812
- }
813
- catch (e) {
814
- lastErr = e;
815
- if (attempt + 1 >= this.maxRetries)
816
- throw e;
817
- await new Promise((r) => setTimeout(r, backoffMs(attempt)));
818
- continue;
819
- }
820
- if ([429, 500, 502, 503, 504].includes(res.status) && attempt + 1 < this.maxRetries) {
821
- const raSec = parseRetryAfterSeconds(res.headers.get("retry-after"));
822
- const delayMs = raSec != null ? raSec * 1000 : backoffMs(attempt);
823
- await new Promise((r) => setTimeout(r, delayMs));
824
- continue;
825
- }
826
- return res;
827
- }
828
- throw lastErr instanceof Error ? lastErr : new Error(String(lastErr));
797
+ return fetchWithGatewayRetries(url, init, this.maxRetries);
829
798
  }
830
799
  async postJSON(path, payload, extraHeaders) {
831
800
  return this.requestJSON("POST", path, payload, extraHeaders);
@@ -1052,28 +1021,7 @@ export class PaybondGuardrails {
1052
1021
  return headers;
1053
1022
  }
1054
1023
  async fetchWithRetries(url, init) {
1055
- let lastErr;
1056
- for (let attempt = 0; attempt < this.maxRetries; attempt++) {
1057
- let res;
1058
- try {
1059
- res = await fetch(url, init);
1060
- }
1061
- catch (e) {
1062
- lastErr = e;
1063
- if (attempt + 1 >= this.maxRetries)
1064
- throw e;
1065
- await new Promise((r) => setTimeout(r, backoffMs(attempt)));
1066
- continue;
1067
- }
1068
- if ([429, 500, 502, 503, 504].includes(res.status) && attempt + 1 < this.maxRetries) {
1069
- const raSec = parseRetryAfterSeconds(res.headers.get("retry-after"));
1070
- const delayMs = raSec != null ? raSec * 1000 : backoffMs(attempt);
1071
- await new Promise((r) => setTimeout(r, delayMs));
1072
- continue;
1073
- }
1074
- return res;
1075
- }
1076
- throw lastErr instanceof Error ? lastErr : new Error(String(lastErr));
1024
+ return fetchWithGatewayRetries(url, init, this.maxRetries);
1077
1025
  }
1078
1026
  async postJSON(path, payload, options) {
1079
1027
  const url = `${this.base}${path.replace(/^\/+/, "")}`;
@@ -1108,15 +1056,17 @@ export class PaybondGuardrails {
1108
1056
  if (input.completionPreset !== undefined) {
1109
1057
  payload.completion_preset = input.completionPreset;
1110
1058
  }
1111
- if (input.templateId !== undefined) {
1112
- payload.template_id = input.templateId;
1113
- }
1114
- if (input.parameters !== undefined) {
1115
- payload.parameters = input.parameters;
1059
+ else {
1060
+ if (input.templateId !== undefined) {
1061
+ payload.template_id = input.templateId;
1062
+ }
1063
+ if (input.parameters !== undefined) {
1064
+ payload.parameters = input.parameters;
1065
+ }
1116
1066
  }
1117
1067
  const { res, text, url } = await this.postJSON("/v1/sandbox/guardrails/bootstrap", payload, { idempotencyKey: input.idempotencyKey });
1118
1068
  if (!res.ok) {
1119
- throw new HarborHttpError(`Gateway sandbox guardrail bootstrap HTTP ${res.status}: ${text}`, {
1069
+ throw new HarborHttpError(`Gateway sandbox guardrail bootstrap HTTP ${res.status}`, {
1120
1070
  statusCode: res.status,
1121
1071
  url,
1122
1072
  bodyText: text,
@@ -1151,7 +1101,7 @@ export class PaybondGuardrails {
1151
1101
  }
1152
1102
  const { res, text, url } = await this.postJSON(`/v1/sandbox/guardrails/${encodeURIComponent(input.intentId)}/evidence`, payload, { idempotencyKey: input.idempotencyKey });
1153
1103
  if (!res.ok) {
1154
- throw new HarborHttpError(`Gateway sandbox guardrail evidence HTTP ${res.status}: ${text}`, {
1104
+ throw new HarborHttpError(`Gateway sandbox guardrail evidence HTTP ${res.status}`, {
1155
1105
  statusCode: res.status,
1156
1106
  url,
1157
1107
  bodyText: text,
@@ -1431,16 +1381,17 @@ export class GatewaySignalClient {
1431
1381
  lastErr = e;
1432
1382
  if (attempt + 1 >= this.maxRetries)
1433
1383
  throw e;
1434
- await new Promise((r) => setTimeout(r, backoffMs(attempt)));
1384
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, null)));
1435
1385
  continue;
1436
1386
  }
1437
1387
  if ([429, 500, 502, 503, 504].includes(res.status)) {
1438
1388
  if (attempt + 1 >= this.maxRetries) {
1439
1389
  return res;
1440
1390
  }
1441
- const raSec = parseRetryAfterSeconds(res.headers.get("retry-after"));
1442
- const delayMs = raSec != null ? raSec * 1000 : backoffMs(attempt);
1443
- await new Promise((r) => setTimeout(r, delayMs));
1391
+ if (!(await shouldRetryGatewayResponse(res))) {
1392
+ return res;
1393
+ }
1394
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, res.headers.get("retry-after"))));
1444
1395
  continue;
1445
1396
  }
1446
1397
  return res;
@@ -1592,16 +1543,17 @@ export class GatewayFraudClient {
1592
1543
  lastErr = e;
1593
1544
  if (attempt + 1 >= this.maxRetries)
1594
1545
  throw e;
1595
- await new Promise((r) => setTimeout(r, backoffMs(attempt)));
1546
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, null)));
1596
1547
  continue;
1597
1548
  }
1598
1549
  if ([429, 500, 502, 503, 504].includes(res.status)) {
1599
1550
  if (attempt + 1 >= this.maxRetries) {
1600
1551
  return res;
1601
1552
  }
1602
- const raSec = parseRetryAfterSeconds(res.headers.get("retry-after"));
1603
- const delayMs = raSec != null ? raSec * 1000 : backoffMs(attempt);
1604
- await new Promise((r) => setTimeout(r, delayMs));
1553
+ if (!(await shouldRetryGatewayResponse(res))) {
1554
+ return res;
1555
+ }
1556
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, res.headers.get("retry-after"))));
1605
1557
  continue;
1606
1558
  }
1607
1559
  return res;
@@ -1873,16 +1825,17 @@ export class GatewayA2AClient {
1873
1825
  lastErr = e;
1874
1826
  if (attempt + 1 >= this.maxRetries)
1875
1827
  throw e;
1876
- await new Promise((r) => setTimeout(r, backoffMs(attempt)));
1828
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, null)));
1877
1829
  continue;
1878
1830
  }
1879
1831
  if ([429, 500, 502, 503, 504].includes(res.status)) {
1880
1832
  if (attempt + 1 >= this.maxRetries) {
1881
1833
  return res;
1882
1834
  }
1883
- const raSec = parseRetryAfterSeconds(res.headers.get("retry-after"));
1884
- const delayMs = raSec != null ? raSec * 1000 : backoffMs(attempt);
1885
- await new Promise((r) => setTimeout(r, delayMs));
1835
+ if (!(await shouldRetryGatewayResponse(res))) {
1836
+ return res;
1837
+ }
1838
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, res.headers.get("retry-after"))));
1886
1839
  continue;
1887
1840
  }
1888
1841
  return res;
@@ -1942,29 +1895,7 @@ export class GatewayProtocolClient {
1942
1895
  this.maxRetries = Math.max(1, init?.maxRetries ?? 3);
1943
1896
  }
1944
1897
  async fetchWithRetries(url, init) {
1945
- let lastErr;
1946
- for (let attempt = 0; attempt < this.maxRetries; attempt++) {
1947
- let res;
1948
- try {
1949
- res = await fetch(url, init);
1950
- }
1951
- catch (e) {
1952
- lastErr = e;
1953
- if (attempt + 1 >= this.maxRetries) {
1954
- throw e;
1955
- }
1956
- await new Promise((r) => setTimeout(r, backoffMs(attempt)));
1957
- continue;
1958
- }
1959
- if ([429, 500, 502, 503, 504].includes(res.status) && attempt + 1 < this.maxRetries) {
1960
- const raSec = parseRetryAfterSeconds(res.headers.get("retry-after"));
1961
- const delayMs = raSec != null ? raSec * 1000 : backoffMs(attempt);
1962
- await new Promise((r) => setTimeout(r, delayMs));
1963
- continue;
1964
- }
1965
- return res;
1966
- }
1967
- throw lastErr instanceof Error ? lastErr : new Error(String(lastErr));
1898
+ return fetchWithGatewayRetries(url, init, this.maxRetries);
1968
1899
  }
1969
1900
  headers(extra) {
1970
1901
  const headers = new Headers(extra);
@@ -2130,15 +2061,13 @@ async function resolveGatewayTenantId(gatewayBaseUrl, apiKey, principalPath, max
2130
2061
  if (attempt + 1 >= maxRetries) {
2131
2062
  throw e;
2132
2063
  }
2133
- await new Promise((r) => setTimeout(r, backoffMs(attempt)));
2064
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, null)));
2134
2065
  continue;
2135
2066
  }
2136
2067
  const text = await res.text();
2137
2068
  if (!res.ok) {
2138
2069
  if ([429, 500, 502, 503, 504].includes(res.status) && attempt + 1 < maxRetries) {
2139
- const raSec = parseRetryAfterSeconds(res.headers.get("retry-after"));
2140
- const delayMs = raSec != null ? raSec * 1000 : backoffMs(attempt);
2141
- await new Promise((r) => setTimeout(r, delayMs));
2070
+ await new Promise((r) => setTimeout(r, gatewayRetryDelayMs(attempt, res.headers.get("retry-after"))));
2142
2071
  continue;
2143
2072
  }
2144
2073
  throw new GatewayAuthError(`gateway principal HTTP ${res.status}`, {
@@ -13,7 +13,7 @@ import { McpCapabilityTokenCache, mcpToolStoresCapabilityToken, parseMcpCapabili
13
13
  import { createMcpPolicyGatewayAdapter, McpPolicyReloadGate, parseMcpPolicyReloadConfig, } from "./mcp-policy-reload.js";
14
14
  import { DEFAULT_PAYBOND_GATEWAY_BASE_URL, GatewayFraudClient, GatewaySignalClient, } from "./index.js";
15
15
  const SERVER_NAME = "Paybond MCP";
16
- const SERVER_VERSION = "0.11.4";
16
+ const SERVER_VERSION = "0.11.6";
17
17
  const MCP_PROTOCOL_VERSION = "2025-11-25";
18
18
  const DEFAULT_PRINCIPAL_PATH = "/v1/auth/principal";
19
19
  const DEFAULT_RECOGNITION_VERIFIER_ID = "paybond-gateway";
@@ -59,12 +59,13 @@ export function policySandboxBootstrap(document, options = {}) {
59
59
  completionPreset: evidencePreset,
60
60
  metadata: options.metadata,
61
61
  idempotencyKey: options.idempotencyKey,
62
- templateId: preset.harbor_template_id,
63
- parameters: preset.parameters,
64
62
  };
65
63
  // Gateway rejects requests that include both completion_preset and evidence_schema.
64
+ // Gateway also rejects completion_preset and template_id together — catalog resolves the template.
66
65
  if (!evidencePreset.trim()) {
67
66
  bootstrap.evidenceSchema = options.evidenceSchema ?? preset.evidence_schema;
67
+ bootstrap.templateId = preset.harbor_template_id;
68
+ bootstrap.parameters = preset.parameters;
68
69
  }
69
70
  else if (options.evidenceSchema !== undefined) {
70
71
  throw new PaybondPolicySandboxBootstrapError("completion_preset and evidenceSchema are mutually exclusive for sandbox bootstrap");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paybond/kit",
3
- "version": "0.11.4",
3
+ "version": "0.11.6",
4
4
  "mcpName": "io.github.nonameuserd/paybond",
5
5
  "description": "Paybond Kit for TypeScript: agent spend governance for paid tool calls with spend authorization, evidence receipts, refunds, disputes, hosted Gateway sessions, and settlement.",
6
6
  "license": "Apache-2.0",
@@ -117,6 +117,7 @@
117
117
  "test": "vitest run",
118
118
  "pack:dry-run": "npm pack --dry-run",
119
119
  "verify:release": "node ./scripts/verify-release.mjs",
120
+ "verify:template-locks": "node ./scripts/verify-template-lock-integrity.mjs",
120
121
  "prepack": "npm run build"
121
122
  },
122
123
  "peerDependencies": {
@@ -153,7 +154,8 @@
153
154
  "@noble/secp256k1": "^2.2.3",
154
155
  "ajv": "^8.17.1",
155
156
  "blake3": "^2.1.7",
156
- "uuid": "^14.0.0"
157
+ "uuid": "^14.0.0",
158
+ "zod": "^4.4.3"
157
159
  },
158
160
  "devDependencies": {
159
161
  "@anthropic-ai/claude-agent-sdk": "^0.3.197",
@@ -13,7 +13,7 @@
13
13
  "evidence_preset": "cost_and_completion",
14
14
  "smoke_result_body": { "status": "completed", "cost_cents": 18700 },
15
15
  "dependencies": {
16
- "@paybond/kit": "^0.11.4",
16
+ "@paybond/kit": "^0.11.6",
17
17
  "@langchain/core": "^1.2.1",
18
18
  "@langchain/langgraph": "^1.4.7",
19
19
  "zod": "^4.2.0"
@@ -33,7 +33,7 @@
33
33
  "evidence_preset": "cost_and_completion",
34
34
  "smoke_result_body": { "status": "completed", "cost_cents": 4500 },
35
35
  "dependencies": {
36
- "@paybond/kit": "^0.11.4",
36
+ "@paybond/kit": "^0.11.6",
37
37
  "ai": "^5.0.0",
38
38
  "zod": "^4.2.0"
39
39
  },
@@ -52,7 +52,7 @@
52
52
  "evidence_preset": "cost_and_completion",
53
53
  "smoke_result_body": { "status": "completed", "cost_cents": 2900 },
54
54
  "dependencies": {
55
- "@paybond/kit": "^0.11.4",
55
+ "@paybond/kit": "^0.11.6",
56
56
  "@openai/agents": "^0.4.0",
57
57
  "zod": "^4.2.0"
58
58
  },
@@ -71,7 +71,7 @@
71
71
  "evidence_preset": "cost_and_completion",
72
72
  "smoke_result_body": { "status": "completed", "cost_cents": 4500 },
73
73
  "dependencies": {
74
- "@paybond/kit": "^0.11.4",
74
+ "@paybond/kit": "^0.11.6",
75
75
  "@openai/agents": "^0.4.0",
76
76
  "zod": "^4.2.0"
77
77
  },
@@ -90,7 +90,7 @@
90
90
  "evidence_preset": "cost_and_completion",
91
91
  "smoke_result_body": { "status": "completed", "cost_cents": 18700 },
92
92
  "dependencies": {
93
- "@paybond/kit": "^0.11.4",
93
+ "@paybond/kit": "^0.11.6",
94
94
  "@anthropic-ai/claude-agent-sdk": "^0.2.100",
95
95
  "zod": "^4.2.0"
96
96
  },
@@ -110,7 +110,7 @@
110
110
  "evidence_preset": "cost_and_completion",
111
111
  "smoke_result_body": { "status": "completed", "cost_cents": 500 },
112
112
  "dependencies": {
113
- "@paybond/kit": "^0.11.4"
113
+ "@paybond/kit": "^0.11.6"
114
114
  },
115
115
  "mcp_tool_policy": "spend-write"
116
116
  },
@@ -127,7 +127,7 @@
127
127
  "evidence_preset": "cost_and_completion",
128
128
  "smoke_result_body": { "status": "completed", "cost_cents": 12000 },
129
129
  "dependencies": {
130
- "@paybond/kit": "^0.11.4"
130
+ "@paybond/kit": "^0.11.6"
131
131
  },
132
132
  "demo_mode": "generic"
133
133
  },
@@ -143,7 +143,7 @@
143
143
  "evidence_preset": "cost_and_completion",
144
144
  "smoke_result_body": { "status": "completed", "cost_cents": 12500 },
145
145
  "dependencies": {
146
- "@paybond/kit": "^0.11.4"
146
+ "@paybond/kit": "^0.11.6"
147
147
  },
148
148
  "demo_mode": "generic"
149
149
  },
@@ -159,7 +159,7 @@
159
159
  "evidence_preset": "cost_and_completion",
160
160
  "smoke_result_body": { "status": "completed", "cost_cents": 2900 },
161
161
  "python_dependencies": {
162
- "paybond-kit": ">=0.11.4",
162
+ "paybond-kit": ">=0.11.6",
163
163
  "langgraph": ">=1.2.0"
164
164
  },
165
165
  "demo_import": "paybond_kit.langgraph_sandbox_demo",
@@ -10,7 +10,7 @@ cd openai-shopping-agent
10
10
  cp .env.example .env.local
11
11
  paybond login
12
12
  npm install
13
- npm run smoke # or: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation commerce.checkout --requested-spend-cents 4500 --evidence-preset cost_and_completion --result-body '{"status":"completed","cost_cents":4500}' --format json
13
+ npm run smoke # or: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation commerce.checkout --requested-spend-cents 4500 --result-body '{"status":"completed","cost_cents":4500}' --format json
14
14
  ```
15
15
 
16
16
  ## Run the demo
@@ -7,7 +7,7 @@
7
7
  "name": "openai-shopping-agent",
8
8
  "dependencies": {
9
9
  "@openai/agents": "^0.4.0",
10
- "@paybond/kit": "^0.11.4",
10
+ "@paybond/kit": "^0.11.6",
11
11
  "zod": "^4.2.0"
12
12
  },
13
13
  "devDependencies": {
@@ -169,9 +169,9 @@
169
169
  }
170
170
  },
171
171
  "node_modules/@paybond/kit": {
172
- "version": "0.11.4",
173
- "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.11.4.tgz",
174
- "integrity": "sha512-x2eZuv8IDvZtPNiYl0N5Ik3gnXb9JLiNNbrLphLfEzVO3ItpWeIWziRfB0flgXjva+P2jziAzwTXUKjeSHrfpQ==",
172
+ "version": "0.11.6",
173
+ "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.11.6.tgz",
174
+ "integrity": "sha512-j4MYl0iqP2XG7Y2vshOxN+tC9ZdJCjlM9burdol2z6b2r45/IpgpA2qiy0L21uLo0qaB+Q9wakoPMIlmnS1Tsg==",
175
175
  "license": "Apache-2.0",
176
176
  "dependencies": {
177
177
  "@noble/ed25519": "^2.2.1",
@@ -179,7 +179,8 @@
179
179
  "@noble/secp256k1": "^2.2.3",
180
180
  "ajv": "^8.17.1",
181
181
  "blake3": "^2.1.7",
182
- "uuid": "^14.0.0"
182
+ "uuid": "^14.0.0",
183
+ "zod": "^4.4.3"
183
184
  },
184
185
  "bin": {
185
186
  "paybond": "dist/cli.js",
@@ -5,10 +5,10 @@
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
7
7
  "start": "node dist/index.js",
8
- "smoke": "paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation commerce.checkout --requested-spend-cents 4500 --evidence-preset cost_and_completion --result-body '{\"status\":\"completed\",\"cost_cents\":4500}' --format json"
8
+ "smoke": "paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation commerce.checkout --requested-spend-cents 4500 --result-body '{\"status\":\"completed\",\"cost_cents\":4500}' --format json"
9
9
  },
10
10
  "dependencies": {
11
- "@paybond/kit": "^0.11.4",
11
+ "@paybond/kit": "^0.11.6",
12
12
  "@openai/agents": "^0.4.0",
13
13
  "zod": "^4.2.0"
14
14
  },
@@ -10,7 +10,7 @@ cd paybond-aws-operator
10
10
  cp .env.example .env.local
11
11
  paybond login
12
12
  npm install
13
- npm run smoke # or: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation aws.ec2.start_instance --requested-spend-cents 12500 --evidence-preset cost_and_completion --result-body '{"status":"completed","cost_cents":12500}' --format json
13
+ npm run smoke # or: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation aws.ec2.start_instance --requested-spend-cents 12500 --result-body '{"status":"completed","cost_cents":12500}' --format json
14
14
  ```
15
15
 
16
16
  ## Run the demo
@@ -6,7 +6,7 @@
6
6
  "": {
7
7
  "name": "paybond-aws-operator",
8
8
  "dependencies": {
9
- "@paybond/kit": "^0.11.4"
9
+ "@paybond/kit": "^0.11.6"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@types/node": "^22.10.1",
@@ -47,9 +47,9 @@
47
47
  }
48
48
  },
49
49
  "node_modules/@paybond/kit": {
50
- "version": "0.11.4",
51
- "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.11.4.tgz",
52
- "integrity": "sha512-+DWUtlEkl7EGPnqyQxHDlYC4wKdsIDKzmjyML7spbbVt7NBRJu86KuaXUYICPCAySf19gJu84zxUk3FkAAfeBg==",
50
+ "version": "0.11.6",
51
+ "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.11.6.tgz",
52
+ "integrity": "sha512-j4MYl0iqP2XG7Y2vshOxN+tC9ZdJCjlM9burdol2z6b2r45/IpgpA2qiy0L21uLo0qaB+Q9wakoPMIlmnS1Tsg==",
53
53
  "license": "Apache-2.0",
54
54
  "dependencies": {
55
55
  "@noble/ed25519": "^2.2.1",
@@ -57,7 +57,8 @@
57
57
  "@noble/secp256k1": "^2.2.3",
58
58
  "ajv": "^8.17.1",
59
59
  "blake3": "^2.1.7",
60
- "uuid": "^14.0.0"
60
+ "uuid": "^14.0.0",
61
+ "zod": "^4.4.3"
61
62
  },
62
63
  "bin": {
63
64
  "paybond": "dist/cli.js",
@@ -200,6 +201,15 @@
200
201
  "bin": {
201
202
  "uuid": "dist-node/bin/uuid"
202
203
  }
204
+ },
205
+ "node_modules/zod": {
206
+ "version": "4.4.3",
207
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
208
+ "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
209
+ "license": "MIT",
210
+ "funding": {
211
+ "url": "https://github.com/sponsors/colinhacks"
212
+ }
203
213
  }
204
214
  }
205
215
  }
@@ -5,10 +5,10 @@
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
7
7
  "start": "node dist/index.js",
8
- "smoke": "paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation aws.ec2.start_instance --requested-spend-cents 12500 --evidence-preset cost_and_completion --result-body '{\"status\":\"completed\",\"cost_cents\":12500}' --format json"
8
+ "smoke": "paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation aws.ec2.start_instance --requested-spend-cents 12500 --result-body '{\"status\":\"completed\",\"cost_cents\":12500}' --format json"
9
9
  },
10
10
  "dependencies": {
11
- "@paybond/kit": "^0.11.4"
11
+ "@paybond/kit": "^0.11.6"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@types/node": "^22.10.1",
@@ -10,7 +10,7 @@ cd paybond-claude-agents-demo
10
10
  cp .env.example .env.local
11
11
  paybond login
12
12
  npm install
13
- npm run smoke # or: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation travel.book_hotel --requested-spend-cents 18700 --evidence-preset cost_and_completion --result-body '{"status":"completed","cost_cents":18700}' --format json
13
+ npm run smoke # or: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation travel.book_hotel --requested-spend-cents 18700 --result-body '{"status":"completed","cost_cents":18700}' --format json
14
14
  ```
15
15
 
16
16
  ## Run the demo
@@ -7,7 +7,7 @@
7
7
  "name": "paybond-claude-agents-demo",
8
8
  "dependencies": {
9
9
  "@anthropic-ai/claude-agent-sdk": "^0.2.100",
10
- "@paybond/kit": "^0.11.4",
10
+ "@paybond/kit": "^0.11.6",
11
11
  "zod": "^4.2.0"
12
12
  },
13
13
  "devDependencies": {
@@ -260,9 +260,9 @@
260
260
  }
261
261
  },
262
262
  "node_modules/@paybond/kit": {
263
- "version": "0.11.4",
264
- "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.11.4.tgz",
265
- "integrity": "sha512-c7Rmv+0kWljW1Nov8e9gthOMLYUPyBG4GhRKUxmAO87tGNZZmL7Q/kAPpbehsNLgkJPc6QOb7xRiBk9EvOWjXg==",
263
+ "version": "0.11.6",
264
+ "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.11.6.tgz",
265
+ "integrity": "sha512-j4MYl0iqP2XG7Y2vshOxN+tC9ZdJCjlM9burdol2z6b2r45/IpgpA2qiy0L21uLo0qaB+Q9wakoPMIlmnS1Tsg==",
266
266
  "license": "Apache-2.0",
267
267
  "dependencies": {
268
268
  "@noble/ed25519": "^2.2.1",
@@ -270,7 +270,8 @@
270
270
  "@noble/secp256k1": "^2.2.3",
271
271
  "ajv": "^8.17.1",
272
272
  "blake3": "^2.1.7",
273
- "uuid": "^14.0.0"
273
+ "uuid": "^14.0.0",
274
+ "zod": "^4.4.3"
274
275
  },
275
276
  "bin": {
276
277
  "paybond": "dist/cli.js",
@@ -5,10 +5,10 @@
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
7
7
  "start": "node dist/index.js",
8
- "smoke": "paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation travel.book_hotel --requested-spend-cents 18700 --evidence-preset cost_and_completion --result-body '{\"status\":\"completed\",\"cost_cents\":18700}' --format json"
8
+ "smoke": "paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation travel.book_hotel --requested-spend-cents 18700 --result-body '{\"status\":\"completed\",\"cost_cents\":18700}' --format json"
9
9
  },
10
10
  "dependencies": {
11
- "@paybond/kit": "^0.11.4",
11
+ "@paybond/kit": "^0.11.6",
12
12
  "@anthropic-ai/claude-agent-sdk": "^0.2.100",
13
13
  "zod": "^4.2.0"
14
14
  },
@@ -14,6 +14,6 @@ jobs:
14
14
  python-version: "3.11"
15
15
  - uses: actions/checkout@v4
16
16
  - run: pip install -r requirements.txt
17
- - run: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation saas.provision_seat --requested-spend-cents 2900 --evidence-preset cost_and_completion --result-body '{"status":"completed","cost_cents":2900}' --format json
17
+ - run: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation saas.provision_seat --requested-spend-cents 2900 --result-body '{"status":"completed","cost_cents":2900}' --format json
18
18
  env:
19
19
  PAYBOND_API_KEY: ${{ secrets.PAYBOND_SANDBOX_API_KEY }}
@@ -10,7 +10,7 @@ cd paybond-invoice-agent
10
10
  cp .env.example .env.local
11
11
  paybond-kit-login
12
12
  pip install -r requirements.txt
13
- npm run smoke # or: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation saas.provision_seat --requested-spend-cents 2900 --evidence-preset cost_and_completion --result-body '{"status":"completed","cost_cents":2900}' --format json
13
+ npm run smoke # or: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation saas.provision_seat --requested-spend-cents 2900 --result-body '{"status":"completed","cost_cents":2900}' --format json
14
14
  ```
15
15
 
16
16
  ## Run the demo
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "private": true,
3
3
  "scripts": {
4
- "smoke": "paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation saas.provision_seat --requested-spend-cents 2900 --evidence-preset cost_and_completion --result-body '{\"status\":\"completed\",\"cost_cents\":2900}' --format json"
4
+ "smoke": "paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation saas.provision_seat --requested-spend-cents 2900 --result-body '{\"status\":\"completed\",\"cost_cents\":2900}' --format json"
5
5
  }
6
6
  }
@@ -1,2 +1,2 @@
1
- paybond-kit>=0.11.4
1
+ paybond-kit>=0.11.6
2
2
  langgraph>=1.2.0
@@ -10,7 +10,7 @@ cd paybond-mcp-coding-agent
10
10
  cp .env.example .env.local
11
11
  paybond login
12
12
  npm install
13
- npm run smoke # or: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation deploy.preview --requested-spend-cents 500 --evidence-preset cost_and_completion --result-body '{"status":"completed","cost_cents":500}' --format json
13
+ npm run smoke # or: paybond agent sandbox smoke --policy-file paybond.policy.yaml --operation deploy.preview --requested-spend-cents 500 --result-body '{"status":"completed","cost_cents":500}' --format json
14
14
  ```
15
15
 
16
16
  ## Run the demo