@gajae-code/coding-agent 0.2.1 → 0.2.2
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 +31 -1
- package/dist/types/commands/contribution-prep.d.ts +18 -0
- package/dist/types/commands/session.d.ts +24 -0
- package/dist/types/config/model-registry.d.ts +2 -2
- package/dist/types/config/models-config-schema.d.ts +17 -9
- package/dist/types/config/settings-schema.d.ts +1 -24
- package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +15 -0
- package/dist/types/gjc-runtime/goal-mode-request.d.ts +1 -1
- package/dist/types/gjc-runtime/launch-tmux.d.ts +12 -11
- package/dist/types/gjc-runtime/ralplan-runtime.d.ts +25 -0
- package/dist/types/gjc-runtime/state-runtime.d.ts +13 -0
- package/dist/types/gjc-runtime/team-runtime.d.ts +37 -5
- package/dist/types/gjc-runtime/tmux-common.d.ts +41 -0
- package/dist/types/gjc-runtime/tmux-sessions.d.ts +17 -0
- package/dist/types/goals/runtime.d.ts +3 -9
- package/dist/types/goals/state.d.ts +3 -6
- package/dist/types/goals/tools/goal-tool.d.ts +1 -69
- package/dist/types/modes/components/status-line/types.d.ts +0 -3
- package/dist/types/modes/components/status-line.d.ts +0 -3
- package/dist/types/modes/controllers/command-controller.d.ts +1 -0
- package/dist/types/modes/interactive-mode.d.ts +1 -12
- package/dist/types/modes/theme/defaults/index.d.ts +0 -2
- package/dist/types/modes/theme/theme.d.ts +1 -2
- package/dist/types/modes/types.d.ts +1 -7
- package/dist/types/session/agent-session.d.ts +2 -0
- package/dist/types/session/contribution-prep.d.ts +47 -0
- package/dist/types/skill-state/active-state.d.ts +4 -0
- package/dist/types/skill-state/deep-interview-mutation-guard.d.ts +6 -1
- package/dist/types/skill-state/workflow-hud.d.ts +9 -4
- package/dist/types/skill-state/workflow-state-contract.d.ts +34 -0
- package/package.json +7 -7
- package/src/cli/args.ts +3 -2
- package/src/cli.ts +6 -1
- package/src/commands/contribution-prep.ts +41 -0
- package/src/commands/deep-interview.ts +6 -22
- package/src/commands/launch.ts +10 -1
- package/src/commands/ralplan.ts +10 -22
- package/src/commands/session.ts +150 -0
- package/src/commands/state.ts +14 -4
- package/src/commands/team.ts +23 -3
- package/src/config/model-registry.ts +10 -2
- package/src/config/models-config-schema.ts +120 -102
- package/src/config/settings-schema.ts +1 -25
- package/src/config.ts +1 -1
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +14 -13
- package/src/defaults/gjc/skills/ralplan/SKILL.md +14 -2
- package/src/defaults/gjc/skills/team/SKILL.md +29 -7
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +23 -25
- package/src/eval/py/prelude.py +1 -1
- package/src/gjc-runtime/deep-interview-runtime.ts +279 -0
- package/src/gjc-runtime/goal-mode-request.ts +2 -19
- package/src/gjc-runtime/launch-tmux.ts +83 -43
- package/src/gjc-runtime/ralplan-runtime.ts +460 -0
- package/src/gjc-runtime/state-runtime.ts +562 -0
- package/src/gjc-runtime/team-runtime.ts +708 -52
- package/src/gjc-runtime/tmux-common.ts +119 -0
- package/src/gjc-runtime/tmux-sessions.ts +165 -0
- package/src/gjc-runtime/ultragoal-guard.ts +6 -3
- package/src/gjc-runtime/ultragoal-runtime.ts +5 -4
- package/src/goals/runtime.ts +38 -144
- package/src/goals/state.ts +36 -7
- package/src/goals/tools/goal-tool.ts +15 -172
- package/src/hooks/skill-state.ts +31 -12
- package/src/internal-urls/docs-index.generated.ts +4 -3
- package/src/modes/components/skill-hud/render.ts +4 -0
- package/src/modes/components/status-line/segments.ts +5 -16
- package/src/modes/components/status-line/types.ts +0 -3
- package/src/modes/components/status-line.ts +0 -6
- package/src/modes/controllers/command-controller.ts +25 -1
- package/src/modes/controllers/input-controller.ts +0 -15
- package/src/modes/interactive-mode.ts +18 -219
- package/src/modes/theme/defaults/dark-poimandres.json +0 -1
- package/src/modes/theme/defaults/light-poimandres.json +0 -1
- package/src/modes/theme/theme.ts +0 -6
- package/src/modes/types.ts +1 -7
- package/src/prompts/goals/goal-continuation.md +1 -4
- package/src/prompts/goals/goal-mode-active.md +3 -5
- package/src/prompts/system/system-prompt.md +5 -7
- package/src/prompts/tools/goal.md +4 -4
- package/src/sdk.ts +1 -1
- package/src/session/agent-session.ts +18 -0
- package/src/session/contribution-prep.ts +320 -0
- package/src/skill-state/active-state.ts +38 -0
- package/src/skill-state/deep-interview-mutation-guard.ts +88 -24
- package/src/skill-state/workflow-hud.ts +23 -5
- package/src/skill-state/workflow-state-contract.ts +121 -0
- package/src/slash-commands/builtin-registry.ts +24 -12
- package/src/task/commands.ts +1 -5
- package/src/tools/gh.ts +212 -2
- package/src/tools/index.ts +2 -5
- package/dist/types/commands/gjc-runtime-bridge.d.ts +0 -30
- package/dist/types/commands/question.d.ts +0 -7
- package/dist/types/modes/loop-limit.d.ts +0 -22
- package/src/commands/gjc-runtime-bridge.ts +0 -227
- package/src/commands/question.ts +0 -12
- package/src/modes/loop-limit.ts +0 -140
- package/src/prompts/commands/orchestrate.md +0 -49
- package/src/prompts/goals/goal-budget-limit.md +0 -16
- package/src/prompts/tools/create-goal.md +0 -3
- package/src/prompts/tools/get-goal.md +0 -3
- package/src/prompts/tools/update-goal.md +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.2.2] - 2026-05-31
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added `gjc session` for listing, inspecting, removing, and attaching GJC-managed tmux sessions ([#105](https://github.com/Yeachan-Heo/gajae-code/pull/105)).
|
|
10
|
+
- Added a managed tmux session surface so `gjc --tmux` and `gjc team` reuse a scoped GJC session instead of mutating the global tmux environment.
|
|
11
|
+
- Added a detached contribution prep workflow surface ([#122](https://github.com/Yeachan-Heo/gajae-code/pull/122)).
|
|
12
|
+
- Added stricter `models.yml` validation and docs for OpenAI-compatible proxy providers, bridge-command requirements, and team dry-run state behavior ([#121](https://github.com/Yeachan-Heo/gajae-code/pull/121)).
|
|
13
|
+
- Added first-class Azure OpenAI and Amazon Bedrock providers ([#119](https://github.com/Yeachan-Heo/gajae-code/pull/119)).
|
|
14
|
+
- Added workflow state receipt routing so skill state writes emit a structured `WorkflowStateReceipt` envelope and sync skill-active HUD chips under `.gjc/state/skill-active-state.json` ([#118](https://github.com/Yeachan-Heo/gajae-code/pull/118)).
|
|
15
|
+
- Made `gjc state`, `gjc ralplan`, and `gjc deep-interview` work natively as documented in their SKILL.md files. `gjc state read|write|clear|contract` operates directly on `.gjc/state/` receipts (accepts `--input '<json>'` with `@file` shorthand, `--mode <skill>`, positional `<skill>`, `--session-id`, `--thread-id`, `--turn-id`, `--json`, `--replace`); writes emit a structured `WorkflowStateReceipt` envelope and sync skill-active HUD chips. `gjc ralplan` accepts the documented `--interactive`/`--deliberate`/`--architect`/`--critic` flags and the `--write --stage --stage_n --artifact` artifact persistence shape under `.gjc/plans/ralplan/<run-id>/`. `gjc deep-interview` accepts the documented `--quick`/`--standard`/`--deep` resolution flags ([#125](https://github.com/Yeachan-Heo/gajae-code/pull/125)).
|
|
16
|
+
- Added a GJC dogfood skill template ([#114](https://github.com/Yeachan-Heo/gajae-code/pull/114)).
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Changed `gjc --tmux` startup to create a fresh GJC-managed tmux session instead of attaching to an existing default session.
|
|
21
|
+
- Hardened team message delivery and worker enforcement ([#112](https://github.com/Yeachan-Heo/gajae-code/pull/112)).
|
|
22
|
+
- Hardened team worker startup and evidence invariants ([#123](https://github.com/Yeachan-Heo/gajae-code/pull/123)).
|
|
23
|
+
- Clarified team state while integration is pending ([#109](https://github.com/Yeachan-Heo/gajae-code/pull/109)).
|
|
24
|
+
- Removed goal mode budget semantics ([#106](https://github.com/Yeachan-Heo/gajae-code/pull/106)).
|
|
25
|
+
- Removed the unused `gjc question` CLI; the `ask` tool covers blocking-question prompts.
|
|
26
|
+
- Dropped the obsolete `loop` and `orchestrate` skills and pinned GJC skills in autocomplete ([#126](https://github.com/Yeachan-Heo/gajae-code/pull/126)).
|
|
27
|
+
- Enforced CLI-managed workflow artifacts so planning skills persist via `gjc state` and `gjc ralplan --write` instead of editing `.gjc/` files directly.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- Fixed Anthropic extended-thinking replay recovery after aborted turns ([#115](https://github.com/Yeachan-Heo/gajae-code/pull/115)).
|
|
32
|
+
- Fixed `gjc deep-interview` ambiguity threshold default so workflow gating matches the documented contract ([#116](https://github.com/Yeachan-Heo/gajae-code/pull/116)).
|
|
33
|
+
- Fixed duplicate PR creation in the team integration path ([#117](https://github.com/Yeachan-Heo/gajae-code/pull/117)).
|
|
34
|
+
- Fixed package asset resolution to prefer `GJC_PACKAGE_DIR` over the legacy `PI_PACKAGE_DIR`, preventing update-launch changelog displays from reading stale OMP package assets ([#111](https://github.com/Yeachan-Heo/gajae-code/pull/111)).
|
|
5
35
|
## [0.2.1] - 2026-05-30
|
|
6
36
|
|
|
7
37
|
### Fixed
|
|
@@ -89,7 +119,7 @@
|
|
|
89
119
|
### Fixed
|
|
90
120
|
|
|
91
121
|
- Fixed `gjc ultragoal create-goals` native goal activation so live sessions receive a pending reconciliation request even when the session file already contains an active goal.
|
|
92
|
-
- Made `gjc ultragoal` run natively
|
|
122
|
+
- Made `gjc ultragoal` run natively, preserving active goal state across interrupted turns.
|
|
93
123
|
- Fixed interactive Escape/interrupt recovery so abort cleanup is bounded and forces the session back to idle when a provider stream, tool, or post-turn task ignores cooperative cancellation.
|
|
94
124
|
- Fixed root `gjc --worktree` / `gjc -w` startup so the launch command actually creates and enters the sibling `<repo>.gajae-code-worktrees/<branch-slug>` git worktree before starting the session, using collision-resistant branch slugs and avoiding worktree side effects for help/version launches.
|
|
95
125
|
- Fixed root `gjc --worktree <branch>` / `gjc -w <branch>` parsing so named branch worktrees create their own `<branch-slug>` directory instead of reusing the dirty detached worktree for the current branch.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command } from "@gajae-code/utils/cli";
|
|
2
|
+
export default class ContributionPrep extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static strict: boolean;
|
|
5
|
+
static flags: {
|
|
6
|
+
"no-spawn": import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
"source-session-id": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
"artifact-root": import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
static examples: string[];
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Command } from "@gajae-code/utils/cli";
|
|
2
|
+
export default class Session extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static strict: boolean;
|
|
5
|
+
static args: {
|
|
6
|
+
action: import("@gajae-code/utils/cli").ArgDescriptor & {
|
|
7
|
+
description: string;
|
|
8
|
+
required: false;
|
|
9
|
+
};
|
|
10
|
+
session: import("@gajae-code/utils/cli").ArgDescriptor & {
|
|
11
|
+
description: string;
|
|
12
|
+
required: false;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
static flags: {
|
|
16
|
+
json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
17
|
+
char: string;
|
|
18
|
+
description: string;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
static examples: string[];
|
|
23
|
+
run(): Promise<void>;
|
|
24
|
+
}
|
|
@@ -43,7 +43,7 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
43
43
|
baseUrl?: string | undefined;
|
|
44
44
|
apiKey?: string | undefined;
|
|
45
45
|
apiKeyEnv?: string | undefined;
|
|
46
|
-
api?: "anthropic-messages" | "azure-openai-responses" | "google-generative-ai" | "google-vertex" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
46
|
+
api?: "anthropic-messages" | "azure-openai-responses" | "bedrock-converse-stream" | "cursor-agent" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "ollama-chat" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
47
47
|
headers?: Record<string, string> | undefined;
|
|
48
48
|
compat?: {
|
|
49
49
|
supportsStore?: boolean | undefined;
|
|
@@ -97,7 +97,7 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
97
97
|
models?: {
|
|
98
98
|
id: string;
|
|
99
99
|
name?: string | undefined;
|
|
100
|
-
api?: "anthropic-messages" | "azure-openai-responses" | "google-generative-ai" | "google-vertex" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
100
|
+
api?: "anthropic-messages" | "azure-openai-responses" | "bedrock-converse-stream" | "cursor-agent" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "ollama-chat" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
101
101
|
baseUrl?: string | undefined;
|
|
102
102
|
reasoning?: boolean | undefined;
|
|
103
103
|
thinking?: {
|
|
@@ -170,8 +170,8 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
170
170
|
stripHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
171
171
|
setHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
172
172
|
extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
173
|
-
}, z.core.$
|
|
174
|
-
}, z.core.$
|
|
173
|
+
}, z.core.$strict>>;
|
|
174
|
+
}, z.core.$strict>;
|
|
175
175
|
export type ModelOverride = z.infer<typeof ModelOverrideSchema>;
|
|
176
176
|
export declare const ProviderDiscoverySchema: z.ZodObject<{
|
|
177
177
|
type: z.ZodEnum<{
|
|
@@ -196,8 +196,12 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
196
196
|
api: z.ZodOptional<z.ZodEnum<{
|
|
197
197
|
"anthropic-messages": "anthropic-messages";
|
|
198
198
|
"azure-openai-responses": "azure-openai-responses";
|
|
199
|
+
"bedrock-converse-stream": "bedrock-converse-stream";
|
|
200
|
+
"cursor-agent": "cursor-agent";
|
|
201
|
+
"google-gemini-cli": "google-gemini-cli";
|
|
199
202
|
"google-generative-ai": "google-generative-ai";
|
|
200
203
|
"google-vertex": "google-vertex";
|
|
204
|
+
"ollama-chat": "ollama-chat";
|
|
201
205
|
"openai-codex-responses": "openai-codex-responses";
|
|
202
206
|
"openai-completions": "openai-completions";
|
|
203
207
|
"openai-responses": "openai-responses";
|
|
@@ -278,15 +282,19 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
278
282
|
stripHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
279
283
|
setHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
280
284
|
extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
281
|
-
}, z.core.$
|
|
285
|
+
}, z.core.$strict>>;
|
|
282
286
|
models: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
283
287
|
id: z.ZodString;
|
|
284
288
|
name: z.ZodOptional<z.ZodString>;
|
|
285
289
|
api: z.ZodOptional<z.ZodEnum<{
|
|
286
290
|
"anthropic-messages": "anthropic-messages";
|
|
287
291
|
"azure-openai-responses": "azure-openai-responses";
|
|
292
|
+
"bedrock-converse-stream": "bedrock-converse-stream";
|
|
293
|
+
"cursor-agent": "cursor-agent";
|
|
294
|
+
"google-gemini-cli": "google-gemini-cli";
|
|
288
295
|
"google-generative-ai": "google-generative-ai";
|
|
289
296
|
"google-vertex": "google-vertex";
|
|
297
|
+
"ollama-chat": "ollama-chat";
|
|
290
298
|
"openai-codex-responses": "openai-codex-responses";
|
|
291
299
|
"openai-completions": "openai-completions";
|
|
292
300
|
"openai-responses": "openai-responses";
|
|
@@ -407,8 +415,8 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
407
415
|
stripHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
408
416
|
setHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
409
417
|
extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
410
|
-
}, z.core.$
|
|
411
|
-
}, z.core.$
|
|
418
|
+
}, z.core.$strict>>;
|
|
419
|
+
}, z.core.$strict>>>;
|
|
412
420
|
modelOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
413
421
|
name: z.ZodOptional<z.ZodString>;
|
|
414
422
|
reasoning: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -526,11 +534,11 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
526
534
|
stripHeaders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
527
535
|
setHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
528
536
|
extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
529
|
-
}, z.core.$
|
|
530
|
-
}, z.core.$
|
|
537
|
+
}, z.core.$strict>>;
|
|
538
|
+
}, z.core.$strict>>>;
|
|
531
539
|
disableStrictTools: z.ZodOptional<z.ZodBoolean>;
|
|
532
540
|
transport: z.ZodOptional<z.ZodLiteral<"pi-native">>;
|
|
533
|
-
}, z.core.$
|
|
541
|
+
}, z.core.$strict>>>;
|
|
534
542
|
modelBindings: z.ZodOptional<z.ZodObject<{
|
|
535
543
|
modelRoles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
536
544
|
agentModelOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -539,5 +547,5 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
539
547
|
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
540
548
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
541
549
|
}, z.core.$strip>>;
|
|
542
|
-
}, z.core.$
|
|
550
|
+
}, z.core.$strict>;
|
|
543
551
|
export type ModelsConfig = z.infer<typeof ModelsConfigSchema>;
|
|
@@ -1035,29 +1035,6 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1035
1035
|
readonly description: "When steering messages interrupt tool execution";
|
|
1036
1036
|
};
|
|
1037
1037
|
};
|
|
1038
|
-
readonly "loop.mode": {
|
|
1039
|
-
readonly type: "enum";
|
|
1040
|
-
readonly values: readonly ["prompt", "compact", "reset"];
|
|
1041
|
-
readonly default: "prompt";
|
|
1042
|
-
readonly ui: {
|
|
1043
|
-
readonly tab: "interaction";
|
|
1044
|
-
readonly label: "Loop Mode";
|
|
1045
|
-
readonly description: "What happens between /loop iterations before re-submitting the prompt";
|
|
1046
|
-
readonly options: readonly [{
|
|
1047
|
-
readonly value: "prompt";
|
|
1048
|
-
readonly label: "Prompt";
|
|
1049
|
-
readonly description: "Re-submit the prompt as a follow-up message (current behavior)";
|
|
1050
|
-
}, {
|
|
1051
|
-
readonly value: "compact";
|
|
1052
|
-
readonly label: "Compact";
|
|
1053
|
-
readonly description: "Compact the session context, then re-submit the prompt";
|
|
1054
|
-
}, {
|
|
1055
|
-
readonly value: "reset";
|
|
1056
|
-
readonly label: "Reset";
|
|
1057
|
-
readonly description: "Start a new session, then re-submit the prompt";
|
|
1058
|
-
}];
|
|
1059
|
-
};
|
|
1060
|
-
};
|
|
1061
1038
|
readonly doubleEscapeAction: {
|
|
1062
1039
|
readonly type: "enum";
|
|
1063
1040
|
readonly values: readonly ["branch", "tree", "none"];
|
|
@@ -2552,7 +2529,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2552
2529
|
readonly ui: {
|
|
2553
2530
|
readonly tab: "tasks";
|
|
2554
2531
|
readonly label: "Goal Status In Footer";
|
|
2555
|
-
readonly description: "Show
|
|
2532
|
+
readonly description: "Show goal usage alongside the goal indicator in the status line";
|
|
2556
2533
|
};
|
|
2557
2534
|
};
|
|
2558
2535
|
readonly "goal.continuationModes": {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native implementation of `gjc deep-interview`.
|
|
3
|
+
*
|
|
4
|
+
* The CLI itself does not run the Socratic interview; that lives inside the `/skill:deep-interview`
|
|
5
|
+
* skill executed by the agent. This handler validates the documented argument-hint surface
|
|
6
|
+
* (`[--quick|--standard|--deep] <idea>`), seeds `.gjc/state/deep-interview-state.json`, and
|
|
7
|
+
* updates the shared HUD rail via `syncSkillActiveState` so the active interview is visible to
|
|
8
|
+
* the TUI.
|
|
9
|
+
*/
|
|
10
|
+
export interface DeepInterviewCommandResult {
|
|
11
|
+
status: number;
|
|
12
|
+
stdout?: string;
|
|
13
|
+
stderr?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function runNativeDeepInterviewCommand(args: string[], cwd?: string): Promise<DeepInterviewCommandResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Goal } from "../goals/state";
|
|
2
2
|
export declare const GJC_SESSION_FILE_ENV = "GJC_SESSION_FILE";
|
|
3
3
|
export declare const GJC_SESSION_ID_ENV = "GJC_SESSION_ID";
|
|
4
4
|
export declare const GJC_SESSION_CWD_ENV = "GJC_SESSION_CWD";
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { Args } from "../cli/args";
|
|
2
|
-
|
|
2
|
+
import { buildGjcTmuxProfileCommands, GJC_DEFAULT_TMUX_SESSION, GJC_TMUX_COMMAND_ENV, GJC_TMUX_MOUSE_ENV, GJC_TMUX_PROFILE_ENV, GJC_TMUX_SESSION_PREFIX, type GjcTmuxProfileCommand } from "./tmux-common";
|
|
3
|
+
export { buildGjcTmuxProfileCommands, GJC_DEFAULT_TMUX_SESSION, GJC_TMUX_COMMAND_ENV, GJC_TMUX_MOUSE_ENV, GJC_TMUX_PROFILE_ENV, GJC_TMUX_SESSION_PREFIX, };
|
|
3
4
|
export declare const GJC_TMUX_LAUNCHED_ENV = "GJC_TMUX_LAUNCHED";
|
|
4
5
|
export declare const GJC_LAUNCH_POLICY_ENV = "GJC_LAUNCH_POLICY";
|
|
5
|
-
export declare const GJC_TMUX_COMMAND_ENV = "GJC_TMUX_COMMAND";
|
|
6
|
-
export declare const GJC_TMUX_PROFILE_ENV = "GJC_TMUX_PROFILE";
|
|
7
|
-
export declare const GJC_TMUX_MOUSE_ENV = "GJC_MOUSE";
|
|
8
6
|
interface TtyState {
|
|
9
7
|
stdin: boolean;
|
|
10
8
|
stdout: boolean;
|
|
@@ -20,6 +18,10 @@ export interface TmuxLaunchContext {
|
|
|
20
18
|
tty?: TtyState;
|
|
21
19
|
spawnSync?: TmuxSpawnSync;
|
|
22
20
|
tmuxAvailable?: boolean;
|
|
21
|
+
worktreeBranch?: string | null;
|
|
22
|
+
currentBranch?: string | null;
|
|
23
|
+
existingBranchSessionName?: string | null;
|
|
24
|
+
project?: string | null;
|
|
23
25
|
}
|
|
24
26
|
export interface TmuxSpawnResult {
|
|
25
27
|
exitCode: number | null;
|
|
@@ -40,11 +42,9 @@ export interface TmuxLaunchPlan {
|
|
|
40
42
|
cwd: string;
|
|
41
43
|
innerCommand: string;
|
|
42
44
|
newSessionArgs: string[];
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
description: string;
|
|
47
|
-
args: string[];
|
|
45
|
+
branch?: string | null;
|
|
46
|
+
attachSessionName?: string;
|
|
47
|
+
project?: string | null;
|
|
48
48
|
}
|
|
49
49
|
export interface GjcTmuxProfileResult {
|
|
50
50
|
skipped: boolean;
|
|
@@ -60,9 +60,10 @@ export interface GjcTmuxProfileContext {
|
|
|
60
60
|
cwd?: string;
|
|
61
61
|
env?: NodeJS.ProcessEnv;
|
|
62
62
|
spawnSync?: TmuxSpawnSync;
|
|
63
|
+
branch?: string | null;
|
|
64
|
+
branchSlug?: string | null;
|
|
65
|
+
project?: string | null;
|
|
63
66
|
}
|
|
64
|
-
export declare function buildGjcTmuxProfileCommands(target: string, env?: NodeJS.ProcessEnv): GjcTmuxProfileCommand[];
|
|
65
67
|
export declare function applyGjcTmuxProfile(context: GjcTmuxProfileContext): GjcTmuxProfileResult;
|
|
66
68
|
export declare function buildDefaultTmuxLaunchPlan(context: TmuxLaunchContext): TmuxLaunchPlan | undefined;
|
|
67
69
|
export declare function launchDefaultTmuxIfNeeded(context: TmuxLaunchContext): boolean;
|
|
68
|
-
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native implementation of `gjc ralplan`.
|
|
3
|
+
*
|
|
4
|
+
* Two invocation shapes are handled natively:
|
|
5
|
+
*
|
|
6
|
+
* 1. **Consensus handoff**: `gjc ralplan [--interactive] [--deliberate] [--architect <kind>]
|
|
7
|
+
* [--critic <kind>] [--session-id <id>] "<task>"` validates the documented flag surface,
|
|
8
|
+
* seeds `.gjc/state/ralplan-state.json`, and updates the shared HUD rail via
|
|
9
|
+
* `syncSkillActiveState`. The CLI never *runs* the Planner / Architect / Critic loop itself —
|
|
10
|
+
* that lives in the bundled `/skill:ralplan` skill — but it accepts every documented flag so
|
|
11
|
+
* scripted users see a useful response and the active run is visible to the TUI.
|
|
12
|
+
*
|
|
13
|
+
* 2. **Artifact write**: `gjc ralplan --write --stage <type> --stage_n <N> --artifact
|
|
14
|
+
* <path-or-string> [--run-id <id>] [--session-id <id>] [--json]` persists Planner / Architect
|
|
15
|
+
* / Critic / revision / ADR / final markdown under `.gjc/plans/ralplan/<run-id>/`, maintains
|
|
16
|
+
* an `index.jsonl` audit log, copies `final` stages to `pending-approval.md`, and advances
|
|
17
|
+
* the HUD chip to reflect the latest persisted stage.
|
|
18
|
+
*/
|
|
19
|
+
export interface RalplanCommandResult {
|
|
20
|
+
status: number;
|
|
21
|
+
stdout?: string;
|
|
22
|
+
stderr?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function isRalplanArtifactWriteInvocation(args: readonly string[]): boolean;
|
|
25
|
+
export declare function runNativeRalplanCommand(args: string[], cwd?: string): Promise<RalplanCommandResult>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Native implementation of the `gjc state read|write|clear` command surface.
|
|
3
|
+
*
|
|
4
|
+
* Simple file-receipt operations against `.gjc/state/[sessions/<id>/]<mode>-state.json` and
|
|
5
|
+
* `.gjc/state/[sessions/<id>/]skill-active-state.json`. This is the sanctioned CLI mediator for
|
|
6
|
+
* the mutation-guarded `.gjc/state` ACL — agents call it instead of editing those files directly.
|
|
7
|
+
*/
|
|
8
|
+
export interface StateCommandResult {
|
|
9
|
+
status: number;
|
|
10
|
+
stdout?: string;
|
|
11
|
+
stderr?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function runNativeStateCommand(args: string[], cwd?: string): Promise<StateCommandResult>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WorkflowHudSummary } from "../skill-state/active-state";
|
|
2
|
-
export type GjcTeamPhase = "starting" | "running" | "complete" | "failed" | "cancelled";
|
|
2
|
+
export type GjcTeamPhase = "starting" | "running" | "awaiting_integration" | "complete" | "failed" | "cancelled";
|
|
3
3
|
export type GjcTeamTaskStatus = "pending" | "blocked" | "in_progress" | "completed" | "failed";
|
|
4
4
|
export type GjcWorkerStatusState = "idle" | "working" | "blocked" | "done" | "failed" | "draining" | "unknown";
|
|
5
5
|
export declare const GJC_TEAM_DEFAULT_WORKERS = 3;
|
|
@@ -79,6 +79,7 @@ export interface GjcTeamConfig {
|
|
|
79
79
|
tmux_session_name: string;
|
|
80
80
|
tmux_target: string;
|
|
81
81
|
workspace_mode: "direct" | "worktree";
|
|
82
|
+
dry_run: boolean;
|
|
82
83
|
leader: GjcTeamLeader;
|
|
83
84
|
leader_cwd: string;
|
|
84
85
|
team_state_root: string;
|
|
@@ -101,6 +102,31 @@ export interface GjcTeamMonitorSnapshot {
|
|
|
101
102
|
integration_by_worker: Record<string, GjcTeamWorkerIntegrationState>;
|
|
102
103
|
updated_at: string;
|
|
103
104
|
}
|
|
105
|
+
export type GjcTeamNotificationDeliveryState = "pending" | "sent" | "queued" | "deferred" | "failed" | "delivered" | "acknowledged";
|
|
106
|
+
export type GjcTeamPaneAttemptResult = "sent" | "queued" | "deferred" | "failed";
|
|
107
|
+
export interface GjcTeamNotification {
|
|
108
|
+
id: string;
|
|
109
|
+
kind: "mailbox_message" | "worker_lifecycle" | "invalid_attempt";
|
|
110
|
+
team_name: string;
|
|
111
|
+
recipient: string;
|
|
112
|
+
source: {
|
|
113
|
+
type: "message" | "task" | "worker" | "event";
|
|
114
|
+
id: string;
|
|
115
|
+
};
|
|
116
|
+
idempotency_key?: string;
|
|
117
|
+
delivery_state: GjcTeamNotificationDeliveryState;
|
|
118
|
+
pane_attempt_result?: GjcTeamPaneAttemptResult;
|
|
119
|
+
pane_attempt_reason?: string;
|
|
120
|
+
pane_attempt_at?: string;
|
|
121
|
+
created_at: string;
|
|
122
|
+
updated_at: string;
|
|
123
|
+
replay_count: number;
|
|
124
|
+
}
|
|
125
|
+
export interface GjcTeamNotificationSummary {
|
|
126
|
+
total: number;
|
|
127
|
+
replay_eligible: number;
|
|
128
|
+
by_state: Record<GjcTeamNotificationDeliveryState, number>;
|
|
129
|
+
}
|
|
104
130
|
export interface GjcTeamSnapshot {
|
|
105
131
|
team_name: string;
|
|
106
132
|
display_name: string;
|
|
@@ -113,6 +139,7 @@ export interface GjcTeamSnapshot {
|
|
|
113
139
|
task_counts: Record<GjcTeamTaskStatus, number>;
|
|
114
140
|
workers: GjcTeamWorker[];
|
|
115
141
|
integration_by_worker?: Record<string, GjcTeamWorkerIntegrationState>;
|
|
142
|
+
notification_summary: GjcTeamNotificationSummary;
|
|
116
143
|
updated_at: string;
|
|
117
144
|
}
|
|
118
145
|
export interface GjcTeamStartOptions {
|
|
@@ -140,6 +167,7 @@ export interface GjcTeamMailboxMessage {
|
|
|
140
167
|
created_at: string;
|
|
141
168
|
delivered_at?: string;
|
|
142
169
|
notified_at?: string;
|
|
170
|
+
idempotency_key?: string;
|
|
143
171
|
}
|
|
144
172
|
export declare function resolveGjcTeamWorkerCli(env?: NodeJS.ProcessEnv): GjcTeamWorkerCli;
|
|
145
173
|
export declare function resolveGjcTeamWorkerCliPlan(workerCount: number, env?: NodeJS.ProcessEnv): GjcTeamWorkerCli[];
|
|
@@ -174,7 +202,7 @@ export interface GjcWorkerIntegrationAttemptRequestResult {
|
|
|
174
202
|
head?: string | null;
|
|
175
203
|
status?: GjcWorkerCheckpointClassification["kind"];
|
|
176
204
|
}
|
|
177
|
-
export declare const GJC_TEAM_API_OPERATIONS: readonly ["send-message", "broadcast", "mailbox-list", "mailbox-mark-delivered", "mailbox-mark-notified", "create-task", "read-task", "list-tasks", "update-task", "claim-task", "transition-task-status", "transition-task", "release-task-claim", "read-config", "read-manifest", "read-worker-status", "read-worker-heartbeat", "update-worker-heartbeat", "write-worker-inbox", "write-worker-identity", "append-event", "read-events", "await-event", "write-shutdown-request", "read-shutdown-ack", "read-monitor-snapshot", "write-monitor-snapshot", "read-task-approval", "write-task-approval"];
|
|
205
|
+
export declare const GJC_TEAM_API_OPERATIONS: readonly ["send-message", "broadcast", "mailbox-list", "mailbox-mark-delivered", "mailbox-mark-notified", "notification-list", "notification-read", "notification-replay", "notification-mark-pane-attempt", "worker-startup-ack", "create-task", "read-task", "list-tasks", "update-task", "claim-task", "transition-task-status", "transition-task", "release-task-claim", "read-config", "read-manifest", "read-worker-status", "read-worker-heartbeat", "update-worker-heartbeat", "write-worker-inbox", "write-worker-identity", "append-event", "read-events", "await-event", "write-shutdown-request", "read-shutdown-ack", "read-monitor-snapshot", "write-monitor-snapshot", "read-task-approval", "write-task-approval"];
|
|
178
206
|
export declare function resolveGjcTeamStateRoot(cwd?: string, env?: NodeJS.ProcessEnv): string;
|
|
179
207
|
export declare function resolveGjcTmuxCommand(env?: NodeJS.ProcessEnv): string;
|
|
180
208
|
export declare function resolveGjcWorkerCommand(cwd?: string, env?: NodeJS.ProcessEnv): string;
|
|
@@ -212,11 +240,15 @@ export declare function readGjcTeamTask(teamName: string, taskId: string, cwd?:
|
|
|
212
240
|
export declare function createGjcTeamTask(teamName: string, subject: string, description: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<GjcTeamTask>;
|
|
213
241
|
export declare function updateGjcTeamTask(teamName: string, taskId: string, updates: Partial<Pick<GjcTeamTask, "subject" | "description" | "blocked_by" | "depends_on">>, cwd?: string, env?: NodeJS.ProcessEnv): Promise<GjcTeamTask>;
|
|
214
242
|
export declare function claimGjcTeamTask(teamName: string, workerId: string, cwd?: string, env?: NodeJS.ProcessEnv, taskId?: string): Promise<GjcTeamApiClaimResult>;
|
|
215
|
-
export declare function transitionGjcTeamTaskStatus(teamName: string, taskId: string, status: GjcTeamTaskStatus, cwd?: string, env?: NodeJS.ProcessEnv, claimToken?: string): Promise<GjcTeamTask>;
|
|
243
|
+
export declare function transitionGjcTeamTaskStatus(teamName: string, taskId: string, status: GjcTeamTaskStatus, cwd?: string, env?: NodeJS.ProcessEnv, claimToken?: string, workerId?: string, evidence?: string): Promise<GjcTeamTask>;
|
|
216
244
|
export declare function transitionGjcTeamTask(teamName: string, taskId: string, status: GjcTeamTaskStatus | "complete", cwd?: string, env?: NodeJS.ProcessEnv, claimToken?: string): Promise<GjcTeamTask>;
|
|
217
245
|
export declare function releaseGjcTeamTaskClaim(teamName: string, taskId: string, claimToken: string, workerId: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<GjcTeamTask>;
|
|
218
|
-
export declare function
|
|
219
|
-
|
|
246
|
+
export declare function replayGjcTeamNotifications(teamName: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<{
|
|
247
|
+
notifications: GjcTeamNotification[];
|
|
248
|
+
summary: GjcTeamNotificationSummary;
|
|
249
|
+
}>;
|
|
250
|
+
export declare function sendGjcTeamMessage(teamName: string, fromWorker: string, toWorker: string, body: string, cwd?: string, env?: NodeJS.ProcessEnv, idempotencyKey?: string): Promise<GjcTeamMailboxMessage>;
|
|
251
|
+
export declare function broadcastGjcTeamMessage(teamName: string, fromWorker: string, body: string, cwd?: string, env?: NodeJS.ProcessEnv, idempotencyKey?: string): Promise<GjcTeamMailboxMessage[]>;
|
|
220
252
|
export declare function listGjcTeamMailbox(teamName: string, worker: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<GjcTeamMailboxMessage[]>;
|
|
221
253
|
export declare function markGjcTeamMailboxMessage(teamName: string, worker: string, messageId: string, field: "delivered_at" | "notified_at", cwd?: string, env?: NodeJS.ProcessEnv): Promise<GjcTeamMailboxMessage>;
|
|
222
254
|
export declare function readGjcWorkerStatus(teamName: string, worker: string, cwd?: string, env?: NodeJS.ProcessEnv): Promise<WorkerStatusFile>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const GJC_DEFAULT_TMUX_SESSION = "gajae_code";
|
|
2
|
+
export declare const GJC_TMUX_SESSION_PREFIX = "gajae_code_";
|
|
3
|
+
export declare const GJC_TMUX_COMMAND_ENV = "GJC_TMUX_COMMAND";
|
|
4
|
+
export declare const GJC_TMUX_PROFILE_ENV = "GJC_TMUX_PROFILE";
|
|
5
|
+
export declare const GJC_TMUX_MOUSE_ENV = "GJC_MOUSE";
|
|
6
|
+
export declare const GJC_TMUX_PROFILE_OPTION = "@gjc-profile";
|
|
7
|
+
export declare const GJC_TMUX_PROFILE_VALUE = "1";
|
|
8
|
+
export declare const GJC_TMUX_BRANCH_OPTION = "@gjc-branch";
|
|
9
|
+
export declare const GJC_TMUX_BRANCH_SLUG_OPTION = "@gjc-branch-slug";
|
|
10
|
+
export declare const GJC_TMUX_PROJECT_OPTION = "@gjc-project";
|
|
11
|
+
export interface GjcTmuxProfileCommand {
|
|
12
|
+
description: string;
|
|
13
|
+
args: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface TmuxCommandResult {
|
|
16
|
+
exitCode: number | null;
|
|
17
|
+
stdout?: string;
|
|
18
|
+
stderr?: string;
|
|
19
|
+
signalCode?: string | null;
|
|
20
|
+
}
|
|
21
|
+
export type TmuxCommandRunner = (args: string[]) => TmuxCommandResult;
|
|
22
|
+
export declare function envDisabled(value: string | undefined): boolean;
|
|
23
|
+
export declare function resolveGjcTmuxCommand(env?: NodeJS.ProcessEnv): string;
|
|
24
|
+
export declare function sanitizeTmuxToken(value: string): string;
|
|
25
|
+
export declare function buildGjcTmuxSessionSlug(value: string): string;
|
|
26
|
+
export declare function buildGjcTmuxSessionName(env?: NodeJS.ProcessEnv, context?: {
|
|
27
|
+
branch?: string | null;
|
|
28
|
+
now?: number;
|
|
29
|
+
id?: string;
|
|
30
|
+
}): string;
|
|
31
|
+
export declare function buildGjcTmuxRequiredProfileCommands(target: string, metadata?: {
|
|
32
|
+
branch?: string | null;
|
|
33
|
+
branchSlug?: string | null;
|
|
34
|
+
project?: string | null;
|
|
35
|
+
}): GjcTmuxProfileCommand[];
|
|
36
|
+
export declare function buildGjcTmuxProfileCommands(target: string, env?: NodeJS.ProcessEnv, metadata?: {
|
|
37
|
+
branch?: string | null;
|
|
38
|
+
branchSlug?: string | null;
|
|
39
|
+
project?: string | null;
|
|
40
|
+
}): GjcTmuxProfileCommand[];
|
|
41
|
+
export declare function normalizeTmuxCreatedAt(raw: string): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface GjcTmuxSessionStatus {
|
|
2
|
+
name: string;
|
|
3
|
+
attached: boolean;
|
|
4
|
+
windows: number;
|
|
5
|
+
panes: number;
|
|
6
|
+
bindings: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
branch?: string;
|
|
9
|
+
branchSlug?: string;
|
|
10
|
+
project?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function listGjcTmuxSessions(env?: NodeJS.ProcessEnv): GjcTmuxSessionStatus[];
|
|
13
|
+
export declare function findGjcTmuxSessionByBranch(branch: string, env?: NodeJS.ProcessEnv, project?: string | null): GjcTmuxSessionStatus | undefined;
|
|
14
|
+
export declare function statusGjcTmuxSession(sessionName: string, env?: NodeJS.ProcessEnv): GjcTmuxSessionStatus;
|
|
15
|
+
export declare function createGjcTmuxSession(env?: NodeJS.ProcessEnv): GjcTmuxSessionStatus;
|
|
16
|
+
export declare function removeGjcTmuxSession(sessionName: string, env?: NodeJS.ProcessEnv): GjcTmuxSessionStatus;
|
|
17
|
+
export declare function attachGjcTmuxSession(sessionName: string, env?: NodeJS.ProcessEnv): never;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Goal, type GoalModeState, type GoalRuntimeEvent, type GoalTokenUsage } from "./state";
|
|
2
2
|
export interface GoalRuntimeHost {
|
|
3
3
|
getState(): GoalModeState | undefined;
|
|
4
4
|
setState(state: GoalModeState | undefined): void;
|
|
@@ -24,16 +24,13 @@ export interface GoalWallClockSnapshot {
|
|
|
24
24
|
export interface GoalRuntimeSnapshot {
|
|
25
25
|
turnSnapshot?: GoalTurnSnapshot;
|
|
26
26
|
wallClock: GoalWallClockSnapshot;
|
|
27
|
-
budgetReportedFor?: string;
|
|
28
27
|
}
|
|
29
|
-
export type GoalPromptKind = "active" | "continuation"
|
|
30
|
-
export declare function remainingTokens(goal: Goal | null | undefined): number | null;
|
|
28
|
+
export type GoalPromptKind = "active" | "continuation";
|
|
31
29
|
export declare function escapeXmlText(input: string): string;
|
|
32
30
|
export declare function renderTrustedObjective(objective: string): string;
|
|
33
31
|
export declare function validateGoalObjective(objective: string, op: "create" | "replace"): string;
|
|
34
32
|
export declare function goalTokenDelta(current: GoalTokenUsage, baseline: GoalTokenUsage): number;
|
|
35
33
|
export declare function renderGoalPrompt(kind: GoalPromptKind, goal: Goal): string;
|
|
36
|
-
export declare function completionBudgetReport(goal: Goal): string | null;
|
|
37
34
|
export declare class GoalRuntime {
|
|
38
35
|
#private;
|
|
39
36
|
constructor(host: GoalRuntimeHost);
|
|
@@ -49,15 +46,12 @@ export declare class GoalRuntime {
|
|
|
49
46
|
reason?: "interrupted" | "internal";
|
|
50
47
|
}): Promise<void>;
|
|
51
48
|
onThreadResumed(): Promise<GoalModeState | undefined>;
|
|
52
|
-
|
|
53
|
-
flushUsage(steering: GoalBudgetSteering, currentUsage?: GoalTokenUsage): Promise<void>;
|
|
49
|
+
flushUsage(currentUsage?: GoalTokenUsage): Promise<void>;
|
|
54
50
|
createGoal(input: {
|
|
55
51
|
objective: string;
|
|
56
|
-
tokenBudget?: number;
|
|
57
52
|
}): Promise<GoalModeState>;
|
|
58
53
|
replaceGoal(input: {
|
|
59
54
|
objective: string;
|
|
60
|
-
tokenBudget?: number;
|
|
61
55
|
}): Promise<GoalModeState>;
|
|
62
56
|
resumeGoal(): Promise<GoalModeState>;
|
|
63
57
|
pauseGoal(): Promise<GoalModeState | undefined>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { UsageStatistics } from "../session/session-manager";
|
|
2
|
-
export type GoalStatus = "active" | "paused" | "
|
|
2
|
+
export type GoalStatus = "active" | "paused" | "complete" | "dropped";
|
|
3
3
|
export interface Goal {
|
|
4
4
|
id: string;
|
|
5
5
|
objective: string;
|
|
6
6
|
status: GoalStatus;
|
|
7
|
-
tokenBudget?: number;
|
|
8
7
|
tokensUsed: number;
|
|
9
8
|
timeUsedSeconds: number;
|
|
10
9
|
createdAt: number;
|
|
@@ -19,8 +18,6 @@ export interface GoalModeState {
|
|
|
19
18
|
export interface GoalToolDetails {
|
|
20
19
|
op: "create" | "get" | "complete" | "resume" | "drop";
|
|
21
20
|
goal?: Goal | null;
|
|
22
|
-
remainingTokens?: number | null;
|
|
23
|
-
completionBudgetReport?: string | null;
|
|
24
21
|
}
|
|
25
22
|
export type GoalRuntimeEvent = {
|
|
26
23
|
type: "goal_updated";
|
|
@@ -31,5 +28,5 @@ export type GoalRuntimeEvent = {
|
|
|
31
28
|
prompt: string;
|
|
32
29
|
};
|
|
33
30
|
export type GoalTokenUsage = Pick<UsageStatistics, "input" | "output" | "cacheRead" | "cacheWrite">;
|
|
34
|
-
export
|
|
35
|
-
export
|
|
31
|
+
export declare function normalizeGoal(candidate: unknown): Goal | null;
|
|
32
|
+
export declare function normalizeGoalModeState(candidate: GoalModeState | undefined): GoalModeState | undefined;
|