@kodax-ai/kodax 0.7.76 → 0.7.78
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 +758 -371
- package/LICENSE +158 -158
- package/README.md +1702 -1508
- package/README_CN.md +1019 -869
- package/config-templates/config.example.jsonc +86 -4
- 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-ASP4MS3X.js +2 -0
- package/dist/chunks/argument-completer-JYQ7FX3W.js +2 -0
- package/dist/chunks/chunk-2CFHBKRE.js +5 -0
- package/dist/chunks/chunk-35PPHOQ2.js +292 -0
- package/dist/chunks/chunk-43QNNDHR.js +29 -0
- package/dist/chunks/chunk-5BNQXXGY.js +1 -0
- package/dist/chunks/chunk-5GO6FH7L.js +458 -0
- package/dist/chunks/chunk-5NDCSFOP.js +78 -0
- package/dist/chunks/chunk-6FOJVETH.js +22 -0
- package/dist/chunks/chunk-6XM4B6K2.js +48 -0
- package/dist/chunks/chunk-6YZUE6NC.js +240 -0
- package/dist/chunks/{chunk-RDXRM3UI.js → chunk-7OEBJGHK.js} +1 -1
- package/dist/chunks/chunk-KQLQYHWU.js +386 -0
- package/dist/chunks/chunk-NXO6GWSY.js +46 -0
- package/dist/chunks/chunk-T2XZTLYE.js +316 -0
- package/dist/chunks/chunk-TQDBTTIM.js +348 -0
- package/dist/chunks/{chunk-SMT2JSM3.js → chunk-UID7BLAB.js} +9 -9
- package/dist/chunks/chunk-VAT2QYXM.js +765 -0
- package/dist/chunks/chunk-YAZQTC2L.js +5 -0
- package/dist/chunks/chunk-YVRYHC4C.js +655 -0
- package/dist/chunks/{chunk-PXKSE54E.js → chunk-Z3KFRTSB.js} +1 -1
- package/dist/chunks/compaction-config-BQSSIWK5.js +2 -0
- package/dist/chunks/{construction-bootstrap-5F5KF2BZ.js → construction-bootstrap-VQLQGWPY.js} +1 -1
- package/dist/chunks/dist-BFT5YIGU.js +2 -0
- package/dist/chunks/dist-PCFE24YP.js +2 -0
- package/dist/chunks/host-UTFXCYYM.js +2 -0
- package/dist/chunks/run-manager-PJU3WIFJ.js +2 -0
- package/dist/chunks/utils-SID4HW2Q.js +2 -0
- package/dist/index.d.ts +21 -19
- package/dist/index.js +6 -6
- package/dist/kodax_bootstrap.js +25 -25
- package/dist/kodax_cli.js +1787 -1341
- package/dist/kodax_resume.js +17 -17
- package/dist/provider-capabilities.json +392 -362
- package/dist/runtime-worker.js +1707 -1279
- package/dist/sandbox-workspace-session.js +563 -0
- package/dist/sdk-a2a.d.ts +18 -17
- package/dist/sdk-a2a.js +8 -8
- package/dist/sdk-agent.d.ts +320 -70
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +135 -168
- 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 +219 -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 +70 -27
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +212 -149
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.d.ts +93 -0
- package/dist/sdk-sandbox.js +2 -0
- package/dist/sdk-session.d.ts +8 -8
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.d.ts +2 -2
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +15 -15
- 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-uAe2Oqda.d.ts} +319 -9
- 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-BlSv9l3V.d.ts} +2 -2
- package/dist/types-chunks/{guardrail.d-CWYD1bdL.d.ts → guardrail.d-BRE_ErEj.d.ts} +1 -1
- package/dist/types-chunks/{guardrail.d-qjuKJZ31.d.ts → guardrail.d-CXDYRgZ3.d.ts} +201 -35
- package/dist/types-chunks/{history-retrieval.d-BKTJIrVd.d.ts → history-retrieval.d-DtCy7x64.d.ts} +2 -2
- package/dist/types-chunks/{integration-config.d-ojG4swOP.d.ts → integration-config.d-BNowXE8k.d.ts} +23 -8
- package/dist/types-chunks/{public-api.d-CX4B11qY.d.ts → public-api.d-B3AohsxN.d.ts} +37 -8
- package/dist/types-chunks/{commands.d-DUxnK2TU.d.ts → repl.d-Ie_ZXb_U.d.ts} +89 -78
- package/dist/types-chunks/{side-query.d-DWTMsndP.d.ts → resolver.d-iAQ9ocLB.d.ts} +23 -74
- package/dist/types-chunks/{run-manager.d-B9fEIjZk.d.ts → run-manager.d-D1twIhF9.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-B0fhAOPa.d.ts → sdk-session-DB9KksIx.d.ts} +3 -3
- package/dist/types-chunks/side-query.d-DTuLPcC5.d.ts +77 -0
- package/dist/types-chunks/types-D3g6XUQr.d.ts +662 -0
- package/dist/types-chunks/{types.d-sRLugmjy.d.ts → types.d-BA-Jwpfs.d.ts} +506 -11
- package/dist/types-chunks/{types.d-DEctY20M.d.ts → types.d-BH0ZkTGf.d.ts} +2 -2
- package/dist/types-chunks/{types.d-DCQVBqVn.d.ts → types.d-BbtGlKZu.d.ts} +25 -3
- package/dist/types-chunks/{types.d-CSmF0t0n.d.ts → types.d-DIpZJKUl.d.ts} +15 -0
- package/dist/types-chunks/{types.d-Bm_y6YuM.d.ts → types.d-DVDTIfB_.d.ts} +4 -4
- package/dist/types-chunks/{utils.d-D0wPxz8y.d.ts → utils.d-CVp6bFl9.d.ts} +23 -7
- package/docs/SDK_EMBEDDER_GUIDE.md +592 -119
- package/package.json +9 -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-4PWPNCNK.js +0 -158
- 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-HGT6WQ24.js +0 -321
- package/dist/chunks/chunk-HS3XHF3R.js +0 -622
- 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
- package/dist/chunks/utils-X3TEH6IO.js +0 -2
- package/dist/types-chunks/center-types.d-BBT122uJ.d.ts +0 -91
|
@@ -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 {
|
|
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, I as ISkillRegistry } from './types.d-
|
|
1
|
+
import { bz as KodaXGoalState, ab as AgentMessage, eg as StopHookFn, bU as KodaXSessionLineage, n as AgentActorStore, aF as AgentTurnExecutor, w as AgentBudgetPort, i as AgentActorOwner, h as AgentActorClient, Q as AgentExecutionResult, Y as AgentExecutorPlaneBinding, bF as KodaXJsonValue, bt as KodaXExtensionSessionRecord, f as Agent, eG as WorkflowIsolation, bu as KodaXExtensionSessionState, bL as KodaXSessionArtifactLedgerEntry, e0 as SessionErrorMetadata, c0 as KodaXSessionScope, c1 as KodaXSessionStorage, d2 as MemoryContextIdentity, de as MemoryPack, aN as AskUserQuestionOptions, aJ as AskUserAnswer, aL as AskUserMultiOptions, eD as WorkflowEventCorrelation, aX as CompactionUpdate, eU as WorkflowProcessEvent, eC as WorkflowEvent, dt as MemoryReviewPlan, bI as KodaXMemoryOutcomeDigest, bi as Guardrail, b2 as DiscoveredInstance, bD as KodaXInputArtifact, du as MemoryReviewRunner, eu as UnifiedLearningReviewRunner } from './types.d-BA-Jwpfs.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
|
+
import { d as SkillDynamicContextExecutor, I as ISkillRegistry } from './types.d-BbtGlKZu.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-D3g6XUQr.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.
|
|
@@ -836,6 +837,8 @@ interface CodingActorSessionOptions {
|
|
|
836
837
|
readonly store?: AgentActorStore;
|
|
837
838
|
readonly executor?: AgentTurnExecutor;
|
|
838
839
|
readonly budget?: AgentBudgetPort;
|
|
840
|
+
readonly owner?: AgentActorOwner;
|
|
841
|
+
readonly isOwnerAlive?: (owner: AgentActorOwner) => boolean | Promise<boolean>;
|
|
839
842
|
}
|
|
840
843
|
/** One Runtime-owned Actor tree for one KodaX session. */
|
|
841
844
|
declare class CodingActorSession {
|
|
@@ -848,6 +851,8 @@ declare class CodingActorSession {
|
|
|
848
851
|
initialize(): Promise<void>;
|
|
849
852
|
attach(parentCtx: KodaXToolExecutionContext, options: KodaXOptions, callerPath?: string): AgentActorClient;
|
|
850
853
|
rootControl(): AgentActorClient;
|
|
854
|
+
ownerId(): string | undefined;
|
|
855
|
+
ownsDurableFence(): boolean;
|
|
851
856
|
createWorkflowOwner(parentPath: string, runId: string): Promise<AgentActorClient>;
|
|
852
857
|
workflowOwnerSignal(ownerPath: string): AbortSignal;
|
|
853
858
|
settleWorkflowOwner(ownerPath: string, state: 'completed' | 'failed' | 'interrupted', result: AgentExecutionResult & {
|
|
@@ -858,6 +863,8 @@ declare class CodingActorSession {
|
|
|
858
863
|
registerTurnExecutor(key: string, executor: AgentTurnExecutor): () => void;
|
|
859
864
|
waitForAgentCapacity(signal?: AbortSignal): Promise<boolean>;
|
|
860
865
|
close(reason?: string): Promise<void>;
|
|
866
|
+
quiesce(reason?: string): Promise<void>;
|
|
867
|
+
disposeAfterStoreRemoval(reason?: string): void;
|
|
861
868
|
}
|
|
862
869
|
declare function createLocalCodingActorControl(parentCtx: KodaXToolExecutionContext, options: KodaXOptions): AgentActorClient;
|
|
863
870
|
/** Runtime adapter for detached external Actor turns. The executor plane stays internal. */
|
|
@@ -870,7 +877,7 @@ declare function createExternalActorTurnExecutor(binding: AgentExecutorPlaneBind
|
|
|
870
877
|
* configure / install / troubleshoot KodaX?" questions. Pure data + a
|
|
871
878
|
* deterministic resolver — no RAG, no vector store, no network fetch.
|
|
872
879
|
*/
|
|
873
|
-
type KodaXManualTopicId = 'overview' | 'license' | 'install' | 'quickstart' | 'providers' | 'custom-providers' | 'config' | 'permissions' | 'commands' | 'tools' | 'agents' | 'skills' | 'extensions' | 'mcp' | 'a2a' | 'repo-intelligence' | 'sessions' | 'compaction' | 'memory' | 'doctor' | 'sdk' | 'troubleshooting';
|
|
880
|
+
type KodaXManualTopicId = 'overview' | 'license' | 'install' | 'quickstart' | 'providers' | 'custom-providers' | 'config' | 'permissions' | 'sandbox' | 'commands' | 'tools' | 'agents' | 'skills' | 'extensions' | 'mcp' | 'a2a' | 'repo-intelligence' | 'sessions' | 'compaction' | 'memory' | 'doctor' | 'sdk' | 'troubleshooting';
|
|
874
881
|
/** A pointer to the code/doc the topic is derived from (for traceability). */
|
|
875
882
|
interface KodaXManualSource {
|
|
876
883
|
readonly label: string;
|
|
@@ -1113,6 +1120,10 @@ interface RuntimeContextBudgetSnapshot {
|
|
|
1113
1120
|
readonly sessionId?: string;
|
|
1114
1121
|
readonly runId?: string;
|
|
1115
1122
|
readonly turnId?: string;
|
|
1123
|
+
readonly contextId?: string;
|
|
1124
|
+
readonly contextKind?: 'root' | 'child';
|
|
1125
|
+
readonly parentContextId?: string;
|
|
1126
|
+
readonly agentId?: string;
|
|
1116
1127
|
readonly provider?: string;
|
|
1117
1128
|
readonly model?: string;
|
|
1118
1129
|
readonly profile: RuntimeContextOptimizationProfile;
|
|
@@ -1133,6 +1144,10 @@ interface RuntimeContextBudgetSnapshotInput {
|
|
|
1133
1144
|
readonly sessionId?: string;
|
|
1134
1145
|
readonly runId?: string;
|
|
1135
1146
|
readonly turnId?: string;
|
|
1147
|
+
readonly contextId?: string;
|
|
1148
|
+
readonly contextKind?: 'root' | 'child';
|
|
1149
|
+
readonly parentContextId?: string;
|
|
1150
|
+
readonly agentId?: string;
|
|
1136
1151
|
readonly provider?: string;
|
|
1137
1152
|
readonly model?: string;
|
|
1138
1153
|
readonly profile?: RuntimeContextOptimizationProfile;
|
|
@@ -1142,11 +1157,19 @@ interface RuntimeContextBudgetSnapshotInput {
|
|
|
1142
1157
|
readonly skillCatalogText?: string;
|
|
1143
1158
|
readonly mcpCatalogText?: string;
|
|
1144
1159
|
readonly messages?: readonly KodaXMessage[];
|
|
1160
|
+
readonly messageTokenBreakdown?: RuntimeContextBudgetMessageBreakdown;
|
|
1145
1161
|
readonly pendingInput?: string;
|
|
1146
1162
|
readonly recentToolResults?: readonly string[];
|
|
1147
1163
|
readonly reservedResponseTokens?: number;
|
|
1148
1164
|
readonly now?: () => Date;
|
|
1149
1165
|
}
|
|
1166
|
+
interface RuntimeContextBudgetMessageBreakdown {
|
|
1167
|
+
readonly transcript: number;
|
|
1168
|
+
readonly pendingInput: number;
|
|
1169
|
+
readonly recentToolResults: number;
|
|
1170
|
+
readonly skillCatalog: number;
|
|
1171
|
+
readonly mcpCatalog: number;
|
|
1172
|
+
}
|
|
1150
1173
|
declare function estimateToolSchemaTokens(definition: KodaXToolDefinition, descriptionOverride?: string): number;
|
|
1151
1174
|
declare function createRuntimeContextBudgetSnapshot(input: RuntimeContextBudgetSnapshotInput): RuntimeContextBudgetSnapshot;
|
|
1152
1175
|
|
|
@@ -1163,6 +1186,10 @@ interface RuntimeToolExposureDecision {
|
|
|
1163
1186
|
readonly modelVisible: boolean;
|
|
1164
1187
|
}
|
|
1165
1188
|
interface RuntimeToolExposurePlan {
|
|
1189
|
+
readonly contextId?: string;
|
|
1190
|
+
readonly contextKind?: 'root' | 'child';
|
|
1191
|
+
readonly parentContextId?: string;
|
|
1192
|
+
readonly agentId?: string;
|
|
1166
1193
|
readonly profile: RuntimeContextOptimizationProfile;
|
|
1167
1194
|
readonly reportOnly: boolean;
|
|
1168
1195
|
readonly pressure: RuntimeContextPressure;
|
|
@@ -1215,6 +1242,10 @@ interface CompactionSavingsDecision {
|
|
|
1215
1242
|
}
|
|
1216
1243
|
type CompactionSkipReason = 'low_savings_cooldown' | 'covered_context_unchanged';
|
|
1217
1244
|
interface RuntimeCompactionSkippedEvent {
|
|
1245
|
+
readonly contextId?: string;
|
|
1246
|
+
readonly contextKind?: 'root' | 'child';
|
|
1247
|
+
readonly parentContextId?: string;
|
|
1248
|
+
readonly agentId?: string;
|
|
1218
1249
|
readonly reason: CompactionSkipReason;
|
|
1219
1250
|
readonly currentTokens: number;
|
|
1220
1251
|
readonly contextWindow: number;
|
|
@@ -1662,6 +1693,25 @@ interface KodaXWorkflowAgentDigestEvent {
|
|
|
1662
1693
|
interface KodaXToolEventMeta extends KodaXActivityEventMeta {
|
|
1663
1694
|
readonly toolId?: string;
|
|
1664
1695
|
}
|
|
1696
|
+
type KodaXShellSandboxBackend = 'windows-restricted-user' | 'macos-seatbelt' | 'linux-bubblewrap' | 'unsupported';
|
|
1697
|
+
type KodaXShellSandboxObservation = {
|
|
1698
|
+
readonly version: 1;
|
|
1699
|
+
readonly state: 'applied';
|
|
1700
|
+
readonly backend: KodaXShellSandboxBackend;
|
|
1701
|
+
readonly policyId: 'kodax-workspace-shell-v1';
|
|
1702
|
+
} | {
|
|
1703
|
+
readonly version: 1;
|
|
1704
|
+
readonly state: 'fallback';
|
|
1705
|
+
readonly reason: 'not_ready' | 'prepare_failed' | 'backend_failed';
|
|
1706
|
+
readonly execution: 'normal_permission_policy';
|
|
1707
|
+
} | {
|
|
1708
|
+
readonly version: 1;
|
|
1709
|
+
readonly state: 'not_selected';
|
|
1710
|
+
};
|
|
1711
|
+
interface KodaXToolSandboxObservationUpdate {
|
|
1712
|
+
readonly id: string;
|
|
1713
|
+
readonly observation: KodaXShellSandboxObservation;
|
|
1714
|
+
}
|
|
1665
1715
|
interface KodaXContextCompactionFinishedEvent extends Partial<KodaXLiveEventMeta> {
|
|
1666
1716
|
readonly source: 'manual' | 'automatic_threshold' | 'physical_capacity';
|
|
1667
1717
|
readonly tokensBefore: number;
|
|
@@ -1685,6 +1735,9 @@ interface KodaXSidecarMessageEvent {
|
|
|
1685
1735
|
/** Exact actionable text from the sidecar. `budget-exhausted` means it was not injected. */
|
|
1686
1736
|
readonly content: string;
|
|
1687
1737
|
readonly suggestedFix?: string;
|
|
1738
|
+
readonly strategyReasonCode?: 'missing_requirement' | 'contradicted_evidence' | 'unsupported_claim' | 'unresolved_high_risk' | 'verification_degraded';
|
|
1739
|
+
readonly recommendedPattern?: 'classify-and-act' | 'fan-out-and-synthesize' | 'adversarial-verification' | 'generate-and-filter' | 'tournament' | 'loop-until-done';
|
|
1740
|
+
readonly targetEvidenceRefs?: readonly string[];
|
|
1688
1741
|
readonly trace?: string;
|
|
1689
1742
|
/**
|
|
1690
1743
|
* FEATURE_247 (R3/R8) — session id the verdict belongs to, so a host running
|
|
@@ -1708,6 +1761,55 @@ interface KodaXTodoDriftWarningEvent {
|
|
|
1708
1761
|
readonly firstPendingTodoId?: string;
|
|
1709
1762
|
readonly firstPendingTodoSubject?: string;
|
|
1710
1763
|
}
|
|
1764
|
+
interface KodaXPromptCacheDiagnosticEvent {
|
|
1765
|
+
readonly phase: 'request' | 'response';
|
|
1766
|
+
/** Provider API path used for this physical request. */
|
|
1767
|
+
readonly transport?: 'stream' | 'complete';
|
|
1768
|
+
readonly requestId: string;
|
|
1769
|
+
readonly requestedAt: string;
|
|
1770
|
+
readonly completedAt?: string;
|
|
1771
|
+
readonly provider: string;
|
|
1772
|
+
/** Stable logical Runtime context. Prompt/message text is never included. */
|
|
1773
|
+
readonly contextId?: string;
|
|
1774
|
+
readonly contextKind?: 'root' | 'child';
|
|
1775
|
+
readonly parentContextId?: string;
|
|
1776
|
+
readonly agentId?: string;
|
|
1777
|
+
/** Caller-facing model id selected for this request. */
|
|
1778
|
+
readonly model: string;
|
|
1779
|
+
/** Exact provider wire model after alias resolution. */
|
|
1780
|
+
readonly wireModel?: string;
|
|
1781
|
+
/** Hash of the caller-level reasoning controls; never contains prompt text. */
|
|
1782
|
+
readonly reasoningHash?: string;
|
|
1783
|
+
/** Effective output reservation sent for this adapter request. */
|
|
1784
|
+
readonly maxOutputTokens?: number;
|
|
1785
|
+
/** Whether KodaX explicit prompt-cache controls are enabled. */
|
|
1786
|
+
readonly kodaxPromptCacheEnabled?: boolean;
|
|
1787
|
+
/** Credential-free provider origin. */
|
|
1788
|
+
readonly endpoint?: string;
|
|
1789
|
+
/** Hash of the endpoint path, which may itself contain tenant credentials. */
|
|
1790
|
+
readonly endpointPathHash?: string;
|
|
1791
|
+
readonly attempt: number;
|
|
1792
|
+
readonly systemPromptHash: string;
|
|
1793
|
+
readonly toolSchemaHash: string;
|
|
1794
|
+
/** Hash of provider-visible messages before the current turn starts. */
|
|
1795
|
+
readonly messagePrefixHash: string;
|
|
1796
|
+
readonly messagePrefixCount: number;
|
|
1797
|
+
/** Hash of persistent provider-visible messages, excluding any ephemeral suffix. */
|
|
1798
|
+
readonly requestMessagesHash: string;
|
|
1799
|
+
/** Composite hash of system, tools, persistent messages, and ephemeral suffix. */
|
|
1800
|
+
readonly requestEnvelopeHash: string;
|
|
1801
|
+
/** Hash of provider-visible ephemeral request suffixes, when present. */
|
|
1802
|
+
readonly ephemeralSuffixHash?: string;
|
|
1803
|
+
/** Hash of the opaque affinity key when this Provider applies it on wire. */
|
|
1804
|
+
readonly promptCacheAffinityHash?: string;
|
|
1805
|
+
readonly messageCount: number;
|
|
1806
|
+
readonly toolCount: number;
|
|
1807
|
+
/** Provider-reported usage only. Missing fields remain undefined. */
|
|
1808
|
+
readonly inputTokens?: number;
|
|
1809
|
+
readonly outputTokens?: number;
|
|
1810
|
+
readonly cachedReadTokens?: number;
|
|
1811
|
+
readonly cachedWriteTokens?: number;
|
|
1812
|
+
}
|
|
1711
1813
|
interface KodaXEvents {
|
|
1712
1814
|
/** FEATURE_229: correlates child-agent SDK callbacks back to a workflow run/item. */
|
|
1713
1815
|
workflowCorrelation?: WorkflowEventCorrelation;
|
|
@@ -1729,6 +1831,11 @@ interface KodaXEvents {
|
|
|
1729
1831
|
id: string;
|
|
1730
1832
|
message: string;
|
|
1731
1833
|
}, meta?: KodaXToolEventMeta) => void;
|
|
1834
|
+
/**
|
|
1835
|
+
* Execution metadata for professional hosts. REPL history intentionally does
|
|
1836
|
+
* not render this internal containment state.
|
|
1837
|
+
*/
|
|
1838
|
+
onToolSandboxObservation?: (update: KodaXToolSandboxObservationUpdate, meta?: KodaXToolEventMeta) => void;
|
|
1732
1839
|
onToolInputDelta?: (toolName: string, partialJson: string, meta?: KodaXToolEventMeta) => void;
|
|
1733
1840
|
onStreamEnd?: (meta?: KodaXActivityEventMeta) => void;
|
|
1734
1841
|
/** Fired once when a child-agent run fully leaves the child executor. */
|
|
@@ -1839,6 +1946,11 @@ interface KodaXEvents {
|
|
|
1839
1946
|
onRepoIntelligenceTrace?: (event: KodaXRepoIntelligenceTraceEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1840
1947
|
/** Optional bounded context diagnostics. Emitted only when context.contextDiagnostics is true. */
|
|
1841
1948
|
onContextBudgetSnapshot?: (event: RuntimeContextBudgetSnapshot & Partial<KodaXLiveEventMeta>) => void;
|
|
1949
|
+
/**
|
|
1950
|
+
* Hash-only prompt-cache diagnostics; never contains prompt or message text.
|
|
1951
|
+
* Emitted only when context.contextDiagnostics is true.
|
|
1952
|
+
*/
|
|
1953
|
+
onPromptCacheDiagnostics?: (event: KodaXPromptCacheDiagnosticEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1842
1954
|
/** Optional bounded tool-exposure diagnostics. Emitted only when context.contextDiagnostics is true. */
|
|
1843
1955
|
onToolExposurePlanned?: (event: RuntimeToolExposurePlan & Partial<KodaXLiveEventMeta>) => void;
|
|
1844
1956
|
/** Optional bounded compaction-pressure diagnostics. Emitted only when context.contextDiagnostics is true. */
|
|
@@ -1953,12 +2065,17 @@ interface KodaXEvents {
|
|
|
1953
2065
|
/** Semantic memory review plan produced from explicit user feedback. */
|
|
1954
2066
|
onMemoryReview?: (plan: MemoryReviewPlan) => void;
|
|
1955
2067
|
onMemoryNotice?: (notice: {
|
|
2068
|
+
readonly sessionId?: string;
|
|
1956
2069
|
readonly episodeId: string;
|
|
1957
2070
|
readonly summaries: readonly string[];
|
|
1958
2071
|
readonly proposalIds: readonly string[];
|
|
1959
2072
|
}) => void;
|
|
1960
|
-
onMemoryOutcomeDigest?: (digest: KodaXMemoryOutcomeDigest
|
|
2073
|
+
onMemoryOutcomeDigest?: (digest: KodaXMemoryOutcomeDigest, metadata?: {
|
|
2074
|
+
readonly jobId?: string;
|
|
2075
|
+
}) => void;
|
|
1961
2076
|
onMemoryReviewReceipt?: (receipt: {
|
|
2077
|
+
readonly sessionId?: string;
|
|
2078
|
+
readonly jobId?: string;
|
|
1962
2079
|
readonly reviewKey: string;
|
|
1963
2080
|
readonly proposalIds: readonly string[];
|
|
1964
2081
|
readonly completedAt: string;
|
|
@@ -2011,7 +2128,10 @@ interface KodaXSessionOptions {
|
|
|
2011
2128
|
* NOT also snapshot the session: `saveSessionSnapshot` early-returns so
|
|
2012
2129
|
* the runner's flat full-rewrite `storage.save` can never race / clobber
|
|
2013
2130
|
* the host's richer incremental writes (which regressed `activeEntryId`
|
|
2014
|
-
* to the first round on resume).
|
|
2131
|
+
* to the first round on resume). Context-silent protocol facts may use the
|
|
2132
|
+
* host's optional atomic `storage.mutateLineage`; this never writes a stale
|
|
2133
|
+
* full session snapshot. A host using F263 durable Memory review facts must
|
|
2134
|
+
* provide that capability; those writes fail closed when it is absent.
|
|
2015
2135
|
*
|
|
2016
2136
|
* `storage` is still consulted for LOAD (resume / `resolveInitialMessages`
|
|
2017
2137
|
* tier 2). When absent (print CLI, ACP, SDK headless), the runner remains
|
|
@@ -2222,6 +2342,11 @@ interface KodaXChildContextBundle {
|
|
|
2222
2342
|
* one bounded repair turn) and surfaces it on `KodaXChildAgentResult.structured`.
|
|
2223
2343
|
*/
|
|
2224
2344
|
outputSchema?: unknown;
|
|
2345
|
+
/**
|
|
2346
|
+
* Runtime-only fixed AMA result contract. Unlike Workflow outputSchema,
|
|
2347
|
+
* invalid output is parse-only and never starts a repair model turn.
|
|
2348
|
+
*/
|
|
2349
|
+
structuredOutputContract?: 'pattern-disposition-parse-only';
|
|
2225
2350
|
/** Trusted host provenance plus the generated script's terse-result declaration. */
|
|
2226
2351
|
workflowOutputContract?: {
|
|
2227
2352
|
readonly kodaxAuthored: boolean;
|
|
@@ -2599,7 +2724,78 @@ interface KodaXManagedWorkBudget {
|
|
|
2599
2724
|
upgradeCeiling?: KodaXHarnessProfile;
|
|
2600
2725
|
lastApprovalBudgetTotal?: number;
|
|
2601
2726
|
}
|
|
2727
|
+
type KodaXShellKind = 'pwsh' | 'powershell' | 'cmd' | 'bash' | 'zsh';
|
|
2728
|
+
type KodaXShellProfileMode = 'default' | 'none' | 'login' | 'interactive' | 'login-interactive';
|
|
2729
|
+
/**
|
|
2730
|
+
* Host-owned, JSON-serializable shell execution policy.
|
|
2731
|
+
*
|
|
2732
|
+
* The contract is opt-in. When absent, command execution keeps the legacy
|
|
2733
|
+
* platform-shell/process.env behavior. When present, KodaX resolves a
|
|
2734
|
+
* credential-filtered environment through this shell in the effective cwd,
|
|
2735
|
+
* then executes the command with the same explicit interpreter.
|
|
2736
|
+
*/
|
|
2737
|
+
interface KodaXShellExecutionContract {
|
|
2738
|
+
readonly version: 1;
|
|
2739
|
+
readonly shell: {
|
|
2740
|
+
readonly kind: KodaXShellKind;
|
|
2741
|
+
/** Absolute path is recommended; a bare name is resolved from sanitized PATH. */
|
|
2742
|
+
readonly executable?: string;
|
|
2743
|
+
/** Trusted fixed arguments inserted before KodaX's generated command flag. */
|
|
2744
|
+
readonly args?: readonly string[];
|
|
2745
|
+
readonly profile?: KodaXShellProfileMode;
|
|
2746
|
+
};
|
|
2747
|
+
readonly environment?: {
|
|
2748
|
+
/** `filtered` keeps non-sensitive daemon variables; `none` keeps only OS bootstrap variables. */
|
|
2749
|
+
readonly inherit?: 'filtered' | 'none';
|
|
2750
|
+
/** Trusted, non-secret variables added before profile resolution. */
|
|
2751
|
+
readonly set?: Readonly<Record<string, string>>;
|
|
2752
|
+
/** Additional glob-style variable-name denies. Built-in credential denies are immutable. */
|
|
2753
|
+
readonly denyPatterns?: readonly string[];
|
|
2754
|
+
/**
|
|
2755
|
+
* Trusted shell code run after profile loading and before environment
|
|
2756
|
+
* capture. Directory-aware version-manager activation belongs here.
|
|
2757
|
+
*/
|
|
2758
|
+
readonly setup?: string;
|
|
2759
|
+
/** Windows-only PATH source. `registry` re-reads current Machine/User PATH. */
|
|
2760
|
+
readonly windowsPath?: 'process' | 'registry';
|
|
2761
|
+
};
|
|
2762
|
+
readonly cache?: {
|
|
2763
|
+
/** Strict environment-cache lifetime. Zero disables caching. */
|
|
2764
|
+
readonly ttlMs?: number;
|
|
2765
|
+
/** Changing this JSON scalar explicitly invalidates an existing cache entry. */
|
|
2766
|
+
readonly refreshToken?: string | number;
|
|
2767
|
+
};
|
|
2768
|
+
readonly probeTimeoutMs?: number;
|
|
2769
|
+
}
|
|
2770
|
+
interface KodaXShellSandboxPrepareInput {
|
|
2771
|
+
readonly toolCallId?: string;
|
|
2772
|
+
readonly toolInput: Readonly<Record<string, unknown>>;
|
|
2773
|
+
readonly command: string;
|
|
2774
|
+
readonly executable?: string;
|
|
2775
|
+
readonly args?: readonly string[];
|
|
2776
|
+
readonly cwd: string;
|
|
2777
|
+
readonly env: NodeJS.ProcessEnv;
|
|
2778
|
+
readonly windowsVerbatimArguments?: boolean;
|
|
2779
|
+
/** Caller cancellation while waiting for sandbox admission/preparation. */
|
|
2780
|
+
readonly signal?: AbortSignal;
|
|
2781
|
+
/** Absolute wall-clock deadline shared with the command timeout. */
|
|
2782
|
+
readonly deadlineAt?: number;
|
|
2783
|
+
readonly reportObservation?: (observation: KodaXShellSandboxObservation) => void;
|
|
2784
|
+
}
|
|
2785
|
+
interface KodaXPreparedShellSandboxInvocation {
|
|
2786
|
+
readonly executable: string;
|
|
2787
|
+
readonly args: readonly string[];
|
|
2788
|
+
readonly env: NodeJS.ProcessEnv;
|
|
2789
|
+
readonly windowsVerbatimArguments?: boolean;
|
|
2790
|
+
cleanup(): Promise<KodaXShellSandboxObservation | undefined>;
|
|
2791
|
+
}
|
|
2792
|
+
/** Runtime-owned OS sandbox broker for selected concrete shell calls. */
|
|
2793
|
+
interface KodaXShellSandbox {
|
|
2794
|
+
prepare(input: KodaXShellSandboxPrepareInput): Promise<KodaXPreparedShellSandboxInvocation | undefined>;
|
|
2795
|
+
}
|
|
2602
2796
|
interface KodaXContextOptions {
|
|
2797
|
+
/** Runtime-owner config home used by Memory, review inbox, and Learned Area routing. */
|
|
2798
|
+
configHome?: string;
|
|
2603
2799
|
/** Runtime-internal shared work ledger inherited by every descendant Agent run. */
|
|
2604
2800
|
managedWorkBudget?: KodaXManagedWorkBudget;
|
|
2605
2801
|
/** FEATURE_260 runtime-owned identity used for scoped memory reads. */
|
|
@@ -2608,10 +2804,44 @@ interface KodaXContextOptions {
|
|
|
2608
2804
|
memoryPack?: MemoryPack;
|
|
2609
2805
|
/** Runtime-minted collaboration principal for this actor execution. */
|
|
2610
2806
|
actorControl?: AgentActorClient;
|
|
2807
|
+
/**
|
|
2808
|
+
* Exact MessageQueue route for the Actor execution. Actor children keep
|
|
2809
|
+
* independent transcript session ids, so their collaboration mailbox cannot
|
|
2810
|
+
* be derived from the child run's session id.
|
|
2811
|
+
*
|
|
2812
|
+
* @internal
|
|
2813
|
+
*/
|
|
2814
|
+
actorQueueAgentId?: string;
|
|
2815
|
+
/**
|
|
2816
|
+
* Stable logical Session namespace used only for context identity. Child
|
|
2817
|
+
* transcripts remain isolated under their physical worker Session ids.
|
|
2818
|
+
*
|
|
2819
|
+
* @internal
|
|
2820
|
+
*/
|
|
2821
|
+
contextIdentitySessionId?: string;
|
|
2822
|
+
/**
|
|
2823
|
+
* Whether compaction in this physical run owns the canonical context
|
|
2824
|
+
* revision. Synthetic digest/repair requests share attribution but not
|
|
2825
|
+
* canonical history ownership.
|
|
2826
|
+
*
|
|
2827
|
+
* @internal
|
|
2828
|
+
*/
|
|
2829
|
+
ownsContextRevision?: boolean;
|
|
2611
2830
|
/** Trusted host operations that are intentionally absent from model-facing clients. */
|
|
2612
2831
|
actorHost?: KodaXActorHost;
|
|
2613
2832
|
/** Runtime-owned session Actor tree; attached when a root run builds its tool context. */
|
|
2614
2833
|
actorSession?: CodingActorSession;
|
|
2834
|
+
/**
|
|
2835
|
+
* Runtime-owned admission window for interrupt input targeted at the active
|
|
2836
|
+
* run. Its presence opts the managed Runner into consuming already-accepted
|
|
2837
|
+
* input before a terminal candidate is allowed to complete.
|
|
2838
|
+
*
|
|
2839
|
+
* @internal
|
|
2840
|
+
*/
|
|
2841
|
+
interruptInput?: {
|
|
2842
|
+
closeInputWindow(): void;
|
|
2843
|
+
reopenInputWindow(): void;
|
|
2844
|
+
};
|
|
2615
2845
|
/** Host attribution for an explicit Workflow command, SDK request, or natural-language product word. */
|
|
2616
2846
|
workflowIntent?: 'explicit';
|
|
2617
2847
|
/** Project root used for project-scoped prompts, permissions, and path policy. */
|
|
@@ -2621,6 +2851,10 @@ interface KodaXContextOptions {
|
|
|
2621
2851
|
* and shell execution. Defaults to `gitRoot`, then `process.cwd()`.
|
|
2622
2852
|
*/
|
|
2623
2853
|
executionCwd?: string;
|
|
2854
|
+
/** Optional host-owned shell/environment resolution policy for command tools. */
|
|
2855
|
+
shellExecution?: KodaXShellExecutionContract;
|
|
2856
|
+
/** Runtime-owned OS sandbox broker; never accepted from serialized model input. */
|
|
2857
|
+
shellSandbox?: KodaXShellSandbox;
|
|
2624
2858
|
/** Fail-closed host policy applied to every concrete file a read tool opens. */
|
|
2625
2859
|
assertReadablePath?: (candidate: string) => void;
|
|
2626
2860
|
/**
|
|
@@ -2661,6 +2895,30 @@ interface KodaXContextOptions {
|
|
|
2661
2895
|
skillsPrompt?: string;
|
|
2662
2896
|
/** Optional run-scoped registry used to pin and restrict Skill invocation. */
|
|
2663
2897
|
skillRegistry?: ISkillRegistry;
|
|
2898
|
+
/** Runtime-owned complete formal-name inventory used to prevent learned Skill shadowing. */
|
|
2899
|
+
protectedFormalSkillNames?: readonly string[];
|
|
2900
|
+
/**
|
|
2901
|
+
* Opaque root-run binding used to correlate learned Skill usage with the
|
|
2902
|
+
* exact Memory episode produced by that run.
|
|
2903
|
+
*
|
|
2904
|
+
* @internal
|
|
2905
|
+
*/
|
|
2906
|
+
learnedSkillBindingId?: string;
|
|
2907
|
+
/** Runtime-owner admission for exact learned Skill revisions. */
|
|
2908
|
+
admitLearnedSkillInvocation?: (input: {
|
|
2909
|
+
readonly sessionId: string;
|
|
2910
|
+
readonly capabilityId: string;
|
|
2911
|
+
readonly revision: number;
|
|
2912
|
+
readonly fingerprint: string;
|
|
2913
|
+
}) => Promise<{
|
|
2914
|
+
readonly invocationId: string;
|
|
2915
|
+
}>;
|
|
2916
|
+
/** Runtime-owner outcome correlation for learned Skill canaries. */
|
|
2917
|
+
completeLearnedSkillOutcomes?: (input: {
|
|
2918
|
+
readonly sessionId: string;
|
|
2919
|
+
readonly outcome: 'verified_success' | 'credible_negative' | 'inconclusive';
|
|
2920
|
+
readonly evidenceRefs: readonly string[];
|
|
2921
|
+
}) => Promise<void>;
|
|
2664
2922
|
/** Remote-runtime broker for explicitly admitted, OS-sandboxed Skill scripts. */
|
|
2665
2923
|
skillScriptRunner?: KodaXSkillScriptRunner;
|
|
2666
2924
|
rawUserInput?: string;
|
|
@@ -2854,6 +3112,10 @@ interface KodaXOptions {
|
|
|
2854
3112
|
context?: KodaXContextOptions;
|
|
2855
3113
|
events?: KodaXEvents;
|
|
2856
3114
|
memoryReviewer?: MemoryReviewRunner;
|
|
3115
|
+
/** One-call F263 reviewer. When present it replaces the memory-only reviewer for episode jobs. */
|
|
3116
|
+
learningReviewer?: UnifiedLearningReviewRunner;
|
|
3117
|
+
/** Optional host-owned semantic selector for sparse governed memory interventions. */
|
|
3118
|
+
memoryRecallRunner?: MemoryRecallRunner;
|
|
2857
3119
|
extensionRuntime?: ExtensionRuntimeContract;
|
|
2858
3120
|
/** FEATURE_229: host-owned policy for workflow auto-start and ceilings. */
|
|
2859
3121
|
workflowHostPolicy?: WorkflowHostPolicy;
|
|
@@ -3118,6 +3380,9 @@ interface KodaXManagedVerdictPayload {
|
|
|
3118
3380
|
nextHarness?: KodaXTaskRoutingDecision['harnessProfile'];
|
|
3119
3381
|
protocolParseFailed?: boolean;
|
|
3120
3382
|
verificationDegraded?: boolean;
|
|
3383
|
+
strategyReasonCode?: 'missing_requirement' | 'contradicted_evidence' | 'unsupported_claim' | 'unresolved_high_risk' | 'verification_degraded';
|
|
3384
|
+
recommendedPattern?: 'classify-and-act' | 'fan-out-and-synthesize' | 'adversarial-verification' | 'generate-and-filter' | 'tournament' | 'loop-until-done';
|
|
3385
|
+
targetEvidenceRefs?: string[];
|
|
3121
3386
|
preferredFallbackWorkerId?: string;
|
|
3122
3387
|
/**
|
|
3123
3388
|
* v0.7.26 Risk-3 fix — Evaluator explicit budget-extension request.
|
|
@@ -3198,6 +3463,15 @@ interface KodaXToolExecutionContext {
|
|
|
3198
3463
|
backups: Map<string, string>;
|
|
3199
3464
|
/** Runtime-minted collaboration principal; model inputs cannot replace its caller path. */
|
|
3200
3465
|
actorControl?: AgentActorClient;
|
|
3466
|
+
/** Runtime-minted MessageQueue route for this Actor's collaboration mailbox. */
|
|
3467
|
+
actorQueueAgentId?: string;
|
|
3468
|
+
/** Stable logical Session namespace used for child context identity. */
|
|
3469
|
+
contextIdentitySessionId?: string;
|
|
3470
|
+
/** Runtime-minted exact Actor/Turn owner for collaboration metadata. */
|
|
3471
|
+
actorTurnRef?: {
|
|
3472
|
+
readonly actorPath: string;
|
|
3473
|
+
readonly turnId: string;
|
|
3474
|
+
};
|
|
3201
3475
|
/** Shared root-run work ledger; descendant runtimes retain this exact object. */
|
|
3202
3476
|
managedWorkBudget?: KodaXManagedWorkBudget;
|
|
3203
3477
|
/** Trusted host operations that are intentionally absent from model-facing clients. */
|
|
@@ -3207,6 +3481,24 @@ interface KodaXToolExecutionContext {
|
|
|
3207
3481
|
readonly content: string;
|
|
3208
3482
|
readonly evidenceRefs: readonly string[];
|
|
3209
3483
|
} | undefined>;
|
|
3484
|
+
/**
|
|
3485
|
+
* Root-session-only submission channel for explicit user Memory intent.
|
|
3486
|
+
* The host validates an exact current-user quote and captures one intent for
|
|
3487
|
+
* end-of-episode governed submission; this callback never creates a durable
|
|
3488
|
+
* review job or writes Memory directly.
|
|
3489
|
+
*/
|
|
3490
|
+
memoryIntent?: (input: {
|
|
3491
|
+
readonly operation: 'remember' | 'correct';
|
|
3492
|
+
readonly statement: string;
|
|
3493
|
+
readonly userQuote: string;
|
|
3494
|
+
}) => Promise<{
|
|
3495
|
+
readonly status: 'captured';
|
|
3496
|
+
readonly operation: 'remember' | 'correct';
|
|
3497
|
+
readonly evidenceRef: string;
|
|
3498
|
+
} | {
|
|
3499
|
+
readonly status: 'rejected';
|
|
3500
|
+
readonly reason: string;
|
|
3501
|
+
}>;
|
|
3210
3502
|
/** Exact persisted history loader for the current root or isolated worker Session. */
|
|
3211
3503
|
loadSessionHistory?: () => Promise<KodaXSessionLineage | null>;
|
|
3212
3504
|
/** Git root directory - Git 鏍圭洰褰?*/
|
|
@@ -3247,10 +3539,25 @@ interface KodaXToolExecutionContext {
|
|
|
3247
3539
|
skillDynamicContext?: KodaXSkillDynamicContextPolicy;
|
|
3248
3540
|
/** Runtime-bound Skill registry; avoids process-global cross-session drift. */
|
|
3249
3541
|
skillRegistry?: ISkillRegistry;
|
|
3542
|
+
/** Runtime-owner admission for exact learned Skill revisions. */
|
|
3543
|
+
admitLearnedSkillInvocation?: KodaXContextOptions['admitLearnedSkillInvocation'];
|
|
3250
3544
|
/** Present only when the host admitted exact Skill scripts for this run. */
|
|
3251
3545
|
skillScriptRunner?: KodaXSkillScriptRunner;
|
|
3252
3546
|
/** Working directory used to resolve relative paths and execute shell commands. */
|
|
3253
3547
|
executionCwd?: string;
|
|
3548
|
+
/** Validated shell execution policy inherited by native child runtimes. */
|
|
3549
|
+
shellExecution?: KodaXShellExecutionContract;
|
|
3550
|
+
/** Runtime-owned OS sandbox broker for selected concrete shell calls. */
|
|
3551
|
+
shellSandbox?: KodaXShellSandbox;
|
|
3552
|
+
/** Structured containment metadata; never model-visible or persisted as conversation text. */
|
|
3553
|
+
reportToolSandboxObservation?: (observation: KodaXShellSandboxObservation) => void;
|
|
3554
|
+
/**
|
|
3555
|
+
* Exact credential variable names owned by registered Providers.
|
|
3556
|
+
* Used only to remove non-standard `apiKeyEnv` names from child processes.
|
|
3557
|
+
*
|
|
3558
|
+
* @internal
|
|
3559
|
+
*/
|
|
3560
|
+
providerCredentialEnvironmentNames?: readonly string[];
|
|
3254
3561
|
/** Fail-closed host policy applied to every concrete file a read tool opens. */
|
|
3255
3562
|
assertReadablePath?: (candidate: string) => void;
|
|
3256
3563
|
/** Host tool visibility ceiling inherited by child agents. */
|
|
@@ -3330,6 +3637,9 @@ interface KodaXToolExecutionContext {
|
|
|
3330
3637
|
readonly repoIntelligenceMode?: KodaXRepoIntelligenceMode;
|
|
3331
3638
|
readonly repoIntelligenceTrace?: boolean;
|
|
3332
3639
|
readonly compaction?: Readonly<KodaXCompactionOverride>;
|
|
3640
|
+
readonly contextDiagnostics?: boolean;
|
|
3641
|
+
readonly disablePromptCache?: boolean;
|
|
3642
|
+
readonly shellExecution?: KodaXShellExecutionContract;
|
|
3333
3643
|
};
|
|
3334
3644
|
/** Parent SDK/REPL callback surface used to preserve nested Agent telemetry. */
|
|
3335
3645
|
parentEvents?: KodaXEvents;
|
|
@@ -3689,5 +3999,5 @@ interface CreateBashPrefixExtractorOptions {
|
|
|
3689
3999
|
*/
|
|
3690
4000
|
declare function createBashPrefixExtractor(opts: CreateBashPrefixExtractorOptions): BashPrefixExtractor;
|
|
3691
4001
|
|
|
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,
|
|
4002
|
+
export { ALWAYS_RESIDENT_TOOL_NAMES as A, BASH_POLICY_SPEC as B, resolveConstructedAgent as b$, LSP_SERVERS as b0, LspService as b2, buildGoalRuntimeBinding as bI, consumeCompactionCooldown as bJ, createBashPrefixExtractor as bK, createCompactionAntiThrashState as bL, createExternalActorTurnExecutor as bM, createLocalCodingActorControl as bN, createRuntimeContextBudgetSnapshot as bO, decideWorkflowInvocation as bP, drainPendingSwaps as bQ, estimateToolSchemaTokens as bR, extractCommandPrefix as bS, getDefaultLspService as bT, hasExplicitNaturalLanguageWorkflowIntent as bU, hasPendingSwap as bV, makeDisabledGoalToolsContext as bW, normalizeKodaXAgentMode as bX, planToolExposure as bY, providerResilienceConfigFromTimeouts as bZ, recordCompactionSavings as b_, shouldSkipLlmCompaction as c0, shutdownDefaultLspService as c1, withGoalBeforeNextTurn as c2, withGoalStopHook as c3, workflowStartOutcomeConsumesTurn as c4, CodingActorSession as d };
|
|
4003
|
+
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, KodaXWorkflowTimeoutConfig as a$, KodaXMemoryStrategy as a0, KodaXOptions as a1, KodaXOrchestrationVerdict as a2, KodaXParentReductionContract as a3, KodaXPreparedShellSandboxInvocation as a4, KodaXPromptCacheDiagnosticEvent as a5, KodaXProviderPolicyHints as a6, KodaXRepoIntelligenceCapability as a7, KodaXRepoIntelligenceMode as a8, KodaXRepoIntelligenceResolvedMode as a9, KodaXTaskCapabilityHint as aA, KodaXTaskContract as aB, KodaXTaskEvidenceArtifact as aC, KodaXTaskEvidenceBundle as aD, KodaXTaskEvidenceEntry as aE, KodaXTaskRole as aF, KodaXTaskRoleAssignment as aG, KodaXTaskStatus as aH, KodaXTaskSurface as aI, KodaXTaskToolPolicy as aJ, KodaXTaskVerificationContract as aK, KodaXTaskVerificationCriterion as aL, KodaXTaskWorkItem as aM, KodaXTimeoutConfig as aN, KodaXToolEventMeta as aO, KodaXToolExecutionContext as aP, KodaXToolSandboxObservationUpdate as aQ, KodaXToolVisibilityMeta as aR, KodaXToolVisibilityPolicy as aS, KodaXTurnCompletedEvent as aT, KodaXTurnDeliveryKind as aU, KodaXTurnFailedEvent as aV, KodaXTurnStartedEvent as aW, KodaXVerificationScorecard as aX, KodaXVerificationScorecardCriterion as aY, KodaXWorkflowAgentDigestEvent as aZ, KodaXWorkflowEventMeta as a_, KodaXRepoIntelligenceTrace as aa, KodaXRepoIntelligenceTraceEvent as ab, KodaXRepoRoutingSignals as ac, KodaXResult as ad, KodaXRoleRoundSummary as ae, KodaXRuntimeVerificationContract as af, KodaXSelfManualConfig as ag, KodaXSessionControl as ah, KodaXSessionMutators as ai, KodaXSessionOptions as aj, KodaXShellExecutionContract as ak, KodaXShellKind as al, KodaXShellProfileMode as am, KodaXShellSandbox as an, KodaXShellSandboxBackend as ao, KodaXShellSandboxObservation as ap, KodaXShellSandboxPrepareInput as aq, KodaXSidecarMessageEvent as ar, KodaXSkillDynamicContextPolicy as as, KodaXSkillInvocationContext as at, KodaXSkillMap as au, KodaXSkillProjectionConfidence as av, KodaXSkillScriptInputFile as aw, KodaXSkillScriptOutputFile as ax, KodaXSkillScriptRunInput as ay, KodaXSkillScriptRunner as az, BashPrefixResult as b, LspServerInfo as b1, LspServiceConfig as b3, ProviderExecutionState as b4, ProviderRecoveryEvent as b5, ProviderResilienceConfig as b6, ProviderResiliencePolicy as b7, RecoveryAction as b8, RecoveryDecision as b9, WorkflowInvocationPolicyDecision as bA, WorkflowInvocationPolicyInput as bB, WorkflowInvocationSource as bC, WorkflowStartOutcome as bD, WorkflowToolHost as bE, WorkflowToolHostInlineInput as bF, WorkflowToolHostResult as bG, WorkflowToolHostStartResult as bH, RecoveryLadderStep as ba, RecoveryResult as bb, ResilienceClassification as bc, ResilienceErrorClass as bd, ResolveKodaXManualInput as be, ResolveKodaXManualOptions as bf, ResolveKodaXManualResult as bg, RuntimeCompactionSkippedEvent as bh, RuntimeContextBudgetBreakdown as bi, RuntimeContextBudgetRecommendation as bj, RuntimeContextBudgetSnapshot as bk, RuntimeContextBudgetSnapshotInput as bl, RuntimeContextOptimizationProfile as bm, RuntimeContextPressure as bn, RuntimeDefaultsSnapshot as bo, RuntimeToolExposureDecision as bp, RuntimeToolExposureMode as bq, RuntimeToolExposurePlan as br, RuntimeToolExposurePlanInput as bs, RuntimeToolExposureReason as bt, TodoItem as bu, TodoList as bv, TodoStatus as bw, ToolSideEffect as bx, WorkflowHostPolicy as by, WorkflowInvocationAction 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 {
|
|
1
|
+
import { k as KodaXMessage } from './types.d-DIpZJKUl.js';
|
|
2
|
+
import { ab as AgentMessage, d$ as SessionEntry, dZ as Session, e1 as SessionExtension, bU as KodaXSessionLineage, bF as KodaXJsonValue, aT as CompactionDetails, bs as KodaXCompactMemorySeed, bQ as KodaXSessionEntry, c2 as KodaXSessionTreeNode, bT as KodaXSessionLabelEntry, bS as KodaXSessionGoalEntry, bN as KodaXSessionClientNoticeEntry, b_ as KodaXSessionRewindMarkerEntry, bV as KodaXSessionMemoryOutcomeDigestEntry, bW as KodaXSessionMemoryReviewReceiptEntry, bZ as KodaXSessionNavigationOptions, bL as KodaXSessionArtifactLedgerEntry, bg as FileOperations, eJ as WorkflowMeta, eK as WorkflowModelHint, eL as WorkflowModule } from './types.d-BA-Jwpfs.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @kodax-ai/agent Constants
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bi as Guardrail, dT as RunnerToolCall, f as Agent, ab as AgentMessage, dW as RunnerToolResult, e5 as Span } from './types.d-BA-Jwpfs.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Guardrail Runtime — FEATURE_085 (v0.7.26).
|