auditor-lambda 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/audit-code-wrapper-lib.mjs +318 -240
- package/dist/cli.js +85 -1
- package/dist/io/runArtifacts.js +2 -2
- package/dist/orchestrator/internalExecutors.js +1 -0
- package/dist/orchestrator/selectiveDeepening.d.ts +4 -0
- package/dist/orchestrator/selectiveDeepening.js +359 -0
- package/dist/prompts/renderWorkerPrompt.js +3 -4
- package/dist/types.d.ts +9 -0
- package/dist/validation/auditResults.js +158 -0
- package/docs/agent-integrations.md +1 -1
- package/docs/bootstrap-install.md +6 -1
- package/docs/contract.md +3 -0
- package/docs/dispatch-implementation-plan.md +19 -1
- package/docs/github-copilot.md +1 -1
- package/docs/model-selection.md +11 -0
- package/docs/next-steps.md +2 -2
- package/docs/packaging.md +4 -2
- package/docs/production-launch-bar.md +3 -1
- package/docs/production-readiness.md +6 -6
- package/package.json +1 -1
- package/schemas/audit_result.schema.json +28 -0
- package/skills/audit-code/SKILL.md +4 -0
- package/skills/audit-code/audit-code.prompt.md +5 -0
|
@@ -407,6 +407,42 @@ async function writeGeneratedJson(targetPath, value) {
|
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
+
async function readJsonObjectIfExists(targetPath, description) {
|
|
411
|
+
if (!(await fileExists(targetPath))) {
|
|
412
|
+
return {};
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
let parsed;
|
|
416
|
+
try {
|
|
417
|
+
parsed = JSON.parse(await readFile(targetPath, 'utf8'));
|
|
418
|
+
} catch (error) {
|
|
419
|
+
throw new Error(
|
|
420
|
+
`${description} exists but is not valid JSON: ${error instanceof Error ? error.message : String(error)}`,
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
425
|
+
throw new Error(`${description} must be a JSON object when it already exists.`);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
return parsed;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
async function writeMergedGeneratedJson(targetPath, description, buildValue) {
|
|
432
|
+
const existed = await fileExists(targetPath);
|
|
433
|
+
const existing = await readJsonObjectIfExists(targetPath, description);
|
|
434
|
+
await mkdir(dirname(targetPath), { recursive: true });
|
|
435
|
+
await writeFile(
|
|
436
|
+
targetPath,
|
|
437
|
+
JSON.stringify(buildValue(existing), null, 2) + '\n',
|
|
438
|
+
'utf8',
|
|
439
|
+
);
|
|
440
|
+
return {
|
|
441
|
+
path: targetPath,
|
|
442
|
+
mode: existed ? 'updated' : 'created',
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
|
|
410
446
|
async function writeGeneratedBinary(targetPath, content) {
|
|
411
447
|
const existed = await fileExists(targetPath);
|
|
412
448
|
await mkdir(dirname(targetPath), { recursive: true });
|
|
@@ -481,70 +517,99 @@ function renderCodexAutomationRecipe() {
|
|
|
481
517
|
|
|
482
518
|
function renderOpenCodeProjectConfig(root) {
|
|
483
519
|
const launcher = replaceBackslashes(toRepoRelativePath(root, join(root, '.audit-code', 'install', MCP_LAUNCHER_FILENAME)));
|
|
484
|
-
return
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
timeout: 10000,
|
|
493
|
-
},
|
|
520
|
+
return {
|
|
521
|
+
$schema: 'https://opencode.ai/config.json',
|
|
522
|
+
mcp: {
|
|
523
|
+
auditor: {
|
|
524
|
+
type: 'local',
|
|
525
|
+
command: ['node', launcher],
|
|
526
|
+
enabled: true,
|
|
527
|
+
timeout: 10000,
|
|
494
528
|
},
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
529
|
+
},
|
|
530
|
+
permission: {
|
|
531
|
+
read: 'allow',
|
|
532
|
+
glob: 'allow',
|
|
533
|
+
grep: 'allow',
|
|
534
|
+
edit: 'ask',
|
|
535
|
+
bash: {
|
|
536
|
+
'*': 'ask',
|
|
537
|
+
'git status*': 'allow',
|
|
538
|
+
'git diff*': 'allow',
|
|
539
|
+
'grep *': 'allow',
|
|
540
|
+
'rm *': 'deny',
|
|
507
541
|
},
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
question: 'allow',
|
|
542
|
+
},
|
|
543
|
+
agent: {
|
|
544
|
+
auditor: {
|
|
545
|
+
description:
|
|
546
|
+
'Read-heavy audit orchestration agent for the /audit-code workflow.',
|
|
547
|
+
tools: {
|
|
548
|
+
'auditor*': true,
|
|
549
|
+
},
|
|
550
|
+
permission: {
|
|
551
|
+
edit: 'ask',
|
|
552
|
+
bash: {
|
|
553
|
+
'*': 'ask',
|
|
554
|
+
'git status*': 'allow',
|
|
555
|
+
'git diff*': 'allow',
|
|
556
|
+
'grep *': 'allow',
|
|
557
|
+
'rm *': 'deny',
|
|
525
558
|
},
|
|
559
|
+
question: 'allow',
|
|
526
560
|
},
|
|
527
561
|
},
|
|
528
562
|
},
|
|
529
|
-
|
|
530
|
-
2,
|
|
531
|
-
) + '\n';
|
|
563
|
+
};
|
|
532
564
|
}
|
|
533
565
|
|
|
534
566
|
function renderVSCodeMcpConfig() {
|
|
535
|
-
return
|
|
536
|
-
{
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
args: ['${workspaceFolder}/.audit-code/install/run-mcp-server.mjs'],
|
|
542
|
-
},
|
|
567
|
+
return {
|
|
568
|
+
servers: {
|
|
569
|
+
auditor: {
|
|
570
|
+
type: 'stdio',
|
|
571
|
+
command: 'node',
|
|
572
|
+
args: ['${workspaceFolder}/.audit-code/install/run-mcp-server.mjs'],
|
|
543
573
|
},
|
|
544
574
|
},
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
function objectValue(value) {
|
|
579
|
+
return value && typeof value === 'object' && !Array.isArray(value)
|
|
580
|
+
? value
|
|
581
|
+
: {};
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
function buildMergedOpenCodeProjectConfig(existing, root) {
|
|
585
|
+
const generated = renderOpenCodeProjectConfig(root);
|
|
586
|
+
return {
|
|
587
|
+
...existing,
|
|
588
|
+
$schema: existing.$schema ?? generated.$schema,
|
|
589
|
+
mcp: {
|
|
590
|
+
...objectValue(existing.mcp),
|
|
591
|
+
auditor: generated.mcp.auditor,
|
|
592
|
+
},
|
|
593
|
+
permission:
|
|
594
|
+
existing.permission && typeof existing.permission === 'object' && !Array.isArray(existing.permission)
|
|
595
|
+
? existing.permission
|
|
596
|
+
: generated.permission,
|
|
597
|
+
agent: {
|
|
598
|
+
...objectValue(existing.agent),
|
|
599
|
+
auditor: generated.agent.auditor,
|
|
600
|
+
},
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
function buildMergedVSCodeMcpConfig(existing) {
|
|
605
|
+
const generated = renderVSCodeMcpConfig();
|
|
606
|
+
return {
|
|
607
|
+
...existing,
|
|
608
|
+
servers: {
|
|
609
|
+
...objectValue(existing.servers),
|
|
610
|
+
auditor: generated.servers.auditor,
|
|
611
|
+
},
|
|
612
|
+
};
|
|
548
613
|
}
|
|
549
614
|
|
|
550
615
|
function renderClaudeDesktopProjectTemplate() {
|
|
@@ -932,116 +997,203 @@ async function buildClaudeDesktopBundle(root, results) {
|
|
|
932
997
|
};
|
|
933
998
|
}
|
|
934
999
|
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
1000
|
+
const INSTALL_PROFILE_FLAGS = [
|
|
1001
|
+
'writeVSCode',
|
|
1002
|
+
'writeCopilotInstructions',
|
|
1003
|
+
'writeOpenCode',
|
|
1004
|
+
'writeCodex',
|
|
1005
|
+
'writeClaudeDesktop',
|
|
1006
|
+
'writeAntigravity',
|
|
1007
|
+
'writeAgents',
|
|
1008
|
+
];
|
|
1009
|
+
|
|
1010
|
+
const INSTALL_HOST_ORDER = [
|
|
1011
|
+
'codex',
|
|
1012
|
+
'claude-desktop',
|
|
1013
|
+
'opencode',
|
|
1014
|
+
'vscode',
|
|
1015
|
+
'antigravity',
|
|
1016
|
+
];
|
|
1017
|
+
|
|
1018
|
+
const INSTALL_HOST_DEFINITIONS = {
|
|
1019
|
+
codex: {
|
|
1020
|
+
host: 'codex',
|
|
1021
|
+
label: 'Codex',
|
|
1022
|
+
support_level: 'supported',
|
|
1023
|
+
setup_kind: 'skills+mcp+instructions',
|
|
1024
|
+
summary:
|
|
1025
|
+
'Use the generated Codex skill bundle, AGENTS instructions, and shared MCP launcher so Codex can drive the backend through native tools instead of raw shell commands.',
|
|
1026
|
+
primary_path_key: 'codexSkillPath',
|
|
1027
|
+
supporting_path_keys: [
|
|
1028
|
+
'agentsInstructionsPath',
|
|
1029
|
+
'codexMcpSetupPath',
|
|
1030
|
+
'codexAutomationRecipePath',
|
|
1031
|
+
],
|
|
1032
|
+
steps: [
|
|
1033
|
+
'Open this repository in Codex.',
|
|
1034
|
+
'Ensure Codex can access the repo-local auditor MCP server using the generated setup guide.',
|
|
1035
|
+
'Ask Codex to use the auditor MCP tools to start or continue `/audit-code`.',
|
|
1036
|
+
],
|
|
1037
|
+
profile: {
|
|
1038
|
+
writeCodex: true,
|
|
1039
|
+
writeAgents: true,
|
|
955
1040
|
},
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1041
|
+
},
|
|
1042
|
+
'claude-desktop': {
|
|
1043
|
+
host: 'claude-desktop',
|
|
1044
|
+
label: 'Claude Desktop',
|
|
1045
|
+
support_level: 'supported',
|
|
1046
|
+
setup_kind: 'local-mcp-bundle',
|
|
1047
|
+
summary:
|
|
1048
|
+
'Install the generated local MCP bundle in Claude Desktop, then use the project template and prompt asset as supporting context.',
|
|
1049
|
+
primary_path_key: 'claudeDesktopDxtPath',
|
|
1050
|
+
supporting_path_keys: [
|
|
1051
|
+
'claudeDesktopMcpbPath',
|
|
1052
|
+
'claudeDesktopProjectTemplatePath',
|
|
1053
|
+
'claudeDesktopRemoteConnectorPath',
|
|
1054
|
+
'installedPromptPath',
|
|
1055
|
+
],
|
|
1056
|
+
steps: [
|
|
1057
|
+
'Open Claude Desktop Settings and install the generated `.dxt` bundle.',
|
|
1058
|
+
'Configure the repository root when prompted so the bundle can launch the local auditor MCP server.',
|
|
1059
|
+
'Use the project template and prompt asset to kick off `/audit-code` in conversation.',
|
|
1060
|
+
],
|
|
1061
|
+
profile: {
|
|
1062
|
+
writeClaudeDesktop: true,
|
|
975
1063
|
},
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1064
|
+
},
|
|
1065
|
+
opencode: {
|
|
1066
|
+
host: 'opencode',
|
|
1067
|
+
label: 'OpenCode',
|
|
1068
|
+
support_level: 'supported',
|
|
1069
|
+
setup_kind: 'command+agent+mcp',
|
|
1070
|
+
summary:
|
|
1071
|
+
'Use the generated OpenCode command and project config so `/audit-code` and the local auditor MCP server are available together.',
|
|
1072
|
+
primary_path_key: 'opencodeCommandPath',
|
|
1073
|
+
supporting_path_keys: [
|
|
1074
|
+
'opencodeConfigPath',
|
|
1075
|
+
'opencodeSkillPath',
|
|
1076
|
+
'agentsInstructionsPath',
|
|
1077
|
+
'mcpLauncherPath',
|
|
1078
|
+
],
|
|
1079
|
+
steps: [
|
|
1080
|
+
'Open this repository in OpenCode.',
|
|
1081
|
+
'Let OpenCode load the generated `opencode.json` so the auditor MCP server is available.',
|
|
1082
|
+
'Invoke `/audit-code` and keep the audit loop on the auditor MCP tools.',
|
|
1083
|
+
],
|
|
1084
|
+
profile: {
|
|
1085
|
+
writeOpenCode: true,
|
|
1086
|
+
writeAgents: true,
|
|
995
1087
|
},
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1088
|
+
},
|
|
1089
|
+
vscode: {
|
|
1090
|
+
host: 'vscode',
|
|
1091
|
+
label: 'VS Code',
|
|
1092
|
+
support_level: 'supported',
|
|
1093
|
+
setup_kind: 'prompt+agent+mcp',
|
|
1094
|
+
summary:
|
|
1095
|
+
'Use the generated prompt file, custom agent, and workspace MCP configuration for the cleanest VS Code integration.',
|
|
1096
|
+
primary_path_key: 'vscodePromptPath',
|
|
1097
|
+
supporting_path_keys: [
|
|
1098
|
+
'vscodeAgentPath',
|
|
1099
|
+
'vscodeMcpConfigPath',
|
|
1100
|
+
'copilotInstructionsPath',
|
|
1101
|
+
],
|
|
1102
|
+
steps: [
|
|
1103
|
+
'Open this repository in VS Code with Copilot.',
|
|
1104
|
+
'Allow VS Code to discover the workspace MCP server from `.vscode/mcp.json`.',
|
|
1105
|
+
'Invoke `/audit-code` in chat and use the custom auditor agent when you want the dedicated orchestration persona.',
|
|
1106
|
+
],
|
|
1107
|
+
profile: {
|
|
1108
|
+
writeVSCode: true,
|
|
1109
|
+
writeCopilotInstructions: true,
|
|
1014
1110
|
},
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1111
|
+
},
|
|
1112
|
+
antigravity: {
|
|
1113
|
+
host: 'antigravity',
|
|
1114
|
+
label: 'Antigravity',
|
|
1115
|
+
support_level: 'guided',
|
|
1116
|
+
setup_kind: 'planning-guide+mcp-ready',
|
|
1117
|
+
summary:
|
|
1118
|
+
'Start in Planning mode with the generated guide and AGENTS instructions, then use the shared MCP launcher once Antigravity is ready to call structured tools.',
|
|
1119
|
+
primary_path_key: 'antigravityPlanningGuidePath',
|
|
1120
|
+
supporting_path_keys: [
|
|
1121
|
+
'agentsInstructionsPath',
|
|
1122
|
+
'mcpLauncherPath',
|
|
1123
|
+
'installedPromptPath',
|
|
1124
|
+
],
|
|
1125
|
+
steps: [
|
|
1126
|
+
'Open this repository in Antigravity Planning mode.',
|
|
1127
|
+
'Load the generated planning guide and AGENTS instructions before starting the audit.',
|
|
1128
|
+
'Use the shared auditor MCP server when Antigravity needs structured audit state instead of free-form shell guesses.',
|
|
1129
|
+
],
|
|
1130
|
+
profile: {
|
|
1131
|
+
writeAntigravity: true,
|
|
1132
|
+
writeAgents: true,
|
|
1033
1133
|
},
|
|
1034
|
-
}
|
|
1134
|
+
},
|
|
1135
|
+
};
|
|
1136
|
+
|
|
1137
|
+
function supportedInstallHostsMessage() {
|
|
1138
|
+
return ['all', 'copilot', ...INSTALL_HOST_ORDER].join(', ');
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
function getInstallHostKeys(host) {
|
|
1142
|
+
if (host === 'all') {
|
|
1143
|
+
return INSTALL_HOST_ORDER;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
if (host === 'copilot') {
|
|
1147
|
+
return ['vscode'];
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
if (INSTALL_HOST_DEFINITIONS[host]) {
|
|
1151
|
+
return [host];
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
throw new Error(
|
|
1155
|
+
`Unsupported host "${host}". Supported hosts: ${supportedInstallHostsMessage()}.`,
|
|
1156
|
+
);
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
function getInstallProfile(host) {
|
|
1160
|
+
const profile = Object.fromEntries(
|
|
1161
|
+
INSTALL_PROFILE_FLAGS.map((flag) => [flag, false]),
|
|
1162
|
+
);
|
|
1163
|
+
|
|
1164
|
+
for (const hostKey of getInstallHostKeys(host)) {
|
|
1165
|
+
const hostProfile = INSTALL_HOST_DEFINITIONS[hostKey].profile;
|
|
1166
|
+
for (const flag of INSTALL_PROFILE_FLAGS) {
|
|
1167
|
+
profile[flag] = profile[flag] || Boolean(hostProfile[flag]);
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
return profile;
|
|
1172
|
+
}
|
|
1035
1173
|
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1174
|
+
function buildHostCatalog({ root, host, assets }) {
|
|
1175
|
+
return getInstallHostKeys(host)
|
|
1176
|
+
.map((hostKey) => {
|
|
1177
|
+
const definition = INSTALL_HOST_DEFINITIONS[hostKey];
|
|
1178
|
+
const primaryPath = assets[definition.primary_path_key];
|
|
1179
|
+
if (!primaryPath) {
|
|
1180
|
+
return null;
|
|
1181
|
+
}
|
|
1041
1182
|
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1183
|
+
return {
|
|
1184
|
+
host: definition.host,
|
|
1185
|
+
label: definition.label,
|
|
1186
|
+
support_level: definition.support_level,
|
|
1187
|
+
setup_kind: definition.setup_kind,
|
|
1188
|
+
summary: definition.summary,
|
|
1189
|
+
primary_path: primaryPath,
|
|
1190
|
+
supporting_paths: definition.supporting_path_keys
|
|
1191
|
+
.map((key) => assets[key])
|
|
1192
|
+
.filter(Boolean),
|
|
1193
|
+
steps: definition.steps,
|
|
1194
|
+
};
|
|
1195
|
+
})
|
|
1196
|
+
.filter(Boolean)
|
|
1045
1197
|
.map((entry) => ({
|
|
1046
1198
|
...entry,
|
|
1047
1199
|
primary_path: entry.primary_path,
|
|
@@ -1102,6 +1254,7 @@ function renderInstallGuide({
|
|
|
1102
1254
|
lines.push('', 'Backend fallback:');
|
|
1103
1255
|
lines.push('- from the repository root, run `audit-code` only when you intentionally need the repo-local backend wrapper');
|
|
1104
1256
|
lines.push('- run `audit-code verify-install` after bootstrap when you want to smoke-test the generated launchers and host configs');
|
|
1257
|
+
lines.push('- rerun `audit-code install` to refresh every generated host surface from the shared prompt, skill, and MCP launcher assets together');
|
|
1105
1258
|
|
|
1106
1259
|
if (host !== 'all') {
|
|
1107
1260
|
lines.push('');
|
|
@@ -1112,85 +1265,6 @@ function renderInstallGuide({
|
|
|
1112
1265
|
return lines.join('\n');
|
|
1113
1266
|
}
|
|
1114
1267
|
|
|
1115
|
-
function getInstallProfile(host) {
|
|
1116
|
-
switch (host) {
|
|
1117
|
-
case 'all':
|
|
1118
|
-
return {
|
|
1119
|
-
writeVSCode: true,
|
|
1120
|
-
writeCopilotInstructions: true,
|
|
1121
|
-
writeOpenCode: true,
|
|
1122
|
-
writeCodex: true,
|
|
1123
|
-
writeClaudeDesktop: true,
|
|
1124
|
-
writeAntigravity: true,
|
|
1125
|
-
writeAgents: true,
|
|
1126
|
-
};
|
|
1127
|
-
case 'copilot':
|
|
1128
|
-
return {
|
|
1129
|
-
writeVSCode: true,
|
|
1130
|
-
writeCopilotInstructions: true,
|
|
1131
|
-
writeAgents: false,
|
|
1132
|
-
writeOpenCode: false,
|
|
1133
|
-
writeCodex: false,
|
|
1134
|
-
writeClaudeDesktop: false,
|
|
1135
|
-
writeAntigravity: false,
|
|
1136
|
-
};
|
|
1137
|
-
case 'vscode':
|
|
1138
|
-
return {
|
|
1139
|
-
writeVSCode: true,
|
|
1140
|
-
writeCopilotInstructions: true,
|
|
1141
|
-
writeAgents: false,
|
|
1142
|
-
writeOpenCode: false,
|
|
1143
|
-
writeCodex: false,
|
|
1144
|
-
writeClaudeDesktop: false,
|
|
1145
|
-
writeAntigravity: false,
|
|
1146
|
-
};
|
|
1147
|
-
case 'opencode':
|
|
1148
|
-
return {
|
|
1149
|
-
writeVSCode: false,
|
|
1150
|
-
writeCopilotInstructions: false,
|
|
1151
|
-
writeAgents: true,
|
|
1152
|
-
writeOpenCode: true,
|
|
1153
|
-
writeCodex: false,
|
|
1154
|
-
writeClaudeDesktop: false,
|
|
1155
|
-
writeAntigravity: false,
|
|
1156
|
-
};
|
|
1157
|
-
case 'codex':
|
|
1158
|
-
return {
|
|
1159
|
-
writeVSCode: false,
|
|
1160
|
-
writeCopilotInstructions: false,
|
|
1161
|
-
writeAgents: true,
|
|
1162
|
-
writeOpenCode: false,
|
|
1163
|
-
writeCodex: true,
|
|
1164
|
-
writeClaudeDesktop: false,
|
|
1165
|
-
writeAntigravity: false,
|
|
1166
|
-
};
|
|
1167
|
-
case 'claude-desktop':
|
|
1168
|
-
return {
|
|
1169
|
-
writeVSCode: false,
|
|
1170
|
-
writeCopilotInstructions: false,
|
|
1171
|
-
writeAgents: false,
|
|
1172
|
-
writeOpenCode: false,
|
|
1173
|
-
writeCodex: false,
|
|
1174
|
-
writeClaudeDesktop: true,
|
|
1175
|
-
writeAntigravity: false,
|
|
1176
|
-
};
|
|
1177
|
-
case 'antigravity':
|
|
1178
|
-
return {
|
|
1179
|
-
writeVSCode: false,
|
|
1180
|
-
writeCopilotInstructions: false,
|
|
1181
|
-
writeAgents: true,
|
|
1182
|
-
writeOpenCode: false,
|
|
1183
|
-
writeCodex: false,
|
|
1184
|
-
writeClaudeDesktop: false,
|
|
1185
|
-
writeAntigravity: true,
|
|
1186
|
-
};
|
|
1187
|
-
default:
|
|
1188
|
-
throw new Error(
|
|
1189
|
-
`Unsupported host "${host}". Supported hosts: all, copilot, vscode, opencode, codex, claude-desktop, antigravity.`,
|
|
1190
|
-
);
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
1268
|
async function assertDirectoryExists(path, description) {
|
|
1195
1269
|
let stats;
|
|
1196
1270
|
try {
|
|
@@ -1512,7 +1586,7 @@ async function verifyInstalledBootstrap(argv) {
|
|
|
1512
1586
|
(installManifest.hosts ?? []).map((entry) => [entry.host, entry]),
|
|
1513
1587
|
);
|
|
1514
1588
|
const selectedHosts = requestedHost && requestedHost !== 'all'
|
|
1515
|
-
?
|
|
1589
|
+
? getInstallHostKeys(requestedHost)
|
|
1516
1590
|
: [...hostCatalog.keys()];
|
|
1517
1591
|
|
|
1518
1592
|
await collectVerifyCheck(generalChecks, 'install_guide', async () => {
|
|
@@ -2056,9 +2130,10 @@ async function installBootstrap(argv) {
|
|
|
2056
2130
|
),
|
|
2057
2131
|
);
|
|
2058
2132
|
results.push(
|
|
2059
|
-
await
|
|
2133
|
+
await writeMergedGeneratedJson(
|
|
2060
2134
|
assetPaths.opencodeConfigPath,
|
|
2061
|
-
|
|
2135
|
+
'OpenCode project config',
|
|
2136
|
+
(existing) => buildMergedOpenCodeProjectConfig(existing, root),
|
|
2062
2137
|
),
|
|
2063
2138
|
);
|
|
2064
2139
|
}
|
|
@@ -2084,9 +2159,10 @@ async function installBootstrap(argv) {
|
|
|
2084
2159
|
),
|
|
2085
2160
|
);
|
|
2086
2161
|
results.push(
|
|
2087
|
-
await
|
|
2162
|
+
await writeMergedGeneratedJson(
|
|
2088
2163
|
assetPaths.vscodeMcpConfigPath,
|
|
2089
|
-
|
|
2164
|
+
'VS Code MCP config',
|
|
2165
|
+
buildMergedVSCodeMcpConfig,
|
|
2090
2166
|
),
|
|
2091
2167
|
);
|
|
2092
2168
|
}
|
|
@@ -2116,6 +2192,7 @@ async function installBootstrap(argv) {
|
|
|
2116
2192
|
install_manifest_path: installManifestPath,
|
|
2117
2193
|
mcp_server_launcher_path: mcpLauncherPath,
|
|
2118
2194
|
source_prompt_path: resolve(promptAssetPath),
|
|
2195
|
+
source_skill_path: resolve(skillAssetPath),
|
|
2119
2196
|
asset_paths: assetPaths,
|
|
2120
2197
|
hosts: hostGuidance,
|
|
2121
2198
|
};
|
|
@@ -2155,6 +2232,7 @@ async function installBootstrap(argv) {
|
|
|
2155
2232
|
install_manifest_path: installManifestPath,
|
|
2156
2233
|
mcp_server_launcher_path: mcpLauncherPath,
|
|
2157
2234
|
source_prompt_path: resolve(promptAssetPath),
|
|
2235
|
+
source_skill_path: resolve(skillAssetPath),
|
|
2158
2236
|
files: results,
|
|
2159
2237
|
slash_command_surfaces: {
|
|
2160
2238
|
vscode_prompt: assetPaths.vscodePromptPath,
|