@gajae-code/coding-agent 0.2.4 → 0.3.0
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 +27 -0
- package/README.md +1 -1
- package/dist/types/async/job-manager.d.ts +145 -2
- package/dist/types/commands/harness.d.ts +37 -0
- package/dist/types/config/settings-schema.d.ts +13 -3
- package/dist/types/config/settings.d.ts +3 -1
- package/dist/types/deep-interview/render-middleware.d.ts +5 -0
- package/dist/types/discovery/helpers.d.ts +1 -0
- package/dist/types/exec/bash-executor.d.ts +8 -1
- package/dist/types/extensibility/custom-tools/types.d.ts +1 -0
- package/dist/types/extensibility/extensions/types.d.ts +6 -0
- package/dist/types/extensibility/shared-events.d.ts +1 -0
- package/dist/types/gjc-runtime/restricted-role-agent-bash.d.ts +2 -0
- package/dist/types/gjc-runtime/state-graph.d.ts +4 -0
- package/dist/types/gjc-runtime/state-migrations.d.ts +24 -0
- package/dist/types/gjc-runtime/state-renderer.d.ts +65 -0
- package/dist/types/gjc-runtime/state-runtime.d.ts +2 -0
- package/dist/types/gjc-runtime/state-validation.d.ts +6 -0
- package/dist/types/gjc-runtime/state-writer.d.ts +137 -0
- package/dist/types/gjc-runtime/team-runtime.d.ts +81 -7
- package/dist/types/gjc-runtime/workflow-manifest.d.ts +54 -0
- package/dist/types/harness-control-plane/classifier.d.ts +13 -0
- package/dist/types/harness-control-plane/control-endpoint.d.ts +30 -0
- package/dist/types/harness-control-plane/finalize.d.ts +47 -0
- package/dist/types/harness-control-plane/frame-mapper.d.ts +29 -0
- package/dist/types/harness-control-plane/operate.d.ts +35 -0
- package/dist/types/harness-control-plane/owner.d.ts +46 -0
- package/dist/types/harness-control-plane/preserve.d.ts +19 -0
- package/dist/types/harness-control-plane/receipts.d.ts +88 -0
- package/dist/types/harness-control-plane/rpc-adapter.d.ts +66 -0
- package/dist/types/harness-control-plane/seams.d.ts +21 -0
- package/dist/types/harness-control-plane/session-lease.d.ts +65 -0
- package/dist/types/harness-control-plane/state-machine.d.ts +19 -0
- package/dist/types/harness-control-plane/storage.d.ts +53 -0
- package/dist/types/harness-control-plane/types.d.ts +162 -0
- package/dist/types/hooks/skill-keywords.d.ts +2 -1
- package/dist/types/hooks/skill-state.d.ts +2 -29
- package/dist/types/modes/acp/acp-client-bridge.d.ts +1 -1
- package/dist/types/modes/components/hook-selector.d.ts +1 -0
- package/dist/types/modes/components/skill-hud/render.d.ts +1 -1
- package/dist/types/modes/interactive-mode.d.ts +2 -0
- package/dist/types/modes/theme/defaults/index.d.ts +45 -9477
- package/dist/types/modes/theme/theme.d.ts +1 -5
- package/dist/types/modes/types.d.ts +2 -0
- package/dist/types/sdk.d.ts +4 -0
- package/dist/types/session/agent-session.d.ts +8 -0
- package/dist/types/session/streaming-output.d.ts +11 -0
- package/dist/types/skill-state/active-state.d.ts +3 -0
- package/dist/types/skill-state/deep-interview-mutation-guard.d.ts +1 -1
- package/dist/types/skill-state/workflow-state-contract.d.ts +24 -0
- package/dist/types/task/executor.d.ts +3 -0
- package/dist/types/task/types.d.ts +56 -3
- package/dist/types/tools/bash-allowed-prefixes.d.ts +5 -0
- package/dist/types/tools/bash.d.ts +24 -0
- package/dist/types/tools/cron.d.ts +110 -0
- package/dist/types/tools/index.d.ts +4 -0
- package/dist/types/tools/monitor.d.ts +54 -0
- package/dist/types/tools/subagent.d.ts +11 -1
- package/dist/types/web/search/index.d.ts +1 -0
- package/dist/types/web/search/provider.d.ts +11 -4
- package/dist/types/web/search/providers/duckduckgo.d.ts +57 -0
- package/dist/types/web/search/types.d.ts +1 -1
- package/package.json +7 -7
- package/src/async/job-manager.ts +522 -6
- package/src/cli/agents-cli.ts +3 -0
- package/src/cli/auth-broker-cli.ts +1 -0
- package/src/cli/config-cli.ts +10 -2
- package/src/cli.ts +2 -0
- package/src/commands/harness.ts +592 -0
- package/src/commands/team.ts +36 -39
- package/src/config/settings-schema.ts +15 -2
- package/src/config/settings.ts +49 -7
- package/src/deep-interview/render-middleware.ts +366 -0
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +9 -2
- package/src/defaults/gjc/skills/ralplan/SKILL.md +8 -4
- package/src/defaults/gjc/skills/team/SKILL.md +47 -21
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +78 -11
- package/src/discovery/helpers.ts +5 -0
- package/src/eval/js/shared/rewrite-imports.ts +1 -2
- package/src/exec/bash-executor.ts +20 -9
- package/src/extensibility/custom-tools/types.ts +1 -0
- package/src/extensibility/extensions/types.ts +6 -0
- package/src/extensibility/shared-events.ts +1 -0
- package/src/gjc-runtime/deep-interview-runtime.ts +40 -21
- package/src/gjc-runtime/goal-mode-request.ts +11 -3
- package/src/gjc-runtime/ralplan-runtime.ts +27 -10
- package/src/gjc-runtime/restricted-role-agent-bash.ts +5 -0
- package/src/gjc-runtime/state-graph.ts +86 -0
- package/src/gjc-runtime/state-migrations.ts +132 -0
- package/src/gjc-runtime/state-renderer.ts +345 -0
- package/src/gjc-runtime/state-runtime.ts +733 -21
- package/src/gjc-runtime/state-validation.ts +49 -0
- package/src/gjc-runtime/state-writer.ts +718 -0
- package/src/gjc-runtime/team-runtime.ts +1083 -89
- package/src/gjc-runtime/ultragoal-runtime.ts +348 -19
- package/src/gjc-runtime/workflow-manifest.generated.json +1497 -0
- package/src/gjc-runtime/workflow-manifest.ts +425 -0
- package/src/harness-control-plane/classifier.ts +128 -0
- package/src/harness-control-plane/control-endpoint.ts +137 -0
- package/src/harness-control-plane/finalize.ts +222 -0
- package/src/harness-control-plane/frame-mapper.ts +286 -0
- package/src/harness-control-plane/operate.ts +225 -0
- package/src/harness-control-plane/owner.ts +553 -0
- package/src/harness-control-plane/preserve.ts +102 -0
- package/src/harness-control-plane/receipts.ts +216 -0
- package/src/harness-control-plane/rpc-adapter.ts +276 -0
- package/src/harness-control-plane/seams.ts +39 -0
- package/src/harness-control-plane/session-lease.ts +388 -0
- package/src/harness-control-plane/state-machine.ts +97 -0
- package/src/harness-control-plane/storage.ts +257 -0
- package/src/harness-control-plane/types.ts +214 -0
- package/src/hooks/skill-keywords.ts +4 -2
- package/src/hooks/skill-state.ts +25 -42
- package/src/internal-urls/docs-index.generated.ts +6 -4
- package/src/lsp/render.ts +1 -1
- package/src/modes/acp/acp-agent.ts +1 -1
- package/src/modes/acp/acp-client-bridge.ts +1 -1
- package/src/modes/components/agent-dashboard.ts +1 -1
- package/src/modes/components/assistant-message.ts +5 -1
- package/src/modes/components/diff.ts +2 -2
- package/src/modes/components/hook-selector.ts +72 -2
- package/src/modes/components/skill-hud/render.ts +7 -2
- package/src/modes/controllers/event-controller.ts +71 -6
- package/src/modes/controllers/extension-ui-controller.ts +6 -0
- package/src/modes/controllers/input-controller.ts +19 -3
- package/src/modes/controllers/selector-controller.ts +3 -2
- package/src/modes/interactive-mode.ts +21 -2
- package/src/modes/theme/defaults/index.ts +0 -196
- package/src/modes/theme/theme.ts +35 -35
- package/src/modes/types.ts +2 -0
- package/src/prompts/agents/architect.md +5 -1
- package/src/prompts/agents/critic.md +5 -1
- package/src/prompts/agents/executor.md +13 -0
- package/src/prompts/agents/frontmatter.md +1 -0
- package/src/prompts/agents/planner.md +5 -1
- package/src/prompts/tools/bash.md +9 -0
- package/src/prompts/tools/cron.md +25 -0
- package/src/prompts/tools/monitor.md +30 -0
- package/src/prompts/tools/subagent.md +33 -3
- package/src/runtime-mcp/oauth-flow.ts +4 -2
- package/src/sdk.ts +7 -0
- package/src/session/agent-session.ts +247 -38
- package/src/session/session-manager.ts +13 -1
- package/src/session/streaming-output.ts +21 -0
- package/src/skill-state/active-state.ts +222 -78
- package/src/skill-state/deep-interview-mutation-guard.ts +91 -13
- package/src/skill-state/initial-phase.ts +2 -0
- package/src/skill-state/workflow-state-contract.ts +26 -0
- package/src/task/agents.ts +1 -0
- package/src/task/executor.ts +51 -8
- package/src/task/index.ts +120 -8
- package/src/task/render.ts +6 -3
- package/src/task/types.ts +57 -3
- package/src/tools/ask.ts +28 -7
- package/src/tools/bash-allowed-prefixes.ts +169 -0
- package/src/tools/bash.ts +190 -29
- package/src/tools/browser/tab-worker.ts +1 -1
- package/src/tools/cron.ts +665 -0
- package/src/tools/index.ts +20 -2
- package/src/tools/monitor.ts +136 -0
- package/src/tools/subagent.ts +255 -64
- package/src/vim/engine.ts +3 -3
- package/src/web/search/index.ts +31 -18
- package/src/web/search/provider.ts +57 -12
- package/src/web/search/providers/duckduckgo.ts +279 -0
- package/src/web/search/types.ts +2 -0
- package/src/modes/theme/dark.json +0 -95
- package/src/modes/theme/defaults/alabaster.json +0 -93
- package/src/modes/theme/defaults/amethyst.json +0 -96
- package/src/modes/theme/defaults/anthracite.json +0 -93
- package/src/modes/theme/defaults/basalt.json +0 -91
- package/src/modes/theme/defaults/birch.json +0 -95
- package/src/modes/theme/defaults/dark-abyss.json +0 -91
- package/src/modes/theme/defaults/dark-arctic.json +0 -104
- package/src/modes/theme/defaults/dark-aurora.json +0 -95
- package/src/modes/theme/defaults/dark-catppuccin.json +0 -107
- package/src/modes/theme/defaults/dark-cavern.json +0 -91
- package/src/modes/theme/defaults/dark-copper.json +0 -95
- package/src/modes/theme/defaults/dark-cosmos.json +0 -90
- package/src/modes/theme/defaults/dark-cyberpunk.json +0 -102
- package/src/modes/theme/defaults/dark-dracula.json +0 -98
- package/src/modes/theme/defaults/dark-eclipse.json +0 -91
- package/src/modes/theme/defaults/dark-ember.json +0 -95
- package/src/modes/theme/defaults/dark-equinox.json +0 -90
- package/src/modes/theme/defaults/dark-forest.json +0 -96
- package/src/modes/theme/defaults/dark-github.json +0 -105
- package/src/modes/theme/defaults/dark-gruvbox.json +0 -112
- package/src/modes/theme/defaults/dark-lavender.json +0 -95
- package/src/modes/theme/defaults/dark-lunar.json +0 -89
- package/src/modes/theme/defaults/dark-midnight.json +0 -95
- package/src/modes/theme/defaults/dark-monochrome.json +0 -94
- package/src/modes/theme/defaults/dark-monokai.json +0 -98
- package/src/modes/theme/defaults/dark-nebula.json +0 -90
- package/src/modes/theme/defaults/dark-nord.json +0 -97
- package/src/modes/theme/defaults/dark-ocean.json +0 -101
- package/src/modes/theme/defaults/dark-one.json +0 -100
- package/src/modes/theme/defaults/dark-poimandres.json +0 -141
- package/src/modes/theme/defaults/dark-rainforest.json +0 -91
- package/src/modes/theme/defaults/dark-reef.json +0 -91
- package/src/modes/theme/defaults/dark-retro.json +0 -92
- package/src/modes/theme/defaults/dark-rose-pine.json +0 -96
- package/src/modes/theme/defaults/dark-sakura.json +0 -95
- package/src/modes/theme/defaults/dark-slate.json +0 -95
- package/src/modes/theme/defaults/dark-solarized.json +0 -97
- package/src/modes/theme/defaults/dark-solstice.json +0 -90
- package/src/modes/theme/defaults/dark-starfall.json +0 -91
- package/src/modes/theme/defaults/dark-sunset.json +0 -99
- package/src/modes/theme/defaults/dark-swamp.json +0 -90
- package/src/modes/theme/defaults/dark-synthwave.json +0 -103
- package/src/modes/theme/defaults/dark-taiga.json +0 -91
- package/src/modes/theme/defaults/dark-terminal.json +0 -95
- package/src/modes/theme/defaults/dark-tokyo-night.json +0 -101
- package/src/modes/theme/defaults/dark-tundra.json +0 -91
- package/src/modes/theme/defaults/dark-twilight.json +0 -91
- package/src/modes/theme/defaults/dark-volcanic.json +0 -91
- package/src/modes/theme/defaults/graphite.json +0 -92
- package/src/modes/theme/defaults/light-arctic.json +0 -107
- package/src/modes/theme/defaults/light-aurora-day.json +0 -91
- package/src/modes/theme/defaults/light-canyon.json +0 -91
- package/src/modes/theme/defaults/light-catppuccin.json +0 -106
- package/src/modes/theme/defaults/light-cirrus.json +0 -90
- package/src/modes/theme/defaults/light-coral.json +0 -95
- package/src/modes/theme/defaults/light-cyberpunk.json +0 -96
- package/src/modes/theme/defaults/light-dawn.json +0 -90
- package/src/modes/theme/defaults/light-dunes.json +0 -91
- package/src/modes/theme/defaults/light-eucalyptus.json +0 -95
- package/src/modes/theme/defaults/light-forest.json +0 -100
- package/src/modes/theme/defaults/light-frost.json +0 -95
- package/src/modes/theme/defaults/light-github.json +0 -115
- package/src/modes/theme/defaults/light-glacier.json +0 -91
- package/src/modes/theme/defaults/light-gruvbox.json +0 -108
- package/src/modes/theme/defaults/light-haze.json +0 -90
- package/src/modes/theme/defaults/light-honeycomb.json +0 -95
- package/src/modes/theme/defaults/light-lagoon.json +0 -91
- package/src/modes/theme/defaults/light-lavender.json +0 -95
- package/src/modes/theme/defaults/light-meadow.json +0 -91
- package/src/modes/theme/defaults/light-mint.json +0 -95
- package/src/modes/theme/defaults/light-monochrome.json +0 -101
- package/src/modes/theme/defaults/light-ocean.json +0 -99
- package/src/modes/theme/defaults/light-one.json +0 -99
- package/src/modes/theme/defaults/light-opal.json +0 -91
- package/src/modes/theme/defaults/light-orchard.json +0 -91
- package/src/modes/theme/defaults/light-paper.json +0 -95
- package/src/modes/theme/defaults/light-poimandres.json +0 -141
- package/src/modes/theme/defaults/light-prism.json +0 -90
- package/src/modes/theme/defaults/light-retro.json +0 -98
- package/src/modes/theme/defaults/light-sand.json +0 -95
- package/src/modes/theme/defaults/light-savanna.json +0 -91
- package/src/modes/theme/defaults/light-solarized.json +0 -102
- package/src/modes/theme/defaults/light-soleil.json +0 -90
- package/src/modes/theme/defaults/light-sunset.json +0 -99
- package/src/modes/theme/defaults/light-synthwave.json +0 -98
- package/src/modes/theme/defaults/light-tokyo-night.json +0 -111
- package/src/modes/theme/defaults/light-wetland.json +0 -91
- package/src/modes/theme/defaults/light-zenith.json +0 -89
- package/src/modes/theme/defaults/limestone.json +0 -94
- package/src/modes/theme/defaults/mahogany.json +0 -97
- package/src/modes/theme/defaults/marble.json +0 -93
- package/src/modes/theme/defaults/obsidian.json +0 -91
- package/src/modes/theme/defaults/onyx.json +0 -91
- package/src/modes/theme/defaults/pearl.json +0 -93
- package/src/modes/theme/defaults/porcelain.json +0 -91
- package/src/modes/theme/defaults/quartz.json +0 -96
- package/src/modes/theme/defaults/sandstone.json +0 -95
- package/src/modes/theme/defaults/titanium.json +0 -90
- package/src/modes/theme/light.json +0 -93
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.3.0] - 2026-06-03
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added runtime-enforced Ultragoal executor QA/red-team evidence matrices for completion checkpoints, with plan-first contract coverage, user-surface evidence, adversarial cases, artifact references, scoped Executor red-team guidance, and focused rejection tests for shallow or contradictory QA evidence.
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Clarified that `gjc team` requires an existing tmux-backed leader session from `gjc --tmux`, with actionable help, docs, and failure text.
|
|
13
|
+
- Kept deep-interview ask options visible for long prompts by adding an opt-in scrollable selector title panel with selector-local `PageUp`/`PageDown` prompt scrolling, while leaving normal ask dialogs and global keybinding configuration unchanged.
|
|
14
|
+
|
|
15
|
+
## [0.2.5] - 2026-06-02
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Added Claude Code parity `monitor` plus `CronCreate`, `CronList`, and `CronDelete` tools with frozen upstream schema fixtures, inline scheduling, background output monitoring, and ACP permission coverage.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Pruned bundled built-in themes to `red-claw` and `blue-crab`, with `blue-crab` now the default light-appearance theme.
|
|
24
|
+
- Clarified ralplan role-agent handoff guidance so Planner/Architect/Critic return compact artifact receipts after `gjc ralplan --write --json` instead of duplicating full persisted verdict markdown into the parent context.
|
|
25
|
+
- Made `web_search` permissionless by default with a keyless DuckDuckGo fallback, active-model-gated native provider selection, and explicit-only legacy provider selection so custom providers no longer auto-hit stray OpenAI/Codex OAuth credentials.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- Fixed the skill HUD rail showing already-handed-off planning workflows so it renders only the currently-active stage. Handoffs now supersede every same-session-scope row of the caller and callee skills (not just the exact `skill::session_id` key), the visible-state read collapses duplicate same-skill rows to the most-recent one (so a handoff demotion drops a stale `active:true` row and on-disk state self-heals), and the HUD renderer collapses the `deep-interview → ralplan → ultragoal` pipeline to its most-recent stage. Activating a later stage (e.g. `gjc ultragoal` after ralplan) now supersedes the earlier one even when the activation path does not run the `handoff` verb, while `team` still coexists with ultragoal.
|
|
30
|
+
|
|
5
31
|
## [0.2.4] - 2026-06-02
|
|
6
32
|
|
|
7
33
|
### Added
|
|
@@ -40,6 +66,7 @@
|
|
|
40
66
|
### Fixed
|
|
41
67
|
|
|
42
68
|
- Enforced the deep-interview phase boundary so active interviews block mutation tools until a handoff/spec is produced.
|
|
69
|
+
- Allowed read-only `architect`, `planner`, and `critic` role agents to persist ralplan/state workflow receipts through a restricted `bash` allowlist while blocking general shell and product-file mutations.
|
|
43
70
|
- Made settings theme browsing confirm-only so arrowing through themes no longer changes the rendered theme before the displayed/persisted theme name changes.
|
|
44
71
|
- 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.
|
|
45
72
|
- Registered `gjc update` as a public root subcommand so it invokes the bundled updater instead of routing into the interactive launcher.
|
package/README.md
CHANGED
|
@@ -34,4 +34,4 @@ Switching backends mid-session is honoured on the next system-prompt rebuild and
|
|
|
34
34
|
|
|
35
35
|
## Red-claw TUI theme
|
|
36
36
|
|
|
37
|
-
The interactive TUI defaults to the bundled `red-claw` crustacean theme for dark terminals, with matching welcome/icon assets. Explicit user theme settings still win; set `theme.dark: red-claw` in `~/.gjc/agent/config.yml` to pin
|
|
37
|
+
The interactive TUI defaults to the bundled `red-claw` crustacean theme for dark terminals and the bundled `blue-crab` theme for light-appearance terminals, with matching welcome/icon assets. Explicit user theme settings still win; set `theme.dark: red-claw` and `theme.light: blue-crab` in `~/.gjc/agent/config.yml` to pin them.
|
|
@@ -2,7 +2,7 @@ import type { AgentSource } from "../task/types";
|
|
|
2
2
|
export interface AsyncJob {
|
|
3
3
|
id: string;
|
|
4
4
|
type: "bash" | "task";
|
|
5
|
-
status: "running" | "completed" | "failed" | "cancelled";
|
|
5
|
+
status: "running" | "completed" | "failed" | "cancelled" | "paused";
|
|
6
6
|
startTime: number;
|
|
7
7
|
label: string;
|
|
8
8
|
abortController: AbortController;
|
|
@@ -27,6 +27,61 @@ export interface AsyncJobMetadata {
|
|
|
27
27
|
assignment?: string;
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Typed outcome a subagent task run may produce. A `paused` outcome is
|
|
32
|
+
* non-terminal and non-delivering: the run suspended at a safe boundary and the
|
|
33
|
+
* subagent can be resumed from its persisted sessionFile. `completed` always
|
|
34
|
+
* wins a race with a late pause because the run returns it once it has actually
|
|
35
|
+
* finished.
|
|
36
|
+
*/
|
|
37
|
+
export type SubagentRunOutcome = {
|
|
38
|
+
kind: "completed";
|
|
39
|
+
text: string;
|
|
40
|
+
} | {
|
|
41
|
+
kind: "paused";
|
|
42
|
+
note?: string;
|
|
43
|
+
};
|
|
44
|
+
/** Canonical lifecycle of a subagent across pause/resume cycles. */
|
|
45
|
+
export type SubagentLifecycle = "running" | "paused" | "queued" | "completed" | "failed" | "cancelled";
|
|
46
|
+
/**
|
|
47
|
+
* Live, executor-owned control handle for a RUNNING subagent. Registered when a
|
|
48
|
+
* subagent run starts and removed on pause/terminal so a paused subagent retains
|
|
49
|
+
* no live `AgentSession` reference (leak-free).
|
|
50
|
+
*/
|
|
51
|
+
export interface SubagentLiveHandle {
|
|
52
|
+
/** Request a cooperative safe-boundary pause (never aborts the in-flight tool). */
|
|
53
|
+
requestPause(): void;
|
|
54
|
+
/** Inject a steering message into the live session. */
|
|
55
|
+
injectMessage(content: string, deliverAs: "steer" | "followUp" | "nextTurn"): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Canonical, stable-id-keyed record for a subagent. Survives `AsyncJob`
|
|
59
|
+
* eviction so resume stays addressable by subagent id, and is the single source
|
|
60
|
+
* of truth for control-plane status and identity.
|
|
61
|
+
*/
|
|
62
|
+
export interface SubagentRecord {
|
|
63
|
+
subagentId: string;
|
|
64
|
+
ownerId?: string;
|
|
65
|
+
/** Current live/last AsyncJob id; null while queued with no active job. */
|
|
66
|
+
currentJobId: string | null;
|
|
67
|
+
historicalJobIds: string[];
|
|
68
|
+
status: SubagentLifecycle;
|
|
69
|
+
sessionFile: string | null;
|
|
70
|
+
/** False for ephemeral sessions (no persistent artifacts dir). */
|
|
71
|
+
resumable: boolean;
|
|
72
|
+
queued?: {
|
|
73
|
+
ownerId?: string;
|
|
74
|
+
seq: number;
|
|
75
|
+
message?: string;
|
|
76
|
+
createdAt: number;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/** Lightweight, manager-owned resume payload. The async layer treats `data` as opaque. */
|
|
80
|
+
export interface ResumeDescriptor {
|
|
81
|
+
subagentId: string;
|
|
82
|
+
ownerId?: string;
|
|
83
|
+
data: unknown;
|
|
84
|
+
}
|
|
30
85
|
export interface AsyncJobManagerOptions {
|
|
31
86
|
onJobComplete: (jobId: string, text: string, job?: AsyncJob) => void | Promise<void>;
|
|
32
87
|
maxRunningJobs?: number;
|
|
@@ -54,6 +109,27 @@ export interface AsyncJobRegisterOptions {
|
|
|
54
109
|
export interface AsyncJobFilter {
|
|
55
110
|
ownerId?: string;
|
|
56
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* A slice of process-stream output for a background job, as recorded by
|
|
114
|
+
* `appendOutput` / read by `readOutputSince`.
|
|
115
|
+
*
|
|
116
|
+
* The cursor model is monotonic UTF-8 byte offsets. `nextOffset` is the offset
|
|
117
|
+
* to pass to the next read to receive only fresh bytes; `startOffset` is the
|
|
118
|
+
* first byte the manager still retains for this job. When the requested offset
|
|
119
|
+
* is older than `startOffset`, the manager returns the retained tail and sets
|
|
120
|
+
* `truncated: true`.
|
|
121
|
+
*/
|
|
122
|
+
export interface AsyncJobOutputSlice {
|
|
123
|
+
jobId: string;
|
|
124
|
+
status: AsyncJob["status"];
|
|
125
|
+
text: string;
|
|
126
|
+
startOffset: number;
|
|
127
|
+
nextOffset: number;
|
|
128
|
+
truncated: boolean;
|
|
129
|
+
}
|
|
130
|
+
/** Default retention cap for per-job captured output. ~512 KiB matches the
|
|
131
|
+
* bash tail-buffer order of magnitude without dominating session memory. */
|
|
132
|
+
export declare const DEFAULT_JOB_OUTPUT_RETENTION_BYTES: number;
|
|
57
133
|
export declare class AsyncJobManager {
|
|
58
134
|
#private;
|
|
59
135
|
/** Process-global instance shared by internal URL protocol handlers and tools. */
|
|
@@ -67,17 +143,84 @@ export declare class AsyncJobManager {
|
|
|
67
143
|
jobId: string;
|
|
68
144
|
signal: AbortSignal;
|
|
69
145
|
reportProgress: (text: string, details?: Record<string, unknown>) => Promise<void>;
|
|
70
|
-
}) => Promise<string>, options?: AsyncJobRegisterOptions): string;
|
|
146
|
+
}) => Promise<string | SubagentRunOutcome>, options?: AsyncJobRegisterOptions): string;
|
|
71
147
|
/**
|
|
72
148
|
* Cancel a single job by id. When `filter.ownerId` is set and does not
|
|
73
149
|
* match the job's owner, the call is treated as not-found (returns false)
|
|
74
150
|
* so cross-agent cancellation is rejected at the manager level.
|
|
75
151
|
*/
|
|
76
152
|
cancel(id: string, filter?: AsyncJobFilter): boolean;
|
|
153
|
+
/** Register or replace the canonical record for a subagent. */
|
|
154
|
+
registerSubagentRecord(record: SubagentRecord): void;
|
|
155
|
+
getSubagentRecord(subagentId: string, filter?: AsyncJobFilter): SubagentRecord | undefined;
|
|
156
|
+
getSubagentRecords(filter?: AsyncJobFilter): SubagentRecord[];
|
|
157
|
+
registerLiveHandle(subagentId: string, handle: SubagentLiveHandle): void;
|
|
158
|
+
getLiveHandle(subagentId: string): SubagentLiveHandle | undefined;
|
|
159
|
+
removeLiveHandle(subagentId: string): void;
|
|
160
|
+
/** Install the TaskTool-owned resume runner. Returns the new job id, or undefined on failure. */
|
|
161
|
+
setResumeRunner(runner: (subagentId: string, message?: string, descriptor?: ResumeDescriptor) => string | undefined): void;
|
|
162
|
+
registerResumeDescriptor(descriptor: ResumeDescriptor): void;
|
|
163
|
+
getResumeDescriptor(subagentId: string, filter?: AsyncJobFilter): ResumeDescriptor | undefined;
|
|
164
|
+
/** Request a graceful safe-boundary pause of a running subagent. */
|
|
165
|
+
pauseSubagent(subagentId: string, filter?: AsyncJobFilter): {
|
|
166
|
+
ok: boolean;
|
|
167
|
+
status?: SubagentLifecycle;
|
|
168
|
+
reason?: string;
|
|
169
|
+
};
|
|
170
|
+
/** Resume a non-running subagent from its sessionFile, optionally injecting a message first. */
|
|
171
|
+
resumeSubagent(subagentId: string, filter?: AsyncJobFilter, message?: string): {
|
|
172
|
+
ok: boolean;
|
|
173
|
+
status?: SubagentLifecycle;
|
|
174
|
+
jobId?: string;
|
|
175
|
+
queued?: boolean;
|
|
176
|
+
reason?: string;
|
|
177
|
+
};
|
|
178
|
+
/** Cancel a subagent by stable id across running/paused/queued states (keeps the session file). */
|
|
179
|
+
cancelSubagent(subagentId: string, filter?: AsyncJobFilter): boolean;
|
|
77
180
|
getJob(id: string): AsyncJob | undefined;
|
|
78
181
|
getRunningJobs(filter?: AsyncJobFilter): AsyncJob[];
|
|
79
182
|
getRecentJobs(limit?: number, filter?: AsyncJobFilter): AsyncJob[];
|
|
80
183
|
getAllJobs(filter?: AsyncJobFilter): AsyncJob[];
|
|
184
|
+
/**
|
|
185
|
+
* Append a sanitized process-stream chunk for a background job. Called from
|
|
186
|
+
* the unthrottled bash-executor capture hook (`onRawChunk`) so monitor sees
|
|
187
|
+
* every chunk even when preview/progress callbacks are throttled.
|
|
188
|
+
*
|
|
189
|
+
* Offsets are in UTF-8 bytes. Storing chunk metadata avoids unsafe byte
|
|
190
|
+
* slicing across multibyte characters at read time. The retention window is
|
|
191
|
+
* a per-job rolling cap (`DEFAULT_JOB_OUTPUT_RETENTION_BYTES`); when it
|
|
192
|
+
* overflows, oldest whole chunks are evicted and `startOffset` advances —
|
|
193
|
+
* subsequent reads from a stale offset get `truncated: true`.
|
|
194
|
+
*/
|
|
195
|
+
appendOutput(jobId: string, chunk: string): void;
|
|
196
|
+
/**
|
|
197
|
+
* Read fresh process-stream output for a job since `offset` (in UTF-8
|
|
198
|
+
* bytes). Returns `undefined` when the job does not exist or when an
|
|
199
|
+
* `ownerId` filter is set and the job belongs to a different owner — this
|
|
200
|
+
* mirrors the manager-level "not found" pattern used by `cancel`.
|
|
201
|
+
*
|
|
202
|
+
* - `offset < startOffset` returns the retained tail with `truncated: true`.
|
|
203
|
+
* - `offset > nextOffset` clamps to `nextOffset` and returns an empty text
|
|
204
|
+
* slice with `truncated: false`.
|
|
205
|
+
* - Assembled text slices the leading retained chunk at a UTF-8 codepoint
|
|
206
|
+
* boundary when needed, so multibyte characters cannot be split.
|
|
207
|
+
*/
|
|
208
|
+
readOutputSince(jobId: string, offset: number, filter?: AsyncJobFilter): AsyncJobOutputSlice | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Register an owner-scoped cleanup callback. Returns an unregister function.
|
|
211
|
+
*
|
|
212
|
+
* Used by Cron* tools to clear session-scoped timers when the owning agent
|
|
213
|
+
* is torn down. Invoked by `runOwnerCleanups({ ownerId })` before
|
|
214
|
+
* `cancelAll({ ownerId })` so timers cannot register new jobs during
|
|
215
|
+
* teardown.
|
|
216
|
+
*/
|
|
217
|
+
registerOwnerCleanup(ownerId: string, cleanup: () => void): () => void;
|
|
218
|
+
/**
|
|
219
|
+
* Run and clear every registered cleanup for the given filter. Idempotent
|
|
220
|
+
* and error-isolated: a throwing cleanup does not prevent siblings from
|
|
221
|
+
* running and never escalates to the caller.
|
|
222
|
+
*/
|
|
223
|
+
runOwnerCleanups(filter?: AsyncJobFilter): void;
|
|
81
224
|
getDeliveryState(filter?: AsyncJobFilter): AsyncJobDeliveryState;
|
|
82
225
|
hasPendingDeliveries(filter?: AsyncJobFilter): boolean;
|
|
83
226
|
watchJobs(jobIds: string[]): number;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Command } from "@gajae-code/utils/cli";
|
|
2
|
+
export default class Harness extends Command {
|
|
3
|
+
#private;
|
|
4
|
+
static description: string;
|
|
5
|
+
static strict: boolean;
|
|
6
|
+
static args: {
|
|
7
|
+
verb: import("@gajae-code/utils/cli").ArgDescriptor & {
|
|
8
|
+
description: string;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
static flags: {
|
|
13
|
+
input: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
14
|
+
description: string;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
session: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
18
|
+
char: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
cursor: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
|
|
22
|
+
description: string;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
follow: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
26
|
+
description: string;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
30
|
+
char: string;
|
|
31
|
+
description: string;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
static examples: string[];
|
|
36
|
+
run(): Promise<void>;
|
|
37
|
+
}
|
|
@@ -74,6 +74,7 @@ interface StringDef {
|
|
|
74
74
|
interface NumberDef {
|
|
75
75
|
type: "number";
|
|
76
76
|
default: number;
|
|
77
|
+
validate?: (value: number) => boolean;
|
|
77
78
|
ui?: UiNumber;
|
|
78
79
|
}
|
|
79
80
|
interface EnumDef<T extends readonly string[]> {
|
|
@@ -200,6 +201,11 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
200
201
|
readonly type: "array";
|
|
201
202
|
readonly default: string[];
|
|
202
203
|
};
|
|
204
|
+
readonly "gjc.deepInterview.ambiguityThreshold": {
|
|
205
|
+
readonly type: "number";
|
|
206
|
+
readonly default: 0.05;
|
|
207
|
+
readonly validate: (value: number) => boolean;
|
|
208
|
+
};
|
|
203
209
|
readonly "theme.dark": {
|
|
204
210
|
readonly type: "string";
|
|
205
211
|
readonly default: "red-claw";
|
|
@@ -212,7 +218,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
212
218
|
};
|
|
213
219
|
readonly "theme.light": {
|
|
214
220
|
readonly type: "string";
|
|
215
|
-
readonly default: "
|
|
221
|
+
readonly default: "blue-crab";
|
|
216
222
|
readonly ui: {
|
|
217
223
|
readonly tab: "appearance";
|
|
218
224
|
readonly label: "Light Theme";
|
|
@@ -2917,7 +2923,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2917
2923
|
};
|
|
2918
2924
|
readonly "providers.webSearch": {
|
|
2919
2925
|
readonly type: "enum";
|
|
2920
|
-
readonly values: readonly ["auto", "exa", "brave", "jina", "kimi", "zai", "perplexity", "anthropic", "gemini", "codex", "tavily", "kagi", "synthetic", "parallel", "searxng"];
|
|
2926
|
+
readonly values: readonly ["auto", "duckduckgo", "exa", "brave", "jina", "kimi", "zai", "perplexity", "anthropic", "gemini", "codex", "tavily", "kagi", "synthetic", "parallel", "searxng"];
|
|
2921
2927
|
readonly default: "auto";
|
|
2922
2928
|
readonly ui: {
|
|
2923
2929
|
readonly tab: "providers";
|
|
@@ -2926,7 +2932,11 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2926
2932
|
readonly options: readonly [{
|
|
2927
2933
|
readonly value: "auto";
|
|
2928
2934
|
readonly label: "Auto";
|
|
2929
|
-
readonly description: "
|
|
2935
|
+
readonly description: "Active model's native search if its creds exist, else keyless DuckDuckGo";
|
|
2936
|
+
}, {
|
|
2937
|
+
readonly value: "duckduckgo";
|
|
2938
|
+
readonly label: "DuckDuckGo";
|
|
2939
|
+
readonly description: "Keyless default \u2014 no API key or OAuth required";
|
|
2930
2940
|
}, {
|
|
2931
2941
|
readonly value: "exa";
|
|
2932
2942
|
readonly label: "Exa";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* import { settings } from "./settings";
|
|
6
6
|
*
|
|
7
7
|
* const enabled = settings.get("compaction.enabled"); // sync read
|
|
8
|
-
* settings.set("theme.dark", "
|
|
8
|
+
* settings.set("theme.dark", "red-claw"); // sync write, saves in background
|
|
9
9
|
*
|
|
10
10
|
* For tests:
|
|
11
11
|
* const isolated = Settings.isolated({ "compaction.enabled": false });
|
|
@@ -54,6 +54,8 @@ export declare class Settings {
|
|
|
54
54
|
* Returns the merged value from global + project + overrides, or the default.
|
|
55
55
|
*/
|
|
56
56
|
get<P extends SettingPath>(path: P): SettingValue<P>;
|
|
57
|
+
/** Check whether a setting is present in loaded settings/overrides rather than coming from schema defaults. */
|
|
58
|
+
has(path: SettingPath): boolean;
|
|
57
59
|
/**
|
|
58
60
|
* Set a setting value (sync).
|
|
59
61
|
* Updates global settings and queues a background save.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Component } from "@gajae-code/tui";
|
|
2
|
+
import { type Theme } from "../modes/theme/theme";
|
|
3
|
+
export declare function renderDeepInterviewAssistantText(text: string, uiTheme: Theme): Component | null;
|
|
4
|
+
export declare function renderDeepInterviewAskQuestion(question: string, uiTheme: Theme): Component | null;
|
|
5
|
+
export declare function formatDeepInterviewSelectorPrompt(question: string): string | null;
|
|
@@ -2,8 +2,15 @@ import { type MinimizerOptions } from "@gajae-code/natives";
|
|
|
2
2
|
import { type ShellMinimizerSettings } from "../config/settings";
|
|
3
3
|
export interface BashExecutorOptions {
|
|
4
4
|
cwd?: string;
|
|
5
|
-
timeout?: number;
|
|
5
|
+
timeout?: number | null;
|
|
6
6
|
onChunk?: (chunk: string) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Unthrottled per-chunk callback that fires for every sanitized stdout/stderr
|
|
9
|
+
* chunk *before* preview throttling. Background-job substrate uses this to
|
|
10
|
+
* record the complete process stream for the Monitor tool while keeping
|
|
11
|
+
* `onChunk` cheap for UI/progress rendering.
|
|
12
|
+
*/
|
|
13
|
+
onRawChunk?: (chunk: string) => void;
|
|
7
14
|
signal?: AbortSignal;
|
|
8
15
|
/** Session key suffix to isolate shell sessions per agent */
|
|
9
16
|
sessionKey?: string;
|
|
@@ -56,6 +56,12 @@ export interface ExtensionUIDialogOptions {
|
|
|
56
56
|
* hint; non-TUI bridges (RPC, ACP) drop it and do not serialize it.
|
|
57
57
|
*/
|
|
58
58
|
wrapFocused?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* For interactive TUI select dialogs, cap the title/prompt area to this
|
|
61
|
+
* many rows and let PageUp/PageDown scroll that prompt locally. This is a
|
|
62
|
+
* select-only rendering hint; non-TUI bridges drop it and do not serialize it.
|
|
63
|
+
*/
|
|
64
|
+
scrollTitleRows?: number;
|
|
59
65
|
}
|
|
60
66
|
/** Raw terminal input listener for extensions. */
|
|
61
67
|
export type TerminalInputHandler = (data: string) => {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CanonicalGjcWorkflowSkill } from "../skill-state/active-state";
|
|
2
|
+
export type StateGraphSkill = CanonicalGjcWorkflowSkill | "all";
|
|
3
|
+
export type StateGraphFormat = "ascii" | "mermaid" | "dot";
|
|
4
|
+
export declare function renderStateGraph(skill: StateGraphSkill, format?: string): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface NormalizeLegacyStateResult {
|
|
2
|
+
state: Record<string, unknown>;
|
|
3
|
+
changed: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface MigrateAndPersistLegacyStateArgs {
|
|
6
|
+
cwd: string;
|
|
7
|
+
skill: string;
|
|
8
|
+
statePath: string;
|
|
9
|
+
sessionId?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface MigrateAndPersistLegacyStateResult {
|
|
12
|
+
migrated: boolean;
|
|
13
|
+
path: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Pure legacy state normalizer for background/internal readers.
|
|
17
|
+
*
|
|
18
|
+
* Readers that need compatibility with old on-disk workflow state shapes must call
|
|
19
|
+
* this in-memory helper and must never call `migrateAndPersistLegacyState`. The
|
|
20
|
+
* persist variant is reserved for explicit state migration commands because it is
|
|
21
|
+
* the only path allowed to write normalized upgrades back to `.gjc/state/**`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function normalizeLegacyState(raw: Record<string, unknown>, skill: string): NormalizeLegacyStateResult;
|
|
24
|
+
export declare function migrateAndPersistLegacyState(args: MigrateAndPersistLegacyStateArgs): Promise<MigrateAndPersistLegacyStateResult>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { CanonicalGjcWorkflowSkill } from "../skill-state/active-state";
|
|
2
|
+
import type { SkillManifest } from "./workflow-manifest";
|
|
3
|
+
export declare const STATE_FIELD_ALLOWLIST: readonly ["skill", "phase", "current_phase", "next", "active", "status", "fresh", "fresh_until", "receipt", "artifact_path", "plan_path", "spec_path", "run_id", "stage", "stage_n", "session_id", "updated_at", "handoff_to", "handoff_from", "counts", "hud"];
|
|
4
|
+
export type StateProjectionField = (typeof STATE_FIELD_ALLOWLIST)[number];
|
|
5
|
+
export interface StateStatusSummary {
|
|
6
|
+
skill: CanonicalGjcWorkflowSkill;
|
|
7
|
+
phase: string;
|
|
8
|
+
active: boolean;
|
|
9
|
+
fresh: boolean;
|
|
10
|
+
fresh_until?: string;
|
|
11
|
+
next: string[];
|
|
12
|
+
receipt_status: string;
|
|
13
|
+
storage_path: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function compactProjectStateJson(skill: CanonicalGjcWorkflowSkill, stateJson: Record<string, unknown>, manifest: SkillManifest): Record<string, unknown>;
|
|
16
|
+
export declare function projectStateFields(skill: CanonicalGjcWorkflowSkill, stateJson: Record<string, unknown>, manifest: SkillManifest, fields: readonly StateProjectionField[]): Record<string, unknown>;
|
|
17
|
+
export declare function buildStateStatusSummary(skill: CanonicalGjcWorkflowSkill, stateJson: Record<string, unknown>, manifest: SkillManifest, storagePath: string): StateStatusSummary;
|
|
18
|
+
export declare function renderStateStatusLine(summary: StateStatusSummary): string;
|
|
19
|
+
export declare function renderContractMarkdown(skill: CanonicalGjcWorkflowSkill, contract: unknown): string;
|
|
20
|
+
export declare function renderHistoryMarkdown(history: {
|
|
21
|
+
entries: unknown[];
|
|
22
|
+
limit: number;
|
|
23
|
+
since?: string;
|
|
24
|
+
truncated: boolean;
|
|
25
|
+
}): string;
|
|
26
|
+
export declare function renderUltragoalStatusMarkdown(summary: {
|
|
27
|
+
exists: boolean;
|
|
28
|
+
status: string;
|
|
29
|
+
paths: {
|
|
30
|
+
goalsPath: string;
|
|
31
|
+
ledgerPath?: string;
|
|
32
|
+
};
|
|
33
|
+
gjcObjective?: string;
|
|
34
|
+
currentGoal?: {
|
|
35
|
+
id: string;
|
|
36
|
+
status: string;
|
|
37
|
+
title?: string;
|
|
38
|
+
objective?: string;
|
|
39
|
+
};
|
|
40
|
+
counts: Record<string, number>;
|
|
41
|
+
goals: unknown[];
|
|
42
|
+
}): string;
|
|
43
|
+
export declare function renderTeamStatusMarkdown(snapshot: {
|
|
44
|
+
team_name: string;
|
|
45
|
+
phase: string;
|
|
46
|
+
tmux_target?: string;
|
|
47
|
+
tmux_session?: string;
|
|
48
|
+
state_dir: string;
|
|
49
|
+
task_total: number;
|
|
50
|
+
task_counts: Record<string, number>;
|
|
51
|
+
workers: Array<{
|
|
52
|
+
id: string;
|
|
53
|
+
status: string;
|
|
54
|
+
}>;
|
|
55
|
+
notification_summary?: {
|
|
56
|
+
total: number;
|
|
57
|
+
replay_eligible: number;
|
|
58
|
+
by_state: Record<string, number>;
|
|
59
|
+
};
|
|
60
|
+
integration_by_worker?: Record<string, {
|
|
61
|
+
status?: string;
|
|
62
|
+
conflict_files?: string[];
|
|
63
|
+
}>;
|
|
64
|
+
}): string;
|
|
65
|
+
export declare function renderStateMarkdown(skill: CanonicalGjcWorkflowSkill, stateJson: Record<string, unknown>, manifest: SkillManifest): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type CanonicalGjcWorkflowSkill } from "../skill-state/active-state";
|
|
1
2
|
/**
|
|
2
3
|
* Native implementation of the `gjc state read|write|clear` command surface.
|
|
3
4
|
*
|
|
@@ -10,4 +11,5 @@ export interface StateCommandResult {
|
|
|
10
11
|
stdout?: string;
|
|
11
12
|
stderr?: string;
|
|
12
13
|
}
|
|
14
|
+
export declare function readWorkflowStateJson(cwd: string, skill: CanonicalGjcWorkflowSkill, sessionId?: string): Promise<Record<string, unknown>>;
|
|
13
15
|
export declare function runNativeStateCommand(args: string[], cwd?: string): Promise<StateCommandResult>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CanonicalGjcWorkflowSkill } from "../skill-state/active-state";
|
|
2
|
+
export interface StateValidationResult {
|
|
3
|
+
valid: boolean;
|
|
4
|
+
error?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function validateWorkflowStateEnvelope(skill: CanonicalGjcWorkflowSkill, state: unknown): StateValidationResult;
|