@kodax-ai/kodax 0.7.71 → 0.7.72
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 +602 -487
- package/README.md +46 -27
- package/README_CN.md +30 -13
- package/dist/chunks/agent-YKGU4USA.js +2 -0
- package/dist/chunks/argument-completer-QZETLNAB.js +2 -0
- package/dist/chunks/{chunk-SX2WFHIS.js → chunk-2RI252RN.js} +1 -1
- package/dist/chunks/chunk-CLFP6UGU.js +71 -0
- package/dist/chunks/chunk-E27LHEIP.js +37 -0
- package/dist/chunks/chunk-EDZ5KJFT.js +5 -0
- package/dist/chunks/chunk-GIK4SGAT.js +364 -0
- package/dist/chunks/chunk-GVWPHE23.js +310 -0
- package/dist/chunks/{chunk-A2TFSV5M.js → chunk-IR5KIK7E.js} +1 -1
- package/dist/chunks/chunk-JSDLBXME.js +755 -0
- package/dist/chunks/chunk-MVARIMQV.js +22 -0
- package/dist/chunks/chunk-PKQOEDHJ.js +628 -0
- package/dist/chunks/{chunk-64NQBOSN.js → chunk-SQODXBLX.js} +1 -1
- package/dist/chunks/chunk-VDGCGOQH.js +328 -0
- package/dist/chunks/chunk-VVE3UM4F.js +410 -0
- package/dist/chunks/chunk-WIBLZK4G.js +151 -0
- package/dist/chunks/{compaction-config-5KKKXYFT.js → compaction-config-TWCDFLX6.js} +1 -1
- package/dist/chunks/{construction-bootstrap-OXDDDW6O.js → construction-bootstrap-ZJPXUPXQ.js} +1 -1
- package/dist/chunks/dist-JT4ATXVM.js +2 -0
- package/dist/chunks/host-SVEDZUC5.js +2 -0
- package/dist/chunks/{run-manager-Z3W6MDO7.js → run-manager-RX42UNEM.js} +1 -1
- package/dist/chunks/{utils-CFOXDCB5.js → utils-OTT5CG5J.js} +1 -1
- package/dist/index.d.ts +13 -13
- package/dist/index.js +4 -4
- package/dist/kodax_bootstrap.js +28 -0
- package/dist/kodax_cli.js +1325 -1333
- package/dist/kodax_resume.js +44 -0
- package/dist/provider-capabilities.json +50 -48
- package/dist/runtime-worker.js +1322 -1330
- package/dist/sdk-a2a.d.ts +10 -9
- package/dist/sdk-a2a.js +1 -1
- package/dist/sdk-agent.d.ts +382 -206
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +80 -128
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +3 -0
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +71 -23
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +143 -31
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-session.d.ts +6 -5
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.d.ts +5 -5
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +14 -14
- package/dist/types-chunks/{bash-prefix-extractor.d-YoiZl5yt.d.ts → bash-prefix-extractor.d-CHJO5y94.d.ts} +107 -248
- package/dist/types-chunks/{capsule.d-CK5Pfz1k.d.ts → capsule.d-DxtdE-GD.d.ts} +24 -95
- package/dist/types-chunks/center-types.d-BBT122uJ.d.ts +91 -0
- package/dist/types-chunks/{commands.d-D6g2jq8V.d.ts → commands.d-DZxHzH5-.d.ts} +6 -4
- package/dist/types-chunks/{guardrail.d-DilYC1dh.d.ts → guardrail.d-DlpMnd-Y.d.ts} +1 -1
- package/dist/types-chunks/{guardrail.d-DdeDWnVu.d.ts → guardrail.d-auV61_h5.d.ts} +83 -10
- package/dist/types-chunks/public-api.d--IDNJsu1.d.ts +1342 -0
- package/dist/types-chunks/{run-manager.d-DxU3SSGR.d.ts → run-manager.d-Bh50OdVl.d.ts} +1 -1
- package/dist/types-chunks/sdk-session-Cfw6NFu-.d.ts +82 -0
- package/dist/types-chunks/{types.d-CEZZSY9s.d.ts → types.d-CNZgY52F.d.ts} +2 -2
- package/dist/types-chunks/{types.d-vJExiRje.d.ts → types.d-DCQVBqVn.d.ts} +10 -5
- package/dist/types-chunks/{types.d-CRCaLt_s.d.ts → types.d-DH1mvdcl.d.ts} +284 -164
- package/dist/types-chunks/{types.d-CzsLFqmf.d.ts → types.d-EqQmHztg.d.ts} +9 -10
- package/dist/types-chunks/{utils.d-Cb6vdvFM.d.ts → utils.d-gmn3c5U4.d.ts} +9 -12
- package/docs/SDK_EMBEDDER_GUIDE.md +171 -26
- package/package.json +4 -4
- package/scripts/kodax-bin.cjs +4 -2
- package/scripts/production-env.cjs +9 -0
- package/dist/chunks/agent-X2EWQADL.js +0 -2
- package/dist/chunks/argument-completer-BLNXDO2F.js +0 -2
- package/dist/chunks/chunk-4DY756KL.js +0 -70
- package/dist/chunks/chunk-52JSZ77P.js +0 -37
- package/dist/chunks/chunk-A574DBTV.js +0 -422
- package/dist/chunks/chunk-F7KGYHJ3.js +0 -624
- package/dist/chunks/chunk-GVTM4Z6O.js +0 -151
- package/dist/chunks/chunk-PHH4TRGF.js +0 -22
- package/dist/chunks/chunk-PVUXONQB.js +0 -366
- package/dist/chunks/chunk-T7LYK53M.js +0 -329
- package/dist/chunks/chunk-VRSVNU2Y.js +0 -7
- package/dist/chunks/chunk-Y5XKAN7C.js +0 -755
- package/dist/chunks/chunk-Z535BARK.js +0 -306
- package/dist/chunks/dist-IXJRJ27U.js +0 -2
- package/dist/chunks/host-VRKDAN26.js +0 -2
- package/dist/types-chunks/public-api.d-BvCp5VkW.d.ts +0 -601
- package/dist/types-chunks/sdk-session-wGpa7X_U.d.ts +0 -796
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ef as WorkflowProcessTrackerOptions, dN as WorkflowEvent, e9 as WorkflowProcessSnapshot, e3 as WorkflowProcessEvent } from './types.d-DH1mvdcl.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* FEATURE_246 Part A0 (ADR-046) — neutral workflow run lifecycle manager.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { g as CreatableHistoryItem, a8 as ToolCall } from './public-api.d--IDNJsu1.js';
|
|
2
|
+
import { k as KodaXMessage, c as KodaXContentBlock } from './types.d-Cqaw71Ax.js';
|
|
3
|
+
import { bW as KodaXSessionUiHistoryItem, b_ as KodaXSessionUiToolCall } from './types.d-DH1mvdcl.js';
|
|
4
|
+
|
|
5
|
+
interface RestoreHistoryItemsFromSessionInput {
|
|
6
|
+
messages: readonly KodaXMessage[];
|
|
7
|
+
uiHistory?: readonly KodaXSessionUiHistoryItem[];
|
|
8
|
+
}
|
|
9
|
+
declare function trimPersistedUiHistorySnapshot(items: readonly KodaXSessionUiHistoryItem[]): KodaXSessionUiHistoryItem[];
|
|
10
|
+
declare function restoreHistoryItemsFromSession(input: RestoreHistoryItemsFromSessionInput): CreatableHistoryItem[];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Utilities for extracting message content for history rendering, copy, and previews.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
type RestoredHistorySeed = ({
|
|
17
|
+
type: "user";
|
|
18
|
+
text: string;
|
|
19
|
+
} | {
|
|
20
|
+
type: "assistant";
|
|
21
|
+
text: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: "system";
|
|
24
|
+
text: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: "thinking";
|
|
27
|
+
text: string;
|
|
28
|
+
} | {
|
|
29
|
+
type: "sidecar";
|
|
30
|
+
text: string;
|
|
31
|
+
verdict?: "revise" | "blocked";
|
|
32
|
+
} | {
|
|
33
|
+
type: "task_completed";
|
|
34
|
+
text: string;
|
|
35
|
+
} | {
|
|
36
|
+
type: "tool_summary";
|
|
37
|
+
text: string;
|
|
38
|
+
} | {
|
|
39
|
+
type: "tool_group";
|
|
40
|
+
tools: KodaXSessionUiToolCall[];
|
|
41
|
+
}) & {
|
|
42
|
+
timestamp?: number;
|
|
43
|
+
};
|
|
44
|
+
/** Convert a RestoredHistorySeed to a CreatableHistoryItem. tool_summary / task_completed → event with icon. */
|
|
45
|
+
declare function seedToHistoryItem(seed: RestoredHistorySeed): CreatableHistoryItem;
|
|
46
|
+
declare function toolCallSeedToHistoryToolCall(tool: KodaXSessionUiToolCall): ToolCall;
|
|
47
|
+
/**
|
|
48
|
+
* Minimal message shape required to restore UI history items.
|
|
49
|
+
*/
|
|
50
|
+
interface HistorySeedSourceMessage {
|
|
51
|
+
role: KodaXMessage["role"];
|
|
52
|
+
content: string | KodaXContentBlock[];
|
|
53
|
+
timestamp?: string;
|
|
54
|
+
_synthetic?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Provenance marker persisted on host-injected messages. `'sidecar-verifier'`
|
|
57
|
+
* tags the synthetic user message the Sidecar Verifier injects on a `revise`
|
|
58
|
+
* verdict; `'agent-completed'` tags a synthetic actor-result notification.
|
|
59
|
+
* Legacy `'task-completed'` values are still accepted while restoring older
|
|
60
|
+
* sessions. Both render under their own identity instead of being swallowed
|
|
61
|
+
* by the generic `_synthetic` skip.
|
|
62
|
+
*/
|
|
63
|
+
_source?: string;
|
|
64
|
+
}
|
|
65
|
+
declare function extractHistorySeedsFromMessage(message: HistorySeedSourceMessage): RestoredHistorySeed[];
|
|
66
|
+
declare function extractHistorySeedsFromMessages(messages: readonly HistorySeedSourceMessage[]): RestoredHistorySeed[];
|
|
67
|
+
/**
|
|
68
|
+
* Extract plain text from message content.
|
|
69
|
+
* Thinking/tool blocks are omitted so callers get only visible assistant text.
|
|
70
|
+
*/
|
|
71
|
+
declare function extractTextContent(content: string | readonly unknown[]): string;
|
|
72
|
+
/**
|
|
73
|
+
* Extract a session title from the first user message.
|
|
74
|
+
*/
|
|
75
|
+
declare function extractTitle(messages: KodaXMessage[]): string;
|
|
76
|
+
/**
|
|
77
|
+
* Format a single-line preview for session lists.
|
|
78
|
+
*/
|
|
79
|
+
declare function formatMessagePreview(content: string, maxLength?: number): string;
|
|
80
|
+
|
|
81
|
+
export { extractHistorySeedsFromMessages as b, extractTextContent as c, extractTitle as d, extractHistorySeedsFromMessage as e, formatMessagePreview as f, trimPersistedUiHistorySnapshot as g, restoreHistoryItemsFromSession as r, seedToHistoryItem as s, toolCallSeedToHistoryToolCall as t };
|
|
82
|
+
export type { HistorySeedSourceMessage as H, RestoreHistoryItemsFromSessionInput as R, RestoredHistorySeed as a };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bv as KodaXInputArtifact } from './types.d-DH1mvdcl.js';
|
|
2
2
|
import { S as KodaXTaskResultMetadata } from './types.d-Cqaw71Ax.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -97,7 +97,7 @@ interface DequeueFilter {
|
|
|
97
97
|
* - `dequeued` fires ONCE per `dequeue()` call that removed ≥1 message,
|
|
98
98
|
* carrying ALL drained messages in priority+FIFO order. No-op drains
|
|
99
99
|
* (filter matched nothing) fire no event — quiet by design so the
|
|
100
|
-
*
|
|
100
|
+
* idle consumers can probe without spamming subscribers.
|
|
101
101
|
* - `cleared` fires ONCE per `clear()` call that removed ≥1 message,
|
|
102
102
|
* carrying the pre-clear messages. Empty-queue clear fires nothing.
|
|
103
103
|
*
|
|
@@ -55,7 +55,7 @@ interface SkillMetadata {
|
|
|
55
55
|
userInvocable: boolean;
|
|
56
56
|
argumentHint?: string;
|
|
57
57
|
path: string;
|
|
58
|
-
source:
|
|
58
|
+
source: ResolvedSkillSource;
|
|
59
59
|
/** If true, exclude from system prompt; still invokable by explicit slash forms. */
|
|
60
60
|
disableModelInvocation: boolean;
|
|
61
61
|
}
|
|
@@ -79,7 +79,7 @@ interface Skill extends SkillFrontmatter {
|
|
|
79
79
|
resources?: SkillFile[];
|
|
80
80
|
/** Runtime state */
|
|
81
81
|
loaded: boolean;
|
|
82
|
-
source:
|
|
82
|
+
source: ResolvedSkillSource;
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
85
|
* File within a skill directory
|
|
@@ -91,6 +91,8 @@ interface SkillFile {
|
|
|
91
91
|
content?: string;
|
|
92
92
|
}
|
|
93
93
|
type SkillSource = 'project' | 'user' | 'plugin' | 'builtin';
|
|
94
|
+
/** Runtime discovery output; learned Skills remain lower precedence than formal sources. */
|
|
95
|
+
type ResolvedSkillSource = SkillSource | 'learned';
|
|
94
96
|
/**
|
|
95
97
|
* Skill registry interface for managing discovered skills
|
|
96
98
|
*/
|
|
@@ -202,6 +204,7 @@ interface SkillPathsConfig {
|
|
|
202
204
|
userPaths: string[];
|
|
203
205
|
pluginPaths: string[];
|
|
204
206
|
builtinPath: string;
|
|
207
|
+
learnedPath?: string;
|
|
205
208
|
}
|
|
206
209
|
/**
|
|
207
210
|
* Get default skill discovery paths
|
|
@@ -212,21 +215,23 @@ interface SkillPathsConfig {
|
|
|
212
215
|
* 3. User - ~/.agents/skills/ (AgentSkills standard)
|
|
213
216
|
* 4. Plugin - (dynamic)
|
|
214
217
|
* 5. Builtin - packages/skills/src/builtin/
|
|
218
|
+
* 6. Learned - ~/.kodax/learned/skills/ (never shadows a formal source)
|
|
215
219
|
*/
|
|
216
220
|
declare function getDefaultSkillPaths(projectRoot?: string): SkillPathsConfig;
|
|
217
221
|
/**
|
|
218
222
|
* All skill paths in priority order (highest to lowest)
|
|
219
223
|
*
|
|
220
|
-
* Priority: Project > User > Plugin > Builtin
|
|
224
|
+
* Priority: Project > User > Plugin > Builtin > Learned
|
|
221
225
|
* - Project: Project-specific skills override everything else
|
|
222
226
|
* - User: User preferences (~/.kodax/ and ~/.agents/)
|
|
223
227
|
* - Plugin: Third-party plugins
|
|
224
228
|
* - Builtin: Default skills shipped with KodaX
|
|
229
|
+
* - Learned: Runtime-governed Skills, always lower precedence than formal sources
|
|
225
230
|
*/
|
|
226
231
|
declare function getSkillPathsFlat(config: SkillPathsConfig): Array<{
|
|
227
232
|
path: string;
|
|
228
|
-
source:
|
|
233
|
+
source: ResolvedSkillSource;
|
|
229
234
|
}>;
|
|
230
235
|
|
|
231
236
|
export { getDefaultSkillPaths as m, getSkillPathsFlat as n };
|
|
232
|
-
export type { ISkillRegistry as I, 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 };
|
|
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 };
|