@ironbee-ai/cli 0.8.2 → 0.9.0
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/CHANGELOG.md +12 -0
- package/README.md +48 -17
- package/dist/clients/claude/commands/ironbee-verify.md +19 -106
- package/dist/clients/claude/hooks/clear-verdict.d.ts.map +1 -1
- package/dist/clients/claude/hooks/clear-verdict.js +25 -4
- package/dist/clients/claude/hooks/clear-verdict.js.map +1 -1
- package/dist/clients/claude/hooks/require-verdict.d.ts +3 -3
- package/dist/clients/claude/hooks/require-verdict.d.ts.map +1 -1
- package/dist/clients/claude/hooks/require-verdict.js +26 -8
- package/dist/clients/claude/hooks/require-verdict.js.map +1 -1
- package/dist/clients/claude/hooks/require-verification.d.ts +6 -5
- package/dist/clients/claude/hooks/require-verification.d.ts.map +1 -1
- package/dist/clients/claude/hooks/require-verification.js +20 -17
- package/dist/clients/claude/hooks/require-verification.js.map +1 -1
- package/dist/clients/claude/hooks/track-action-monitor.d.ts.map +1 -1
- package/dist/clients/claude/hooks/track-action-monitor.js +4 -1
- package/dist/clients/claude/hooks/track-action-monitor.js.map +1 -1
- package/dist/clients/claude/hooks/track-action.d.ts +11 -8
- package/dist/clients/claude/hooks/track-action.d.ts.map +1 -1
- package/dist/clients/claude/hooks/track-action.js +14 -9
- package/dist/clients/claude/hooks/track-action.js.map +1 -1
- package/dist/clients/claude/index.d.ts.map +1 -1
- package/dist/clients/claude/index.js +79 -18
- package/dist/clients/claude/index.js.map +1 -1
- package/dist/clients/claude/platforms/command-verify.backend.md +74 -0
- package/dist/clients/claude/platforms/command-verify.browser.md +108 -0
- package/dist/clients/claude/platforms/command-verify.node.md +67 -0
- package/dist/clients/claude/platforms/rule.backend.md +23 -0
- package/dist/clients/claude/platforms/rule.browser.md +17 -0
- package/dist/clients/claude/{fragments → platforms}/rule.node.md +3 -3
- package/dist/clients/claude/platforms/skill.backend.md +65 -0
- package/dist/clients/claude/platforms/skill.browser.md +31 -0
- package/dist/clients/claude/{fragments → platforms}/skill.node.md +2 -2
- package/dist/clients/claude/rules/ironbee-verification.md +14 -13
- package/dist/clients/claude/skills/ironbee-verification.md +19 -49
- package/dist/clients/cursor/commands/ironbee-verify/SKILL.md +21 -108
- package/dist/clients/cursor/hooks/clear-verdict.d.ts.map +1 -1
- package/dist/clients/cursor/hooks/clear-verdict.js +31 -5
- package/dist/clients/cursor/hooks/clear-verdict.js.map +1 -1
- package/dist/clients/cursor/hooks/require-verdict.d.ts +1 -1
- package/dist/clients/cursor/hooks/require-verdict.d.ts.map +1 -1
- package/dist/clients/cursor/hooks/require-verdict.js +27 -6
- package/dist/clients/cursor/hooks/require-verdict.js.map +1 -1
- package/dist/clients/cursor/hooks/require-verification.d.ts.map +1 -1
- package/dist/clients/cursor/hooks/require-verification.js +9 -5
- package/dist/clients/cursor/hooks/require-verification.js.map +1 -1
- package/dist/clients/cursor/hooks/track-action-monitor.d.ts.map +1 -1
- package/dist/clients/cursor/hooks/track-action-monitor.js +4 -1
- package/dist/clients/cursor/hooks/track-action-monitor.js.map +1 -1
- package/dist/clients/cursor/hooks/track-action.d.ts +14 -12
- package/dist/clients/cursor/hooks/track-action.d.ts.map +1 -1
- package/dist/clients/cursor/hooks/track-action.js +25 -16
- package/dist/clients/cursor/hooks/track-action.js.map +1 -1
- package/dist/clients/cursor/index.d.ts.map +1 -1
- package/dist/clients/cursor/index.js +45 -11
- package/dist/clients/cursor/index.js.map +1 -1
- package/dist/clients/cursor/platforms/command-verify.backend.md +74 -0
- package/dist/clients/cursor/platforms/command-verify.browser.md +108 -0
- package/dist/clients/cursor/platforms/command-verify.node.md +67 -0
- package/dist/clients/cursor/platforms/rule.backend.md +23 -0
- package/dist/clients/cursor/platforms/rule.browser.md +17 -0
- package/dist/clients/cursor/{fragments → platforms}/rule.node.md +3 -3
- package/dist/clients/cursor/platforms/skill.backend.md +65 -0
- package/dist/clients/cursor/platforms/skill.browser.md +31 -0
- package/dist/clients/cursor/{fragments → platforms}/skill.node.md +2 -2
- package/dist/clients/cursor/rules/ironbee-verification.mdc +14 -13
- package/dist/clients/cursor/skills/ironbee-verification.md +19 -49
- package/dist/commands/backend.d.ts +17 -0
- package/dist/commands/backend.d.ts.map +1 -0
- package/dist/commands/backend.js +58 -0
- package/dist/commands/backend.js.map +1 -0
- package/dist/commands/browser.d.ts +19 -0
- package/dist/commands/browser.d.ts.map +1 -0
- package/dist/commands/browser.js +60 -0
- package/dist/commands/browser.js.map +1 -0
- package/dist/commands/config.d.ts +45 -10
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +80 -28
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/cycle-toggle.d.ts +89 -0
- package/dist/commands/cycle-toggle.d.ts.map +1 -0
- package/dist/commands/cycle-toggle.js +264 -0
- package/dist/commands/cycle-toggle.js.map +1 -0
- package/dist/commands/disable-verification.d.ts.map +1 -1
- package/dist/commands/disable-verification.js +5 -2
- package/dist/commands/disable-verification.js.map +1 -1
- package/dist/commands/enable-verification.d.ts.map +1 -1
- package/dist/commands/enable-verification.js +5 -2
- package/dist/commands/enable-verification.js.map +1 -1
- package/dist/commands/node.d.ts +16 -0
- package/dist/commands/node.d.ts.map +1 -0
- package/dist/commands/node.js +57 -0
- package/dist/commands/node.js.map +1 -0
- package/dist/commands/verification-toggle.d.ts +18 -1
- package/dist/commands/verification-toggle.d.ts.map +1 -1
- package/dist/commands/verification-toggle.js +96 -21
- package/dist/commands/verification-toggle.js.map +1 -1
- package/dist/hooks/core/actions.d.ts +20 -2
- package/dist/hooks/core/actions.d.ts.map +1 -1
- package/dist/hooks/core/actions.js.map +1 -1
- package/dist/hooks/core/file-diff.d.ts +17 -0
- package/dist/hooks/core/file-diff.d.ts.map +1 -1
- package/dist/hooks/core/file-diff.js +72 -0
- package/dist/hooks/core/file-diff.js.map +1 -1
- package/dist/hooks/core/tool-use-stash.d.ts +7 -1
- package/dist/hooks/core/tool-use-stash.d.ts.map +1 -1
- package/dist/hooks/core/tool-use-stash.js.map +1 -1
- package/dist/hooks/core/verify-gate.d.ts.map +1 -1
- package/dist/hooks/core/verify-gate.js +44 -14
- package/dist/hooks/core/verify-gate.js.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +218 -36
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +359 -95
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/gitignore.d.ts +26 -11
- package/dist/lib/gitignore.d.ts.map +1 -1
- package/dist/lib/gitignore.js +71 -24
- package/dist/lib/gitignore.js.map +1 -1
- package/dist/lib/platform-section.d.ts +126 -0
- package/dist/lib/platform-section.d.ts.map +1 -0
- package/dist/lib/platform-section.js +279 -0
- package/dist/lib/platform-section.js.map +1 -0
- package/package.json +1 -1
- package/dist/clients/claude/fragments/command-verify.node.md +0 -33
- package/dist/clients/cursor/fragments/command-verify.node.md +0 -33
- package/dist/commands/backend-toggle.d.ts +0 -45
- package/dist/commands/backend-toggle.d.ts.map +0 -1
- package/dist/commands/backend-toggle.js +0 -192
- package/dist/commands/backend-toggle.js.map +0 -1
- package/dist/commands/disable-backend.d.ts +0 -14
- package/dist/commands/disable-backend.d.ts.map +0 -1
- package/dist/commands/disable-backend.js +0 -34
- package/dist/commands/disable-backend.js.map +0 -1
- package/dist/commands/enable-backend.d.ts +0 -15
- package/dist/commands/enable-backend.d.ts.map +0 -1
- package/dist/commands/enable-backend.js +0 -35
- package/dist/commands/enable-backend.js.map +0 -1
- package/dist/lib/runtime-section.d.ts +0 -118
- package/dist/lib/runtime-section.d.ts.map +0 -1
- package/dist/lib/runtime-section.js +0 -256
- package/dist/lib/runtime-section.js.map +0 -1
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Platform-section toggling for skill / rule / command markdown files.
|
|
4
|
+
*
|
|
5
|
+
* Each agent-facing markdown file (skill, rule, slash command) carries one
|
|
6
|
+
* or more marker blocks per platform. Two marker syntaxes are supported:
|
|
7
|
+
*
|
|
8
|
+
* <!--IRONBEE:PLATFORM:node-->
|
|
9
|
+
* ...content here...
|
|
10
|
+
* <!--/IRONBEE:PLATFORM:node-->
|
|
11
|
+
*
|
|
12
|
+
* (the unkeyed form — handy when a file only needs a single block per
|
|
13
|
+
* platform), and:
|
|
14
|
+
*
|
|
15
|
+
* <!--IRONBEE:PLATFORM:node:tldr-->
|
|
16
|
+
* ...short heads-up content...
|
|
17
|
+
* <!--/IRONBEE:PLATFORM:node:tldr-->
|
|
18
|
+
* ...
|
|
19
|
+
* <!--IRONBEE:PLATFORM:node:full-->
|
|
20
|
+
* ...detailed flow...
|
|
21
|
+
* <!--/IRONBEE:PLATFORM:node:full-->
|
|
22
|
+
*
|
|
23
|
+
* (the keyed form — handy when the same platform needs different content at
|
|
24
|
+
* different positions in the same file: short summary up top, full flow at
|
|
25
|
+
* the bottom, etc.). Keys are alphanumeric + hyphen.
|
|
26
|
+
*
|
|
27
|
+
* Two states per block:
|
|
28
|
+
* - **disabled** — replaced with a short placeholder telling the agent
|
|
29
|
+
* the platform is off and reminding them not to invoke that platform's
|
|
30
|
+
* tools when the project isn't actually using it.
|
|
31
|
+
* - **enabled** — replaced with the full guidance fragment for that
|
|
32
|
+
* platform + key.
|
|
33
|
+
*
|
|
34
|
+
* `ironbee install` writes one or the other based on config state at
|
|
35
|
+
* install time. `ironbee enable-<platform>` / `disable-<platform>` flip
|
|
36
|
+
* already-installed files in place — no re-install needed. The marker block
|
|
37
|
+
* (and its key) is preserved on every flip so the toggle is always
|
|
38
|
+
* reversible.
|
|
39
|
+
*
|
|
40
|
+
* "Platform" is the umbrella term for everything the verify-gate can drive
|
|
41
|
+
* tools against: `browser` (browser-devtools, `bdt_*`), `node` (Node.js
|
|
42
|
+
* runtime debug — V8 inspector, `ndt_*`), `backend` (runtime-agnostic
|
|
43
|
+
* protocol calls, `bedt_*`). Future platforms (mobile / iOS / Android, …)
|
|
44
|
+
* plug in here without code changes to the marker syntax.
|
|
45
|
+
*/
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.PLATFORM_TARGETS = void 0;
|
|
48
|
+
exports.applyPlatformSection = applyPlatformSection;
|
|
49
|
+
exports.fragmentFilename = fragmentFilename;
|
|
50
|
+
exports.readFragment = readFragment;
|
|
51
|
+
exports.togglePlatformSectionInFile = togglePlatformSectionInFile;
|
|
52
|
+
exports.applyPlatformToProjectFiles = applyPlatformToProjectFiles;
|
|
53
|
+
exports.syncPlatformSectionsToConfig = syncPlatformSectionsToConfig;
|
|
54
|
+
const fs_1 = require("fs");
|
|
55
|
+
const logger_1 = require("./logger");
|
|
56
|
+
const config_1 = require("./config");
|
|
57
|
+
/** Per-platform placeholder content (shown when the platform is disabled). */
|
|
58
|
+
const PLACEHOLDERS = {
|
|
59
|
+
browser: [
|
|
60
|
+
"<!-- Browser cycle verification is OFF for this project.",
|
|
61
|
+
" - To verify frontend / UI changes by driving a real browser (DOM, console,",
|
|
62
|
+
" screenshots, accessibility, network): run `ironbee browser enable` to enable.",
|
|
63
|
+
" This file will be auto-updated with the browser-cycle guidance.",
|
|
64
|
+
" - When OFF, do NOT invoke any `bdt_*` tools voluntarily — there is no",
|
|
65
|
+
" active browser-cycle gate, so calling them only wastes cycles. -->",
|
|
66
|
+
].join("\n"),
|
|
67
|
+
node: [
|
|
68
|
+
"<!-- Node.js runtime debug verification is OFF for this project.",
|
|
69
|
+
" - If your backend is Node.js and you want non-blocking debugger probes:",
|
|
70
|
+
" run `ironbee node enable` to enable. This file will be auto-updated",
|
|
71
|
+
" with the node-cycle guidance.",
|
|
72
|
+
" - If your backend isn't Node.js (Java / Python / Go / Rust / .NET / Ruby / PHP / Elixir / …):",
|
|
73
|
+
" leave this OFF — `ndt_*` tools only attach to V8/Node processes and will fail elsewhere.",
|
|
74
|
+
" - When OFF, do NOT invoke any `ndt_*` tools voluntarily. -->",
|
|
75
|
+
].join("\n"),
|
|
76
|
+
backend: [
|
|
77
|
+
"<!-- Backend protocol verification is OFF for this project.",
|
|
78
|
+
" - To verify backend services by driving real protocol calls (HTTP / gRPC /",
|
|
79
|
+
" GraphQL / WebSocket) — runtime- and language-agnostic — run `ironbee",
|
|
80
|
+
" backend enable`. This file will be auto-updated with the backend-cycle",
|
|
81
|
+
" guidance.",
|
|
82
|
+
" - When OFF, do NOT invoke any `bedt_*` tools voluntarily. -->",
|
|
83
|
+
].join("\n"),
|
|
84
|
+
};
|
|
85
|
+
/** Escape a platform name for use inside a regex. Platform names are short
|
|
86
|
+
* ASCII identifiers but be defensive anyway. */
|
|
87
|
+
function escapeRegex(s) {
|
|
88
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
89
|
+
}
|
|
90
|
+
/** Build the start-marker regex for a platform. The captured group is the
|
|
91
|
+
* optional key (empty when the keyless form is used). */
|
|
92
|
+
function startMarkerRegex(platform) {
|
|
93
|
+
return new RegExp(`<!--IRONBEE:PLATFORM:${escapeRegex(platform)}(?::([\\w-]+))?-->`, "g");
|
|
94
|
+
}
|
|
95
|
+
/** Build the end marker for a platform + key. Key may be empty for keyless. */
|
|
96
|
+
function endMarkerFor(platform, key) {
|
|
97
|
+
return key.length > 0
|
|
98
|
+
? `<!--/IRONBEE:PLATFORM:${platform}:${key}-->`
|
|
99
|
+
: `<!--/IRONBEE:PLATFORM:${platform}-->`;
|
|
100
|
+
}
|
|
101
|
+
function findMarkerBlocks(content, platform, fileLabel) {
|
|
102
|
+
const re = startMarkerRegex(platform);
|
|
103
|
+
const blocks = [];
|
|
104
|
+
const keysSeen = new Set();
|
|
105
|
+
let m = re.exec(content);
|
|
106
|
+
while (m !== null) {
|
|
107
|
+
const key = m[1] ?? "";
|
|
108
|
+
const startEnd = m.index + m[0].length;
|
|
109
|
+
const endMarker = endMarkerFor(platform, key);
|
|
110
|
+
const endIdx = content.indexOf(endMarker, startEnd);
|
|
111
|
+
if (endIdx === -1) {
|
|
112
|
+
const labelSuffix = fileLabel ? ` in ${fileLabel}` : "";
|
|
113
|
+
const keyDisplay = key.length > 0 ? `${platform}:${key}` : platform;
|
|
114
|
+
logger_1.logger.debug(`platform-section ${keyDisplay}: start marker found without matching end marker${labelSuffix}`);
|
|
115
|
+
m = re.exec(content);
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (keysSeen.has(key)) {
|
|
119
|
+
const labelSuffix = fileLabel ? ` in ${fileLabel}` : "";
|
|
120
|
+
const keyDisplay = key.length > 0 ? `${platform}:${key}` : platform;
|
|
121
|
+
logger_1.logger.warn(`platform-section ${keyDisplay}: multiple marker blocks with the same key${labelSuffix} — only the first will be updated. ` +
|
|
122
|
+
`Either consolidate the blocks or use distinct keys (\`IRONBEE:PLATFORM:${platform}:<key>\`) per position.`);
|
|
123
|
+
m = re.exec(content);
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
keysSeen.add(key);
|
|
127
|
+
blocks.push({ key, startEnd, endIdx });
|
|
128
|
+
m = re.exec(content);
|
|
129
|
+
}
|
|
130
|
+
return blocks;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Replace the contents of every platform-section marker block for `platform`
|
|
134
|
+
* in `fileContent`. Returns the new content (or the original content if no
|
|
135
|
+
* markers are found).
|
|
136
|
+
*
|
|
137
|
+
* Each block in the file is independently resolved. The same platform can
|
|
138
|
+
* have multiple blocks distinguished by their key — see file header for
|
|
139
|
+
* the syntax. Blocks that share a key are still treated as a structural
|
|
140
|
+
* bug: only the first is updated and a warning is emitted.
|
|
141
|
+
*
|
|
142
|
+
* The markers themselves are preserved so the operation is reversible.
|
|
143
|
+
*/
|
|
144
|
+
function applyPlatformSection(fileContent, platform, replacement, fileLabel) {
|
|
145
|
+
const getRepl = typeof replacement === "function"
|
|
146
|
+
? replacement
|
|
147
|
+
: () => replacement;
|
|
148
|
+
const blocks = findMarkerBlocks(fileContent, platform, fileLabel);
|
|
149
|
+
if (blocks.length === 0) {
|
|
150
|
+
return fileContent;
|
|
151
|
+
}
|
|
152
|
+
const placeholder = PLACEHOLDERS[platform];
|
|
153
|
+
if (placeholder === undefined) {
|
|
154
|
+
throw new Error(`No placeholder registered for platform '${platform}'.`);
|
|
155
|
+
}
|
|
156
|
+
// Apply replacements in REVERSE so earlier indices stay valid as we
|
|
157
|
+
// splice. Keep each marker pair intact; only the inner content moves.
|
|
158
|
+
let result = fileContent;
|
|
159
|
+
for (let i = blocks.length - 1; i >= 0; i--) {
|
|
160
|
+
const b = blocks[i];
|
|
161
|
+
const inner = getRepl(b.key) ?? placeholder;
|
|
162
|
+
const before = result.substring(0, b.startEnd);
|
|
163
|
+
const after = result.substring(b.endIdx);
|
|
164
|
+
result = `${before}\n${inner}\n${after}`;
|
|
165
|
+
}
|
|
166
|
+
return result;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Build the on-disk fragment filename for `(fragmentBase, platform, key)`:
|
|
170
|
+
* - keyless block (`key === ""`) → `<base>.<platform>.md`
|
|
171
|
+
* - keyed block → `<base>.<platform>.<key>.md`
|
|
172
|
+
*/
|
|
173
|
+
function fragmentFilename(fragmentBase, platform, key) {
|
|
174
|
+
return key.length > 0
|
|
175
|
+
? `${fragmentBase}.${platform}.${key}.md`
|
|
176
|
+
: `${fragmentBase}.${platform}.md`;
|
|
177
|
+
}
|
|
178
|
+
/** Read a fragment file from `${baseDir}/${name}`. Throws when missing. */
|
|
179
|
+
function readFragment(baseDir, name) {
|
|
180
|
+
const path = `${baseDir}/${name}`;
|
|
181
|
+
if (!(0, fs_1.existsSync)(path)) {
|
|
182
|
+
throw new Error(`Platform fragment not found: ${path}`);
|
|
183
|
+
}
|
|
184
|
+
return (0, fs_1.readFileSync)(path, "utf-8").trimEnd();
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Read the file at `targetPath`, apply the platform section toggle, and
|
|
188
|
+
* write back if the content actually changed. No-op when the marker is
|
|
189
|
+
* missing.
|
|
190
|
+
*/
|
|
191
|
+
function togglePlatformSectionInFile(targetPath, platform, replacement) {
|
|
192
|
+
if (!(0, fs_1.existsSync)(targetPath)) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
const original = (0, fs_1.readFileSync)(targetPath, "utf-8");
|
|
196
|
+
const updated = applyPlatformSection(original, platform, replacement, targetPath);
|
|
197
|
+
if (updated === original) {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
(0, fs_1.writeFileSync)(targetPath, updated);
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
/** Project files that carry platform markers, per client. */
|
|
204
|
+
exports.PLATFORM_TARGETS = {
|
|
205
|
+
claude: [
|
|
206
|
+
{ projectRelativePath: ".claude/skills/ironbee-verification.md", fragmentBase: "skill" },
|
|
207
|
+
{ projectRelativePath: ".claude/rules/ironbee-verification.md", fragmentBase: "rule" },
|
|
208
|
+
{ projectRelativePath: ".claude/commands/ironbee-verify.md", fragmentBase: "command-verify" },
|
|
209
|
+
],
|
|
210
|
+
cursor: [
|
|
211
|
+
{ projectRelativePath: ".cursor/skills/ironbee-verification.md", fragmentBase: "skill" },
|
|
212
|
+
{ projectRelativePath: ".cursor/rules/ironbee-verification.mdc", fragmentBase: "rule" },
|
|
213
|
+
{ projectRelativePath: ".cursor/commands/ironbee-verify/SKILL.md", fragmentBase: "command-verify" },
|
|
214
|
+
],
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Toggle every platform-section block (across every key) in every installed
|
|
218
|
+
* md file across all known clients in `projectDir`. Files that don't exist
|
|
219
|
+
* are silently skipped (the client may not be installed for this project).
|
|
220
|
+
*
|
|
221
|
+
* When `enabled === true`, fragments for each block's key are loaded from
|
|
222
|
+
* `platformsDirFor(client)`. Missing fragment files for a key fall back to
|
|
223
|
+
* the placeholder rather than crashing — the source md is the source of
|
|
224
|
+
* truth for which keys exist; missing fragments are an authoring gap.
|
|
225
|
+
*
|
|
226
|
+
* Returns the list of project-relative paths that were updated.
|
|
227
|
+
*/
|
|
228
|
+
function applyPlatformToProjectFiles(projectDir, platform, enabled, platformsDirFor, clientFilter) {
|
|
229
|
+
const updated = [];
|
|
230
|
+
const allClients = Object.keys(exports.PLATFORM_TARGETS);
|
|
231
|
+
const clientsToApply = clientFilter === undefined
|
|
232
|
+
? allClients
|
|
233
|
+
: allClients.filter((c) => clientFilter.includes(c));
|
|
234
|
+
for (const client of clientsToApply) {
|
|
235
|
+
const targets = exports.PLATFORM_TARGETS[client];
|
|
236
|
+
const platformsDir = platformsDirFor(client);
|
|
237
|
+
for (const t of targets) {
|
|
238
|
+
const target = `${projectDir}/${t.projectRelativePath}`;
|
|
239
|
+
if (!(0, fs_1.existsSync)(target)) {
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
const resolver = enabled
|
|
243
|
+
? (key) => {
|
|
244
|
+
const path = `${platformsDir}/${fragmentFilename(t.fragmentBase, platform, key)}`;
|
|
245
|
+
if (!(0, fs_1.existsSync)(path)) {
|
|
246
|
+
const keyDisplay = key.length > 0 ? `${platform}:${key}` : platform;
|
|
247
|
+
logger_1.logger.warn(`platform-section ${keyDisplay}: missing fragment ${path} for ${t.projectRelativePath} — falling back to placeholder.`);
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
return (0, fs_1.readFileSync)(path, "utf-8").trimEnd();
|
|
251
|
+
}
|
|
252
|
+
: null;
|
|
253
|
+
if (togglePlatformSectionInFile(target, platform, resolver)) {
|
|
254
|
+
updated.push(t.projectRelativePath);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return updated;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Sync every platform's section in the project's installed md files to
|
|
262
|
+
* match the current config state — ON when the platform's effective patterns
|
|
263
|
+
* are non-empty, OFF otherwise. Browser platform is enabled by default
|
|
264
|
+
* (its `verifyPatterns` defaults to `DEFAULT_BROWSER_VERIFY_PATTERNS` when
|
|
265
|
+
* unset); node and backend platforms default to inert.
|
|
266
|
+
*
|
|
267
|
+
* Called by `ironbee install` right after the source md files are written
|
|
268
|
+
* so that re-installing a project that already enabled / disabled a platform
|
|
269
|
+
* preserves the right state in the freshly-written files (instead of leaving
|
|
270
|
+
* the source's empty marker block visible).
|
|
271
|
+
*/
|
|
272
|
+
function syncPlatformSectionsToConfig(projectDir, platformsDirFor) {
|
|
273
|
+
const config = (0, config_1.loadConfig)(projectDir);
|
|
274
|
+
for (const cycle of config_1.ALL_CYCLES) {
|
|
275
|
+
const enabled = (0, config_1.isCycleEnabled)(config, cycle);
|
|
276
|
+
applyPlatformToProjectFiles(projectDir, cycle, enabled, platformsDirFor);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=platform-section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-section.js","sourceRoot":"","sources":["../../src/lib/platform-section.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;;;AA0HH,oDA+BC;AAOD,4CAIC;AAGD,oCAMC;AAOD,kEAeC;AA+CD,kEAuCC;AAcD,oEASC;AA9SD,2BAA6D;AAC7D,qCAAkC;AAClC,qCAAkE;AAElE,8EAA8E;AAC9E,MAAM,YAAY,GAA2B;IACzC,OAAO,EAAE;QACL,0DAA0D;QAC1D,iFAAiF;QACjF,sFAAsF;QACtF,wEAAwE;QACxE,4EAA4E;QAC5E,2EAA2E;KAC9E,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,IAAI,EAAE;QACF,kEAAkE;QAClE,8EAA8E;QAC9E,4EAA4E;QAC5E,sCAAsC;QACtC,oGAAoG;QACpG,iGAAiG;QACjG,mEAAmE;KACtE,CAAC,IAAI,CAAC,IAAI,CAAC;IACZ,OAAO,EAAE;QACL,6DAA6D;QAC7D,iFAAiF;QACjF,6EAA6E;QAC7E,+EAA+E;QAC/E,kBAAkB;QAClB,oEAAoE;KACvE,CAAC,IAAI,C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M,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;wBAC5E,eAAM,CAAC,IAAI,CACP,oBAAoB,UAAU,sBAAsB,IAAI,QAAQ,CAAC,CAAC,mBAAmB,iCAAiC,CACzH,CAAC;wBACF,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,OAAO,IAAA,iBAAY,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;gBACjD,CAAC;gBACD,CAAC,CAAC,IAAI,CAAC;YACX,IAAI,2BAA2B,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;gBAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;YACxC,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,4BAA4B,CACxC,UAAkB,EAClB,eAA2C;IAE3C,MAAM,MAAM,GAAkC,IAAA,mBAAU,EAAC,UAAU,CAAC,CAAC;IACrE,KAAK,MAAM,KAAK,IAAI,mBAAU,EAAE,CAAC;QAC7B,MAAM,OAAO,GAAY,IAAA,uBAAc,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACvD,2BAA2B,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;IAC7E,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<!-- Node backend verification is ENABLED for this project. -->
|
|
2
|
-
|
|
3
|
-
## Backend Node Mode (when `backend.node.verifyPatterns` matches an edited file)
|
|
4
|
-
|
|
5
|
-
> **Precondition: the backend must actually be Node.js.** If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, etc., this section does NOT apply — `ndt_*` tools won't connect to non-Node processes. Just do browser verification.
|
|
6
|
-
|
|
7
|
-
If the project has node backend verification enabled (`ironbee enable-backend node` once at setup, by an operator who confirmed the backend is Node.js) and your edits touch matching paths (e.g. `server/**`, `pages/api/**`), the Stop hook also enforces a Node cycle. The same `verification-start` covers both cycles; the same verdict file carries fields for both.
|
|
8
|
-
|
|
9
|
-
### Steps (additive to the browser flow above)
|
|
10
|
-
1. **Identify the running Node process** — note its PID, container name (`docker compose ps`), or inspector port.
|
|
11
|
-
2. **Connect**: `mcp__node-devtools__ndt_debug_connect` with one of `pid` / `processName` / `containerId` / `containerName` / `inspectorPort` / `wsUrl`. Inspector is auto-activated via SIGUSR1 if needed.
|
|
12
|
-
3. **Pick an evidence path** for each changed code path:
|
|
13
|
-
- **Probe path** (proves the code path executed): `mcp__node-devtools__ndt_debug_put-tracepoint` (or `put-logpoint` / `put-exceptionpoint`) at the changed code, exercise the path (e.g. trigger the API call from the browser), then `mcp__node-devtools__ndt_debug_get-probe-snapshots`. At least one probe must come back with `triggered: true`.
|
|
14
|
-
- **Log path** (proves no errors): exercise the path, then `mcp__node-devtools__ndt_debug_get-logs` with the error level filter. `backend_node_log_errors` must be empty for `status: pass`.
|
|
15
|
-
4. **Disconnect** (optional): `mcp__node-devtools__ndt_debug_disconnect`.
|
|
16
|
-
5. **Submit verdict** including `backend_node_*` fields. If browser cycle is also active, include browser fields in the SAME verdict — do not submit two verdicts.
|
|
17
|
-
|
|
18
|
-
### Verdict (node-cycle fields)
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"session_id": "...",
|
|
22
|
-
"status": "pass",
|
|
23
|
-
"checks": ["POST /api/orders returned 201", "tracepoint at handler.ts:42 fired once"],
|
|
24
|
-
"backend_node_processes_connected": ["pid:12345 (next-server)"],
|
|
25
|
-
"backend_node_probes_set": [
|
|
26
|
-
{ "type": "tracepoint", "location": "src/api/orders.ts:42", "triggered": true }
|
|
27
|
-
],
|
|
28
|
-
"backend_node_probe_snapshots_collected": 1,
|
|
29
|
-
"backend_node_log_errors": []
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
For a multi-cycle pass, both browser and node criteria must hold — claiming `pass` without one cycle's evidence will be overridden to fail by the gate.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<!-- Node backend verification is ENABLED for this project. -->
|
|
2
|
-
|
|
3
|
-
## Backend Node Mode (when `backend.node.verifyPatterns` matches an edited file)
|
|
4
|
-
|
|
5
|
-
> **Precondition: the backend must actually be Node.js.** If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, etc., this section does NOT apply — `MCP:ndt_*` tools won't connect to non-Node processes. Just do browser verification.
|
|
6
|
-
|
|
7
|
-
If the project has node backend verification enabled (`ironbee enable-backend node` once at setup, by an operator who confirmed the backend is Node.js) and your edits touch matching paths (e.g. `server/**`, `pages/api/**`), the stop hook also enforces a Node cycle. The same `verification-start` covers both cycles; the same verdict file carries fields for both.
|
|
8
|
-
|
|
9
|
-
### Steps (additive to the browser flow above)
|
|
10
|
-
1. **Identify the running Node process** — note its PID, container name (`docker compose ps`), or inspector port.
|
|
11
|
-
2. **Connect**: `MCP:ndt_debug_connect` with one of `pid` / `processName` / `containerId` / `containerName` / `inspectorPort` / `wsUrl`. Inspector is auto-activated via SIGUSR1 if needed.
|
|
12
|
-
3. **Pick an evidence path** for each changed code path:
|
|
13
|
-
- **Probe path** (proves the code path executed): `MCP:ndt_debug_put-tracepoint` (or `put-logpoint` / `put-exceptionpoint`) at the changed code, exercise the path (e.g. trigger the API call from the browser), then `MCP:ndt_debug_get-probe-snapshots`. At least one probe must come back with `triggered: true`.
|
|
14
|
-
- **Log path** (proves no errors): exercise the path, then `MCP:ndt_debug_get-logs` with the error level filter. `backend_node_log_errors` must be empty for `status: pass`.
|
|
15
|
-
4. **Disconnect** (optional): `MCP:ndt_debug_disconnect`.
|
|
16
|
-
5. **Submit verdict** including `backend_node_*` fields. If browser cycle is also active, include browser fields in the SAME verdict — do not submit two verdicts.
|
|
17
|
-
|
|
18
|
-
### Verdict (node-cycle fields)
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"session_id": "...",
|
|
22
|
-
"status": "pass",
|
|
23
|
-
"checks": ["POST /api/orders returned 201", "tracepoint at handler.ts:42 fired once"],
|
|
24
|
-
"backend_node_processes_connected": ["pid:12345 (next-server)"],
|
|
25
|
-
"backend_node_probes_set": [
|
|
26
|
-
{ "type": "tracepoint", "location": "src/api/orders.ts:42", "triggered": true }
|
|
27
|
-
],
|
|
28
|
-
"backend_node_probe_snapshots_collected": 1,
|
|
29
|
-
"backend_node_log_errors": []
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
For a multi-cycle pass, both browser and node criteria must hold — claiming `pass` without one cycle's evidence will be overridden to fail by the gate.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared helpers for `enable-backend <runtime>` / `disable-backend <runtime>`.
|
|
3
|
-
*
|
|
4
|
-
* Per design §10 — opt-in activation for backend verification per runtime.
|
|
5
|
-
*
|
|
6
|
-
* - `applyEnableBackend(runtime, projectDir)` writes opinionated default
|
|
7
|
-
* `verifyPatterns` to the project config under `backend.<runtime>`.
|
|
8
|
-
* Refuses if patterns are already populated. Other fields
|
|
9
|
-
* (`alwaysRequired`, `evidencePaths`, `additionalVerifyPatterns`) are
|
|
10
|
-
* not written — they merge in from defaults at config-load time.
|
|
11
|
-
*
|
|
12
|
-
* - `applyDisableBackend(runtime, projectDir)` resets `verifyPatterns`
|
|
13
|
-
* to `[]` for the runtime, leaving customizations of other fields
|
|
14
|
-
* intact so a later re-enable restores them. Idempotent.
|
|
15
|
-
*
|
|
16
|
-
* Both throw when `<runtime>` isn't in the registered runtime set
|
|
17
|
-
* (today: just `node`); callers handle the error and exit.
|
|
18
|
-
*/
|
|
19
|
-
export declare function knownRuntimes(): string[];
|
|
20
|
-
export declare function assertKnownRuntime(runtime: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* Enable a backend runtime: write default `verifyPatterns` + splice the
|
|
23
|
-
* runtime fragment into installed skill/rule/command md files.
|
|
24
|
-
*
|
|
25
|
-
* No-op + warning when patterns are already populated (the user must
|
|
26
|
-
* `disable-backend` first to reset, since we don't want to clobber their
|
|
27
|
-
* custom additions).
|
|
28
|
-
*
|
|
29
|
-
* `clientName`: optional filter for which clients' md files to update.
|
|
30
|
-
* Same semantics as `applyVerificationToggle` — `"all"` / `<name>` /
|
|
31
|
-
* undefined (default: every registered client; per-file existsSync gate
|
|
32
|
-
* skips ones without installed artifacts).
|
|
33
|
-
*/
|
|
34
|
-
export declare function applyEnableBackend(runtime: string, projectDir: string, clientName?: string): void;
|
|
35
|
-
/**
|
|
36
|
-
* Disable a backend runtime: reset `verifyPatterns` to `[]` and reset the
|
|
37
|
-
* runtime fragment in installed skill/rule/command md files.
|
|
38
|
-
*
|
|
39
|
-
* Customizations of `alwaysRequired`, `evidencePaths`, and
|
|
40
|
-
* `additionalVerifyPatterns` are preserved. Idempotent.
|
|
41
|
-
*
|
|
42
|
-
* `clientName`: same semantics as `applyEnableBackend`.
|
|
43
|
-
*/
|
|
44
|
-
export declare function applyDisableBackend(runtime: string, projectDir: string, clientName?: string): void;
|
|
45
|
-
//# sourceMappingURL=backend-toggle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backend-toggle.d.ts","sourceRoot":"","sources":["../../src/commands/backend-toggle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAiDH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAWxC;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAKxD;AAyCD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAgDjG;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAwBlG"}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Shared helpers for `enable-backend <runtime>` / `disable-backend <runtime>`.
|
|
4
|
-
*
|
|
5
|
-
* Per design §10 — opt-in activation for backend verification per runtime.
|
|
6
|
-
*
|
|
7
|
-
* - `applyEnableBackend(runtime, projectDir)` writes opinionated default
|
|
8
|
-
* `verifyPatterns` to the project config under `backend.<runtime>`.
|
|
9
|
-
* Refuses if patterns are already populated. Other fields
|
|
10
|
-
* (`alwaysRequired`, `evidencePaths`, `additionalVerifyPatterns`) are
|
|
11
|
-
* not written — they merge in from defaults at config-load time.
|
|
12
|
-
*
|
|
13
|
-
* - `applyDisableBackend(runtime, projectDir)` resets `verifyPatterns`
|
|
14
|
-
* to `[]` for the runtime, leaving customizations of other fields
|
|
15
|
-
* intact so a later re-enable restores them. Idempotent.
|
|
16
|
-
*
|
|
17
|
-
* Both throw when `<runtime>` isn't in the registered runtime set
|
|
18
|
-
* (today: just `node`); callers handle the error and exit.
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.knownRuntimes = knownRuntimes;
|
|
22
|
-
exports.assertKnownRuntime = assertKnownRuntime;
|
|
23
|
-
exports.applyEnableBackend = applyEnableBackend;
|
|
24
|
-
exports.applyDisableBackend = applyDisableBackend;
|
|
25
|
-
const fs_1 = require("fs");
|
|
26
|
-
const path_1 = require("path");
|
|
27
|
-
const registry_1 = require("../clients/registry");
|
|
28
|
-
const logger_1 = require("../lib/logger");
|
|
29
|
-
const output_1 = require("../lib/output");
|
|
30
|
-
const config_1 = require("../lib/config");
|
|
31
|
-
const runtime_section_1 = require("../lib/runtime-section");
|
|
32
|
-
/**
|
|
33
|
-
* Locates the per-client fragments directory at runtime. Fragments live next
|
|
34
|
-
* to the compiled client code (`dist/clients/<client>/fragments/`), so we
|
|
35
|
-
* resolve relative to this file's location — same trick the install code
|
|
36
|
-
* uses to find skill/rule templates.
|
|
37
|
-
*/
|
|
38
|
-
function fragmentsDirFor(client) {
|
|
39
|
-
return (0, path_1.join)(__dirname, "..", "clients", client, "fragments");
|
|
40
|
-
}
|
|
41
|
-
/** Opinionated verifyPatterns written by `enable-backend <runtime>`. */
|
|
42
|
-
const RUNTIME_DEFAULT_VERIFY_PATTERNS = {
|
|
43
|
-
node: [
|
|
44
|
-
"server/**/*.{ts,js,mjs,cjs}",
|
|
45
|
-
"src/server/**/*.{ts,js,mjs,cjs}",
|
|
46
|
-
"backend/**/*.{ts,js,mjs,cjs}",
|
|
47
|
-
"api/**/*.{ts,js,mjs,cjs}",
|
|
48
|
-
"src/api/**/*.{ts,js,mjs,cjs}",
|
|
49
|
-
"pages/api/**/*.{ts,js,mjs,cjs}",
|
|
50
|
-
"app/api/**/*.{ts,js,mjs,cjs}",
|
|
51
|
-
"routes/**/*.{ts,js,mjs,cjs}",
|
|
52
|
-
"**/server.{ts,js,mjs,cjs}",
|
|
53
|
-
],
|
|
54
|
-
};
|
|
55
|
-
function knownRuntimes() {
|
|
56
|
-
const runtimes = [];
|
|
57
|
-
for (const server of config_1.BACKEND_SERVERS) {
|
|
58
|
-
const runtime = Object.keys(config_1.RUNTIME_TO_SERVER).find((k) => config_1.RUNTIME_TO_SERVER[k] === server);
|
|
59
|
-
if (runtime !== undefined) {
|
|
60
|
-
runtimes.push(runtime);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return runtimes;
|
|
64
|
-
}
|
|
65
|
-
function assertKnownRuntime(runtime) {
|
|
66
|
-
const known = knownRuntimes();
|
|
67
|
-
if (!known.includes(runtime)) {
|
|
68
|
-
throw new Error(`Unknown runtime '${runtime}'. Available: ${known.join(", ")}.`);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
function projectConfigPath(projectDir) {
|
|
72
|
-
return (0, path_1.join)((0, path_1.resolve)(projectDir), ".ironbee", "config.json");
|
|
73
|
-
}
|
|
74
|
-
function readProjectConfig(configPath) {
|
|
75
|
-
if (!(0, fs_1.existsSync)(configPath)) {
|
|
76
|
-
return {};
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
return JSON.parse((0, fs_1.readFileSync)(configPath, "utf-8"));
|
|
80
|
-
}
|
|
81
|
-
catch (e) {
|
|
82
|
-
logger_1.logger.debug(`failed to read ${configPath}: ${e}`);
|
|
83
|
-
throw new Error(`Project config at ${configPath} is not valid JSON: ${e instanceof Error ? e.message : e}`);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function writeProjectConfig(configPath, config) {
|
|
87
|
-
(0, fs_1.mkdirSync)((0, path_1.join)(configPath, ".."), { recursive: true });
|
|
88
|
-
(0, fs_1.writeFileSync)(configPath, JSON.stringify(config, null, 2) + "\n");
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Resolve the client filter list passed to `applyRuntimeToProjectFiles`. We
|
|
92
|
-
* pass `undefined` for "all" so the helper iterates every registered client
|
|
93
|
-
* (its existsSync gate already skips clients without installed md files);
|
|
94
|
-
* for a specific name we pass `[name]`.
|
|
95
|
-
*
|
|
96
|
-
* Throws on unknown name. `clientName === "all" || undefined` returns
|
|
97
|
-
* undefined (== all clients).
|
|
98
|
-
*/
|
|
99
|
-
function clientFilterForRuntime(projectDir, clientName) {
|
|
100
|
-
if (clientName === undefined || clientName === "all") {
|
|
101
|
-
return undefined;
|
|
102
|
-
}
|
|
103
|
-
// resolveTargetClients validates the name and throws when unknown.
|
|
104
|
-
const clients = (0, registry_1.resolveTargetClients)(projectDir, clientName);
|
|
105
|
-
return clients.map((c) => c.name);
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Enable a backend runtime: write default `verifyPatterns` + splice the
|
|
109
|
-
* runtime fragment into installed skill/rule/command md files.
|
|
110
|
-
*
|
|
111
|
-
* No-op + warning when patterns are already populated (the user must
|
|
112
|
-
* `disable-backend` first to reset, since we don't want to clobber their
|
|
113
|
-
* custom additions).
|
|
114
|
-
*
|
|
115
|
-
* `clientName`: optional filter for which clients' md files to update.
|
|
116
|
-
* Same semantics as `applyVerificationToggle` — `"all"` / `<name>` /
|
|
117
|
-
* undefined (default: every registered client; per-file existsSync gate
|
|
118
|
-
* skips ones without installed artifacts).
|
|
119
|
-
*/
|
|
120
|
-
function applyEnableBackend(runtime, projectDir, clientName) {
|
|
121
|
-
assertKnownRuntime(runtime);
|
|
122
|
-
const configPath = projectConfigPath(projectDir);
|
|
123
|
-
const config = readProjectConfig(configPath);
|
|
124
|
-
if (!config.backend) {
|
|
125
|
-
config.backend = {};
|
|
126
|
-
}
|
|
127
|
-
const block = config.backend[runtime] ?? {};
|
|
128
|
-
const existing = Array.isArray(block.verifyPatterns) ? block.verifyPatterns : [];
|
|
129
|
-
if (existing.length > 0) {
|
|
130
|
-
console.log(`${output_1.pc.yellow("⚠")} ${runtime} backend is already enabled in ${output_1.pc.dim(configPath)}.\n` +
|
|
131
|
-
` Run ${output_1.pc.cyan(`ironbee disable-backend ${runtime}`)} first, or empty the verifyPatterns array manually,\n` +
|
|
132
|
-
` then re-run enable-backend to re-apply defaults.`);
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
const defaults = RUNTIME_DEFAULT_VERIFY_PATTERNS[runtime];
|
|
136
|
-
if (defaults === undefined) {
|
|
137
|
-
throw new Error(`No opinionated default patterns registered for runtime '${runtime}'.`);
|
|
138
|
-
}
|
|
139
|
-
block.verifyPatterns = [...defaults];
|
|
140
|
-
config.backend[runtime] = block;
|
|
141
|
-
writeProjectConfig(configPath, config);
|
|
142
|
-
// Splice the runtime fragment into installed md files (skill/rule/command).
|
|
143
|
-
// `clientName` narrows the iteration; without it we sweep every registered
|
|
144
|
-
// client and rely on existsSync to skip ones without installed artifacts.
|
|
145
|
-
const clientFilter = clientFilterForRuntime(projectDir, clientName);
|
|
146
|
-
const updatedFiles = (0, runtime_section_1.applyRuntimeToProjectFiles)(projectDir, runtime, true, fragmentsDirFor, clientFilter);
|
|
147
|
-
console.log(`${output_1.pc.green("✓")} Enabled ${output_1.pc.bold(runtime)} backend verification in ${output_1.pc.dim(configPath)}.`);
|
|
148
|
-
console.log(` ${output_1.pc.dim("Patterns applied to backend." + runtime + ".verifyPatterns:")}`);
|
|
149
|
-
for (const p of defaults) {
|
|
150
|
-
console.log(` ${output_1.pc.dim("- " + p)}`);
|
|
151
|
-
}
|
|
152
|
-
if (updatedFiles.length > 0) {
|
|
153
|
-
console.log(`\n ${output_1.pc.dim("Updated agent guidance files:")}`);
|
|
154
|
-
for (const f of updatedFiles) {
|
|
155
|
-
console.log(` ${output_1.pc.dim("- " + f)}`);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
console.log(`\n ${output_1.pc.dim("Edit the patterns to match your project, or add overrides via")} ${output_1.pc.cyan(`backend.${runtime}.additionalVerifyPatterns`)}${output_1.pc.dim(".")}`);
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Disable a backend runtime: reset `verifyPatterns` to `[]` and reset the
|
|
162
|
-
* runtime fragment in installed skill/rule/command md files.
|
|
163
|
-
*
|
|
164
|
-
* Customizations of `alwaysRequired`, `evidencePaths`, and
|
|
165
|
-
* `additionalVerifyPatterns` are preserved. Idempotent.
|
|
166
|
-
*
|
|
167
|
-
* `clientName`: same semantics as `applyEnableBackend`.
|
|
168
|
-
*/
|
|
169
|
-
function applyDisableBackend(runtime, projectDir, clientName) {
|
|
170
|
-
assertKnownRuntime(runtime);
|
|
171
|
-
const configPath = projectConfigPath(projectDir);
|
|
172
|
-
const config = readProjectConfig(configPath);
|
|
173
|
-
const block = config.backend?.[runtime];
|
|
174
|
-
const currentPatterns = Array.isArray(block?.verifyPatterns) ? block.verifyPatterns : [];
|
|
175
|
-
if (block === undefined || currentPatterns.length === 0) {
|
|
176
|
-
console.log(`${output_1.pc.dim("·")} ${runtime} backend already disabled (no-op).`);
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
block.verifyPatterns = [];
|
|
180
|
-
writeProjectConfig(configPath, config);
|
|
181
|
-
const clientFilter = clientFilterForRuntime(projectDir, clientName);
|
|
182
|
-
const updatedFiles = (0, runtime_section_1.applyRuntimeToProjectFiles)(projectDir, runtime, false, fragmentsDirFor, clientFilter);
|
|
183
|
-
console.log(`${output_1.pc.green("✓")} Disabled ${output_1.pc.bold(runtime)} backend verification in ${output_1.pc.dim(configPath)}.`);
|
|
184
|
-
console.log(` ${output_1.pc.dim("Customizations of alwaysRequired, evidencePaths, additionalVerifyPatterns are preserved.")}`);
|
|
185
|
-
if (updatedFiles.length > 0) {
|
|
186
|
-
console.log(` ${output_1.pc.dim("Reset agent guidance for the runtime block in:")}`);
|
|
187
|
-
for (const f of updatedFiles) {
|
|
188
|
-
console.log(` ${output_1.pc.dim("- " + f)}`);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
//# sourceMappingURL=backend-toggle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backend-toggle.js","sourceRoot":"","sources":["../../src/commands/backend-toggle.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;AAiDH,sCAWC;AAED,gDAKC;AAsDD,gDAgDC;AAWD,kDAwBC;AA1MD,2BAAwE;AACxE,+BAAqC;AAErC,kDAA2D;AAC3D,0CAAuC;AACvC,0CAAmC;AACnC,0CAAmE;AACnE,4DAAoE;AAEpE;;;;;GAKG;AACH,SAAS,eAAe,CAAC,MAAc;IACnC,OAAO,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;AACjE,CAAC;AAED,wEAAwE;AACxE,MAAM,+BAA+B,GAA6B;IAC9D,IAAI,EAAE;QACF,6BAA6B;QAC7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
|
|
1
|
-
/**
|
|
2
|
-
* `ironbee disable-backend <runtime>`
|
|
3
|
-
*
|
|
4
|
-
* Disable backend verification for a runtime — resets `verifyPatterns` to
|
|
5
|
-
* `[]` for the runtime, leaving customizations of `alwaysRequired`,
|
|
6
|
-
* `evidencePaths`, and `additionalVerifyPatterns` intact so a later
|
|
7
|
-
* re-enable restores them. Idempotent.
|
|
8
|
-
*
|
|
9
|
-
* Pairs with `enable-backend` (separate file by design — both call shared
|
|
10
|
-
* helpers in `backend-toggle.ts`).
|
|
11
|
-
*/
|
|
12
|
-
import { Command } from "commander";
|
|
13
|
-
export declare const disableBackendCommand: Command;
|
|
14
|
-
//# sourceMappingURL=disable-backend.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"disable-backend.d.ts","sourceRoot":"","sources":["../../src/commands/disable-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,eAAO,MAAM,qBAAqB,EAAE,OAa9B,CAAC"}
|