@maiaos/cli 0.1.0-canary.81 → 0.1.0-canary.82
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.
- package/dist/bin/maia.cdx.json +24 -24
- package/dist/bin/maia.mjs +1 -1
- package/dist/cli/cli.js +4 -0
- package/dist/command-line/context.d.ts +6 -2
- package/dist/local-node/client.d.ts +1 -0
- package/dist/local-node/client.js +4 -2
- package/dist/local-node/index.d.ts +1 -1
- package/dist/local-node/index.js +1 -1
- package/dist/local-node/launch/index.d.ts +2 -0
- package/dist/local-node/launch/index.js +2 -0
- package/dist/local-node/launch/launch.d.ts +19 -0
- package/dist/local-node/launch/launch.js +49 -0
- package/dist/mcp/routing.js +1 -0
- package/dist/remote-node/commands.d.ts +1 -0
- package/dist/remote-node/commands.js +29 -2
- package/dist/remote-node/index.d.ts +1 -1
- package/dist/remote-node/index.js +1 -1
- package/dist/remote-node/lifecycle.js +66 -0
- package/dist/remote-node/tree/tree.js +12 -0
- package/dist/session/agent-permission.d.ts +2 -2
- package/dist/session/attach-render.js +6 -0
- package/dist/session/client.d.ts +3 -2
- package/dist/session/commands.js +7 -1
- package/dist/session/create-tasks.js +2 -1
- package/dist/session/tree/tree.js +47 -3
- package/dist/session/turn/client.d.ts +7 -1
- package/dist/session/turn/client.js +15 -1
- package/dist/session/turn/commands.d.ts +3 -0
- package/dist/session/turn/commands.js +52 -8
- package/dist/session/turn/index.d.ts +2 -2
- package/dist/session/turn/index.js +1 -1
- package/dist/session/turn/output.d.ts +6 -4
- package/dist/session/turn/output.js +7 -0
- package/package.json +4 -4
package/dist/session/client.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export type CreateSessionInput = {
|
|
|
22
22
|
readonly permission?: SessionCreateParameters["permission"];
|
|
23
23
|
readonly role?: SessionCreateParameters["role"];
|
|
24
24
|
readonly title?: string;
|
|
25
|
+
readonly wakeOnChildSettle?: SessionCreateParameters["wakeOnChildSettle"];
|
|
25
26
|
readonly workspaceId: string;
|
|
26
27
|
};
|
|
27
28
|
export type ListSessionsInput = Omit<SessionListParameters, "states"> & {
|
|
@@ -67,7 +68,7 @@ export declare const makeSessionClient: (node: CliNodeOperations) => {
|
|
|
67
68
|
readonly commandId: string;
|
|
68
69
|
readonly grantedAt: string;
|
|
69
70
|
readonly inputDigest: string;
|
|
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.antigravity" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.grok-cli" | "integration.apply.maia-agent" | "integration.apply.pi" | "integration.apply.pi-rpc" | "integration.plan.antigravity" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.grok-cli" | "integration.plan.maia-agent" | "integration.plan.pi" | "integration.plan.pi-rpc" | "integration.remove.antigravity" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.grok-cli" | "integration.remove.maia-agent" | "integration.remove.pi" | "integration.remove.pi-rpc" | "integration.status.antigravity" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.grok-cli" | "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.defaults.show" | "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")[];
|
|
71
|
+
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.antigravity" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.grok-cli" | "integration.apply.maia-agent" | "integration.apply.pi" | "integration.apply.pi-rpc" | "integration.plan.antigravity" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.grok-cli" | "integration.plan.maia-agent" | "integration.plan.pi" | "integration.plan.pi-rpc" | "integration.remove.antigravity" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.grok-cli" | "integration.remove.maia-agent" | "integration.remove.pi" | "integration.remove.pi-rpc" | "integration.status.antigravity" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.grok-cli" | "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.defaults.show" | "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.edit" | "turn.queue.list" | "turn.queue.promote" | "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")[];
|
|
71
72
|
readonly revision: "1";
|
|
72
73
|
};
|
|
73
74
|
readonly method: "session.agent-permission.confirm";
|
|
@@ -105,7 +106,7 @@ export declare const makeSessionClient: (node: CliNodeOperations) => {
|
|
|
105
106
|
readonly inputDigest: string;
|
|
106
107
|
readonly issuedAt: string;
|
|
107
108
|
readonly method: "session.agent-permission.preview";
|
|
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.antigravity" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.grok-cli" | "integration.apply.maia-agent" | "integration.apply.pi" | "integration.apply.pi-rpc" | "integration.plan.antigravity" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.grok-cli" | "integration.plan.maia-agent" | "integration.plan.pi" | "integration.plan.pi-rpc" | "integration.remove.antigravity" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.grok-cli" | "integration.remove.maia-agent" | "integration.remove.pi" | "integration.remove.pi-rpc" | "integration.status.antigravity" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.grok-cli" | "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.defaults.show" | "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")[];
|
|
109
|
+
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.antigravity" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.grok-cli" | "integration.apply.maia-agent" | "integration.apply.pi" | "integration.apply.pi-rpc" | "integration.plan.antigravity" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.grok-cli" | "integration.plan.maia-agent" | "integration.plan.pi" | "integration.plan.pi-rpc" | "integration.remove.antigravity" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.grok-cli" | "integration.remove.maia-agent" | "integration.remove.pi" | "integration.remove.pi-rpc" | "integration.status.antigravity" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.grok-cli" | "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.defaults.show" | "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.edit" | "turn.queue.list" | "turn.queue.promote" | "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")[];
|
|
109
110
|
readonly proof: string;
|
|
110
111
|
}>;
|
|
111
112
|
attachSession: (input: import("./attach-client.js").AttachSessionInput) => CliNodeEffect<import("./attach-client.js").SessionAttachStream>;
|
package/dist/session/commands.js
CHANGED
|
@@ -147,6 +147,7 @@ const readAgentId = (options) => {
|
|
|
147
147
|
throw new CliArgumentError(`Option '--agent' fixes the harness, Connection, model and effort; drop '${clash}'.`);
|
|
148
148
|
return { agentId };
|
|
149
149
|
};
|
|
150
|
+
const readWakeOnChildSettle = (flags) => flags.has("--wake-on-child-settle") ? { wakeOnChildSettle: true } : {};
|
|
150
151
|
const readSessionSelection = ({ flags, options }, workspaceId) => {
|
|
151
152
|
const agent = readAgentId(options);
|
|
152
153
|
const commandId = options.get("--command-id");
|
|
@@ -168,6 +169,7 @@ const readSessionSelection = ({ flags, options }, workspaceId) => {
|
|
|
168
169
|
...readSessionRole(options.get("--role")),
|
|
169
170
|
...(title === undefined ? {} : { title }),
|
|
170
171
|
...readHostAuthority({ flags, options }),
|
|
172
|
+
...readWakeOnChildSettle(flags),
|
|
171
173
|
workspaceId,
|
|
172
174
|
};
|
|
173
175
|
return { ...selection, ...readWorktreeOptions(options, selection) };
|
|
@@ -316,7 +318,11 @@ export const runSessionCreate = (tokens, context) => {
|
|
|
316
318
|
requireOneLabelPerOption(tokens);
|
|
317
319
|
const parsed = parseOptionsWith(tokens, {
|
|
318
320
|
allowed: TASK_OPTIONS,
|
|
319
|
-
allowedFlags: new Set([
|
|
321
|
+
allowedFlags: new Set([
|
|
322
|
+
"--host-authority",
|
|
323
|
+
"--prompt-stdin",
|
|
324
|
+
"--wake-on-child-settle",
|
|
325
|
+
]),
|
|
320
326
|
repeatable: LABEL_OPTION,
|
|
321
327
|
});
|
|
322
328
|
const source = taskSource(parsed);
|
|
@@ -22,10 +22,11 @@ const readText = (source, context) => {
|
|
|
22
22
|
const refusalMessage = (refusal) => refusal.reason === "too_long"
|
|
23
23
|
? `Task line ${String(refusal.line)} exceeds ${String(MAX_TURN_INPUT_BYTES)} bytes.`
|
|
24
24
|
: `A batch holds at most ${String(MAX_SESSION_CREATION_TASKS)} tasks; line ${String(refusal.line)} is beyond it.`;
|
|
25
|
-
const toStartFields = ({ cwd, hostAuthority, permission, }) => ({
|
|
25
|
+
const toStartFields = ({ cwd, hostAuthority, permission, wakeOnChildSettle, }) => ({
|
|
26
26
|
...(cwd === undefined ? {} : { cwd }),
|
|
27
27
|
...(hostAuthority === undefined ? {} : { hostAuthority }),
|
|
28
28
|
...(permission === undefined ? {} : { permission }),
|
|
29
|
+
...(wakeOnChildSettle === undefined ? {} : { wakeOnChildSettle }),
|
|
29
30
|
});
|
|
30
31
|
const toTemplate = (selection) => {
|
|
31
32
|
const { agentId, connectionId, effort, executor, labels, model, role, title, } = selection;
|
|
@@ -35,7 +35,7 @@ export const SESSION_TREE = {
|
|
|
35
35
|
],
|
|
36
36
|
leaves: [
|
|
37
37
|
[
|
|
38
|
-
"session create (--workspace <workspace-id> | --project <project-id>) [--command-id <id>] [--role <worker|orchestrator>] [--connection <connection-id> [--harness <executor-id>] | --harness <executor-id> | --agent <agent-id> | --agent-definition <key> --agent-definition-version <version> --agent-definition-digest <sha256>] [--model <id>] [--effort <low|medium|high|xhigh|max|ultra>] [--base <branch-tag-or-commit> [--branch <maia/name>] | --host-authority [--permission <mode>]] [--cwd <path>] [--title <text> | --name <text>] [--label <key=value>...] [--text <text> | --prompt-stdin | --from-file <path>]",
|
|
38
|
+
"session create (--workspace <workspace-id> | --project <project-id>) [--command-id <id>] [--role <worker|orchestrator>] [--connection <connection-id> [--harness <executor-id>] | --harness <executor-id> | --agent <agent-id> | --agent-definition <key> --agent-definition-version <version> --agent-definition-digest <sha256>] [--model <id>] [--effort <low|medium|high|xhigh|max|ultra>] [--base <branch-tag-or-commit> [--branch <maia/name>] | --host-authority [--permission <mode>]] [--cwd <path>] [--title <text> | --name <text>] [--label <key=value>...] [--wake-on-child-settle] [--text <text> | --prompt-stdin | --from-file <path>]",
|
|
39
39
|
0,
|
|
40
40
|
"session.create",
|
|
41
41
|
"Create a Session, optionally starting it with a first message.",
|
|
@@ -401,10 +401,10 @@ export const SESSION_TREE = {
|
|
|
401
401
|
{ run: [session, "runSessionInboxAck"] },
|
|
402
402
|
],
|
|
403
403
|
[
|
|
404
|
-
"session turn send --session <session-id> --prompt-stdin [--expected-revision <revision>] [--attach <path>...] [--wait] [--command-id <id>]",
|
|
404
|
+
"session turn send --session <session-id> --prompt-stdin [--now | --queue] [--expected-revision <revision>] [--attach <path>...] [--wait] [--command-id <id>]",
|
|
405
405
|
1,
|
|
406
406
|
"turn.send",
|
|
407
|
-
"Send a turn from stdin; it queues. --attach adds images.
|
|
407
|
+
"Send a turn from stdin; it queues unless --now. --attach adds images.",
|
|
408
408
|
{
|
|
409
409
|
example: "printf %s 'Explain this chart' | maia --json session turn send --session session_1 --prompt-stdin --attach chart.png",
|
|
410
410
|
route: "--session",
|
|
@@ -433,6 +433,50 @@ export const SESSION_TREE = {
|
|
|
433
433
|
run: [turn, "runTurnQueue"],
|
|
434
434
|
},
|
|
435
435
|
],
|
|
436
|
+
[
|
|
437
|
+
"session turn queue list --session <session-id>",
|
|
438
|
+
1,
|
|
439
|
+
"turn.queue.list",
|
|
440
|
+
"List a Session's running and queued turns.",
|
|
441
|
+
{
|
|
442
|
+
kind: "shortcut",
|
|
443
|
+
route: "--session",
|
|
444
|
+
run: [turn, "runTurnQueueList"],
|
|
445
|
+
},
|
|
446
|
+
],
|
|
447
|
+
[
|
|
448
|
+
"session turn queue promote <turn-id> --expected-turn-revision <revision> [--command-id <id>]",
|
|
449
|
+
1,
|
|
450
|
+
"turn.queue.promote",
|
|
451
|
+
"Run a queued turn next; interrupts a running turn.",
|
|
452
|
+
{
|
|
453
|
+
example: "maia --json session turn queue promote turn_2 --expected-turn-revision 1",
|
|
454
|
+
route: "<turn-id>",
|
|
455
|
+
run: [turn, "runTurnQueuePromote"],
|
|
456
|
+
},
|
|
457
|
+
],
|
|
458
|
+
[
|
|
459
|
+
"session turn queue edit <turn-id> --expected-turn-revision <revision> --prompt-stdin [--command-id <id>]",
|
|
460
|
+
1,
|
|
461
|
+
"turn.queue.edit",
|
|
462
|
+
"Replace a queued turn's text from stdin.",
|
|
463
|
+
{
|
|
464
|
+
example: "printf %s 'New text' | maia --json session turn queue edit turn_2 --expected-turn-revision 1 --prompt-stdin",
|
|
465
|
+
route: "<turn-id>",
|
|
466
|
+
run: [turn, "runTurnQueueEdit"],
|
|
467
|
+
},
|
|
468
|
+
],
|
|
469
|
+
[
|
|
470
|
+
"session turn queue cancel <turn-id> --expected-turn-revision <revision> [--command-id <id>]",
|
|
471
|
+
1,
|
|
472
|
+
"turn.cancel",
|
|
473
|
+
"Cancel a queued turn, as session turn cancel does.",
|
|
474
|
+
{
|
|
475
|
+
kind: "shortcut",
|
|
476
|
+
route: "<turn-id>",
|
|
477
|
+
run: [turn, "runTurnCancel"],
|
|
478
|
+
},
|
|
479
|
+
],
|
|
436
480
|
[
|
|
437
481
|
"session turn cancel <turn-id> --expected-turn-revision <revision> [--command-id <id>]",
|
|
438
482
|
1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TurnAttachmentPolicyResult, TurnAttachmentUpload, TurnCancelResult, TurnInterruptResult, TurnQueueListResult, TurnSendResult, TurnShowResult, TurnWaitParameters, TurnWaitResult } from "@maiaos/sdk";
|
|
1
|
+
import type { TurnAttachmentPolicyResult, TurnAttachmentUpload, TurnCancelResult, TurnInterruptResult, TurnQueueEditResult, TurnQueueListResult, TurnQueuePromoteResult, TurnSendResult, TurnShowResult, TurnWaitParameters, TurnWaitResult } from "@maiaos/sdk";
|
|
2
2
|
import { type CliNodeEffect, type CliNodeOperations } from "../../local-node/index.js";
|
|
3
3
|
export type InterruptTurnInput = {
|
|
4
4
|
readonly commandId?: string;
|
|
@@ -6,9 +6,13 @@ export type InterruptTurnInput = {
|
|
|
6
6
|
readonly turnId: string;
|
|
7
7
|
};
|
|
8
8
|
export type CancelTurnInput = InterruptTurnInput;
|
|
9
|
+
export type EditTurnInput = CancelTurnInput & {
|
|
10
|
+
readonly prompt: string;
|
|
11
|
+
};
|
|
9
12
|
export type SendTurnInput = {
|
|
10
13
|
readonly attachments?: readonly TurnAttachmentUpload[];
|
|
11
14
|
readonly commandId?: string;
|
|
15
|
+
readonly delivery?: "now";
|
|
12
16
|
readonly expectedRevision: string;
|
|
13
17
|
readonly prompt: string;
|
|
14
18
|
readonly sessionId: string;
|
|
@@ -20,8 +24,10 @@ export type WaitTurnsInput = {
|
|
|
20
24
|
};
|
|
21
25
|
export declare const makeTurnClient: (node: CliNodeOperations) => {
|
|
22
26
|
cancelTurn: (input: CancelTurnInput) => CliNodeEffect<TurnCancelResult>;
|
|
27
|
+
editQueuedTurn: (input: EditTurnInput) => CliNodeEffect<TurnQueueEditResult>;
|
|
23
28
|
interruptTurn: (input: InterruptTurnInput) => CliNodeEffect<TurnInterruptResult>;
|
|
24
29
|
listTurnQueue: (sessionId: string) => CliNodeEffect<TurnQueueListResult>;
|
|
30
|
+
promoteQueuedTurn: (input: CancelTurnInput) => CliNodeEffect<TurnQueuePromoteResult>;
|
|
25
31
|
sendTurn: (input: SendTurnInput) => CliNodeEffect<TurnSendResult>;
|
|
26
32
|
showTurn: (turnId: string) => CliNodeEffect<TurnShowResult>;
|
|
27
33
|
showTurnAttachmentPolicy: (sessionId: string) => CliNodeEffect<TurnAttachmentPolicyResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MAX_TURN_WAIT_MILLISECONDS, turnAttachmentPolicyParametersSchema, turnCancelParametersSchema, turnInterruptParametersSchema, turnQueueListParametersSchema, turnSendParametersSchema, turnShowParametersSchema, turnWaitParametersSchema, } from "@maiaos/sdk";
|
|
1
|
+
import { MAX_TURN_WAIT_MILLISECONDS, turnAttachmentPolicyParametersSchema, turnCancelParametersSchema, turnInterruptParametersSchema, turnQueueEditParametersSchema, turnQueueListParametersSchema, turnQueuePromoteParametersSchema, turnSendParametersSchema, turnShowParametersSchema, turnWaitParametersSchema, } from "@maiaos/sdk";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
import { commandIdentifier, repeatBoundedWait, } from "../../local-node/index.js";
|
|
4
4
|
export const makeTurnClient = (node) => {
|
|
@@ -16,6 +16,17 @@ export const makeTurnClient = (node) => {
|
|
|
16
16
|
expectedRevision: input.expectedRevision,
|
|
17
17
|
turnId: input.turnId,
|
|
18
18
|
}, turnCancelParametersSchema, (client, parameters, options) => client.cancelTurn(parameters, options), { commandId }));
|
|
19
|
+
const promoteQueuedTurn = (input) => Effect.flatMap(commandIdentifier(input.commandId), (commandId) => node.runValidatedNodeOperation({
|
|
20
|
+
commandId,
|
|
21
|
+
expectedRevision: input.expectedRevision,
|
|
22
|
+
turnId: input.turnId,
|
|
23
|
+
}, turnQueuePromoteParametersSchema, (client, parameters, options) => client.promoteQueuedTurn(parameters, options), { commandId }));
|
|
24
|
+
const editQueuedTurn = (input) => Effect.flatMap(commandIdentifier(input.commandId), (commandId) => node.runValidatedNodeOperation({
|
|
25
|
+
commandId,
|
|
26
|
+
expectedRevision: input.expectedRevision,
|
|
27
|
+
input: { text: input.prompt, type: "text" },
|
|
28
|
+
turnId: input.turnId,
|
|
29
|
+
}, turnQueueEditParametersSchema, (client, parameters, options) => client.editQueuedTurn(parameters, options), { commandId }));
|
|
19
30
|
const listTurnQueue = (sessionId) => node.runValidatedNodeOperation({ sessionId }, turnQueueListParametersSchema, (client, parameters, options) => client.listTurnQueue(parameters, options));
|
|
20
31
|
const sendTurn = (input) => {
|
|
21
32
|
return Effect.flatMap(commandIdentifier(input.commandId), (commandId) => {
|
|
@@ -27,6 +38,7 @@ export const makeTurnClient = (node) => {
|
|
|
27
38
|
...(input.attachments === undefined
|
|
28
39
|
? {}
|
|
29
40
|
: { attachments: input.attachments }),
|
|
41
|
+
...(input.delivery === undefined ? {} : { delivery: input.delivery }),
|
|
30
42
|
}, turnSendParametersSchema, (client, parameters, options) => client.sendTurn(parameters, options), { commandId });
|
|
31
43
|
});
|
|
32
44
|
};
|
|
@@ -45,8 +57,10 @@ export const makeTurnClient = (node) => {
|
|
|
45
57
|
});
|
|
46
58
|
return {
|
|
47
59
|
cancelTurn,
|
|
60
|
+
editQueuedTurn,
|
|
48
61
|
interruptTurn,
|
|
49
62
|
listTurnQueue,
|
|
63
|
+
promoteQueuedTurn,
|
|
50
64
|
sendTurn,
|
|
51
65
|
showTurn,
|
|
52
66
|
showTurnAttachmentPolicy,
|
|
@@ -4,7 +4,10 @@ export declare const readTurnPrompt: (context: CommandContext) => Effect.Effect<
|
|
|
4
4
|
export declare const runTurnSend: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
5
5
|
export declare const runTurnInterrupt: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
6
6
|
export declare const runTurnCancel: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
7
|
+
export declare const runTurnQueuePromote: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
8
|
+
export declare const runTurnQueueEdit: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
7
9
|
export declare const runTurnQueue: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
10
|
+
export declare const runTurnQueueList: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
8
11
|
export declare const runTurnAttachments: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
9
12
|
export declare const runTurnShow: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
10
13
|
export declare const runTurnWait: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
@@ -13,7 +13,7 @@ const TURN_SEND_OPTIONS = {
|
|
|
13
13
|
"--expected-revision",
|
|
14
14
|
"--session",
|
|
15
15
|
]),
|
|
16
|
-
allowedFlags: new Set(["--prompt-stdin", "--wait"]),
|
|
16
|
+
allowedFlags: new Set(["--now", "--prompt-stdin", "--queue", "--wait"]),
|
|
17
17
|
repeatable: new Set(["--attach"]),
|
|
18
18
|
};
|
|
19
19
|
const parseTurnSendArguments = (tokens) => {
|
|
@@ -26,10 +26,15 @@ const parseTurnSendArguments = (tokens) => {
|
|
|
26
26
|
if (!parsed.flags.has("--prompt-stdin")) {
|
|
27
27
|
throw new CliArgumentError("Option '--prompt-stdin' is required.");
|
|
28
28
|
}
|
|
29
|
+
const now = parsed.flags.has("--now");
|
|
30
|
+
if (now && parsed.flags.has("--queue")) {
|
|
31
|
+
throw new CliArgumentError("Options '--now' and '--queue' cannot be used together.");
|
|
32
|
+
}
|
|
29
33
|
const commandId = parsed.options.get("--command-id");
|
|
30
34
|
const expectedRevision = readOptionalRevision(parsed.options);
|
|
31
35
|
return {
|
|
32
36
|
attach: parsed.options.get("--attach")?.split(",") ?? [],
|
|
37
|
+
now,
|
|
33
38
|
sessionId,
|
|
34
39
|
wait: parsed.flags.has("--wait"),
|
|
35
40
|
...(commandId === undefined ? {} : { commandId }),
|
|
@@ -85,12 +90,13 @@ const sendAtRevision = (context, input, { attachments, prompt, }) => {
|
|
|
85
90
|
...(input.commandId === undefined
|
|
86
91
|
? {}
|
|
87
92
|
: { commandId: input.commandId }),
|
|
93
|
+
...(input.now ? { delivery: "now" } : {}),
|
|
88
94
|
expectedRevision,
|
|
89
95
|
prompt,
|
|
90
96
|
sessionId: input.sessionId,
|
|
91
97
|
}),
|
|
92
98
|
read: () => showSession(input.sessionId),
|
|
93
|
-
retry: `session turn send --session ${input.sessionId} --prompt-stdin`,
|
|
99
|
+
retry: `session turn send --session ${input.sessionId} --prompt-stdin${input.now ? " --now" : ""}`,
|
|
94
100
|
revisionOf: ({ session }) => ({ ok: true, value: session.revision }),
|
|
95
101
|
});
|
|
96
102
|
};
|
|
@@ -114,13 +120,15 @@ export const runTurnSend = (tokens, context) => Effect.gen(function* () {
|
|
|
114
120
|
});
|
|
115
121
|
return yield* waitForSentTurn(context, sent.value);
|
|
116
122
|
});
|
|
117
|
-
const parseTurnMutationArguments = (tokens, revisionOption) => {
|
|
118
|
-
const parsed = parseOptions(tokens, new Set(["--command-id", revisionOption]));
|
|
123
|
+
const parseTurnMutationArguments = (tokens, revisionOption, readsPrompt = false) => {
|
|
124
|
+
const parsed = parseOptions(tokens, new Set(["--command-id", revisionOption]), new Set(readsPrompt ? ["--prompt-stdin"] : []));
|
|
119
125
|
requirePositionals(parsed.positionals, 1);
|
|
120
126
|
const [turnId] = parsed.positionals;
|
|
121
127
|
if (turnId === undefined) {
|
|
122
128
|
throw new CliArgumentError("The turn identifier is missing.");
|
|
123
129
|
}
|
|
130
|
+
if (readsPrompt && !parsed.flags.has("--prompt-stdin"))
|
|
131
|
+
throw new CliArgumentError("Option '--prompt-stdin' is required.");
|
|
124
132
|
const commandId = parsed.options.get("--command-id");
|
|
125
133
|
return {
|
|
126
134
|
expectedRevision: readRevisionOption(parsed.options.get(revisionOption), revisionOption),
|
|
@@ -153,10 +161,36 @@ export const runTurnCancel = (tokens, context) => Effect.gen(function* () {
|
|
|
153
161
|
toText: formatTurnMutation,
|
|
154
162
|
});
|
|
155
163
|
});
|
|
156
|
-
export const
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
164
|
+
export const runTurnQueuePromote = (tokens, context) => Effect.gen(function* () {
|
|
165
|
+
const input = parseTurnMutationArguments(tokens, "--expected-turn-revision");
|
|
166
|
+
const { promoteQueuedTurn } = context.dependencies;
|
|
167
|
+
if (promoteQueuedTurn === undefined)
|
|
168
|
+
throw new CliArgumentError("Turn promote is unavailable.");
|
|
169
|
+
const result = yield* promoteQueuedTurn(input);
|
|
170
|
+
return writeNodeResult(result, context, {
|
|
171
|
+
toResult: (value) => ({
|
|
172
|
+
command: "turn.queue.promote",
|
|
173
|
+
result: { ...summarizeTurnMutation(value), outcome: value.outcome },
|
|
174
|
+
}),
|
|
175
|
+
toText: formatTurnMutation,
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
export const runTurnQueueEdit = (tokens, context) => Effect.gen(function* () {
|
|
179
|
+
const edit = parseTurnMutationArguments(tokens, "--expected-turn-revision", true);
|
|
180
|
+
const { editQueuedTurn } = context.dependencies;
|
|
181
|
+
if (editQueuedTurn === undefined)
|
|
182
|
+
throw new CliArgumentError("Turn edit is unavailable.");
|
|
183
|
+
const prompt = yield* readTurnPrompt(context);
|
|
184
|
+
const result = yield* editQueuedTurn({ ...edit, prompt });
|
|
185
|
+
return writeNodeResult(result, context, {
|
|
186
|
+
toResult: (value) => ({
|
|
187
|
+
command: "turn.queue.edit",
|
|
188
|
+
result: summarizeTurnMutation(value),
|
|
189
|
+
}),
|
|
190
|
+
toText: formatTurnMutation,
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
const showTurnQueue = (sessionId, context) => Effect.gen(function* () {
|
|
160
194
|
if (sessionId === undefined) {
|
|
161
195
|
throw new CliArgumentError("The Session identifier is missing.");
|
|
162
196
|
}
|
|
@@ -172,6 +206,16 @@ export const runTurnQueue = (tokens, context) => Effect.gen(function* () {
|
|
|
172
206
|
toText: formatTurnQueue,
|
|
173
207
|
});
|
|
174
208
|
});
|
|
209
|
+
export const runTurnQueue = (tokens, context) => {
|
|
210
|
+
const parsed = parseOptions(tokens, new Set());
|
|
211
|
+
requirePositionals(parsed.positionals, 1);
|
|
212
|
+
return showTurnQueue(parsed.positionals[0], context);
|
|
213
|
+
};
|
|
214
|
+
export const runTurnQueueList = (tokens, context) => {
|
|
215
|
+
const parsed = parseOptions(tokens, new Set(["--session"]));
|
|
216
|
+
requirePositionals(parsed.positionals, 0);
|
|
217
|
+
return showTurnQueue(parsed.options.get("--session"), context);
|
|
218
|
+
};
|
|
175
219
|
export const runTurnAttachments = (tokens, context) => Effect.gen(function* () {
|
|
176
220
|
const parsed = parseOptions(tokens, new Set());
|
|
177
221
|
requirePositionals(parsed.positionals, 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type CancelTurnInput, type InterruptTurnInput, makeTurnClient, type SendTurnInput, type WaitTurnsInput, } from "./client.js";
|
|
2
|
-
export { runTurnAttachments, runTurnCancel, runTurnInterrupt, runTurnQueue, runTurnSend, runTurnShow, runTurnSteer, runTurnWait, } from "./commands.js";
|
|
1
|
+
export { type CancelTurnInput, type EditTurnInput, type InterruptTurnInput, makeTurnClient, type SendTurnInput, type WaitTurnsInput, } from "./client.js";
|
|
2
|
+
export { runTurnAttachments, runTurnCancel, runTurnInterrupt, runTurnQueue, runTurnQueueEdit, runTurnQueueList, runTurnQueuePromote, runTurnSend, runTurnShow, runTurnSteer, runTurnWait, } from "./commands.js";
|
|
3
3
|
export { type CliTurnAttachments, type CliTurnMutation, type CliTurnQueue, type CliTurnShow, type CliTurnSteer, type CliTurnSteerPreview, type CliTurnWait, } from "./output.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { makeTurnClient, } from "./client.js";
|
|
2
|
-
export { runTurnAttachments, runTurnCancel, runTurnInterrupt, runTurnQueue, runTurnSend, runTurnShow, runTurnSteer, runTurnWait, } from "./commands.js";
|
|
2
|
+
export { runTurnAttachments, runTurnCancel, runTurnInterrupt, runTurnQueue, runTurnQueueEdit, runTurnQueueList, runTurnQueuePromote, runTurnSend, runTurnShow, runTurnSteer, runTurnWait, } from "./commands.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import type { FailureDetail, LocalNodeCallResult, TurnAttachmentPolicyResult, TurnCancelResult, TurnInterruptResult, TurnQueueListResult, TurnSendResult, TurnShowResult, TurnTokenUsage, TurnWaitResult } from "@maiaos/sdk";
|
|
1
|
+
import type { FailureDetail, LocalNodeCallResult, TurnAttachmentPolicyResult, TurnCancelResult, TurnInterruptResult, TurnQueueEditResult, TurnQueueListResult, TurnQueuePromoteResult, TurnSendResult, TurnShowResult, TurnTokenUsage, TurnWaitResult } from "@maiaos/sdk";
|
|
2
2
|
type SteerPreview = LocalNodeCallResult<"turn.steer.preview">;
|
|
3
3
|
type SteerConfirmed = LocalNodeCallResult<"turn.steer.confirm">;
|
|
4
4
|
export type CliTurnMutation = {
|
|
5
|
-
readonly command: "turn.cancel" | "turn.interrupt" | "turn.send";
|
|
5
|
+
readonly command: "turn.cancel" | "turn.interrupt" | "turn.queue.edit" | "turn.queue.promote" | "turn.send";
|
|
6
6
|
readonly result: {
|
|
7
7
|
readonly delivery: TurnInterruptResult["delivery"];
|
|
8
|
-
readonly outcome?: TurnCancelResult["outcome"];
|
|
8
|
+
readonly outcome?: TurnCancelResult["outcome"] | TurnQueuePromoteResult["outcome"];
|
|
9
|
+
readonly path?: TurnSendResult["path"];
|
|
9
10
|
readonly receipt: TurnInterruptResult["receipt"];
|
|
10
11
|
readonly revision: string;
|
|
11
12
|
readonly sessionId: string;
|
|
13
|
+
readonly sourceTurnId?: string;
|
|
12
14
|
readonly state: TurnInterruptResult["turn"]["state"];
|
|
13
15
|
readonly turnId: string;
|
|
14
16
|
readonly wait?: TurnWaitResult;
|
|
15
17
|
};
|
|
16
18
|
};
|
|
17
|
-
export declare const summarizeTurnMutation: (result: SteerConfirmed | TurnCancelResult | TurnInterruptResult | TurnSendResult) => CliTurnMutation["result"];
|
|
19
|
+
export declare const summarizeTurnMutation: (result: SteerConfirmed | TurnCancelResult | TurnInterruptResult | TurnQueueEditResult | TurnQueuePromoteResult | TurnSendResult) => CliTurnMutation["result"];
|
|
18
20
|
export type CliTurnSteerPreview = {
|
|
19
21
|
readonly command: "turn.steer.preview";
|
|
20
22
|
readonly result: SteerPreview;
|
|
@@ -7,6 +7,11 @@ export const summarizeTurnMutation = (result) => ({
|
|
|
7
7
|
sessionId: result.turn.sessionId,
|
|
8
8
|
state: result.turn.state,
|
|
9
9
|
turnId: result.turn.id,
|
|
10
|
+
...("sourceTurnId" in result &&
|
|
11
|
+
result.path !== undefined &&
|
|
12
|
+
result.sourceTurnId !== undefined
|
|
13
|
+
? { path: result.path, sourceTurnId: result.sourceTurnId }
|
|
14
|
+
: {}),
|
|
10
15
|
});
|
|
11
16
|
export const formatTurnAttachments = ({ result }) => fields([
|
|
12
17
|
["session", result.sessionId],
|
|
@@ -19,6 +24,8 @@ export const formatTurnMutation = ({ result }) => fields([
|
|
|
19
24
|
["outcome", result.outcome],
|
|
20
25
|
["state", result.state],
|
|
21
26
|
["revision", result.revision],
|
|
27
|
+
["path", result.path],
|
|
28
|
+
["source", result.sourceTurnId],
|
|
22
29
|
]);
|
|
23
30
|
export const formatTurnSteer = ({ result }) => fields([
|
|
24
31
|
["turn", result.turnId],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maiaos/cli",
|
|
3
|
-
"version": "0.1.0-canary.
|
|
3
|
+
"version": "0.1.0-canary.82",
|
|
4
4
|
"description": "The maia CLI and MCP server: start, drive, observe and stop swarms of Claude Code and Codex agents from a terminal, a script or another agent.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"maia",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@earendil-works/pi-tui": "1.0.0",
|
|
67
67
|
"@effect/platform-node-shared": "4.0.0",
|
|
68
|
-
"@maiaos/agent": "0.1.0-canary.
|
|
69
|
-
"@maiaos/client-core": "0.1.0-canary.
|
|
70
|
-
"@maiaos/sdk": "0.1.0-canary.
|
|
68
|
+
"@maiaos/agent": "0.1.0-canary.82",
|
|
69
|
+
"@maiaos/client-core": "0.1.0-canary.82",
|
|
70
|
+
"@maiaos/sdk": "0.1.0-canary.82",
|
|
71
71
|
"effect": "4.0.0"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|