@kubbisec/ai-linux-arm64 0.1.21 → 0.1.22

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 (130) hide show
  1. package/bundled/clarify/clarify-gate-state.d.ts +1 -1
  2. package/bundled/clarify/clarify-gate-state.js +3 -3
  3. package/bundled/clarify/clarify-gate.d.ts +21 -14
  4. package/bundled/clarify/clarify-gate.js +118 -111
  5. package/bundled/clarify/clarify-select-panel.d.ts +16 -9
  6. package/bundled/clarify/clarify-select-panel.js +65 -67
  7. package/bundled/clarify/clarify-ui-state.d.ts +12 -10
  8. package/bundled/clarify/clarify-ui-state.js +26 -26
  9. package/bundled/clarify/parse-clarify-answer.d.ts +29 -18
  10. package/bundled/clarify/parse-clarify-answer.js +39 -45
  11. package/bundled/clarify/question-format.d.ts +34 -23
  12. package/bundled/clarify/question-format.js +112 -119
  13. package/bundled/clarify/questionnaire-tool.d.ts +28 -17
  14. package/bundled/clarify/questionnaire-tool.js +180 -144
  15. package/bundled/clarify/scope-discovery.d.ts +8 -5
  16. package/bundled/clarify/scope-discovery.js +102 -110
  17. package/bundled/clarify/session-questionnaire.d.ts +48 -13
  18. package/bundled/clarify/session-questionnaire.js +304 -312
  19. package/bundled/clarify/session-questionnaire.types.d.ts +29 -27
  20. package/bundled/clarify/session-questionnaire.types.js +10 -10
  21. package/bundled/components/kubbisec-model-selector.d.ts +47 -34
  22. package/bundled/components/kubbisec-model-selector.js +187 -177
  23. package/bundled/config/config.d.ts +6 -6
  24. package/bundled/config/config.js +55 -55
  25. package/bundled/config/detect-local-llm-providers.d.ts +26 -16
  26. package/bundled/config/detect-local-llm-providers.js +130 -142
  27. package/bundled/config/ensure-kubbisec-project-settings.d.ts +9 -9
  28. package/bundled/config/ensure-kubbisec-project-settings.js +44 -48
  29. package/bundled/config/extended-context.d.ts +5 -6
  30. package/bundled/config/extended-context.js +23 -22
  31. package/bundled/config/feature-flags.d.ts +10 -2
  32. package/bundled/config/feature-flags.js +8 -2
  33. package/bundled/config/format-kubbisec-footer-status.d.ts +1 -1
  34. package/bundled/config/format-kubbisec-footer-status.js +26 -31
  35. package/bundled/config/kubbisec-extension-manifest.d.ts +22 -2
  36. package/bundled/config/kubbisec-extension-manifest.js +20 -20
  37. package/bundled/config/llm-config-mutations.d.ts +51 -25
  38. package/bundled/config/llm-config-mutations.js +173 -182
  39. package/bundled/config/llm-config.d.ts +54 -41
  40. package/bundled/config/llm-config.js +199 -199
  41. package/bundled/config/llm-provider-catalog.d.ts +18 -15
  42. package/bundled/config/llm-provider-catalog.js +45 -46
  43. package/bundled/config/materialize-kubbisec-pi-resources.d.ts +1 -1
  44. package/bundled/config/materialize-kubbisec-pi-resources.js +174 -183
  45. package/bundled/config/register-custom-llm-providers.d.ts +11 -5
  46. package/bundled/config/register-custom-llm-providers.js +17 -15
  47. package/bundled/config/register-kubbisec-llm-provider.d.ts +14 -10
  48. package/bundled/config/register-kubbisec-llm-provider.js +50 -42
  49. package/bundled/config/resolve-agents-context-file.d.ts +1 -1
  50. package/bundled/config/resolve-agents-context-file.js +33 -34
  51. package/bundled/config/resource-budget.d.ts +12 -12
  52. package/bundled/config/resource-budget.js +28 -28
  53. package/bundled/config/sync-kubbisec-pi-models.d.ts +6 -3
  54. package/bundled/config/sync-kubbisec-pi-models.js +58 -58
  55. package/bundled/copy/cli-reference-index.d.ts +3 -2
  56. package/bundled/copy/cli-reference-index.js +1 -1
  57. package/bundled/copy/kubbisec-shell-copy.d.ts +11 -6
  58. package/bundled/copy/kubbisec-shell-copy.js +1 -1
  59. package/bundled/extensions/cli-local-shared.d.ts +45 -26
  60. package/bundled/extensions/cli-local-shared.js +128 -118
  61. package/bundled/extensions/kubbisec-aspm-local.extension.d.ts +18 -15
  62. package/bundled/extensions/kubbisec-aspm-local.extension.js +118 -114
  63. package/bundled/extensions/kubbisec-brand.extension.d.ts +1 -1
  64. package/bundled/extensions/kubbisec-brand.extension.js +25 -25
  65. package/bundled/extensions/kubbisec-byok-provider.extension.d.ts +1 -1
  66. package/bundled/extensions/kubbisec-byok-provider.extension.js +2 -2
  67. package/bundled/extensions/kubbisec-clarify.extension.d.ts +64 -35
  68. package/bundled/extensions/kubbisec-clarify.extension.js +323 -305
  69. package/bundled/extensions/kubbisec-exit.extension.d.ts +1 -1
  70. package/bundled/extensions/kubbisec-exit.extension.js +29 -32
  71. package/bundled/extensions/kubbisec-extended-context.extension.d.ts +1 -1
  72. package/bundled/extensions/kubbisec-extended-context.extension.js +56 -43
  73. package/bundled/extensions/kubbisec-footer.extension.d.ts +14 -14
  74. package/bundled/extensions/kubbisec-footer.extension.js +205 -215
  75. package/bundled/extensions/kubbisec-github-local.extension.d.ts +26 -18
  76. package/bundled/extensions/kubbisec-github-local.extension.js +123 -116
  77. package/bundled/extensions/kubbisec-llm-config.extension.d.ts +1 -1
  78. package/bundled/extensions/kubbisec-llm-config.extension.js +200 -181
  79. package/bundled/extensions/kubbisec-memory.extension.d.ts +9 -7
  80. package/bundled/extensions/kubbisec-memory.extension.js +88 -95
  81. package/bundled/extensions/kubbisec-naus-local.extension.d.ts +18 -15
  82. package/bundled/extensions/kubbisec-naus-local.extension.js +132 -111
  83. package/bundled/extensions/kubbisec-platform-tools.extension.d.ts +31 -21
  84. package/bundled/extensions/kubbisec-platform-tools.extension.js +152 -152
  85. package/bundled/extensions/kubbisec-runtime-status.extension.d.ts +10 -8
  86. package/bundled/extensions/kubbisec-runtime-status.extension.js +15 -13
  87. package/bundled/extensions/kubbisec-scope.extension.d.ts +12 -7
  88. package/bundled/extensions/kubbisec-scope.extension.js +13 -13
  89. package/bundled/extensions/kubbisec-skill-mentions.extension.d.ts +27 -16
  90. package/bundled/extensions/kubbisec-skill-mentions.extension.js +73 -63
  91. package/bundled/extensions/kubbisec-skill-telemetry.extension.d.ts +2 -3
  92. package/bundled/extensions/kubbisec-skill-telemetry.extension.js +59 -64
  93. package/bundled/extensions/kubbisec-theme-lock.extension.d.ts +1 -1
  94. package/bundled/extensions/kubbisec-theme-lock.extension.js +33 -34
  95. package/bundled/extensions/kubbisec-ui.extension.d.ts +1 -1
  96. package/bundled/extensions/kubbisec-ui.extension.js +114 -109
  97. package/bundled/extensions/kubbisec-workflow.extension.d.ts +20 -18
  98. package/bundled/extensions/kubbisec-workflow.extension.js +138 -140
  99. package/bundled/node_modules/@aspm/shared/dist/redaction.test.d.ts +2 -0
  100. package/bundled/node_modules/@aspm/shared/dist/redaction.test.d.ts.map +1 -0
  101. package/bundled/node_modules/@aspm/shared/dist/redaction.test.js +626 -0
  102. package/bundled/node_modules/@aspm/shared/dist/redaction.test.js.map +1 -0
  103. package/bundled/resolve-bundled-dist-root.js +122 -131
  104. package/bundled/skills/at-path-mentions.d.ts +1 -1
  105. package/bundled/skills/at-path-mentions.js +146 -153
  106. package/bundled/skills/chat-mention-render.d.ts +2 -2
  107. package/bundled/skills/chat-mention-render.js +121 -126
  108. package/bundled/skills/chat-mentions.d.ts +17 -8
  109. package/bundled/skills/chat-mentions.js +76 -76
  110. package/bundled/skills/list-bundled-skills.d.ts +3 -3
  111. package/bundled/skills/list-bundled-skills.js +33 -35
  112. package/bundled/skills/skill-mention.d.ts +10 -2
  113. package/bundled/skills/skill-mention.js +10 -2
  114. package/bundled/theme/clear-terminal.d.ts +1 -1
  115. package/bundled/theme/clear-terminal.js +3 -4
  116. package/bundled/theme/footer-render-hook.d.ts +1 -1
  117. package/bundled/theme/footer-render-hook.js +3 -3
  118. package/bundled/theme/kubbisec-brand-fg.d.ts +1 -1
  119. package/bundled/theme/kubbisec-brand-fg.js +2 -2
  120. package/bundled/theme/kubbisec-menu-themes.d.ts +7 -7
  121. package/bundled/theme/kubbisec-menu-themes.js +30 -31
  122. package/bundled/theme/kubbisec-theme-name.d.ts +1 -1
  123. package/bundled/theme/kubbisec-theme-name.js +1 -1
  124. package/bundled/theme/patch-pi-settings-theme.runtime.d.ts +1 -1
  125. package/bundled/theme/patch-pi-settings-theme.runtime.js +11 -10
  126. package/bundled/theme/render-compact-header.d.ts +13 -5
  127. package/bundled/theme/render-compact-header.js +127 -129
  128. package/bundled/workflow/session-workflow-mode.d.ts +1 -1
  129. package/bundled/workflow/session-workflow-mode.js +33 -33
  130. package/package.json +1 -1
@@ -1,3 +1,3 @@
1
1
  export declare function setKubbisecFooterRequestRender(handler: (() => void) | undefined): void;
2
2
  export declare function requestKubbisecFooterRender(): void;
3
- //# sourceMappingURL=footer-render-hook.d.ts.map
3
+ //# sourceMappingURL=footer-render-hook.d.ts.map
@@ -1,8 +1,8 @@
1
1
  let requestRender;
2
2
  export function setKubbisecFooterRequestRender(handler) {
3
- requestRender = handler;
3
+ requestRender = handler;
4
4
  }
5
5
  export function requestKubbisecFooterRender() {
6
- requestRender?.();
6
+ requestRender?.();
7
7
  }
8
- //# sourceMappingURL=footer-render-hook.js.map
8
+ //# sourceMappingURL=footer-render-hook.js.map
@@ -1,4 +1,4 @@
1
1
  /** Brand cyan #28DCF9 — kubbisec.json `accent`, footer branch, hex `mark.ansi`. */
2
2
  export declare const KUBBISEC_BRAND_CYAN_ANSI = "\u001B[38;2;40;220;249m";
3
3
  export declare function kubbisecBrandFg(text: string): string;
4
- //# sourceMappingURL=kubbisec-brand-fg.d.ts.map
4
+ //# sourceMappingURL=kubbisec-brand-fg.d.ts.map
@@ -2,6 +2,6 @@
2
2
  export const KUBBISEC_BRAND_CYAN_ANSI = "\x1b[38;2;40;220;249m";
3
3
  const ANSI_RESET = "\x1b[0m";
4
4
  export function kubbisecBrandFg(text) {
5
- return `${KUBBISEC_BRAND_CYAN_ANSI}${text}${ANSI_RESET}`;
5
+ return `${KUBBISEC_BRAND_CYAN_ANSI}${text}${ANSI_RESET}`;
6
6
  }
7
- //# sourceMappingURL=kubbisec-brand-fg.js.map
7
+ //# sourceMappingURL=kubbisec-brand-fg.js.map
@@ -1,16 +1,16 @@
1
1
  import type { EditorTheme } from "@earendil-works/pi-tui";
2
+
2
3
  declare function dimText(text: string): string;
3
4
  /** `/settings` list — current value column and cursor use brand cyan (#28DCF9). */
4
5
  export declare function buildKubbisecSettingsListTheme(): {
5
- label: (text: string, selected: boolean) => string;
6
- value: (text: string, _selected: boolean) => string;
7
- description: typeof dimText;
8
- cursor: string;
9
- hint: typeof dimText;
6
+ label: (text: string, selected: boolean) => string;
7
+ value: (text: string, _selected: boolean) => string;
8
+ description: typeof dimText;
9
+ cursor: string;
10
+ hint: typeof dimText;
10
11
  };
11
12
  /** Map Pi `accent` role to exact brand RGB (footer branch, header). */
12
13
  export declare function patchGlobalThemeAccent(): void;
13
14
  /** Slash-command autocomplete inside the editor — selected row uses brand cyan (#28DCF9). */
14
15
  export declare function withKubbisecSelectListTheme(theme: EditorTheme): EditorTheme;
15
- export {};
16
- //# sourceMappingURL=kubbisec-menu-themes.d.ts.map
16
+ //# sourceMappingURL=kubbisec-menu-themes.d.ts.map
@@ -1,47 +1,46 @@
1
1
  import { kubbisecBrandFg } from "./kubbisec-brand-fg.js";
2
+
2
3
  const brand = (text) => kubbisecBrandFg(text);
3
4
  const PI_THEME_KEY = Symbol.for("@earendil-works/pi-coding-agent:theme");
4
5
  function getPiThemeInstance() {
5
- return globalThis[PI_THEME_KEY];
6
+ return globalThis[PI_THEME_KEY];
6
7
  }
7
8
  function dimText(text) {
8
- const instance = getPiThemeInstance();
9
- return instance ? instance.fg("dim", text) : text;
9
+ const instance = getPiThemeInstance();
10
+ return instance ? instance.fg("dim", text) : text;
10
11
  }
11
12
  /** `/settings` list — current value column and cursor use brand cyan (#28DCF9). */
12
13
  export function buildKubbisecSettingsListTheme() {
13
- return {
14
- label: (text, selected) => (selected ? brand(text) : text),
15
- value: (text, _selected) => brand(text),
16
- description: dimText,
17
- cursor: brand("→ "),
18
- hint: dimText,
19
- };
14
+ return {
15
+ label: (text, selected) => (selected ? brand(text) : text),
16
+ value: (text, _selected) => brand(text),
17
+ description: dimText,
18
+ cursor: brand("→ "),
19
+ hint: dimText,
20
+ };
20
21
  }
21
22
  /** Map Pi `accent` role to exact brand RGB (footer branch, header). */
22
23
  export function patchGlobalThemeAccent() {
23
- const instance = getPiThemeInstance();
24
- if (!instance || instance.__kubbisecMenuPatched)
25
- return;
26
- const originalFg = instance.fg.bind(instance);
27
- instance.fg = (role, text) => {
28
- if (role === "accent")
29
- return brand(text);
30
- return originalFg(role, text);
31
- };
32
- instance.__kubbisecMenuPatched = true;
24
+ const instance = getPiThemeInstance();
25
+ if (!instance || instance.__kubbisecMenuPatched) return;
26
+ const originalFg = instance.fg.bind(instance);
27
+ instance.fg = (role, text) => {
28
+ if (role === "accent") return brand(text);
29
+ return originalFg(role, text);
30
+ };
31
+ instance.__kubbisecMenuPatched = true;
33
32
  }
34
33
  /** Slash-command autocomplete inside the editor — selected row uses brand cyan (#28DCF9). */
35
34
  export function withKubbisecSelectListTheme(theme) {
36
- return {
37
- ...theme,
38
- selectList: {
39
- selectedPrefix: brand,
40
- selectedText: brand,
41
- description: theme.selectList.description,
42
- scrollInfo: theme.selectList.scrollInfo,
43
- noMatch: theme.selectList.noMatch,
44
- },
45
- };
35
+ return {
36
+ ...theme,
37
+ selectList: {
38
+ selectedPrefix: brand,
39
+ selectedText: brand,
40
+ description: theme.selectList.description,
41
+ scrollInfo: theme.selectList.scrollInfo,
42
+ noMatch: theme.selectList.noMatch,
43
+ },
44
+ };
46
45
  }
47
- //# sourceMappingURL=kubbisec-menu-themes.js.map
46
+ //# sourceMappingURL=kubbisec-menu-themes.js.map
@@ -1,2 +1,2 @@
1
1
  export declare const KUBBISEC_THEME_NAME = "kubbisec";
2
- //# sourceMappingURL=kubbisec-theme-name.d.ts.map
2
+ //# sourceMappingURL=kubbisec-theme-name.d.ts.map
@@ -1,2 +1,2 @@
1
1
  export const KUBBISEC_THEME_NAME = "kubbisec";
2
- //# sourceMappingURL=kubbisec-theme-name.js.map
2
+ //# sourceMappingURL=kubbisec-theme-name.js.map
@@ -1,3 +1,3 @@
1
1
  /** Runtime patch for Pi `/settings` current-value column (deep import via require.resolve). */
2
2
  export declare function patchPiSettingsListTheme(): Promise<void>;
3
- //# sourceMappingURL=patch-pi-settings-theme.runtime.d.ts.map
3
+ //# sourceMappingURL=patch-pi-settings-theme.runtime.d.ts.map
@@ -3,14 +3,15 @@ import { pathToFileURL } from "node:url";
3
3
  import { buildKubbisecSettingsListTheme } from "./kubbisec-menu-themes.js";
4
4
  /** Runtime patch for Pi `/settings` current-value column (deep import via require.resolve). */
5
5
  export async function patchPiSettingsListTheme() {
6
- try {
7
- const require = createRequire(import.meta.url);
8
- const themePath = require.resolve("@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js");
9
- const themeMod = (await import(pathToFileURL(themePath).href));
10
- themeMod.getSettingsListTheme = buildKubbisecSettingsListTheme;
11
- }
12
- catch {
13
- // Pi bundle layout differs — accent patch still applies to selected rows.
14
- }
6
+ try {
7
+ const require = createRequire(import.meta.url);
8
+ const themePath = require.resolve(
9
+ "@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js",
10
+ );
11
+ const themeMod = await import(pathToFileURL(themePath).href);
12
+ themeMod.getSettingsListTheme = buildKubbisecSettingsListTheme;
13
+ } catch {
14
+ // Pi bundle layout differs — accent patch still applies to selected rows.
15
+ }
15
16
  }
16
- //# sourceMappingURL=patch-pi-settings-theme.runtime.js.map
17
+ //# sourceMappingURL=patch-pi-settings-theme.runtime.js.map
@@ -1,6 +1,6 @@
1
1
  export type CompactHeaderTheme = {
2
- fg: (role: string, text: string) => string;
3
- bold: (text: string) => string;
2
+ fg: (role: string, text: string) => string;
3
+ bold: (text: string) => string;
4
4
  };
5
5
  /** Works from `dist/theme/` and from materialized `<cwd>/.pi/theme/`. */
6
6
  export declare function resolveTerminalAssetsDir(moduleUrl?: string): string;
@@ -16,6 +16,14 @@ export declare function renderHeaderHintsLine(theme: CompactHeaderTheme): string
16
16
  /** Single-line brand row: mark + wordmark + version + subtitle. */
17
17
  export declare function renderCompactHeaderLine(theme: CompactHeaderTheme, version: string): string;
18
18
  /** Default chat chrome: hex block, wordmark, version, spacer, subtitle, hints. */
19
- export declare function renderCompactHeaderLines(theme: CompactHeaderTheme, version: string, width?: number): string[];
20
- export declare function renderChatHeaderLines(theme: CompactHeaderTheme, version: string, width: number): string[];
21
- //# sourceMappingURL=render-compact-header.d.ts.map
19
+ export declare function renderCompactHeaderLines(
20
+ theme: CompactHeaderTheme,
21
+ version: string,
22
+ width?: number,
23
+ ): string[];
24
+ export declare function renderChatHeaderLines(
25
+ theme: CompactHeaderTheme,
26
+ version: string,
27
+ width: number,
28
+ ): string[];
29
+ //# sourceMappingURL=render-compact-header.d.ts.map
@@ -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
- function centerLines(lines, width) {
51
- return lines.map((line) => centerLine(line, width));
53
+ function _centerLines(lines, 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-arm64",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "KubbiSec CLI — Linux arm64 binary",
5
5
  "license": "UNLICENSED",
6
6
  "os": [