@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,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as KodaXTaskResultMetadata } from './types.d-
|
|
1
|
+
import { bD as KodaXInputArtifact } from './types.d-BA-Jwpfs.js';
|
|
2
|
+
import { S as KodaXTaskResultMetadata } from './types.d-DIpZJKUl.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @kodax-ai/agent/messaging — Message queue types
|
|
@@ -56,6 +56,11 @@ interface SkillMetadata {
|
|
|
56
56
|
argumentHint?: string;
|
|
57
57
|
path: string;
|
|
58
58
|
source: ResolvedSkillSource;
|
|
59
|
+
readonly learned?: {
|
|
60
|
+
readonly capabilityId: string;
|
|
61
|
+
readonly revision: number;
|
|
62
|
+
readonly fingerprint: string;
|
|
63
|
+
};
|
|
59
64
|
/** If true, exclude from system prompt; still invokable by explicit slash forms. */
|
|
60
65
|
disableModelInvocation: boolean;
|
|
61
66
|
}
|
|
@@ -204,7 +209,22 @@ interface SkillPathsConfig {
|
|
|
204
209
|
userPaths: string[];
|
|
205
210
|
pluginPaths: string[];
|
|
206
211
|
builtinPath: string;
|
|
212
|
+
/**
|
|
213
|
+
* Deprecated loose-file path. It remains in the public shape for source
|
|
214
|
+
* compatibility but is intentionally not discovered without a manifest.
|
|
215
|
+
*/
|
|
207
216
|
learnedPath?: string;
|
|
217
|
+
learnedArea?: LearnedSkillDiscoveryConfig;
|
|
218
|
+
}
|
|
219
|
+
interface LearnedSkillDiscoveryConfig {
|
|
220
|
+
readonly rootDir: string;
|
|
221
|
+
readonly expectedScope: {
|
|
222
|
+
readonly configHomeHash: string;
|
|
223
|
+
readonly tenantHash: string;
|
|
224
|
+
readonly projectHash: string;
|
|
225
|
+
};
|
|
226
|
+
readonly testingBindings?: Readonly<Record<string, string>>;
|
|
227
|
+
readonly now?: string;
|
|
208
228
|
}
|
|
209
229
|
/**
|
|
210
230
|
* Get default skill discovery paths
|
|
@@ -215,13 +235,15 @@ interface SkillPathsConfig {
|
|
|
215
235
|
* 3. User - ~/.agents/skills/ (AgentSkills standard)
|
|
216
236
|
* 4. Plugin - (dynamic)
|
|
217
237
|
* 5. Builtin - packages/skills/src/builtin/
|
|
218
|
-
*
|
|
238
|
+
* Learned Skills are supplied separately through a record-gated Learned Area
|
|
239
|
+
* and never through a loose directory.
|
|
219
240
|
*/
|
|
220
241
|
declare function getDefaultSkillPaths(projectRoot?: string): SkillPathsConfig;
|
|
221
242
|
/**
|
|
222
243
|
* All skill paths in priority order (highest to lowest)
|
|
223
244
|
*
|
|
224
|
-
* Priority: Project > User > Plugin > Builtin
|
|
245
|
+
* Priority: Project > User > Plugin > Builtin. Record-gated Learned Skills
|
|
246
|
+
* are appended by discovery after these formal sources.
|
|
225
247
|
* - Project: Project-specific skills override everything else
|
|
226
248
|
* - User: User preferences (~/.kodax/ and ~/.agents/)
|
|
227
249
|
* - Plugin: Third-party plugins
|
|
@@ -234,4 +256,4 @@ declare function getSkillPathsFlat(config: SkillPathsConfig): Array<{
|
|
|
234
256
|
}>;
|
|
235
257
|
|
|
236
258
|
export { getDefaultSkillPaths as m, getSkillPathsFlat as n };
|
|
237
|
-
export type { ISkillRegistry as I, ResolvedSkillSource as R, Skill as S, IVariableResolver as a, SkillArtifact as b, SkillContext as c, SkillDynamicContextExecutor as d, SkillFile as e, SkillFrontmatter as f, SkillHook as g, SkillHooks as h, SkillMetadata as i, SkillPathsConfig as j, SkillResult as k, SkillSource as l };
|
|
259
|
+
export type { ISkillRegistry as I, LearnedSkillDiscoveryConfig as L, ResolvedSkillSource as R, Skill as S, IVariableResolver as a, SkillArtifact as b, SkillContext as c, SkillDynamicContextExecutor as d, SkillFile as e, SkillFrontmatter as f, SkillHook as g, SkillHooks as h, SkillMetadata as i, SkillPathsConfig as j, SkillResult as k, SkillSource as l };
|
|
@@ -473,6 +473,14 @@ interface KodaXCustomProviderConfig {
|
|
|
473
473
|
contextWindow?: number;
|
|
474
474
|
maxOutputTokens?: number;
|
|
475
475
|
thinkingBudgetCap?: number;
|
|
476
|
+
/**
|
|
477
|
+
* Opt in only when this exact endpoint is known to accept the protocol's
|
|
478
|
+
* cache-affinity field. Anthropic-compatible providers lower it to
|
|
479
|
+
* `metadata.user_id`; OpenAI-compatible providers lower it to
|
|
480
|
+
* `prompt_cache_key`. Disabled by default because strict compatibility
|
|
481
|
+
* gateways may reject unknown request fields.
|
|
482
|
+
*/
|
|
483
|
+
promptCacheAffinity?: boolean;
|
|
476
484
|
/**
|
|
477
485
|
* Provider-level default for OpenAI-compat `reasoning_content` echo.
|
|
478
486
|
* Required by DeepSeek V4 thinking mode (replay 400s without it).
|
|
@@ -523,6 +531,8 @@ interface KodaXProviderConfig {
|
|
|
523
531
|
maxOutputTokens?: number;
|
|
524
532
|
/** Provider thinking budget 上限 */
|
|
525
533
|
thinkingBudgetCap?: number;
|
|
534
|
+
/** Whether this verified endpoint accepts the protocol cache-affinity field. */
|
|
535
|
+
promptCacheAffinity?: boolean;
|
|
526
536
|
/** Provider 默认 thinking budget 映射 */
|
|
527
537
|
defaultThinkingBudgets?: Partial<KodaXThinkingBudgetMap>;
|
|
528
538
|
/** 按任务类型覆盖默认 budget */
|
|
@@ -580,6 +590,11 @@ interface KodaXProviderConfig {
|
|
|
580
590
|
interface KodaXProviderStreamOptions {
|
|
581
591
|
/** Request-only tail context. Providers must not mutate persisted messages. */
|
|
582
592
|
ephemeralSuffix?: KodaXEphemeralSuffix;
|
|
593
|
+
/**
|
|
594
|
+
* Opaque stable logical-context key used only for Provider cache routing.
|
|
595
|
+
* Protocol adapters lower it only when their endpoint explicitly opts in.
|
|
596
|
+
*/
|
|
597
|
+
promptCacheKey?: string;
|
|
583
598
|
onTextDelta?: (text: string) => void;
|
|
584
599
|
onThinkingDelta?: (text: string) => void;
|
|
585
600
|
onThinkingEnd?: (thinking: string) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a9 as KodaXWireReasoningEffort, a1 as KodaXToolDefinition, a3 as KodaXToolResultContentItem, k as KodaXMessage } from './types.d-
|
|
2
|
-
import { K as KodaXBaseProvider } from './base.d-
|
|
1
|
+
import { a9 as KodaXWireReasoningEffort, a1 as KodaXToolDefinition, a3 as KodaXToolResultContentItem, k as KodaXMessage } from './types.d-DIpZJKUl.js';
|
|
2
|
+
import { K as KodaXBaseProvider } from './base.d-4e74xDdy.js';
|
|
3
3
|
import { C as CapabilityKind, a as CapabilityProvider } from './capability.d-K664nHOS.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { bF as KodaXJsonValue, bt as KodaXExtensionSessionRecord, bv as KodaXExtensionStore } from './types.d-BA-Jwpfs.js';
|
|
5
|
+
import { aP as KodaXToolExecutionContext, bx as ToolSideEffect } from './bash-prefix-extractor.d-uAe2Oqda.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* KodaX Constructed-World types (FEATURE_087, v0.7.28).
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { k as KodaXMessage, F as KodaXReasoningMode, d as KodaXCustomProviderConfig, p as KodaXProviderCapabilityProfile } from './types.d-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { d as AgentsFile,
|
|
1
|
+
import { k as KodaXMessage, F as KodaXReasoningMode, d as KodaXCustomProviderConfig, p as KodaXProviderCapabilityProfile } from './types.d-DIpZJKUl.js';
|
|
2
|
+
import { c3 as KodaXSessionUiHistoryItem, bU as KodaXSessionLineage, bL as KodaXSessionArtifactLedgerEntry, bu as KodaXExtensionSessionState, bt as KodaXExtensionSessionRecord, b$ as KodaXSessionRuntimeInfo, e$ as WorkflowProcessSource } from './types.d-BA-Jwpfs.js';
|
|
3
|
+
import { O as KodaXContextTokenSnapshot, as as KodaXSkillDynamicContextPolicy, t as KodaXAgentMode, a8 as KodaXRepoIntelligenceMode, a1 as KodaXOptions, at as KodaXSkillInvocationContext } from './bash-prefix-extractor.d-uAe2Oqda.js';
|
|
4
|
+
import { d as AgentsFile, s as AutoModeStats, J as KodaXMcpServersConfig } from './guardrail.d-CXDYRgZ3.js';
|
|
5
5
|
import * as readline from 'readline';
|
|
6
|
-
import { R as PermissionMode, L as LearningBinding, E as LearningSurfaceSnapshot } from './public-api.d-
|
|
6
|
+
import { R as PermissionMode, L as LearningBinding, E as LearningSurfaceSnapshot } from './public-api.d-B3AohsxN.js';
|
|
7
7
|
import { SpawnSyncReturns } from 'child_process';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -310,6 +310,22 @@ interface CommandCallbacks {
|
|
|
310
310
|
rewindSession?: (selector?: string) => Promise<SessionRewindStatus>;
|
|
311
311
|
getCostReport?: () => string | null;
|
|
312
312
|
getRuntimeStatus?: () => Promise<RuntimeSurfaceStatus | undefined>;
|
|
313
|
+
/** Canonical host parser used by `/setup` for the root-owned A2A schema. */
|
|
314
|
+
validateSetupA2AConfig?: (value: unknown) => unknown;
|
|
315
|
+
/** Root-owned sandbox activation because ASRT is distributed by the host package. */
|
|
316
|
+
prepareSetupSandbox?: () => Promise<{
|
|
317
|
+
readonly status: 'ready' | 'cancelled' | 'unavailable';
|
|
318
|
+
readonly lines: readonly string[];
|
|
319
|
+
}>;
|
|
320
|
+
/** Explicit read-only `/sandbox` probe. Ordinary startup never calls it. */
|
|
321
|
+
inspectSandbox?: () => Promise<{
|
|
322
|
+
readonly ready: boolean;
|
|
323
|
+
readonly platform: string;
|
|
324
|
+
readonly version: string;
|
|
325
|
+
readonly backend: string;
|
|
326
|
+
readonly diagnostics: readonly string[];
|
|
327
|
+
readonly guidance: readonly string[];
|
|
328
|
+
}>;
|
|
313
329
|
learning?: LearningBinding;
|
|
314
330
|
getLearningSummary?: () => Promise<LearningSurfaceSnapshot>;
|
|
315
331
|
openLearningCenter?: (nameOrSlug?: string) => Promise<void>;
|
|
@@ -364,7 +380,7 @@ interface CommandDefinition {
|
|
|
364
380
|
aliases?: string[];
|
|
365
381
|
description: string;
|
|
366
382
|
usage?: string;
|
|
367
|
-
detailedHelp?: () => void;
|
|
383
|
+
detailedHelp?: (args?: readonly string[]) => void;
|
|
368
384
|
handler: CommandHandler;
|
|
369
385
|
source?: CommandSource;
|
|
370
386
|
priority?: CommandPriority;
|
|
@@ -406,7 +422,7 @@ interface Command {
|
|
|
406
422
|
description: string;
|
|
407
423
|
usage?: string;
|
|
408
424
|
handler: CommandHandler;
|
|
409
|
-
detailedHelp?: () => void;
|
|
425
|
+
detailedHelp?: (args?: readonly string[]) => void;
|
|
410
426
|
source?: CommandSource;
|
|
411
427
|
priority?: CommandPriority;
|
|
412
428
|
location?: 'user' | 'project' | 'path';
|