refactor(shared): drop the headless task contract from tool manifests
The `task` spec (argv templates, access modes, output dialects) and the capability flags headlessTask, structuredProgress, resumable and liveWaggleDance described how a Waggle Room run drove a coding agent without its UI. Nothing runs tools headless any more, so built-in manifests, the third-party adapter loader and detection results no longer carry them. An adapter file that still declares `task` is rejected like any other unknown key.
This commit is contained in:
@@ -41,38 +41,6 @@ export type ToolDetectSpec =
|
||||
| { kind: 'path'; binaryName: string }
|
||||
| { kind: 'candidates' };
|
||||
|
||||
export type ExternalToolAccess = 'read-only' | 'workspace-write' | 'native';
|
||||
export type ToolPromptTransport = 'stdin' | 'arg' | 'temp-file';
|
||||
export type ToolOutputDialect =
|
||||
| 'claude-stream-json'
|
||||
| 'codex-jsonl'
|
||||
| 'hermes-text'
|
||||
| 'openclaw-json'
|
||||
| 'text'
|
||||
| 'json'
|
||||
| 'jsonl';
|
||||
export type ToolWorkspaceBinding = 'cwd' | 'flag' | 'managed-agent';
|
||||
|
||||
/** Declarative, shell-free contract for one capturable agent task. */
|
||||
export interface ToolTaskSpec {
|
||||
argvTemplate: readonly string[];
|
||||
resumeArgvTemplate?: readonly string[];
|
||||
accessArgs: Partial<Record<ExternalToolAccess, readonly string[]>>;
|
||||
promptTransport: ToolPromptTransport;
|
||||
outputDialect: ToolOutputDialect;
|
||||
workspaceBinding: ToolWorkspaceBinding;
|
||||
permissionModes: readonly ExternalToolAccess[];
|
||||
resumable: boolean;
|
||||
}
|
||||
|
||||
export interface ToolCapabilities {
|
||||
interactiveLaunch: boolean;
|
||||
headlessTask: boolean;
|
||||
structuredProgress: boolean;
|
||||
resumable: boolean;
|
||||
liveWaggleDance: boolean;
|
||||
}
|
||||
|
||||
export type ToolReleaseStatus = 'supported' | 'roadmap';
|
||||
|
||||
/**
|
||||
@@ -94,10 +62,6 @@ export interface ToolManifest {
|
||||
* launcher-prompt-args.ts. Captured in v1; application is a fast-follow.
|
||||
*/
|
||||
promptArgTemplate?: string[];
|
||||
/** Explicit capability split: opening an app is not the same as running a task. */
|
||||
capabilities?: ToolCapabilities;
|
||||
/** Present only when the adapter has a verified, capturable headless lane. */
|
||||
task?: ToolTaskSpec;
|
||||
/** true = first-party built-in; false/absent = loaded third-party. */
|
||||
builtin?: boolean;
|
||||
}
|
||||
@@ -112,76 +76,34 @@ export const BUILTIN_TOOL_MANIFESTS: readonly ToolManifest[] = [
|
||||
{
|
||||
id: 'claude-code', displayName: 'Claude Code', launchable: true,
|
||||
detect: { kind: 'path', binaryName: 'claude' }, builtin: true,
|
||||
capabilities: { interactiveLaunch: true, headlessTask: true, structuredProgress: true, resumable: true, liveWaggleDance: false },
|
||||
task: {
|
||||
argvTemplate: ['-p', '--safe-mode', '--disable-slash-commands', '--max-budget-usd', '1.00', '--input-format', 'text', '--output-format', 'stream-json', '--verbose', '{accessArgs}'],
|
||||
resumeArgvTemplate: ['-p', '--safe-mode', '--disable-slash-commands', '--resume', '{sessionId}', '--max-budget-usd', '1.00', '--input-format', 'text', '--output-format', 'stream-json', '--verbose', '{accessArgs}'],
|
||||
accessArgs: {
|
||||
'read-only': ['--permission-mode', 'plan'],
|
||||
'workspace-write': ['--permission-mode', 'acceptEdits'],
|
||||
native: [],
|
||||
},
|
||||
promptTransport: 'stdin', outputDialect: 'claude-stream-json', workspaceBinding: 'cwd',
|
||||
permissionModes: ['read-only', 'workspace-write', 'native'], resumable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'claude-desktop', displayName: 'Claude Desktop', launchable: true,
|
||||
detect: { kind: 'candidates' }, builtin: true,
|
||||
capabilities: { interactiveLaunch: true, headlessTask: false, structuredProgress: false, resumable: false, liveWaggleDance: false },
|
||||
},
|
||||
{
|
||||
id: 'cursor', displayName: 'Cursor', releaseStatus: 'roadmap', launchable: false,
|
||||
detect: { kind: 'candidates' }, builtin: true,
|
||||
capabilities: { interactiveLaunch: true, headlessTask: false, structuredProgress: false, resumable: false, liveWaggleDance: false },
|
||||
},
|
||||
{
|
||||
id: 'codex', displayName: 'Codex CLI', launchable: true,
|
||||
detect: { kind: 'path', binaryName: 'codex' }, builtin: true,
|
||||
capabilities: { interactiveLaunch: true, headlessTask: true, structuredProgress: true, resumable: true, liveWaggleDance: false },
|
||||
task: {
|
||||
argvTemplate: ['{accessArgs}', 'exec', '--ignore-user-config', '--ignore-rules', '--skip-git-repo-check', '--json', '--color', 'never', '-C', '{workspacePath}', '-'],
|
||||
resumeArgvTemplate: ['{accessArgs}', 'exec', '--ignore-user-config', '--ignore-rules', '--skip-git-repo-check', '--color', 'never', '-C', '{workspacePath}', 'resume', '--json', '{sessionId}', '-'],
|
||||
accessArgs: {
|
||||
'read-only': ['--ask-for-approval', 'never', '--sandbox', 'read-only'],
|
||||
'workspace-write': ['--ask-for-approval', 'never', '--sandbox', 'workspace-write'],
|
||||
native: [],
|
||||
},
|
||||
promptTransport: 'stdin', outputDialect: 'codex-jsonl', workspaceBinding: 'flag',
|
||||
permissionModes: ['read-only', 'workspace-write', 'native'], resumable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'codex-desktop', displayName: 'Codex Desktop', launchable: true,
|
||||
detect: { kind: 'candidates' }, builtin: true,
|
||||
capabilities: { interactiveLaunch: true, headlessTask: false, structuredProgress: false, resumable: false, liveWaggleDance: false },
|
||||
},
|
||||
{
|
||||
id: 'hermes', displayName: 'Hermes Agent CLI', launchable: true,
|
||||
detect: { kind: 'path', binaryName: 'hermes' }, builtin: true,
|
||||
capabilities: { interactiveLaunch: true, headlessTask: true, structuredProgress: false, resumable: true, liveWaggleDance: false },
|
||||
task: {
|
||||
argvTemplate: ['chat', '-q', '{prompt}', '-Q', '--source', 'tool', '--ignore-rules', '--max-turns', '12', '--checkpoints'],
|
||||
resumeArgvTemplate: ['chat', '--resume', '{sessionId}', '--no-restore-cwd', '-q', '{prompt}', '-Q', '--source', 'tool', '--ignore-rules', '--max-turns', '12', '--checkpoints'],
|
||||
accessArgs: { native: [] }, promptTransport: 'arg', outputDialect: 'hermes-text', workspaceBinding: 'cwd',
|
||||
permissionModes: ['native'], resumable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'hermes-desktop', displayName: 'Hermes Desktop', launchable: true,
|
||||
detect: { kind: 'candidates' }, builtin: true,
|
||||
capabilities: { interactiveLaunch: true, headlessTask: false, structuredProgress: false, resumable: false, liveWaggleDance: false },
|
||||
},
|
||||
{
|
||||
id: 'openclaw', displayName: 'OpenClaw', releaseStatus: 'roadmap', launchable: false,
|
||||
detect: { kind: 'path', binaryName: 'openclaw' }, builtin: true,
|
||||
capabilities: { interactiveLaunch: true, headlessTask: true, structuredProgress: true, resumable: true, liveWaggleDance: false },
|
||||
task: {
|
||||
argvTemplate: ['agent', '--agent', '{agentId}', '--session-key', 'agent:{agentId}:waggle:{runId}', '--message-file', '{promptFile}', '--json', '--timeout', '{timeoutSeconds}'],
|
||||
resumeArgvTemplate: ['agent', '--agent', '{agentId}', '--session-key', 'agent:{agentId}:waggle:{sessionId}', '--message-file', '{promptFile}', '--json', '--timeout', '{timeoutSeconds}'],
|
||||
accessArgs: { native: [] }, promptTransport: 'temp-file', outputDialect: 'openclaw-json', workspaceBinding: 'managed-agent',
|
||||
permissionModes: ['native'], resumable: true,
|
||||
},
|
||||
},
|
||||
] as const;
|
||||
|
||||
@@ -234,10 +156,6 @@ export interface DetectedTool {
|
||||
builtin?: boolean;
|
||||
/** True when the manifest can accept the launch prompt inline. */
|
||||
acceptsInlinePrompt?: boolean;
|
||||
/** Canonical split between opening the app and running a captured task. */
|
||||
capabilities?: ToolCapabilities;
|
||||
/** Access modes supported by the manifest's captured-task contract. */
|
||||
permissionModes?: readonly ExternalToolAccess[];
|
||||
installed: boolean;
|
||||
installedPath: string | null;
|
||||
version: string | null;
|
||||
|
||||
Reference in New Issue
Block a user