@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.
Files changed (138) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +3 -2
  3. package/dist/assets/banner.txt +1 -1
  4. package/dist/clients/claude/hooks/session-status.d.ts.map +1 -1
  5. package/dist/clients/claude/hooks/session-status.js +8 -2
  6. package/dist/clients/claude/hooks/session-status.js.map +1 -1
  7. package/dist/clients/claude/index.d.ts.map +1 -1
  8. package/dist/clients/claude/index.js +5 -0
  9. package/dist/clients/claude/index.js.map +1 -1
  10. package/dist/clients/cursor/index.d.ts.map +1 -1
  11. package/dist/clients/cursor/index.js +6 -0
  12. package/dist/clients/cursor/index.js.map +1 -1
  13. package/dist/clients/registry.d.ts +8 -9
  14. package/dist/clients/registry.d.ts.map +1 -1
  15. package/dist/clients/registry.js +13 -11
  16. package/dist/clients/registry.js.map +1 -1
  17. package/dist/commands/install.d.ts.map +1 -1
  18. package/dist/commands/install.js +4 -5
  19. package/dist/commands/install.js.map +1 -1
  20. package/dist/commands/register.d.ts +0 -1
  21. package/dist/commands/register.d.ts.map +1 -1
  22. package/dist/commands/register.js +7 -27
  23. package/dist/commands/register.js.map +1 -1
  24. package/dist/commands/uninstall.d.ts +2 -3
  25. package/dist/commands/uninstall.d.ts.map +1 -1
  26. package/dist/commands/uninstall.js +3 -4
  27. package/dist/commands/uninstall.js.map +1 -1
  28. package/dist/commands/unregister.d.ts +0 -1
  29. package/dist/commands/unregister.d.ts.map +1 -1
  30. package/dist/commands/unregister.js +3 -24
  31. package/dist/commands/unregister.js.map +1 -1
  32. package/dist/index.js +33 -15
  33. package/dist/index.js.map +1 -1
  34. package/dist/lib/fs-prune.d.ts +20 -0
  35. package/dist/lib/fs-prune.d.ts.map +1 -0
  36. package/dist/lib/fs-prune.js +72 -0
  37. package/dist/lib/fs-prune.js.map +1 -0
  38. package/dist/lib/projects-registry.d.ts +6 -13
  39. package/dist/lib/projects-registry.d.ts.map +1 -1
  40. package/dist/lib/projects-registry.js +11 -46
  41. package/dist/lib/projects-registry.js.map +1 -1
  42. package/dist/tui/command.d.ts +18 -0
  43. package/dist/tui/command.d.ts.map +1 -0
  44. package/dist/tui/command.js +87 -0
  45. package/dist/tui/command.js.map +1 -0
  46. package/dist/tui/config/area.d.ts +6 -0
  47. package/dist/tui/config/area.d.ts.map +1 -0
  48. package/dist/tui/config/area.js +16 -0
  49. package/dist/tui/config/area.js.map +1 -0
  50. package/dist/tui/config/docs.d.ts +28 -0
  51. package/dist/tui/config/docs.d.ts.map +1 -0
  52. package/dist/tui/config/docs.js +68 -0
  53. package/dist/tui/config/docs.js.map +1 -0
  54. package/dist/tui/config/edit.d.ts +36 -0
  55. package/dist/tui/config/edit.d.ts.map +1 -0
  56. package/dist/tui/config/edit.js +69 -0
  57. package/dist/tui/config/edit.js.map +1 -0
  58. package/dist/tui/config/introspect.d.ts +58 -0
  59. package/dist/tui/config/introspect.d.ts.map +1 -0
  60. package/dist/tui/config/introspect.js +93 -0
  61. package/dist/tui/config/introspect.js.map +1 -0
  62. package/dist/tui/config/schema.d.ts +81 -0
  63. package/dist/tui/config/schema.d.ts.map +1 -0
  64. package/dist/tui/config/schema.js +534 -0
  65. package/dist/tui/config/schema.js.map +1 -0
  66. package/dist/tui/config/tree.d.ts +39 -0
  67. package/dist/tui/config/tree.d.ts.map +1 -0
  68. package/dist/tui/config/tree.js +59 -0
  69. package/dist/tui/config/tree.js.map +1 -0
  70. package/dist/tui/config/value.d.ts +75 -0
  71. package/dist/tui/config/value.d.ts.map +1 -0
  72. package/dist/tui/config/value.js +228 -0
  73. package/dist/tui/config/value.js.map +1 -0
  74. package/dist/tui/config/view.d.ts +13 -0
  75. package/dist/tui/config/view.d.ts.map +1 -0
  76. package/dist/tui/config/view.js +423 -0
  77. package/dist/tui/config/view.js.map +1 -0
  78. package/dist/tui/import/area.d.ts +11 -0
  79. package/dist/tui/import/area.d.ts.map +1 -0
  80. package/dist/tui/import/area.js +202 -0
  81. package/dist/tui/import/area.js.map +1 -0
  82. package/dist/tui/index.d.ts +9 -0
  83. package/dist/tui/index.d.ts.map +1 -0
  84. package/dist/tui/index.js +14 -0
  85. package/dist/tui/index.js.map +1 -0
  86. package/dist/tui/platforms/area.d.ts +12 -0
  87. package/dist/tui/platforms/area.d.ts.map +1 -0
  88. package/dist/tui/platforms/area.js +228 -0
  89. package/dist/tui/platforms/area.js.map +1 -0
  90. package/dist/tui/projects/area.d.ts +26 -0
  91. package/dist/tui/projects/area.d.ts.map +1 -0
  92. package/dist/tui/projects/area.js +588 -0
  93. package/dist/tui/projects/area.js.map +1 -0
  94. package/dist/tui/queue/area.d.ts +11 -0
  95. package/dist/tui/queue/area.d.ts.map +1 -0
  96. package/dist/tui/queue/area.js +338 -0
  97. package/dist/tui/queue/area.js.map +1 -0
  98. package/dist/tui/queue/read.d.ts +49 -0
  99. package/dist/tui/queue/read.d.ts.map +1 -0
  100. package/dist/tui/queue/read.js +261 -0
  101. package/dist/tui/queue/read.js.map +1 -0
  102. package/dist/tui/sessions/area.d.ts +10 -0
  103. package/dist/tui/sessions/area.d.ts.map +1 -0
  104. package/dist/tui/sessions/area.js +266 -0
  105. package/dist/tui/sessions/area.js.map +1 -0
  106. package/dist/tui/sessions/read.d.ts +79 -0
  107. package/dist/tui/sessions/read.d.ts.map +1 -0
  108. package/dist/tui/sessions/read.js +202 -0
  109. package/dist/tui/sessions/read.js.map +1 -0
  110. package/dist/tui/shell/area.d.ts +47 -0
  111. package/dist/tui/shell/area.d.ts.map +1 -0
  112. package/dist/tui/shell/area.js +13 -0
  113. package/dist/tui/shell/area.js.map +1 -0
  114. package/dist/tui/shell/frame.d.ts +23 -0
  115. package/dist/tui/shell/frame.d.ts.map +1 -0
  116. package/dist/tui/shell/frame.js +91 -0
  117. package/dist/tui/shell/frame.js.map +1 -0
  118. package/dist/tui/shell/registry.d.ts +11 -0
  119. package/dist/tui/shell/registry.d.ts.map +1 -0
  120. package/dist/tui/shell/registry.js +29 -0
  121. package/dist/tui/shell/registry.js.map +1 -0
  122. package/dist/tui/shell/rerender.d.ts +16 -0
  123. package/dist/tui/shell/rerender.d.ts.map +1 -0
  124. package/dist/tui/shell/rerender.js +34 -0
  125. package/dist/tui/shell/rerender.js.map +1 -0
  126. package/dist/tui/shell/session.d.ts +75 -0
  127. package/dist/tui/shell/session.d.ts.map +1 -0
  128. package/dist/tui/shell/session.js +333 -0
  129. package/dist/tui/shell/session.js.map +1 -0
  130. package/dist/tui/shell/shell.d.ts +16 -0
  131. package/dist/tui/shell/shell.d.ts.map +1 -0
  132. package/dist/tui/shell/shell.js +213 -0
  133. package/dist/tui/shell/shell.js.map +1 -0
  134. package/dist/tui/shell/util.d.ts +18 -0
  135. package/dist/tui/shell/util.d.ts.map +1 -0
  136. package/dist/tui/shell/util.js +31 -0
  137. package/dist/tui/shell/util.js.map +1 -0
  138. package/package.json +3 -1
@@ -0,0 +1,75 @@
1
+ /**
2
+ * IronBee — Config TUI: pure value/path helpers
3
+ *
4
+ * Dotted-path get/set/unset, value coercion, and display formatting. These
5
+ * intentionally mirror the private helpers in `src/commands/config.ts` so the
6
+ * TUI stays a self-contained, separately-testable unit with no import from the
7
+ * command layer. Pure functions — no I/O, no side effects.
8
+ */
9
+ import { ConfigEditorKind } from "./schema";
10
+ /** Walk a dotted path; returns `undefined` when any segment is missing. */
11
+ export declare function getAtPath(obj: Record<string, unknown>, dotPath: string): unknown;
12
+ /**
13
+ * True when the dotted path is an own-property present in `obj` (so a leaf set
14
+ * to `null` / `false` / `0` / `""` counts as present, but a missing key does
15
+ * not). Distinguishes "explicitly set" from "absent" for per-layer display.
16
+ */
17
+ export declare function hasAtPath(obj: Record<string, unknown>, dotPath: string): boolean;
18
+ /**
19
+ * Walk a dotted path, creating intermediate objects as needed, and set the
20
+ * leaf. Non-object intermediates (array / primitive / null) get overwritten
21
+ * with `{}` — matches the user's intent ("I want this nested key").
22
+ */
23
+ export declare function setAtPath(obj: Record<string, unknown>, dotPath: string, value: unknown): void;
24
+ /**
25
+ * Walk a dotted path and delete the leaf. Returns `true` when something was
26
+ * removed, `false` when the path didn't exist (idempotent).
27
+ *
28
+ * **Prunes now-empty ancestor objects.** This matters for the cycle blocks:
29
+ * clearing `node.enable` (when it's the only key under `node`) must leave the
30
+ * whole `node` block ABSENT, not an empty `{ "node": {} }`. A present-but-empty
31
+ * cycle block reads as "enabled with code defaults" in `getCyclePatterns`, so
32
+ * without pruning, "clear the enable flag" on an opt-in cycle would
33
+ * paradoxically leave it ENABLED. Pruning makes unset converge to the
34
+ * block-absent (opt-in-off) state.
35
+ */
36
+ export declare function unsetAtPath(obj: Record<string, unknown>, dotPath: string): boolean;
37
+ /**
38
+ * Coerce a raw input string into a typed JSON value.
39
+ *
40
+ * Heuristic mode (default): try `JSON.parse`, fall back to the raw string so
41
+ * URLs / paths pass through unquoted. Strict mode (`json=true`): require valid
42
+ * JSON, surfacing the parse error.
43
+ */
44
+ export declare function parseValue(input: string, json: boolean): unknown;
45
+ /** Multi-line pretty form for the detail pane. `(unset)` for undefined. */
46
+ export declare function formatValue(value: unknown): string;
47
+ /**
48
+ * Single-line compact form for the list pane. Strings pass through; everything
49
+ * else is compact JSON. Truncated to `max` chars with an ellipsis.
50
+ */
51
+ export declare function formatValueShort(value: unknown, max: number): string;
52
+ /** Result of normalizing an edit-prompt input into a {@link parseValue} call. */
53
+ export interface EditorInput {
54
+ /** String to hand to parseValue. */
55
+ raw: string;
56
+ /** Whether parseValue should use strict JSON mode. */
57
+ json: boolean;
58
+ }
59
+ /**
60
+ * Prefill text for the edit prompt, given the key's editor kind + current value.
61
+ * `string-list` shows the array comma-joined (the friendly input form);
62
+ * everything else shows the string as-is or compact JSON.
63
+ */
64
+ export declare function editorPrefill(editor: ConfigEditorKind, value: unknown, present: boolean): string;
65
+ /** One-line hint describing the accepted input format for an editor kind. */
66
+ export declare function editorHint(editor: ConfigEditorKind, enumValues?: string[]): string;
67
+ /**
68
+ * Normalize a raw edit-prompt string into a {@link parseValue} call shaped by
69
+ * the editor kind. For `string-list`, accept BOTH a comma-separated list
70
+ * (`*.ts, *.css`) and a JSON array (`["*.ts","*.css"]`), and an empty input
71
+ * clears to `[]`. Other editors fall through to the heuristic parse (JSON or
72
+ * raw string) so URLs / numbers / booleans coerce as before.
73
+ */
74
+ export declare function parseEditorInput(editor: ConfigEditorKind, input: string): EditorInput;
75
+ //# sourceMappingURL=value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../src/tui/config/value.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAahF;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAgBhF;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAe7F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CA+BlF;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAahE;AAED,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQlD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAcpE;AAID,iFAAiF;AACjF,MAAM,WAAW,WAAW;IACxB,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,IAAI,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAQhG;AAED,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAelF;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAarF"}
@@ -0,0 +1,228 @@
1
+ "use strict";
2
+ /**
3
+ * IronBee — Config TUI: pure value/path helpers
4
+ *
5
+ * Dotted-path get/set/unset, value coercion, and display formatting. These
6
+ * intentionally mirror the private helpers in `src/commands/config.ts` so the
7
+ * TUI stays a self-contained, separately-testable unit with no import from the
8
+ * command layer. Pure functions — no I/O, no side effects.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.getAtPath = getAtPath;
12
+ exports.hasAtPath = hasAtPath;
13
+ exports.setAtPath = setAtPath;
14
+ exports.unsetAtPath = unsetAtPath;
15
+ exports.parseValue = parseValue;
16
+ exports.formatValue = formatValue;
17
+ exports.formatValueShort = formatValueShort;
18
+ exports.editorPrefill = editorPrefill;
19
+ exports.editorHint = editorHint;
20
+ exports.parseEditorInput = parseEditorInput;
21
+ /** Walk a dotted path; returns `undefined` when any segment is missing. */
22
+ function getAtPath(obj, dotPath) {
23
+ if (dotPath.length === 0) {
24
+ return obj;
25
+ }
26
+ const parts = dotPath.split(".");
27
+ let cur = obj;
28
+ for (const part of parts) {
29
+ if (cur === null || cur === undefined || typeof cur !== "object" || Array.isArray(cur)) {
30
+ return undefined;
31
+ }
32
+ cur = cur[part];
33
+ }
34
+ return cur;
35
+ }
36
+ /**
37
+ * True when the dotted path is an own-property present in `obj` (so a leaf set
38
+ * to `null` / `false` / `0` / `""` counts as present, but a missing key does
39
+ * not). Distinguishes "explicitly set" from "absent" for per-layer display.
40
+ */
41
+ function hasAtPath(obj, dotPath) {
42
+ if (dotPath.length === 0) {
43
+ return true;
44
+ }
45
+ const parts = dotPath.split(".");
46
+ let cur = obj;
47
+ for (let i = 0; i < parts.length - 1; i++) {
48
+ if (cur === null || cur === undefined || typeof cur !== "object" || Array.isArray(cur)) {
49
+ return false;
50
+ }
51
+ cur = cur[parts[i]];
52
+ }
53
+ if (cur === null || cur === undefined || typeof cur !== "object" || Array.isArray(cur)) {
54
+ return false;
55
+ }
56
+ return Object.prototype.hasOwnProperty.call(cur, parts[parts.length - 1]);
57
+ }
58
+ /**
59
+ * Walk a dotted path, creating intermediate objects as needed, and set the
60
+ * leaf. Non-object intermediates (array / primitive / null) get overwritten
61
+ * with `{}` — matches the user's intent ("I want this nested key").
62
+ */
63
+ function setAtPath(obj, dotPath, value) {
64
+ if (dotPath.length === 0) {
65
+ throw new Error("Cannot set the root config — pass a dotted key (e.g. `collector.url`).");
66
+ }
67
+ const parts = dotPath.split(".");
68
+ let cur = obj;
69
+ for (let i = 0; i < parts.length - 1; i++) {
70
+ const k = parts[i];
71
+ const next = cur[k];
72
+ if (next === null || next === undefined || typeof next !== "object" || Array.isArray(next)) {
73
+ cur[k] = {};
74
+ }
75
+ cur = cur[k];
76
+ }
77
+ cur[parts[parts.length - 1]] = value;
78
+ }
79
+ /**
80
+ * Walk a dotted path and delete the leaf. Returns `true` when something was
81
+ * removed, `false` when the path didn't exist (idempotent).
82
+ *
83
+ * **Prunes now-empty ancestor objects.** This matters for the cycle blocks:
84
+ * clearing `node.enable` (when it's the only key under `node`) must leave the
85
+ * whole `node` block ABSENT, not an empty `{ "node": {} }`. A present-but-empty
86
+ * cycle block reads as "enabled with code defaults" in `getCyclePatterns`, so
87
+ * without pruning, "clear the enable flag" on an opt-in cycle would
88
+ * paradoxically leave it ENABLED. Pruning makes unset converge to the
89
+ * block-absent (opt-in-off) state.
90
+ */
91
+ function unsetAtPath(obj, dotPath) {
92
+ if (dotPath.length === 0) {
93
+ return false;
94
+ }
95
+ const parts = dotPath.split(".");
96
+ // Record the container chain so empties can be pruned bottom-up.
97
+ const chain = [obj];
98
+ let cur = obj;
99
+ for (let i = 0; i < parts.length - 1; i++) {
100
+ const k = parts[i];
101
+ const next = cur[k];
102
+ if (next === null || next === undefined || typeof next !== "object" || Array.isArray(next)) {
103
+ return false;
104
+ }
105
+ cur = next;
106
+ chain.push(cur);
107
+ }
108
+ const last = parts[parts.length - 1];
109
+ if (!Object.prototype.hasOwnProperty.call(cur, last)) {
110
+ return false;
111
+ }
112
+ delete cur[last];
113
+ // Prune empty parents from the deepest container up to (not including) root.
114
+ for (let i = chain.length - 1; i >= 1; i--) {
115
+ if (Object.keys(chain[i]).length > 0) {
116
+ break;
117
+ }
118
+ delete chain[i - 1][parts[i - 1]];
119
+ }
120
+ return true;
121
+ }
122
+ /**
123
+ * Coerce a raw input string into a typed JSON value.
124
+ *
125
+ * Heuristic mode (default): try `JSON.parse`, fall back to the raw string so
126
+ * URLs / paths pass through unquoted. Strict mode (`json=true`): require valid
127
+ * JSON, surfacing the parse error.
128
+ */
129
+ function parseValue(input, json) {
130
+ if (json) {
131
+ try {
132
+ return JSON.parse(input);
133
+ }
134
+ catch (e) {
135
+ throw new Error(`value is not valid JSON: ${e instanceof Error ? e.message : String(e)}`);
136
+ }
137
+ }
138
+ try {
139
+ return JSON.parse(input);
140
+ }
141
+ catch {
142
+ return input;
143
+ }
144
+ }
145
+ /** Multi-line pretty form for the detail pane. `(unset)` for undefined. */
146
+ function formatValue(value) {
147
+ if (value === undefined) {
148
+ return "(unset)";
149
+ }
150
+ if (typeof value === "string") {
151
+ return value;
152
+ }
153
+ return JSON.stringify(value, null, 2);
154
+ }
155
+ /**
156
+ * Single-line compact form for the list pane. Strings pass through; everything
157
+ * else is compact JSON. Truncated to `max` chars with an ellipsis.
158
+ */
159
+ function formatValueShort(value, max) {
160
+ let s;
161
+ if (value === undefined) {
162
+ s = "(unset)";
163
+ }
164
+ else if (typeof value === "string") {
165
+ s = value;
166
+ }
167
+ else {
168
+ s = JSON.stringify(value);
169
+ }
170
+ s = s.replace(/\s+/g, " ").trim();
171
+ if (s.length > max) {
172
+ return s.slice(0, Math.max(0, max - 1)) + "…";
173
+ }
174
+ return s;
175
+ }
176
+ /**
177
+ * Prefill text for the edit prompt, given the key's editor kind + current value.
178
+ * `string-list` shows the array comma-joined (the friendly input form);
179
+ * everything else shows the string as-is or compact JSON.
180
+ */
181
+ function editorPrefill(editor, value, present) {
182
+ if (!present) {
183
+ return "";
184
+ }
185
+ if (editor === "string-list" && Array.isArray(value)) {
186
+ return value.map((v) => String(v)).join(", ");
187
+ }
188
+ return typeof value === "string" ? value : JSON.stringify(value);
189
+ }
190
+ /** One-line hint describing the accepted input format for an editor kind. */
191
+ function editorHint(editor, enumValues) {
192
+ switch (editor) {
193
+ case "string-list":
194
+ return "comma-separated or a JSON array — e.g. *.ts, src/**/*.tsx";
195
+ case "toggle":
196
+ return "true / false";
197
+ case "number":
198
+ return "a number";
199
+ case "enum":
200
+ return enumValues !== undefined && enumValues.length > 0 ? `one of: ${enumValues.join(" / ")}` : "a value";
201
+ case "json":
202
+ return "a JSON value";
203
+ default:
204
+ return "text";
205
+ }
206
+ }
207
+ /**
208
+ * Normalize a raw edit-prompt string into a {@link parseValue} call shaped by
209
+ * the editor kind. For `string-list`, accept BOTH a comma-separated list
210
+ * (`*.ts, *.css`) and a JSON array (`["*.ts","*.css"]`), and an empty input
211
+ * clears to `[]`. Other editors fall through to the heuristic parse (JSON or
212
+ * raw string) so URLs / numbers / booleans coerce as before.
213
+ */
214
+ function parseEditorInput(editor, input) {
215
+ if (editor === "string-list") {
216
+ const t = input.trim();
217
+ if (t.length === 0) {
218
+ return { raw: "[]", json: true };
219
+ }
220
+ if (t.startsWith("[")) {
221
+ return { raw: t, json: true };
222
+ }
223
+ const parts = t.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
224
+ return { raw: JSON.stringify(parts), json: true };
225
+ }
226
+ return { raw: input, json: false };
227
+ }
228
+ //# sourceMappingURL=value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value.js","sourceRoot":"","sources":["../../../src/tui/config/value.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAKH,8BAaC;AAOD,8BAgBC;AAOD,8BAeC;AAcD,kCA+BC;AASD,gCAaC;AAGD,kCAQC;AAMD,4CAcC;AAiBD,sCAQC;AAGD,gCAeC;AASD,4CAaC;AA9ND,2EAA2E;AAC3E,SAAgB,SAAS,CAAC,GAA4B,EAAE,OAAe;IACnE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,GAAG,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAa,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,IAAI,GAAG,GAAY,GAAG,CAAC;IACvB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACrF,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,GAAG,GAAI,GAA+B,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,SAAgB,SAAS,CAAC,GAA4B,EAAE,OAAe;IACnE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,KAAK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,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAS,EAAW,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACvH,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACtD,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACvC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * IronBee — Config area view (mounted inside the TUI shell)
3
+ *
4
+ * Collapsible, segment-grouped key tree on the left; per-key detail (all three
5
+ * layers + env + merged effective) or a group summary on the right. Edit / unset
6
+ * any layer in place. Mounts into the shell's content region; it does NOT own
7
+ * the screen, the exit flow, or the artifact rerender — artifact-affecting edits
8
+ * call `ctx.session.markRerenderNeeded()` and the shell re-renders once on exit.
9
+ */
10
+ import { AreaContext, AreaHandle } from "../shell/area";
11
+ /** Mount the config browser into `ctx.container`. Returns an unmount handle. */
12
+ export declare function mountConfigView(ctx: AreaContext): AreaHandle;
13
+ //# sourceMappingURL=view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/tui/config/view.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAgCxD,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,UAAU,CAyX5D"}