Skip to content
7 changes: 4 additions & 3 deletions apps/workbench/packages/daemon/bin/loopx-context
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Team commands use LOOPX_WORKBENCH_URL (or LOOPX_WORKBENCH_HOST and LOOPX_WORKBEN
loopx-context ask --text-file FILE|- [--timeout SECONDS]
Says the text to the personal assistant (Router) and waits for its reply, default 300 seconds.
Prints {threadId, reply}; reply is null when the assistant has not answered in time. Same credentials as team.
loopx-context main-dispatch [--agent ID] [--model ID] [--title TITLE] (--message-file FILE|- | --message TEXT) [--permission MODE] [--cwd DIR] [--request-id KEY] [--readonly]
loopx-context main-dispatch [--agent ID] [--model ID] [--effort LEVEL] [--title TITLE] (--message-file FILE|- | --message TEXT) [--permission MODE] [--cwd DIR] [--request-id KEY] [--readonly]
loopx-context main-tasks
loopx-context main-surface
Scoped to the current LoopX Goal main conversation via LOOPX_WORKBENCH_MAIN_SOCKET / LOOPX_WORKBENCH_MAIN_TOKEN (no chat collaboration required; omit --agent to use the machine's default available coding agent).
Expand Down Expand Up @@ -122,13 +122,14 @@ try {
if (value === undefined) throw new Error(`Missing value: ${flag}`);
if (flag === '--agent') params.agent = value;
else if (flag === '--model') params.model = value;
else if (flag === '--effort') params.effort = value;
else if (flag === '--title') params.title = value;
else if (flag === '--message') params.objective = value;
else if (flag === '--message-file') messageFile = value;
else if (flag === '--cwd') params.cwd = value;
else if (flag === '--permission') params.permissionMode = value;
else if (flag === '--request-id') params.clientRequestId = value;
else throw new Error(`Invalid argument for main-dispatch: ${flag}. Supported flags: --agent, --model, --title, --message, --message-file, --cwd, --permission, --request-id, --readonly.`);
else throw new Error(`Invalid argument for main-dispatch: ${flag}. Supported flags: --agent, --model, --effort, --title, --message, --message-file, --cwd, --permission, --request-id, --readonly.`);
}
if (messageFile) params.objective = readFileSync(messageFile === '-' ? 0 : messageFile, 'utf8');
if (!params.objective || !params.objective.trim()) throw new Error('Give --message TEXT or --message-file FILE.');
Expand Down Expand Up @@ -199,7 +200,7 @@ try {
if (!socket || !key) {
if (readonly) throw new Error('Run this command inside a LoopX thread with read credentials.');
if (process.env.LOOPX_WORKBENCH_MAIN_SOCKET && process.env.LOOPX_WORKBENCH_MAIN_TOKEN) {
throw new Error('This is a LoopX Goal main conversation; no chat collaboration toggle is needed. Use "loopx-context main-dispatch [--agent ID] [--model ID] [--title TITLE] --message TEXT" to dispatch a child task or "loopx-context main-tasks" to check status.');
throw new Error('This is a LoopX Goal main conversation; no chat collaboration toggle is needed. Use "loopx-context main-dispatch [--agent ID] [--model ID] [--effort LEVEL] [--title TITLE] --message TEXT" to dispatch a child task or "loopx-context main-tasks" to check status.');
}
throw new Error('This command requires an active team session; inside a LoopX Goal main conversation use "loopx-context main-dispatch" instead.');
}
Expand Down
Loading