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:
@@ -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);
|
||||
|
||||
@@ -18,6 +18,16 @@ describe('loadThirdPartyManifests', () => {
|
||||
expect(out[0]).toMatchObject({ id: 'foo-cli', builtin: false, detect: { kind: 'path', binaryName: 'foo' } });
|
||||
});
|
||||
|
||||
it('rejects a headless task contract: captured Room tasks are not part of this edition', () => {
|
||||
const out = loadThirdPartyManifests(deps({
|
||||
'task.json': {
|
||||
id: 'task-cli', displayName: 'T', launchable: true, detect: { kind: 'path', binaryName: 'task' },
|
||||
task: { argvTemplate: ['run', '{prompt}'], promptTransport: 'arg' },
|
||||
},
|
||||
}));
|
||||
expect(out).toEqual([]);
|
||||
});
|
||||
|
||||
it('rejects detect.kind:candidates (code-only strategy)', () => {
|
||||
const out = loadThirdPartyManifests(deps({
|
||||
'bad.json': { id: 'bad', displayName: 'B', launchable: true, detect: { kind: 'candidates' } },
|
||||
|
||||
Reference in New Issue
Block a user