72 lines
3.7 KiB
TypeScript
72 lines
3.7 KiB
TypeScript
import { GLOBAL_FLAGS, type CommandSpec } from '../args'
|
|
|
|
export const ORCHESTRATION_WORKER_COMMAND_SPECS: CommandSpec[] = [
|
|
{
|
|
path: ['orchestration', 'worker-start'],
|
|
summary: 'Start one supervised worker on the Run home or a connected Orca server',
|
|
usage:
|
|
'orca orchestration worker-start --task <task_id> [--on <saved-environment>] [--worktree <current|selector|new-child|new-top-level>] (--agent <agent> | --terminal <handle>) [--name <name>] [--repo <selector>] [--base-branch <ref>] [--display-name <text>] [--comment <text>] [--setup <run|skip|inherit>] [--retry-of <dispatch_id>] [--timeout-ms <n>] [--run <run_id>] [--from <handle>] [--retry-request <id>] [--json]',
|
|
allowedFlags: [
|
|
...GLOBAL_FLAGS,
|
|
'task',
|
|
'on',
|
|
'worktree',
|
|
'name',
|
|
'repo',
|
|
'base-branch',
|
|
'display-name',
|
|
'comment',
|
|
'setup',
|
|
'agent',
|
|
'terminal',
|
|
'retry-of',
|
|
'timeout-ms',
|
|
'run',
|
|
'from',
|
|
'retry-request'
|
|
],
|
|
notes: [
|
|
'Current and existing worktrees never rerun setup; a fresh agent terminal is created unless --terminal is explicit.',
|
|
'New worktrees use agent-first creation and default --setup to run. Repository start-immediately runs setup beside the agent; wait-for-setup gates agent readiness and task input.',
|
|
'Creation flags (--name, --repo, --base-branch, --display-name, --comment, --setup) are rejected for current/existing worktrees. Use exact --repo on the selected server; project/host convenience routing remains on worktree create.',
|
|
'--on selects only the worker server; the Run and this command remain on the current Orca server.',
|
|
'Remote current and new-child are invalid; discover an exact remote selector or use new-top-level.',
|
|
'--retry-of links the replacement attempt but does not inherit placement; repeat the intended --on/worktree and --agent/terminal choices.',
|
|
'The call exits 0 only for ready. Failed or outcome_unknown exits 1 and JSON includes stage/failedStage, setup, effects, residualResources, and recovery commands when needed.'
|
|
]
|
|
},
|
|
{
|
|
path: ['orchestration', 'worker-show'],
|
|
summary: 'Inspect one supervised worker Dispatch',
|
|
usage: 'orca orchestration worker-show --dispatch <dispatch_id> [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'dispatch']
|
|
},
|
|
{
|
|
path: ['orchestration', 'worker-read'],
|
|
summary: 'Read bounded output from one supervised worker',
|
|
usage:
|
|
'orca orchestration worker-read --dispatch <dispatch_id> [--source <auto|transcript|terminal>] [--cursor <cursor>] [--limit <n>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'dispatch', 'source', 'cursor', 'limit'],
|
|
notes: [
|
|
'The default auto source uses an exact hook-reported transcript when available and otherwise returns labeled terminal output.',
|
|
'A returned cursor is pinned to the exact source; start a fresh read if Orca reports source_changed.'
|
|
]
|
|
},
|
|
{
|
|
path: ['orchestration', 'worker-stop'],
|
|
summary: 'Fence and stop only one supervised agent terminal',
|
|
usage:
|
|
'orca orchestration worker-stop --dispatch <dispatch_id> [--retry-request <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'dispatch', 'retry-request'],
|
|
notes: ['Never deletes the worktree, setup terminal, configured tabs, or unrelated processes.']
|
|
},
|
|
{
|
|
path: ['orchestration', 'worker-abandon'],
|
|
summary: 'Fence a worker without claiming its process stopped',
|
|
usage:
|
|
'orca orchestration worker-abandon --dispatch <dispatch_id> [--retry-request <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'dispatch', 'retry-request'],
|
|
notes: ['Retains all possibly-live resources and performs no process or filesystem action.']
|
|
}
|
|
]
|