@gajae-code/coding-agent 0.3.1 → 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.
Files changed (166) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +1 -1
  3. package/dist/types/cli/args.d.ts +2 -0
  4. package/dist/types/commands/launch.d.ts +6 -0
  5. package/dist/types/config/model-profile-activation.d.ts +30 -0
  6. package/dist/types/config/model-profiles.d.ts +19 -0
  7. package/dist/types/config/model-registry.d.ts +25 -10
  8. package/dist/types/config/model-resolver.d.ts +1 -1
  9. package/dist/types/config/models-config-schema.d.ts +84 -0
  10. package/dist/types/config/settings-schema.d.ts +15 -0
  11. package/dist/types/edit/diff.d.ts +16 -0
  12. package/dist/types/edit/modes/replace.d.ts +7 -0
  13. package/dist/types/extensibility/gjc-plugins/activation.d.ts +14 -0
  14. package/dist/types/extensibility/gjc-plugins/index.d.ts +9 -0
  15. package/dist/types/extensibility/gjc-plugins/injection.d.ts +31 -0
  16. package/dist/types/extensibility/gjc-plugins/loader.d.ts +3 -0
  17. package/dist/types/extensibility/gjc-plugins/paths.d.ts +8 -0
  18. package/dist/types/extensibility/gjc-plugins/schema.d.ts +3 -0
  19. package/dist/types/extensibility/gjc-plugins/state.d.ts +9 -0
  20. package/dist/types/extensibility/gjc-plugins/tools.d.ts +8 -0
  21. package/dist/types/extensibility/gjc-plugins/types.d.ts +64 -0
  22. package/dist/types/extensibility/gjc-plugins/validation.d.ts +4 -0
  23. package/dist/types/extensibility/skills.d.ts +9 -1
  24. package/dist/types/gjc-runtime/state-runtime.d.ts +22 -0
  25. package/dist/types/harness-control-plane/storage.d.ts +7 -0
  26. package/dist/types/lsp/client.d.ts +1 -0
  27. package/dist/types/main.d.ts +10 -1
  28. package/dist/types/modes/bridge/bridge-mode.d.ts +2 -0
  29. package/dist/types/modes/components/custom-provider-wizard.d.ts +10 -0
  30. package/dist/types/modes/components/model-selector.d.ts +6 -1
  31. package/dist/types/modes/components/provider-onboarding-selector.d.ts +1 -1
  32. package/dist/types/modes/controllers/selector-controller.d.ts +1 -0
  33. package/dist/types/modes/prompt-action-autocomplete.d.ts +2 -2
  34. package/dist/types/modes/rpc/rpc-client.d.ts +9 -1
  35. package/dist/types/modes/rpc/rpc-types.d.ts +179 -2
  36. package/dist/types/modes/shared/agent-wire/approval-gate.d.ts +57 -0
  37. package/dist/types/modes/shared/agent-wire/command-dispatch.d.ts +16 -1
  38. package/dist/types/modes/shared/agent-wire/deep-interview-gate.d.ts +47 -0
  39. package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +7 -0
  40. package/dist/types/modes/shared/agent-wire/handshake.d.ts +11 -1
  41. package/dist/types/modes/shared/agent-wire/protocol.d.ts +3 -1
  42. package/dist/types/modes/shared/agent-wire/responses.d.ts +1 -1
  43. package/dist/types/modes/shared/agent-wire/unattended-action-policy.d.ts +27 -0
  44. package/dist/types/modes/shared/agent-wire/unattended-audit.d.ts +68 -0
  45. package/dist/types/modes/shared/agent-wire/unattended-run-controller.d.ts +161 -0
  46. package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +61 -0
  47. package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +114 -0
  48. package/dist/types/modes/shared/agent-wire/workflow-gate-schema.d.ts +39 -0
  49. package/dist/types/modes/theme/theme.d.ts +2 -1
  50. package/dist/types/modes/types.d.ts +1 -0
  51. package/dist/types/runtime-mcp/transports/stdio.d.ts +0 -4
  52. package/dist/types/sdk.d.ts +8 -1
  53. package/dist/types/session/agent-session.d.ts +10 -0
  54. package/dist/types/session/blob-store.d.ts +17 -0
  55. package/dist/types/session/messages.d.ts +3 -0
  56. package/dist/types/session/session-storage.d.ts +6 -0
  57. package/dist/types/skill-state/active-state.d.ts +13 -0
  58. package/dist/types/task/executor.d.ts +1 -0
  59. package/dist/types/thinking.d.ts +3 -2
  60. package/dist/types/tools/hindsight-recall.d.ts +0 -2
  61. package/dist/types/tools/hindsight-reflect.d.ts +0 -2
  62. package/dist/types/tools/hindsight-retain.d.ts +0 -2
  63. package/dist/types/tools/index.d.ts +7 -4
  64. package/package.json +9 -7
  65. package/src/cli/args.ts +10 -0
  66. package/src/cli.ts +14 -0
  67. package/src/commands/harness.ts +192 -7
  68. package/src/commands/launch.ts +8 -0
  69. package/src/commands/ultragoal.ts +1 -21
  70. package/src/config/model-equivalence.ts +1 -1
  71. package/src/config/model-profile-activation.ts +157 -0
  72. package/src/config/model-profiles.ts +155 -0
  73. package/src/config/model-registry.ts +51 -5
  74. package/src/config/model-resolver.ts +3 -2
  75. package/src/config/models-config-schema.ts +42 -1
  76. package/src/config/settings-schema.ts +14 -1
  77. package/src/defaults/gjc/skills/ultragoal/SKILL.md +11 -1
  78. package/src/defaults/gjc/skills/ultragoal/ai-slop-cleaner.md +61 -0
  79. package/src/defaults/gjc-defaults.ts +7 -0
  80. package/src/discovery/claude-plugins.ts +25 -5
  81. package/src/edit/diff.ts +64 -1
  82. package/src/edit/modes/replace.ts +60 -2
  83. package/src/extensibility/gjc-plugins/activation.ts +87 -0
  84. package/src/extensibility/gjc-plugins/index.ts +9 -0
  85. package/src/extensibility/gjc-plugins/injection.ts +114 -0
  86. package/src/extensibility/gjc-plugins/loader.ts +131 -0
  87. package/src/extensibility/gjc-plugins/paths.ts +66 -0
  88. package/src/extensibility/gjc-plugins/schema.ts +79 -0
  89. package/src/extensibility/gjc-plugins/state.ts +29 -0
  90. package/src/extensibility/gjc-plugins/tools.ts +47 -0
  91. package/src/extensibility/gjc-plugins/types.ts +97 -0
  92. package/src/extensibility/gjc-plugins/validation.ts +76 -0
  93. package/src/extensibility/skills.ts +39 -7
  94. package/src/gjc-runtime/state-runtime.ts +93 -2
  95. package/src/gjc-runtime/state-writer.ts +17 -1
  96. package/src/gjc-runtime/ultragoal-runtime.ts +62 -2
  97. package/src/gjc-runtime/workflow-manifest.generated.json +5 -0
  98. package/src/gjc-runtime/workflow-manifest.ts +2 -2
  99. package/src/harness-control-plane/storage.ts +144 -2
  100. package/src/hashline/hash.ts +23 -0
  101. package/src/hooks/skill-state.ts +2 -0
  102. package/src/internal-urls/docs-index.generated.ts +8 -11
  103. package/src/lsp/client.ts +7 -0
  104. package/src/main.ts +67 -1
  105. package/src/modes/acp/acp-agent.ts +25 -2
  106. package/src/modes/bridge/bridge-mode.ts +124 -2
  107. package/src/modes/components/custom-provider-wizard.ts +318 -0
  108. package/src/modes/components/model-selector.ts +108 -18
  109. package/src/modes/components/provider-onboarding-selector.ts +6 -1
  110. package/src/modes/controllers/input-controller.ts +14 -2
  111. package/src/modes/controllers/selector-controller.ts +57 -1
  112. package/src/modes/prompt-action-autocomplete.ts +49 -10
  113. package/src/modes/rpc/rpc-client.ts +57 -3
  114. package/src/modes/rpc/rpc-mode.ts +67 -0
  115. package/src/modes/rpc/rpc-types.ts +224 -2
  116. package/src/modes/shared/agent-wire/approval-gate.ts +151 -0
  117. package/src/modes/shared/agent-wire/command-dispatch.ts +97 -4
  118. package/src/modes/shared/agent-wire/command-validation.ts +25 -1
  119. package/src/modes/shared/agent-wire/deep-interview-gate.ts +222 -0
  120. package/src/modes/shared/agent-wire/event-envelope.ts +13 -0
  121. package/src/modes/shared/agent-wire/handshake.ts +43 -3
  122. package/src/modes/shared/agent-wire/protocol.ts +7 -0
  123. package/src/modes/shared/agent-wire/responses.ts +2 -2
  124. package/src/modes/shared/agent-wire/scopes.ts +2 -0
  125. package/src/modes/shared/agent-wire/unattended-action-policy.ts +341 -0
  126. package/src/modes/shared/agent-wire/unattended-audit.ts +175 -0
  127. package/src/modes/shared/agent-wire/unattended-run-controller.ts +406 -0
  128. package/src/modes/shared/agent-wire/unattended-session.ts +180 -0
  129. package/src/modes/shared/agent-wire/workflow-gate-broker.ts +324 -0
  130. package/src/modes/shared/agent-wire/workflow-gate-schema.ts +331 -0
  131. package/src/modes/theme/theme.ts +6 -0
  132. package/src/modes/types.ts +1 -0
  133. package/src/prompts/memories/consolidation.md +1 -1
  134. package/src/prompts/memories/read-path.md +6 -7
  135. package/src/prompts/memories/unavailable.md +2 -2
  136. package/src/prompts/tools/bash.md +1 -1
  137. package/src/prompts/tools/irc.md +1 -1
  138. package/src/prompts/tools/read.md +2 -2
  139. package/src/prompts/tools/recall.md +1 -0
  140. package/src/prompts/tools/reflect.md +1 -0
  141. package/src/prompts/tools/retain.md +1 -0
  142. package/src/runtime-mcp/client.ts +7 -4
  143. package/src/runtime-mcp/manager.ts +45 -13
  144. package/src/runtime-mcp/transports/http.ts +40 -14
  145. package/src/runtime-mcp/transports/stdio.ts +11 -10
  146. package/src/sdk.ts +48 -1
  147. package/src/session/agent-session.ts +211 -2
  148. package/src/session/blob-store.ts +84 -0
  149. package/src/session/messages.ts +3 -0
  150. package/src/session/session-manager.ts +390 -33
  151. package/src/session/session-storage.ts +26 -0
  152. package/src/setup/provider-onboarding.ts +2 -2
  153. package/src/skill-state/active-state.ts +89 -1
  154. package/src/slash-commands/builtin-registry.ts +1 -1
  155. package/src/task/discovery.ts +7 -1
  156. package/src/task/executor.ts +18 -2
  157. package/src/task/index.ts +2 -0
  158. package/src/thinking.ts +8 -2
  159. package/src/tools/ask.ts +39 -9
  160. package/src/tools/hindsight-recall.ts +0 -2
  161. package/src/tools/hindsight-reflect.ts +0 -2
  162. package/src/tools/hindsight-retain.ts +0 -2
  163. package/src/tools/index.ts +7 -18
  164. package/src/tools/read.ts +3 -3
  165. package/src/tools/skill.ts +15 -3
  166. package/src/utils/edit-mode.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,52 @@
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
+
33
+ ## [0.3.2] - 2026-06-05
34
+
35
+ ### Added
36
+
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.
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.
42
+
43
+ ### Fixed
44
+
45
+ - Reconciled native Ultragoal commands with workflow mode-state and the HUD: `gjc ultragoal create-goals`, `complete-goals`, `checkpoint`, steering, review-blocker recording, and status now sync `.gjc/state/ultragoal-state.json` plus `skill-active-state.json` from the durable `.gjc/ultragoal` plan/ledger, clearing stale active HUD chips after all goals complete.
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.
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.
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.
50
+
5
51
  ## [0.3.1] - 2026-06-05
6
52
  ### Added
7
53
 
package/README.md CHANGED
@@ -17,7 +17,7 @@ The agent supports three mutually-exclusive memory backends, selected via the `m
17
17
 
18
18
  - `off` (default) — no memory subsystem runs.
19
19
  - `local` — existing rollout-summarisation pipeline; writes `memory_summary.md` and consolidated artifacts under the agent dir.
20
- - `hindsight` — talks to a [Hindsight](https://hindsight.vectorize.io) server (Cloud or self-hosted Docker), retains transcripts every Nth user turn, recalls memories on the first turn of a session, and exposes `retain`, `recall`, and `reflect`.
20
+ - `hindsight` — talks to a [Hindsight](https://hindsight.vectorize.io) server (Cloud or self-hosted Docker). Hindsight uses private backend lifecycle hooks to retain transcripts and recall context; compatibility-only internals remain for legacy backend calls, but GJC does not expose public coding-harness memory tools such as `retain`, `recall`, or `reflect`.
21
21
 
22
22
  ### Hindsight quickstart
23
23
 
@@ -11,6 +11,8 @@ export interface Args {
11
11
  smol?: string;
12
12
  slow?: string;
13
13
  plan?: string;
14
+ mpreset?: string;
15
+ default?: boolean;
14
16
  apiKey?: string;
15
17
  systemPrompt?: string;
16
18
  appendSystemPrompt?: string;
@@ -25,6 +25,12 @@ export default class Index extends Command {
25
25
  plan: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
26
26
  description: string;
27
27
  };
28
+ mpreset: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
29
+ description: string;
30
+ };
31
+ default: import("@gajae-code/utils/cli").FlagDescriptor<"boolean"> & {
32
+ description: string;
33
+ };
28
34
  provider: import("@gajae-code/utils/cli").FlagDescriptor<"string"> & {
29
35
  description: string;
30
36
  };
@@ -0,0 +1,30 @@
1
+ import type { ThinkingLevel } from "@gajae-code/agent-core";
2
+ import type { Api, Model } from "@gajae-code/ai";
3
+ import type { AgentSession } from "../session/agent-session";
4
+ import { type ModelRegistry } from "./model-registry";
5
+ import type { Settings } from "./settings";
6
+ export interface PrepareModelProfileActivationOptions {
7
+ session: Pick<AgentSession, "model" | "thinkingLevel" | "sessionId">;
8
+ modelRegistry: Pick<ModelRegistry, "getModelProfile" | "getModelProfiles" | "getAvailableModelProfileNames" | "getApiKeyForProvider" | "getAll" | "resolveCanonicalModel" | "getCanonicalVariants" | "getCanonicalId">;
9
+ settings: Pick<Settings, "get">;
10
+ profileName: string;
11
+ }
12
+ export interface PreparedModelProfileActivation {
13
+ profileName: string;
14
+ session: Pick<AgentSession, "model" | "thinkingLevel" | "sessionId" | "setModelTemporary">;
15
+ settings: Pick<Settings, "get" | "override" | "set" | "flush">;
16
+ previousModel: Model<Api> | undefined;
17
+ previousThinkingLevel: ThinkingLevel | undefined;
18
+ previousAgentModelOverrides: Record<string, string>;
19
+ defaultModel: Model<Api> | undefined;
20
+ defaultThinkingLevel: ThinkingLevel | undefined;
21
+ agentModelOverrides: Record<string, string>;
22
+ }
23
+ export declare function formatModelProfileCredentialError(profileName: string, providers: readonly string[]): string;
24
+ export declare function prepareModelProfileActivation(options: PrepareModelProfileActivationOptions): Promise<PreparedModelProfileActivation>;
25
+ export declare function applyPreparedModelProfileActivation(prepared: PreparedModelProfileActivation, options?: {
26
+ persistDefault?: boolean;
27
+ }): Promise<void>;
28
+ export declare function activateModelProfile(options: PrepareModelProfileActivationOptions, applyOptions?: {
29
+ persistDefault?: boolean;
30
+ }): Promise<void>;
@@ -0,0 +1,19 @@
1
+ import type { GjcModelAssignmentTargetId } from "./model-registry";
2
+ import type { ModelsConfig } from "./models-config-schema";
3
+ export type ModelProfileRole = GjcModelAssignmentTargetId;
4
+ export interface ModelProfileDefinition {
5
+ name: string;
6
+ requiredProviders: string[];
7
+ modelMapping: Partial<Record<ModelProfileRole, string>>;
8
+ source: "builtin" | "user";
9
+ }
10
+ export interface ResolvedProfileBinding {
11
+ defaultSelector?: string;
12
+ agentModelOverrides: Partial<Record<Exclude<ModelProfileRole, "default">, string>>;
13
+ }
14
+ export declare function deriveModelProfileMappedProviders(definition: Pick<ModelProfileDefinition, "modelMapping">): string[];
15
+ export declare function aggregateModelProfileRequiredProviders(requiredProviders: readonly string[], definition: Pick<ModelProfileDefinition, "modelMapping">): string[];
16
+ export declare const BUILTIN_MODEL_PROFILES: readonly ModelProfileDefinition[];
17
+ export declare function mergeModelProfiles(userProfiles?: ModelsConfig["profiles"]): Map<string, ModelProfileDefinition>;
18
+ export declare function resolveProfileBindings(definition: ModelProfileDefinition): ResolvedProfileBinding;
19
+ export declare function formatAvailableProfileNames(profiles: ReadonlyMap<string, ModelProfileDefinition>): string;
@@ -1,9 +1,10 @@
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";
5
5
  import { type ConfigError, ConfigFile } from "./config-file";
6
6
  import { type CanonicalModelIndex, type CanonicalModelRecord, type CanonicalModelVariant, type ModelEquivalenceConfig } from "./model-equivalence";
7
+ import { type ModelProfileDefinition } from "./model-profiles";
7
8
  import { type Settings } from "./settings";
8
9
  export type { CanonicalModelIndex, CanonicalModelRecord, CanonicalModelVariant, ModelEquivalenceConfig };
9
10
  export declare const kNoAuth = "N/A";
@@ -56,6 +57,7 @@ export declare const ModelsConfigFile: ConfigFile<{
56
57
  medium?: string | undefined;
57
58
  high?: string | undefined;
58
59
  xhigh?: string | undefined;
60
+ max?: string | undefined;
59
61
  } | undefined;
60
62
  maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
61
63
  supportsUsageInStreaming?: boolean | undefined;
@@ -101,11 +103,11 @@ export declare const ModelsConfigFile: ConfigFile<{
101
103
  baseUrl?: string | undefined;
102
104
  reasoning?: boolean | undefined;
103
105
  thinking?: {
104
- minLevel: "high" | "low" | "medium" | "minimal" | "xhigh";
105
- maxLevel: "high" | "low" | "medium" | "minimal" | "xhigh";
106
+ minLevel: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
107
+ maxLevel: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
106
108
  mode: "anthropic-adaptive" | "anthropic-budget-effort" | "budget" | "effort" | "google-level";
107
- defaultLevel?: "high" | "low" | "medium" | "minimal" | "xhigh" | undefined;
108
- 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;
109
111
  } | undefined;
110
112
  input?: ("image" | "text")[] | undefined;
111
113
  cost?: {
@@ -129,6 +131,7 @@ export declare const ModelsConfigFile: ConfigFile<{
129
131
  medium?: string | undefined;
130
132
  high?: string | undefined;
131
133
  xhigh?: string | undefined;
134
+ max?: string | undefined;
132
135
  } | undefined;
133
136
  maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
134
137
  supportsUsageInStreaming?: boolean | undefined;
@@ -164,16 +167,17 @@ export declare const ModelsConfigFile: ConfigFile<{
164
167
  setHeaders?: Record<string, string | null> | undefined;
165
168
  extraBody?: Record<string, unknown> | undefined;
166
169
  } | undefined;
170
+ cacheRetention?: "long" | "none" | "short" | undefined;
167
171
  }[] | undefined;
168
172
  modelOverrides?: Record<string, {
169
173
  name?: string | undefined;
170
174
  reasoning?: boolean | undefined;
171
175
  thinking?: {
172
- minLevel: "high" | "low" | "medium" | "minimal" | "xhigh";
173
- maxLevel: "high" | "low" | "medium" | "minimal" | "xhigh";
176
+ minLevel: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
177
+ maxLevel: "high" | "low" | "max" | "medium" | "minimal" | "xhigh";
174
178
  mode: "anthropic-adaptive" | "anthropic-budget-effort" | "budget" | "effort" | "google-level";
175
- defaultLevel?: "high" | "low" | "medium" | "minimal" | "xhigh" | undefined;
176
- 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;
177
181
  } | undefined;
178
182
  input?: ("image" | "text")[] | undefined;
179
183
  cost?: {
@@ -197,6 +201,7 @@ export declare const ModelsConfigFile: ConfigFile<{
197
201
  medium?: string | undefined;
198
202
  high?: string | undefined;
199
203
  xhigh?: string | undefined;
204
+ max?: string | undefined;
200
205
  } | undefined;
201
206
  maxTokensField?: "max_completion_tokens" | "max_tokens" | undefined;
202
207
  supportsUsageInStreaming?: boolean | undefined;
@@ -232,9 +237,11 @@ export declare const ModelsConfigFile: ConfigFile<{
232
237
  setHeaders?: Record<string, string | null> | undefined;
233
238
  extraBody?: Record<string, unknown> | undefined;
234
239
  } | undefined;
240
+ cacheRetention?: "long" | "none" | "short" | undefined;
235
241
  }> | undefined;
236
242
  disableStrictTools?: boolean | undefined;
237
243
  transport?: "pi-native" | undefined;
244
+ cacheRetention?: "long" | "none" | "short" | undefined;
238
245
  }> | undefined;
239
246
  modelBindings?: {
240
247
  modelRoles?: Record<string, string> | undefined;
@@ -244,6 +251,10 @@ export declare const ModelsConfigFile: ConfigFile<{
244
251
  overrides?: Record<string, string> | undefined;
245
252
  exclude?: string[] | undefined;
246
253
  } | undefined;
254
+ profiles?: Record<string, {
255
+ required_providers: string[];
256
+ model_mapping: Partial<Record<"architect" | "critic" | "default" | "executor" | "planner", string>>;
257
+ }> | undefined;
247
258
  }>;
248
259
  /** Provider override config (baseUrl, headers, apiKey, compat, transport) without custom models */
249
260
  interface ProviderOverride {
@@ -254,6 +265,7 @@ interface ProviderOverride {
254
265
  compat?: Model<Api>["compat"];
255
266
  transport?: Model<Api>["transport"];
256
267
  requestTransform?: ModelRequestTransform;
268
+ cacheRetention?: CacheRetention;
257
269
  }
258
270
  /**
259
271
  * Merge a freshly discovered model with the matching bundled/configured entry
@@ -271,7 +283,7 @@ interface ProviderOverride {
271
283
  * See `xiaomi-tp-discovery-merge.test.ts` and the `refresh()` baseUrl-override
272
284
  * regression in `model-registry.test.ts`.
273
285
  */
274
- 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>;
275
287
  export type ProviderDiscoveryStatus = "idle" | "ok" | "empty" | "cached" | "unavailable" | "unauthenticated";
276
288
  export interface ProviderDiscoveryState {
277
289
  provider: string;
@@ -306,6 +318,9 @@ export declare class ModelRegistry {
306
318
  * Get any error from loading models.json (undefined if no error).
307
319
  */
308
320
  getError(): ConfigError | undefined;
321
+ getModelProfiles(): Map<string, ModelProfileDefinition>;
322
+ getModelProfile(name: string): ModelProfileDefinition | undefined;
323
+ getAvailableModelProfileNames(): string[];
309
324
  applyConfiguredModelBindings(targetSettings: Settings): void;
310
325
  /**
311
326
  * Get all models (built-in + custom).
@@ -128,7 +128,7 @@ export declare function resolveModelOverride(modelPatterns: string[], modelRegis
128
128
  * primary resolution unchanged so the existing error path still surfaces
129
129
  * a meaningful failure downstream.
130
130
  */
131
- export declare function resolveModelOverrideWithAuthFallback(modelPatterns: string[], parentActiveModelPattern: string | undefined, modelRegistry: ModelLookupRegistry & Pick<ModelRegistry, "getApiKey">, settings?: Settings): Promise<{
131
+ export declare function resolveModelOverrideWithAuthFallback(modelPatterns: string[], parentActiveModelPattern: string | undefined, modelRegistry: ModelLookupRegistry & Pick<ModelRegistry, "getApiKey">, settings?: Settings, sessionId?: string): Promise<{
132
132
  model?: Model<Api>;
133
133
  thinkingLevel?: ThinkingLevel;
134
134
  explicitThinkingLevel: boolean;
@@ -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";
@@ -53,6 +54,41 @@ export declare const OpenAICompatSchema: z.ZodObject<{
53
54
  none: "none";
54
55
  }>>;
55
56
  }, z.core.$strip>;
57
+ export declare const ProfileRoleSchema: z.ZodEnum<{
58
+ architect: "architect";
59
+ critic: "critic";
60
+ default: "default";
61
+ executor: "executor";
62
+ planner: "planner";
63
+ }>;
64
+ export declare const ProfileModelSelectorSchema: z.ZodString;
65
+ export declare const ProfileModelMappingSchema: z.ZodRecord<z.ZodEnum<{
66
+ architect: "architect";
67
+ critic: "critic";
68
+ default: "default";
69
+ executor: "executor";
70
+ planner: "planner";
71
+ }> & z.core.$partial, z.ZodString>;
72
+ export declare const ProfileDefinitionSchema: z.ZodObject<{
73
+ required_providers: z.ZodArray<z.ZodString>;
74
+ model_mapping: z.ZodRecord<z.ZodEnum<{
75
+ architect: "architect";
76
+ critic: "critic";
77
+ default: "default";
78
+ executor: "executor";
79
+ planner: "planner";
80
+ }> & z.core.$partial, z.ZodString>;
81
+ }, z.core.$strict>;
82
+ export declare const ProfilesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
83
+ required_providers: z.ZodArray<z.ZodString>;
84
+ model_mapping: z.ZodRecord<z.ZodEnum<{
85
+ architect: "architect";
86
+ critic: "critic";
87
+ default: "default";
88
+ executor: "executor";
89
+ planner: "planner";
90
+ }> & z.core.$partial, z.ZodString>;
91
+ }, z.core.$strict>>;
56
92
  export declare const ModelOverrideSchema: z.ZodObject<{
57
93
  name: z.ZodOptional<z.ZodString>;
58
94
  reasoning: z.ZodOptional<z.ZodBoolean>;
@@ -60,6 +96,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
60
96
  minLevel: z.ZodEnum<{
61
97
  high: "high";
62
98
  low: "low";
99
+ max: "max";
63
100
  medium: "medium";
64
101
  minimal: "minimal";
65
102
  xhigh: "xhigh";
@@ -67,6 +104,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
67
104
  maxLevel: z.ZodEnum<{
68
105
  high: "high";
69
106
  low: "low";
107
+ max: "max";
70
108
  medium: "medium";
71
109
  minimal: "minimal";
72
110
  xhigh: "xhigh";
@@ -81,6 +119,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
81
119
  defaultLevel: z.ZodOptional<z.ZodEnum<{
82
120
  high: "high";
83
121
  low: "low";
122
+ max: "max";
84
123
  medium: "medium";
85
124
  minimal: "minimal";
86
125
  xhigh: "xhigh";
@@ -88,6 +127,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
88
127
  levels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
89
128
  high: "high";
90
129
  low: "low";
130
+ max: "max";
91
131
  medium: "medium";
92
132
  minimal: "minimal";
93
133
  xhigh: "xhigh";
@@ -118,6 +158,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
118
158
  medium: z.ZodOptional<z.ZodString>;
119
159
  high: z.ZodOptional<z.ZodString>;
120
160
  xhigh: z.ZodOptional<z.ZodString>;
161
+ max: z.ZodOptional<z.ZodString>;
121
162
  }, z.core.$strip>>;
122
163
  maxTokensField: z.ZodOptional<z.ZodEnum<{
123
164
  max_completion_tokens: "max_completion_tokens";
@@ -171,6 +212,11 @@ export declare const ModelOverrideSchema: z.ZodObject<{
171
212
  setHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
172
213
  extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
173
214
  }, z.core.$strict>>;
215
+ cacheRetention: z.ZodOptional<z.ZodEnum<{
216
+ long: "long";
217
+ none: "none";
218
+ short: "short";
219
+ }>>;
174
220
  }, z.core.$strict>;
175
221
  export type ModelOverride = z.infer<typeof ModelOverrideSchema>;
176
222
  export declare const ProviderDiscoverySchema: z.ZodObject<{
@@ -218,6 +264,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
218
264
  medium: z.ZodOptional<z.ZodString>;
219
265
  high: z.ZodOptional<z.ZodString>;
220
266
  xhigh: z.ZodOptional<z.ZodString>;
267
+ max: z.ZodOptional<z.ZodString>;
221
268
  }, z.core.$strip>>;
222
269
  maxTokensField: z.ZodOptional<z.ZodEnum<{
223
270
  max_completion_tokens: "max_completion_tokens";
@@ -305,6 +352,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
305
352
  minLevel: z.ZodEnum<{
306
353
  high: "high";
307
354
  low: "low";
355
+ max: "max";
308
356
  medium: "medium";
309
357
  minimal: "minimal";
310
358
  xhigh: "xhigh";
@@ -312,6 +360,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
312
360
  maxLevel: z.ZodEnum<{
313
361
  high: "high";
314
362
  low: "low";
363
+ max: "max";
315
364
  medium: "medium";
316
365
  minimal: "minimal";
317
366
  xhigh: "xhigh";
@@ -326,6 +375,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
326
375
  defaultLevel: z.ZodOptional<z.ZodEnum<{
327
376
  high: "high";
328
377
  low: "low";
378
+ max: "max";
329
379
  medium: "medium";
330
380
  minimal: "minimal";
331
381
  xhigh: "xhigh";
@@ -333,6 +383,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
333
383
  levels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
334
384
  high: "high";
335
385
  low: "low";
386
+ max: "max";
336
387
  medium: "medium";
337
388
  minimal: "minimal";
338
389
  xhigh: "xhigh";
@@ -363,6 +414,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
363
414
  medium: z.ZodOptional<z.ZodString>;
364
415
  high: z.ZodOptional<z.ZodString>;
365
416
  xhigh: z.ZodOptional<z.ZodString>;
417
+ max: z.ZodOptional<z.ZodString>;
366
418
  }, z.core.$strip>>;
367
419
  maxTokensField: z.ZodOptional<z.ZodEnum<{
368
420
  max_completion_tokens: "max_completion_tokens";
@@ -416,6 +468,11 @@ export declare const ModelsConfigSchema: z.ZodObject<{
416
468
  setHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
417
469
  extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
418
470
  }, z.core.$strict>>;
471
+ cacheRetention: z.ZodOptional<z.ZodEnum<{
472
+ long: "long";
473
+ none: "none";
474
+ short: "short";
475
+ }>>;
419
476
  }, z.core.$strict>>>;
420
477
  modelOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
421
478
  name: z.ZodOptional<z.ZodString>;
@@ -424,6 +481,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
424
481
  minLevel: z.ZodEnum<{
425
482
  high: "high";
426
483
  low: "low";
484
+ max: "max";
427
485
  medium: "medium";
428
486
  minimal: "minimal";
429
487
  xhigh: "xhigh";
@@ -431,6 +489,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
431
489
  maxLevel: z.ZodEnum<{
432
490
  high: "high";
433
491
  low: "low";
492
+ max: "max";
434
493
  medium: "medium";
435
494
  minimal: "minimal";
436
495
  xhigh: "xhigh";
@@ -445,6 +504,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
445
504
  defaultLevel: z.ZodOptional<z.ZodEnum<{
446
505
  high: "high";
447
506
  low: "low";
507
+ max: "max";
448
508
  medium: "medium";
449
509
  minimal: "minimal";
450
510
  xhigh: "xhigh";
@@ -452,6 +512,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
452
512
  levels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
453
513
  high: "high";
454
514
  low: "low";
515
+ max: "max";
455
516
  medium: "medium";
456
517
  minimal: "minimal";
457
518
  xhigh: "xhigh";
@@ -482,6 +543,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
482
543
  medium: z.ZodOptional<z.ZodString>;
483
544
  high: z.ZodOptional<z.ZodString>;
484
545
  xhigh: z.ZodOptional<z.ZodString>;
546
+ max: z.ZodOptional<z.ZodString>;
485
547
  }, z.core.$strip>>;
486
548
  maxTokensField: z.ZodOptional<z.ZodEnum<{
487
549
  max_completion_tokens: "max_completion_tokens";
@@ -535,9 +597,19 @@ export declare const ModelsConfigSchema: z.ZodObject<{
535
597
  setHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
536
598
  extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
537
599
  }, z.core.$strict>>;
600
+ cacheRetention: z.ZodOptional<z.ZodEnum<{
601
+ long: "long";
602
+ none: "none";
603
+ short: "short";
604
+ }>>;
538
605
  }, z.core.$strict>>>;
539
606
  disableStrictTools: z.ZodOptional<z.ZodBoolean>;
540
607
  transport: z.ZodOptional<z.ZodLiteral<"pi-native">>;
608
+ cacheRetention: z.ZodOptional<z.ZodEnum<{
609
+ long: "long";
610
+ none: "none";
611
+ short: "short";
612
+ }>>;
541
613
  }, z.core.$strict>>>;
542
614
  modelBindings: z.ZodOptional<z.ZodObject<{
543
615
  modelRoles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -547,5 +619,17 @@ export declare const ModelsConfigSchema: z.ZodObject<{
547
619
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
548
620
  exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
549
621
  }, z.core.$strip>>;
622
+ profiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
623
+ required_providers: z.ZodArray<z.ZodString>;
624
+ model_mapping: z.ZodRecord<z.ZodEnum<{
625
+ architect: "architect";
626
+ critic: "critic";
627
+ default: "default";
628
+ executor: "executor";
629
+ planner: "planner";
630
+ }> & z.core.$partial, z.ZodString>;
631
+ }, z.core.$strict>>>;
550
632
  }, z.core.$strict>;
551
633
  export type ModelsConfig = z.infer<typeof ModelsConfigSchema>;
634
+ export type ModelProfileConfig = z.infer<typeof ProfileDefinitionSchema>;
635
+ export type ModelProfilesConfig = z.infer<typeof ProfilesSchema>;
@@ -189,6 +189,16 @@ export declare const SETTINGS_SCHEMA: {
189
189
  readonly type: "record";
190
190
  readonly default: Record<string, string>;
191
191
  };
192
+ readonly "modelProfile.default": {
193
+ readonly type: "string";
194
+ readonly default: undefined;
195
+ readonly ui: {
196
+ readonly tab: "model";
197
+ readonly label: "Default Model Profile";
198
+ readonly description: "Model profile applied automatically at startup";
199
+ readonly options: "runtime";
200
+ };
201
+ };
192
202
  readonly modelTags: {
193
203
  readonly type: "record";
194
204
  readonly default: ModelTagsSettings;
@@ -3206,6 +3216,10 @@ export declare const SETTINGS_SCHEMA: {
3206
3216
  readonly type: "number";
3207
3217
  readonly default: 32768;
3208
3218
  };
3219
+ readonly "thinkingBudgets.max": {
3220
+ readonly type: "number";
3221
+ readonly default: 65536;
3222
+ };
3209
3223
  };
3210
3224
  type Schema = typeof SETTINGS_SCHEMA;
3211
3225
  /** All valid setting paths */
@@ -3335,6 +3349,7 @@ export interface ThinkingBudgetsSettings {
3335
3349
  medium: number;
3336
3350
  high: number;
3337
3351
  xhigh: number;
3352
+ max: number;
3338
3353
  }
3339
3354
  export interface SttSettings {
3340
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,9 @@
1
+ export * from "./activation";
2
+ export * from "./injection";
3
+ export * from "./loader";
4
+ export * from "./paths";
5
+ export * from "./schema";
6
+ export * from "./state";
7
+ export * from "./tools";
8
+ export * from "./types";
9
+ export * from "./validation";
@@ -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>;