@gajae-code/coding-agent 0.2.2 → 0.2.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 +45 -8600
- package/dist/types/cli/setup-cli.d.ts +1 -0
- package/dist/types/cli/update-cli.d.ts +3 -0
- package/dist/types/commands/deep-interview.d.ts +41 -0
- package/dist/types/commands/setup.d.ts +3 -0
- package/dist/types/config/settings-schema.d.ts +56 -0
- package/dist/types/defaults/gjc-defaults.d.ts +19 -6
- package/dist/types/discovery/helpers.d.ts +2 -0
- package/dist/types/extensibility/extensions/types.d.ts +6 -0
- package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +18 -0
- package/dist/types/hooks/skill-state.d.ts +5 -0
- package/dist/types/memories/index.d.ts +1 -1
- package/dist/types/memory-backend/local-backend.d.ts +3 -3
- package/dist/types/modes/components/hook-selector.d.ts +7 -0
- package/dist/types/modes/components/settings-selector.d.ts +3 -1
- package/dist/types/modes/controllers/selector-controller.d.ts +1 -0
- package/dist/types/modes/interactive-mode.d.ts +1 -0
- package/dist/types/modes/theme/defaults/index.d.ts +126 -0
- package/dist/types/modes/theme/theme.d.ts +5 -0
- package/dist/types/modes/types.d.ts +1 -0
- package/dist/types/modes/utils/context-usage.d.ts +6 -2
- package/dist/types/sdk.d.ts +6 -2
- package/dist/types/session/agent-session.d.ts +45 -1
- package/dist/types/session/session-manager.d.ts +3 -0
- package/dist/types/setup/model-onboarding-guidance.d.ts +1 -0
- package/dist/types/setup/provider-onboarding.d.ts +29 -5
- package/dist/types/skill-state/active-state.d.ts +26 -1
- package/dist/types/skill-state/deep-interview-mutation-guard.d.ts +1 -1
- package/dist/types/skill-state/initial-phase.d.ts +12 -0
- package/dist/types/task/executor.d.ts +2 -0
- package/dist/types/task/types.d.ts +11 -0
- package/dist/types/tools/index.d.ts +20 -1
- package/dist/types/tools/skill.d.ts +47 -0
- package/dist/types/utils/changelog.d.ts +18 -2
- package/package.json +7 -7
- package/src/cli/setup-cli.ts +26 -12
- package/src/cli/update-cli.ts +67 -16
- package/src/cli.ts +1 -0
- package/src/commands/deep-interview.ts +25 -2
- package/src/commands/setup.ts +2 -0
- package/src/commands/state.ts +1 -0
- package/src/config/settings-schema.ts +63 -0
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +58 -5
- package/src/defaults/gjc/skills/deep-interview/auto-answer-uncertain.md +37 -0
- package/src/defaults/gjc/skills/deep-interview/auto-research-greenfield.md +42 -0
- package/src/defaults/gjc/skills/ralplan/SKILL.md +8 -0
- package/src/defaults/gjc/skills/team/SKILL.md +10 -0
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +19 -6
- package/src/defaults/gjc-defaults.ts +68 -16
- package/src/discovery/helpers.ts +24 -1
- package/src/extensibility/extensions/types.ts +6 -0
- package/src/gjc-runtime/deep-interview-runtime.ts +312 -1
- package/src/gjc-runtime/state-runtime.ts +175 -5
- package/src/goals/tools/goal-tool.ts +5 -1
- package/src/hooks/skill-state.ts +8 -6
- package/src/internal-urls/docs-index.generated.ts +6 -4
- package/src/internal-urls/memory-protocol.ts +3 -2
- package/src/main.ts +2 -3
- package/src/memories/index.ts +6 -4
- package/src/memory-backend/local-backend.ts +14 -6
- package/src/modes/components/hook-selector.ts +156 -1
- package/src/modes/components/settings-selector.ts +16 -12
- package/src/modes/controllers/command-controller.ts +3 -4
- package/src/modes/controllers/extension-ui-controller.ts +1 -0
- package/src/modes/controllers/selector-controller.ts +69 -9
- package/src/modes/interactive-mode.ts +14 -1
- package/src/modes/theme/defaults/blue-crab.json +126 -0
- package/src/modes/theme/defaults/index.ts +2 -0
- package/src/modes/theme/theme.ts +40 -1
- package/src/modes/types.ts +1 -0
- package/src/modes/utils/context-usage.ts +66 -17
- package/src/prompts/agents/architect.md +3 -0
- package/src/prompts/agents/executor.md +2 -0
- package/src/prompts/agents/frontmatter.md +1 -0
- package/src/prompts/memories/unavailable.md +9 -0
- package/src/prompts/system/subagent-system-prompt.md +6 -0
- package/src/prompts/tools/skill.md +28 -0
- package/src/prompts/tools/task.md +3 -0
- package/src/sdk.ts +54 -10
- package/src/session/agent-session.ts +204 -21
- package/src/session/session-manager.ts +9 -1
- package/src/setup/model-onboarding-guidance.ts +6 -3
- package/src/setup/provider-onboarding.ts +177 -16
- package/src/skill-state/active-state.ts +150 -25
- package/src/skill-state/deep-interview-mutation-guard.ts +11 -24
- package/src/skill-state/initial-phase.ts +17 -0
- package/src/slash-commands/builtin-registry.ts +62 -14
- package/src/slash-commands/helpers/context-report.ts +123 -13
- package/src/task/agents.ts +1 -0
- package/src/task/executor.ts +9 -1
- package/src/task/index.ts +91 -4
- package/src/task/types.ts +6 -0
- package/src/tools/ask.ts +2 -0
- package/src/tools/index.ts +23 -1
- package/src/tools/skill.ts +153 -0
- package/src/utils/changelog.ts +67 -44
|
@@ -21,6 +21,9 @@ export declare function parseUpdateArgs(args: string[]): {
|
|
|
21
21
|
check: boolean;
|
|
22
22
|
} | undefined;
|
|
23
23
|
export declare function resolveUpdateMethodForTest(ompPath: string, bunBinDir: string | undefined): "bun" | "binary";
|
|
24
|
+
export declare function formatBinaryDownloadFailureMessageForTest(binaryName: string, url: string, status: string | number, platform?: NodeJS.Platform): string;
|
|
25
|
+
export declare function buildReleaseBinaryUrlForTest(version: string, platform?: NodeJS.Platform, arch?: string): string;
|
|
26
|
+
export declare function formatManualUpdateInstructionsForTest(platform?: NodeJS.Platform): string;
|
|
24
27
|
/**
|
|
25
28
|
* Atomically replace the installed binary and roll back if version verification fails.
|
|
26
29
|
*/
|
|
@@ -2,6 +2,47 @@ import { Command } from "@gajae-code/utils/cli";
|
|
|
2
2
|
export default class DeepInterview extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static strict: boolean;
|
|
5
|
+
static flags: {
|
|
6
|
+
quick: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
standard: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
deep: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
threshold: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
"threshold-source": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
"session-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
write: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
stage: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
slug: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
spec: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
handoff: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
deliberate: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
5
46
|
static examples: string[];
|
|
6
47
|
run(): Promise<void>;
|
|
7
48
|
}
|
|
@@ -24,6 +24,9 @@ export default class Setup extends Command {
|
|
|
24
24
|
json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
25
25
|
description: string;
|
|
26
26
|
};
|
|
27
|
+
preset: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
27
30
|
compat: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
28
31
|
description: string;
|
|
29
32
|
};
|
|
@@ -982,6 +982,24 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
982
982
|
readonly description: "Maximum wait between retries, in ms. When the provider asks us to wait longer than this and no credential or model fallback succeeds, the request fails fast instead of sleeping (e.g. 3-hour Anthropic rate-limit windows).";
|
|
983
983
|
};
|
|
984
984
|
};
|
|
985
|
+
readonly "retry.requestMaxRetries": {
|
|
986
|
+
readonly type: "number";
|
|
987
|
+
readonly default: 5;
|
|
988
|
+
readonly ui: {
|
|
989
|
+
readonly tab: "model";
|
|
990
|
+
readonly label: "Provider Request Retries";
|
|
991
|
+
readonly description: "Maximum provider request retries before a stream is established. Counts retries, not the first attempt. Set to 0 to disable provider request retries.";
|
|
992
|
+
};
|
|
993
|
+
};
|
|
994
|
+
readonly "retry.streamMaxRetries": {
|
|
995
|
+
readonly type: "number";
|
|
996
|
+
readonly default: 5;
|
|
997
|
+
readonly ui: {
|
|
998
|
+
readonly tab: "model";
|
|
999
|
+
readonly label: "Provider Stream Retries";
|
|
1000
|
+
readonly description: "Maximum provider stream replay retries for replay-safe transient stream failures. Counts retries, not the first attempt. Set to 0 to disable provider stream retries.";
|
|
1001
|
+
};
|
|
1002
|
+
};
|
|
985
1003
|
readonly "retry.fallbackChains": {
|
|
986
1004
|
readonly type: "record";
|
|
987
1005
|
readonly default: Record<string, string[]>;
|
|
@@ -2295,6 +2313,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2295
2313
|
readonly description: "Enable the checkpoint and rewind tools for context checkpointing";
|
|
2296
2314
|
};
|
|
2297
2315
|
};
|
|
2316
|
+
readonly "skill.enabled": {
|
|
2317
|
+
readonly type: "boolean";
|
|
2318
|
+
readonly default: true;
|
|
2319
|
+
readonly ui: {
|
|
2320
|
+
readonly tab: "tools";
|
|
2321
|
+
readonly label: "Skill";
|
|
2322
|
+
readonly description: "Enable the skill tool so the agent can chain into another available skill on its next turn";
|
|
2323
|
+
};
|
|
2324
|
+
};
|
|
2298
2325
|
readonly "fetch.enabled": {
|
|
2299
2326
|
readonly type: "boolean";
|
|
2300
2327
|
readonly default: true;
|
|
@@ -2705,6 +2732,33 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2705
2732
|
readonly description: "Allow subagents spawned via the task tool to use the lsp tool. Off by default to keep subagents cheap; enable when LSP-aware delegation is worth the extra tokens.";
|
|
2706
2733
|
};
|
|
2707
2734
|
};
|
|
2735
|
+
readonly "task.forkContext.enabled": {
|
|
2736
|
+
readonly type: "boolean";
|
|
2737
|
+
readonly default: false;
|
|
2738
|
+
readonly ui: {
|
|
2739
|
+
readonly tab: "tasks";
|
|
2740
|
+
readonly label: "Fork Context for Subagents";
|
|
2741
|
+
readonly description: "Allow explicitly opted-in subagents to start from a sanitized snapshot of parent context when both the agent and task item also opt in.";
|
|
2742
|
+
};
|
|
2743
|
+
};
|
|
2744
|
+
readonly "task.forkContext.maxMessages": {
|
|
2745
|
+
readonly type: "number";
|
|
2746
|
+
readonly default: 50;
|
|
2747
|
+
readonly ui: {
|
|
2748
|
+
readonly tab: "tasks";
|
|
2749
|
+
readonly label: "Fork Context Max Messages";
|
|
2750
|
+
readonly description: "Maximum parent messages copied into an explicitly opted-in subagent fork-context seed.";
|
|
2751
|
+
};
|
|
2752
|
+
};
|
|
2753
|
+
readonly "task.forkContext.maxTokens": {
|
|
2754
|
+
readonly type: "number";
|
|
2755
|
+
readonly default: 0;
|
|
2756
|
+
readonly ui: {
|
|
2757
|
+
readonly tab: "tasks";
|
|
2758
|
+
readonly label: "Fork Context Max Tokens";
|
|
2759
|
+
readonly description: "Approximate token cap for fork-context seeds. 0 uses 25% of the target model context window.";
|
|
2760
|
+
};
|
|
2761
|
+
};
|
|
2708
2762
|
readonly "task.maxRecursionDepth": {
|
|
2709
2763
|
readonly type: "number";
|
|
2710
2764
|
readonly default: 2;
|
|
@@ -3204,6 +3258,8 @@ export interface RetrySettings {
|
|
|
3204
3258
|
maxRetries: number;
|
|
3205
3259
|
baseDelayMs: number;
|
|
3206
3260
|
maxDelayMs: number;
|
|
3261
|
+
requestMaxRetries: number;
|
|
3262
|
+
streamMaxRetries: number;
|
|
3207
3263
|
}
|
|
3208
3264
|
export interface MemoriesSettings {
|
|
3209
3265
|
enabled: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const DEFAULT_GJC_DEFINITION_NAMES: readonly ["deep-interview", "ralplan", "team", "ultragoal"];
|
|
2
2
|
export type DefaultGjcDefinitionName = (typeof DEFAULT_GJC_DEFINITION_NAMES)[number];
|
|
3
|
-
export type DefaultGjcDefinitionKind = "skill";
|
|
3
|
+
export type DefaultGjcDefinitionKind = "skill" | "skill-fragment";
|
|
4
4
|
export type EmbeddedDefaultGjcSkill = {
|
|
5
5
|
name: DefaultGjcDefinitionName;
|
|
6
6
|
description: string;
|
|
@@ -11,23 +11,35 @@ export type EmbeddedDefaultGjcSkill = {
|
|
|
11
11
|
content: string;
|
|
12
12
|
};
|
|
13
13
|
export type DefaultGjcInstallStatus = "different" | "matching" | "missing" | "skipped" | "written";
|
|
14
|
-
export interface
|
|
15
|
-
kind:
|
|
14
|
+
export interface DefaultGjcSkillDefinition {
|
|
15
|
+
kind: "skill";
|
|
16
16
|
name: DefaultGjcDefinitionName;
|
|
17
17
|
relativePath: string;
|
|
18
18
|
content: string;
|
|
19
19
|
}
|
|
20
|
+
export interface DefaultGjcSkillFragmentDefinition {
|
|
21
|
+
kind: "skill-fragment";
|
|
22
|
+
parentSkillName: DefaultGjcDefinitionName;
|
|
23
|
+
relativePath: string;
|
|
24
|
+
content: string;
|
|
25
|
+
}
|
|
26
|
+
export type DefaultGjcDefinition = DefaultGjcSkillDefinition | DefaultGjcSkillFragmentDefinition;
|
|
20
27
|
export interface InstallDefaultGjcDefinitionsOptions {
|
|
21
28
|
check?: boolean;
|
|
22
29
|
force?: boolean;
|
|
23
30
|
targetRoot?: string;
|
|
24
31
|
}
|
|
25
|
-
export
|
|
26
|
-
kind:
|
|
32
|
+
export type DefaultGjcDefinitionInstallFile = {
|
|
33
|
+
kind: "skill";
|
|
27
34
|
name: DefaultGjcDefinitionName;
|
|
28
35
|
path: string;
|
|
29
36
|
status: DefaultGjcInstallStatus;
|
|
30
|
-
}
|
|
37
|
+
} | {
|
|
38
|
+
kind: "skill-fragment";
|
|
39
|
+
parentSkillName: DefaultGjcDefinitionName;
|
|
40
|
+
path: string;
|
|
41
|
+
status: DefaultGjcInstallStatus;
|
|
42
|
+
};
|
|
31
43
|
export interface DefaultGjcDefinitionInstallResult {
|
|
32
44
|
targetRoot: string;
|
|
33
45
|
total: number;
|
|
@@ -40,5 +52,6 @@ export interface DefaultGjcDefinitionInstallResult {
|
|
|
40
52
|
}
|
|
41
53
|
export declare function getDefaultGjcDefinitions(): readonly DefaultGjcDefinition[];
|
|
42
54
|
export declare function getDefaultGjcAgentDefinitions(): readonly DefaultGjcDefinition[];
|
|
55
|
+
export declare function getEmbeddedDefaultGjcSkillFragments(parentSkillName: DefaultGjcDefinitionName): DefaultGjcSkillFragmentDefinition[];
|
|
43
56
|
export declare function getEmbeddedDefaultGjcSkills(): EmbeddedDefaultGjcSkill[];
|
|
44
57
|
export declare function installDefaultGjcDefinitions(options?: InstallDefaultGjcDefinitionsOptions): Promise<DefaultGjcDefinitionInstallResult>;
|
|
@@ -3,6 +3,7 @@ import type { ExtensionModule } from "../capability/extension-module";
|
|
|
3
3
|
import { type Rule } from "../capability/rule";
|
|
4
4
|
import type { Skill } from "../capability/skill";
|
|
5
5
|
import type { LoadContext, LoadResult, SourceMeta } from "../capability/types";
|
|
6
|
+
import type { ForkContextPolicy } from "../task/types";
|
|
6
7
|
/**
|
|
7
8
|
* Standard paths for each config source.
|
|
8
9
|
*/
|
|
@@ -104,6 +105,7 @@ export interface ParsedAgentFields {
|
|
|
104
105
|
autoloadSkills?: string[];
|
|
105
106
|
blocking?: boolean;
|
|
106
107
|
hide?: boolean;
|
|
108
|
+
forkContext?: ForkContextPolicy;
|
|
107
109
|
}
|
|
108
110
|
/**
|
|
109
111
|
* Parse agent fields from frontmatter.
|
|
@@ -50,6 +50,12 @@ export interface ExtensionUIDialogOptions {
|
|
|
50
50
|
onExternalEditor?: () => void;
|
|
51
51
|
/** Optional footer hint text rendered by interactive selector */
|
|
52
52
|
helpText?: string;
|
|
53
|
+
/**
|
|
54
|
+
* For interactive TUI select dialogs, render the focused option across
|
|
55
|
+
* multiple rows instead of truncating it. This is a select-only rendering
|
|
56
|
+
* hint; non-TUI bridges (RPC, ACP) drop it and do not serialize it.
|
|
57
|
+
*/
|
|
58
|
+
wrapFocused?: boolean;
|
|
53
59
|
}
|
|
54
60
|
/** Raw terminal input listener for extensions. */
|
|
55
61
|
export type TerminalInputHandler = (data: string) => {
|
|
@@ -12,4 +12,22 @@ export interface DeepInterviewCommandResult {
|
|
|
12
12
|
stdout?: string;
|
|
13
13
|
stderr?: string;
|
|
14
14
|
}
|
|
15
|
+
export interface ResolvedDeepInterviewSpecWriteArgs {
|
|
16
|
+
stage: "final";
|
|
17
|
+
slug: string;
|
|
18
|
+
spec: string;
|
|
19
|
+
sessionId?: string;
|
|
20
|
+
json: boolean;
|
|
21
|
+
deliberate: boolean;
|
|
22
|
+
handoff?: "ralplan";
|
|
23
|
+
}
|
|
24
|
+
export interface PersistedDeepInterviewSpec {
|
|
25
|
+
slug: string;
|
|
26
|
+
path: string;
|
|
27
|
+
stage: "final";
|
|
28
|
+
sha256: string;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
statePath: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function persistDeepInterviewSpec(cwd: string, resolved: ResolvedDeepInterviewSpecWriteArgs): Promise<PersistedDeepInterviewSpec>;
|
|
15
33
|
export declare function runNativeDeepInterviewCommand(args: string[], cwd?: string): Promise<DeepInterviewCommandResult>;
|
|
@@ -50,6 +50,9 @@ export interface ModeState {
|
|
|
50
50
|
thread_id?: string;
|
|
51
51
|
cwd?: string;
|
|
52
52
|
updated_at?: string;
|
|
53
|
+
handoff_from?: string;
|
|
54
|
+
handoff_to?: string;
|
|
55
|
+
handoff_at?: string;
|
|
53
56
|
[key: string]: unknown;
|
|
54
57
|
}
|
|
55
58
|
export interface RecordSkillActivationInput {
|
|
@@ -79,6 +82,8 @@ export interface UserPromptSubmitStateInput {
|
|
|
79
82
|
export declare function detectSkillKeywords(text: string): SkillKeywordMatch[];
|
|
80
83
|
export declare function detectPrimarySkillKeyword(text: string): SkillKeywordMatch | null;
|
|
81
84
|
export declare function resolveGjcStateDir(cwd: string, stateDir?: string): string;
|
|
85
|
+
import { initialPhaseForSkill } from "../skill-state/initial-phase";
|
|
86
|
+
export { initialPhaseForSkill };
|
|
82
87
|
export declare function readVisibleSkillActiveState(cwd: string, sessionId?: string, stateDir?: string): Promise<SkillActiveState | null>;
|
|
83
88
|
export declare function recordSkillActivation(input: RecordSkillActivationInput): Promise<SkillActiveState | null>;
|
|
84
89
|
export declare function buildActiveUltragoalPromptContext(input: UserPromptSubmitStateInput): Promise<string | null>;
|
|
@@ -16,7 +16,7 @@ export declare function startMemoryStartupTask(options: {
|
|
|
16
16
|
/**
|
|
17
17
|
* Build memory usage instructions for prompt injection.
|
|
18
18
|
*/
|
|
19
|
-
export declare function buildMemoryToolDeveloperInstructions(agentDir: string, settings: Settings): Promise<string | undefined>;
|
|
19
|
+
export declare function buildMemoryToolDeveloperInstructions(agentDir: string, settings: Settings, session?: AgentSession): Promise<string | undefined>;
|
|
20
20
|
/**
|
|
21
21
|
* Clear all persisted memory state and generated artifacts.
|
|
22
22
|
*/
|
|
@@ -2,8 +2,8 @@ import type { MemoryBackend } from "./types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Wraps the existing `memories/` module as a `MemoryBackend`.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* The local pipeline owns rollout summarisation, SQLite retention, and
|
|
6
|
+
* `memory_summary.md`. Prompt reads use the live session cwd when available so
|
|
7
|
+
* manual enqueue/rebuild and startup hydration address the same memory root.
|
|
8
8
|
*/
|
|
9
9
|
export declare const localBackend: MemoryBackend;
|
|
@@ -14,6 +14,13 @@ export interface HookSelectorOptions {
|
|
|
14
14
|
onRight?: () => void;
|
|
15
15
|
onExternalEditor?: () => void;
|
|
16
16
|
helpText?: string;
|
|
17
|
+
/**
|
|
18
|
+
* When true, the focused option's label wraps across multiple rows so the
|
|
19
|
+
* full text is visible. Non-focused options remain single-row with the
|
|
20
|
+
* existing `…` truncation hint. When unset/false, rendering is
|
|
21
|
+
* byte-identical to the previous implementation for all consumers.
|
|
22
|
+
*/
|
|
23
|
+
wrapFocused?: boolean;
|
|
17
24
|
}
|
|
18
25
|
export declare class HookSelectorComponent extends Container {
|
|
19
26
|
#private;
|
|
@@ -29,8 +29,10 @@ export interface StatusLinePreviewSettings {
|
|
|
29
29
|
export interface SettingsCallbacks {
|
|
30
30
|
/** Called when any setting value changes */
|
|
31
31
|
onChange: (path: SettingPath, newValue: unknown) => void;
|
|
32
|
-
/** Called for theme preview while browsing */
|
|
32
|
+
/** Called for theme preview while browsing theme settings */
|
|
33
33
|
onThemePreview?: (theme: string) => void | Promise<void>;
|
|
34
|
+
/** Called to restore the rendered theme when theme settings preview is cancelled */
|
|
35
|
+
onThemePreviewCancel?: (theme: string) => void | Promise<void>;
|
|
34
36
|
/** Called for status line preview while configuring */
|
|
35
37
|
onStatusLinePreview?: (settings: StatusLinePreviewSettings) => void;
|
|
36
38
|
/** Get current rendered status line for inline preview */
|
|
@@ -200,6 +200,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
200
200
|
executeCompaction(customInstructionsOrOptions?: string | CompactOptions, isAuto?: boolean): Promise<CompactionOutcome>;
|
|
201
201
|
openInBrowser(urlOrPath: string): void;
|
|
202
202
|
showSettingsSelector(): void;
|
|
203
|
+
showThemeSelector(): void;
|
|
203
204
|
showHistorySearch(): void;
|
|
204
205
|
showExtensionsDashboard(): void;
|
|
205
206
|
showAgentsDashboard(): void;
|
|
@@ -467,6 +467,132 @@ export declare const defaultThemes: {
|
|
|
467
467
|
"infoBg": string;
|
|
468
468
|
};
|
|
469
469
|
};
|
|
470
|
+
"blue-crab": {
|
|
471
|
+
$schema: string;
|
|
472
|
+
name: string;
|
|
473
|
+
vars: {
|
|
474
|
+
"cyan": string;
|
|
475
|
+
"blue": string;
|
|
476
|
+
"green": string;
|
|
477
|
+
"red": string;
|
|
478
|
+
"yellow": string;
|
|
479
|
+
"gray": string;
|
|
480
|
+
"dimGray": string;
|
|
481
|
+
"darkGray": string;
|
|
482
|
+
"accent": string;
|
|
483
|
+
"selectedBg": string;
|
|
484
|
+
"userMsgBg": string;
|
|
485
|
+
"toolPendingBg": string;
|
|
486
|
+
"toolSuccessBg": string;
|
|
487
|
+
"toolErrorBg": string;
|
|
488
|
+
"customMsgBg": string;
|
|
489
|
+
"abyss": string;
|
|
490
|
+
"deepNavy": string;
|
|
491
|
+
"crabShell": string;
|
|
492
|
+
"claw": string;
|
|
493
|
+
"ocean": string;
|
|
494
|
+
"azure": string;
|
|
495
|
+
"seafoam": string;
|
|
496
|
+
"kelp": string;
|
|
497
|
+
"sand": string;
|
|
498
|
+
"coral": string;
|
|
499
|
+
"ink": string;
|
|
500
|
+
"mantle": string;
|
|
501
|
+
"surface": string;
|
|
502
|
+
"surfaceBright": string;
|
|
503
|
+
"foam": string;
|
|
504
|
+
"mutedShell": string;
|
|
505
|
+
"dimShell": string;
|
|
506
|
+
"brandBlue": string;
|
|
507
|
+
"shell": string;
|
|
508
|
+
"dangerRed": string;
|
|
509
|
+
"warningAmber": string;
|
|
510
|
+
"diffRemovalRed": string;
|
|
511
|
+
};
|
|
512
|
+
colors: {
|
|
513
|
+
"accent": string;
|
|
514
|
+
"border": string;
|
|
515
|
+
"borderAccent": string;
|
|
516
|
+
"borderMuted": string;
|
|
517
|
+
"success": string;
|
|
518
|
+
"error": string;
|
|
519
|
+
"warning": string;
|
|
520
|
+
"muted": string;
|
|
521
|
+
"dim": string;
|
|
522
|
+
"text": string;
|
|
523
|
+
"thinkingText": string;
|
|
524
|
+
"selectedBg": string;
|
|
525
|
+
"userMessageBg": string;
|
|
526
|
+
"userMessageText": string;
|
|
527
|
+
"customMessageBg": string;
|
|
528
|
+
"customMessageText": string;
|
|
529
|
+
"customMessageLabel": string;
|
|
530
|
+
"toolPendingBg": string;
|
|
531
|
+
"toolSuccessBg": string;
|
|
532
|
+
"toolErrorBg": string;
|
|
533
|
+
"toolTitle": string;
|
|
534
|
+
"toolOutput": string;
|
|
535
|
+
"mdHeading": string;
|
|
536
|
+
"mdLink": string;
|
|
537
|
+
"mdLinkUrl": string;
|
|
538
|
+
"mdCode": string;
|
|
539
|
+
"mdCodeBlock": string;
|
|
540
|
+
"mdCodeBlockBorder": string;
|
|
541
|
+
"mdQuote": string;
|
|
542
|
+
"mdQuoteBorder": string;
|
|
543
|
+
"mdHr": string;
|
|
544
|
+
"mdListBullet": string;
|
|
545
|
+
"toolDiffAdded": string;
|
|
546
|
+
"toolDiffRemoved": string;
|
|
547
|
+
"toolDiffContext": string;
|
|
548
|
+
"link": string;
|
|
549
|
+
"syntaxComment": string;
|
|
550
|
+
"syntaxKeyword": string;
|
|
551
|
+
"syntaxFunction": string;
|
|
552
|
+
"syntaxVariable": string;
|
|
553
|
+
"syntaxString": string;
|
|
554
|
+
"syntaxNumber": string;
|
|
555
|
+
"syntaxType": string;
|
|
556
|
+
"syntaxOperator": string;
|
|
557
|
+
"syntaxPunctuation": string;
|
|
558
|
+
"thinkingOff": string;
|
|
559
|
+
"thinkingMinimal": string;
|
|
560
|
+
"thinkingLow": string;
|
|
561
|
+
"thinkingMedium": string;
|
|
562
|
+
"thinkingHigh": string;
|
|
563
|
+
"thinkingXhigh": string;
|
|
564
|
+
"bashMode": string;
|
|
565
|
+
"statusLineBg": string;
|
|
566
|
+
"statusLineSep": string;
|
|
567
|
+
"statusLineModel": string;
|
|
568
|
+
"statusLinePath": string;
|
|
569
|
+
"statusLineGitClean": string;
|
|
570
|
+
"statusLineGitDirty": string;
|
|
571
|
+
"statusLineContext": string;
|
|
572
|
+
"statusLineSpend": string;
|
|
573
|
+
"statusLineStaged": string;
|
|
574
|
+
"statusLineDirty": string;
|
|
575
|
+
"statusLineUntracked": string;
|
|
576
|
+
"statusLineOutput": string;
|
|
577
|
+
"statusLineCost": string;
|
|
578
|
+
"statusLineSubagents": string;
|
|
579
|
+
"pythonMode": string;
|
|
580
|
+
};
|
|
581
|
+
export: {
|
|
582
|
+
"pageBg": string;
|
|
583
|
+
"cardBg": string;
|
|
584
|
+
"infoBg": string;
|
|
585
|
+
};
|
|
586
|
+
symbols: {
|
|
587
|
+
"preset": string;
|
|
588
|
+
"overrides": {
|
|
589
|
+
"icon.pi": string;
|
|
590
|
+
"icon.agents": string;
|
|
591
|
+
"status.running": string;
|
|
592
|
+
"md.bullet": string;
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
};
|
|
470
596
|
"dark-abyss": {
|
|
471
597
|
$schema: string;
|
|
472
598
|
name: string;
|
|
@@ -186,6 +186,7 @@ export interface ThemeInfo {
|
|
|
186
186
|
}
|
|
187
187
|
export declare function getAvailableThemesWithPaths(): Promise<ThemeInfo[]>;
|
|
188
188
|
export declare function getThemeByName(name: string): Promise<Theme | undefined>;
|
|
189
|
+
export declare function getDetectedThemeSettingsPath(): "theme.dark" | "theme.light";
|
|
189
190
|
export declare var theme: Theme;
|
|
190
191
|
/** Get the name of the currently active theme. */
|
|
191
192
|
export declare function getCurrentThemeName(): string | undefined;
|
|
@@ -198,6 +199,10 @@ export declare function previewTheme(name: string): Promise<{
|
|
|
198
199
|
success: boolean;
|
|
199
200
|
error?: string;
|
|
200
201
|
}>;
|
|
202
|
+
export declare function restoreThemePreview(name: string): Promise<{
|
|
203
|
+
success: boolean;
|
|
204
|
+
error?: string;
|
|
205
|
+
}>;
|
|
201
206
|
/**
|
|
202
207
|
* Enable auto-detection mode, switching to the appropriate dark/light theme.
|
|
203
208
|
*/
|
|
@@ -208,6 +208,7 @@ export interface InteractiveModeContext {
|
|
|
208
208
|
openInBrowser(urlOrPath: string): void;
|
|
209
209
|
refreshSlashCommandState(cwd?: string): Promise<void>;
|
|
210
210
|
showSettingsSelector(): void;
|
|
211
|
+
showThemeSelector(): void;
|
|
211
212
|
showHistorySearch(): void;
|
|
212
213
|
showExtensionsDashboard(): void;
|
|
213
214
|
showAgentsDashboard(): void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { AgentMessage } from "@gajae-code/agent-core";
|
|
1
2
|
import type { Model } from "@gajae-code/ai";
|
|
2
3
|
import type { Skill } from "../../extensibility/skills";
|
|
3
4
|
import type { AgentSession } from "../../session/agent-session";
|
|
4
5
|
import type { Tool } from "../../tools";
|
|
5
6
|
import type { theme as Theme } from "../theme/theme";
|
|
6
|
-
type CategoryId = "systemPrompt" | "systemContext" | "
|
|
7
|
+
type CategoryId = "systemPrompt" | "systemContext" | "rules" | "tools" | "skills" | "messages" | "lastUserTurn";
|
|
7
8
|
interface CategoryInfo {
|
|
8
9
|
id: CategoryId;
|
|
9
10
|
label: string;
|
|
@@ -15,6 +16,7 @@ export interface ContextBreakdown {
|
|
|
15
16
|
model: Model | undefined;
|
|
16
17
|
contextWindow: number;
|
|
17
18
|
categories: CategoryInfo[];
|
|
19
|
+
lastUserTurnTokens: number;
|
|
18
20
|
usedTokens: number;
|
|
19
21
|
autoCompactBufferTokens: number;
|
|
20
22
|
freeTokens: number;
|
|
@@ -38,7 +40,9 @@ export declare function computeNonMessageTokens(session: AgentSession): number;
|
|
|
38
40
|
* Compute a breakdown of estimated context usage by category for the active
|
|
39
41
|
* session and model.
|
|
40
42
|
*/
|
|
41
|
-
export declare function computeContextBreakdown(session: AgentSession
|
|
43
|
+
export declare function computeContextBreakdown(session: AgentSession, options?: {
|
|
44
|
+
messages?: readonly AgentMessage[];
|
|
45
|
+
}): ContextBreakdown;
|
|
42
46
|
/**
|
|
43
47
|
* Render a colorful context-usage panel as ANSI text. Output is a series of
|
|
44
48
|
* lines pairing the grid (left) with the legend (right).
|
package/dist/types/sdk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AgentTelemetryConfig, type ThinkingLevel } from "@gajae-code/agent-core";
|
|
2
|
-
import { type Model } from "@gajae-code/ai";
|
|
2
|
+
import { type Model, type ProviderSessionState } from "@gajae-code/ai";
|
|
3
3
|
import { type Rule } from "./capability/rule";
|
|
4
4
|
import { ModelRegistry } from "./config/model-registry";
|
|
5
5
|
import { type ScopedModelSelection } from "./config/model-resolver";
|
|
@@ -15,7 +15,7 @@ import type { HindsightSessionState } from "./hindsight/state";
|
|
|
15
15
|
import { type LocalProtocolOptions } from "./internal-urls";
|
|
16
16
|
import { AgentRegistry } from "./registry/agent-registry";
|
|
17
17
|
import { MCPManager } from "./runtime-mcp";
|
|
18
|
-
import { AgentSession } from "./session/agent-session";
|
|
18
|
+
import { AgentSession, type ForkContextSeed } from "./session/agent-session";
|
|
19
19
|
import { AuthStorage } from "./session/auth-storage";
|
|
20
20
|
import { SessionManager } from "./session/session-manager";
|
|
21
21
|
import { type BuildSystemPromptResult } from "./system-prompt";
|
|
@@ -121,6 +121,10 @@ export interface CreateAgentSessionOptions {
|
|
|
121
121
|
* `@opentelemetry/api` package returns a no-op tracer in that case.
|
|
122
122
|
*/
|
|
123
123
|
telemetry?: AgentTelemetryConfig;
|
|
124
|
+
/** Optional fork-context seed used to initialize a child session before its first prompt. */
|
|
125
|
+
forkContextSeed?: ForkContextSeed;
|
|
126
|
+
/** Optional provider state override. Fork-context children should omit this by default. */
|
|
127
|
+
providerSessionState?: Map<string, ProviderSessionState>;
|
|
124
128
|
}
|
|
125
129
|
/** Result from createAgentSession */
|
|
126
130
|
export interface CreateAgentSessionResult {
|