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:
shumeiko.it
2026-11-01 11:08:26 +01:00
parent 727c756651
commit 80db300485
6 changed files with 19 additions and 208 deletions

View File

@@ -89,18 +89,6 @@ describe('detectInstalledTools', () => {
launchable: true,
detect: { kind: 'path', binaryName: 'foo' },
promptArgTemplate: ['--print', '{prompt}'],
task: {
argvTemplate: ['run', '{prompt}', '{accessArgs}'],
accessArgs: {
'read-only': ['--read-only'],
'workspace-write': ['--workspace-write'],
},
promptTransport: 'arg',
outputDialect: 'jsonl',
workspaceBinding: 'cwd',
permissionModes: ['read-only', 'workspace-write'],
resumable: false,
},
}),
},
}));
@@ -110,37 +98,18 @@ describe('detectInstalledTools', () => {
expect(foo?.launchable).toBe(true);
expect(foo?.builtin).toBe(false);
expect(foo?.acceptsInlinePrompt).toBe(true);
expect(foo?.capabilities).toEqual({
interactiveLaunch: true,
headlessTask: true,
structuredProgress: true,
resumable: false,
liveWaggleDance: false,
});
expect(foo?.permissionModes).toEqual(['read-only', 'workspace-write']);
expect(result.tools).toHaveLength(SUPPORTED_TOOLS.length + 1);
});
it('carries canonical task capabilities and release status for built-ins', async () => {
it('carries release status and launchability for built-ins', async () => {
const result = await detectInstalledTools(makeDeps());
const codex = result.tools.find((tool) => tool.id === 'codex');
const cursor = result.tools.find((tool) => tool.id === 'cursor');
const openclaw = result.tools.find((tool) => tool.id === 'openclaw');
expect(codex?.capabilities).toMatchObject({
interactiveLaunch: true,
headlessTask: true,
structuredProgress: true,
resumable: true,
});
expect(codex?.permissionModes).toEqual(['read-only', 'workspace-write', 'native']);
expect(cursor?.capabilities).toMatchObject({
interactiveLaunch: true,
headlessTask: false,
structuredProgress: false,
resumable: false,
});
expect(cursor?.permissionModes).toEqual([]);
expect(codex).toMatchObject({ launchable: true, builtin: true });
expect(codex).not.toHaveProperty('capabilities');
expect(codex).not.toHaveProperty('permissionModes');
expect(cursor).toMatchObject({
releaseStatus: 'roadmap',
launchable: false,
@@ -519,14 +488,12 @@ describe('extended-cohort detectors (Codex / Hermes / OpenClaw — Phase 4)', ()
installedPath: cli,
version: null,
launchable: false,
capabilities: { headlessTask: true },
});
expect(result.tools.find((tool) => tool.id === 'hermes-desktop')).toMatchObject({
installed: true,
installedPath: desktop,
version: null,
launchable: true,
capabilities: { interactiveLaunch: true, headlessTask: false },
});
expect(versionProbes).toContain(cli);
expect(versionProbes).not.toContain(desktop);