@gajae-code/coding-agent 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/dist/types/config/model-registry.d.ts +8 -0
  3. package/dist/types/config/model-resolver.d.ts +4 -1
  4. package/dist/types/gjc-runtime/team-runtime.d.ts +5 -0
  5. package/dist/types/gjc-runtime/ultragoal-guard.d.ts +26 -0
  6. package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +44 -0
  7. package/dist/types/goals/tools/goal-tool.d.ts +4 -4
  8. package/dist/types/hooks/skill-state.d.ts +3 -0
  9. package/dist/types/modes/components/model-selector.d.ts +5 -7
  10. package/dist/types/modes/interactive-mode.d.ts +1 -0
  11. package/dist/types/sdk.d.ts +2 -4
  12. package/dist/types/session/agent-session.d.ts +3 -9
  13. package/dist/types/skill-state/deep-interview-mutation-guard.d.ts +28 -0
  14. package/package.json +13 -9
  15. package/src/config/model-registry.ts +45 -0
  16. package/src/config/model-resolver.ts +5 -1
  17. package/src/defaults/gjc/skills/deep-interview/SKILL.md +30 -30
  18. package/src/defaults/gjc/skills/team/SKILL.md +1 -0
  19. package/src/defaults/gjc/skills/ultragoal/SKILL.md +51 -21
  20. package/src/gjc-runtime/team-runtime.ts +80 -1
  21. package/src/gjc-runtime/ultragoal-guard.ts +239 -0
  22. package/src/gjc-runtime/ultragoal-runtime.ts +318 -4
  23. package/src/goals/tools/goal-tool.ts +10 -4
  24. package/src/hooks/native-skill-hook.ts +26 -0
  25. package/src/hooks/skill-state.ts +59 -0
  26. package/src/main.ts +2 -17
  27. package/src/modes/components/model-selector.ts +225 -33
  28. package/src/modes/controllers/selector-controller.ts +16 -3
  29. package/src/modes/interactive-mode.ts +34 -22
  30. package/src/modes/prompt-action-autocomplete.ts +40 -15
  31. package/src/sdk.ts +3 -1
  32. package/src/session/agent-session.ts +40 -4
  33. package/src/setup/model-onboarding-guidance.ts +5 -3
  34. package/src/skill-state/deep-interview-mutation-guard.ts +303 -0
  35. package/src/slash-commands/builtin-registry.ts +130 -11
  36. package/src/tools/ask.ts +55 -17
  37. package/src/tools/ast-edit.ts +7 -0
  38. package/src/tools/bash.ts +2 -1
  39. package/src/tools/gh.ts +37 -9
  40. package/src/tools/image-gen.ts +19 -10
  41. package/src/tools/path-utils.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -2,13 +2,28 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.1.3] - 2026-05-28
6
+
7
+ ### Changed
8
+
9
+ - Released the current dev branch fixes with refreshed 0.1.3 package metadata.
10
+
11
+ ## [0.1.2] - 2026-05-28
12
+
13
+ ### Changed
14
+
15
+ - Updated package metadata for the Gajae Code npm publication.
16
+
17
+ ### Fixed
18
+
19
+ - Fixed slash-command autocomplete so skill command matches no longer hide built-in fuzzy candidates like `/model` while typing `/mode`.
20
+
5
21
  ## [0.1.1] - 2026-05-28
6
22
 
7
23
  ### Changed
8
24
 
9
25
  - Restored `gjc team` multi-worker GJC-team parity orchestration with current-window worker panes, GJC-scoped state/API semantics, and `N:agent-type` launches.
10
26
  - Ported GJC team worker-worktree integration parity so `status`/`resume` auto-checkpoint dirty workers, merge or cherry-pick worker commits, cross-rebase idle workers, and record conflicts under `.gjc` integration artifacts.
11
- - Restored `gjc team` multi-worker OMX-parity orchestration with current-window worker panes, GJC-scoped state/API semantics, and `N:agent-type` launches.
12
27
 
13
28
  ### Added
14
29
 
@@ -16,6 +16,13 @@ export interface ModelRoleInfo {
16
16
  }
17
17
  export declare const MODEL_ROLES: Record<ModelRole, ModelRoleInfo>;
18
18
  export declare const MODEL_ROLE_IDS: ModelRole[];
19
+ export type GjcModelAssignmentTargetId = "default" | "executor" | "architect" | "planner" | "critic";
20
+ export interface GjcModelAssignmentTargetInfo extends ModelRoleInfo {
21
+ id: GjcModelAssignmentTargetId;
22
+ settingsPath: "modelRoles" | "task.agentModelOverrides";
23
+ }
24
+ export declare const GJC_MODEL_ASSIGNMENT_TARGET_IDS: GjcModelAssignmentTargetId[];
25
+ export declare const GJC_MODEL_ASSIGNMENT_TARGETS: Record<GjcModelAssignmentTargetId, GjcModelAssignmentTargetInfo>;
19
26
  /** Alias for ModelRoleInfo - used for both built-in and custom roles */
20
27
  export type RoleInfo = ModelRoleInfo;
21
28
  /**
@@ -320,6 +327,7 @@ export declare class ModelRegistry {
320
327
  * Check if a model is using OAuth credentials (subscription).
321
328
  */
322
329
  isUsingOAuth(model: Model<Api>): boolean;
330
+ getSessionCredentialType(provider: string, sessionId?: string): "api_key" | "oauth" | undefined;
323
331
  /**
324
332
  * Remove custom API/OAuth registrations for a specific extension source.
325
333
  */
@@ -7,9 +7,12 @@ import { type ModelRegistry, type ModelRole } from "./model-registry";
7
7
  import type { Settings } from "./settings";
8
8
  /** Default model IDs for each known provider */
9
9
  export declare const defaultModelPerProvider: Record<KnownProvider, string>;
10
- export interface ScopedModel {
10
+ export interface ScopedModelSelection {
11
11
  model: Model<Api>;
12
12
  thinkingLevel?: ThinkingLevel;
13
+ explicitThinkingLevel?: boolean;
14
+ }
15
+ export interface ScopedModel extends ScopedModelSelection {
13
16
  explicitThinkingLevel: boolean;
14
17
  }
15
18
  /**
@@ -3,6 +3,7 @@ export type GjcTeamTaskStatus = "pending" | "blocked" | "in_progress" | "complet
3
3
  export type GjcWorkerStatusState = "idle" | "working" | "blocked" | "done" | "failed" | "draining" | "unknown";
4
4
  export declare const GJC_TEAM_DEFAULT_WORKERS = 3;
5
5
  export declare const GJC_TEAM_MAX_WORKERS = 20;
6
+ export type GjcTeamWorkerCli = "gjc";
6
7
  export interface GjcTeamLeader {
7
8
  session_id: string;
8
9
  pane_id: string;
@@ -71,6 +72,7 @@ export interface GjcTeamConfig {
71
72
  max_workers: number;
72
73
  state_root: string;
73
74
  worker_command: string;
75
+ worker_cli_plan: GjcTeamWorkerCli[];
74
76
  tmux_command: string;
75
77
  tmux_session: string;
76
78
  tmux_session_name: string;
@@ -138,6 +140,9 @@ export interface GjcTeamMailboxMessage {
138
140
  delivered_at?: string;
139
141
  notified_at?: string;
140
142
  }
143
+ export declare function resolveGjcTeamWorkerCli(env?: NodeJS.ProcessEnv): GjcTeamWorkerCli;
144
+ export declare function resolveGjcTeamWorkerCliPlan(workerCount: number, env?: NodeJS.ProcessEnv): GjcTeamWorkerCli[];
145
+ export declare function translateGjcWorkerLaunchArgsForCli(workerCli: GjcTeamWorkerCli, args: string[]): string[];
141
146
  interface GjcTeamEvent {
142
147
  event_id: string;
143
148
  ts: string;
@@ -0,0 +1,26 @@
1
+ import { type UltragoalGoal, type UltragoalLedgerEvent, type UltragoalPlan, type UltragoalReceiptKind } from "./ultragoal-runtime";
2
+ export type UltragoalGuardState = "inactive" | "unrelated_goal" | "active_verified_complete" | "active_missing_receipt" | "active_stale_receipt" | "active_missing_final_receipt" | "active_dirty_quality_gate" | "active_review_blocked_unrecorded" | "active_review_blocked_recorded" | "unreadable_fail_closed";
3
+ export interface UltragoalGuardDiagnostic {
4
+ state: UltragoalGuardState;
5
+ message: string;
6
+ goalId?: string;
7
+ }
8
+ export interface CurrentGoalLike {
9
+ objective: string;
10
+ status?: string;
11
+ }
12
+ export declare function validateCompletionReceipt(input: {
13
+ plan: UltragoalPlan;
14
+ ledger: readonly UltragoalLedgerEvent[];
15
+ goal: UltragoalGoal;
16
+ receiptKind: UltragoalReceiptKind;
17
+ }): UltragoalGuardDiagnostic;
18
+ export declare function readUltragoalVerificationState(input: {
19
+ cwd: string;
20
+ currentGoal?: CurrentGoalLike | null;
21
+ }): Promise<UltragoalGuardDiagnostic>;
22
+ export declare function assertCanCompleteCurrentGoal(input: {
23
+ cwd: string;
24
+ currentGoal?: CurrentGoalLike | null;
25
+ }): Promise<void>;
26
+ export declare function isUltragoalBypassPrompt(prompt: string): boolean;
@@ -11,6 +11,7 @@ export interface UltragoalGoal {
11
11
  completedAt?: string;
12
12
  evidence?: string;
13
13
  steering?: Record<string, unknown>;
14
+ completionVerification?: UltragoalCompletionVerification;
14
15
  }
15
16
  export interface UltragoalPlan {
16
17
  version: 1;
@@ -22,6 +23,33 @@ export interface UltragoalPlan {
22
23
  createdAt: string;
23
24
  updatedAt: string;
24
25
  }
26
+ export type UltragoalReceiptKind = "per-goal" | "final-aggregate";
27
+ export interface UltragoalCompletionVerification {
28
+ schemaVersion: 1;
29
+ receiptId: string;
30
+ verifiedAt: string;
31
+ goalId: string;
32
+ receiptKind: UltragoalReceiptKind;
33
+ goalStatusBeforeCheckpoint: UltragoalGoalStatus;
34
+ gjcGoalMode: UltragoalGjcGoalMode;
35
+ gjcObjective: string;
36
+ qualityGateHash: string;
37
+ planGeneration: string;
38
+ basis: {
39
+ planHashBeforeCheckpoint: string;
40
+ latestRelevantLedgerEventIdBeforeCheckpoint: string | null;
41
+ goalUpdatedAtBeforeCheckpoint: string;
42
+ relevantGoalIdsBeforeCheckpoint: string[];
43
+ requiredGoalSetHashBeforeCheckpoint: string;
44
+ };
45
+ checkpointLedgerEventId: string;
46
+ }
47
+ export interface UltragoalLedgerEvent extends JsonObject {
48
+ eventId?: string;
49
+ event?: string;
50
+ goalId?: string;
51
+ timestamp?: string;
52
+ }
25
53
  export interface UltragoalPaths {
26
54
  dir: string;
27
55
  briefPath: string;
@@ -43,7 +71,12 @@ export interface UltragoalCommandResult {
43
71
  stderr?: string;
44
72
  createdPlan?: boolean;
45
73
  }
74
+ interface JsonObject {
75
+ [key: string]: unknown;
76
+ }
77
+ export declare function hashStructuredValue(value: unknown): string;
46
78
  export declare function getUltragoalPaths(cwd: string): UltragoalPaths;
79
+ export declare function readUltragoalLedger(cwd: string): Promise<UltragoalLedgerEvent[]>;
47
80
  export declare function readUltragoalPlan(cwd: string): Promise<UltragoalPlan | null>;
48
81
  export declare function getUltragoalStatus(cwd: string): Promise<UltragoalStatusSummary>;
49
82
  export declare function createUltragoalPlan(input: {
@@ -59,6 +92,16 @@ export declare function startNextUltragoalGoal(input: {
59
92
  goal?: UltragoalGoal;
60
93
  allComplete: boolean;
61
94
  }>;
95
+ export declare function computeUltragoalPlanGeneration(input: {
96
+ plan: UltragoalPlan;
97
+ ledger: readonly UltragoalLedgerEvent[];
98
+ goal: UltragoalGoal;
99
+ receiptKind: UltragoalReceiptKind;
100
+ beforeStatus: UltragoalGoalStatus;
101
+ excludeEventId?: string;
102
+ }): UltragoalCompletionVerification["basis"] & {
103
+ planGeneration: string;
104
+ };
62
105
  export declare function checkpointUltragoalGoal(input: {
63
106
  cwd: string;
64
107
  goalId: string;
@@ -83,3 +126,4 @@ export declare function recordUltragoalReviewBlockers(input: {
83
126
  gjcGoalJson?: string;
84
127
  }): Promise<UltragoalPlan>;
85
128
  export declare function runNativeUltragoalCommand(args: string[], cwd?: string): Promise<UltragoalCommandResult>;
129
+ export {};
@@ -43,7 +43,7 @@ export declare class GoalTool implements AgentTool<typeof goalSchema, GoalToolDe
43
43
  #private;
44
44
  readonly name = "goal";
45
45
  readonly label = "Goal";
46
- readonly loadMode = "essential";
46
+ readonly loadMode: "essential";
47
47
  readonly description: string;
48
48
  readonly parameters: z.ZodObject<{
49
49
  op: z.ZodEnum<{
@@ -65,7 +65,7 @@ export declare class GetGoalTool implements AgentTool<typeof getGoalSchema, Goal
65
65
  #private;
66
66
  readonly name = "get_goal";
67
67
  readonly label = "Get Goal";
68
- readonly loadMode = "essential";
68
+ readonly loadMode: "essential";
69
69
  readonly description: string;
70
70
  readonly parameters: z.ZodObject<{}, z.core.$strip>;
71
71
  readonly strict = true;
@@ -78,7 +78,7 @@ export declare class CreateGoalTool implements AgentTool<typeof createGoalSchema
78
78
  #private;
79
79
  readonly name = "create_goal";
80
80
  readonly label = "Create Goal";
81
- readonly loadMode = "essential";
81
+ readonly loadMode: "essential";
82
82
  readonly description: string;
83
83
  readonly parameters: z.ZodObject<{
84
84
  objective: z.ZodString;
@@ -94,7 +94,7 @@ export declare class UpdateGoalTool implements AgentTool<typeof updateGoalSchema
94
94
  #private;
95
95
  readonly name = "update_goal";
96
96
  readonly label = "Update Goal";
97
- readonly loadMode = "essential";
97
+ readonly loadMode: "essential";
98
98
  readonly description: string;
99
99
  readonly parameters: z.ZodObject<{
100
100
  status: z.ZodEnum<{
@@ -63,12 +63,15 @@ export interface StopHookInput {
63
63
  sessionId?: string;
64
64
  threadId?: string;
65
65
  stateDir?: string;
66
+ sessionFile?: string;
66
67
  }
67
68
  export interface UserPromptSubmitStateInput {
68
69
  cwd: string;
69
70
  sessionId?: string;
70
71
  threadId?: string;
71
72
  stateDir?: string;
73
+ prompt?: string;
74
+ sessionFile?: string;
72
75
  }
73
76
  export declare function detectSkillKeywords(text: string): SkillKeywordMatch[];
74
77
  export declare function detectPrimarySkillKeyword(text: string): SkillKeywordMatch | null;
@@ -1,22 +1,20 @@
1
1
  import { ThinkingLevel } from "@gajae-code/agent-core";
2
2
  import { type Model } from "@gajae-code/ai";
3
3
  import { Container, Input, type TUI } from "@gajae-code/tui";
4
- import type { ModelRegistry } from "../../config/model-registry";
4
+ import type { GjcModelAssignmentTargetId, ModelRegistry } from "../../config/model-registry";
5
+ import { type ScopedModelSelection } from "../../config/model-resolver";
5
6
  import type { Settings } from "../../config/settings";
6
- interface ScopedModelItem {
7
- model: Model;
8
- thinkingLevel?: string;
9
- }
7
+ type ScopedModelItem = ScopedModelSelection;
10
8
  /**
11
9
  * Component that renders a canonical model selector with provider tabs.
12
10
  * - Tab/Arrow Left/Right: Switch between provider tabs
13
11
  * - Arrow Up/Down: Navigate model list
14
- * - Enter: Select the highlighted model as the canonical/default model
12
+ * - Enter: Open assignment actions for default plus GJC role-agent models
15
13
  * - Escape: Close selector
16
14
  */
17
15
  export declare class ModelSelectorComponent extends Container {
18
16
  #private;
19
- constructor(tui: TUI, _currentModel: Model | undefined, settings: Settings, modelRegistry: ModelRegistry, scopedModels: ReadonlyArray<ScopedModelItem>, onSelect: (model: Model, role: "default" | null, thinkingLevel?: ThinkingLevel, selector?: string) => void, onCancel: () => void, options?: {
17
+ constructor(tui: TUI, _currentModel: Model | undefined, settings: Settings, modelRegistry: ModelRegistry, scopedModels: ReadonlyArray<ScopedModelItem>, onSelect: (model: Model, role: GjcModelAssignmentTargetId | null, thinkingLevel?: ThinkingLevel, selector?: string) => void, onCancel: () => void, options?: {
20
18
  temporaryOnly?: boolean;
21
19
  initialSearchInput?: string;
22
20
  });
@@ -132,6 +132,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
132
132
  cancelPendingSubmission(): boolean;
133
133
  markPendingSubmissionStarted(input: SubmittedUserInput): boolean;
134
134
  finishPendingSubmission(input: SubmittedUserInput): void;
135
+ updateEditorChrome(): void;
135
136
  updateEditorBorderColor(): void;
136
137
  updateEditorTopBorder(): void;
137
138
  rebuildChatFromMessages(): void;
@@ -2,6 +2,7 @@ import { type AgentTelemetryConfig, type ThinkingLevel } from "@gajae-code/agent
2
2
  import { type Model } from "@gajae-code/ai";
3
3
  import { type Rule } from "./capability/rule";
4
4
  import { ModelRegistry } from "./config/model-registry";
5
+ import { type ScopedModelSelection } from "./config/model-resolver";
5
6
  import { type PromptTemplate } from "./config/prompt-templates";
6
7
  import { Settings, type SkillsSettings } from "./config/settings";
7
8
  import "./discovery";
@@ -40,10 +41,7 @@ export interface CreateAgentSessionOptions {
40
41
  /** Thinking selector. Default: from settings, else unset */
41
42
  thinkingLevel?: ThinkingLevel;
42
43
  /** Models available for cycling (Ctrl+P in interactive mode) */
43
- scopedModels?: Array<{
44
- model: Model;
45
- thinkingLevel?: ThinkingLevel;
46
- }>;
44
+ scopedModels?: ScopedModelSelection[];
47
45
  /** System prompt blocks. Array replaces default, function receives default blocks and returns final blocks. */
48
46
  systemPrompt?: string[] | ((defaultPrompt: string[]) => string[]);
49
47
  /** Optional provider-facing session identifier for prompt caches and sticky auth selection.
@@ -18,7 +18,7 @@ import type { AssistantMessage, Effort, ImageContent, Message, MessageAttributio
18
18
  import { type AsyncJob, type AsyncJobDeliveryState, AsyncJobManager } from "../async";
19
19
  import type { Rule } from "../capability/rule";
20
20
  import { type ModelRegistry } from "../config/model-registry";
21
- import { type ResolvedModelRoleValue } from "../config/model-resolver";
21
+ import { type ResolvedModelRoleValue, type ScopedModelSelection } from "../config/model-resolver";
22
22
  import { type PromptTemplate } from "../config/prompt-templates";
23
23
  import type { Settings, SkillsSettings } from "../config/settings";
24
24
  import { RawSseDebugBuffer } from "../debug/raw-sse-buffer";
@@ -119,10 +119,7 @@ export interface AgentSessionConfig {
119
119
  sessionManager: SessionManager;
120
120
  settings: Settings;
121
121
  /** Models to cycle through with Ctrl+P (from --models flag) */
122
- scopedModels?: Array<{
123
- model: Model;
124
- thinkingLevel?: ThinkingLevel;
125
- }>;
122
+ scopedModels?: ScopedModelSelection[];
126
123
  /** Initial session thinking selector. */
127
124
  thinkingLevel?: ThinkingLevel;
128
125
  /** Prompt templates for expansion */
@@ -446,10 +443,7 @@ export declare class AgentSession {
446
443
  /** Current session display name, if set */
447
444
  get sessionName(): string | undefined;
448
445
  /** Scoped models for cycling (from --models flag) */
449
- get scopedModels(): ReadonlyArray<{
450
- model: Model;
451
- thinkingLevel?: ThinkingLevel;
452
- }>;
446
+ get scopedModels(): ReadonlyArray<ScopedModelSelection>;
453
447
  /** Prompt templates */
454
448
  getPlanModeState(): PlanModeState | undefined;
455
449
  setPlanModeState(state: PlanModeState | undefined): void;
@@ -0,0 +1,28 @@
1
+ import type { AgentTool } from "@gajae-code/agent-core";
2
+ export declare const DEEP_INTERVIEW_MUTATION_BLOCK_MESSAGE = "Deep-interview is active; either continue interviewing with `ask`, or write/finalize the pending spec under `.gjc/specs/` / update state under `.gjc/state/`. Do not edit product code until explicit execution approval.";
3
+ type ToolWithEditMode = AgentTool & {
4
+ mode?: unknown;
5
+ customWireName?: unknown;
6
+ };
7
+ export interface DeepInterviewMutationGuardInput {
8
+ cwd: string;
9
+ sessionId?: string;
10
+ threadId?: string;
11
+ tool: ToolWithEditMode;
12
+ args: unknown;
13
+ }
14
+ export interface DeepInterviewMutationDecision {
15
+ blocked: boolean;
16
+ message?: string;
17
+ targets: string[];
18
+ reason?: string;
19
+ }
20
+ export declare function assertDeepInterviewMutationRawPathsAllowed(input: {
21
+ cwd: string;
22
+ sessionId?: string;
23
+ threadId?: string;
24
+ rawPaths: string[];
25
+ }): Promise<void>;
26
+ export declare function getDeepInterviewMutationDecision(input: DeepInterviewMutationGuardInput): Promise<DeepInterviewMutationDecision>;
27
+ export declare function assertDeepInterviewMutationAllowed(input: DeepInterviewMutationGuardInput): Promise<void>;
28
+ export {};
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@gajae-code/coding-agent",
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "description": "Gajae Code CLI with read, bash, edit, write tools and session management",
6
- "homepage": "https://gajae-code.dev",
7
- "author": "Can Boluk",
6
+ "homepage": "https://gaebal-gajae.dev",
7
+ "author": "Yeachan-Heo",
8
8
  "contributors": [
9
9
  "Mario Zechner"
10
10
  ],
@@ -48,12 +48,12 @@
48
48
  "@agentclientprotocol/sdk": "0.21.0",
49
49
  "@babel/parser": "^7.29.3",
50
50
  "@mozilla/readability": "^0.6.0",
51
- "@gajae-code/stats": "0.1.1",
52
- "@gajae-code/agent-core": "0.1.1",
53
- "@gajae-code/ai": "0.1.1",
54
- "@gajae-code/natives": "0.1.1",
55
- "@gajae-code/tui": "0.1.1",
56
- "@gajae-code/utils": "0.1.1",
51
+ "@gajae-code/stats": "0.1.3",
52
+ "@gajae-code/agent-core": "0.1.3",
53
+ "@gajae-code/ai": "0.1.3",
54
+ "@gajae-code/natives": "0.1.3",
55
+ "@gajae-code/tui": "0.1.3",
56
+ "@gajae-code/utils": "0.1.3",
57
57
  "@puppeteer/browsers": "^2.13.0",
58
58
  "@types/turndown": "5.0.6",
59
59
  "@xterm/headless": "^6.0.0",
@@ -84,6 +84,10 @@
84
84
  "dist/types"
85
85
  ],
86
86
  "exports": {
87
+ "./cli": {
88
+ "types": "./dist/types/cli.d.ts",
89
+ "import": "./src/cli.ts"
90
+ },
87
91
  ".": {
88
92
  "types": "./dist/types/index.d.ts",
89
93
  "import": "./src/index.ts"
@@ -80,6 +80,47 @@ export const MODEL_ROLES: Record<ModelRole, ModelRoleInfo> = {
80
80
 
81
81
  export const MODEL_ROLE_IDS: ModelRole[] = ["default", "smol", "slow", "vision", "plan", "designer", "commit", "task"];
82
82
 
83
+ export type GjcModelAssignmentTargetId = "default" | "executor" | "architect" | "planner" | "critic";
84
+
85
+ export interface GjcModelAssignmentTargetInfo extends ModelRoleInfo {
86
+ id: GjcModelAssignmentTargetId;
87
+ settingsPath: "modelRoles" | "task.agentModelOverrides";
88
+ }
89
+
90
+ export const GJC_MODEL_ASSIGNMENT_TARGET_IDS: GjcModelAssignmentTargetId[] = [
91
+ "default",
92
+ "executor",
93
+ "architect",
94
+ "planner",
95
+ "critic",
96
+ ];
97
+
98
+ export const GJC_MODEL_ASSIGNMENT_TARGETS: Record<GjcModelAssignmentTargetId, GjcModelAssignmentTargetInfo> = {
99
+ default: { id: "default", tag: "DEFAULT", name: "Default", color: "success", settingsPath: "modelRoles" },
100
+ executor: {
101
+ id: "executor",
102
+ tag: "EXECUTOR",
103
+ name: "Executor",
104
+ color: "accent",
105
+ settingsPath: "task.agentModelOverrides",
106
+ },
107
+ architect: {
108
+ id: "architect",
109
+ tag: "ARCHITECT",
110
+ name: "Architect",
111
+ color: "muted",
112
+ settingsPath: "task.agentModelOverrides",
113
+ },
114
+ planner: {
115
+ id: "planner",
116
+ tag: "PLANNER",
117
+ name: "Planner",
118
+ color: "warning",
119
+ settingsPath: "task.agentModelOverrides",
120
+ },
121
+ critic: { id: "critic", tag: "CRITIC", name: "Critic", color: "error", settingsPath: "task.agentModelOverrides" },
122
+ };
123
+
83
124
  /** Alias for ModelRoleInfo - used for both built-in and custom roles */
84
125
  export type RoleInfo = ModelRoleInfo;
85
126
 
@@ -2129,6 +2170,10 @@ export class ModelRegistry {
2129
2170
  return this.authStorage.hasOAuth(model.provider);
2130
2171
  }
2131
2172
 
2173
+ getSessionCredentialType(provider: string, sessionId?: string): "api_key" | "oauth" | undefined {
2174
+ return this.authStorage.getSessionCredentialType(provider, sessionId);
2175
+ }
2176
+
2132
2177
  #clearRuntimeProviderState(providerName: string): void {
2133
2178
  this.#runtimeProviderApiKeys.delete(providerName);
2134
2179
  this.#runtimeProviderOverrides.delete(providerName);
@@ -23,9 +23,13 @@ import type { Settings } from "./settings";
23
23
  /** Default model IDs for each known provider */
24
24
  export const defaultModelPerProvider: Record<KnownProvider, string> = DEFAULT_MODEL_PER_PROVIDER;
25
25
 
26
- export interface ScopedModel {
26
+ export interface ScopedModelSelection {
27
27
  model: Model<Api>;
28
28
  thinkingLevel?: ThinkingLevel;
29
+ explicitThinkingLevel?: boolean;
30
+ }
31
+
32
+ export interface ScopedModel extends ScopedModelSelection {
29
33
  explicitThinkingLevel: boolean;
30
34
  }
31
35