@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,47 @@
1
+ /**
2
+ * IronBee — TUI shell: area contract
3
+ *
4
+ * An "area" is one top-level section of the TUI (Configuration, Platforms,
5
+ * Projects, …) — the rough analog of a first-level CLI command group. The
6
+ * shell hosts exactly one area at a time inside a shared content region and
7
+ * provides each area a context to drive navigation and shared modals.
8
+ *
9
+ * Adding an area = implement {@link TuiArea} + append it to `shell/registry.ts`.
10
+ */
11
+ import * as blessed from "blessed";
12
+ import { TuiSession } from "./session";
13
+ /** Services + region the shell hands an area when mounting it. */
14
+ export interface AreaContext {
15
+ /** The single shared blessed screen. */
16
+ screen: blessed.Widgets.Screen;
17
+ /** The content region the area renders its widgets into (between the frame bars). */
18
+ container: blessed.Widgets.BoxElement;
19
+ /** Shared session — projectDir, exit-rerender flag, modal helpers. */
20
+ session: TuiSession;
21
+ /** Unmount this area and return to the home menu. */
22
+ back(): void;
23
+ /** Tear down the whole app and exit. */
24
+ quit(): void;
25
+ /** Set the bottom status/help bar text (blessed tags allowed). */
26
+ setStatus(help: string): void;
27
+ /** Switch the active project (updates `session.projectDir` + breadcrumb). Other
28
+ * project-scoped areas read it at their next mount. */
29
+ setActiveProject(dir: string): void;
30
+ }
31
+ /** Returned by {@link TuiArea.mount}; lets the shell tear the area down. */
32
+ export interface AreaHandle {
33
+ /** Destroy the area's widgets and unbind its keys. */
34
+ unmount(): void;
35
+ }
36
+ /** One top-level TUI section. */
37
+ export interface TuiArea {
38
+ /** Stable id, used for deep-linking (`ironbee tui <id>`). */
39
+ id: string;
40
+ /** Title shown in the breadcrumb and home menu. */
41
+ title: string;
42
+ /** One-line description shown in the home menu. */
43
+ summary: string;
44
+ /** Build the area's UI into `ctx.container`, wire keys, focus. */
45
+ mount(ctx: AreaContext): AreaHandle;
46
+ }
47
+ //# sourceMappingURL=area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area.d.ts","sourceRoot":"","sources":["../../../src/tui/shell/area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,kEAAkE;AAClE,MAAM,WAAW,WAAW;IACxB,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;IAC/B,qFAAqF;IACrF,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;IACtC,sEAAsE;IACtE,OAAO,EAAE,UAAU,CAAC;IACpB,qDAAqD;IACrD,IAAI,IAAI,IAAI,CAAC;IACb,wCAAwC;IACxC,IAAI,IAAI,IAAI,CAAC;IACb,kEAAkE;IAClE,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;4DACwD;IACxD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED,4EAA4E;AAC5E,MAAM,WAAW,UAAU;IACvB,sDAAsD;IACtD,OAAO,IAAI,IAAI,CAAC;CACnB;AAED,iCAAiC;AACjC,MAAM,WAAW,OAAO;IACpB,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,KAAK,CAAC,GAAG,EAAE,WAAW,GAAG,UAAU,CAAC;CACvC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * IronBee — TUI shell: area contract
4
+ *
5
+ * An "area" is one top-level section of the TUI (Configuration, Platforms,
6
+ * Projects, …) — the rough analog of a first-level CLI command group. The
7
+ * shell hosts exactly one area at a time inside a shared content region and
8
+ * provides each area a context to drive navigation and shared modals.
9
+ *
10
+ * Adding an area = implement {@link TuiArea} + append it to `shell/registry.ts`.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ //# sourceMappingURL=area.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"area.js","sourceRoot":"","sources":["../../../src/tui/shell/area.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * IronBee — TUI shell: frame (persistent chrome around the content region)
3
+ *
4
+ * Top breadcrumb bar (`IronBee ▸ Configuration`), a content region areas mount
5
+ * into, and a bottom status/help bar. Named "frame" (not "chrome") to avoid
6
+ * confusion with the browser DevTools / Chrome concept elsewhere in IronBee.
7
+ */
8
+ import * as blessed from "blessed";
9
+ /** The frame widgets + setters the shell drives. */
10
+ export interface Frame {
11
+ /** Region areas render into (between the two bars). */
12
+ content: blessed.Widgets.BoxElement;
13
+ /** Set the breadcrumb trail, e.g. `["IronBee", "Configuration"]`. */
14
+ setBreadcrumb(parts: string[]): void;
15
+ /** Set the bottom status/help text (blessed tags allowed). */
16
+ setStatus(help: string): void;
17
+ }
18
+ /** Build the frame on `screen` and return its handles. `getProjectDir` is read
19
+ * on every `setBreadcrumb` so the breadcrumb always shows the CURRENT active
20
+ * project (which is switchable) — i.e. the project the project/local layers
21
+ * resolve against (`<projectDir>/.ironbee/config*.json`). */
22
+ export declare function buildFrame(screen: blessed.Widgets.Screen, getProjectDir: () => string): Frame;
23
+ //# sourceMappingURL=frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../src/tui/shell/frame.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,oDAAoD;AACpD,MAAM,WAAW,KAAK;IAClB,uDAAuD;IACvD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;IACpC,qEAAqE;IACrE,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACrC,8DAA8D;IAC9D,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;;8DAG8D;AAC9D,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,MAAM,GAAG,KAAK,CA2C7F"}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ /**
3
+ * IronBee — TUI shell: frame (persistent chrome around the content region)
4
+ *
5
+ * Top breadcrumb bar (`IronBee ▸ Configuration`), a content region areas mount
6
+ * into, and a bottom status/help bar. Named "frame" (not "chrome") to avoid
7
+ * confusion with the browser DevTools / Chrome concept elsewhere in IronBee.
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.buildFrame = buildFrame;
44
+ const blessed = __importStar(require("blessed"));
45
+ const util_1 = require("./util");
46
+ /** Build the frame on `screen` and return its handles. `getProjectDir` is read
47
+ * on every `setBreadcrumb` so the breadcrumb always shows the CURRENT active
48
+ * project (which is switchable) — i.e. the project the project/local layers
49
+ * resolve against (`<projectDir>/.ironbee/config*.json`). */
50
+ function buildFrame(screen, getProjectDir) {
51
+ const breadcrumb = blessed.box({
52
+ parent: screen,
53
+ top: 0,
54
+ left: 0,
55
+ width: "100%",
56
+ height: 1,
57
+ tags: true,
58
+ style: { fg: "white", bg: "blue" },
59
+ content: "",
60
+ });
61
+ const content = blessed.box({
62
+ parent: screen,
63
+ top: 1,
64
+ left: 0,
65
+ width: "100%",
66
+ height: "100%-2",
67
+ tags: true,
68
+ });
69
+ const status = blessed.box({
70
+ parent: screen,
71
+ bottom: 0,
72
+ left: 0,
73
+ width: "100%",
74
+ height: 1,
75
+ tags: true,
76
+ style: { fg: "white", bg: "black" },
77
+ content: "",
78
+ });
79
+ return {
80
+ content,
81
+ setBreadcrumb(parts) {
82
+ const trail = parts.map((p) => (0, util_1.escapeTags)(p)).join(" {white-fg}▸{/white-fg} ");
83
+ const dirSuffix = ` {white-fg}·{/white-fg} ${(0, util_1.escapeTags)(getProjectDir())}`;
84
+ breadcrumb.setContent(` {bold}${trail}{/bold}${dirSuffix}`);
85
+ },
86
+ setStatus(help) {
87
+ status.setContent(` ${help}`);
88
+ },
89
+ };
90
+ }
91
+ //# sourceMappingURL=frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.js","sourceRoot":"","sources":["../../../src/tui/shell/frame.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBH,gCA2CC;AA5DD,iDAAmC;AACnC,iCAAoC;AAYpC;;;8DAG8D;AAC9D,SAAgB,UAAU,CAAC,MAA8B,EAAE,aAA2B;IAClF,MAAM,UAAU,GAA+B,OAAO,CAAC,GAAG,CAAC;QACvD,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE;QAClC,OAAO,EAAE,EAAE;KACd,CAAC,CAAC;IAEH,MAAM,OAAO,GAA+B,OAAO,CAAC,GAAG,CAAC;QACpD,MAAM,EAAE,MAAM;QACd,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,MAAM,MAAM,GAA+B,OAAO,CAAC,GAAG,CAAC;QACnD,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE;QACnC,OAAO,EAAE,EAAE;KACd,CAAC,CAAC;IAEH,OAAO;QACH,OAAO;QACP,aAAa,CAAC,KAAe;YACzB,MAAM,KAAK,GAAW,KAAK,CAAC,GAAG,CAAC,CAAC,CAAS,EAAU,EAAE,CAAC,IAAA,iBAAU,EAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;YACvG,MAAM,SAAS,GAAW,4BAA4B,IAAA,iBAAU,EAAC,aAAa,EAAE,CAAC,EAAE,CAAC;YACpF,UAAU,CAAC,UAAU,CAAC,UAAU,KAAK,UAAU,SAAS,EAAE,CAAC,CAAC;QAChE,CAAC;QACD,SAAS,CAAC,IAAY;YAClB,MAAM,CAAC,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QAClC,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * IronBee — TUI area registry
3
+ *
4
+ * The list of top-level TUI areas, in home-menu display order. Adding an area
5
+ * is a one-line append here (+ its module) — the analog of `REGISTERED_CLIENTS`.
6
+ */
7
+ import { TuiArea } from "./area";
8
+ export declare const AREAS: TuiArea[];
9
+ /** Look up an area by id (for `ironbee tui <id>` deep-linking). */
10
+ export declare function findArea(id: string): TuiArea | undefined;
11
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/tui/shell/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,eAAO,MAAM,KAAK,EAAE,OAAO,EAO1B,CAAC;AAEF,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAExD"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * IronBee — TUI area registry
4
+ *
5
+ * The list of top-level TUI areas, in home-menu display order. Adding an area
6
+ * is a one-line append here (+ its module) — the analog of `REGISTERED_CLIENTS`.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AREAS = void 0;
10
+ exports.findArea = findArea;
11
+ const area_1 = require("../config/area");
12
+ const area_2 = require("../import/area");
13
+ const area_3 = require("../platforms/area");
14
+ const area_4 = require("../projects/area");
15
+ const area_5 = require("../queue/area");
16
+ const area_6 = require("../sessions/area");
17
+ exports.AREAS = [
18
+ area_1.configArea,
19
+ area_3.platformsArea,
20
+ area_4.projectsArea,
21
+ area_6.sessionsArea,
22
+ area_5.queueArea,
23
+ area_2.importArea,
24
+ ];
25
+ /** Look up an area by id (for `ironbee tui <id>` deep-linking). */
26
+ function findArea(id) {
27
+ return exports.AREAS.find((a) => a.id === id);
28
+ }
29
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/tui/shell/registry.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAoBH,4BAEC;AApBD,yCAA4C;AAC5C,yCAA4C;AAC5C,4CAAkD;AAClD,2CAAgD;AAChD,wCAA0C;AAC1C,2CAAgD;AAGnC,QAAA,KAAK,GAAc;IAC5B,iBAAU;IACV,oBAAa;IACb,mBAAY;IACZ,mBAAY;IACZ,gBAAS;IACT,iBAAU;CACb,CAAC;AAEF,mEAAmE;AACnE,SAAgB,QAAQ,CAAC,EAAU;IAC/B,OAAO,aAAK,CAAC,IAAI,CAAC,CAAC,CAAU,EAAW,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * IronBee — TUI shell: artifact rerender (app-global, runs once on exit)
3
+ *
4
+ * Any area that mutates artifact-affecting config flags the session; on app
5
+ * exit (after the screen is torn down) the shell re-renders installed client
6
+ * artifacts ONCE with normal console output. This is cross-area (config edits,
7
+ * future platform toggles, …), so it lives at the shell level rather than in
8
+ * any single area. Reads only the public clients/lib surface.
9
+ */
10
+ /**
11
+ * Re-render installed client artifacts so they reflect the current (merged)
12
+ * on-disk config. Returns the client names that were re-rendered, or `[]` when
13
+ * no client is detected and no explicit `clientName` was given.
14
+ */
15
+ export declare function rerenderArtifacts(projectDir: string, clientName?: string): string[];
16
+ //# sourceMappingURL=rerender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rerender.d.ts","sourceRoot":"","sources":["../../../src/tui/shell/rerender.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAYnF"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /**
3
+ * IronBee — TUI shell: artifact rerender (app-global, runs once on exit)
4
+ *
5
+ * Any area that mutates artifact-affecting config flags the session; on app
6
+ * exit (after the screen is torn down) the shell re-renders installed client
7
+ * artifacts ONCE with normal console output. This is cross-area (config edits,
8
+ * future platform toggles, …), so it lives at the shell level rather than in
9
+ * any single area. Reads only the public clients/lib surface.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.rerenderArtifacts = rerenderArtifacts;
13
+ const registry_1 = require("../../clients/registry");
14
+ const config_1 = require("../../lib/config");
15
+ const gitignore_1 = require("../../lib/gitignore");
16
+ /**
17
+ * Re-render installed client artifacts so they reflect the current (merged)
18
+ * on-disk config. Returns the client names that were re-rendered, or `[]` when
19
+ * no client is detected and no explicit `clientName` was given.
20
+ */
21
+ function rerenderArtifacts(projectDir, clientName) {
22
+ const detected = (0, registry_1.detectClients)(projectDir);
23
+ if (clientName === undefined && detected.length === 0) {
24
+ return [];
25
+ }
26
+ const cfg = (0, config_1.loadConfig)(projectDir);
27
+ const clients = (0, registry_1.resolveTargetClients)(projectDir, clientName);
28
+ for (const client of clients) {
29
+ client.install(projectDir, cfg);
30
+ }
31
+ (0, gitignore_1.ensureIronBeeGitignored)(projectDir);
32
+ return clients.map((c) => c.name);
33
+ }
34
+ //# sourceMappingURL=rerender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rerender.js","sourceRoot":"","sources":["../../../src/tui/shell/rerender.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAYH,8CAYC;AArBD,qDAA6E;AAC7E,6CAA6D;AAC7D,mDAA8D;AAE9D;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,UAAkB,EAAE,UAAmB;IACrE,MAAM,QAAQ,GAAc,IAAA,wBAAa,EAAC,UAAU,CAAC,CAAC;IACtD,IAAI,UAAU,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC;IACd,CAAC;IACD,MAAM,GAAG,GAAkB,IAAA,mBAAU,EAAC,UAAU,CAAC,CAAC;IAClD,MAAM,OAAO,GAAc,IAAA,+BAAoB,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACxE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IACpC,CAAC;IACD,IAAA,mCAAuB,EAAC,UAAU,CAAC,CAAC;IACpC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAU,EAAU,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * IronBee — TUI shell: session
3
+ *
4
+ * Cross-area state + shared modal helpers. One session per `ironbee tui` run.
5
+ *
6
+ * - `projectDir` — the resolved project directory all areas read/write against.
7
+ * - rerender flag — any area that changes artifact-affecting config calls
8
+ * `markRerenderNeeded()`; the app re-renders client artifacts
9
+ * ONCE on exit (never mid-session — install stdout would
10
+ * corrupt the screen).
11
+ * - `isModalOpen()` — true while a shared modal (prompt/confirm/message/pick) is
12
+ * up, so the shell's global Esc=back doesn't fire underneath it.
13
+ * - modal helpers — prompt / confirm / message / pick, reused by every area so
14
+ * they don't each reimplement (and so modal tracking + focus
15
+ * restore are uniform).
16
+ */
17
+ import * as blessed from "blessed";
18
+ export declare class TuiSession {
19
+ readonly screen: blessed.Widgets.Screen;
20
+ /** The directory the TUI was launched in (cwd / -p) — immutable. Used by
21
+ * "register cwd". The *active* project (what areas read) can differ. */
22
+ readonly launchDir: string;
23
+ private activeProjectDir;
24
+ /** Project dirs whose artifacts need re-rendering on exit. A Set (not a
25
+ * bool) because the active project is switchable — the user can edit
26
+ * artifact-affecting config across several projects in one session. */
27
+ private rerenderDirs;
28
+ private modalOpen;
29
+ constructor(screen: blessed.Widgets.Screen, projectDir: string);
30
+ /** The active project — what every project-scoped area reads at mount. */
31
+ get projectDir(): string;
32
+ /** Switch the active project (in-memory, TUI-session only). */
33
+ setProjectDir(dir: string): void;
34
+ /** Flag `dir`'s artifacts for re-render on exit. */
35
+ markRerenderNeeded(dir: string): void;
36
+ isRerenderNeeded(): boolean;
37
+ /** Drain the set of project dirs needing a rerender (clears it). */
38
+ rerenderProjects(): string[];
39
+ isModalOpen(): boolean;
40
+ /** Capture focus + flag a modal as open; returns the restore function. */
41
+ private openModal;
42
+ /** Transient auto-dismissing notice (3s or any key). */
43
+ message(text: string): void;
44
+ /** Single-line text input. `cb` gets the entered string, or `null` on cancel (Esc). */
45
+ prompt(label: string, value: string, cb: (raw: string | null) => void): void;
46
+ /**
47
+ * Yes/no question. `cb` gets `true` for yes. Rendered as an arrow-navigable
48
+ * Yes/No list (NOT blessed's `question` widget, whose OK/Cancel buttons only
49
+ * respond to y/n/enter/esc keypresses, not ↑/↓ selection). Defaults to "No"
50
+ * (safer for the destructive confirms — uninstall / clear / purge); `Esc`/`q`
51
+ * cancels = no.
52
+ */
53
+ confirm(question: string, cb: (yes: boolean) => void): void;
54
+ /** Pick one of `items`. `cb` gets the chosen index, or `-1` on cancel. */
55
+ pick(title: string, items: string[], cb: (index: number) => void): void;
56
+ /**
57
+ * Run a synchronous `fn` with stdout/stderr suppressed (discarded), then
58
+ * restored. For calling noisy library functions (loggers!) during a render
59
+ * without their output leaking onto — and corrupting — the blessed screen.
60
+ */
61
+ silently<T>(fn: () => T): T;
62
+ /** Bind scroll (↑/↓/PgUp/PgDn) + close (Esc/Enter/q) keys to a pane box. */
63
+ private bindPaneKeys;
64
+ /** Show `content` (must be blessed-tag-safe) in a scrollable modal pane. */
65
+ showPane(title: string, content: string): void;
66
+ /**
67
+ * Run `fn` in the FOREGROUND, blocking TUI interaction until it finishes:
68
+ * shows a "running" modal, captures everything `fn` writes to stdout/stderr,
69
+ * then shows the captured output (plus any string `fn` returns) in a
70
+ * scrollable pane. For install / uninstall / drain / import — operations the
71
+ * user wants to watch to completion. Resolves when the pane is closed.
72
+ */
73
+ runWithOutput(label: string, fn: () => Promise<string | void> | string | void): Promise<void>;
74
+ }
75
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/tui/shell/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAGnC,qBAAa,UAAU;IACnB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;IACxC;6EACyE;IACzE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,gBAAgB,CAAS;IACjC;;4EAEwE;IACxE,OAAO,CAAC,YAAY,CAAkC;IACtD,OAAO,CAAC,SAAS,CAAkB;gBAEvB,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM;IAM9D,0EAA0E;IAC1E,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,+DAA+D;IAC/D,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIhC,oDAAoD;IACpD,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIrC,gBAAgB,IAAI,OAAO;IAI3B,oEAAoE;IACpE,gBAAgB,IAAI,MAAM,EAAE;IAM5B,WAAW,IAAI,OAAO;IAItB,0EAA0E;IAC1E,OAAO,CAAC,SAAS;IAsBjB,wDAAwD;IACxD,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAkB3B,uFAAuF;IACvF,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI;IAqB5E;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;IAoC3D,0EAA0E;IAC1E,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IA6BvE;;;;OAIG;IACH,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAc3B,4EAA4E;IAC5E,OAAO,CAAC,YAAY;IASpB,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAqB9C;;;;;;OAMG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CA2DhG"}