@gajae-code/coding-agent 0.3.2 → 0.4.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 +32 -0
- package/dist/types/config/model-registry.d.ts +17 -10
- package/dist/types/config/models-config-schema.d.ts +37 -0
- package/dist/types/config/settings-schema.d.ts +5 -0
- package/dist/types/edit/diff.d.ts +16 -0
- package/dist/types/edit/modes/replace.d.ts +7 -0
- package/dist/types/extensibility/gjc-plugins/activation.d.ts +14 -0
- package/dist/types/extensibility/gjc-plugins/index.d.ts +9 -0
- package/dist/types/extensibility/gjc-plugins/injection.d.ts +31 -0
- package/dist/types/extensibility/gjc-plugins/loader.d.ts +3 -0
- package/dist/types/extensibility/gjc-plugins/paths.d.ts +8 -0
- package/dist/types/extensibility/gjc-plugins/schema.d.ts +3 -0
- package/dist/types/extensibility/gjc-plugins/state.d.ts +9 -0
- package/dist/types/extensibility/gjc-plugins/tools.d.ts +8 -0
- package/dist/types/extensibility/gjc-plugins/types.d.ts +64 -0
- package/dist/types/extensibility/gjc-plugins/validation.d.ts +4 -0
- package/dist/types/extensibility/skills.d.ts +9 -1
- package/dist/types/gjc-runtime/state-runtime.d.ts +22 -0
- package/dist/types/gjc-runtime/ultragoal-runtime.d.ts +1 -2
- package/dist/types/harness-control-plane/storage.d.ts +7 -0
- package/dist/types/lsp/client.d.ts +1 -0
- package/dist/types/modes/bridge/bridge-mode.d.ts +2 -0
- package/dist/types/modes/prompt-action-autocomplete.d.ts +2 -2
- package/dist/types/modes/rpc/rpc-client.d.ts +9 -1
- package/dist/types/modes/rpc/rpc-types.d.ts +179 -2
- package/dist/types/modes/shared/agent-wire/approval-gate.d.ts +57 -0
- package/dist/types/modes/shared/agent-wire/command-dispatch.d.ts +16 -1
- package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +47 -0
- package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +7 -0
- package/dist/types/modes/shared/agent-wire/handshake.d.ts +11 -1
- package/dist/types/modes/shared/agent-wire/protocol.d.ts +3 -1
- package/dist/types/modes/shared/agent-wire/responses.d.ts +1 -1
- package/dist/types/modes/shared/agent-wire/unattended-action-policy.d.ts +27 -0
- package/dist/types/modes/shared/agent-wire/unattended-audit.d.ts +68 -0
- package/dist/types/modes/shared/agent-wire/unattended-run-controller.d.ts +161 -0
- package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +61 -0
- package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +114 -0
- package/dist/types/modes/shared/agent-wire/workflow-gate-schema.d.ts +39 -0
- package/dist/types/modes/theme/theme.d.ts +2 -1
- package/dist/types/runtime-mcp/transports/stdio.d.ts +0 -4
- package/dist/types/sdk.d.ts +7 -0
- package/dist/types/session/agent-session.d.ts +10 -0
- package/dist/types/session/blob-store.d.ts +17 -0
- package/dist/types/session/messages.d.ts +3 -0
- package/dist/types/session/session-storage.d.ts +6 -0
- package/dist/types/skill-state/active-state.d.ts +13 -0
- package/dist/types/thinking.d.ts +3 -2
- package/dist/types/tools/index.d.ts +3 -0
- package/package.json +9 -7
- package/src/cli.ts +14 -0
- package/src/commands/harness.ts +192 -7
- package/src/commands/ultragoal.ts +1 -21
- package/src/config/model-equivalence.ts +1 -1
- package/src/config/model-registry.ts +32 -5
- package/src/config/models-config-schema.ts +7 -2
- package/src/config/settings-schema.ts +4 -1
- package/src/discovery/claude-plugins.ts +25 -5
- package/src/edit/diff.ts +64 -1
- package/src/edit/modes/replace.ts +60 -2
- package/src/extensibility/gjc-plugins/activation.ts +87 -0
- package/src/extensibility/gjc-plugins/index.ts +9 -0
- package/src/extensibility/gjc-plugins/injection.ts +114 -0
- package/src/extensibility/gjc-plugins/loader.ts +131 -0
- package/src/extensibility/gjc-plugins/paths.ts +66 -0
- package/src/extensibility/gjc-plugins/schema.ts +79 -0
- package/src/extensibility/gjc-plugins/state.ts +29 -0
- package/src/extensibility/gjc-plugins/tools.ts +47 -0
- package/src/extensibility/gjc-plugins/types.ts +97 -0
- package/src/extensibility/gjc-plugins/validation.ts +76 -0
- package/src/extensibility/skills.ts +39 -7
- package/src/gjc-runtime/state-runtime.ts +93 -2
- package/src/gjc-runtime/state-writer.ts +17 -1
- package/src/gjc-runtime/ultragoal-runtime.ts +76 -121
- package/src/gjc-runtime/workflow-manifest.generated.json +5 -0
- package/src/gjc-runtime/workflow-manifest.ts +2 -2
- package/src/harness-control-plane/storage.ts +144 -2
- package/src/hashline/hash.ts +23 -0
- package/src/hooks/skill-state.ts +2 -0
- package/src/internal-urls/docs-index.generated.ts +5 -5
- package/src/lsp/client.ts +7 -0
- package/src/modes/acp/acp-agent.ts +25 -2
- package/src/modes/bridge/bridge-mode.ts +124 -2
- package/src/modes/controllers/input-controller.ts +14 -2
- package/src/modes/prompt-action-autocomplete.ts +49 -10
- package/src/modes/rpc/rpc-client.ts +57 -3
- package/src/modes/rpc/rpc-mode.ts +67 -0
- package/src/modes/rpc/rpc-types.ts +224 -2
- package/src/modes/shared/agent-wire/approval-gate.ts +151 -0
- package/src/modes/shared/agent-wire/command-dispatch.ts +97 -4
- package/src/modes/shared/agent-wire/command-validation.ts +25 -1
- package/src/modes/shared/agent-wire/deep-interview-gate.ts +222 -0
- package/src/modes/shared/agent-wire/event-envelope.ts +13 -0
- package/src/modes/shared/agent-wire/handshake.ts +43 -3
- package/src/modes/shared/agent-wire/protocol.ts +7 -0
- package/src/modes/shared/agent-wire/responses.ts +2 -2
- package/src/modes/shared/agent-wire/scopes.ts +2 -0
- package/src/modes/shared/agent-wire/unattended-action-policy.ts +341 -0
- package/src/modes/shared/agent-wire/unattended-audit.ts +175 -0
- package/src/modes/shared/agent-wire/unattended-run-controller.ts +406 -0
- package/src/modes/shared/agent-wire/unattended-session.ts +180 -0
- package/src/modes/shared/agent-wire/workflow-gate-broker.ts +324 -0
- package/src/modes/shared/agent-wire/workflow-gate-schema.ts +331 -0
- package/src/modes/theme/theme.ts +6 -0
- package/src/runtime-mcp/client.ts +7 -4
- package/src/runtime-mcp/manager.ts +45 -13
- package/src/runtime-mcp/transports/http.ts +40 -14
- package/src/runtime-mcp/transports/stdio.ts +11 -10
- package/src/sdk.ts +47 -0
- package/src/session/agent-session.ts +211 -2
- package/src/session/blob-store.ts +84 -0
- package/src/session/messages.ts +3 -0
- package/src/session/session-manager.ts +390 -33
- package/src/session/session-storage.ts +26 -0
- package/src/setup/provider-onboarding.ts +2 -2
- package/src/skill-state/active-state.ts +89 -1
- package/src/task/discovery.ts +7 -1
- package/src/task/executor.ts +16 -2
- package/src/thinking.ts +8 -2
- package/src/tools/ask.ts +39 -9
- package/src/tools/index.ts +3 -0
- package/src/tools/skill.ts +15 -3
- package/src/utils/edit-mode.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.4.0] - 2026-06-06
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added an agent-driven RPC workflow lifecycle control plane and a `workflow_gate` contract: `negotiate_unattended`, `workflow_gate`, and `workflow_gate_response` frames are validated by an answer-schema validator, persisted through a durable gate broker, and wired into live session dispatch (#314).
|
|
10
|
+
- Added a binding-only `gjc-plugins` sub-skill plugin framework that loads, validates, and activates declarative plugin packs without granting implicit arbitrary execution surface (#347).
|
|
11
|
+
- Added generated JSON Schemas for the config and models files (`schemas/config.schema.json`, `schemas/models.schema.json`) with a `check:schemas` drift gate (#377).
|
|
12
|
+
- Added `cacheRetention` support in the models config (#381).
|
|
13
|
+
- Added an Opus max reasoning preset (#372).
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Improved slash command and `skill:*` suggestion ranking so `/team` surfaces the matching skill before weaker fallback candidates.
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- Removed the optional `@gajae-code/swarm-extension` package and its `gjc-swarm` CLI. The YAML/DAG swarm orchestration extension was a standalone optional feature not imported by any other package; it is no longer built or published.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Routed unattended deep-interview ask-tool questions through `workflow_gate { kind: "question" }` events, including Round 0 topology and challenge-mode metadata, free-text option/schema shape, headless RPC answers, and synchronous response race handling (#316).
|
|
26
|
+
- Preserved harness owner-vanish evidence after prompt acceptance: no-owner `recover` now either restores a detached owner when a prior endpoint exists or returns a public-safe concrete owner-exit reason plus a vanish receipt, and no-owner `observe`/`events` expose the preserved owner-exit summary.
|
|
27
|
+
- Fixed LSP and MCP server lifecycle cleanup so clients/servers and their child processes are torn down on abort/exit instead of leaking (#389).
|
|
28
|
+
- Preserved session retention across resident session rewrites.
|
|
29
|
+
- Fixed harness session lookup testability without changing runtime owner-routing behavior.
|
|
30
|
+
- Prevented release catalog file specs from recursing during catalog resolution (#351).
|
|
31
|
+
- Reconciled the ultragoal skill mode-state and HUD with the plan/ledger so status reflects real goal progress (#342/#346).
|
|
32
|
+
|
|
5
33
|
## [0.3.2] - 2026-06-05
|
|
6
34
|
|
|
7
35
|
### Added
|
|
8
36
|
|
|
9
37
|
- Added model profiles with a `--mpreset <profile>` CLI flag and a `/model` selector "Profiles" section that activate a named profile's default model plus per-agent-role model overrides in one step, validating required-provider credentials before applying and surfacing a custom provider onboarding wizard for missing API-compatible providers.
|
|
10
38
|
- Integrated `ai-slop-cleaner` as an internal Ultragoal sub-skill fragment that runs as the mandatory completion-gate cleanup sweep over a story's changed files, reporting blocking and advisory findings without editing code or mutating `.gjc/` state.
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- Edit tool diff generation (`generateDiffString`) now uses the native `diffLines` from `@gajae-code/natives` (a byte-identical Rust port of jsdiff) instead of the pure-JS implementation, removing the multi-second Myers blowup on large-file edits (~16x faster on ~1MB files) with identical diff output.
|
|
11
42
|
|
|
12
43
|
### Fixed
|
|
13
44
|
|
|
@@ -15,6 +46,7 @@
|
|
|
15
46
|
- Forwarded the parent session id when task subagents validate configured role-agent model overrides, preventing session-scoped OAuth providers from being misread as unauthenticated and falling back to the parent chat model.
|
|
16
47
|
- Removed unintended public memory-tool guidance and registration: Hindsight retain/recall/reflect helpers are now compatibility-only, local memory prompt injection no longer advertises `memory://` reads, and regression tests guard the public tool surface.
|
|
17
48
|
- Fixed `read` hashline anchors drifting on truncated reads so the `line+hash` anchors consumed by `edit`/`apply_patch` stay correct when a file is read past the truncation boundary.
|
|
49
|
+
- Reconciled the ultragoal skill mode-state (`current_phase`/`active`) and HUD chip with the `.gjc/ultragoal` plan/ledger on every `gjc ultragoal` command (`create-goals`/`complete-goals`/`checkpoint`/`steer`/`record-review-blockers`/`status`), so `gjc state ultragoal read`, the skill-tool chain guard, and the HUD no longer sit at a stale `active:true`/`goal-planning` after a run completes (#342). A new `reconcileWorkflowSkillState` performs a session-scoped (`GJC_SESSION_ID`) derived write that bypasses only transition-edge validation while preserving schema/unknown-phase validation, version/checksum stamping, and audit provenance (`owner: gjc-runtime`, `verb: reconcile`); reconciliation is best-effort and surfaces failures via stderr and a `reconcile_failed` ledger event without changing command status/stdout. Removed the duplicate sessionless active-state sync from the `gjc ultragoal` command wrapper.
|
|
18
50
|
|
|
19
51
|
## [0.3.1] - 2026-06-05
|
|
20
52
|
### Added
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Api, type AssistantMessageEventStream, type Context, type Model, type ModelRefreshStrategy, type ModelRequestTransform, type SimpleStreamOptions, type ThinkingConfig } from "@gajae-code/ai";
|
|
1
|
+
import { type Api, type AssistantMessageEventStream, type CacheRetention, type Context, type Model, type ModelRefreshStrategy, type ModelRequestTransform, type SimpleStreamOptions, type ThinkingConfig } from "@gajae-code/ai";
|
|
2
2
|
import type { OAuthCredentials, OAuthLoginCallbacks } from "@gajae-code/ai/utils/oauth/types";
|
|
3
3
|
import { type ThemeColor } from "../modes/theme/theme";
|
|
4
4
|
import type { AuthStorage } from "../session/auth-storage";
|
|
@@ -57,6 +57,7 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
57
57
|
medium?: string | undefined;
|
|
58
58
|
high?: string | undefined;
|
|
59
59
|
xhigh?: string | undefined;
|
|
60
|
+
max?: string | undefined;
|
|
60
61
|
} | undefined;
|
|
61
62
|
maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
|
|
62
63
|
supportsUsageInStreaming?: boolean | undefined;
|
|
@@ -102,11 +103,11 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
102
103
|
baseUrl?: string | undefined;
|
|
103
104
|
reasoning?: boolean | undefined;
|
|
104
105
|
thinking?: {
|
|
105
|
-
minLevel: "high" | "low" | "medium" | "minimal" | "xhigh";
|
|
106
|
-
maxLevel: "high" | "low" | "medium" | "minimal" | "xhigh";
|
|
106
|
+
minLevel: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
|
|
107
|
+
maxLevel: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
|
|
107
108
|
mode: "anthropic-adaptive" | "anthropic-budget-effort" | "budget" | "effort" | "google-level";
|
|
108
|
-
defaultLevel?: "high" | "low" | "medium" | "minimal" | "xhigh" | undefined;
|
|
109
|
-
levels?: ("high" | "low" | "medium" | "minimal" | "xhigh")[] | undefined;
|
|
109
|
+
defaultLevel?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh" | undefined;
|
|
110
|
+
levels?: ("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[] | undefined;
|
|
110
111
|
} | undefined;
|
|
111
112
|
input?: ("image" | "text")[] | undefined;
|
|
112
113
|
cost?: {
|
|
@@ -130,6 +131,7 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
130
131
|
medium?: string | undefined;
|
|
131
132
|
high?: string | undefined;
|
|
132
133
|
xhigh?: string | undefined;
|
|
134
|
+
max?: string | undefined;
|
|
133
135
|
} | undefined;
|
|
134
136
|
maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
|
|
135
137
|
supportsUsageInStreaming?: boolean | undefined;
|
|
@@ -165,16 +167,17 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
165
167
|
setHeaders?: Record<string, string | null> | undefined;
|
|
166
168
|
extraBody?: Record<string, unknown> | undefined;
|
|
167
169
|
} | undefined;
|
|
170
|
+
cacheRetention?: "long" | "none" | "short" | undefined;
|
|
168
171
|
}[] | undefined;
|
|
169
172
|
modelOverrides?: Record<string, {
|
|
170
173
|
name?: string | undefined;
|
|
171
174
|
reasoning?: boolean | undefined;
|
|
172
175
|
thinking?: {
|
|
173
|
-
minLevel: "high" | "low" | "medium" | "minimal" | "xhigh";
|
|
174
|
-
maxLevel: "high" | "low" | "medium" | "minimal" | "xhigh";
|
|
176
|
+
minLevel: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
|
|
177
|
+
maxLevel: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
|
|
175
178
|
mode: "anthropic-adaptive" | "anthropic-budget-effort" | "budget" | "effort" | "google-level";
|
|
176
|
-
defaultLevel?: "high" | "low" | "medium" | "minimal" | "xhigh" | undefined;
|
|
177
|
-
levels?: ("high" | "low" | "medium" | "minimal" | "xhigh")[] | undefined;
|
|
179
|
+
defaultLevel?: "high" | "low" | "max" | "medium" | "minimal" | "xhigh" | undefined;
|
|
180
|
+
levels?: ("high" | "low" | "max" | "medium" | "minimal" | "xhigh")[] | undefined;
|
|
178
181
|
} | undefined;
|
|
179
182
|
input?: ("image" | "text")[] | undefined;
|
|
180
183
|
cost?: {
|
|
@@ -198,6 +201,7 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
198
201
|
medium?: string | undefined;
|
|
199
202
|
high?: string | undefined;
|
|
200
203
|
xhigh?: string | undefined;
|
|
204
|
+
max?: string | undefined;
|
|
201
205
|
} | undefined;
|
|
202
206
|
maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
|
|
203
207
|
supportsUsageInStreaming?: boolean | undefined;
|
|
@@ -233,9 +237,11 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
233
237
|
setHeaders?: Record<string, string | null> | undefined;
|
|
234
238
|
extraBody?: Record<string, unknown> | undefined;
|
|
235
239
|
} | undefined;
|
|
240
|
+
cacheRetention?: "long" | "none" | "short" | undefined;
|
|
236
241
|
}> | undefined;
|
|
237
242
|
disableStrictTools?: boolean | undefined;
|
|
238
243
|
transport?: "pi-native" | undefined;
|
|
244
|
+
cacheRetention?: "long" | "none" | "short" | undefined;
|
|
239
245
|
}> | undefined;
|
|
240
246
|
modelBindings?: {
|
|
241
247
|
modelRoles?: Record<string, string> | undefined;
|
|
@@ -259,6 +265,7 @@ interface ProviderOverride {
|
|
|
259
265
|
compat?: Model<Api>["compat"];
|
|
260
266
|
transport?: Model<Api>["transport"];
|
|
261
267
|
requestTransform?: ModelRequestTransform;
|
|
268
|
+
cacheRetention?: CacheRetention;
|
|
262
269
|
}
|
|
263
270
|
/**
|
|
264
271
|
* Merge a freshly discovered model with the matching bundled/configured entry
|
|
@@ -276,7 +283,7 @@ interface ProviderOverride {
|
|
|
276
283
|
* See `xiaomi-tp-discovery-merge.test.ts` and the `refresh()` baseUrl-override
|
|
277
284
|
* regression in `model-registry.test.ts`.
|
|
278
285
|
*/
|
|
279
|
-
export declare function mergeDiscoveredModel<TApi extends Api>(model: Model<TApi>, existing: Model<Api> | undefined, providerOverride?: Pick<ProviderOverride, "baseUrl" | "headers" | "transport" | "requestTransform">): Model<TApi>;
|
|
286
|
+
export declare function mergeDiscoveredModel<TApi extends Api>(model: Model<TApi>, existing: Model<Api> | undefined, providerOverride?: Pick<ProviderOverride, "baseUrl" | "headers" | "transport" | "requestTransform" | "cacheRetention">): Model<TApi>;
|
|
280
287
|
export type ProviderDiscoveryStatus = "idle" | "ok" | "empty" | "cached" | "unavailable" | "unauthenticated";
|
|
281
288
|
export interface ProviderDiscoveryState {
|
|
282
289
|
provider: string;
|
|
@@ -10,6 +10,7 @@ export declare const OpenAICompatSchema: z.ZodObject<{
|
|
|
10
10
|
medium: z.ZodOptional<z.ZodString>;
|
|
11
11
|
high: z.ZodOptional<z.ZodString>;
|
|
12
12
|
xhigh: z.ZodOptional<z.ZodString>;
|
|
13
|
+
max: z.ZodOptional<z.ZodString>;
|
|
13
14
|
}, z.core.$strip>>;
|
|
14
15
|
maxTokensField: z.ZodOptional<z.ZodEnum<{
|
|
15
16
|
max_completion_tokens: "max_completion_tokens";
|
|
@@ -95,6 +96,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
95
96
|
minLevel: z.ZodEnum<{
|
|
96
97
|
high: "high";
|
|
97
98
|
low: "low";
|
|
99
|
+
max: "max";
|
|
98
100
|
medium: "medium";
|
|
99
101
|
minimal: "minimal";
|
|
100
102
|
xhigh: "xhigh";
|
|
@@ -102,6 +104,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
102
104
|
maxLevel: z.ZodEnum<{
|
|
103
105
|
high: "high";
|
|
104
106
|
low: "low";
|
|
107
|
+
max: "max";
|
|
105
108
|
medium: "medium";
|
|
106
109
|
minimal: "minimal";
|
|
107
110
|
xhigh: "xhigh";
|
|
@@ -116,6 +119,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
116
119
|
defaultLevel: z.ZodOptional<z.ZodEnum<{
|
|
117
120
|
high: "high";
|
|
118
121
|
low: "low";
|
|
122
|
+
max: "max";
|
|
119
123
|
medium: "medium";
|
|
120
124
|
minimal: "minimal";
|
|
121
125
|
xhigh: "xhigh";
|
|
@@ -123,6 +127,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
123
127
|
levels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
124
128
|
high: "high";
|
|
125
129
|
low: "low";
|
|
130
|
+
max: "max";
|
|
126
131
|
medium: "medium";
|
|
127
132
|
minimal: "minimal";
|
|
128
133
|
xhigh: "xhigh";
|
|
@@ -153,6 +158,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
153
158
|
medium: z.ZodOptional<z.ZodString>;
|
|
154
159
|
high: z.ZodOptional<z.ZodString>;
|
|
155
160
|
xhigh: z.ZodOptional<z.ZodString>;
|
|
161
|
+
max: z.ZodOptional<z.ZodString>;
|
|
156
162
|
}, z.core.$strip>>;
|
|
157
163
|
maxTokensField: z.ZodOptional<z.ZodEnum<{
|
|
158
164
|
max_completion_tokens: "max_completion_tokens";
|
|
@@ -206,6 +212,11 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
206
212
|
setHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
207
213
|
extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
208
214
|
}, z.core.$strict>>;
|
|
215
|
+
cacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
216
|
+
long: "long";
|
|
217
|
+
none: "none";
|
|
218
|
+
short: "short";
|
|
219
|
+
}>>;
|
|
209
220
|
}, z.core.$strict>;
|
|
210
221
|
export type ModelOverride = z.infer<typeof ModelOverrideSchema>;
|
|
211
222
|
export declare const ProviderDiscoverySchema: z.ZodObject<{
|
|
@@ -253,6 +264,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
253
264
|
medium: z.ZodOptional<z.ZodString>;
|
|
254
265
|
high: z.ZodOptional<z.ZodString>;
|
|
255
266
|
xhigh: z.ZodOptional<z.ZodString>;
|
|
267
|
+
max: z.ZodOptional<z.ZodString>;
|
|
256
268
|
}, z.core.$strip>>;
|
|
257
269
|
maxTokensField: z.ZodOptional<z.ZodEnum<{
|
|
258
270
|
max_completion_tokens: "max_completion_tokens";
|
|
@@ -340,6 +352,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
340
352
|
minLevel: z.ZodEnum<{
|
|
341
353
|
high: "high";
|
|
342
354
|
low: "low";
|
|
355
|
+
max: "max";
|
|
343
356
|
medium: "medium";
|
|
344
357
|
minimal: "minimal";
|
|
345
358
|
xhigh: "xhigh";
|
|
@@ -347,6 +360,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
347
360
|
maxLevel: z.ZodEnum<{
|
|
348
361
|
high: "high";
|
|
349
362
|
low: "low";
|
|
363
|
+
max: "max";
|
|
350
364
|
medium: "medium";
|
|
351
365
|
minimal: "minimal";
|
|
352
366
|
xhigh: "xhigh";
|
|
@@ -361,6 +375,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
361
375
|
defaultLevel: z.ZodOptional<z.ZodEnum<{
|
|
362
376
|
high: "high";
|
|
363
377
|
low: "low";
|
|
378
|
+
max: "max";
|
|
364
379
|
medium: "medium";
|
|
365
380
|
minimal: "minimal";
|
|
366
381
|
xhigh: "xhigh";
|
|
@@ -368,6 +383,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
368
383
|
levels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
369
384
|
high: "high";
|
|
370
385
|
low: "low";
|
|
386
|
+
max: "max";
|
|
371
387
|
medium: "medium";
|
|
372
388
|
minimal: "minimal";
|
|
373
389
|
xhigh: "xhigh";
|
|
@@ -398,6 +414,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
398
414
|
medium: z.ZodOptional<z.ZodString>;
|
|
399
415
|
high: z.ZodOptional<z.ZodString>;
|
|
400
416
|
xhigh: z.ZodOptional<z.ZodString>;
|
|
417
|
+
max: z.ZodOptional<z.ZodString>;
|
|
401
418
|
}, z.core.$strip>>;
|
|
402
419
|
maxTokensField: z.ZodOptional<z.ZodEnum<{
|
|
403
420
|
max_completion_tokens: "max_completion_tokens";
|
|
@@ -451,6 +468,11 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
451
468
|
setHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
452
469
|
extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
453
470
|
}, z.core.$strict>>;
|
|
471
|
+
cacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
472
|
+
long: "long";
|
|
473
|
+
none: "none";
|
|
474
|
+
short: "short";
|
|
475
|
+
}>>;
|
|
454
476
|
}, z.core.$strict>>>;
|
|
455
477
|
modelOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
456
478
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -459,6 +481,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
459
481
|
minLevel: z.ZodEnum<{
|
|
460
482
|
high: "high";
|
|
461
483
|
low: "low";
|
|
484
|
+
max: "max";
|
|
462
485
|
medium: "medium";
|
|
463
486
|
minimal: "minimal";
|
|
464
487
|
xhigh: "xhigh";
|
|
@@ -466,6 +489,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
466
489
|
maxLevel: z.ZodEnum<{
|
|
467
490
|
high: "high";
|
|
468
491
|
low: "low";
|
|
492
|
+
max: "max";
|
|
469
493
|
medium: "medium";
|
|
470
494
|
minimal: "minimal";
|
|
471
495
|
xhigh: "xhigh";
|
|
@@ -480,6 +504,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
480
504
|
defaultLevel: z.ZodOptional<z.ZodEnum<{
|
|
481
505
|
high: "high";
|
|
482
506
|
low: "low";
|
|
507
|
+
max: "max";
|
|
483
508
|
medium: "medium";
|
|
484
509
|
minimal: "minimal";
|
|
485
510
|
xhigh: "xhigh";
|
|
@@ -487,6 +512,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
487
512
|
levels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
488
513
|
high: "high";
|
|
489
514
|
low: "low";
|
|
515
|
+
max: "max";
|
|
490
516
|
medium: "medium";
|
|
491
517
|
minimal: "minimal";
|
|
492
518
|
xhigh: "xhigh";
|
|
@@ -517,6 +543,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
517
543
|
medium: z.ZodOptional<z.ZodString>;
|
|
518
544
|
high: z.ZodOptional<z.ZodString>;
|
|
519
545
|
xhigh: z.ZodOptional<z.ZodString>;
|
|
546
|
+
max: z.ZodOptional<z.ZodString>;
|
|
520
547
|
}, z.core.$strip>>;
|
|
521
548
|
maxTokensField: z.ZodOptional<z.ZodEnum<{
|
|
522
549
|
max_completion_tokens: "max_completion_tokens";
|
|
@@ -570,9 +597,19 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
570
597
|
setHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
571
598
|
extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
572
599
|
}, z.core.$strict>>;
|
|
600
|
+
cacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
601
|
+
long: "long";
|
|
602
|
+
none: "none";
|
|
603
|
+
short: "short";
|
|
604
|
+
}>>;
|
|
573
605
|
}, z.core.$strict>>>;
|
|
574
606
|
disableStrictTools: z.ZodOptional<z.ZodBoolean>;
|
|
575
607
|
transport: z.ZodOptional<z.ZodLiteral<"pi-native">>;
|
|
608
|
+
cacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
609
|
+
long: "long";
|
|
610
|
+
none: "none";
|
|
611
|
+
short: "short";
|
|
612
|
+
}>>;
|
|
576
613
|
}, z.core.$strict>>>;
|
|
577
614
|
modelBindings: z.ZodOptional<z.ZodObject<{
|
|
578
615
|
modelRoles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -3216,6 +3216,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3216
3216
|
readonly type: "number";
|
|
3217
3217
|
readonly default: 32768;
|
|
3218
3218
|
};
|
|
3219
|
+
readonly "thinkingBudgets.max": {
|
|
3220
|
+
readonly type: "number";
|
|
3221
|
+
readonly default: 65536;
|
|
3222
|
+
};
|
|
3219
3223
|
};
|
|
3220
3224
|
type Schema = typeof SETTINGS_SCHEMA;
|
|
3221
3225
|
/** All valid setting paths */
|
|
@@ -3345,6 +3349,7 @@ export interface ThinkingBudgetsSettings {
|
|
|
3345
3349
|
medium: number;
|
|
3346
3350
|
high: number;
|
|
3347
3351
|
xhigh: number;
|
|
3352
|
+
max: number;
|
|
3348
3353
|
}
|
|
3349
3354
|
export interface SttSettings {
|
|
3350
3355
|
enabled: boolean;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diff generation and replace-mode utilities for the edit tool.
|
|
3
|
+
*
|
|
4
|
+
* Provides diff string generation and the replace-mode edit logic
|
|
5
|
+
* used when not in patch mode.
|
|
6
|
+
*/
|
|
1
7
|
export interface DiffResult {
|
|
2
8
|
diff: string;
|
|
3
9
|
firstChangedLine: number | undefined;
|
|
@@ -21,6 +27,15 @@ export declare class ParseError extends Error {
|
|
|
21
27
|
export declare class ApplyPatchError extends Error {
|
|
22
28
|
constructor(message: string);
|
|
23
29
|
}
|
|
30
|
+
type DiffLinePart = {
|
|
31
|
+
added?: boolean;
|
|
32
|
+
removed?: boolean;
|
|
33
|
+
value: string;
|
|
34
|
+
};
|
|
35
|
+
type DiffLinesFn = (oldStr: string, newStr: string) => DiffLinePart[];
|
|
36
|
+
export declare function __setDiffLinesForTest(diffLines: DiffLinesFn | null): void;
|
|
37
|
+
export declare function __clearDiffLinesForTest(): void;
|
|
38
|
+
export declare function __getNativeDiffLinesForTest(): DiffLinesFn | undefined;
|
|
24
39
|
/**
|
|
25
40
|
* Generate a unified diff string with line numbers and context.
|
|
26
41
|
* Returns both the diff string and the first changed line number (in the new file).
|
|
@@ -57,3 +72,4 @@ export declare function replaceText(content: string, oldText: string, newText: s
|
|
|
57
72
|
* Used for preview rendering in the TUI before the tool executes.
|
|
58
73
|
*/
|
|
59
74
|
export declare function computeEditDiff(path: string, oldText: string, newText: string, cwd: string, fuzzy?: boolean, all?: boolean, threshold?: number): Promise<DiffResult | DiffError>;
|
|
75
|
+
export {};
|
|
@@ -66,6 +66,12 @@ export declare const DEFAULT_FUZZY_THRESHOLD = 0.95;
|
|
|
66
66
|
export declare function levenshteinDistance(a: string, b: string): number;
|
|
67
67
|
/** Compute similarity score between two strings (0 to 1) */
|
|
68
68
|
export declare function similarity(a: string, b: string): number;
|
|
69
|
+
interface BestFuzzyMatchResult {
|
|
70
|
+
best?: FuzzyMatch;
|
|
71
|
+
aboveThresholdCount: number;
|
|
72
|
+
secondBestScore: number;
|
|
73
|
+
}
|
|
74
|
+
export declare function findBestFuzzyMatch(content: string, target: string, threshold: number): BestFuzzyMatchResult;
|
|
69
75
|
/**
|
|
70
76
|
* Find a match for target text within content.
|
|
71
77
|
* Used primarily for replace-mode edits.
|
|
@@ -140,3 +146,4 @@ export interface ExecuteReplaceSingleOptions {
|
|
|
140
146
|
beginDeferredDiagnosticsForPath: (path: string) => WritethroughDeferredHandle;
|
|
141
147
|
}
|
|
142
148
|
export declare function executeReplaceSingle(options: ExecuteReplaceSingleOptions): Promise<AgentToolResult<EditToolDetails, typeof replaceEditEntrySchema>>;
|
|
149
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type LoadedSubskillActivation } from "./types";
|
|
2
|
+
export interface SubskillActivationResult {
|
|
3
|
+
cleanedArgs: string;
|
|
4
|
+
activation?: LoadedSubskillActivation;
|
|
5
|
+
activeSubskillsToPersist: LoadedSubskillActivation[];
|
|
6
|
+
}
|
|
7
|
+
export declare function resolveSubskillActivationForSkillInvocation(input: {
|
|
8
|
+
cwd: string;
|
|
9
|
+
sessionId?: string;
|
|
10
|
+
threadId?: string;
|
|
11
|
+
turnId?: string;
|
|
12
|
+
skillName: string;
|
|
13
|
+
args: string;
|
|
14
|
+
}): Promise<SubskillActivationResult>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type LoadedSubskillActivation } from "./types";
|
|
2
|
+
export declare function readSubskillBody(filePath: string): Promise<string>;
|
|
3
|
+
export declare function wrapSubskillBlock(activation: {
|
|
4
|
+
plugin: string;
|
|
5
|
+
subskillName: string;
|
|
6
|
+
parent: string;
|
|
7
|
+
phase: string;
|
|
8
|
+
activationArg: string;
|
|
9
|
+
filePath: string;
|
|
10
|
+
}, body: string): string;
|
|
11
|
+
export declare function resolveCurrentPhaseForParent(input: {
|
|
12
|
+
cwd: string;
|
|
13
|
+
sessionId?: string;
|
|
14
|
+
parent: string;
|
|
15
|
+
explicitPhase?: string;
|
|
16
|
+
}): Promise<string>;
|
|
17
|
+
export declare function buildSubskillInjection(input: {
|
|
18
|
+
cwd: string;
|
|
19
|
+
sessionId?: string;
|
|
20
|
+
skillName: string;
|
|
21
|
+
activation?: LoadedSubskillActivation;
|
|
22
|
+
currentPhase?: string;
|
|
23
|
+
}): Promise<{
|
|
24
|
+
block: string;
|
|
25
|
+
details?: LoadedSubskillActivation;
|
|
26
|
+
} | null>;
|
|
27
|
+
export declare function buildAgentSubskillInjection(input: {
|
|
28
|
+
cwd: string;
|
|
29
|
+
sessionId?: string;
|
|
30
|
+
agentName: string;
|
|
31
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function gjcPluginUserRoot(): string;
|
|
2
|
+
export declare function gjcPluginProjectRoot(cwd: string): string;
|
|
3
|
+
export declare function rootContainsGjcManifest(dir: string): Promise<boolean>;
|
|
4
|
+
export declare function discoverGjcPluginRoots({ cwd }: {
|
|
5
|
+
cwd: string;
|
|
6
|
+
home?: string;
|
|
7
|
+
}): Promise<string[]>;
|
|
8
|
+
export declare function resolveWithinRoot(root: string, rel: string): string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type GjcPluginManifest, type SubskillFrontmatter } from "./types";
|
|
2
|
+
export declare function parseManifest(raw: unknown, manifestPath: string): GjcPluginManifest;
|
|
3
|
+
export declare function parseSubskillFrontmatter(fm: Record<string, unknown>, filePath: string): SubskillFrontmatter;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ActiveSubskillEntry } from "../../skill-state/active-state";
|
|
2
|
+
import type { LoadedSubskillActivation } from "./types";
|
|
3
|
+
export declare function toActiveSubskillEntry(activation: LoadedSubskillActivation): ActiveSubskillEntry;
|
|
4
|
+
export declare function readActiveSubskillsForParent(input: {
|
|
5
|
+
cwd: string;
|
|
6
|
+
sessionId?: string;
|
|
7
|
+
parent: string;
|
|
8
|
+
phase: string;
|
|
9
|
+
}): Promise<ActiveSubskillEntry[]>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { CanonicalGjcWorkflowSkill } from "../../skill-state/active-state";
|
|
2
|
+
export declare const GJC_PLUGIN_MANIFEST_FILENAME = "gajae-plugin.json";
|
|
3
|
+
export declare const GJC_PLUGIN_KIND = "gajae-code-plugin";
|
|
4
|
+
export declare const GJC_SUBSKILL_PARENT_SKILLS: readonly ["deep-interview", "ralplan", "ultragoal", "team"];
|
|
5
|
+
export type GjcSubskillParentSkill = CanonicalGjcWorkflowSkill;
|
|
6
|
+
export declare const GJC_SUBSKILL_PARENT_AGENTS: readonly ["executor", "architect", "planner", "critic"];
|
|
7
|
+
export type GjcSubskillParentAgent = (typeof GJC_SUBSKILL_PARENT_AGENTS)[number];
|
|
8
|
+
export type GjcSubskillParent = GjcSubskillParentSkill | GjcSubskillParentAgent;
|
|
9
|
+
export declare const GJC_AGENT_SUBSKILL_PHASES: Record<GjcSubskillParentAgent, string[]>;
|
|
10
|
+
export interface GjcPluginManifest {
|
|
11
|
+
name: string;
|
|
12
|
+
version: string;
|
|
13
|
+
kind: "gajae-code-plugin";
|
|
14
|
+
subskills: string[];
|
|
15
|
+
tools: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface SubskillFrontmatter {
|
|
18
|
+
name: string;
|
|
19
|
+
binds_to: string;
|
|
20
|
+
phase: string;
|
|
21
|
+
activation_arg: string;
|
|
22
|
+
description: string;
|
|
23
|
+
}
|
|
24
|
+
export interface LoadedSubskillBinding {
|
|
25
|
+
plugin: string;
|
|
26
|
+
subskillName: string;
|
|
27
|
+
parent: string;
|
|
28
|
+
bindsTo: string;
|
|
29
|
+
phase: string;
|
|
30
|
+
activationArg: string;
|
|
31
|
+
description: string;
|
|
32
|
+
filePath: string;
|
|
33
|
+
body: string;
|
|
34
|
+
toolPaths: string[];
|
|
35
|
+
}
|
|
36
|
+
export interface LoadedSubskillActivation {
|
|
37
|
+
activationArg: string;
|
|
38
|
+
plugin: string;
|
|
39
|
+
subskillName: string;
|
|
40
|
+
parent: string;
|
|
41
|
+
bindsTo: string;
|
|
42
|
+
phase: string;
|
|
43
|
+
filePath: string;
|
|
44
|
+
toolPaths: string[];
|
|
45
|
+
}
|
|
46
|
+
export interface PhaseScopedToolBinding {
|
|
47
|
+
plugin: string;
|
|
48
|
+
parent: string;
|
|
49
|
+
phase: string;
|
|
50
|
+
toolPath: string;
|
|
51
|
+
}
|
|
52
|
+
export interface LoadedGjcPlugin {
|
|
53
|
+
name: string;
|
|
54
|
+
version: string;
|
|
55
|
+
root: string;
|
|
56
|
+
manifestPath: string;
|
|
57
|
+
bindings: LoadedSubskillBinding[];
|
|
58
|
+
toolBindings: PhaseScopedToolBinding[];
|
|
59
|
+
}
|
|
60
|
+
export type GjcPluginLoadErrorCode = "forbidden_surface" | "invalid_manifest" | "invalid_frontmatter" | "invalid_parent" | "invalid_phase" | "duplicate_arg" | "duplicate_parent_phase" | "missing_file" | "invalid_kind";
|
|
61
|
+
export declare class GjcPluginLoadError extends Error {
|
|
62
|
+
readonly code: GjcPluginLoadErrorCode;
|
|
63
|
+
constructor(code: GjcPluginLoadErrorCode, message: string, options?: ErrorOptions);
|
|
64
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type LoadedSubskillBinding, type SubskillFrontmatter } from "./types";
|
|
2
|
+
export declare function validateBinding(fm: SubskillFrontmatter): void;
|
|
3
|
+
export declare function buildParentArgMap(bindings: readonly LoadedSubskillBinding[]): Map<string, Map<string, LoadedSubskillBinding>>;
|
|
4
|
+
export declare function buildParentPhaseSet(bindings: readonly LoadedSubskillBinding[]): Set<string>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SourceMeta } from "../capability/types";
|
|
2
2
|
import type { SkillsSettings } from "../config/settings";
|
|
3
3
|
import type { SkillPromptDetails } from "../session/messages";
|
|
4
|
+
import type { LoadedSubskillActivation } from "./gjc-plugins";
|
|
4
5
|
export interface Skill {
|
|
5
6
|
name: string;
|
|
6
7
|
description: string;
|
|
@@ -55,6 +56,13 @@ export interface BuiltSkillPromptMessage {
|
|
|
55
56
|
message: string;
|
|
56
57
|
details: SkillPromptDetails;
|
|
57
58
|
}
|
|
59
|
+
export interface BuildSkillPromptMessageContext {
|
|
60
|
+
subskillActivation?: LoadedSubskillActivation;
|
|
61
|
+
subskillActivationSet?: LoadedSubskillActivation[];
|
|
62
|
+
currentPhase?: string;
|
|
63
|
+
cwd?: string;
|
|
64
|
+
sessionId?: string;
|
|
65
|
+
}
|
|
58
66
|
export declare function getSkillSlashCommandName(skill: Pick<Skill, "name">): string;
|
|
59
67
|
export declare function isNamespacedSkillSlashCommandName(commandName: string): boolean;
|
|
60
68
|
export declare function getSkillSlashCommandNames(skill: Pick<Skill, "name">): string[];
|
|
@@ -71,4 +79,4 @@ export interface ParsedSkillInvocation {
|
|
|
71
79
|
}
|
|
72
80
|
export declare function parseSkillInvocations(text: string, skillsByCommandName: ReadonlyMap<string, Skill>): ParsedSkillInvocation[];
|
|
73
81
|
export declare function resolveSkillSlashCommands(skills: readonly Skill[], _reservedDirectCommandNames: ReadonlySet<string>): ResolvedSkillSlashCommand[];
|
|
74
|
-
export declare function buildSkillPromptMessage(skill: Pick<Skill, "name" | "filePath" | "content">, args: string): Promise<BuiltSkillPromptMessage>;
|
|
82
|
+
export declare function buildSkillPromptMessage(skill: Pick<Skill, "name" | "filePath" | "content">, args: string, context?: BuildSkillPromptMessageContext): Promise<BuiltSkillPromptMessage>;
|
|
@@ -11,5 +11,27 @@ export interface StateCommandResult {
|
|
|
11
11
|
stdout?: string;
|
|
12
12
|
stderr?: string;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Reconcile a workflow skill's mode-state + active-state/HUD from a caller-derived
|
|
16
|
+
* payload. Unlike `gjc state write`, this is a derived repair: callers reconcile from
|
|
17
|
+
* an authoritative source (e.g. the ultragoal plan/ledger), where intermediate
|
|
18
|
+
* aggregate phases like ultragoal `active -> pending` are legitimate, so it bypasses
|
|
19
|
+
* ONLY verb transition-edge validation while preserving schema validation,
|
|
20
|
+
* unknown-phase rejection, version/checksum stamping, and audit/out-of-band tamper
|
|
21
|
+
* detection. Receipts carry `owner: "gjc-runtime"` and `verb: "reconcile"` so the
|
|
22
|
+
* provenance is distinguishable from a user-initiated write.
|
|
23
|
+
*/
|
|
24
|
+
export declare function reconcileWorkflowSkillState(options: {
|
|
25
|
+
cwd: string;
|
|
26
|
+
mode: CanonicalGjcWorkflowSkill;
|
|
27
|
+
sessionId: string | undefined;
|
|
28
|
+
threadId?: string;
|
|
29
|
+
turnId?: string;
|
|
30
|
+
active: boolean;
|
|
31
|
+
phase: string;
|
|
32
|
+
payload: Record<string, unknown>;
|
|
33
|
+
}): Promise<{
|
|
34
|
+
stateFile: string;
|
|
35
|
+
}>;
|
|
14
36
|
export declare function readWorkflowStateJson(cwd: string, skill: CanonicalGjcWorkflowSkill, sessionId?: string): Promise<Record<string, unknown>>;
|
|
15
37
|
export declare function runNativeStateCommand(args: string[], cwd?: string): Promise<StateCommandResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { WorkflowHudSummary } from "../skill-state/active-state";
|
|
2
2
|
export type UltragoalGjcGoalMode = "aggregate" | "per-story";
|
|
3
3
|
export type UltragoalGoalStatus = "pending" | "active" | "complete" | "failed" | "blocked" | "review_blocked" | "superseded";
|
|
4
4
|
export interface UltragoalGoal {
|
|
@@ -94,7 +94,6 @@ export declare function computeUltragoalPlanGeneration(input: {
|
|
|
94
94
|
export declare function readUltragoalPlan(cwd: string): Promise<UltragoalPlan | null>;
|
|
95
95
|
export declare function getUltragoalStatus(cwd: string): Promise<UltragoalStatusSummary>;
|
|
96
96
|
export declare function buildUltragoalHudSummary(summary: UltragoalStatusSummary, latestLedger?: UltragoalLedgerEvent): WorkflowHudSummary;
|
|
97
|
-
export declare function syncUltragoalWorkflowState(cwd: string): Promise<void>;
|
|
98
97
|
export declare function createUltragoalPlan(input: {
|
|
99
98
|
cwd: string;
|
|
100
99
|
brief: string;
|