@gajae-code/coding-agent 0.7.7 → 0.7.9
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.
- package/CHANGELOG.md +38 -1
- package/README.md +14 -0
- package/dist/types/cli/local-provider-smoke.d.ts +59 -0
- package/dist/types/cli/notify-cli.d.ts +1 -1
- package/dist/types/cli/update-cli.d.ts +24 -1
- package/dist/types/commands/local-provider.d.ts +34 -0
- package/dist/types/config/keybindings.d.ts +1 -1
- package/dist/types/config/model-profile-activation.d.ts +19 -2
- package/dist/types/config/model-profiles.d.ts +1 -0
- package/dist/types/config/model-registry.d.ts +9 -0
- package/dist/types/config/models-config-schema.d.ts +5 -0
- package/dist/types/config/settings-schema.d.ts +45 -0
- package/dist/types/config/settings.d.ts +7 -0
- package/dist/types/coordinator-mcp/server.d.ts +8 -0
- package/dist/types/gjc-runtime/launch-tmux.d.ts +14 -5
- package/dist/types/gjc-runtime/team-runtime.d.ts +1 -1
- package/dist/types/gjc-runtime/tmux-common.d.ts +12 -0
- package/dist/types/gjc-runtime/ultragoal-guard.d.ts +3 -1
- package/dist/types/modes/components/custom-model-preset-wizard.d.ts +1 -1
- package/dist/types/modes/components/hook-input.d.ts +1 -0
- package/dist/types/modes/components/model-selector.d.ts +11 -0
- package/dist/types/modes/components/settings-selector.d.ts +4 -1
- package/dist/types/modes/components/status-line/types.d.ts +5 -7
- package/dist/types/modes/components/status-line.d.ts +7 -3
- package/dist/types/modes/controllers/extension-ui-controller.d.ts +3 -1
- package/dist/types/modes/controllers/input-controller.d.ts +1 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +2 -1
- package/dist/types/modes/interactive-mode.d.ts +3 -1
- package/dist/types/modes/prompt-action-autocomplete.d.ts +1 -0
- package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +21 -1
- package/dist/types/modes/tmux-scroll.d.ts +18 -0
- package/dist/types/modes/types.d.ts +3 -1
- package/dist/types/modes/utils/terminal-bell.d.ts +3 -0
- package/dist/types/notifications/daemon-paths.d.ts +9 -0
- package/dist/types/notifications/telegram-daemon-cli.d.ts +21 -4
- package/dist/types/notifications/telegram-daemon.d.ts +1 -10
- package/dist/types/tools/ask.d.ts +24 -0
- package/dist/types/tools/ultragoal-ask-guard.d.ts +9 -2
- package/package.json +7 -7
- package/src/cli/local-provider-smoke.ts +632 -0
- package/src/cli/notify-cli.ts +5 -3
- package/src/cli/update-cli.ts +155 -13
- package/src/cli.ts +19 -0
- package/src/commands/launch.ts +46 -1
- package/src/commands/local-provider.ts +62 -0
- package/src/commands/notify.ts +1 -1
- package/src/config/keybindings.ts +1 -1
- package/src/config/model-profile-activation.ts +92 -11
- package/src/config/model-profiles.ts +15 -2
- package/src/config/model-registry.ts +136 -6
- package/src/config/models-config-schema.ts +9 -0
- package/src/config/settings-schema.ts +48 -0
- package/src/config/settings.ts +11 -0
- package/src/coordinator-mcp/server.ts +280 -36
- package/src/deep-interview/render-middleware.ts +1 -0
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +14 -6
- package/src/defaults/gjc/skills/ralplan/SKILL.md +14 -7
- package/src/gjc-runtime/deep-interview-runtime.ts +1 -1
- package/src/gjc-runtime/launch-tmux.ts +321 -38
- package/src/gjc-runtime/launch-worktree.ts +16 -2
- package/src/gjc-runtime/team-runtime.ts +87 -7
- package/src/gjc-runtime/tmux-common.ts +16 -0
- package/src/gjc-runtime/tmux-sessions.ts +13 -9
- package/src/gjc-runtime/ultragoal-guard.ts +11 -5
- package/src/internal-urls/docs-index.generated.ts +10 -9
- package/src/modes/components/agent-dashboard.ts +2 -1
- package/src/modes/components/custom-model-preset-wizard.ts +31 -192
- package/src/modes/components/hook-editor.ts +7 -4
- package/src/modes/components/hook-input.ts +4 -0
- package/src/modes/components/model-selector.ts +260 -12
- package/src/modes/components/session-observer-overlay.ts +3 -3
- package/src/modes/components/settings-selector.ts +506 -5
- package/src/modes/components/status-line/segments.ts +16 -19
- package/src/modes/components/status-line/types.ts +6 -2
- package/src/modes/components/status-line.ts +70 -35
- package/src/modes/controllers/event-controller.ts +98 -4
- package/src/modes/controllers/extension-ui-controller.ts +5 -0
- package/src/modes/controllers/input-controller.ts +15 -0
- package/src/modes/controllers/selector-controller.ts +142 -11
- package/src/modes/interactive-mode.ts +7 -2
- package/src/modes/prompt-action-autocomplete.ts +8 -0
- package/src/modes/shared/agent-wire/deep-interview-gate.ts +11 -4
- package/src/modes/tmux-scroll.ts +92 -0
- package/src/modes/types.ts +6 -1
- package/src/modes/utils/terminal-bell.ts +48 -0
- package/src/notifications/daemon-paths.ts +22 -0
- package/src/notifications/telegram-daemon-cli.ts +125 -13
- package/src/notifications/telegram-daemon.ts +6 -21
- package/src/prompts/system/system-prompt.md +5 -0
- package/src/sdk.ts +10 -1
- package/src/session/agent-session.ts +84 -6
- package/src/slash-commands/builtin-registry.ts +106 -13
- package/src/tools/ask.ts +11 -1
- package/src/tools/eval.ts +2 -2
- package/src/tools/render-utils.ts +2 -0
- package/src/tools/ultragoal-ask-guard.ts +39 -5
|
@@ -41,7 +41,9 @@ export declare class ExtensionUiController {
|
|
|
41
41
|
/**
|
|
42
42
|
* Show a text input for hooks.
|
|
43
43
|
*/
|
|
44
|
-
showHookInput(title: string, placeholder?: string, dialogOptions?: ExtensionUIDialogOptions
|
|
44
|
+
showHookInput(title: string, placeholder?: string, dialogOptions?: ExtensionUIDialogOptions, inputOptions?: {
|
|
45
|
+
readonly initialValue?: string;
|
|
46
|
+
}): Promise<string | undefined>;
|
|
45
47
|
/**
|
|
46
48
|
* Hide the hook input.
|
|
47
49
|
*/
|
|
@@ -32,6 +32,7 @@ export declare class InputController {
|
|
|
32
32
|
temporary?: boolean;
|
|
33
33
|
}): Promise<void>;
|
|
34
34
|
toggleToolOutputExpansion(): void;
|
|
35
|
+
scrollTmuxToPreviousUserInput(): void;
|
|
35
36
|
setToolsExpanded(expanded: boolean): void;
|
|
36
37
|
toggleThinkingBlockVisibility(): void;
|
|
37
38
|
openExternalEditor(): Promise<void>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Component } from "@gajae-code/tui";
|
|
2
|
+
import type { ModelProfileConfig } from "../../config/models-config-schema";
|
|
2
3
|
import type { InteractiveModeContext, OAuthSelectorOptions } from "../../modes/types";
|
|
3
4
|
import type { JobsObserver } from "../jobs-observer";
|
|
4
5
|
import type { SessionObserverRegistry } from "../session-observer-registry";
|
|
@@ -15,7 +16,7 @@ export declare class SelectorController {
|
|
|
15
16
|
focus: Component;
|
|
16
17
|
}): void;
|
|
17
18
|
showProviderOnboarding(): void;
|
|
18
|
-
showCustomModelPresetWizard(): void;
|
|
19
|
+
showCustomModelPresetWizard(snapshot: ModelProfileConfig): void;
|
|
19
20
|
showCustomProviderWizard(): void;
|
|
20
21
|
showSettingsSelector(): void;
|
|
21
22
|
showThemeSelector(): void;
|
|
@@ -250,7 +250,9 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
250
250
|
setHookStatus(key: string, text: string | undefined): void;
|
|
251
251
|
showHookSelector(title: string, options: string[], dialogOptions?: ExtensionUIDialogOptions): Promise<string | undefined>;
|
|
252
252
|
hideHookSelector(): void;
|
|
253
|
-
showHookInput(title: string, placeholder?: string
|
|
253
|
+
showHookInput(title: string, placeholder?: string, dialogOptions?: ExtensionUIDialogOptions, inputOptions?: {
|
|
254
|
+
readonly initialValue?: string;
|
|
255
|
+
}): Promise<string | undefined>;
|
|
254
256
|
hideHookInput(): void;
|
|
255
257
|
showHookEditor(title: string, prefill?: string, dialogOptions?: ExtensionUIDialogOptions, editorOptions?: {
|
|
256
258
|
promptStyle?: boolean;
|
|
@@ -14,6 +14,7 @@ interface PromptActionAutocompleteOptions {
|
|
|
14
14
|
copyCurrentLine: () => void;
|
|
15
15
|
copyPrompt: () => void;
|
|
16
16
|
pasteImage: () => void;
|
|
17
|
+
scrollTmuxToPreviousUserInput: () => void;
|
|
17
18
|
undo: (prefix: string) => void;
|
|
18
19
|
moveCursorToMessageEnd: () => void;
|
|
19
20
|
moveCursorToMessageStart: () => void;
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep-interview gate mapping (#316).
|
|
3
|
+
*
|
|
4
|
+
* Converts deep-interview `ask`-tool questions into machine-addressable
|
|
5
|
+
* `workflow_gate` { kind: "question" } events (option set + free-text shape
|
|
6
|
+
* encoded in `schema`/`options`) and decodes a `workflow_gate_response` answer
|
|
7
|
+
* back into the exact QuestionResult shape the human path produces, so ambiguity
|
|
8
|
+
* scoring/state updates proceed identically whether a human or an agent answers.
|
|
9
|
+
*
|
|
10
|
+
* This is the pure mapping primitive. Routing the ask tool through it (instead of
|
|
11
|
+
* the interactive select/editor UI) when an unattended controller + gate broker
|
|
12
|
+
* are attached is wired with the transport in #321 and exercised by #323.
|
|
13
|
+
*/
|
|
14
|
+
import type { RpcWorkflowGateKind, RpcWorkflowStage } from "../../rpc/rpc-types";
|
|
1
15
|
import type { OpenGateInput } from "./workflow-gate-broker";
|
|
2
16
|
/** "Other (type your own)" sentinel, mirroring the interactive ask tool. */
|
|
3
17
|
export declare const GATE_OTHER_OPTION = "Other (type your own)";
|
|
@@ -9,6 +23,10 @@ export interface AskGateDeepInterviewState {
|
|
|
9
23
|
dimension: string;
|
|
10
24
|
ambiguity: number;
|
|
11
25
|
}
|
|
26
|
+
export interface AskGateWorkflowGateMeta {
|
|
27
|
+
stage: RpcWorkflowStage;
|
|
28
|
+
kind: RpcWorkflowGateKind;
|
|
29
|
+
}
|
|
12
30
|
export interface AskGateQuestion {
|
|
13
31
|
id: string;
|
|
14
32
|
question: string;
|
|
@@ -22,6 +40,8 @@ export interface AskGateQuestion {
|
|
|
22
40
|
* `stage_state`; when absent, the question text is regex-parsed as a fallback.
|
|
23
41
|
*/
|
|
24
42
|
deepInterview?: AskGateDeepInterviewState;
|
|
43
|
+
/** Override the emitted workflow gate address for non-deep-interview ask prompts. */
|
|
44
|
+
workflowGate?: AskGateWorkflowGateMeta;
|
|
25
45
|
}
|
|
26
46
|
export interface AskGateResult {
|
|
27
47
|
id: string;
|
|
@@ -47,7 +67,7 @@ export declare class DeepInterviewGateError extends Error {
|
|
|
47
67
|
readonly code: "invalid_answer_shape" | "unknown_option" | "multi_not_allowed" | "missing_custom" | "empty_selection" | "duplicate_selection";
|
|
48
68
|
constructor(code: "invalid_answer_shape" | "unknown_option" | "multi_not_allowed" | "missing_custom" | "empty_selection" | "duplicate_selection", message: string);
|
|
49
69
|
}
|
|
50
|
-
/** Build the `workflow_gate` open-input for one
|
|
70
|
+
/** Build the `workflow_gate` open-input for one ask question. */
|
|
51
71
|
export declare function questionToGate(question: AskGateQuestion): OpenGateInput;
|
|
52
72
|
/**
|
|
53
73
|
* Decode a gate answer into the QuestionResult the interactive path produces.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const TMUX_PREVIOUS_USER_INPUT_SEARCH_PATTERN = "^ *user *$";
|
|
2
|
+
type TmuxScrollFailureReason = "not_inside_tmux" | "tmux_command_failed" | "copy_mode_failed" | "history_bottom_failed" | "search_failed";
|
|
3
|
+
export type TmuxScrollToPreviousUserInputResult = {
|
|
4
|
+
ok: true;
|
|
5
|
+
} | {
|
|
6
|
+
ok: false;
|
|
7
|
+
reason: TmuxScrollFailureReason;
|
|
8
|
+
error?: string;
|
|
9
|
+
};
|
|
10
|
+
interface TmuxSpawnResult {
|
|
11
|
+
exitCode: number | null;
|
|
12
|
+
stderr?: {
|
|
13
|
+
toString(): string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
type TmuxSpawnSync = (command: string, args: string[], env: NodeJS.ProcessEnv) => TmuxSpawnResult;
|
|
17
|
+
export declare function scrollTmuxToPreviousUserInput(env?: NodeJS.ProcessEnv, spawnSync?: TmuxSpawnSync): TmuxScrollToPreviousUserInputResult;
|
|
18
|
+
export {};
|
|
@@ -260,7 +260,9 @@ export interface InteractiveModeContext {
|
|
|
260
260
|
setHookStatus(key: string, text: string | undefined): void;
|
|
261
261
|
showHookSelector(title: string, options: string[], dialogOptions?: ExtensionUIDialogOptions): Promise<string | undefined>;
|
|
262
262
|
hideHookSelector(): void;
|
|
263
|
-
showHookInput(title: string, placeholder?: string
|
|
263
|
+
showHookInput(title: string, placeholder?: string, dialogOptions?: ExtensionUIDialogOptions, inputOptions?: {
|
|
264
|
+
readonly initialValue?: string;
|
|
265
|
+
}): Promise<string | undefined>;
|
|
264
266
|
hideHookInput(): void;
|
|
265
267
|
showHookEditor(title: string, prefill?: string, dialogOptions?: ExtensionUIDialogOptions, editorOptions?: {
|
|
266
268
|
promptStyle?: boolean;
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
-
import { Settings } from "../config/settings";
|
|
2
|
-
import {
|
|
1
|
+
import type { Settings } from "../config/settings";
|
|
2
|
+
import type { TelegramDaemonOptions } from "./telegram-daemon";
|
|
3
|
+
type TelegramDaemonRunner = {
|
|
4
|
+
run(): Promise<void>;
|
|
5
|
+
requestStop(reason?: "reload" | "signal" | "stop"): void;
|
|
6
|
+
};
|
|
7
|
+
type TelegramDaemonConstructor = new (opts: TelegramDaemonOptions) => TelegramDaemonRunner;
|
|
3
8
|
export interface RunDaemonInternalDeps {
|
|
4
|
-
SettingsImpl?:
|
|
5
|
-
|
|
9
|
+
SettingsImpl?: {
|
|
10
|
+
init: (options?: {
|
|
11
|
+
agentDir?: string;
|
|
12
|
+
}) => Promise<Pick<Settings, "get" | "getAgentDir">>;
|
|
13
|
+
};
|
|
14
|
+
DaemonImpl?: TelegramDaemonConstructor;
|
|
6
15
|
processPid?: number;
|
|
16
|
+
pidAlive?: (pid: number) => boolean;
|
|
7
17
|
}
|
|
18
|
+
export declare function createLightweightDaemonSettings(input: {
|
|
19
|
+
agentDir: string;
|
|
20
|
+
rawConfig?: unknown;
|
|
21
|
+
}): Pick<Settings, "get" | "getAgentDir">;
|
|
22
|
+
export declare function loadLightweightDaemonSettings(agentDir: string): Promise<Pick<Settings, "get" | "getAgentDir">>;
|
|
23
|
+
export declare function ownerPidFromOwnerId(ownerId: string): number | undefined;
|
|
8
24
|
export declare function runDaemonSmoke(opts?: {
|
|
9
25
|
agentDir?: string;
|
|
10
26
|
}): Promise<void>;
|
|
11
27
|
export declare function runDaemonInternal(argv: string[], deps?: RunDaemonInternalDeps): Promise<void>;
|
|
28
|
+
export {};
|
|
@@ -16,14 +16,6 @@ export interface DaemonState {
|
|
|
16
16
|
version: 1;
|
|
17
17
|
stoppedAt?: number;
|
|
18
18
|
}
|
|
19
|
-
export interface DaemonPaths {
|
|
20
|
-
dir: string;
|
|
21
|
-
lock: string;
|
|
22
|
-
state: string;
|
|
23
|
-
roots: string;
|
|
24
|
-
steal: string;
|
|
25
|
-
aliases: string;
|
|
26
|
-
}
|
|
27
19
|
export interface TelegramDaemonFs {
|
|
28
20
|
mkdir(path: string, opts?: fs.MakeDirectoryOptions): Promise<void>;
|
|
29
21
|
readFile(path: string, encoding: BufferEncoding): Promise<string>;
|
|
@@ -59,7 +51,7 @@ export declare const DAEMON_VERSION = 1;
|
|
|
59
51
|
export declare const CLIENT_PING_PONG_CAPABILITY = "client_ping_pong";
|
|
60
52
|
/** Protocol version the daemon advertises in its ClientHello. */
|
|
61
53
|
export declare const NOTIFICATION_PROTOCOL_VERSION = 2;
|
|
62
|
-
export
|
|
54
|
+
export { type DaemonPaths, daemonPaths } from "./daemon-paths";
|
|
63
55
|
/**
|
|
64
56
|
* Attach session-lifecycle control (create/close/resume) to the running daemon.
|
|
65
57
|
*
|
|
@@ -390,4 +382,3 @@ export declare class TelegramNotificationDaemon {
|
|
|
390
382
|
run(): Promise<void>;
|
|
391
383
|
private controlStopRequested;
|
|
392
384
|
}
|
|
393
|
-
export {};
|
|
@@ -36,6 +36,18 @@ export declare const askSchema: z.ZodObject<{
|
|
|
36
36
|
dimension: z.ZodString;
|
|
37
37
|
ambiguity: z.ZodNumber;
|
|
38
38
|
}, z.core.$strip>>;
|
|
39
|
+
workflowGate: z.ZodOptional<z.ZodObject<{
|
|
40
|
+
stage: z.ZodEnum<{
|
|
41
|
+
"deep-interview": "deep-interview";
|
|
42
|
+
ralplan: "ralplan";
|
|
43
|
+
ultragoal: "ultragoal";
|
|
44
|
+
}>;
|
|
45
|
+
kind: z.ZodEnum<{
|
|
46
|
+
approval: "approval";
|
|
47
|
+
execution: "execution";
|
|
48
|
+
question: "question";
|
|
49
|
+
}>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
39
51
|
}, z.core.$strip>>;
|
|
40
52
|
}, z.core.$strip>;
|
|
41
53
|
export type AskToolInput = z.infer<typeof askSchema>;
|
|
@@ -87,6 +99,18 @@ export declare class AskTool implements AgentTool<typeof askSchema, AskToolDetai
|
|
|
87
99
|
dimension: z.ZodString;
|
|
88
100
|
ambiguity: z.ZodNumber;
|
|
89
101
|
}, z.core.$strip>>;
|
|
102
|
+
workflowGate: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
stage: z.ZodEnum<{
|
|
104
|
+
"deep-interview": "deep-interview";
|
|
105
|
+
ralplan: "ralplan";
|
|
106
|
+
ultragoal: "ultragoal";
|
|
107
|
+
}>;
|
|
108
|
+
kind: z.ZodEnum<{
|
|
109
|
+
approval: "approval";
|
|
110
|
+
execution: "execution";
|
|
111
|
+
question: "question";
|
|
112
|
+
}>;
|
|
113
|
+
}, z.core.$strip>>;
|
|
90
114
|
}, z.core.$strip>>;
|
|
91
115
|
}, z.core.$strip>;
|
|
92
116
|
readonly strict = true;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { AgentTool } from "@gajae-code/agent-core";
|
|
2
2
|
import { type UltragoalAskBlockDiagnostic } from "../gjc-runtime/ultragoal-guard";
|
|
3
|
+
export interface UltragoalAskGuardContext {
|
|
4
|
+
activeSkillState?: {
|
|
5
|
+
skill?: string;
|
|
6
|
+
session_id?: string;
|
|
7
|
+
} | null;
|
|
8
|
+
sessionId?: string | null;
|
|
9
|
+
}
|
|
3
10
|
export declare function formatUltragoalAskBlockMessage(diagnostic: UltragoalAskBlockDiagnostic): string;
|
|
4
|
-
export declare function assertUltragoalAskAllowed(cwd: string): Promise<void>;
|
|
5
|
-
export declare function guardToolForUltragoalAsk<T extends AgentTool>(tool: T, getCwd: () => string): T;
|
|
11
|
+
export declare function assertUltragoalAskAllowed(cwd: string, context?: UltragoalAskGuardContext): Promise<void>;
|
|
12
|
+
export declare function guardToolForUltragoalAsk<T extends AgentTool>(tool: T, getCwd: () => string, getContext?: () => UltragoalAskGuardContext): T;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/coding-agent",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.9",
|
|
5
5
|
"description": "Gajae Code CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://gaebal-gajae.dev",
|
|
7
7
|
"author": "Yeachan-Heo",
|
|
@@ -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.
|
|
56
|
-
"@gajae-code/agent-core": "0.7.
|
|
57
|
-
"@gajae-code/ai": "0.7.
|
|
58
|
-
"@gajae-code/natives": "0.7.
|
|
59
|
-
"@gajae-code/tui": "0.7.
|
|
60
|
-
"@gajae-code/utils": "0.7.
|
|
55
|
+
"@gajae-code/stats": "0.7.9",
|
|
56
|
+
"@gajae-code/agent-core": "0.7.9",
|
|
57
|
+
"@gajae-code/ai": "0.7.9",
|
|
58
|
+
"@gajae-code/natives": "0.7.9",
|
|
59
|
+
"@gajae-code/tui": "0.7.9",
|
|
60
|
+
"@gajae-code/utils": "0.7.9",
|
|
61
61
|
"@puppeteer/browsers": "^2.13.0",
|
|
62
62
|
"@types/turndown": "5.0.6",
|
|
63
63
|
"@xterm/headless": "^6.0.0",
|