pilotswarm 0.0.1 → 0.4.1

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 (150) hide show
  1. package/README.md +37 -1
  2. package/mcp/README.md +484 -0
  3. package/mcp/dist/bin/pilotswarm-mcp.d.ts +3 -0
  4. package/mcp/dist/bin/pilotswarm-mcp.d.ts.map +1 -0
  5. package/mcp/dist/bin/pilotswarm-mcp.js +367 -0
  6. package/mcp/dist/bin/pilotswarm-mcp.js.map +1 -0
  7. package/mcp/dist/src/auth.d.ts +7 -0
  8. package/mcp/dist/src/auth.d.ts.map +1 -0
  9. package/mcp/dist/src/auth.js +99 -0
  10. package/mcp/dist/src/auth.js.map +1 -0
  11. package/mcp/dist/src/context.d.ts +48 -0
  12. package/mcp/dist/src/context.d.ts.map +1 -0
  13. package/mcp/dist/src/context.js +83 -0
  14. package/mcp/dist/src/context.js.map +1 -0
  15. package/mcp/dist/src/index.d.ts +4 -0
  16. package/mcp/dist/src/index.d.ts.map +1 -0
  17. package/mcp/dist/src/index.js +3 -0
  18. package/mcp/dist/src/index.js.map +1 -0
  19. package/mcp/dist/src/prompts/skills.d.ts +4 -0
  20. package/mcp/dist/src/prompts/skills.d.ts.map +1 -0
  21. package/mcp/dist/src/prompts/skills.js +11 -0
  22. package/mcp/dist/src/prompts/skills.js.map +1 -0
  23. package/mcp/dist/src/resources/agents.d.ts +4 -0
  24. package/mcp/dist/src/resources/agents.d.ts.map +1 -0
  25. package/mcp/dist/src/resources/agents.js +64 -0
  26. package/mcp/dist/src/resources/agents.js.map +1 -0
  27. package/mcp/dist/src/resources/facts.d.ts +4 -0
  28. package/mcp/dist/src/resources/facts.d.ts.map +1 -0
  29. package/mcp/dist/src/resources/facts.js +125 -0
  30. package/mcp/dist/src/resources/facts.js.map +1 -0
  31. package/mcp/dist/src/resources/models.d.ts +4 -0
  32. package/mcp/dist/src/resources/models.d.ts.map +1 -0
  33. package/mcp/dist/src/resources/models.js +43 -0
  34. package/mcp/dist/src/resources/models.js.map +1 -0
  35. package/mcp/dist/src/resources/sessions.d.ts +4 -0
  36. package/mcp/dist/src/resources/sessions.d.ts.map +1 -0
  37. package/mcp/dist/src/resources/sessions.js +190 -0
  38. package/mcp/dist/src/resources/sessions.js.map +1 -0
  39. package/mcp/dist/src/resources/subscriptions.d.ts +9 -0
  40. package/mcp/dist/src/resources/subscriptions.d.ts.map +1 -0
  41. package/mcp/dist/src/resources/subscriptions.js +157 -0
  42. package/mcp/dist/src/resources/subscriptions.js.map +1 -0
  43. package/mcp/dist/src/server.d.ts +4 -0
  44. package/mcp/dist/src/server.d.ts.map +1 -0
  45. package/mcp/dist/src/server.js +59 -0
  46. package/mcp/dist/src/server.js.map +1 -0
  47. package/mcp/dist/src/tools/agents.d.ts +4 -0
  48. package/mcp/dist/src/tools/agents.d.ts.map +1 -0
  49. package/mcp/dist/src/tools/agents.js +317 -0
  50. package/mcp/dist/src/tools/agents.js.map +1 -0
  51. package/mcp/dist/src/tools/facts.d.ts +4 -0
  52. package/mcp/dist/src/tools/facts.d.ts.map +1 -0
  53. package/mcp/dist/src/tools/facts.js +151 -0
  54. package/mcp/dist/src/tools/facts.js.map +1 -0
  55. package/mcp/dist/src/tools/models.d.ts +4 -0
  56. package/mcp/dist/src/tools/models.d.ts.map +1 -0
  57. package/mcp/dist/src/tools/models.js +256 -0
  58. package/mcp/dist/src/tools/models.js.map +1 -0
  59. package/mcp/dist/src/tools/sessions.d.ts +4 -0
  60. package/mcp/dist/src/tools/sessions.d.ts.map +1 -0
  61. package/mcp/dist/src/tools/sessions.js +606 -0
  62. package/mcp/dist/src/tools/sessions.js.map +1 -0
  63. package/mcp/dist/src/util/command.d.ts +52 -0
  64. package/mcp/dist/src/util/command.d.ts.map +1 -0
  65. package/mcp/dist/src/util/command.js +78 -0
  66. package/mcp/dist/src/util/command.js.map +1 -0
  67. package/package.json +82 -6
  68. package/tui/README.md +35 -0
  69. package/tui/bin/tui.js +30 -0
  70. package/tui/plugins/.mcp.json +7 -0
  71. package/tui/plugins/plugin.json +13 -0
  72. package/tui/plugins/session-policy.json +8 -0
  73. package/tui/src/app.js +850 -0
  74. package/tui/src/auth/cli.js +111 -0
  75. package/tui/src/auth/entra-auth.js +218 -0
  76. package/tui/src/bootstrap-env.js +176 -0
  77. package/tui/src/embedded-workers.js +79 -0
  78. package/tui/src/http-transport-host.js +106 -0
  79. package/tui/src/index.js +340 -0
  80. package/tui/src/node-sdk-transport.js +1794 -0
  81. package/tui/src/platform.js +984 -0
  82. package/tui/src/plugin-config.js +273 -0
  83. package/tui/src/portal.js +7 -0
  84. package/tui/src/version.js +7 -0
  85. package/tui/tui-splash-mobile.txt +7 -0
  86. package/tui/tui-splash.txt +11 -0
  87. package/ui/core/README.md +6 -0
  88. package/ui/core/src/commands.js +93 -0
  89. package/ui/core/src/context-usage.js +212 -0
  90. package/ui/core/src/controller.js +6201 -0
  91. package/ui/core/src/formatting.js +1036 -0
  92. package/ui/core/src/history.js +950 -0
  93. package/ui/core/src/index.js +13 -0
  94. package/ui/core/src/layout.js +332 -0
  95. package/ui/core/src/reducer.js +1952 -0
  96. package/ui/core/src/selectors.js +5419 -0
  97. package/ui/core/src/session-errors.js +14 -0
  98. package/ui/core/src/session-tree.js +151 -0
  99. package/ui/core/src/state.js +251 -0
  100. package/ui/core/src/store.js +23 -0
  101. package/ui/core/src/system-titles.js +24 -0
  102. package/ui/core/src/themes/catppuccin-mocha.js +56 -0
  103. package/ui/core/src/themes/cobalt2.js +56 -0
  104. package/ui/core/src/themes/dark-high-contrast.js +56 -0
  105. package/ui/core/src/themes/daylight.js +62 -0
  106. package/ui/core/src/themes/dracula.js +56 -0
  107. package/ui/core/src/themes/github-dark.js +56 -0
  108. package/ui/core/src/themes/github-light.js +59 -0
  109. package/ui/core/src/themes/gruvbox-dark.js +56 -0
  110. package/ui/core/src/themes/hacker-x-matrix.js +56 -0
  111. package/ui/core/src/themes/hacker-x-orion-prime.js +56 -0
  112. package/ui/core/src/themes/helpers.js +79 -0
  113. package/ui/core/src/themes/high-contrast-mono.js +59 -0
  114. package/ui/core/src/themes/index.js +52 -0
  115. package/ui/core/src/themes/light-high-contrast.js +62 -0
  116. package/ui/core/src/themes/noctis-obscuro.js +56 -0
  117. package/ui/core/src/themes/noctis.js +56 -0
  118. package/ui/core/src/themes/paper-ink.js +62 -0
  119. package/ui/core/src/themes/solarized-ops.js +59 -0
  120. package/ui/core/src/themes/terminal-green.js +59 -0
  121. package/ui/core/src/themes/tokyo-night.js +56 -0
  122. package/ui/react/README.md +5 -0
  123. package/ui/react/src/chat-status.js +39 -0
  124. package/ui/react/src/components.js +1989 -0
  125. package/ui/react/src/index.js +4 -0
  126. package/ui/react/src/platform.js +15 -0
  127. package/ui/react/src/use-controller-state.js +38 -0
  128. package/ui/react/src/web-app.js +4457 -0
  129. package/web/README.md +198 -0
  130. package/web/api/router.js +196 -0
  131. package/web/api/ws.js +152 -0
  132. package/web/auth/authz/engine.js +204 -0
  133. package/web/auth/config.js +115 -0
  134. package/web/auth/index.js +175 -0
  135. package/web/auth/normalize/entra.js +22 -0
  136. package/web/auth/providers/entra.js +76 -0
  137. package/web/auth/providers/none.js +24 -0
  138. package/web/auth.js +10 -0
  139. package/web/bin/serve.js +53 -0
  140. package/web/config.js +20 -0
  141. package/web/dist/app.js +469 -0
  142. package/web/dist/assets/index-DmGOcKR-.css +1 -0
  143. package/web/dist/assets/index-xJ8IzIZY.js +24 -0
  144. package/web/dist/assets/msal-CytV9RFv.js +7 -0
  145. package/web/dist/assets/pilotswarm-D9pEmenA.js +90 -0
  146. package/web/dist/assets/react-CEPDSRB6.js +1 -0
  147. package/web/dist/index.html +16 -0
  148. package/web/runtime.js +455 -0
  149. package/web/server.js +276 -0
  150. package/index.js +0 -1
@@ -0,0 +1,62 @@
1
+ import { createTheme } from "./helpers.js";
2
+
3
+ // Sharp neutral light theme. Every ANSI slot — including `white`, which agent
4
+ // output renders through constantly — holds ≥ 4.5:1 contrast on the white
5
+ // background, so assistant text, dims, and code stay readable.
6
+ const daylightTheme = createTheme({
7
+ id: "daylight",
8
+ label: "Daylight",
9
+ description: "Crisp white workspace with near-black text and deep saturated accents — every color slot holds AA contrast.",
10
+ page: {
11
+ background: "#ffffff",
12
+ foreground: "#111827",
13
+ overlayBackground: "#ffffff",
14
+ overlayForeground: "#111827",
15
+ hintColor: "#4b5563",
16
+ modalBackdrop: "rgba(17, 24, 39, 0.35)",
17
+ modalBackground: "#ffffff",
18
+ modalBorder: "#d1d5db",
19
+ modalForeground: "#111827",
20
+ modalMuted: "#4b5563",
21
+ modalSelectedBackground: "#dbeafe",
22
+ modalSelectedBorder: "#1d4ed8",
23
+ modalSelectedForeground: "#1e3a8a",
24
+ },
25
+ terminal: {
26
+ background: "#ffffff",
27
+ foreground: "#111827",
28
+ cursor: "#1d4ed8",
29
+ cursorAccent: "#ffffff",
30
+ selectionBackground: "#bfdbfe",
31
+ black: "#111827",
32
+ red: "#b91c1c",
33
+ green: "#047857",
34
+ yellow: "#92400e",
35
+ blue: "#1d4ed8",
36
+ magenta: "#6d28d9",
37
+ cyan: "#0e7490",
38
+ white: "#4b5563",
39
+ brightBlack: "#374151",
40
+ brightRed: "#991b1b",
41
+ brightGreen: "#065f46",
42
+ brightYellow: "#78350f",
43
+ brightBlue: "#1e40af",
44
+ brightMagenta: "#5b21b6",
45
+ brightCyan: "#155e75",
46
+ brightWhite: "#111827",
47
+ },
48
+ tui: {
49
+ surface: "#ffffff",
50
+ border: "#d1d5db",
51
+ userChat: "#1e40af",
52
+ userChatLabel: "#1e3a8a",
53
+ activeHighlightBackground: "#dbeafe",
54
+ activeHighlightForeground: "#1e3a8a",
55
+ selectionBackground: "#1d4ed8",
56
+ selectionForeground: "#ffffff",
57
+ promptCursorBackground: "#1d4ed8",
58
+ promptCursorForeground: "#ffffff",
59
+ },
60
+ });
61
+
62
+ export default daylightTheme;
@@ -0,0 +1,56 @@
1
+ import { createTheme } from "./helpers.js";
2
+
3
+ const draculaTheme = createTheme({
4
+ id: "dracula",
5
+ label: "Dracula",
6
+ description: "Classic Dracula contrast with neon green, pink, and violet accents.",
7
+ page: {
8
+ background: "#282a36",
9
+ foreground: "#f8f8f2",
10
+ overlayBackground: "#282a36",
11
+ overlayForeground: "#f8f8f2",
12
+ hintColor: "#bd93f9",
13
+ modalBackdrop: "rgba(24, 25, 33, 0.72)",
14
+ modalBackground: "#313442",
15
+ modalBorder: "#6272a4",
16
+ modalForeground: "#f8f8f2",
17
+ modalMuted: "#bd93f9",
18
+ modalSelectedBackground: "#44475a",
19
+ modalSelectedBorder: "#bd93f9",
20
+ modalSelectedForeground: "#f8f8f2",
21
+ },
22
+ terminal: {
23
+ background: "#282a36",
24
+ foreground: "#f8f8f2",
25
+ cursor: "#f8f8f2",
26
+ cursorAccent: "#282a36",
27
+ selectionBackground: "rgba(189, 147, 249, 0.24)",
28
+ black: "#21222c",
29
+ red: "#ff5555",
30
+ green: "#50fa7b",
31
+ yellow: "#f1fa8c",
32
+ blue: "#bd93f9",
33
+ magenta: "#ff79c6",
34
+ cyan: "#8be9fd",
35
+ white: "#f8f8f2",
36
+ brightBlack: "#6272a4",
37
+ brightRed: "#ff6e6e",
38
+ brightGreen: "#69ff94",
39
+ brightYellow: "#ffffa5",
40
+ brightBlue: "#d6acff",
41
+ brightMagenta: "#ff92df",
42
+ brightCyan: "#a4ffff",
43
+ brightWhite: "#ffffff",
44
+ },
45
+ tui: {
46
+ surface: "#282a36",
47
+ activeHighlightBackground: "#44475a",
48
+ activeHighlightForeground: "#f8f8f2",
49
+ selectionBackground: "#bd93f9",
50
+ selectionForeground: "#282a36",
51
+ promptCursorBackground: "#f8f8f2",
52
+ promptCursorForeground: "#282a36",
53
+ },
54
+ });
55
+
56
+ export default draculaTheme;
@@ -0,0 +1,56 @@
1
+ import { createTheme } from "./helpers.js";
2
+
3
+ const githubDarkTheme = createTheme({
4
+ id: "github-dark",
5
+ label: "GitHub Dark",
6
+ description: "GitHub dark palette with soft blue accents and cool neutrals.",
7
+ page: {
8
+ background: "#0d1117",
9
+ foreground: "#e6edf3",
10
+ overlayBackground: "#0d1117",
11
+ overlayForeground: "#e6edf3",
12
+ hintColor: "#8b949e",
13
+ modalBackdrop: "rgba(1, 4, 9, 0.64)",
14
+ modalBackground: "#161b22",
15
+ modalBorder: "#30363d",
16
+ modalForeground: "#e6edf3",
17
+ modalMuted: "#8b949e",
18
+ modalSelectedBackground: "#1f6feb33",
19
+ modalSelectedBorder: "#2f81f7",
20
+ modalSelectedForeground: "#79c0ff",
21
+ },
22
+ terminal: {
23
+ background: "#0d1117",
24
+ foreground: "#e6edf3",
25
+ cursor: "#2f81f7",
26
+ cursorAccent: "#0d1117",
27
+ selectionBackground: "rgba(56, 139, 253, 0.28)",
28
+ black: "#484f58",
29
+ red: "#ff7b72",
30
+ green: "#3fb950",
31
+ yellow: "#d29922",
32
+ blue: "#58a6ff",
33
+ magenta: "#bc8cff",
34
+ cyan: "#39c5cf",
35
+ white: "#b1bac4",
36
+ brightBlack: "#6e7681",
37
+ brightRed: "#ffa198",
38
+ brightGreen: "#56d364",
39
+ brightYellow: "#e3b341",
40
+ brightBlue: "#79c0ff",
41
+ brightMagenta: "#d2a8ff",
42
+ brightCyan: "#56d4dd",
43
+ brightWhite: "#f0f6fc",
44
+ },
45
+ tui: {
46
+ surface: "#0d1117",
47
+ activeHighlightBackground: "#1f4b7a",
48
+ activeHighlightForeground: "#f0f6fc",
49
+ selectionBackground: "#79c0ff",
50
+ selectionForeground: "#0d1117",
51
+ promptCursorBackground: "#2f81f7",
52
+ promptCursorForeground: "#0d1117",
53
+ },
54
+ });
55
+
56
+ export default githubDarkTheme;
@@ -0,0 +1,59 @@
1
+ import { createTheme } from "./helpers.js";
2
+
3
+ const githubLightTheme = createTheme({
4
+ id: "github-light",
5
+ label: "GitHub Light",
6
+ description: "GitHub light palette with crisp neutrals, blue actions, and high-contrast status colors.",
7
+ page: {
8
+ background: "#ffffff",
9
+ foreground: "#1f2328",
10
+ overlayBackground: "#ffffff",
11
+ overlayForeground: "#1f2328",
12
+ hintColor: "#57606a",
13
+ modalBackdrop: "rgba(31, 35, 40, 0.34)",
14
+ modalBackground: "#ffffff",
15
+ modalBorder: "#d0d7de",
16
+ modalForeground: "#1f2328",
17
+ modalMuted: "#57606a",
18
+ modalSelectedBackground: "#ddf4ff",
19
+ modalSelectedBorder: "#0969da",
20
+ modalSelectedForeground: "#0550ae",
21
+ },
22
+ terminal: {
23
+ background: "#ffffff",
24
+ foreground: "#1f2328",
25
+ cursor: "#0969da",
26
+ cursorAccent: "#ffffff",
27
+ selectionBackground: "#ddf4ff",
28
+ black: "#24292f",
29
+ red: "#cf222e",
30
+ green: "#1a7f37",
31
+ yellow: "#9a6700",
32
+ blue: "#0969da",
33
+ magenta: "#8250df",
34
+ cyan: "#1b7c83",
35
+ white: "#6e7781",
36
+ brightBlack: "#57606a",
37
+ brightRed: "#a40e26",
38
+ brightGreen: "#116329",
39
+ brightYellow: "#7d4e00",
40
+ brightBlue: "#0550ae",
41
+ brightMagenta: "#6639ba",
42
+ brightCyan: "#0f6f78",
43
+ brightWhite: "#1f2328",
44
+ },
45
+ tui: {
46
+ surface: "#ffffff",
47
+ border: "#d0d7de",
48
+ userChat: "#0969da",
49
+ userChatLabel: "#0550ae",
50
+ activeHighlightBackground: "#ddf4ff",
51
+ activeHighlightForeground: "#0550ae",
52
+ selectionBackground: "#0969da",
53
+ selectionForeground: "#ffffff",
54
+ promptCursorBackground: "#0969da",
55
+ promptCursorForeground: "#ffffff",
56
+ },
57
+ });
58
+
59
+ export default githubLightTheme;
@@ -0,0 +1,56 @@
1
+ import { createTheme } from "./helpers.js";
2
+
3
+ const gruvboxDarkTheme = createTheme({
4
+ id: "gruvbox-dark",
5
+ label: "Gruvbox Dark",
6
+ description: "Retro warm palette with earthy browns, oranges, and high readability.",
7
+ page: {
8
+ background: "#282828",
9
+ foreground: "#ebdbb2",
10
+ overlayBackground: "#282828",
11
+ overlayForeground: "#ebdbb2",
12
+ hintColor: "#a89984",
13
+ modalBackdrop: "rgba(40, 40, 40, 0.74)",
14
+ modalBackground: "#3c3836",
15
+ modalBorder: "#504945",
16
+ modalForeground: "#ebdbb2",
17
+ modalMuted: "#a89984",
18
+ modalSelectedBackground: "#504945",
19
+ modalSelectedBorder: "#fabd2f",
20
+ modalSelectedForeground: "#fbf1c7",
21
+ },
22
+ terminal: {
23
+ background: "#282828",
24
+ foreground: "#ebdbb2",
25
+ cursor: "#ebdbb2",
26
+ cursorAccent: "#282828",
27
+ selectionBackground: "rgba(250, 189, 47, 0.22)",
28
+ black: "#282828",
29
+ red: "#cc241d",
30
+ green: "#98971a",
31
+ yellow: "#d79921",
32
+ blue: "#458588",
33
+ magenta: "#b16286",
34
+ cyan: "#689d6a",
35
+ white: "#a89984",
36
+ brightBlack: "#928374",
37
+ brightRed: "#fb4934",
38
+ brightGreen: "#b8bb26",
39
+ brightYellow: "#fabd2f",
40
+ brightBlue: "#83a598",
41
+ brightMagenta: "#d3869b",
42
+ brightCyan: "#8ec07c",
43
+ brightWhite: "#ebdbb2",
44
+ },
45
+ tui: {
46
+ surface: "#282828",
47
+ activeHighlightBackground: "#504945",
48
+ activeHighlightForeground: "#fbf1c7",
49
+ selectionBackground: "#fabd2f",
50
+ selectionForeground: "#282828",
51
+ promptCursorBackground: "#ebdbb2",
52
+ promptCursorForeground: "#282828",
53
+ },
54
+ });
55
+
56
+ export default gruvboxDarkTheme;
@@ -0,0 +1,56 @@
1
+ import { createTheme } from "./helpers.js";
2
+
3
+ const hackerXMatrixTheme = createTheme({
4
+ id: "hacker-x-matrix",
5
+ label: "Hacker X - Matrix",
6
+ description: "Black-and-phosphor terminal palette with vivid green glow and CRT-style contrast.",
7
+ page: {
8
+ background: "#030603",
9
+ foreground: "#c8ffc8",
10
+ overlayBackground: "#030603",
11
+ overlayForeground: "#c8ffc8",
12
+ hintColor: "#59a659",
13
+ modalBackdrop: "rgba(0, 6, 0, 0.82)",
14
+ modalBackground: "#081208",
15
+ modalBorder: "#1f5f1f",
16
+ modalForeground: "#d6ffd6",
17
+ modalMuted: "#6dbb6d",
18
+ modalSelectedBackground: "#0f240f",
19
+ modalSelectedBorder: "#39ff14",
20
+ modalSelectedForeground: "#dfffdf",
21
+ },
22
+ terminal: {
23
+ background: "#000000",
24
+ foreground: "#c8ffc8",
25
+ cursor: "#39ff14",
26
+ cursorAccent: "#000000",
27
+ selectionBackground: "rgba(57, 255, 20, 0.2)",
28
+ black: "#031003",
29
+ red: "#39ff14",
30
+ green: "#2a7a22",
31
+ yellow: "#4a8a30",
32
+ blue: "#1a6a4a",
33
+ magenta: "#2a7a3a",
34
+ cyan: "#2a8a5a",
35
+ white: "#b7f7b7",
36
+ brightBlack: "#59a659",
37
+ brightRed: "#9aff86",
38
+ brightGreen: "#7dff66",
39
+ brightYellow: "#e0ff8a",
40
+ brightBlue: "#61ffc2",
41
+ brightMagenta: "#b4ffb4",
42
+ brightCyan: "#98ffe0",
43
+ brightWhite: "#e8ffe8",
44
+ },
45
+ tui: {
46
+ surface: "#030603",
47
+ activeHighlightBackground: "#1a3a1a",
48
+ activeHighlightForeground: "#e8ffe8",
49
+ selectionBackground: "#39ff14",
50
+ selectionForeground: "#000000",
51
+ promptCursorBackground: "#39ff14",
52
+ promptCursorForeground: "#000000",
53
+ },
54
+ });
55
+
56
+ export default hackerXMatrixTheme;
@@ -0,0 +1,56 @@
1
+ import { createTheme } from "./helpers.js";
2
+
3
+ const hackerXOrionPrimeTheme = createTheme({
4
+ id: "hacker-x-orion-prime",
5
+ label: "Hacker X - Orion Prime",
6
+ description: "Deep-space navy palette with electric cyan, violet, and amber accents.",
7
+ page: {
8
+ background: "#0a0f1e",
9
+ foreground: "#e8f2ff",
10
+ overlayBackground: "#0a0f1e",
11
+ overlayForeground: "#e8f2ff",
12
+ hintColor: "#7e90b5",
13
+ modalBackdrop: "rgba(6, 10, 24, 0.76)",
14
+ modalBackground: "#121a30",
15
+ modalBorder: "#2d4a73",
16
+ modalForeground: "#edf5ff",
17
+ modalMuted: "#93a7cc",
18
+ modalSelectedBackground: "#19365f",
19
+ modalSelectedBorder: "#55c2ff",
20
+ modalSelectedForeground: "#f3fbff",
21
+ },
22
+ terminal: {
23
+ background: "#0a0f1e",
24
+ foreground: "#e8f2ff",
25
+ cursor: "#55c2ff",
26
+ cursorAccent: "#0a0f1e",
27
+ selectionBackground: "rgba(85, 194, 255, 0.22)",
28
+ black: "#10182b",
29
+ red: "#ff6b88",
30
+ green: "#67f5c2",
31
+ yellow: "#ffd36b",
32
+ blue: "#55c2ff",
33
+ magenta: "#c79bff",
34
+ cyan: "#7ceeff",
35
+ white: "#c3d4ef",
36
+ brightBlack: "#7e90b5",
37
+ brightRed: "#ff8aa2",
38
+ brightGreen: "#8cffd8",
39
+ brightYellow: "#ffe28f",
40
+ brightBlue: "#8fdcff",
41
+ brightMagenta: "#d8b6ff",
42
+ brightCyan: "#a2f5ff",
43
+ brightWhite: "#ffffff",
44
+ },
45
+ tui: {
46
+ surface: "#0c1325",
47
+ activeHighlightBackground: "#173052",
48
+ activeHighlightForeground: "#f3fbff",
49
+ selectionBackground: "#55c2ff",
50
+ selectionForeground: "#0a0f1e",
51
+ promptCursorBackground: "#55c2ff",
52
+ promptCursorForeground: "#0a0f1e",
53
+ },
54
+ });
55
+
56
+ export default hackerXOrionPrimeTheme;
@@ -0,0 +1,79 @@
1
+ function freezeTheme(theme) {
2
+ return Object.freeze({
3
+ ...theme,
4
+ page: Object.freeze({ ...(theme.page || {}) }),
5
+ terminal: Object.freeze({ ...(theme.terminal || {}) }),
6
+ tui: Object.freeze({ ...(theme.tui || {}) }),
7
+ });
8
+ }
9
+
10
+ function parseHexChannel(value) {
11
+ return Number.parseInt(value, 16) / 255;
12
+ }
13
+
14
+ function normalizeHexColor(value) {
15
+ const color = String(value || "").trim();
16
+ if (/^#[0-9a-f]{3}$/iu.test(color)) {
17
+ return `#${color.slice(1).split("").map((channel) => channel + channel).join("")}`;
18
+ }
19
+ return /^#[0-9a-f]{6}$/iu.test(color) ? color : null;
20
+ }
21
+
22
+ function toRelativeLuminanceChannel(value) {
23
+ return value <= 0.03928
24
+ ? value / 12.92
25
+ : ((value + 0.055) / 1.055) ** 2.4;
26
+ }
27
+
28
+ function getRelativeLuminance(color) {
29
+ const normalized = normalizeHexColor(color);
30
+ if (!normalized) return 0;
31
+
32
+ const red = toRelativeLuminanceChannel(parseHexChannel(normalized.slice(1, 3)));
33
+ const green = toRelativeLuminanceChannel(parseHexChannel(normalized.slice(3, 5)));
34
+ const blue = toRelativeLuminanceChannel(parseHexChannel(normalized.slice(5, 7)));
35
+
36
+ return (0.2126 * red) + (0.7152 * green) + (0.0722 * blue);
37
+ }
38
+
39
+ export function isThemeLight(theme) {
40
+ const background = theme?.page?.background || theme?.tui?.background || theme?.terminal?.background;
41
+ return getRelativeLuminance(background) >= 0.5;
42
+ }
43
+
44
+ export function createTheme({ id, label, description, page, terminal, tui = {} }) {
45
+ const baseTui = {
46
+ background: page?.background || terminal?.background || "#000000",
47
+ surface: terminal?.background || page?.background || "#000000",
48
+ foreground: terminal?.foreground || page?.foreground || "#ffffff",
49
+ white: terminal?.foreground || page?.foreground || "#ffffff",
50
+ gray: page?.hintColor || terminal?.brightBlack || terminal?.white || "#999999",
51
+ black: terminal?.black || "#000000",
52
+ red: terminal?.red || "#ff5555",
53
+ green: terminal?.green || "#55ff55",
54
+ yellow: terminal?.yellow || "#ffff55",
55
+ blue: terminal?.blue || "#5555ff",
56
+ magenta: terminal?.magenta || "#ff55ff",
57
+ cyan: terminal?.cyan || "#55ffff",
58
+ userChat: "#ffd866",
59
+ userChatLabel: "#ffec99",
60
+ activeHighlightBackground: terminal?.blue || "#5555ff",
61
+ activeHighlightForeground: terminal?.background || "#000000",
62
+ selectionBackground: terminal?.cursor || terminal?.blue || "#5555ff",
63
+ selectionForeground: terminal?.cursorAccent || terminal?.background || "#000000",
64
+ promptCursorBackground: terminal?.cursor || terminal?.green || "#55ff55",
65
+ promptCursorForeground: terminal?.cursorAccent || terminal?.background || "#000000",
66
+ };
67
+
68
+ return freezeTheme({
69
+ id,
70
+ label,
71
+ description,
72
+ page,
73
+ terminal,
74
+ tui: {
75
+ ...baseTui,
76
+ ...tui,
77
+ },
78
+ });
79
+ }
@@ -0,0 +1,59 @@
1
+ import { createTheme } from "./helpers.js";
2
+
3
+ const highContrastMonoTheme = createTheme({
4
+ id: "high-contrast-mono",
5
+ label: "High Contrast Mono",
6
+ description: "Accessibility-first monochrome theme with cobalt selection and severity colors only where they matter.",
7
+ page: {
8
+ background: "#000000",
9
+ foreground: "#f8f8f2",
10
+ overlayBackground: "#050505",
11
+ overlayForeground: "#ffffff",
12
+ hintColor: "#b8b8b8",
13
+ modalBackdrop: "rgba(0, 0, 0, 0.88)",
14
+ modalBackground: "#050505",
15
+ modalBorder: "#d8d8d8",
16
+ modalForeground: "#ffffff",
17
+ modalMuted: "#b8b8b8",
18
+ modalSelectedBackground: "#003f88",
19
+ modalSelectedBorder: "#ffffff",
20
+ modalSelectedForeground: "#ffffff",
21
+ },
22
+ terminal: {
23
+ background: "#000000",
24
+ foreground: "#f8f8f2",
25
+ cursor: "#ffffff",
26
+ cursorAccent: "#000000",
27
+ selectionBackground: "#003f88",
28
+ black: "#000000",
29
+ red: "#ff4d4d",
30
+ green: "#00d084",
31
+ yellow: "#ffd84d",
32
+ blue: "#4da3ff",
33
+ magenta: "#d8d8d8",
34
+ cyan: "#ffffff",
35
+ white: "#f8f8f2",
36
+ brightBlack: "#8a8a8a",
37
+ brightRed: "#ff6b6b",
38
+ brightGreen: "#28e29a",
39
+ brightYellow: "#ffe173",
40
+ brightBlue: "#73b8ff",
41
+ brightMagenta: "#ffffff",
42
+ brightCyan: "#ffffff",
43
+ brightWhite: "#ffffff",
44
+ },
45
+ tui: {
46
+ surface: "#000000",
47
+ border: "#d8d8d8",
48
+ userChat: "#ffffff",
49
+ userChatLabel: "#d8d8d8",
50
+ activeHighlightBackground: "#003f88",
51
+ activeHighlightForeground: "#ffffff",
52
+ selectionBackground: "#ffffff",
53
+ selectionForeground: "#000000",
54
+ promptCursorBackground: "#ffffff",
55
+ promptCursorForeground: "#000000",
56
+ },
57
+ });
58
+
59
+ export default highContrastMonoTheme;
@@ -0,0 +1,52 @@
1
+ import githubDarkTheme from "./github-dark.js";
2
+ import githubLightTheme from "./github-light.js";
3
+ import daylightTheme from "./daylight.js";
4
+ import paperInkTheme from "./paper-ink.js";
5
+ import lightHighContrastTheme from "./light-high-contrast.js";
6
+ import cobalt2Theme from "./cobalt2.js";
7
+ import draculaTheme from "./dracula.js";
8
+ import catppuccinMochaTheme from "./catppuccin-mocha.js";
9
+ import hackerXMatrixTheme from "./hacker-x-matrix.js";
10
+ import hackerXOrionPrimeTheme from "./hacker-x-orion-prime.js";
11
+ import tokyoNightTheme from "./tokyo-night.js";
12
+ import gruvboxDarkTheme from "./gruvbox-dark.js";
13
+ import noctisTheme from "./noctis.js";
14
+ import noctisObscuroTheme from "./noctis-obscuro.js";
15
+ import darkHighContrastTheme from "./dark-high-contrast.js";
16
+ import terminalGreenTheme from "./terminal-green.js";
17
+ import solarizedOpsTheme from "./solarized-ops.js";
18
+ import highContrastMonoTheme from "./high-contrast-mono.js";
19
+
20
+ const THEMES = Object.freeze([
21
+ draculaTheme,
22
+ githubDarkTheme,
23
+ githubLightTheme,
24
+ daylightTheme,
25
+ paperInkTheme,
26
+ lightHighContrastTheme,
27
+ cobalt2Theme,
28
+ hackerXOrionPrimeTheme,
29
+ hackerXMatrixTheme,
30
+ catppuccinMochaTheme,
31
+ tokyoNightTheme,
32
+ gruvboxDarkTheme,
33
+ noctisTheme,
34
+ noctisObscuroTheme,
35
+ darkHighContrastTheme,
36
+ terminalGreenTheme,
37
+ solarizedOpsTheme,
38
+ highContrastMonoTheme,
39
+ ].sort((left, right) => left.label.localeCompare(right.label, undefined, { sensitivity: "base" })));
40
+
41
+ const THEME_MAP = new Map(THEMES.map((theme) => [theme.id, theme]));
42
+
43
+ export const DEFAULT_THEME_ID = noctisObscuroTheme.id;
44
+
45
+ export function listThemes() {
46
+ return THEMES;
47
+ }
48
+
49
+ export function getTheme(themeId) {
50
+ if (!themeId) return null;
51
+ return THEME_MAP.get(themeId) ?? null;
52
+ }
@@ -0,0 +1,62 @@
1
+ import { createTheme } from "./helpers.js";
2
+
3
+ // Light counterpart of Dark High Contrast: pure black on white with the
4
+ // darkest usable accent set. Every slot clears AAA (7:1) where practical —
5
+ // the theme to reach for when any other light theme feels washed out.
6
+ const lightHighContrastTheme = createTheme({
7
+ id: "light-high-contrast",
8
+ label: "Light High Contrast",
9
+ description: "Pure black on white with maximum-contrast accents — nothing washes out, ever.",
10
+ page: {
11
+ background: "#ffffff",
12
+ foreground: "#000000",
13
+ overlayBackground: "#ffffff",
14
+ overlayForeground: "#000000",
15
+ hintColor: "#333333",
16
+ modalBackdrop: "rgba(0, 0, 0, 0.4)",
17
+ modalBackground: "#ffffff",
18
+ modalBorder: "#767676",
19
+ modalForeground: "#000000",
20
+ modalMuted: "#333333",
21
+ modalSelectedBackground: "#cce5ff",
22
+ modalSelectedBorder: "#0000cc",
23
+ modalSelectedForeground: "#00008b",
24
+ },
25
+ terminal: {
26
+ background: "#ffffff",
27
+ foreground: "#000000",
28
+ cursor: "#0000cc",
29
+ cursorAccent: "#ffffff",
30
+ selectionBackground: "#b3d7ff",
31
+ black: "#000000",
32
+ red: "#a80000",
33
+ green: "#006400",
34
+ yellow: "#5c4500",
35
+ blue: "#0000cc",
36
+ magenta: "#77008c",
37
+ cyan: "#005f6b",
38
+ white: "#333333",
39
+ brightBlack: "#1a1a1a",
40
+ brightRed: "#8b0000",
41
+ brightGreen: "#004b00",
42
+ brightYellow: "#4a3700",
43
+ brightBlue: "#0000a0",
44
+ brightMagenta: "#5f0070",
45
+ brightCyan: "#004a54",
46
+ brightWhite: "#000000",
47
+ },
48
+ tui: {
49
+ surface: "#ffffff",
50
+ border: "#767676",
51
+ userChat: "#0000cc",
52
+ userChatLabel: "#00008b",
53
+ activeHighlightBackground: "#cce5ff",
54
+ activeHighlightForeground: "#00008b",
55
+ selectionBackground: "#0000cc",
56
+ selectionForeground: "#ffffff",
57
+ promptCursorBackground: "#0000cc",
58
+ promptCursorForeground: "#ffffff",
59
+ },
60
+ });
61
+
62
+ export default lightHighContrastTheme;