@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,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { n as ResolvedAutoModeSettings, 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, p as RuntimeSurfaceStatus } from './utils.d-CVp6bFl9.js';
|
|
2
|
+
import { X as SessionStorage$1, R as PermissionMode, L as LearningBinding } from './public-api.d-B3AohsxN.js';
|
|
3
|
+
import { a1 as KodaXOptions, ad as KodaXResult } from './bash-prefix-extractor.d-uAe2Oqda.js';
|
|
4
|
+
import { c1 as KodaXSessionStorage, bP as KodaXSessionData } from './types.d-BA-Jwpfs.js';
|
|
5
|
+
import { s as AutoModeStats } from './guardrail.d-CXDYRgZ3.js';
|
|
6
6
|
|
|
7
7
|
interface ReplRuntimePermissionGrantSuggestion {
|
|
8
8
|
readonly id: string;
|
|
@@ -49,77 +49,6 @@ interface ReplRuntimeAutoModeSettings {
|
|
|
49
49
|
}
|
|
50
50
|
declare function toReplRuntimeAutoModeSettings(settings: ResolvedAutoModeSettings): ReplRuntimeAutoModeSettings;
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
* InkREPL - Ink-based REPL Adapter
|
|
54
|
-
*
|
|
55
|
-
* Bridges Ink UI components with existing KodaX command processing logic.
|
|
56
|
-
* Replaces the Node.js readline-based input with Ink's React components.
|
|
57
|
-
*
|
|
58
|
-
* Architecture based on Gemini CLI:
|
|
59
|
-
* - Uses UIStateContext for global state
|
|
60
|
-
* - Uses KeypressContext for priority-based keyboard handling
|
|
61
|
-
* - Uses StreamingContext for streaming response management
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
interface InkRuntimeRunnerInput {
|
|
65
|
-
readonly options: KodaXOptions;
|
|
66
|
-
readonly prompt: string;
|
|
67
|
-
readonly sessionId: string;
|
|
68
|
-
readonly permissionMode: PermissionMode;
|
|
69
|
-
readonly autoModeSettings?: ReplRuntimeAutoModeSettings;
|
|
70
|
-
readonly requestPermission?: ReplRuntimePermissionPrompt;
|
|
71
|
-
/** Marks the callback installed by the REPL's legacy permission UI. */
|
|
72
|
-
readonly legacyPermissionHook?: true;
|
|
73
|
-
}
|
|
74
|
-
type InkRuntimeRunner = (input: InkRuntimeRunnerInput) => Promise<KodaXResult>;
|
|
75
|
-
type InkRuntimeStatusProvider = () => Promise<RuntimeSurfaceStatus | undefined>;
|
|
76
|
-
interface InkREPLOptions extends KodaXOptions {
|
|
77
|
-
storage?: SessionStorage$1;
|
|
78
|
-
hardExitOnClose?: boolean;
|
|
79
|
-
runtimeRunner?: InkRuntimeRunner;
|
|
80
|
-
runtimeAutoModeControl?: ReplRuntimeAutoModeControl;
|
|
81
|
-
getRuntimeStatus?: InkRuntimeStatusProvider;
|
|
82
|
-
learning?: LearningBinding;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Run Ink-based interactive mode
|
|
86
|
-
*/
|
|
87
|
-
declare function runInkInteractiveMode(options: InkREPLOptions): Promise<void>;
|
|
88
|
-
|
|
89
|
-
interface SessionStorage extends KodaXSessionStorage {
|
|
90
|
-
list(gitRoot?: string, options?: {
|
|
91
|
-
limit?: number;
|
|
92
|
-
includeArchived?: boolean;
|
|
93
|
-
}): Promise<Array<{
|
|
94
|
-
id: string;
|
|
95
|
-
title: string;
|
|
96
|
-
msgCount: number;
|
|
97
|
-
tag?: string;
|
|
98
|
-
runtimeInfo?: KodaXSessionData['runtimeInfo'];
|
|
99
|
-
}>>;
|
|
100
|
-
}
|
|
101
|
-
interface ReplRuntimeRunnerInput {
|
|
102
|
-
readonly options: KodaXOptions;
|
|
103
|
-
readonly prompt: string;
|
|
104
|
-
readonly sessionId: string;
|
|
105
|
-
readonly permissionMode: PermissionMode;
|
|
106
|
-
readonly autoModeSettings?: ReplRuntimeAutoModeSettings;
|
|
107
|
-
readonly requestPermission?: ReplRuntimePermissionPrompt;
|
|
108
|
-
/** Marks the callback installed by the REPL's legacy permission UI. */
|
|
109
|
-
readonly legacyPermissionHook?: true;
|
|
110
|
-
}
|
|
111
|
-
type ReplRuntimeRunner = (input: ReplRuntimeRunnerInput) => Promise<KodaXResult>;
|
|
112
|
-
type ReplRuntimeStatusProvider = () => Promise<RuntimeSurfaceStatus | undefined>;
|
|
113
|
-
interface RepLOptions extends KodaXOptions {
|
|
114
|
-
storage?: SessionStorage;
|
|
115
|
-
runtimeRunner?: ReplRuntimeRunner;
|
|
116
|
-
runtimeAutoModeControl?: ReplRuntimeAutoModeControl;
|
|
117
|
-
getRuntimeStatus?: ReplRuntimeStatusProvider;
|
|
118
|
-
learning?: LearningBinding;
|
|
119
|
-
}
|
|
120
|
-
declare function runInteractiveMode(options: RepLOptions): Promise<void>;
|
|
121
|
-
declare function processSpecialSyntax(input: string, executionCwd?: string): Promise<string>;
|
|
122
|
-
|
|
123
52
|
/**
|
|
124
53
|
* Command Registry - Dynamic command registration system
|
|
125
54
|
* 命令注册表 - 动态命令注册系统
|
|
@@ -270,5 +199,87 @@ declare function executeCommand(parsed: {
|
|
|
270
199
|
};
|
|
271
200
|
}, context: InteractiveContext, callbacks: CommandCallbacks, currentConfig: CurrentConfig): Promise<CommandResult>;
|
|
272
201
|
|
|
273
|
-
|
|
274
|
-
|
|
202
|
+
/**
|
|
203
|
+
* InkREPL - Ink-based REPL Adapter
|
|
204
|
+
*
|
|
205
|
+
* Bridges Ink UI components with existing KodaX command processing logic.
|
|
206
|
+
* Replaces the Node.js readline-based input with Ink's React components.
|
|
207
|
+
*
|
|
208
|
+
* Architecture based on Gemini CLI:
|
|
209
|
+
* - Uses UIStateContext for global state
|
|
210
|
+
* - Uses KeypressContext for priority-based keyboard handling
|
|
211
|
+
* - Uses StreamingContext for streaming response management
|
|
212
|
+
*/
|
|
213
|
+
|
|
214
|
+
interface InkRuntimeRunnerInput {
|
|
215
|
+
readonly options: KodaXOptions;
|
|
216
|
+
readonly prompt: string;
|
|
217
|
+
readonly sessionId: string;
|
|
218
|
+
readonly permissionMode: PermissionMode;
|
|
219
|
+
readonly autoModeSettings?: ReplRuntimeAutoModeSettings;
|
|
220
|
+
readonly requestPermission?: ReplRuntimePermissionPrompt;
|
|
221
|
+
/** Marks the callback installed by the REPL's legacy permission UI. */
|
|
222
|
+
readonly legacyPermissionHook?: true;
|
|
223
|
+
}
|
|
224
|
+
type InkRuntimeRunner = (input: InkRuntimeRunnerInput) => Promise<KodaXResult>;
|
|
225
|
+
type InkRuntimeStatusProvider = () => Promise<RuntimeSurfaceStatus | undefined>;
|
|
226
|
+
interface InkTransientNotice {
|
|
227
|
+
readonly text: string;
|
|
228
|
+
readonly tone: "success" | "warning";
|
|
229
|
+
}
|
|
230
|
+
interface InkREPLOptions extends KodaXOptions {
|
|
231
|
+
storage?: SessionStorage$1;
|
|
232
|
+
hardExitOnClose?: boolean;
|
|
233
|
+
runtimeRunner?: InkRuntimeRunner;
|
|
234
|
+
runtimeAutoModeControl?: ReplRuntimeAutoModeControl;
|
|
235
|
+
getRuntimeStatus?: InkRuntimeStatusProvider;
|
|
236
|
+
validateSetupA2AConfig?: (value: unknown) => unknown;
|
|
237
|
+
prepareSetupSandbox?: CommandCallbacks['prepareSetupSandbox'];
|
|
238
|
+
inspectSandbox?: CommandCallbacks['inspectSandbox'];
|
|
239
|
+
learning?: LearningBinding;
|
|
240
|
+
subscribeTransientNotices?: (listener: (notice: InkTransientNotice) => void) => () => void;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Run Ink-based interactive mode
|
|
244
|
+
*/
|
|
245
|
+
declare function runInkInteractiveMode(options: InkREPLOptions): Promise<void>;
|
|
246
|
+
|
|
247
|
+
interface SessionStorage extends KodaXSessionStorage {
|
|
248
|
+
list(gitRoot?: string, options?: {
|
|
249
|
+
limit?: number;
|
|
250
|
+
includeArchived?: boolean;
|
|
251
|
+
}): Promise<Array<{
|
|
252
|
+
id: string;
|
|
253
|
+
title: string;
|
|
254
|
+
msgCount: number;
|
|
255
|
+
tag?: string;
|
|
256
|
+
runtimeInfo?: KodaXSessionData['runtimeInfo'];
|
|
257
|
+
}>>;
|
|
258
|
+
}
|
|
259
|
+
interface ReplRuntimeRunnerInput {
|
|
260
|
+
readonly options: KodaXOptions;
|
|
261
|
+
readonly prompt: string;
|
|
262
|
+
readonly sessionId: string;
|
|
263
|
+
readonly permissionMode: PermissionMode;
|
|
264
|
+
readonly autoModeSettings?: ReplRuntimeAutoModeSettings;
|
|
265
|
+
readonly requestPermission?: ReplRuntimePermissionPrompt;
|
|
266
|
+
/** Marks the callback installed by the REPL's legacy permission UI. */
|
|
267
|
+
readonly legacyPermissionHook?: true;
|
|
268
|
+
}
|
|
269
|
+
type ReplRuntimeRunner = (input: ReplRuntimeRunnerInput) => Promise<KodaXResult>;
|
|
270
|
+
type ReplRuntimeStatusProvider = () => Promise<RuntimeSurfaceStatus | undefined>;
|
|
271
|
+
interface RepLOptions extends KodaXOptions {
|
|
272
|
+
storage?: SessionStorage;
|
|
273
|
+
runtimeRunner?: ReplRuntimeRunner;
|
|
274
|
+
runtimeAutoModeControl?: ReplRuntimeAutoModeControl;
|
|
275
|
+
getRuntimeStatus?: ReplRuntimeStatusProvider;
|
|
276
|
+
validateSetupA2AConfig?: (value: unknown) => unknown;
|
|
277
|
+
prepareSetupSandbox?: CommandCallbacks['prepareSetupSandbox'];
|
|
278
|
+
inspectSandbox?: CommandCallbacks['inspectSandbox'];
|
|
279
|
+
learning?: LearningBinding;
|
|
280
|
+
}
|
|
281
|
+
declare function runInteractiveMode(options: RepLOptions): Promise<void>;
|
|
282
|
+
declare function processSpecialSyntax(input: string, executionCwd?: string): Promise<string>;
|
|
283
|
+
|
|
284
|
+
export { BUILTIN_COMMANDS as B, RUNTIME_PERMISSION_PENDING_NOTICE as R, executeCommand as o, getCommandRegistry as p, parseCommand as q, processSpecialSyntax as r, runInkInteractiveMode as s, runInteractiveMode as t, toReplRuntimeAutoModeSettings as u };
|
|
285
|
+
export type { Command as C, InkREPLOptions as I, InkRuntimeRunner as a, InkRuntimeRunnerInput as b, InkRuntimeStatusProvider as c, InkTransientNotice as d, RepLOptions as e, ReplRuntimeAutoModeControl as f, ReplRuntimeAutoModeSettings as g, ReplRuntimePermissionDecision as h, ReplRuntimePermissionGrantSuggestion as i, ReplRuntimePermissionPrompt as j, ReplRuntimePermissionRequest as k, ReplRuntimeRunner as l, ReplRuntimeRunnerInput as m, ReplRuntimeStatusProvider as n };
|
|
@@ -1,8 +1,7 @@
|
|
|
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
|
|
1
|
+
import { F as KodaXReasoningMode, M as KodaXStableEffortIntent, a9 as KodaXWireReasoningEffort, G as KodaXReasoningProfile, Z as KodaXThinkingBudgetMap, _ as KodaXThinkingDepth, q as KodaXProviderConfig, B as KodaXReasoningCapability, H as KodaXReasoningRequest, n as KodaXNormalizedReasoningRequest, V as KodaXTaskType, a7 as KodaXVerifyCredentialResult, a1 as KodaXToolDefinition, k as KodaXMessage, y as KodaXProviderStreamOptions, N as KodaXStreamResult, l as KodaXModelDescriptor, p as KodaXProviderCapabilityProfile, a8 as KodaXVerifyStrategy, d as KodaXCustomProviderConfig, j as KodaXListModelsResult } from './types.d-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
|
-
import { a as CostTracker } from './cost-tracker.d-BeaenODW.js';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* KodaX AI Errors
|
|
@@ -203,7 +202,6 @@ declare abstract class KodaXAnthropicCompatProvider extends KodaXBaseProvider {
|
|
|
203
202
|
* startup (e.g. bridged from `config.json`). A plain `||` would let the env
|
|
204
203
|
* win in that re-enable case, breaking the documented SDK > env precedence.
|
|
205
204
|
*/
|
|
206
|
-
private isPromptCacheDisabled;
|
|
207
205
|
protected applyCacheControlToSystem(systemText: string): string | Anthropic.Messages.TextBlockParam[];
|
|
208
206
|
/**
|
|
209
207
|
* FEATURE_116 (v0.7.37) — Mark the last tool definition as the cache
|
|
@@ -221,12 +219,12 @@ declare abstract class KodaXAnthropicCompatProvider extends KodaXBaseProvider {
|
|
|
221
219
|
* applyCacheControlToTools); without a message-level breakpoint the whole
|
|
222
220
|
* growing transcript is re-billed as uncached input every turn.
|
|
223
221
|
*
|
|
224
|
-
* Strategy: mark the LAST content block of the
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
222
|
+
* Strategy: mark the LAST content block of the latest `user` message.
|
|
223
|
+
* Anthropic writes the whole prefix through that breakpoint. On the next
|
|
224
|
+
* request its lookback can match the previous turn's write even though the
|
|
225
|
+
* breakpoint has advanced to the new current turn. This also lets a
|
|
226
|
+
* single-call run seed the cache for the next run. Total
|
|
227
|
+
* breakpoints stay at 3 (≤ Anthropic's limit of 4).
|
|
230
228
|
*
|
|
231
229
|
* Only anthropic-compat providers reach this path; OpenAI/ACP strip cache
|
|
232
230
|
* markers and rely on upstream automatic prefix caching. Escape hatch:
|
|
@@ -235,6 +233,7 @@ declare abstract class KodaXAnthropicCompatProvider extends KodaXBaseProvider {
|
|
|
235
233
|
* Returns a new array; never mutates input.
|
|
236
234
|
*/
|
|
237
235
|
protected applyCacheControlToMessages(messages: Anthropic.Messages.MessageParam[]): Anthropic.Messages.MessageParam[];
|
|
236
|
+
supportsEphemeralSuffix(): boolean;
|
|
238
237
|
stream(messages: KodaXMessage[], tools: KodaXToolDefinition[], system: string, reasoning?: boolean | KodaXReasoningRequest, streamOptions?: KodaXProviderStreamOptions, signal?: AbortSignal): Promise<KodaXStreamResult>;
|
|
239
238
|
supportsNonStreamingFallback(): boolean;
|
|
240
239
|
complete(messages: KodaXMessage[], tools: KodaXToolDefinition[], system: string, reasoning?: boolean | KodaXReasoningRequest, streamOptions?: KodaXProviderStreamOptions, signal?: AbortSignal): Promise<KodaXStreamResult>;
|
|
@@ -272,6 +271,7 @@ declare abstract class KodaXOpenAICompatProvider extends KodaXBaseProvider {
|
|
|
272
271
|
readonly supportsThinking = true;
|
|
273
272
|
protected abstract readonly config: KodaXProviderConfig;
|
|
274
273
|
private _client?;
|
|
274
|
+
supportsEphemeralSuffix(): boolean;
|
|
275
275
|
/**
|
|
276
276
|
* The SDK client is built lazily on first use. Constructing it requires the
|
|
277
277
|
* API key (`getApiKey()` throws when the env var is unset), so deferring it
|
|
@@ -573,6 +573,7 @@ declare function registerModelProvider(name: string, factory: ModelProviderFacto
|
|
|
573
573
|
declare function getRuntimeModelProvider(name: string): KodaXBaseProvider | undefined;
|
|
574
574
|
declare function isRuntimeModelProviderName(name: string): boolean;
|
|
575
575
|
declare function getRuntimeModelProviderNames(): string[];
|
|
576
|
+
declare function getRuntimeModelProviderCredentialEnvironmentNames(): string[];
|
|
576
577
|
declare function clearRuntimeModelProviders(): void;
|
|
577
578
|
|
|
578
579
|
/**
|
|
@@ -595,6 +596,16 @@ declare function isKnownProvider(name: string): boolean;
|
|
|
595
596
|
* Get all available provider names (built-in + custom).
|
|
596
597
|
*/
|
|
597
598
|
declare function getAvailableProviderNames(): string[];
|
|
599
|
+
/**
|
|
600
|
+
* Exact environment-variable names that may carry credentials for any
|
|
601
|
+
* registered Provider. Shell execution uses the complete set so switching the
|
|
602
|
+
* active Provider cannot make an inactive Provider's credential visible.
|
|
603
|
+
*
|
|
604
|
+
* Runtime Provider factories are evaluated because their public registration
|
|
605
|
+
* contract does not otherwise expose credential metadata. A failing factory is
|
|
606
|
+
* intentionally fail-closed for configured shell execution.
|
|
607
|
+
*/
|
|
608
|
+
declare function getProviderCredentialEnvironmentNames(): string[];
|
|
598
609
|
/**
|
|
599
610
|
* Model descriptors for any registered provider (built-in or custom).
|
|
600
611
|
* Default model first, then alternatives. Empty array if name unknown.
|
|
@@ -649,67 +660,5 @@ declare function listProviderModels(name: string, _opts?: {
|
|
|
649
660
|
signal?: AbortSignal;
|
|
650
661
|
}): Promise<KodaXListModelsResult>;
|
|
651
662
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
*
|
|
655
|
-
* Used by features that need a clean LLM call outside the main agent loop.
|
|
656
|
-
* The auto mode classifier (FEATURE_092) is the first consumer; future
|
|
657
|
-
* users include compaction, title generation, and SA mutation reflection.
|
|
658
|
-
*
|
|
659
|
-
* Constraints (deliberate):
|
|
660
|
-
* - tools=[] hardcoded — sideQuery is single-turn, no tool loop
|
|
661
|
-
* - text-only output — tool_use blocks from the model produce stopReason='error'
|
|
662
|
-
* - independent timeout (default 30s; callers may supply a bounded deadline)
|
|
663
|
-
* - independent cost bucket via querySource (mapped to TokenUsageRecord.role)
|
|
664
|
-
*
|
|
665
|
-
* Failure handling: never throws. Timeout, abort, provider error, and
|
|
666
|
-
* unexpected tool_use all produce a result with stopReason='timeout' /
|
|
667
|
-
* 'aborted' / 'error' so callers implement their own degradation.
|
|
668
|
-
*/
|
|
669
|
-
|
|
670
|
-
type SideQueryStopReason = 'end_turn' | 'max_tokens' | 'timeout' | 'aborted' | 'error';
|
|
671
|
-
interface SideQueryRequest {
|
|
672
|
-
readonly provider: KodaXBaseProvider;
|
|
673
|
-
readonly model: string;
|
|
674
|
-
readonly system: string;
|
|
675
|
-
readonly messages: readonly KodaXMessage[];
|
|
676
|
-
readonly reasoning?: KodaXReasoningRequest;
|
|
677
|
-
/** Optional per-request cap for small structured sidecar responses. */
|
|
678
|
-
readonly maxOutputTokens?: number;
|
|
679
|
-
readonly timeoutMs?: number;
|
|
680
|
-
readonly abortSignal?: AbortSignal;
|
|
681
|
-
readonly querySource: string;
|
|
682
|
-
readonly costTracker?: CostTracker;
|
|
683
|
-
}
|
|
684
|
-
interface SideQueryResult {
|
|
685
|
-
readonly text: string;
|
|
686
|
-
readonly usage: KodaXTokenUsage;
|
|
687
|
-
readonly costTracker?: CostTracker;
|
|
688
|
-
readonly stopReason: SideQueryStopReason;
|
|
689
|
-
/**
|
|
690
|
-
* Bounded request metadata only; prompts and response text are never copied.
|
|
691
|
-
* The built-in `sideQuery()` always supplies it. Optionality preserves source
|
|
692
|
-
* compatibility for existing SDK mocks and structural result adapters.
|
|
693
|
-
*/
|
|
694
|
-
readonly diagnostics?: SideQueryDiagnostics;
|
|
695
|
-
readonly error?: Error;
|
|
696
|
-
}
|
|
697
|
-
type SideQueryTerminalPhase = 'completed' | 'pre_output' | 'streaming' | 'contract_error';
|
|
698
|
-
interface SideQueryDiagnostics {
|
|
699
|
-
readonly provider: string;
|
|
700
|
-
readonly model: string;
|
|
701
|
-
readonly timeoutMs: number;
|
|
702
|
-
readonly elapsedMs: number;
|
|
703
|
-
readonly retryCount: number;
|
|
704
|
-
readonly retryWaitMs: number;
|
|
705
|
-
/** Time until the first non-empty text delta, when the adapter exposes it. */
|
|
706
|
-
readonly firstOutputMs?: number;
|
|
707
|
-
/** Time from the first observed text delta until termination. */
|
|
708
|
-
readonly streamMs?: number;
|
|
709
|
-
/** Honest coarse phase; provider adapters cannot split DNS/connect/remote queue. */
|
|
710
|
-
readonly terminalPhase: SideQueryTerminalPhase;
|
|
711
|
-
}
|
|
712
|
-
declare function sideQuery(req: SideQueryRequest): Promise<SideQueryResult>;
|
|
713
|
-
|
|
714
|
-
export { listBuiltinModelCapabilities 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, getProviderList as J, KODAX_DEFAULT_PROVIDER as K, getProviderModel as L, getProviderModelDescriptors as M, getProviderModels as N, getReasoningCapability as O, getRuntimeModelProvider as Q, getRuntimeModelProviderNames as T, isCustomProviderName as U, isKnownProvider as V, isProviderConfigured as W, isProviderName as X, isReasoningEnabled as Y, isRuntimeModelProviderName as Z, listAllModelCapabilities as _, KODAX_DEFAULT_THINKING_BUDGETS as a, listCustomProviderModelCapabilities as a0, listProviderModels as a1, mapDepthToOpenAIReasoningEffort as a2, mapLegacyReasoningModeToEffortIntent as a3, normalizeReasoningEffortValue as a4, normalizeReasoningRequest as a5, parseReasoningEffortEnv as a6, registerCustomProviders as a7, registerModelProvider as a8, resolveModelCapabilities as a9, resolveProvider as aa, resolveProviderModelDescriptors as ab, resolveReasoningEffort as ac, resolveReasoningEffortForModelSwitch as ad, resolveThinkingBudget as ae, resolveWireEffort as af, sideQuery as ag, validateCustomProviderConfig as ah, verifyProviderCredential as ai, 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
|
-
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 };
|
|
663
|
+
export { mapDepthToOpenAIReasoningEffort as $, getDefaultThinkingDepthForMode as A, getModelCapabilities as B, getProvider as C, getProviderConfiguredCapabilityProfile as D, getProviderConfiguredReasoningCapability as E, getProviderCredentialEnvironmentNames as F, getProviderList as G, getProviderModel as H, getProviderModelDescriptors as I, getProviderModels as J, KODAX_DEFAULT_PROVIDER as K, getReasoningCapability as L, getRuntimeModelProvider as M, getRuntimeModelProviderCredentialEnvironmentNames as N, getRuntimeModelProviderNames as O, isCustomProviderName as Q, isKnownProvider as S, isProviderConfigured as T, isProviderName as U, isReasoningEnabled as V, isRuntimeModelProviderName as W, listAllModelCapabilities as X, listBuiltinModelCapabilities as Y, listCustomProviderModelCapabilities as Z, listProviderModels as _, KODAX_DEFAULT_THINKING_BUDGETS as a, mapLegacyReasoningModeToEffortIntent as a0, normalizeReasoningEffortValue as a1, normalizeReasoningRequest as a2, parseReasoningEffortEnv as a3, registerCustomProviders as a4, registerModelProvider as a5, resolveModelCapabilities as a6, resolveProvider as a7, resolveProviderModelDescriptors as a8, resolveReasoningEffort as a9, resolveReasoningEffortForModelSwitch as aa, resolveThinkingBudget as ab, resolveWireEffort as ac, validateCustomProviderConfig as ad, verifyProviderCredential as ae, 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 p, clearRuntimeModelProviders as q, createCustomProvider as r, effortToLegacyReasoningMode as s, getAvailableProviderNames as t, getCustomModelCapabilities as u, getCustomProvider as v, getCustomProviderList as w, getCustomProviderModelDescriptors as x, getCustomProviderModels as y, getCustomProviderNames as z };
|
|
664
|
+
export type { ProviderName as P, ResolveWireEffortInput as R, KodaXModelCapabilities as i, ResolvedWireEffort as o };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f4 as WorkflowProcessTrackerOptions, eC as WorkflowEvent, e_ as WorkflowProcessSnapshot, eU as WorkflowProcessEvent } from './types.d-BA-Jwpfs.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 {
|
|
1
|
+
import { g as CreatableHistoryItem, a8 as ToolCall } from './public-api.d-B3AohsxN.js';
|
|
2
|
+
import { k as KodaXMessage, c as KodaXContentBlock } from './types.d-DIpZJKUl.js';
|
|
3
|
+
import { c3 as KodaXSessionUiHistoryItem, c7 as KodaXSessionUiToolCall } from './types.d-BA-Jwpfs.js';
|
|
4
4
|
|
|
5
5
|
interface RestoreHistoryItemsFromSessionInput {
|
|
6
6
|
messages: readonly KodaXMessage[];
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { k as KodaXMessage, H as KodaXReasoningRequest, a0 as KodaXTokenUsage } from './types.d-DIpZJKUl.js';
|
|
2
|
+
import { K as KodaXBaseProvider } from './base.d-4e74xDdy.js';
|
|
3
|
+
import { a as CostTracker } from './cost-tracker.d-BeaenODW.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* sideQuery — independent one-shot LLM invocation.
|
|
7
|
+
*
|
|
8
|
+
* Used by features that need a clean LLM call outside the main agent loop.
|
|
9
|
+
* The auto mode classifier (FEATURE_092) is the first consumer; future
|
|
10
|
+
* users include compaction, title generation, and SA mutation reflection.
|
|
11
|
+
*
|
|
12
|
+
* Constraints (deliberate):
|
|
13
|
+
* - tools=[] hardcoded — sideQuery is single-turn, no tool loop
|
|
14
|
+
* - text-only output — tool_use blocks from the model produce stopReason='error'
|
|
15
|
+
* - independent timeout (default 30s; callers may supply a bounded deadline)
|
|
16
|
+
* - independent cost bucket via querySource (mapped to TokenUsageRecord.role)
|
|
17
|
+
*
|
|
18
|
+
* Failure handling: never throws. Timeout, abort, provider error, and
|
|
19
|
+
* unexpected tool_use all produce a result with stopReason='timeout' /
|
|
20
|
+
* 'aborted' / 'error' so callers implement their own degradation.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
type SideQueryStopReason = 'end_turn' | 'max_tokens' | 'timeout' | 'aborted' | 'error';
|
|
24
|
+
interface SideQueryRequest {
|
|
25
|
+
readonly provider: KodaXBaseProvider;
|
|
26
|
+
readonly model: string;
|
|
27
|
+
readonly system: string;
|
|
28
|
+
readonly messages: readonly KodaXMessage[];
|
|
29
|
+
readonly reasoning?: KodaXReasoningRequest;
|
|
30
|
+
/** Optional per-request cap for small structured sidecar responses. */
|
|
31
|
+
readonly maxOutputTokens?: number;
|
|
32
|
+
readonly timeoutMs?: number;
|
|
33
|
+
readonly abortSignal?: AbortSignal;
|
|
34
|
+
readonly querySource: string;
|
|
35
|
+
readonly costTracker?: CostTracker;
|
|
36
|
+
}
|
|
37
|
+
interface SideQueryResult {
|
|
38
|
+
readonly text: string;
|
|
39
|
+
readonly usage: KodaXTokenUsage;
|
|
40
|
+
readonly costTracker?: CostTracker;
|
|
41
|
+
readonly stopReason: SideQueryStopReason;
|
|
42
|
+
/**
|
|
43
|
+
* Bounded request metadata only; prompts and response text are never copied.
|
|
44
|
+
* The built-in `sideQuery()` always supplies it. Optionality preserves source
|
|
45
|
+
* compatibility for existing SDK mocks and structural result adapters.
|
|
46
|
+
*/
|
|
47
|
+
readonly diagnostics?: SideQueryDiagnostics;
|
|
48
|
+
readonly error?: Error;
|
|
49
|
+
}
|
|
50
|
+
type SideQueryTerminalPhase = 'completed' | 'pre_output' | 'awaiting_text' | 'thinking' | 'streaming' | 'contract_error';
|
|
51
|
+
interface SideQueryDiagnostics {
|
|
52
|
+
readonly provider: string;
|
|
53
|
+
readonly model: string;
|
|
54
|
+
readonly timeoutMs: number;
|
|
55
|
+
readonly elapsedMs: number;
|
|
56
|
+
readonly systemBytes: number;
|
|
57
|
+
readonly messageBytes: number;
|
|
58
|
+
readonly promptBytes: number;
|
|
59
|
+
readonly retryCount: number;
|
|
60
|
+
readonly retryWaitMs: number;
|
|
61
|
+
/** Time until the first lifecycle/data event exposed by the provider adapter. */
|
|
62
|
+
readonly firstUpstreamEventMs?: number;
|
|
63
|
+
/** Time until the first non-empty thinking delta. */
|
|
64
|
+
readonly firstThinkingDeltaMs?: number;
|
|
65
|
+
/** Time until the first non-empty text delta. */
|
|
66
|
+
readonly firstTextDeltaMs?: number;
|
|
67
|
+
/** Time until the first non-empty text delta, when the adapter exposes it. */
|
|
68
|
+
readonly firstOutputMs?: number;
|
|
69
|
+
/** Time from the first observed text delta until termination. */
|
|
70
|
+
readonly streamMs?: number;
|
|
71
|
+
/** Honest coarse phase; provider adapters cannot split DNS/connect/remote queue. */
|
|
72
|
+
readonly terminalPhase: SideQueryTerminalPhase;
|
|
73
|
+
}
|
|
74
|
+
declare function sideQuery(req: SideQueryRequest): Promise<SideQueryResult>;
|
|
75
|
+
|
|
76
|
+
export { sideQuery as s };
|
|
77
|
+
export type { SideQueryDiagnostics as S, SideQueryRequest as a, SideQueryResult as b, SideQueryStopReason as c, SideQueryTerminalPhase as d };
|