fix(skills): generate executable download install plans

This commit is contained in:
William Valentin
2026-02-17 10:29:49 -08:00
parent 776b47f80f
commit e158968e03
3 changed files with 30 additions and 3 deletions
+12
View File
@@ -3594,6 +3594,18 @@
"docs/plans/state.json"
],
"test_status": "pnpm test:run src/agents/registry.test.ts src/config/schema.test.ts src/daemon/routing.test.ts + pnpm typecheck passing"
},
"installer-download-plan-command-remediation": {
"status": "completed",
"date": "2026-02-17",
"updated": "2026-02-17",
"summary": "Replaced fake download planner output (`download url -> dest`) with executable curl command planning and added explicit skip behavior when destination is missing, including regression coverage.",
"files_modified": [
"src/skills/planner.ts",
"src/skills/planner.test.ts",
"docs/plans/state.json"
],
"test_status": "pnpm test:run src/skills/planner.test.ts + pnpm typecheck passing"
}
},
"overall_progress": {
+13 -1
View File
@@ -55,8 +55,20 @@ describe('buildInstallerPlan', () => {
expect(plan.steps).toEqual([
{ installerType: 'go', command: 'go install example.com/tool/a@latest' },
{ installerType: 'go', command: 'go install example.com/tool/b@latest' },
{ installerType: 'download', command: 'download https://example.com/tool.tgz -> /tmp/tool.tgz' },
{ installerType: 'download', command: 'curl -fsSL -o /tmp/tool.tgz https://example.com/tool.tgz' },
]);
expect(plan.skipped).toEqual([]);
});
it('skips download installer when destination is missing', () => {
const plan = buildInstallerPlan(
[{ type: 'download', url: 'https://example.com/tool.tgz' }],
{ hasBinary: () => true },
);
expect(plan.steps).toEqual([]);
expect(plan.skipped).toEqual([
{ installerType: 'download', reason: 'download destination is required for executable install plans' },
]);
});
});
+5 -2
View File
@@ -73,10 +73,13 @@ export function buildInstallerPlan(
continue;
}
const destination = installer.destination ?? '<default destination>';
if (!installer.destination) {
skipped.push({ installerType: 'download', reason: 'download destination is required for executable install plans' });
continue;
}
steps.push({
installerType: 'download',
command: `download ${installer.url} -> ${destination}`,
command: `curl -fsSL -o ${installer.destination} ${installer.url}`,
});
}