@maiaos/cli 0.1.0-canary.64 → 0.1.0-canary.66

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 (334) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -9
  3. package/dist/address-space/address-space.js +21 -2
  4. package/dist/address-space/index.js +1 -1
  5. package/dist/agents/client.d.ts +1 -0
  6. package/dist/agents/tree/tree.js +3 -3
  7. package/dist/bin/maia.NOTICES.txt +1 -1
  8. package/dist/bin/maia.cdx.json +70 -19
  9. package/dist/bin/maia.mjs +1 -1
  10. package/dist/board/client.d.ts +27 -0
  11. package/dist/board/client.js +40 -0
  12. package/dist/board/commands.d.ts +28 -0
  13. package/dist/board/commands.js +52 -0
  14. package/dist/board/index.d.ts +3 -0
  15. package/dist/board/index.js +3 -0
  16. package/dist/board/input.js +339 -0
  17. package/dist/board/output/format.js +175 -0
  18. package/dist/board/output/index.js +2 -0
  19. package/dist/board/plan.js +47 -0
  20. package/dist/board/tree/index.js +2 -0
  21. package/dist/board/tree/tree.js +161 -0
  22. package/dist/cli/cli.d.ts +3 -1
  23. package/dist/cli/cli.js +175 -6
  24. package/dist/cli/log-level.d.ts +11 -0
  25. package/dist/cli/log-level.js +14 -0
  26. package/dist/command-line/context.d.ts +18 -5
  27. package/dist/command-line/emit/output.d.ts +5 -1
  28. package/dist/command-line/emit/output.js +13 -5
  29. package/dist/command-line/index.d.ts +2 -2
  30. package/dist/command-line/index.js +1 -2
  31. package/dist/command-line/input/arguments.d.ts +3 -0
  32. package/dist/command-line/input/arguments.js +12 -0
  33. package/dist/command-line/input/index.d.ts +2 -2
  34. package/dist/command-line/input/index.js +2 -2
  35. package/dist/command-line/input/prompt.d.ts +1 -0
  36. package/dist/command-line/input/prompt.js +1 -0
  37. package/dist/command-line/two-phase/two-phase.d.ts +4 -4
  38. package/dist/command-line/two-phase/two-phase.js +9 -9
  39. package/dist/command-tree/commands.js +0 -4
  40. package/dist/command-tree/deprecated.d.ts +2 -0
  41. package/dist/command-tree/deprecated.js +29 -0
  42. package/dist/command-tree/grammar.js +2 -0
  43. package/dist/command-tree/help.d.ts +2 -2
  44. package/dist/command-tree/help.js +13 -15
  45. package/dist/command-tree/index.d.ts +1 -0
  46. package/dist/command-tree/index.js +1 -0
  47. package/dist/command-tree/local.js +10 -5
  48. package/dist/command-tree/placeholder.js +1 -1
  49. package/dist/command-tree/row.d.ts +1 -0
  50. package/dist/command-tree/tree.d.ts +2 -1
  51. package/dist/command-tree/tree.js +30 -4
  52. package/dist/connection/client.d.ts +36 -18
  53. package/dist/connection/client.js +1 -0
  54. package/dist/connection/executors/executors.d.ts +18 -0
  55. package/dist/connection/executors/executors.js +95 -0
  56. package/dist/connection/executors/index.d.ts +2 -0
  57. package/dist/connection/executors/index.js +2 -0
  58. package/dist/connection/executors/reading.js +22 -0
  59. package/dist/connection/index.d.ts +1 -0
  60. package/dist/connection/index.js +1 -0
  61. package/dist/connection/input.js +2 -2
  62. package/dist/connection/login.d.ts +1 -1
  63. package/dist/connection/login.js +4 -3
  64. package/dist/connection/output/format.js +2 -2
  65. package/dist/connection/output/index.d.ts +1 -1
  66. package/dist/connection/output/index.js +1 -1
  67. package/dist/connection/resolve.d.ts +1 -0
  68. package/dist/connection/setup-file.js +161 -0
  69. package/dist/connection/system.js +90 -45
  70. package/dist/connection/tree/tree.js +120 -7
  71. package/dist/container/client.d.ts +2 -0
  72. package/dist/fleet/fleet.d.ts +7 -8
  73. package/dist/fleet/fleet.js +18 -6
  74. package/dist/fleet/index.d.ts +1 -1
  75. package/dist/fleet/index.js +1 -1
  76. package/dist/github/client.d.ts +189 -0
  77. package/dist/github/client.js +16 -0
  78. package/dist/github/commands.d.ts +17 -0
  79. package/dist/github/commands.js +81 -0
  80. package/dist/github/index.d.ts +3 -0
  81. package/dist/github/index.js +3 -0
  82. package/dist/github/input.js +114 -0
  83. package/dist/github/output/format.js +78 -0
  84. package/dist/github/output/index.js +2 -0
  85. package/dist/github/tree/index.js +2 -0
  86. package/dist/github/tree/tree.js +28 -0
  87. package/dist/goal/client.d.ts +246 -0
  88. package/dist/goal/client.js +13 -0
  89. package/dist/goal/commands.d.ts +22 -0
  90. package/dist/goal/commands.js +110 -0
  91. package/dist/goal/index.d.ts +4 -0
  92. package/dist/goal/index.js +4 -0
  93. package/dist/goal/input.js +118 -0
  94. package/dist/goal/output/format.js +29 -0
  95. package/dist/goal/output/index.js +2 -0
  96. package/dist/goal/pause.d.ts +16 -0
  97. package/dist/goal/pause.js +91 -0
  98. package/dist/goal/tree/index.js +2 -0
  99. package/dist/goal/tree/tree.js +49 -0
  100. package/dist/hold/client.d.ts +2 -0
  101. package/dist/hold/tree/tree.js +2 -2
  102. package/dist/import/{batch.js → batch/batch.js} +5 -5
  103. package/dist/import/batch/index.js +3 -0
  104. package/dist/import/{manifest.js → batch/manifest.js} +7 -6
  105. package/dist/import/commands.d.ts +1 -0
  106. package/dist/import/commands.js +27 -15
  107. package/dist/import/detach.d.ts +12 -0
  108. package/dist/import/detach.js +70 -0
  109. package/dist/import/index.d.ts +2 -1
  110. package/dist/import/index.js +2 -1
  111. package/dist/import/input.js +32 -10
  112. package/dist/import/output.js +13 -8
  113. package/dist/inbox/client.d.ts +310 -0
  114. package/dist/inbox/client.js +15 -0
  115. package/dist/inbox/index.d.ts +2 -0
  116. package/dist/inbox/index.js +2 -0
  117. package/dist/integration/client.d.ts +307 -1
  118. package/dist/integration/client.js +21 -1
  119. package/dist/integration/commands.d.ts +8 -0
  120. package/dist/integration/commands.js +53 -10
  121. package/dist/integration/index.d.ts +1 -1
  122. package/dist/integration/index.js +1 -1
  123. package/dist/local-node/client.d.ts +11 -1
  124. package/dist/local-node/client.js +185 -235
  125. package/dist/local-node/index.d.ts +1 -1
  126. package/dist/local-node/index.js +1 -1
  127. package/dist/login/commands.js +7 -1
  128. package/dist/login/gateway.js +34 -11
  129. package/dist/login/menu.js +2 -1
  130. package/dist/login/vendor-account.js +3 -2
  131. package/dist/login/vendor-input.js +3 -2
  132. package/dist/mcp/calls.js +47 -226
  133. package/dist/mcp/routing.d.ts +3 -2
  134. package/dist/mcp/routing.js +37 -8
  135. package/dist/mcp/server.d.ts +10 -1
  136. package/dist/mcp/server.js +16 -6
  137. package/dist/migrate/classes.js +158 -0
  138. package/dist/migrate/commands.js +46 -0
  139. package/dist/migrate/format.js +199 -0
  140. package/dist/migrate/index.js +2 -0
  141. package/dist/migrate/item.js +59 -0
  142. package/dist/migrate/plan.js +79 -0
  143. package/dist/migrate/tree/index.js +2 -0
  144. package/dist/migrate/tree/tree.js +23 -0
  145. package/dist/node-update/client.d.ts +17 -0
  146. package/dist/node-update/client.js +27 -0
  147. package/dist/node-update/commands.d.ts +20 -0
  148. package/dist/node-update/commands.js +150 -0
  149. package/dist/node-update/index.d.ts +4 -0
  150. package/dist/node-update/index.js +4 -0
  151. package/dist/node-update/output.d.ts +12 -0
  152. package/dist/node-update/output.js +165 -0
  153. package/dist/node-update/tree/index.js +2 -0
  154. package/dist/node-update/tree/tree.js +73 -0
  155. package/dist/pairing/client.d.ts +13 -0
  156. package/dist/pairing/client.js +36 -0
  157. package/dist/pairing/commands.d.ts +15 -0
  158. package/dist/pairing/commands.js +131 -0
  159. package/dist/pairing/index.d.ts +4 -0
  160. package/dist/pairing/index.js +4 -0
  161. package/dist/pairing/output.d.ts +12 -0
  162. package/dist/pairing/output.js +53 -0
  163. package/dist/pairing/tree/index.js +2 -0
  164. package/dist/pairing/tree/tree.js +35 -0
  165. package/dist/panel/client.d.ts +9 -0
  166. package/dist/panel/client.js +24 -0
  167. package/dist/panel/commands.d.ts +19 -0
  168. package/dist/panel/commands.js +112 -0
  169. package/dist/panel/index.d.ts +3 -0
  170. package/dist/panel/index.js +3 -0
  171. package/dist/panel/tree/index.js +2 -0
  172. package/dist/panel/tree/tree.js +14 -0
  173. package/dist/port-lease/client.d.ts +3 -0
  174. package/dist/principal/client.d.ts +9 -0
  175. package/dist/principal/client.js +7 -0
  176. package/dist/principal/commands.d.ts +14 -0
  177. package/dist/principal/commands.js +84 -0
  178. package/dist/principal/index.d.ts +4 -0
  179. package/dist/principal/index.js +4 -0
  180. package/dist/principal/output.d.ts +8 -0
  181. package/dist/principal/output.js +43 -0
  182. package/dist/principal/tree/index.js +2 -0
  183. package/dist/principal/tree/tree.js +31 -0
  184. package/dist/project-guard/client.d.ts +1 -0
  185. package/dist/project-instructions/client.d.ts +56 -0
  186. package/dist/project-instructions/client.js +7 -0
  187. package/dist/project-instructions/commands.d.ts +13 -0
  188. package/dist/project-instructions/commands.js +89 -0
  189. package/dist/project-instructions/index.d.ts +3 -0
  190. package/dist/project-instructions/index.js +3 -0
  191. package/dist/project-instructions/input.js +33 -0
  192. package/dist/project-instructions/output/format.js +22 -0
  193. package/dist/project-instructions/output/index.js +2 -0
  194. package/dist/project-knowledge/change.js +22 -0
  195. package/dist/project-knowledge/client.d.ts +127 -0
  196. package/dist/project-knowledge/client.js +17 -0
  197. package/dist/project-knowledge/commands.d.ts +14 -0
  198. package/dist/project-knowledge/commands.js +100 -0
  199. package/dist/project-knowledge/index.d.ts +3 -0
  200. package/dist/project-knowledge/index.js +3 -0
  201. package/dist/project-knowledge/input.js +32 -0
  202. package/dist/project-knowledge/output/format.js +64 -0
  203. package/dist/project-knowledge/output/index.js +2 -0
  204. package/dist/project-knowledge/sources.js +108 -0
  205. package/dist/project-knowledge/upload.js +27 -0
  206. package/dist/project-workspace/git-reads.d.ts +12 -0
  207. package/dist/project-workspace/git-reads.js +71 -0
  208. package/dist/project-workspace/index.d.ts +1 -0
  209. package/dist/project-workspace/index.js +1 -0
  210. package/dist/project-workspace/metadata-client.d.ts +2 -0
  211. package/dist/project-workspace/output/human.js +1 -1
  212. package/dist/project-workspace/tree/tree.js +95 -5
  213. package/dist/reach/client.d.ts +9 -0
  214. package/dist/reach/client.js +7 -0
  215. package/dist/reach/commands.d.ts +14 -0
  216. package/dist/reach/commands.js +72 -0
  217. package/dist/reach/index.d.ts +3 -0
  218. package/dist/reach/index.js +3 -0
  219. package/dist/reach/output.js +41 -0
  220. package/dist/reach/tree/index.js +2 -0
  221. package/dist/reach/tree/tree.js +28 -0
  222. package/dist/remote-node/client.d.ts +85 -0
  223. package/dist/remote-node/commands.js +32 -17
  224. package/dist/remote-node/connector.d.ts +16 -0
  225. package/dist/remote-node/connector.js +2 -2
  226. package/dist/remote-node/reachability.js +31 -18
  227. package/dist/remote-node/reading.js +31 -0
  228. package/dist/remote-node/text.js +68 -5
  229. package/dist/remote-node/tree/tree.js +14 -3
  230. package/dist/routine/client.d.ts +547 -13
  231. package/dist/routine/client.js +19 -1
  232. package/dist/routine/commands.d.ts +5 -0
  233. package/dist/routine/commands.js +73 -15
  234. package/dist/routine/index.d.ts +2 -1
  235. package/dist/routine/index.js +2 -1
  236. package/dist/routine/input.js +66 -3
  237. package/dist/routine/output/format.js +80 -19
  238. package/dist/routine/output/index.js +1 -1
  239. package/dist/routine/portable/import-files.js +74 -0
  240. package/dist/routine/portable/import-output.js +21 -0
  241. package/dist/routine/portable/import.js +274 -0
  242. package/dist/routine/portable/index.js +3 -0
  243. package/dist/routine/portable/portable.js +185 -0
  244. package/dist/routine/tree/tree.js +80 -8
  245. package/dist/routine/trigger/commands.d.ts +20 -0
  246. package/dist/routine/trigger/commands.js +74 -0
  247. package/dist/routine/trigger/format.js +42 -0
  248. package/dist/routine/trigger/index.d.ts +2 -0
  249. package/dist/routine/trigger/index.js +2 -0
  250. package/dist/routine/trigger/input.js +81 -0
  251. package/dist/run-ledger/client.d.ts +45 -0
  252. package/dist/secret/client.d.ts +39 -0
  253. package/dist/secret/client.js +6 -0
  254. package/dist/secret/commands.d.ts +12 -0
  255. package/dist/secret/commands.js +91 -0
  256. package/dist/secret/index.d.ts +3 -0
  257. package/dist/secret/index.js +3 -0
  258. package/dist/secret/input.js +22 -0
  259. package/dist/secret/output/format.js +10 -0
  260. package/dist/secret/output/index.js +2 -0
  261. package/dist/secret/tree/index.js +2 -0
  262. package/dist/secret/tree/tree.js +16 -0
  263. package/dist/session/agent-permission.d.ts +3 -2
  264. package/dist/session/approval/client.d.ts +4 -3
  265. package/dist/session/approval/commands.d.ts +7 -0
  266. package/dist/session/approval/commands.js +176 -6
  267. package/dist/session/approval/index.d.ts +1 -1
  268. package/dist/session/approval/index.js +1 -1
  269. package/dist/session/approval/output/format.js +53 -1
  270. package/dist/session/approval/output/index.js +1 -1
  271. package/dist/session/attach.d.ts +1 -1
  272. package/dist/session/attach.js +7 -2
  273. package/dist/session/client.d.ts +12 -12
  274. package/dist/session/client.js +8 -17
  275. package/dist/session/command/commands.js +109 -0
  276. package/dist/session/command/index.js +2 -0
  277. package/dist/session/commands.d.ts +5 -1
  278. package/dist/session/commands.js +273 -57
  279. package/dist/session/create-tasks.js +3 -48
  280. package/dist/session/creation/creation.js +51 -0
  281. package/dist/session/creation/index.js +2 -0
  282. package/dist/session/fork/fork.js +135 -0
  283. package/dist/session/fork/index.js +2 -0
  284. package/dist/session/git-status.d.ts +11 -0
  285. package/dist/session/git-status.js +30 -0
  286. package/dist/session/index.d.ts +4 -3
  287. package/dist/session/index.js +3 -2
  288. package/dist/session/interaction/client.d.ts +3 -0
  289. package/dist/session/move/index.js +2 -0
  290. package/dist/session/move/move.js +439 -0
  291. package/dist/session/output/held.js +28 -0
  292. package/dist/session/output/human.js +34 -7
  293. package/dist/session/output/tasks.js +23 -6
  294. package/dist/session/setup/index.js +2 -0
  295. package/dist/session/setup/setup.js +69 -0
  296. package/dist/session/spawn/caps.js +128 -0
  297. package/dist/session/spawn/index.js +5 -0
  298. package/dist/session/spawn/spawn.js +203 -0
  299. package/dist/session/spawn/standing.js +62 -0
  300. package/dist/session/spawn/supervision.js +62 -0
  301. package/dist/session/switch/index.js +2 -0
  302. package/dist/session/switch/switch.js +103 -0
  303. package/dist/session/tree/tree.js +280 -18
  304. package/dist/session/turn/attachments.js +54 -0
  305. package/dist/session/turn/client.d.ts +3 -1
  306. package/dist/session/turn/client.js +6 -1
  307. package/dist/session/turn/commands.d.ts +5 -1
  308. package/dist/session/turn/commands.js +148 -27
  309. package/dist/session/turn/index.d.ts +2 -2
  310. package/dist/session/turn/index.js +1 -1
  311. package/dist/session/turn/output.d.ts +25 -1
  312. package/dist/session/turn/output.js +33 -0
  313. package/dist/skills-sync/client.d.ts +9 -0
  314. package/dist/skills-sync/client.js +7 -0
  315. package/dist/skills-sync/commands.d.ts +15 -0
  316. package/dist/skills-sync/commands.js +241 -0
  317. package/dist/skills-sync/index.d.ts +3 -0
  318. package/dist/skills-sync/index.js +3 -0
  319. package/dist/skills-sync/output.js +168 -0
  320. package/dist/skills-sync/set-file.js +23 -0
  321. package/dist/skills-sync/tree/index.js +2 -0
  322. package/dist/skills-sync/tree/tree.js +38 -0
  323. package/dist/status/client.d.ts +7 -0
  324. package/dist/status/command.js +3 -2
  325. package/dist/status/doctor.js +4 -3
  326. package/dist/team-workspace/client.d.ts +1 -0
  327. package/dist/text-input/index.js +2 -0
  328. package/dist/text-input/text-input.js +35 -0
  329. package/dist/webhooks/client.d.ts +10 -9
  330. package/dist/webhooks/input.js +2 -2
  331. package/dist/webhooks/tree/tree.js +4 -4
  332. package/guidance/maia-sessions/SKILL.md +37 -3
  333. package/package.json +6 -5
  334. package/dist/command-line/context.js +0 -2
@@ -1,4 +1,4 @@
1
- import type { Session, SessionCreateParameters, SessionCreateResult, SessionCreationInput, SessionCreationOutcome, SessionCreationPlan, SessionEventsListResult, SessionInboxAckResult, SessionInboxCheckResult, SessionListParameters, SessionListResult, SessionMessageSendResult, SessionObserveResult, SessionResumeResult, SessionShowResult, SessionSpawnResult, SessionStartResult, SessionStopResult, SessionWaitResult } from "@maiaos/sdk";
1
+ import type { Session, SessionCreateParameters, SessionCreateResult, SessionCreationInput, SessionCreationOutcome, SessionCreationPlan, SessionEventsListResult, SessionInboxAckResult, SessionInboxCheckResult, SessionListParameters, SessionListResult, SessionMessageSendResult, SessionObserveResult, SessionResumeResult, SessionShowResult, SessionStartResult, SessionStopResult, SessionWaitResult, SupervisedResumeClaim } from "@maiaos/sdk";
2
2
  import { type CliNodeEffect, type CliNodeOperations } from "../local-node/index.js";
3
3
  export type WaitSessionInput = {
4
4
  readonly activities?: readonly string[];
@@ -9,6 +9,7 @@ export type WaitSessionInput = {
9
9
  export type CreateSessionInput = {
10
10
  readonly agentId?: SessionCreateParameters["agentId"];
11
11
  readonly baseRef?: string;
12
+ readonly branch?: string;
12
13
  readonly commandId?: string;
13
14
  readonly connectionId?: string;
14
15
  readonly cwd?: string;
@@ -23,12 +24,6 @@ export type CreateSessionInput = {
23
24
  readonly title?: string;
24
25
  readonly workspaceId: string;
25
26
  };
26
- type SpawnSessionInput = {
27
- readonly commandId?: string;
28
- readonly harness: "maia-agent" | "pi";
29
- readonly parentSessionId: string;
30
- readonly workspaceId: string;
31
- };
32
27
  export type ListSessionsInput = Omit<SessionListParameters, "states"> & {
33
28
  readonly states?: readonly string[];
34
29
  };
@@ -37,6 +32,9 @@ export type StartSessionInput = {
37
32
  readonly expectedRevision: string;
38
33
  readonly sessionId: string;
39
34
  };
35
+ export type ResumeSessionInput = StartSessionInput & {
36
+ readonly parent?: SupervisedResumeClaim;
37
+ };
40
38
  type SendAttachedSessionMessageInput = {
41
39
  readonly body: string;
42
40
  readonly commandId?: string;
@@ -69,7 +67,7 @@ export declare const makeSessionClient: (node: CliNodeOperations) => {
69
67
  readonly commandId: string;
70
68
  readonly grantedAt: string;
71
69
  readonly inputDigest: string;
72
- readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.gateway.create" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.show" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.create" | "session.diff" | "session.events.list" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.rename" | "session.resume" | "session.show" | "session.spawn" | "session.start" | "session.stop" | "session.wait" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "webhooks.change.confirm" | "webhooks.change.preview" | "webhooks.deliveries" | "webhooks.list" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
70
+ readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "board.message.post" | "board.message.reply" | "board.path.read" | "board.task.assign" | "board.task.cancel" | "board.task.claim" | "board.task.complete" | "board.task.create" | "board.task.fail" | "board.task.list" | "board.task.needs.replace" | "board.task.plan" | "board.task.promote" | "board.task.release" | "board.task.renew" | "board.task.reopen" | "board.task.show" | "board.thread.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.executors.list" | "connection.executors.show" | "connection.gateway.create" | "connection.github.create" | "connection.github.revoke" | "connection.github.show" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "goal.clear" | "goal.mark" | "goal.set" | "goal.show" | "goal.transition" | "goal.update" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "inbox.list" | "inbox.respond" | "inbox.settle" | "inbox.show" | "inbox.snooze" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.maia-agent" | "integration.apply.pi" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.maia-agent" | "integration.plan.pi" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.maia-agent" | "integration.remove.pi" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.maia-agent" | "integration.status.pi" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.pairing.confirm" | "node.pairing.preview" | "node.pairing.redeem" | "node.pairing.show" | "node.principal.confirm" | "node.principal.preview" | "node.principal.show" | "node.reach.confirm" | "node.reach.preview" | "node.reach.show" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "node.update.apply.confirm" | "node.update.apply.preview" | "node.update.check" | "node.update.pause" | "node.update.policy.get" | "node.update.policy.set" | "node.update.resume" | "node.update.rollback.confirm" | "node.update.rollback.preview" | "node.update.show" | "node.update.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "pr.link" | "pr.status" | "pr.watch" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.instructions.change.confirm" | "project.instructions.change.preview" | "project.instructions.show" | "project.knowledge.add.chunk" | "project.knowledge.add.commit" | "project.knowledge.add.confirm" | "project.knowledge.add.preview" | "project.knowledge.list" | "project.knowledge.remove.confirm" | "project.knowledge.remove.preview" | "project.knowledge.search" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.move.confirm" | "routine.move.preview" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.runs" | "routine.show" | "routine.trigger.create.confirm" | "routine.trigger.create.preview" | "routine.trigger.disable" | "routine.trigger.list" | "routine.update.confirm" | "routine.update.preview" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "secret.request" | "secret.set.confirm" | "secret.set.preview" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.command.confirm" | "session.command.list" | "session.command.preview" | "session.command.send" | "session.create" | "session.detach.confirm" | "session.detach.preview" | "session.diff" | "session.events.list" | "session.fork.confirm" | "session.fork.preview" | "session.git.status" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.pause.confirm" | "session.pause.preview" | "session.placement.show" | "session.rename" | "session.resume" | "session.setup.confirm" | "session.setup.preview" | "session.show" | "session.spawn-caps.confirm" | "session.spawn-caps.preview" | "session.spawn-caps.show" | "session.spawn.confirm" | "session.spawn.preview" | "session.spawn.record" | "session.start" | "session.stop" | "session.switch.confirm" | "session.switch.preview" | "session.wait" | "skills.sync.confirm" | "skills.sync.preview" | "skills.sync.show" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.attachment.policy" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.steer.confirm" | "turn.steer.preview" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "webhooks.change.confirm" | "webhooks.change.preview" | "webhooks.deliveries" | "webhooks.list" | "workspace.branches.list" | "workspace.code-host.show" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
73
71
  readonly revision: "1";
74
72
  };
75
73
  readonly method: "session.agent-permission.confirm";
@@ -80,6 +78,7 @@ export declare const makeSessionClient: (node: CliNodeOperations) => {
80
78
  readonly createdAt: string;
81
79
  readonly eventCursor: string;
82
80
  readonly method: string;
81
+ readonly proposedBy?: string | undefined;
83
82
  readonly receiptId: string;
84
83
  readonly schemaVersion: 1;
85
84
  readonly state: "succeeded";
@@ -106,7 +105,7 @@ export declare const makeSessionClient: (node: CliNodeOperations) => {
106
105
  readonly inputDigest: string;
107
106
  readonly issuedAt: string;
108
107
  readonly method: "session.agent-permission.preview";
109
- readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.gateway.create" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.show" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.create" | "session.diff" | "session.events.list" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.rename" | "session.resume" | "session.show" | "session.spawn" | "session.start" | "session.stop" | "session.wait" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "webhooks.change.confirm" | "webhooks.change.preview" | "webhooks.deliveries" | "webhooks.list" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
108
+ readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "board.message.post" | "board.message.reply" | "board.path.read" | "board.task.assign" | "board.task.cancel" | "board.task.claim" | "board.task.complete" | "board.task.create" | "board.task.fail" | "board.task.list" | "board.task.needs.replace" | "board.task.plan" | "board.task.promote" | "board.task.release" | "board.task.renew" | "board.task.reopen" | "board.task.show" | "board.thread.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.executors.list" | "connection.executors.show" | "connection.gateway.create" | "connection.github.create" | "connection.github.revoke" | "connection.github.show" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "goal.clear" | "goal.mark" | "goal.set" | "goal.show" | "goal.transition" | "goal.update" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "inbox.list" | "inbox.respond" | "inbox.settle" | "inbox.show" | "inbox.snooze" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.maia-agent" | "integration.apply.pi" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.maia-agent" | "integration.plan.pi" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.maia-agent" | "integration.remove.pi" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.maia-agent" | "integration.status.pi" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.pairing.confirm" | "node.pairing.preview" | "node.pairing.redeem" | "node.pairing.show" | "node.principal.confirm" | "node.principal.preview" | "node.principal.show" | "node.reach.confirm" | "node.reach.preview" | "node.reach.show" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "node.update.apply.confirm" | "node.update.apply.preview" | "node.update.check" | "node.update.pause" | "node.update.policy.get" | "node.update.policy.set" | "node.update.resume" | "node.update.rollback.confirm" | "node.update.rollback.preview" | "node.update.show" | "node.update.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "pr.link" | "pr.status" | "pr.watch" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.instructions.change.confirm" | "project.instructions.change.preview" | "project.instructions.show" | "project.knowledge.add.chunk" | "project.knowledge.add.commit" | "project.knowledge.add.confirm" | "project.knowledge.add.preview" | "project.knowledge.list" | "project.knowledge.remove.confirm" | "project.knowledge.remove.preview" | "project.knowledge.search" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.move.confirm" | "routine.move.preview" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.runs" | "routine.show" | "routine.trigger.create.confirm" | "routine.trigger.create.preview" | "routine.trigger.disable" | "routine.trigger.list" | "routine.update.confirm" | "routine.update.preview" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "secret.request" | "secret.set.confirm" | "secret.set.preview" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.command.confirm" | "session.command.list" | "session.command.preview" | "session.command.send" | "session.create" | "session.detach.confirm" | "session.detach.preview" | "session.diff" | "session.events.list" | "session.fork.confirm" | "session.fork.preview" | "session.git.status" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.pause.confirm" | "session.pause.preview" | "session.placement.show" | "session.rename" | "session.resume" | "session.setup.confirm" | "session.setup.preview" | "session.show" | "session.spawn-caps.confirm" | "session.spawn-caps.preview" | "session.spawn-caps.show" | "session.spawn.confirm" | "session.spawn.preview" | "session.spawn.record" | "session.start" | "session.stop" | "session.switch.confirm" | "session.switch.preview" | "session.wait" | "skills.sync.confirm" | "skills.sync.preview" | "skills.sync.show" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.attachment.policy" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.steer.confirm" | "turn.steer.preview" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "webhooks.change.confirm" | "webhooks.change.preview" | "webhooks.deliveries" | "webhooks.list" | "workspace.branches.list" | "workspace.code-host.show" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
110
109
  readonly proof: string;
111
110
  }>;
112
111
  attachSession: (input: import("./attach-client.js").AttachSessionInput) => CliNodeEffect<import("./attach-client.js").SessionAttachStream>;
@@ -132,11 +131,12 @@ export declare const makeSessionClient: (node: CliNodeOperations) => {
132
131
  readonly stallAfterSeconds?: number;
133
132
  }) => CliNodeEffect<SessionObserveResult>;
134
133
  planSessions: (input: SessionCreationInput) => CliNodeEffect<SessionCreationPlan>;
135
- resumeSession: (input: StartSessionInput) => CliNodeEffect<SessionResumeResult>;
136
- runSessions: (plan: SessionCreationPlan) => CliNodeEffect<readonly SessionCreationOutcome[]>;
134
+ resumeSession: (input: ResumeSessionInput) => CliNodeEffect<SessionResumeResult>;
135
+ runSessions: (plan: SessionCreationPlan, options?: {
136
+ readonly until?: "created";
137
+ }) => CliNodeEffect<readonly SessionCreationOutcome[]>;
137
138
  sendAttachedSessionMessage: (input: SendAttachedSessionMessageInput) => CliNodeEffect<SessionMessageSendResult>;
138
139
  showSession: (sessionId: string) => CliNodeEffect<SessionShowResult>;
139
- spawnSession: (input: SpawnSessionInput) => CliNodeEffect<SessionSpawnResult>;
140
140
  startSession: (input: StartSessionInput) => CliNodeEffect<SessionStartResult>;
141
141
  stopSession: (input: StartSessionInput) => CliNodeEffect<SessionStopResult>;
142
142
  waitSession: (input: WaitSessionInput) => CliNodeEffect<SessionWaitResult>;
@@ -1,4 +1,4 @@
1
- import { MAX_SESSION_WAIT_MILLISECONDS, sessionCreateParametersSchema, sessionEventsListParametersSchema, sessionInboxAckParametersSchema, sessionInboxCheckParametersSchema, sessionListParametersSchema, sessionMessageSendParametersSchema, sessionObserveParametersSchema, sessionResumeParametersSchema, sessionShowParametersSchema, sessionSpawnParametersSchema, sessionStartParametersSchema, sessionStopParametersSchema, sessionWaitParametersSchema, } from "@maiaos/sdk";
1
+ import { MAX_SESSION_WAIT_MILLISECONDS, sessionCreateParametersSchema, sessionEventsListParametersSchema, sessionInboxAckParametersSchema, sessionInboxCheckParametersSchema, sessionListParametersSchema, sessionMessageSendParametersSchema, sessionObserveParametersSchema, sessionResumeParametersSchema, sessionShowParametersSchema, sessionStartParametersSchema, sessionStopParametersSchema, sessionWaitParametersSchema, } from "@maiaos/sdk";
2
2
  import * as Crypto from "effect/Crypto";
3
3
  import * as Effect from "effect/Effect";
4
4
  import { makeRelocateClient } from "../execution/index.js";
@@ -6,15 +6,16 @@ import { commandIdentifier, repeatBoundedWait, } from "../local-node/index.js";
6
6
  import { makeAgentPermissionCliClient } from "./agent-permission.js";
7
7
  import { makeAttachClient } from "./attach-client.js";
8
8
  import { makeCodingSessionClient } from "./coding-client.js";
9
+ import { toWorktreeRequest } from "./creation/index.js";
9
10
  export const makeSessionClient = (node) => {
10
11
  const createSession = (input) => {
11
- const { baseRef, commandId: requestedCommandId, ...selection } = input;
12
+ const { baseRef, branch, commandId: requestedCommandId, ...selection } = input;
12
13
  return Effect.flatMap(commandIdentifier(requestedCommandId), (commandId) => {
13
14
  return node.runValidatedNodeOperation({
14
15
  ...selection,
15
16
  commandId,
16
17
  expectedRevision: "0",
17
- ...(baseRef === undefined ? {} : { worktree: { baseRef } }),
18
+ ...toWorktreeRequest({ baseRef, branch }),
18
19
  }, sessionCreateParametersSchema, (client, parameters, options) => client.createSession(parameters, options), { commandId });
19
20
  });
20
21
  };
@@ -64,17 +65,6 @@ export const makeSessionClient = (node) => {
64
65
  return node.runDiscoveryOperation((options) => Effect.promise(() => import("@maiaos/sdk/node/effect")).pipe(Effect.flatMap((sdk) => sdk.acknowledgeAttachedSessionDeliveryEffect(parameters, options))));
65
66
  });
66
67
  };
67
- const spawnSession = (input) => {
68
- return Effect.flatMap(commandIdentifier(input.commandId), (commandId) => {
69
- return node.runValidatedNodeOperation({
70
- commandId,
71
- expectedRevision: "0",
72
- harness: input.harness,
73
- parentSessionId: input.parentSessionId,
74
- workspaceId: input.workspaceId,
75
- }, sessionSpawnParametersSchema, (client, parameters, options) => client.spawnSession(parameters, options), { commandId });
76
- });
77
- };
78
68
  const startSession = (input) => {
79
69
  return Effect.flatMap(commandIdentifier(input.commandId), (commandId) => {
80
70
  return node.runValidatedNodeOperation({
@@ -94,17 +84,19 @@ export const makeSessionClient = (node) => {
94
84
  });
95
85
  };
96
86
  const resumeSession = (input) => {
87
+ const supervised = input.parent === undefined ? {} : { parent: input.parent };
97
88
  return Effect.flatMap(commandIdentifier(input.commandId), (commandId) => {
98
89
  return node.runValidatedNodeOperation({
99
90
  commandId,
100
91
  expectedRevision: input.expectedRevision,
101
92
  sessionId: input.sessionId,
102
- }, sessionResumeParametersSchema, (client, parameters, options) => client.resumeSession(parameters, options), { commandId });
93
+ ...supervised,
94
+ }, sessionResumeParametersSchema, (client, { parent: _checked, ...parameters }, options) => client.resumeSession({ ...parameters, ...supervised }, options), { commandId });
103
95
  });
104
96
  };
105
97
  const withSdk = (operation) => Effect.flatMap(Crypto.Crypto, (crypto) => node.runNodeClientOperation((client) => Effect.promise(() => import("@maiaos/sdk/node/effect")).pipe(Effect.flatMap((sdk) => operation(sdk, client)), Effect.provideService(Crypto.Crypto, crypto))));
106
98
  const planSessions = (input) => withSdk((sdk, client) => sdk.planSessionCreationEffect(client, input));
107
- const runSessions = (plan) => withSdk((sdk, client) => sdk.createSessionsEffect(client, plan));
99
+ const runSessions = (plan, options) => withSdk((sdk, client) => sdk.createSessionsEffect(client, plan, options));
108
100
  const awaitSessionRunning = (input) => withSdk((sdk, client) => sdk.awaitSessionRunningEffect(client, input.sessionId, input.deadlineMilliseconds));
109
101
  return {
110
102
  acknowledgeAttachedSessionDelivery,
@@ -119,7 +111,6 @@ export const makeSessionClient = (node) => {
119
111
  runSessions,
120
112
  sendAttachedSessionMessage,
121
113
  showSession,
122
- spawnSession,
123
114
  startSession,
124
115
  stopSession,
125
116
  waitSession,
@@ -0,0 +1,109 @@
1
+ import { sessionCommandConfirmParametersSchema, } from "@maiaos/sdk";
2
+ import * as Effect from "effect/Effect";
3
+ import { cell, fields, writeNodeResult, } from "../../command-line/emit/index.js";
4
+ import { CliArgumentError, parseOptionsWith, readOptionalRevision, requirePositionals, } from "../../command-line/input/index.js";
5
+ import { confirmParameters, readTwoPhaseMode, runTwoPhase, TWO_PHASE_FLAGS, } from "../../command-line/two-phase/index.js";
6
+ import { changeAtRevision, commandIdentifier, } from "../../local-node/index.js";
7
+ import { requirePipedAlone } from "../fork/index.js";
8
+ const UNAVAILABLE = "Session commands are unavailable.";
9
+ const wired = (context) => {
10
+ const { call } = context.dependencies;
11
+ if (call === undefined)
12
+ throw new CliArgumentError(UNAVAILABLE);
13
+ return call;
14
+ };
15
+ const listText = ({ commands, executor, harnessVersion }) => {
16
+ const heading = `${cell(executor)} ${cell(harnessVersion ?? "(no harness version)")}\n`;
17
+ const rows = commands.map((command) => command.class === "refused"
18
+ ? `/${command.name}\trefused\t${command.reason}\t${command.operation ?? "-"}\n`
19
+ : `/${command.name}\t${command.class}\n`);
20
+ return heading + (rows.length === 0 ? "no commands\n" : rows.join(""));
21
+ };
22
+ const previewText = (preview) => fields([
23
+ ["Session", preview.sessionId],
24
+ ["Command", `/${preview.command}`],
25
+ ["Arguments", preview.arguments],
26
+ ["Class", preview.class],
27
+ ["Command ID", preview.commandId],
28
+ ["Revision", preview.expectedRevision],
29
+ ["Valid until", preview.validUntil],
30
+ ]);
31
+ const confirmedText = ({ class: kind, delivery, receipt, turn }) => fields([
32
+ ["Session", turn.sessionId],
33
+ ["Turn", turn.id],
34
+ ["Class", kind],
35
+ ["Delivery", delivery],
36
+ ["Receipt", receipt.receiptId],
37
+ ]);
38
+ const listed = {
39
+ toResult: (value) => ({ command: "session.command.list", result: value }),
40
+ toText: ({ result }) => listText(result),
41
+ };
42
+ const previewed = {
43
+ toResult: (value) => ({ command: "session.command.preview", result: value }),
44
+ toText: ({ result }) => previewText(result),
45
+ };
46
+ const confirmed = {
47
+ toResult: (value) => ({ command: "session.command.confirm", result: value }),
48
+ toText: ({ result }) => confirmedText(result),
49
+ };
50
+ export const runSessionCommandList = (tokens, context) => {
51
+ const parsed = parseOptionsWith(tokens, {
52
+ allowed: new Set(["--session"]),
53
+ allowedFlags: new Set(),
54
+ repeatable: new Set(),
55
+ });
56
+ requirePositionals(parsed.positionals, 0);
57
+ const sessionId = parsed.options.get("--session");
58
+ if (sessionId === undefined)
59
+ throw new CliArgumentError("Option '--session' is required.");
60
+ return Effect.map(wired(context)("session.command.list", { sessionId }), (result) => writeNodeResult(result, context, listed));
61
+ };
62
+ const previewCommand = (context, { options, positionals }) => {
63
+ requirePositionals(positionals, 2);
64
+ const [sessionId = "", command = ""] = positionals;
65
+ const named = readOptionalRevision(options);
66
+ const arguments_ = options.get("--arguments");
67
+ const call = wired(context);
68
+ const { showSession } = context.dependencies;
69
+ if (showSession === undefined)
70
+ throw new CliArgumentError(UNAVAILABLE);
71
+ return Effect.flatMap(commandIdentifier(options.get("--command-id")), (commandId) => changeAtRevision(named, {
72
+ change: (expectedRevision) => call("session.command.preview", {
73
+ ...(arguments_ === undefined ? {} : { arguments: arguments_ }),
74
+ command: command.replace(/^\//u, ""),
75
+ commandId,
76
+ expectedRevision,
77
+ sessionId,
78
+ }),
79
+ read: () => showSession(sessionId),
80
+ revisionOf: ({ session }) => ({ ok: true, value: session.revision }),
81
+ }));
82
+ };
83
+ const SEND_OPTIONS = {
84
+ allowed: new Set(["--arguments", "--command-id", "--expected-revision"]),
85
+ allowedFlags: new Set(TWO_PHASE_FLAGS),
86
+ repeatable: new Set(),
87
+ };
88
+ export const runSessionCommandSend = (tokens, context) => {
89
+ const parsed = parseOptionsWith(tokens, SEND_OPTIONS);
90
+ const mode = readTwoPhaseMode(parsed.flags, context);
91
+ if (mode === "confirm-stdin")
92
+ requirePipedAlone(parsed, "Session, command and command ID");
93
+ const call = wired(context);
94
+ return runTwoPhase({
95
+ confirm: (preview) => Effect.flatMap(confirmParameters(sessionCommandConfirmParametersSchema, preview, [
96
+ "class",
97
+ ]), (confirmation) => call("session.command.confirm", confirmation)),
98
+ context,
99
+ mode,
100
+ preview: () => previewCommand(context, parsed),
101
+ prompt: {
102
+ describe: previewText,
103
+ question: "Send this command to the Session's executor?",
104
+ },
105
+ writeConfirm: (result) => writeNodeResult(result, context, confirmed),
106
+ writePreview: (result) => writeNodeResult(result, context, previewed),
107
+ });
108
+ };
109
+ //# sourceMappingURL=commands.js.map
@@ -0,0 +1,2 @@
1
+ export { runSessionCommandList, runSessionCommandSend } from "./commands.js";
2
+ //# sourceMappingURL=index.js.map
@@ -1,14 +1,18 @@
1
- import { type CommandContext, type CommandEffect } from "../command-line/index.js";
1
+ import { Effect } from "effect";
2
+ import { CliArgumentError, type CommandContext, type CommandEffect } from "../command-line/index.js";
2
3
  export declare const runSessionCreate: (tokens: readonly string[], context: CommandContext) => CommandEffect;
3
4
  export declare const runSessionList: (tokens: readonly string[], context: CommandContext) => CommandEffect;
5
+ export declare const runSessionPlacementShow: (tokens: readonly string[], context: CommandContext) => CommandEffect;
4
6
  export declare const runSessionShow: (tokens: readonly string[], context: CommandContext) => CommandEffect;
5
7
  export declare const runSessionWait: (tokens: readonly string[], context: CommandContext) => CommandEffect;
6
8
  export declare const runSessionStart: (tokens: readonly string[], context: CommandContext) => CommandEffect;
7
9
  export declare const runSessionStop: (tokens: readonly string[], context: CommandContext) => CommandEffect;
8
10
  export declare const runSessionResume: (tokens: readonly string[], context: CommandContext) => CommandEffect;
11
+ export declare const runSessionReconcile: (tokens: readonly string[], context: CommandContext) => CommandEffect;
9
12
  export declare const runSessionEventsList: (tokens: readonly string[], context: CommandContext) => CommandEffect;
10
13
  export declare const runSessionObserve: (tokens: readonly string[], context: CommandContext) => CommandEffect;
11
14
  export declare const runSessionMessageSend: (tokens: readonly string[], context: CommandContext) => CommandEffect;
12
15
  export declare const runSessionInboxCheck: (tokens: readonly string[], context: CommandContext) => CommandEffect;
13
16
  export declare const runSessionInboxAck: (tokens: readonly string[], context: CommandContext) => CommandEffect;
17
+ export declare const runSessionSpawn: (tokens: readonly string[], context: CommandContext) => Effect.Effect<number, CliArgumentError, import("effect/Crypto").Crypto>;
14
18
  //# sourceMappingURL=commands.d.ts.map