@kodax-ai/kodax 0.7.68 → 0.7.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +137 -3
- package/README.md +56 -9
- package/README_CN.md +53 -8
- package/config-templates/config.example.jsonc +26 -0
- package/config-templates/integrations/a2a.example.jsonc +54 -0
- package/config-templates/integrations/extensions.example.jsonc +7 -0
- package/config-templates/integrations/mcp.example.jsonc +16 -0
- package/dist/chunks/agent-DQRXT6M7.js +2 -0
- package/dist/chunks/argument-completer-RSK6CCGP.js +2 -0
- package/dist/chunks/chunk-4WIODYOH.js +329 -0
- package/dist/chunks/chunk-AWMTNUDS.js +37 -0
- package/dist/chunks/chunk-F7C7J6IM.js +7 -0
- package/dist/chunks/{chunk-PEGSHZAA.js → chunk-I4TPQEJN.js} +1 -1
- package/dist/chunks/chunk-M7TCFYTO.js +107 -0
- package/dist/chunks/chunk-NGHQIGVW.js +46 -0
- package/dist/chunks/chunk-NGJURAY5.js +306 -0
- package/dist/chunks/{chunk-KGAI32VS.js → chunk-PA76WUBL.js} +2 -2
- package/dist/chunks/chunk-PQ3XUSY2.js +357 -0
- package/dist/chunks/chunk-UJEMSPM5.js +78 -0
- package/dist/chunks/{chunk-CC4BVVE7.js → chunk-URC6ZI6P.js} +1 -1
- package/dist/chunks/{chunk-CTHUX5ZH.js → chunk-VAZ25MDX.js} +122 -122
- package/dist/chunks/chunk-VYKFM3TB.js +751 -0
- package/dist/chunks/{chunk-TOGESFRN.js → chunk-WW2O2DEP.js} +1 -1
- package/dist/chunks/chunk-Y4WOTWUC.js +2 -0
- package/dist/chunks/chunk-Z4PPLJF2.js +60 -0
- package/dist/chunks/chunk-ZG4DMYBS.js +422 -0
- package/dist/chunks/compaction-config-ABLL6UH3.js +2 -0
- package/dist/chunks/{construction-bootstrap-PYWJHO35.js → construction-bootstrap-GH6RW6ST.js} +1 -1
- package/dist/chunks/dist-DRBKYVHF.js +2 -0
- package/dist/chunks/dist-RWL2RBO4.js +2 -0
- package/dist/chunks/host-7SAB4WEC.js +2 -0
- package/dist/chunks/run-manager-XMDKTONJ.js +2 -0
- package/dist/chunks/utils-QYE5Y73D.js +2 -0
- package/dist/index.d.ts +19 -19
- package/dist/index.js +6 -6
- package/dist/kodax_cli.js +1590 -1316
- package/dist/runtime-worker.js +1355 -1105
- package/dist/sdk-a2a.d.ts +397 -0
- package/dist/sdk-a2a.js +9 -0
- package/dist/sdk-agent.d.ts +61 -30
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +126 -51
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +1 -1
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +16 -9
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +35 -101
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +744 -21
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-session.d.ts +7 -7
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +100 -12
- package/dist/types-chunks/{base.d-C8mXDhLL.d.ts → base.d-CYjtB68X.d.ts} +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-Dm-T865v.d.ts → bash-prefix-extractor.d-BkIA8Wto.d.ts} +68 -17
- package/dist/types-chunks/{capability-learning.d-BLEmCib0.d.ts → capability-learning.d-WtsyRv3O.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-CzaamUUv.d.ts → capsule.d-xJvfh4YR.d.ts} +3 -3
- package/dist/types-chunks/{commands.d-DxKjVSNU.d.ts → commands.d-DkPfcQWG.d.ts} +4 -4
- package/dist/types-chunks/{cost-tracker.d-CBLk1fiD.d.ts → cost-tracker.d-BeaenODW.d.ts} +4 -1
- package/dist/types-chunks/{guardrail.d-D7r6zVSR.d.ts → guardrail.d-6ZDbNbHO.d.ts} +1 -1
- package/dist/types-chunks/{guardrail.d-CPDfZyJp.d.ts → guardrail.d-R7AiGfrI.d.ts} +4 -4
- package/dist/types-chunks/integration-config.d-ojG4swOP.d.ts +95 -0
- package/dist/types-chunks/{manager.d-Zum9cGHU.d.ts → manager.d-CoEuPRAo.d.ts} +4 -1
- package/dist/types-chunks/{public-api.d-BcKbBy1E.d.ts → public-api.d-7G4--RZE.d.ts} +3 -3
- package/dist/types-chunks/{resolver.d-DmBnoilY.d.ts → resolver.d-CIVoGc97.d.ts} +2 -2
- package/dist/types-chunks/{run-manager.d-CSj7_kWk.d.ts → run-manager.d-BaXtkryp.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-C6nDgyh8.d.ts → sdk-session-BQccrODn.d.ts} +6 -4
- package/dist/types-chunks/{types.d-D2frCRaY.d.ts → types.d-BtC4yLYO.d.ts} +35 -8
- package/dist/types-chunks/{types.d-CzscbsG0.d.ts → types.d-C9YHEAmA.d.ts} +38 -7
- package/dist/types-chunks/{types.d-D9FKbAmf.d.ts → types.d-CJR7t6iW.d.ts} +2 -2
- package/dist/types-chunks/{types.d-CO_ZkmOd.d.ts → types.d-TTvpAGWf.d.ts} +5 -0
- package/dist/types-chunks/{utils.d-DOXxnOnI.d.ts → utils.d-BbB5jzi1.d.ts} +15 -7
- package/docs/SDK_EMBEDDER_GUIDE.md +627 -9
- package/package.json +10 -2
- package/dist/chunks/agent-DATNZOBK.js +0 -2
- package/dist/chunks/argument-completer-X7MMM7Y6.js +0 -2
- package/dist/chunks/chunk-5GL55MOH.js +0 -36
- package/dist/chunks/chunk-67XJ4YUA.js +0 -703
- package/dist/chunks/chunk-C4SBXBWH.js +0 -346
- package/dist/chunks/chunk-D6QVXQNI.js +0 -1
- package/dist/chunks/chunk-HFM2D5BP.js +0 -2
- package/dist/chunks/chunk-HLBHSA2B.js +0 -325
- package/dist/chunks/chunk-K2NCKRVY.js +0 -33
- package/dist/chunks/chunk-KIQRCGVR.js +0 -419
- package/dist/chunks/chunk-MP52BDK5.js +0 -15
- package/dist/chunks/chunk-O5OJQFPY.js +0 -307
- package/dist/chunks/chunk-OIELNE6Z.js +0 -56
- package/dist/chunks/chunk-PZTG2C33.js +0 -7
- package/dist/chunks/chunk-QJJKMNZF.js +0 -2
- package/dist/chunks/compaction-config-BXEDHIQP.js +0 -2
- package/dist/chunks/dist-76PJHNSG.js +0 -2
- package/dist/chunks/dist-HTDJRAD6.js +0 -2
- package/dist/chunks/host-UAXIDZ6V.js +0 -2
- package/dist/chunks/paste-C33GZQV5.js +0 -2
- package/dist/chunks/run-manager-UCXB4G22.js +0 -2
- package/dist/chunks/utils-S63V5UCM.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as KodaXProviderConfig, k as KodaXMessage, a1 as KodaXToolDefinition, H as KodaXReasoningRequest, y as KodaXProviderStreamOptions, N as KodaXStreamResult, a7 as KodaXVerifyCredentialResult, l as KodaXModelDescriptor, p as KodaXProviderCapabilityProfile, B as KodaXReasoningCapability, G as KodaXReasoningProfile, n as KodaXNormalizedReasoningRequest, a9 as KodaXWireReasoningEffort } from './types.d-
|
|
1
|
+
import { q as KodaXProviderConfig, k as KodaXMessage, a1 as KodaXToolDefinition, H as KodaXReasoningRequest, y as KodaXProviderStreamOptions, N as KodaXStreamResult, a7 as KodaXVerifyCredentialResult, l as KodaXModelDescriptor, p as KodaXProviderCapabilityProfile, B as KodaXReasoningCapability, G as KodaXReasoningProfile, n as KodaXNormalizedReasoningRequest, a9 as KodaXWireReasoningEffort } from './types.d-TTvpAGWf.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Retry-After header parsing — FEATURE_130 (v0.7.36).
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { aN as KodaXGoalState, I as AgentMessage,
|
|
2
|
-
import { a0 as KodaXTokenUsage, k as KodaXMessage, a1 as KodaXToolDefinition, a9 as KodaXWireReasoningEffort, U as KodaXTaskRoutingDecision, V as KodaXTaskType, W as KodaXTaskWorkIntent, Q as KodaXTaskComplexity, L as KodaXRiskLevel, h as KodaXHarnessProfile, f as KodaXExecutionMode, b as KodaXChildFanoutClass, F as KodaXReasoningMode, J as KodaXReviewScale } from './types.d-
|
|
3
|
-
import { d as SkillDynamicContextExecutor } from './types.d-vJExiRje.js';
|
|
1
|
+
import { aN as KodaXGoalState, I as AgentMessage, cR as StopHookFn, b5 as KodaXSessionLineage, aT as KodaXJsonValue, aH as KodaXExtensionSessionRecord, f as Agent, dd as WorkflowIsolation, aI as KodaXExtensionSessionState, aY as KodaXSessionArtifactLedgerEntry, cC as SessionErrorMetadata, bd as KodaXSessionScope, be as KodaXSessionStorage, bE as MemoryContextIdentity, bQ as MemoryPack, aR as KodaXInputArtifact, B as AgentExecutorPlaneBinding, a6 as ChildTaskRegistry, da as WorkflowEventCorrelation, ac as CompactionUpdate, dm as WorkflowProcessEvent, d9 as WorkflowEvent, a3 as AskUserQuestionOptions, $ as AskUserAnswer, a1 as AskUserMultiOptions, c2 as MemoryReviewPlan, aV as KodaXMemoryOutcomeDigest, c3 as MemoryReviewRunner, aw as Guardrail, ah as DiscoveredInstance, cV as TaskAbortRegistry } from './types.d-BtC4yLYO.js';
|
|
2
|
+
import { a0 as KodaXTokenUsage, k as KodaXMessage, a1 as KodaXToolDefinition, a9 as KodaXWireReasoningEffort, U as KodaXTaskRoutingDecision, V as KodaXTaskType, W as KodaXTaskWorkIntent, Q as KodaXTaskComplexity, L as KodaXRiskLevel, h as KodaXHarnessProfile, f as KodaXExecutionMode, b as KodaXChildFanoutClass, F as KodaXReasoningMode, J as KodaXReviewScale } from './types.d-TTvpAGWf.js';
|
|
3
|
+
import { I as ISkillRegistry, 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';
|
|
5
|
-
import { K as KodaXLlmTimeoutConfig, a as CostTracker } from './cost-tracker.d-
|
|
5
|
+
import { K as KodaXLlmTimeoutConfig, a as CostTracker } from './cost-tracker.d-BeaenODW.js';
|
|
6
6
|
import { C as CapabilityKind, b as CapabilityResult } from './capability.d-3C62G8Eq.js';
|
|
7
|
-
import { K as KodaXBaseProvider } from './base.d-
|
|
7
|
+
import { K as KodaXBaseProvider } from './base.d-CYjtB68X.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* FEATURE_192 v0.7.44 Phase C — Goal-tools execution context.
|
|
@@ -916,6 +916,12 @@ interface KodaXManualSource {
|
|
|
916
916
|
readonly label: string;
|
|
917
917
|
readonly path: string;
|
|
918
918
|
}
|
|
919
|
+
/** Lightweight index metadata; topic bodies stay behind exact-topic lookup. */
|
|
920
|
+
interface KodaXManualIndexTopic {
|
|
921
|
+
readonly id: string;
|
|
922
|
+
readonly title: string;
|
|
923
|
+
readonly summary: string;
|
|
924
|
+
}
|
|
919
925
|
interface KodaXManualTopic {
|
|
920
926
|
readonly id: KodaXManualTopicId;
|
|
921
927
|
/** Human title, shown as the answer heading. */
|
|
@@ -924,10 +930,7 @@ interface KodaXManualTopic {
|
|
|
924
930
|
readonly aliases: readonly string[];
|
|
925
931
|
/** One-line summary, shown in the index listing. */
|
|
926
932
|
readonly summary: string;
|
|
927
|
-
/**
|
|
928
|
-
* Bounded topic body. Built at module load — dynamic parts (e.g. the
|
|
929
|
-
* provider list) read live constants so the manual cannot drift from code.
|
|
930
|
-
*/
|
|
933
|
+
/** Exact topic body. Dynamic parts read live constants so it cannot drift from code. */
|
|
931
934
|
readonly body: string;
|
|
932
935
|
readonly sources: readonly KodaXManualSource[];
|
|
933
936
|
readonly nextTopics: readonly KodaXManualTopicId[];
|
|
@@ -943,7 +946,8 @@ interface ResolveKodaXManualInput {
|
|
|
943
946
|
* injects via `KodaXOptions.selfManual.topics`. Same shape as a KodaX base
|
|
944
947
|
* topic but `id` is a free string (new id = add; existing base id = override),
|
|
945
948
|
* and aliases/nextTopics/sources are optional to lower the authoring burden.
|
|
946
|
-
*
|
|
949
|
+
* Exact-topic bodies are returned completely; normal tool-result admission
|
|
950
|
+
* owns any request-level capacity fallback.
|
|
947
951
|
*/
|
|
948
952
|
interface KodaXManualTopicInput {
|
|
949
953
|
readonly id: string;
|
|
@@ -965,8 +969,8 @@ interface ResolveKodaXManualOptions {
|
|
|
965
969
|
* layered on top. Orthogonal to `extraTopics` (whose override-by-id/append
|
|
966
970
|
* semantics are unchanged).
|
|
967
971
|
*
|
|
968
|
-
* - `undefined` → seed all base topics (`MANUAL_TOPIC_IDS`)
|
|
969
|
-
*
|
|
972
|
+
* - `undefined` → seed all base topics (`MANUAL_TOPIC_IDS`), preserving the
|
|
973
|
+
* legacy topic selection behavior.
|
|
970
974
|
* - `[]` → seed ZERO base topics; only `extraTopics` populate the manual
|
|
971
975
|
* (full white-label replace).
|
|
972
976
|
* - `KodaXManualTopicId[]` → seed exactly this curated subset (e.g.
|
|
@@ -979,8 +983,10 @@ interface ResolveKodaXManualResult {
|
|
|
979
983
|
/** A topic id (KodaX base or injected consumer topic), or 'index'. */
|
|
980
984
|
readonly matchedTopic: string;
|
|
981
985
|
readonly title: string;
|
|
982
|
-
/**
|
|
986
|
+
/** Complete exact-topic content, or a short index/search instruction. */
|
|
983
987
|
readonly content: string;
|
|
988
|
+
/** Structured index candidates; empty for an exact-topic result. */
|
|
989
|
+
readonly topics: readonly KodaXManualIndexTopic[];
|
|
984
990
|
readonly sources: readonly KodaXManualSource[];
|
|
985
991
|
readonly nextTopics: readonly string[];
|
|
986
992
|
}
|
|
@@ -1155,6 +1161,7 @@ interface RuntimeContextBudgetSnapshot {
|
|
|
1155
1161
|
readonly pressure: RuntimeContextPressure;
|
|
1156
1162
|
readonly tokenBreakdown: RuntimeContextBudgetBreakdown;
|
|
1157
1163
|
readonly usedTokens: number;
|
|
1164
|
+
/** Diagnostic slack for the existing snapshot; never an append budget. */
|
|
1158
1165
|
readonly availableTokens: number;
|
|
1159
1166
|
readonly usedRatio: number;
|
|
1160
1167
|
readonly toolSchemaRatio: number;
|
|
@@ -1299,6 +1306,7 @@ interface BoundExtensionRuntimeController {
|
|
|
1299
1306
|
setThinkingLevel(level: KodaXWireReasoningEffort): void;
|
|
1300
1307
|
}
|
|
1301
1308
|
interface CapabilityRuntimeContract {
|
|
1309
|
+
hasCapabilityProvider?(providerId: string): boolean;
|
|
1302
1310
|
searchCapabilities(providerId: string, query: string, options?: {
|
|
1303
1311
|
kind?: CapabilityKind;
|
|
1304
1312
|
limit?: number;
|
|
@@ -2546,6 +2554,33 @@ interface KodaXToolVisibilityMeta {
|
|
|
2546
2554
|
* metadata is hidden (fail-closed).
|
|
2547
2555
|
*/
|
|
2548
2556
|
type KodaXToolVisibilityPolicy = (tool: KodaXToolVisibilityMeta) => boolean;
|
|
2557
|
+
interface KodaXSkillScriptInputFile {
|
|
2558
|
+
/** Workspace-relative source path copied into the isolated staging directory. */
|
|
2559
|
+
readonly path: string;
|
|
2560
|
+
/** Optional staging-relative name; defaults to the source basename. */
|
|
2561
|
+
readonly as?: string;
|
|
2562
|
+
}
|
|
2563
|
+
interface KodaXSkillScriptOutputFile {
|
|
2564
|
+
/** Staging-relative path produced by the script. */
|
|
2565
|
+
readonly path: string;
|
|
2566
|
+
/** Workspace-relative destination populated after a successful run. */
|
|
2567
|
+
readonly target: string;
|
|
2568
|
+
}
|
|
2569
|
+
interface KodaXSkillScriptRunInput {
|
|
2570
|
+
readonly skill: string;
|
|
2571
|
+
readonly script: string;
|
|
2572
|
+
readonly args: readonly string[];
|
|
2573
|
+
readonly inputs: readonly KodaXSkillScriptInputFile[];
|
|
2574
|
+
readonly outputs: readonly KodaXSkillScriptOutputFile[];
|
|
2575
|
+
}
|
|
2576
|
+
/** Run-scoped, fail-closed broker used by the remote-only Skill script tool. */
|
|
2577
|
+
interface KodaXSkillScriptRunner {
|
|
2578
|
+
run(input: KodaXSkillScriptRunInput, context: {
|
|
2579
|
+
readonly workspaceRoot: string;
|
|
2580
|
+
readonly signal?: AbortSignal;
|
|
2581
|
+
}): Promise<string>;
|
|
2582
|
+
dispose(): Promise<void>;
|
|
2583
|
+
}
|
|
2549
2584
|
interface KodaXContextOptions {
|
|
2550
2585
|
/** FEATURE_260 runtime-owned identity used for scoped memory reads. */
|
|
2551
2586
|
memoryIdentity?: MemoryContextIdentity;
|
|
@@ -2594,6 +2629,10 @@ interface KodaXContextOptions {
|
|
|
2594
2629
|
toolConstructionMode?: boolean;
|
|
2595
2630
|
/** Skills system prompt snippet for progressive disclosure - Skills 系统提示词片段(渐进式披露) */
|
|
2596
2631
|
skillsPrompt?: string;
|
|
2632
|
+
/** Optional run-scoped registry used to pin and restrict Skill invocation. */
|
|
2633
|
+
skillRegistry?: ISkillRegistry;
|
|
2634
|
+
/** Remote-runtime broker for explicitly admitted, OS-sandboxed Skill scripts. */
|
|
2635
|
+
skillScriptRunner?: KodaXSkillScriptRunner;
|
|
2597
2636
|
rawUserInput?: string;
|
|
2598
2637
|
skillInvocation?: KodaXSkillInvocationContext;
|
|
2599
2638
|
/** Optional repository-intelligence snapshot injected into the system prompt. */
|
|
@@ -2726,8 +2765,8 @@ interface KodaXContextOptions {
|
|
|
2726
2765
|
* injects its own product manual so that when ITS users ask "how do I use /
|
|
2727
2766
|
* configure <product>?", the kodax_manual tool answers with the consumer's
|
|
2728
2767
|
* topics. `topics` extend the seeded base (override by id, then append);
|
|
2729
|
-
* `productName` re-brands the routing rule + scope anchor.
|
|
2730
|
-
*
|
|
2768
|
+
* `productName` re-brands the routing rule + scope anchor. Exact topic bodies
|
|
2769
|
+
* remain complete; the shared tool-result admission layer owns capacity.
|
|
2731
2770
|
*
|
|
2732
2771
|
* `baseTopics` controls how much of KodaX's own manual is present underneath:
|
|
2733
2772
|
* omit it for the default full base, `[]` for a full white-label replace, or a
|
|
@@ -3173,8 +3212,20 @@ interface KodaXToolExecutionContext {
|
|
|
3173
3212
|
/** FEATURE_222 skill security — host policy for skill `!`cmd`` dynamic-context,
|
|
3174
3213
|
* forwarded from `KodaXOptions.skillDynamicContext`. Consumed by the `skill` tool. */
|
|
3175
3214
|
skillDynamicContext?: KodaXSkillDynamicContextPolicy;
|
|
3215
|
+
/** Runtime-bound Skill registry; avoids process-global cross-session drift. */
|
|
3216
|
+
skillRegistry?: ISkillRegistry;
|
|
3217
|
+
/** Present only when the host admitted exact Skill scripts for this run. */
|
|
3218
|
+
skillScriptRunner?: KodaXSkillScriptRunner;
|
|
3176
3219
|
/** Working directory used to resolve relative paths and execute shell commands. */
|
|
3177
3220
|
executionCwd?: string;
|
|
3221
|
+
/** Maximum physical input capacity of the active model request. */
|
|
3222
|
+
maximumInputTokens?: number;
|
|
3223
|
+
/** Remaining capacity for the complete tool-result batch in this request. */
|
|
3224
|
+
toolResultCapacityTokens?: number;
|
|
3225
|
+
/** Runner path resolver for the transcript that the current batch extends. */
|
|
3226
|
+
resolveToolResultCapacityTokens?: (messages: readonly KodaXMessage[]) => number;
|
|
3227
|
+
/** Trusted side-channel for a tool-owned recovery artifact. */
|
|
3228
|
+
recordToolResultArtifact?: (toolCallId: string, outputPath: string) => void;
|
|
3178
3229
|
/** Session-scoped directory for helper scripts and scratch outputs. */
|
|
3179
3230
|
sessionScratchDir?: string;
|
|
3180
3231
|
/**
|
|
@@ -3733,5 +3784,5 @@ interface CreateBashPrefixExtractorOptions {
|
|
|
3733
3784
|
*/
|
|
3734
3785
|
declare function createBashPrefixExtractor(opts: CreateBashPrefixExtractorOptions): BashPrefixExtractor;
|
|
3735
3786
|
|
|
3736
|
-
export { ALWAYS_RESIDENT_TOOL_NAMES as A, BASH_POLICY_SPEC as B, LSP_SERVERS as
|
|
3737
|
-
export type {
|
|
3787
|
+
export { ALWAYS_RESIDENT_TOOL_NAMES as A, BASH_POLICY_SPEC as B, LSP_SERVERS as aN, LspService as aP, drainPendingSwaps as bA, estimateToolSchemaTokens as bB, extractCommandPrefix as bC, getDefaultLspService as bD, hasPendingSwap as bE, makeDisabledGoalToolsContext as bF, planToolExposure as bG, providerResilienceConfigFromTimeouts as bH, recordCompactionSavings as bI, resolveConstructedAgent as bJ, shouldSkipLlmCompaction as bK, shutdownDefaultLspService as bL, withGoalBeforeNextTurn as bM, withGoalStopHook as bN, workflowStartOutcomeConsumesTurn as bO, buildGoalRuntimeBinding as bu, consumeCompactionCooldown as bv, createBashPrefixExtractor as bw, createCompactionAntiThrashState as bx, createRuntimeContextBudgetSnapshot as by, decideWorkflowInvocation as bz };
|
|
3788
|
+
export type { KodaXProviderPolicyHints as $, CapabilityRuntimeContract as C, DiagnosticsRequest as D, ExtensionRuntimeContract as E, FailureStage as F, GoalBlockedResult as G, KodaXContextOptions as H, KodaXContextTokenSnapshot as I, KodaXEffectiveTaskConfig as J, KodaXActivityEventMeta as K, KodaXEvents as L, KodaXLiveEventMeta as M, KodaXManagedBudgetSnapshot as N, KodaXManagedProtocolPayload as O, KodaXManagedTask as P, KodaXManagedTaskRuntimeState as Q, KodaXManagedTaskStatusEvent as R, KodaXManualIndexTopic as S, KodaXManualSource as T, KodaXManualTopic as U, KodaXManualTopicId as V, KodaXManualTopicInput as W, KodaXMemoryStrategy as X, KodaXOptions as Y, KodaXOrchestrationVerdict as Z, KodaXParentReductionContract as _, BashPrefixExtractor as a, ResolveKodaXManualInput as a$, KodaXRepoIntelligenceCapability as a0, KodaXRepoIntelligenceMode as a1, KodaXRepoIntelligenceResolvedMode as a2, KodaXRepoIntelligenceTrace as a3, KodaXRepoIntelligenceTraceEvent as a4, KodaXRepoRoutingSignals as a5, KodaXResult as a6, KodaXRoleRoundSummary as a7, KodaXRuntimeVerificationContract as a8, KodaXSelfManualConfig as a9, KodaXToolEventMeta as aA, KodaXToolExecutionContext as aB, KodaXToolVisibilityMeta as aC, KodaXToolVisibilityPolicy as aD, KodaXTurnCompletedEvent as aE, KodaXTurnDeliveryKind as aF, KodaXTurnFailedEvent as aG, KodaXTurnStartedEvent as aH, KodaXVerificationScorecard as aI, KodaXVerificationScorecardCriterion as aJ, KodaXWorkflowAgentDigestEvent as aK, KodaXWorkflowEventMeta as aL, KodaXWorkflowTimeoutConfig as aM, LspServerInfo as aO, LspServiceConfig as aQ, ProviderExecutionState as aR, ProviderRecoveryEvent as aS, ProviderResilienceConfig as aT, ProviderResiliencePolicy as aU, RecoveryAction as aV, RecoveryDecision as aW, RecoveryLadderStep as aX, RecoveryResult as aY, ResilienceClassification as aZ, ResilienceErrorClass as a_, KodaXSessionControl as aa, KodaXSessionMutators as ab, KodaXSessionOptions as ac, KodaXSidecarMessageEvent as ad, KodaXSkillDynamicContextPolicy as ae, KodaXSkillInvocationContext as af, KodaXSkillMap as ag, KodaXSkillProjectionConfidence as ah, KodaXSkillScriptInputFile as ai, KodaXSkillScriptOutputFile as aj, KodaXSkillScriptRunInput as ak, KodaXSkillScriptRunner as al, KodaXTaskCapabilityHint as am, KodaXTaskContract as an, KodaXTaskEvidenceArtifact as ao, KodaXTaskEvidenceBundle as ap, KodaXTaskEvidenceEntry as aq, KodaXTaskRole as ar, KodaXTaskRoleAssignment as as, KodaXTaskStatus as at, KodaXTaskSurface as au, KodaXTaskToolPolicy as av, KodaXTaskVerificationContract as aw, KodaXTaskVerificationCriterion as ax, KodaXTaskWorkItem as ay, KodaXTimeoutConfig as az, BashPrefixResult as b, ResolveKodaXManualOptions as b0, ResolveKodaXManualResult as b1, RuntimeCompactionSkippedEvent as b2, RuntimeContextBudgetBreakdown as b3, RuntimeContextBudgetRecommendation as b4, RuntimeContextBudgetSnapshot as b5, RuntimeContextBudgetSnapshotInput as b6, RuntimeContextOptimizationProfile as b7, RuntimeContextPressure as b8, RuntimeDefaultsSnapshot as b9, RuntimeToolExposureDecision as ba, RuntimeToolExposureMode as bb, RuntimeToolExposurePlan as bc, RuntimeToolExposurePlanInput as bd, RuntimeToolExposureReason as be, TodoItem as bf, TodoList as bg, TodoStatus as bh, ToolSideEffect as bi, WorkflowHostPolicy as bj, WorkflowInvocationAction as bk, WorkflowInvocationPolicyDecision as bl, WorkflowInvocationPolicyInput as bm, WorkflowInvocationSource as bn, WorkflowRunProgressView as bo, WorkflowStartOutcome as bp, WorkflowToolHost as bq, WorkflowToolHostInlineInput as br, WorkflowToolHostResult as bs, WorkflowToolHostStartResult as bt, BoundExtensionRuntimeController as c, ChildSnapshotEvent as d, CompactionAntiThrashConfig as e, CompactionAntiThrashState as f, CompactionSavingsDecision as g, CompactionSavingsSample as h, CompactionSkipReason as i, CreateBashPrefixExtractorOptions as j, ExtractCommandPrefixOptions as k, GoalCompleteResult as l, GoalCreateInput as m, GoalLifecycleContext as n, GoalRuntimeBinding as o, GoalRuntimeBindingDeps as p, GoalToolsContext as q, KodaXAgentMode as r, KodaXAgentProfile as s, KodaXAgentScope as t, KodaXBudgetDisclosureZone as u, KodaXBudgetExtensionRequest as v, KodaXChildAgentResult as w, KodaXChildContextBundle as x, KodaXChildExecutionResult as y, KodaXCompactionOverride as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { k as KodaXMessage } from './types.d-
|
|
2
|
-
import { Q as QueueEventListener, c as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-
|
|
3
|
-
import { I as AgentMessage,
|
|
1
|
+
import { k as KodaXMessage } from './types.d-TTvpAGWf.js';
|
|
2
|
+
import { Q as QueueEventListener, c as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-CJR7t6iW.js';
|
|
3
|
+
import { I as AgentMessage, cB as SessionEntry, cz as Session, cD as SessionExtension, b5 as KodaXSessionLineage, aT as KodaXJsonValue, a9 as CompactionDetails, aG as KodaXCompactMemorySeed, b1 as KodaXSessionEntry, bf as KodaXSessionTreeNode, b4 as KodaXSessionLabelEntry, b3 as KodaXSessionGoalEntry, a_ as KodaXSessionClientNoticeEntry, bb as KodaXSessionRewindMarkerEntry, b6 as KodaXSessionMemoryOutcomeDigestEntry, b7 as KodaXSessionMemoryReviewReceiptEntry, ba as KodaXSessionNavigationOptions, aY as KodaXSessionArtifactLedgerEntry, au as FileOperations, dg as WorkflowMeta, dh as WorkflowModelHint, di as WorkflowModule } from './types.d-BtC4yLYO.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-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { be as KodaXSessionStorage, b0 as KodaXSessionData } from './types.d-
|
|
1
|
+
import { h as SessionStorage$1, f as PermissionMode } from './public-api.d-7G4--RZE.js';
|
|
2
|
+
import { Y as KodaXOptions, a6 as KodaXResult } from './bash-prefix-extractor.d-BkIA8Wto.js';
|
|
3
|
+
import { n 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-BbB5jzi1.js';
|
|
4
|
+
import { be as KodaXSessionStorage, b0 as KodaXSessionData } from './types.d-BtC4yLYO.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* InkREPL - Ink-based REPL Adapter
|
|
@@ -29,11 +29,14 @@ declare function resolveLlmTimeoutConfig(timeouts: KodaXLlmTimeoutConfig | undef
|
|
|
29
29
|
interface CostRate {
|
|
30
30
|
readonly inputPer1M: number;
|
|
31
31
|
readonly outputPer1M: number;
|
|
32
|
+
/** @deprecated Use cacheReadPer1M/cacheWritePer1M when the provider prices them separately. */
|
|
32
33
|
readonly cachePer1M?: number;
|
|
34
|
+
readonly cacheReadPer1M?: number;
|
|
35
|
+
readonly cacheWritePer1M?: number;
|
|
33
36
|
}
|
|
34
37
|
declare const DEFAULT_COST_RATES: Readonly<Record<string, Readonly<Record<string, CostRate>>>>;
|
|
35
38
|
declare function getCostRate(provider: string, model: string, userOverrides?: Readonly<Record<string, Readonly<Record<string, CostRate>>>>): CostRate | undefined;
|
|
36
|
-
declare function calculateCost(rate: CostRate,
|
|
39
|
+
declare function calculateCost(rate: CostRate, totalInputTokens: number, outputTokens: number, cacheReadTokens?: number, cacheWriteTokens?: number): number;
|
|
37
40
|
|
|
38
41
|
/**
|
|
39
42
|
* KodaX Cost Tracker - Immutable session cost tracking
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aw as Guardrail,
|
|
1
|
+
import { aw as Guardrail, ct as RunnerToolCall, f as Agent, I as AgentMessage, cw as RunnerToolResult, cH as Span } from './types.d-BtC4yLYO.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
|
-
import { K as KodaXBaseProvider } from './base.d-
|
|
3
|
-
import { a as CostTracker } from './cost-tracker.d-
|
|
4
|
-
import {
|
|
5
|
-
import { d as ToolGuardrail } from './guardrail.d-
|
|
2
|
+
import { K as KodaXBaseProvider } from './base.d-CYjtB68X.js';
|
|
3
|
+
import { a as CostTracker } from './cost-tracker.d-BeaenODW.js';
|
|
4
|
+
import { ct as RunnerToolCall } from './types.d-BtC4yLYO.js';
|
|
5
|
+
import { d as ToolGuardrail } from './guardrail.d-6ZDbNbHO.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* FEATURE_200 Phase F (v0.7.45) — MCP domain types extracted from types.ts.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { b as McpServersConfig } from './config.d-CJy1WENT.js';
|
|
2
|
+
|
|
3
|
+
type IntegrationDomain = 'mcp' | 'a2a' | 'extensions';
|
|
4
|
+
type IntegrationConfigSource = 'user' | 'legacy-user' | 'default';
|
|
5
|
+
interface McpIntegrationDocument {
|
|
6
|
+
readonly version: 1;
|
|
7
|
+
readonly servers: McpServersConfig;
|
|
8
|
+
}
|
|
9
|
+
interface ExtensionsIntegrationDocument {
|
|
10
|
+
readonly version: 1;
|
|
11
|
+
readonly paths: readonly string[];
|
|
12
|
+
}
|
|
13
|
+
interface IntegrationConfigSnapshot<T extends object> {
|
|
14
|
+
readonly domain: IntegrationDomain;
|
|
15
|
+
readonly source: IntegrationConfigSource;
|
|
16
|
+
readonly path: string;
|
|
17
|
+
readonly revision: string;
|
|
18
|
+
readonly document: T;
|
|
19
|
+
readonly loadedAt: string;
|
|
20
|
+
}
|
|
21
|
+
interface IntegrationConfigDiagnostic {
|
|
22
|
+
readonly code: 'invalid-config' | 'activation-failed' | 'watcher-degraded';
|
|
23
|
+
readonly message: string;
|
|
24
|
+
readonly time: string;
|
|
25
|
+
}
|
|
26
|
+
interface IntegrationConfigStatus {
|
|
27
|
+
readonly domain: IntegrationDomain;
|
|
28
|
+
readonly path: string;
|
|
29
|
+
readonly revision?: string;
|
|
30
|
+
readonly source?: IntegrationConfigSource;
|
|
31
|
+
readonly lastReloadAt?: string;
|
|
32
|
+
readonly diagnostic?: IntegrationConfigDiagnostic;
|
|
33
|
+
readonly watching: boolean;
|
|
34
|
+
}
|
|
35
|
+
interface LegacyIntegrationMigrationDomainPlan {
|
|
36
|
+
readonly action: 'create' | 'none';
|
|
37
|
+
readonly entries: number;
|
|
38
|
+
readonly destination: string;
|
|
39
|
+
readonly reason?: string;
|
|
40
|
+
}
|
|
41
|
+
interface LegacyIntegrationMigrationPlan {
|
|
42
|
+
readonly mcp: LegacyIntegrationMigrationDomainPlan;
|
|
43
|
+
readonly extensions: LegacyIntegrationMigrationDomainPlan;
|
|
44
|
+
readonly warnings: readonly string[];
|
|
45
|
+
}
|
|
46
|
+
interface LegacyIntegrationMigrationResult extends LegacyIntegrationMigrationPlan {
|
|
47
|
+
readonly applied: readonly ('mcp' | 'extensions')[];
|
|
48
|
+
readonly cleanedLegacy: boolean;
|
|
49
|
+
}
|
|
50
|
+
type IntegrationDocumentValidator<T extends object> = (value: unknown) => T;
|
|
51
|
+
type IntegrationConfigListener<T extends object> = (snapshot: IntegrationConfigSnapshot<T>, previous: IntegrationConfigSnapshot<T> | undefined) => Promise<void> | void;
|
|
52
|
+
type IntegrationReloadResult<T extends object> = {
|
|
53
|
+
readonly ok: true;
|
|
54
|
+
readonly snapshot: IntegrationConfigSnapshot<T>;
|
|
55
|
+
} | {
|
|
56
|
+
readonly ok: false;
|
|
57
|
+
readonly error: string;
|
|
58
|
+
};
|
|
59
|
+
declare function parseMcpIntegrationDocument(value: unknown): McpIntegrationDocument;
|
|
60
|
+
declare function parseExtensionsIntegrationDocument(value: unknown): ExtensionsIntegrationDocument;
|
|
61
|
+
declare function resolveIntegrationConfigPath(domain: IntegrationDomain, configHome: string): string;
|
|
62
|
+
declare function readMcpIntegration(configHome: string): IntegrationConfigSnapshot<McpIntegrationDocument>;
|
|
63
|
+
declare function readExtensionsIntegration(configHome: string): IntegrationConfigSnapshot<ExtensionsIntegrationDocument>;
|
|
64
|
+
declare function planLegacyIntegrationMigration(configHome: string): LegacyIntegrationMigrationPlan;
|
|
65
|
+
declare function migrateLegacyIntegrationConfig(input: {
|
|
66
|
+
readonly configHome: string;
|
|
67
|
+
readonly cleanupLegacy?: boolean;
|
|
68
|
+
}): LegacyIntegrationMigrationResult;
|
|
69
|
+
declare function writeIntegrationDocument<T extends object>(input: {
|
|
70
|
+
readonly domain: IntegrationDomain;
|
|
71
|
+
readonly configHome: string;
|
|
72
|
+
readonly document: T;
|
|
73
|
+
readonly validate: IntegrationDocumentValidator<T>;
|
|
74
|
+
readonly expectedRevision?: string;
|
|
75
|
+
}): IntegrationConfigSnapshot<T>;
|
|
76
|
+
declare class IntegrationConfigController<T extends object> {
|
|
77
|
+
#private;
|
|
78
|
+
constructor(options: {
|
|
79
|
+
readonly domain: IntegrationDomain;
|
|
80
|
+
readonly configHome: string;
|
|
81
|
+
readonly validate: IntegrationDocumentValidator<T>;
|
|
82
|
+
readonly read: () => IntegrationConfigSnapshot<T>;
|
|
83
|
+
});
|
|
84
|
+
initialize(): Promise<IntegrationConfigSnapshot<T>>;
|
|
85
|
+
snapshot(): IntegrationConfigSnapshot<T> | undefined;
|
|
86
|
+
status(): IntegrationConfigStatus;
|
|
87
|
+
subscribe(listener: IntegrationConfigListener<T>): () => void;
|
|
88
|
+
reload(): Promise<IntegrationReloadResult<T>>;
|
|
89
|
+
ensureCurrent(): Promise<IntegrationReloadResult<T>>;
|
|
90
|
+
startWatching(debounceMs?: number, fallbackMs?: number): void;
|
|
91
|
+
close(): void;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { IntegrationConfigController as I, parseMcpIntegrationDocument as j, planLegacyIntegrationMigration as k, readMcpIntegration as l, migrateLegacyIntegrationConfig as m, resolveIntegrationConfigPath as n, parseExtensionsIntegrationDocument as p, readExtensionsIntegration as r, writeIntegrationDocument as w };
|
|
95
|
+
export type { ExtensionsIntegrationDocument as E, LegacyIntegrationMigrationDomainPlan as L, McpIntegrationDocument as M, IntegrationConfigDiagnostic as a, IntegrationConfigListener as b, IntegrationConfigSnapshot as c, IntegrationConfigSource as d, IntegrationConfigStatus as e, IntegrationDocumentValidator as f, IntegrationDomain as g, LegacyIntegrationMigrationPlan as h, LegacyIntegrationMigrationResult as i };
|
|
@@ -294,6 +294,9 @@ interface McpProviderOptions {
|
|
|
294
294
|
*/
|
|
295
295
|
reverse?: McpReverseCapabilities;
|
|
296
296
|
}
|
|
297
|
+
interface McpPrewarmOptions {
|
|
298
|
+
readonly failOnError?: boolean;
|
|
299
|
+
}
|
|
297
300
|
declare class McpCapabilityProvider implements CapabilityProvider {
|
|
298
301
|
readonly id = "mcp";
|
|
299
302
|
readonly kinds: CapabilityProvider['kinds'];
|
|
@@ -329,7 +332,7 @@ declare class McpCapabilityProvider implements CapabilityProvider {
|
|
|
329
332
|
* higher-level lifecycle control.
|
|
330
333
|
*/
|
|
331
334
|
getRuntime(serverId: string): McpServerRuntime | undefined;
|
|
332
|
-
prewarm(): Promise<void>;
|
|
335
|
+
prewarm(options?: McpPrewarmOptions): Promise<void>;
|
|
333
336
|
search(query: string, options?: {
|
|
334
337
|
kind?: CapabilityKind;
|
|
335
338
|
limit?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as BashPrefixExtractor } from './bash-prefix-extractor.d-
|
|
2
|
-
import { b0 as KodaXSessionData, b5 as KodaXSessionLineage, ba as KodaXSessionNavigationOptions, bc as KodaXSessionRuntimeInfo, be as KodaXSessionStorage, aT as KodaXJsonValue } from './types.d-
|
|
3
|
-
import { k as KodaXMessage, S as KodaXTaskResultMetadata } from './types.d-
|
|
1
|
+
import { a as BashPrefixExtractor } from './bash-prefix-extractor.d-BkIA8Wto.js';
|
|
2
|
+
import { b0 as KodaXSessionData, b5 as KodaXSessionLineage, ba as KodaXSessionNavigationOptions, bc as KodaXSessionRuntimeInfo, be as KodaXSessionStorage, aT as KodaXJsonValue } from './types.d-BtC4yLYO.js';
|
|
3
|
+
import { k as KodaXMessage, S as KodaXTaskResultMetadata } from './types.d-TTvpAGWf.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Permission Types
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as KodaXReasoningMode, M as KodaXStableEffortIntent, a9 as KodaXWireReasoningEffort, G as KodaXReasoningProfile, Z as KodaXThinkingBudgetMap, _ as KodaXThinkingDepth, q as KodaXProviderConfig, B as KodaXReasoningCapability, H as KodaXReasoningRequest, n as KodaXNormalizedReasoningRequest, V as KodaXTaskType, a7 as KodaXVerifyCredentialResult, a1 as KodaXToolDefinition, k as KodaXMessage, y as KodaXProviderStreamOptions, N as KodaXStreamResult, l as KodaXModelDescriptor, p as KodaXProviderCapabilityProfile, a8 as KodaXVerifyStrategy, d as KodaXCustomProviderConfig, j as KodaXListModelsResult } from './types.d-
|
|
1
|
+
import { F as KodaXReasoningMode, M as KodaXStableEffortIntent, a9 as KodaXWireReasoningEffort, G as KodaXReasoningProfile, Z as KodaXThinkingBudgetMap, _ as KodaXThinkingDepth, q as KodaXProviderConfig, B as KodaXReasoningCapability, H as KodaXReasoningRequest, n as KodaXNormalizedReasoningRequest, V as KodaXTaskType, a7 as KodaXVerifyCredentialResult, a1 as KodaXToolDefinition, k as KodaXMessage, y as KodaXProviderStreamOptions, N as KodaXStreamResult, l as KodaXModelDescriptor, p as KodaXProviderCapabilityProfile, a8 as KodaXVerifyStrategy, d as KodaXCustomProviderConfig, j as KodaXListModelsResult } from './types.d-TTvpAGWf.js';
|
|
2
2
|
import Anthropic from '@anthropic-ai/sdk';
|
|
3
|
-
import { K as KodaXBaseProvider } from './base.d-
|
|
3
|
+
import { K as KodaXBaseProvider } from './base.d-CYjtB68X.js';
|
|
4
4
|
import OpenAI from 'openai';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dz as WorkflowProcessTrackerOptions, d9 as WorkflowEvent, dt as WorkflowProcessSnapshot, dm as WorkflowProcessEvent } from './types.d-BtC4yLYO.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-
|
|
2
|
-
import { F as KodaXReasoningMode, k as KodaXMessage, c as KodaXContentBlock } from './types.d-
|
|
3
|
-
import { r as KodaXAgentMode } from './bash-prefix-extractor.d-
|
|
4
|
-
import { bg as KodaXSessionUiHistoryItem, bk as KodaXSessionUiToolCall } from './types.d-
|
|
1
|
+
import { f as PermissionMode } from './public-api.d-7G4--RZE.js';
|
|
2
|
+
import { F as KodaXReasoningMode, k as KodaXMessage, c as KodaXContentBlock } from './types.d-TTvpAGWf.js';
|
|
3
|
+
import { r as KodaXAgentMode } from './bash-prefix-extractor.d-BkIA8Wto.js';
|
|
4
|
+
import { bg as KodaXSessionUiHistoryItem, bk as KodaXSessionUiToolCall } from './types.d-BtC4yLYO.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* TextBuffer - Text buffer management class - 文本缓冲区管理类
|
|
@@ -439,6 +439,8 @@ interface StatusBarProps {
|
|
|
439
439
|
contextWindow: number;
|
|
440
440
|
/** Compaction trigger percentage (0-100) */
|
|
441
441
|
triggerPercent: number;
|
|
442
|
+
/** Provider output capacity reserved from the physical context window. */
|
|
443
|
+
reservedResponseTokens?: number;
|
|
442
444
|
};
|
|
443
445
|
/** Whether current busy/thinking status should be visible in the bar */
|
|
444
446
|
showBusyStatus?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as KodaXMessage, a1 as KodaXToolDefinition, F as KodaXReasoningMode, a9 as KodaXWireReasoningEffort, a3 as KodaXToolResultContentItem, Y as KodaXThinkingBlock, I as KodaXRedactedThinkingBlock } from './types.d-
|
|
1
|
+
import { k as KodaXMessage, a1 as KodaXToolDefinition, F as KodaXReasoningMode, a9 as KodaXWireReasoningEffort, a3 as KodaXToolResultContentItem, Y as KodaXThinkingBlock, I as KodaXRedactedThinkingBlock } from './types.d-TTvpAGWf.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @kodax-ai/agent Types
|
|
@@ -1582,6 +1582,8 @@ interface RunnerToolObserver {
|
|
|
1582
1582
|
interface RunnerToolContext {
|
|
1583
1583
|
readonly agent: Agent;
|
|
1584
1584
|
readonly abortSignal?: AbortSignal;
|
|
1585
|
+
/** Transcript that the resulting tool_result batch will extend. */
|
|
1586
|
+
readonly transcript?: readonly AgentMessage[];
|
|
1585
1587
|
/** The agent's Span, so tool implementations can nest custom spans if needed. */
|
|
1586
1588
|
readonly agentSpan?: Span | null;
|
|
1587
1589
|
/**
|
|
@@ -1607,6 +1609,14 @@ interface RunnerToolResult {
|
|
|
1607
1609
|
readonly isError?: boolean;
|
|
1608
1610
|
readonly metadata?: Record<string, unknown>;
|
|
1609
1611
|
}
|
|
1612
|
+
/** Complete settled batch presented once before the tool_result message. */
|
|
1613
|
+
interface RunnerToolResultBatch {
|
|
1614
|
+
readonly calls: readonly RunnerToolCall[];
|
|
1615
|
+
readonly results: readonly RunnerToolResult[];
|
|
1616
|
+
readonly transcript: readonly AgentMessage[];
|
|
1617
|
+
}
|
|
1618
|
+
/** Optional host-owned transform for aggregate result admission. */
|
|
1619
|
+
type RunnerToolResultBatchTransform = (batch: RunnerToolResultBatch) => Promise<readonly RunnerToolResult[]>;
|
|
1610
1620
|
/**
|
|
1611
1621
|
* A tool bundled with its executor. Extends `AgentTool` (the wire-format
|
|
1612
1622
|
* `KodaXToolDefinition`) so it can be passed through to the provider
|
|
@@ -1741,6 +1751,12 @@ interface RunOptions {
|
|
|
1741
1751
|
* `onToolResult` through the usual `KodaXEvents` bus.
|
|
1742
1752
|
*/
|
|
1743
1753
|
readonly toolObserver?: RunnerToolObserver;
|
|
1754
|
+
/**
|
|
1755
|
+
* Runs once after every tool call in a batch has settled and before the
|
|
1756
|
+
* corresponding tool_result message is built. The transform must preserve
|
|
1757
|
+
* result count/order so tool_use pairing remains valid.
|
|
1758
|
+
*/
|
|
1759
|
+
readonly toolResultBatchTransform?: RunnerToolResultBatchTransform;
|
|
1744
1760
|
/**
|
|
1745
1761
|
* Compaction hook. Fires at the TOP of every tool-loop iteration,
|
|
1746
1762
|
* BEFORE the LLM call. Return the replacement transcript to trigger
|
|
@@ -1973,6 +1989,12 @@ interface RunResult<TData = unknown> {
|
|
|
1973
1989
|
* outputs a `blocked` verdict (halt + surface to user). */
|
|
1974
1990
|
readonly stoppedByHook?: boolean;
|
|
1975
1991
|
}
|
|
1992
|
+
/** Non-enumerable recovery payload carried across Runner error boundaries. */
|
|
1993
|
+
interface RunnerRecoveryTranscriptCarrier {
|
|
1994
|
+
readonly __kodaxRecoveredMessages?: readonly AgentMessage[];
|
|
1995
|
+
}
|
|
1996
|
+
declare function attachRunnerRecoveryTranscript(error: Error, messages: readonly AgentMessage[]): void;
|
|
1997
|
+
declare function readRunnerRecoveryTranscript(error: unknown): readonly AgentMessage[] | undefined;
|
|
1976
1998
|
/**
|
|
1977
1999
|
* Stream events emitted by `Runner.runStream`. The event surface is
|
|
1978
2000
|
* intentionally small in v0.7.23; FEATURE_084 expands it to mirror the
|
|
@@ -2926,7 +2948,10 @@ type MemoryEvent = {
|
|
|
2926
2948
|
interface CompactionConfig {
|
|
2927
2949
|
/** Whether automatic compaction is enabled. */
|
|
2928
2950
|
enabled: boolean;
|
|
2929
|
-
/**
|
|
2951
|
+
/**
|
|
2952
|
+
* Optional early trigger percentage. `100` means capacity-only; values below
|
|
2953
|
+
* 100 explicitly opt in to semantic compaction before physical pressure.
|
|
2954
|
+
*/
|
|
2930
2955
|
triggerPercent: number;
|
|
2931
2956
|
/**
|
|
2932
2957
|
* @deprecated V2 compaction no longer uses this option.
|
|
@@ -2942,12 +2967,14 @@ interface CompactionConfig {
|
|
|
2942
2967
|
* summary pass. Defaults to 10.
|
|
2943
2968
|
*/
|
|
2944
2969
|
rollingSummaryPercent?: number;
|
|
2945
|
-
/**
|
|
2970
|
+
/**
|
|
2971
|
+
* Explicit legacy opt-in for destructive pre-summary tool-result pruning.
|
|
2972
|
+
* Undefined keeps the complete evidence for semantic summarization.
|
|
2973
|
+
*/
|
|
2946
2974
|
pruningThresholdTokens?: number;
|
|
2947
2975
|
/**
|
|
2948
|
-
*
|
|
2949
|
-
*
|
|
2950
|
-
* instead of returning early. Defaults to 0.8.
|
|
2976
|
+
* Legacy deterministic-pruning gap ratio. Only relevant when
|
|
2977
|
+
* `pruningThresholdTokens` is explicitly configured.
|
|
2951
2978
|
*/
|
|
2952
2979
|
pruningGapRatio?: number;
|
|
2953
2980
|
/** Optional override for the provider context window. */
|
|
@@ -3853,5 +3880,5 @@ interface CreateAgentExecutorPlaneOptions {
|
|
|
3853
3880
|
readonly createIdempotencyKey?: () => string;
|
|
3854
3881
|
}
|
|
3855
3882
|
|
|
3856
|
-
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 bs, SpanImpl as
|
|
3857
|
-
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 _, KodaXSessionCompactionEntry 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, KodaXMemoryInfluenceRef as aU, KodaXMemoryOutcomeDigest as aV, KodaXMemoryOutcomeEvidence as aW, KodaXSessionArchiveMarkerEntry as aX, KodaXSessionArtifactLedgerEntry as aY, KodaXSessionBranchSummaryEntry as aZ, KodaXSessionClientNoticeEntry 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, MemoryReviewModelInput as b$, KodaXSessionData as b0, KodaXSessionEntry as b1, KodaXSessionEntryBase as b2, KodaXSessionGoalEntry as b3, KodaXSessionLabelEntry as b4, KodaXSessionLineage as b5, KodaXSessionMemoryOutcomeDigestEntry as b6, KodaXSessionMemoryReviewReceiptEntry as b7, KodaXSessionMessageEntry as b8, KodaXSessionMeta as b9, MemoryAutoCuratorInput as bA, MemoryAutoCuratorResult as bB, MemoryBodySnapshot as bC, MemoryClaimKind as bD, MemoryContextIdentity as bE, MemoryController as bF, MemoryCuratorInput as bG, MemoryDecisionTraceReceipt as bH, MemoryEpisodeReviewResult as bI, MemoryEvent as bJ, MemoryGovernanceFinding as bK, MemoryGovernanceFindingKind as bL, MemoryGovernanceReport as bM, MemoryItemRef as bN, MemoryLifecycle as bO, MemoryLifecycleOperationResult as bP, MemoryPack as bQ, MemoryPackHint as bR, MemoryPackInput as bS, MemoryPackTraceMetadata as bT, MemoryProposalAction as bU, MemoryRefFilter as bV, MemoryRefKind as bW, MemoryRejectResult as bX, MemoryReviewCandidateRef as bY, MemoryReviewDraftAction as bZ, MemoryReviewInput as b_, KodaXSessionNavigationOptions as ba, KodaXSessionRewindMarkerEntry as bb, KodaXSessionRuntimeInfo as bc, KodaXSessionScope as bd, KodaXSessionStorage as be, KodaXSessionTreeNode as bf, KodaXSessionUiHistoryItem as bg, KodaXSessionUiHistoryItemType as bh, KodaXSessionUiTextHistoryItem as bi, KodaXSessionUiTextHistoryItemType as bj, KodaXSessionUiToolCall as bk, KodaXSessionUiToolCallStatus as bl, KodaXSessionUiToolGroupHistoryItem as bm, KodaXSessionWorkspaceKind as bn, KodaXVideoInputArtifact as bo, KodaXVideoMediaType as bp, LocalAgentTaskInput as bq, LocalAgentTaskUpdate as br, ManifestPatch as bt, MemoryActionProposal as bu, MemoryApplicability as bv, MemoryApplyPreview as bw, MemoryApplyResult as bx, MemoryApproval as by, MemoryAuthority as bz, AdmissionCtx as c,
|
|
3883
|
+
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 bs, SpanImpl as cK, Runner as co, createInvariantSessionForAgent as d$, Tracer as d0, _resetAdmittedAgentBindings as dR, _resetPresetDispatchers as dS, asSingleSelection as dT, attachRunnerRecoveryTranscript as dU, buildAssistantMessageFromLlmResult as dV, buildSystemPrompt as dW, buildToolResultMessage as dX, createAgent as dY, createHandoff as dZ, createInMemorySession as d_, WorkflowEventRecorder as db, createStateWriter as e0, createTrace as e1, createWorkflowProcessTracker as e2, defaultTracer as e3, detectInstructionsInjection as e4, discoverInstances as e5, executeRunnerToolCall as e6, extractAssistantTextFromMessage as e7, getActiveUserInteraction as e8, getAdmittedAgentBindings as e9, hashMemoryIdentityComponent as ea, isAskUserCustomInputAnswer as eb, isFinalWorkflowProcessStatus as ec, isRunnableTool as ed, isRunnerLlmResult as ee, matchesMemoryApplicability as ef, memoryApplicabilityFingerprint as eg, normalizeHostMetadata as eh, readRunnerRecoveryTranscript as ei, registerChildTask as ej, registerPresetDispatcher as ek, requestTaskStop as el, runAdmissionAudit as em, setActiveUserInteraction as en, setAdmittedAgentBindings as eo };
|
|
3884
|
+
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 _, KodaXSessionCompactionEntry 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, KodaXMemoryInfluenceRef as aU, KodaXMemoryOutcomeDigest as aV, KodaXMemoryOutcomeEvidence as aW, KodaXSessionArchiveMarkerEntry as aX, KodaXSessionArtifactLedgerEntry as aY, KodaXSessionBranchSummaryEntry as aZ, KodaXSessionClientNoticeEntry 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, MemoryReviewModelInput as b$, KodaXSessionData as b0, KodaXSessionEntry as b1, KodaXSessionEntryBase as b2, KodaXSessionGoalEntry as b3, KodaXSessionLabelEntry as b4, KodaXSessionLineage as b5, KodaXSessionMemoryOutcomeDigestEntry as b6, KodaXSessionMemoryReviewReceiptEntry as b7, KodaXSessionMessageEntry as b8, KodaXSessionMeta as b9, MemoryAutoCuratorInput as bA, MemoryAutoCuratorResult as bB, MemoryBodySnapshot as bC, MemoryClaimKind as bD, MemoryContextIdentity as bE, MemoryController as bF, MemoryCuratorInput as bG, MemoryDecisionTraceReceipt as bH, MemoryEpisodeReviewResult as bI, MemoryEvent as bJ, MemoryGovernanceFinding as bK, MemoryGovernanceFindingKind as bL, MemoryGovernanceReport as bM, MemoryItemRef as bN, MemoryLifecycle as bO, MemoryLifecycleOperationResult as bP, MemoryPack as bQ, MemoryPackHint as bR, MemoryPackInput as bS, MemoryPackTraceMetadata as bT, MemoryProposalAction as bU, MemoryRefFilter as bV, MemoryRefKind as bW, MemoryRejectResult as bX, MemoryReviewCandidateRef as bY, MemoryReviewDraftAction as bZ, MemoryReviewInput as b_, KodaXSessionNavigationOptions as ba, KodaXSessionRewindMarkerEntry as bb, KodaXSessionRuntimeInfo as bc, KodaXSessionScope as bd, KodaXSessionStorage as be, KodaXSessionTreeNode as bf, KodaXSessionUiHistoryItem as bg, KodaXSessionUiHistoryItemType as bh, KodaXSessionUiTextHistoryItem as bi, KodaXSessionUiTextHistoryItemType as bj, KodaXSessionUiToolCall as bk, KodaXSessionUiToolCallStatus as bl, KodaXSessionUiToolGroupHistoryItem as bm, KodaXSessionWorkspaceKind as bn, KodaXVideoInputArtifact as bo, KodaXVideoMediaType as bp, LocalAgentTaskInput as bq, LocalAgentTaskUpdate as br, ManifestPatch as bt, MemoryActionProposal as bu, MemoryApplicability as bv, MemoryApplyPreview as bw, MemoryApplyResult as bx, MemoryApproval as by, MemoryAuthority as bz, AdmissionCtx as c, TraceOptions as c$, MemoryReviewPersistenceDecision as c0, MemoryReviewPersistenceKind as c1, MemoryReviewPlan as c2, MemoryReviewRunner as c3, MemoryReviewTrigger as c4, MemoryScope as c5, MemorySourceAdapter as c6, MemoryVisibility as c7, MessageEntry as c8, ObserveCtx as c9, SessionDispatchResult as cA, SessionEntry as cB, SessionErrorMetadata as cC, SessionExtension as cD, SessionForkOptions as cE, SessionMeta as cF, SessionStateSnapshot as cG, Span as cH, SpanData as cI, SpanError as cJ, SpanImplOptions as cL, StartTraceOptions as cM, StateWriter as cN, StateWriterFs as cO, StateWriterOptions as cP, StopHookContext as cQ, StopHookFn as cR, StopHookResult as cS, StopHookSpanData as cT, SystemCap as cU, TaskAbortRegistry as cV, TerminalCtx as cW, ToolCallSpanData as cX, ToolCapability as cY, ToolPermission as cZ, Trace as c_, PersistedSessionState as ca, PresetDispatcher as cb, PresetTracingContext as cc, QualityInvariant as cd, ReadonlyMutationTracker as ce, ReadonlyRecorder as cf, ReasoningDepth as cg, RecentlyModifiedFile as ch, RequestTaskStopOptions as ci, RequestTaskStopResult as cj, RunEvent as ck, RunOptions as cl, RunResult as cm, RunnableTool as cn, RunnerEvent as cp, RunnerLlmResult as cq, RunnerLlmReturn as cr, RunnerRecoveryTranscriptCarrier as cs, RunnerToolCall as ct, RunnerToolContext as cu, RunnerToolObserver as cv, RunnerToolResult as cw, RunnerToolResultBatch as cx, RunnerToolResultBatchTransform as cy, Session as cz, AdmissionVerdict as d, TracerOptions as d1, UserInteraction as d2, WorkflowAgentBackend as d3, WorkflowApi as d4, WorkflowApproval as d5, WorkflowApprovalSummary as d6, WorkflowArtifactRef as d7, WorkflowBudget as d8, WorkflowEvent as d9, WorkflowRun as dA, WorkflowRunState as dB, WorkflowRunStatus as dC, WorkflowSpawnAgentInput as dD, WorkflowSynthesis as dE, WorkflowSynthesizeInput as dF, WorkflowTaskHandle as dG, WorkflowTaskResult as dH, WorkflowTaskSnapshot as dI, WorkflowTaskStatus as dJ, WorkflowTaskSummaryEventUpdate as dK, WorkflowTaskSummaryKind as dL, WorkflowTaskSummaryUpdate as dM, WorkflowTaskUsage as dN, WorkflowTaskVerification as dO, WorkflowTaskVerificationResult as dP, WorkflowWaitOptions as dQ, WorkflowEventCorrelation as da, WorkflowEventType as dc, WorkflowIsolation as dd, WorkflowLimits as de, WorkflowLogEvent as df, WorkflowMeta as dg, WorkflowModelHint as dh, WorkflowModule as di, WorkflowParallelOptions as dj, WorkflowProcessArtifact as dk, WorkflowProcessCounts as dl, WorkflowProcessEvent as dm, WorkflowProcessItem as dn, WorkflowProcessItemKind as dp, WorkflowProcessItemOrigin as dq, WorkflowProcessItemStatus as dr, WorkflowProcessProgress as ds, WorkflowProcessSnapshot as dt, WorkflowProcessSource as du, WorkflowProcessStatus as dv, WorkflowProcessSummaryStatus as dw, WorkflowProcessTokenUsage as dx, WorkflowProcessTracker as dy, WorkflowProcessTrackerOptions 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 };
|