@ironbee-ai/cli 0.12.0 → 0.13.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 +6 -0
- package/README.md +3 -2
- package/dist/assets/banner.txt +1 -1
- package/dist/clients/claude/hooks/session-status.d.ts.map +1 -1
- package/dist/clients/claude/hooks/session-status.js +8 -2
- package/dist/clients/claude/hooks/session-status.js.map +1 -1
- package/dist/clients/claude/index.d.ts.map +1 -1
- package/dist/clients/claude/index.js +5 -0
- package/dist/clients/claude/index.js.map +1 -1
- package/dist/clients/cursor/index.d.ts.map +1 -1
- package/dist/clients/cursor/index.js +6 -0
- package/dist/clients/cursor/index.js.map +1 -1
- package/dist/clients/registry.d.ts +8 -9
- package/dist/clients/registry.d.ts.map +1 -1
- package/dist/clients/registry.js +13 -11
- package/dist/clients/registry.js.map +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +4 -5
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/register.d.ts +0 -1
- package/dist/commands/register.d.ts.map +1 -1
- package/dist/commands/register.js +7 -27
- package/dist/commands/register.js.map +1 -1
- package/dist/commands/uninstall.d.ts +2 -3
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +3 -4
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/unregister.d.ts +0 -1
- package/dist/commands/unregister.d.ts.map +1 -1
- package/dist/commands/unregister.js +3 -24
- package/dist/commands/unregister.js.map +1 -1
- package/dist/index.js +33 -15
- package/dist/index.js.map +1 -1
- package/dist/lib/fs-prune.d.ts +20 -0
- package/dist/lib/fs-prune.d.ts.map +1 -0
- package/dist/lib/fs-prune.js +72 -0
- package/dist/lib/fs-prune.js.map +1 -0
- package/dist/lib/projects-registry.d.ts +6 -13
- package/dist/lib/projects-registry.d.ts.map +1 -1
- package/dist/lib/projects-registry.js +11 -46
- package/dist/lib/projects-registry.js.map +1 -1
- package/dist/tui/command.d.ts +18 -0
- package/dist/tui/command.d.ts.map +1 -0
- package/dist/tui/command.js +87 -0
- package/dist/tui/command.js.map +1 -0
- package/dist/tui/config/area.d.ts +6 -0
- package/dist/tui/config/area.d.ts.map +1 -0
- package/dist/tui/config/area.js +16 -0
- package/dist/tui/config/area.js.map +1 -0
- package/dist/tui/config/docs.d.ts +28 -0
- package/dist/tui/config/docs.d.ts.map +1 -0
- package/dist/tui/config/docs.js +68 -0
- package/dist/tui/config/docs.js.map +1 -0
- package/dist/tui/config/edit.d.ts +36 -0
- package/dist/tui/config/edit.d.ts.map +1 -0
- package/dist/tui/config/edit.js +69 -0
- package/dist/tui/config/edit.js.map +1 -0
- package/dist/tui/config/introspect.d.ts +58 -0
- package/dist/tui/config/introspect.d.ts.map +1 -0
- package/dist/tui/config/introspect.js +93 -0
- package/dist/tui/config/introspect.js.map +1 -0
- package/dist/tui/config/schema.d.ts +81 -0
- package/dist/tui/config/schema.d.ts.map +1 -0
- package/dist/tui/config/schema.js +534 -0
- package/dist/tui/config/schema.js.map +1 -0
- package/dist/tui/config/tree.d.ts +39 -0
- package/dist/tui/config/tree.d.ts.map +1 -0
- package/dist/tui/config/tree.js +59 -0
- package/dist/tui/config/tree.js.map +1 -0
- package/dist/tui/config/value.d.ts +75 -0
- package/dist/tui/config/value.d.ts.map +1 -0
- package/dist/tui/config/value.js +228 -0
- package/dist/tui/config/value.js.map +1 -0
- package/dist/tui/config/view.d.ts +13 -0
- package/dist/tui/config/view.d.ts.map +1 -0
- package/dist/tui/config/view.js +423 -0
- package/dist/tui/config/view.js.map +1 -0
- package/dist/tui/import/area.d.ts +11 -0
- package/dist/tui/import/area.d.ts.map +1 -0
- package/dist/tui/import/area.js +202 -0
- package/dist/tui/import/area.js.map +1 -0
- package/dist/tui/index.d.ts +9 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +14 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/platforms/area.d.ts +12 -0
- package/dist/tui/platforms/area.d.ts.map +1 -0
- package/dist/tui/platforms/area.js +228 -0
- package/dist/tui/platforms/area.js.map +1 -0
- package/dist/tui/projects/area.d.ts +26 -0
- package/dist/tui/projects/area.d.ts.map +1 -0
- package/dist/tui/projects/area.js +588 -0
- package/dist/tui/projects/area.js.map +1 -0
- package/dist/tui/queue/area.d.ts +11 -0
- package/dist/tui/queue/area.d.ts.map +1 -0
- package/dist/tui/queue/area.js +338 -0
- package/dist/tui/queue/area.js.map +1 -0
- package/dist/tui/queue/read.d.ts +49 -0
- package/dist/tui/queue/read.d.ts.map +1 -0
- package/dist/tui/queue/read.js +261 -0
- package/dist/tui/queue/read.js.map +1 -0
- package/dist/tui/sessions/area.d.ts +10 -0
- package/dist/tui/sessions/area.d.ts.map +1 -0
- package/dist/tui/sessions/area.js +266 -0
- package/dist/tui/sessions/area.js.map +1 -0
- package/dist/tui/sessions/read.d.ts +79 -0
- package/dist/tui/sessions/read.d.ts.map +1 -0
- package/dist/tui/sessions/read.js +202 -0
- package/dist/tui/sessions/read.js.map +1 -0
- package/dist/tui/shell/area.d.ts +47 -0
- package/dist/tui/shell/area.d.ts.map +1 -0
- package/dist/tui/shell/area.js +13 -0
- package/dist/tui/shell/area.js.map +1 -0
- package/dist/tui/shell/frame.d.ts +23 -0
- package/dist/tui/shell/frame.d.ts.map +1 -0
- package/dist/tui/shell/frame.js +91 -0
- package/dist/tui/shell/frame.js.map +1 -0
- package/dist/tui/shell/registry.d.ts +11 -0
- package/dist/tui/shell/registry.d.ts.map +1 -0
- package/dist/tui/shell/registry.js +29 -0
- package/dist/tui/shell/registry.js.map +1 -0
- package/dist/tui/shell/rerender.d.ts +16 -0
- package/dist/tui/shell/rerender.d.ts.map +1 -0
- package/dist/tui/shell/rerender.js +34 -0
- package/dist/tui/shell/rerender.js.map +1 -0
- package/dist/tui/shell/session.d.ts +75 -0
- package/dist/tui/shell/session.d.ts.map +1 -0
- package/dist/tui/shell/session.js +333 -0
- package/dist/tui/shell/session.js.map +1 -0
- package/dist/tui/shell/shell.d.ts +16 -0
- package/dist/tui/shell/shell.d.ts.map +1 -0
- package/dist/tui/shell/shell.js +213 -0
- package/dist/tui/shell/shell.js.map +1 -0
- package/dist/tui/shell/util.d.ts +18 -0
- package/dist/tui/shell/util.d.ts.map +1 -0
- package/dist/tui/shell/util.js +31 -0
- package/dist/tui/shell/util.js.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IronBee — `ironbee tui` command
|
|
3
|
+
*
|
|
4
|
+
* Umbrella entry for the interactive full-screen TUI. Builds the shared screen
|
|
5
|
+
* + session, runs the shell (home menu over the area registry, or deep-linked
|
|
6
|
+
* straight into `[area]`), and on exit performs the one-shot artifact rerender
|
|
7
|
+
* if any area changed artifact-affecting config.
|
|
8
|
+
*
|
|
9
|
+
* blessed and the whole TUI stack are required lazily inside the action so a
|
|
10
|
+
* normal `ironbee <other-command>` invocation never loads them.
|
|
11
|
+
*/
|
|
12
|
+
import { Command } from "commander";
|
|
13
|
+
export interface TuiOpts {
|
|
14
|
+
projectDir?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function runTui(area: string | undefined, opts: TuiOpts): Promise<void>;
|
|
17
|
+
export declare const tuiCommand: Command;
|
|
18
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/tui/command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,MAAM,WAAW,OAAO;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAkBD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCnF;AAED,eAAO,MAAM,UAAU,EAAE,OAenB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* IronBee — `ironbee tui` command
|
|
4
|
+
*
|
|
5
|
+
* Umbrella entry for the interactive full-screen TUI. Builds the shared screen
|
|
6
|
+
* + session, runs the shell (home menu over the area registry, or deep-linked
|
|
7
|
+
* straight into `[area]`), and on exit performs the one-shot artifact rerender
|
|
8
|
+
* if any area changed artifact-affecting config.
|
|
9
|
+
*
|
|
10
|
+
* blessed and the whole TUI stack are required lazily inside the action so a
|
|
11
|
+
* normal `ironbee <other-command>` invocation never loads them.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.tuiCommand = void 0;
|
|
15
|
+
exports.runTui = runTui;
|
|
16
|
+
const commander_1 = require("commander");
|
|
17
|
+
const path_1 = require("path");
|
|
18
|
+
const output_1 = require("../lib/output");
|
|
19
|
+
const prompt_1 = require("../lib/prompt");
|
|
20
|
+
function reportRerender(projectDir) {
|
|
21
|
+
const rerenderMod = require("./shell/rerender");
|
|
22
|
+
try {
|
|
23
|
+
const clients = rerenderMod.rerenderArtifacts(projectDir);
|
|
24
|
+
if (clients.length > 0) {
|
|
25
|
+
console.log(`${output_1.pc.green("✓")} Re-rendered ${output_1.pc.bold(clients.join(", "))} artifacts in ${output_1.pc.dim(projectDir)}`);
|
|
26
|
+
console.log(` ${output_1.pc.yellow("⚠")} Restart your editor / agent session for the changes to take effect.`);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
console.log(` ${output_1.pc.dim("· no clients detected in")} ${output_1.pc.dim(projectDir)} ${output_1.pc.dim("— skipped rerender")}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
console.error(`${output_1.pc.red("✗")} Artifact rerender failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
34
|
+
console.error(` ${output_1.pc.dim("Run")} ${output_1.pc.cyan("ironbee install")} ${output_1.pc.dim("to resync artifacts with config.")}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function runTui(area, opts) {
|
|
38
|
+
if (!(0, prompt_1.isInteractive)()) {
|
|
39
|
+
console.error(`${output_1.pc.red("✗")} ${output_1.pc.bold("ironbee tui")} requires an interactive terminal (TTY).`);
|
|
40
|
+
console.error(` ${output_1.pc.dim("In non-interactive contexts use")} ${output_1.pc.cyan("ironbee config get/set/list")} ${output_1.pc.dim("instead.")}`);
|
|
41
|
+
process.exitCode = 1;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const projectDir = (0, path_1.resolve)(opts.projectDir ?? process.cwd());
|
|
45
|
+
// Lazy require — keeps blessed + the TUI stack out of every non-TUI command.
|
|
46
|
+
const registry = require("./shell/registry");
|
|
47
|
+
if (area !== undefined && registry.findArea(area) === undefined) {
|
|
48
|
+
const ids = registry.AREAS.map((a) => a.id).join(", ");
|
|
49
|
+
console.error(`${output_1.pc.red("✗")} Unknown TUI area ${output_1.pc.bold(area)}. Known areas: ${output_1.pc.cyan(ids)}.`);
|
|
50
|
+
process.exitCode = 1;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const blessedMod = require("blessed");
|
|
54
|
+
const sessionMod = require("./shell/session");
|
|
55
|
+
const shellMod = require("./shell/shell");
|
|
56
|
+
const screen = blessedMod.screen({
|
|
57
|
+
smartCSR: true,
|
|
58
|
+
title: "IronBee TUI",
|
|
59
|
+
fullUnicode: true,
|
|
60
|
+
});
|
|
61
|
+
const session = new sessionMod.TuiSession(screen, projectDir);
|
|
62
|
+
await shellMod.runShell(session, area);
|
|
63
|
+
// The shell already tore down the screen; safe to print now. Re-render every
|
|
64
|
+
// project whose artifact-affecting config changed (the active project is
|
|
65
|
+
// switchable, so this can be more than one). Operational commands (install /
|
|
66
|
+
// uninstall / drain / import) run in the foreground inside the TUI, so
|
|
67
|
+
// there's nothing else to flush here.
|
|
68
|
+
for (const dir of session.rerenderProjects()) {
|
|
69
|
+
reportRerender(dir);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
exports.tuiCommand = new commander_1.Command("tui")
|
|
73
|
+
.description("Interactive full-screen TUI. Home menu of areas (Configuration, Platforms, …); "
|
|
74
|
+
+ "open one directly with `ironbee tui <area>`. The config area reads each key's description, "
|
|
75
|
+
+ "shows global / project / local + merged values side by side, and edits/unsets any layer in place.")
|
|
76
|
+
.argument("[area]", "Open a specific area directly (e.g. `config`). Omit for the home menu.")
|
|
77
|
+
.option("-p, --project-dir <dir>", "Project directory (default: cwd).")
|
|
78
|
+
.action(async (area, opts) => {
|
|
79
|
+
try {
|
|
80
|
+
await runTui(area, opts);
|
|
81
|
+
}
|
|
82
|
+
catch (e) {
|
|
83
|
+
console.error(`${output_1.pc.red("✗")} ${e instanceof Error ? e.message : String(e)}`);
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/tui/command.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AA2BH,wBAsCC;AA/DD,yCAAoC;AACpC,+BAA+B;AAC/B,0CAAmC;AACnC,0CAA8C;AAM9C,SAAS,cAAc,CAAC,UAAkB;IACtC,MAAM,WAAW,GAAsC,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACnF,IAAI,CAAC;QACD,MAAM,OAAO,GAAa,WAAW,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QACpE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,OAAO,CAAC,GAAG,CAAC,GAAG,WAAE,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,WAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,iBAAiB,WAAE,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CA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AG,IAAI,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC;QAC3C,cAAc,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;AACL,CAAC;AAEY,QAAA,UAAU,GAAY,IAAI,mBAAO,CAAC,KAAK,CAAC;KAChD,WAAW,CACR,iFAAiF;MAC/E,6FAA6F;MAC7F,mGAAmG,CACxG;KACA,QAAQ,CAAC,QAAQ,EAAE,wEAAwE,CAAC;KAC5F,MAAM,CAAC,yBAAyB,EAAE,mCAAmC,CAAC;KACtE,MAAM,CAAC,KAAK,EAAE,IAAwB,EAAE,IAAa,EAAiB,EAAE;IACrE,IAAI,CAAC;QACD,MAAM,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,WAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area.d.ts","sourceRoot":"","sources":["../../../src/tui/config/area.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAA2B,OAAO,EAAE,MAAM,eAAe,CAAC;AAGjE,eAAO,MAAM,UAAU,EAAE,OAOxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* IronBee — Config area: the TuiArea wrapper around the config browser view.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.configArea = void 0;
|
|
7
|
+
const view_1 = require("./view");
|
|
8
|
+
exports.configArea = {
|
|
9
|
+
id: "config",
|
|
10
|
+
title: "Configuration",
|
|
11
|
+
summary: "Browse & edit config keys across global / project / local layers",
|
|
12
|
+
mount(ctx) {
|
|
13
|
+
return (0, view_1.mountConfigView)(ctx);
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area.js","sourceRoot":"","sources":["../../../src/tui/config/area.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,iCAAyC;AAE5B,QAAA,UAAU,GAAY;IAC/B,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,eAAe;IACtB,OAAO,EAAE,kEAAkE;IAC3E,KAAK,CAAC,GAAgB;QAClB,OAAO,IAAA,sBAAe,EAAC,GAAG,CAAC,CAAC;IAChC,CAAC;CACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IronBee — Config TUI: docs generator (canonical source → docs table)
|
|
3
|
+
*
|
|
4
|
+
* `CONFIG_SCHEMA` is the single source of truth for config-key metadata. The
|
|
5
|
+
* key-reference table in `docs/claude-md/configuration.md` is GENERATED from it
|
|
6
|
+
* by `renderConfigDocsTable`, spliced between the marker comments below by
|
|
7
|
+
* `replaceConfigTable`. `scripts/generate-config-docs.js` regenerates the file;
|
|
8
|
+
* `tests/unit/tui/config-docs.test.ts` fails when the committed table drifts
|
|
9
|
+
* from the schema.
|
|
10
|
+
*
|
|
11
|
+
* Pure module — no fs / side effects. The script and test own the file I/O.
|
|
12
|
+
*/
|
|
13
|
+
/** Marker that opens the generated table region in configuration.md. */
|
|
14
|
+
export declare const CONFIG_TABLE_START: string;
|
|
15
|
+
/** Marker that closes the generated table region. */
|
|
16
|
+
export declare const CONFIG_TABLE_END: string;
|
|
17
|
+
/**
|
|
18
|
+
* Render the full config-key reference as grouped markdown tables, ordered by
|
|
19
|
+
* `orderedEntries()`. One `### <group>` heading + table per group.
|
|
20
|
+
*/
|
|
21
|
+
export declare function renderConfigDocsTable(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Replace the table between the markers in `markdown` with a freshly-rendered
|
|
24
|
+
* one. Throws when the markers are missing or out of order. Idempotent — the
|
|
25
|
+
* region between the markers is fully replaced each call.
|
|
26
|
+
*/
|
|
27
|
+
export declare function replaceConfigTable(markdown: string): string;
|
|
28
|
+
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/tui/config/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,EAAE,MACoH,CAAC;AAEtJ,qDAAqD;AACrD,eAAO,MAAM,gBAAgB,EAAE,MAA4C,CAAC;AAO5E;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAoB9C;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY3D"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* IronBee — Config TUI: docs generator (canonical source → docs table)
|
|
4
|
+
*
|
|
5
|
+
* `CONFIG_SCHEMA` is the single source of truth for config-key metadata. The
|
|
6
|
+
* key-reference table in `docs/claude-md/configuration.md` is GENERATED from it
|
|
7
|
+
* by `renderConfigDocsTable`, spliced between the marker comments below by
|
|
8
|
+
* `replaceConfigTable`. `scripts/generate-config-docs.js` regenerates the file;
|
|
9
|
+
* `tests/unit/tui/config-docs.test.ts` fails when the committed table drifts
|
|
10
|
+
* from the schema.
|
|
11
|
+
*
|
|
12
|
+
* Pure module — no fs / side effects. The script and test own the file I/O.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CONFIG_TABLE_END = exports.CONFIG_TABLE_START = void 0;
|
|
16
|
+
exports.renderConfigDocsTable = renderConfigDocsTable;
|
|
17
|
+
exports.replaceConfigTable = replaceConfigTable;
|
|
18
|
+
const schema_1 = require("./schema");
|
|
19
|
+
/** Marker that opens the generated table region in configuration.md. */
|
|
20
|
+
exports.CONFIG_TABLE_START = "<!-- IRONBEE:CONFIG-TABLE:START (generated from src/tui/config/schema.ts — run `node scripts/generate-config-docs.js`; do not edit by hand) -->";
|
|
21
|
+
/** Marker that closes the generated table region. */
|
|
22
|
+
exports.CONFIG_TABLE_END = "<!-- IRONBEE:CONFIG-TABLE:END -->";
|
|
23
|
+
/** Escape a value for safe placement inside a markdown table cell. */
|
|
24
|
+
function cell(s) {
|
|
25
|
+
return s.replace(/\|/g, "\\|").replace(/\r?\n/g, " ");
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Render the full config-key reference as grouped markdown tables, ordered by
|
|
29
|
+
* `orderedEntries()`. One `### <group>` heading + table per group.
|
|
30
|
+
*/
|
|
31
|
+
function renderConfigDocsTable() {
|
|
32
|
+
const entries = (0, schema_1.orderedEntries)();
|
|
33
|
+
const out = [];
|
|
34
|
+
let lastGroup = "";
|
|
35
|
+
for (const e of entries) {
|
|
36
|
+
const group = (0, schema_1.groupOf)(e.path);
|
|
37
|
+
if (group !== lastGroup) {
|
|
38
|
+
if (lastGroup !== "") {
|
|
39
|
+
out.push("");
|
|
40
|
+
}
|
|
41
|
+
out.push(`### ${(0, schema_1.groupTitle)(group)}`);
|
|
42
|
+
out.push("");
|
|
43
|
+
out.push("| Key | Type | Default | Artifacts | Description |");
|
|
44
|
+
out.push("| --- | --- | --- | --- | --- |");
|
|
45
|
+
lastGroup = group;
|
|
46
|
+
}
|
|
47
|
+
const artifacts = e.artifactAffecting ? "rerender" : "—";
|
|
48
|
+
out.push(`| \`${e.path}\` | \`${e.type}\` | ${cell(e.def)} | ${artifacts} | ${cell(e.description)} |`);
|
|
49
|
+
}
|
|
50
|
+
return out.join("\n");
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Replace the table between the markers in `markdown` with a freshly-rendered
|
|
54
|
+
* one. Throws when the markers are missing or out of order. Idempotent — the
|
|
55
|
+
* region between the markers is fully replaced each call.
|
|
56
|
+
*/
|
|
57
|
+
function replaceConfigTable(markdown) {
|
|
58
|
+
const startIdx = markdown.indexOf(exports.CONFIG_TABLE_START);
|
|
59
|
+
const endIdx = markdown.indexOf(exports.CONFIG_TABLE_END);
|
|
60
|
+
if (startIdx === -1 || endIdx === -1 || endIdx < startIdx) {
|
|
61
|
+
throw new Error("Config table markers not found (or out of order) in configuration.md. "
|
|
62
|
+
+ `Expected ${exports.CONFIG_TABLE_START} … ${exports.CONFIG_TABLE_END}.`);
|
|
63
|
+
}
|
|
64
|
+
const head = markdown.slice(0, startIdx + exports.CONFIG_TABLE_START.length);
|
|
65
|
+
const tail = markdown.slice(endIdx);
|
|
66
|
+
return `${head}\n\n${renderConfigDocsTable()}\n\n${tail}`;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=docs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../../../src/tui/config/docs.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAoBH,sDAoBC;AAOD,gDAYC;AAzDD,qCAAkF;AAElF,wEAAwE;AAC3D,QAAA,kBAAkB,GAC3B,iJAAiJ,CAAC;AAEtJ,qDAAqD;AACxC,QAAA,gBAAgB,GAAW,mCAAmC,CAAC;AAE5E,sEAAsE;AACtE,SAAS,IAAI,CAAC,CAAS;IACnB,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC1D,CAAC;AAED;;;GAGG;AACH,SAAgB,qBAAqB;IACjC,MAAM,OAAO,GAAwB,IAAA,uBAAc,GAAE,CAAC;IACtD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,IAAI,SA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C;QACxD,MAAM,IAAI,KAAK,CACX,wEAAwE;cACtE,YAAY,0BAAkB,MAAM,wBAAgB,GAAG,CAC5D,CAAC;IACN,CAAC;IACD,MAAM,IAAI,GAAW,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,GAAG,0BAAkB,CAAC,MAAM,CAAC,CAAC;IAC7E,MAAM,IAAI,GAAW,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5C,OAAO,GAAG,IAAI,OAAO,qBAAqB,EAAE,OAAO,IAAI,EAAE,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IronBee — Config TUI: write core
|
|
3
|
+
*
|
|
4
|
+
* Layer-scoped set / unset that write the targeted config file ONLY (no
|
|
5
|
+
* console output, no prompts, no artifact rerender). The shell batches all
|
|
6
|
+
* edits and re-renders client artifacts once on exit (see
|
|
7
|
+
* `shell/rerender.ts`) — never mid-session, so the full-screen UI is never
|
|
8
|
+
* corrupted by `client.install` stdout.
|
|
9
|
+
*
|
|
10
|
+
* Depends only on the public `lib/` surface, never on the `commands/config.ts`
|
|
11
|
+
* command layer.
|
|
12
|
+
*/
|
|
13
|
+
/** Whether changing this key requires re-rendering installed client artifacts. */
|
|
14
|
+
export declare function affectsArtifacts(key: string): boolean;
|
|
15
|
+
/** Result of a layer set. */
|
|
16
|
+
export interface LayerSetResult {
|
|
17
|
+
/** The coerced value that was written. */
|
|
18
|
+
value: unknown;
|
|
19
|
+
/** Whether this key triggers an artifact rerender on exit. */
|
|
20
|
+
artifactAffecting: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Set `key` to `rawValue` in the given layer file. `json` forces strict JSON
|
|
24
|
+
* parsing (otherwise heuristic: JSON-or-raw-string). Writes the file in place.
|
|
25
|
+
*/
|
|
26
|
+
export declare function setLayerValue(layerPath: string, key: string, rawValue: string, json: boolean): LayerSetResult;
|
|
27
|
+
/** Result of a layer unset. */
|
|
28
|
+
export interface LayerUnsetResult {
|
|
29
|
+
/** `true` when the key was present and removed; `false` when it was absent. */
|
|
30
|
+
removed: boolean;
|
|
31
|
+
/** Whether this key triggers an artifact rerender on exit. */
|
|
32
|
+
artifactAffecting: boolean;
|
|
33
|
+
}
|
|
34
|
+
/** Remove `key` from the given layer file. Idempotent — no-op when absent. */
|
|
35
|
+
export declare function unsetLayerValue(layerPath: string, key: string): LayerUnsetResult;
|
|
36
|
+
//# sourceMappingURL=edit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../src/tui/config/edit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,kFAAkF;AAClF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAErD;AA2BD,6BAA6B;AAC7B,MAAM,WAAW,cAAc;IAC3B,0CAA0C;IAC1C,KAAK,EAAE,OAAO,CAAC;IACf,8DAA8D;IAC9D,iBAAiB,EAAE,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,cAAc,CAM7G;AAED,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAC7B,+EAA+E;IAC/E,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,iBAAiB,EAAE,OAAO,CAAC;CAC9B;AAED,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAOhF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* IronBee — Config TUI: write core
|
|
4
|
+
*
|
|
5
|
+
* Layer-scoped set / unset that write the targeted config file ONLY (no
|
|
6
|
+
* console output, no prompts, no artifact rerender). The shell batches all
|
|
7
|
+
* edits and re-renders client artifacts once on exit (see
|
|
8
|
+
* `shell/rerender.ts`) — never mid-session, so the full-screen UI is never
|
|
9
|
+
* corrupted by `client.install` stdout.
|
|
10
|
+
*
|
|
11
|
+
* Depends only on the public `lib/` surface, never on the `commands/config.ts`
|
|
12
|
+
* command layer.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.affectsArtifacts = affectsArtifacts;
|
|
16
|
+
exports.setLayerValue = setLayerValue;
|
|
17
|
+
exports.unsetLayerValue = unsetLayerValue;
|
|
18
|
+
const fs_1 = require("fs");
|
|
19
|
+
const path_1 = require("path");
|
|
20
|
+
const schema_1 = require("./schema");
|
|
21
|
+
const value_1 = require("./value");
|
|
22
|
+
/** Whether changing this key requires re-rendering installed client artifacts. */
|
|
23
|
+
function affectsArtifacts(key) {
|
|
24
|
+
return schema_1.ARTIFACT_AFFECTING_TOP_KEYS.has((0, schema_1.topKey)(key));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Read a config layer file as a plain object. Missing / empty → `{}`. Throws
|
|
28
|
+
* on malformed JSON or a non-object top-level so the TUI surfaces the problem
|
|
29
|
+
* instead of silently clobbering a hand-edited-but-broken file.
|
|
30
|
+
*/
|
|
31
|
+
function readRawConfig(filePath) {
|
|
32
|
+
if (!(0, fs_1.existsSync)(filePath)) {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
const raw = (0, fs_1.readFileSync)(filePath, "utf-8");
|
|
36
|
+
if (raw.trim().length === 0) {
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
const parsed = JSON.parse(raw);
|
|
40
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
41
|
+
throw new Error(`Config at ${filePath} is not a JSON object.`);
|
|
42
|
+
}
|
|
43
|
+
return parsed;
|
|
44
|
+
}
|
|
45
|
+
function writeRawConfig(filePath, config) {
|
|
46
|
+
(0, fs_1.mkdirSync)((0, path_1.dirname)(filePath), { recursive: true });
|
|
47
|
+
(0, fs_1.writeFileSync)(filePath, JSON.stringify(config, null, 2) + "\n");
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Set `key` to `rawValue` in the given layer file. `json` forces strict JSON
|
|
51
|
+
* parsing (otherwise heuristic: JSON-or-raw-string). Writes the file in place.
|
|
52
|
+
*/
|
|
53
|
+
function setLayerValue(layerPath, key, rawValue, json) {
|
|
54
|
+
const value = (0, value_1.parseValue)(rawValue, json);
|
|
55
|
+
const config = readRawConfig(layerPath);
|
|
56
|
+
(0, value_1.setAtPath)(config, key, value);
|
|
57
|
+
writeRawConfig(layerPath, config);
|
|
58
|
+
return { value, artifactAffecting: affectsArtifacts(key) };
|
|
59
|
+
}
|
|
60
|
+
/** Remove `key` from the given layer file. Idempotent — no-op when absent. */
|
|
61
|
+
function unsetLayerValue(layerPath, key) {
|
|
62
|
+
const config = readRawConfig(layerPath);
|
|
63
|
+
const removed = (0, value_1.unsetAtPath)(config, key);
|
|
64
|
+
if (removed) {
|
|
65
|
+
writeRawConfig(layerPath, config);
|
|
66
|
+
}
|
|
67
|
+
return { removed, artifactAffecting: affectsArtifacts(key) };
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=edit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit.js","sourceRoot":"","sources":["../../../src/tui/config/edit.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAQH,4CAEC;AAuCD,sCAMC;AAWD,0CAOC;AAvED,2BAAwE;AACxE,+BAA+B;AAC/B,qCAA+D;AAC/D,mCAA6D;AAE7D,kFAAkF;AAClF,SAAgB,gBAAgB,CAAC,GAAW;IACxC,OAAO,oCAA2B,CAAC,GAAG,CAAC,IAAA,eAAM,EAAC,GAAG,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;;GAIG;AACH,SAA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E,iBAAiB,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;AAC/D,CAAC;AAUD,8EAA8E;AAC9E,SAAgB,eAAe,CAAC,SAAiB,EAAE,GAAW;IAC1D,MAAM,MAAM,GAA4B,aAAa,CAAC,SAAS,CAAC,CAAC;IACjE,MAAM,OAAO,GAAY,IAAA,mBAAW,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClD,IAAI,OAAO,EAAE,CAAC;QACV,cAAc,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IronBee — Config TUI: layer introspection
|
|
3
|
+
*
|
|
4
|
+
* For a given dotted key, resolves what each of the three config layers
|
|
5
|
+
* (global / project / local) holds, what the merged effective value is, which
|
|
6
|
+
* layer that effective value comes from, and whether a live env-var override
|
|
7
|
+
* shadows the file layers. This is the read model the detail pane renders.
|
|
8
|
+
*
|
|
9
|
+
* Reads only the already-public lib surface (`loadConfig`, `getConfigLayerPaths`,
|
|
10
|
+
* `findActiveEnvOverride`) so the TUI stays decoupled from the command layer.
|
|
11
|
+
*/
|
|
12
|
+
import { IronBeeConfig } from "../../lib/config";
|
|
13
|
+
/** Which source supplies the merged effective value for a key. */
|
|
14
|
+
export type EffectiveSource = "global" | "project" | "local" | "env" | "none";
|
|
15
|
+
/** A layer's recorded name. */
|
|
16
|
+
export type LayerName = "global" | "project" | "local";
|
|
17
|
+
/** One layer's raw on-disk value for a key. */
|
|
18
|
+
export interface LayerValue {
|
|
19
|
+
layer: LayerName;
|
|
20
|
+
/** Whether the key is an own-property at this layer (vs. absent). */
|
|
21
|
+
present: boolean;
|
|
22
|
+
/** The raw value at this layer (`undefined` when absent). */
|
|
23
|
+
value: unknown;
|
|
24
|
+
/** On-disk path of this layer's file (`undefined` for project/local with no projectDir). */
|
|
25
|
+
filePath: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
/** A live env-var override shadowing the file layers for a key. */
|
|
28
|
+
export interface EnvOverrideValue {
|
|
29
|
+
envVar: string;
|
|
30
|
+
value: unknown;
|
|
31
|
+
}
|
|
32
|
+
/** The fully-resolved read model for one key. */
|
|
33
|
+
export interface KeyIntrospection {
|
|
34
|
+
path: string;
|
|
35
|
+
/** global, project, local — always in that order. */
|
|
36
|
+
layers: LayerValue[];
|
|
37
|
+
/** Set when an env var currently overrides this key. */
|
|
38
|
+
envOverride: EnvOverrideValue | undefined;
|
|
39
|
+
/** Merged effective value (file layers + env), or `undefined` when unset everywhere. */
|
|
40
|
+
merged: unknown;
|
|
41
|
+
/** Which source the merged value comes from. */
|
|
42
|
+
effective: EffectiveSource;
|
|
43
|
+
}
|
|
44
|
+
/** Parsed layers + on-disk paths + merged config, read once and reused. */
|
|
45
|
+
export interface LoadedLayers {
|
|
46
|
+
globalPath: string;
|
|
47
|
+
projectPath: string | undefined;
|
|
48
|
+
localPath: string | undefined;
|
|
49
|
+
global: Record<string, unknown>;
|
|
50
|
+
project: Record<string, unknown>;
|
|
51
|
+
local: Record<string, unknown>;
|
|
52
|
+
merged: IronBeeConfig;
|
|
53
|
+
}
|
|
54
|
+
/** Reads all three layer files + the merged config in one pass. */
|
|
55
|
+
export declare function loadLayers(projectDir?: string): LoadedLayers;
|
|
56
|
+
/** Builds the read model for one key from already-loaded layers. */
|
|
57
|
+
export declare function introspectKey(path: string, layers: LoadedLayers): KeyIntrospection;
|
|
58
|
+
//# sourceMappingURL=introspect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"introspect.d.ts","sourceRoot":"","sources":["../../../src/tui/config/introspect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAIH,aAAa,EAEhB,MAAM,kBAAkB,CAAC;AAG1B,kEAAkE;AAClE,MAAM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YD,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,gBAAgB,CA8BlF"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* IronBee — Config TUI: layer introspection
|
|
4
|
+
*
|
|
5
|
+
* For a given dotted key, resolves what each of the three config layers
|
|
6
|
+
* (global / project / local) holds, what the merged effective value is, which
|
|
7
|
+
* layer that effective value comes from, and whether a live env-var override
|
|
8
|
+
* shadows the file layers. This is the read model the detail pane renders.
|
|
9
|
+
*
|
|
10
|
+
* Reads only the already-public lib surface (`loadConfig`, `getConfigLayerPaths`,
|
|
11
|
+
* `findActiveEnvOverride`) so the TUI stays decoupled from the command layer.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.loadLayers = loadLayers;
|
|
15
|
+
exports.introspectKey = introspectKey;
|
|
16
|
+
const fs_1 = require("fs");
|
|
17
|
+
const config_1 = require("../../lib/config");
|
|
18
|
+
const value_1 = require("./value");
|
|
19
|
+
function readLayerFile(filePath) {
|
|
20
|
+
if (filePath === undefined || !(0, fs_1.existsSync)(filePath)) {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
const raw = (0, fs_1.readFileSync)(filePath, "utf-8");
|
|
25
|
+
if (raw.trim().length === 0) {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
const parsed = JSON.parse(raw);
|
|
29
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
32
|
+
return parsed;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Reads all three layer files + the merged config in one pass. */
|
|
39
|
+
function loadLayers(projectDir) {
|
|
40
|
+
const paths = (0, config_1.getConfigLayerPaths)(projectDir);
|
|
41
|
+
return {
|
|
42
|
+
globalPath: paths.global,
|
|
43
|
+
projectPath: paths.project,
|
|
44
|
+
localPath: paths.local,
|
|
45
|
+
global: readLayerFile(paths.global),
|
|
46
|
+
project: readLayerFile(paths.project),
|
|
47
|
+
local: readLayerFile(paths.local),
|
|
48
|
+
merged: (0, config_1.loadConfig)(projectDir),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function resolveEnvOverride(path) {
|
|
52
|
+
const override = (0, config_1.findActiveEnvOverride)(path);
|
|
53
|
+
if (override === undefined) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
const raw = process.env[override.envVar] ?? "";
|
|
57
|
+
const value = override.coerce ? override.coerce(raw) : raw;
|
|
58
|
+
return { envVar: override.envVar, value };
|
|
59
|
+
}
|
|
60
|
+
/** Builds the read model for one key from already-loaded layers. */
|
|
61
|
+
function introspectKey(path, layers) {
|
|
62
|
+
const layerValues = [
|
|
63
|
+
{ layer: "global", present: (0, value_1.hasAtPath)(layers.global, path), value: (0, value_1.getAtPath)(layers.global, path), filePath: layers.globalPath },
|
|
64
|
+
{ layer: "project", present: (0, value_1.hasAtPath)(layers.project, path), value: (0, value_1.getAtPath)(layers.project, path), filePath: layers.projectPath },
|
|
65
|
+
{ layer: "local", present: (0, value_1.hasAtPath)(layers.local, path), value: (0, value_1.getAtPath)(layers.local, path), filePath: layers.localPath },
|
|
66
|
+
];
|
|
67
|
+
const envOverride = resolveEnvOverride(path);
|
|
68
|
+
const merged = (0, value_1.getAtPath)(layers.merged, path);
|
|
69
|
+
let effective;
|
|
70
|
+
if (envOverride !== undefined) {
|
|
71
|
+
effective = "env";
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// High → low precedence: local > project > global.
|
|
75
|
+
const local = layerValues[2];
|
|
76
|
+
const project = layerValues[1];
|
|
77
|
+
const global = layerValues[0];
|
|
78
|
+
if (local.present) {
|
|
79
|
+
effective = "local";
|
|
80
|
+
}
|
|
81
|
+
else if (project.present) {
|
|
82
|
+
effective = "project";
|
|
83
|
+
}
|
|
84
|
+
else if (global.present) {
|
|
85
|
+
effective = "global";
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
effective = "none";
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return { path, layers: layerValues, envOverride, merged, effective };
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=introspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"introspect.js","sourceRoot":"","sources":["../../../src/tui/config/introspect.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AA+EH,gCAYC;AAaD,sCA8BC;AApID,2BAA8C;AAC9C,6CAM0B;AAC1B,mCAA+C;AAiD/C,SAAS,aAAa,CAAC,QAA4B;IAC/C,IAAI,QAAQ,KAAK,SAAS,IAAI,CAAC,IAAA,eAAU,EAAC,QAAQ,CAAC,EAAE,CAAC;QAClD,OAAO,EAAE,CAAC;IACd,CAAC;IACD,IAAI,CAAC;QACD,MAAM,GAAG,GAAW,IAAA,iBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACpD,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,EAAE,CAAC;QACd,CAAC;QACD,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACzE,OAAO,EAAE,CAAC;QACd,CAAC;QACD,OAAO,MAAiC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,EAAE,CAAC;IACd,CAAC;AACL,CAAC;AAED,mEAAmE;AACnE,SAAgB,UAAU,CAAC,UAAmB;IAC1C,MAAM,KAAK,GACP,IAA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,MAAM,EAAE,SAAS,EAAE,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IronBee — Config TUI: canonical config-key schema
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for every config key the TUI knows about. Each
|
|
5
|
+
* entry carries the metadata the TUI needs to render and edit a key:
|
|
6
|
+
* - `path` — dotted key (e.g. `collector.url`). The list/docs
|
|
7
|
+
* group is DERIVED from its first segment ({@link groupOf}).
|
|
8
|
+
* - `type` — value shape (drives validation hints)
|
|
9
|
+
* - `editor` — which edit affordance the TUI offers
|
|
10
|
+
* - `description` — concise one-paragraph explanation (shown in detail)
|
|
11
|
+
* - `def` — human-readable default (display only)
|
|
12
|
+
* - `enumValues?` — allowed values for `enum` editor
|
|
13
|
+
* - `artifactAffecting` — whether changing it requires re-rendering installed
|
|
14
|
+
* client artifacts (hooks / MCP / skill-rule md /
|
|
15
|
+
* permissions). Mirrors `ARTIFACT_AFFECTING_TOP_KEYS`
|
|
16
|
+
* in `src/commands/config.ts` — kept here so the TUI
|
|
17
|
+
* stays self-contained (no import from the command
|
|
18
|
+
* layer). A consistency test asserts the two agree.
|
|
19
|
+
*
|
|
20
|
+
* This module has ZERO runtime dependencies on the rest of the codebase so it
|
|
21
|
+
* can be unit-tested in isolation and imported from anywhere.
|
|
22
|
+
*/
|
|
23
|
+
/** Coarse value shape for a config key. */
|
|
24
|
+
export type ConfigValueType = "boolean" | "number" | "string" | "string-array" | "json";
|
|
25
|
+
/** Which edit affordance the TUI offers for a key. */
|
|
26
|
+
export type ConfigEditorKind = "toggle" | "number" | "text" | "enum" | "string-list" | "json";
|
|
27
|
+
/** One config key's metadata. */
|
|
28
|
+
export interface ConfigSchemaEntry {
|
|
29
|
+
path: string;
|
|
30
|
+
type: ConfigValueType;
|
|
31
|
+
editor: ConfigEditorKind;
|
|
32
|
+
description: string;
|
|
33
|
+
def: string;
|
|
34
|
+
enumValues?: string[];
|
|
35
|
+
artifactAffecting: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Top-level keys whose change requires re-rendering installed client
|
|
39
|
+
* artifacts. Mirrors `ARTIFACT_AFFECTING_TOP_KEYS` in `src/commands/config.ts`.
|
|
40
|
+
* Duplicated (not imported) to keep this module decoupled from the command
|
|
41
|
+
* layer; `tests/unit/tui/config-schema.test.ts` asserts every schema entry's
|
|
42
|
+
* `artifactAffecting` flag matches membership here.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ARTIFACT_AFFECTING_TOP_KEYS: ReadonlySet<string>;
|
|
45
|
+
/**
|
|
46
|
+
* Display order of groups in the list pane. Group MEMBERSHIP is derived from
|
|
47
|
+
* each key's first dot-segment ({@link groupOf}) — this list only controls the
|
|
48
|
+
* ORDER they appear in (and which trailing groups are "known"). Unknown groups
|
|
49
|
+
* (a future top segment not listed here) sort after these, alphabetically.
|
|
50
|
+
*/
|
|
51
|
+
export declare const GROUP_ORDER: readonly string[];
|
|
52
|
+
/** Human-readable section headings, keyed by group (= first path segment). */
|
|
53
|
+
export declare const GROUP_TITLES: Record<string, string>;
|
|
54
|
+
/** Top-level segment of a dotted path. */
|
|
55
|
+
export declare function topKey(dotPath: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* The group a key belongs to — its first dot-segment, or `"general"` for
|
|
58
|
+
* top-level (dot-less) keys like `maxRetries` / `ignoredVerifyPatterns`. This
|
|
59
|
+
* is the single, data-driven grouping used by the TUI list and the docs table;
|
|
60
|
+
* there is no hand-maintained group field to drift.
|
|
61
|
+
*/
|
|
62
|
+
export declare function groupOf(path: string): string;
|
|
63
|
+
/** Display title for a group, falling back to the raw group name. */
|
|
64
|
+
export declare function groupTitle(group: string): string;
|
|
65
|
+
/** Sort rank for a group per {@link GROUP_ORDER}; unknown groups sort last. */
|
|
66
|
+
export declare function groupRank(group: string): number;
|
|
67
|
+
/**
|
|
68
|
+
* The canonical config-key registry. Adding a config key to IronBee should be
|
|
69
|
+
* accompanied by an entry here — the schema test fails loudly otherwise, which
|
|
70
|
+
* is the canonical-source guarantee.
|
|
71
|
+
*/
|
|
72
|
+
export declare const CONFIG_SCHEMA: ConfigSchemaEntry[];
|
|
73
|
+
/** Returns the schema entry for a dotted path, or undefined when unknown. */
|
|
74
|
+
export declare function findSchemaEntry(path: string): ConfigSchemaEntry | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Returns all schema entries sorted by group display order (per {@link groupRank},
|
|
77
|
+
* group derived via {@link groupOf}) then path. This is the canonical ordering
|
|
78
|
+
* the TUI list pane and the docs table render.
|
|
79
|
+
*/
|
|
80
|
+
export declare function orderedEntries(): ConfigSchemaEntry[];
|
|
81
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/tui/config/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,2CAA2C;AAC3C,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,cAAc,GAAG,MAAM,CAAC;AAExF,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,aAAa,GAAG,MAAM,CAAC;AAE9F,iCAAiC;AACjC,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,gBAAgB,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAW1D,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,E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