@multiagency/sdk 0.3.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 (78) hide show
  1. package/CHANGES.md +21 -0
  2. package/LICENSE +21 -0
  3. package/README.md +142 -0
  4. package/THIRD-PARTY-NOTICES +127 -0
  5. package/bin/release-server.d.mts +29 -0
  6. package/bin/release-server.mjs +143 -0
  7. package/dist/compensation-contract.d.ts +370 -0
  8. package/dist/compensation-contract.js +51 -0
  9. package/dist/contract/agent-connection.d.ts +86 -0
  10. package/dist/contract/agent-connection.js +36 -0
  11. package/dist/contract/app-access.d.ts +141 -0
  12. package/dist/contract/app-access.js +57 -0
  13. package/dist/contract/app-client.d.ts +140 -0
  14. package/dist/contract/app-client.js +61 -0
  15. package/dist/contract/app-consent.d.ts +68 -0
  16. package/dist/contract/app-consent.js +91 -0
  17. package/dist/contract/assets.d.ts +6 -0
  18. package/dist/contract/assets.js +6 -0
  19. package/dist/contract/client.d.ts +347 -0
  20. package/dist/contract/client.js +81 -0
  21. package/dist/contract/gateway.d.ts +74 -0
  22. package/dist/contract/gateway.js +47 -0
  23. package/dist/contract/index.d.ts +26 -0
  24. package/dist/contract/index.js +25 -0
  25. package/dist/contract/inputs.d.ts +230 -0
  26. package/dist/contract/inputs.js +99 -0
  27. package/dist/contract/intents-account.d.ts +5 -0
  28. package/dist/contract/intents-account.js +8 -0
  29. package/dist/contract/orpc-client.js +2037 -0
  30. package/dist/contract/owner-capabilities.d.ts +81 -0
  31. package/dist/contract/owner-capabilities.js +33 -0
  32. package/dist/contract/owner-client.d.ts +99 -0
  33. package/dist/contract/owner-client.js +146 -0
  34. package/dist/contract/owner-contract.d.ts +1156 -0
  35. package/dist/contract/owner-contract.js +37 -0
  36. package/dist/contract/owner-inputs.d.ts +166 -0
  37. package/dist/contract/owner-inputs.js +1 -0
  38. package/dist/contract/owner-outputs.d.ts +5749 -0
  39. package/dist/contract/owner-outputs.js +751 -0
  40. package/dist/contract/package-version.d.ts +5 -0
  41. package/dist/contract/package-version.js +2 -0
  42. package/dist/contract/payee-entry.d.ts +10 -0
  43. package/dist/contract/payee-entry.js +10 -0
  44. package/dist/contract/payee.d.ts +326 -0
  45. package/dist/contract/payee.js +32 -0
  46. package/dist/contract/permissions.d.ts +20 -0
  47. package/dist/contract/permissions.js +64 -0
  48. package/dist/contract/proposals.d.ts +178 -0
  49. package/dist/contract/proposals.js +27 -0
  50. package/dist/contract/run-log-schema.d.ts +888 -0
  51. package/dist/contract/run-log-schema.js +150 -0
  52. package/dist/contract/run-progress-schema.d.ts +104 -0
  53. package/dist/contract/run-progress-schema.js +20 -0
  54. package/dist/payee-contract.d.ts +9 -0
  55. package/dist/payee-contract.js +15 -0
  56. package/package.json +58 -0
  57. package/provenance.json +61 -0
  58. package/schemas/agentConnection.json +76 -0
  59. package/schemas/agentConnectionIssue.json +22 -0
  60. package/schemas/agentConnectionList.json +88 -0
  61. package/schemas/agentConnectionStarted.json +90 -0
  62. package/schemas/compensationSend.json +40 -0
  63. package/schemas/errorBody.json +16 -0
  64. package/schemas/fileResult.json +67 -0
  65. package/schemas/invoicesView.json +130 -0
  66. package/schemas/ownerCompensationView.json +556 -0
  67. package/schemas/payeeCompensationView.json +546 -0
  68. package/schemas/payeeWorkOrderRequest.json +31 -0
  69. package/schemas/publicWorkOrder.json +94 -0
  70. package/schemas/reportCommand.json +82 -0
  71. package/schemas/requestRecord.json +149 -0
  72. package/schemas/session.json +20 -0
  73. package/schemas/workOrderList.json +43 -0
  74. package/schemas/workOrderRequestResult.json +20 -0
  75. package/skills/app-server/SKILL.md +190 -0
  76. package/skills/getting-started/SKILL.md +90 -0
  77. package/skills/owner-workflows/SKILL.md +157 -0
  78. package/skills/payee-workflows/SKILL.md +200 -0
@@ -0,0 +1,556 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "agreements": {
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "properties": {
10
+ "id": {
11
+ "type": "string",
12
+ "format": "uuid",
13
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
14
+ },
15
+ "version": {
16
+ "type": "integer",
17
+ "exclusiveMinimum": 0,
18
+ "maximum": 9007199254740991
19
+ },
20
+ "terms": {
21
+ "type": "object",
22
+ "properties": {
23
+ "payee": {
24
+ "type": "string",
25
+ "pattern": "^(?=.{2,64}$)([a-z\\d]+[-_])*[a-z\\d]+(\\.([a-z\\d]+[-_])*[a-z\\d]+)*$"
26
+ },
27
+ "title": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "maxLength": 160
31
+ },
32
+ "document": {
33
+ "type": "string",
34
+ "maxLength": 1000,
35
+ "format": "uri"
36
+ },
37
+ "signedOn": {
38
+ "type": "string",
39
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
40
+ },
41
+ "start": {
42
+ "type": "string",
43
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
44
+ },
45
+ "end": {
46
+ "type": "string",
47
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
48
+ },
49
+ "ceiling": {
50
+ "type": "string",
51
+ "pattern": "^[1-9][0-9]{0,17}$"
52
+ },
53
+ "openingApproved": {
54
+ "type": "string",
55
+ "pattern": "^(0|[1-9][0-9]{0,17})$"
56
+ },
57
+ "scope": {
58
+ "type": "string",
59
+ "maxLength": 2000
60
+ }
61
+ },
62
+ "required": [
63
+ "payee",
64
+ "title",
65
+ "document",
66
+ "signedOn",
67
+ "start",
68
+ "end",
69
+ "ceiling",
70
+ "openingApproved",
71
+ "scope"
72
+ ],
73
+ "additionalProperties": false
74
+ },
75
+ "recordedBy": {
76
+ "type": "string"
77
+ },
78
+ "at": {
79
+ "type": "string"
80
+ },
81
+ "approved": {
82
+ "type": "string",
83
+ "pattern": "^\\d+$"
84
+ },
85
+ "remaining": {
86
+ "type": "string",
87
+ "pattern": "^\\d+$"
88
+ }
89
+ },
90
+ "required": [
91
+ "id",
92
+ "version",
93
+ "terms",
94
+ "recordedBy",
95
+ "at",
96
+ "approved",
97
+ "remaining"
98
+ ],
99
+ "additionalProperties": false
100
+ }
101
+ },
102
+ "requests": {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "object",
106
+ "properties": {
107
+ "id": {
108
+ "type": "string",
109
+ "format": "uuid",
110
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
111
+ },
112
+ "version": {
113
+ "type": "integer",
114
+ "exclusiveMinimum": 0,
115
+ "maximum": 9007199254740991
116
+ },
117
+ "payee": {
118
+ "type": "string",
119
+ "pattern": "^(?=.{2,64}$)([a-z\\d]+[-_])*[a-z\\d]+(\\.([a-z\\d]+[-_])*[a-z\\d]+)*$"
120
+ },
121
+ "agreementVersion": {
122
+ "type": "integer",
123
+ "exclusiveMinimum": 0,
124
+ "maximum": 9007199254740991
125
+ },
126
+ "report": {
127
+ "type": "object",
128
+ "properties": {
129
+ "agreementId": {
130
+ "type": "string",
131
+ "format": "uuid",
132
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
133
+ },
134
+ "amount": {
135
+ "type": "string",
136
+ "pattern": "^[1-9][0-9]{0,17}$"
137
+ },
138
+ "start": {
139
+ "type": "string",
140
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
141
+ },
142
+ "end": {
143
+ "type": "string",
144
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
145
+ },
146
+ "contributions": {
147
+ "type": "string",
148
+ "minLength": 1,
149
+ "maxLength": 4000
150
+ },
151
+ "assessment": {
152
+ "type": "string",
153
+ "minLength": 1,
154
+ "maxLength": 2000
155
+ },
156
+ "evidence": {
157
+ "maxItems": 12,
158
+ "type": "array",
159
+ "items": {
160
+ "type": "string",
161
+ "maxLength": 1000,
162
+ "format": "uri"
163
+ }
164
+ }
165
+ },
166
+ "required": [
167
+ "agreementId",
168
+ "start",
169
+ "end",
170
+ "contributions",
171
+ "assessment",
172
+ "evidence"
173
+ ],
174
+ "additionalProperties": false
175
+ },
176
+ "state": {
177
+ "type": "string",
178
+ "enum": [
179
+ "draft",
180
+ "submitted",
181
+ "changes_requested",
182
+ "approved",
183
+ "declined"
184
+ ]
185
+ },
186
+ "approvedAmount": {
187
+ "type": "string",
188
+ "pattern": "^[1-9][0-9]{0,17}$"
189
+ },
190
+ "feedback": {
191
+ "type": "string"
192
+ },
193
+ "reviewedBy": {
194
+ "type": [
195
+ "string",
196
+ "null"
197
+ ]
198
+ },
199
+ "at": {
200
+ "type": "string"
201
+ },
202
+ "payment": {
203
+ "default": null,
204
+ "anyOf": [
205
+ {
206
+ "type": "object",
207
+ "properties": {
208
+ "mode": {
209
+ "type": "string",
210
+ "enum": [
211
+ "shared",
212
+ "isolated"
213
+ ]
214
+ },
215
+ "id": {
216
+ "type": "string",
217
+ "format": "uuid",
218
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
219
+ },
220
+ "until": {
221
+ "type": "string",
222
+ "format": "date-time",
223
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
224
+ }
225
+ },
226
+ "required": [
227
+ "mode",
228
+ "id"
229
+ ],
230
+ "additionalProperties": false
231
+ },
232
+ {
233
+ "type": "null"
234
+ }
235
+ ]
236
+ }
237
+ },
238
+ "required": [
239
+ "id",
240
+ "version",
241
+ "payee",
242
+ "agreementVersion",
243
+ "report",
244
+ "state",
245
+ "feedback",
246
+ "reviewedBy",
247
+ "at",
248
+ "payment"
249
+ ],
250
+ "additionalProperties": false
251
+ }
252
+ },
253
+ "history": {
254
+ "type": "array",
255
+ "items": {
256
+ "type": "object",
257
+ "properties": {
258
+ "sequence": {
259
+ "type": "number"
260
+ },
261
+ "actor": {
262
+ "type": "string"
263
+ },
264
+ "record": {
265
+ "anyOf": [
266
+ {
267
+ "type": "object",
268
+ "properties": {
269
+ "id": {
270
+ "type": "string",
271
+ "format": "uuid",
272
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
273
+ },
274
+ "version": {
275
+ "type": "integer",
276
+ "exclusiveMinimum": 0,
277
+ "maximum": 9007199254740991
278
+ },
279
+ "payee": {
280
+ "type": "string",
281
+ "pattern": "^(?=.{2,64}$)([a-z\\d]+[-_])*[a-z\\d]+(\\.([a-z\\d]+[-_])*[a-z\\d]+)*$"
282
+ },
283
+ "agreementVersion": {
284
+ "type": "integer",
285
+ "exclusiveMinimum": 0,
286
+ "maximum": 9007199254740991
287
+ },
288
+ "report": {
289
+ "type": "object",
290
+ "properties": {
291
+ "agreementId": {
292
+ "type": "string",
293
+ "format": "uuid",
294
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
295
+ },
296
+ "amount": {
297
+ "type": "string",
298
+ "pattern": "^[1-9][0-9]{0,17}$"
299
+ },
300
+ "start": {
301
+ "type": "string",
302
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
303
+ },
304
+ "end": {
305
+ "type": "string",
306
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
307
+ },
308
+ "contributions": {
309
+ "type": "string",
310
+ "minLength": 1,
311
+ "maxLength": 4000
312
+ },
313
+ "assessment": {
314
+ "type": "string",
315
+ "minLength": 1,
316
+ "maxLength": 2000
317
+ },
318
+ "evidence": {
319
+ "maxItems": 12,
320
+ "type": "array",
321
+ "items": {
322
+ "type": "string",
323
+ "maxLength": 1000,
324
+ "format": "uri"
325
+ }
326
+ }
327
+ },
328
+ "required": [
329
+ "agreementId",
330
+ "start",
331
+ "end",
332
+ "contributions",
333
+ "assessment",
334
+ "evidence"
335
+ ],
336
+ "additionalProperties": false
337
+ },
338
+ "state": {
339
+ "type": "string",
340
+ "enum": [
341
+ "draft",
342
+ "submitted",
343
+ "changes_requested",
344
+ "approved",
345
+ "declined"
346
+ ]
347
+ },
348
+ "approvedAmount": {
349
+ "type": "string",
350
+ "pattern": "^[1-9][0-9]{0,17}$"
351
+ },
352
+ "feedback": {
353
+ "type": "string"
354
+ },
355
+ "reviewedBy": {
356
+ "type": [
357
+ "string",
358
+ "null"
359
+ ]
360
+ },
361
+ "at": {
362
+ "type": "string"
363
+ },
364
+ "payment": {
365
+ "default": null,
366
+ "anyOf": [
367
+ {
368
+ "type": "object",
369
+ "properties": {
370
+ "mode": {
371
+ "type": "string",
372
+ "enum": [
373
+ "shared",
374
+ "isolated"
375
+ ]
376
+ },
377
+ "id": {
378
+ "type": "string",
379
+ "format": "uuid",
380
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
381
+ },
382
+ "until": {
383
+ "type": "string",
384
+ "format": "date-time",
385
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
386
+ }
387
+ },
388
+ "required": [
389
+ "mode",
390
+ "id"
391
+ ],
392
+ "additionalProperties": false
393
+ },
394
+ {
395
+ "type": "null"
396
+ }
397
+ ]
398
+ }
399
+ },
400
+ "required": [
401
+ "id",
402
+ "version",
403
+ "payee",
404
+ "agreementVersion",
405
+ "report",
406
+ "state",
407
+ "feedback",
408
+ "reviewedBy",
409
+ "at",
410
+ "payment"
411
+ ],
412
+ "additionalProperties": false
413
+ },
414
+ {
415
+ "type": "object",
416
+ "properties": {
417
+ "id": {
418
+ "type": "string",
419
+ "format": "uuid",
420
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
421
+ },
422
+ "version": {
423
+ "type": "integer",
424
+ "exclusiveMinimum": 0,
425
+ "maximum": 9007199254740991
426
+ },
427
+ "terms": {
428
+ "type": "object",
429
+ "properties": {
430
+ "payee": {
431
+ "type": "string",
432
+ "pattern": "^(?=.{2,64}$)([a-z\\d]+[-_])*[a-z\\d]+(\\.([a-z\\d]+[-_])*[a-z\\d]+)*$"
433
+ },
434
+ "title": {
435
+ "type": "string",
436
+ "minLength": 1,
437
+ "maxLength": 160
438
+ },
439
+ "document": {
440
+ "type": "string",
441
+ "maxLength": 1000,
442
+ "format": "uri"
443
+ },
444
+ "signedOn": {
445
+ "type": "string",
446
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
447
+ },
448
+ "start": {
449
+ "type": "string",
450
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
451
+ },
452
+ "end": {
453
+ "type": "string",
454
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
455
+ },
456
+ "ceiling": {
457
+ "type": "string",
458
+ "pattern": "^[1-9][0-9]{0,17}$"
459
+ },
460
+ "openingApproved": {
461
+ "type": "string",
462
+ "pattern": "^(0|[1-9][0-9]{0,17})$"
463
+ },
464
+ "scope": {
465
+ "type": "string",
466
+ "maxLength": 2000
467
+ }
468
+ },
469
+ "required": [
470
+ "payee",
471
+ "title",
472
+ "document",
473
+ "signedOn",
474
+ "start",
475
+ "end",
476
+ "ceiling",
477
+ "openingApproved",
478
+ "scope"
479
+ ],
480
+ "additionalProperties": false
481
+ },
482
+ "recordedBy": {
483
+ "type": "string"
484
+ },
485
+ "at": {
486
+ "type": "string"
487
+ }
488
+ },
489
+ "required": [
490
+ "id",
491
+ "version",
492
+ "terms",
493
+ "recordedBy",
494
+ "at"
495
+ ],
496
+ "additionalProperties": false
497
+ }
498
+ ]
499
+ }
500
+ },
501
+ "required": [
502
+ "sequence",
503
+ "actor",
504
+ "record"
505
+ ],
506
+ "additionalProperties": false
507
+ }
508
+ },
509
+ "payments": {
510
+ "type": "array",
511
+ "items": {
512
+ "type": "object",
513
+ "properties": {
514
+ "requestId": {
515
+ "type": "string",
516
+ "format": "uuid",
517
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
518
+ },
519
+ "invoiceId": {
520
+ "type": "string"
521
+ },
522
+ "status": {
523
+ "type": "string"
524
+ },
525
+ "correlationId": {
526
+ "type": [
527
+ "string",
528
+ "null"
529
+ ]
530
+ },
531
+ "refused": {
532
+ "type": [
533
+ "string",
534
+ "null"
535
+ ]
536
+ }
537
+ },
538
+ "required": [
539
+ "requestId",
540
+ "invoiceId",
541
+ "status",
542
+ "correlationId",
543
+ "refused"
544
+ ],
545
+ "additionalProperties": false
546
+ }
547
+ }
548
+ },
549
+ "required": [
550
+ "agreements",
551
+ "requests",
552
+ "history",
553
+ "payments"
554
+ ],
555
+ "additionalProperties": false
556
+ }