@paybond/kit 0.12.0 → 0.12.2

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 (107) hide show
  1. package/dist/agent/evidence.d.ts +10 -0
  2. package/dist/agent/evidence.js +16 -0
  3. package/dist/agent/index.d.ts +1 -1
  4. package/dist/agent/index.js +1 -1
  5. package/dist/agent/interceptor.js +4 -0
  6. package/dist/agent/receipt-client.d.ts +16 -1
  7. package/dist/agent/run.d.ts +3 -0
  8. package/dist/agent/run.js +1 -1
  9. package/dist/agent-mandate.d.ts +103 -0
  10. package/dist/agent-mandate.js +423 -0
  11. package/dist/agent-receipt-external-attestations.d.ts +27 -0
  12. package/dist/agent-receipt-external-attestations.js +61 -0
  13. package/dist/agent-receipt-pdf-export.d.ts +43 -0
  14. package/dist/agent-receipt-pdf-export.js +109 -0
  15. package/dist/agent-receipt-prevalidate.d.ts +7 -0
  16. package/dist/agent-receipt-prevalidate.js +63 -0
  17. package/dist/agent-receipt.d.ts +21 -1
  18. package/dist/agent-receipt.js +63 -4
  19. package/dist/cli/command-spec.js +50 -1
  20. package/dist/cli/commands/dev.js +10 -3
  21. package/dist/cli/commands/setup.js +19 -1
  22. package/dist/cli/commands/shopify.d.ts +53 -0
  23. package/dist/cli/commands/shopify.js +808 -0
  24. package/dist/cli/help.d.ts +1 -1
  25. package/dist/cli/help.js +13 -3
  26. package/dist/cli/router.js +15 -1
  27. package/dist/commerce-binding.d.ts +59 -0
  28. package/dist/commerce-binding.js +129 -0
  29. package/dist/doctor-completion.d.ts +16 -0
  30. package/dist/doctor-completion.js +157 -1
  31. package/dist/index.d.ts +27 -2
  32. package/dist/index.js +43 -7
  33. package/dist/mcp-server.d.ts +1 -0
  34. package/dist/mcp-server.js +38 -11
  35. package/dist/policy/presets.d.ts +1 -1
  36. package/dist/policy/presets.js +1 -0
  37. package/dist/project-init.d.ts +1 -1
  38. package/dist/project-init.js +1 -0
  39. package/dist/protocol-receipt.d.ts +129 -0
  40. package/dist/protocol-receipt.js +620 -0
  41. package/dist/shopify/checkout.d.ts +29 -0
  42. package/dist/shopify/checkout.js +79 -0
  43. package/dist/shopify/evidence.d.ts +13 -0
  44. package/dist/shopify/evidence.js +85 -0
  45. package/dist/shopify/index.d.ts +8 -0
  46. package/dist/shopify/index.js +6 -0
  47. package/dist/shopify/instrument.d.ts +61 -0
  48. package/dist/shopify/instrument.js +52 -0
  49. package/dist/shopify/order.d.ts +8 -0
  50. package/dist/shopify/order.js +110 -0
  51. package/dist/shopify/types.d.ts +82 -0
  52. package/dist/shopify/types.js +4 -0
  53. package/dist/solutions/catalog.d.ts +1 -1
  54. package/dist/solutions/catalog.js +1 -1
  55. package/dist/stripe-commerce/evidence.d.ts +13 -0
  56. package/dist/stripe-commerce/evidence.js +164 -0
  57. package/dist/stripe-commerce/index.d.ts +3 -0
  58. package/dist/stripe-commerce/index.js +2 -0
  59. package/dist/stripe-commerce/metadata.d.ts +11 -0
  60. package/dist/stripe-commerce/metadata.js +34 -0
  61. package/dist/stripe-commerce/types.d.ts +38 -0
  62. package/dist/stripe-commerce/types.js +1 -0
  63. package/dist/template-init.d.ts +1 -1
  64. package/dist/template-init.js +6 -1
  65. package/package.json +1 -1
  66. package/policy/presets/stripe-commerce.yaml +19 -0
  67. package/solutions/stripe-commerce.json +19 -0
  68. package/templates/manifest.json +82 -10
  69. package/templates/openai-shopping-agent/package-lock.json +10 -10
  70. package/templates/openai-shopping-agent/src/paybond.config.ts +1 -1
  71. package/templates/paybond-aws-operator/package-lock.json +7 -7
  72. package/templates/paybond-aws-operator/src/paybond.config.ts +1 -1
  73. package/templates/paybond-claude-agents-demo/package-lock.json +7 -7
  74. package/templates/paybond-claude-agents-demo/src/paybond.config.ts +1 -1
  75. package/templates/paybond-mastra-travel-agent/package-lock.json +30 -30
  76. package/templates/paybond-mastra-travel-agent/src/paybond.config.ts +1 -1
  77. package/templates/paybond-mcp-coding-agent/package-lock.json +7 -7
  78. package/templates/paybond-mcp-coding-agent/src/paybond.config.ts +1 -1
  79. package/templates/paybond-openai-agents-demo/package-lock.json +10 -10
  80. package/templates/paybond-openai-agents-demo/src/paybond.config.ts +1 -1
  81. package/templates/paybond-procurement-agent/package-lock.json +7 -7
  82. package/templates/paybond-procurement-agent/src/paybond.config.ts +1 -1
  83. package/templates/paybond-shopify-shopping-agent/.env.example +3 -0
  84. package/templates/paybond-shopify-shopping-agent/.github/workflows/smoke.yml +20 -0
  85. package/templates/paybond-shopify-shopping-agent/LICENSE +201 -0
  86. package/templates/paybond-shopify-shopping-agent/README.md +29 -0
  87. package/templates/paybond-shopify-shopping-agent/package-lock.json +223 -0
  88. package/templates/paybond-shopify-shopping-agent/package.json +20 -0
  89. package/templates/paybond-shopify-shopping-agent/paybond.policy.yaml +22 -0
  90. package/templates/paybond-shopify-shopping-agent/src/index.ts +54 -0
  91. package/templates/paybond-shopify-shopping-agent/src/paybond.config.ts +51 -0
  92. package/templates/paybond-shopify-shopping-agent/tsconfig.json +13 -0
  93. package/templates/paybond-stripe-agent-demo/.env.example +9 -0
  94. package/templates/paybond-stripe-agent-demo/.github/workflows/smoke.yml +20 -0
  95. package/templates/paybond-stripe-agent-demo/LICENSE +201 -0
  96. package/templates/paybond-stripe-agent-demo/README.md +50 -0
  97. package/templates/paybond-stripe-agent-demo/package-lock.json +223 -0
  98. package/templates/paybond-stripe-agent-demo/package.json +20 -0
  99. package/templates/paybond-stripe-agent-demo/paybond.policy.yaml +22 -0
  100. package/templates/paybond-stripe-agent-demo/src/charge-customer.ts +237 -0
  101. package/templates/paybond-stripe-agent-demo/src/index.ts +78 -0
  102. package/templates/paybond-stripe-agent-demo/src/paybond.config.ts +51 -0
  103. package/templates/paybond-stripe-agent-demo/tsconfig.json +13 -0
  104. package/templates/paybond-travel-agent/package-lock.json +13 -13
  105. package/templates/paybond-travel-agent/src/paybond.config.ts +1 -1
  106. package/templates/paybond-vercel-shopping-agent/package-lock.json +7 -7
  107. package/templates/paybond-vercel-shopping-agent/src/paybond.config.ts +1 -1
@@ -0,0 +1,164 @@
1
+ import { jsonValueDigest } from "../json-digest.js";
2
+ export const STRIPE_COMMERCE_MAPPER_VERSION = "stripe_commerce_v1";
3
+ const STRIPE_FUNDING_EVENT_TYPES = new Set([
4
+ "payment_intent.succeeded",
5
+ "payment_intent.payment_failed",
6
+ "payment_intent.canceled",
7
+ "payment_intent.processing",
8
+ "payment_intent.requires_action",
9
+ "payment_intent.amount_capturable_updated",
10
+ "charge.succeeded",
11
+ "charge.failed",
12
+ "charge.pending",
13
+ "charge.refunded",
14
+ "charge.updated",
15
+ "charge.dispute.created",
16
+ "charge.dispute.closed",
17
+ ]);
18
+ const STRIPE_FUNDING_EVENT_PREFIXES = ["payment_intent.", "charge.", "payout.", "mandate."];
19
+ function readObject(value) {
20
+ if (value !== null && typeof value === "object" && !Array.isArray(value)) {
21
+ return value;
22
+ }
23
+ return undefined;
24
+ }
25
+ function readString(record, ...keys) {
26
+ for (const key of keys) {
27
+ const value = record[key];
28
+ if (typeof value === "string" && value.trim().length > 0) {
29
+ return value.trim();
30
+ }
31
+ }
32
+ return undefined;
33
+ }
34
+ function readNumber(record, ...keys) {
35
+ for (const key of keys) {
36
+ const value = record[key];
37
+ if (typeof value === "number" && Number.isFinite(value)) {
38
+ return value;
39
+ }
40
+ }
41
+ return undefined;
42
+ }
43
+ function isStripeFundingEventType(eventType) {
44
+ if (STRIPE_FUNDING_EVENT_TYPES.has(eventType)) {
45
+ return true;
46
+ }
47
+ return STRIPE_FUNDING_EVENT_PREFIXES.some((prefix) => eventType.startsWith(prefix));
48
+ }
49
+ /**
50
+ * Rejects Stripe funding webhook envelopes — those fund Harbor intents and must not
51
+ * be submitted as tool-completion evidence.
52
+ */
53
+ export function assertNotStripeFundingWebhook(input) {
54
+ const objectKind = readString(input, "object");
55
+ if (objectKind === "event") {
56
+ throw new Error("Stripe event webhooks are funding signals, not tool-completion evidence");
57
+ }
58
+ const eventType = readString(input, "type", "event_type", "eventType");
59
+ if (eventType && isStripeFundingEventType(eventType)) {
60
+ throw new Error(`${eventType} webhooks are funding signals, not tool-completion evidence`);
61
+ }
62
+ const eventId = readString(input, "id");
63
+ if (eventId?.startsWith("evt_") && eventType) {
64
+ throw new Error("Stripe event webhooks are funding signals, not tool-completion evidence");
65
+ }
66
+ const data = readObject(input.data);
67
+ if (data && readObject(data.object)) {
68
+ throw new Error("Stripe webhook data.object envelopes are funding signals, not tool-completion evidence");
69
+ }
70
+ if (Object.prototype.hasOwnProperty.call(input, "pending_webhooks") &&
71
+ eventType !== undefined) {
72
+ throw new Error("Stripe event webhooks are funding signals, not tool-completion evidence");
73
+ }
74
+ }
75
+ function resolveChargeId(record) {
76
+ const direct = readString(record, "charge_id", "chargeId");
77
+ if (direct) {
78
+ return direct;
79
+ }
80
+ const latestCharge = record.latest_charge;
81
+ if (typeof latestCharge === "string" && latestCharge.startsWith("ch_")) {
82
+ return latestCharge;
83
+ }
84
+ const latestChargeObject = readObject(latestCharge);
85
+ if (latestChargeObject) {
86
+ const nestedId = readString(latestChargeObject, "id");
87
+ if (nestedId?.startsWith("ch_")) {
88
+ return nestedId;
89
+ }
90
+ }
91
+ const topLevelId = readString(record, "id");
92
+ if (topLevelId?.startsWith("ch_")) {
93
+ return topLevelId;
94
+ }
95
+ throw new Error("Stripe tool result missing charge_id");
96
+ }
97
+ function resolveCostCents(record) {
98
+ const cost = readNumber(record, "cost_cents", "costCents", "amount_cents", "amountCents") ??
99
+ readNumber(record, "amount_received", "amountReceived");
100
+ if (cost === undefined) {
101
+ throw new Error("Stripe tool result missing cost_cents");
102
+ }
103
+ if (!Number.isInteger(cost) || cost < 0) {
104
+ throw new Error("Stripe tool result cost_cents must be a non-negative integer");
105
+ }
106
+ return cost;
107
+ }
108
+ function normalizeCompletionStatus(status) {
109
+ const normalized = status.trim().toLowerCase();
110
+ if (normalized === "succeeded" || normalized === "requires_capture") {
111
+ return "completed";
112
+ }
113
+ return normalized;
114
+ }
115
+ function resolveHttpStatus(record, status) {
116
+ const explicit = readNumber(record, "http_status", "httpStatus");
117
+ if (explicit !== undefined) {
118
+ return explicit;
119
+ }
120
+ const normalized = status.trim().toLowerCase();
121
+ if (normalized === "succeeded" || normalized === "requires_capture") {
122
+ return 200;
123
+ }
124
+ return 402;
125
+ }
126
+ function stripeResponseDigestHex(chargeId, costCents) {
127
+ const digestBytes = jsonValueDigest({ charge_id: chargeId, cost_cents: costCents });
128
+ return `blake3:${Buffer.from(digestBytes).toString("hex")}`;
129
+ }
130
+ function mapStripeChargeEvidence(record) {
131
+ const chargeId = resolveChargeId(record);
132
+ const status = readString(record, "status") ?? "succeeded";
133
+ const costCents = resolveCostCents(record);
134
+ return {
135
+ charge_id: chargeId,
136
+ http_status: resolveHttpStatus(record, status),
137
+ response_digest: stripeResponseDigestHex(chargeId, costCents),
138
+ };
139
+ }
140
+ function mapCostAndCompletionEvidence(record) {
141
+ const status = readString(record, "status");
142
+ if (!status) {
143
+ throw new Error("Stripe tool result missing status");
144
+ }
145
+ return {
146
+ status: normalizeCompletionStatus(status),
147
+ cost_cents: resolveCostCents(record),
148
+ };
149
+ }
150
+ /**
151
+ * Normalizes Stripe SDK tool results into completion-catalog evidence fields.
152
+ *
153
+ * Rejects webhook-shaped funding payloads before mapping.
154
+ */
155
+ export function mapStripeToolResultToEvidence(toolResult, options) {
156
+ assertNotStripeFundingWebhook(toolResult);
157
+ if (options.preset === "stripe_charge") {
158
+ return mapStripeChargeEvidence(toolResult);
159
+ }
160
+ if (options.preset === "cost_and_completion") {
161
+ return mapCostAndCompletionEvidence(toolResult);
162
+ }
163
+ throw new Error(`mapStripeToolResultToEvidence: unsupported preset ${options.preset}`);
164
+ }
@@ -0,0 +1,3 @@
1
+ export { buildPaybondStripeMetadata, PAYBOND_STRIPE_METADATA_INTENT_ID_KEY, PAYBOND_STRIPE_METADATA_RAIL_KEY, PAYBOND_STRIPE_METADATA_TENANT_ID_KEY, } from "./metadata.js";
2
+ export { assertNotStripeFundingWebhook, mapStripeToolResultToEvidence, STRIPE_COMMERCE_MAPPER_VERSION, } from "./evidence.js";
3
+ export type { BuildPaybondStripeMetadataParams, CostAndCompletionEvidence, MapStripeToolResultToEvidenceOptions, PaybondStripeMetadata, PaybondStripeSettlementRail, StripeChargeVendorEvidence, StripeCommerceEvidencePreset, StripeToolResultInput, } from "./types.js";
@@ -0,0 +1,2 @@
1
+ export { buildPaybondStripeMetadata, PAYBOND_STRIPE_METADATA_INTENT_ID_KEY, PAYBOND_STRIPE_METADATA_RAIL_KEY, PAYBOND_STRIPE_METADATA_TENANT_ID_KEY, } from "./metadata.js";
2
+ export { assertNotStripeFundingWebhook, mapStripeToolResultToEvidence, STRIPE_COMMERCE_MAPPER_VERSION, } from "./evidence.js";
@@ -0,0 +1,11 @@
1
+ import type { BuildPaybondStripeMetadataParams } from "./types.js";
2
+ export declare const PAYBOND_STRIPE_METADATA_TENANT_ID_KEY = "tenant_id";
3
+ export declare const PAYBOND_STRIPE_METADATA_INTENT_ID_KEY = "paybond_intent_id";
4
+ export declare const PAYBOND_STRIPE_METADATA_RAIL_KEY = "paybond_settlement_rail";
5
+ /**
6
+ * Builds Stripe PaymentIntent metadata bound to a Harbor intent and tenant realm.
7
+ *
8
+ * Values must be sourced from authenticated Paybond session context — never from
9
+ * unauthenticated client input.
10
+ */
11
+ export declare function buildPaybondStripeMetadata(params: BuildPaybondStripeMetadataParams): Record<string, string>;
@@ -0,0 +1,34 @@
1
+ export const PAYBOND_STRIPE_METADATA_TENANT_ID_KEY = "tenant_id";
2
+ export const PAYBOND_STRIPE_METADATA_INTENT_ID_KEY = "paybond_intent_id";
3
+ export const PAYBOND_STRIPE_METADATA_RAIL_KEY = "paybond_settlement_rail";
4
+ const STRIPE_METADATA_RAILS = new Set([
5
+ "stripe_connect",
6
+ "stripe_ach_debit",
7
+ ]);
8
+ /**
9
+ * Builds Stripe PaymentIntent metadata bound to a Harbor intent and tenant realm.
10
+ *
11
+ * Values must be sourced from authenticated Paybond session context — never from
12
+ * unauthenticated client input.
13
+ */
14
+ export function buildPaybondStripeMetadata(params) {
15
+ const tenantId = params.tenantId.trim();
16
+ const intentId = params.intentId.trim();
17
+ if (!tenantId) {
18
+ throw new Error("buildPaybondStripeMetadata: tenantId is required");
19
+ }
20
+ if (!intentId) {
21
+ throw new Error("buildPaybondStripeMetadata: intentId is required");
22
+ }
23
+ const metadata = {
24
+ [PAYBOND_STRIPE_METADATA_TENANT_ID_KEY]: tenantId,
25
+ [PAYBOND_STRIPE_METADATA_INTENT_ID_KEY]: intentId,
26
+ };
27
+ if (params.rail !== undefined) {
28
+ if (!STRIPE_METADATA_RAILS.has(params.rail)) {
29
+ throw new Error("buildPaybondStripeMetadata: rail must be stripe_connect or stripe_ach_debit");
30
+ }
31
+ metadata[PAYBOND_STRIPE_METADATA_RAIL_KEY] = params.rail;
32
+ }
33
+ return metadata;
34
+ }
@@ -0,0 +1,38 @@
1
+ /** Settlement rails allowed on Stripe PaymentIntent metadata (Harbor webhook preflight). */
2
+ export type PaybondStripeSettlementRail = "stripe_connect" | "stripe_ach_debit";
3
+ /** Canonical Paybond metadata keys written to Stripe PaymentIntent.metadata. */
4
+ export type PaybondStripeMetadata = {
5
+ tenant_id: string;
6
+ paybond_intent_id: string;
7
+ paybond_settlement_rail?: PaybondStripeSettlementRail;
8
+ };
9
+ /** Inputs for {@link buildPaybondStripeMetadata}. Tenant id must come from Paybond session credentials. */
10
+ export type BuildPaybondStripeMetadataParams = {
11
+ tenantId: string;
12
+ intentId: string;
13
+ rail?: PaybondStripeSettlementRail;
14
+ };
15
+ /** Completion presets supported by {@link mapStripeToolResultToEvidence}. */
16
+ export type StripeCommerceEvidencePreset = "stripe_charge" | "cost_and_completion";
17
+ export type MapStripeToolResultToEvidenceOptions = {
18
+ preset: StripeCommerceEvidencePreset;
19
+ };
20
+ /** Vendor evidence shape for the `stripe_charge` completion preset. */
21
+ export type StripeChargeVendorEvidence = {
22
+ charge_id: string;
23
+ http_status: number;
24
+ response_digest: string;
25
+ };
26
+ /** Evidence shape for the `cost_and_completion` archetype preset. */
27
+ export type CostAndCompletionEvidence = {
28
+ status: string;
29
+ cost_cents: number;
30
+ };
31
+ /** Normalized Stripe SDK tool result fields accepted by the evidence mapper. */
32
+ export type StripeToolResultInput = {
33
+ payment_intent_id?: string;
34
+ charge_id?: string;
35
+ cost_cents?: number;
36
+ status?: string;
37
+ http_status?: number;
38
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { PolicyPresetId } from "./policy/presets.js";
2
- export type TemplateId = "travel-agent" | "mastra-travel-agent" | "vercel-shopping-agent" | "openai-agents-demo" | "openai-shopping-agent" | "claude-agents-demo" | "mcp-coding-agent" | "procurement-agent" | "invoice-agent" | "aws-operator";
2
+ export type TemplateId = "travel-agent" | "mastra-travel-agent" | "vercel-shopping-agent" | "openai-agents-demo" | "openai-shopping-agent" | "claude-agents-demo" | "mcp-coding-agent" | "procurement-agent" | "invoice-agent" | "aws-operator" | "stripe-agent-demo" | "shopify-shopping-agent";
3
3
  export type TemplateManifestEntry = {
4
4
  id: TemplateId;
5
5
  repo: string;
@@ -45,6 +45,10 @@ const TEMPLATE_ALIASES = {
45
45
  "paybond-invoice-agent": "invoice-agent",
46
46
  "aws-operator": "aws-operator",
47
47
  "paybond-aws-operator": "aws-operator",
48
+ "stripe-agent-demo": "stripe-agent-demo",
49
+ "paybond-stripe-agent-demo": "stripe-agent-demo",
50
+ "shopify-shopping-agent": "shopify-shopping-agent",
51
+ "paybond-shopify-shopping-agent": "shopify-shopping-agent",
48
52
  };
49
53
  function moduleDir() {
50
54
  return dirname(fileURLToPath(import.meta.url));
@@ -194,7 +198,8 @@ export function templateInitUsage() {
194
198
  "",
195
199
  "Templates:",
196
200
  " travel-agent, mastra-travel-agent, vercel-shopping-agent, openai-agents-demo, openai-shopping-agent,",
197
- " claude-agents-demo, mcp-coding-agent, procurement-agent, invoice-agent, aws-operator",
201
+ " claude-agents-demo, mcp-coding-agent, procurement-agent, invoice-agent, aws-operator, stripe-agent-demo,",
202
+ " shopify-shopping-agent",
198
203
  "",
199
204
  "Frameworks (with --template): generic|langgraph|vercel-ai|openai|openai-agents|claude-agents|mcp|mastra",
200
205
  "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paybond/kit",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
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",
@@ -0,0 +1,19 @@
1
+ version: 1
2
+ name: stripe-commerce-agent-v1
3
+ default_deny: true
4
+
5
+ tools:
6
+ payments.charge_customer:
7
+ side_effecting: true
8
+ max_spend_cents: 50000
9
+ evidence_preset: stripe_charge
10
+
11
+ payments.list_invoices:
12
+ side_effecting: false
13
+
14
+ intent:
15
+ allowed_tools:
16
+ - payments.charge_customer
17
+ budget:
18
+ currency: usd
19
+ max_spend_usd: 500
@@ -0,0 +1,19 @@
1
+ {
2
+ "id": "stripe-commerce",
3
+ "title": "Stripe commerce agent",
4
+ "policy_default": {
5
+ "domain": "stripe-commerce",
6
+ "guardrails": ["default_deny", "max_spend_usd_500"]
7
+ },
8
+ "primary_operation": "payments.charge_customer",
9
+ "completion_preset": "stripe_charge",
10
+ "smoke": {
11
+ "result_body": {
12
+ "payment_intent_id": "pi_smoke",
13
+ "charge_id": "ch_smoke",
14
+ "cost_cents": 2500,
15
+ "status": "succeeded"
16
+ },
17
+ "evidence_preset": "stripe_charge"
18
+ }
19
+ }
@@ -11,7 +11,10 @@
11
11
  "primary_operation": "travel.book_hotel",
12
12
  "requested_spend_cents": 18700,
13
13
  "evidence_preset": "cost_and_completion",
14
- "smoke_result_body": { "status": "completed", "cost_cents": 18700 },
14
+ "smoke_result_body": {
15
+ "status": "completed",
16
+ "cost_cents": 18700
17
+ },
15
18
  "dependencies": {
16
19
  "@paybond/kit": "^0.11.11",
17
20
  "@langchain/core": "^1.2.1",
@@ -31,7 +34,10 @@
31
34
  "primary_operation": "commerce.checkout",
32
35
  "requested_spend_cents": 4500,
33
36
  "evidence_preset": "cost_and_completion",
34
- "smoke_result_body": { "status": "completed", "cost_cents": 4500 },
37
+ "smoke_result_body": {
38
+ "status": "completed",
39
+ "cost_cents": 4500
40
+ },
35
41
  "dependencies": {
36
42
  "@paybond/kit": "^0.11.11",
37
43
  "ai": "^5.0.0",
@@ -50,7 +56,10 @@
50
56
  "primary_operation": "saas.provision_seat",
51
57
  "requested_spend_cents": 2900,
52
58
  "evidence_preset": "cost_and_completion",
53
- "smoke_result_body": { "status": "completed", "cost_cents": 2900 },
59
+ "smoke_result_body": {
60
+ "status": "completed",
61
+ "cost_cents": 2900
62
+ },
54
63
  "dependencies": {
55
64
  "@paybond/kit": "^0.11.11",
56
65
  "@openai/agents": "^0.4.0",
@@ -69,7 +78,10 @@
69
78
  "primary_operation": "commerce.checkout",
70
79
  "requested_spend_cents": 4500,
71
80
  "evidence_preset": "cost_and_completion",
72
- "smoke_result_body": { "status": "completed", "cost_cents": 4500 },
81
+ "smoke_result_body": {
82
+ "status": "completed",
83
+ "cost_cents": 4500
84
+ },
73
85
  "dependencies": {
74
86
  "@paybond/kit": "^0.11.11",
75
87
  "@openai/agents": "^0.4.0",
@@ -88,7 +100,10 @@
88
100
  "primary_operation": "travel.book_hotel",
89
101
  "requested_spend_cents": 18700,
90
102
  "evidence_preset": "cost_and_completion",
91
- "smoke_result_body": { "status": "completed", "cost_cents": 18700 },
103
+ "smoke_result_body": {
104
+ "status": "completed",
105
+ "cost_cents": 18700
106
+ },
92
107
  "dependencies": {
93
108
  "@paybond/kit": "^0.11.11",
94
109
  "@anthropic-ai/claude-agent-sdk": "^0.2.100",
@@ -107,7 +122,10 @@
107
122
  "primary_operation": "travel.book_hotel",
108
123
  "requested_spend_cents": 18700,
109
124
  "evidence_preset": "cost_and_completion",
110
- "smoke_result_body": { "status": "completed", "cost_cents": 18700 },
125
+ "smoke_result_body": {
126
+ "status": "completed",
127
+ "cost_cents": 18700
128
+ },
111
129
  "dependencies": {
112
130
  "@paybond/kit": "^0.11.11",
113
131
  "@mastra/core": "^1.49.0",
@@ -127,7 +145,10 @@
127
145
  "primary_operation": "deploy.preview",
128
146
  "requested_spend_cents": 500,
129
147
  "evidence_preset": "cost_and_completion",
130
- "smoke_result_body": { "status": "completed", "cost_cents": 500 },
148
+ "smoke_result_body": {
149
+ "status": "completed",
150
+ "cost_cents": 500
151
+ },
131
152
  "dependencies": {
132
153
  "@paybond/kit": "^0.11.11"
133
154
  },
@@ -144,7 +165,10 @@
144
165
  "primary_operation": "procurement.submit_po",
145
166
  "requested_spend_cents": 12000,
146
167
  "evidence_preset": "cost_and_completion",
147
- "smoke_result_body": { "status": "completed", "cost_cents": 12000 },
168
+ "smoke_result_body": {
169
+ "status": "completed",
170
+ "cost_cents": 12000
171
+ },
148
172
  "dependencies": {
149
173
  "@paybond/kit": "^0.11.11"
150
174
  },
@@ -160,12 +184,57 @@
160
184
  "primary_operation": "aws.ec2.start_instance",
161
185
  "requested_spend_cents": 12500,
162
186
  "evidence_preset": "cost_and_completion",
163
- "smoke_result_body": { "status": "completed", "cost_cents": 12500 },
187
+ "smoke_result_body": {
188
+ "status": "completed",
189
+ "cost_cents": 12500
190
+ },
164
191
  "dependencies": {
165
192
  "@paybond/kit": "^0.11.11"
166
193
  },
167
194
  "demo_mode": "generic"
168
195
  },
196
+ {
197
+ "id": "stripe-agent-demo",
198
+ "repo": "paybond-stripe-agent-demo",
199
+ "title": "Stripe commerce agent (generic TypeScript)",
200
+ "language": "typescript",
201
+ "framework": "generic",
202
+ "preset": "stripe-commerce",
203
+ "primary_operation": "payments.charge_customer",
204
+ "requested_spend_cents": 2500,
205
+ "evidence_preset": "stripe_charge",
206
+ "smoke_result_body": {
207
+ "payment_intent_id": "pi_smoke",
208
+ "charge_id": "ch_smoke",
209
+ "cost_cents": 2500,
210
+ "status": "succeeded"
211
+ },
212
+ "dependencies": {
213
+ "@paybond/kit": "^0.12.1"
214
+ },
215
+ "demo_mode": "generic"
216
+ },
217
+ {
218
+ "id": "shopify-shopping-agent",
219
+ "repo": "paybond-shopify-shopping-agent",
220
+ "title": "Shopify shopping agent (UCP + Kit binding)",
221
+ "language": "typescript",
222
+ "framework": "generic",
223
+ "preset": "shopping",
224
+ "primary_operation": "commerce.checkout",
225
+ "requested_spend_cents": 4500,
226
+ "evidence_preset": "cost_and_completion",
227
+ "smoke_result_body": {
228
+ "status": "completed",
229
+ "cost_cents": 4500,
230
+ "order_id": "gid://shopify/Order/123",
231
+ "shop": "paybond-agent-commerce-dev.myshopify.com"
232
+ },
233
+ "dependencies": {
234
+ "@paybond/kit": "^0.12.1"
235
+ },
236
+ "demo_mode": "generic"
237
+ },
169
238
  {
170
239
  "id": "invoice-agent",
171
240
  "repo": "paybond-invoice-agent",
@@ -176,7 +245,10 @@
176
245
  "primary_operation": "saas.provision_seat",
177
246
  "requested_spend_cents": 2900,
178
247
  "evidence_preset": "cost_and_completion",
179
- "smoke_result_body": { "status": "completed", "cost_cents": 2900 },
248
+ "smoke_result_body": {
249
+ "status": "completed",
250
+ "cost_cents": 2900
251
+ },
180
252
  "python_dependencies": {
181
253
  "paybond-kit": ">=0.11.11",
182
254
  "langgraph": ">=1.2.0"
@@ -7,7 +7,7 @@
7
7
  "name": "openai-shopping-agent",
8
8
  "dependencies": {
9
9
  "@openai/agents": "^0.4.0",
10
- "@paybond/kit": "^0.12.0",
10
+ "@paybond/kit": "^0.12.2",
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.12.0",
173
- "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.12.0.tgz",
174
- "integrity": "sha512-iAluOkqE8aINum1GF/LkR6Oi04xH9cNCZDJRF5BBFUQMqcNUpN1g/zNQK78jIGVlwcssexnLmiet31Z0NJ5jbg==",
172
+ "version": "0.12.2",
173
+ "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.12.2.tgz",
174
+ "integrity": "sha512-so7XNbfEfUH2XZZ9JBHmWST2kjQXaoptyhi8p5rPllMO//8LT5lxpar0R028qAZKxU1y8cbj4kBMXy4lR0m05w==",
175
175
  "license": "Apache-2.0",
176
176
  "dependencies": {
177
177
  "@noble/ed25519": "^2.2.1",
@@ -229,9 +229,9 @@
229
229
  }
230
230
  },
231
231
  "node_modules/@types/node": {
232
- "version": "22.20.0",
233
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.0.tgz",
234
- "integrity": "sha512-QWlFW2wf3nTjC13/DqRnBpR4ZO36VJH/JVBkA/vcnmbTBNQIlnObqyqZE1tUR7+Ni23Lda8R1BxMfbXRpCUx5g==",
232
+ "version": "22.20.1",
233
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz",
234
+ "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==",
235
235
  "license": "MIT",
236
236
  "dependencies": {
237
237
  "undici-types": "~6.21.0"
@@ -1040,9 +1040,9 @@
1040
1040
  }
1041
1041
  },
1042
1042
  "node_modules/openai": {
1043
- "version": "6.45.0",
1044
- "resolved": "https://registry.npmjs.org/openai/-/openai-6.45.0.tgz",
1045
- "integrity": "sha512-5DQVNErssk0afNpTTHUm/qZPU4iKR9OYdNid8Ib4puq4gHNNvGWZht2zY4h9a8JMF949Ik6m8gQutllVPbjdnw==",
1043
+ "version": "6.46.0",
1044
+ "resolved": "https://registry.npmjs.org/openai/-/openai-6.46.0.tgz",
1045
+ "integrity": "sha512-DFg6jEPT2RO+oAyXtddeUJU8zkGy1OQ1AjGzNIJUMQG03TTqvCpy9tBpQ+2VVVnvrl3E56F8GEin2JYtWpITtA==",
1046
1046
  "license": "Apache-2.0",
1047
1047
  "peerDependencies": {
1048
1048
  "@aws-sdk/credential-provider-node": ">=3.972.0 <4",
@@ -28,7 +28,7 @@ export async function loadPaybondEnvFile(envFile = ".env.local"): Promise<void>
28
28
  const { readFile } = await import("node:fs/promises");
29
29
  body = await readFile(envFile, "utf8");
30
30
  } catch (err) {
31
- if ((err).code === "ENOENT") return;
31
+ if ((err as { code?: string }).code === "ENOENT") return;
32
32
  throw err;
33
33
  }
34
34
  const apiKey = readEnvValue(body, "PAYBOND_API_KEY");
@@ -6,7 +6,7 @@
6
6
  "": {
7
7
  "name": "paybond-aws-operator",
8
8
  "dependencies": {
9
- "@paybond/kit": "^0.12.0"
9
+ "@paybond/kit": "^0.12.2"
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.12.0",
51
- "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.12.0.tgz",
52
- "integrity": "sha512-iAluOkqE8aINum1GF/LkR6Oi04xH9cNCZDJRF5BBFUQMqcNUpN1g/zNQK78jIGVlwcssexnLmiet31Z0NJ5jbg==",
50
+ "version": "0.12.2",
51
+ "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.12.2.tgz",
52
+ "integrity": "sha512-so7XNbfEfUH2XZZ9JBHmWST2kjQXaoptyhi8p5rPllMO//8LT5lxpar0R028qAZKxU1y8cbj4kBMXy4lR0m05w==",
53
53
  "license": "Apache-2.0",
54
54
  "dependencies": {
55
55
  "@noble/ed25519": "^2.2.1",
@@ -107,9 +107,9 @@
107
107
  }
108
108
  },
109
109
  "node_modules/@types/node": {
110
- "version": "22.20.0",
111
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.0.tgz",
112
- "integrity": "sha512-QWlFW2wf3nTjC13/DqRnBpR4ZO36VJH/JVBkA/vcnmbTBNQIlnObqyqZE1tUR7+Ni23Lda8R1BxMfbXRpCUx5g==",
110
+ "version": "22.20.1",
111
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz",
112
+ "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==",
113
113
  "dev": true,
114
114
  "license": "MIT",
115
115
  "dependencies": {
@@ -28,7 +28,7 @@ export async function loadPaybondEnvFile(envFile = ".env.local"): Promise<void>
28
28
  const { readFile } = await import("node:fs/promises");
29
29
  body = await readFile(envFile, "utf8");
30
30
  } catch (err) {
31
- if ((err).code === "ENOENT") return;
31
+ if ((err as { code?: string }).code === "ENOENT") return;
32
32
  throw err;
33
33
  }
34
34
  const apiKey = readEnvValue(body, "PAYBOND_API_KEY");
@@ -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.12.0",
10
+ "@paybond/kit": "^0.12.2",
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.12.0",
264
- "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.12.0.tgz",
265
- "integrity": "sha512-iAluOkqE8aINum1GF/LkR6Oi04xH9cNCZDJRF5BBFUQMqcNUpN1g/zNQK78jIGVlwcssexnLmiet31Z0NJ5jbg==",
263
+ "version": "0.12.2",
264
+ "resolved": "https://registry.npmjs.org/@paybond/kit/-/kit-0.12.2.tgz",
265
+ "integrity": "sha512-so7XNbfEfUH2XZZ9JBHmWST2kjQXaoptyhi8p5rPllMO//8LT5lxpar0R028qAZKxU1y8cbj4kBMXy4lR0m05w==",
266
266
  "license": "Apache-2.0",
267
267
  "dependencies": {
268
268
  "@noble/ed25519": "^2.2.1",
@@ -320,9 +320,9 @@
320
320
  }
321
321
  },
322
322
  "node_modules/@types/node": {
323
- "version": "22.20.0",
324
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.0.tgz",
325
- "integrity": "sha512-QWlFW2wf3nTjC13/DqRnBpR4ZO36VJH/JVBkA/vcnmbTBNQIlnObqyqZE1tUR7+Ni23Lda8R1BxMfbXRpCUx5g==",
323
+ "version": "22.20.1",
324
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz",
325
+ "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==",
326
326
  "dev": true,
327
327
  "license": "MIT",
328
328
  "dependencies": {
@@ -28,7 +28,7 @@ export async function loadPaybondEnvFile(envFile = ".env.local"): Promise<void>
28
28
  const { readFile } = await import("node:fs/promises");
29
29
  body = await readFile(envFile, "utf8");
30
30
  } catch (err) {
31
- if ((err).code === "ENOENT") return;
31
+ if ((err as { code?: string }).code === "ENOENT") return;
32
32
  throw err;
33
33
  }
34
34
  const apiKey = readEnvValue(body, "PAYBOND_API_KEY");