@gajae-code/coding-agent 0.2.5 → 0.3.1
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 +28 -0
- package/dist/types/async/job-manager.d.ts +91 -2
- package/dist/types/cli/args.d.ts +1 -1
- package/dist/types/commands/deep-interview.d.ts +3 -0
- package/dist/types/commands/harness.d.ts +37 -0
- package/dist/types/config/keybindings.d.ts +5 -0
- package/dist/types/config/settings-schema.d.ts +10 -4
- package/dist/types/config/settings.d.ts +2 -0
- package/dist/types/debug/crash-diagnostics.d.ts +45 -0
- package/dist/types/debug/runtime-gauges.d.ts +6 -0
- package/dist/types/deep-interview/render-middleware.d.ts +6 -0
- package/dist/types/eval/py/executor.d.ts +2 -0
- package/dist/types/eval/py/kernel.d.ts +2 -0
- package/dist/types/exec/bash-executor.d.ts +10 -0
- 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/cli-write-receipt.d.ts +24 -0
- package/dist/types/gjc-runtime/deep-interview-runtime.d.ts +1 -0
- package/dist/types/gjc-runtime/state-graph.d.ts +4 -0
- package/dist/types/gjc-runtime/state-migrations.d.ts +33 -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-schema.d.ts +317 -0
- package/dist/types/gjc-runtime/state-validation.d.ts +6 -0
- package/dist/types/gjc-runtime/state-writer.d.ts +147 -0
- package/dist/types/gjc-runtime/team-runtime.d.ts +81 -7
- package/dist/types/gjc-runtime/workflow-command-ref.d.ts +43 -0
- 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 +31 -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 +23 -29
- package/dist/types/internal-urls/agent-protocol.d.ts +2 -2
- package/dist/types/internal-urls/artifact-protocol.d.ts +2 -2
- package/dist/types/internal-urls/registry-helpers.d.ts +8 -7
- package/dist/types/internal-urls/types.d.ts +4 -0
- package/dist/types/lsp/index.d.ts +10 -10
- package/dist/types/modes/bridge/auth.d.ts +12 -0
- package/dist/types/modes/bridge/bridge-client-bridge.d.ts +9 -0
- package/dist/types/modes/bridge/bridge-mode.d.ts +44 -0
- package/dist/types/modes/bridge/bridge-ui-context.d.ts +88 -0
- package/dist/types/modes/bridge/event-stream.d.ts +8 -0
- package/dist/types/modes/components/custom-editor.d.ts +6 -0
- package/dist/types/modes/components/hook-selector.d.ts +1 -0
- package/dist/types/modes/components/jobs-overlay-model.d.ts +31 -0
- package/dist/types/modes/components/jobs-overlay.d.ts +30 -0
- package/dist/types/modes/components/status-line/types.d.ts +2 -0
- package/dist/types/modes/components/status-line.d.ts +2 -0
- package/dist/types/modes/controllers/input-controller.d.ts +1 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +8 -0
- package/dist/types/modes/index.d.ts +1 -0
- package/dist/types/modes/interactive-mode.d.ts +2 -0
- package/dist/types/modes/jobs-observer.d.ts +57 -0
- package/dist/types/modes/rpc/host-tools.d.ts +1 -16
- package/dist/types/modes/rpc/host-uris.d.ts +1 -38
- package/dist/types/modes/shared/agent-wire/command-dispatch.d.ts +20 -0
- package/dist/types/modes/shared/agent-wire/command-validation.d.ts +2 -0
- package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +24 -0
- package/dist/types/modes/shared/agent-wire/handshake.d.ts +46 -0
- package/dist/types/modes/shared/agent-wire/host-tool-bridge.d.ts +16 -0
- package/dist/types/modes/shared/agent-wire/host-uri-bridge.d.ts +17 -0
- package/dist/types/modes/shared/agent-wire/protocol.d.ts +44 -0
- package/dist/types/modes/shared/agent-wire/responses.d.ts +4 -0
- package/dist/types/modes/shared/agent-wire/scopes.d.ts +18 -0
- package/dist/types/modes/shared/agent-wire/ui-request-broker.d.ts +42 -0
- package/dist/types/modes/shared/agent-wire/ui-result.d.ts +27 -0
- 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 +19 -1
- package/dist/types/skill-state/active-state.d.ts +2 -0
- package/dist/types/skill-state/deep-interview-mutation-guard.d.ts +1 -1
- package/dist/types/skill-state/workflow-state-contract.d.ts +25 -2
- package/dist/types/skill-state/workflow-state-version.d.ts +3 -0
- package/dist/types/task/executor.d.ts +3 -0
- package/dist/types/task/id.d.ts +7 -0
- package/dist/types/task/index.d.ts +5 -0
- package/dist/types/task/receipt.d.ts +85 -0
- package/dist/types/task/spawn-gate.d.ts +38 -0
- package/dist/types/task/types.d.ts +198 -14
- package/dist/types/tools/cron.d.ts +6 -0
- package/dist/types/tools/index.d.ts +2 -0
- package/dist/types/tools/path-utils.d.ts +1 -0
- package/dist/types/tools/subagent.d.ts +26 -1
- package/package.json +7 -7
- package/scripts/build-binary.ts +7 -0
- package/src/async/job-manager.ts +334 -6
- package/src/cli/args.ts +9 -2
- 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/deep-interview.ts +1 -0
- package/src/commands/harness.ts +862 -0
- package/src/commands/launch.ts +2 -2
- package/src/commands/state.ts +2 -1
- package/src/commands/team.ts +54 -39
- package/src/config/keybindings.ts +6 -0
- package/src/config/settings-schema.ts +13 -3
- package/src/config/settings.ts +5 -0
- package/src/dap/client.ts +17 -3
- package/src/debug/crash-diagnostics.ts +223 -0
- package/src/debug/runtime-gauges.ts +20 -0
- package/src/deep-interview/render-middleware.ts +372 -0
- package/src/defaults/gjc/skills/deep-interview/SKILL.md +1 -1
- package/src/defaults/gjc/skills/ralplan/SKILL.md +31 -2
- package/src/defaults/gjc/skills/team/SKILL.md +47 -21
- package/src/defaults/gjc/skills/ultragoal/SKILL.md +106 -13
- package/src/eval/py/executor.ts +21 -1
- package/src/eval/py/kernel.ts +15 -0
- package/src/exec/bash-executor.ts +41 -0
- 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/cli-write-receipt.ts +31 -0
- package/src/gjc-runtime/deep-interview-runtime.ts +98 -42
- package/src/gjc-runtime/goal-mode-request.ts +11 -3
- package/src/gjc-runtime/ralplan-runtime.ts +235 -43
- package/src/gjc-runtime/state-graph.ts +86 -0
- package/src/gjc-runtime/state-migrations.ts +179 -0
- package/src/gjc-runtime/state-renderer.ts +345 -0
- package/src/gjc-runtime/state-runtime.ts +1155 -46
- package/src/gjc-runtime/state-schema.ts +192 -0
- package/src/gjc-runtime/state-validation.ts +49 -0
- package/src/gjc-runtime/state-writer.ts +749 -0
- package/src/gjc-runtime/team-runtime.ts +1255 -189
- package/src/gjc-runtime/ultragoal-runtime.ts +460 -43
- package/src/gjc-runtime/workflow-command-ref.ts +239 -0
- package/src/gjc-runtime/workflow-manifest.generated.json +1601 -0
- package/src/gjc-runtime/workflow-manifest.ts +427 -0
- package/src/harness-control-plane/classifier.ts +128 -0
- package/src/harness-control-plane/control-endpoint.ts +148 -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 +600 -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 +98 -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 +197 -64
- package/src/internal-urls/agent-protocol.ts +68 -21
- package/src/internal-urls/artifact-protocol.ts +12 -17
- package/src/internal-urls/docs-index.generated.ts +3 -2
- package/src/internal-urls/registry-helpers.ts +19 -16
- package/src/internal-urls/types.ts +4 -0
- package/src/lsp/client.ts +18 -2
- package/src/main.ts +21 -5
- package/src/modes/bridge/auth.ts +41 -0
- package/src/modes/bridge/bridge-client-bridge.ts +47 -0
- package/src/modes/bridge/bridge-mode.ts +520 -0
- package/src/modes/bridge/bridge-ui-context.ts +200 -0
- package/src/modes/bridge/event-stream.ts +70 -0
- package/src/modes/components/assistant-message.ts +5 -1
- package/src/modes/components/custom-editor.ts +101 -0
- package/src/modes/components/hook-selector.ts +133 -20
- package/src/modes/components/jobs-overlay-model.ts +109 -0
- package/src/modes/components/jobs-overlay.ts +172 -0
- package/src/modes/components/status-line/presets.ts +7 -5
- package/src/modes/components/status-line/segments.ts +25 -0
- package/src/modes/components/status-line/types.ts +2 -0
- package/src/modes/components/status-line.ts +9 -1
- package/src/modes/controllers/event-controller.ts +71 -6
- package/src/modes/controllers/extension-ui-controller.ts +43 -1
- package/src/modes/controllers/input-controller.ts +105 -9
- package/src/modes/controllers/selector-controller.ts +31 -1
- package/src/modes/index.ts +1 -0
- package/src/modes/interactive-mode.ts +28 -0
- package/src/modes/jobs-observer.ts +204 -0
- package/src/modes/rpc/host-tools.ts +1 -186
- package/src/modes/rpc/host-uris.ts +1 -235
- package/src/modes/rpc/rpc-client.ts +25 -10
- package/src/modes/rpc/rpc-mode.ts +12 -381
- package/src/modes/shared/agent-wire/command-dispatch.ts +341 -0
- package/src/modes/shared/agent-wire/command-validation.ts +131 -0
- package/src/modes/shared/agent-wire/event-envelope.ts +108 -0
- package/src/modes/shared/agent-wire/handshake.ts +117 -0
- package/src/modes/shared/agent-wire/host-tool-bridge.ts +194 -0
- package/src/modes/shared/agent-wire/host-uri-bridge.ts +236 -0
- package/src/modes/shared/agent-wire/protocol.ts +96 -0
- package/src/modes/shared/agent-wire/responses.ts +17 -0
- package/src/modes/shared/agent-wire/scopes.ts +89 -0
- package/src/modes/shared/agent-wire/ui-request-broker.ts +150 -0
- package/src/modes/shared/agent-wire/ui-result.ts +48 -0
- package/src/modes/types.ts +2 -0
- package/src/prompts/agents/executor.md +13 -0
- package/src/prompts/tools/subagent.md +39 -4
- package/src/prompts/tools/task-summary.md +3 -9
- package/src/prompts/tools/task.md +5 -1
- package/src/sdk.ts +8 -0
- package/src/session/agent-session.ts +445 -71
- package/src/session/session-manager.ts +13 -1
- package/src/skill-state/active-state.ts +58 -65
- package/src/skill-state/deep-interview-mutation-guard.ts +114 -17
- package/src/skill-state/initial-phase.ts +2 -0
- package/src/skill-state/workflow-state-contract.ts +33 -4
- package/src/skill-state/workflow-state-version.ts +3 -0
- package/src/slash-commands/builtin-registry.ts +8 -0
- package/src/task/executor.ts +79 -13
- package/src/task/id.ts +33 -0
- package/src/task/index.ts +376 -74
- package/src/task/output-manager.ts +5 -4
- package/src/task/receipt.ts +297 -0
- package/src/task/render.ts +54 -134
- package/src/task/spawn-gate.ts +132 -0
- package/src/task/types.ts +104 -10
- package/src/tools/ask.ts +88 -27
- package/src/tools/ast-edit.ts +1 -0
- package/src/tools/ast-grep.ts +1 -0
- package/src/tools/bash.ts +1 -1
- package/src/tools/cron.ts +48 -0
- package/src/tools/find.ts +4 -1
- package/src/tools/index.ts +2 -0
- package/src/tools/path-utils.ts +3 -2
- package/src/tools/read.ts +1 -0
- package/src/tools/search.ts +1 -0
- package/src/tools/skill.ts +6 -1
- package/src/tools/subagent.ts +423 -79
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.3.1] - 2026-06-05
|
|
6
|
+
### Added
|
|
7
|
+
|
|
8
|
+
- Added opt-in crash diagnostics for subprocess failures, with a shared crash taxonomy/report writer, bash/Python/LSP/DAP crash notices, and a native Rust panic-report hook gated by `GJC_NATIVE_CRASH_DIAGNOSTICS` / `GJC_CRASH_DIAGNOSTICS`.
|
|
9
|
+
- Started the GJC backend bridge foundation with a shared agent-wire protocol module, event envelopes, RPC command scope matrix, UI request broker, typed unsupported UI results, a guarded `--mode bridge` handshake surface, and RPC mode dispatch refactored onto the shared command dispatcher.
|
|
10
|
+
- Documented the experimental `--mode bridge` protocol in `docs/bridge.md` and the `GJC_BRIDGE_*` environment variables in `docs/environment-variables.md` (TLS-mandatory startup, bearer auth, coarse command scopes with a `prompt` floor, single live `AgentSession` per process, bounded event-stream replay with `reset`, and the semantic-not-pixel UI capability matrix), and added bridge event-stream/idempotency regression tests plus a docs-conformance check that pins the docs against the protocol version, scope/command catalog, negotiated capabilities/frame types, and unsupported UI surfaces. The bridge protocol/SDK are experimental (`BRIDGE_PROTOCOL_VERSION` 1) and may change in additive, version-negotiated ways.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Made opt-in crash diagnostics create/chmod report directories to `0700` and report files to `0600` so captured command, cwd, and stderr previews are private even under a permissive umask.
|
|
15
|
+
- Scoped `agent://` and `artifact://` resolution to the caller's artifacts directory plus explicitly authorized parent/child tree directories, removed registry-wide live-session lookup/enumeration, and made missing agent-output metadata sidecars fail closed.
|
|
16
|
+
- Fail-closed experimental bridge session endpoints by default for 0.3.1: events, commands, controller ownership, UI responses, host tool results, and host URI results are disabled unless an internal endpoint matrix explicitly enables them; only health/help and the authenticated handshake remain available, with the handshake advertising no enabled session surface by default.
|
|
17
|
+
- Render terminal-pasted clipboard image temp paths as compact `[image N]` prompt placeholders while attaching the image payload, instead of inserting raw `/var/folders/.../clipboard-*.png` path text.
|
|
18
|
+
- Preserved `gjc harness` `owner-vanished:*` blockers when a replacement owner becomes live so unrecovered prior-owner evidence remains visible until explicit recovery or terminal completion evidence; only safe startup liveness false-negatives such as `detached-owner-not-live` are auto-cleared.
|
|
19
|
+
- Fixed the interactive agent unexpectedly stopping after automatic context maintenance instead of resuming the in-flight task. Post-compaction continuation now schedules exactly one source per completion (overflow retry → queued messages → synthetic auto-continue prompt), the threshold/handoff auto-continue prompt skips a redundant pre-send compaction check, overflow retry strips only the context-overflow failed turn (never normal/aborted/silent-abort tails), and non-resumable or superseded continuations log a structured reason instead of stranding the session.
|
|
20
|
+
- Fixed the native Stop skill-state hook letting active GJC workflow skills stop prematurely. The Stop hook no longer treats a missing/unreadable mode-state file as terminal for handoff workflows, and handoff skills (`deep-interview`, `ralplan`) now keep blocking Stop even in the `handoff` phase until they are demoted (`active:false`) or cleared, so they always end by offering the next handoff step via the ask tool. Non-handoff skills (`team`, `ultragoal`) retain the fail-open safety valve when their mode-state file is corrupt or invalid.
|
|
21
|
+
|
|
22
|
+
## [0.3.0] - 2026-06-03
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- 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.
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- Made `gjc harness observe` preserve completed RPC owner evidence after the owner exits, including a `completedOwnerExited` diagnostic and durable terminal-result cursor.
|
|
30
|
+
- Clarified that `gjc team` requires an existing tmux-backed leader session from `gjc --tmux`, with actionable help, docs, and failure text.
|
|
31
|
+
- 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.
|
|
32
|
+
|
|
5
33
|
## [0.2.5] - 2026-06-02
|
|
6
34
|
|
|
7
35
|
### Added
|
|
@@ -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;
|
|
@@ -26,6 +26,63 @@ export interface AsyncJobMetadata {
|
|
|
26
26
|
description?: string;
|
|
27
27
|
assignment?: string;
|
|
28
28
|
};
|
|
29
|
+
/** True when this bash job was started by the `monitor` tool (vs plain async bash). */
|
|
30
|
+
monitor?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Typed outcome a subagent task run may produce. A `paused` outcome is
|
|
34
|
+
* non-terminal and non-delivering: the run suspended at a safe boundary and the
|
|
35
|
+
* subagent can be resumed from its persisted sessionFile. `completed` always
|
|
36
|
+
* wins a race with a late pause because the run returns it once it has actually
|
|
37
|
+
* finished.
|
|
38
|
+
*/
|
|
39
|
+
export type SubagentRunOutcome = {
|
|
40
|
+
kind: "completed";
|
|
41
|
+
text: string;
|
|
42
|
+
} | {
|
|
43
|
+
kind: "paused";
|
|
44
|
+
note?: string;
|
|
45
|
+
};
|
|
46
|
+
/** Canonical lifecycle of a subagent across pause/resume cycles. */
|
|
47
|
+
export type SubagentLifecycle = "running" | "paused" | "queued" | "completed" | "failed" | "cancelled";
|
|
48
|
+
/**
|
|
49
|
+
* Live, executor-owned control handle for a RUNNING subagent. Registered when a
|
|
50
|
+
* subagent run starts and removed on pause/terminal so a paused subagent retains
|
|
51
|
+
* no live `AgentSession` reference (leak-free).
|
|
52
|
+
*/
|
|
53
|
+
export interface SubagentLiveHandle {
|
|
54
|
+
/** Request a cooperative safe-boundary pause (never aborts the in-flight tool). */
|
|
55
|
+
requestPause(): void;
|
|
56
|
+
/** Inject a steering message into the live session. */
|
|
57
|
+
injectMessage(content: string, deliverAs: "steer" | "followUp" | "nextTurn"): Promise<void>;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Canonical, stable-id-keyed record for a subagent. Survives `AsyncJob`
|
|
61
|
+
* eviction so resume stays addressable by subagent id, and is the single source
|
|
62
|
+
* of truth for control-plane status and identity.
|
|
63
|
+
*/
|
|
64
|
+
export interface SubagentRecord {
|
|
65
|
+
subagentId: string;
|
|
66
|
+
ownerId?: string;
|
|
67
|
+
/** Current live/last AsyncJob id; null while queued with no active job. */
|
|
68
|
+
currentJobId: string | null;
|
|
69
|
+
historicalJobIds: string[];
|
|
70
|
+
status: SubagentLifecycle;
|
|
71
|
+
sessionFile: string | null;
|
|
72
|
+
/** False for ephemeral sessions (no persistent artifacts dir). */
|
|
73
|
+
resumable: boolean;
|
|
74
|
+
queued?: {
|
|
75
|
+
ownerId?: string;
|
|
76
|
+
seq: number;
|
|
77
|
+
message?: string;
|
|
78
|
+
createdAt: number;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/** Lightweight, manager-owned resume payload. The async layer treats `data` as opaque. */
|
|
82
|
+
export interface ResumeDescriptor {
|
|
83
|
+
subagentId: string;
|
|
84
|
+
ownerId?: string;
|
|
85
|
+
data: unknown;
|
|
29
86
|
}
|
|
30
87
|
export interface AsyncJobManagerOptions {
|
|
31
88
|
onJobComplete: (jobId: string, text: string, job?: AsyncJob) => void | Promise<void>;
|
|
@@ -84,17 +141,49 @@ export declare class AsyncJobManager {
|
|
|
84
141
|
/** Reset the process-global instance. Test-only. */
|
|
85
142
|
static resetForTests(): void;
|
|
86
143
|
constructor(options: AsyncJobManagerOptions);
|
|
144
|
+
/**
|
|
145
|
+
* Subscribe to live-job-set change events. Returns an unsubscribe function.
|
|
146
|
+
* Listener errors are isolated so one bad subscriber cannot break others.
|
|
147
|
+
*/
|
|
148
|
+
onChange(cb: () => void): () => void;
|
|
87
149
|
register(type: "bash" | "task", label: string, run: (ctx: {
|
|
88
150
|
jobId: string;
|
|
89
151
|
signal: AbortSignal;
|
|
90
152
|
reportProgress: (text: string, details?: Record<string, unknown>) => Promise<void>;
|
|
91
|
-
}) => Promise<string>, options?: AsyncJobRegisterOptions): string;
|
|
153
|
+
}) => Promise<string | SubagentRunOutcome>, options?: AsyncJobRegisterOptions): string;
|
|
92
154
|
/**
|
|
93
155
|
* Cancel a single job by id. When `filter.ownerId` is set and does not
|
|
94
156
|
* match the job's owner, the call is treated as not-found (returns false)
|
|
95
157
|
* so cross-agent cancellation is rejected at the manager level.
|
|
96
158
|
*/
|
|
97
159
|
cancel(id: string, filter?: AsyncJobFilter): boolean;
|
|
160
|
+
/** Register or replace the canonical record for a subagent. */
|
|
161
|
+
registerSubagentRecord(record: SubagentRecord): void;
|
|
162
|
+
getSubagentRecord(subagentId: string, filter?: AsyncJobFilter): SubagentRecord | undefined;
|
|
163
|
+
getSubagentRecords(filter?: AsyncJobFilter): SubagentRecord[];
|
|
164
|
+
registerLiveHandle(subagentId: string, handle: SubagentLiveHandle): void;
|
|
165
|
+
getLiveHandle(subagentId: string): SubagentLiveHandle | undefined;
|
|
166
|
+
removeLiveHandle(subagentId: string): void;
|
|
167
|
+
/** Install the TaskTool-owned resume runner. Returns the new job id, or undefined on failure. */
|
|
168
|
+
setResumeRunner(runner: (subagentId: string, message?: string, descriptor?: ResumeDescriptor) => string | undefined): void;
|
|
169
|
+
registerResumeDescriptor(descriptor: ResumeDescriptor): void;
|
|
170
|
+
getResumeDescriptor(subagentId: string, filter?: AsyncJobFilter): ResumeDescriptor | undefined;
|
|
171
|
+
/** Request a graceful safe-boundary pause of a running subagent. */
|
|
172
|
+
pauseSubagent(subagentId: string, filter?: AsyncJobFilter): {
|
|
173
|
+
ok: boolean;
|
|
174
|
+
status?: SubagentLifecycle;
|
|
175
|
+
reason?: string;
|
|
176
|
+
};
|
|
177
|
+
/** Resume a non-running subagent from its sessionFile, optionally injecting a message first. */
|
|
178
|
+
resumeSubagent(subagentId: string, filter?: AsyncJobFilter, message?: string): {
|
|
179
|
+
ok: boolean;
|
|
180
|
+
status?: SubagentLifecycle;
|
|
181
|
+
jobId?: string;
|
|
182
|
+
queued?: boolean;
|
|
183
|
+
reason?: string;
|
|
184
|
+
};
|
|
185
|
+
/** Cancel a subagent by stable id across running/paused/queued states (keeps the session file). */
|
|
186
|
+
cancelSubagent(subagentId: string, filter?: AsyncJobFilter): boolean;
|
|
98
187
|
getJob(id: string): AsyncJob | undefined;
|
|
99
188
|
getRunningJobs(filter?: AsyncJobFilter): AsyncJob[];
|
|
100
189
|
getRecentJobs(limit?: number, filter?: AsyncJobFilter): AsyncJob[];
|
package/dist/types/cli/args.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* CLI argument parsing and help display
|
|
3
3
|
*/
|
|
4
4
|
import { type Effort } from "@gajae-code/ai";
|
|
5
|
-
export type Mode = "text" | "json" | "rpc" | "acp" | "rpc-ui";
|
|
5
|
+
export type Mode = "text" | "json" | "rpc" | "acp" | "rpc-ui" | "bridge";
|
|
6
6
|
export interface Args {
|
|
7
7
|
cwd?: string;
|
|
8
8
|
allowHome?: boolean;
|
|
@@ -39,6 +39,9 @@ export default class DeepInterview extends Command {
|
|
|
39
39
|
deliberate: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
40
40
|
description: string;
|
|
41
41
|
};
|
|
42
|
+
force: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
42
45
|
json: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
|
|
43
46
|
description: string;
|
|
44
47
|
};
|
|
@@ -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
|
+
}
|
|
@@ -26,6 +26,7 @@ interface AppKeybindings {
|
|
|
26
26
|
"app.session.fork": true;
|
|
27
27
|
"app.session.resume": true;
|
|
28
28
|
"app.session.observe": true;
|
|
29
|
+
"app.jobs.open": true;
|
|
29
30
|
"app.session.togglePath": true;
|
|
30
31
|
"app.session.toggleSort": true;
|
|
31
32
|
"app.session.rename": true;
|
|
@@ -258,6 +259,10 @@ export declare const KEYBINDINGS: {
|
|
|
258
259
|
readonly defaultKeys: "ctrl+s";
|
|
259
260
|
readonly description: "Observe subagent sessions";
|
|
260
261
|
};
|
|
262
|
+
readonly "app.jobs.open": {
|
|
263
|
+
readonly defaultKeys: "alt+j";
|
|
264
|
+
readonly description: "Open monitor/cron jobs overlay";
|
|
265
|
+
};
|
|
261
266
|
readonly "app.session.togglePath": {
|
|
262
267
|
readonly defaultKeys: "ctrl+p";
|
|
263
268
|
readonly description: "Toggle session path display";
|
|
@@ -24,7 +24,7 @@ export declare const TAB_METADATA: Record<SettingTab, {
|
|
|
24
24
|
icon: `tab.${string}`;
|
|
25
25
|
}>;
|
|
26
26
|
/** Status line segment identifiers */
|
|
27
|
-
export type StatusLineSegmentId = "gajae" | "pi" | "model" | "mode" | "path" | "git" | "pr" | "subagents" | "token_in" | "token_out" | "token_total" | "token_rate" | "cost" | "context_pct" | "context_total" | "time_spent" | "time" | "session" | "hostname" | "cache_read" | "cache_write" | "session_name" | "usage";
|
|
27
|
+
export type StatusLineSegmentId = "gajae" | "pi" | "model" | "mode" | "path" | "git" | "pr" | "subagents" | "jobs" | "token_in" | "token_out" | "token_total" | "token_rate" | "cost" | "context_pct" | "context_total" | "time_spent" | "time" | "session" | "hostname" | "cache_read" | "cache_write" | "session_name" | "usage";
|
|
28
28
|
/** Submenu choice metadata. */
|
|
29
29
|
export type SubmenuOption<V extends string = string> = {
|
|
30
30
|
value: V;
|
|
@@ -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";
|
|
@@ -2691,11 +2697,11 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2691
2697
|
};
|
|
2692
2698
|
readonly "task.maxConcurrency": {
|
|
2693
2699
|
readonly type: "number";
|
|
2694
|
-
readonly default:
|
|
2700
|
+
readonly default: 8;
|
|
2695
2701
|
readonly ui: {
|
|
2696
2702
|
readonly tab: "tasks";
|
|
2697
2703
|
readonly label: "Max Concurrent Tasks";
|
|
2698
|
-
readonly description: "
|
|
2704
|
+
readonly description: "Safer concurrent limit for subagents; higher fan-out still requires an explicit plan above 4 tasks.";
|
|
2699
2705
|
readonly options: readonly [{
|
|
2700
2706
|
readonly value: "0";
|
|
2701
2707
|
readonly label: "Unlimited";
|
|
@@ -2756,7 +2762,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
2756
2762
|
readonly ui: {
|
|
2757
2763
|
readonly tab: "tasks";
|
|
2758
2764
|
readonly label: "Fork Context Max Tokens";
|
|
2759
|
-
readonly description: "Approximate token cap for fork-context seeds. 0 uses
|
|
2765
|
+
readonly description: "Approximate token cap for explicit full fork-context seeds. 0 uses 15% of the target model context window, with a 15k fallback when the window is unknown.";
|
|
2760
2766
|
};
|
|
2761
2767
|
};
|
|
2762
2768
|
readonly "task.maxRecursionDepth": {
|
|
@@ -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,45 @@
|
|
|
1
|
+
export type CrashProcessKind = "bash" | "python" | "lsp" | "dap" | "mcp" | "browser" | "worker" | "native" | "unknown";
|
|
2
|
+
export type CrashClass = "clean_exit" | "non_zero_exit" | "signal_exit" | "timeout" | "cancelled" | "spawn_error" | "protocol_exit" | "native_panic" | "unknown";
|
|
3
|
+
export interface CrashClassificationInput {
|
|
4
|
+
kind: CrashProcessKind;
|
|
5
|
+
command?: string[];
|
|
6
|
+
exitCode?: number | null;
|
|
7
|
+
signal?: string | null;
|
|
8
|
+
cancelled?: boolean;
|
|
9
|
+
timedOut?: boolean;
|
|
10
|
+
spawnError?: unknown;
|
|
11
|
+
stderr?: string;
|
|
12
|
+
protocol?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CrashClassification {
|
|
15
|
+
kind: CrashProcessKind;
|
|
16
|
+
class: CrashClass;
|
|
17
|
+
crashed: boolean;
|
|
18
|
+
exitCode: number | null;
|
|
19
|
+
signal: string | null;
|
|
20
|
+
command?: string[];
|
|
21
|
+
protocol?: string;
|
|
22
|
+
reason: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CrashReport extends CrashClassification {
|
|
25
|
+
schemaVersion: 1;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
pid: number;
|
|
28
|
+
cwd: string;
|
|
29
|
+
stderrPreview?: string;
|
|
30
|
+
spawnError?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface CrashReportWriteResult {
|
|
33
|
+
report: CrashReport;
|
|
34
|
+
path: string | null;
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare function crashDiagnosticsEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
38
|
+
export declare function getCrashDiagnosticsDirectory(env?: NodeJS.ProcessEnv): string;
|
|
39
|
+
export declare function classifyProcessCrash(input: CrashClassificationInput): CrashClassification;
|
|
40
|
+
export declare function writeCrashReport(input: CrashClassificationInput, options?: {
|
|
41
|
+
cwd?: string;
|
|
42
|
+
env?: NodeJS.ProcessEnv;
|
|
43
|
+
now?: Date;
|
|
44
|
+
}): Promise<CrashReportWriteResult>;
|
|
45
|
+
export declare function formatCrashDiagnosticNotice(result: CrashReportWriteResult): string | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Current runtime owner counts, keyed by `<owner>.<resource>`. Extend as more
|
|
3
|
+
* owners (Python kernels, LSP clients, browser tabs, async jobs, streaming
|
|
4
|
+
* queues) expose count getters.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getRuntimeResourceCounts(): Record<string, number>;
|
|
@@ -0,0 +1,6 @@
|
|
|
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 isDeepInterviewAskQuestion(question: string): boolean;
|
|
6
|
+
export declare function formatDeepInterviewSelectorPrompt(question: string): string | null;
|
|
@@ -52,6 +52,8 @@ export interface PythonExecutorOptions {
|
|
|
52
52
|
}
|
|
53
53
|
export interface PythonKernelExecutor {
|
|
54
54
|
execute: (code: string, options?: KernelExecuteOptions) => Promise<KernelExecuteResult>;
|
|
55
|
+
getExitCode?: () => number | null;
|
|
56
|
+
peekStderr?: () => string;
|
|
55
57
|
}
|
|
56
58
|
export interface PythonResult {
|
|
57
59
|
/** Combined stdout + stderr output (sanitized, possibly truncated) */
|
|
@@ -55,6 +55,8 @@ export declare class PythonKernel {
|
|
|
55
55
|
private constructor();
|
|
56
56
|
static start(options: KernelStartOptions): Promise<PythonKernel>;
|
|
57
57
|
isAlive(): boolean;
|
|
58
|
+
getExitCode(): number | null;
|
|
59
|
+
peekStderr(): string;
|
|
58
60
|
execute(code: string, options?: KernelExecuteOptions): Promise<KernelExecuteResult>;
|
|
59
61
|
interrupt(): Promise<void>;
|
|
60
62
|
shutdown(options?: KernelShutdownOptions): Promise<KernelShutdownResult>;
|
|
@@ -43,6 +43,16 @@ export interface BashResult {
|
|
|
43
43
|
outputBytes: number;
|
|
44
44
|
artifactId?: string;
|
|
45
45
|
}
|
|
46
|
+
/** Number of persistent shell sessions currently retained (owner gauge). */
|
|
47
|
+
export declare function getShellSessionCount(): number;
|
|
48
|
+
/**
|
|
49
|
+
* Dispose all persistent shell sessions: abort in-flight work and drop the
|
|
50
|
+
* strong references so the native shells can be finalized. Healthy persistent
|
|
51
|
+
* sessions are otherwise retained for the whole process lifetime (MEM-7). This
|
|
52
|
+
* is registered as a postmortem cleanup so shutdown/signals release native
|
|
53
|
+
* shell resources, and is also callable directly (e.g. on owner teardown).
|
|
54
|
+
*/
|
|
55
|
+
export declare function disposeAllShellSessions(): Promise<void>;
|
|
46
56
|
/** Translate `ShellMinimizerSettings` into native `MinimizerOptions`, or `undefined` when disabled. */
|
|
47
57
|
export declare function buildMinimizerOptions(group: ShellMinimizerSettings): MinimizerOptions | undefined;
|
|
48
58
|
export declare function executeBash(command: string, options?: BashExecutorOptions): Promise<BashResult>;
|
|
@@ -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,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI write/mutation receipt shaping (Workstream B, v4).
|
|
3
|
+
*
|
|
4
|
+
* `CliWriteReceipt` is the compact **stdout presentation** returned by a GJC
|
|
5
|
+
* mutation command. It carries only routing/audit fields a caller needs; it
|
|
6
|
+
* NEVER echoes the persisted body (full `state` envelope, ultragoal `plan`,
|
|
7
|
+
* team task body, ralplan `task`, etc.) — echoing those back is a redundant
|
|
8
|
+
* token leak because the caller already has the content it just wrote.
|
|
9
|
+
*
|
|
10
|
+
* This is intentionally a *separate* concept from the persisted
|
|
11
|
+
* `WorkflowStateReceipt` (the on-disk envelope `receipt` integrity field).
|
|
12
|
+
* Do NOT use `CliWriteReceipt` as a persistence schema or validate persisted
|
|
13
|
+
* envelopes against it.
|
|
14
|
+
*/
|
|
15
|
+
export interface CliWriteReceipt {
|
|
16
|
+
ok: boolean;
|
|
17
|
+
[field: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Serialize a write/mutation receipt to compact stdout JSON.
|
|
21
|
+
* `undefined` fields are dropped so optional routing fields stay absent
|
|
22
|
+
* rather than serialized as `null`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function renderCliWriteReceipt(receipt: Record<string, unknown>): 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,33 @@
|
|
|
1
|
+
import type { CanonicalGjcWorkflowSkill } from "../skill-state/active-state";
|
|
2
|
+
export interface NormalizeLegacyStateResult {
|
|
3
|
+
state: Record<string, unknown>;
|
|
4
|
+
changed: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface MigrateAndPersistLegacyStateArgs {
|
|
7
|
+
cwd: string;
|
|
8
|
+
skill: string;
|
|
9
|
+
statePath: string;
|
|
10
|
+
sessionId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface MigrateAndPersistLegacyStateResult {
|
|
13
|
+
migrated: boolean;
|
|
14
|
+
path: string;
|
|
15
|
+
}
|
|
16
|
+
export interface MigrateWorkflowStateResult {
|
|
17
|
+
state: Record<string, unknown>;
|
|
18
|
+
fromVersion: number;
|
|
19
|
+
toVersion: number;
|
|
20
|
+
changed: boolean;
|
|
21
|
+
}
|
|
22
|
+
export type WorkflowStateMigration = (state: Record<string, unknown>, skill: CanonicalGjcWorkflowSkill) => Record<string, unknown>;
|
|
23
|
+
export declare function migrateWorkflowState(raw: Record<string, unknown>, skill: string): MigrateWorkflowStateResult;
|
|
24
|
+
/**
|
|
25
|
+
* Pure legacy state normalizer for background/internal readers.
|
|
26
|
+
*
|
|
27
|
+
* Readers that need compatibility with old on-disk workflow state shapes must call
|
|
28
|
+
* this in-memory helper and must never call `migrateAndPersistLegacyState`. The
|
|
29
|
+
* persist variant is reserved for explicit state migration commands because it is
|
|
30
|
+
* the only path allowed to write normalized upgrades back to `.gjc/state/**`.
|
|
31
|
+
*/
|
|
32
|
+
export declare function normalizeLegacyState(raw: Record<string, unknown>, skill: string): NormalizeLegacyStateResult;
|
|
33
|
+
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>;
|