@gajae-code/coding-agent 0.7.3 → 0.7.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 +48 -0
- package/bin/gjc.js +4 -0
- package/dist/types/cli/plugin-cli.d.ts +2 -0
- package/dist/types/commands/plugin.d.ts +6 -0
- package/dist/types/commands/session.d.ts +6 -0
- package/dist/types/config/model-profile-activation.d.ts +8 -1
- package/dist/types/extensibility/gjc-plugins/compiler.d.ts +19 -0
- package/dist/types/extensibility/gjc-plugins/constrained-hooks.d.ts +29 -0
- package/dist/types/extensibility/gjc-plugins/index.d.ts +9 -0
- package/dist/types/extensibility/gjc-plugins/injection.d.ts +9 -0
- package/dist/types/extensibility/gjc-plugins/installer.d.ts +13 -0
- package/dist/types/extensibility/gjc-plugins/mcp-policy.d.ts +26 -0
- package/dist/types/extensibility/gjc-plugins/observability.d.ts +27 -0
- package/dist/types/extensibility/gjc-plugins/prompt-appendix.d.ts +16 -0
- package/dist/types/extensibility/gjc-plugins/registry.d.ts +32 -0
- package/dist/types/extensibility/gjc-plugins/runtime-adapters.d.ts +64 -0
- package/dist/types/extensibility/gjc-plugins/session-validation.d.ts +42 -0
- package/dist/types/extensibility/gjc-plugins/types.d.ts +158 -2
- package/dist/types/extensibility/gjc-plugins/validation.d.ts +8 -1
- package/dist/types/gjc-runtime/launch-tmux.d.ts +1 -0
- package/dist/types/gjc-runtime/psmux-detect.d.ts +78 -0
- package/dist/types/gjc-runtime/team-runtime.d.ts +2 -0
- package/dist/types/gjc-runtime/tmux-common.d.ts +20 -1
- package/dist/types/gjc-runtime/tmux-sessions.d.ts +18 -0
- package/dist/types/main.d.ts +2 -0
- package/dist/types/modes/components/model-selector.d.ts +6 -0
- package/dist/types/notifications/html-format.d.ts +11 -0
- package/dist/types/notifications/index.d.ts +149 -1
- package/dist/types/notifications/lifecycle-commands.d.ts +72 -0
- package/dist/types/notifications/lifecycle-control-runtime.d.ts +98 -0
- package/dist/types/notifications/lifecycle-orchestrator.d.ts +144 -0
- package/dist/types/notifications/rate-limit-pool.d.ts +2 -0
- package/dist/types/notifications/recent-activity.d.ts +35 -0
- package/dist/types/notifications/telegram-daemon.d.ts +60 -0
- package/dist/types/notifications/telegram-reference.d.ts +3 -1
- package/dist/types/notifications/topic-registry.d.ts +10 -9
- package/dist/types/runtime-mcp/types.d.ts +7 -0
- package/dist/types/sdk.d.ts +2 -0
- package/dist/types/session/agent-session.d.ts +14 -4
- package/dist/types/session/blob-store.d.ts +25 -0
- package/dist/types/session/session-manager.d.ts +57 -0
- package/dist/types/slash-commands/helpers/fast-status-report.d.ts +6 -0
- package/dist/types/system-prompt.d.ts +2 -0
- package/dist/types/task/executor.d.ts +9 -1
- package/dist/types/tools/index.d.ts +3 -1
- package/dist/types/utils/changelog.d.ts +1 -0
- package/package.json +11 -9
- package/scripts/g004-tmux-smoke.ts +100 -0
- package/scripts/g005-daemon-smoke.ts +181 -0
- package/scripts/g011-daemon-path-smoke.ts +153 -0
- package/src/cli/plugin-cli.ts +66 -3
- package/src/cli.ts +21 -4
- package/src/commands/plugin.ts +4 -0
- package/src/commands/session.ts +18 -0
- package/src/config/model-profile-activation.ts +55 -7
- package/src/defaults/gjc/extensions/grok-cli-vendor/biome.json +1 -1
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +3 -3
- package/src/defaults/gjc/skills/team/SKILL.md +5 -4
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +41 -13
- package/src/export/html/index.ts +2 -2
- package/src/extensibility/gjc-plugins/compiler.ts +351 -0
- package/src/extensibility/gjc-plugins/constrained-hooks.ts +170 -0
- package/src/extensibility/gjc-plugins/index.ts +9 -0
- package/src/extensibility/gjc-plugins/injection.ts +109 -0
- package/src/extensibility/gjc-plugins/installer.ts +434 -0
- package/src/extensibility/gjc-plugins/loader.ts +3 -1
- package/src/extensibility/gjc-plugins/mcp-policy.ts +239 -0
- package/src/extensibility/gjc-plugins/observability.ts +84 -0
- package/src/extensibility/gjc-plugins/paths.ts +1 -1
- package/src/extensibility/gjc-plugins/prompt-appendix.ts +109 -0
- package/src/extensibility/gjc-plugins/registry.ts +180 -0
- package/src/extensibility/gjc-plugins/runtime-adapters.ts +234 -0
- package/src/extensibility/gjc-plugins/schema.ts +250 -20
- package/src/extensibility/gjc-plugins/session-validation.ts +147 -0
- package/src/extensibility/gjc-plugins/types.ts +199 -3
- package/src/extensibility/gjc-plugins/validation.ts +80 -0
- package/src/extensibility/skills.ts +15 -0
- package/src/gjc-runtime/launch-tmux.ts +61 -7
- package/src/gjc-runtime/psmux-detect.ts +239 -0
- package/src/gjc-runtime/team-runtime.ts +56 -23
- package/src/gjc-runtime/tmux-common.ts +27 -2
- package/src/gjc-runtime/tmux-sessions.ts +51 -1
- package/src/gjc-runtime/ultragoal-runtime.ts +75 -15
- package/src/internal-urls/docs-index.generated.ts +5 -4
- package/src/main.ts +14 -3
- package/src/modes/components/hook-editor.ts +1 -1
- package/src/modes/components/hook-selector.ts +67 -43
- package/src/modes/components/model-selector.ts +44 -11
- package/src/modes/controllers/extension-ui-controller.ts +0 -27
- package/src/modes/controllers/selector-controller.ts +50 -11
- package/src/modes/interactive-mode.ts +2 -0
- package/src/modes/utils/hotkeys-markdown.ts +1 -1
- package/src/notifications/html-format.ts +38 -0
- package/src/notifications/index.ts +242 -12
- package/src/notifications/lifecycle-commands.ts +228 -0
- package/src/notifications/lifecycle-control-runtime.ts +400 -0
- package/src/notifications/lifecycle-orchestrator.ts +358 -0
- package/src/notifications/rate-limit-pool.ts +19 -0
- package/src/notifications/recent-activity.ts +132 -0
- package/src/notifications/telegram-daemon.ts +433 -8
- package/src/notifications/telegram-reference.ts +25 -7
- package/src/notifications/topic-registry.ts +18 -9
- package/src/prompts/agents/executor.md +2 -2
- package/src/runtime-mcp/transports/stdio.ts +38 -4
- package/src/runtime-mcp/types.ts +7 -0
- package/src/sdk.ts +157 -10
- package/src/session/agent-session.ts +166 -74
- package/src/session/blob-store.ts +196 -8
- package/src/session/session-manager.ts +678 -7
- package/src/slash-commands/builtin-registry.ts +23 -3
- package/src/slash-commands/helpers/fast-status-report.ts +13 -3
- package/src/system-prompt.ts +9 -0
- package/src/task/executor.ts +31 -7
- package/src/task/index.ts +2 -0
- package/src/tools/ask.ts +5 -1
- package/src/tools/index.ts +3 -1
- package/src/utils/changelog.ts +8 -0
|
@@ -6,6 +6,7 @@ import { getOAuthProviders } from "@gajae-code/ai/utils/oauth";
|
|
|
6
6
|
import { Spacer, Text } from "@gajae-code/tui";
|
|
7
7
|
import { setProjectDir } from "@gajae-code/utils";
|
|
8
8
|
import { jobElapsedMs } from "../async";
|
|
9
|
+
import { materializeActiveModelProfileAssignment } from "../config/model-profile-activation";
|
|
9
10
|
import {
|
|
10
11
|
GJC_MODEL_ASSIGNMENT_TARGET_IDS,
|
|
11
12
|
GJC_MODEL_ASSIGNMENT_TARGETS,
|
|
@@ -298,6 +299,12 @@ const BUILTIN_SLASH_COMMAND_REGISTRY: ReadonlyArray<SlashCommandSpec> = [
|
|
|
298
299
|
selector: selection.selector,
|
|
299
300
|
thinkingLevel: selection.thinkingLevel,
|
|
300
301
|
});
|
|
302
|
+
materializeActiveModelProfileAssignment({
|
|
303
|
+
session: runtime.session,
|
|
304
|
+
settings: runtime.settings,
|
|
305
|
+
role: parsedArgs.targetId,
|
|
306
|
+
selector: persistedSelector,
|
|
307
|
+
});
|
|
301
308
|
if (selection.thinkingLevel) {
|
|
302
309
|
runtime.session.setThinkingLevel(selection.thinkingLevel);
|
|
303
310
|
}
|
|
@@ -316,10 +323,23 @@ const BUILTIN_SLASH_COMMAND_REGISTRY: ReadonlyArray<SlashCommandSpec> = [
|
|
|
316
323
|
selection.thinkingLevel ??
|
|
317
324
|
extractExplicitThinkingSelector(overrides[parsedArgs.targetId], runtime.settings);
|
|
318
325
|
const roleSelector = formatModelSelectorValue(selection.selector, thinkingLevel);
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
326
|
+
const materializedProfile = materializeActiveModelProfileAssignment({
|
|
327
|
+
session: runtime.session,
|
|
328
|
+
settings: runtime.settings,
|
|
329
|
+
role: parsedArgs.targetId,
|
|
330
|
+
selector: roleSelector,
|
|
322
331
|
});
|
|
332
|
+
if (!materializedProfile) {
|
|
333
|
+
const target = GJC_MODEL_ASSIGNMENT_TARGETS[parsedArgs.targetId];
|
|
334
|
+
if (target.settingsPath === "modelRoles") {
|
|
335
|
+
runtime.settings.setModelRole(parsedArgs.targetId, roleSelector);
|
|
336
|
+
} else {
|
|
337
|
+
runtime.settings.set("task.agentModelOverrides", {
|
|
338
|
+
...overrides,
|
|
339
|
+
[parsedArgs.targetId]: roleSelector,
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
}
|
|
323
343
|
runtime.settings.getStorage()?.recordModelUsage(`${selection.model.provider}/${selection.model.id}`);
|
|
324
344
|
await runtime.output(`${parsedArgs.targetId} agent model set to ${roleSelector}.`);
|
|
325
345
|
}
|
|
@@ -56,6 +56,12 @@ export interface FastStatusSessionLike {
|
|
|
56
56
|
readonly model?: Model;
|
|
57
57
|
/** Fast predicate against the main session tier (current model + `modelRoles`). */
|
|
58
58
|
isFastForProvider(provider?: string): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Current-model EFFECTIVE fast state (intent minus any provider auto-disable).
|
|
61
|
+
* Used for the current-model row so it matches what the next request does.
|
|
62
|
+
* Optional so lightweight fakes can omit it; falls back to `isFastForProvider`.
|
|
63
|
+
*/
|
|
64
|
+
isFastModeActive?(): boolean;
|
|
59
65
|
/** Fast predicate against the effective subagent tier (`task.agentModelOverrides` roles). */
|
|
60
66
|
isFastForSubagentProvider(provider?: string): boolean;
|
|
61
67
|
resolveRoleModelWithThinking(role: string): { model?: Model };
|
|
@@ -95,9 +101,13 @@ export interface BuildFastStatusReportArgs {
|
|
|
95
101
|
*/
|
|
96
102
|
export function buildFastStatusReport(args: BuildFastStatusReportArgs): string {
|
|
97
103
|
const { session, roleTargets, iconFast, formatInactive } = args;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
104
|
+
// Current-model row uses the EFFECTIVE predicate (intent minus any provider
|
|
105
|
+
// auto-disable) so it matches the next request; `modelRoles` rows below stay
|
|
106
|
+
// on pure intent. Fall back to intent when a fake omits `isFastModeActive`.
|
|
107
|
+
const currentFast = session.isFastModeActive
|
|
108
|
+
? session.isFastModeActive()
|
|
109
|
+
: session.isFastForProvider(session.model?.provider);
|
|
110
|
+
const rows: FastStatusRow[] = [{ label: "현재 모델", model: session.model, fast: currentFast }];
|
|
101
111
|
for (const target of roleTargets) {
|
|
102
112
|
const resolved = session.resolveRoleModelWithThinking(target.id);
|
|
103
113
|
if (resolved.model) {
|
package/src/system-prompt.ts
CHANGED
|
@@ -336,6 +336,8 @@ export interface BuildSystemPromptOptions {
|
|
|
336
336
|
toolNames?: string[];
|
|
337
337
|
/** Text to append to system prompt. */
|
|
338
338
|
appendSystemPrompt?: string;
|
|
339
|
+
/** Rendered GJC plugin system-appendix blocks (lower-authority, appended last). */
|
|
340
|
+
pluginAppendices?: string;
|
|
339
341
|
/** Repeat full tool descriptions in system prompt. Default: false */
|
|
340
342
|
repeatToolDescriptions?: boolean;
|
|
341
343
|
/** Skills settings for discovery. */
|
|
@@ -380,6 +382,7 @@ export async function buildSystemPrompt(options: BuildSystemPromptOptions = {}):
|
|
|
380
382
|
customPrompt,
|
|
381
383
|
tools,
|
|
382
384
|
appendSystemPrompt,
|
|
385
|
+
pluginAppendices,
|
|
383
386
|
repeatToolDescriptions = false,
|
|
384
387
|
skillsSettings,
|
|
385
388
|
toolNames: providedToolNames,
|
|
@@ -579,5 +582,11 @@ export async function buildSystemPrompt(options: BuildSystemPromptOptions = {}):
|
|
|
579
582
|
systemPrompt.push(projectPrompt);
|
|
580
583
|
}
|
|
581
584
|
|
|
585
|
+
// Plugin system appendices are appended last as a lower-authority block; they
|
|
586
|
+
// can never override base/project/developer instructions above them.
|
|
587
|
+
if (pluginAppendices?.trim()) {
|
|
588
|
+
systemPrompt.push(pluginAppendices.trim());
|
|
589
|
+
}
|
|
590
|
+
|
|
582
591
|
return { systemPrompt };
|
|
583
592
|
}
|
package/src/task/executor.ts
CHANGED
|
@@ -9,6 +9,7 @@ import * as fs from "node:fs/promises";
|
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import type { AgentEvent, AgentIdentity, AgentTelemetryConfig, ThinkingLevel } from "@gajae-code/agent-core";
|
|
11
11
|
import { recordHandoff, resolveTelemetry } from "@gajae-code/agent-core";
|
|
12
|
+
import type { ServiceTier } from "@gajae-code/ai";
|
|
12
13
|
import { type JsonSchemaValidationIssue, validateJsonSchemaValue } from "@gajae-code/ai/utils/schema";
|
|
13
14
|
import { logger, prompt, untilAborted } from "@gajae-code/utils";
|
|
14
15
|
import { AsyncJobManager } from "../async";
|
|
@@ -19,7 +20,7 @@ import { Settings } from "../config/settings";
|
|
|
19
20
|
import { SETTINGS_SCHEMA, type SettingPath } from "../config/settings-schema";
|
|
20
21
|
import { runExtensionCompact, runExtensionSetModel } from "../extensibility/extensions/compact-handler";
|
|
21
22
|
import { getSessionSlashCommands } from "../extensibility/extensions/get-commands-handler";
|
|
22
|
-
import { buildAgentSubskillInjection } from "../extensibility/gjc-plugins";
|
|
23
|
+
import { buildAgentSubskillInjection, renderAgentPromptAdditions } from "../extensibility/gjc-plugins";
|
|
23
24
|
import { buildSkillPromptMessage, type Skill } from "../extensibility/skills";
|
|
24
25
|
import type { HindsightSessionState } from "../hindsight/state";
|
|
25
26
|
import type { LocalProtocolOptions } from "../internal-urls";
|
|
@@ -146,6 +147,13 @@ export interface ExecutorOptions {
|
|
|
146
147
|
authStorage?: AuthStorage;
|
|
147
148
|
modelRegistry?: ModelRegistry;
|
|
148
149
|
settings?: Settings;
|
|
150
|
+
/**
|
|
151
|
+
* Live service-tier intent of the parent session (`AgentSession.serviceTier`),
|
|
152
|
+
* used as the inherited tier when `task.serviceTier === "inherit"`. Passing the
|
|
153
|
+
* live value (not the stale settings snapshot) lets a runtime `/fast on` reach
|
|
154
|
+
* subagents, and a main-model fast-mode auto-disable does not clobber it.
|
|
155
|
+
*/
|
|
156
|
+
inheritedServiceTier?: ServiceTier;
|
|
149
157
|
/** Override local:// protocol options so subagent shares parent's local:// root */
|
|
150
158
|
localProtocolOptions?: LocalProtocolOptions;
|
|
151
159
|
/**
|
|
@@ -482,15 +490,19 @@ function getUsageTokens(usage: unknown): number {
|
|
|
482
490
|
return firstNumberField(record, ["totalTokens", "total_tokens"]) ?? 0;
|
|
483
491
|
}
|
|
484
492
|
|
|
485
|
-
export function createSubagentSettings(baseSettings: Settings): Settings {
|
|
493
|
+
export function createSubagentSettings(baseSettings: Settings, inheritedServiceTier?: ServiceTier): Settings {
|
|
486
494
|
const snapshot: Partial<Record<SettingPath, unknown>> = {};
|
|
487
495
|
for (const key of Object.keys(SETTINGS_SCHEMA) as SettingPath[]) {
|
|
488
496
|
snapshot[key] = baseSettings.get(key);
|
|
489
497
|
}
|
|
490
|
-
// Subagent-scoped service-tier override: "inherit"
|
|
491
|
-
//
|
|
498
|
+
// Subagent-scoped service-tier override: "inherit" uses the parent session's
|
|
499
|
+
// LIVE intent (so a runtime `/fast on` reaches subagents and a main-model
|
|
500
|
+
// fast-mode auto-disable never clobbers it); any explicit value applies only
|
|
501
|
+
// to subagent sessions and wins over inherited intent.
|
|
492
502
|
const taskServiceTier = baseSettings.get("task.serviceTier");
|
|
493
|
-
if (taskServiceTier
|
|
503
|
+
if (taskServiceTier === "inherit") {
|
|
504
|
+
snapshot.serviceTier = inheritedServiceTier ?? "none";
|
|
505
|
+
} else {
|
|
494
506
|
snapshot.serviceTier = taskServiceTier;
|
|
495
507
|
}
|
|
496
508
|
return Settings.isolated({
|
|
@@ -571,7 +583,7 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
|
|
|
571
583
|
}
|
|
572
584
|
|
|
573
585
|
const settings = options.settings ?? Settings.isolated();
|
|
574
|
-
const subagentSettings = createSubagentSettings(settings);
|
|
586
|
+
const subagentSettings = createSubagentSettings(settings, options.inheritedServiceTier);
|
|
575
587
|
const maxRecursionDepth = settings.get("task.maxRecursionDepth") ?? 2;
|
|
576
588
|
const maxRuntimeMs = Math.max(0, Math.trunc(Number(settings.get("task.maxRuntimeMs") ?? 0) || 0));
|
|
577
589
|
const parentDepth = options.taskDepth ?? 0;
|
|
@@ -1229,6 +1241,13 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
|
|
|
1229
1241
|
agentName: agent.name,
|
|
1230
1242
|
});
|
|
1231
1243
|
|
|
1244
|
+
let agentPromptAdditions = { appendix: "", advertisement: "" };
|
|
1245
|
+
try {
|
|
1246
|
+
agentPromptAdditions = await renderAgentPromptAdditions({ cwd, agentName: agent.name });
|
|
1247
|
+
} catch (error) {
|
|
1248
|
+
logger.warn("Failed to render GJC plugin agent prompt additions", { error });
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1232
1251
|
const { session } = await awaitAbortable(
|
|
1233
1252
|
createAgentSession({
|
|
1234
1253
|
cwd: worktree ?? cwd,
|
|
@@ -1259,7 +1278,12 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
|
|
|
1259
1278
|
ircSelfId: ircEnabled ? id : "",
|
|
1260
1279
|
forkContext: forkContextNotice,
|
|
1261
1280
|
});
|
|
1262
|
-
|
|
1281
|
+
// Order: base agent prompt -> agent appendix -> Tier-1 advertisement -> Tier-2 body.
|
|
1282
|
+
const appendixPart = agentPromptAdditions.appendix ? `\n\n${agentPromptAdditions.appendix}` : "";
|
|
1283
|
+
const advertPart = agentPromptAdditions.advertisement
|
|
1284
|
+
? `\n\n${agentPromptAdditions.advertisement}`
|
|
1285
|
+
: "";
|
|
1286
|
+
const promptWithSubskills = `${subagentPrompt}${appendixPart}${advertPart}${agentSubskillBlock}`;
|
|
1263
1287
|
return defaultPrompt.length === 0
|
|
1264
1288
|
? [promptWithSubskills]
|
|
1265
1289
|
: [...defaultPrompt.slice(0, -1), promptWithSubskills, defaultPrompt[defaultPrompt.length - 1]];
|
package/src/task/index.ts
CHANGED
|
@@ -1311,6 +1311,7 @@ export class TaskTool implements AgentTool<TaskToolSchemaInstance, TaskToolDetai
|
|
|
1311
1311
|
authStorage: this.session.authStorage,
|
|
1312
1312
|
modelRegistry: this.session.modelRegistry,
|
|
1313
1313
|
settings: this.session.settings,
|
|
1314
|
+
inheritedServiceTier: this.session.serviceTier,
|
|
1314
1315
|
contextFiles,
|
|
1315
1316
|
skills: availableSkills,
|
|
1316
1317
|
autoloadSkills: resolvedAutoloadSkills,
|
|
@@ -1372,6 +1373,7 @@ export class TaskTool implements AgentTool<TaskToolSchemaInstance, TaskToolDetai
|
|
|
1372
1373
|
authStorage: this.session.authStorage,
|
|
1373
1374
|
modelRegistry: this.session.modelRegistry,
|
|
1374
1375
|
settings: this.session.settings,
|
|
1376
|
+
inheritedServiceTier: this.session.serviceTier,
|
|
1375
1377
|
contextFiles,
|
|
1376
1378
|
skills: availableSkills,
|
|
1377
1379
|
autoloadSkills: resolvedAutoloadSkills,
|
package/src/tools/ask.ts
CHANGED
|
@@ -260,7 +260,11 @@ async function askSingleQuestion(
|
|
|
260
260
|
? "up/down navigate enter select ←/→ question esc cancel"
|
|
261
261
|
: "up/down navigate enter select esc cancel";
|
|
262
262
|
const helpText =
|
|
263
|
-
scrollTitleRows === undefined
|
|
263
|
+
scrollTitleRows === undefined
|
|
264
|
+
? baseHelpText
|
|
265
|
+
: navigation
|
|
266
|
+
? "↑/↓ select enter ←/→ question esc PgUp/PgDn/Ctrl+u/d: question · Wheel: transcript"
|
|
267
|
+
: "↑/↓ select enter esc PgUp/PgDn/Ctrl+u/d: question · Wheel: transcript";
|
|
264
268
|
const dialogOptions = {
|
|
265
269
|
initialIndex,
|
|
266
270
|
timeout,
|
package/src/tools/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentTelemetryConfig, AgentTool } from "@gajae-code/agent-core";
|
|
2
|
-
import type { Model, ToolChoice } from "@gajae-code/ai";
|
|
2
|
+
import type { Model, ServiceTier, ToolChoice } from "@gajae-code/ai";
|
|
3
3
|
import { $env, $flag, logger } from "@gajae-code/utils";
|
|
4
4
|
import type { PromptTemplate } from "../config/prompt-templates";
|
|
5
5
|
import type { Settings } from "../config/settings";
|
|
@@ -222,6 +222,8 @@ export interface ToolSession {
|
|
|
222
222
|
agentOutputManager?: AgentOutputManager;
|
|
223
223
|
/** Settings instance for passing to subagents */
|
|
224
224
|
settings: Settings;
|
|
225
|
+
/** Live service-tier intent of the parent session, inherited by `inherit` subagents. */
|
|
226
|
+
serviceTier?: ServiceTier;
|
|
225
227
|
/** Plan mode state (if active) */
|
|
226
228
|
getPlanModeState?: () => PlanModeState | undefined;
|
|
227
229
|
/** Goal mode state (if active or paused) */
|
package/src/utils/changelog.ts
CHANGED
|
@@ -92,6 +92,14 @@ export function getDisplayChangelogEntries(): ChangelogEntry[] {
|
|
|
92
92
|
return parseChangelogContent(CHANGELOG_TEXT);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
export function getInstalledVersionChangelogEntry(
|
|
96
|
+
entries: readonly ChangelogEntry[],
|
|
97
|
+
installedVersion: string,
|
|
98
|
+
): ChangelogEntry | undefined {
|
|
99
|
+
const [major = 0, minor = 0, patch = 0] = installedVersion.split(".").map(Number);
|
|
100
|
+
return entries.find(entry => entry.major === major && entry.minor === minor && entry.patch === patch) ?? entries[0];
|
|
101
|
+
}
|
|
102
|
+
|
|
95
103
|
/**
|
|
96
104
|
* Compare versions. Returns: -1 if v1 < v2, 0 if v1 === v2, 1 if v1 > v2
|
|
97
105
|
*/
|