sealbridge 0.0.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/NOTICE +43 -0
  2. package/README.ja.md +397 -0
  3. package/README.md +567 -1
  4. package/dist/cli/dist/acp.d.ts +2 -0
  5. package/dist/cli/dist/acp.js +6 -0
  6. package/dist/cli/dist/acp.js.map +1 -0
  7. package/dist/cli/dist/approval-summary.d.ts +2 -0
  8. package/dist/cli/dist/approval-summary.js +32 -0
  9. package/dist/cli/dist/approval-summary.js.map +1 -0
  10. package/dist/cli/dist/board.d.ts +47 -0
  11. package/dist/cli/dist/board.js +255 -0
  12. package/dist/cli/dist/board.js.map +1 -0
  13. package/dist/cli/dist/contacts.d.ts +18 -0
  14. package/dist/cli/dist/contacts.js +154 -0
  15. package/dist/cli/dist/contacts.js.map +1 -0
  16. package/dist/cli/dist/doctor.d.ts +13 -0
  17. package/dist/cli/dist/doctor.js +30 -0
  18. package/dist/cli/dist/doctor.js.map +1 -0
  19. package/dist/cli/dist/error-messages.d.ts +2 -0
  20. package/dist/cli/dist/error-messages.js +24 -0
  21. package/dist/cli/dist/error-messages.js.map +1 -0
  22. package/dist/cli/dist/index.d.ts +2 -0
  23. package/dist/cli/dist/index.js +194 -0
  24. package/dist/cli/dist/index.js.map +1 -0
  25. package/dist/cli/dist/invite-share.d.ts +16 -0
  26. package/dist/cli/dist/invite-share.js +163 -0
  27. package/dist/cli/dist/invite-share.js.map +1 -0
  28. package/dist/cli/dist/mcp.d.ts +17 -0
  29. package/dist/cli/dist/mcp.js +105 -0
  30. package/dist/cli/dist/mcp.js.map +1 -0
  31. package/dist/cli/dist/network.d.ts +1 -0
  32. package/dist/cli/dist/network.js +396 -0
  33. package/dist/cli/dist/network.js.map +1 -0
  34. package/dist/cli/dist/public-settings.d.ts +27 -0
  35. package/dist/cli/dist/public-settings.js +33 -0
  36. package/dist/cli/dist/public-settings.js.map +1 -0
  37. package/dist/cli/dist/receipt.d.ts +39 -0
  38. package/dist/cli/dist/receipt.js +90 -0
  39. package/dist/cli/dist/receipt.js.map +1 -0
  40. package/dist/cli/dist/receive-hook.d.ts +2 -0
  41. package/dist/cli/dist/receive-hook.js +35 -0
  42. package/dist/cli/dist/receive-hook.js.map +1 -0
  43. package/dist/cli/dist/task-input.d.ts +2 -0
  44. package/dist/cli/dist/task-input.js +19 -0
  45. package/dist/cli/dist/task-input.js.map +1 -0
  46. package/dist/cli/dist/wake-hook.d.ts +3 -0
  47. package/dist/cli/dist/wake-hook.js +32 -0
  48. package/dist/cli/dist/wake-hook.js.map +1 -0
  49. package/dist/examples/two-owner-demo/alice-policy.json +4 -0
  50. package/dist/examples/two-owner-demo/bob-policy.json +4 -0
  51. package/dist/examples/two-owner-demo/dist/run-demo.d.ts +71 -0
  52. package/dist/examples/two-owner-demo/dist/run-demo.js +383 -0
  53. package/dist/examples/two-owner-demo/dist/run-demo.js.map +1 -0
  54. package/dist/package.json +1 -0
  55. package/dist/packages/adapters/dist/command.d.ts +122 -0
  56. package/dist/packages/adapters/dist/command.js +378 -0
  57. package/dist/packages/adapters/dist/command.js.map +1 -0
  58. package/dist/packages/adapters/dist/credential-proxy.d.ts +37 -0
  59. package/dist/packages/adapters/dist/credential-proxy.js +363 -0
  60. package/dist/packages/adapters/dist/credential-proxy.js.map +1 -0
  61. package/dist/packages/adapters/dist/index.d.ts +6 -0
  62. package/dist/packages/adapters/dist/index.js +6 -0
  63. package/dist/packages/adapters/dist/index.js.map +1 -0
  64. package/dist/packages/adapters/dist/mcp.d.ts +32 -0
  65. package/dist/packages/adapters/dist/mcp.js +87 -0
  66. package/dist/packages/adapters/dist/mcp.js.map +1 -0
  67. package/dist/packages/adapters/dist/openai.d.ts +23 -0
  68. package/dist/packages/adapters/dist/openai.js +81 -0
  69. package/dist/packages/adapters/dist/openai.js.map +1 -0
  70. package/dist/packages/adapters/dist/sandbox.d.ts +45 -0
  71. package/dist/packages/adapters/dist/sandbox.js +60 -0
  72. package/dist/packages/adapters/dist/sandbox.js.map +1 -0
  73. package/dist/packages/core/dist/capability.d.ts +36 -0
  74. package/dist/packages/core/dist/capability.js +203 -0
  75. package/dist/packages/core/dist/capability.js.map +1 -0
  76. package/dist/packages/core/dist/contract.d.ts +33 -0
  77. package/dist/packages/core/dist/contract.js +97 -0
  78. package/dist/packages/core/dist/contract.js.map +1 -0
  79. package/dist/packages/core/dist/crypto.d.ts +34 -0
  80. package/dist/packages/core/dist/crypto.js +329 -0
  81. package/dist/packages/core/dist/crypto.js.map +1 -0
  82. package/dist/packages/core/dist/discovery.d.ts +129 -0
  83. package/dist/packages/core/dist/discovery.js +527 -0
  84. package/dist/packages/core/dist/discovery.js.map +1 -0
  85. package/dist/packages/core/dist/edge.d.ts +4 -0
  86. package/dist/packages/core/dist/edge.js +6 -0
  87. package/dist/packages/core/dist/edge.js.map +1 -0
  88. package/dist/packages/core/dist/index.d.ts +9 -0
  89. package/dist/packages/core/dist/index.js +10 -0
  90. package/dist/packages/core/dist/index.js.map +1 -0
  91. package/dist/packages/core/dist/receipts.d.ts +9 -0
  92. package/dist/packages/core/dist/receipts.js +67 -0
  93. package/dist/packages/core/dist/receipts.js.map +1 -0
  94. package/dist/packages/core/dist/relay-auth.d.ts +40 -0
  95. package/dist/packages/core/dist/relay-auth.js +106 -0
  96. package/dist/packages/core/dist/relay-auth.js.map +1 -0
  97. package/dist/packages/core/dist/revocation.d.ts +58 -0
  98. package/dist/packages/core/dist/revocation.js +112 -0
  99. package/dist/packages/core/dist/revocation.js.map +1 -0
  100. package/dist/packages/core/dist/schema.d.ts +11 -0
  101. package/dist/packages/core/dist/schema.js +48 -0
  102. package/dist/packages/core/dist/schema.js.map +1 -0
  103. package/dist/packages/core/dist/types.d.ts +172 -0
  104. package/dist/packages/core/dist/types.js +2 -0
  105. package/dist/packages/core/dist/types.js.map +1 -0
  106. package/dist/packages/ledger/dist/index.d.ts +84 -0
  107. package/dist/packages/ledger/dist/index.js +269 -0
  108. package/dist/packages/ledger/dist/index.js.map +1 -0
  109. package/dist/packages/relay/dist/fetch.d.ts +250 -0
  110. package/dist/packages/relay/dist/fetch.js +1401 -0
  111. package/dist/packages/relay/dist/fetch.js.map +1 -0
  112. package/dist/packages/relay/dist/index.d.ts +103 -0
  113. package/dist/packages/relay/dist/index.js +855 -0
  114. package/dist/packages/relay/dist/index.js.map +1 -0
  115. package/dist/packages/relay/dist/journal.d.ts +77 -0
  116. package/dist/packages/relay/dist/journal.js +339 -0
  117. package/dist/packages/relay/dist/journal.js.map +1 -0
  118. package/dist/packages/relay/dist/notifications.d.ts +63 -0
  119. package/dist/packages/relay/dist/notifications.js +55 -0
  120. package/dist/packages/relay/dist/notifications.js.map +1 -0
  121. package/dist/packages/relay/dist/retry.d.ts +12 -0
  122. package/dist/packages/relay/dist/retry.js +59 -0
  123. package/dist/packages/relay/dist/retry.js.map +1 -0
  124. package/dist/packages/relay/dist/ssrf.d.ts +32 -0
  125. package/dist/packages/relay/dist/ssrf.js +213 -0
  126. package/dist/packages/relay/dist/ssrf.js.map +1 -0
  127. package/dist/packages/relay/dist/worker.d.ts +92 -0
  128. package/dist/packages/relay/dist/worker.js +460 -0
  129. package/dist/packages/relay/dist/worker.js.map +1 -0
  130. package/dist/packages/runtime/dist/a2a.d.ts +8 -0
  131. package/dist/packages/runtime/dist/a2a.js +69 -0
  132. package/dist/packages/runtime/dist/a2a.js.map +1 -0
  133. package/dist/packages/runtime/dist/adapter.d.ts +51 -0
  134. package/dist/packages/runtime/dist/adapter.js +2 -0
  135. package/dist/packages/runtime/dist/adapter.js.map +1 -0
  136. package/dist/packages/runtime/dist/approval-providers.d.ts +99 -0
  137. package/dist/packages/runtime/dist/approval-providers.js +269 -0
  138. package/dist/packages/runtime/dist/approval-providers.js.map +1 -0
  139. package/dist/packages/runtime/dist/daily-limit.d.ts +2 -0
  140. package/dist/packages/runtime/dist/daily-limit.js +54 -0
  141. package/dist/packages/runtime/dist/daily-limit.js.map +1 -0
  142. package/dist/packages/runtime/dist/gateway.d.ts +35 -0
  143. package/dist/packages/runtime/dist/gateway.js +92 -0
  144. package/dist/packages/runtime/dist/gateway.js.map +1 -0
  145. package/dist/packages/runtime/dist/inbox.d.ts +10 -0
  146. package/dist/packages/runtime/dist/inbox.js +24 -0
  147. package/dist/packages/runtime/dist/inbox.js.map +1 -0
  148. package/dist/packages/runtime/dist/index.d.ts +13 -0
  149. package/dist/packages/runtime/dist/index.js +14 -0
  150. package/dist/packages/runtime/dist/index.js.map +1 -0
  151. package/dist/packages/runtime/dist/mcp-server.d.ts +90 -0
  152. package/dist/packages/runtime/dist/mcp-server.js +647 -0
  153. package/dist/packages/runtime/dist/mcp-server.js.map +1 -0
  154. package/dist/packages/runtime/dist/mcp-tool-catalog.d.ts +3 -0
  155. package/dist/packages/runtime/dist/mcp-tool-catalog.js +507 -0
  156. package/dist/packages/runtime/dist/mcp-tool-catalog.js.map +1 -0
  157. package/dist/packages/runtime/dist/mcp.d.ts +73 -0
  158. package/dist/packages/runtime/dist/mcp.js +67 -0
  159. package/dist/packages/runtime/dist/mcp.js.map +1 -0
  160. package/dist/packages/runtime/dist/policy.d.ts +19 -0
  161. package/dist/packages/runtime/dist/policy.js +41 -0
  162. package/dist/packages/runtime/dist/policy.js.map +1 -0
  163. package/dist/packages/runtime/dist/quota.d.ts +39 -0
  164. package/dist/packages/runtime/dist/quota.js +147 -0
  165. package/dist/packages/runtime/dist/quota.js.map +1 -0
  166. package/dist/packages/runtime/dist/session-audit.d.ts +107 -0
  167. package/dist/packages/runtime/dist/session-audit.js +520 -0
  168. package/dist/packages/runtime/dist/session-audit.js.map +1 -0
  169. package/dist/packages/runtime/dist/session-timeouts.d.ts +33 -0
  170. package/dist/packages/runtime/dist/session-timeouts.js +62 -0
  171. package/dist/packages/runtime/dist/session-timeouts.js.map +1 -0
  172. package/dist/packages/runtime/dist/session.d.ts +323 -0
  173. package/dist/packages/runtime/dist/session.js +2252 -0
  174. package/dist/packages/runtime/dist/session.js.map +1 -0
  175. package/dist/packages/runtime/dist/task-journal.d.ts +36 -0
  176. package/dist/packages/runtime/dist/task-journal.js +104 -0
  177. package/dist/packages/runtime/dist/task-journal.js.map +1 -0
  178. package/dist/packages/runtime/dist/verifier.d.ts +64 -0
  179. package/dist/packages/runtime/dist/verifier.js +109 -0
  180. package/dist/packages/runtime/dist/verifier.js.map +1 -0
  181. package/dist/packages/sandbox/dist/container.d.ts +33 -0
  182. package/dist/packages/sandbox/dist/container.js +189 -0
  183. package/dist/packages/sandbox/dist/container.js.map +1 -0
  184. package/dist/packages/sandbox/dist/index.d.ts +34 -0
  185. package/dist/packages/sandbox/dist/index.js +179 -0
  186. package/dist/packages/sandbox/dist/index.js.map +1 -0
  187. package/dist/packages/sandbox/dist/permission.d.ts +58 -0
  188. package/dist/packages/sandbox/dist/permission.js +90 -0
  189. package/dist/packages/sandbox/dist/permission.js.map +1 -0
  190. package/dist/spec/README.ja.md +76 -0
  191. package/dist/spec/README.md +135 -0
  192. package/dist/spec/ack-receipt.schema.json +77 -0
  193. package/dist/spec/agent-card.schema.json +83 -0
  194. package/dist/spec/approval-receipt.schema.json +94 -0
  195. package/dist/spec/audit-entry.schema.json +101 -0
  196. package/dist/spec/capability-token.schema.json +133 -0
  197. package/dist/spec/envelope.schema.json +197 -0
  198. package/dist/spec/examples/sample-ack-receipt.json +16 -0
  199. package/dist/spec/examples/sample-agent-card.json +35 -0
  200. package/dist/spec/examples/sample-approval-receipt.json +18 -0
  201. package/dist/spec/examples/sample-audit-entry.json +37 -0
  202. package/dist/spec/examples/sample-capability-token.json +39 -0
  203. package/dist/spec/examples/sample-envelope.json +21 -0
  204. package/dist/spec/examples/sample-task-manifest.json +141 -0
  205. package/dist/spec/examples/sample-usage-receipt.json +19 -0
  206. package/dist/spec/task-manifest.schema.json +422 -0
  207. package/dist/spec/usage-receipt.schema.json +91 -0
  208. package/package.json +61 -5
@@ -0,0 +1,422 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://acp-spec.local/schemas/v0.1/task-manifest.schema.json",
4
+ "title": "TaskManifest",
5
+ "description": "Cross-owner agent collaboration task manifest and contract specification.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "protocolVersion",
10
+ "taskId",
11
+ "createdAt",
12
+ "deadline",
13
+ "requester",
14
+ "task",
15
+ "io",
16
+ "verification",
17
+ "budget",
18
+ "permissions",
19
+ "sandboxPolicy",
20
+ "hitlPolicy"
21
+ ],
22
+ "properties": {
23
+ "protocolVersion": {
24
+ "type": "string",
25
+ "const": "0.1.0",
26
+ "description": "Protocol specification version."
27
+ },
28
+ "taskId": {
29
+ "type": "string",
30
+ "pattern": "^task_[a-zA-Z0-9_-]{8,64}$",
31
+ "description": "Globally unique task identifier."
32
+ },
33
+ "parentTaskId": {
34
+ "type": "string",
35
+ "pattern": "^task_[a-zA-Z0-9_-]{8,64}$",
36
+ "description": "Optional parent task identifier when sub-delegating."
37
+ },
38
+ "createdAt": {
39
+ "type": "string",
40
+ "format": "date-time"
41
+ },
42
+ "deadline": {
43
+ "type": "string",
44
+ "format": "date-time",
45
+ "description": "Hard UTC timestamp deadline after which the task transitions to TIMED_OUT."
46
+ },
47
+ "requester": {
48
+ "$ref": "#/$defs/partyDescriptor"
49
+ },
50
+ "worker": {
51
+ "$ref": "#/$defs/partyDescriptor",
52
+ "description": "Target worker party if directed; omitted in open proposals before ACCEPT."
53
+ },
54
+ "task": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["title", "description", "acceptanceCriteria"],
58
+ "properties": {
59
+ "skillId": { "type": "string", "minLength": 1 },
60
+ "taskType": { "type": "string", "minLength": 1 },
61
+ "title": {
62
+ "type": "string",
63
+ "minLength": 1,
64
+ "maxLength": 200
65
+ },
66
+ "description": {
67
+ "type": "string",
68
+ "minLength": 1,
69
+ "maxLength": 32768,
70
+ "description": "Task instructions. Must be treated as untrusted data by the worker runtime."
71
+ },
72
+ "acceptanceCriteria": {
73
+ "type": "array",
74
+ "minItems": 1,
75
+ "maxItems": 50,
76
+ "items": {
77
+ "type": "object",
78
+ "additionalProperties": false,
79
+ "required": ["id", "description", "required"],
80
+ "properties": {
81
+ "id": {
82
+ "type": "string",
83
+ "pattern": "^ac_[a-zA-Z0-9_-]{1,32}$"
84
+ },
85
+ "description": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "maxLength": 1000
89
+ },
90
+ "required": {
91
+ "type": "boolean"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "io": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": ["inputSchema", "outputSchema"],
102
+ "properties": {
103
+ "inputSchema": {
104
+ "type": "object",
105
+ "description": "JSON Schema describing the structured task input payload."
106
+ },
107
+ "outputSchema": {
108
+ "type": "object",
109
+ "description": "JSON Schema describing the required structured output artifact."
110
+ },
111
+ "inputArtifacts": {
112
+ "type": "array",
113
+ "maxItems": 100,
114
+ "items": {
115
+ "$ref": "#/$defs/artifactRef"
116
+ }
117
+ }
118
+ }
119
+ },
120
+ "verification": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": ["mode", "requireUsageReceipt", "requireExecutionAttestation", "maxRetries"],
124
+ "properties": {
125
+ "mode": {
126
+ "type": "string",
127
+ "enum": ["schema_only", "automated_checks", "human_in_the_loop", "hybrid"],
128
+ "description": "How the requester gateway verifies delivered artifacts."
129
+ },
130
+ "requireUsageReceipt": {
131
+ "type": "boolean"
132
+ },
133
+ "requireExecutionAttestation": {
134
+ "type": "boolean"
135
+ },
136
+ "maxRetries": {
137
+ "type": "integer",
138
+ "minimum": 0,
139
+ "maximum": 10
140
+ },
141
+ "checks": {
142
+ "type": "array",
143
+ "maxItems": 20,
144
+ "items": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": ["checkId", "kind", "target"],
148
+ "properties": {
149
+ "checkId": {
150
+ "type": "string",
151
+ "pattern": "^chk_[a-zA-Z0-9_-]{1,32}$"
152
+ },
153
+ "kind": {
154
+ "type": "string",
155
+ "enum": ["json_schema", "sha256_match", "deterministic_command", "human_review"]
156
+ },
157
+ "target": {
158
+ "type": "string",
159
+ "minLength": 1,
160
+ "maxLength": 512
161
+ },
162
+ "expectedExitCode": {
163
+ "type": "integer",
164
+ "default": 0
165
+ }
166
+ }
167
+ }
168
+ }
169
+ }
170
+ },
171
+ "budget": {
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "required": [
175
+ "costBearer",
176
+ "maxInputTokens",
177
+ "maxOutputTokens",
178
+ "maxToolInvocations",
179
+ "maxWallClockSeconds",
180
+ "onOverrun"
181
+ ],
182
+ "properties": {
183
+ "costBearer": {
184
+ "type": "string",
185
+ "enum": ["worker_byok", "bilateral_quota", "external_settlement_plugin"],
186
+ "description": "Who bears the LLM/API inference cost. Never shares raw API keys across owners."
187
+ },
188
+ "maxInputTokens": {
189
+ "type": "integer",
190
+ "minimum": 0,
191
+ "maximum": 100000000
192
+ },
193
+ "maxOutputTokens": {
194
+ "type": "integer",
195
+ "minimum": 0,
196
+ "maximum": 100000000
197
+ },
198
+ "maxToolInvocations": {
199
+ "type": "integer",
200
+ "minimum": 0,
201
+ "maximum": 100000
202
+ },
203
+ "maxWallClockSeconds": {
204
+ "type": "integer",
205
+ "minimum": 1,
206
+ "maximum": 604800
207
+ },
208
+ "onOverrun": {
209
+ "type": "string",
210
+ "enum": ["hard_stop", "request_hitl_amendment"]
211
+ },
212
+ "settlementExtension": {
213
+ "type": "object",
214
+ "description": "Optional plugin metadata for off-protocol settlement or bilateral ledger accounting."
215
+ }
216
+ }
217
+ },
218
+ "permissions": {
219
+ "type": "object",
220
+ "additionalProperties": false,
221
+ "required": ["maxDelegationDepth", "grantedCapabilities"],
222
+ "properties": {
223
+ "maxDelegationDepth": {
224
+ "type": "integer",
225
+ "minimum": 0,
226
+ "maximum": 5,
227
+ "description": "0 forbids sub-delegation to any third-party agent."
228
+ },
229
+ "grantedCapabilities": {
230
+ "type": "array",
231
+ "maxItems": 50,
232
+ "items": {
233
+ "$ref": "#/$defs/capabilityGrantSpec"
234
+ }
235
+ }
236
+ }
237
+ },
238
+ "sandboxPolicy": {
239
+ "type": "object",
240
+ "additionalProperties": false,
241
+ "required": ["isolationLevel", "networkAccess", "filesystemScope"],
242
+ "properties": {
243
+ "allowSubprocessFallback": {
244
+ "type": "boolean",
245
+ "description": "Explicitly permit a restricted subprocess when OCI isolation is requested."
246
+ },
247
+ "isolationLevel": {
248
+ "type": "string",
249
+ "enum": ["subprocess_restricted", "oci_container", "wasm", "microvm"]
250
+ },
251
+ "networkAccess": {
252
+ "type": "string",
253
+ "enum": ["none", "allowlist_only"]
254
+ },
255
+ "allowedHosts": {
256
+ "type": "array",
257
+ "items": {
258
+ "type": "string",
259
+ "minLength": 1,
260
+ "maxLength": 253
261
+ }
262
+ },
263
+ "filesystemScope": {
264
+ "type": "string",
265
+ "enum": ["ephemeral_workspace_only", "read_only_inputs"]
266
+ }
267
+ }
268
+ },
269
+ "hitlPolicy": {
270
+ "type": "object",
271
+ "additionalProperties": false,
272
+ "required": ["requiredGates"],
273
+ "properties": {
274
+ "requiredGates": {
275
+ "type": "array",
276
+ "uniqueItems": true,
277
+ "items": {
278
+ "type": "string",
279
+ "enum": [
280
+ "GATE_CONTRACT_ACCEPT",
281
+ "GATE_EXTERNAL_SIDE_EFFECT",
282
+ "GATE_BUDGET_OVERRUN",
283
+ "GATE_SUB_DELEGATION",
284
+ "GATE_DELIVERY_ACCEPT"
285
+ ]
286
+ }
287
+ }
288
+ }
289
+ },
290
+ "signatures": {
291
+ "type": "object",
292
+ "additionalProperties": false,
293
+ "properties": {
294
+ "requesterSignature": {
295
+ "$ref": "#/$defs/signatureBlock"
296
+ },
297
+ "workerSignature": {
298
+ "$ref": "#/$defs/signatureBlock"
299
+ }
300
+ }
301
+ }
302
+ },
303
+ "$defs": {
304
+ "didKey": {
305
+ "type": "string",
306
+ "pattern": "^did:key:z[1-9A-HJ-NP-Za-km-z]{32,128}$"
307
+ },
308
+ "sha256Digest": {
309
+ "type": "string",
310
+ "pattern": "^sha256:[a-f0-9]{64}$"
311
+ },
312
+ "partyDescriptor": {
313
+ "type": "object",
314
+ "additionalProperties": false,
315
+ "required": ["ownerDid", "agentDid"],
316
+ "properties": {
317
+ "ownerDid": {
318
+ "$ref": "#/$defs/didKey"
319
+ },
320
+ "agentDid": {
321
+ "$ref": "#/$defs/didKey"
322
+ },
323
+ "displayName": {
324
+ "type": "string",
325
+ "maxLength": 100
326
+ },
327
+ "relayEndpoint": {
328
+ "type": "string",
329
+ "format": "uri"
330
+ }
331
+ }
332
+ },
333
+ "artifactRef": {
334
+ "type": "object",
335
+ "additionalProperties": false,
336
+ "required": ["name", "digest", "mediaType", "sizeBytes"],
337
+ "properties": {
338
+ "name": {
339
+ "type": "string",
340
+ "pattern": "^[a-zA-Z0-9._/-]{1,255}$"
341
+ },
342
+ "digest": {
343
+ "$ref": "#/$defs/sha256Digest"
344
+ },
345
+ "mediaType": {
346
+ "type": "string",
347
+ "maxLength": 128
348
+ },
349
+ "sizeBytes": {
350
+ "type": "integer",
351
+ "minimum": 0,
352
+ "maximum": 1073741824
353
+ }
354
+ }
355
+ },
356
+ "capabilityGrantSpec": {
357
+ "type": "object",
358
+ "additionalProperties": false,
359
+ "required": ["capabilityId", "resource", "allowedTools", "maxInvocations", "expiresAt"],
360
+ "properties": {
361
+ "capabilityId": {
362
+ "type": "string",
363
+ "pattern": "^cap_[a-zA-Z0-9_-]{4,64}$"
364
+ },
365
+ "resource": {
366
+ "type": "string",
367
+ "minLength": 1,
368
+ "maxLength": 512,
369
+ "description": "Scoped URI or MCP resource prefix (e.g. mcp://owner-a/docs/public/*)."
370
+ },
371
+ "allowedTools": {
372
+ "type": "array",
373
+ "minItems": 1,
374
+ "maxItems": 50,
375
+ "items": {
376
+ "type": "string",
377
+ "minLength": 1,
378
+ "maxLength": 128
379
+ }
380
+ },
381
+ "argConstraints": {
382
+ "type": "object",
383
+ "description": "Optional JSON Schema constraining tool arguments."
384
+ },
385
+ "maxInvocations": {
386
+ "type": "integer",
387
+ "minimum": 1,
388
+ "maximum": 10000
389
+ },
390
+ "expiresAt": {
391
+ "type": "string",
392
+ "format": "date-time"
393
+ }
394
+ }
395
+ },
396
+ "signatureBlock": {
397
+ "type": "object",
398
+ "additionalProperties": false,
399
+ "required": ["signerDid", "canonicalization", "payloadDigest", "signedAt", "signature"],
400
+ "properties": {
401
+ "signerDid": {
402
+ "$ref": "#/$defs/didKey"
403
+ },
404
+ "canonicalization": {
405
+ "type": "string",
406
+ "const": "RFC8785-JCS"
407
+ },
408
+ "payloadDigest": {
409
+ "$ref": "#/$defs/sha256Digest"
410
+ },
411
+ "signedAt": {
412
+ "type": "string",
413
+ "format": "date-time"
414
+ },
415
+ "signature": {
416
+ "type": "string",
417
+ "pattern": "^ed25519:[a-zA-Z0-9+/=_-]{64,180}$"
418
+ }
419
+ }
420
+ }
421
+ }
422
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://acp-spec.local/schemas/v0.1/usage-receipt.schema.json",
4
+ "title": "usage-receipt",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "payload",
9
+ "signature"
10
+ ],
11
+ "properties": {
12
+ "payload": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": [
16
+ "type",
17
+ "taskId",
18
+ "inputTokens",
19
+ "outputTokens",
20
+ "totalTokens",
21
+ "toolCalls",
22
+ "wallTimeMs",
23
+ "halted"
24
+ ],
25
+ "properties": {
26
+ "type": {
27
+ "const": "UsageReceipt"
28
+ },
29
+ "taskId": {
30
+ "type": "string",
31
+ "minLength": 1
32
+ },
33
+ "inputTokens": {
34
+ "type": "integer",
35
+ "minimum": 0
36
+ },
37
+ "outputTokens": {
38
+ "type": "integer",
39
+ "minimum": 0
40
+ },
41
+ "totalTokens": {
42
+ "type": "integer",
43
+ "minimum": 0
44
+ },
45
+ "toolCalls": {
46
+ "type": "integer",
47
+ "minimum": 0
48
+ },
49
+ "wallTimeMs": {
50
+ "type": "integer",
51
+ "minimum": 0
52
+ },
53
+ "halted": {
54
+ "type": "boolean"
55
+ }
56
+ }
57
+ },
58
+ "signature": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": [
62
+ "signerDid",
63
+ "canonicalization",
64
+ "payloadDigest",
65
+ "signedAt",
66
+ "signature"
67
+ ],
68
+ "properties": {
69
+ "signerDid": {
70
+ "type": "string",
71
+ "pattern": "^did:key:z[1-9A-HJ-NP-Za-km-z]{32,128}$"
72
+ },
73
+ "canonicalization": {
74
+ "const": "RFC8785-JCS"
75
+ },
76
+ "payloadDigest": {
77
+ "type": "string",
78
+ "pattern": "^sha256:[a-f0-9]{64}$"
79
+ },
80
+ "signedAt": {
81
+ "type": "string",
82
+ "format": "date-time"
83
+ },
84
+ "signature": {
85
+ "type": "string",
86
+ "pattern": "^ed25519:[A-Za-z0-9_-]{86}$"
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
package/package.json CHANGED
@@ -1,9 +1,65 @@
1
1
  {
2
2
  "name": "sealbridge",
3
- "version": "0.0.1",
4
- "description": "Sealbridge — secure task delegation between agents owned by different people. Formerly ACP / agent-collab-platform.",
3
+ "version": "0.2.0",
4
+ "private": false,
5
+ "type": "module",
5
6
  "license": "Apache-2.0",
6
- "repository": { "type": "git", "url": "git+https://github.com/acidnyan/agent-collab-platform.git" },
7
- "homepage": "https://github.com/acidnyan/agent-collab-platform",
8
- "files": ["README.md", "LICENSE"]
7
+ "packageManager": "pnpm@10.34.6",
8
+ "engines": {
9
+ "node": ">=22"
10
+ },
11
+ "scripts": {
12
+ "build": "pnpm -r build",
13
+ "typecheck": "tsc --noEmit",
14
+ "test": "vitest run",
15
+ "conformance": "vitest run",
16
+ "test:security-proof": "vitest run conformance/security-proofs.test.ts",
17
+ "security-proof": "vitest run conformance/security-proofs.test.ts",
18
+ "validate:schemas": "tsx scripts/validate-schemas.ts",
19
+ "acp": "tsx cli/src/acp.ts",
20
+ "sealbridge": "tsx cli/src/index.ts",
21
+ "package:cli": "pnpm build && node scripts/package-cli.mjs",
22
+ "prepack": "pnpm run package:cli",
23
+ "publish:dry-run": "npm publish --dry-run"
24
+ },
25
+ "devDependencies": {
26
+ "typescript": "~5.9.3",
27
+ "vitest": "^5.0.5",
28
+ "tsx": "^4.20.6",
29
+ "@types/node": "^22.18.0",
30
+ "@types/ws": "^8.18.1"
31
+ },
32
+ "dependencies": {
33
+ "ajv": "^8.17.1",
34
+ "ajv-formats": "^3.0.1",
35
+ "qrcode": "^1.5.4",
36
+ "@modelcontextprotocol/sdk": "^1.20.0",
37
+ "canonicalize": "^5.1.0",
38
+ "ws": "^8.18.3",
39
+ "@a2a-js/sdk": "^0.3.10"
40
+ },
41
+ "description": "Sealbridge: encrypted cross-owner agent collaboration",
42
+ "keywords": [
43
+ "sealbridge",
44
+ "agent-collaboration",
45
+ "mcp"
46
+ ],
47
+ "bin": {
48
+ "sealbridge": "./dist/cli/dist/index.js",
49
+ "acp": "./dist/cli/dist/acp.js"
50
+ },
51
+ "files": [
52
+ "dist/",
53
+ "LICENSE",
54
+ "NOTICE",
55
+ "README.md",
56
+ "README.ja.md"
57
+ ],
58
+ "publishConfig": {
59
+ "access": "public"
60
+ },
61
+ "repository": {
62
+ "type": "git",
63
+ "url": "https://github.com/sealbridge/sealbridge.git"
64
+ }
9
65
  }