@kodax-ai/kodax 0.7.43 → 0.7.45
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 +80 -0
- package/README.md +6 -5
- package/README_CN.md +6 -5
- package/dist/chunks/chunk-CZHIUJQS.js +535 -0
- package/dist/chunks/{chunk-IYSK7LUK.js → chunk-FKB7BWQT.js} +1 -1
- package/dist/chunks/chunk-FT2XFFNP.js +2 -0
- package/dist/chunks/chunk-IJUB7QXG.js +425 -0
- package/dist/chunks/chunk-PGF5EZ7C.js +31 -0
- package/dist/chunks/chunk-X6EHEQWP.js +849 -0
- package/dist/chunks/{compaction-config-3E57ABCT.js → compaction-config-WCNGYWT3.js} +1 -1
- package/dist/chunks/{construction-bootstrap-JR63KI5N.js → construction-bootstrap-OB5SDNBD.js} +1 -1
- package/dist/chunks/dist-C2VOGY5Z.js +2 -0
- package/dist/chunks/{dist-XANXEVTU.js → dist-Q2PQM7U7.js} +1 -1
- package/dist/chunks/{utils-HQ2QCKJA.js → utils-CHXCBR3Q.js} +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +2 -2
- package/dist/kodax_cli.js +764 -709
- package/dist/provider-capabilities.json +181 -0
- package/dist/sdk-agent.d.ts +108 -8
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +385 -13
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.d.ts +1 -1
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-repl.d.ts +7 -6
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-session.d.ts +2 -2
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-DMrGImMl.d.ts → bash-prefix-extractor.d-HrTUwtV7.d.ts} +597 -142
- package/dist/types-chunks/file-tracker.d-DOfaoCbJ.d.ts +633 -0
- package/dist/types-chunks/{resolver.d-CA68_NeH.d.ts → resolver.d-OMwxURit.d.ts} +17 -14
- package/dist/types-chunks/{storage.d-DPAEX7zS.d.ts → storage.d-BvTdjYQF.d.ts} +13 -1
- package/dist/types-chunks/{file-tracker.d-zaLZeNBK.d.ts → types.d-DM8zEJgF.d.ts} +1029 -535
- package/dist/types-chunks/{types.d-mM8vqvhT.d.ts → types.d-HBbWT-iA.d.ts} +41 -3
- package/dist/types-chunks/{utils.d-DkLZD_wa.d.ts → utils.d-DSEX6Rq1.d.ts} +15 -3
- package/package.json +2 -2
- package/dist/chunks/chunk-7G5PSL6C.js +0 -830
- package/dist/chunks/chunk-K75O2CAE.js +0 -31
- package/dist/chunks/chunk-UG4262JI.js +0 -502
- package/dist/chunks/chunk-VHKAJDQD.js +0 -425
- package/dist/chunks/chunk-YMRZBS4G.js +0 -2
- package/dist/chunks/dist-KWHUKXEL.js +0 -2
- package/dist/types-chunks/types.d-CKJtjo-6.d.ts +0 -1127
|
@@ -154,21 +154,24 @@ declare abstract class KodaXOpenAICompatProvider extends KodaXBaseProvider {
|
|
|
154
154
|
* Provider 注册表 - 统一管理所有 Provider
|
|
155
155
|
*/
|
|
156
156
|
|
|
157
|
-
type ProviderName = 'anthropic' | 'openai' | 'deepseek' | 'kimi' | 'kimi-code' | 'qwen' | 'zhipu' | 'zhipu-coding' | 'minimax-coding' | 'mimo-coding' | 'ark-coding' | 'gemini-cli' | 'codex-cli';
|
|
157
|
+
type ProviderName = 'anthropic' | 'openai' | 'deepseek' | 'kimi' | 'kimi-code' | 'qwen' | 'zhipu' | 'zhipu-coding' | 'minimax-coding' | 'mimo-coding' | 'mimo' | 'ark-coding' | 'gemini-cli' | 'codex-cli';
|
|
158
158
|
/**
|
|
159
|
-
* Per-provider static metadata. v0.7.43
|
|
159
|
+
* Per-provider static metadata. v0.7.43 promoted this from a partial
|
|
160
160
|
* descriptor (`models: string[]`) to the full capability surface so
|
|
161
161
|
* SDK consumers can read context windows / max output tokens /
|
|
162
162
|
* thinking-budget caps / per-model descriptors without instantiating
|
|
163
163
|
* a Provider class (which previously required a valid API key just
|
|
164
|
-
* to read static metadata
|
|
164
|
+
* to read static metadata).
|
|
165
165
|
*
|
|
166
|
-
*
|
|
166
|
+
* v0.7.44 FEATURE_198 moved the data into a separate JSON file
|
|
167
|
+
* (`provider-capabilities.json`) so it can be patched without a
|
|
168
|
+
* KodaX release. The structural type below mirrors the JSON-resolved
|
|
169
|
+
* shape and remains the single source of truth for capability data;
|
|
167
170
|
* Provider classes derive their runtime `config` from it via
|
|
168
171
|
* `buildProviderConfig`.
|
|
169
172
|
*/
|
|
170
173
|
type ProviderSnapshot = {
|
|
171
|
-
model: string;
|
|
174
|
+
readonly model: string;
|
|
172
175
|
/**
|
|
173
176
|
* Alternative model descriptors beyond the default `model`. Carries
|
|
174
177
|
* per-model capability overrides (`contextWindow` / `maxOutputTokens` /
|
|
@@ -177,19 +180,19 @@ type ProviderSnapshot = {
|
|
|
177
180
|
* gaps a descriptor leaves unset. The default model has no descriptor
|
|
178
181
|
* entry — it inherits provider-level defaults directly.
|
|
179
182
|
*/
|
|
180
|
-
models?: readonly KodaXModelDescriptor[];
|
|
181
|
-
apiKeyEnv: string;
|
|
182
|
-
reasoningCapability: KodaXReasoningCapability;
|
|
183
|
-
modelReasoningCapabilities?:
|
|
184
|
-
capabilityProfile: KodaXProviderCapabilityProfile;
|
|
183
|
+
readonly models?: readonly KodaXModelDescriptor[];
|
|
184
|
+
readonly apiKeyEnv: string;
|
|
185
|
+
readonly reasoningCapability: KodaXReasoningCapability;
|
|
186
|
+
readonly modelReasoningCapabilities?: Readonly<Record<string, KodaXReasoningCapability>>;
|
|
187
|
+
readonly capabilityProfile: KodaXProviderCapabilityProfile;
|
|
185
188
|
/** Maximum input context window (tokens). Provider-level default. */
|
|
186
|
-
contextWindow?: number;
|
|
189
|
+
readonly contextWindow?: number;
|
|
187
190
|
/** Per-turn output token cap KodaX requests. Provider-level default. */
|
|
188
|
-
maxOutputTokens?: number;
|
|
191
|
+
readonly maxOutputTokens?: number;
|
|
189
192
|
/** Upper bound on `thinking_budget` for native-budget reasoning providers. */
|
|
190
|
-
thinkingBudgetCap?: number;
|
|
193
|
+
readonly thinkingBudgetCap?: number;
|
|
191
194
|
/** Whether the provider supports `thinking_budget` / native reasoning. */
|
|
192
|
-
supportsThinking?: boolean;
|
|
195
|
+
readonly supportsThinking?: boolean;
|
|
193
196
|
};
|
|
194
197
|
declare const KODAX_PROVIDER_SNAPSHOTS: Record<ProviderName, ProviderSnapshot>;
|
|
195
198
|
declare const KODAX_PROVIDERS: Record<string, () => KodaXBaseProvider>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as KodaXSessionData, s as KodaXSessionLineage, v as KodaXSessionNavigationOptions, w as KodaXSessionRuntimeInfo, y as KodaXSessionStorage } from './types.d-HBbWT-iA.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Session Storage - Session storage abstraction layer
|
|
@@ -109,6 +109,18 @@ declare class FileSessionStorage implements KodaXSessionStorage {
|
|
|
109
109
|
}>>;
|
|
110
110
|
delete(id: string): Promise<void>;
|
|
111
111
|
deleteAll(gitRoot?: string): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Auto-retention: delete session files (`.jsonl` + `.archive.jsonl`) whose
|
|
114
|
+
* mtime is older than `retentionDays`. Modeled on claudecode's
|
|
115
|
+
* `cleanup.ts` (`unlinkIfOld`). Bounds the sessions directory so it never
|
|
116
|
+
* accumulates unboundedly — which is what keeps `list()`'s head-read pass
|
|
117
|
+
* fast (its cost scales with file COUNT, not size). A non-positive /
|
|
118
|
+
* non-finite `retentionDays` disables cleanup (no-op). Best-effort: per-file
|
|
119
|
+
* errors are swallowed so a single locked/racing file never aborts the
|
|
120
|
+
* sweep. Returns the number of files removed. mtime-based, so the session
|
|
121
|
+
* currently being written/resumed (fresh mtime) is never eligible.
|
|
122
|
+
*/
|
|
123
|
+
cleanupOldSessions(retentionDays: number): Promise<number>;
|
|
112
124
|
}
|
|
113
125
|
|
|
114
126
|
export { FileSessionStorage as F, MemorySessionStorage as M, createMemorySessionStorage as c };
|