@kodax-ai/kodax 0.7.76 → 0.7.77
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 +595 -380
- package/LICENSE +158 -158
- package/README.md +1608 -1550
- package/README_CN.md +942 -896
- package/config-templates/config.example.jsonc +33 -33
- package/config-templates/integrations/a2a.example.jsonc +98 -98
- package/config-templates/integrations/extensions.example.jsonc +7 -7
- package/config-templates/integrations/mcp.example.jsonc +16 -16
- package/dist/builtin/code-review/SKILL.md +22 -22
- package/dist/builtin/skill-creator/scripts/aggregate-benchmark.d.ts +46 -46
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +46 -46
- package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +62 -62
- package/dist/builtin/skill-creator/scripts/generate-review.d.ts +33 -33
- package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +73 -73
- package/dist/builtin/skill-creator/scripts/improve-description.d.ts +23 -23
- package/dist/builtin/skill-creator/scripts/init-skill.d.ts +14 -14
- package/dist/builtin/skill-creator/scripts/install-skill.d.ts +29 -29
- package/dist/builtin/skill-creator/scripts/package-skill.d.ts +38 -38
- package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +8 -8
- package/dist/builtin/skill-creator/scripts/run-eval.d.ts +66 -66
- package/dist/builtin/skill-creator/scripts/run-loop.d.ts +49 -49
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.d.ts +58 -58
- package/dist/chunks/agent-NGSWFE73.js +2 -0
- package/dist/chunks/argument-completer-WGGZPEEO.js +2 -0
- package/dist/chunks/chunk-27QLRH3D.js +5 -0
- package/dist/chunks/chunk-2MQPVY6P.js +770 -0
- package/dist/chunks/chunk-3DD4QEBH.js +22 -0
- package/dist/chunks/chunk-6WAPVAGQ.js +74 -0
- package/dist/chunks/chunk-AOENDSVN.js +448 -0
- package/dist/chunks/{chunk-PXKSE54E.js → chunk-EH7AOMJ7.js} +1 -1
- package/dist/chunks/{chunk-SMT2JSM3.js → chunk-FNW2XUL5.js} +9 -9
- package/dist/chunks/chunk-FSXI4MAV.js +78 -0
- package/dist/chunks/{chunk-RDXRM3UI.js → chunk-HORNWBYR.js} +1 -1
- package/dist/chunks/chunk-HV2GMZUZ.js +343 -0
- package/dist/chunks/chunk-IQT4RPCE.js +46 -0
- package/dist/chunks/{chunk-4PWPNCNK.js → chunk-JS2BHGJP.js} +2 -2
- package/dist/chunks/chunk-OAMKECRG.js +381 -0
- package/dist/chunks/{chunk-HS3XHF3R.js → chunk-ON2WG2LG.js} +2 -2
- package/dist/chunks/{chunk-HGT6WQ24.js → chunk-RUGAAHTF.js} +17 -17
- package/dist/chunks/chunk-TGCG7U2W.js +37 -0
- package/dist/chunks/chunk-XSA37BVM.js +5 -0
- package/dist/chunks/compaction-config-BE7VYWH6.js +2 -0
- package/dist/chunks/{construction-bootstrap-5F5KF2BZ.js → construction-bootstrap-RPRL3L7R.js} +1 -1
- package/dist/chunks/dist-FDSOIR35.js +2 -0
- package/dist/chunks/dist-ZZBNVTKU.js +2 -0
- package/dist/chunks/host-QAKQVC4A.js +2 -0
- package/dist/chunks/run-manager-N4UFWA2D.js +2 -0
- package/dist/chunks/{utils-X3TEH6IO.js → utils-AUHCI4D5.js} +1 -1
- package/dist/index.d.ts +17 -16
- package/dist/index.js +2 -2
- package/dist/kodax_bootstrap.js +25 -25
- package/dist/kodax_cli.js +1276 -1229
- package/dist/provider-capabilities.json +392 -362
- package/dist/runtime-worker.js +1162 -1115
- package/dist/sdk-a2a.d.ts +12 -11
- package/dist/sdk-a2a.js +1 -1
- package/dist/sdk-agent.d.ts +56 -21
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +120 -21
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +14 -597
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +218 -6
- package/dist/sdk-llm.js +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 +15 -14
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-runtime.d.ts +34 -18
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-session.d.ts +7 -6
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +14 -14
- package/dist/types-chunks/{base.d-ChvpaKjZ.d.ts → base.d-4e74xDdy.d.ts} +13 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-r1beOESM.d.ts → bash-prefix-extractor.d-pZdu6qt7.d.ts} +197 -5
- package/dist/types-chunks/{capability-learning.d-DPrYxRjF.d.ts → capability-learning.d-CVsdHw4j.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-zeqV4IQX.d.ts → capsule.d-CxCm1KZz.d.ts} +2 -2
- package/dist/types-chunks/{commands.d-DUxnK2TU.d.ts → commands.d-BccESAMV.d.ts} +5 -5
- package/dist/types-chunks/{guardrail.d-qjuKJZ31.d.ts → guardrail.d-B0PwAZVR.d.ts} +3 -3
- package/dist/types-chunks/{guardrail.d-CWYD1bdL.d.ts → guardrail.d-CJx9RRd3.d.ts} +1 -1
- package/dist/types-chunks/{history-retrieval.d-BKTJIrVd.d.ts → history-retrieval.d-B__aEN62.d.ts} +2 -2
- package/dist/types-chunks/{public-api.d-CX4B11qY.d.ts → public-api.d--fF88JrC.d.ts} +3 -3
- package/dist/types-chunks/{run-manager.d-B9fEIjZk.d.ts → run-manager.d-B47hIqnI.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-B0fhAOPa.d.ts → sdk-session-CLWf8Adb.d.ts} +3 -3
- package/dist/types-chunks/{side-query.d-DWTMsndP.d.ts → side-query.d-5JvXhuOZ.d.ts} +22 -10
- package/dist/types-chunks/types-LanCEDj8.d.ts +623 -0
- package/dist/types-chunks/{types.d-DEctY20M.d.ts → types.d-CODuyyqy.d.ts} +2 -2
- package/dist/types-chunks/{types.d-Bm_y6YuM.d.ts → types.d-DCsKM8aT.d.ts} +4 -4
- package/dist/types-chunks/{types.d-CSmF0t0n.d.ts → types.d-DIpZJKUl.d.ts} +15 -0
- package/dist/types-chunks/{types.d-sRLugmjy.d.ts → types.d-RdWRfUEs.d.ts} +47 -4
- package/dist/types-chunks/{utils.d-D0wPxz8y.d.ts → utils.d-CDduqbFw.d.ts} +5 -5
- package/docs/SDK_EMBEDDER_GUIDE.md +197 -68
- package/package.json +2 -1
- package/scripts/kodax-bin.cjs +28 -28
- package/scripts/production-env.cjs +25 -25
- package/dist/chunks/agent-7X5CFET2.js +0 -2
- package/dist/chunks/argument-completer-3NHIKB4N.js +0 -2
- package/dist/chunks/chunk-7FJNLJLF.js +0 -369
- package/dist/chunks/chunk-COQYLD4U.js +0 -5
- package/dist/chunks/chunk-D3T24FJW.js +0 -78
- package/dist/chunks/chunk-EI4JBQKL.js +0 -46
- package/dist/chunks/chunk-IDCGNQ4H.js +0 -5
- package/dist/chunks/chunk-KAY2XLCP.js +0 -74
- package/dist/chunks/chunk-OD6LVXU6.js +0 -329
- package/dist/chunks/chunk-OSF3H4RR.js +0 -22
- package/dist/chunks/chunk-TGMBHGZO.js +0 -427
- package/dist/chunks/chunk-VWSLC2WO.js +0 -770
- package/dist/chunks/chunk-Y3AMP22L.js +0 -37
- package/dist/chunks/compaction-config-7J2XE35D.js +0 -2
- package/dist/chunks/dist-2RA7LSH3.js +0 -2
- package/dist/chunks/dist-URKXBOC6.js +0 -2
- package/dist/chunks/host-RKZ2OGFT.js +0 -2
- package/dist/chunks/run-manager-7RM4HEH6.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-DIpZJKUl.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Retry-After header parsing — FEATURE_130 (v0.7.36).
|
|
@@ -194,8 +194,18 @@ declare abstract class KodaXBaseProvider {
|
|
|
194
194
|
* layer sets it — matches third-party Anthropic-compat behavior.
|
|
195
195
|
*/
|
|
196
196
|
getEffectiveStrictThinkingSignature(model?: string): boolean;
|
|
197
|
+
/** Provider-level switch used by serializers for compatibility placeholders. */
|
|
198
|
+
getProviderSupportsThinking(): boolean;
|
|
197
199
|
protected getEffectiveThinkingBudgetCap(model?: string): number | undefined;
|
|
198
200
|
abstract stream(messages: KodaXMessage[], tools: KodaXToolDefinition[], system: string, reasoning?: boolean | KodaXReasoningRequest, streamOptions?: KodaXProviderStreamOptions, signal?: AbortSignal): Promise<KodaXStreamResult>;
|
|
201
|
+
/**
|
|
202
|
+
* Whether this Provider lowers `streamOptions.ephemeralSuffix` onto the wire.
|
|
203
|
+
* Runtime-registered Providers default to false so callers can fall back to a
|
|
204
|
+
* request-only message copy instead of silently dropping managed context.
|
|
205
|
+
*/
|
|
206
|
+
supportsEphemeralSuffix(): boolean;
|
|
207
|
+
/** Whether this configured transport lowers `promptCacheKey` onto its wire. */
|
|
208
|
+
usesPromptCacheAffinity(): boolean;
|
|
199
209
|
supportsNonStreamingFallback(): boolean;
|
|
200
210
|
complete(_messages: KodaXMessage[], _tools: KodaXToolDefinition[], _system: string, _reasoning?: boolean | KodaXReasoningRequest, _streamOptions?: KodaXProviderStreamOptions, _signal?: AbortSignal): Promise<KodaXStreamResult>;
|
|
201
211
|
isConfigured(): boolean;
|
|
@@ -220,6 +230,8 @@ declare abstract class KodaXBaseProvider {
|
|
|
220
230
|
getAvailableModels(): string[];
|
|
221
231
|
getModelDescriptor(modelId?: string): KodaXModelDescriptor | undefined;
|
|
222
232
|
protected getWireModelId(modelId?: string): string;
|
|
233
|
+
/** Exact model identifier serialized into native provider requests. */
|
|
234
|
+
getWireModel(modelId?: string): string;
|
|
223
235
|
getBaseUrl(): string | undefined;
|
|
224
236
|
getApiKeyEnv(): string;
|
|
225
237
|
getCapabilityProfile(): KodaXProviderCapabilityProfile;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { bs as KodaXGoalState, a8 as AgentMessage, dv as StopHookFn, bM as KodaXSessionLineage, k as AgentActorStore, aC as AgentTurnExecutor, t as AgentBudgetPort, h as AgentActorClient, N as AgentExecutionResult, V as AgentExecutorPlaneBinding, by as KodaXJsonValue, bm as KodaXExtensionSessionRecord, f as Agent, dS as WorkflowIsolation, bn as KodaXExtensionSessionState, bD as KodaXSessionArtifactLedgerEntry, df as SessionErrorMetadata, bU as KodaXSessionScope, bV as KodaXSessionStorage, cj as MemoryContextIdentity, cv as MemoryPack, aK as AskUserQuestionOptions, aG as AskUserAnswer, aI as AskUserMultiOptions, dP as WorkflowEventCorrelation, aT as CompactionUpdate, e4 as WorkflowProcessEvent, dO as WorkflowEvent, cJ as MemoryReviewPlan, bA as KodaXMemoryOutcomeDigest, bb as Guardrail, aY as DiscoveredInstance, bw as KodaXInputArtifact, cK as MemoryReviewRunner } from './types.d-
|
|
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-
|
|
1
|
+
import { bs as KodaXGoalState, a8 as AgentMessage, dv as StopHookFn, bM as KodaXSessionLineage, k as AgentActorStore, aC as AgentTurnExecutor, t as AgentBudgetPort, h as AgentActorClient, N as AgentExecutionResult, V as AgentExecutorPlaneBinding, by as KodaXJsonValue, bm as KodaXExtensionSessionRecord, f as Agent, dS as WorkflowIsolation, bn as KodaXExtensionSessionState, bD as KodaXSessionArtifactLedgerEntry, df as SessionErrorMetadata, bU as KodaXSessionScope, bV as KodaXSessionStorage, cj as MemoryContextIdentity, cv as MemoryPack, aK as AskUserQuestionOptions, aG as AskUserAnswer, aI as AskUserMultiOptions, dP as WorkflowEventCorrelation, aT as CompactionUpdate, e4 as WorkflowProcessEvent, dO as WorkflowEvent, cJ as MemoryReviewPlan, bA as KodaXMemoryOutcomeDigest, bb as Guardrail, aY as DiscoveredInstance, bw as KodaXInputArtifact, cK as MemoryReviewRunner } from './types.d-RdWRfUEs.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-DIpZJKUl.js';
|
|
3
3
|
import { d as SkillDynamicContextExecutor, I as ISkillRegistry } from './types.d-DCQVBqVn.js';
|
|
4
4
|
import { Diagnostic, Position, Location, Hover, DocumentSymbol, SymbolInformation, WorkspaceSymbol, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-protocol';
|
|
5
5
|
import { K as KodaXLlmTimeoutConfig, a as CostTracker } from './cost-tracker.d-BeaenODW.js';
|
|
6
|
+
import { t as MemoryRecallRunner } from './types-LanCEDj8.js';
|
|
6
7
|
import { C as CapabilityKind, f as CapabilitySearchSnapshot, b as CapabilityResult } from './capability.d-K664nHOS.js';
|
|
7
|
-
import { K as KodaXBaseProvider } from './base.d-
|
|
8
|
+
import { K as KodaXBaseProvider } from './base.d-4e74xDdy.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* FEATURE_192 v0.7.44 Phase C — Goal-tools execution context.
|
|
@@ -1113,6 +1114,10 @@ interface RuntimeContextBudgetSnapshot {
|
|
|
1113
1114
|
readonly sessionId?: string;
|
|
1114
1115
|
readonly runId?: string;
|
|
1115
1116
|
readonly turnId?: string;
|
|
1117
|
+
readonly contextId?: string;
|
|
1118
|
+
readonly contextKind?: 'root' | 'child';
|
|
1119
|
+
readonly parentContextId?: string;
|
|
1120
|
+
readonly agentId?: string;
|
|
1116
1121
|
readonly provider?: string;
|
|
1117
1122
|
readonly model?: string;
|
|
1118
1123
|
readonly profile: RuntimeContextOptimizationProfile;
|
|
@@ -1133,6 +1138,10 @@ interface RuntimeContextBudgetSnapshotInput {
|
|
|
1133
1138
|
readonly sessionId?: string;
|
|
1134
1139
|
readonly runId?: string;
|
|
1135
1140
|
readonly turnId?: string;
|
|
1141
|
+
readonly contextId?: string;
|
|
1142
|
+
readonly contextKind?: 'root' | 'child';
|
|
1143
|
+
readonly parentContextId?: string;
|
|
1144
|
+
readonly agentId?: string;
|
|
1136
1145
|
readonly provider?: string;
|
|
1137
1146
|
readonly model?: string;
|
|
1138
1147
|
readonly profile?: RuntimeContextOptimizationProfile;
|
|
@@ -1142,11 +1151,19 @@ interface RuntimeContextBudgetSnapshotInput {
|
|
|
1142
1151
|
readonly skillCatalogText?: string;
|
|
1143
1152
|
readonly mcpCatalogText?: string;
|
|
1144
1153
|
readonly messages?: readonly KodaXMessage[];
|
|
1154
|
+
readonly messageTokenBreakdown?: RuntimeContextBudgetMessageBreakdown;
|
|
1145
1155
|
readonly pendingInput?: string;
|
|
1146
1156
|
readonly recentToolResults?: readonly string[];
|
|
1147
1157
|
readonly reservedResponseTokens?: number;
|
|
1148
1158
|
readonly now?: () => Date;
|
|
1149
1159
|
}
|
|
1160
|
+
interface RuntimeContextBudgetMessageBreakdown {
|
|
1161
|
+
readonly transcript: number;
|
|
1162
|
+
readonly pendingInput: number;
|
|
1163
|
+
readonly recentToolResults: number;
|
|
1164
|
+
readonly skillCatalog: number;
|
|
1165
|
+
readonly mcpCatalog: number;
|
|
1166
|
+
}
|
|
1150
1167
|
declare function estimateToolSchemaTokens(definition: KodaXToolDefinition, descriptionOverride?: string): number;
|
|
1151
1168
|
declare function createRuntimeContextBudgetSnapshot(input: RuntimeContextBudgetSnapshotInput): RuntimeContextBudgetSnapshot;
|
|
1152
1169
|
|
|
@@ -1163,6 +1180,10 @@ interface RuntimeToolExposureDecision {
|
|
|
1163
1180
|
readonly modelVisible: boolean;
|
|
1164
1181
|
}
|
|
1165
1182
|
interface RuntimeToolExposurePlan {
|
|
1183
|
+
readonly contextId?: string;
|
|
1184
|
+
readonly contextKind?: 'root' | 'child';
|
|
1185
|
+
readonly parentContextId?: string;
|
|
1186
|
+
readonly agentId?: string;
|
|
1166
1187
|
readonly profile: RuntimeContextOptimizationProfile;
|
|
1167
1188
|
readonly reportOnly: boolean;
|
|
1168
1189
|
readonly pressure: RuntimeContextPressure;
|
|
@@ -1215,6 +1236,10 @@ interface CompactionSavingsDecision {
|
|
|
1215
1236
|
}
|
|
1216
1237
|
type CompactionSkipReason = 'low_savings_cooldown' | 'covered_context_unchanged';
|
|
1217
1238
|
interface RuntimeCompactionSkippedEvent {
|
|
1239
|
+
readonly contextId?: string;
|
|
1240
|
+
readonly contextKind?: 'root' | 'child';
|
|
1241
|
+
readonly parentContextId?: string;
|
|
1242
|
+
readonly agentId?: string;
|
|
1218
1243
|
readonly reason: CompactionSkipReason;
|
|
1219
1244
|
readonly currentTokens: number;
|
|
1220
1245
|
readonly contextWindow: number;
|
|
@@ -1685,6 +1710,9 @@ interface KodaXSidecarMessageEvent {
|
|
|
1685
1710
|
/** Exact actionable text from the sidecar. `budget-exhausted` means it was not injected. */
|
|
1686
1711
|
readonly content: string;
|
|
1687
1712
|
readonly suggestedFix?: string;
|
|
1713
|
+
readonly strategyReasonCode?: 'missing_requirement' | 'contradicted_evidence' | 'unsupported_claim' | 'unresolved_high_risk' | 'verification_degraded';
|
|
1714
|
+
readonly recommendedPattern?: 'classify-and-act' | 'fan-out-and-synthesize' | 'adversarial-verification' | 'generate-and-filter' | 'tournament' | 'loop-until-done';
|
|
1715
|
+
readonly targetEvidenceRefs?: readonly string[];
|
|
1688
1716
|
readonly trace?: string;
|
|
1689
1717
|
/**
|
|
1690
1718
|
* FEATURE_247 (R3/R8) — session id the verdict belongs to, so a host running
|
|
@@ -1708,6 +1736,55 @@ interface KodaXTodoDriftWarningEvent {
|
|
|
1708
1736
|
readonly firstPendingTodoId?: string;
|
|
1709
1737
|
readonly firstPendingTodoSubject?: string;
|
|
1710
1738
|
}
|
|
1739
|
+
interface KodaXPromptCacheDiagnosticEvent {
|
|
1740
|
+
readonly phase: 'request' | 'response';
|
|
1741
|
+
/** Provider API path used for this physical request. */
|
|
1742
|
+
readonly transport?: 'stream' | 'complete';
|
|
1743
|
+
readonly requestId: string;
|
|
1744
|
+
readonly requestedAt: string;
|
|
1745
|
+
readonly completedAt?: string;
|
|
1746
|
+
readonly provider: string;
|
|
1747
|
+
/** Stable logical Runtime context. Prompt/message text is never included. */
|
|
1748
|
+
readonly contextId?: string;
|
|
1749
|
+
readonly contextKind?: 'root' | 'child';
|
|
1750
|
+
readonly parentContextId?: string;
|
|
1751
|
+
readonly agentId?: string;
|
|
1752
|
+
/** Caller-facing model id selected for this request. */
|
|
1753
|
+
readonly model: string;
|
|
1754
|
+
/** Exact provider wire model after alias resolution. */
|
|
1755
|
+
readonly wireModel?: string;
|
|
1756
|
+
/** Hash of the caller-level reasoning controls; never contains prompt text. */
|
|
1757
|
+
readonly reasoningHash?: string;
|
|
1758
|
+
/** Effective output reservation sent for this adapter request. */
|
|
1759
|
+
readonly maxOutputTokens?: number;
|
|
1760
|
+
/** Whether KodaX explicit prompt-cache controls are enabled. */
|
|
1761
|
+
readonly kodaxPromptCacheEnabled?: boolean;
|
|
1762
|
+
/** Credential-free provider origin. */
|
|
1763
|
+
readonly endpoint?: string;
|
|
1764
|
+
/** Hash of the endpoint path, which may itself contain tenant credentials. */
|
|
1765
|
+
readonly endpointPathHash?: string;
|
|
1766
|
+
readonly attempt: number;
|
|
1767
|
+
readonly systemPromptHash: string;
|
|
1768
|
+
readonly toolSchemaHash: string;
|
|
1769
|
+
/** Hash of provider-visible messages before the current turn starts. */
|
|
1770
|
+
readonly messagePrefixHash: string;
|
|
1771
|
+
readonly messagePrefixCount: number;
|
|
1772
|
+
/** Hash of persistent provider-visible messages, excluding any ephemeral suffix. */
|
|
1773
|
+
readonly requestMessagesHash: string;
|
|
1774
|
+
/** Composite hash of system, tools, persistent messages, and ephemeral suffix. */
|
|
1775
|
+
readonly requestEnvelopeHash: string;
|
|
1776
|
+
/** Hash of provider-visible ephemeral request suffixes, when present. */
|
|
1777
|
+
readonly ephemeralSuffixHash?: string;
|
|
1778
|
+
/** Hash of the opaque affinity key when this Provider applies it on wire. */
|
|
1779
|
+
readonly promptCacheAffinityHash?: string;
|
|
1780
|
+
readonly messageCount: number;
|
|
1781
|
+
readonly toolCount: number;
|
|
1782
|
+
/** Provider-reported usage only. Missing fields remain undefined. */
|
|
1783
|
+
readonly inputTokens?: number;
|
|
1784
|
+
readonly outputTokens?: number;
|
|
1785
|
+
readonly cachedReadTokens?: number;
|
|
1786
|
+
readonly cachedWriteTokens?: number;
|
|
1787
|
+
}
|
|
1711
1788
|
interface KodaXEvents {
|
|
1712
1789
|
/** FEATURE_229: correlates child-agent SDK callbacks back to a workflow run/item. */
|
|
1713
1790
|
workflowCorrelation?: WorkflowEventCorrelation;
|
|
@@ -1839,6 +1916,11 @@ interface KodaXEvents {
|
|
|
1839
1916
|
onRepoIntelligenceTrace?: (event: KodaXRepoIntelligenceTraceEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1840
1917
|
/** Optional bounded context diagnostics. Emitted only when context.contextDiagnostics is true. */
|
|
1841
1918
|
onContextBudgetSnapshot?: (event: RuntimeContextBudgetSnapshot & Partial<KodaXLiveEventMeta>) => void;
|
|
1919
|
+
/**
|
|
1920
|
+
* Hash-only prompt-cache diagnostics; never contains prompt or message text.
|
|
1921
|
+
* Emitted only when context.contextDiagnostics is true.
|
|
1922
|
+
*/
|
|
1923
|
+
onPromptCacheDiagnostics?: (event: KodaXPromptCacheDiagnosticEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1842
1924
|
/** Optional bounded tool-exposure diagnostics. Emitted only when context.contextDiagnostics is true. */
|
|
1843
1925
|
onToolExposurePlanned?: (event: RuntimeToolExposurePlan & Partial<KodaXLiveEventMeta>) => void;
|
|
1844
1926
|
/** Optional bounded compaction-pressure diagnostics. Emitted only when context.contextDiagnostics is true. */
|
|
@@ -2222,6 +2304,11 @@ interface KodaXChildContextBundle {
|
|
|
2222
2304
|
* one bounded repair turn) and surfaces it on `KodaXChildAgentResult.structured`.
|
|
2223
2305
|
*/
|
|
2224
2306
|
outputSchema?: unknown;
|
|
2307
|
+
/**
|
|
2308
|
+
* Runtime-only fixed AMA result contract. Unlike Workflow outputSchema,
|
|
2309
|
+
* invalid output is parse-only and never starts a repair model turn.
|
|
2310
|
+
*/
|
|
2311
|
+
structuredOutputContract?: 'pattern-disposition-parse-only';
|
|
2225
2312
|
/** Trusted host provenance plus the generated script's terse-result declaration. */
|
|
2226
2313
|
workflowOutputContract?: {
|
|
2227
2314
|
readonly kodaxAuthored: boolean;
|
|
@@ -2599,6 +2686,49 @@ interface KodaXManagedWorkBudget {
|
|
|
2599
2686
|
upgradeCeiling?: KodaXHarnessProfile;
|
|
2600
2687
|
lastApprovalBudgetTotal?: number;
|
|
2601
2688
|
}
|
|
2689
|
+
type KodaXShellKind = 'pwsh' | 'powershell' | 'cmd' | 'bash' | 'zsh';
|
|
2690
|
+
type KodaXShellProfileMode = 'default' | 'none' | 'login' | 'interactive' | 'login-interactive';
|
|
2691
|
+
/**
|
|
2692
|
+
* Host-owned, JSON-serializable shell execution policy.
|
|
2693
|
+
*
|
|
2694
|
+
* The contract is opt-in. When absent, command execution keeps the legacy
|
|
2695
|
+
* platform-shell/process.env behavior. When present, KodaX resolves a
|
|
2696
|
+
* credential-filtered environment through this shell in the effective cwd,
|
|
2697
|
+
* then executes the command with the same explicit interpreter.
|
|
2698
|
+
*/
|
|
2699
|
+
interface KodaXShellExecutionContract {
|
|
2700
|
+
readonly version: 1;
|
|
2701
|
+
readonly shell: {
|
|
2702
|
+
readonly kind: KodaXShellKind;
|
|
2703
|
+
/** Absolute path is recommended; a bare name is resolved from sanitized PATH. */
|
|
2704
|
+
readonly executable?: string;
|
|
2705
|
+
/** Trusted fixed arguments inserted before KodaX's generated command flag. */
|
|
2706
|
+
readonly args?: readonly string[];
|
|
2707
|
+
readonly profile?: KodaXShellProfileMode;
|
|
2708
|
+
};
|
|
2709
|
+
readonly environment?: {
|
|
2710
|
+
/** `filtered` keeps non-sensitive daemon variables; `none` keeps only OS bootstrap variables. */
|
|
2711
|
+
readonly inherit?: 'filtered' | 'none';
|
|
2712
|
+
/** Trusted, non-secret variables added before profile resolution. */
|
|
2713
|
+
readonly set?: Readonly<Record<string, string>>;
|
|
2714
|
+
/** Additional glob-style variable-name denies. Built-in credential denies are immutable. */
|
|
2715
|
+
readonly denyPatterns?: readonly string[];
|
|
2716
|
+
/**
|
|
2717
|
+
* Trusted shell code run after profile loading and before environment
|
|
2718
|
+
* capture. Directory-aware version-manager activation belongs here.
|
|
2719
|
+
*/
|
|
2720
|
+
readonly setup?: string;
|
|
2721
|
+
/** Windows-only PATH source. `registry` re-reads current Machine/User PATH. */
|
|
2722
|
+
readonly windowsPath?: 'process' | 'registry';
|
|
2723
|
+
};
|
|
2724
|
+
readonly cache?: {
|
|
2725
|
+
/** Strict environment-cache lifetime. Zero disables caching. */
|
|
2726
|
+
readonly ttlMs?: number;
|
|
2727
|
+
/** Changing this JSON scalar explicitly invalidates an existing cache entry. */
|
|
2728
|
+
readonly refreshToken?: string | number;
|
|
2729
|
+
};
|
|
2730
|
+
readonly probeTimeoutMs?: number;
|
|
2731
|
+
}
|
|
2602
2732
|
interface KodaXContextOptions {
|
|
2603
2733
|
/** Runtime-internal shared work ledger inherited by every descendant Agent run. */
|
|
2604
2734
|
managedWorkBudget?: KodaXManagedWorkBudget;
|
|
@@ -2608,10 +2738,44 @@ interface KodaXContextOptions {
|
|
|
2608
2738
|
memoryPack?: MemoryPack;
|
|
2609
2739
|
/** Runtime-minted collaboration principal for this actor execution. */
|
|
2610
2740
|
actorControl?: AgentActorClient;
|
|
2741
|
+
/**
|
|
2742
|
+
* Exact MessageQueue route for the Actor execution. Actor children keep
|
|
2743
|
+
* independent transcript session ids, so their collaboration mailbox cannot
|
|
2744
|
+
* be derived from the child run's session id.
|
|
2745
|
+
*
|
|
2746
|
+
* @internal
|
|
2747
|
+
*/
|
|
2748
|
+
actorQueueAgentId?: string;
|
|
2749
|
+
/**
|
|
2750
|
+
* Stable logical Session namespace used only for context identity. Child
|
|
2751
|
+
* transcripts remain isolated under their physical worker Session ids.
|
|
2752
|
+
*
|
|
2753
|
+
* @internal
|
|
2754
|
+
*/
|
|
2755
|
+
contextIdentitySessionId?: string;
|
|
2756
|
+
/**
|
|
2757
|
+
* Whether compaction in this physical run owns the canonical context
|
|
2758
|
+
* revision. Synthetic digest/repair requests share attribution but not
|
|
2759
|
+
* canonical history ownership.
|
|
2760
|
+
*
|
|
2761
|
+
* @internal
|
|
2762
|
+
*/
|
|
2763
|
+
ownsContextRevision?: boolean;
|
|
2611
2764
|
/** Trusted host operations that are intentionally absent from model-facing clients. */
|
|
2612
2765
|
actorHost?: KodaXActorHost;
|
|
2613
2766
|
/** Runtime-owned session Actor tree; attached when a root run builds its tool context. */
|
|
2614
2767
|
actorSession?: CodingActorSession;
|
|
2768
|
+
/**
|
|
2769
|
+
* Runtime-owned admission window for interrupt input targeted at the active
|
|
2770
|
+
* run. Its presence opts the managed Runner into consuming already-accepted
|
|
2771
|
+
* input before a terminal candidate is allowed to complete.
|
|
2772
|
+
*
|
|
2773
|
+
* @internal
|
|
2774
|
+
*/
|
|
2775
|
+
interruptInput?: {
|
|
2776
|
+
closeInputWindow(): void;
|
|
2777
|
+
reopenInputWindow(): void;
|
|
2778
|
+
};
|
|
2615
2779
|
/** Host attribution for an explicit Workflow command, SDK request, or natural-language product word. */
|
|
2616
2780
|
workflowIntent?: 'explicit';
|
|
2617
2781
|
/** Project root used for project-scoped prompts, permissions, and path policy. */
|
|
@@ -2621,6 +2785,8 @@ interface KodaXContextOptions {
|
|
|
2621
2785
|
* and shell execution. Defaults to `gitRoot`, then `process.cwd()`.
|
|
2622
2786
|
*/
|
|
2623
2787
|
executionCwd?: string;
|
|
2788
|
+
/** Optional host-owned shell/environment resolution policy for command tools. */
|
|
2789
|
+
shellExecution?: KodaXShellExecutionContract;
|
|
2624
2790
|
/** Fail-closed host policy applied to every concrete file a read tool opens. */
|
|
2625
2791
|
assertReadablePath?: (candidate: string) => void;
|
|
2626
2792
|
/**
|
|
@@ -2854,6 +3020,8 @@ interface KodaXOptions {
|
|
|
2854
3020
|
context?: KodaXContextOptions;
|
|
2855
3021
|
events?: KodaXEvents;
|
|
2856
3022
|
memoryReviewer?: MemoryReviewRunner;
|
|
3023
|
+
/** Optional host-owned semantic selector for sparse governed memory interventions. */
|
|
3024
|
+
memoryRecallRunner?: MemoryRecallRunner;
|
|
2857
3025
|
extensionRuntime?: ExtensionRuntimeContract;
|
|
2858
3026
|
/** FEATURE_229: host-owned policy for workflow auto-start and ceilings. */
|
|
2859
3027
|
workflowHostPolicy?: WorkflowHostPolicy;
|
|
@@ -3118,6 +3286,9 @@ interface KodaXManagedVerdictPayload {
|
|
|
3118
3286
|
nextHarness?: KodaXTaskRoutingDecision['harnessProfile'];
|
|
3119
3287
|
protocolParseFailed?: boolean;
|
|
3120
3288
|
verificationDegraded?: boolean;
|
|
3289
|
+
strategyReasonCode?: 'missing_requirement' | 'contradicted_evidence' | 'unsupported_claim' | 'unresolved_high_risk' | 'verification_degraded';
|
|
3290
|
+
recommendedPattern?: 'classify-and-act' | 'fan-out-and-synthesize' | 'adversarial-verification' | 'generate-and-filter' | 'tournament' | 'loop-until-done';
|
|
3291
|
+
targetEvidenceRefs?: string[];
|
|
3121
3292
|
preferredFallbackWorkerId?: string;
|
|
3122
3293
|
/**
|
|
3123
3294
|
* v0.7.26 Risk-3 fix — Evaluator explicit budget-extension request.
|
|
@@ -3198,6 +3369,15 @@ interface KodaXToolExecutionContext {
|
|
|
3198
3369
|
backups: Map<string, string>;
|
|
3199
3370
|
/** Runtime-minted collaboration principal; model inputs cannot replace its caller path. */
|
|
3200
3371
|
actorControl?: AgentActorClient;
|
|
3372
|
+
/** Runtime-minted MessageQueue route for this Actor's collaboration mailbox. */
|
|
3373
|
+
actorQueueAgentId?: string;
|
|
3374
|
+
/** Stable logical Session namespace used for child context identity. */
|
|
3375
|
+
contextIdentitySessionId?: string;
|
|
3376
|
+
/** Runtime-minted exact Actor/Turn owner for collaboration metadata. */
|
|
3377
|
+
actorTurnRef?: {
|
|
3378
|
+
readonly actorPath: string;
|
|
3379
|
+
readonly turnId: string;
|
|
3380
|
+
};
|
|
3201
3381
|
/** Shared root-run work ledger; descendant runtimes retain this exact object. */
|
|
3202
3382
|
managedWorkBudget?: KodaXManagedWorkBudget;
|
|
3203
3383
|
/** Trusted host operations that are intentionally absent from model-facing clients. */
|
|
@@ -3251,6 +3431,15 @@ interface KodaXToolExecutionContext {
|
|
|
3251
3431
|
skillScriptRunner?: KodaXSkillScriptRunner;
|
|
3252
3432
|
/** Working directory used to resolve relative paths and execute shell commands. */
|
|
3253
3433
|
executionCwd?: string;
|
|
3434
|
+
/** Validated shell execution policy inherited by native child runtimes. */
|
|
3435
|
+
shellExecution?: KodaXShellExecutionContract;
|
|
3436
|
+
/**
|
|
3437
|
+
* Exact credential variable names owned by registered Providers.
|
|
3438
|
+
* Used only to remove non-standard `apiKeyEnv` names from child processes.
|
|
3439
|
+
*
|
|
3440
|
+
* @internal
|
|
3441
|
+
*/
|
|
3442
|
+
providerCredentialEnvironmentNames?: readonly string[];
|
|
3254
3443
|
/** Fail-closed host policy applied to every concrete file a read tool opens. */
|
|
3255
3444
|
assertReadablePath?: (candidate: string) => void;
|
|
3256
3445
|
/** Host tool visibility ceiling inherited by child agents. */
|
|
@@ -3330,6 +3519,9 @@ interface KodaXToolExecutionContext {
|
|
|
3330
3519
|
readonly repoIntelligenceMode?: KodaXRepoIntelligenceMode;
|
|
3331
3520
|
readonly repoIntelligenceTrace?: boolean;
|
|
3332
3521
|
readonly compaction?: Readonly<KodaXCompactionOverride>;
|
|
3522
|
+
readonly contextDiagnostics?: boolean;
|
|
3523
|
+
readonly disablePromptCache?: boolean;
|
|
3524
|
+
readonly shellExecution?: KodaXShellExecutionContract;
|
|
3333
3525
|
};
|
|
3334
3526
|
/** Parent SDK/REPL callback surface used to preserve nested Agent telemetry. */
|
|
3335
3527
|
parentEvents?: KodaXEvents;
|
|
@@ -3689,5 +3881,5 @@ interface CreateBashPrefixExtractorOptions {
|
|
|
3689
3881
|
*/
|
|
3690
3882
|
declare function createBashPrefixExtractor(opts: CreateBashPrefixExtractorOptions): BashPrefixExtractor;
|
|
3691
3883
|
|
|
3692
|
-
export { ALWAYS_RESIDENT_TOOL_NAMES as A, BASH_POLICY_SPEC as B, LSP_SERVERS as
|
|
3693
|
-
export type { KodaXManualTopicInput as $, CapabilityRuntimeContract as C, DiagnosticsRequest as D, ExtensionRuntimeContract as E, FailureStage as F, GoalBlockedResult as G, KodaXChildContextBundle as H, KodaXChildExecutionResult as I, KodaXCompactionOverride as J, KodaXActivityEventMeta as K, KodaXContextCompactionFinishedEvent as L, KodaXContextIdentity as M, KodaXContextOptions as N, KodaXContextTokenSnapshot as O, KodaXEffectiveTaskConfig as P, KodaXEvents as Q, KodaXLiveEventMeta as R, KodaXManagedBudgetSnapshot as S, KodaXManagedProtocolPayload as T, KodaXManagedTask as U, KodaXManagedTaskRuntimeState as V, KodaXManagedTaskStatusEvent as W, KodaXManualIndexTopic as X, KodaXManualSource as Y, KodaXManualTopic as Z, KodaXManualTopicId as _, BashPrefixExtractor as a,
|
|
3884
|
+
export { ALWAYS_RESIDENT_TOOL_NAMES as A, BASH_POLICY_SPEC as B, LSP_SERVERS as aW, LspService as aY, buildGoalRuntimeBinding as bC, consumeCompactionCooldown as bD, createBashPrefixExtractor as bE, createCompactionAntiThrashState as bF, createExternalActorTurnExecutor as bG, createLocalCodingActorControl as bH, createRuntimeContextBudgetSnapshot as bI, decideWorkflowInvocation as bJ, drainPendingSwaps as bK, estimateToolSchemaTokens as bL, extractCommandPrefix as bM, getDefaultLspService as bN, hasExplicitNaturalLanguageWorkflowIntent as bO, hasPendingSwap as bP, makeDisabledGoalToolsContext as bQ, normalizeKodaXAgentMode as bR, planToolExposure as bS, providerResilienceConfigFromTimeouts as bT, recordCompactionSavings as bU, resolveConstructedAgent as bV, shouldSkipLlmCompaction as bW, shutdownDefaultLspService as bX, withGoalBeforeNextTurn as bY, withGoalStopHook as bZ, workflowStartOutcomeConsumesTurn as b_, CodingActorSession as d };
|
|
3885
|
+
export type { KodaXManualTopicInput as $, CapabilityRuntimeContract as C, DiagnosticsRequest as D, ExtensionRuntimeContract as E, FailureStage as F, GoalBlockedResult as G, KodaXChildContextBundle as H, KodaXChildExecutionResult as I, KodaXCompactionOverride as J, KodaXActivityEventMeta as K, KodaXContextCompactionFinishedEvent as L, KodaXContextIdentity as M, KodaXContextOptions as N, KodaXContextTokenSnapshot as O, KodaXEffectiveTaskConfig as P, KodaXEvents as Q, KodaXLiveEventMeta as R, KodaXManagedBudgetSnapshot as S, KodaXManagedProtocolPayload as T, KodaXManagedTask as U, KodaXManagedTaskRuntimeState as V, KodaXManagedTaskStatusEvent as W, KodaXManualIndexTopic as X, KodaXManualSource as Y, KodaXManualTopic as Z, KodaXManualTopicId as _, BashPrefixExtractor as a, ProviderRecoveryEvent as a$, KodaXMemoryStrategy as a0, KodaXOptions as a1, KodaXOrchestrationVerdict as a2, KodaXParentReductionContract as a3, KodaXPromptCacheDiagnosticEvent as a4, KodaXProviderPolicyHints as a5, KodaXRepoIntelligenceCapability as a6, KodaXRepoIntelligenceMode as a7, KodaXRepoIntelligenceResolvedMode as a8, KodaXRepoIntelligenceTrace as a9, KodaXTaskRole as aA, KodaXTaskRoleAssignment as aB, KodaXTaskStatus as aC, KodaXTaskSurface as aD, KodaXTaskToolPolicy as aE, KodaXTaskVerificationContract as aF, KodaXTaskVerificationCriterion as aG, KodaXTaskWorkItem as aH, KodaXTimeoutConfig as aI, KodaXToolEventMeta as aJ, KodaXToolExecutionContext as aK, KodaXToolVisibilityMeta as aL, KodaXToolVisibilityPolicy as aM, KodaXTurnCompletedEvent as aN, KodaXTurnDeliveryKind as aO, KodaXTurnFailedEvent as aP, KodaXTurnStartedEvent as aQ, KodaXVerificationScorecard as aR, KodaXVerificationScorecardCriterion as aS, KodaXWorkflowAgentDigestEvent as aT, KodaXWorkflowEventMeta as aU, KodaXWorkflowTimeoutConfig as aV, LspServerInfo as aX, LspServiceConfig as aZ, ProviderExecutionState as a_, KodaXRepoIntelligenceTraceEvent as aa, KodaXRepoRoutingSignals as ab, KodaXResult as ac, KodaXRoleRoundSummary as ad, KodaXRuntimeVerificationContract as ae, KodaXSelfManualConfig as af, KodaXSessionControl as ag, KodaXSessionMutators as ah, KodaXSessionOptions as ai, KodaXShellExecutionContract as aj, KodaXShellKind as ak, KodaXShellProfileMode as al, KodaXSidecarMessageEvent as am, KodaXSkillDynamicContextPolicy as an, KodaXSkillInvocationContext as ao, KodaXSkillMap as ap, KodaXSkillProjectionConfidence as aq, KodaXSkillScriptInputFile as ar, KodaXSkillScriptOutputFile as as, KodaXSkillScriptRunInput as at, KodaXSkillScriptRunner as au, KodaXTaskCapabilityHint as av, KodaXTaskContract as aw, KodaXTaskEvidenceArtifact as ax, KodaXTaskEvidenceBundle as ay, KodaXTaskEvidenceEntry as az, BashPrefixResult as b, ProviderResilienceConfig as b0, ProviderResiliencePolicy as b1, RecoveryAction as b2, RecoveryDecision as b3, RecoveryLadderStep as b4, RecoveryResult as b5, ResilienceClassification as b6, ResilienceErrorClass as b7, ResolveKodaXManualInput as b8, ResolveKodaXManualOptions as b9, WorkflowToolHostResult as bA, WorkflowToolHostStartResult as bB, ResolveKodaXManualResult as ba, RuntimeCompactionSkippedEvent as bb, RuntimeContextBudgetBreakdown as bc, RuntimeContextBudgetRecommendation as bd, RuntimeContextBudgetSnapshot as be, RuntimeContextBudgetSnapshotInput as bf, RuntimeContextOptimizationProfile as bg, RuntimeContextPressure as bh, RuntimeDefaultsSnapshot as bi, RuntimeToolExposureDecision as bj, RuntimeToolExposureMode as bk, RuntimeToolExposurePlan as bl, RuntimeToolExposurePlanInput as bm, RuntimeToolExposureReason as bn, TodoItem as bo, TodoList as bp, TodoStatus as bq, ToolSideEffect as br, WorkflowHostPolicy as bs, WorkflowInvocationAction as bt, WorkflowInvocationPolicyDecision as bu, WorkflowInvocationPolicyInput as bv, WorkflowInvocationSource as bw, WorkflowStartOutcome as bx, WorkflowToolHost as by, WorkflowToolHostInlineInput as bz, BoundExtensionRuntimeController as c, CodingActorSessionOptions as e, CompactionAntiThrashConfig as f, CompactionAntiThrashState as g, CompactionSavingsDecision as h, CompactionSavingsSample as i, CompactionSkipReason as j, CreateBashPrefixExtractorOptions as k, ExtractCommandPrefixOptions as l, GoalCompleteResult as m, GoalCreateInput as n, GoalLifecycleContext as o, GoalRuntimeBinding as p, GoalRuntimeBindingDeps as q, GoalToolsContext as r, KodaXActorHost as s, KodaXAgentMode as t, KodaXAgentProfile as u, KodaXAgentScope as v, KodaXBudgetDisclosureZone as w, KodaXBudgetExtensionRequest as x, KodaXCanonicalAgentMode as y, KodaXChildAgentResult as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as KodaXMessage } from './types.d-
|
|
2
|
-
import { a8 as AgentMessage, de as SessionEntry, dc as Session, dg as SessionExtension, bM as KodaXSessionLineage, by as KodaXJsonValue, aP as CompactionDetails, bl as KodaXCompactMemorySeed, bI as KodaXSessionEntry, bW as KodaXSessionTreeNode, bL as KodaXSessionLabelEntry, bK as KodaXSessionGoalEntry, bF as KodaXSessionClientNoticeEntry, bS as KodaXSessionRewindMarkerEntry, bN as KodaXSessionMemoryOutcomeDigestEntry, bO as KodaXSessionMemoryReviewReceiptEntry, bR as KodaXSessionNavigationOptions, bD as KodaXSessionArtifactLedgerEntry, b9 as FileOperations, dV as WorkflowMeta, dW as WorkflowModelHint, dX as WorkflowModule } from './types.d-
|
|
1
|
+
import { k as KodaXMessage } from './types.d-DIpZJKUl.js';
|
|
2
|
+
import { a8 as AgentMessage, de as SessionEntry, dc as Session, dg as SessionExtension, bM as KodaXSessionLineage, by as KodaXJsonValue, aP as CompactionDetails, bl as KodaXCompactMemorySeed, bI as KodaXSessionEntry, bW as KodaXSessionTreeNode, bL as KodaXSessionLabelEntry, bK as KodaXSessionGoalEntry, bF as KodaXSessionClientNoticeEntry, bS as KodaXSessionRewindMarkerEntry, bN as KodaXSessionMemoryOutcomeDigestEntry, bO as KodaXSessionMemoryReviewReceiptEntry, bR as KodaXSessionNavigationOptions, bD as KodaXSessionArtifactLedgerEntry, b9 as FileOperations, dV as WorkflowMeta, dW as WorkflowModelHint, dX as WorkflowModule } from './types.d-RdWRfUEs.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @kodax-ai/agent Constants
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { X as SessionStorage$1, R as PermissionMode, L as LearningBinding } from './public-api.d
|
|
2
|
-
import { a1 as KodaXOptions,
|
|
3
|
-
import { n as ResolvedAutoModeSettings, p 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-
|
|
4
|
-
import { bV as KodaXSessionStorage, bH as KodaXSessionData } from './types.d-
|
|
5
|
-
import { r as AutoModeStats } from './guardrail.d-
|
|
1
|
+
import { X as SessionStorage$1, R as PermissionMode, L as LearningBinding } from './public-api.d--fF88JrC.js';
|
|
2
|
+
import { a1 as KodaXOptions, ac as KodaXResult } from './bash-prefix-extractor.d-pZdu6qt7.js';
|
|
3
|
+
import { n as ResolvedAutoModeSettings, p 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-CDduqbFw.js';
|
|
4
|
+
import { bV as KodaXSessionStorage, bH as KodaXSessionData } from './types.d-RdWRfUEs.js';
|
|
5
|
+
import { r as AutoModeStats } from './guardrail.d-B0PwAZVR.js';
|
|
6
6
|
|
|
7
7
|
interface ReplRuntimePermissionGrantSuggestion {
|
|
8
8
|
readonly id: string;
|
|
@@ -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-
|
|
2
|
+
import { K as KodaXBaseProvider } from './base.d-4e74xDdy.js';
|
|
3
3
|
import { a as CostTracker } from './cost-tracker.d-BeaenODW.js';
|
|
4
|
-
import { d6 as RunnerToolCall } from './types.d-
|
|
5
|
-
import { d as ToolGuardrail } from './guardrail.d-
|
|
4
|
+
import { d6 as RunnerToolCall } from './types.d-RdWRfUEs.js';
|
|
5
|
+
import { d as ToolGuardrail } from './guardrail.d-CJx9RRd3.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* FEATURE_200 Phase F (v0.7.45) — MCP domain types extracted from types.ts.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bb as Guardrail, d6 as RunnerToolCall, f as Agent, a8 as AgentMessage, d9 as RunnerToolResult, dk as Span } from './types.d-
|
|
1
|
+
import { bb as Guardrail, d6 as RunnerToolCall, f as Agent, a8 as AgentMessage, d9 as RunnerToolResult, dk as Span } from './types.d-RdWRfUEs.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Guardrail Runtime — FEATURE_085 (v0.7.26).
|
package/dist/types-chunks/{history-retrieval.d-BKTJIrVd.d.ts → history-retrieval.d-B__aEN62.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as KodaXMessage } from './types.d-
|
|
2
|
-
import { bM as KodaXSessionLineage } from './types.d-
|
|
1
|
+
import { k as KodaXMessage } from './types.d-DIpZJKUl.js';
|
|
2
|
+
import { bM as KodaXSessionLineage } from './types.d-RdWRfUEs.js';
|
|
3
3
|
|
|
4
4
|
type KodaXSessionHistoryScope = 'compacted' | 'all';
|
|
5
5
|
type KodaXSessionHistorySource = 'user' | 'assistant' | 'system' | 'tool' | 'child_task';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as BashPrefixExtractor, t as KodaXAgentMode } from './bash-prefix-extractor.d-
|
|
2
|
-
import { F as KodaXReasoningMode, k as KodaXMessage, S as KodaXTaskResultMetadata } from './types.d-
|
|
1
|
+
import { a as BashPrefixExtractor, t as KodaXAgentMode } from './bash-prefix-extractor.d-pZdu6qt7.js';
|
|
2
|
+
import { F as KodaXReasoningMode, k as KodaXMessage, S as KodaXTaskResultMetadata } from './types.d-DIpZJKUl.js';
|
|
3
3
|
import { p as LearningSurfaceSnapshot$1, n as LearningQuery, m as LearningPage, b as LearnedCapabilityRecord, j as LearningEvent, o as LearningSubscribeOptions } from './center-types.d-BBT122uJ.js';
|
|
4
|
-
import { bH as KodaXSessionData, bM as KodaXSessionLineage, bR as KodaXSessionNavigationOptions, bT as KodaXSessionRuntimeInfo, bV as KodaXSessionStorage, i as AgentActorSnapshot, aQ as CompactionReport, by as KodaXJsonValue } from './types.d-
|
|
4
|
+
import { bH as KodaXSessionData, bM as KodaXSessionLineage, bR as KodaXSessionNavigationOptions, bT as KodaXSessionRuntimeInfo, bV as KodaXSessionStorage, i as AgentActorSnapshot, aQ as CompactionReport, by as KodaXJsonValue } from './types.d-RdWRfUEs.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* TextBuffer - Text buffer management class - 文本缓冲区管理类
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { eg as WorkflowProcessTrackerOptions, dO as WorkflowEvent, ea as WorkflowProcessSnapshot, e4 as WorkflowProcessEvent } from './types.d-
|
|
1
|
+
import { eg as WorkflowProcessTrackerOptions, dO as WorkflowEvent, ea as WorkflowProcessSnapshot, e4 as WorkflowProcessEvent } from './types.d-RdWRfUEs.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* FEATURE_246 Part A0 (ADR-046) — neutral workflow run lifecycle manager.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as CreatableHistoryItem, a8 as ToolCall } from './public-api.d
|
|
2
|
-
import { k as KodaXMessage, c as KodaXContentBlock } from './types.d-
|
|
3
|
-
import { bX as KodaXSessionUiHistoryItem, b$ as KodaXSessionUiToolCall } from './types.d-
|
|
1
|
+
import { g as CreatableHistoryItem, a8 as ToolCall } from './public-api.d--fF88JrC.js';
|
|
2
|
+
import { k as KodaXMessage, c as KodaXContentBlock } from './types.d-DIpZJKUl.js';
|
|
3
|
+
import { bX as KodaXSessionUiHistoryItem, b$ as KodaXSessionUiToolCall } from './types.d-RdWRfUEs.js';
|
|
4
4
|
|
|
5
5
|
interface RestoreHistoryItemsFromSessionInput {
|
|
6
6
|
messages: readonly KodaXMessage[];
|
|
@@ -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, a0 as KodaXTokenUsage } 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, a0 as KodaXTokenUsage } from './types.d-DIpZJKUl.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-4e74xDdy.js';
|
|
4
4
|
import OpenAI from 'openai';
|
|
5
5
|
import { a as CostTracker } from './cost-tracker.d-BeaenODW.js';
|
|
6
6
|
|
|
@@ -203,7 +203,6 @@ declare abstract class KodaXAnthropicCompatProvider extends KodaXBaseProvider {
|
|
|
203
203
|
* startup (e.g. bridged from `config.json`). A plain `||` would let the env
|
|
204
204
|
* win in that re-enable case, breaking the documented SDK > env precedence.
|
|
205
205
|
*/
|
|
206
|
-
private isPromptCacheDisabled;
|
|
207
206
|
protected applyCacheControlToSystem(systemText: string): string | Anthropic.Messages.TextBlockParam[];
|
|
208
207
|
/**
|
|
209
208
|
* FEATURE_116 (v0.7.37) — Mark the last tool definition as the cache
|
|
@@ -221,12 +220,12 @@ declare abstract class KodaXAnthropicCompatProvider extends KodaXBaseProvider {
|
|
|
221
220
|
* applyCacheControlToTools); without a message-level breakpoint the whole
|
|
222
221
|
* growing transcript is re-billed as uncached input every turn.
|
|
223
222
|
*
|
|
224
|
-
* Strategy: mark the LAST content block of the
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
223
|
+
* Strategy: mark the LAST content block of the latest `user` message.
|
|
224
|
+
* Anthropic writes the whole prefix through that breakpoint. On the next
|
|
225
|
+
* request its lookback can match the previous turn's write even though the
|
|
226
|
+
* breakpoint has advanced to the new current turn. This also lets a
|
|
227
|
+
* single-call run seed the cache for the next run. Total
|
|
228
|
+
* breakpoints stay at 3 (≤ Anthropic's limit of 4).
|
|
230
229
|
*
|
|
231
230
|
* Only anthropic-compat providers reach this path; OpenAI/ACP strip cache
|
|
232
231
|
* markers and rely on upstream automatic prefix caching. Escape hatch:
|
|
@@ -235,6 +234,7 @@ declare abstract class KodaXAnthropicCompatProvider extends KodaXBaseProvider {
|
|
|
235
234
|
* Returns a new array; never mutates input.
|
|
236
235
|
*/
|
|
237
236
|
protected applyCacheControlToMessages(messages: Anthropic.Messages.MessageParam[]): Anthropic.Messages.MessageParam[];
|
|
237
|
+
supportsEphemeralSuffix(): boolean;
|
|
238
238
|
stream(messages: KodaXMessage[], tools: KodaXToolDefinition[], system: string, reasoning?: boolean | KodaXReasoningRequest, streamOptions?: KodaXProviderStreamOptions, signal?: AbortSignal): Promise<KodaXStreamResult>;
|
|
239
239
|
supportsNonStreamingFallback(): boolean;
|
|
240
240
|
complete(messages: KodaXMessage[], tools: KodaXToolDefinition[], system: string, reasoning?: boolean | KodaXReasoningRequest, streamOptions?: KodaXProviderStreamOptions, signal?: AbortSignal): Promise<KodaXStreamResult>;
|
|
@@ -272,6 +272,7 @@ declare abstract class KodaXOpenAICompatProvider extends KodaXBaseProvider {
|
|
|
272
272
|
readonly supportsThinking = true;
|
|
273
273
|
protected abstract readonly config: KodaXProviderConfig;
|
|
274
274
|
private _client?;
|
|
275
|
+
supportsEphemeralSuffix(): boolean;
|
|
275
276
|
/**
|
|
276
277
|
* The SDK client is built lazily on first use. Constructing it requires the
|
|
277
278
|
* API key (`getApiKey()` throws when the env var is unset), so deferring it
|
|
@@ -573,6 +574,7 @@ declare function registerModelProvider(name: string, factory: ModelProviderFacto
|
|
|
573
574
|
declare function getRuntimeModelProvider(name: string): KodaXBaseProvider | undefined;
|
|
574
575
|
declare function isRuntimeModelProviderName(name: string): boolean;
|
|
575
576
|
declare function getRuntimeModelProviderNames(): string[];
|
|
577
|
+
declare function getRuntimeModelProviderCredentialEnvironmentNames(): string[];
|
|
576
578
|
declare function clearRuntimeModelProviders(): void;
|
|
577
579
|
|
|
578
580
|
/**
|
|
@@ -595,6 +597,16 @@ declare function isKnownProvider(name: string): boolean;
|
|
|
595
597
|
* Get all available provider names (built-in + custom).
|
|
596
598
|
*/
|
|
597
599
|
declare function getAvailableProviderNames(): string[];
|
|
600
|
+
/**
|
|
601
|
+
* Exact environment-variable names that may carry credentials for any
|
|
602
|
+
* registered Provider. Shell execution uses the complete set so switching the
|
|
603
|
+
* active Provider cannot make an inactive Provider's credential visible.
|
|
604
|
+
*
|
|
605
|
+
* Runtime Provider factories are evaluated because their public registration
|
|
606
|
+
* contract does not otherwise expose credential metadata. A failing factory is
|
|
607
|
+
* intentionally fail-closed for configured shell execution.
|
|
608
|
+
*/
|
|
609
|
+
declare function getProviderCredentialEnvironmentNames(): string[];
|
|
598
610
|
/**
|
|
599
611
|
* Model descriptors for any registered provider (built-in or custom).
|
|
600
612
|
* Default model first, then alternatives. Empty array if name unknown.
|
|
@@ -711,5 +723,5 @@ interface SideQueryDiagnostics {
|
|
|
711
723
|
}
|
|
712
724
|
declare function sideQuery(req: SideQueryRequest): Promise<SideQueryResult>;
|
|
713
725
|
|
|
714
|
-
export {
|
|
726
|
+
export { isRuntimeModelProviderName as $, getCustomProviderList as A, getCustomProviderModelDescriptors as B, getCustomProviderModels as C, getCustomProviderNames as D, getDefaultThinkingDepthForMode as E, getModelCapabilities as F, getProvider as G, getProviderConfiguredCapabilityProfile as H, getProviderConfiguredReasoningCapability as I, getProviderCredentialEnvironmentNames as J, KODAX_DEFAULT_PROVIDER as K, getProviderList as L, getProviderModel as M, getProviderModelDescriptors as N, getProviderModels as O, getReasoningCapability as Q, getRuntimeModelProvider as T, getRuntimeModelProviderCredentialEnvironmentNames as U, getRuntimeModelProviderNames as V, isCustomProviderName as W, isKnownProvider as X, isProviderConfigured as Y, isProviderName as Z, isReasoningEnabled as _, KODAX_DEFAULT_THINKING_BUDGETS as a, listAllModelCapabilities as a0, listBuiltinModelCapabilities as a1, listCustomProviderModelCapabilities as a2, listProviderModels as a3, mapDepthToOpenAIReasoningEffort as a4, mapLegacyReasoningModeToEffortIntent as a5, normalizeReasoningEffortValue as a6, normalizeReasoningRequest as a7, parseReasoningEffortEnv as a8, registerCustomProviders as a9, registerModelProvider as aa, resolveModelCapabilities as ab, resolveProvider as ac, resolveProviderModelDescriptors as ad, resolveReasoningEffort as ae, resolveReasoningEffortForModelSwitch as af, resolveThinkingBudget as ag, resolveWireEffort as ah, sideQuery as ai, validateCustomProviderConfig as aj, verifyProviderCredential as ak, KODAX_PROVIDERS as b, KODAX_PROVIDER_SNAPSHOTS as c, KODAX_REASONING_MODE_SEQUENCE as d, KODAX_REASONING_SAFETY_RESERVE as e, KODAX_STABLE_EFFORT_INTENTS as f, KodaXAnthropicCompatProvider as g, KodaXError as h, KodaXNetworkError as j, KodaXOpenAICompatProvider as k, KodaXProviderError as l, KodaXRateLimitError as m, KodaXToolCallIdError as n, clampThinkingBudget as t, clearRuntimeModelProviders as u, createCustomProvider as v, effortToLegacyReasoningMode as w, getAvailableProviderNames as x, getCustomModelCapabilities as y, getCustomProvider as z };
|
|
715
727
|
export type { ProviderName as P, ResolveWireEffortInput as R, SideQueryDiagnostics as S, KodaXModelCapabilities as i, ResolvedWireEffort as o, SideQueryRequest as p, SideQueryResult as q, SideQueryStopReason as r, SideQueryTerminalPhase as s };
|