@gajae-code/coding-agent 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/types/async/job-manager.d.ts +44 -1
- package/dist/types/cli/setup-cli.d.ts +14 -1
- package/dist/types/commands/coordinator.d.ts +19 -0
- package/dist/types/commands/mcp-serve.d.ts +24 -0
- package/dist/types/commands/setup.d.ts +41 -0
- package/dist/types/commit/model-selection.d.ts +1 -1
- package/dist/types/config/model-registry.d.ts +3 -1
- package/dist/types/config/model-resolver.d.ts +1 -19
- package/dist/types/config/models-config-schema.d.ts +12 -0
- package/dist/types/config/settings-schema.d.ts +15 -1
- package/dist/types/coordinator/contract.d.ts +4 -0
- package/dist/types/coordinator-mcp/policy.d.ts +24 -0
- package/dist/types/coordinator-mcp/safety.d.ts +26 -0
- package/dist/types/coordinator-mcp/server.d.ts +52 -0
- package/dist/types/extensibility/extensions/types.d.ts +13 -0
- package/dist/types/gjc-runtime/goal-mode-request.d.ts +8 -1
- package/dist/types/gjc-runtime/session-state-sidecar.d.ts +13 -0
- package/dist/types/harness-control-plane/types.d.ts +7 -2
- package/dist/types/modes/acp/acp-event-mapper.d.ts +2 -0
- package/dist/types/modes/components/custom-editor.d.ts +7 -0
- package/dist/types/modes/components/hook-selector.d.ts +11 -0
- package/dist/types/modes/shared/agent-wire/command-contract.d.ts +18 -0
- package/dist/types/modes/shared/agent-wire/event-contract.d.ts +84 -0
- package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +14 -7
- package/dist/types/modes/shared/agent-wire/event-observation.d.ts +37 -0
- package/dist/types/modes/shared/agent-wire/protocol.d.ts +13 -34
- package/dist/types/session/agent-session.d.ts +12 -1
- package/dist/types/session/session-manager.d.ts +1 -1
- package/dist/types/setup/hermes-setup.d.ts +71 -0
- package/dist/types/task/render.d.ts +7 -1
- package/dist/types/tools/bash.d.ts +2 -0
- package/dist/types/tools/browser/actions.d.ts +54 -0
- package/dist/types/tools/browser.d.ts +80 -0
- package/dist/types/tools/image-gen.d.ts +1 -0
- package/dist/types/tools/index.d.ts +3 -1
- package/dist/types/tools/job.d.ts +1 -1
- package/dist/types/tools/subagent-render.d.ts +25 -0
- package/dist/types/tools/subagent.d.ts +5 -1
- package/package.json +7 -7
- package/src/async/job-manager.ts +163 -2
- package/src/cli/setup-cli.ts +86 -2
- package/src/cli.ts +2 -0
- package/src/commands/coordinator.ts +70 -0
- package/src/commands/mcp-serve.ts +62 -0
- package/src/commands/setup.ts +30 -1
- package/src/commands/ultragoal.ts +7 -1
- package/src/commit/agentic/index.ts +2 -2
- package/src/commit/model-selection.ts +7 -22
- package/src/commit/pipeline.ts +2 -2
- package/src/config/model-registry.ts +17 -9
- package/src/config/model-resolver.ts +14 -84
- package/src/config/models-config-schema.ts +2 -0
- package/src/config/settings-schema.ts +14 -1
- package/src/coordinator/contract.ts +20 -0
- package/src/coordinator-mcp/policy.ts +160 -0
- package/src/coordinator-mcp/safety.ts +80 -0
- package/src/coordinator-mcp/server.ts +1316 -0
- package/src/extensibility/extensions/types.ts +13 -0
- package/src/gjc-runtime/goal-mode-request.ts +21 -1
- package/src/gjc-runtime/session-state-sidecar.ts +79 -0
- package/src/harness-control-plane/owner.ts +3 -3
- package/src/harness-control-plane/rpc-adapter.ts +7 -1
- package/src/harness-control-plane/types.ts +8 -11
- package/src/internal-urls/docs-index.generated.ts +6 -5
- package/src/memories/index.ts +1 -1
- package/src/modes/acp/acp-agent.ts +17 -9
- package/src/modes/acp/acp-event-mapper.ts +33 -1
- package/src/modes/components/custom-editor.ts +19 -3
- package/src/modes/components/hook-selector.ts +109 -5
- package/src/modes/controllers/extension-ui-controller.ts +16 -1
- package/src/modes/controllers/input-controller.ts +27 -7
- package/src/modes/controllers/selector-controller.ts +7 -1
- package/src/modes/interactive-mode.ts +3 -1
- package/src/modes/rpc/rpc-client.ts +16 -3
- package/src/modes/rpc/rpc-mode.ts +5 -2
- package/src/modes/shared/agent-wire/command-contract.ts +18 -0
- package/src/modes/shared/agent-wire/event-contract.ts +147 -0
- package/src/modes/shared/agent-wire/event-envelope.ts +35 -16
- package/src/modes/shared/agent-wire/event-observation.ts +397 -0
- package/src/modes/shared/agent-wire/protocol.ts +24 -81
- package/src/modes/utils/context-usage.ts +2 -2
- package/src/prompts/agents/architect.md +6 -0
- package/src/prompts/agents/critic.md +6 -0
- package/src/prompts/agents/explore.md +1 -1
- package/src/prompts/agents/plan.md +1 -1
- package/src/prompts/agents/planner.md +8 -1
- package/src/prompts/agents/reviewer.md +1 -1
- package/src/prompts/tools/browser.md +3 -2
- package/src/runtime-mcp/manager.ts +15 -2
- package/src/sdk.ts +3 -1
- package/src/session/agent-session.ts +66 -4
- package/src/session/session-manager.ts +1 -1
- package/src/setup/hermes/templates/operator-instructions.v1.md +29 -0
- package/src/setup/hermes-setup.ts +429 -0
- package/src/task/agents.ts +1 -1
- package/src/task/index.ts +2 -0
- package/src/task/render.ts +14 -0
- package/src/tools/ask.ts +30 -10
- package/src/tools/bash.ts +6 -1
- package/src/tools/browser/actions.ts +189 -0
- package/src/tools/browser.ts +91 -1
- package/src/tools/image-gen.ts +42 -15
- package/src/tools/index.ts +7 -1
- package/src/tools/inspect-image.ts +10 -8
- package/src/tools/job.ts +12 -2
- package/src/tools/monitor.ts +98 -17
- package/src/tools/renderers.ts +2 -0
- package/src/tools/subagent-render.ts +160 -0
- package/src/tools/subagent.ts +49 -7
- package/src/utils/commit-message-generator.ts +6 -13
- package/src/utils/title-generator.ts +1 -1
- package/dist/types/harness-control-plane/frame-mapper.d.ts +0 -29
- package/src/harness-control-plane/frame-mapper.ts +0 -286
- package/src/priority.json +0 -37
package/CHANGELOG.md
CHANGED
|
@@ -2,15 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.4.3] - 2026-06-10
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added a `busyPromptMode` setting (`steer` | `queue`, default `steer`) so a prompt submitted while the agent is busy can either steer the active turn or be queued to run after it completes, keeping steering and queued-next-turn semantics distinct. Ctrl+Enter still always queues as a follow-up (#434).
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Fixed a persistent `monitor` notification flood where a cancelled or evicted monitor kept delivering queued `task-notification` follow-ups (surviving process death, log deletion, and `job cancel` returning not-found). Monitors now purge their queued notifications on cancel/terminal/eviction, retain a short tombstone so post-eviction `job cancel` still purges, coalesce rapid duplicate output to the latest state, and close a cancel/trailing-flush race.
|
|
13
|
+
- Fixed `ultragoal` execution leaking across concurrent independent GJC sessions. The runtime `goal-mode-request.json` is now stamped with the producing session's `GJC_SESSION_ID`, and the consumer only activates a request that belongs to the current session (another session's request is left intact instead of being consumed/deleted). Legacy unscoped requests remain consumable for single-session compatibility ([#457](https://github.com/Yeachan-Heo/gajae-code/issues/457)).
|
|
14
|
+
|
|
5
15
|
## [0.4.2] - 2026-06-09
|
|
6
16
|
|
|
7
17
|
### Changed
|
|
8
18
|
|
|
9
19
|
- Added conservative `timeout-minutes` values to all CI workflow jobs to prevent indefinite hangs.
|
|
20
|
+
- Made coordinator MCP turn waiting state-backed by durable turn/session files, with runtime session sidecar updates for running/completed/error states and Meeseeks guidance that avoids fixed sleep/capture-pane loops.
|
|
10
21
|
|
|
11
22
|
### Fixed
|
|
12
23
|
|
|
24
|
+
- Failed stale coordinator turns quickly when their recorded tmux session is gone, clearing active-turn state instead of burning await timeouts.
|
|
13
25
|
- Improved the grep limit-reached message to show the current limit value and suggest using `--limit` for more results.
|
|
26
|
+
- Passed the active model's `maxTokens` (reserved completion budget) into the auto-compaction threshold and context-usage reserve so prompt packing reserves output for large-window models, keeping the safe input budget below the total context window (e.g. ~272K for a 400K/128K model) instead of filling the whole window ([#442](https://github.com/Yeachan-Heo/gajae-code/issues/442)).
|
|
14
27
|
- Fixed a `gjc harness` recovery deadlock where a session created by `start` without `--detach` (persisted as `started` with no owner lease/endpoint) could never get a live owner: `recover` refused to spawn one because no prior endpoint existed, while `start` reported `session-already-exists`. `recover` now bootstraps a fresh owner for a never-started session (no lease, no endpoint, no owner-run evidence) without writing a misleading `vanish` receipt, reported via `bootstrappedOwner: true`. Bootstrap is independent of the vanish classifier's `ownerRequired` verdict (nothing has vanished), so a session started in a non-git workspace (git delta `unknown`) is recovered too, while a deleted worktree is still refused (#421).
|
|
15
28
|
|
|
16
29
|
## [0.4.1] - 2026-06-07
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentSource } from "../task/types";
|
|
1
|
+
import type { AgentProgress, AgentSource } from "../task/types";
|
|
2
2
|
export interface AsyncJob {
|
|
3
3
|
id: string;
|
|
4
4
|
type: "bash" | "task";
|
|
@@ -95,6 +95,25 @@ export interface AsyncJobDeliveryState {
|
|
|
95
95
|
nextRetryAt?: number;
|
|
96
96
|
pendingJobIds: string[];
|
|
97
97
|
}
|
|
98
|
+
export interface AsyncJobLifecycleCleanup {
|
|
99
|
+
onCancel?: (job: AsyncJob) => void;
|
|
100
|
+
onTerminal?: (job: AsyncJob) => void;
|
|
101
|
+
onEvict?: (job: AsyncJob) => void;
|
|
102
|
+
/**
|
|
103
|
+
* Idempotent residual cleanup invoked by a post-eviction tombstone purge
|
|
104
|
+
* (e.g. a late `job cancel` after the job left the registry). Kept distinct
|
|
105
|
+
* from the at-most-once lifecycle phases so a tombstone purge never has to
|
|
106
|
+
* re-invoke a phase hook. Must be safe to call repeatedly.
|
|
107
|
+
*/
|
|
108
|
+
onTombstonePurge?: (job: AsyncJob) => void;
|
|
109
|
+
}
|
|
110
|
+
export interface MonitorTombstone {
|
|
111
|
+
jobId: string;
|
|
112
|
+
ownerId?: string;
|
|
113
|
+
status: AsyncJob["status"];
|
|
114
|
+
expiresAt: number;
|
|
115
|
+
purge: () => unknown;
|
|
116
|
+
}
|
|
98
117
|
export interface AsyncJobRegisterOptions {
|
|
99
118
|
id?: string;
|
|
100
119
|
/** Registry id of the agent that owns this job; used to scope cancelAll. */
|
|
@@ -102,6 +121,7 @@ export interface AsyncJobRegisterOptions {
|
|
|
102
121
|
/** Structured metadata for tool-specific control surfaces. */
|
|
103
122
|
metadata?: AsyncJobMetadata;
|
|
104
123
|
onProgress?: (text: string, details?: Record<string, unknown>) => void | Promise<void>;
|
|
124
|
+
lifecycle?: AsyncJobLifecycleCleanup;
|
|
105
125
|
}
|
|
106
126
|
/**
|
|
107
127
|
* Filter applied to job query/cancel APIs. With `ownerId`, results are
|
|
@@ -157,6 +177,11 @@ export declare class AsyncJobManager {
|
|
|
157
177
|
* so cross-agent cancellation is rejected at the manager level.
|
|
158
178
|
*/
|
|
159
179
|
cancel(id: string, filter?: AsyncJobFilter): boolean;
|
|
180
|
+
getMonitorTombstone(jobId: string, filter?: AsyncJobFilter): MonitorTombstone | undefined;
|
|
181
|
+
purgeMonitorTombstone(jobId: string, filter?: AsyncJobFilter): {
|
|
182
|
+
found: boolean;
|
|
183
|
+
status?: AsyncJob["status"];
|
|
184
|
+
};
|
|
160
185
|
/** Register or replace the canonical record for a subagent. */
|
|
161
186
|
registerSubagentRecord(record: SubagentRecord): void;
|
|
162
187
|
getSubagentRecord(subagentId: string, filter?: AsyncJobFilter): SubagentRecord | undefined;
|
|
@@ -164,6 +189,24 @@ export declare class AsyncJobManager {
|
|
|
164
189
|
registerLiveHandle(subagentId: string, handle: SubagentLiveHandle): void;
|
|
165
190
|
getLiveHandle(subagentId: string): SubagentLiveHandle | undefined;
|
|
166
191
|
removeLiveHandle(subagentId: string): void;
|
|
192
|
+
/**
|
|
193
|
+
* Retain the latest live `AgentProgress` for a subagent (deep-cloned so later
|
|
194
|
+
* mutation of the live object cannot corrupt retained state). Read by the
|
|
195
|
+
* `subagent` await panel; cleared on terminal/cancel/purge/dispose.
|
|
196
|
+
*
|
|
197
|
+
* Ignored for ids without a canonical `SubagentRecord` (e.g. foreground/inline
|
|
198
|
+
* task runs that share the executor path) so the map only holds detached
|
|
199
|
+
* subagent progress and never accumulates untracked foreground task state.
|
|
200
|
+
*/
|
|
201
|
+
recordSubagentProgress(subagentId: string, progress: AgentProgress): void;
|
|
202
|
+
getSubagentProgress(subagentId: string): AgentProgress | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* True only when a live, in-session progress producer exists for this id: a
|
|
205
|
+
* canonical registered record with a live handle or an in-memory running job.
|
|
206
|
+
* False for `SubagentTool` backward-compat job synthesis and resumed-from-disk
|
|
207
|
+
* records, which have no live producer to stream from.
|
|
208
|
+
*/
|
|
209
|
+
hasLiveSubagent(subagentId: string, filter?: AsyncJobFilter): boolean;
|
|
167
210
|
/** Install the TaskTool-owned resume runner. Returns the new job id, or undefined on failure. */
|
|
168
211
|
setResumeRunner(runner: (subagentId: string, message?: string, descriptor?: ResumeDescriptor) => string | undefined): void;
|
|
169
212
|
registerResumeDescriptor(descriptor: ResumeDescriptor): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SetupComponent = "defaults" | "hooks" | "provider" | "python" | "stt";
|
|
1
|
+
export type SetupComponent = "defaults" | "hermes" | "hooks" | "provider" | "python" | "stt";
|
|
2
2
|
export interface SetupCommandArgs {
|
|
3
3
|
component: SetupComponent;
|
|
4
4
|
flags: {
|
|
@@ -12,6 +12,19 @@ export interface SetupCommandArgs {
|
|
|
12
12
|
apiKeyEnv?: string;
|
|
13
13
|
model?: string[];
|
|
14
14
|
modelsPath?: string;
|
|
15
|
+
smoke?: boolean;
|
|
16
|
+
install?: boolean;
|
|
17
|
+
root?: string[];
|
|
18
|
+
repo?: string;
|
|
19
|
+
profile?: string;
|
|
20
|
+
sessionCommand?: string;
|
|
21
|
+
stateRoot?: string;
|
|
22
|
+
mutation?: string[];
|
|
23
|
+
artifactByteCap?: string;
|
|
24
|
+
serverKey?: string;
|
|
25
|
+
gjcCommand?: string;
|
|
26
|
+
target?: string;
|
|
27
|
+
profileDir?: string;
|
|
15
28
|
};
|
|
16
29
|
}
|
|
17
30
|
/**
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Command } from "@gajae-code/utils/cli";
|
|
2
|
+
export default class Coordinator extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static strict: boolean;
|
|
5
|
+
static args: {
|
|
6
|
+
action: import("@gajae-code/utils/cli").ArgDescriptor & {
|
|
7
|
+
description: string;
|
|
8
|
+
required: false;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
static flags: {
|
|
12
|
+
json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
13
|
+
char: string;
|
|
14
|
+
description: string;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Command } from "@gajae-code/utils/cli";
|
|
2
|
+
export declare function validateMcpServeSubcommandForTest(server: string | undefined): void;
|
|
3
|
+
export default class McpServe extends Command {
|
|
4
|
+
static description: string;
|
|
5
|
+
static strict: boolean;
|
|
6
|
+
static args: {
|
|
7
|
+
server: import("@gajae-code/utils/cli").ArgDescriptor & {
|
|
8
|
+
description: string;
|
|
9
|
+
required: false;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
static flags: {
|
|
13
|
+
json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
14
|
+
char: string;
|
|
15
|
+
description: string;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
check: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
19
|
+
description: string;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
run(): Promise<void>;
|
|
24
|
+
}
|
|
@@ -24,6 +24,47 @@ export default class Setup extends Command {
|
|
|
24
24
|
json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
25
25
|
description: string;
|
|
26
26
|
};
|
|
27
|
+
smoke: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
install: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
root: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
34
|
+
description: string;
|
|
35
|
+
multiple: true;
|
|
36
|
+
};
|
|
37
|
+
repo: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
profile: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
"session-command": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
"state-root": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
mutation: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
50
|
+
description: string;
|
|
51
|
+
multiple: true;
|
|
52
|
+
};
|
|
53
|
+
"artifact-byte-cap": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
"server-key": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
57
|
+
description: string;
|
|
58
|
+
};
|
|
59
|
+
"gjc-command": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
target: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
"profile-dir": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
27
68
|
preset: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
28
69
|
description: string;
|
|
29
70
|
};
|
|
@@ -11,5 +11,5 @@ type CommitModelRegistry = ModelLookupRegistry & {
|
|
|
11
11
|
getApiKey: (model: Model<Api>) => Promise<string | undefined>;
|
|
12
12
|
};
|
|
13
13
|
export declare function resolvePrimaryModel(override: string | undefined, settings: Settings, modelRegistry: CommitModelRegistry): Promise<ResolvedCommitModel>;
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function resolveSecondaryCommitModel(settings: Settings, modelRegistry: CommitModelRegistry, fallbackModel: Model<Api>, fallbackApiKey: string): Promise<ResolvedCommitModel>;
|
|
15
15
|
export {};
|
|
@@ -9,7 +9,7 @@ import { type Settings } from "./settings";
|
|
|
9
9
|
export type { CanonicalModelIndex, CanonicalModelRecord, CanonicalModelVariant, ModelEquivalenceConfig };
|
|
10
10
|
export declare const kNoAuth = "N/A";
|
|
11
11
|
export declare function isAuthenticated(apiKey: string | undefined | null): apiKey is string;
|
|
12
|
-
export type ModelRole = "default"
|
|
12
|
+
export type ModelRole = "default";
|
|
13
13
|
export interface ModelRoleInfo {
|
|
14
14
|
tag?: string;
|
|
15
15
|
name: string;
|
|
@@ -110,6 +110,7 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
110
110
|
levels?: ("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[] | undefined;
|
|
111
111
|
} | undefined;
|
|
112
112
|
input?: ("image" | "text")[] | undefined;
|
|
113
|
+
output?: ("image" | "text")[] | undefined;
|
|
113
114
|
cost?: {
|
|
114
115
|
input: number;
|
|
115
116
|
output: number;
|
|
@@ -180,6 +181,7 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
180
181
|
levels?: ("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[] | undefined;
|
|
181
182
|
} | undefined;
|
|
182
183
|
input?: ("image" | "text")[] | undefined;
|
|
184
|
+
output?: ("image" | "text")[] | undefined;
|
|
183
185
|
cost?: {
|
|
184
186
|
input?: number | undefined;
|
|
185
187
|
output?: number | undefined;
|
|
@@ -58,7 +58,7 @@ export declare function parseModelPattern(pattern: string, availableModels: Mode
|
|
|
58
58
|
modelRegistry?: CanonicalModelRegistry;
|
|
59
59
|
}): ParsedModelResult;
|
|
60
60
|
/**
|
|
61
|
-
* Expand a role alias like "pi/
|
|
61
|
+
* Expand a role alias like "pi/default" to the configured model string.
|
|
62
62
|
*/
|
|
63
63
|
export declare function expandRoleAlias(value: string, settings?: Settings): string;
|
|
64
64
|
export declare function resolveConfiguredModelPatterns(value: string | string[] | undefined, settings?: Settings): string[];
|
|
@@ -212,22 +212,4 @@ export declare function restoreModelFromSession(savedProvider: string, savedMode
|
|
|
212
212
|
model: Model<Api> | undefined;
|
|
213
213
|
fallbackMessage: string | undefined;
|
|
214
214
|
}>;
|
|
215
|
-
/**
|
|
216
|
-
* Find a smol/fast model using the priority chain.
|
|
217
|
-
* Tries exact matches first, then fuzzy matches.
|
|
218
|
-
*
|
|
219
|
-
* @param modelRegistry The model registry to search
|
|
220
|
-
* @param savedModel Optional saved model string from settings (provider/modelId)
|
|
221
|
-
* @returns The best available smol model, or undefined if none found
|
|
222
|
-
*/
|
|
223
|
-
export declare function findSmolModel(modelRegistry: ModelLookupRegistry, savedModel?: string): Promise<Model<Api> | undefined>;
|
|
224
|
-
/**
|
|
225
|
-
* Find a slow/comprehensive model using the priority chain.
|
|
226
|
-
* Prioritizes reasoning and OpenAI code backend models for thorough analysis.
|
|
227
|
-
*
|
|
228
|
-
* @param modelRegistry The model registry to search
|
|
229
|
-
* @param savedModel Optional saved model string from settings (provider/modelId)
|
|
230
|
-
* @returns The best available slow model, or undefined if none found
|
|
231
|
-
*/
|
|
232
|
-
export declare function findSlowModel(modelRegistry: ModelLookupRegistry, savedModel?: string): Promise<Model<Api> | undefined>;
|
|
233
215
|
export {};
|
|
@@ -137,6 +137,10 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
137
137
|
image: "image";
|
|
138
138
|
text: "text";
|
|
139
139
|
}>>>;
|
|
140
|
+
output: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
141
|
+
image: "image";
|
|
142
|
+
text: "text";
|
|
143
|
+
}>>>;
|
|
140
144
|
cost: z.ZodOptional<z.ZodObject<{
|
|
141
145
|
input: z.ZodOptional<z.ZodNumber>;
|
|
142
146
|
output: z.ZodOptional<z.ZodNumber>;
|
|
@@ -393,6 +397,10 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
393
397
|
image: "image";
|
|
394
398
|
text: "text";
|
|
395
399
|
}>>>;
|
|
400
|
+
output: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
401
|
+
image: "image";
|
|
402
|
+
text: "text";
|
|
403
|
+
}>>>;
|
|
396
404
|
cost: z.ZodOptional<z.ZodObject<{
|
|
397
405
|
input: z.ZodNumber;
|
|
398
406
|
output: z.ZodNumber;
|
|
@@ -522,6 +530,10 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
522
530
|
image: "image";
|
|
523
531
|
text: "text";
|
|
524
532
|
}>>>;
|
|
533
|
+
output: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
534
|
+
image: "image";
|
|
535
|
+
text: "text";
|
|
536
|
+
}>>>;
|
|
525
537
|
cost: z.ZodOptional<z.ZodObject<{
|
|
526
538
|
input: z.ZodOptional<z.ZodNumber>;
|
|
527
539
|
output: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1068,6 +1068,16 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1068
1068
|
readonly description: "When steering messages interrupt tool execution";
|
|
1069
1069
|
};
|
|
1070
1070
|
};
|
|
1071
|
+
readonly busyPromptMode: {
|
|
1072
|
+
readonly type: "enum";
|
|
1073
|
+
readonly values: readonly ["steer", "queue"];
|
|
1074
|
+
readonly default: "steer";
|
|
1075
|
+
readonly ui: {
|
|
1076
|
+
readonly tab: "interaction";
|
|
1077
|
+
readonly label: "Busy Prompt Mode";
|
|
1078
|
+
readonly description: "What a submitted prompt does while the agent is busy: steer (interrupt the active turn) or queue (run after the active turn completes)";
|
|
1079
|
+
};
|
|
1080
|
+
};
|
|
1071
1081
|
readonly doubleEscapeAction: {
|
|
1072
1082
|
readonly type: "enum";
|
|
1073
1083
|
readonly values: readonly ["branch", "tree", "none"];
|
|
@@ -3016,7 +3026,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3016
3026
|
};
|
|
3017
3027
|
readonly "providers.image": {
|
|
3018
3028
|
readonly type: "enum";
|
|
3019
|
-
readonly values: readonly ["auto", "openai", "gemini", "openrouter"];
|
|
3029
|
+
readonly values: readonly ["auto", "openai", "gemini", "openrouter", "antigravity"];
|
|
3020
3030
|
readonly default: "auto";
|
|
3021
3031
|
readonly ui: {
|
|
3022
3032
|
readonly tab: "providers";
|
|
@@ -3038,6 +3048,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3038
3048
|
readonly value: "openrouter";
|
|
3039
3049
|
readonly label: "OpenRouter";
|
|
3040
3050
|
readonly description: "Requires OPENROUTER_API_KEY";
|
|
3051
|
+
}, {
|
|
3052
|
+
readonly value: "antigravity";
|
|
3053
|
+
readonly label: "Antigravity";
|
|
3054
|
+
readonly description: "Requires login with google-antigravity";
|
|
3041
3055
|
}];
|
|
3042
3056
|
};
|
|
3043
3057
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const COORDINATOR_MCP_PROTOCOL_VERSION = "2024-11-05";
|
|
2
|
+
export declare const COORDINATOR_MCP_SERVER_NAME = "gjc-coordinator-mcp";
|
|
3
|
+
export declare const COORDINATOR_MCP_TOOL_NAMES: readonly ["gjc_coordinator_list_sessions", "gjc_coordinator_read_status", "gjc_coordinator_read_tail", "gjc_coordinator_list_questions", "gjc_coordinator_list_artifacts", "gjc_coordinator_read_artifact", "gjc_coordinator_read_coordination_status", "gjc_coordinator_start_session", "gjc_coordinator_send_prompt", "gjc_coordinator_submit_question_answer", "gjc_coordinator_read_turn", "gjc_coordinator_await_turn", "gjc_coordinator_report_status"];
|
|
4
|
+
export type CoordinatorToolName = (typeof COORDINATOR_MCP_TOOL_NAMES)[number];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type CoordinatorMutationClass = "sessions" | "questions" | "reports";
|
|
2
|
+
export interface CoordinatorNamespace {
|
|
3
|
+
profile: string | null;
|
|
4
|
+
repo: string | null;
|
|
5
|
+
}
|
|
6
|
+
export interface CoordinatorMcpConfig {
|
|
7
|
+
allowedRoots: string[];
|
|
8
|
+
mutationClasses: Set<CoordinatorMutationClass>;
|
|
9
|
+
artifactByteCap: number;
|
|
10
|
+
namespace: CoordinatorNamespace;
|
|
11
|
+
stateRoot: string;
|
|
12
|
+
sessionCommand: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface CoordinatorMutationRequest {
|
|
15
|
+
allow_mutation?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function buildCoordinatorMcpConfig(env?: NodeJS.ProcessEnv): CoordinatorMcpConfig;
|
|
18
|
+
export declare function assertCoordinatorWorkdir(config: CoordinatorMcpConfig, cwd: unknown): Promise<string>;
|
|
19
|
+
export declare function assertCoordinatorArtifactPath(config: CoordinatorMcpConfig, artifactPath: unknown): Promise<{
|
|
20
|
+
path: string;
|
|
21
|
+
byteCap: number;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function requireCoordinatorMutation(config: CoordinatorMcpConfig, mutationClass: CoordinatorMutationClass, request: CoordinatorMutationRequest): void;
|
|
24
|
+
export declare function coordinatorNamespacePath(config: CoordinatorMcpConfig): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type CoordinatorMutationClass } from "./policy";
|
|
2
|
+
export declare const COORDINATOR_MUTATION_CLASSES: readonly ["sessions", "questions", "reports"];
|
|
3
|
+
export type { CoordinatorMutationClass };
|
|
4
|
+
export interface CoordinatorSafetyConfig {
|
|
5
|
+
allowedRoots: string[];
|
|
6
|
+
artifactMaxBytes: number;
|
|
7
|
+
enabledMutationClasses: Set<CoordinatorMutationClass>;
|
|
8
|
+
repo?: string;
|
|
9
|
+
profile?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CoordinatorSafetyPolicy {
|
|
12
|
+
config: CoordinatorSafetyConfig;
|
|
13
|
+
resolveWorkdir(input: unknown): Promise<string>;
|
|
14
|
+
resolveArtifactPath(input: unknown): Promise<string>;
|
|
15
|
+
assertMutationAllowed(mutationClass: CoordinatorMutationClass, args: Record<string, unknown>): {
|
|
16
|
+
ok: true;
|
|
17
|
+
} | CoordinatorFailure;
|
|
18
|
+
}
|
|
19
|
+
export interface CoordinatorFailure {
|
|
20
|
+
ok: false;
|
|
21
|
+
reason: string;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
export declare function createCoordinatorSafetyPolicy(options?: {
|
|
25
|
+
env?: NodeJS.ProcessEnv;
|
|
26
|
+
}): Promise<CoordinatorSafetyPolicy>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { COORDINATOR_MCP_PROTOCOL_VERSION, COORDINATOR_MCP_SERVER_NAME, COORDINATOR_MCP_TOOL_NAMES, type CoordinatorToolName } from "../coordinator/contract";
|
|
2
|
+
import { type CoordinatorMcpConfig } from "./policy";
|
|
3
|
+
export type { CoordinatorToolName };
|
|
4
|
+
export { COORDINATOR_MCP_PROTOCOL_VERSION, COORDINATOR_MCP_SERVER_NAME, COORDINATOR_MCP_TOOL_NAMES };
|
|
5
|
+
interface JsonRpcRequest {
|
|
6
|
+
jsonrpc: "2.0";
|
|
7
|
+
id?: string | number | null;
|
|
8
|
+
method: string;
|
|
9
|
+
params?: unknown;
|
|
10
|
+
}
|
|
11
|
+
interface JsonRpcResponse {
|
|
12
|
+
jsonrpc: "2.0";
|
|
13
|
+
id: string | number | null;
|
|
14
|
+
result?: any;
|
|
15
|
+
error?: {
|
|
16
|
+
code: number;
|
|
17
|
+
message: string;
|
|
18
|
+
data?: unknown;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
interface SessionStartInput {
|
|
22
|
+
cwd: string;
|
|
23
|
+
prompt?: string;
|
|
24
|
+
namespace: {
|
|
25
|
+
profile: string | null;
|
|
26
|
+
repo: string | null;
|
|
27
|
+
};
|
|
28
|
+
worktree: true;
|
|
29
|
+
}
|
|
30
|
+
interface CoordinatorServices {
|
|
31
|
+
listSessions?: () => unknown[] | Promise<unknown[]>;
|
|
32
|
+
startSession?: (input: SessionStartInput) => unknown | Promise<unknown>;
|
|
33
|
+
}
|
|
34
|
+
interface CoordinatorMcpServerOptions {
|
|
35
|
+
env?: NodeJS.ProcessEnv;
|
|
36
|
+
services?: CoordinatorServices;
|
|
37
|
+
}
|
|
38
|
+
interface LegacyHandlerOptions {
|
|
39
|
+
env?: NodeJS.ProcessEnv;
|
|
40
|
+
createSession?: () => unknown;
|
|
41
|
+
}
|
|
42
|
+
export declare function readCoordinatorArtifact(config: CoordinatorMcpConfig, args: {
|
|
43
|
+
path: unknown;
|
|
44
|
+
}): Promise<Record<string, unknown>>;
|
|
45
|
+
export declare function createCoordinatorMcpServer(options?: CoordinatorMcpServerOptions): {
|
|
46
|
+
config: CoordinatorMcpConfig;
|
|
47
|
+
callTool: (name: string, args?: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
48
|
+
handleJsonRpc: (request: JsonRpcRequest) => Promise<JsonRpcResponse>;
|
|
49
|
+
handle: (request: JsonRpcRequest) => Promise<JsonRpcResponse>;
|
|
50
|
+
};
|
|
51
|
+
export declare function handleCoordinatorMcpRequest(request: JsonRpcRequest, options?: LegacyHandlerOptions): Promise<any>;
|
|
52
|
+
export declare function runCoordinatorMcpStdio(options?: CoordinatorMcpServerOptions): Promise<void>;
|
|
@@ -62,6 +62,19 @@ export interface ExtensionUIDialogOptions {
|
|
|
62
62
|
* select-only rendering hint; non-TUI bridges drop it and do not serialize it.
|
|
63
63
|
*/
|
|
64
64
|
scrollTitleRows?: number;
|
|
65
|
+
/**
|
|
66
|
+
* For interactive TUI select dialogs, handle the option with `optionLabel`
|
|
67
|
+
* inline: selecting it keeps the title and option list on screen and opens
|
|
68
|
+
* a free-text input below the list. Submitting calls `onSubmit` with the
|
|
69
|
+
* typed text and resolves the select with `optionLabel`; Escape returns to
|
|
70
|
+
* option selection. Non-TUI bridges (RPC, ACP) drop it; callers must keep
|
|
71
|
+
* a fallback path for selects that resolve `optionLabel` without invoking
|
|
72
|
+
* `onSubmit`.
|
|
73
|
+
*/
|
|
74
|
+
customInput?: {
|
|
75
|
+
optionLabel: string;
|
|
76
|
+
onSubmit: (text: string) => void;
|
|
77
|
+
};
|
|
65
78
|
}
|
|
66
79
|
/** Raw terminal input listener for extensions. */
|
|
67
80
|
export type TerminalInputHandler = (data: string) => {
|
|
@@ -11,6 +11,12 @@ export interface PendingGoalModeRequest {
|
|
|
11
11
|
objective: string;
|
|
12
12
|
createdAt: string;
|
|
13
13
|
goalsPath?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Session id that produced this request (from GJC_SESSION_ID). When present,
|
|
16
|
+
* only the originating session may consume it, so concurrent sessions sharing
|
|
17
|
+
* the same `.gjc` project state never auto-run each other's ultragoal.
|
|
18
|
+
*/
|
|
19
|
+
sessionId?: string;
|
|
14
20
|
}
|
|
15
21
|
export type CurrentSessionGoalModeWriteResult = {
|
|
16
22
|
status: "unavailable";
|
|
@@ -32,12 +38,13 @@ export declare function writePendingGoalModeRequest(input: {
|
|
|
32
38
|
cwd: string;
|
|
33
39
|
objective: string;
|
|
34
40
|
goalsPath?: string;
|
|
41
|
+
sessionId?: string | null;
|
|
35
42
|
}): Promise<PendingGoalModeRequest>;
|
|
36
43
|
export declare function writeCurrentSessionGoalModeState(input: {
|
|
37
44
|
sessionFile?: string | null;
|
|
38
45
|
objective: string;
|
|
39
46
|
}): Promise<CurrentSessionGoalModeWriteResult>;
|
|
40
|
-
export declare function consumePendingGoalModeRequest(cwd: string): Promise<PendingGoalModeRequest | null>;
|
|
47
|
+
export declare function consumePendingGoalModeRequest(cwd: string, currentSessionId?: string | null): Promise<PendingGoalModeRequest | null>;
|
|
41
48
|
export declare function buildGjcRuntimeSessionEnv(input: {
|
|
42
49
|
sessionFile?: string | null;
|
|
43
50
|
sessionId?: string | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const GJC_COORDINATOR_SESSION_STATE_FILE_ENV = "GJC_COORDINATOR_SESSION_STATE_FILE";
|
|
2
|
+
export declare const GJC_COORDINATOR_SESSION_ID_ENV = "GJC_COORDINATOR_SESSION_ID";
|
|
3
|
+
interface RuntimeStateEvent {
|
|
4
|
+
type: string;
|
|
5
|
+
messages?: unknown[];
|
|
6
|
+
}
|
|
7
|
+
interface RuntimeStateContext {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
cwd: string;
|
|
10
|
+
sessionFile?: string | null;
|
|
11
|
+
}
|
|
12
|
+
export declare function persistCoordinatorRuntimeStateFromEvent(event: RuntimeStateEvent, context: RuntimeStateContext): Promise<void>;
|
|
13
|
+
export {};
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* v1 implements the gajae-code adapter only. omx/codex/remote/auth are deferred seams.
|
|
9
9
|
*/
|
|
10
|
+
import type { AgentWireObservedSignal } from "../modes/shared/agent-wire/event-contract";
|
|
10
11
|
/** Harnesses the control plane can operate. v1 implements `gajae-code` only. */
|
|
11
12
|
export type Harness = "gajae-code" | "codex" | "omx";
|
|
12
13
|
/** Operating mode of a session. `implement` builds/changes code; `review` produces a read-only verdict. */
|
|
@@ -108,8 +109,12 @@ export interface SessionState {
|
|
|
108
109
|
createdAt: string;
|
|
109
110
|
updatedAt: string;
|
|
110
111
|
}
|
|
111
|
-
/**
|
|
112
|
-
|
|
112
|
+
/**
|
|
113
|
+
* Bounded observed-signal vocabulary surfaced by `observe` (the owner only ever
|
|
114
|
+
* emits these). Aliased to the canonical agent-wire signal vocabulary so there
|
|
115
|
+
* is a single source of truth shared with the observation core.
|
|
116
|
+
*/
|
|
117
|
+
export type ObservedSignal = AgentWireObservedSignal;
|
|
113
118
|
export declare const OBSERVED_SIGNALS: readonly ObservedSignal[];
|
|
114
119
|
/** Bounded observation surfaced by `observe` — never a raw pane/transcript dump. */
|
|
115
120
|
export interface Observation {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SessionNotification, SessionUpdate, ToolKind } from "@agentclientprotocol/sdk";
|
|
2
2
|
import type { AgentSessionEvent } from "../../session/agent-session";
|
|
3
|
+
import type { AgentWireEventPayload } from "../shared/agent-wire/event-contract";
|
|
3
4
|
interface MessageProgress {
|
|
4
5
|
textEmitted: boolean;
|
|
5
6
|
thoughtEmitted: boolean;
|
|
@@ -17,6 +18,7 @@ interface AcpEventMapperOptions {
|
|
|
17
18
|
cwd?: string;
|
|
18
19
|
}
|
|
19
20
|
export declare function mapToolKind(toolName: string): ToolKind;
|
|
21
|
+
export declare function mapAgentWireEventPayloadToAcpSessionUpdates(payload: AgentWireEventPayload, sessionId: string, options?: AcpEventMapperOptions): SessionNotification[];
|
|
20
22
|
export declare function mapAgentSessionEventToAcpSessionUpdates(event: AgentSessionEvent, sessionId: string, options?: AcpEventMapperOptions): SessionNotification[];
|
|
21
23
|
export declare function buildToolCallStartUpdate(input: {
|
|
22
24
|
toolCallId: string;
|
|
@@ -8,6 +8,13 @@ type PastePendingClearReason = "timeout" | "queue-limit";
|
|
|
8
8
|
export declare class CustomEditor extends Editor {
|
|
9
9
|
#private;
|
|
10
10
|
onEscape?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Optional high-priority interrupt consumer. Invoked when the interrupt key
|
|
13
|
+
* is pressed, before `onEscape`. Returning `true` consumes the keystroke.
|
|
14
|
+
* Used so a transient UI (e.g. the btw panel) stays dismissable even while
|
|
15
|
+
* another controller has temporarily installed its own `onEscape` handler.
|
|
16
|
+
*/
|
|
17
|
+
onInterruptPriority?: () => boolean;
|
|
11
18
|
shouldBypassAutocompleteOnEscape?: () => boolean;
|
|
12
19
|
onClear?: () => void;
|
|
13
20
|
onExit?: () => void;
|
|
@@ -22,6 +22,17 @@ export interface HookSelectorOptions {
|
|
|
22
22
|
*/
|
|
23
23
|
wrapFocused?: boolean;
|
|
24
24
|
scrollTitleRows?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Inline free-text entry for the option with this label (e.g. the ask
|
|
27
|
+
* tool's "Other (type your own)"). Selecting it keeps the title and option
|
|
28
|
+
* list on screen and opens a prompt-style editor below the list instead of
|
|
29
|
+
* replacing the whole selector. Enter submits via `onSubmit`; Escape
|
|
30
|
+
* returns to option selection.
|
|
31
|
+
*/
|
|
32
|
+
customInput?: {
|
|
33
|
+
optionLabel: string;
|
|
34
|
+
onSubmit: (text: string) => void;
|
|
35
|
+
};
|
|
25
36
|
}
|
|
26
37
|
export declare class HookSelectorComponent extends Container {
|
|
27
38
|
#private;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical command-surface boundary for the agent-wire adapters.
|
|
3
|
+
*
|
|
4
|
+
* RPC and Bridge SHARE the JSONL `RpcCommand` grammar and dispatch it through
|
|
5
|
+
* the single `dispatchRpcCommand` entry in `command-dispatch.ts`. This module
|
|
6
|
+
* re-exports that command surface so the shared contract has one documented home.
|
|
7
|
+
*
|
|
8
|
+
* ACP does NOT use `RpcCommand`. It keeps its richer `@agentclientprotocol/sdk`
|
|
9
|
+
* command surface (fork/resume/elicitation/session-mode/session-model) and only
|
|
10
|
+
* shares the lower session/event layer (`AgentWireEventPayload`). ACP must never
|
|
11
|
+
* import `dispatchRpcCommand`.
|
|
12
|
+
*
|
|
13
|
+
* Event semantics are intentionally elsewhere: `event-contract.ts` owns the event
|
|
14
|
+
* types + registry and `event-observation.ts` owns the single semantic mapping.
|
|
15
|
+
*/
|
|
16
|
+
export type { RpcCommand, RpcResponse } from "../../rpc/rpc-types";
|
|
17
|
+
export { dispatchRpcCommand, type RpcCommandDispatchContext } from "./command-dispatch";
|
|
18
|
+
export { isRpcCommandType, RPC_COMMAND_TYPES, type RpcCommandType } from "./scopes";
|