@gajae-code/coding-agent 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -1
- package/dist/types/cli/setup-cli.d.ts +1 -0
- package/dist/types/commands/contribution-prep.d.ts +18 -0
- package/dist/types/commands/deep-interview.d.ts +41 -0
- package/dist/types/commands/session.d.ts +24 -0
- package/dist/types/commands/setup.d.ts +3 -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 +37 -24
- 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 +33 -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/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 +0 -2
- 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/modes/utils/context-usage.d.ts +6 -2
- package/dist/types/sdk.d.ts +6 -2
- package/dist/types/session/agent-session.d.ts +47 -1
- package/dist/types/session/contribution-prep.d.ts +47 -0
- 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 +30 -1
- package/dist/types/skill-state/deep-interview-mutation-guard.d.ts +6 -1
- package/dist/types/skill-state/initial-phase.d.ts +12 -0
- package/dist/types/skill-state/workflow-hud.d.ts +9 -4
- package/dist/types/skill-state/workflow-state-contract.d.ts +34 -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/args.ts +3 -2
- package/src/cli/setup-cli.ts +26 -12
- package/src/cli.ts +7 -1
- package/src/commands/contribution-prep.ts +41 -0
- package/src/commands/deep-interview.ts +30 -23
- package/src/commands/launch.ts +10 -1
- package/src/commands/ralplan.ts +10 -22
- package/src/commands/session.ts +150 -0
- package/src/commands/setup.ts +2 -0
- package/src/commands/state.ts +15 -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 +42 -25
- package/src/config.ts +1 -1
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +32 -13
- package/src/defaults/gjc/skills/ralplan/SKILL.md +22 -2
- package/src/defaults/gjc/skills/team/SKILL.md +39 -7
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +33 -25
- package/src/discovery/helpers.ts +24 -1
- package/src/eval/py/prelude.py +1 -1
- package/src/extensibility/extensions/types.ts +6 -0
- package/src/gjc-runtime/deep-interview-runtime.ts +546 -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 +731 -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 +39 -18
- package/src/internal-urls/docs-index.generated.ts +5 -4
- package/src/internal-urls/memory-protocol.ts +3 -2
- package/src/main.ts +2 -3
- package/src/memories/index.ts +2 -1
- 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 +5 -12
- 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 +27 -4
- package/src/modes/controllers/extension-ui-controller.ts +1 -0
- package/src/modes/controllers/input-controller.ts +0 -15
- package/src/modes/controllers/selector-controller.ts +4 -11
- 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/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/goals/goal-continuation.md +1 -4
- package/src/prompts/goals/goal-mode-active.md +3 -5
- package/src/prompts/system/subagent-system-prompt.md +6 -0
- package/src/prompts/system/system-prompt.md +5 -7
- package/src/prompts/tools/goal.md +4 -4
- package/src/prompts/tools/skill.md +28 -0
- package/src/prompts/tools/task.md +3 -0
- package/src/sdk.ts +51 -11
- package/src/session/agent-session.ts +222 -21
- package/src/session/contribution-prep.ts +320 -0
- 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 +188 -25
- package/src/skill-state/deep-interview-mutation-guard.ts +72 -21
- package/src/skill-state/initial-phase.ts +17 -0
- 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 +75 -25
- package/src/slash-commands/helpers/context-report.ts +123 -13
- package/src/task/agents.ts +1 -0
- package/src/task/commands.ts +1 -5
- 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/gh.ts +212 -2
- package/src/tools/index.ts +25 -6
- package/src/tools/skill.ts +153 -0
- package/src/utils/changelog.ts +67 -44
- 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,64 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.2.3] - 2026-06-01
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added `/provider add --preset minimax|minimax-cn|glm` and matching `gjc setup provider --preset ...` shortcuts for OpenAI-compatible MiniMax and GLM/zAI custom-provider onboarding.
|
|
10
|
+
- Added a built-in `skill` tool so the agent can chain into another loaded skill on its next turn. Mirrors `/skill:<name>` typing and subagent `autoloadSkills` by dispatching the chained skill's SKILL.md as a user-attribution custom message; controlled by the new `skill.enabled` setting (default true).
|
|
11
|
+
- Added explicit fork-context task subagents with sanitized bounded parent-history seeds, global `task.forkContext.enabled`, per-agent `forkContext: allowed`, per-task `inheritContext: true`, audit-visible seed metadata, and fresh provider transport state by default.
|
|
12
|
+
- Defaulted the bundled `executor` and `architect` agents to `forkContext: allowed` so callers can opt them into a sanitized parent-context seed via `task({ inheritContext: true })`; per-task selection remains explicit (default false).
|
|
13
|
+
- Added a `/context` slash command that surfaces the active session's token usage breakdown via `buildSessionContext` without forking prompt assembly, so users can see active context before sessions overflow ([#150](https://github.com/Yeachan-Heo/gajae-code/pull/150)).
|
|
14
|
+
- Added multi-line focused-option rendering to the `ask` tool's `HookSelectorComponent` via an opt-in `wrapFocused` flag so long option labels stay readable in plan-mode and other shared consumers ([#148](https://github.com/Yeachan-Heo/gajae-code/pull/148)).
|
|
15
|
+
- Added a sanctioned native deep-interview spec persistence bridge so deep-interview can save final specs under `.gjc/specs/` before deliberate ralplan chaining without caller-side `.gjc` writes ([#134](https://github.com/Yeachan-Heo/gajae-code/pull/134)).
|
|
16
|
+
- Added the skill chaining lifecycle's `handoff` state verb with same-turn dispatch and atomic HUD-truth synchronization across callee mode-state, caller mode-state, session active-state, and root active-state ([#132](https://github.com/Yeachan-Heo/gajae-code/pull/132)).
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Clarified the README to position team as optional and ultragoal as implementation-through-evidence, so docs readers see workflow handoffs without spelunking into skill sources ([#145](https://github.com/Yeachan-Heo/gajae-code/pull/145)).
|
|
21
|
+
- Migrated CI to the gajae self-hosted Linux runner with fork-PR guards, idempotent `fd` symlink setup, and Node 24 pinning for self-hosted jobs ([#124](https://github.com/Yeachan-Heo/gajae-code/pull/124)).
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Enforced the deep-interview phase boundary so active interviews block mutation tools until a handoff/spec is produced.
|
|
26
|
+
- Made settings theme browsing confirm-only so arrowing through themes no longer changes the rendered theme before the displayed/persisted theme name changes.
|
|
27
|
+
- Made startup CHANGELOG display deterministic by embedding `packages/coding-agent/CHANGELOG.md` into the binary so post-update launches show the shipped history regardless of cwd or `GJC_PACKAGE_DIR`/`PI_PACKAGE_DIR` overrides.
|
|
28
|
+
- Registered `gjc update` as a public root subcommand so it invokes the bundled updater instead of routing into the interactive launcher.
|
|
29
|
+
- Fixed local memory backend persistence so manual enqueue/rebuild starts maintenance immediately and prompt injection reads the active session's memory root.
|
|
30
|
+
- Aligned release-bump CI tests with the highest bundled upstream Claude family and stopped cancelling TTSR retries when an aborted partial was not persisted, so dev PRs no longer regress on v0.2.2-style release assumptions ([#142](https://github.com/Yeachan-Heo/gajae-code/pull/142)).
|
|
31
|
+
- Added a runtime guard in the built-in `skill` tool that rejects re-entry into the currently active skill via a typed active-skill bridge from agent sessions into tool sessions, preventing recursive skill handoffs that prompt-only guidance could not stop ([#129](https://github.com/Yeachan-Heo/gajae-code/pull/129)).
|
|
32
|
+
|
|
33
|
+
## [0.2.2] - 2026-05-31
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- Added `gjc session` for listing, inspecting, removing, and attaching GJC-managed tmux sessions ([#105](https://github.com/Yeachan-Heo/gajae-code/pull/105)).
|
|
38
|
+
- Added a managed tmux session surface so `gjc --tmux` and `gjc team` reuse a scoped GJC session instead of mutating the global tmux environment.
|
|
39
|
+
- Added a detached contribution prep workflow surface ([#122](https://github.com/Yeachan-Heo/gajae-code/pull/122)).
|
|
40
|
+
- 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)).
|
|
41
|
+
- Added first-class Azure OpenAI and Amazon Bedrock providers ([#119](https://github.com/Yeachan-Heo/gajae-code/pull/119)).
|
|
42
|
+
- 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)).
|
|
43
|
+
- 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)).
|
|
44
|
+
- Added a GJC dogfood skill template ([#114](https://github.com/Yeachan-Heo/gajae-code/pull/114)).
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- Changed `gjc --tmux` startup to create a fresh GJC-managed tmux session instead of attaching to an existing default session.
|
|
49
|
+
- Hardened team message delivery and worker enforcement ([#112](https://github.com/Yeachan-Heo/gajae-code/pull/112)).
|
|
50
|
+
- Hardened team worker startup and evidence invariants ([#123](https://github.com/Yeachan-Heo/gajae-code/pull/123)).
|
|
51
|
+
- Clarified team state while integration is pending ([#109](https://github.com/Yeachan-Heo/gajae-code/pull/109)).
|
|
52
|
+
- Removed goal mode budget semantics ([#106](https://github.com/Yeachan-Heo/gajae-code/pull/106)).
|
|
53
|
+
- Removed the unused `gjc question` CLI; the `ask` tool covers blocking-question prompts.
|
|
54
|
+
- Dropped the obsolete `loop` and `orchestrate` skills and pinned GJC skills in autocomplete ([#126](https://github.com/Yeachan-Heo/gajae-code/pull/126)).
|
|
55
|
+
- Enforced CLI-managed workflow artifacts so planning skills persist via `gjc state` and `gjc ralplan --write` instead of editing `.gjc/` files directly.
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
|
|
59
|
+
- Fixed Anthropic extended-thinking replay recovery after aborted turns ([#115](https://github.com/Yeachan-Heo/gajae-code/pull/115)).
|
|
60
|
+
- Fixed `gjc deep-interview` ambiguity threshold default so workflow gating matches the documented contract ([#116](https://github.com/Yeachan-Heo/gajae-code/pull/116)).
|
|
61
|
+
- Fixed duplicate PR creation in the team integration path ([#117](https://github.com/Yeachan-Heo/gajae-code/pull/117)).
|
|
62
|
+
- 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
63
|
## [0.2.1] - 2026-05-30
|
|
6
64
|
|
|
7
65
|
### Fixed
|
|
@@ -89,7 +147,7 @@
|
|
|
89
147
|
### Fixed
|
|
90
148
|
|
|
91
149
|
- 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
|
|
150
|
+
- Made `gjc ultragoal` run natively, preserving active goal state across interrupted turns.
|
|
93
151
|
- 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
152
|
- 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
153
|
- 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
|
+
}
|
|
@@ -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
|
}
|
|
@@ -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
|
+
}
|
|
@@ -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
|
};
|
|
@@ -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"];
|
|
@@ -2318,6 +2295,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2318
2295
|
readonly description: "Enable the checkpoint and rewind tools for context checkpointing";
|
|
2319
2296
|
};
|
|
2320
2297
|
};
|
|
2298
|
+
readonly "skill.enabled": {
|
|
2299
|
+
readonly type: "boolean";
|
|
2300
|
+
readonly default: true;
|
|
2301
|
+
readonly ui: {
|
|
2302
|
+
readonly tab: "tools";
|
|
2303
|
+
readonly label: "Skill";
|
|
2304
|
+
readonly description: "Enable the skill tool so the agent can chain into another available skill on its next turn";
|
|
2305
|
+
};
|
|
2306
|
+
};
|
|
2321
2307
|
readonly "fetch.enabled": {
|
|
2322
2308
|
readonly type: "boolean";
|
|
2323
2309
|
readonly default: true;
|
|
@@ -2552,7 +2538,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2552
2538
|
readonly ui: {
|
|
2553
2539
|
readonly tab: "tasks";
|
|
2554
2540
|
readonly label: "Goal Status In Footer";
|
|
2555
|
-
readonly description: "Show
|
|
2541
|
+
readonly description: "Show goal usage alongside the goal indicator in the status line";
|
|
2556
2542
|
};
|
|
2557
2543
|
};
|
|
2558
2544
|
readonly "goal.continuationModes": {
|
|
@@ -2728,6 +2714,33 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2728
2714
|
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.";
|
|
2729
2715
|
};
|
|
2730
2716
|
};
|
|
2717
|
+
readonly "task.forkContext.enabled": {
|
|
2718
|
+
readonly type: "boolean";
|
|
2719
|
+
readonly default: false;
|
|
2720
|
+
readonly ui: {
|
|
2721
|
+
readonly tab: "tasks";
|
|
2722
|
+
readonly label: "Fork Context for Subagents";
|
|
2723
|
+
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.";
|
|
2724
|
+
};
|
|
2725
|
+
};
|
|
2726
|
+
readonly "task.forkContext.maxMessages": {
|
|
2727
|
+
readonly type: "number";
|
|
2728
|
+
readonly default: 50;
|
|
2729
|
+
readonly ui: {
|
|
2730
|
+
readonly tab: "tasks";
|
|
2731
|
+
readonly label: "Fork Context Max Messages";
|
|
2732
|
+
readonly description: "Maximum parent messages copied into an explicitly opted-in subagent fork-context seed.";
|
|
2733
|
+
};
|
|
2734
|
+
};
|
|
2735
|
+
readonly "task.forkContext.maxTokens": {
|
|
2736
|
+
readonly type: "number";
|
|
2737
|
+
readonly default: 0;
|
|
2738
|
+
readonly ui: {
|
|
2739
|
+
readonly tab: "tasks";
|
|
2740
|
+
readonly label: "Fork Context Max Tokens";
|
|
2741
|
+
readonly description: "Approximate token cap for fork-context seeds. 0 uses 25% of the target model context window.";
|
|
2742
|
+
};
|
|
2743
|
+
};
|
|
2731
2744
|
readonly "task.maxRecursionDepth": {
|
|
2732
2745
|
readonly type: "number";
|
|
2733
2746
|
readonly default: 2;
|
|
@@ -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) => {
|
|
@@ -0,0 +1,33 @@
|
|
|
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 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>;
|
|
33
|
+
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>;
|