@agirails/sdk 3.3.0 → 3.4.1

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/api/agirailsApp.d.ts +21 -1
  2. package/dist/api/agirailsApp.d.ts.map +1 -1
  3. package/dist/api/agirailsApp.js.map +1 -1
  4. package/dist/builders/CounterAcceptBuilder.d.ts +96 -0
  5. package/dist/builders/CounterAcceptBuilder.d.ts.map +1 -0
  6. package/dist/builders/CounterAcceptBuilder.js +226 -0
  7. package/dist/builders/CounterAcceptBuilder.js.map +1 -0
  8. package/dist/builders/CounterOfferBuilder.d.ts +143 -0
  9. package/dist/builders/CounterOfferBuilder.d.ts.map +1 -0
  10. package/dist/builders/CounterOfferBuilder.js +329 -0
  11. package/dist/builders/CounterOfferBuilder.js.map +1 -0
  12. package/dist/builders/QuoteBuilder.d.ts.map +1 -1
  13. package/dist/builders/QuoteBuilder.js +8 -3
  14. package/dist/builders/QuoteBuilder.js.map +1 -1
  15. package/dist/builders/index.d.ts +2 -0
  16. package/dist/builders/index.d.ts.map +1 -1
  17. package/dist/builders/index.js +7 -1
  18. package/dist/builders/index.js.map +1 -1
  19. package/dist/cli/agirails.js +22 -2
  20. package/dist/cli/agirails.js.map +1 -1
  21. package/dist/cli/commands/health.js +21 -5
  22. package/dist/cli/commands/health.js.map +1 -1
  23. package/dist/cli/commands/init.d.ts.map +1 -1
  24. package/dist/cli/commands/init.js +25 -5
  25. package/dist/cli/commands/init.js.map +1 -1
  26. package/dist/cli/commands/publish.d.ts +34 -0
  27. package/dist/cli/commands/publish.d.ts.map +1 -1
  28. package/dist/cli/commands/publish.js +256 -80
  29. package/dist/cli/commands/publish.js.map +1 -1
  30. package/dist/cli/commands/repair.d.ts +23 -0
  31. package/dist/cli/commands/repair.d.ts.map +1 -0
  32. package/dist/cli/commands/repair.js +210 -0
  33. package/dist/cli/commands/repair.js.map +1 -0
  34. package/dist/cli/commands/serve.d.ts +38 -0
  35. package/dist/cli/commands/serve.d.ts.map +1 -0
  36. package/dist/cli/commands/serve.js +308 -0
  37. package/dist/cli/commands/serve.js.map +1 -0
  38. package/dist/cli/commands/test.js +2 -2
  39. package/dist/cli/commands/test.js.map +1 -1
  40. package/dist/cli/index.js +6 -0
  41. package/dist/cli/index.js.map +1 -1
  42. package/dist/config/agirailsmdV4.d.ts +46 -1
  43. package/dist/config/agirailsmdV4.d.ts.map +1 -1
  44. package/dist/config/agirailsmdV4.js +65 -8
  45. package/dist/config/agirailsmdV4.js.map +1 -1
  46. package/dist/config/defaults.d.ts +10 -0
  47. package/dist/config/defaults.d.ts.map +1 -1
  48. package/dist/config/defaults.js +10 -0
  49. package/dist/config/defaults.js.map +1 -1
  50. package/dist/config/publishPipeline.d.ts +23 -1
  51. package/dist/config/publishPipeline.d.ts.map +1 -1
  52. package/dist/config/publishPipeline.js +70 -15
  53. package/dist/config/publishPipeline.js.map +1 -1
  54. package/dist/index.d.ts +20 -0
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +29 -3
  57. package/dist/index.js.map +1 -1
  58. package/dist/level1/Agent.d.ts +27 -0
  59. package/dist/level1/Agent.d.ts.map +1 -1
  60. package/dist/level1/Agent.js +77 -6
  61. package/dist/level1/Agent.js.map +1 -1
  62. package/dist/negotiation/BuyerOrchestrator.d.ts +103 -1
  63. package/dist/negotiation/BuyerOrchestrator.d.ts.map +1 -1
  64. package/dist/negotiation/BuyerOrchestrator.js +499 -4
  65. package/dist/negotiation/BuyerOrchestrator.js.map +1 -1
  66. package/dist/negotiation/DecisionEngine.d.ts +69 -1
  67. package/dist/negotiation/DecisionEngine.d.ts.map +1 -1
  68. package/dist/negotiation/DecisionEngine.js +140 -1
  69. package/dist/negotiation/DecisionEngine.js.map +1 -1
  70. package/dist/negotiation/PolicyEngine.d.ts +32 -0
  71. package/dist/negotiation/PolicyEngine.d.ts.map +1 -1
  72. package/dist/negotiation/PolicyEngine.js.map +1 -1
  73. package/dist/negotiation/ProviderOrchestrator.d.ts +108 -0
  74. package/dist/negotiation/ProviderOrchestrator.d.ts.map +1 -0
  75. package/dist/negotiation/ProviderOrchestrator.js +136 -0
  76. package/dist/negotiation/ProviderOrchestrator.js.map +1 -0
  77. package/dist/negotiation/ProviderPolicy.d.ts +143 -0
  78. package/dist/negotiation/ProviderPolicy.d.ts.map +1 -0
  79. package/dist/negotiation/ProviderPolicy.js +207 -0
  80. package/dist/negotiation/ProviderPolicy.js.map +1 -0
  81. package/dist/negotiation/index.d.ts +8 -1
  82. package/dist/negotiation/index.d.ts.map +1 -1
  83. package/dist/negotiation/index.js +8 -1
  84. package/dist/negotiation/index.js.map +1 -1
  85. package/dist/negotiation/verifyQuoteOnChain.d.ts +58 -0
  86. package/dist/negotiation/verifyQuoteOnChain.d.ts.map +1 -0
  87. package/dist/negotiation/verifyQuoteOnChain.js +83 -0
  88. package/dist/negotiation/verifyQuoteOnChain.js.map +1 -0
  89. package/dist/runtime/BlockchainRuntime.d.ts +13 -0
  90. package/dist/runtime/BlockchainRuntime.d.ts.map +1 -1
  91. package/dist/runtime/BlockchainRuntime.js +23 -0
  92. package/dist/runtime/BlockchainRuntime.js.map +1 -1
  93. package/dist/runtime/IACTPRuntime.d.ts +35 -0
  94. package/dist/runtime/IACTPRuntime.d.ts.map +1 -1
  95. package/dist/runtime/MockRuntime.d.ts +11 -0
  96. package/dist/runtime/MockRuntime.d.ts.map +1 -1
  97. package/dist/runtime/MockRuntime.js +39 -0
  98. package/dist/runtime/MockRuntime.js.map +1 -1
  99. package/dist/runtime/types/MockState.d.ts +10 -0
  100. package/dist/runtime/types/MockState.d.ts.map +1 -1
  101. package/dist/runtime/types/MockState.js.map +1 -1
  102. package/dist/transport/QuoteChannel.d.ts +201 -0
  103. package/dist/transport/QuoteChannel.d.ts.map +1 -0
  104. package/dist/transport/QuoteChannel.js +358 -0
  105. package/dist/transport/QuoteChannel.js.map +1 -0
  106. package/dist/types/adapter.d.ts +24 -24
  107. package/package.json +16 -1
@@ -55,8 +55,8 @@ export declare const AdapterMetadataSchema: z.ZodObject<{
55
55
  settlementMode: z.ZodEnum<["explicit", "timed", "atomic"]>;
56
56
  priority: z.ZodNumber;
57
57
  }, "strip", z.ZodTypeAny, {
58
- id: string;
59
58
  name: string;
59
+ id: string;
60
60
  usesEscrow: boolean;
61
61
  supportsDisputes: boolean;
62
62
  requiresIdentity: boolean;
@@ -64,8 +64,8 @@ export declare const AdapterMetadataSchema: z.ZodObject<{
64
64
  priority: number;
65
65
  supportedIdentityTypes?: string[] | undefined;
66
66
  }, {
67
- id: string;
68
67
  name: string;
68
+ id: string;
69
69
  usesEscrow: boolean;
70
70
  supportsDisputes: boolean;
71
71
  requiresIdentity: boolean;
@@ -102,11 +102,11 @@ export declare const PaymentIdentitySchema: z.ZodObject<{
102
102
  type: z.ZodEnum<["erc8004", "did", "ens", "address"]>;
103
103
  value: z.ZodString;
104
104
  }, "strip", z.ZodTypeAny, {
105
- type: "address" | "erc8004" | "did" | "ens";
106
105
  value: string;
106
+ type: "did" | "address" | "erc8004" | "ens";
107
107
  }, {
108
- type: "address" | "erc8004" | "did" | "ens";
109
108
  value: string;
109
+ type: "did" | "address" | "erc8004" | "ens";
110
110
  }>;
111
111
  /**
112
112
  * Zod schema for PaymentMetadata runtime validation.
@@ -119,11 +119,11 @@ export declare const PaymentMetadataSchema: z.ZodObject<{
119
119
  type: z.ZodEnum<["erc8004", "did", "ens", "address"]>;
120
120
  value: z.ZodString;
121
121
  }, "strip", z.ZodTypeAny, {
122
- type: "address" | "erc8004" | "did" | "ens";
123
122
  value: string;
123
+ type: "did" | "address" | "erc8004" | "ens";
124
124
  }, {
125
- type: "address" | "erc8004" | "did" | "ens";
126
125
  value: string;
126
+ type: "did" | "address" | "erc8004" | "ens";
127
127
  }>>;
128
128
  paymentMethod: z.ZodOptional<z.ZodEnum<["x402", "actp", "auto"]>>;
129
129
  }, "strip", z.ZodTypeAny, {
@@ -131,8 +131,8 @@ export declare const PaymentMetadataSchema: z.ZodObject<{
131
131
  requiresEscrow?: boolean | undefined;
132
132
  requiresDispute?: boolean | undefined;
133
133
  identity?: {
134
- type: "address" | "erc8004" | "did" | "ens";
135
134
  value: string;
135
+ type: "did" | "address" | "erc8004" | "ens";
136
136
  } | undefined;
137
137
  paymentMethod?: "x402" | "actp" | "auto" | undefined;
138
138
  }, {
@@ -140,8 +140,8 @@ export declare const PaymentMetadataSchema: z.ZodObject<{
140
140
  requiresEscrow?: boolean | undefined;
141
141
  requiresDispute?: boolean | undefined;
142
142
  identity?: {
143
- type: "address" | "erc8004" | "did" | "ens";
144
143
  value: string;
144
+ type: "did" | "address" | "erc8004" | "ens";
145
145
  } | undefined;
146
146
  paymentMethod?: "x402" | "actp" | "auto" | undefined;
147
147
  }>;
@@ -201,11 +201,11 @@ export declare const UnifiedPayParamsSchema: z.ZodObject<{
201
201
  type: z.ZodEnum<["erc8004", "did", "ens", "address"]>;
202
202
  value: z.ZodString;
203
203
  }, "strip", z.ZodTypeAny, {
204
- type: "address" | "erc8004" | "did" | "ens";
205
204
  value: string;
205
+ type: "did" | "address" | "erc8004" | "ens";
206
206
  }, {
207
- type: "address" | "erc8004" | "did" | "ens";
208
207
  value: string;
208
+ type: "did" | "address" | "erc8004" | "ens";
209
209
  }>>;
210
210
  paymentMethod: z.ZodOptional<z.ZodEnum<["x402", "actp", "auto"]>>;
211
211
  }, "strip", z.ZodTypeAny, {
@@ -213,8 +213,8 @@ export declare const UnifiedPayParamsSchema: z.ZodObject<{
213
213
  requiresEscrow?: boolean | undefined;
214
214
  requiresDispute?: boolean | undefined;
215
215
  identity?: {
216
- type: "address" | "erc8004" | "did" | "ens";
217
216
  value: string;
217
+ type: "did" | "address" | "erc8004" | "ens";
218
218
  } | undefined;
219
219
  paymentMethod?: "x402" | "actp" | "auto" | undefined;
220
220
  }, {
@@ -222,8 +222,8 @@ export declare const UnifiedPayParamsSchema: z.ZodObject<{
222
222
  requiresEscrow?: boolean | undefined;
223
223
  requiresDispute?: boolean | undefined;
224
224
  identity?: {
225
- type: "address" | "erc8004" | "did" | "ens";
226
225
  value: string;
226
+ type: "did" | "address" | "erc8004" | "ens";
227
227
  } | undefined;
228
228
  paymentMethod?: "x402" | "actp" | "auto" | undefined;
229
229
  }>>;
@@ -242,8 +242,8 @@ export declare const UnifiedPayParamsSchema: z.ZodObject<{
242
242
  requiresEscrow?: boolean | undefined;
243
243
  requiresDispute?: boolean | undefined;
244
244
  identity?: {
245
- type: "address" | "erc8004" | "did" | "ens";
246
245
  value: string;
246
+ type: "did" | "address" | "erc8004" | "ens";
247
247
  } | undefined;
248
248
  paymentMethod?: "x402" | "actp" | "auto" | undefined;
249
249
  } | undefined;
@@ -262,8 +262,8 @@ export declare const UnifiedPayParamsSchema: z.ZodObject<{
262
262
  requiresEscrow?: boolean | undefined;
263
263
  requiresDispute?: boolean | undefined;
264
264
  identity?: {
265
- type: "address" | "erc8004" | "did" | "ens";
266
265
  value: string;
266
+ type: "did" | "address" | "erc8004" | "ens";
267
267
  } | undefined;
268
268
  paymentMethod?: "x402" | "actp" | "auto" | undefined;
269
269
  } | undefined;
@@ -369,18 +369,18 @@ export declare const UnifiedPayResultSchema: z.ZodObject<{
369
369
  }>>;
370
370
  }, "strip", z.ZodTypeAny, {
371
371
  txId: string;
372
- requester: string;
373
- provider: string;
372
+ escrowId: string | null;
374
373
  amount: string;
374
+ success: boolean;
375
375
  deadline: string;
376
- escrowId: string | null;
376
+ provider: string;
377
377
  adapter: string;
378
378
  state: "COMMITTED" | "IN_PROGRESS";
379
- success: boolean;
380
379
  releaseRequired: boolean;
380
+ requester: string;
381
+ error?: string | undefined;
381
382
  erc8004AgentId?: string | undefined;
382
383
  response?: any;
383
- error?: string | undefined;
384
384
  feeBreakdown?: {
385
385
  grossAmount: string;
386
386
  providerNet: string;
@@ -390,18 +390,18 @@ export declare const UnifiedPayResultSchema: z.ZodObject<{
390
390
  } | undefined;
391
391
  }, {
392
392
  txId: string;
393
- requester: string;
394
- provider: string;
393
+ escrowId: string | null;
395
394
  amount: string;
395
+ success: boolean;
396
396
  deadline: string;
397
- escrowId: string | null;
397
+ provider: string;
398
398
  adapter: string;
399
399
  state: "COMMITTED" | "IN_PROGRESS";
400
- success: boolean;
401
400
  releaseRequired: boolean;
401
+ requester: string;
402
+ error?: string | undefined;
402
403
  erc8004AgentId?: string | undefined;
403
404
  response?: any;
404
- error?: string | undefined;
405
405
  feeBreakdown?: {
406
406
  grossAmount: string;
407
407
  providerNet: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agirails/sdk",
3
- "version": "3.3.0",
3
+ "version": "3.4.1",
4
4
  "description": "AGIRAILS SDK for the ACTP (Agent Commerce Transaction Protocol) - Unified mock + blockchain support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,6 +19,21 @@
19
19
  "types": "./dist/server/index.d.ts",
20
20
  "require": "./dist/server/index.js",
21
21
  "default": "./dist/server/index.js"
22
+ },
23
+ "./negotiation": {
24
+ "types": "./dist/negotiation/index.d.ts",
25
+ "require": "./dist/negotiation/index.js",
26
+ "default": "./dist/negotiation/index.js"
27
+ },
28
+ "./builders": {
29
+ "types": "./dist/builders/index.d.ts",
30
+ "require": "./dist/builders/index.js",
31
+ "default": "./dist/builders/index.js"
32
+ },
33
+ "./transport": {
34
+ "types": "./dist/transport/QuoteChannel.d.ts",
35
+ "require": "./dist/transport/QuoteChannel.js",
36
+ "default": "./dist/transport/QuoteChannel.js"
22
37
  }
23
38
  },
24
39
  "bin": {