@gajae-code/coding-agent 0.7.11 → 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 (78) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist/types/capability/mcp.d.ts +2 -0
  4. package/dist/types/config/settings-schema.d.ts +25 -2
  5. package/dist/types/discovery/cursor.d.ts +4 -1
  6. package/dist/types/discovery/index.d.ts +0 -1
  7. package/dist/types/discovery/windsurf.d.ts +3 -1
  8. package/dist/types/gjc-runtime/session-state-sidecar.d.ts +5 -0
  9. package/dist/types/modes/components/custom-editor.d.ts +4 -0
  10. package/dist/types/modes/components/settings-selector.d.ts +1 -0
  11. package/dist/types/modes/components/status-line.d.ts +8 -0
  12. package/dist/types/modes/components/two-column-body.d.ts +9 -0
  13. package/dist/types/modes/components/welcome.d.ts +9 -1
  14. package/dist/types/modes/controllers/input-controller.d.ts +1 -1
  15. package/dist/types/modes/controllers/selector-controller.d.ts +8 -0
  16. package/dist/types/modes/interactive-mode.d.ts +1 -0
  17. package/dist/types/modes/rpc/rpc-types.d.ts +1 -0
  18. package/dist/types/modes/types.d.ts +1 -0
  19. package/dist/types/runtime-mcp/config-writer.d.ts +9 -0
  20. package/dist/types/runtime-mcp/config.d.ts +2 -0
  21. package/dist/types/runtime-mcp/loader.d.ts +2 -0
  22. package/dist/types/runtime-mcp/manager.d.ts +2 -0
  23. package/dist/types/runtime-mcp/types.d.ts +6 -0
  24. package/dist/types/system-prompt.d.ts +7 -0
  25. package/dist/types/workflow/workflow-intent-diff.d.ts +19 -0
  26. package/package.json +10 -10
  27. package/src/capability/mcp.ts +2 -0
  28. package/src/config/mcp-schema.json +5 -1
  29. package/src/config/settings-schema.ts +18 -2
  30. package/src/coordinator-mcp/server.ts +6 -0
  31. package/src/discovery/builtin.ts +12 -0
  32. package/src/discovery/cursor.ts +5 -84
  33. package/src/discovery/gemini.ts +3 -89
  34. package/src/discovery/index.ts +4 -1
  35. package/src/discovery/mcp-json.ts +11 -0
  36. package/src/discovery/opencode.ts +5 -122
  37. package/src/discovery/windsurf.ts +4 -82
  38. package/src/edit/read-file.ts +9 -1
  39. package/src/gjc-runtime/session-state-sidecar.ts +167 -24
  40. package/src/gjc-runtime/team-runtime.ts +56 -51
  41. package/src/internal-urls/docs-index.generated.ts +4 -4
  42. package/src/modes/components/agent-dashboard.ts +1 -34
  43. package/src/modes/components/custom-editor.ts +18 -0
  44. package/src/modes/components/extensions/extension-dashboard.ts +2 -48
  45. package/src/modes/components/model-selector.ts +58 -2
  46. package/src/modes/components/session-selector.ts +19 -9
  47. package/src/modes/components/settings-selector.ts +13 -0
  48. package/src/modes/components/status-line.ts +215 -86
  49. package/src/modes/components/tree-selector.ts +28 -8
  50. package/src/modes/components/two-column-body.ts +36 -0
  51. package/src/modes/components/welcome.ts +171 -35
  52. package/src/modes/controllers/event-controller.ts +4 -0
  53. package/src/modes/controllers/input-controller.ts +151 -30
  54. package/src/modes/controllers/selector-controller.ts +25 -28
  55. package/src/modes/interactive-mode.ts +20 -23
  56. package/src/modes/rpc/rpc-types.ts +1 -0
  57. package/src/modes/shared/agent-wire/deep-interview-gate.ts +9 -3
  58. package/src/modes/shared/agent-wire/workflow-gate-schema.ts +20 -0
  59. package/src/modes/types.ts +1 -0
  60. package/src/notifications/index.ts +20 -1
  61. package/src/notifications/lifecycle-control-runtime.ts +12 -3
  62. package/src/prompts/system/system-prompt.md +15 -1
  63. package/src/runtime-mcp/config-writer.ts +28 -0
  64. package/src/runtime-mcp/config.ts +7 -0
  65. package/src/runtime-mcp/loader.ts +3 -0
  66. package/src/runtime-mcp/manager.ts +3 -0
  67. package/src/runtime-mcp/types.ts +6 -0
  68. package/src/sdk.ts +4 -0
  69. package/src/session/agent-session.ts +21 -1
  70. package/src/session/session-manager.ts +58 -18
  71. package/src/system-prompt.ts +8 -0
  72. package/src/task/executor.ts +5 -0
  73. package/src/tools/ast-grep.ts +10 -7
  74. package/src/tools/bash.ts +15 -6
  75. package/src/tools/index.ts +8 -1
  76. package/src/workflow/workflow-intent-diff.ts +199 -0
  77. package/dist/types/discovery/vscode.d.ts +0 -1
  78. package/src/discovery/vscode.ts +0 -105
package/CHANGELOG.md CHANGED
@@ -2,9 +2,42 @@
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
+
5
36
  ## [0.7.11] - 2026-07-03
37
+
6
38
  ### Fixed
7
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`.
8
41
  - Native Windows terminals now default `app.message.queue` to `Alt+Q` instead of `Alt+Enter`, avoiding the Windows Terminal fullscreen shortcut conflict (#1422).
9
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).
10
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.
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)
@@ -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) */
@@ -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[];
@@ -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 {};
@@ -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 {};
@@ -44,6 +44,10 @@ export declare class CustomEditor extends Editor {
44
44
  onQueue?: () => void;
45
45
  /** Called when Caps Lock is pressed. */
46
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;
47
51
  setActionKeys(action: ConfigurableEditorAction, keys: KeyId[]): void;
48
52
  /**
49
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 */
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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) */
@@ -76,6 +76,13 @@ export interface BuildSystemPromptOptions {
76
76
  mcpDiscoveryMode?: boolean;
77
77
  /** Discoverable MCP server summaries to advertise when discovery mode is active. */
78
78
  mcpDiscoveryServerSummaries?: string[];
79
+ /** Whether built-in tool discovery ("all" mode) is active; enables the tool-discovery prompt block. */
80
+ toolDiscoveryActive?: boolean;
81
+ /** Hidden discoverable tools to advertise (name + one-line summary) when tool discovery is active. */
82
+ discoverableTools?: Array<{
83
+ name: string;
84
+ summary: string;
85
+ }>;
79
86
  /** Encourage the agent to delegate via tasks unless changes are trivial. */
80
87
  eagerTasks?: boolean;
81
88
  /** Rules with alwaysApply=true — their full content is injected into the prompt. */
@@ -0,0 +1,19 @@
1
+ export declare const WORKFLOW_INTENT_DIFF_CUSTOM_TYPE = "workflow-intent-diff";
2
+ export type WorkflowIntentRoute = "direct" | "deep-interview" | "ralplan" | "ultragoal" | "team";
3
+ export type DirectTrackingMode = "custom-entry-only" | "not-direct";
4
+ export type RootCausePhaseStatus = "active" | "inactive";
5
+ export interface WorkflowIntentDiff {
6
+ readonly version: 1;
7
+ readonly route: WorkflowIntentRoute;
8
+ readonly reason: string;
9
+ readonly directTracking: DirectTrackingMode;
10
+ readonly recommendedSkill?: Exclude<WorkflowIntentRoute, "direct">;
11
+ readonly recommendedInvocation?: string;
12
+ readonly triggers: readonly string[];
13
+ readonly rootCausePhase: {
14
+ readonly status: RootCausePhaseStatus;
15
+ readonly triggers: readonly string[];
16
+ };
17
+ readonly promptPreview: string;
18
+ }
19
+ export declare function buildWorkflowIntentDiff(text: string): WorkflowIntentDiff | null;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@gajae-code/coding-agent",
4
- "version": "0.7.11",
4
+ "version": "0.8.0",
5
5
  "description": "Gajae Code CLI with read, bash, edit, write tools and session management",
6
- "homepage": "https://gaebal-gajae.dev",
6
+ "homepage": "https://gajae-code.com",
7
7
  "author": "Yeachan-Heo",
8
8
  "contributors": [
9
9
  "Mario Zechner"
@@ -11,11 +11,11 @@
11
11
  "license": "MIT",
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "git+https://github.com/gajae-ai/gajae-code.git",
14
+ "url": "git+https://github.com/Yeachan-Heo/gajae-code.git",
15
15
  "directory": "packages/coding-agent"
16
16
  },
17
17
  "bugs": {
18
- "url": "https://github.com/gajae-ai/gajae-code/issues"
18
+ "url": "https://github.com/Yeachan-Heo/gajae-code/issues"
19
19
  },
20
20
  "keywords": [
21
21
  "coding-agent",
@@ -52,12 +52,12 @@
52
52
  "@agentclientprotocol/sdk": "0.21.0",
53
53
  "@babel/parser": "^7.29.3",
54
54
  "@mozilla/readability": "^0.6.0",
55
- "@gajae-code/stats": "0.7.11",
56
- "@gajae-code/agent-core": "0.7.11",
57
- "@gajae-code/ai": "0.7.11",
58
- "@gajae-code/natives": "0.7.11",
59
- "@gajae-code/tui": "0.7.11",
60
- "@gajae-code/utils": "0.7.11",
55
+ "@gajae-code/stats": "0.8.0",
56
+ "@gajae-code/agent-core": "0.8.0",
57
+ "@gajae-code/ai": "0.8.0",
58
+ "@gajae-code/natives": "0.8.0",
59
+ "@gajae-code/tui": "0.8.0",
60
+ "@gajae-code/utils": "0.8.0",
61
61
  "@puppeteer/browsers": "^2.13.0",
62
62
  "@types/turndown": "5.0.6",
63
63
  "@xterm/headless": "^6.0.0",
@@ -15,6 +15,8 @@ export interface MCPServer {
15
15
  name: string;
16
16
  /** Whether this server is enabled (default: true) */
17
17
  enabled?: boolean;
18
+ /** Whether to connect automatically at session startup (default: true) */
19
+ autoload?: boolean;
18
20
  /** Connection timeout in milliseconds */
19
21
  timeout?: number;
20
22
  /** Command to run (for stdio transport) */
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://raw.githubusercontent.com/can1357/gajae-code/main/packages/coding-agent/src/config/mcp-schema.json",
3
+ "$id": "https://raw.githubusercontent.com/Yeachan-Heo/gajae-code/main/packages/coding-agent/src/config/mcp-schema.json",
4
4
  "title": "GJC MCP configuration",
5
5
  "description": "Schema for mcp.json, .mcp.json, .gjc/mcp.json, and ~/.gjc/agent/mcp.json used by the GJC coding agent.",
6
6
  "type": "object",
@@ -96,6 +96,10 @@
96
96
  "type": "boolean",
97
97
  "description": "Whether GJC should try to connect this server."
98
98
  },
99
+ "autoload": {
100
+ "type": "boolean",
101
+ "description": "Whether to connect this server automatically at session startup (default: true). When false the server stays configured until connected explicitly (e.g. /mcp connect <name>)."
102
+ },
99
103
  "timeout": {
100
104
  "type": "number",
101
105
  "exclusiveMinimum": 0,
@@ -507,6 +507,21 @@ export const SETTINGS_SCHEMA = {
507
507
  description: "Use the session name color for the editor border and status line gap",
508
508
  },
509
509
  },
510
+ "statusLine.maxRows": {
511
+ type: "number",
512
+ default: 1,
513
+ ui: {
514
+ tab: "appearance",
515
+ label: "Status Line Rows",
516
+ description:
517
+ "Maximum rows for the status line. When greater than 1, overflowing segments wrap onto additional rows instead of being dropped.",
518
+ options: [
519
+ { value: "1", label: "1 row", description: "Single line; overflow is truncated (default)" },
520
+ { value: "2", label: "2 rows", description: "Wrap overflow onto a second row" },
521
+ { value: "3", label: "3 rows", description: "Wrap overflow across up to three rows" },
522
+ ],
523
+ },
524
+ },
510
525
  "tools.artifactSpillThreshold": {
511
526
  type: "number",
512
527
  default: 50,
@@ -2478,7 +2493,7 @@ export const SETTINGS_SCHEMA = {
2478
2493
  "tools.discoveryMode": {
2479
2494
  type: "enum",
2480
2495
  values: ["off", "all"] as const,
2481
- default: "off",
2496
+ default: "all",
2482
2497
  ui: {
2483
2498
  tab: "tools",
2484
2499
  label: "Tool Discovery",
@@ -2493,7 +2508,7 @@ export const SETTINGS_SCHEMA = {
2493
2508
  tab: "tools",
2494
2509
  label: "Essential Tools Override",
2495
2510
  description:
2496
- "Override the always-loaded built-in tools (default: read, bash, edit). Leave empty to use defaults.",
2511
+ "Override the always-loaded built-in tools (default: read, bash, edit, write, search, find). Leave empty to use defaults.",
2497
2512
  },
2498
2513
  },
2499
2514
 
@@ -3280,6 +3295,7 @@ export interface ExaSettings {
3280
3295
  export interface StatusLineSettings {
3281
3296
  preset: StatusLinePreset;
3282
3297
  separator: StatusLineSeparatorStyle;
3298
+ maxRows: number;
3283
3299
  showHookStatus: boolean;
3284
3300
  showSkillHud: boolean;
3285
3301
  leftSegments: StatusLineSegmentId[];
@@ -1281,6 +1281,12 @@ async function sendTmuxPromptKeys(
1281
1281
  await runner(["tmux", "delete-buffer", "-b", bufferName]);
1282
1282
  return false;
1283
1283
  }
1284
+
1285
+ // Multiline slash-command prompts can leave the editor autocomplete menu focused
1286
+ // after paste. Escape clears that UI-only state so Enter submits the buffered
1287
+ // prompt instead of selecting the highlighted completion.
1288
+ const dismissedAutocomplete = await runner(["tmux", "send-keys", "-t", target, "Escape"]);
1289
+ if (dismissedAutocomplete.exitCode !== 0) return false;
1284
1290
  const submitted = await runner(["tmux", "send-keys", "-t", target, "Enter"]);
1285
1291
  return submitted.exitCode === 0;
1286
1292
  }
@@ -165,9 +165,21 @@ async function loadMCPServers(ctx: LoadContext): Promise<LoadResult<MCPServer>>
165
165
  timeout = undefined;
166
166
  }
167
167
 
168
+ // Validate autoload: boolean only, warn on other types
169
+ let autoload: boolean | undefined;
170
+ if (serverConfig.autoload === undefined || serverConfig.autoload === null) {
171
+ autoload = undefined;
172
+ } else if (typeof serverConfig.autoload === "boolean") {
173
+ autoload = serverConfig.autoload;
174
+ } else {
175
+ logger.warn(`MCP server "${serverName}": invalid autoload type ${typeof serverConfig.autoload}, ignoring`);
176
+ autoload = undefined;
177
+ }
178
+
168
179
  result.push({
169
180
  name: serverName,
170
181
  enabled,
182
+ autoload,
171
183
  timeout,
172
184
  command: serverConfig.command as string | undefined,
173
185
  args: serverConfig.args as string[] | undefined,