@nexum-hub/agent 0.0.0-stage → 0.0.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 (343) hide show
  1. package/README.md +129 -2
  2. package/contracts/v2/common.schema.json +262 -0
  3. package/contracts/v2/fixtures/inputs.json +244 -0
  4. package/contracts/v2/fixtures/wire.json +6493 -0
  5. package/contracts/v2/model/agent.close.input.schema.json +14 -0
  6. package/contracts/v2/model/agent.close.output.schema.json +101 -0
  7. package/contracts/v2/model/agent.list.input.schema.json +57 -0
  8. package/contracts/v2/model/agent.list.output.schema.json +220 -0
  9. package/contracts/v2/model/agent.open.input.schema.json +35 -0
  10. package/contracts/v2/model/agent.open.output.schema.json +41 -0
  11. package/contracts/v2/model/agent.run.cancel.input.schema.json +18 -0
  12. package/contracts/v2/model/agent.run.cancel.output.schema.json +100 -0
  13. package/contracts/v2/model/agent.run.get.input.schema.json +41 -0
  14. package/contracts/v2/model/agent.run.get.output.schema.json +100 -0
  15. package/contracts/v2/model/agent.run.input.input.schema.json +30 -0
  16. package/contracts/v2/model/agent.run.input.output.schema.json +100 -0
  17. package/contracts/v2/model/agent.run.list.input.schema.json +47 -0
  18. package/contracts/v2/model/agent.run.list.output.schema.json +41 -0
  19. package/contracts/v2/model/agent.run.start.input.schema.json +73 -0
  20. package/contracts/v2/model/agent.run.start.output.schema.json +100 -0
  21. package/contracts/v2/wire/bodies.schema.json +383 -0
  22. package/contracts/v2/wire/envelope.schema.json +2280 -0
  23. package/contracts/v2/wire/events.schema.json +242 -0
  24. package/contracts/v2/wire/maintenance.schema.json +308 -0
  25. package/contracts/v2/wire/operations.schema.json +1791 -0
  26. package/contracts/v2/wire/stream.schema.json +74 -0
  27. package/contracts/v2/wire/types.schema.json +2616 -0
  28. package/dist/adapters/mcp-http.d.ts +22 -0
  29. package/dist/adapters/mcp-http.js +472 -0
  30. package/dist/adapters/mcp-http.js.map +1 -0
  31. package/dist/adapters/mcp-oauth.d.ts +29 -0
  32. package/dist/adapters/mcp-oauth.js +653 -0
  33. package/dist/adapters/mcp-oauth.js.map +1 -0
  34. package/dist/adapters/mcp-wire.d.ts +21 -0
  35. package/dist/adapters/mcp-wire.js +307 -0
  36. package/dist/adapters/mcp-wire.js.map +1 -0
  37. package/dist/adapters/mcp.d.ts +56 -0
  38. package/dist/adapters/mcp.js +1989 -0
  39. package/dist/adapters/mcp.js.map +1 -0
  40. package/dist/adapters/openapi-http.d.ts +29 -0
  41. package/dist/adapters/openapi-http.js +504 -0
  42. package/dist/adapters/openapi-http.js.map +1 -0
  43. package/dist/adapters/openapi-request.d.ts +26 -0
  44. package/dist/adapters/openapi-request.js +597 -0
  45. package/dist/adapters/openapi-request.js.map +1 -0
  46. package/dist/adapters/openapi-schema.d.ts +22 -0
  47. package/dist/adapters/openapi-schema.js +471 -0
  48. package/dist/adapters/openapi-schema.js.map +1 -0
  49. package/dist/adapters/openapi-typegen.d.ts +11 -0
  50. package/dist/adapters/openapi-typegen.js +185 -0
  51. package/dist/adapters/openapi-typegen.js.map +1 -0
  52. package/dist/adapters/openapi-types.d.ts +99 -0
  53. package/dist/adapters/openapi-types.js +2 -0
  54. package/dist/adapters/openapi-types.js.map +1 -0
  55. package/dist/adapters/openapi.d.ts +7 -0
  56. package/dist/adapters/openapi.js +768 -0
  57. package/dist/adapters/openapi.js.map +1 -0
  58. package/dist/application/activation.d.ts +28 -0
  59. package/dist/application/activation.js +289 -0
  60. package/dist/application/activation.js.map +1 -0
  61. package/dist/application/attachments.d.ts +24 -0
  62. package/dist/application/attachments.js +87 -0
  63. package/dist/application/attachments.js.map +1 -0
  64. package/dist/application/authority.d.ts +32 -0
  65. package/dist/application/authority.js +213 -0
  66. package/dist/application/authority.js.map +1 -0
  67. package/dist/application/catalog.d.ts +11 -0
  68. package/dist/application/catalog.js +177 -0
  69. package/dist/application/catalog.js.map +1 -0
  70. package/dist/application/config.d.ts +24 -0
  71. package/dist/application/config.js +140 -0
  72. package/dist/application/config.js.map +1 -0
  73. package/dist/application/connection.d.ts +35 -0
  74. package/dist/application/connection.js +465 -0
  75. package/dist/application/connection.js.map +1 -0
  76. package/dist/application/data-plane.d.ts +35 -0
  77. package/dist/application/data-plane.js +437 -0
  78. package/dist/application/data-plane.js.map +1 -0
  79. package/dist/application/diagnostics.d.ts +4 -0
  80. package/dist/application/diagnostics.js +65 -0
  81. package/dist/application/diagnostics.js.map +1 -0
  82. package/dist/application/dispatcher.d.ts +4 -0
  83. package/dist/application/dispatcher.js +16 -0
  84. package/dist/application/dispatcher.js.map +1 -0
  85. package/dist/application/main.d.ts +12 -0
  86. package/dist/application/main.js +167 -0
  87. package/dist/application/main.js.map +1 -0
  88. package/dist/application/maintenance.d.ts +27 -0
  89. package/dist/application/maintenance.js +244 -0
  90. package/dist/application/maintenance.js.map +1 -0
  91. package/dist/application/packages.d.ts +25 -0
  92. package/dist/application/packages.js +208 -0
  93. package/dist/application/packages.js.map +1 -0
  94. package/dist/application/processes.d.ts +49 -0
  95. package/dist/application/processes.js +180 -0
  96. package/dist/application/processes.js.map +1 -0
  97. package/dist/application/run-view.d.ts +17 -0
  98. package/dist/application/run-view.js +286 -0
  99. package/dist/application/run-view.js.map +1 -0
  100. package/dist/application/runtime.d.ts +78 -0
  101. package/dist/application/runtime.js +1747 -0
  102. package/dist/application/runtime.js.map +1 -0
  103. package/dist/application/tasks.d.ts +38 -0
  104. package/dist/application/tasks.js +23 -0
  105. package/dist/application/tasks.js.map +1 -0
  106. package/dist/application/user-state.d.ts +20 -0
  107. package/dist/application/user-state.js +52 -0
  108. package/dist/application/user-state.js.map +1 -0
  109. package/dist/application/work-git.d.ts +14 -0
  110. package/dist/application/work-git.js +67 -0
  111. package/dist/application/work-git.js.map +1 -0
  112. package/dist/cli.d.ts +2 -0
  113. package/dist/cli.js +40 -0
  114. package/dist/cli.js.map +1 -0
  115. package/dist/contracts/caller.d.ts +51 -0
  116. package/dist/contracts/caller.js +95 -0
  117. package/dist/contracts/caller.js.map +1 -0
  118. package/dist/contracts/error-data.d.ts +6 -0
  119. package/dist/contracts/error-data.js +51 -0
  120. package/dist/contracts/error-data.js.map +1 -0
  121. package/dist/contracts/errors.d.ts +10 -0
  122. package/dist/contracts/errors.js +28 -0
  123. package/dist/contracts/errors.js.map +1 -0
  124. package/dist/contracts/json.d.ts +9 -0
  125. package/dist/contracts/json.js +104 -0
  126. package/dist/contracts/json.js.map +1 -0
  127. package/dist/contracts/types.d.ts +122 -0
  128. package/dist/contracts/types.js +19 -0
  129. package/dist/contracts/types.js.map +1 -0
  130. package/dist/contracts/validation.d.ts +4 -0
  131. package/dist/contracts/validation.js +157 -0
  132. package/dist/contracts/validation.js.map +1 -0
  133. package/dist/contracts/wire-validation.d.ts +9 -0
  134. package/dist/contracts/wire-validation.js +399 -0
  135. package/dist/contracts/wire-validation.js.map +1 -0
  136. package/dist/contracts/wire.d.ts +1083 -0
  137. package/dist/contracts/wire.js +62 -0
  138. package/dist/contracts/wire.js.map +1 -0
  139. package/dist/extension-api.d.ts +12 -0
  140. package/dist/extension-api.js +2 -0
  141. package/dist/extension-api.js.map +1 -0
  142. package/dist/extensions/api.d.ts +72 -0
  143. package/dist/extensions/api.js +2 -0
  144. package/dist/extensions/api.js.map +1 -0
  145. package/dist/extensions/host-requests.d.ts +23 -0
  146. package/dist/extensions/host-requests.js +60 -0
  147. package/dist/extensions/host-requests.js.map +1 -0
  148. package/dist/extensions/materials.d.ts +37 -0
  149. package/dist/extensions/materials.js +691 -0
  150. package/dist/extensions/materials.js.map +1 -0
  151. package/dist/extensions/package-loader.d.ts +28 -0
  152. package/dist/extensions/package-loader.js +177 -0
  153. package/dist/extensions/package-loader.js.map +1 -0
  154. package/dist/extensions/packages.d.ts +73 -0
  155. package/dist/extensions/packages.js +441 -0
  156. package/dist/extensions/packages.js.map +1 -0
  157. package/dist/extensions/registry.d.ts +92 -0
  158. package/dist/extensions/registry.js +1540 -0
  159. package/dist/extensions/registry.js.map +1 -0
  160. package/dist/extensions/resources.d.ts +105 -0
  161. package/dist/extensions/resources.js +595 -0
  162. package/dist/extensions/resources.js.map +1 -0
  163. package/dist/extensions/state.d.ts +25 -0
  164. package/dist/extensions/state.js +10 -0
  165. package/dist/extensions/state.js.map +1 -0
  166. package/dist/extensions/transfer.d.ts +81 -0
  167. package/dist/extensions/transfer.js +16 -0
  168. package/dist/extensions/transfer.js.map +1 -0
  169. package/dist/index.d.ts +7 -0
  170. package/dist/index.js +25 -0
  171. package/dist/index.js.map +1 -0
  172. package/dist/maintenance/configuration.d.ts +79 -0
  173. package/dist/maintenance/configuration.js +1503 -0
  174. package/dist/maintenance/configuration.js.map +1 -0
  175. package/dist/maintenance/credentials.d.ts +23 -0
  176. package/dist/maintenance/credentials.js +177 -0
  177. package/dist/maintenance/credentials.js.map +1 -0
  178. package/dist/maintenance/files.d.ts +2 -0
  179. package/dist/maintenance/files.js +40 -0
  180. package/dist/maintenance/files.js.map +1 -0
  181. package/dist/maintenance/npm.d.ts +71 -0
  182. package/dist/maintenance/npm.js +1013 -0
  183. package/dist/maintenance/npm.js.map +1 -0
  184. package/dist/maintenance/oauth.d.ts +45 -0
  185. package/dist/maintenance/oauth.js +686 -0
  186. package/dist/maintenance/oauth.js.map +1 -0
  187. package/dist/maintenance/requests.d.ts +347 -0
  188. package/dist/maintenance/requests.js +959 -0
  189. package/dist/maintenance/requests.js.map +1 -0
  190. package/dist/maintenance/work-git.d.ts +29 -0
  191. package/dist/maintenance/work-git.js +776 -0
  192. package/dist/maintenance/work-git.js.map +1 -0
  193. package/dist/process/backend.d.ts +54 -0
  194. package/dist/process/backend.js +39 -0
  195. package/dist/process/backend.js.map +1 -0
  196. package/dist/process/environment-windows.d.ts +15 -0
  197. package/dist/process/environment-windows.js +151 -0
  198. package/dist/process/environment-windows.js.map +1 -0
  199. package/dist/process/environment.d.ts +28 -0
  200. package/dist/process/environment.js +410 -0
  201. package/dist/process/environment.js.map +1 -0
  202. package/dist/process/launch.d.ts +31 -0
  203. package/dist/process/launch.js +281 -0
  204. package/dist/process/launch.js.map +1 -0
  205. package/dist/process/managed.d.ts +36 -0
  206. package/dist/process/managed.js +459 -0
  207. package/dist/process/managed.js.map +1 -0
  208. package/dist/process/output-log.d.ts +50 -0
  209. package/dist/process/output-log.js +552 -0
  210. package/dist/process/output-log.js.map +1 -0
  211. package/dist/process/pipes.d.ts +16 -0
  212. package/dist/process/pipes.js +588 -0
  213. package/dist/process/pipes.js.map +1 -0
  214. package/dist/process/pty.d.ts +22 -0
  215. package/dist/process/pty.js +512 -0
  216. package/dist/process/pty.js.map +1 -0
  217. package/dist/process/windows-conout-worker.d.ts +1 -0
  218. package/dist/process/windows-conout-worker.js +90 -0
  219. package/dist/process/windows-conout-worker.js.map +1 -0
  220. package/dist/process/windows-conout.d.ts +46 -0
  221. package/dist/process/windows-conout.js +140 -0
  222. package/dist/process/windows-conout.js.map +1 -0
  223. package/dist/process/windows-helper.d.ts +43 -0
  224. package/dist/process/windows-helper.js +255 -0
  225. package/dist/process/windows-helper.js.map +1 -0
  226. package/dist/process/windows-job.d.ts +39 -0
  227. package/dist/process/windows-job.js +224 -0
  228. package/dist/process/windows-job.js.map +1 -0
  229. package/dist/process/windows-pipes.d.ts +16 -0
  230. package/dist/process/windows-pipes.js +475 -0
  231. package/dist/process/windows-pipes.js.map +1 -0
  232. package/dist/results/artifacts.d.ts +118 -0
  233. package/dist/results/artifacts.js +873 -0
  234. package/dist/results/artifacts.js.map +1 -0
  235. package/dist/results/encoder.d.ts +57 -0
  236. package/dist/results/encoder.js +1179 -0
  237. package/dist/results/encoder.js.map +1 -0
  238. package/dist/results/mcp.d.ts +95 -0
  239. package/dist/results/mcp.js +656 -0
  240. package/dist/results/mcp.js.map +1 -0
  241. package/dist/results/media.d.ts +19 -0
  242. package/dist/results/media.js +301 -0
  243. package/dist/results/media.js.map +1 -0
  244. package/dist/results/normalize.d.ts +29 -0
  245. package/dist/results/normalize.js +464 -0
  246. package/dist/results/normalize.js.map +1 -0
  247. package/dist/runtime/control-scripts.d.ts +23 -0
  248. package/dist/runtime/control-scripts.js +242 -0
  249. package/dist/runtime/control-scripts.js.map +1 -0
  250. package/dist/runtime/engine.d.ts +177 -0
  251. package/dist/runtime/engine.js +1159 -0
  252. package/dist/runtime/engine.js.map +1 -0
  253. package/dist/runtime/globals.d.ts +1 -0
  254. package/dist/runtime/globals.js +31 -0
  255. package/dist/runtime/globals.js.map +1 -0
  256. package/dist/runtime/material-retention.d.ts +34 -0
  257. package/dist/runtime/material-retention.js +671 -0
  258. package/dist/runtime/material-retention.js.map +1 -0
  259. package/dist/runtime/modules.d.ts +50 -0
  260. package/dist/runtime/modules.js +320 -0
  261. package/dist/runtime/modules.js.map +1 -0
  262. package/dist/runtime/names.d.ts +2 -0
  263. package/dist/runtime/names.js +22 -0
  264. package/dist/runtime/names.js.map +1 -0
  265. package/dist/runtime/operations.d.ts +20 -0
  266. package/dist/runtime/operations.js +137 -0
  267. package/dist/runtime/operations.js.map +1 -0
  268. package/dist/runtime/paths.d.ts +3 -0
  269. package/dist/runtime/paths.js +38 -0
  270. package/dist/runtime/paths.js.map +1 -0
  271. package/dist/runtime/promises.d.ts +9 -0
  272. package/dist/runtime/promises.js +78 -0
  273. package/dist/runtime/promises.js.map +1 -0
  274. package/dist/runtime/retention.d.ts +88 -0
  275. package/dist/runtime/retention.js +735 -0
  276. package/dist/runtime/retention.js.map +1 -0
  277. package/dist/runtime/run-log.d.ts +30 -0
  278. package/dist/runtime/run-log.js +207 -0
  279. package/dist/runtime/run-log.js.map +1 -0
  280. package/dist/runtime/scripts.d.ts +84 -0
  281. package/dist/runtime/scripts.js +387 -0
  282. package/dist/runtime/scripts.js.map +1 -0
  283. package/dist/runtime/tasks.d.ts +54 -0
  284. package/dist/runtime/tasks.js +290 -0
  285. package/dist/runtime/tasks.js.map +1 -0
  286. package/dist/sdk/maintenance.d.ts +3 -0
  287. package/dist/sdk/maintenance.js +80 -0
  288. package/dist/sdk/maintenance.js.map +1 -0
  289. package/dist/sdk/output-extension.d.ts +3 -0
  290. package/dist/sdk/output-extension.js +44 -0
  291. package/dist/sdk/output-extension.js.map +1 -0
  292. package/dist/sdk/output.d.ts +52 -0
  293. package/dist/sdk/output.js +350 -0
  294. package/dist/sdk/output.js.map +1 -0
  295. package/dist/sdk/runtime.d.ts +3 -0
  296. package/dist/sdk/runtime.js +26 -0
  297. package/dist/sdk/runtime.js.map +1 -0
  298. package/dist/sdk/sh.d.ts +3 -0
  299. package/dist/sdk/sh.js +384 -0
  300. package/dist/sdk/sh.js.map +1 -0
  301. package/dist/sdk/state.d.ts +2 -0
  302. package/dist/sdk/state.js +69 -0
  303. package/dist/sdk/state.js.map +1 -0
  304. package/dist/sdk/transfer.d.ts +3 -0
  305. package/dist/sdk/transfer.js +141 -0
  306. package/dist/sdk/transfer.js.map +1 -0
  307. package/dist/services/extensions.d.ts +19 -0
  308. package/dist/services/extensions.js +183 -0
  309. package/dist/services/extensions.js.map +1 -0
  310. package/dist/services/state.d.ts +37 -0
  311. package/dist/services/state.js +125 -0
  312. package/dist/services/state.js.map +1 -0
  313. package/dist/services/transfer.d.ts +86 -0
  314. package/dist/services/transfer.js +948 -0
  315. package/dist/services/transfer.js.map +1 -0
  316. package/dist/storage/schema.d.ts +8 -0
  317. package/dist/storage/schema.js +241 -0
  318. package/dist/storage/schema.js.map +1 -0
  319. package/dist/storage/sqlite.d.ts +241 -0
  320. package/dist/storage/sqlite.js +1855 -0
  321. package/dist/storage/sqlite.js.map +1 -0
  322. package/dist/storage/transfers.d.ts +90 -0
  323. package/dist/storage/transfers.js +2 -0
  324. package/dist/storage/transfers.js.map +1 -0
  325. package/dist/transfer/io.d.ts +74 -0
  326. package/dist/transfer/io.js +425 -0
  327. package/dist/transfer/io.js.map +1 -0
  328. package/dist/transfer/offers.d.ts +72 -0
  329. package/dist/transfer/offers.js +380 -0
  330. package/dist/transfer/offers.js.map +1 -0
  331. package/dist/transfer/stream-slots.d.ts +12 -0
  332. package/dist/transfer/stream-slots.js +28 -0
  333. package/dist/transfer/stream-slots.js.map +1 -0
  334. package/dist/work/catalog.d.ts +43 -0
  335. package/dist/work/catalog.js +198 -0
  336. package/dist/work/catalog.js.map +1 -0
  337. package/dist/work/discovery.d.ts +70 -0
  338. package/dist/work/discovery.js +465 -0
  339. package/dist/work/discovery.js.map +1 -0
  340. package/dist/work/service.d.ts +83 -0
  341. package/dist/work/service.js +703 -0
  342. package/dist/work/service.js.map +1 -0
  343. package/package.json +66 -4
@@ -0,0 +1,1083 @@
1
+ import type { Caller, McpCaller, OwnerSessionCaller, HostFeatures } from "./caller.js";
2
+ export { MAX_HOST_FEATURE_BYTES_V2 } from "./caller.js";
3
+ import type { ContributionOrigin, JsonObject, JsonValue, Profile, RunStatus } from "./types.js";
4
+ export declare const WIRE_VERSION_V2 = "2";
5
+ export declare const MAX_CONTROL_BYTES_V2: number;
6
+ export declare const MAX_JSON_BODY_BYTES_V2: number;
7
+ export declare const MAX_RESOURCES_READ_BODY_BYTES_V2: number;
8
+ export declare const MAX_HOST_BODY_BYTES_V2: number;
9
+ export declare const MAX_STATE_VALUE_BYTES_V2: number;
10
+ export declare const MAX_STATE_RECEIPT_BYTES_V2: number;
11
+ export declare const MAX_PROCESS_OUTPUT_BYTES_V2: number;
12
+ export declare const POLICY_LEASE_MS_V2 = 30000;
13
+ export declare const wireOperationsV2: readonly ["agent.project.resolve", "agent.project.inspect", "agent.project.close", "agent.open", "agent.close", "agent.run.start", "agent.run.get", "agent.run.inspect", "agent.run.input", "agent.run.cancel", "agent.run.list", "agent.tasks.create", "agent.tasks.get", "agent.tasks.update", "agent.tasks.cancel", "agent.resources.list", "agent.resources.read", "agent.context.read", "agent.process.list", "agent.process.get", "agent.process.stop", "transfer.prepare", "transfer.revoke", "agent.transfer.reserveClaim", "agent.transfer.commitClaim", "agent.transfer.releaseReservation", "authorization.refresh", "state.user.get", "state.user.set", "state.user.delete", "host.request", "attachment.open", "stream.prepare", "stream.revoke", "maintenance.request.create", "maintenance.request.get", "maintenance.request.list", "maintenance.request.cancel", "maintenance.request.decision", "maintenance.request.beginExecution", "agent.maintenance.draft.read", "agent.maintenance.draft.prepare", "agent.maintenance.draft.verify", "agent.maintenance.draft.notify", "agent.maintenance.oauth.start", "agent.maintenance.oauth.complete", "agent.maintenance.execute", "agent.maintenance.get", "agent.maintenance.cancel"];
14
+ export type WireOperationV2 = (typeof wireOperationsV2)[number];
15
+ export interface WireHostCapabilitiesV2 {
16
+ sampling: boolean;
17
+ elicitation: boolean;
18
+ roots: boolean;
19
+ }
20
+ export type WireHostFeaturesV2 = HostFeatures;
21
+ export type WireCallerV2 = Caller & (OwnerSessionCaller | (McpCaller & {
22
+ readonly grantId: string;
23
+ /** Cloud-minted opaque association with the original actual MCP Host request/session. */
24
+ readonly hostRef?: string;
25
+ readonly hostCapabilities?: WireHostCapabilitiesV2;
26
+ readonly hostFeatures?: WireHostFeaturesV2;
27
+ }));
28
+ export interface WireConnectionV2 {
29
+ readonly agentId: string;
30
+ readonly profile: Profile;
31
+ readonly bootId: string;
32
+ readonly cloudEnvironment: string;
33
+ readonly connectionId: string;
34
+ }
35
+ export type WireBudgetNameV2 = "controlBytes" | "textBytes" | "imageBytes" | "audioBytes" | "inlineBytes" | "responseBytes" | "fileBytes" | "attachmentBytes" | "attachmentCount" | "resourcePageLimit";
36
+ export type WireBudgetsV2 = Partial<Record<WireBudgetNameV2, number>>;
37
+ export interface WireVisibilityV2 {
38
+ readonly disabledItems: readonly {
39
+ kind: "instruction" | "skill";
40
+ key: string;
41
+ }[];
42
+ }
43
+ export interface WireAuthorizationV2 {
44
+ readonly agentId: string;
45
+ readonly projectId?: string;
46
+ readonly projectRoot?: string;
47
+ readonly projectName?: string;
48
+ readonly projectDescription?: string;
49
+ readonly projectContextVisibility?: WireVisibilityV2;
50
+ readonly allowedRoots: readonly string[];
51
+ readonly budgets: WireBudgetsV2;
52
+ /** Current Cloud policy revision and a short lease; neither comes from model input. */
53
+ readonly revision: string;
54
+ readonly expiresAt: string;
55
+ }
56
+ export interface WireInvocationContextV2 {
57
+ readonly caller: WireCallerV2;
58
+ readonly authorization: WireAuthorizationV2;
59
+ readonly connection: WireConnectionV2;
60
+ }
61
+ export interface WireErrorV2 {
62
+ readonly code: string;
63
+ readonly message: string;
64
+ readonly details?: JsonObject;
65
+ }
66
+ export interface WireSubmissionV2 {
67
+ readonly issuedAt: number;
68
+ readonly expiresAt: number;
69
+ }
70
+ export interface WireProjectResolveInputV2 {
71
+ readonly path: string;
72
+ }
73
+ export interface WireProjectResolveOutputV2 {
74
+ readonly root: string;
75
+ readonly name: string;
76
+ }
77
+ export interface WireProjectCloseInputV2 {
78
+ readonly projectId: string;
79
+ }
80
+ export interface WireProjectCloseOutputV2 {
81
+ readonly projectId: string;
82
+ readonly agentConfirmed: true;
83
+ readonly affectedContextCount: number;
84
+ readonly closedAt: string;
85
+ }
86
+ export interface WireOpenInputV2 {
87
+ readonly agentId: string;
88
+ readonly projectId?: string;
89
+ readonly path?: string;
90
+ readonly contextId?: string;
91
+ }
92
+ /** Nested public materials retain their existing discovered/published schemas. */
93
+ export interface WireOpenOutputV2 {
94
+ readonly contextId: string;
95
+ readonly revision: number;
96
+ readonly observedAt: string;
97
+ readonly pwd: string;
98
+ readonly agent: JsonObject;
99
+ readonly project: JsonObject | null;
100
+ readonly warnings: readonly JsonObject[];
101
+ }
102
+ export interface WireCloseInputV2 {
103
+ readonly contextId: string;
104
+ }
105
+ export interface WireCloseOutputV2 {
106
+ readonly contextId: string;
107
+ readonly projectId: string | null;
108
+ readonly agentConfirmed: true;
109
+ readonly affectedContextIds: readonly string[];
110
+ readonly closedAt: string;
111
+ }
112
+ /** Stable normalized identity; temporary Host URLs/file IDs never cross this wire. */
113
+ export type WireAttachmentV2 = {
114
+ readonly transferId: string;
115
+ } | {
116
+ readonly uri: string;
117
+ } | {
118
+ readonly sourceId: string;
119
+ };
120
+ export interface WireRunStartInputV2 {
121
+ readonly contextId: string;
122
+ readonly script?: string;
123
+ readonly scriptName?: string;
124
+ readonly replayRunId?: string;
125
+ readonly input?: JsonValue;
126
+ readonly attachments?: readonly WireAttachmentV2[];
127
+ readonly requestId?: string;
128
+ readonly submission?: WireSubmissionV2;
129
+ readonly pwd?: string;
130
+ readonly waitMs?: number;
131
+ readonly timeoutMs?: number;
132
+ }
133
+ export interface WireRunGetInputV2 {
134
+ readonly agentId: string;
135
+ readonly runId?: string;
136
+ readonly requestId?: string;
137
+ readonly waitMs?: number;
138
+ }
139
+ export interface WireRunInputInputV2 {
140
+ readonly agentId: string;
141
+ readonly runId: string;
142
+ readonly waitId: string;
143
+ readonly input: JsonValue;
144
+ readonly attachments?: readonly WireAttachmentV2[];
145
+ readonly waitMs?: number;
146
+ }
147
+ export interface WireRunCancelInputV2 {
148
+ readonly agentId: string;
149
+ readonly runId: string;
150
+ }
151
+ export interface WireRunListInputV2 {
152
+ readonly agentId: string;
153
+ readonly status?: RunStatus;
154
+ readonly scriptName?: string;
155
+ readonly source?: "inline" | "named" | "history";
156
+ readonly projectId?: string;
157
+ readonly contextId?: string;
158
+ readonly from?: string;
159
+ readonly to?: string;
160
+ readonly limit?: number;
161
+ readonly cursor?: string;
162
+ }
163
+ export interface WireRunV2 {
164
+ readonly runId: string;
165
+ readonly contextId: string;
166
+ readonly projectId: string | null;
167
+ readonly revision: number;
168
+ readonly status: RunStatus;
169
+ readonly scriptName: string | null;
170
+ readonly source: "inline" | "named" | "history";
171
+ readonly origin: ContributionOrigin | null;
172
+ readonly replayOfRunId: string | null;
173
+ readonly acceptedAt: string;
174
+ readonly startedAt: string | null;
175
+ readonly finishedAt: string | null;
176
+ readonly deadlineAt: string;
177
+ readonly updatedAt: string;
178
+ readonly error: WireErrorV2 | null;
179
+ readonly stop: JsonObject | null;
180
+ readonly cleanup: JsonObject;
181
+ readonly availability: {
182
+ readonly code: boolean;
183
+ readonly input: boolean;
184
+ readonly result: boolean;
185
+ readonly logs: boolean;
186
+ };
187
+ readonly scriptDesc?: string | null;
188
+ readonly descriptionTruncated?: true;
189
+ }
190
+ export interface WireWaitV2 {
191
+ readonly waitId: string;
192
+ readonly revision: number;
193
+ readonly status: "waiting" | "consumed" | "expired" | "cancelled";
194
+ readonly deliveryState: "none" | "preparing" | "failed" | "consumed";
195
+ readonly request: JsonObject;
196
+ readonly createdAt: string;
197
+ readonly deadlineAt: string;
198
+ readonly consumedAt: string | null;
199
+ readonly error: WireErrorV2 | null;
200
+ }
201
+ export interface WireArtifactV2 {
202
+ readonly uri: string;
203
+ readonly name: string;
204
+ readonly mimeType: string;
205
+ readonly size: number;
206
+ readonly sha256: string;
207
+ readonly expiresAt: string;
208
+ }
209
+ export interface WireIconV2 {
210
+ readonly src: string;
211
+ readonly mimeType?: string;
212
+ readonly sizes?: readonly string[];
213
+ readonly theme?: "light" | "dark";
214
+ }
215
+ export type WireAnnotationsV2 = JsonObject & {
216
+ readonly audience?: ("user" | "assistant")[];
217
+ readonly priority?: number;
218
+ readonly lastModified?: string;
219
+ };
220
+ export interface WireResourceEntryV2 {
221
+ readonly uri: string;
222
+ readonly name: string;
223
+ readonly mimeType?: string;
224
+ readonly description?: string;
225
+ readonly size?: number;
226
+ readonly title?: string;
227
+ readonly icons?: readonly WireIconV2[];
228
+ readonly annotations?: WireAnnotationsV2;
229
+ }
230
+ interface WireContentMetaV2 {
231
+ readonly annotations?: WireAnnotationsV2;
232
+ readonly description?: string;
233
+ }
234
+ export type WireContentV2 = (WireContentMetaV2 & {
235
+ readonly type: "text";
236
+ readonly text: string;
237
+ }) | (WireContentMetaV2 & {
238
+ readonly type: "image" | "audio";
239
+ readonly resource: WireArtifactV2;
240
+ readonly mimeType: string;
241
+ }) | (WireContentMetaV2 & {
242
+ readonly type: "resource_link";
243
+ readonly title?: string;
244
+ readonly size?: number;
245
+ readonly icons?: readonly WireIconV2[];
246
+ readonly uri: string;
247
+ readonly name: string;
248
+ readonly mimeType?: string;
249
+ }) | (WireContentMetaV2 & {
250
+ readonly type: "resource";
251
+ readonly resource: WireArtifactV2;
252
+ readonly uri: string;
253
+ readonly encoding: "text" | "blob";
254
+ });
255
+ /** Safe result description only. No image data, audio data, resource blob, or live request URL. */
256
+ export interface WireResultV2 {
257
+ readonly content: readonly WireContentV2[];
258
+ readonly data?: JsonValue;
259
+ readonly isError?: boolean;
260
+ readonly conversions?: readonly JsonObject[];
261
+ readonly delivery?: {
262
+ readonly complete: false;
263
+ readonly reason: "context_budget";
264
+ readonly dataResource?: WireArtifactV2;
265
+ readonly textResource?: WireArtifactV2;
266
+ };
267
+ readonly resultType?: "complete";
268
+ readonly mcpResults?: readonly JsonObject[];
269
+ readonly protocolMeta?: {
270
+ readonly value: JsonObject;
271
+ } | {
272
+ readonly stream: WireFixedStreamRefV2;
273
+ };
274
+ }
275
+ export interface WireResultBodyV2 {
276
+ readonly body: WireFixedStreamRefV2;
277
+ readonly protocolMeta?: WireResultV2["protocolMeta"];
278
+ }
279
+ /** A fully normalized model descriptor moved onto its independent fixed JSON channel. */
280
+ export type WireResultDescriptorBodyV2 = Omit<WireResultV2, "protocolMeta">;
281
+ export interface WireTransferRequestV2 {
282
+ readonly method: "GET" | "PUT";
283
+ readonly url: string;
284
+ readonly headers: Readonly<Record<string, string>>;
285
+ readonly expiresAt: string;
286
+ }
287
+ export type WireTransferDeliveryV2 = {
288
+ readonly transferId: string;
289
+ readonly available: true;
290
+ readonly request: WireTransferRequestV2;
291
+ } | {
292
+ readonly transferId: string;
293
+ readonly available: false;
294
+ readonly reason: string;
295
+ };
296
+ export interface WireRunViewV2 {
297
+ readonly run: WireRunV2;
298
+ readonly wait: WireWaitV2 | null;
299
+ readonly result: WireResultV2 | WireResultBodyV2 | null;
300
+ readonly observedAt: string;
301
+ readonly operations: {
302
+ readonly items: readonly JsonObject[];
303
+ readonly complete: boolean;
304
+ };
305
+ readonly resources: {
306
+ readonly items: readonly JsonObject[];
307
+ readonly complete: boolean;
308
+ };
309
+ readonly unavailable?: WireErrorV2;
310
+ readonly code?: {
311
+ readonly text: string;
312
+ readonly complete: boolean;
313
+ readonly nextCursor: string | null;
314
+ };
315
+ readonly input?: JsonValue;
316
+ readonly logs?: {
317
+ readonly text: string;
318
+ readonly complete: boolean;
319
+ readonly nextCursor: string | null;
320
+ };
321
+ /** Transient delivery is separate from the durable normalized result/history. */
322
+ readonly transient?: {
323
+ readonly transfers: readonly WireTransferDeliveryV2[];
324
+ };
325
+ }
326
+ export interface WireRunCancelOutputV2 {
327
+ readonly accepted: boolean;
328
+ readonly view: WireRunViewV2;
329
+ }
330
+ export interface WireTaskErrorV2 {
331
+ readonly code: number;
332
+ readonly message: string;
333
+ readonly data?: JsonValue;
334
+ }
335
+ export type WireTaskBindingV2 = {
336
+ readonly taskId: string;
337
+ readonly agentId: string;
338
+ readonly runId: string;
339
+ readonly createdAt: string;
340
+ readonly lastUpdatedAt: string;
341
+ readonly expiresAt: string;
342
+ readonly ttlMs: number;
343
+ } & ({
344
+ readonly status: "failed";
345
+ readonly error: WireTaskErrorV2;
346
+ } | {
347
+ readonly status: "working" | "input_required" | "completed" | "cancelled";
348
+ readonly error?: never;
349
+ });
350
+ export interface WireTaskCreateInputV2 {
351
+ readonly runId: string;
352
+ readonly ttlMs?: number;
353
+ }
354
+ export interface WireTaskGetInputV2 {
355
+ readonly taskId: string;
356
+ }
357
+ export interface WireTaskUpdateInputV2 {
358
+ readonly taskId: string;
359
+ readonly waitId: string;
360
+ readonly input: JsonValue;
361
+ readonly attachments?: readonly WireAttachmentV2[];
362
+ }
363
+ export interface WireTaskCancelInputV2 {
364
+ readonly taskId: string;
365
+ }
366
+ export type WireTaskCreateOutputV2 = WireTaskBindingV2;
367
+ export interface WireTaskViewV2 {
368
+ readonly task: WireTaskBindingV2;
369
+ readonly view: WireRunViewV2;
370
+ }
371
+ export interface WireTaskCancelOutputV2 extends WireTaskViewV2 {
372
+ readonly accepted: boolean;
373
+ }
374
+ export interface WireRunListOutputV2 {
375
+ readonly runs: readonly WireRunV2[];
376
+ readonly nextCursor: string | null;
377
+ readonly observedAt: string;
378
+ }
379
+ export type WireProcessSnapshotV2 = {
380
+ readonly processId: string;
381
+ readonly originRunId: string | null;
382
+ readonly contextId: string | null;
383
+ readonly projectId: string | null;
384
+ readonly status: string;
385
+ readonly lifetime: "run" | "instance" | "background";
386
+ readonly createdAt: number;
387
+ readonly closedAt: number | null;
388
+ readonly handedOffAt: number | null;
389
+ readonly controlAvailable: boolean;
390
+ readonly details: JsonObject;
391
+ };
392
+ export interface WireProcessListInputV2 {
393
+ readonly projectId?: string;
394
+ readonly limit?: number;
395
+ readonly cursor?: string;
396
+ }
397
+ export interface WireProcessListOutputV2 {
398
+ readonly items: readonly WireProcessSnapshotV2[];
399
+ readonly nextCursor: string | null;
400
+ readonly observedAt: number;
401
+ }
402
+ export interface WireProcessGetInputV2 {
403
+ readonly processId: string;
404
+ }
405
+ export type WireProcessGetOutputV2 = WireProcessSnapshotV2;
406
+ export interface WireProcessStopInputV2 {
407
+ readonly processId: string;
408
+ }
409
+ export interface WireProcessStopOutputV2 {
410
+ readonly accepted: boolean;
411
+ readonly item: WireProcessSnapshotV2;
412
+ }
413
+ export interface WireResourcesListInputV2 {
414
+ readonly cursor?: string;
415
+ readonly limit?: number;
416
+ }
417
+ export interface WireResourcesListPageV2 {
418
+ readonly resources: readonly WireResourceEntryV2[];
419
+ readonly nextCursor: string | null;
420
+ }
421
+ export type WireResourcesListOutputV2 = WireResourcesListPageV2 | {
422
+ readonly body: WireFixedStreamRefV2;
423
+ };
424
+ export interface WireResourcesReadInputV2 {
425
+ readonly uri: string;
426
+ readonly maxBytes: number;
427
+ }
428
+ export type WireResourceBodyV2 = {
429
+ readonly uri: string;
430
+ readonly mimeType: string;
431
+ } & ({
432
+ readonly text: string;
433
+ } | {
434
+ readonly stream: WireFixedStreamRefV2;
435
+ });
436
+ export type WireResourcesReadOutputV2 = {
437
+ readonly contents: readonly WireResourceBodyV2[];
438
+ readonly body?: never;
439
+ } | {
440
+ readonly body: WireFixedStreamRefV2;
441
+ readonly contents?: never;
442
+ };
443
+ /** Complete standard MCP result; bytes and protocol metadata never enter WSS JSON. */
444
+ export type WireMCPResourceContentsV2 = {
445
+ readonly uri: string;
446
+ readonly mimeType?: string;
447
+ readonly _meta?: JsonObject;
448
+ readonly icons?: readonly WireIconV2[];
449
+ readonly metadata?: JsonValue;
450
+ readonly name?: string;
451
+ readonly title?: string;
452
+ readonly description?: string;
453
+ readonly size?: number;
454
+ readonly annotations?: WireAnnotationsV2;
455
+ } & ({
456
+ readonly text: string;
457
+ readonly blob?: never;
458
+ } | {
459
+ readonly blob: string;
460
+ readonly text?: never;
461
+ });
462
+ export interface WireResourcesReadBodyV2 {
463
+ readonly contents: readonly WireMCPResourceContentsV2[];
464
+ readonly _meta?: JsonObject;
465
+ readonly icons?: readonly WireIconV2[];
466
+ readonly metadata?: JsonValue;
467
+ readonly resultType?: "complete";
468
+ readonly ttlMs?: number;
469
+ readonly cacheScope?: "public" | "private";
470
+ }
471
+ export interface WireContextReadInputV2 {
472
+ readonly contextId: string;
473
+ readonly revision: number;
474
+ readonly itemId: string;
475
+ readonly cursor?: string;
476
+ readonly maxBytes: number;
477
+ readonly relativePath?: string;
478
+ readonly includeEntries?: boolean;
479
+ readonly startLine?: number;
480
+ readonly maxLines?: number;
481
+ }
482
+ export interface WireContextReadOutputV2 {
483
+ readonly contextId: string;
484
+ readonly revision: number;
485
+ readonly itemId: string;
486
+ readonly contentRevision: string;
487
+ readonly text: string;
488
+ readonly complete: boolean;
489
+ readonly nextCursor: string | null;
490
+ readonly entries?: readonly {
491
+ readonly displayPath: string;
492
+ readonly kind: "file" | "directory";
493
+ }[];
494
+ readonly startLine?: number;
495
+ readonly endLine?: number;
496
+ readonly startsMidLine?: boolean;
497
+ readonly endsMidLine?: boolean;
498
+ readonly treeTruncated?: boolean;
499
+ }
500
+ export type WireStreamPurposeV2 = "resource" | "attachment" | "transfer" | "host-request" | "host-response" | "result-meta" | "maintenance";
501
+ export type WireStreamDirectionV2 = "agent-to-cloud" | "cloud-to-agent";
502
+ export interface WireStreamRefV2 {
503
+ readonly streamId: string;
504
+ readonly purpose: WireStreamPurposeV2;
505
+ readonly direction: WireStreamDirectionV2;
506
+ readonly expiresAt: string;
507
+ readonly maxBytes: number;
508
+ readonly mimeType?: string;
509
+ readonly size?: number;
510
+ readonly sha256?: string;
511
+ }
512
+ export interface WireFixedStreamRefV2 extends WireStreamRefV2 {
513
+ readonly mimeType: string;
514
+ readonly size: number;
515
+ readonly sha256: string;
516
+ }
517
+ /** Independent HTTP stream handshake. Agent credential stays in Authorization, never JSON. */
518
+ export interface WireStreamHandshakeV2 extends WireConnectionV2 {
519
+ readonly streamId: string;
520
+ readonly purpose: WireStreamPurposeV2;
521
+ readonly direction: WireStreamDirectionV2;
522
+ readonly transferId?: string;
523
+ readonly reservationId?: string;
524
+ }
525
+ export interface WireAttachmentOpenInputV2 {
526
+ readonly sourceId: string;
527
+ readonly originInvocationId: string;
528
+ readonly runId?: string;
529
+ }
530
+ export interface WireAttachmentOpenOutputV2 {
531
+ readonly stream: WireStreamRefV2;
532
+ readonly name: string;
533
+ readonly mimeType: string;
534
+ readonly size?: number;
535
+ readonly sha256?: string;
536
+ }
537
+ export interface WireStreamPrepareInputV2 {
538
+ readonly originInvocationId: string;
539
+ readonly runId?: string;
540
+ readonly resourceUri?: string;
541
+ readonly purpose: WireStreamPurposeV2;
542
+ readonly direction: "agent-to-cloud";
543
+ readonly expiresAt: string;
544
+ readonly maxBytes: number;
545
+ readonly mimeType: string;
546
+ readonly size: number;
547
+ readonly sha256: string;
548
+ }
549
+ export interface WireStreamPrepareOutputV2 {
550
+ readonly stream: WireFixedStreamRefV2;
551
+ }
552
+ export interface WireStreamRevokeInputV2 {
553
+ readonly streamId: string;
554
+ readonly reason: WireErrorV2;
555
+ }
556
+ export interface WireStreamRevokeOutputV2 {
557
+ readonly streamId: string;
558
+ readonly closed: true;
559
+ }
560
+ export interface WireTransferTargetV2 {
561
+ readonly path?: string;
562
+ readonly resourceUri?: string;
563
+ readonly name?: string;
564
+ readonly mimeType?: string;
565
+ readonly size?: number;
566
+ readonly sha256?: string;
567
+ readonly expectedSize?: number;
568
+ readonly expectedSha256?: string;
569
+ }
570
+ export interface WireTransferPrepareInputV2 {
571
+ readonly transferId: string;
572
+ readonly resourceId: string;
573
+ readonly runId: string;
574
+ readonly contextId: string;
575
+ readonly projectId: string | null;
576
+ readonly direction: "upload" | "download";
577
+ readonly claimDeadlineAt: string;
578
+ readonly maxBytes: number;
579
+ readonly target: WireTransferTargetV2;
580
+ }
581
+ export interface WireTransferPrepareOutputV2 {
582
+ readonly transferId: string;
583
+ readonly request: WireTransferRequestV2;
584
+ }
585
+ export interface WireTransferStopV2 {
586
+ readonly kind: "cancel" | "expired" | "timeout" | "permission" | "failure";
587
+ readonly code: string;
588
+ }
589
+ export interface WireTransferRevokeInputV2 {
590
+ readonly transferId: string;
591
+ readonly reason: WireTransferStopV2;
592
+ }
593
+ export interface WireTransferRevokeOutputV2 {
594
+ readonly transferId: string;
595
+ readonly closed: true;
596
+ }
597
+ export interface WireTransferReserveInputV2 {
598
+ readonly transferId: string;
599
+ }
600
+ export interface WireTransferReserveOutputV2 {
601
+ readonly transferId: string;
602
+ readonly reservationId: string;
603
+ readonly expiresAt: string;
604
+ readonly direction: "upload" | "download";
605
+ readonly maxBytes: number;
606
+ }
607
+ export interface WireTransferCommitInputV2 {
608
+ readonly transferId: string;
609
+ readonly reservationId: string;
610
+ readonly stream: WireStreamRefV2;
611
+ readonly contentLength?: number;
612
+ }
613
+ export interface WireTransferReleaseInputV2 {
614
+ readonly transferId: string;
615
+ readonly reservationId: string;
616
+ }
617
+ export interface WireTransferReleaseOutputV2 {
618
+ readonly transferId: string;
619
+ readonly released: true;
620
+ }
621
+ export interface WireTransferFileV2 {
622
+ readonly path: string;
623
+ readonly name: string;
624
+ readonly size: number;
625
+ readonly mimeType: string;
626
+ readonly sha256: string;
627
+ readonly revision: string;
628
+ }
629
+ export interface WireTransferSnapshotV2 {
630
+ readonly transferId: string;
631
+ readonly direction: "upload" | "download";
632
+ readonly status: "preparing" | "pending" | "transferring" | "cancelling" | "succeeded" | "failed" | "cancelled" | "expired" | "interrupted";
633
+ readonly runId: string | null;
634
+ readonly contextId: string | null;
635
+ readonly projectId: string | null;
636
+ readonly path?: string;
637
+ readonly resource?: WireResourceEntryV2;
638
+ readonly maxBytes?: number | null;
639
+ readonly progress: {
640
+ readonly bytesTransferred: number;
641
+ readonly totalBytes: number | null;
642
+ };
643
+ readonly createdAt: string;
644
+ readonly expiresAt: string | null;
645
+ readonly startedAt: string | null;
646
+ readonly deadlineAt: string | null;
647
+ readonly finishedAt: string | null;
648
+ readonly file?: WireTransferFileV2;
649
+ readonly error: WireErrorV2 | null;
650
+ }
651
+ export type WireAuthorizationRefreshInputV2 = {
652
+ readonly originInvocationId: string;
653
+ } & ({
654
+ readonly runId: string;
655
+ readonly maintenanceRequestId?: never;
656
+ readonly transferId?: never;
657
+ readonly streamId?: never;
658
+ } | {
659
+ readonly maintenanceRequestId: string;
660
+ readonly runId?: never;
661
+ readonly transferId?: never;
662
+ readonly streamId?: never;
663
+ } | {
664
+ readonly transferId: string;
665
+ readonly runId?: never;
666
+ readonly maintenanceRequestId?: never;
667
+ readonly streamId?: never;
668
+ } | {
669
+ readonly streamId: string;
670
+ readonly runId?: never;
671
+ readonly maintenanceRequestId?: never;
672
+ readonly transferId?: never;
673
+ });
674
+ export interface WireAuthorizationRefreshOutputV2 {
675
+ readonly authorization: WireAuthorizationV2;
676
+ }
677
+ export interface WireUserStateGetInputV2 {
678
+ readonly namespace: "default";
679
+ readonly key: string;
680
+ }
681
+ export interface WireUserStateSetInputV2 extends WireUserStateGetInputV2 {
682
+ readonly value: JsonValue;
683
+ readonly expectedVersion: number | null;
684
+ }
685
+ export interface WireUserStateDeleteInputV2 extends WireUserStateGetInputV2 {
686
+ readonly expectedVersion: number;
687
+ }
688
+ export interface WireStateValueV2 {
689
+ readonly value: JsonValue;
690
+ readonly version: number;
691
+ readonly updatedAt: number;
692
+ }
693
+ export interface WireUserStateGetOutputV2 {
694
+ readonly state: WireStateValueV2 | null;
695
+ }
696
+ export type WireUserStateSetOutputV2 = WireStateValueV2;
697
+ export interface WireUserStateDeleteOutputV2 {
698
+ readonly deleted: true;
699
+ readonly version: number;
700
+ readonly updatedAt: number;
701
+ }
702
+ export interface WireHostRequestInputV2 {
703
+ readonly runId: string;
704
+ readonly originInvocationId: string;
705
+ readonly hostRef: string;
706
+ readonly action: "sampling" | "elicitation" | "roots";
707
+ readonly body: WireFixedStreamRefV2;
708
+ }
709
+ export interface WireHostRequestOutputV2 {
710
+ readonly action: "sampling" | "elicitation" | "roots";
711
+ readonly body: WireFixedStreamRefV2;
712
+ }
713
+ export type WireMaintenanceTargetV2 = "package" | "extension" | "mcp" | "api";
714
+ export interface WireMaintenanceSummaryV2 {
715
+ readonly title: string;
716
+ readonly changeKinds: readonly string[];
717
+ readonly permissions: readonly string[];
718
+ readonly version: string | null;
719
+ readonly namespace: string | null;
720
+ readonly restartMayBeRequired: boolean;
721
+ }
722
+ export interface WireMaintenanceCandidateV2 {
723
+ readonly target: WireMaintenanceTargetV2;
724
+ readonly action: string;
725
+ readonly name: string;
726
+ readonly objectId: string | null;
727
+ readonly baseRevision: string | null;
728
+ readonly candidateRevision: string;
729
+ readonly summary: WireMaintenanceSummaryV2;
730
+ readonly authStatus: "not_required" | "required" | "ready" | "failed";
731
+ }
732
+ export interface WireMaintenanceCreateV2 extends WireMaintenanceCandidateV2 {
733
+ readonly requestKey: string;
734
+ readonly originRunId: string;
735
+ }
736
+ export interface WireMaintenanceDecisionV2 {
737
+ readonly status: "approved" | "denied";
738
+ readonly revision: number;
739
+ readonly candidateRevision: string;
740
+ readonly decidedAt: string;
741
+ readonly decisionId: string;
742
+ }
743
+ export interface WireMaintenanceResultV2 {
744
+ readonly changed: boolean;
745
+ readonly restartRequired: boolean;
746
+ readonly package?: {
747
+ readonly name: string;
748
+ readonly declared: boolean;
749
+ readonly installedVersion: string | null;
750
+ };
751
+ readonly extension?: {
752
+ readonly namespace: string;
753
+ readonly desiredEnabled: boolean;
754
+ readonly state: string;
755
+ readonly activeVersion: string | null;
756
+ } | null;
757
+ readonly connection?: {
758
+ readonly name: string;
759
+ readonly state: string;
760
+ readonly revision: string | null;
761
+ } | null;
762
+ readonly api?: {
763
+ readonly name: string;
764
+ readonly state: string;
765
+ readonly revision: string | null;
766
+ } | null;
767
+ }
768
+ export interface WireMaintenanceExecutionV2 {
769
+ readonly operationId: string;
770
+ readonly startedAt: string;
771
+ readonly status?: string;
772
+ readonly result?: WireMaintenanceResultV2;
773
+ readonly error?: {
774
+ readonly code: string;
775
+ readonly message: string;
776
+ };
777
+ }
778
+ export interface WireMaintenanceViewV2 extends WireMaintenanceCandidateV2 {
779
+ readonly agentName?: string;
780
+ readonly source?: {
781
+ readonly name?: string;
782
+ };
783
+ readonly requestId: string;
784
+ readonly agentId: string;
785
+ readonly profile: Profile;
786
+ readonly status: "pending" | "approved" | "denied" | "cancelled" | "expired";
787
+ readonly revision: number;
788
+ readonly createdAt: string;
789
+ readonly expiresAt: string;
790
+ readonly approvalUrl?: string;
791
+ readonly decidedAt?: string;
792
+ readonly decision?: WireMaintenanceDecisionV2;
793
+ readonly execution?: WireMaintenanceExecutionV2;
794
+ }
795
+ export interface WireMaintenanceListOptionsV2 {
796
+ readonly target?: WireMaintenanceTargetV2;
797
+ readonly name?: string;
798
+ readonly status?: WireMaintenanceViewV2["status"];
799
+ readonly limit?: number;
800
+ readonly cursor?: string;
801
+ }
802
+ export interface WireMaintenancePageV2 {
803
+ readonly requests: readonly WireMaintenanceViewV2[];
804
+ readonly nextCursor?: string | null;
805
+ }
806
+ export interface WireMaintenanceBeginExecutionV2 {
807
+ readonly requestId: string;
808
+ readonly approvedRevision: string;
809
+ readonly decisionRevision: number;
810
+ readonly operationId: string;
811
+ }
812
+ export interface WireMaintenanceLookupV2 {
813
+ readonly requestId: string;
814
+ readonly revision?: number;
815
+ }
816
+ export interface WireMaintenanceBodyInputV2 {
817
+ readonly requestId: string;
818
+ readonly revision: number;
819
+ readonly body: WireFixedStreamRefV2;
820
+ }
821
+ export interface WireMaintenanceBodyOutputV2 {
822
+ readonly body: WireFixedStreamRefV2;
823
+ }
824
+ /** Payload DTOs below are serialized only onto independent authenticated streams. */
825
+ export interface WireMaintenanceDraftV2 {
826
+ readonly currentConfig?: JsonObject;
827
+ readonly config: JsonObject;
828
+ readonly authentication: readonly {
829
+ readonly id: string;
830
+ readonly type: string;
831
+ readonly location?: string;
832
+ readonly name?: string;
833
+ readonly flow?: string;
834
+ readonly oauth: boolean;
835
+ readonly fields: readonly {
836
+ readonly key: string;
837
+ readonly label: string;
838
+ readonly configured: boolean;
839
+ readonly required: boolean;
840
+ }[];
841
+ }[];
842
+ readonly security: readonly (readonly string[])[];
843
+ readonly diagnostics: readonly string[];
844
+ }
845
+ export interface WireMaintenanceDraftInputV2 {
846
+ readonly revision: number;
847
+ readonly config?: JsonObject;
848
+ readonly version?: string;
849
+ readonly credentials?: readonly {
850
+ readonly key: string;
851
+ readonly operation: "keep" | "replace" | "clear";
852
+ readonly value?: string;
853
+ }[];
854
+ }
855
+ export interface WireMaintenanceDraftReadV2 {
856
+ readonly draft: WireMaintenanceDraftV2;
857
+ readonly execution?: WireMaintenanceExecutionV2;
858
+ }
859
+ export interface WireMaintenancePreparedV2 {
860
+ readonly candidate: WireMaintenanceCandidateV2;
861
+ readonly draft: WireMaintenanceDraftV2;
862
+ }
863
+ export interface WireMaintenanceOAuthBindingV2 {
864
+ readonly state: string;
865
+ readonly callbackUrl: string;
866
+ readonly schemeId: string;
867
+ readonly candidateRevision: string;
868
+ }
869
+ export interface WireMaintenanceOAuthLaunchV2 {
870
+ readonly authorizationUrl?: string;
871
+ readonly verificationUri?: string;
872
+ readonly userCode?: string;
873
+ readonly issuer: string;
874
+ readonly requireIssuer: boolean;
875
+ }
876
+ export interface WireMaintenanceOAuthCompleteV2 {
877
+ readonly schemeId: string;
878
+ readonly candidateRevision: string;
879
+ readonly callback: {
880
+ readonly state: string;
881
+ readonly code?: string;
882
+ readonly error?: string;
883
+ readonly issuer?: string;
884
+ };
885
+ }
886
+ export interface WireInputsV2 {
887
+ "agent.project.resolve": WireProjectResolveInputV2;
888
+ "agent.project.close": WireProjectCloseInputV2;
889
+ "agent.project.inspect": {
890
+ readonly projectId: string;
891
+ readonly contextId?: string;
892
+ };
893
+ "agent.open": WireOpenInputV2;
894
+ "agent.close": WireCloseInputV2;
895
+ "agent.run.start": WireRunStartInputV2;
896
+ "agent.run.get": WireRunGetInputV2;
897
+ "agent.run.inspect": {
898
+ readonly runId: string;
899
+ };
900
+ "agent.run.input": WireRunInputInputV2;
901
+ "agent.run.cancel": WireRunCancelInputV2;
902
+ "agent.run.list": WireRunListInputV2;
903
+ "agent.tasks.create": WireTaskCreateInputV2;
904
+ "agent.tasks.get": WireTaskGetInputV2;
905
+ "agent.tasks.update": WireTaskUpdateInputV2;
906
+ "agent.tasks.cancel": WireTaskCancelInputV2;
907
+ "agent.resources.list": WireResourcesListInputV2;
908
+ "agent.resources.read": WireResourcesReadInputV2;
909
+ "agent.context.read": WireContextReadInputV2;
910
+ "agent.process.list": WireProcessListInputV2;
911
+ "agent.process.get": WireProcessGetInputV2;
912
+ "agent.process.stop": WireProcessStopInputV2;
913
+ "transfer.prepare": WireTransferPrepareInputV2;
914
+ "transfer.revoke": WireTransferRevokeInputV2;
915
+ "agent.transfer.reserveClaim": WireTransferReserveInputV2;
916
+ "agent.transfer.commitClaim": WireTransferCommitInputV2;
917
+ "agent.transfer.releaseReservation": WireTransferReleaseInputV2;
918
+ "authorization.refresh": WireAuthorizationRefreshInputV2;
919
+ "state.user.get": WireUserStateGetInputV2;
920
+ "state.user.set": WireUserStateSetInputV2;
921
+ "state.user.delete": WireUserStateDeleteInputV2;
922
+ "host.request": WireHostRequestInputV2;
923
+ "attachment.open": WireAttachmentOpenInputV2;
924
+ "stream.prepare": WireStreamPrepareInputV2;
925
+ "stream.revoke": WireStreamRevokeInputV2;
926
+ "maintenance.request.create": WireMaintenanceCreateV2;
927
+ "maintenance.request.get": {
928
+ readonly requestId: string;
929
+ };
930
+ "maintenance.request.list": WireMaintenanceListOptionsV2;
931
+ "maintenance.request.cancel": {
932
+ readonly requestId: string;
933
+ };
934
+ "maintenance.request.decision": {
935
+ readonly requestId: string;
936
+ };
937
+ "maintenance.request.beginExecution": WireMaintenanceBeginExecutionV2;
938
+ "agent.maintenance.execute": {
939
+ readonly requestId: string;
940
+ };
941
+ "agent.maintenance.get": {
942
+ readonly requestId: string;
943
+ };
944
+ "agent.maintenance.cancel": {
945
+ readonly requestId: string;
946
+ };
947
+ "agent.maintenance.draft.read": WireMaintenanceLookupV2;
948
+ "agent.maintenance.draft.prepare": WireMaintenanceBodyInputV2;
949
+ "agent.maintenance.draft.verify": WireMaintenanceLookupV2;
950
+ "agent.maintenance.draft.notify": WireMaintenanceLookupV2;
951
+ "agent.maintenance.oauth.start": WireMaintenanceBodyInputV2;
952
+ "agent.maintenance.oauth.complete": WireMaintenanceBodyInputV2;
953
+ }
954
+ export interface WireOutputsV2 {
955
+ "agent.project.resolve": WireProjectResolveOutputV2;
956
+ "agent.project.close": WireProjectCloseOutputV2;
957
+ "agent.project.inspect": WireOpenOutputV2;
958
+ "agent.open": WireOpenOutputV2;
959
+ "agent.close": WireCloseOutputV2;
960
+ "agent.run.start": WireRunViewV2;
961
+ "agent.run.get": WireRunViewV2;
962
+ "agent.run.inspect": WireRunViewV2;
963
+ "agent.run.input": WireRunViewV2;
964
+ "agent.run.cancel": WireRunCancelOutputV2;
965
+ "agent.run.list": WireRunListOutputV2;
966
+ "agent.tasks.create": WireTaskCreateOutputV2;
967
+ "agent.tasks.get": WireTaskViewV2;
968
+ "agent.tasks.update": WireTaskViewV2;
969
+ "agent.tasks.cancel": WireTaskCancelOutputV2;
970
+ "agent.resources.list": WireResourcesListOutputV2;
971
+ "agent.resources.read": WireResourcesReadOutputV2;
972
+ "agent.context.read": WireContextReadOutputV2;
973
+ "agent.process.list": WireProcessListOutputV2;
974
+ "agent.process.get": WireProcessGetOutputV2;
975
+ "agent.process.stop": WireProcessStopOutputV2;
976
+ "transfer.prepare": WireTransferPrepareOutputV2;
977
+ "transfer.revoke": WireTransferRevokeOutputV2;
978
+ "agent.transfer.reserveClaim": WireTransferReserveOutputV2;
979
+ "agent.transfer.commitClaim": WireTransferSnapshotV2;
980
+ "agent.transfer.releaseReservation": WireTransferReleaseOutputV2;
981
+ "authorization.refresh": WireAuthorizationRefreshOutputV2;
982
+ "state.user.get": WireUserStateGetOutputV2;
983
+ "state.user.set": WireUserStateSetOutputV2;
984
+ "state.user.delete": WireUserStateDeleteOutputV2;
985
+ "host.request": WireHostRequestOutputV2;
986
+ "attachment.open": WireAttachmentOpenOutputV2;
987
+ "stream.prepare": WireStreamPrepareOutputV2;
988
+ "stream.revoke": WireStreamRevokeOutputV2;
989
+ "maintenance.request.create": WireMaintenanceViewV2;
990
+ "maintenance.request.get": WireMaintenanceViewV2;
991
+ "maintenance.request.list": WireMaintenancePageV2;
992
+ "maintenance.request.cancel": WireMaintenanceViewV2;
993
+ "maintenance.request.decision": WireMaintenanceViewV2;
994
+ "maintenance.request.beginExecution": WireMaintenanceViewV2;
995
+ "agent.maintenance.execute": WireMaintenanceViewV2;
996
+ "agent.maintenance.get": WireMaintenanceViewV2;
997
+ "agent.maintenance.cancel": WireMaintenanceViewV2;
998
+ "agent.maintenance.draft.read": WireMaintenanceBodyOutputV2;
999
+ "agent.maintenance.draft.prepare": WireMaintenanceBodyOutputV2;
1000
+ "agent.maintenance.draft.verify": WireMaintenanceCandidateV2;
1001
+ "agent.maintenance.draft.notify": {
1002
+ readonly requestId: string;
1003
+ readonly notified: true;
1004
+ };
1005
+ "agent.maintenance.oauth.start": WireMaintenanceBodyOutputV2;
1006
+ "agent.maintenance.oauth.complete": WireMaintenanceBodyOutputV2;
1007
+ }
1008
+ export type WireInvokeV2<O extends WireOperationV2 = WireOperationV2> = O extends WireOperationV2 ? {
1009
+ readonly type: "invoke";
1010
+ readonly id: string;
1011
+ readonly operation: O;
1012
+ readonly context: WireInvocationContextV2;
1013
+ readonly input: WireInputsV2[O];
1014
+ } : never;
1015
+ export type WireReplyV2<O extends WireOperationV2 = WireOperationV2> = O extends WireOperationV2 ? {
1016
+ readonly type: "result";
1017
+ readonly id: string;
1018
+ readonly operation: O;
1019
+ readonly output: WireOutputsV2[O];
1020
+ } : never;
1021
+ export interface WireFailureV2 {
1022
+ readonly type: "error";
1023
+ readonly id: string;
1024
+ readonly error: WireErrorV2;
1025
+ }
1026
+ export interface WireCancelV2 {
1027
+ readonly type: "cancel";
1028
+ readonly id: string;
1029
+ }
1030
+ export interface WireCatalogProjectV2 {
1031
+ readonly projectId: string;
1032
+ readonly name: string;
1033
+ readonly root: string;
1034
+ readonly description?: string;
1035
+ readonly projectContextVisibility: WireVisibilityV2;
1036
+ }
1037
+ export type WireCatalogSummaryV2 = {
1038
+ readonly projectId: string;
1039
+ readonly root: string;
1040
+ } & ({
1041
+ readonly status: "ok";
1042
+ readonly description: string;
1043
+ readonly revision: string;
1044
+ } | {
1045
+ readonly status: "missing";
1046
+ } | {
1047
+ readonly status: "unavailable";
1048
+ readonly error: WireErrorV2;
1049
+ });
1050
+ export interface WireEventDataV2 {
1051
+ "agent.run.changed": {
1052
+ readonly originInvocationId?: string;
1053
+ readonly runId: string;
1054
+ readonly revision: number;
1055
+ readonly status: RunStatus;
1056
+ readonly observedAt: string;
1057
+ };
1058
+ "agent.catalog.sync": {
1059
+ readonly generation: string;
1060
+ readonly page: number;
1061
+ readonly complete: boolean;
1062
+ readonly projects: readonly WireCatalogProjectV2[];
1063
+ readonly allowedRoots: readonly string[];
1064
+ };
1065
+ "agent.catalog.changed": {
1066
+ readonly sequence: number;
1067
+ readonly observedAt: string;
1068
+ readonly projects: readonly WireCatalogSummaryV2[];
1069
+ };
1070
+ /** null is authoritative revocation; it never commands a run transition. */
1071
+ "agent.authorization.changed": {
1072
+ readonly caller: WireCallerV2;
1073
+ readonly authorization: WireAuthorizationV2 | null;
1074
+ };
1075
+ }
1076
+ export type WireEventNameV2 = keyof WireEventDataV2;
1077
+ export type WireEventV2<N extends WireEventNameV2 = WireEventNameV2> = N extends WireEventNameV2 ? {
1078
+ readonly type: "event";
1079
+ readonly name: N;
1080
+ readonly connection: WireConnectionV2;
1081
+ readonly data: WireEventDataV2[N];
1082
+ } : never;
1083
+ export type WireEnvelopeV2 = WireInvokeV2 | WireReplyV2 | WireFailureV2 | WireCancelV2 | WireEventV2;