@kodax-ai/kodax 0.7.66 → 0.7.67

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 (61) hide show
  1. package/CHANGELOG.md +108 -3
  2. package/README.md +40 -10
  3. package/README_CN.md +26 -9
  4. package/dist/chunks/{agent-KER4WDNO.js → agent-E4V5SLX6.js} +1 -1
  5. package/dist/chunks/argument-completer-N6RT5KYT.js +2 -0
  6. package/dist/chunks/{chunk-QJVZZSEO.js → chunk-AKMXJSGM.js} +1 -1
  7. package/dist/chunks/{chunk-WMIZCY2J.js → chunk-CW32NQFO.js} +1 -1
  8. package/dist/chunks/{chunk-ALS32RNZ.js → chunk-DEICMTHO.js} +9 -9
  9. package/dist/chunks/{chunk-VS4CDDEF.js → chunk-EN3O2C43.js} +221 -221
  10. package/dist/chunks/chunk-KBBGDRER.js +22 -0
  11. package/dist/chunks/chunk-NVDK375I.js +729 -0
  12. package/dist/chunks/chunk-QI6SQ2UQ.js +306 -0
  13. package/dist/chunks/{chunk-MHRN2LQV.js → chunk-RS2GAABJ.js} +17 -17
  14. package/dist/chunks/chunk-W2XMNYLK.js +15 -0
  15. package/dist/chunks/{chunk-QAQ2HNXD.js → chunk-WCSSXBHR.js} +126 -112
  16. package/dist/chunks/chunk-YH5BTUQO.js +343 -0
  17. package/dist/chunks/{compaction-config-7GMUFNPB.js → compaction-config-56NO42ZI.js} +1 -1
  18. package/dist/chunks/{construction-bootstrap-3XDS2D5K.js → construction-bootstrap-GLEHQ2KB.js} +1 -1
  19. package/dist/chunks/dist-4UIRSSFS.js +2 -0
  20. package/dist/chunks/host-DMREFNSO.js +2 -0
  21. package/dist/chunks/{run-manager-6CAH3KTA.js → run-manager-P5XMSGZ7.js} +1 -1
  22. package/dist/chunks/{utils-OT5ENFUL.js → utils-JENPFKAE.js} +1 -1
  23. package/dist/index.d.ts +15 -12
  24. package/dist/index.js +6 -6
  25. package/dist/kodax_cli.js +1237 -1214
  26. package/dist/runtime-worker.js +1147 -1118
  27. package/dist/sdk-agent.d.ts +27 -10
  28. package/dist/sdk-agent.js +1 -1
  29. package/dist/sdk-coding.d.ts +277 -16
  30. package/dist/sdk-coding.js +1 -1
  31. package/dist/sdk-mcp.js +1 -1
  32. package/dist/sdk-repl.d.ts +23 -14
  33. package/dist/sdk-repl.js +2 -2
  34. package/dist/sdk-runtime.d.ts +99 -11
  35. package/dist/sdk-runtime.js +1 -1
  36. package/dist/sdk-session.d.ts +4 -4
  37. package/dist/sdk-session.js +1 -1
  38. package/dist/sdk-skills.js +1 -1
  39. package/dist/semantic-worker.js +11 -11
  40. package/dist/types-chunks/{bash-prefix-extractor.d-BjkITAva.d.ts → bash-prefix-extractor.d-D57Gt6n8.d.ts} +44 -9
  41. package/dist/types-chunks/{capsule.d-hVhPNkHd.d.ts → capsule.d-BZmqu_HL.d.ts} +2 -2
  42. package/dist/types-chunks/{commands.d-C3B1TdGM.d.ts → commands.d-Cg26ud-Y.d.ts} +4 -4
  43. package/dist/types-chunks/{guardrail.d-C_Siraua.d.ts → guardrail.d-Ds7JHxR1.d.ts} +1 -1
  44. package/dist/types-chunks/{guardrail.d-wk-s0psS.d.ts → guardrail.d-vSaBe64I.d.ts} +2 -2
  45. package/dist/types-chunks/{public-api.d-jtREVfEq.d.ts → public-api.d-CPBMPDiU.d.ts} +8 -2
  46. package/dist/types-chunks/{run-manager.d-CFknOfo1.d.ts → run-manager.d-lnwnfyNC.d.ts} +1 -1
  47. package/dist/types-chunks/{sdk-session-CLqyfAmf.d.ts → sdk-session-ByoMLoUS.d.ts} +3 -3
  48. package/dist/types-chunks/{process.d-CY2g03Mb.d.ts → types.d-DG9B4SMm.d.ts} +369 -4
  49. package/dist/types-chunks/{types.d-BMLxKV69.d.ts → types.d-DU9lLkmE.d.ts} +1 -1
  50. package/dist/types-chunks/{types.d-CUN_bZU7.d.ts → types.d-DYv3a1ka.d.ts} +2 -2
  51. package/dist/types-chunks/{utils.d-C1rpoeDh.d.ts → utils.d-DMI-9GTR.d.ts} +8 -4
  52. package/docs/SDK_EMBEDDER_GUIDE.md +3079 -0
  53. package/package.json +2 -1
  54. package/dist/chunks/argument-completer-HK3MHA3K.js +0 -2
  55. package/dist/chunks/chunk-3HKBBY74.js +0 -339
  56. package/dist/chunks/chunk-AKBH2EEE.js +0 -8
  57. package/dist/chunks/chunk-NBQW7PNZ.js +0 -18
  58. package/dist/chunks/chunk-TLJGOKBT.js +0 -729
  59. package/dist/chunks/chunk-WBBEJIAY.js +0 -306
  60. package/dist/chunks/dist-4YAYT2TO.js +0 -2
  61. package/dist/chunks/host-KG3456QP.js +0 -2
@@ -1,4 +1,4 @@
1
- import { _ as KodaXGoalState, h as AgentMessage, bM as StopHookFn, af as KodaXSessionLineage, a4 as KodaXJsonValue, U as KodaXExtensionSessionRecord, f as Agent, c8 as WorkflowIsolation, V as KodaXExtensionSessionState, a6 as KodaXSessionArtifactLedgerEntry, bx as SessionErrorMetadata, al as KodaXSessionScope, am as KodaXSessionStorage, a2 as KodaXInputArtifact, C as ChildTaskRegistry, c5 as WorkflowEventCorrelation, x as CompactionUpdate, ch as WorkflowProcessEvent, c4 as WorkflowEvent, q as AskUserQuestionOptions, m as AskUserAnswer, o as AskUserMultiOptions, b0 as MemoryReviewPlan, b1 as MemoryReviewRunner, J as Guardrail, B as DiscoveredInstance, bQ as TaskAbortRegistry } from './process.d-CY2g03Mb.js';
1
+ import { aN as KodaXGoalState, I as AgentMessage, cB as StopHookFn, b2 as KodaXSessionLineage, aT as KodaXJsonValue, aH as KodaXExtensionSessionRecord, f as Agent, cZ as WorkflowIsolation, aI as KodaXExtensionSessionState, aV as KodaXSessionArtifactLedgerEntry, cm as SessionErrorMetadata, b8 as KodaXSessionScope, b9 as KodaXSessionStorage, aR as KodaXInputArtifact, B as AgentExecutorPlaneBinding, a6 as ChildTaskRegistry, cW as WorkflowEventCorrelation, ac as CompactionUpdate, d6 as WorkflowProcessEvent, cV as WorkflowEvent, a3 as AskUserQuestionOptions, $ as AskUserAnswer, a1 as AskUserMultiOptions, bR as MemoryReviewPlan, bS as MemoryReviewRunner, aw as Guardrail, ah as DiscoveredInstance, cF as TaskAbortRegistry } from './types.d-DG9B4SMm.js';
2
2
  import { $ as KodaXTokenUsage, j as KodaXMessage, a0 as KodaXToolDefinition, a8 as KodaXWireReasoningEffort, T as KodaXTaskRoutingDecision, U as KodaXTaskType, V as KodaXTaskWorkIntent, P as KodaXTaskComplexity, J as KodaXRiskLevel, g as KodaXHarnessProfile, e as KodaXExecutionMode, b as KodaXChildFanoutClass, E as KodaXReasoningMode, I as KodaXReviewScale } from './types.d-Bp4Lm1jv.js';
3
3
  import { d as SkillDynamicContextExecutor } from './types.d-vJExiRje.js';
4
4
  import { Diagnostic, Position, Location, Hover, DocumentSymbol, SymbolInformation, WorkspaceSymbol, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-protocol';
@@ -2173,14 +2173,9 @@ interface KodaXChildContextBundle {
2173
2173
  constraints: string[];
2174
2174
  readOnly: boolean;
2175
2175
  /**
2176
- * FEATURE_120 v0.7.39 Phase 4 optional model tier hint that the
2177
- * dispatching agent provides as a UX signal. Routing is a **no-op**
2178
- * for now: every child runs on the parent's model regardless of
2179
- * hint. FEATURE_102 (v0.7.45 capability profile) is the planned
2180
- * consumer that will translate `'fast' | 'balanced' | 'deep'` to a
2181
- * concrete provider/model selection. The field is surfaced + parsed
2182
- * now so prompt-eval data starts accumulating; the routing wire-up
2183
- * lands separately.
2176
+ * FEATURE_102 / FEATURE_259semantic model tier intent. The runtime maps
2177
+ * configured `fast`/`deep` tiers to concrete routes and safely inherits the
2178
+ * parent when a tier is unavailable or ineligible.
2184
2179
  */
2185
2180
  modelHint?: KodaXChildModelHint;
2186
2181
  /**
@@ -2216,6 +2211,11 @@ interface KodaXChildContextBundle {
2216
2211
  * one bounded repair turn) and surfaces it on `KodaXChildAgentResult.structured`.
2217
2212
  */
2218
2213
  outputSchema?: unknown;
2214
+ /** Trusted host provenance plus the generated script's terse-result declaration. */
2215
+ workflowOutputContract?: {
2216
+ readonly kodaxAuthored: boolean;
2217
+ readonly terseResult: boolean;
2218
+ };
2219
2219
  }
2220
2220
  /**
2221
2221
  * FEATURE_120 v0.7.39 Phase 4 — model tier hint. Tier semantics:
@@ -2228,6 +2228,26 @@ interface KodaXChildContextBundle {
2228
2228
  * unknown values silently with a tolerant fallback to `undefined`).
2229
2229
  */
2230
2230
  type KodaXChildModelHint = 'fast' | 'balanced' | 'deep';
2231
+ type KodaXChildTierOutcome = 'applied' | 'balanced-parent' | 'fast-write-ineligible' | 'unconfigured' | 'shadowed-by-selector' | 'inherited';
2232
+ type KodaXChildRouteSource = 'explicit' | 'specialist' | 'tier' | 'parent' | 'default';
2233
+ interface KodaXChildRouteFacts {
2234
+ readonly requestedTier: KodaXChildModelHint | 'inherited';
2235
+ readonly tierOutcome: KodaXChildTierOutcome;
2236
+ readonly providerSource: KodaXChildRouteSource;
2237
+ readonly modelSource?: Exclude<KodaXChildRouteSource, 'default'>;
2238
+ readonly initialProvider?: string;
2239
+ readonly initialModel?: string;
2240
+ readonly finalProvider?: string;
2241
+ readonly finalModel?: string;
2242
+ readonly resolvedEffort?: string;
2243
+ readonly fallbackReason?: string;
2244
+ readonly iterations?: number;
2245
+ readonly inputTokens?: number;
2246
+ readonly cacheReadTokens?: number;
2247
+ readonly outputTokens?: number;
2248
+ readonly digestTokens?: number;
2249
+ readonly durationMs?: number;
2250
+ }
2231
2251
  interface KodaXChildAgentResult {
2232
2252
  childId: string;
2233
2253
  fanoutClass: KodaXChildFanoutClass;
@@ -2251,6 +2271,17 @@ interface KodaXChildAgentResult {
2251
2271
  actualIterations?: number;
2252
2272
  /** Best-known token usage for this child run. Used by workflow budget accounting. */
2253
2273
  totalTokensUsed?: number;
2274
+ /** Token usage attributable only to the optional presentation digest call. */
2275
+ digestTokensUsed?: number;
2276
+ /** Provider-reported usage for the optional digest call (diagnostic subset of totalTokensUsed). */
2277
+ digestUsage?: {
2278
+ readonly inputTokens?: number;
2279
+ readonly outputTokens?: number;
2280
+ readonly totalTokens?: number;
2281
+ readonly cacheReadTokens?: number;
2282
+ };
2283
+ /** Correlated model-tier and fallback facts for cost/quality reporting. */
2284
+ routeFacts?: KodaXChildRouteFacts;
2254
2285
  /** True when the child exhausted its iteration budget before completing. */
2255
2286
  limitReached?: boolean;
2256
2287
  /**
@@ -2562,6 +2593,8 @@ interface KodaXContextOptions {
2562
2593
  * lookups use the legacy process-global registry.
2563
2594
  */
2564
2595
  agentScope?: KodaXAgentScope;
2596
+ /** FEATURE_258: host-bound external-agent plane and non-model dispatch context. */
2597
+ agentExecutorPlane?: AgentExecutorPlaneBinding;
2565
2598
  /** Optional task-engine surface label used to track managed tasks across UX entry points. */
2566
2599
  taskSurface?: KodaXTaskSurface;
2567
2600
  /**
@@ -3113,6 +3146,8 @@ interface KodaXToolExecutionContext {
3113
3146
  agentProfile?: KodaXAgentProfile;
3114
3147
  /** Scoped specialist-agent resolver inherited from KodaXOptions.context. */
3115
3148
  agentScope?: KodaXAgentScope;
3149
+ /** FEATURE_258: external dispatch capability; absent keeps the tool surface unchanged. */
3150
+ agentExecutorPlane?: AgentExecutorPlaneBinding;
3116
3151
  /** FEATURE_221: SDK-consumer self-manual injection, forwarded from KodaXOptions. */
3117
3152
  selfManual?: KodaXSelfManualConfig;
3118
3153
  /** FEATURE_222 skill security — host policy for skill `!`cmd`` dynamic-context,
@@ -1,6 +1,6 @@
1
1
  import { j as KodaXMessage } from './types.d-Bp4Lm1jv.js';
2
- import { Q as QueueEventListener, c as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-BMLxKV69.js';
3
- import { h as AgentMessage, bw as SessionEntry, bu as Session, by as SessionExtension, af as KodaXSessionLineage, a4 as KodaXJsonValue, u as CompactionDetails, T as KodaXCompactMemorySeed, ab as KodaXSessionEntry, an as KodaXSessionTreeNode, ae as KodaXSessionLabelEntry, ad as KodaXSessionGoalEntry, a8 as KodaXSessionClientNoticeEntry, aj as KodaXSessionRewindMarkerEntry, ai as KodaXSessionNavigationOptions, a6 as KodaXSessionArtifactLedgerEntry, H as FileOperations, cb as WorkflowMeta, cc as WorkflowModelHint, cd as WorkflowModule } from './process.d-CY2g03Mb.js';
2
+ import { Q as QueueEventListener, c as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-DU9lLkmE.js';
3
+ import { I as AgentMessage, cl as SessionEntry, cj as Session, cn as SessionExtension, b2 as KodaXSessionLineage, aT as KodaXJsonValue, a9 as CompactionDetails, aG as KodaXCompactMemorySeed, a_ as KodaXSessionEntry, ba as KodaXSessionTreeNode, b1 as KodaXSessionLabelEntry, b0 as KodaXSessionGoalEntry, aX as KodaXSessionClientNoticeEntry, b6 as KodaXSessionRewindMarkerEntry, b5 as KodaXSessionNavigationOptions, aV as KodaXSessionArtifactLedgerEntry, au as FileOperations, d0 as WorkflowMeta, d1 as WorkflowModelHint, d2 as WorkflowModule } from './types.d-DG9B4SMm.js';
4
4
 
5
5
  /**
6
6
  * @kodax-ai/agent Constants
@@ -1,7 +1,7 @@
1
- import { h as SessionStorage$1, f as PermissionMode } from './public-api.d-jtREVfEq.js';
2
- import { X as KodaXOptions, a5 as KodaXResult } from './bash-prefix-extractor.d-BjkITAva.js';
3
- import { m as RuntimeSurfaceStatus, b as CommandDefinition, e as CommandSource, c as CommandInfo, C as Command$1, I as InteractiveContext, a as CommandCallbacks, g as CurrentConfig, d as CommandInvocationRequest, f as CommandWorkflowInvocationRequest } from './utils.d-C1rpoeDh.js';
4
- import { am as KodaXSessionStorage, aa as KodaXSessionData } from './process.d-CY2g03Mb.js';
1
+ import { h as SessionStorage$1, f as PermissionMode } from './public-api.d-CPBMPDiU.js';
2
+ import { X as KodaXOptions, a5 as KodaXResult } from './bash-prefix-extractor.d-D57Gt6n8.js';
3
+ import { m as RuntimeSurfaceStatus, b as CommandDefinition, e as CommandSource, c as CommandInfo, C as Command$1, I as InteractiveContext, a as CommandCallbacks, g as CurrentConfig, d as CommandInvocationRequest, f as CommandWorkflowInvocationRequest } from './utils.d-DMI-9GTR.js';
4
+ import { b9 as KodaXSessionStorage, aZ as KodaXSessionData } from './types.d-DG9B4SMm.js';
5
5
 
6
6
  /**
7
7
  * InkREPL - Ink-based REPL Adapter
@@ -1,4 +1,4 @@
1
- import { J as Guardrail, bq as RunnerToolCall, f as Agent, h as AgentMessage, bt as RunnerToolResult, bC as Span } from './process.d-CY2g03Mb.js';
1
+ import { aw as Guardrail, cf as RunnerToolCall, f as Agent, I as AgentMessage, ci as RunnerToolResult, cr as Span } from './types.d-DG9B4SMm.js';
2
2
 
3
3
  /**
4
4
  * Guardrail Runtime — FEATURE_085 (v0.7.26).
@@ -1,8 +1,8 @@
1
1
  import { b as McpServersConfig, M as McpConnectMode, a as McpServerConfig, c as McpTransportKind } from './config.d-CJy1WENT.js';
2
2
  import { K as KodaXBaseProvider } from './base.d-DalIRhbb.js';
3
3
  import { a as CostTracker } from './cost-tracker.d-CBLk1fiD.js';
4
- import { bq as RunnerToolCall } from './process.d-CY2g03Mb.js';
5
- import { d as ToolGuardrail } from './guardrail.d-C_Siraua.js';
4
+ import { cf as RunnerToolCall } from './types.d-DG9B4SMm.js';
5
+ import { d as ToolGuardrail } from './guardrail.d-Ds7JHxR1.js';
6
6
 
7
7
  /**
8
8
  * FEATURE_200 Phase F (v0.7.45) — MCP domain types extracted from types.ts.
@@ -1,5 +1,5 @@
1
- import { a as BashPrefixExtractor } from './bash-prefix-extractor.d-BjkITAva.js';
2
- import { aa as KodaXSessionData, af as KodaXSessionLineage, ai as KodaXSessionNavigationOptions, ak as KodaXSessionRuntimeInfo, am as KodaXSessionStorage, a4 as KodaXJsonValue } from './process.d-CY2g03Mb.js';
1
+ import { a as BashPrefixExtractor } from './bash-prefix-extractor.d-D57Gt6n8.js';
2
+ import { aZ as KodaXSessionData, b2 as KodaXSessionLineage, b5 as KodaXSessionNavigationOptions, b7 as KodaXSessionRuntimeInfo, b9 as KodaXSessionStorage, aT as KodaXJsonValue } from './types.d-DG9B4SMm.js';
3
3
  import { j as KodaXMessage, R as KodaXTaskResultMetadata } from './types.d-Bp4Lm1jv.js';
4
4
 
5
5
  /**
@@ -349,6 +349,8 @@ declare function compactSession(sessionId: string, options?: CompactSessionOptio
349
349
 
350
350
  interface SessionSummary {
351
351
  readonly id: string;
352
+ /** Opaque continuation token; pass the last item cursor back to listSessions(). */
353
+ readonly cursor?: string;
352
354
  readonly title: string;
353
355
  readonly msgCount: number;
354
356
  readonly tag?: string;
@@ -437,6 +439,10 @@ interface ListSessionsOptions {
437
439
  readonly before?: string;
438
440
  /** Exact match. Omitted means no tag filter. */
439
441
  readonly tag?: string;
442
+ /** Exact runtime surface match, for example `repl`, `cli`, `acp`, or `partner`. */
443
+ readonly surface?: string;
444
+ /** Opaque cursor returned on a previous page's last SessionSummary. */
445
+ readonly cursor?: string;
440
446
  }
441
447
  type WatchSessionsCallback = (event: {
442
448
  kind: 'change' | 'add' | 'remove';
@@ -1,4 +1,4 @@
1
- import { ct as WorkflowProcessTrackerOptions, c4 as WorkflowEvent, cn as WorkflowProcessSnapshot, ch as WorkflowProcessEvent } from './process.d-CY2g03Mb.js';
1
+ import { di as WorkflowProcessTrackerOptions, cV as WorkflowEvent, dc as WorkflowProcessSnapshot, d6 as WorkflowProcessEvent } from './types.d-DG9B4SMm.js';
2
2
 
3
3
  /**
4
4
  * FEATURE_246 Part A0 (ADR-046) — neutral workflow run lifecycle manager.
@@ -1,7 +1,7 @@
1
- import { f as PermissionMode } from './public-api.d-jtREVfEq.js';
1
+ import { f as PermissionMode } from './public-api.d-CPBMPDiU.js';
2
2
  import { E as KodaXReasoningMode, j as KodaXMessage, c as KodaXContentBlock } from './types.d-Bp4Lm1jv.js';
3
- import { r as KodaXAgentMode } from './bash-prefix-extractor.d-BjkITAva.js';
4
- import { ao as KodaXSessionUiHistoryItem, as as KodaXSessionUiToolCall } from './process.d-CY2g03Mb.js';
3
+ import { r as KodaXAgentMode } from './bash-prefix-extractor.d-D57Gt6n8.js';
4
+ import { bb as KodaXSessionUiHistoryItem, bf as KodaXSessionUiToolCall } from './types.d-DG9B4SMm.js';
5
5
 
6
6
  /**
7
7
  * TextBuffer - Text buffer management class - 文本缓冲区管理类
@@ -2930,6 +2930,8 @@ interface WorkflowTaskVerification {
2930
2930
  readonly enforcement?: 'hard' | 'warn';
2931
2931
  readonly requiresMutation?: boolean;
2932
2932
  readonly requiredChangedPaths?: readonly string[];
2933
+ /** Read-tool paths that must be observed before accepting a review verdict. */
2934
+ readonly requiredReadPaths?: readonly string[];
2933
2935
  readonly minFinalTextChars?: number;
2934
2936
  readonly rejectPreparatoryFinalText?: boolean;
2935
2937
  }
@@ -2940,6 +2942,11 @@ interface WorkflowTaskVerificationResult {
2940
2942
  readonly changedPaths?: readonly string[];
2941
2943
  readonly mutationToolCalls?: readonly string[];
2942
2944
  readonly mutationEvidence?: boolean;
2945
+ readonly readPaths?: readonly string[];
2946
+ }
2947
+ interface WorkflowAgentTarget {
2948
+ readonly agentId: string;
2949
+ readonly expectedConfigurationRevision?: string;
2943
2950
  }
2944
2951
  interface WorkflowSpawnAgentInput {
2945
2952
  /** Human-readable label for the agent — surfaces in events / UI. */
@@ -2954,18 +2961,24 @@ interface WorkflowSpawnAgentInput {
2954
2961
  readonly phase?: string;
2955
2962
  /** The task prompt handed to the child agent. */
2956
2963
  readonly prompt: string;
2964
+ /** Compact scope summary copied into the child briefing without retyping the diff. */
2965
+ readonly scopeSummary?: string;
2966
+ /** Binding constraints/interfaces the child cannot discover locally. */
2967
+ readonly constraints?: readonly string[];
2957
2968
  /** When true, the child runs with a read-only tool whitelist. */
2958
2969
  readonly readOnly?: boolean;
2959
2970
  /** Route to a registered specialist agent (FEATURE_191). */
2960
2971
  readonly subagentType?: string;
2972
+ /** Route through the shared dispatchable-agent catalog (FEATURE_258). */
2973
+ readonly target?: WorkflowAgentTarget;
2961
2974
  /**
2962
2975
  * Per-agent model TIER (FEATURE_120 model_hint). The script expresses semantic
2963
2976
  * intent — 'fast' (cheap), 'deep' (strong), 'balanced' (default) — NOT a
2964
2977
  * concrete model name: the authoring model has no cognition of which
2965
2978
  * providers/models a given operator has configured. The operator maps the
2966
2979
  * tiers to concrete models via env (KODAX_FAST/DEEP_PROVIDER/MODEL); when a
2967
- * tier is unconfigured the child inherits the parent provider/model, so a
2968
- * hint is always a safe no-op at worst. 'fast' applies to read-only children
2980
+ * tier is unconfigured the child inherits the parent provider/model. 'fast'
2981
+ * applies to read-only children
2969
2982
  * only (write/codegen stays on the parent tier — a quality guard).
2970
2983
  */
2971
2984
  readonly modelHint?: WorkflowModelHint;
@@ -2989,6 +3002,8 @@ interface WorkflowSpawnAgentInput {
2989
3002
  * opaque value so the agent layer needs no JSON-Schema dependency.
2990
3003
  */
2991
3004
  readonly outputSchema?: unknown;
3005
+ /** Register concise finalText for digest reuse; trusted host provenance is checked separately. */
3006
+ readonly terseResult?: boolean;
2992
3007
  }
2993
3008
  /** Returned by `spawnAgent` — the child is in-flight, not yet complete. */
2994
3009
  interface WorkflowTaskHandle {
@@ -2999,6 +3014,7 @@ interface WorkflowTaskUsage {
2999
3014
  readonly inputTokens?: number;
3000
3015
  readonly outputTokens?: number;
3001
3016
  readonly totalTokens?: number;
3017
+ readonly cacheReadTokens?: number;
3002
3018
  }
3003
3019
  type WorkflowTaskSummaryKind = 'digest' | 'excerpt' | 'digest-failed' | 'pending';
3004
3020
  interface WorkflowTaskSummaryEventUpdate {
@@ -3029,6 +3045,20 @@ interface WorkflowTaskResult {
3029
3045
  /** Best-known provider/model used by the child, for host correlation only. */
3030
3046
  readonly provider?: string;
3031
3047
  readonly model?: string;
3048
+ /** Requested semantic tier and how the local runtime resolved it. */
3049
+ readonly requestedTier?: WorkflowModelHint | 'inherited';
3050
+ readonly tierOutcome?: 'applied' | 'balanced-parent' | 'fast-write-ineligible' | 'unconfigured' | 'shadowed-by-selector' | 'inherited';
3051
+ readonly providerSource?: 'explicit' | 'specialist' | 'tier' | 'parent' | 'default';
3052
+ readonly modelSource?: 'explicit' | 'specialist' | 'tier' | 'parent';
3053
+ readonly initialProvider?: string;
3054
+ readonly initialModel?: string;
3055
+ readonly finalProvider?: string;
3056
+ readonly finalModel?: string;
3057
+ readonly fallbackReason?: string;
3058
+ readonly resolvedEffort?: string;
3059
+ readonly iterations?: number;
3060
+ readonly durationMs?: number;
3061
+ readonly digestUsage?: WorkflowTaskUsage;
3032
3062
  readonly usage?: WorkflowTaskUsage;
3033
3063
  }
3034
3064
  /** Point-in-time snapshot of a (possibly still-running) agent. */
@@ -3358,5 +3388,340 @@ declare function isFinalWorkflowProcessStatus(status: WorkflowProcessStatus): bo
3358
3388
  declare function normalizeHostMetadata(value: unknown): Record<string, string> | undefined;
3359
3389
  declare function createWorkflowProcessTracker(options: WorkflowProcessTrackerOptions): WorkflowProcessTracker;
3360
3390
 
3361
- export { ASK_USER_BACK_SIGNAL as A, DEFAULT_SYSTEM_CAP as D, InvariantSession as R, ASK_USER_CUSTOM_INPUT_SIGNAL as a, MAX_TOOL_LOOP_ITERATIONS as ay, SpanImpl as bF, Tracer as bX, Runner as bm, executeRunnerToolCall as c$, WorkflowEventRecorder as c6, _resetAdmittedAgentBindings as cL, _resetPresetDispatchers as cM, asSingleSelection as cN, buildAssistantMessageFromLlmResult as cO, buildSystemPrompt as cP, buildToolResultMessage as cQ, createAgent as cR, createHandoff as cS, createInMemorySession as cT, createInvariantSessionForAgent as cU, createStateWriter as cV, createTrace as cW, createWorkflowProcessTracker as cX, defaultTracer as cY, detectInstructionsInjection as cZ, discoverInstances as c_, extractAssistantTextFromMessage as d0, getActiveUserInteraction as d1, getAdmittedAgentBindings as d2, isAskUserCustomInputAnswer as d3, isFinalWorkflowProcessStatus as d4, isRunnableTool as d5, isRunnerLlmResult as d6, normalizeHostMetadata as d7, registerChildTask as d8, registerPresetDispatcher as d9, requestTaskStop as da, runAdmissionAudit as db, setActiveUserInteraction as dc, setAdmittedAgentBindings as dd };
3362
- export type { KodaXGoalStatus as $, DiscoveredInstance as B, ChildTaskRegistry as C, DiscoveryOptions as E, EvidenceSpanData as F, FanoutSpanData as G, FileOperations as H, GenerationSpanData as I, Guardrail as J, GuardrailSpanData as K, Handoff as L, HandoffSpanData as M, InMemorySessionOptions as N, InstanceDiscoveryFs as O, InvariantId as P, InvariantResult as Q, KodaXCompactMemoryProgress as S, KodaXCompactMemorySeed as T, KodaXExtensionSessionRecord as U, KodaXExtensionSessionState as V, KodaXExtensionStore as W, KodaXExtensionStoreEntry as X, KodaXFileInputArtifact as Y, KodaXGoalEventType as Z, KodaXGoalState as _, MemoryReviewModelInput as a$, KodaXImageInputArtifact as a0, KodaXImageMediaType as a1, KodaXInputArtifact as a2, KodaXInputArtifactSource as a3, KodaXJsonValue as a4, KodaXSessionArchiveMarkerEntry as a5, KodaXSessionArtifactLedgerEntry as a6, KodaXSessionBranchSummaryEntry as a7, KodaXSessionClientNoticeEntry as a8, KodaXSessionCompactionEntry as a9, MemoryActionProposal as aA, MemoryApplyPreview as aB, MemoryApplyResult as aC, MemoryApproval as aD, MemoryAuthority as aE, MemoryAutoCuratorInput as aF, MemoryAutoCuratorResult as aG, MemoryBodySnapshot as aH, MemoryController as aI, MemoryCuratorInput as aJ, MemoryEvent as aK, MemoryGovernanceFinding as aL, MemoryGovernanceFindingKind as aM, MemoryGovernanceReport as aN, MemoryItemRef as aO, MemoryLifecycle as aP, MemoryPack as aQ, MemoryPackHint as aR, MemoryPackInput as aS, MemoryPackTraceMetadata as aT, MemoryProposalAction as aU, MemoryRefFilter as aV, MemoryRefKind as aW, MemoryRejectResult as aX, MemoryReviewCandidateRef as aY, MemoryReviewDraftAction as aZ, MemoryReviewInput as a_, KodaXSessionData as aa, KodaXSessionEntry as ab, KodaXSessionEntryBase as ac, KodaXSessionGoalEntry as ad, KodaXSessionLabelEntry as ae, KodaXSessionLineage as af, KodaXSessionMessageEntry as ag, KodaXSessionMeta as ah, KodaXSessionNavigationOptions as ai, KodaXSessionRewindMarkerEntry as aj, KodaXSessionRuntimeInfo as ak, KodaXSessionScope as al, KodaXSessionStorage as am, KodaXSessionTreeNode as an, KodaXSessionUiHistoryItem as ao, KodaXSessionUiHistoryItemType as ap, KodaXSessionUiTextHistoryItem as aq, KodaXSessionUiTextHistoryItemType as ar, KodaXSessionUiToolCall as as, KodaXSessionUiToolCallStatus as at, KodaXSessionUiToolGroupHistoryItem as au, KodaXSessionWorkspaceKind as av, KodaXVideoInputArtifact as aw, KodaXVideoMediaType as ax, ManifestPatch as az, AdmissionAuditOptions as b, WorkflowApi as b$, MemoryReviewPlan as b0, MemoryReviewRunner as b1, MemoryReviewTrigger as b2, MemoryScope as b3, MemorySourceAdapter as b4, MemoryVisibility as b5, MessageEntry as b6, ObserveCtx as b7, PersistedSessionState as b8, PresetDispatcher as b9, SessionMeta as bA, SessionStateSnapshot as bB, Span as bC, SpanData as bD, SpanError as bE, SpanImplOptions as bG, StartTraceOptions as bH, StateWriter as bI, StateWriterFs as bJ, StateWriterOptions as bK, StopHookContext as bL, StopHookFn as bM, StopHookResult as bN, StopHookSpanData as bO, SystemCap as bP, TaskAbortRegistry as bQ, TerminalCtx as bR, ToolCallSpanData as bS, ToolCapability as bT, ToolPermission as bU, Trace as bV, TraceOptions as bW, TracerOptions as bY, UserInteraction as bZ, WorkflowAgentBackend as b_, PresetTracingContext as ba, QualityInvariant as bb, ReadonlyMutationTracker as bc, ReadonlyRecorder as bd, ReasoningDepth as be, RecentlyModifiedFile as bf, RequestTaskStopOptions as bg, RequestTaskStopResult as bh, RunEvent as bi, RunOptions as bj, RunResult as bk, RunnableTool as bl, RunnerEvent as bn, RunnerLlmResult as bo, RunnerLlmReturn as bp, RunnerToolCall as bq, RunnerToolContext as br, RunnerToolObserver as bs, RunnerToolResult as bt, Session as bu, SessionDispatchResult as bv, SessionEntry as bw, SessionErrorMetadata as bx, SessionExtension as by, SessionForkOptions as bz, AdmissionCtx as c, WorkflowApproval as c0, WorkflowApprovalSummary as c1, WorkflowArtifactRef as c2, WorkflowBudget as c3, WorkflowEvent as c4, WorkflowEventCorrelation as c5, WorkflowEventType as c7, WorkflowIsolation as c8, WorkflowLimits as c9, WorkflowTaskHandle as cA, WorkflowTaskResult as cB, WorkflowTaskSnapshot as cC, WorkflowTaskStatus as cD, WorkflowTaskSummaryEventUpdate as cE, WorkflowTaskSummaryKind as cF, WorkflowTaskSummaryUpdate as cG, WorkflowTaskUsage as cH, WorkflowTaskVerification as cI, WorkflowTaskVerificationResult as cJ, WorkflowWaitOptions as cK, WorkflowLogEvent as ca, WorkflowMeta as cb, WorkflowModelHint as cc, WorkflowModule as cd, WorkflowParallelOptions as ce, WorkflowProcessArtifact as cf, WorkflowProcessCounts as cg, WorkflowProcessEvent as ch, WorkflowProcessItem as ci, WorkflowProcessItemKind as cj, WorkflowProcessItemOrigin as ck, WorkflowProcessItemStatus as cl, WorkflowProcessProgress as cm, WorkflowProcessSnapshot as cn, WorkflowProcessSource as co, WorkflowProcessStatus as cp, WorkflowProcessSummaryStatus as cq, WorkflowProcessTokenUsage as cr, WorkflowProcessTracker as cs, WorkflowProcessTrackerOptions as ct, WorkflowRun as cu, WorkflowRunState as cv, WorkflowRunStatus as cw, WorkflowSpawnAgentInput as cx, WorkflowSynthesis as cy, WorkflowSynthesizeInput as cz, AdmissionVerdict as d, AdmittedHandle as e, Agent as f, AgentManifest as g, AgentMessage as h, AgentMiddlewareDeclaration as i, AgentReasoningProfile as j, AgentSpanData as k, AgentTool as l, AskUserAnswer as m, AskUserCustomInputAnswer as n, AskUserMultiOptions as o, AskUserQuestionItem as p, AskUserQuestionOptions as q, AskUserSelectionAnswer as r, CompactionAnchor as s, CompactionConfig as t, CompactionDetails as u, CompactionResult as v, CompactionSpanData as w, CompactionUpdate as x, CurrentTodoSummary as y, Deliverable as z };
3391
+ type DispatchableAgentOrigin = 'native' | 'constructed' | 'external';
3392
+ type AgentExecutorProtocol = 'native' | 'a2a' | 'mcp' | 'http';
3393
+ type ExternalAgentProtocol = Exclude<AgentExecutorProtocol, 'native'>;
3394
+ type CapabilitySupport = 'supported' | 'unsupported' | 'conditional';
3395
+ interface AgentCapabilityDeclaration {
3396
+ readonly streaming: CapabilitySupport;
3397
+ readonly durableTasks: CapabilitySupport;
3398
+ readonly inputRequired: CapabilitySupport;
3399
+ readonly cancellation: CapabilitySupport;
3400
+ readonly artifacts: CapabilitySupport;
3401
+ }
3402
+ interface AgentEffectDeclaration {
3403
+ readonly remote: 'none' | 'read' | 'write' | 'unknown';
3404
+ readonly workspace: 'none' | 'proposal' | 'direct';
3405
+ }
3406
+ interface ExternalAgentEffectDeclaration extends AgentEffectDeclaration {
3407
+ readonly workspace: 'none' | 'proposal';
3408
+ }
3409
+ interface DispatchableAgentDescriptor {
3410
+ readonly agentId: string;
3411
+ readonly displayName: string;
3412
+ readonly description?: string;
3413
+ readonly origin: DispatchableAgentOrigin;
3414
+ readonly protocol: AgentExecutorProtocol;
3415
+ readonly configurationRevision: string;
3416
+ readonly skills: readonly string[];
3417
+ readonly inputModalities: readonly string[];
3418
+ readonly outputModalities: readonly string[];
3419
+ readonly capabilities: AgentCapabilityDeclaration;
3420
+ readonly effects: AgentEffectDeclaration;
3421
+ }
3422
+ type AgentDispatchabilityStatus = 'dispatchable' | 'degraded' | 'busy' | 'unavailable';
3423
+ interface AgentDispatchabilitySnapshot {
3424
+ readonly status: AgentDispatchabilityStatus;
3425
+ readonly checkedAt: string;
3426
+ readonly reasons: readonly string[];
3427
+ readonly retryAfterMs?: number;
3428
+ }
3429
+ interface DispatchableAgentListing {
3430
+ readonly descriptor: DispatchableAgentDescriptor;
3431
+ readonly dispatchability: AgentDispatchabilitySnapshot;
3432
+ }
3433
+ interface AgentDispatchContext {
3434
+ readonly actorId: string;
3435
+ readonly projectId?: string;
3436
+ readonly workflowId?: string;
3437
+ readonly parentTaskId?: string;
3438
+ readonly runId?: string;
3439
+ readonly nodeId?: string;
3440
+ readonly dataClassifications?: readonly string[];
3441
+ readonly budget?: number;
3442
+ }
3443
+ interface AgentCapabilityRequirements {
3444
+ readonly streaming?: boolean;
3445
+ readonly durableTasks?: boolean;
3446
+ readonly inputRequired?: boolean;
3447
+ readonly cancellation?: boolean;
3448
+ readonly artifacts?: boolean;
3449
+ }
3450
+ interface DispatchableAgentQuery extends AgentDispatchContext {
3451
+ readonly requiredSkills?: readonly string[];
3452
+ readonly requiredCapabilities?: AgentCapabilityRequirements;
3453
+ readonly readOnly?: boolean;
3454
+ }
3455
+ interface ExternalAgentHealth {
3456
+ readonly status: 'healthy' | 'degraded' | 'unhealthy';
3457
+ readonly checkedAt: string;
3458
+ readonly retryAfterMs?: number;
3459
+ readonly diagnostic?: string;
3460
+ }
3461
+ interface ExternalAgentRegistration {
3462
+ readonly agentId: string;
3463
+ readonly displayName: string;
3464
+ readonly description?: string;
3465
+ readonly enabled: boolean;
3466
+ readonly executorId: string;
3467
+ readonly protocol: ExternalAgentProtocol;
3468
+ readonly configurationRevision: string;
3469
+ readonly endpointIdentityHash: string;
3470
+ readonly credentialRef?: string;
3471
+ readonly executorConfig?: Readonly<Record<string, unknown>>;
3472
+ readonly skills?: readonly string[];
3473
+ readonly inputModalities?: readonly string[];
3474
+ readonly outputModalities?: readonly string[];
3475
+ readonly capabilities: AgentCapabilityDeclaration;
3476
+ readonly effects: ExternalAgentEffectDeclaration;
3477
+ readonly health?: ExternalAgentHealth;
3478
+ readonly maxConcurrency?: number;
3479
+ readonly minimumBudget?: number;
3480
+ readonly allowedDataClassifications?: readonly string[];
3481
+ }
3482
+ interface ExternalAgentRegistrationSummary {
3483
+ readonly agentId: string;
3484
+ readonly displayName: string;
3485
+ readonly description?: string;
3486
+ readonly enabled: boolean;
3487
+ readonly executorId: string;
3488
+ readonly protocol: ExternalAgentProtocol;
3489
+ readonly configurationRevision: string;
3490
+ readonly endpointIdentityHash: string;
3491
+ readonly credentialConfigured: boolean;
3492
+ readonly capabilities: AgentCapabilityDeclaration;
3493
+ readonly effects: ExternalAgentEffectDeclaration;
3494
+ readonly health?: ExternalAgentHealth;
3495
+ readonly diagnostics: readonly string[];
3496
+ }
3497
+ interface AgentDispatchPolicyInput {
3498
+ readonly registration: ExternalAgentRegistration;
3499
+ readonly query: DispatchableAgentQuery;
3500
+ }
3501
+ interface AgentDispatchPolicyDecision {
3502
+ readonly allowed: boolean;
3503
+ readonly reasons?: readonly string[];
3504
+ }
3505
+ type AgentDispatchPolicy = (input: AgentDispatchPolicyInput) => AgentDispatchPolicyDecision | Promise<AgentDispatchPolicyDecision>;
3506
+ interface AgentCredentialBroker {
3507
+ isAvailable?(credentialRef: string): boolean | Promise<boolean>;
3508
+ withCredential<T>(credentialRef: string, use: (credential: string) => Promise<T>): Promise<T>;
3509
+ }
3510
+ interface AgentArtifactReference {
3511
+ readonly name: string;
3512
+ readonly mimeType?: string;
3513
+ readonly size?: number;
3514
+ readonly hash?: string;
3515
+ readonly uri?: string;
3516
+ readonly provenance?: string;
3517
+ readonly producingAgentId?: string;
3518
+ readonly remoteTaskId?: string;
3519
+ }
3520
+ interface AgentArtifactPolicyInput {
3521
+ readonly registration: ExternalAgentRegistration;
3522
+ readonly artifact: AgentArtifactReference;
3523
+ }
3524
+ interface AgentArtifactPolicyDecision {
3525
+ readonly allowed: boolean;
3526
+ readonly reason?: string;
3527
+ }
3528
+ type AgentArtifactPolicy = (input: AgentArtifactPolicyInput) => AgentArtifactPolicyDecision | Promise<AgentArtifactPolicyDecision>;
3529
+ interface AgentTaskUsage {
3530
+ readonly inputTokens?: number;
3531
+ readonly outputTokens?: number;
3532
+ readonly totalTokens?: number;
3533
+ readonly cost?: number;
3534
+ readonly currency?: string;
3535
+ }
3536
+ type AgentTaskState = 'submitted' | 'working' | 'input-required' | 'auth-required' | 'completed' | 'failed' | 'canceled' | 'rejected' | 'unknown';
3537
+ type AgentTaskCancellation = 'none' | 'requested' | 'confirmed' | 'unsupported' | 'failed' | 'unknown';
3538
+ interface AgentTaskProgress {
3539
+ readonly message?: string;
3540
+ readonly percent?: number;
3541
+ }
3542
+ interface AgentTaskCorrelation {
3543
+ readonly parentTaskId?: string;
3544
+ readonly workflowId?: string;
3545
+ readonly runId?: string;
3546
+ readonly nodeId?: string;
3547
+ }
3548
+ interface AgentTaskRegistrationSnapshot {
3549
+ readonly agentId: string;
3550
+ readonly origin: DispatchableAgentOrigin;
3551
+ readonly executorId: string;
3552
+ readonly protocol: AgentExecutorProtocol;
3553
+ readonly configurationRevision: string;
3554
+ readonly endpointIdentityHash?: string;
3555
+ readonly capabilities: AgentCapabilityDeclaration;
3556
+ readonly effects: AgentEffectDeclaration;
3557
+ }
3558
+ interface AgentExecutorTaskReference {
3559
+ readonly idempotencyKey: string;
3560
+ readonly remoteTaskId?: string;
3561
+ readonly metadata?: Readonly<Record<string, unknown>>;
3562
+ }
3563
+ interface AgentTaskSnapshot extends AgentTaskCorrelation {
3564
+ readonly taskId: string;
3565
+ readonly route: 'local' | 'external';
3566
+ readonly agentId: string;
3567
+ readonly objective: string;
3568
+ readonly state: AgentTaskState;
3569
+ readonly cancellation: AgentTaskCancellation;
3570
+ readonly registration: AgentTaskRegistrationSnapshot;
3571
+ readonly idempotencyKey: string;
3572
+ readonly dispatchAttempt: number;
3573
+ readonly createdAt: string;
3574
+ readonly updatedAt: string;
3575
+ readonly remoteTaskId?: string;
3576
+ readonly executorReference?: AgentExecutorTaskReference;
3577
+ readonly progress?: AgentTaskProgress;
3578
+ readonly output?: string;
3579
+ readonly error?: string;
3580
+ readonly cancellationError?: string;
3581
+ readonly artifacts?: readonly AgentArtifactReference[];
3582
+ readonly usage?: AgentTaskUsage;
3583
+ }
3584
+ interface AgentExecutorTaskSnapshot {
3585
+ readonly state: AgentTaskState;
3586
+ readonly progress?: AgentTaskProgress;
3587
+ readonly output?: string;
3588
+ readonly error?: string;
3589
+ readonly artifacts?: readonly AgentArtifactReference[];
3590
+ readonly usage?: AgentTaskUsage;
3591
+ }
3592
+ interface AgentTaskStartInput {
3593
+ readonly taskId?: string;
3594
+ readonly agentId: string;
3595
+ readonly objective: string;
3596
+ readonly context: AgentDispatchContext;
3597
+ readonly readOnly?: boolean;
3598
+ readonly requiredSkills?: readonly string[];
3599
+ readonly requiredCapabilities?: AgentCapabilityRequirements;
3600
+ readonly expectedConfigurationRevision?: string;
3601
+ readonly idempotencyKey?: string;
3602
+ readonly input?: string;
3603
+ }
3604
+ interface AgentContinuationInput {
3605
+ readonly content: string;
3606
+ }
3607
+ interface AgentExecutorEvent {
3608
+ readonly state?: AgentTaskState;
3609
+ readonly progress?: AgentTaskProgress;
3610
+ readonly output?: string;
3611
+ readonly error?: string;
3612
+ readonly artifacts?: readonly AgentArtifactReference[];
3613
+ readonly usage?: AgentTaskUsage;
3614
+ }
3615
+ interface AgentTaskEvent extends AgentExecutorEvent {
3616
+ readonly taskId: string;
3617
+ readonly seq: number;
3618
+ readonly timestamp: string;
3619
+ readonly type: 'submitted' | 'state' | 'progress' | 'output' | 'artifact' | 'usage' | 'error' | 'cancellation';
3620
+ readonly cancellation?: AgentTaskCancellation;
3621
+ }
3622
+ interface AgentExecutorPreflightResult {
3623
+ readonly ok: boolean;
3624
+ readonly reasons?: readonly string[];
3625
+ }
3626
+ interface AgentExecutor {
3627
+ preflight?(input: AgentTaskStartInput): Promise<AgentExecutorPreflightResult>;
3628
+ start(input: AgentTaskStartInput): Promise<AgentExecutorTaskReference>;
3629
+ events(reference: AgentExecutorTaskReference): AsyncIterable<AgentExecutorEvent>;
3630
+ get(reference: AgentExecutorTaskReference): Promise<AgentExecutorTaskSnapshot>;
3631
+ sendInput(reference: AgentExecutorTaskReference, input: AgentContinuationInput): Promise<void>;
3632
+ cancel(reference: AgentExecutorTaskReference, reason?: string): Promise<AgentExecutorTaskSnapshot>;
3633
+ reconcile(reference: AgentExecutorTaskReference): Promise<AgentExecutorTaskSnapshot>;
3634
+ dispose(): Promise<void>;
3635
+ }
3636
+ interface AgentExecutorFactoryContext {
3637
+ withCredential<T>(credentialRef: string, use: (credential: string) => Promise<T>): Promise<T>;
3638
+ authorizeArtifact(artifact: AgentArtifactReference): Promise<void>;
3639
+ }
3640
+ interface AgentExecutorFactory {
3641
+ readonly executorId: string;
3642
+ readonly protocol: ExternalAgentProtocol;
3643
+ create(registration: ExternalAgentRegistration, context: AgentExecutorFactoryContext): Promise<AgentExecutor>;
3644
+ }
3645
+ interface AgentPreflightInput {
3646
+ readonly agentId: string;
3647
+ readonly query: DispatchableAgentQuery;
3648
+ readonly expectedConfigurationRevision?: string;
3649
+ }
3650
+ interface AgentPreflightResult {
3651
+ readonly ok: boolean;
3652
+ readonly descriptor?: DispatchableAgentDescriptor;
3653
+ readonly dispatchability: AgentDispatchabilitySnapshot;
3654
+ readonly reasons: readonly string[];
3655
+ }
3656
+ interface AgentTaskFilter {
3657
+ readonly agentId?: string;
3658
+ readonly parentTaskId?: string;
3659
+ readonly workflowId?: string;
3660
+ readonly runId?: string;
3661
+ readonly state?: AgentTaskState | readonly AgentTaskState[];
3662
+ }
3663
+ interface LocalAgentTaskInput extends AgentTaskCorrelation {
3664
+ readonly taskId: string;
3665
+ readonly agentId: string;
3666
+ readonly objective: string;
3667
+ readonly configurationRevision: string;
3668
+ readonly origin?: 'native' | 'constructed';
3669
+ }
3670
+ interface LocalAgentTaskUpdate {
3671
+ readonly state?: AgentTaskState;
3672
+ readonly progress?: AgentTaskProgress;
3673
+ readonly output?: string;
3674
+ readonly error?: string;
3675
+ readonly artifacts?: readonly AgentArtifactReference[];
3676
+ readonly usage?: AgentTaskUsage;
3677
+ }
3678
+ interface AgentExecutorPlaneStore {
3679
+ loadRegistrations(): Promise<readonly ExternalAgentRegistration[]>;
3680
+ saveRegistrations(registrations: readonly ExternalAgentRegistration[]): Promise<void>;
3681
+ loadTasks(): Promise<readonly AgentTaskSnapshot[]>;
3682
+ saveTask(task: AgentTaskSnapshot): Promise<void>;
3683
+ loadEvents(taskId: string): Promise<readonly AgentTaskEvent[]>;
3684
+ appendEvent(event: AgentTaskEvent): Promise<void>;
3685
+ }
3686
+ interface AgentRegistrationService {
3687
+ list(): Promise<readonly ExternalAgentRegistrationSummary[]>;
3688
+ upsert(input: ExternalAgentRegistration): Promise<ExternalAgentRegistrationSummary>;
3689
+ remove(agentId: string): Promise<boolean>;
3690
+ }
3691
+ interface AgentTaskService {
3692
+ start(input: AgentTaskStartInput): Promise<AgentTaskSnapshot>;
3693
+ list(filter?: AgentTaskFilter): Promise<readonly AgentTaskSnapshot[]>;
3694
+ get(taskId: string): Promise<AgentTaskSnapshot>;
3695
+ events(taskId: string, cursor?: number): Promise<readonly AgentTaskEvent[]>;
3696
+ wait(taskId: string, timeoutMs?: number): Promise<AgentTaskSnapshot>;
3697
+ sendInput(taskId: string, input: AgentContinuationInput): Promise<AgentTaskSnapshot>;
3698
+ cancel(taskId: string, reason?: string): Promise<AgentTaskSnapshot>;
3699
+ reconcile(taskId: string): Promise<AgentTaskSnapshot>;
3700
+ recordLocal(input: LocalAgentTaskInput): Promise<AgentTaskSnapshot>;
3701
+ updateLocal(taskId: string, update: LocalAgentTaskUpdate): Promise<AgentTaskSnapshot>;
3702
+ }
3703
+ interface AgentExecutorPlaneBinding {
3704
+ readonly plane: AgentExecutorPlane;
3705
+ readonly context: AgentDispatchContext;
3706
+ }
3707
+ interface AgentExecutorPlane {
3708
+ readonly registrations: AgentRegistrationService;
3709
+ readonly tasks: AgentTaskService;
3710
+ listDispatchable(query: DispatchableAgentQuery, localAgents?: readonly DispatchableAgentDescriptor[]): Promise<readonly DispatchableAgentListing[]>;
3711
+ describe(agentId: string, query: DispatchableAgentQuery, localAgents?: readonly DispatchableAgentDescriptor[]): Promise<DispatchableAgentListing | undefined>;
3712
+ preflight(input: AgentPreflightInput, localAgents?: readonly DispatchableAgentDescriptor[]): Promise<AgentPreflightResult>;
3713
+ close(): Promise<void>;
3714
+ }
3715
+ interface CreateAgentExecutorPlaneOptions {
3716
+ readonly factories: readonly AgentExecutorFactory[];
3717
+ readonly policy: AgentDispatchPolicy;
3718
+ readonly credentialBroker?: AgentCredentialBroker;
3719
+ readonly artifactPolicy?: AgentArtifactPolicy;
3720
+ readonly store?: AgentExecutorPlaneStore;
3721
+ readonly now?: () => Date;
3722
+ readonly createTaskId?: () => string;
3723
+ readonly createIdempotencyKey?: () => string;
3724
+ }
3725
+
3726
+ export { ASK_USER_BACK_SIGNAL as A, ASK_USER_CUSTOM_INPUT_SIGNAL as a, InvariantSession as aE, DEFAULT_SYSTEM_CAP as af, MAX_TOOL_LOOP_ITERATIONS as bn, Tracer as cM, WorkflowEventRecorder as cX, Runner as cb, SpanImpl as cu, registerPresetDispatcher as d$, _resetAdmittedAgentBindings as dB, _resetPresetDispatchers as dC, asSingleSelection as dD, buildAssistantMessageFromLlmResult as dE, buildSystemPrompt as dF, buildToolResultMessage as dG, createAgent as dH, createHandoff as dI, createInMemorySession as dJ, createInvariantSessionForAgent as dK, createStateWriter as dL, createTrace as dM, createWorkflowProcessTracker as dN, defaultTracer as dO, detectInstructionsInjection as dP, discoverInstances as dQ, executeRunnerToolCall as dR, extractAssistantTextFromMessage as dS, getActiveUserInteraction as dT, getAdmittedAgentBindings as dU, isAskUserCustomInputAnswer as dV, isFinalWorkflowProcessStatus as dW, isRunnableTool as dX, isRunnerLlmResult as dY, normalizeHostMetadata as dZ, registerChildTask as d_, requestTaskStop as e0, runAdmissionAudit as e1, setActiveUserInteraction as e2, setAdmittedAgentBindings as e3 };
3727
+ export type { AskUserAnswer as $, AgentExecutorPlaneBinding as B, AgentExecutorPlaneStore as C, AgentExecutorPreflightResult as D, AgentExecutorProtocol as E, AgentExecutorTaskReference as F, AgentExecutorTaskSnapshot as G, AgentManifest as H, AgentMessage as I, AgentMiddlewareDeclaration as J, AgentPreflightInput as K, AgentPreflightResult as L, AgentReasoningProfile as M, AgentRegistrationService as N, AgentSpanData as O, AgentTaskCancellation as P, AgentTaskCorrelation as Q, AgentTaskEvent as R, AgentTaskFilter as S, AgentTaskProgress as T, AgentTaskRegistrationSnapshot as U, AgentTaskService as V, AgentTaskSnapshot as W, AgentTaskStartInput as X, AgentTaskState as Y, AgentTaskUsage as Z, AgentTool as _, KodaXSessionEntryBase as a$, AskUserCustomInputAnswer as a0, AskUserMultiOptions as a1, AskUserQuestionItem as a2, AskUserQuestionOptions as a3, AskUserSelectionAnswer as a4, CapabilitySupport as a5, ChildTaskRegistry as a6, CompactionAnchor as a7, CompactionConfig as a8, CompactionDetails as a9, InMemorySessionOptions as aA, InstanceDiscoveryFs as aB, InvariantId as aC, InvariantResult as aD, KodaXCompactMemoryProgress as aF, KodaXCompactMemorySeed as aG, KodaXExtensionSessionRecord as aH, KodaXExtensionSessionState as aI, KodaXExtensionStore as aJ, KodaXExtensionStoreEntry as aK, KodaXFileInputArtifact as aL, KodaXGoalEventType as aM, KodaXGoalState as aN, KodaXGoalStatus as aO, KodaXImageInputArtifact as aP, KodaXImageMediaType as aQ, KodaXInputArtifact as aR, KodaXInputArtifactSource as aS, KodaXJsonValue as aT, KodaXSessionArchiveMarkerEntry as aU, KodaXSessionArtifactLedgerEntry as aV, KodaXSessionBranchSummaryEntry as aW, KodaXSessionClientNoticeEntry as aX, KodaXSessionCompactionEntry as aY, KodaXSessionData as aZ, KodaXSessionEntry as a_, CompactionResult as aa, CompactionSpanData as ab, CompactionUpdate as ac, CreateAgentExecutorPlaneOptions as ad, CurrentTodoSummary as ae, Deliverable as ag, DiscoveredInstance as ah, DiscoveryOptions as ai, DispatchableAgentDescriptor as aj, DispatchableAgentListing as ak, DispatchableAgentOrigin as al, DispatchableAgentQuery as am, EvidenceSpanData as an, ExternalAgentEffectDeclaration as ao, ExternalAgentHealth as ap, ExternalAgentProtocol as aq, ExternalAgentRegistration as ar, ExternalAgentRegistrationSummary as as, FanoutSpanData as at, FileOperations as au, GenerationSpanData as av, Guardrail as aw, GuardrailSpanData as ax, Handoff as ay, HandoffSpanData as az, AdmissionAuditOptions as b, PresetTracingContext as b$, KodaXSessionGoalEntry as b0, KodaXSessionLabelEntry as b1, KodaXSessionLineage as b2, KodaXSessionMessageEntry as b3, KodaXSessionMeta as b4, KodaXSessionNavigationOptions as b5, KodaXSessionRewindMarkerEntry as b6, KodaXSessionRuntimeInfo as b7, KodaXSessionScope as b8, KodaXSessionStorage as b9, MemoryGovernanceFinding as bA, MemoryGovernanceFindingKind as bB, MemoryGovernanceReport as bC, MemoryItemRef as bD, MemoryLifecycle as bE, MemoryPack as bF, MemoryPackHint as bG, MemoryPackInput as bH, MemoryPackTraceMetadata as bI, MemoryProposalAction as bJ, MemoryRefFilter as bK, MemoryRefKind as bL, MemoryRejectResult as bM, MemoryReviewCandidateRef as bN, MemoryReviewDraftAction as bO, MemoryReviewInput as bP, MemoryReviewModelInput as bQ, MemoryReviewPlan as bR, MemoryReviewRunner as bS, MemoryReviewTrigger as bT, MemoryScope as bU, MemorySourceAdapter as bV, MemoryVisibility as bW, MessageEntry as bX, ObserveCtx as bY, PersistedSessionState as bZ, PresetDispatcher as b_, KodaXSessionTreeNode as ba, KodaXSessionUiHistoryItem as bb, KodaXSessionUiHistoryItemType as bc, KodaXSessionUiTextHistoryItem as bd, KodaXSessionUiTextHistoryItemType as be, KodaXSessionUiToolCall as bf, KodaXSessionUiToolCallStatus as bg, KodaXSessionUiToolGroupHistoryItem as bh, KodaXSessionWorkspaceKind as bi, KodaXVideoInputArtifact as bj, KodaXVideoMediaType as bk, LocalAgentTaskInput as bl, LocalAgentTaskUpdate as bm, ManifestPatch as bo, MemoryActionProposal as bp, MemoryApplyPreview as bq, MemoryApplyResult as br, MemoryApproval as bs, MemoryAuthority as bt, MemoryAutoCuratorInput as bu, MemoryAutoCuratorResult as bv, MemoryBodySnapshot as bw, MemoryController as bx, MemoryCuratorInput as by, MemoryEvent as bz, AdmissionCtx as c, WorkflowLogEvent as c$, QualityInvariant as c0, ReadonlyMutationTracker as c1, ReadonlyRecorder as c2, ReasoningDepth as c3, RecentlyModifiedFile as c4, RequestTaskStopOptions as c5, RequestTaskStopResult as c6, RunEvent as c7, RunOptions as c8, RunResult as c9, StopHookContext as cA, StopHookFn as cB, StopHookResult as cC, StopHookSpanData as cD, SystemCap as cE, TaskAbortRegistry as cF, TerminalCtx as cG, ToolCallSpanData as cH, ToolCapability as cI, ToolPermission as cJ, Trace as cK, TraceOptions as cL, TracerOptions as cN, UserInteraction as cO, WorkflowAgentBackend as cP, WorkflowApi as cQ, WorkflowApproval as cR, WorkflowApprovalSummary as cS, WorkflowArtifactRef as cT, WorkflowBudget as cU, WorkflowEvent as cV, WorkflowEventCorrelation as cW, WorkflowEventType as cY, WorkflowIsolation as cZ, WorkflowLimits as c_, RunnableTool as ca, RunnerEvent as cc, RunnerLlmResult as cd, RunnerLlmReturn as ce, RunnerToolCall as cf, RunnerToolContext as cg, RunnerToolObserver as ch, RunnerToolResult as ci, Session as cj, SessionDispatchResult as ck, SessionEntry as cl, SessionErrorMetadata as cm, SessionExtension as cn, SessionForkOptions as co, SessionMeta as cp, SessionStateSnapshot as cq, Span as cr, SpanData as cs, SpanError as ct, SpanImplOptions as cv, StartTraceOptions as cw, StateWriter as cx, StateWriterFs as cy, StateWriterOptions as cz, AdmissionVerdict as d, WorkflowMeta as d0, WorkflowModelHint as d1, WorkflowModule as d2, WorkflowParallelOptions as d3, WorkflowProcessArtifact as d4, WorkflowProcessCounts as d5, WorkflowProcessEvent as d6, WorkflowProcessItem as d7, WorkflowProcessItemKind as d8, WorkflowProcessItemOrigin as d9, WorkflowWaitOptions as dA, WorkflowProcessItemStatus as da, WorkflowProcessProgress as db, WorkflowProcessSnapshot as dc, WorkflowProcessSource as dd, WorkflowProcessStatus as de, WorkflowProcessSummaryStatus as df, WorkflowProcessTokenUsage as dg, WorkflowProcessTracker as dh, WorkflowProcessTrackerOptions as di, WorkflowRun as dj, WorkflowRunState as dk, WorkflowRunStatus as dl, WorkflowSpawnAgentInput as dm, WorkflowSynthesis as dn, WorkflowSynthesizeInput as dp, WorkflowTaskHandle as dq, WorkflowTaskResult as dr, WorkflowTaskSnapshot as ds, WorkflowTaskStatus as dt, WorkflowTaskSummaryEventUpdate as du, WorkflowTaskSummaryKind as dv, WorkflowTaskSummaryUpdate as dw, WorkflowTaskUsage as dx, WorkflowTaskVerification as dy, WorkflowTaskVerificationResult as dz, AdmittedHandle as e, Agent as f, AgentArtifactPolicy as g, AgentArtifactPolicyDecision as h, AgentArtifactPolicyInput as i, AgentArtifactReference as j, AgentCapabilityDeclaration as k, AgentCapabilityRequirements as l, AgentContinuationInput as m, AgentCredentialBroker as n, AgentDispatchContext as o, AgentDispatchPolicy as p, AgentDispatchPolicyDecision as q, AgentDispatchPolicyInput as r, AgentDispatchabilitySnapshot as s, AgentDispatchabilityStatus as t, AgentEffectDeclaration as u, AgentExecutor as v, AgentExecutorEvent as w, AgentExecutorFactory as x, AgentExecutorFactoryContext as y, AgentExecutorPlane as z };