@kubbisec/ai-linux-x64 0.1.22 → 0.1.23

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 (109) hide show
  1. package/bin/kubbisec +0 -0
  2. package/bundled/components/kubbisec-model-selector.d.ts +47 -34
  3. package/bundled/components/kubbisec-model-selector.js +187 -177
  4. package/bundled/config/config.d.ts +6 -6
  5. package/bundled/config/config.js +54 -52
  6. package/bundled/config/detect-local-llm-providers.d.ts +26 -16
  7. package/bundled/config/detect-local-llm-providers.js +130 -142
  8. package/bundled/config/ensure-kbs-project-settings.d.ts +8 -8
  9. package/bundled/config/ensure-kbs-project-settings.js +27 -28
  10. package/bundled/config/ensure-kubbisec-project-settings.d.ts +9 -9
  11. package/bundled/config/ensure-kubbisec-project-settings.js +62 -67
  12. package/bundled/config/extended-context.d.ts +5 -6
  13. package/bundled/config/extended-context.js +23 -22
  14. package/bundled/config/feature-flags.d.ts +10 -2
  15. package/bundled/config/feature-flags.js +8 -2
  16. package/bundled/config/format-kubbisec-footer-status.d.ts +1 -1
  17. package/bundled/config/format-kubbisec-footer-status.js +26 -31
  18. package/bundled/config/kubbisec-extension-manifest.d.ts +21 -2
  19. package/bundled/config/kubbisec-extension-manifest.js +19 -19
  20. package/bundled/config/llm-config-mutations.d.ts +51 -25
  21. package/bundled/config/llm-config-mutations.js +173 -182
  22. package/bundled/config/llm-config.d.ts +54 -41
  23. package/bundled/config/llm-config.js +199 -199
  24. package/bundled/config/llm-provider-catalog.d.ts +18 -15
  25. package/bundled/config/llm-provider-catalog.js +45 -46
  26. package/bundled/config/materialize-kubbisec-pi-resources.d.ts +1 -1
  27. package/bundled/config/materialize-kubbisec-pi-resources.js +173 -182
  28. package/bundled/config/register-custom-llm-providers.d.ts +11 -5
  29. package/bundled/config/register-custom-llm-providers.js +17 -15
  30. package/bundled/config/register-kubbisec-llm-provider.d.ts +14 -10
  31. package/bundled/config/register-kubbisec-llm-provider.js +50 -42
  32. package/bundled/config/resolve-agents-context-file.d.ts +1 -1
  33. package/bundled/config/resolve-agents-context-file.js +33 -34
  34. package/bundled/config/resource-budget.d.ts +12 -12
  35. package/bundled/config/resource-budget.js +28 -28
  36. package/bundled/config/sync-kubbisec-pi-models.d.ts +6 -3
  37. package/bundled/config/sync-kubbisec-pi-models.js +58 -58
  38. package/bundled/copy/cli-reference-index.d.ts +1 -1
  39. package/bundled/copy/cli-reference-index.js +1 -1
  40. package/bundled/copy/kubbisec-shell-copy.d.ts +11 -6
  41. package/bundled/copy/kubbisec-shell-copy.js +1 -1
  42. package/bundled/extensions/cli-local-shared.d.ts +56 -32
  43. package/bundled/extensions/cli-local-shared.js +135 -125
  44. package/bundled/extensions/kubbisec-aspm-local.extension.d.ts +18 -15
  45. package/bundled/extensions/kubbisec-aspm-local.extension.js +109 -106
  46. package/bundled/extensions/kubbisec-brand.extension.d.ts +1 -1
  47. package/bundled/extensions/kubbisec-brand.extension.js +25 -25
  48. package/bundled/extensions/kubbisec-byok-provider.extension.d.ts +1 -1
  49. package/bundled/extensions/kubbisec-byok-provider.extension.js +2 -2
  50. package/bundled/extensions/kubbisec-clarify.extension.d.ts +64 -35
  51. package/bundled/extensions/kubbisec-clarify.extension.js +323 -305
  52. package/bundled/extensions/kubbisec-exit.extension.d.ts +1 -1
  53. package/bundled/extensions/kubbisec-exit.extension.js +29 -32
  54. package/bundled/extensions/kubbisec-extended-context.extension.d.ts +1 -1
  55. package/bundled/extensions/kubbisec-extended-context.extension.js +56 -43
  56. package/bundled/extensions/kubbisec-footer.extension.d.ts +14 -14
  57. package/bundled/extensions/kubbisec-footer.extension.js +205 -215
  58. package/bundled/extensions/kubbisec-github-local.extension.d.ts +26 -18
  59. package/bundled/extensions/kubbisec-github-local.extension.js +430 -417
  60. package/bundled/extensions/kubbisec-llm-config.extension.d.ts +1 -1
  61. package/bundled/extensions/kubbisec-llm-config.extension.js +200 -181
  62. package/bundled/extensions/kubbisec-memory.extension.d.ts +9 -7
  63. package/bundled/extensions/kubbisec-memory.extension.js +88 -95
  64. package/bundled/extensions/kubbisec-naus-local.extension.d.ts +18 -15
  65. package/bundled/extensions/kubbisec-naus-local.extension.js +123 -103
  66. package/bundled/extensions/kubbisec-platform-tools.extension.d.ts +31 -21
  67. package/bundled/extensions/kubbisec-platform-tools.extension.js +152 -152
  68. package/bundled/extensions/kubbisec-runtime-status.extension.d.ts +10 -8
  69. package/bundled/extensions/kubbisec-runtime-status.extension.js +15 -13
  70. package/bundled/extensions/kubbisec-scope.extension.d.ts +12 -7
  71. package/bundled/extensions/kubbisec-scope.extension.js +13 -13
  72. package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts +27 -16
  73. package/bundled/extensions/kubbisec-skill-mentions.extension.js +74 -64
  74. package/bundled/extensions/kubbisec-skill-telemetry.extension.d.ts +2 -3
  75. package/bundled/extensions/kubbisec-skill-telemetry.extension.js +59 -64
  76. package/bundled/extensions/kubbisec-theme-lock.extension.d.ts +1 -1
  77. package/bundled/extensions/kubbisec-theme-lock.extension.js +33 -34
  78. package/bundled/extensions/kubbisec-ui.extension.d.ts +1 -1
  79. package/bundled/extensions/kubbisec-ui.extension.js +90 -92
  80. package/bundled/extensions/kubbisec-workflow.extension.d.ts +20 -18
  81. package/bundled/extensions/kubbisec-workflow.extension.js +138 -140
  82. package/bundled/resolve-bundled-dist-root.js +121 -130
  83. package/bundled/skills/at-path-mentions.d.ts +1 -1
  84. package/bundled/skills/at-path-mentions.js +146 -153
  85. package/bundled/skills/chat-mention-render.d.ts +2 -2
  86. package/bundled/skills/chat-mention-render.js +121 -126
  87. package/bundled/skills/chat-mentions.d.ts +17 -8
  88. package/bundled/skills/chat-mentions.js +76 -76
  89. package/bundled/skills/list-bundled-skills.d.ts +3 -3
  90. package/bundled/skills/list-bundled-skills.js +33 -35
  91. package/bundled/skills/skill-mention.d.ts +10 -2
  92. package/bundled/skills/skill-mention.js +10 -2
  93. package/bundled/theme/clear-terminal.d.ts +1 -1
  94. package/bundled/theme/clear-terminal.js +3 -4
  95. package/bundled/theme/footer-render-hook.d.ts +1 -1
  96. package/bundled/theme/footer-render-hook.js +3 -3
  97. package/bundled/theme/kubbisec-brand-fg.d.ts +1 -1
  98. package/bundled/theme/kubbisec-brand-fg.js +2 -2
  99. package/bundled/theme/kubbisec-menu-themes.d.ts +7 -7
  100. package/bundled/theme/kubbisec-menu-themes.js +30 -31
  101. package/bundled/theme/kubbisec-theme-name.d.ts +1 -1
  102. package/bundled/theme/kubbisec-theme-name.js +1 -1
  103. package/bundled/theme/patch-pi-settings-theme.runtime.d.ts +1 -1
  104. package/bundled/theme/patch-pi-settings-theme.runtime.js +11 -10
  105. package/bundled/theme/render-compact-header.d.ts +13 -5
  106. package/bundled/theme/render-compact-header.js +126 -128
  107. package/bundled/workflow/session-workflow-mode.d.ts +1 -1
  108. package/bundled/workflow/session-workflow-mode.js +33 -33
  109. package/package.json +1 -1
@@ -1,197 +1,195 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
- import { KUBBISEC_HEADER_HINTS_COMMANDS, KUBBISEC_HEADER_HINTS_SKILL, KUBBISEC_SUBTITLE_LINE, KUBBISEC_WORDMARK, } from "../copy/kubbisec-shell-copy.js";
4
+ import {
5
+ KUBBISEC_HEADER_HINTS_COMMANDS,
6
+ KUBBISEC_HEADER_HINTS_SKILL,
7
+ KUBBISEC_SUBTITLE_LINE,
8
+ KUBBISEC_WORDMARK,
9
+ } from "../copy/kubbisec-shell-copy.js";
5
10
  import { kubbisecBrandFg } from "./kubbisec-brand-fg.js";
11
+
6
12
  const FALLBACK_MARK = "◆";
7
13
  const EMBEDDED_WORDMARK = /\s+K\s+U\s+B\s+B\s+I\s+S\s+E\s+C\s*$/i;
8
14
  /** Works from `dist/theme/` and from materialized `<cwd>/.pi/theme/`. */
9
15
  export function resolveTerminalAssetsDir(moduleUrl = import.meta.url) {
10
- const here = path.dirname(fileURLToPath(moduleUrl));
11
- const candidates = [
12
- path.join(here, "../assets/terminal"),
13
- path.join(here, "../../assets/terminal"),
14
- ];
15
- for (const candidate of candidates) {
16
- if (fs.existsSync(candidate)) {
17
- return candidate;
18
- }
16
+ const here = path.dirname(fileURLToPath(moduleUrl));
17
+ const candidates = [
18
+ path.join(here, "../assets/terminal"),
19
+ path.join(here, "../../assets/terminal"),
20
+ ];
21
+ for (const candidate of candidates) {
22
+ if (fs.existsSync(candidate)) {
23
+ return candidate;
19
24
  }
20
- return candidates[0];
25
+ }
26
+ return candidates[0];
21
27
  }
22
28
  function readAnsiFile(name) {
23
- const file = path.join(resolveTerminalAssetsDir(), name);
24
- if (!fs.existsSync(file))
25
- return null;
26
- return fs
27
- .readFileSync(file, "utf8")
28
- .split("\n")
29
- .map((l) => l.replace(/\r$/, ""))
30
- .filter((l) => l.length > 0);
29
+ const file = path.join(resolveTerminalAssetsDir(), name);
30
+ if (!fs.existsSync(file)) return null;
31
+ return fs
32
+ .readFileSync(file, "utf8")
33
+ .split("\n")
34
+ .map((l) => l.replace(/\r$/, ""))
35
+ .filter((l) => l.length > 0);
31
36
  }
32
37
  function isVerboseBrand() {
33
- return process.env.KUBBISEC_TUI_VERBOSE === "1";
38
+ return process.env.KUBBISEC_TUI_VERBOSE === "1";
34
39
  }
35
40
  export function stripAnsi(value) {
36
- return value.replace(/\x1b\[[0-9;]*m/g, "");
41
+ return value.replace(/\x1b\[[0-9;]*m/g, "");
37
42
  }
38
43
  export function visibleWidth(text) {
39
- return stripAnsi(text).length;
44
+ return stripAnsi(text).length;
40
45
  }
41
46
  export function centerLine(text, width) {
42
- if (width <= 0)
43
- return text;
44
- const lineWidth = visibleWidth(text);
45
- if (lineWidth >= width)
46
- return text;
47
- const pad = Math.floor((width - lineWidth) / 2);
48
- return `${" ".repeat(pad)}${text}`;
47
+ if (width <= 0) return text;
48
+ const lineWidth = visibleWidth(text);
49
+ if (lineWidth >= width) return text;
50
+ const pad = Math.floor((width - lineWidth) / 2);
51
+ return `${" ".repeat(pad)}${text}`;
49
52
  }
50
53
  function _centerLines(lines, width) {
51
- return lines.map((line) => centerLine(line, width));
54
+ return lines.map((line) => centerLine(line, width));
52
55
  }
53
56
  /** Center a multi-line ANSI block with uniform left padding (preserves row alignment). */
54
57
  export function centerLinesAsBlock(lines, width) {
55
- if (lines.length === 0)
56
- return [];
57
- const blockWidth = Math.max(...lines.map(visibleWidth));
58
- const pad = width > blockWidth ? Math.floor((width - blockWidth) / 2) : 0;
59
- const prefix = " ".repeat(pad);
60
- return lines.map((line) => `${prefix}${line}`);
58
+ if (lines.length === 0) return [];
59
+ const blockWidth = Math.max(...lines.map(visibleWidth));
60
+ const pad = width > blockWidth ? Math.floor((width - blockWidth) / 2) : 0;
61
+ const prefix = " ".repeat(pad);
62
+ return lines.map((line) => `${prefix}${line}`);
61
63
  }
62
64
  /** Remove inline "K U B B I S E C" suffix from generated logo rows. */
63
65
  export function stripEmbeddedWordmark(line) {
64
- const plain = stripAnsi(line);
65
- const match = plain.match(EMBEDDED_WORDMARK);
66
- if (!match || match.index === undefined)
67
- return line.trimEnd();
68
- const cutPlainLen = match.index;
69
- let visible = 0;
70
- let i = 0;
71
- let out = "";
72
- while (i < line.length && visible < cutPlainLen) {
73
- if (line[i] === "\x1b") {
74
- const end = line.indexOf("m", i);
75
- if (end === -1)
76
- break;
77
- out += line.slice(i, end + 1);
78
- i = end + 1;
79
- continue;
80
- }
81
- out += line[i];
82
- visible += 1;
83
- i += 1;
66
+ const plain = stripAnsi(line);
67
+ const match = plain.match(EMBEDDED_WORDMARK);
68
+ if (!match || match.index === undefined) return line.trimEnd();
69
+ const cutPlainLen = match.index;
70
+ let visible = 0;
71
+ let i = 0;
72
+ let out = "";
73
+ while (i < line.length && visible < cutPlainLen) {
74
+ if (line[i] === "\x1b") {
75
+ const end = line.indexOf("m", i);
76
+ if (end === -1) break;
77
+ out += line.slice(i, end + 1);
78
+ i = end + 1;
79
+ continue;
84
80
  }
85
- return out.trimEnd();
81
+ out += line[i];
82
+ visible += 1;
83
+ i += 1;
84
+ }
85
+ return out.trimEnd();
86
86
  }
87
87
  function symbolOnlyLines(logo) {
88
- return logo
89
- .map((line) => stripEmbeddedWordmark(line))
90
- .filter((line) => stripAnsi(line).length > 0);
88
+ return logo
89
+ .map((line) => stripEmbeddedWordmark(line))
90
+ .filter((line) => stripAnsi(line).length > 0);
91
91
  }
92
92
  /** Read once at module load — avoids sync I/O on every TUI frame. */
93
93
  const CACHED_MARK_LINES = readAnsiFile("mark.ansi") ?? [];
94
94
  const CACHED_WORDMARK_INLINE = readAnsiFile("wordmark-inline.ansi");
95
95
  /** Pi TUI widgets do not render iTerm 1337 inline PNGs — opt-in only. */
96
96
  function isInlineWordmarkEnabled() {
97
- return process.env.KUBBISEC_TUI_INLINE_IMAGES === "1";
97
+ return process.env.KUBBISEC_TUI_INLINE_IMAGES === "1";
98
98
  }
99
99
  /** Brand cyan — same RGB as footer branch (`#28DCF9`). */
100
100
  function brandText(_theme, text) {
101
- return kubbisecBrandFg(text);
101
+ return kubbisecBrandFg(text);
102
102
  }
103
103
  function renderSpacedWordmarkFallback(theme) {
104
- return brandText(theme, KUBBISEC_WORDMARK.split("").join(" "));
104
+ return brandText(theme, KUBBISEC_WORDMARK.split("").join(" "));
105
105
  }
106
106
  /** Centered hex mark only — never inline logotipo with embedded wordmark. */
107
107
  function loadSymbolBlock(verbose) {
108
- if (verbose) {
109
- for (const name of ["logotipo-wide-fallback.ansi", "mark.ansi"]) {
110
- const logo = readAnsiFile(name);
111
- if (logo?.length)
112
- return symbolOnlyLines(logo);
113
- }
108
+ if (verbose) {
109
+ for (const name of ["logotipo-wide-fallback.ansi", "mark.ansi"]) {
110
+ const logo = readAnsiFile(name);
111
+ if (logo?.length) return symbolOnlyLines(logo);
114
112
  }
115
- const mark = readAnsiFile("mark.ansi");
116
- if (mark?.length)
117
- return mark;
118
- return null;
113
+ }
114
+ const mark = readAnsiFile("mark.ansi");
115
+ if (mark?.length) return mark;
116
+ return null;
119
117
  }
120
118
  function renderWordmarkLine(theme, width) {
121
- return centerLine(theme.bold(theme.fg("accent", KUBBISEC_WORDMARK)), width);
119
+ return centerLine(theme.bold(theme.fg("accent", KUBBISEC_WORDMARK)), width);
122
120
  }
123
121
  function renderVersionLine(theme, version) {
124
- return theme.fg("dim", `v${version}`);
122
+ return theme.fg("dim", `v${version}`);
125
123
  }
126
124
  /** Hints row with brand cyan on `@skill` and dim example + commands. */
127
125
  export function renderHeaderHintsLine(theme) {
128
- const [skillToken, ...exampleParts] = KUBBISEC_HEADER_HINTS_SKILL.split(/\s+/);
129
- const example = exampleParts.join(" ");
130
- const skill = brandText(theme, skillToken ?? "@skill");
131
- const exampleLabel = example ? theme.fg("dim", ` ${example}`) : "";
132
- const separator = theme.fg("dim", " · ");
133
- const commands = theme.fg("dim", KUBBISEC_HEADER_HINTS_COMMANDS);
134
- return `${skill}${exampleLabel}${separator}${commands}`;
126
+ const [skillToken, ...exampleParts] = KUBBISEC_HEADER_HINTS_SKILL.split(/\s+/);
127
+ const example = exampleParts.join(" ");
128
+ const skill = brandText(theme, skillToken ?? "@skill");
129
+ const exampleLabel = example ? theme.fg("dim", ` ${example}`) : "";
130
+ const separator = theme.fg("dim", " · ");
131
+ const commands = theme.fg("dim", KUBBISEC_HEADER_HINTS_COMMANDS);
132
+ return `${skill}${exampleLabel}${separator}${commands}`;
135
133
  }
136
134
  function appendSubtitleAndHints(theme, lines, width) {
137
- return [
138
- ...lines,
139
- centerLine(brandText(theme, KUBBISEC_SUBTITLE_LINE), width),
140
- centerLine(renderHeaderHintsLine(theme), width),
141
- ];
135
+ return [
136
+ ...lines,
137
+ centerLine(brandText(theme, KUBBISEC_SUBTITLE_LINE), width),
138
+ centerLine(renderHeaderHintsLine(theme), width),
139
+ ];
142
140
  }
143
141
  function renderStackedBrandBlock(theme, version, width, verbose) {
144
- const symbol = loadSymbolBlock(verbose);
145
- const lines = [];
146
- if (symbol?.length) {
147
- lines.push(...centerLinesAsBlock(symbol, width));
148
- }
149
- else {
150
- lines.push(centerLine(theme.fg("accent", FALLBACK_MARK), width));
151
- }
152
- lines.push("");
153
- lines.push(renderWordmarkLine(theme, width));
154
- lines.push(centerLine(renderVersionLine(theme, version), width));
155
- lines.push("");
156
- return appendSubtitleAndHints(theme, lines, width);
142
+ const symbol = loadSymbolBlock(verbose);
143
+ const lines = [];
144
+ if (symbol?.length) {
145
+ lines.push(...centerLinesAsBlock(symbol, width));
146
+ } else {
147
+ lines.push(centerLine(theme.fg("accent", FALLBACK_MARK), width));
148
+ }
149
+ lines.push("");
150
+ lines.push(renderWordmarkLine(theme, width));
151
+ lines.push(centerLine(renderVersionLine(theme, version), width));
152
+ lines.push("");
153
+ return appendSubtitleAndHints(theme, lines, width);
157
154
  }
158
155
  /** Single-line brand row: mark + wordmark + version + subtitle. */
159
156
  export function renderCompactHeaderLine(theme, version) {
160
- const mark = theme.fg("accent", FALLBACK_MARK);
161
- const subtitle = theme.fg("dim", ` · ${KUBBISEC_SUBTITLE_LINE}`);
162
- return `${mark} ${theme.bold(theme.fg("accent", KUBBISEC_WORDMARK))} ${renderVersionLine(theme, version)}${subtitle}`;
157
+ const mark = theme.fg("accent", FALLBACK_MARK);
158
+ const subtitle = theme.fg("dim", ` · ${KUBBISEC_SUBTITLE_LINE}`);
159
+ return `${mark} ${theme.bold(theme.fg("accent", KUBBISEC_WORDMARK))} ${renderVersionLine(theme, version)}${subtitle}`;
163
160
  }
164
161
  function renderWordmarkBlock(theme, version, width) {
165
- const wordmark = isInlineWordmarkEnabled() && CACHED_WORDMARK_INLINE?.[0]
166
- ? CACHED_WORDMARK_INLINE[0]
167
- : renderSpacedWordmarkFallback(theme);
168
- return [centerLine(wordmark, width), centerLine(renderVersionLine(theme, version), width)];
162
+ const wordmark =
163
+ isInlineWordmarkEnabled() && CACHED_WORDMARK_INLINE?.[0]
164
+ ? CACHED_WORDMARK_INLINE[0]
165
+ : renderSpacedWordmarkFallback(theme);
166
+ return [centerLine(wordmark, width), centerLine(renderVersionLine(theme, version), width)];
169
167
  }
170
168
  /** Default chat chrome: hex block, wordmark, version, spacer, subtitle, hints. */
171
169
  export function renderCompactHeaderLines(theme, version, width = 80) {
172
- const hintsLine = centerLine(renderHeaderHintsLine(theme), width);
173
- const subtitleLine = centerLine(brandText(theme, KUBBISEC_SUBTITLE_LINE), width);
174
- if (CACHED_MARK_LINES.length === 0) {
175
- return [
176
- centerLine(renderCompactHeaderLine(theme, version), width),
177
- "",
178
- subtitleLine,
179
- hintsLine,
180
- ];
181
- }
170
+ const hintsLine = centerLine(renderHeaderHintsLine(theme), width);
171
+ const subtitleLine = centerLine(brandText(theme, KUBBISEC_SUBTITLE_LINE), width);
172
+ if (CACHED_MARK_LINES.length === 0) {
182
173
  return [
183
- ...centerLinesAsBlock(CACHED_MARK_LINES, width),
184
- "",
185
- ...renderWordmarkBlock(theme, version, width),
186
- "",
187
- subtitleLine,
188
- hintsLine,
174
+ centerLine(renderCompactHeaderLine(theme, version), width),
175
+ "",
176
+ subtitleLine,
177
+ hintsLine,
189
178
  ];
179
+ }
180
+ return [
181
+ ...centerLinesAsBlock(CACHED_MARK_LINES, width),
182
+ "",
183
+ ...renderWordmarkBlock(theme, version, width),
184
+ "",
185
+ subtitleLine,
186
+ hintsLine,
187
+ ];
190
188
  }
191
189
  export function renderChatHeaderLines(theme, version, width) {
192
- if (isVerboseBrand()) {
193
- return renderStackedBrandBlock(theme, version, width, true);
194
- }
195
- return renderCompactHeaderLines(theme, version, width);
190
+ if (isVerboseBrand()) {
191
+ return renderStackedBrandBlock(theme, version, width, true);
192
+ }
193
+ return renderCompactHeaderLines(theme, version, width);
196
194
  }
197
- //# sourceMappingURL=render-compact-header.js.map
195
+ //# sourceMappingURL=render-compact-header.js.map
@@ -7,4 +7,4 @@ export declare function resetSessionWorkflowMode(): void;
7
7
  /** Plain footer badge (no ANSI); null when default mode. */
8
8
  export declare function getSessionWorkflowFooterBadge(): string | null;
9
9
  export declare function onSessionWorkflowStatusChange(listener: () => void): () => void;
10
- //# sourceMappingURL=session-workflow-mode.d.ts.map
10
+ //# sourceMappingURL=session-workflow-mode.d.ts.map
@@ -2,50 +2,50 @@ let sessionMode = "default";
2
2
  let specApproved = false;
3
3
  let statusChangeListener;
4
4
  export function getSessionWorkflowMode() {
5
- const env = process.env.KUBBISEC_CHAT_MODE?.trim().toLowerCase();
6
- if (env === "plan" || env === "review")
7
- return env;
8
- return sessionMode;
5
+ const env = process.env.KUBBISEC_CHAT_MODE?.trim().toLowerCase();
6
+ if (env === "plan" || env === "review") return env;
7
+ return sessionMode;
9
8
  }
10
9
  export function isSessionSpecApproved() {
11
- return specApproved;
10
+ return specApproved;
12
11
  }
13
12
  export function setSessionWorkflowMode(mode) {
14
- sessionMode = mode;
15
- if (mode === "plan" || mode === "review") {
16
- process.env.KUBBISEC_CHAT_MODE = mode;
17
- }
18
- else if (process.env.KUBBISEC_CHAT_MODE === "plan" ||
19
- process.env.KUBBISEC_CHAT_MODE === "review") {
20
- delete process.env.KUBBISEC_CHAT_MODE;
21
- }
22
- statusChangeListener?.();
13
+ sessionMode = mode;
14
+ if (mode === "plan" || mode === "review") {
15
+ process.env.KUBBISEC_CHAT_MODE = mode;
16
+ } else if (
17
+ process.env.KUBBISEC_CHAT_MODE === "plan" ||
18
+ process.env.KUBBISEC_CHAT_MODE === "review"
19
+ ) {
20
+ delete process.env.KUBBISEC_CHAT_MODE;
21
+ }
22
+ statusChangeListener?.();
23
23
  }
24
24
  export function setSessionSpecApproved(approved) {
25
- specApproved = approved;
26
- statusChangeListener?.();
25
+ specApproved = approved;
26
+ statusChangeListener?.();
27
27
  }
28
28
  export function resetSessionWorkflowMode() {
29
- sessionMode = "default";
30
- specApproved = false;
29
+ sessionMode = "default";
30
+ specApproved = false;
31
31
  }
32
32
  /** Plain footer badge (no ANSI); null when default mode. */
33
33
  export function getSessionWorkflowFooterBadge() {
34
- const mode = getSessionWorkflowMode();
35
- if (mode === "plan") {
36
- return specApproved ? "@plan" : "@plan · gate";
37
- }
38
- if (mode === "review") {
39
- return "review";
40
- }
41
- return null;
34
+ const mode = getSessionWorkflowMode();
35
+ if (mode === "plan") {
36
+ return specApproved ? "@plan" : "@plan · gate";
37
+ }
38
+ if (mode === "review") {
39
+ return "review";
40
+ }
41
+ return null;
42
42
  }
43
43
  export function onSessionWorkflowStatusChange(listener) {
44
- statusChangeListener = listener;
45
- return () => {
46
- if (statusChangeListener === listener) {
47
- statusChangeListener = undefined;
48
- }
49
- };
44
+ statusChangeListener = listener;
45
+ return () => {
46
+ if (statusChangeListener === listener) {
47
+ statusChangeListener = undefined;
48
+ }
49
+ };
50
50
  }
51
- //# sourceMappingURL=session-workflow-mode.js.map
51
+ //# sourceMappingURL=session-workflow-mode.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubbisec/ai-linux-x64",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "KubbiSec CLI — Linux x64 binary",
5
5
  "license": "UNLICENSED",
6
6
  "os": [