@gajae-code/coding-agent 0.2.3 → 0.2.4

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 (34) hide show
  1. package/CHANGELOG.md +17 -8600
  2. package/dist/types/cli/update-cli.d.ts +3 -0
  3. package/dist/types/config/settings-schema.d.ts +20 -0
  4. package/dist/types/defaults/gjc-defaults.d.ts +19 -6
  5. package/dist/types/modes/components/settings-selector.d.ts +4 -0
  6. package/dist/types/modes/controllers/selector-controller.d.ts +1 -0
  7. package/dist/types/modes/interactive-mode.d.ts +1 -0
  8. package/dist/types/modes/theme/defaults/index.d.ts +126 -0
  9. package/dist/types/modes/theme/theme.d.ts +5 -0
  10. package/dist/types/modes/types.d.ts +1 -0
  11. package/package.json +7 -7
  12. package/src/cli/update-cli.ts +67 -16
  13. package/src/config/settings-schema.ts +22 -0
  14. package/src/defaults/gjc/skills/deep-interview/SKILL.md +39 -4
  15. package/src/defaults/gjc/skills/deep-interview/auto-answer-uncertain.md +37 -0
  16. package/src/defaults/gjc/skills/deep-interview/auto-research-greenfield.md +42 -0
  17. package/src/defaults/gjc/skills/ultragoal/SKILL.md +9 -6
  18. package/src/defaults/gjc-defaults.ts +68 -16
  19. package/src/gjc-runtime/deep-interview-runtime.ts +44 -0
  20. package/src/gjc-runtime/state-runtime.ts +3 -2
  21. package/src/goals/tools/goal-tool.ts +5 -1
  22. package/src/internal-urls/docs-index.generated.ts +4 -2
  23. package/src/memories/index.ts +5 -4
  24. package/src/modes/components/settings-selector.ts +25 -14
  25. package/src/modes/controllers/command-controller.ts +1 -1
  26. package/src/modes/controllers/selector-controller.ts +67 -0
  27. package/src/modes/interactive-mode.ts +14 -1
  28. package/src/modes/theme/defaults/blue-crab.json +126 -0
  29. package/src/modes/theme/defaults/index.ts +2 -0
  30. package/src/modes/theme/theme.ts +40 -1
  31. package/src/modes/types.ts +1 -0
  32. package/src/prompts/memories/unavailable.md +9 -0
  33. package/src/sdk.ts +4 -0
  34. package/src/slash-commands/builtin-registry.ts +11 -1
@@ -0,0 +1,126 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/can1357/gajae-code/main/packages/coding-agent/theme-schema.json",
3
+ "name": "blue-crab",
4
+ "vars": {
5
+ "cyan": "#66e8ff",
6
+ "blue": "#4ea1ff",
7
+ "green": "#72e6b8",
8
+ "red": "#ff6b7a",
9
+ "yellow": "#f3c76d",
10
+ "gray": "#b8c7d9",
11
+ "dimGray": "#5d7288",
12
+ "darkGray": "#344456",
13
+ "accent": "#2f9bff",
14
+ "selectedBg": "#12314a",
15
+ "userMsgBg": "#081b2a",
16
+ "toolPendingBg": "#0a2235",
17
+ "toolSuccessBg": "#0b2b25",
18
+ "toolErrorBg": "#321923",
19
+ "customMsgBg": "#0c1a2c",
20
+ "abyss": "#020812",
21
+ "deepNavy": "#061321",
22
+ "crabShell": "#2f9bff",
23
+ "claw": "#5ec8ff",
24
+ "ocean": "#0b4f8a",
25
+ "azure": "#7dd3fc",
26
+ "seafoam": "#80f2d3",
27
+ "kelp": "#62d9a8",
28
+ "sand": "#f4d6a0",
29
+ "coral": "#ff8a7a",
30
+ "ink": "#020812",
31
+ "mantle": "#061321",
32
+ "surface": "#0a1d31",
33
+ "surfaceBright": "#12314a",
34
+ "foam": "#e6f7ff",
35
+ "mutedShell": "#9db5c9",
36
+ "dimShell": "#55708a",
37
+ "brandBlue": "#2f9bff",
38
+ "shell": "#e6f7ff",
39
+ "dangerRed": "#ff5f75",
40
+ "warningAmber": "#f5bd58",
41
+ "diffRemovalRed": "#df5b61"
42
+ },
43
+ "colors": {
44
+ "accent": "claw",
45
+ "border": "ocean",
46
+ "borderAccent": "brandBlue",
47
+ "borderMuted": "dimShell",
48
+ "success": "kelp",
49
+ "error": "dangerRed",
50
+ "warning": "warningAmber",
51
+ "muted": "mutedShell",
52
+ "dim": "dimShell",
53
+ "text": "shell",
54
+ "thinkingText": "mutedShell",
55
+ "selectedBg": "surfaceBright",
56
+ "userMessageBg": "surface",
57
+ "userMessageText": "shell",
58
+ "customMessageBg": "mantle",
59
+ "customMessageText": "shell",
60
+ "customMessageLabel": "claw",
61
+ "toolPendingBg": "mantle",
62
+ "toolSuccessBg": "#0b2b25",
63
+ "toolErrorBg": "#321923",
64
+ "toolTitle": "shell",
65
+ "toolOutput": "mutedShell",
66
+ "mdHeading": "brandBlue",
67
+ "mdLink": "azure",
68
+ "mdLinkUrl": "dimShell",
69
+ "mdCode": "sand",
70
+ "mdCodeBlock": "seafoam",
71
+ "mdCodeBlockBorder": "ocean",
72
+ "mdQuote": "mutedShell",
73
+ "mdQuoteBorder": "ocean",
74
+ "mdHr": "dimShell",
75
+ "mdListBullet": "claw",
76
+ "toolDiffAdded": "kelp",
77
+ "toolDiffRemoved": "diffRemovalRed",
78
+ "toolDiffContext": "mutedShell",
79
+ "link": "azure",
80
+ "syntaxComment": "dimShell",
81
+ "syntaxKeyword": "brandBlue",
82
+ "syntaxFunction": "sand",
83
+ "syntaxVariable": "foam",
84
+ "syntaxString": "seafoam",
85
+ "syntaxNumber": "azure",
86
+ "syntaxType": "claw",
87
+ "syntaxOperator": "mutedShell",
88
+ "syntaxPunctuation": "dimShell",
89
+ "thinkingOff": "dimShell",
90
+ "thinkingMinimal": "mutedShell",
91
+ "thinkingLow": "azure",
92
+ "thinkingMedium": "claw",
93
+ "thinkingHigh": "brandBlue",
94
+ "thinkingXhigh": "coral",
95
+ "bashMode": "claw",
96
+ "statusLineBg": "ocean",
97
+ "statusLineSep": "dimShell",
98
+ "statusLineModel": "claw",
99
+ "statusLinePath": "azure",
100
+ "statusLineGitClean": "kelp",
101
+ "statusLineGitDirty": "sand",
102
+ "statusLineContext": "seafoam",
103
+ "statusLineSpend": "sand",
104
+ "statusLineStaged": "kelp",
105
+ "statusLineDirty": "sand",
106
+ "statusLineUntracked": "diffRemovalRed",
107
+ "statusLineOutput": "foam",
108
+ "statusLineCost": "claw",
109
+ "statusLineSubagents": "brandBlue",
110
+ "pythonMode": "sand"
111
+ },
112
+ "export": {
113
+ "pageBg": "#020812",
114
+ "cardBg": "#061321",
115
+ "infoBg": "#0a1d31"
116
+ },
117
+ "symbols": {
118
+ "preset": "unicode",
119
+ "overrides": {
120
+ "icon.pi": "🦀",
121
+ "icon.agents": "🦞",
122
+ "status.running": "🌊",
123
+ "md.bullet": "▸"
124
+ }
125
+ }
126
+ }
@@ -3,6 +3,7 @@ import amethyst from "./amethyst.json" with { type: "json" };
3
3
  import anthracite from "./anthracite.json" with { type: "json" };
4
4
  import basalt from "./basalt.json" with { type: "json" };
5
5
  import birch from "./birch.json" with { type: "json" };
6
+ import blue_crab from "./blue-crab.json" with { type: "json" };
6
7
  import dark_abyss from "./dark-abyss.json" with { type: "json" };
7
8
  import dark_arctic from "./dark-arctic.json" with { type: "json" };
8
9
  import dark_aurora from "./dark-aurora.json" with { type: "json" };
@@ -104,6 +105,7 @@ export const defaultThemes = {
104
105
  anthracite: anthracite,
105
106
  basalt: basalt,
106
107
  birch: birch,
108
+ "blue-crab": blue_crab,
107
109
  "dark-abyss": dark_abyss,
108
110
  "dark-arctic": dark_arctic,
109
111
  "dark-aurora": dark_aurora,
@@ -1758,6 +1758,10 @@ function getDefaultTheme(): string {
1758
1758
  return bg === "light" ? autoLightTheme : autoDarkTheme;
1759
1759
  }
1760
1760
 
1761
+ export function getDetectedThemeSettingsPath(): "theme.dark" | "theme.light" {
1762
+ return detectTerminalBackground() === "light" ? "theme.light" : "theme.dark";
1763
+ }
1764
+
1761
1765
  // ============================================================================
1762
1766
  // Global Theme Instance
1763
1767
  // ============================================================================
@@ -1779,6 +1783,7 @@ var autoDarkTheme: string = "red-claw";
1779
1783
  var autoLightTheme: string = "light";
1780
1784
  var onThemeChangeCallback: (() => void) | undefined;
1781
1785
  var themeLoadRequestId: number = 0;
1786
+ var previewThemeActive: boolean = false;
1782
1787
 
1783
1788
  function getCurrentThemeOptions(): CreateThemeOptions {
1784
1789
  return {
@@ -1798,6 +1803,7 @@ export async function initTheme(
1798
1803
  autoDarkTheme = darkTheme ?? "red-claw";
1799
1804
  autoLightTheme = lightTheme ?? "light";
1800
1805
  const name = getDefaultTheme();
1806
+ previewThemeActive = false;
1801
1807
  currentThemeName = name;
1802
1808
  currentSymbolPresetOverride = symbolPreset;
1803
1809
  currentColorBlindMode = colorBlindMode ?? false;
@@ -1820,6 +1826,7 @@ export async function setTheme(
1820
1826
  enableWatcher: boolean = false,
1821
1827
  ): Promise<{ success: boolean; error?: string }> {
1822
1828
  autoDetectedTheme = false;
1829
+ previewThemeActive = false;
1823
1830
  currentThemeName = name;
1824
1831
  const requestId = ++themeLoadRequestId;
1825
1832
  try {
@@ -1858,6 +1865,7 @@ export async function previewTheme(name: string): Promise<{ success: boolean; er
1858
1865
  return { success: false, error: "Theme preview superseded by a newer request" };
1859
1866
  }
1860
1867
  theme = loadedTheme;
1868
+ previewThemeActive = true;
1861
1869
  if (onThemeChangeCallback) {
1862
1870
  onThemeChangeCallback();
1863
1871
  }
@@ -1873,6 +1881,32 @@ export async function previewTheme(name: string): Promise<{ success: boolean; er
1873
1881
  }
1874
1882
  }
1875
1883
 
1884
+ export async function restoreThemePreview(name: string): Promise<{ success: boolean; error?: string }> {
1885
+ const resolvedName = autoDetectedTheme ? getDefaultTheme() : name;
1886
+ const requestId = ++themeLoadRequestId;
1887
+ try {
1888
+ const loadedTheme = await loadTheme(resolvedName, getCurrentThemeOptions());
1889
+ if (requestId !== themeLoadRequestId) {
1890
+ return { success: false, error: "Theme preview restore superseded by a newer request" };
1891
+ }
1892
+ theme = loadedTheme;
1893
+ currentThemeName = resolvedName;
1894
+ previewThemeActive = false;
1895
+ if (onThemeChangeCallback) {
1896
+ onThemeChangeCallback();
1897
+ }
1898
+ return { success: true };
1899
+ } catch (error) {
1900
+ if (requestId !== themeLoadRequestId) {
1901
+ return { success: false, error: "Theme preview restore superseded by a newer request" };
1902
+ }
1903
+ return {
1904
+ success: false,
1905
+ error: error instanceof Error ? error.message : String(error),
1906
+ };
1907
+ }
1908
+ }
1909
+
1876
1910
  /**
1877
1911
  * Enable auto-detection mode, switching to the appropriate dark/light theme.
1878
1912
  */
@@ -1904,6 +1938,7 @@ export function onTerminalAppearanceChange(mode: "dark" | "light"): void {
1904
1938
 
1905
1939
  export function setThemeInstance(themeInstance: Theme): void {
1906
1940
  autoDetectedTheme = false;
1941
+ previewThemeActive = false;
1907
1942
  theme = themeInstance;
1908
1943
  currentThemeName = "<in-memory>";
1909
1944
  stopThemeWatcher();
@@ -2056,16 +2091,20 @@ async function startThemeWatcher(): Promise<void> {
2056
2091
  function reevaluateAutoTheme(debugLabel: string): void {
2057
2092
  if (!autoDetectedTheme) return;
2058
2093
  const resolved = getDefaultTheme();
2059
- if (resolved === currentThemeName) return;
2094
+ const requestId = ++themeLoadRequestId;
2095
+ if (resolved === currentThemeName && !previewThemeActive) return;
2060
2096
  currentThemeName = resolved;
2061
2097
  loadTheme(resolved, getCurrentThemeOptions())
2062
2098
  .then(loadedTheme => {
2099
+ if (requestId !== themeLoadRequestId) return;
2063
2100
  theme = loadedTheme;
2101
+ previewThemeActive = false;
2064
2102
  if (onThemeChangeCallback) {
2065
2103
  onThemeChangeCallback();
2066
2104
  }
2067
2105
  })
2068
2106
  .catch(err => {
2107
+ if (requestId !== themeLoadRequestId) return;
2069
2108
  logger.debug(`Theme switch on ${debugLabel} failed`, { error: String(err) });
2070
2109
  });
2071
2110
  }
@@ -231,6 +231,7 @@ export interface InteractiveModeContext {
231
231
 
232
232
  // Selector handling
233
233
  showSettingsSelector(): void;
234
+ showThemeSelector(): void;
234
235
  showHistorySearch(): void;
235
236
  showExtensionsDashboard(): void;
236
237
  showAgentsDashboard(): void;
@@ -0,0 +1,9 @@
1
+ # Memory Guidance
2
+ Memory root: memory://root
3
+ Status: local memory is enabled, but no confirmed memory payload is available for this project yet.
4
+
5
+ Operational rules:
6
+ 1) Do not claim that a user preference, fact, or instruction has been saved, remembered, or persisted unless a backend operation or a non-empty memory payload confirms it.
7
+ 2) If the user asks you to save or remember something now, explain that durable memory is not confirmed because local memory has no available payload/readback yet. You may use the instruction for the current session only.
8
+ 3) If reading `memory://root` or `memory://root/memory_summary.md` fails, treat that as no confirmed memory, not as successful persistence.
9
+ 4) The local backend consolidates prior session rollouts asynchronously; an empty payload is a degraded/unconfirmed state, not a successful save.
package/src/sdk.ts CHANGED
@@ -1732,6 +1732,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
1732
1732
  const preferOpenAICodexWebsockets =
1733
1733
  openaiWebsocketSetting === "on" ? true : openaiWebsocketSetting === "off" ? false : undefined;
1734
1734
  const serviceTierSetting = settings.get("serviceTier");
1735
+ const retrySettings = settings.getGroup("retry");
1735
1736
 
1736
1737
  const initialServiceTier = hasServiceTierEntry
1737
1738
  ? existingSession.serviceTier
@@ -1789,6 +1790,9 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
1789
1790
  repetitionPenalty: settings.get("repetitionPenalty") >= 0 ? settings.get("repetitionPenalty") : undefined,
1790
1791
  serviceTier: initialServiceTier,
1791
1792
  hideThinkingSummary: settings.get("hideThinkingBlock"),
1793
+ maxRetryDelayMs: retrySettings.maxDelayMs,
1794
+ requestMaxRetries: retrySettings.requestMaxRetries,
1795
+ streamMaxRetries: retrySettings.streamMaxRetries,
1792
1796
  kimiApiFormat: settings.get("providers.kimiApiFormat") ?? "anthropic",
1793
1797
  preferWebsockets: preferOpenAICodexWebsockets,
1794
1798
  getToolContext: tc => toolContextStore.getContext(tc),
@@ -216,6 +216,14 @@ const BUILTIN_SLASH_COMMAND_REGISTRY: ReadonlyArray<SlashCommandSpec> = [
216
216
  runtime.ctx.editor.setText("");
217
217
  },
218
218
  },
219
+ {
220
+ name: "theme",
221
+ description: "Open theme selector",
222
+ handleTui: (_command, runtime) => {
223
+ runtime.ctx.showThemeSelector();
224
+ runtime.ctx.editor.setText("");
225
+ },
226
+ },
219
227
  {
220
228
  name: "goal",
221
229
  description: "Toggle goal mode (persistent autonomous objective for this session)",
@@ -923,7 +931,9 @@ const BUILTIN_SLASH_COMMAND_REGISTRY: ReadonlyArray<SlashCommandSpec> = [
923
931
  runtime.settings,
924
932
  runtime.session,
925
933
  );
926
- await runtime.output(payload || "Memory payload is empty.");
934
+ await runtime.output(
935
+ payload || "Memory payload is empty; durable memory is unavailable or unconfirmed.",
936
+ );
927
937
  return commandConsumed();
928
938
  }
929
939
  case "clear":