@gajae-code/coding-agent 0.7.10 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +2 -2
  3. package/dist/types/capability/mcp.d.ts +2 -0
  4. package/dist/types/config/keybindings.d.ts +11 -5
  5. package/dist/types/config/settings-schema.d.ts +25 -2
  6. package/dist/types/defaults/gjc-defaults.d.ts +7 -0
  7. package/dist/types/discovery/cursor.d.ts +4 -1
  8. package/dist/types/discovery/index.d.ts +0 -1
  9. package/dist/types/discovery/windsurf.d.ts +3 -1
  10. package/dist/types/gjc-runtime/launch-tmux.d.ts +3 -0
  11. package/dist/types/gjc-runtime/ralplan-runtime.d.ts +3 -2
  12. package/dist/types/gjc-runtime/restricted-role-agent-bash.d.ts +1 -0
  13. package/dist/types/gjc-runtime/session-state-sidecar.d.ts +5 -0
  14. package/dist/types/gjc-runtime/state-writer.d.ts +1 -0
  15. package/dist/types/modes/components/custom-editor.d.ts +6 -1
  16. package/dist/types/modes/components/settings-selector.d.ts +1 -0
  17. package/dist/types/modes/components/skill-message.d.ts +1 -0
  18. package/dist/types/modes/components/status-line.d.ts +8 -0
  19. package/dist/types/modes/components/two-column-body.d.ts +9 -0
  20. package/dist/types/modes/components/welcome.d.ts +9 -1
  21. package/dist/types/modes/controllers/command-controller.d.ts +1 -0
  22. package/dist/types/modes/controllers/input-controller.d.ts +5 -1
  23. package/dist/types/modes/controllers/selector-controller.d.ts +8 -0
  24. package/dist/types/modes/interactive-mode.d.ts +2 -0
  25. package/dist/types/modes/prompt-action-autocomplete.d.ts +2 -0
  26. package/dist/types/modes/rpc/rpc-types.d.ts +1 -0
  27. package/dist/types/modes/slash-command-visibility.d.ts +1 -0
  28. package/dist/types/modes/types.d.ts +2 -0
  29. package/dist/types/runtime-mcp/config-writer.d.ts +9 -0
  30. package/dist/types/runtime-mcp/config.d.ts +2 -0
  31. package/dist/types/runtime-mcp/loader.d.ts +2 -0
  32. package/dist/types/runtime-mcp/manager.d.ts +2 -0
  33. package/dist/types/runtime-mcp/types.d.ts +6 -0
  34. package/dist/types/sdk.d.ts +1 -1
  35. package/dist/types/session/agent-session.d.ts +8 -5
  36. package/dist/types/slash-commands/types.d.ts +2 -0
  37. package/dist/types/system-prompt.d.ts +7 -0
  38. package/dist/types/utils/cmux-workspace.d.ts +30 -1
  39. package/dist/types/web/search/index.d.ts +3 -1
  40. package/dist/types/web/search/provider.d.ts +9 -0
  41. package/dist/types/web/search/providers/utils.d.ts +42 -13
  42. package/dist/types/workflow/workflow-intent-diff.d.ts +19 -0
  43. package/package.json +10 -10
  44. package/src/capability/mcp.ts +2 -0
  45. package/src/cli/update-cli.ts +24 -0
  46. package/src/cli/web-search-cli.ts +2 -5
  47. package/src/cli.ts +1 -1
  48. package/src/commands/launch.ts +1 -1
  49. package/src/commands/ralplan.ts +1 -0
  50. package/src/config/keybindings.ts +14 -5
  51. package/src/config/mcp-schema.json +5 -1
  52. package/src/config/model-profiles.ts +16 -0
  53. package/src/config/settings-schema.ts +18 -2
  54. package/src/coordinator-mcp/server.ts +15 -3
  55. package/src/defaults/gjc/skills/ralplan/SKILL.md +16 -14
  56. package/src/defaults/gjc-defaults.ts +16 -0
  57. package/src/discovery/builtin.ts +12 -0
  58. package/src/discovery/cursor.ts +5 -84
  59. package/src/discovery/gemini.ts +3 -89
  60. package/src/discovery/index.ts +4 -1
  61. package/src/discovery/mcp-json.ts +11 -0
  62. package/src/discovery/opencode.ts +5 -122
  63. package/src/discovery/windsurf.ts +4 -82
  64. package/src/edit/read-file.ts +9 -1
  65. package/src/extensibility/extensions/runner.ts +2 -1
  66. package/src/gjc-runtime/launch-tmux.ts +164 -42
  67. package/src/gjc-runtime/ralplan-runtime.ts +22 -6
  68. package/src/gjc-runtime/restricted-role-agent-bash.ts +1 -0
  69. package/src/gjc-runtime/session-state-sidecar.ts +167 -24
  70. package/src/gjc-runtime/state-runtime.ts +8 -5
  71. package/src/gjc-runtime/state-writer.ts +5 -5
  72. package/src/gjc-runtime/team-runtime.ts +56 -51
  73. package/src/internal-urls/docs-index.generated.ts +8 -7
  74. package/src/main.ts +2 -2
  75. package/src/migrate/executor.ts +23 -6
  76. package/src/modes/components/agent-dashboard.ts +1 -34
  77. package/src/modes/components/custom-editor.ts +26 -0
  78. package/src/modes/components/extensions/extension-dashboard.ts +2 -48
  79. package/src/modes/components/model-selector.ts +64 -4
  80. package/src/modes/components/session-selector.ts +19 -9
  81. package/src/modes/components/settings-selector.ts +13 -2
  82. package/src/modes/components/skill-message.ts +18 -10
  83. package/src/modes/components/status-line.ts +215 -86
  84. package/src/modes/components/tree-selector.ts +28 -8
  85. package/src/modes/components/two-column-body.ts +36 -0
  86. package/src/modes/components/welcome.ts +171 -35
  87. package/src/modes/controllers/command-controller.ts +23 -0
  88. package/src/modes/controllers/event-controller.ts +4 -0
  89. package/src/modes/controllers/input-controller.ts +192 -39
  90. package/src/modes/controllers/selector-controller.ts +25 -28
  91. package/src/modes/interactive-mode.ts +36 -30
  92. package/src/modes/prompt-action-autocomplete.ts +23 -1
  93. package/src/modes/rpc/rpc-types.ts +1 -0
  94. package/src/modes/shared/agent-wire/deep-interview-gate.ts +9 -3
  95. package/src/modes/shared/agent-wire/workflow-gate-schema.ts +20 -0
  96. package/src/modes/slash-command-visibility.ts +9 -0
  97. package/src/modes/types.ts +2 -0
  98. package/src/modes/utils/hotkeys-markdown.ts +5 -2
  99. package/src/modes/utils/ui-helpers.ts +76 -3
  100. package/src/notifications/index.ts +20 -1
  101. package/src/notifications/lifecycle-control-runtime.ts +12 -3
  102. package/src/notifications/telegram-daemon.ts +4 -4
  103. package/src/prompts/agents/architect.md +7 -4
  104. package/src/prompts/agents/critic.md +15 -6
  105. package/src/prompts/agents/planner.md +8 -3
  106. package/src/prompts/system/system-prompt.md +15 -1
  107. package/src/prompts/tools/bash.md +1 -1
  108. package/src/runtime-mcp/config-writer.ts +28 -0
  109. package/src/runtime-mcp/config.ts +7 -0
  110. package/src/runtime-mcp/loader.ts +3 -0
  111. package/src/runtime-mcp/manager.ts +3 -0
  112. package/src/runtime-mcp/types.ts +6 -0
  113. package/src/sdk.ts +7 -6
  114. package/src/session/agent-session.ts +81 -18
  115. package/src/session/session-manager.ts +58 -18
  116. package/src/slash-commands/builtin-registry.ts +30 -10
  117. package/src/slash-commands/types.ts +2 -0
  118. package/src/system-prompt.ts +8 -0
  119. package/src/task/executor.ts +5 -0
  120. package/src/tools/ast-grep.ts +10 -7
  121. package/src/tools/bash.ts +39 -14
  122. package/src/tools/index.ts +8 -1
  123. package/src/utils/cmux-workspace.ts +134 -7
  124. package/src/utils/title-generator.ts +1 -1
  125. package/src/web/kagi.ts +1 -1
  126. package/src/web/parallel.ts +2 -2
  127. package/src/web/search/index.ts +118 -45
  128. package/src/web/search/provider.ts +65 -0
  129. package/src/web/search/providers/anthropic.ts +1 -1
  130. package/src/web/search/providers/brave.ts +1 -1
  131. package/src/web/search/providers/codex.ts +1 -1
  132. package/src/web/search/providers/duckduckgo.ts +1 -1
  133. package/src/web/search/providers/exa.ts +1 -1
  134. package/src/web/search/providers/gemini.ts +7 -3
  135. package/src/web/search/providers/jina.ts +1 -1
  136. package/src/web/search/providers/kimi.ts +6 -1
  137. package/src/web/search/providers/openai-compatible.ts +1 -1
  138. package/src/web/search/providers/parallel.ts +1 -1
  139. package/src/web/search/providers/perplexity.ts +2 -2
  140. package/src/web/search/providers/searxng.ts +1 -1
  141. package/src/web/search/providers/synthetic.ts +1 -1
  142. package/src/web/search/providers/tavily.ts +1 -1
  143. package/src/web/search/providers/utils.ts +67 -17
  144. package/src/web/search/providers/xai.ts +1 -1
  145. package/src/web/search/providers/zai.ts +1 -1
  146. package/src/workflow/workflow-intent-diff.ts +199 -0
  147. package/dist/types/discovery/vscode.d.ts +0 -1
  148. package/src/discovery/vscode.ts +0 -105
package/CHANGELOG.md CHANGED
@@ -2,6 +2,63 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.8.0] - 2026-07-04
6
+
7
+ ### Added
8
+
9
+ - Reduced default initial-context size by shipping only essential tools up front. `tools.discoveryMode` now defaults to `"all"` and the essential resident set grew to `read, bash, edit, write, search, find`; non-essential built-in tools are hidden behind `search_tool_bm25` and discovered on demand. The system prompt gained a `<tool-discovery>` block that documents the discovery tool and lists discoverable tools with one-line summaries, so the model knows what it can activate without carrying every tool schema. This drops a typical initial context from ~63K tokens (tool-schema dominated) to under 20K.
10
+
11
+ - The `/model` preset landing now shows the session's current preset, model, and per-role assignments in the header, marks the active preset with `(current)`, and Enter now expands/collapses provider groups (right/left arrows still work).
12
+ - MCP server definitions now accept an optional per-server `autoload` boolean that controls whether a configured server connects at session startup. The flag is threaded through the config schema, both parsers (the `mcp-json` discovery reader and the runtime-mcp config loader), an `autoloadOnly` load option on `discoverAndLoadMCPTools`, and a `setServerAutoload` config writer, establishing the config contract that the opt-in runtime and the autoload/connect management surfaces wire up in follow-up changes.
13
+ - GJC no longer inherits MCP servers live from other hosts. The MCP capability registrations were removed from the Cursor, Gemini, OpenCode, and Windsurf discovery providers and the MCP-only VS Code discovery provider was deleted, so GJC MCP servers now come only from GJC's own config, plugin bundles, or an explicit import rather than being read live out of another host's configuration; rules, settings, and skills discovery are unchanged.
14
+
15
+ - Added a `statusLine.maxRows` setting (Appearance → Status Line Rows). When it is greater than 1, status line segments that overflow a narrow terminal now wrap onto additional rows instead of being dropped; the default of 1 keeps the existing single-line, drop-on-overflow behavior. The Appearance preview reflects the wrapped layout.
16
+
17
+ - The startup welcome screen now renders as a viewport-sized `GJC Forge` panel that reserves the bottom composer/HUD rows, keeps the prompt fixed, and folds What's New highlights into the splash instead of appending a separate changelog block.
18
+
19
+ ### Fixed
20
+
21
+ - Escape now reliably cancels active context maintenance, handoff generation, retry backoff, and workflow ask dialogs even when transient UI focus or typed drafts would previously consume the key.
22
+ - The session tree picker now keeps its selection index valid when it starts on an empty filter mode, receives navigation input, and then switches back to a populated filter.
23
+ - The main composer now uses `PageUp` / `PageDown` to page the visible transcript viewport instead of duplicating prompt-history navigation; `Up` / `Down` and `Ctrl+R` remain the prompt-history paths, and autocomplete lists keep their own page navigation.
24
+ - Shared the duplicated two-column dashboard renderer used by agent and extension dashboards, keeping narrow-width truncation behavior in one tested component.
25
+ - Avoided duplicate line splitting when formatting `ast_grep` matches, reducing allocation in large structural-search result rendering.
26
+
27
+ - Tab now queues prompt drafts immediately while the agent is streaming or compacting instead of opening/applying forced file autocomplete first.
28
+
29
+ ## [0.7.11] - 2026-07-03
30
+ ### Fixed
31
+
32
+ - Coordinator MCP tmux prompt delivery now dismisses any focused TUI autocomplete menu after paste-buffer insertion and before `Enter`, so multiline delegated `/skill:*` prompts submit to the runtime and emit the expected prompt ack instead of selecting the highlighted skill completion and timing out.
33
+ - The Python `gjc_rpc` client no longer tears down its reader loop on real server frames it had not modeled: OAuth `open_url` extension-UI requests emitted during `login`, `workflow_gate` frames carrying structured `{value, label, description}` options (the `next_workflow_gate()` queue path re-parsed them with a legacy strings-only parser), and `max`/`inherit` thinking levels returned by `get_state`/model info. `install_headless_ui` now answers interactive UI requests with `extension_ui_response` frames instead of misrouting them as `workflow_gate_response` commands, and `get_pending_workflow_gates()` is exposed as a typed method. Previously dropped payloads (`notice`, `thinking_level_changed`, `goal_updated`, `irc_message`, `subagent_steer_message` events; `agent_end.stopReason`/`telemetry`/`coverage`; `auto_retry_start.unbounded`; `auto_compaction_end.continuationSkipReason`; gate `required`) now parse into typed models, and the env-gated real-binary lane covers the new surface.
34
+ - The session picker now keeps its selection index valid after an empty search result is navigated and then cleared, so Enter still resumes the first restored session instead of leaving the list with no selected row.
35
+
36
+ ## [0.7.11] - 2026-07-03
37
+
38
+ ### Fixed
39
+
40
+ - Notification endpoints now emit the graceful `session_closed` frame on process teardown (native terminal-window close/SIGHUP, SIGTERM, fatal errors) via a postmortem cleanup, so the managed Telegram daemon deletes the session's forum topic instead of orphaning it when the session dies without a clean `/quit`.
41
+ - Native Windows terminals now default `app.message.queue` to `Alt+Q` instead of `Alt+Enter`, avoiding the Windows Terminal fullscreen shortcut conflict (#1422).
42
+ - Coordinator MCP tmux prompt delivery now submits with tmux `Enter` instead of `C-m`, while preserving runtime prompt-ack/`turn_start` as the delivery success gate (#1409).
43
+ - The session-close resume hint now prints the `gjc --resume <id>` command on its own line so it can be selected and copied without the surrounding prose.
44
+ - Coordinator MCP tmux prompt delivery now uses a paste buffer for prompt text before submitting with `Enter`, preserving multiline delegated `/skill:*` prompt separators that `send-keys -l` could flatten into an unstarted visible prompt (#1416).
45
+
46
+ - `/retry` now resumes sessions left with an interrupted user/custom/tool-result tail after a crash or power loss, and recovers unresolved assistant tool-use tails instead of reporting "Nothing to retry".
47
+ - Queued prompt shortcuts now keep working during auto context-full compaction: Tab/Alt+Enter queue text immediately, `/skill:*` entries replay through the skill invocation path after compaction, and Alt+Up restores only the newest queued prompt for editing instead of merging the full queue.
48
+ - Skill prompt cards now size their collapsed arguments preview to the current terminal width instead of wrapping at a fixed narrow column.
49
+ - `gjc update` now refreshes opted-in on-disk default workflow skill copies (written by `gjc setup defaults` under the agent dir) after a successful update, so they no longer stay stale relative to the embedded defaults; copies that were never installed are left absent.
50
+ - `gjc migrate` skill imports now tolerate project or agent directories reached through macOS system symlinks such as `/var` while still rejecting symlinked destination skill directories, so local dry-run/live parity tests no longer fail on Darwin temp paths.
51
+ - cmux workspace auto-renames now include a `GJC: ` prefix so renamed workspaces remain identifiable as GJC sessions.
52
+ - The cmux workspace auto-rename is now ownership-guarded: GJC reads the current workspace title via `cmux workspace list` and only renames a workspace that still has its default title, so it no longer overwrites a user-pinned workspace name or thrash a shared workspace title across multiple sessions running under the same `CMUX_WORKSPACE_ID`. Opt out with `GJC_NO_CMUX_RENAME`.
53
+ - `gjc --tmux --resume` now reaches the session picker/resume target instead of auto-attaching a same-branch managed tmux session before the inner resume resolver runs.
54
+ - `gjc --tmux` now preserves a newly created managed tmux session when `attach-session` exits after the parent SSH/PTY closes but the tmux server still reports the session live, so closing a Windows Terminal tab no longer kills the Mac host session before reattach.
55
+ - Managed `gjc --tmux` launches now size the inner tmux window to the caller terminal minus inherited tmux status lines, preventing the bottom of the GJC input from being clipped when the user's tmux status bar is visible.
56
+ - Managed `gjc --tmux` launches no longer pin the initial window to `manual` sizing on native tmux. The pre-attach reassert used `resize-window`, which flips the window's `window-size` option to `manual` and stops `attach-session` from resizing the window to the real terminal; when the attaching terminal was larger than the capture-time size, tmux left a smaller-than-client window and painted the uncovered area with `·` fill. The window now stays on `window-size latest` so it tracks the attaching client (psmux keeps the explicit `resize-window` reassert).
57
+
58
+ ### Changed
59
+
60
+ - `web_search` latency overhaul: provider hard timeouts are now class-based (pure search APIs 15s, LLM-mediated providers 120s, Kimi 35s aligned to its upstream 30s budget, replacing the uniform 300s ceiling; an explicitly configured `web_search.timeout` still overrides — the schema default no longer reinstalls 300s), DuckDuckGo is fired as a background hedge 3s into a slower primary so a failing primary falls back to an already-settled result, the Gemini 429/5xx retry-delay budget dropped from 5 minutes to 30 seconds, resolved provider chains are cached per AuthStorage for 60s keyed on the credential generation (availability probes skipped on repeat searches; login/logout invalidates immediately), and `WebSearchTool` prewarms the chain at construction. Measured: hung-primary fallback 301s → 15s, slow-failing-primary fallback ~7s → 6s, repeat chain resolution ~26ms → ~0.01ms.
61
+
5
62
  ## [0.7.10] - 2026-07-02
6
63
  ### Added
7
64
 
@@ -13,6 +70,7 @@
13
70
 
14
71
  - Deep Interview option-clarification prompts now stay out of the interview transcript and ambiguity recorder, so asking about displayed choices no longer persists as the round answer before the user selects an actual option.
15
72
  - `gjc daemon reload telegram` now spawns the replacement daemon with a stable owner pid so the new daemon does not exit immediately after the short-lived reload CLI process ends.
73
+ - Ralplan role agents can now persist Planner/Architect/Critic artifacts through a sanctioned `GJC_RALPLAN_ARTIFACT` env handoff (`--artifact-env GJC_RALPLAN_ARTIFACT`), avoiding restricted-bash failures on markdown containing quotes, backslashes, shell-expansion characters, or command-substitution syntax.
16
74
  - Managed `gjc --tmux` launches now size the initial window correctly (#1376).
17
75
  - Coordinator tmux-delivered turns now submit correctly on Enter (#1372).
18
76
  - Generic long `retry-after` rate limits are now kept retryable instead of being treated as fatal (#1370).
package/README.md CHANGED
@@ -4,7 +4,7 @@ Core implementation package for the `gjc` coding agent in the `gajae-code` monor
4
4
 
5
5
  For installation, setup, provider configuration, model roles, slash commands, and full CLI reference, see:
6
6
  - [Monorepo README (local)](../../README.md)
7
- - [Monorepo README (GitHub)](https://github.com/can1357/gajae-code#readme)
7
+ - [Monorepo README (GitHub)](https://github.com/Yeachan-Heo/gajae-code#readme)
8
8
 
9
9
  Package-specific references:
10
10
  - [CHANGELOG](./CHANGELOG.md)
@@ -24,7 +24,7 @@ For simple local side effects that do not need a full extension, set the user-le
24
24
  gjc config set completion.notifyCommand 'cmux notify --title "$GJC_NOTIFICATION_TITLE" --body "$GJC_NOTIFICATION_BODY"'
25
25
  ```
26
26
 
27
- When GJC is running inside a cmux terminal (`CMUX_WORKSPACE_ID` is set), GJC also best-effort renames that cmux workspace to the current GJC session name whenever the session title is set or restored.
27
+ When GJC runs inside a cmux terminal (`CMUX_WORKSPACE_ID` is set), GJC best-effort renames that cmux workspace to the current GJC session name (with a `GJC: ` prefix) — but only when the workspace still has its default title, so a name you pinned (or one set by a peer session sharing the workspace) is never overwritten. Opt out with `GJC_NO_CMUX_RENAME=1`.
28
28
 
29
29
  Windows Terminal may keep BEL (`[Console]::Write([char]7)`) silent depending on profile and system sound settings even when `notifications.terminalBell` is enabled. For an audible Windows completion beep, configure a user-level PowerShell command hook instead:
30
30
 
@@ -7,6 +7,8 @@ export interface MCPServer {
7
7
  name: string;
8
8
  /** Whether this server is enabled (default: true) */
9
9
  enabled?: boolean;
10
+ /** Whether to connect automatically at session startup (default: true) */
11
+ autoload?: boolean;
10
12
  /** Connection timeout in milliseconds */
11
13
  timeout?: number;
12
14
  /** Command to run (for stdio transport) */
@@ -10,6 +10,7 @@ interface AppKeybindings {
10
10
  "app.suspend": true;
11
11
  "app.thinking.cycle": true;
12
12
  "app.thinking.toggle": true;
13
+ "app.commandPalette.open": true;
13
14
  "app.model.cycleForward": true;
14
15
  "app.model.cycleBackward": true;
15
16
  "app.model.select": true;
@@ -45,6 +46,7 @@ declare module "@gajae-code/tui" {
45
46
  interface Keybindings extends AppKeybindings {
46
47
  }
47
48
  }
49
+ export declare function defaultMessageQueueKeysForPlatform(platform?: NodeJS.Platform): KeyId;
48
50
  /**
49
51
  * All keybindings definitions: TUI + app-specific.
50
52
  */
@@ -201,12 +203,16 @@ export declare const KEYBINDINGS: {
201
203
  readonly defaultKeys: "ctrl+t";
202
204
  readonly description: "Toggle thinking mode";
203
205
  };
204
- readonly "app.model.cycleForward": {
206
+ readonly "app.commandPalette.open": {
205
207
  readonly defaultKeys: "ctrl+p";
208
+ readonly description: "Open command palette";
209
+ };
210
+ readonly "app.model.cycleForward": {
211
+ readonly defaultKeys: "alt+n";
206
212
  readonly description: "Cycle to next model";
207
213
  };
208
214
  readonly "app.model.cycleBackward": {
209
- readonly defaultKeys: "shift+ctrl+p";
215
+ readonly defaultKeys: "alt+shift+n";
210
216
  readonly description: "Cycle to previous model";
211
217
  };
212
218
  readonly "app.model.select": {
@@ -234,7 +240,7 @@ export declare const KEYBINDINGS: {
234
240
  readonly description: "Send follow-up message (no default; Ctrl+Enter submits)";
235
241
  };
236
242
  readonly "app.message.queue": {
237
- readonly defaultKeys: "alt+enter";
243
+ readonly defaultKeys: KeyId;
238
244
  readonly description: "Queue message for next turn";
239
245
  };
240
246
  readonly "app.message.dequeue": {
@@ -254,8 +260,8 @@ export declare const KEYBINDINGS: {
254
260
  readonly description: "Copy prompt";
255
261
  };
256
262
  readonly "app.session.new": {
257
- readonly defaultKeys: [];
258
- readonly description: "Create new session";
263
+ readonly defaultKeys: "ctrl+n";
264
+ readonly description: "Start a new session";
259
265
  };
260
266
  readonly "app.session.tree": {
261
267
  readonly defaultKeys: [];
@@ -440,6 +440,28 @@ export declare const SETTINGS_SCHEMA: {
440
440
  readonly description: "Use the session name color for the editor border and status line gap";
441
441
  };
442
442
  };
443
+ readonly "statusLine.maxRows": {
444
+ readonly type: "number";
445
+ readonly default: 1;
446
+ readonly ui: {
447
+ readonly tab: "appearance";
448
+ readonly label: "Status Line Rows";
449
+ readonly description: "Maximum rows for the status line. When greater than 1, overflowing segments wrap onto additional rows instead of being dropped.";
450
+ readonly options: readonly [{
451
+ readonly value: "1";
452
+ readonly label: "1 row";
453
+ readonly description: "Single line; overflow is truncated (default)";
454
+ }, {
455
+ readonly value: "2";
456
+ readonly label: "2 rows";
457
+ readonly description: "Wrap overflow onto a second row";
458
+ }, {
459
+ readonly value: "3";
460
+ readonly label: "3 rows";
461
+ readonly description: "Wrap overflow across up to three rows";
462
+ }];
463
+ };
464
+ };
443
465
  readonly "tools.artifactSpillThreshold": {
444
466
  readonly type: "number";
445
467
  readonly default: 50;
@@ -2848,7 +2870,7 @@ export declare const SETTINGS_SCHEMA: {
2848
2870
  readonly "tools.discoveryMode": {
2849
2871
  readonly type: "enum";
2850
2872
  readonly values: readonly ["off", "all"];
2851
- readonly default: "off";
2873
+ readonly default: "all";
2852
2874
  readonly ui: {
2853
2875
  readonly tab: "tools";
2854
2876
  readonly label: "Tool Discovery";
@@ -2861,7 +2883,7 @@ export declare const SETTINGS_SCHEMA: {
2861
2883
  readonly ui: {
2862
2884
  readonly tab: "tools";
2863
2885
  readonly label: "Essential Tools Override";
2864
- readonly description: "Override the always-loaded built-in tools (default: read, bash, edit). Leave empty to use defaults.";
2886
+ readonly description: "Override the always-loaded built-in tools (default: read, bash, edit, write, search, find). Leave empty to use defaults.";
2865
2887
  };
2866
2888
  };
2867
2889
  readonly "mcp.enableProjectConfig": {
@@ -3685,6 +3707,7 @@ export interface ExaSettings {
3685
3707
  export interface StatusLineSettings {
3686
3708
  preset: StatusLinePreset;
3687
3709
  separator: StatusLineSeparatorStyle;
3710
+ maxRows: number;
3688
3711
  showHookStatus: boolean;
3689
3712
  showSkillHud: boolean;
3690
3713
  leftSegments: StatusLineSegmentId[];
@@ -27,6 +27,13 @@ export type DefaultGjcDefinition = DefaultGjcSkillDefinition | DefaultGjcSkillFr
27
27
  export interface InstallDefaultGjcDefinitionsOptions {
28
28
  check?: boolean;
29
29
  force?: boolean;
30
+ /**
31
+ * Only rewrite default definition files that already exist on disk but whose
32
+ * content differs from the embedded defaults. Files that are absent are left
33
+ * absent (status "missing"). Used by `gjc update` to refresh opted-in copies
34
+ * without materializing new on-disk copies for users who never installed them.
35
+ */
36
+ refreshOnly?: boolean;
30
37
  targetRoot?: string;
31
38
  }
32
39
  export type DefaultGjcDefinitionInstallFile = {
@@ -9,8 +9,11 @@
9
9
  * - Project: .cursor/ (cwd only)
10
10
  *
11
11
  * Capabilities:
12
- * - mcps: From mcp.json with mcpServers key
13
12
  * - rules: From rules/*.mdc files with MDC frontmatter (description, globs, alwaysApply)
14
13
  * - settings: From settings.json if present
14
+ *
15
+ * MCP servers are intentionally NOT inherited live from Cursor config: GJC owns
16
+ * MCP runtime execution. Use `gjc mcp import cursor` to copy definitions into
17
+ * GJC's own mcp.json instead.
15
18
  */
16
19
  export {};
@@ -28,7 +28,6 @@ import "./opencode";
28
28
  import "./github";
29
29
  import "./mcp-json";
30
30
  import "./ssh";
31
- import "./vscode";
32
31
  import "./windsurf";
33
32
  export { cacheStats, disableProvider, enableProvider, getAllCapabilitiesInfo, getAllProvidersInfo, getCapability, getCapabilityInfo, getDisabledProviders, getProviderInfo, initializeWithSettings, invalidate, isProviderEnabled, listCapabilities, loadCapability, reset, setDisabledProviders, } from "../capability";
34
33
  export type { ContextFile } from "../capability/context-file";
@@ -6,8 +6,10 @@
6
6
  * - Project: .windsurf
7
7
  *
8
8
  * Supports:
9
- * - MCP servers from mcp_config.json
10
9
  * - Rules from .windsurf/rules/*.md and ~/.codeium/windsurf/memories/global_rules.md
11
10
  * - Legacy .windsurfrules file
11
+ *
12
+ * MCP servers are intentionally NOT inherited live from Windsurf config: GJC
13
+ * owns MCP runtime execution. Copy definitions into GJC's own mcp.json instead.
12
14
  */
13
15
  export {};
@@ -22,6 +22,7 @@ export interface TmuxLaunchContext {
22
22
  tty?: TtyState;
23
23
  spawnSync?: TmuxSpawnSync;
24
24
  tmuxAvailable?: boolean;
25
+ tmuxStatusLines?: number;
25
26
  worktreeBranch?: string | null;
26
27
  currentBranch?: string | null;
27
28
  existingBranchSessionName?: string | null;
@@ -66,6 +67,8 @@ export interface TmuxLaunchPlan {
66
67
  project?: string | null;
67
68
  sessionId?: string | null;
68
69
  sessionStateFile?: string | null;
70
+ isPsmux: boolean;
71
+ platform: NodeJS.Platform;
69
72
  }
70
73
  export interface GjcTmuxProfileResult {
71
74
  skipped: boolean;
@@ -10,8 +10,9 @@
10
10
  * that lives in the bundled `/skill:ralplan` skill — but it accepts every documented flag so
11
11
  * scripted users see a useful response and the active run is visible to the TUI.
12
12
  *
13
- * 2. **Artifact write**: `gjc ralplan --write --stage <type> --stage_n <N> --artifact
14
- * <path-or-string> [--run-id <id>] [--session-id <id>] [--json]` persists Planner / Architect
13
+ * 2. **Artifact write**: `gjc ralplan --write --stage <type> --stage_n <N>
14
+ * (--artifact <path-or-string> | --artifact-env GJC_RALPLAN_ARTIFACT)
15
+ * [--run-id <id>] [--session-id <id>] [--json]` persists Planner / Architect
15
16
  * / Critic / revision / post-interview / ADR / final markdown under `.gjc/plans/ralplan/<run-id>/`, maintains
16
17
  * an `index.jsonl` audit log, copies `final` stages to `pending-approval.md`, and advances
17
18
  * the HUD chip to reflect the latest persisted stage.
@@ -1,2 +1,3 @@
1
1
  export declare const GJC_RESTRICTED_ROLE_AGENT_BASH_ENV = "GJC_RESTRICTED_ROLE_AGENT_BASH";
2
+ export declare const GJC_RALPLAN_ARTIFACT_ENV = "GJC_RALPLAN_ARTIFACT";
2
3
  export declare function isRestrictedRoleAgentBash(): boolean;
@@ -1,5 +1,7 @@
1
+ import { postmortem } from "@gajae-code/utils";
1
2
  export declare const GJC_COORDINATOR_SESSION_STATE_FILE_ENV = "GJC_COORDINATOR_SESSION_STATE_FILE";
2
3
  export declare const GJC_COORDINATOR_SESSION_ID_ENV = "GJC_COORDINATOR_SESSION_ID";
4
+ export declare const GJC_COORDINATOR_SESSION_BRANCH_ENV = "GJC_COORDINATOR_SESSION_BRANCH";
3
5
  export type RuntimeState = "ready_for_input" | "running" | "needs_user_input" | "completed" | "errored";
4
6
  interface RuntimeStateEvent {
5
7
  type: string;
@@ -9,6 +11,7 @@ interface RuntimeStateContext {
9
11
  sessionId: string;
10
12
  cwd: string;
11
13
  sessionFile?: string | null;
14
+ branch?: string | null;
12
15
  }
13
16
  export type TerminalRuntimeStateStatus = {
14
17
  terminal: true;
@@ -24,4 +27,6 @@ export declare function readTerminalRuntimeStateMarker(input: {
24
27
  sessionFile?: string | null;
25
28
  }): Promise<TerminalRuntimeStateStatus>;
26
29
  export declare function persistCoordinatorRuntimeStateFromEvent(event: RuntimeStateEvent, context: RuntimeStateContext): Promise<void>;
30
+ export declare function persistCoordinatorRuntimeStateFromPostmortem(reason: postmortem.Reason, context: RuntimeStateContext): void;
31
+ export declare function registerCoordinatorRuntimeStateFinalizer(context: RuntimeStateContext): () => void;
27
32
  export {};
@@ -67,6 +67,7 @@ export type GuardedWriteResult = {
67
67
  path: string;
68
68
  written: true;
69
69
  revision: number;
70
+ stamped: unknown;
70
71
  } | {
71
72
  path: string;
72
73
  written: false;
@@ -1,6 +1,6 @@
1
1
  import { Editor, type KeyId } from "@gajae-code/tui";
2
2
  import { type AppKeybinding } from "../../config/keybindings";
3
- type ConfigurableEditorAction = Extract<AppKeybinding, "app.interrupt" | "app.clear" | "app.exit" | "app.suspend" | "app.thinking.cycle" | "app.model.cycleForward" | "app.model.cycleBackward" | "app.model.select" | "app.model.selectTemporary" | "app.tools.expand" | "app.thinking.toggle" | "app.editor.external" | "app.history.search" | "app.message.dequeue" | "app.message.followUp" | "app.message.queue" | "app.clipboard.pasteImage" | "app.clipboard.copyPrompt">;
3
+ type ConfigurableEditorAction = Extract<AppKeybinding, "app.interrupt" | "app.clear" | "app.exit" | "app.suspend" | "app.thinking.cycle" | "app.commandPalette.open" | "app.model.cycleForward" | "app.model.cycleBackward" | "app.model.select" | "app.model.selectTemporary" | "app.tools.expand" | "app.thinking.toggle" | "app.editor.external" | "app.history.search" | "app.message.dequeue" | "app.message.followUp" | "app.message.queue" | "app.clipboard.pasteImage" | "app.clipboard.copyPrompt">;
4
4
  type PastePendingClearReason = "timeout" | "queue-limit";
5
5
  /**
6
6
  * Custom editor that handles configurable app-level shortcuts for coding-agent.
@@ -19,6 +19,7 @@ export declare class CustomEditor extends Editor {
19
19
  onClear?: () => void;
20
20
  onExit?: () => void;
21
21
  onCycleThinkingLevel?: () => void;
22
+ onOpenCommandPalette?: () => void;
22
23
  onCycleModelForward?: () => void;
23
24
  onCycleModelBackward?: () => void;
24
25
  onSelectModel?: () => void;
@@ -43,6 +44,10 @@ export declare class CustomEditor extends Editor {
43
44
  onQueue?: () => void;
44
45
  /** Called when Caps Lock is pressed. */
45
46
  onCapsLock?: () => void;
47
+ /** Called when PageUp/PageDown should scroll the transcript viewport instead of prompt history. */
48
+ onViewportPageScroll?: (direction: -1 | 1) => void;
49
+ /** Called before regular composer input should return the transcript viewport to the live bottom. */
50
+ onViewportFollowLive?: () => void;
46
51
  setActionKeys(action: ConfigurableEditorAction, keys: KeyId[]): void;
47
52
  /**
48
53
  * Register a custom key handler. Extensions use this for shortcuts.
@@ -28,6 +28,7 @@ export interface StatusLinePreviewSettings {
28
28
  segmentOptions?: StatusLineSegmentOptions;
29
29
  previewHighlightSegment?: StatusLineSegmentId;
30
30
  sessionAccent?: boolean;
31
+ maxRows?: number;
31
32
  }
32
33
  export interface SettingsCallbacks {
33
34
  /** Called when any setting value changes */
@@ -6,4 +6,5 @@ export declare class SkillMessageComponent extends Container {
6
6
  constructor(message: CustomMessage<SkillPromptDetails>);
7
7
  setExpanded(expanded: boolean): void;
8
8
  invalidate(): void;
9
+ render(width: number): string[];
9
10
  }
@@ -36,6 +36,7 @@ export interface StatusLineSettings {
36
36
  showHookStatus?: boolean;
37
37
  showSkillHud?: boolean;
38
38
  sessionAccent?: boolean;
39
+ maxRows?: number;
39
40
  }
40
41
  export interface StatusLineComponentOptions {
41
42
  version?: string;
@@ -82,5 +83,12 @@ export declare class StatusLineComponent implements Component {
82
83
  content: string;
83
84
  width: number;
84
85
  };
86
+ /**
87
+ * Multi-row-aware content for the settings preview: the wrapped rows joined
88
+ * with newlines so a single `Text` renders them stacked. Honors the current
89
+ * `maxRows`; identical to the single status line when `maxRows` is 1 or when
90
+ * everything fits on one row.
91
+ */
92
+ getPreviewContent(width: number): string;
85
93
  render(width: number): string[];
86
94
  }
@@ -0,0 +1,9 @@
1
+ import { type Component } from "@gajae-code/tui";
2
+ export declare class TwoColumnBody implements Component {
3
+ private readonly leftPane;
4
+ private readonly rightPane;
5
+ private readonly maxHeight;
6
+ constructor(leftPane: Component, rightPane: Component, maxHeight: number);
7
+ render(width: number): string[];
8
+ invalidate(): void;
9
+ }
@@ -9,6 +9,12 @@ export interface LspServerInfo {
9
9
  fileTypes: string[];
10
10
  }
11
11
  export type WelcomeLogoMode = "unicode" | "square" | "ascii";
12
+ export interface WelcomeComponentOptions {
13
+ getViewportRows?: () => number | undefined;
14
+ getReservedBottomRows?: (termWidth: number) => number;
15
+ changelogMarkdown?: string;
16
+ collapseChangelog?: boolean;
17
+ }
12
18
  /**
13
19
  * GJC-native launch surface with compact command affordances, project
14
20
  * signals, and a claw/talon mark without copying another agent shell.
@@ -21,7 +27,8 @@ export declare class WelcomeComponent implements Component {
21
27
  private recentSessions;
22
28
  private lspServers;
23
29
  private readonly logoMode;
24
- constructor(version: string, modelName: string, providerName: string, recentSessions?: RecentSession[], lspServers?: LspServerInfo[], logoMode?: WelcomeLogoMode);
30
+ private readonly options;
31
+ constructor(version: string, modelName: string, providerName: string, recentSessions?: RecentSession[], lspServers?: LspServerInfo[], logoMode?: WelcomeLogoMode, options?: WelcomeComponentOptions);
25
32
  invalidate(): void;
26
33
  /**
27
34
  * Play a one-shot intro that sweeps the gradient through every phase
@@ -29,6 +36,7 @@ export declare class WelcomeComponent implements Component {
29
36
  * subsequent calls reset and replay.
30
37
  */
31
38
  playIntro(requestRender: () => void): void;
39
+ dispose(): void;
32
40
  setModel(modelName: string, providerName: string): void;
33
41
  setRecentSessions(sessions: RecentSession[]): void;
34
42
  setLspServers(servers: LspServerInfo[]): void;
@@ -18,6 +18,7 @@ export declare class CommandController {
18
18
  handleUsageCommand(reports?: UsageReport[] | null): Promise<void>;
19
19
  handleChangelogCommand(showFull?: boolean): Promise<void>;
20
20
  handleHotkeysCommand(): void;
21
+ handleHelpCommand(): void;
21
22
  handleToolsCommand(): void;
22
23
  handleContextCommand(): void;
23
24
  handleMemoryCommand(text: string): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { AutocompleteProvider, SlashCommand } from "@gajae-code/tui";
1
+ import { type AutocompleteProvider, type SlashCommand } from "@gajae-code/tui";
2
2
  import type { InteractiveModeContext } from "../../modes/types";
3
3
  export declare class InputController {
4
4
  #private;
@@ -14,6 +14,9 @@ export declare class InputController {
14
14
  handleFollowUp(): Promise<void>;
15
15
  /** Send editor text explicitly as a queued next-turn message. */
16
16
  handleQueueSubmit(): Promise<void>;
17
+ restoreLatestQueuedMessageToEditor(options?: {
18
+ currentText?: string;
19
+ }): number;
17
20
  restoreQueuedMessagesToEditor(options?: {
18
21
  abort?: boolean;
19
22
  currentText?: string;
@@ -27,6 +30,7 @@ export declare class InputController {
27
30
  handleCopyCurrentLine(): void;
28
31
  /** Copy current prompt text to system clipboard. */
29
32
  handleCopyPrompt(): void;
33
+ openCommandPalette(): void;
30
34
  cycleThinkingLevel(): void;
31
35
  cycleRoleModel(options?: {
32
36
  temporary?: boolean;
@@ -1,8 +1,16 @@
1
1
  import type { Component } from "@gajae-code/tui";
2
2
  import type { ModelProfileConfig } from "../../config/models-config-schema";
3
+ import { type Settings } from "../../config/settings";
3
4
  import type { InteractiveModeContext, OAuthSelectorOptions } from "../../modes/types";
5
+ import type { StatusLineSettings } from "../components/status-line";
4
6
  import type { JobsObserver } from "../jobs-observer";
5
7
  import type { SessionObserverRegistry } from "../session-observer-registry";
8
+ /**
9
+ * Snapshot the persisted status-line settings that the status-line component
10
+ * cares about. Preview, cancel-restore, and commit paths all share this so the
11
+ * previewed row count (and every other field) can never drift out of sync.
12
+ */
13
+ export declare function buildStatusLineSettings(settingsInstance: Settings): StatusLineSettings;
6
14
  export declare class SelectorController {
7
15
  #private;
8
16
  private ctx;
@@ -89,6 +89,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
89
89
  retryLoader: Loader | undefined;
90
90
  autoCompactionEscapeHandler?: () => void;
91
91
  retryEscapeHandler?: () => void;
92
+ retryEscapePrimed: boolean;
92
93
  retryCountdownTimer?: NodeJS.Timeout;
93
94
  unsubscribe?: () => void;
94
95
  onInputCallback?: (input: SubmittedUserInput) => void;
@@ -184,6 +185,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
184
185
  handleUsageCommand(reports?: UsageReport[] | null): Promise<void>;
185
186
  handleChangelogCommand(showFull?: boolean): Promise<void>;
186
187
  handleHotkeysCommand(): void;
188
+ handleHelpCommand(): void;
187
189
  handleToolsCommand(): void;
188
190
  handleContextCommand(): void;
189
191
  handleClearCommand(): Promise<void>;
@@ -14,6 +14,8 @@ interface PromptActionAutocompleteOptions {
14
14
  copyCurrentLine: () => void;
15
15
  copyPrompt: () => void;
16
16
  pasteImage: () => void;
17
+ newSession: () => void;
18
+ showHelp: () => void;
17
19
  scrollTmuxToPreviousUserInput: () => void;
18
20
  undo: (prefix: string) => void;
19
21
  moveCursorToMessageEnd: () => void;
@@ -641,6 +641,7 @@ export interface RpcJsonSchema {
641
641
  items?: RpcJsonSchema;
642
642
  minLength?: number;
643
643
  maxLength?: number;
644
+ pattern?: string;
644
645
  minItems?: number;
645
646
  maxItems?: number;
646
647
  uniqueItems?: boolean;
@@ -0,0 +1 @@
1
+ export declare function shouldShowExtensionCommand(name: string, activeProvider: string | undefined): boolean;
@@ -94,6 +94,7 @@ export interface InteractiveModeContext {
94
94
  retryLoader: Loader | undefined;
95
95
  autoCompactionEscapeHandler?: () => void;
96
96
  retryEscapeHandler?: () => void;
97
+ retryEscapePrimed: boolean;
97
98
  retryCountdownTimer?: NodeJS.Timeout;
98
99
  unsubscribe?: () => void;
99
100
  onInputCallback?: (input: SubmittedUserInput) => void;
@@ -191,6 +192,7 @@ export interface InteractiveModeContext {
191
192
  handleUsageCommand(reports?: UsageReport[] | null): Promise<void>;
192
193
  handleChangelogCommand(showFull?: boolean): Promise<void>;
193
194
  handleHotkeysCommand(): void;
195
+ handleHelpCommand(): void;
194
196
  handleToolsCommand(): void;
195
197
  handleContextCommand(): void;
196
198
  handleDumpCommand(): void;
@@ -69,6 +69,15 @@ export declare function getMCPServer(filePath: string, name: string): Promise<MC
69
69
  * List all server names in a config file.
70
70
  */
71
71
  export declare function listMCPServers(filePath: string): Promise<string[]>;
72
+ /**
73
+ * Set a server's autoload flag (connect automatically at session startup).
74
+ *
75
+ * Autoload defaults to true, so turning it on removes the key to keep the
76
+ * config file free of redundant fields; turning it off writes `autoload: false`.
77
+ *
78
+ * @throws Error if the server doesn't exist
79
+ */
80
+ export declare function setServerAutoload(filePath: string, name: string, autoload: boolean): Promise<void>;
72
81
  /**
73
82
  * Read the disabled servers list from a config file.
74
83
  */
@@ -13,6 +13,8 @@ export interface LoadMCPConfigsOptions {
13
13
  filterExa?: boolean;
14
14
  /** Whether to filter out browser MCP servers when builtin browser tool is enabled (default: false) */
15
15
  filterBrowser?: boolean;
16
+ /** Only include servers eligible for startup connection, i.e. autoload !== false (default: false) */
17
+ autoloadOnly?: boolean;
16
18
  }
17
19
  /** Result of loading MCP configs */
18
20
  export interface LoadMCPConfigsResult {
@@ -28,6 +28,8 @@ export interface MCPToolsLoadOptions {
28
28
  filterExa?: boolean;
29
29
  /** Whether to filter out browser MCP servers when builtin browser tool is enabled (default: false) */
30
30
  filterBrowser?: boolean;
31
+ /** Only connect servers with autoload !== false (default: false) */
32
+ autoloadOnly?: boolean;
31
33
  /** SQLite storage for MCP tool cache (null disables cache) */
32
34
  cacheStorage?: AgentStorage | null;
33
35
  /** Auth storage used to resolve OAuth credentials before initial MCP connect */
@@ -38,6 +38,8 @@ export interface MCPDiscoverOptions {
38
38
  filterExa?: boolean;
39
39
  /** Whether to filter out browser MCP servers when builtin browser tool is enabled (default: false) */
40
40
  filterBrowser?: boolean;
41
+ /** Only connect servers with autoload !== false (default: false) */
42
+ autoloadOnly?: boolean;
41
43
  /** Called when starting to connect to servers */
42
44
  onConnecting?: (serverNames: string[]) => void;
43
45
  }
@@ -45,6 +45,12 @@ export interface MCPAuthConfig {
45
45
  interface MCPServerConfigBase {
46
46
  /** Whether this server is enabled (default: true) */
47
47
  enabled?: boolean;
48
+ /**
49
+ * Whether to connect this server automatically at session startup (default: true).
50
+ * When false the server stays configured-but-disconnected until connected
51
+ * explicitly (e.g. `/mcp connect <name>`).
52
+ */
53
+ autoload?: boolean;
48
54
  /** Connection timeout in milliseconds (default: 30000) */
49
55
  timeout?: number;
50
56
  /** Authentication configuration (optional) */
@@ -47,7 +47,7 @@ export interface CreateAgentSessionOptions {
47
47
  requestedModel: Model;
48
48
  reason: string;
49
49
  };
50
- /** Models available for cycling (Ctrl+P in interactive mode) */
50
+ /** Models available for cycling (Alt+N in interactive mode) */
51
51
  scopedModels?: ScopedModelSelection[];
52
52
  /** System prompt blocks. Array replaces default, function receives default blocks and returns final blocks. */
53
53
  systemPrompt?: string[] | ((defaultPrompt: string[]) => string[]);