auditor-lambda 0.3.15 → 0.3.17
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 +13 -25
- package/package.json +1 -1
- package/scripts/postinstall.mjs +8 -0
|
@@ -2001,6 +2001,9 @@ async function detectBootstrapRefreshReason(root, host) {
|
|
|
2001
2001
|
if (opencodeConfig?.command?.['audit-code']?.template !== sourcePromptBody.trimStart()) {
|
|
2002
2002
|
return 'stale_host_asset:opencode:config_command';
|
|
2003
2003
|
}
|
|
2004
|
+
if (await fileExists(join(root, '.opencode', 'commands', 'audit-code.md'))) {
|
|
2005
|
+
return 'stale_host_asset:opencode:legacy_command_file';
|
|
2006
|
+
}
|
|
2004
2007
|
break;
|
|
2005
2008
|
}
|
|
2006
2009
|
case 'vscode': {
|
|
@@ -2240,33 +2243,18 @@ async function installBootstrap(argv, options = {}) {
|
|
|
2240
2243
|
}
|
|
2241
2244
|
|
|
2242
2245
|
if (profile.writeOpenCode) {
|
|
2243
|
-
//
|
|
2244
|
-
//
|
|
2245
|
-
|
|
2246
|
-
const
|
|
2247
|
-
|
|
2248
|
-
promptBody,
|
|
2249
|
-
);
|
|
2250
|
-
const legacyOpenCodeCommandRemoval = await removeGeneratedMarkdownIfMatches(
|
|
2251
|
-
legacyOpenCodeCommandPath,
|
|
2252
|
-
legacyOpenCodeCommandContent,
|
|
2253
|
-
);
|
|
2254
|
-
if (legacyOpenCodeCommandRemoval) {
|
|
2255
|
-
results.push(legacyOpenCodeCommandRemoval);
|
|
2256
|
-
}
|
|
2257
|
-
const legacyOpenCodeSkillRemoval = await removeGeneratedMarkdownIfMatches(
|
|
2246
|
+
// Remove legacy command/skill/prompt files unconditionally — these paths are exclusively
|
|
2247
|
+
// owned by the auditor-lambda installer and keeping any version of them causes OpenCode to
|
|
2248
|
+
// load the wrong slash command regardless of prompt content.
|
|
2249
|
+
for (const legacyPath of [
|
|
2250
|
+
join(root, '.opencode', 'commands', 'audit-code.md'),
|
|
2258
2251
|
join(root, '.opencode', 'skills', 'audit-code', 'SKILL.md'),
|
|
2259
|
-
skillSource,
|
|
2260
|
-
);
|
|
2261
|
-
if (legacyOpenCodeSkillRemoval) {
|
|
2262
|
-
results.push(legacyOpenCodeSkillRemoval);
|
|
2263
|
-
}
|
|
2264
|
-
const legacyOpenCodePromptRemoval = await removeGeneratedMarkdownIfMatches(
|
|
2265
2252
|
join(root, '.opencode', 'skills', 'audit-code', 'audit-code.prompt.md'),
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2253
|
+
]) {
|
|
2254
|
+
if (await fileExists(legacyPath)) {
|
|
2255
|
+
await unlink(legacyPath);
|
|
2256
|
+
results.push({ path: legacyPath, mode: 'removed' });
|
|
2257
|
+
}
|
|
2270
2258
|
}
|
|
2271
2259
|
results.push(
|
|
2272
2260
|
await writeMergedGeneratedJson(
|
package/package.json
CHANGED
package/scripts/postinstall.mjs
CHANGED
|
@@ -47,6 +47,14 @@ function mergeOpenCodeGlobalConfig(existing, promptBody) {
|
|
|
47
47
|
subtask: false,
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
|
+
agent: {
|
|
51
|
+
...(parsed.agent && typeof parsed.agent === 'object' && !Array.isArray(parsed.agent)
|
|
52
|
+
? parsed.agent
|
|
53
|
+
: {}),
|
|
54
|
+
auditor: {
|
|
55
|
+
description: 'Read-heavy audit orchestration agent for the /audit-code workflow.',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
50
58
|
};
|
|
51
59
|
}
|
|
52
60
|
|