@gajae-code/coding-agent 0.4.5 → 0.5.1
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 +62 -0
- package/dist/types/async/job-manager.d.ts +26 -0
- package/dist/types/cli/args.d.ts +1 -0
- package/dist/types/cli/list-models.d.ts +6 -0
- package/dist/types/commands/gc.d.ts +26 -0
- package/dist/types/commands/harness.d.ts +3 -0
- package/dist/types/config/file-lock-gc.d.ts +5 -0
- package/dist/types/config/file-lock.d.ts +7 -0
- package/dist/types/config/model-profile-activation.d.ts +11 -2
- package/dist/types/config/model-profiles.d.ts +7 -0
- package/dist/types/config/model-registry.d.ts +3 -0
- package/dist/types/config/model-resolver.d.ts +2 -0
- package/dist/types/config/models-config-schema.d.ts +30 -0
- package/dist/types/config/settings-schema.d.ts +4 -3
- package/dist/types/coordinator/contract.d.ts +1 -1
- package/dist/types/defaults/gjc/extensions/grok-build/index.d.ts +1 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/index.d.ts +1 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/models/catalog.d.ts +25 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/payload/sanitize.d.ts +27 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/billing.d.ts +8 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/register.d.ts +5 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/stream.d.ts +10 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/provider/usage.d.ts +2 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/shared/base-url.d.ts +2 -0
- package/dist/types/defaults/gjc/extensions/grok-cli-vendor/src/shared/errors.d.ts +38 -0
- package/dist/types/defaults/gjc-grok-cli.d.ts +5 -0
- package/dist/types/extensibility/extensions/index.d.ts +1 -0
- package/dist/types/extensibility/extensions/prefix-command-bridge.d.ts +35 -0
- package/dist/types/gjc-runtime/deep-interview-recorder.d.ts +103 -0
- package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +2 -0
- package/dist/types/gjc-runtime/deep-interview-state.d.ts +112 -0
- package/dist/types/gjc-runtime/gc-render.d.ts +6 -0
- package/dist/types/gjc-runtime/gc-runtime.d.ts +134 -0
- package/dist/types/gjc-runtime/ledger-event-renderer.d.ts +68 -0
- package/dist/types/gjc-runtime/team-gc.d.ts +7 -0
- package/dist/types/gjc-runtime/team-runtime.d.ts +5 -1
- package/dist/types/gjc-runtime/tmux-common.d.ts +14 -0
- package/dist/types/gjc-runtime/tmux-gc.d.ts +7 -0
- package/dist/types/gjc-runtime/tmux-sessions.d.ts +13 -0
- package/dist/types/harness-control-plane/gc-adapter.d.ts +3 -0
- package/dist/types/harness-control-plane/owner.d.ts +8 -1
- package/dist/types/harness-control-plane/receipt-spool.d.ts +19 -0
- package/dist/types/harness-control-plane/state-machine.d.ts +6 -1
- package/dist/types/harness-control-plane/storage.d.ts +20 -0
- package/dist/types/harness-control-plane/types.d.ts +4 -0
- package/dist/types/hindsight/mental-models.d.ts +5 -5
- package/dist/types/modes/components/hook-selector.d.ts +7 -1
- package/dist/types/modes/components/model-selector.d.ts +1 -12
- package/dist/types/modes/controllers/command-controller.d.ts +1 -0
- package/dist/types/modes/rpc/rpc-client.d.ts +2 -2
- package/dist/types/modes/rpc/rpc-mode.d.ts +16 -1
- package/dist/types/modes/rpc/rpc-types.d.ts +4 -1
- package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +13 -0
- package/dist/types/modes/shared/agent-wire/session-registry.d.ts +25 -0
- package/dist/types/modes/shared/agent-wire/unattended-action-policy.d.ts +2 -0
- package/dist/types/sdk.d.ts +5 -0
- package/dist/types/session/agent-session.d.ts +3 -1
- package/dist/types/session/blob-store.d.ts +59 -4
- package/dist/types/session/session-manager.d.ts +24 -6
- package/dist/types/session/streaming-output.d.ts +3 -2
- package/dist/types/session/tool-choice-queue.d.ts +6 -0
- package/dist/types/skill-state/workflow-hud.d.ts +14 -0
- package/dist/types/task/receipt.d.ts +1 -0
- package/dist/types/task/types.d.ts +7 -0
- package/dist/types/thinking-metadata.d.ts +16 -0
- package/dist/types/thinking.d.ts +3 -12
- package/dist/types/tools/ask.d.ts +15 -1
- package/dist/types/tools/index.d.ts +2 -0
- package/dist/types/tools/resolve.d.ts +0 -10
- package/dist/types/tools/subagent.d.ts +6 -0
- package/dist/types/utils/tool-choice.d.ts +14 -1
- package/package.json +7 -7
- package/src/async/job-manager.ts +52 -0
- package/src/cli/args.ts +3 -0
- package/src/cli/auth-broker-cli.ts +1 -0
- package/src/cli/list-models.ts +13 -1
- package/src/cli.ts +9 -4
- package/src/commands/gc.ts +22 -0
- package/src/commands/harness.ts +43 -5
- package/src/commands/launch.ts +2 -2
- package/src/commands/session.ts +3 -1
- package/src/config/file-lock-gc.ts +181 -0
- package/src/config/file-lock.ts +14 -0
- package/src/config/model-profile-activation.ts +15 -3
- package/src/config/model-profiles.ts +264 -56
- package/src/config/model-resolver.ts +9 -6
- package/src/config/models-config-schema.ts +1 -0
- package/src/config/settings-schema.ts +6 -3
- package/src/coordinator/contract.ts +1 -0
- package/src/coordinator-mcp/server.ts +513 -26
- package/src/cursor.ts +16 -2
- package/src/defaults/gjc/agent.models.grok-cli.yml +36 -0
- package/src/defaults/gjc/extensions/grok-build/index.ts +1 -0
- package/src/defaults/gjc/extensions/grok-build/package.json +7 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/biome.json +39 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/package.json +8 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/index.ts +1 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/models/catalog.ts +155 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/payload/sanitize.ts +361 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/billing.ts +57 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/register.ts +99 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/stream.ts +50 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/provider/usage.ts +56 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/shared/base-url.ts +36 -0
- package/src/defaults/gjc/extensions/grok-cli-vendor/src/shared/errors.ts +44 -0
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +131 -113
- package/src/defaults/gjc/skills/deep-interview/lateral-review-panel.md +49 -0
- package/src/defaults/gjc/skills/team/SKILL.md +3 -2
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +8 -2
- package/src/defaults/gjc-defaults.ts +7 -0
- package/src/defaults/gjc-grok-cli.ts +22 -0
- package/src/export/html/index.ts +13 -9
- package/src/extensibility/extensions/index.ts +1 -0
- package/src/extensibility/extensions/prefix-command-bridge.ts +128 -0
- package/src/gjc-runtime/deep-interview-recorder.ts +417 -0
- package/src/gjc-runtime/deep-interview-runtime.ts +18 -26
- package/src/gjc-runtime/deep-interview-state.ts +324 -0
- package/src/gjc-runtime/gc-render.ts +70 -0
- package/src/gjc-runtime/gc-runtime.ts +403 -0
- package/src/gjc-runtime/ledger-event-renderer.ts +164 -0
- package/src/gjc-runtime/ralplan-runtime.ts +58 -7
- package/src/gjc-runtime/state-renderer.ts +12 -3
- package/src/gjc-runtime/state-runtime.ts +46 -29
- package/src/gjc-runtime/team-gc.ts +49 -0
- package/src/gjc-runtime/team-runtime.ts +211 -8
- package/src/gjc-runtime/tmux-common.ts +29 -0
- package/src/gjc-runtime/tmux-gc.ts +176 -0
- package/src/gjc-runtime/tmux-sessions.ts +68 -12
- package/src/gjc-runtime/ultragoal-runtime.ts +517 -41
- package/src/gjc-runtime/workflow-manifest.generated.json +27 -1
- package/src/gjc-runtime/workflow-manifest.ts +16 -1
- package/src/harness-control-plane/gc-adapter.ts +184 -0
- package/src/harness-control-plane/owner.ts +89 -27
- package/src/harness-control-plane/receipt-spool.ts +128 -0
- package/src/harness-control-plane/state-machine.ts +27 -6
- package/src/harness-control-plane/storage.ts +93 -0
- package/src/harness-control-plane/types.ts +4 -0
- package/src/hindsight/mental-models.ts +17 -16
- package/src/internal-urls/docs-index.generated.ts +14 -8
- package/src/main.ts +7 -2
- package/src/modes/components/assistant-message.ts +26 -14
- package/src/modes/components/diff.ts +97 -0
- package/src/modes/components/hook-selector.ts +19 -0
- package/src/modes/components/model-selector.ts +370 -181
- package/src/modes/components/status-line/segments.ts +1 -1
- package/src/modes/components/tool-execution.ts +30 -13
- package/src/modes/controllers/command-controller.ts +25 -6
- package/src/modes/controllers/extension-ui-controller.ts +3 -0
- package/src/modes/controllers/selector-controller.ts +34 -42
- package/src/modes/rpc/rpc-client.ts +3 -2
- package/src/modes/rpc/rpc-mode.ts +187 -39
- package/src/modes/rpc/rpc-types.ts +5 -2
- package/src/modes/shared/agent-wire/command-dispatch.ts +279 -257
- package/src/modes/shared/agent-wire/command-validation.ts +11 -0
- package/src/modes/shared/agent-wire/deep-interview-gate.ts +30 -1
- package/src/modes/shared/agent-wire/session-registry.ts +109 -0
- package/src/modes/shared/agent-wire/unattended-action-policy.ts +24 -0
- package/src/modes/shared/agent-wire/unattended-run-controller.ts +23 -3
- package/src/modes/shared/agent-wire/unattended-session.ts +16 -1
- package/src/sdk.ts +46 -5
- package/src/secrets/obfuscator.ts +102 -27
- package/src/session/agent-session.ts +179 -25
- package/src/session/blob-store.ts +148 -6
- package/src/session/session-manager.ts +311 -60
- package/src/session/streaming-output.ts +185 -122
- package/src/session/tool-choice-queue.ts +23 -0
- package/src/setup/hermes/templates/operator-instructions.v1.md +7 -1
- package/src/skill-state/workflow-hud.ts +106 -10
- package/src/slash-commands/builtin-registry.ts +3 -2
- package/src/task/executor.ts +78 -6
- package/src/task/receipt.ts +5 -0
- package/src/task/render.ts +21 -1
- package/src/task/types.ts +8 -0
- package/src/thinking-metadata.ts +51 -0
- package/src/thinking.ts +26 -46
- package/src/tools/ask.ts +56 -1
- package/src/tools/bash.ts +1 -1
- package/src/tools/index.ts +2 -0
- package/src/tools/job.ts +3 -2
- package/src/tools/monitor.ts +36 -1
- package/src/tools/resolve.ts +93 -18
- package/src/tools/subagent-render.ts +9 -0
- package/src/tools/subagent.ts +26 -2
- package/src/utils/edit-mode.ts +1 -1
- package/src/utils/tool-choice.ts +45 -16
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@gajae-code/agent-core";
|
|
2
2
|
import type { Api, Model } from "@gajae-code/ai";
|
|
3
3
|
import type { AgentSession } from "../session/agent-session";
|
|
4
|
+
import { formatClampedModelSelector } from "../thinking";
|
|
4
5
|
import {
|
|
5
6
|
aggregateModelProfileRequiredProviders,
|
|
6
7
|
formatAvailableProfileNames,
|
|
@@ -10,8 +11,14 @@ import { type GjcModelAssignmentTargetId, isAuthenticated, type ModelRegistry }
|
|
|
10
11
|
import { resolveModelRoleValue } from "./model-resolver";
|
|
11
12
|
import type { Settings } from "./settings";
|
|
12
13
|
|
|
14
|
+
type ModelProfileActivationSession = Pick<AgentSession, "model" | "thinkingLevel" | "sessionId"> & {
|
|
15
|
+
setModelTemporary?: AgentSession["setModelTemporary"];
|
|
16
|
+
setActiveModelProfile?: (name: string | undefined) => void;
|
|
17
|
+
getActiveModelProfile?: () => string | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
13
20
|
export interface PrepareModelProfileActivationOptions {
|
|
14
|
-
session:
|
|
21
|
+
session: ModelProfileActivationSession;
|
|
15
22
|
modelRegistry: Pick<
|
|
16
23
|
ModelRegistry,
|
|
17
24
|
| "getModelProfile"
|
|
@@ -29,7 +36,7 @@ export interface PrepareModelProfileActivationOptions {
|
|
|
29
36
|
|
|
30
37
|
export interface PreparedModelProfileActivation {
|
|
31
38
|
profileName: string;
|
|
32
|
-
session:
|
|
39
|
+
session: ModelProfileActivationSession & { setModelTemporary: AgentSession["setModelTemporary"] };
|
|
33
40
|
settings: Pick<Settings, "get" | "override" | "set" | "flush">;
|
|
34
41
|
previousModel: Model<Api> | undefined;
|
|
35
42
|
previousThinkingLevel: ThinkingLevel | undefined;
|
|
@@ -37,6 +44,7 @@ export interface PreparedModelProfileActivation {
|
|
|
37
44
|
defaultModel: Model<Api> | undefined;
|
|
38
45
|
defaultThinkingLevel: ThinkingLevel | undefined;
|
|
39
46
|
agentModelOverrides: Record<string, string>;
|
|
47
|
+
previousActiveModelProfile: string | undefined;
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
export function formatModelProfileCredentialError(profileName: string, providers: readonly string[]): string {
|
|
@@ -89,7 +97,7 @@ export async function prepareModelProfileActivation(
|
|
|
89
97
|
if (!resolved.model) {
|
|
90
98
|
throw new Error(`Model profile "${options.profileName}" ${role} selector did not resolve: ${selector}`);
|
|
91
99
|
}
|
|
92
|
-
agentModelOverrides[role] = selector;
|
|
100
|
+
agentModelOverrides[role] = formatClampedModelSelector(selector, resolved.model);
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
return {
|
|
@@ -102,6 +110,7 @@ export async function prepareModelProfileActivation(
|
|
|
102
110
|
defaultModel: resolvedDefault?.model,
|
|
103
111
|
defaultThinkingLevel: resolvedDefault?.thinkingLevel,
|
|
104
112
|
agentModelOverrides,
|
|
113
|
+
previousActiveModelProfile: options.session.getActiveModelProfile?.(),
|
|
105
114
|
};
|
|
106
115
|
}
|
|
107
116
|
|
|
@@ -113,6 +122,7 @@ export async function applyPreparedModelProfileActivation(
|
|
|
113
122
|
const previousThinkingLevel = prepared.previousThinkingLevel;
|
|
114
123
|
const previousAgentModelOverrides = prepared.previousAgentModelOverrides;
|
|
115
124
|
const previousPersistedDefault = prepared.settings.get("modelProfile.default");
|
|
125
|
+
const previousActiveModelProfile = prepared.previousActiveModelProfile;
|
|
116
126
|
let modelChanged = false;
|
|
117
127
|
let overridesChanged = false;
|
|
118
128
|
let defaultChanged = false;
|
|
@@ -134,6 +144,7 @@ export async function applyPreparedModelProfileActivation(
|
|
|
134
144
|
defaultChanged = true;
|
|
135
145
|
await prepared.settings.flush();
|
|
136
146
|
}
|
|
147
|
+
prepared.session.setActiveModelProfile?.(prepared.profileName);
|
|
137
148
|
} catch (error) {
|
|
138
149
|
if (defaultChanged) {
|
|
139
150
|
prepared.settings.set("modelProfile.default", previousPersistedDefault);
|
|
@@ -141,6 +152,7 @@ export async function applyPreparedModelProfileActivation(
|
|
|
141
152
|
if (overridesChanged) {
|
|
142
153
|
prepared.settings.override("task.agentModelOverrides", previousAgentModelOverrides);
|
|
143
154
|
}
|
|
155
|
+
prepared.session.setActiveModelProfile?.(previousActiveModelProfile);
|
|
144
156
|
if (modelChanged && previousModel) {
|
|
145
157
|
await prepared.session.setModelTemporary(previousModel, previousThinkingLevel);
|
|
146
158
|
}
|
|
@@ -54,71 +54,279 @@ const profile = (
|
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
export const BUILTIN_MODEL_PROFILES: readonly ModelProfileDefinition[] = [
|
|
57
|
-
profile("opencode-go-eco", ["opencode-go"], {
|
|
58
|
-
default: "opencode-go/deepseek-v4-flash",
|
|
59
|
-
executor: "opencode-go/qwen3.5-plus",
|
|
60
|
-
architect: "opencode-go/glm-5",
|
|
61
|
-
planner: "opencode-go/minimax-m2.5",
|
|
62
|
-
critic: "opencode-go/kimi-k2.5",
|
|
63
|
-
}),
|
|
64
|
-
profile("opencode-go-standard", ["opencode-go"], {
|
|
65
|
-
default: "opencode-go/kimi-k2.6",
|
|
66
|
-
executor: "opencode-go/qwen3.6-plus",
|
|
67
|
-
architect: "opencode-go/glm-5.1",
|
|
68
|
-
planner: "opencode-go/minimax-m2.7",
|
|
69
|
-
critic: "opencode-go/deepseek-v4-pro",
|
|
70
|
-
}),
|
|
71
|
-
profile("opencode-go-pro", ["opencode-go"], {
|
|
72
|
-
default: "opencode-go/qwen3.7-max",
|
|
73
|
-
executor: "opencode-go/kimi-k2.6",
|
|
74
|
-
architect: "opencode-go/deepseek-v4-pro:high",
|
|
75
|
-
planner: "opencode-go/glm-5.1:high",
|
|
76
|
-
critic: "opencode-go/minimax-m2.7:high",
|
|
77
|
-
}),
|
|
78
57
|
profile("codex-eco", ["openai-codex"], {
|
|
79
|
-
default: "openai-codex/gpt-5.
|
|
80
|
-
executor: "openai-codex/gpt-5.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}),
|
|
85
|
-
profile("codex-
|
|
86
|
-
default: "openai-codex/gpt-5.
|
|
87
|
-
executor: "openai-codex/gpt-5.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
58
|
+
default: "openai-codex/gpt-5.5:low",
|
|
59
|
+
executor: "openai-codex/gpt-5.5:minimal",
|
|
60
|
+
planner: "openai-codex/gpt-5.5:low",
|
|
61
|
+
critic: "openai-codex/gpt-5.5:medium",
|
|
62
|
+
architect: "openai-codex/gpt-5.5:high",
|
|
63
|
+
}),
|
|
64
|
+
profile("codex-medium", ["openai-codex"], {
|
|
65
|
+
default: "openai-codex/gpt-5.5:medium",
|
|
66
|
+
executor: "openai-codex/gpt-5.5:low",
|
|
67
|
+
planner: "openai-codex/gpt-5.5:medium",
|
|
68
|
+
critic: "openai-codex/gpt-5.5:high",
|
|
69
|
+
architect: "openai-codex/gpt-5.5:xhigh",
|
|
91
70
|
}),
|
|
92
71
|
profile("codex-pro", ["openai-codex"], {
|
|
93
|
-
default: "openai-codex/gpt-5.5",
|
|
94
|
-
executor: "openai-codex/gpt-5.
|
|
95
|
-
architect: "openai-codex/gpt-5.1-codex-max:high",
|
|
72
|
+
default: "openai-codex/gpt-5.5:xhigh",
|
|
73
|
+
executor: "openai-codex/gpt-5.5:medium",
|
|
96
74
|
planner: "openai-codex/gpt-5.5:high",
|
|
97
|
-
critic: "openai-codex/gpt-5.
|
|
75
|
+
critic: "openai-codex/gpt-5.5:xhigh",
|
|
76
|
+
architect: "openai-codex/gpt-5.5:xhigh",
|
|
98
77
|
}),
|
|
99
|
-
profile("
|
|
100
|
-
default: "opencode-go/deepseek-v4-flash",
|
|
101
|
-
executor: "opencode-go/qwen3.5-plus",
|
|
102
|
-
architect: "openai-codex/gpt-5.4-mini",
|
|
103
|
-
planner: "openai-codex/gpt-5.4-mini",
|
|
104
|
-
critic: "openai-codex/gpt-5.4-mini",
|
|
105
|
-
}),
|
|
106
|
-
profile("opencode-go-codex-standard", ["opencode-go", "openai-codex"], {
|
|
78
|
+
profile("opencodego", ["opencode-go"], {
|
|
107
79
|
default: "opencode-go/kimi-k2.6",
|
|
108
|
-
executor: "opencode-go/
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}),
|
|
113
|
-
profile("
|
|
114
|
-
default: "
|
|
115
|
-
executor: "
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
80
|
+
executor: "opencode-go/deepseek-v4-flash",
|
|
81
|
+
planner: "opencode-go/qwen3.7-max",
|
|
82
|
+
critic: "opencode-go/mimo-v2.5-pro",
|
|
83
|
+
architect: "opencode-go/deepseek-v4-pro",
|
|
84
|
+
}),
|
|
85
|
+
profile("claude-opus", ["anthropic"], {
|
|
86
|
+
default: "anthropic/claude-opus-4-8:xhigh",
|
|
87
|
+
executor: "anthropic/claude-sonnet-4-6",
|
|
88
|
+
planner: "anthropic/claude-opus-4-8:low",
|
|
89
|
+
critic: "anthropic/claude-opus-4-8:high",
|
|
90
|
+
architect: "anthropic/claude-opus-4-8:xhigh",
|
|
91
|
+
}),
|
|
92
|
+
profile("glm-eco", ["zai"], {
|
|
93
|
+
default: "zai/glm-5.2:low",
|
|
94
|
+
executor: "zai/glm-5.2:minimal",
|
|
95
|
+
planner: "zai/glm-5.2:low",
|
|
96
|
+
critic: "zai/glm-5.2:medium",
|
|
97
|
+
architect: "zai/glm-5.2:high",
|
|
98
|
+
}),
|
|
99
|
+
profile("glm-medium", ["zai"], {
|
|
100
|
+
default: "zai/glm-5.2:medium",
|
|
101
|
+
executor: "zai/glm-5.2:low",
|
|
102
|
+
planner: "zai/glm-5.2:medium",
|
|
103
|
+
critic: "zai/glm-5.2:high",
|
|
104
|
+
architect: "zai/glm-5.2:xhigh",
|
|
105
|
+
}),
|
|
106
|
+
profile("glm-pro", ["zai"], {
|
|
107
|
+
default: "zai/glm-5.2:xhigh",
|
|
108
|
+
executor: "zai/glm-5.2:medium",
|
|
109
|
+
planner: "zai/glm-5.2:high",
|
|
110
|
+
critic: "zai/glm-5.2:xhigh",
|
|
111
|
+
architect: "zai/glm-5.2:xhigh",
|
|
112
|
+
}),
|
|
113
|
+
profile("kimi-coding-plan-eco", ["kimi-code"], {
|
|
114
|
+
default: "kimi-code/kimi-k2.7-code:low",
|
|
115
|
+
executor: "kimi-code/kimi-k2.7-code:minimal",
|
|
116
|
+
planner: "kimi-code/kimi-k2.7-code:low",
|
|
117
|
+
critic: "kimi-code/kimi-k2.7-code:medium",
|
|
118
|
+
architect: "kimi-code/kimi-k2.7-code:high",
|
|
119
|
+
}),
|
|
120
|
+
profile("kimi-coding-plan-medium", ["kimi-code"], {
|
|
121
|
+
default: "kimi-code/kimi-k2.7-code:medium",
|
|
122
|
+
executor: "kimi-code/kimi-k2.7-code:low",
|
|
123
|
+
planner: "kimi-code/kimi-k2.7-code:medium",
|
|
124
|
+
critic: "kimi-code/kimi-k2.7-code:high",
|
|
125
|
+
architect: "kimi-code/kimi-k2.7-code:xhigh",
|
|
126
|
+
}),
|
|
127
|
+
profile("kimi-coding-plan-pro", ["kimi-code"], {
|
|
128
|
+
default: "kimi-code/kimi-k2.7-code:xhigh",
|
|
129
|
+
executor: "kimi-code/kimi-k2.7-code:medium",
|
|
130
|
+
planner: "kimi-code/kimi-k2.7-code:high",
|
|
131
|
+
critic: "kimi-code/kimi-k2.7-code:xhigh",
|
|
132
|
+
architect: "kimi-code/kimi-k2.7-code:xhigh",
|
|
133
|
+
}),
|
|
134
|
+
profile("mimo-eco", ["xiaomi"], {
|
|
135
|
+
default: "xiaomi/mimo-v2.5-pro:low",
|
|
136
|
+
executor: "xiaomi/mimo-v2.5-pro:minimal",
|
|
137
|
+
planner: "xiaomi/mimo-v2.5-pro:low",
|
|
138
|
+
critic: "xiaomi/mimo-v2.5-pro:medium",
|
|
139
|
+
architect: "xiaomi/mimo-v2.5-pro:high",
|
|
140
|
+
}),
|
|
141
|
+
profile("mimo-medium", ["xiaomi"], {
|
|
142
|
+
default: "xiaomi/mimo-v2.5-pro:medium",
|
|
143
|
+
executor: "xiaomi/mimo-v2.5-pro:low",
|
|
144
|
+
planner: "xiaomi/mimo-v2.5-pro:medium",
|
|
145
|
+
critic: "xiaomi/mimo-v2.5-pro:high",
|
|
146
|
+
architect: "xiaomi/mimo-v2.5-pro:xhigh",
|
|
147
|
+
}),
|
|
148
|
+
profile("mimo-pro", ["xiaomi"], {
|
|
149
|
+
default: "xiaomi/mimo-v2.5-pro:xhigh",
|
|
150
|
+
executor: "xiaomi/mimo-v2.5-pro:medium",
|
|
151
|
+
planner: "xiaomi/mimo-v2.5-pro:high",
|
|
152
|
+
critic: "xiaomi/mimo-v2.5-pro:xhigh",
|
|
153
|
+
architect: "xiaomi/mimo-v2.5-pro:xhigh",
|
|
154
|
+
}),
|
|
155
|
+
profile("grok-eco", ["xai"], {
|
|
156
|
+
default: "xai/grok-4.3:low",
|
|
157
|
+
executor: "xai/grok-4.3:minimal",
|
|
158
|
+
planner: "xai/grok-4.3:low",
|
|
159
|
+
critic: "xai/grok-4.3:medium",
|
|
160
|
+
architect: "xai/grok-4.3:high",
|
|
161
|
+
}),
|
|
162
|
+
profile("grok-medium", ["xai"], {
|
|
163
|
+
default: "xai/grok-4.3:medium",
|
|
164
|
+
executor: "xai/grok-4.3:low",
|
|
165
|
+
planner: "xai/grok-4.3:medium",
|
|
166
|
+
critic: "xai/grok-4.3:high",
|
|
167
|
+
architect: "xai/grok-4.3:xhigh",
|
|
168
|
+
}),
|
|
169
|
+
profile("grok-pro", ["xai"], {
|
|
170
|
+
default: "xai/grok-4.3:xhigh",
|
|
171
|
+
executor: "xai/grok-4.3:medium",
|
|
172
|
+
planner: "xai/grok-4.3:high",
|
|
173
|
+
critic: "xai/grok-4.3:xhigh",
|
|
174
|
+
architect: "xai/grok-4.3:xhigh",
|
|
175
|
+
}),
|
|
176
|
+
profile("grok-build-pro", ["grok-build"], {
|
|
177
|
+
default: "grok-build/grok-composer-2.5-fast",
|
|
178
|
+
executor: "grok-build/grok-build",
|
|
179
|
+
planner: "grok-build/grok-composer-2.5-fast",
|
|
180
|
+
critic: "grok-build/grok-composer-2.5-fast",
|
|
181
|
+
architect: "grok-build/grok-build",
|
|
182
|
+
}),
|
|
183
|
+
profile("cursor-eco", ["cursor"], {
|
|
184
|
+
default: "cursor/composer-1.5:low",
|
|
185
|
+
executor: "cursor/composer-1.5:minimal",
|
|
186
|
+
planner: "cursor/composer-1.5:low",
|
|
187
|
+
critic: "cursor/composer-1.5:medium",
|
|
188
|
+
architect: "cursor/composer-1.5:high",
|
|
189
|
+
}),
|
|
190
|
+
profile("cursor-medium", ["cursor"], {
|
|
191
|
+
default: "cursor/composer-1.5:medium",
|
|
192
|
+
executor: "cursor/composer-1.5:low",
|
|
193
|
+
planner: "cursor/composer-1.5:medium",
|
|
194
|
+
critic: "cursor/composer-1.5:high",
|
|
195
|
+
architect: "cursor/composer-1.5:xhigh",
|
|
119
196
|
}),
|
|
197
|
+
profile("cursor-pro", ["cursor"], {
|
|
198
|
+
default: "cursor/composer-1.5:xhigh",
|
|
199
|
+
executor: "cursor/composer-1.5:medium",
|
|
200
|
+
planner: "cursor/composer-1.5:high",
|
|
201
|
+
critic: "cursor/composer-1.5:xhigh",
|
|
202
|
+
architect: "cursor/composer-1.5:xhigh",
|
|
203
|
+
}),
|
|
204
|
+
profile("minimax-eco", ["minimax-code"], {
|
|
205
|
+
default: "minimax-code/minimax-v3:low",
|
|
206
|
+
executor: "minimax-code/minimax-v3:minimal",
|
|
207
|
+
planner: "minimax-code/minimax-v3:low",
|
|
208
|
+
critic: "minimax-code/minimax-v3:medium",
|
|
209
|
+
architect: "minimax-code/minimax-v3:high",
|
|
210
|
+
}),
|
|
211
|
+
profile("minimax-medium", ["minimax-code"], {
|
|
212
|
+
default: "minimax-code/minimax-v3:medium",
|
|
213
|
+
executor: "minimax-code/minimax-v3:low",
|
|
214
|
+
planner: "minimax-code/minimax-v3:medium",
|
|
215
|
+
critic: "minimax-code/minimax-v3:high",
|
|
216
|
+
architect: "minimax-code/minimax-v3:xhigh",
|
|
217
|
+
}),
|
|
218
|
+
profile("minimax-pro", ["minimax-code"], {
|
|
219
|
+
default: "minimax-code/minimax-v3:xhigh",
|
|
220
|
+
executor: "minimax-code/minimax-v3:medium",
|
|
221
|
+
planner: "minimax-code/minimax-v3:high",
|
|
222
|
+
critic: "minimax-code/minimax-v3:xhigh",
|
|
223
|
+
architect: "minimax-code/minimax-v3:xhigh",
|
|
224
|
+
}),
|
|
225
|
+
profile("opus-codex", ["anthropic", "openai-codex"], {
|
|
226
|
+
default: "anthropic/claude-opus-4-8:xhigh",
|
|
227
|
+
executor: "openai-codex/gpt-5.5:low",
|
|
228
|
+
planner: "openai-codex/gpt-5.5:medium",
|
|
229
|
+
critic: "openai-codex/gpt-5.5:high",
|
|
230
|
+
architect: "openai-codex/gpt-5.5:xhigh",
|
|
231
|
+
}),
|
|
232
|
+
profile("codex-opencodego", ["openai-codex", "opencode-go"], {
|
|
233
|
+
default: "openai-codex/gpt-5.5:medium",
|
|
234
|
+
executor: "opencode-go/deepseek-v4-pro",
|
|
235
|
+
planner: "opencode-go/kimi-k2.6",
|
|
236
|
+
critic: "opencode-go/mimo-v2.5-pro",
|
|
237
|
+
architect: "openai-codex/gpt-5.5:xhigh",
|
|
238
|
+
}),
|
|
239
|
+
];
|
|
240
|
+
|
|
241
|
+
export interface ModelProfilePresentation {
|
|
242
|
+
displayName: string;
|
|
243
|
+
providerGroup: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const PROFILE_PRESENTATION: Record<string, ModelProfilePresentation> = {
|
|
247
|
+
"codex-eco": { displayName: "Codex Eco", providerGroup: "CODEX" },
|
|
248
|
+
"codex-medium": { displayName: "Codex Medium", providerGroup: "CODEX" },
|
|
249
|
+
"codex-pro": { displayName: "Codex Pro", providerGroup: "CODEX" },
|
|
250
|
+
opencodego: { displayName: "OpenCodeGo", providerGroup: "OPENCODEGO" },
|
|
251
|
+
"claude-opus": { displayName: "Claude Opus", providerGroup: "CLAUDE" },
|
|
252
|
+
"glm-eco": { displayName: "GLM Eco", providerGroup: "GLM" },
|
|
253
|
+
"glm-medium": { displayName: "GLM Medium", providerGroup: "GLM" },
|
|
254
|
+
"glm-pro": { displayName: "GLM Pro", providerGroup: "GLM" },
|
|
255
|
+
"kimi-coding-plan-eco": { displayName: "Kimi Coding Plan Eco", providerGroup: "KIMI CODING PLAN" },
|
|
256
|
+
"kimi-coding-plan-medium": { displayName: "Kimi Coding Plan Medium", providerGroup: "KIMI CODING PLAN" },
|
|
257
|
+
"kimi-coding-plan-pro": { displayName: "Kimi Coding Plan Pro", providerGroup: "KIMI CODING PLAN" },
|
|
258
|
+
"mimo-eco": { displayName: "Mimo Eco", providerGroup: "MIMO" },
|
|
259
|
+
"mimo-medium": { displayName: "Mimo Medium", providerGroup: "MIMO" },
|
|
260
|
+
"mimo-pro": { displayName: "Mimo Pro", providerGroup: "MIMO" },
|
|
261
|
+
"grok-eco": { displayName: "Grok Eco", providerGroup: "GROK" },
|
|
262
|
+
"grok-medium": { displayName: "Grok Medium", providerGroup: "GROK" },
|
|
263
|
+
"grok-pro": { displayName: "Grok Pro", providerGroup: "GROK" },
|
|
264
|
+
"grok-build-pro": { displayName: "Grok Build Pro", providerGroup: "GROK" },
|
|
265
|
+
"cursor-eco": { displayName: "Cursor Eco", providerGroup: "CURSOR" },
|
|
266
|
+
"cursor-medium": { displayName: "Cursor Medium", providerGroup: "CURSOR" },
|
|
267
|
+
"cursor-pro": { displayName: "Cursor Pro", providerGroup: "CURSOR" },
|
|
268
|
+
"minimax-eco": { displayName: "MiniMax Eco", providerGroup: "MINIMAX" },
|
|
269
|
+
"minimax-medium": { displayName: "MiniMax Medium", providerGroup: "MINIMAX" },
|
|
270
|
+
"minimax-pro": { displayName: "MiniMax Pro", providerGroup: "MINIMAX" },
|
|
271
|
+
"opus-codex": { displayName: "Opus + Codex", providerGroup: "COMBOS" },
|
|
272
|
+
"codex-opencodego": { displayName: "Codex + OpenCodeGo", providerGroup: "COMBOS" },
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
const PROFILE_GROUP_ORDER = [
|
|
276
|
+
"CODEX",
|
|
277
|
+
"OPENCODEGO",
|
|
278
|
+
"CLAUDE",
|
|
279
|
+
"GLM",
|
|
280
|
+
"KIMI CODING PLAN",
|
|
281
|
+
"MIMO",
|
|
282
|
+
"GROK",
|
|
283
|
+
"CURSOR",
|
|
284
|
+
"MINIMAX",
|
|
285
|
+
"COMBOS",
|
|
120
286
|
];
|
|
121
287
|
|
|
288
|
+
const PROFILE_RECOMMENDATIONS: Record<string, string> = {
|
|
289
|
+
"openai-codex": "codex-medium",
|
|
290
|
+
anthropic: "claude-opus",
|
|
291
|
+
"opencode-go": "opencodego",
|
|
292
|
+
zai: "glm-medium",
|
|
293
|
+
"kimi-code": "kimi-coding-plan-medium",
|
|
294
|
+
xiaomi: "mimo-medium",
|
|
295
|
+
xai: "grok-medium",
|
|
296
|
+
"grok-build": "grok-build-pro",
|
|
297
|
+
cursor: "cursor-medium",
|
|
298
|
+
"minimax-code": "minimax-medium",
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export function getModelProfilePresentation(name: string): ModelProfilePresentation {
|
|
302
|
+
return PROFILE_PRESENTATION[name] ?? { displayName: name, providerGroup: "COMBOS" };
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export function groupModelProfilesForPresetLanding(
|
|
306
|
+
profiles: ReadonlyMap<string, ModelProfileDefinition>,
|
|
307
|
+
): Map<string, ModelProfileDefinition[]> {
|
|
308
|
+
const groups = new Map<string, ModelProfileDefinition[]>();
|
|
309
|
+
for (const group of PROFILE_GROUP_ORDER) groups.set(group, []);
|
|
310
|
+
for (const profile of profiles.values()) {
|
|
311
|
+
const group = getModelProfilePresentation(profile.name).providerGroup;
|
|
312
|
+
if (!groups.has(group)) groups.set(group, []);
|
|
313
|
+
groups.get(group)?.push(profile);
|
|
314
|
+
}
|
|
315
|
+
for (const [group, entries] of groups) {
|
|
316
|
+
if (entries.length === 0) groups.delete(group);
|
|
317
|
+
else entries.sort((a, b) => a.name.localeCompare(b.name));
|
|
318
|
+
}
|
|
319
|
+
return groups;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export function recommendModelProfileForProvider(
|
|
323
|
+
providerId: string,
|
|
324
|
+
profiles: ReadonlyMap<string, ModelProfileDefinition>,
|
|
325
|
+
): ModelProfileDefinition | undefined {
|
|
326
|
+
const recommended = PROFILE_RECOMMENDATIONS[providerId];
|
|
327
|
+
return recommended ? profiles.get(recommended) : undefined;
|
|
328
|
+
}
|
|
329
|
+
|
|
122
330
|
export function mergeModelProfiles(userProfiles?: ModelsConfig["profiles"]): Map<string, ModelProfileDefinition> {
|
|
123
331
|
const profiles = new Map<string, ModelProfileDefinition>();
|
|
124
332
|
for (const definition of BUILTIN_MODEL_PROFILES) {
|
|
@@ -776,30 +776,33 @@ export async function resolveModelOverrideWithAuthFallback(
|
|
|
776
776
|
thinkingLevel?: ThinkingLevel;
|
|
777
777
|
explicitThinkingLevel: boolean;
|
|
778
778
|
authFallbackUsed: boolean;
|
|
779
|
+
requestedModel?: Model<Api>;
|
|
780
|
+
fallbackReason?: "auth_unavailable";
|
|
779
781
|
}> {
|
|
780
782
|
const primary = resolveModelOverride(modelPatterns, modelRegistry, settings);
|
|
783
|
+
const unchanged = { ...primary, requestedModel: primary.model, authFallbackUsed: false };
|
|
781
784
|
if (!primary.model || !parentActiveModelPattern) {
|
|
782
|
-
return
|
|
785
|
+
return unchanged;
|
|
783
786
|
}
|
|
784
787
|
|
|
785
788
|
const primaryKey = await modelRegistry.getApiKey(primary.model, sessionId);
|
|
786
789
|
if (primaryKey === kNoAuth || isAuthenticated(primaryKey)) {
|
|
787
|
-
return
|
|
790
|
+
return unchanged;
|
|
788
791
|
}
|
|
789
792
|
|
|
790
793
|
const fallback = resolveModelOverride([parentActiveModelPattern], modelRegistry, settings);
|
|
791
794
|
if (!fallback.model) {
|
|
792
|
-
return
|
|
795
|
+
return unchanged;
|
|
793
796
|
}
|
|
794
797
|
if (modelsAreEqual(fallback.model, primary.model)) {
|
|
795
|
-
return
|
|
798
|
+
return unchanged;
|
|
796
799
|
}
|
|
797
800
|
const fallbackKey = await modelRegistry.getApiKey(fallback.model, sessionId);
|
|
798
801
|
if (!isAuthenticated(fallbackKey)) {
|
|
799
|
-
return
|
|
802
|
+
return unchanged;
|
|
800
803
|
}
|
|
801
804
|
|
|
802
|
-
return { ...fallback, authFallbackUsed: true };
|
|
805
|
+
return { ...fallback, requestedModel: primary.model, authFallbackUsed: true, fallbackReason: "auth_unavailable" };
|
|
803
806
|
}
|
|
804
807
|
|
|
805
808
|
/**
|
|
@@ -37,6 +37,7 @@ export const OpenAICompatSchema = z.object({
|
|
|
37
37
|
requiresAssistantContentForToolCalls: z.boolean().optional(),
|
|
38
38
|
supportsToolChoice: z.boolean().optional(),
|
|
39
39
|
supportsForcedToolChoice: z.boolean().optional(),
|
|
40
|
+
toolChoiceSupport: z.enum(["none", "auto", "required", "named"]).optional(),
|
|
40
41
|
disableReasoningOnForcedToolChoice: z.boolean().optional(),
|
|
41
42
|
disableReasoningOnToolChoice: z.boolean().optional(),
|
|
42
43
|
thinkingFormat: z.enum(["openai", "openrouter", "zai", "qwen", "qwen-chat-template"]).optional(),
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Effort } from "@gajae-code/ai/model-thinking";
|
|
2
2
|
import { TASK_SIMPLE_MODES } from "../task/simple-mode";
|
|
3
|
-
import { getThinkingLevelMetadata } from "../thinking";
|
|
3
|
+
import { getThinkingLevelMetadata } from "../thinking-metadata";
|
|
4
4
|
import { EDIT_MODES } from "../utils/edit-mode";
|
|
5
|
+
|
|
6
|
+
const THINKING_EFFORTS = ["minimal", "low", "medium", "high", "xhigh", "max"] as readonly Effort[];
|
|
7
|
+
|
|
5
8
|
import {
|
|
6
9
|
DEFAULT_DISABLED_EXTENSIONS,
|
|
7
10
|
DEFAULT_SKILL_DISCOVERY_SETTINGS,
|
|
@@ -665,7 +668,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
665
668
|
defaultThinkingLevel: {
|
|
666
669
|
type: "enum",
|
|
667
670
|
values: THINKING_EFFORTS,
|
|
668
|
-
default:
|
|
671
|
+
default: THINKING_EFFORTS[3],
|
|
669
672
|
ui: {
|
|
670
673
|
tab: "model",
|
|
671
674
|
label: "Thinking Level",
|
|
@@ -9,6 +9,7 @@ export const COORDINATOR_MCP_TOOL_NAMES = [
|
|
|
9
9
|
"gjc_coordinator_list_artifacts",
|
|
10
10
|
"gjc_coordinator_read_artifact",
|
|
11
11
|
"gjc_coordinator_read_coordination_status",
|
|
12
|
+
"gjc_coordinator_watch_events",
|
|
12
13
|
"gjc_coordinator_register_session",
|
|
13
14
|
"gjc_coordinator_start_session",
|
|
14
15
|
"gjc_coordinator_send_prompt",
|