@kodax-ai/kodax 0.7.61 → 0.7.62
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 +56 -1
- package/dist/chunks/{agent-E74WVAFR.js → agent-4ZMCIEGD.js} +1 -1
- package/dist/chunks/argument-completer-5PWSKFKI.js +2 -0
- package/dist/chunks/{chunk-2OEKUAV4.js → chunk-2F4R7WM7.js} +1 -1
- package/dist/chunks/chunk-3KD26NCI.js +310 -0
- package/dist/chunks/{chunk-D7CC6YZC.js → chunk-6HTR3GHZ.js} +283 -259
- package/dist/chunks/{chunk-XHOPSZVL.js → chunk-AY3BLB4Q.js} +96 -96
- package/dist/chunks/chunk-E2Q4RIOD.js +731 -0
- package/dist/chunks/{chunk-KIVYMSRH.js → chunk-HO6P6CPU.js} +1 -1
- package/dist/chunks/{chunk-QCBKLNN5.js → chunk-JILSZHCQ.js} +2 -2
- package/dist/chunks/{chunk-CGGX3FXE.js → chunk-OGRJQGKO.js} +1 -1
- package/dist/chunks/{chunk-7COB3EKF.js → chunk-S4ISEA6F.js} +152 -152
- package/dist/chunks/chunk-WFE6FBQ2.js +326 -0
- package/dist/chunks/{compaction-config-GESEZQVA.js → compaction-config-SP3REMFR.js} +1 -1
- package/dist/chunks/{construction-bootstrap-OSXHEIBB.js → construction-bootstrap-4ZNFZFX2.js} +3 -3
- package/dist/chunks/{dist-W3OOJP66.js → dist-IKWRJW6J.js} +1 -1
- package/dist/chunks/host-XL5CH7QP.js +2 -0
- package/dist/chunks/{run-manager-FGCG7DFF.js → run-manager-UXIPDVVF.js} +1 -1
- package/dist/chunks/{utils-47QI5MSP.js → utils-XKWEVPE3.js} +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/kodax_cli.js +964 -931
- package/dist/sdk-agent.d.ts +67 -8
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +13 -13
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-repl.d.ts +9 -9
- package/dist/sdk-repl.js +1 -1
- package/dist/sdk-session.d.ts +4 -4
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-e1LD2IRl.d.ts → bash-prefix-extractor.d-Do_TCAmA.d.ts} +12 -9
- package/dist/types-chunks/{guardrail.d-CdqJwwN7.d.ts → guardrail.d-DRp0Lqvx.d.ts} +2 -2
- package/dist/types-chunks/{process.d-C93UMgPK.d.ts → process.d-DXkRD7hj.d.ts} +265 -13
- package/dist/types-chunks/{run-manager.d-DHPlNYkK.d.ts → run-manager.d-CYY3pZeJ.d.ts} +2 -2
- package/dist/types-chunks/{sdk-session-DINrM1pF.d.ts → sdk-session-BGGOC0cT.d.ts} +3 -3
- package/dist/types-chunks/{storage.d-xiw7Vgx0.d.ts → storage.d-C3umBC4g.d.ts} +2 -2
- package/dist/types-chunks/{types.d-CSZAMmU-.d.ts → types.d-DFf4Sfys.d.ts} +1 -1
- package/dist/types-chunks/{utils.d-Dy19-1XR.d.ts → utils.d-ChOEH3NF.d.ts} +4 -4
- package/package.json +1 -1
- package/dist/chunks/argument-completer-BBFYCVTM.js +0 -2
- package/dist/chunks/chunk-4NSOBQCU.js +0 -322
- package/dist/chunks/chunk-NJW2LQOP.js +0 -722
- package/dist/chunks/chunk-PJXKBM3Y.js +0 -310
- package/dist/chunks/host-FRQXOEHH.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as KodaXGoalState, h as AgentMessage, bL as StopHookFn, af as KodaXSessionLineage, a4 as KodaXJsonValue, U as KodaXExtensionSessionRecord, c7 as WorkflowIsolation, V as KodaXExtensionSessionState, a6 as KodaXSessionArtifactLedgerEntry, bw as SessionErrorMetadata, ak as KodaXSessionScope, al as KodaXSessionStorage, a2 as KodaXInputArtifact, C as ChildTaskRegistry, c4 as WorkflowEventCorrelation, x as CompactionUpdate, cg as WorkflowProcessEvent, c3 as WorkflowEvent, q as AskUserQuestionOptions, m as AskUserAnswer, o as AskUserMultiOptions, a$ as MemoryReviewPlan, b0 as MemoryReviewRunner, J as Guardrail, B as DiscoveredInstance, bP as TaskAbortRegistry } from './process.d-DXkRD7hj.js';
|
|
2
2
|
import { $ as KodaXTokenUsage, j as KodaXMessage, a8 as KodaXWireReasoningEffort, T as KodaXTaskRoutingDecision, U as KodaXTaskType, V as KodaXTaskWorkIntent, P as KodaXTaskComplexity, J as KodaXRiskLevel, g as KodaXHarnessProfile, e as KodaXExecutionMode, b as KodaXChildFanoutClass, E as KodaXReasoningMode, I as KodaXReviewScale } from './types.d-Bp4Lm1jv.js';
|
|
3
3
|
import { d as SkillDynamicContextExecutor } from './types.d-vJExiRje.js';
|
|
4
4
|
import { Diagnostic, Position, Location, Hover, DocumentSymbol, SymbolInformation, WorkspaceSymbol, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-protocol';
|
|
@@ -1681,11 +1681,11 @@ interface KodaXEvents {
|
|
|
1681
1681
|
};
|
|
1682
1682
|
/** Tool execution hook - called before tool execution, return false to block - 工具执行前回调 */
|
|
1683
1683
|
beforeToolExecute?: (tool: string, input: Record<string, unknown>, meta?: KodaXToolEventMeta) => Promise<boolean | string>;
|
|
1684
|
-
/** Ask user a question interactively - Issue 069
|
|
1685
|
-
*
|
|
1686
|
-
askUser?: (options: AskUserQuestionOptions, meta?: KodaXToolEventMeta) => Promise<
|
|
1684
|
+
/** Ask user a question interactively - Issue 069. Select answers may be
|
|
1685
|
+
* strings, arrays, or structured custom-input answers. */
|
|
1686
|
+
askUser?: (options: AskUserQuestionOptions, meta?: KodaXToolEventMeta) => Promise<AskUserAnswer>;
|
|
1687
1687
|
/** Ask user multiple independent questions sequentially - 澶氶棶棰橀『搴忔彁闂?*/
|
|
1688
|
-
askUserMulti?: (options: AskUserMultiOptions, meta?: KodaXToolEventMeta) => Promise<Record<string,
|
|
1688
|
+
askUserMulti?: (options: AskUserMultiOptions, meta?: KodaXToolEventMeta) => Promise<Record<string, AskUserAnswer> | undefined>;
|
|
1689
1689
|
/** Ask user for free-text input - 自由文本输入 (Issue 112) */
|
|
1690
1690
|
askUserInput?: (options: {
|
|
1691
1691
|
question: string;
|
|
@@ -1701,6 +1701,8 @@ interface KodaXEvents {
|
|
|
1701
1701
|
* explicit error instead of a silent no-op.
|
|
1702
1702
|
*/
|
|
1703
1703
|
exitPlanMode?: (plan: string) => Promise<boolean | 'not-in-plan-mode'>;
|
|
1704
|
+
/** Semantic memory review plan produced from explicit user feedback. */
|
|
1705
|
+
onMemoryReview?: (plan: MemoryReviewPlan) => void;
|
|
1704
1706
|
}
|
|
1705
1707
|
/**
|
|
1706
1708
|
* Structured event emitted during provider recovery.
|
|
@@ -2479,6 +2481,7 @@ interface KodaXOptions {
|
|
|
2479
2481
|
session?: KodaXSessionOptions;
|
|
2480
2482
|
context?: KodaXContextOptions;
|
|
2481
2483
|
events?: KodaXEvents;
|
|
2484
|
+
memoryReviewer?: MemoryReviewRunner;
|
|
2482
2485
|
extensionRuntime?: ExtensionRuntimeContract;
|
|
2483
2486
|
/** FEATURE_229: host-owned policy for workflow auto-start and ceilings. */
|
|
2484
2487
|
workflowHostPolicy?: WorkflowHostPolicy;
|
|
@@ -2871,11 +2874,11 @@ interface KodaXToolExecutionContext {
|
|
|
2871
2874
|
workflowWorktreeBaseDir?: string;
|
|
2872
2875
|
/** Shared extension capability runtime used by retrieval-family tools. */
|
|
2873
2876
|
extensionRuntime?: CapabilityRuntimeContract;
|
|
2874
|
-
/** Ask user a question interactively (select mode) -
|
|
2875
|
-
*
|
|
2876
|
-
askUser?: (options: AskUserQuestionOptions) => Promise<
|
|
2877
|
+
/** Ask user a question interactively (select mode) - Issue 069. Select
|
|
2878
|
+
* answers may be strings, arrays, or structured custom-input answers. */
|
|
2879
|
+
askUser?: (options: AskUserQuestionOptions) => Promise<AskUserAnswer>;
|
|
2877
2880
|
/** Ask user multiple independent questions sequentially - 澶氶棶棰橀『搴忔彁闂?*/
|
|
2878
|
-
askUserMulti?: (options: AskUserMultiOptions) => Promise<Record<string,
|
|
2881
|
+
askUserMulti?: (options: AskUserMultiOptions) => Promise<Record<string, AskUserAnswer> | undefined>;
|
|
2879
2882
|
/** Ask user for free-text input - 自由文本输入 (Issue 112) */
|
|
2880
2883
|
askUserInput?: (options: {
|
|
2881
2884
|
question: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { M as McpConnectMode, a as McpServerConfig, b as McpServersConfig, c as McpTransportKind } from './config.d-CJy1WENT.js';
|
|
2
2
|
import { K as KodaXBaseProvider } from './base.d-DalIRhbb.js';
|
|
3
3
|
import { a as CostTracker } from './cost-tracker.d-CBLk1fiD.js';
|
|
4
|
-
import {
|
|
5
|
-
import { g as ToolGuardrail } from './types.d-
|
|
4
|
+
import { bp as RunnerToolCall } from './process.d-DXkRD7hj.js';
|
|
5
|
+
import { g as ToolGuardrail } from './types.d-DFf4Sfys.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* FEATURE_200 Phase F (v0.7.45) — MCP domain types extracted from types.ts.
|
|
@@ -2053,6 +2053,14 @@ interface AskUserQuestionItem {
|
|
|
2053
2053
|
* of parsing it out of natural-language question text.
|
|
2054
2054
|
*/
|
|
2055
2055
|
maxSelections?: number;
|
|
2056
|
+
/**
|
|
2057
|
+
* Choice surfaces are open-ended by default: hosts SHOULD offer a synthetic
|
|
2058
|
+
* custom-input option unless this is explicitly false.
|
|
2059
|
+
*/
|
|
2060
|
+
allowCustomInput?: boolean;
|
|
2061
|
+
customInputLabel?: string;
|
|
2062
|
+
customInputPrompt?: string;
|
|
2063
|
+
customInputDefault?: string;
|
|
2056
2064
|
}
|
|
2057
2065
|
/** Options for multi-question mode — multiple independent questions in one call. */
|
|
2058
2066
|
interface AskUserMultiOptions {
|
|
@@ -2074,7 +2082,23 @@ interface AskUserQuestionOptions {
|
|
|
2074
2082
|
/** FEATURE_222 — see {@link AskUserQuestionItem.maxSelections}. */
|
|
2075
2083
|
maxSelections?: number;
|
|
2076
2084
|
default?: string;
|
|
2085
|
+
/**
|
|
2086
|
+
* Choice surfaces are open-ended by default: hosts SHOULD offer a synthetic
|
|
2087
|
+
* custom-input option unless this is explicitly false.
|
|
2088
|
+
*/
|
|
2089
|
+
allowCustomInput?: boolean;
|
|
2090
|
+
customInputLabel?: string;
|
|
2091
|
+
customInputPrompt?: string;
|
|
2092
|
+
customInputDefault?: string;
|
|
2077
2093
|
}
|
|
2094
|
+
/** Host return value for a user-entered answer chosen through a select dialog's
|
|
2095
|
+
* synthetic "Other..." option. */
|
|
2096
|
+
interface AskUserCustomInputAnswer {
|
|
2097
|
+
kind: 'customInput';
|
|
2098
|
+
value: string;
|
|
2099
|
+
}
|
|
2100
|
+
type AskUserSelectionAnswer = string | AskUserCustomInputAnswer;
|
|
2101
|
+
type AskUserAnswer = AskUserSelectionAnswer | AskUserSelectionAnswer[];
|
|
2078
2102
|
/**
|
|
2079
2103
|
* FEATURE_222 — reserved option value a host may append as a synthetic option
|
|
2080
2104
|
* (e.g. a "← Back" entry) in `askUserMulti`'s per-question flow to mean "return
|
|
@@ -2086,6 +2110,9 @@ interface AskUserQuestionOptions {
|
|
|
2086
2110
|
* back-navigation — the default multi-question flow is unaffected either way.
|
|
2087
2111
|
*/
|
|
2088
2112
|
declare const ASK_USER_BACK_SIGNAL = "__back__";
|
|
2113
|
+
/** Reserved synthetic option value for a host-provided custom input entry. */
|
|
2114
|
+
declare const ASK_USER_CUSTOM_INPUT_SIGNAL = "__custom_input__";
|
|
2115
|
+
declare function isAskUserCustomInputAnswer(value: unknown): value is AskUserCustomInputAnswer;
|
|
2089
2116
|
/**
|
|
2090
2117
|
* FEATURE_222 — narrow an `askUser` result to a single string for the many
|
|
2091
2118
|
* callers that only ever ask single-select questions (they never set
|
|
@@ -2093,7 +2120,7 @@ declare const ASK_USER_BACK_SIGNAL = "__back__";
|
|
|
2093
2120
|
* an unexpected array to its first element so a mis-configured host degrades
|
|
2094
2121
|
* predictably instead of leaking `[object Array]` into a string comparison.
|
|
2095
2122
|
*/
|
|
2096
|
-
declare function asSingleSelection(answer:
|
|
2123
|
+
declare function asSingleSelection(answer: AskUserAnswer): string;
|
|
2097
2124
|
/**
|
|
2098
2125
|
* The host-provided user-interaction surface. Each method is optional — a
|
|
2099
2126
|
* headless host omits them and callers degrade gracefully. This is the single
|
|
@@ -2102,18 +2129,17 @@ declare function asSingleSelection(answer: string | string[]): string;
|
|
|
2102
2129
|
*/
|
|
2103
2130
|
interface UserInteraction {
|
|
2104
2131
|
/**
|
|
2105
|
-
* Ask one question (select mode by default). Single-select
|
|
2106
|
-
*
|
|
2107
|
-
*
|
|
2108
|
-
*
|
|
2109
|
-
*
|
|
2110
|
-
* so option values containing `, ` are not corrupted by a join.
|
|
2132
|
+
* Ask one question (select mode by default). Single-select resolves the
|
|
2133
|
+
* chosen option value as a string. Multi-select resolves the selected values
|
|
2134
|
+
* as an array. If the user chooses the host-provided custom-input option,
|
|
2135
|
+
* return `{ kind: 'customInput', value }` in the single or array position.
|
|
2136
|
+
* Plain string/string[] hosts remain valid for backward compatibility.
|
|
2111
2137
|
*/
|
|
2112
|
-
askUser?: (options: AskUserQuestionOptions) => Promise<
|
|
2138
|
+
askUser?: (options: AskUserQuestionOptions) => Promise<AskUserAnswer>;
|
|
2113
2139
|
/** Ask several independent questions sequentially. Resolves a per-question
|
|
2114
|
-
* value map
|
|
2115
|
-
*
|
|
2116
|
-
askUserMulti?: (options: AskUserMultiOptions) => Promise<Record<string,
|
|
2140
|
+
* value map using the same `AskUserAnswer` shape as `askUser`, or undefined
|
|
2141
|
+
* when the user cancels. */
|
|
2142
|
+
askUserMulti?: (options: AskUserMultiOptions) => Promise<Record<string, AskUserAnswer> | undefined>;
|
|
2117
2143
|
/** Ask for free-text input. Resolves the text, or undefined when cancelled. */
|
|
2118
2144
|
askUserInput?: (options: {
|
|
2119
2145
|
question: string;
|
|
@@ -2530,6 +2556,232 @@ interface DiscoveryOptions {
|
|
|
2530
2556
|
*/
|
|
2531
2557
|
declare function discoverInstances(options?: DiscoveryOptions): DiscoveredInstance[];
|
|
2532
2558
|
|
|
2559
|
+
type MemoryRefKind = 'working_context' | 'session_trace' | 'artifact_ledger' | 'learning_proposal' | 'memdir' | 'skill' | 'workflow_run' | 'reasoning_report' | 'self_manual' | 'project_doc';
|
|
2560
|
+
type MemoryScope = 'turn' | 'session' | 'project' | 'user' | 'builtin';
|
|
2561
|
+
type MemoryLifecycle = 'pending' | 'active' | 'provisional' | 'trusted' | 'stale' | 'quarantined' | 'archived' | 'readonly';
|
|
2562
|
+
type MemoryAuthority = 'read_only' | 'proposal_only' | 'approved_write';
|
|
2563
|
+
type MemoryVisibility = 'prompt_safe' | 'private' | 'sensitive';
|
|
2564
|
+
interface MemoryItemRef {
|
|
2565
|
+
readonly kind: MemoryRefKind;
|
|
2566
|
+
readonly id: string;
|
|
2567
|
+
readonly scope: MemoryScope;
|
|
2568
|
+
readonly title?: string;
|
|
2569
|
+
readonly owner: 'user' | 'project' | 'kodax' | 'external';
|
|
2570
|
+
readonly lifecycle: MemoryLifecycle;
|
|
2571
|
+
readonly authority: MemoryAuthority;
|
|
2572
|
+
readonly visibility: MemoryVisibility;
|
|
2573
|
+
readonly sourceRefs: readonly string[];
|
|
2574
|
+
readonly relatedRefs: readonly string[];
|
|
2575
|
+
readonly version?: string;
|
|
2576
|
+
readonly bodyFingerprint?: string;
|
|
2577
|
+
readonly storageUri?: string;
|
|
2578
|
+
readonly createdAt?: string;
|
|
2579
|
+
readonly updatedAt?: string;
|
|
2580
|
+
readonly lastUsedAt?: string;
|
|
2581
|
+
readonly pinned?: boolean;
|
|
2582
|
+
}
|
|
2583
|
+
interface MemoryRefFilter {
|
|
2584
|
+
readonly kinds?: readonly MemoryRefKind[];
|
|
2585
|
+
readonly scopes?: readonly MemoryScope[];
|
|
2586
|
+
readonly lifecycles?: readonly MemoryLifecycle[];
|
|
2587
|
+
readonly includePrivate?: boolean;
|
|
2588
|
+
readonly includeSensitive?: boolean;
|
|
2589
|
+
readonly query?: string;
|
|
2590
|
+
}
|
|
2591
|
+
interface MemoryBodySnapshot {
|
|
2592
|
+
readonly ref: MemoryItemRef;
|
|
2593
|
+
readonly body: string;
|
|
2594
|
+
readonly bodyFingerprint: string;
|
|
2595
|
+
readonly frontmatter?: Readonly<Record<string, string>>;
|
|
2596
|
+
readonly readAt: string;
|
|
2597
|
+
readonly warnings: readonly string[];
|
|
2598
|
+
}
|
|
2599
|
+
type MemoryProposalAction = 'no_op' | 'link_refs' | 'write_memdir' | 'patch_memdir' | 'handoff_to_skill_loop' | 'quarantine' | 'archive' | 'conflict_report';
|
|
2600
|
+
interface MemoryApplyPreview {
|
|
2601
|
+
readonly summary: string;
|
|
2602
|
+
readonly changedRefs: readonly MemoryItemRef[];
|
|
2603
|
+
readonly changedPaths: readonly string[];
|
|
2604
|
+
readonly beforeFingerprints: Readonly<Record<string, string>>;
|
|
2605
|
+
readonly afterFingerprints?: Readonly<Record<string, string>>;
|
|
2606
|
+
readonly diff?: string;
|
|
2607
|
+
readonly warnings: readonly string[];
|
|
2608
|
+
}
|
|
2609
|
+
interface MemoryActionProposal {
|
|
2610
|
+
readonly id: string;
|
|
2611
|
+
readonly action: MemoryProposalAction;
|
|
2612
|
+
readonly targetRefs: readonly MemoryItemRef[];
|
|
2613
|
+
readonly sourceRefs: readonly MemoryItemRef[];
|
|
2614
|
+
readonly expectedFingerprints: Readonly<Record<string, string>>;
|
|
2615
|
+
readonly rationale: string;
|
|
2616
|
+
readonly risk: 'low' | 'medium' | 'high';
|
|
2617
|
+
readonly preview: MemoryApplyPreview;
|
|
2618
|
+
readonly requiresApproval: true;
|
|
2619
|
+
readonly createdAt: string;
|
|
2620
|
+
}
|
|
2621
|
+
interface MemoryApproval {
|
|
2622
|
+
readonly proposalId: string;
|
|
2623
|
+
readonly approvedBy: 'user' | 'host';
|
|
2624
|
+
readonly approvedAt: string;
|
|
2625
|
+
readonly expectedFingerprints: Readonly<Record<string, string>>;
|
|
2626
|
+
}
|
|
2627
|
+
interface MemoryApplyResult {
|
|
2628
|
+
readonly proposalId: string;
|
|
2629
|
+
readonly applied: boolean;
|
|
2630
|
+
readonly changedRefs: readonly MemoryItemRef[];
|
|
2631
|
+
readonly changedPaths: readonly string[];
|
|
2632
|
+
readonly skippedReason?: string;
|
|
2633
|
+
readonly warnings: readonly string[];
|
|
2634
|
+
}
|
|
2635
|
+
interface MemoryRejectResult {
|
|
2636
|
+
readonly proposalId: string;
|
|
2637
|
+
readonly rejected: boolean;
|
|
2638
|
+
readonly skippedReason?: string;
|
|
2639
|
+
readonly review?: MemoryReviewPlan;
|
|
2640
|
+
readonly warnings: readonly string[];
|
|
2641
|
+
}
|
|
2642
|
+
interface MemorySourceAdapter {
|
|
2643
|
+
readonly kind: MemoryRefKind;
|
|
2644
|
+
listRefs(filter?: MemoryRefFilter): Promise<readonly MemoryItemRef[]>;
|
|
2645
|
+
readRef(ref: MemoryItemRef): Promise<MemoryBodySnapshot>;
|
|
2646
|
+
previewProposal(proposal: MemoryActionProposal): Promise<MemoryApplyPreview>;
|
|
2647
|
+
applyProposal(proposal: MemoryActionProposal, approval: MemoryApproval): Promise<MemoryApplyResult>;
|
|
2648
|
+
}
|
|
2649
|
+
interface MemoryCuratorInput {
|
|
2650
|
+
readonly includePrivate?: boolean;
|
|
2651
|
+
readonly includeSensitive?: boolean;
|
|
2652
|
+
}
|
|
2653
|
+
interface MemoryAutoCuratorInput extends MemoryCuratorInput {
|
|
2654
|
+
readonly enabled?: boolean;
|
|
2655
|
+
readonly intervalMs?: number;
|
|
2656
|
+
readonly minRefs?: number;
|
|
2657
|
+
}
|
|
2658
|
+
type MemoryAutoCuratorSkipReason = 'disabled' | 'not_due' | 'insufficient_refs';
|
|
2659
|
+
interface MemoryAutoCuratorResult {
|
|
2660
|
+
readonly ran: boolean;
|
|
2661
|
+
readonly skippedReason?: MemoryAutoCuratorSkipReason;
|
|
2662
|
+
readonly report?: MemoryGovernanceReport;
|
|
2663
|
+
readonly reportPath?: string;
|
|
2664
|
+
readonly nextEligibleAt?: string;
|
|
2665
|
+
}
|
|
2666
|
+
type MemoryGovernanceFindingKind = 'duplicate' | 'conflict' | 'stale' | 'quarantined' | 'orphaned' | 'no_op';
|
|
2667
|
+
interface MemoryGovernanceFinding {
|
|
2668
|
+
readonly kind: MemoryGovernanceFindingKind;
|
|
2669
|
+
readonly severity: 'info' | 'warning' | 'error';
|
|
2670
|
+
readonly refIds: readonly string[];
|
|
2671
|
+
readonly summary: string;
|
|
2672
|
+
readonly suggestedAction: MemoryProposalAction;
|
|
2673
|
+
}
|
|
2674
|
+
interface MemoryGovernanceReport {
|
|
2675
|
+
readonly reportId: string;
|
|
2676
|
+
readonly generatedAt: string;
|
|
2677
|
+
readonly findings: readonly MemoryGovernanceFinding[];
|
|
2678
|
+
readonly warnings: readonly string[];
|
|
2679
|
+
}
|
|
2680
|
+
interface MemoryPackInput {
|
|
2681
|
+
readonly task: string;
|
|
2682
|
+
readonly maxHints?: number;
|
|
2683
|
+
readonly includePrivate?: boolean;
|
|
2684
|
+
readonly includeSensitive?: boolean;
|
|
2685
|
+
readonly includeSnippets?: boolean;
|
|
2686
|
+
readonly ignoreMemory?: boolean;
|
|
2687
|
+
}
|
|
2688
|
+
interface MemoryPackHint {
|
|
2689
|
+
readonly ref: MemoryItemRef;
|
|
2690
|
+
readonly hook: string;
|
|
2691
|
+
readonly reason: string;
|
|
2692
|
+
readonly bodySnippet?: string;
|
|
2693
|
+
readonly bodyFingerprint?: string;
|
|
2694
|
+
}
|
|
2695
|
+
interface MemoryPack {
|
|
2696
|
+
readonly generatedAt: string;
|
|
2697
|
+
readonly taskFingerprint: string;
|
|
2698
|
+
readonly hints: readonly MemoryPackHint[];
|
|
2699
|
+
readonly omitted: readonly string[];
|
|
2700
|
+
readonly traceMetadata: MemoryPackTraceMetadata;
|
|
2701
|
+
}
|
|
2702
|
+
interface MemoryPackTraceMetadata {
|
|
2703
|
+
readonly selectedRefIds: readonly string[];
|
|
2704
|
+
readonly omittedRefIds: readonly string[];
|
|
2705
|
+
readonly taskFingerprint: string;
|
|
2706
|
+
readonly suppressed: boolean;
|
|
2707
|
+
}
|
|
2708
|
+
type MemoryReviewTrigger = 'user_correction' | 'explicit_remember' | 'explicit_forget' | 'proposal_rejected' | 'conflict_detected';
|
|
2709
|
+
interface MemoryReviewCandidateRef {
|
|
2710
|
+
readonly ref: MemoryItemRef;
|
|
2711
|
+
readonly bodySnippet?: string;
|
|
2712
|
+
readonly bodyFingerprint?: string;
|
|
2713
|
+
readonly warnings: readonly string[];
|
|
2714
|
+
}
|
|
2715
|
+
interface MemoryReviewInput {
|
|
2716
|
+
readonly trigger: MemoryReviewTrigger;
|
|
2717
|
+
readonly userFeedback: string;
|
|
2718
|
+
readonly task?: string;
|
|
2719
|
+
readonly sourceRefs?: readonly string[];
|
|
2720
|
+
readonly candidateRefIds?: readonly string[];
|
|
2721
|
+
readonly includePrivate?: boolean;
|
|
2722
|
+
readonly includeSensitive?: boolean;
|
|
2723
|
+
readonly maxRefs?: number;
|
|
2724
|
+
}
|
|
2725
|
+
interface MemoryReviewModelInput {
|
|
2726
|
+
readonly trigger: MemoryReviewTrigger;
|
|
2727
|
+
readonly userFeedback: string;
|
|
2728
|
+
readonly task?: string;
|
|
2729
|
+
readonly sourceRefs: readonly string[];
|
|
2730
|
+
readonly candidateRefs: readonly MemoryReviewCandidateRef[];
|
|
2731
|
+
readonly warnings: readonly string[];
|
|
2732
|
+
}
|
|
2733
|
+
interface MemoryReviewDraftAction {
|
|
2734
|
+
readonly action: MemoryProposalAction;
|
|
2735
|
+
readonly targetRefIds: readonly string[];
|
|
2736
|
+
readonly summary: string;
|
|
2737
|
+
readonly rationale: string;
|
|
2738
|
+
readonly confidence: 'low' | 'medium' | 'high';
|
|
2739
|
+
readonly risk: 'low' | 'medium' | 'high';
|
|
2740
|
+
readonly requiresApproval: true;
|
|
2741
|
+
readonly proposedBody?: string;
|
|
2742
|
+
}
|
|
2743
|
+
interface MemoryReviewPlan {
|
|
2744
|
+
readonly trigger: MemoryReviewTrigger;
|
|
2745
|
+
readonly createdAt: string;
|
|
2746
|
+
readonly sourceRefs: readonly string[];
|
|
2747
|
+
readonly candidateRefs: readonly MemoryReviewCandidateRef[];
|
|
2748
|
+
readonly actions: readonly MemoryReviewDraftAction[];
|
|
2749
|
+
readonly warnings: readonly string[];
|
|
2750
|
+
}
|
|
2751
|
+
type MemoryReviewRunner = (input: MemoryReviewModelInput) => Promise<MemoryReviewPlan>;
|
|
2752
|
+
interface MemoryController {
|
|
2753
|
+
listInbox(): Promise<readonly MemoryActionProposal[]>;
|
|
2754
|
+
showProposal(id: string): Promise<MemoryActionProposal | undefined>;
|
|
2755
|
+
approveProposal(id: string, expectedFingerprints: Readonly<Record<string, string>>): Promise<MemoryApplyResult>;
|
|
2756
|
+
rejectProposal(id: string, reason?: string): Promise<MemoryRejectResult>;
|
|
2757
|
+
listRefs(filter?: MemoryRefFilter): Promise<readonly MemoryItemRef[]>;
|
|
2758
|
+
readRef(ref: MemoryItemRef): Promise<MemoryBodySnapshot>;
|
|
2759
|
+
runCurator(input?: MemoryCuratorInput): Promise<MemoryGovernanceReport>;
|
|
2760
|
+
maybeRunAutoCurator(input?: MemoryAutoCuratorInput): Promise<MemoryAutoCuratorResult>;
|
|
2761
|
+
buildMemoryPack(input: MemoryPackInput): Promise<MemoryPack>;
|
|
2762
|
+
reviewMemoryFeedback(input: MemoryReviewInput): Promise<MemoryReviewPlan>;
|
|
2763
|
+
}
|
|
2764
|
+
type MemoryEvent = {
|
|
2765
|
+
readonly type: 'proposal.created';
|
|
2766
|
+
readonly proposalId: string;
|
|
2767
|
+
} | {
|
|
2768
|
+
readonly type: 'proposal.approved';
|
|
2769
|
+
readonly proposalId: string;
|
|
2770
|
+
} | {
|
|
2771
|
+
readonly type: 'proposal.rejected';
|
|
2772
|
+
readonly proposalId: string;
|
|
2773
|
+
} | {
|
|
2774
|
+
readonly type: 'curator.completed';
|
|
2775
|
+
readonly reportId: string;
|
|
2776
|
+
} | {
|
|
2777
|
+
readonly type: 'pack.selected';
|
|
2778
|
+
readonly refIds: readonly string[];
|
|
2779
|
+
} | {
|
|
2780
|
+
readonly type: 'review.completed';
|
|
2781
|
+
readonly trigger: MemoryReviewTrigger;
|
|
2782
|
+
readonly actionCount: number;
|
|
2783
|
+
};
|
|
2784
|
+
|
|
2533
2785
|
/**
|
|
2534
2786
|
* ../../index.js Compaction Types
|
|
2535
2787
|
*/
|
|
@@ -3099,5 +3351,5 @@ declare function isFinalWorkflowProcessStatus(status: WorkflowProcessStatus): bo
|
|
|
3099
3351
|
declare function normalizeHostMetadata(value: unknown): Record<string, string> | undefined;
|
|
3100
3352
|
declare function createWorkflowProcessTracker(options: WorkflowProcessTrackerOptions): WorkflowProcessTracker;
|
|
3101
3353
|
|
|
3102
|
-
export { ASK_USER_BACK_SIGNAL as A, DEFAULT_SYSTEM_CAP as D, InvariantSession as
|
|
3103
|
-
export type {
|
|
3354
|
+
export { ASK_USER_BACK_SIGNAL as A, DEFAULT_SYSTEM_CAP as D, InvariantSession as R, ASK_USER_CUSTOM_INPUT_SIGNAL as a, MAX_TOOL_LOOP_ITERATIONS as ax, SpanImpl as bE, Tracer as bW, Runner as bl, extractAssistantTextFromMessage as c$, WorkflowEventRecorder as c5, _resetAdmittedAgentBindings as cK, _resetPresetDispatchers as cL, asSingleSelection as cM, buildAssistantMessageFromLlmResult as cN, buildSystemPrompt as cO, buildToolResultMessage as cP, createAgent as cQ, createHandoff as cR, createInMemorySession as cS, createInvariantSessionForAgent as cT, createStateWriter as cU, createTrace as cV, createWorkflowProcessTracker as cW, defaultTracer as cX, detectInstructionsInjection as cY, discoverInstances as cZ, executeRunnerToolCall as c_, getActiveUserInteraction as d0, getAdmittedAgentBindings as d1, isAskUserCustomInputAnswer as d2, isFinalWorkflowProcessStatus as d3, isRunnableTool as d4, isRunnerLlmResult as d5, normalizeHostMetadata as d6, registerChildTask as d7, registerPresetDispatcher as d8, requestTaskStop as d9, runAdmissionAudit as da, setActiveUserInteraction as db, setAdmittedAgentBindings as dc };
|
|
3355
|
+
export type { KodaXGoalStatus as $, DiscoveredInstance as B, ChildTaskRegistry as C, DiscoveryOptions as E, EvidenceSpanData as F, FanoutSpanData as G, FileOperations as H, GenerationSpanData as I, Guardrail as J, GuardrailSpanData as K, Handoff as L, HandoffSpanData as M, InMemorySessionOptions as N, InstanceDiscoveryFs as O, InvariantId as P, InvariantResult as Q, KodaXCompactMemoryProgress as S, KodaXCompactMemorySeed as T, KodaXExtensionSessionRecord as U, KodaXExtensionSessionState as V, KodaXExtensionStore as W, KodaXExtensionStoreEntry as X, KodaXFileInputArtifact as Y, KodaXGoalEventType as Z, KodaXGoalState as _, MemoryReviewPlan as a$, KodaXImageInputArtifact as a0, KodaXImageMediaType as a1, KodaXInputArtifact as a2, KodaXInputArtifactSource as a3, KodaXJsonValue as a4, KodaXSessionArchiveMarkerEntry as a5, KodaXSessionArtifactLedgerEntry as a6, KodaXSessionBranchSummaryEntry as a7, KodaXSessionClientNoticeEntry as a8, KodaXSessionCompactionEntry as a9, MemoryApplyPreview as aA, MemoryApplyResult as aB, MemoryApproval as aC, MemoryAuthority as aD, MemoryAutoCuratorInput as aE, MemoryAutoCuratorResult as aF, MemoryBodySnapshot as aG, MemoryController as aH, MemoryCuratorInput as aI, MemoryEvent as aJ, MemoryGovernanceFinding as aK, MemoryGovernanceFindingKind as aL, MemoryGovernanceReport as aM, MemoryItemRef as aN, MemoryLifecycle as aO, MemoryPack as aP, MemoryPackHint as aQ, MemoryPackInput as aR, MemoryPackTraceMetadata as aS, MemoryProposalAction as aT, MemoryRefFilter as aU, MemoryRefKind as aV, MemoryRejectResult as aW, MemoryReviewCandidateRef as aX, MemoryReviewDraftAction as aY, MemoryReviewInput as aZ, MemoryReviewModelInput as a_, KodaXSessionData as aa, KodaXSessionEntry as ab, KodaXSessionEntryBase as ac, KodaXSessionGoalEntry as ad, KodaXSessionLabelEntry as ae, KodaXSessionLineage as af, KodaXSessionMessageEntry as ag, KodaXSessionMeta as ah, KodaXSessionNavigationOptions as ai, KodaXSessionRuntimeInfo as aj, KodaXSessionScope as ak, KodaXSessionStorage as al, KodaXSessionTreeNode as am, KodaXSessionUiHistoryItem as an, KodaXSessionUiHistoryItemType as ao, KodaXSessionUiTextHistoryItem as ap, KodaXSessionUiTextHistoryItemType as aq, KodaXSessionUiToolCall as ar, KodaXSessionUiToolCallStatus as as, KodaXSessionUiToolGroupHistoryItem as at, KodaXSessionWorkspaceKind as au, KodaXVideoInputArtifact as av, KodaXVideoMediaType as aw, ManifestPatch as ay, MemoryActionProposal as az, AdmissionAuditOptions as b, WorkflowApproval as b$, MemoryReviewRunner as b0, MemoryReviewTrigger as b1, MemoryScope as b2, MemorySourceAdapter as b3, MemoryVisibility as b4, MessageEntry as b5, ObserveCtx as b6, PersistedSessionState as b7, PresetDispatcher as b8, PresetTracingContext as b9, SessionStateSnapshot as bA, Span as bB, SpanData as bC, SpanError as bD, SpanImplOptions as bF, StartTraceOptions as bG, StateWriter as bH, StateWriterFs as bI, StateWriterOptions as bJ, StopHookContext as bK, StopHookFn as bL, StopHookResult as bM, StopHookSpanData as bN, SystemCap as bO, TaskAbortRegistry as bP, TerminalCtx as bQ, ToolCallSpanData as bR, ToolCapability as bS, ToolPermission as bT, Trace as bU, TraceOptions as bV, TracerOptions as bX, UserInteraction as bY, WorkflowAgentBackend as bZ, WorkflowApi as b_, QualityInvariant as ba, ReadonlyMutationTracker as bb, ReadonlyRecorder as bc, ReasoningDepth as bd, RecentlyModifiedFile as be, RequestTaskStopOptions as bf, RequestTaskStopResult as bg, RunEvent as bh, RunOptions as bi, RunResult as bj, RunnableTool as bk, RunnerEvent as bm, RunnerLlmResult as bn, RunnerLlmReturn as bo, RunnerToolCall as bp, RunnerToolContext as bq, RunnerToolObserver as br, RunnerToolResult as bs, Session as bt, SessionDispatchResult as bu, SessionEntry as bv, SessionErrorMetadata as bw, SessionExtension as bx, SessionForkOptions as by, SessionMeta as bz, AdmissionCtx as c, WorkflowApprovalSummary as c0, WorkflowArtifactRef as c1, WorkflowBudget as c2, WorkflowEvent as c3, WorkflowEventCorrelation as c4, WorkflowEventType as c6, WorkflowIsolation as c7, WorkflowLimits as c8, WorkflowLogEvent as c9, WorkflowTaskResult as cA, WorkflowTaskSnapshot as cB, WorkflowTaskStatus as cC, WorkflowTaskSummaryEventUpdate as cD, WorkflowTaskSummaryKind as cE, WorkflowTaskSummaryUpdate as cF, WorkflowTaskUsage as cG, WorkflowTaskVerification as cH, WorkflowTaskVerificationResult as cI, WorkflowWaitOptions as cJ, WorkflowMeta as ca, WorkflowModelHint as cb, WorkflowModule as cc, WorkflowParallelOptions as cd, WorkflowProcessArtifact as ce, WorkflowProcessCounts as cf, WorkflowProcessEvent as cg, WorkflowProcessItem as ch, WorkflowProcessItemKind as ci, WorkflowProcessItemOrigin as cj, WorkflowProcessItemStatus as ck, WorkflowProcessProgress as cl, WorkflowProcessSnapshot as cm, WorkflowProcessSource as cn, WorkflowProcessStatus as co, WorkflowProcessSummaryStatus as cp, WorkflowProcessTokenUsage as cq, WorkflowProcessTracker as cr, WorkflowProcessTrackerOptions as cs, WorkflowRun as ct, WorkflowRunState as cu, WorkflowRunStatus as cv, WorkflowSpawnAgentInput as cw, WorkflowSynthesis as cx, WorkflowSynthesizeInput as cy, WorkflowTaskHandle as cz, AdmissionVerdict as d, AdmittedHandle as e, Agent as f, AgentManifest as g, AgentMessage as h, AgentMiddlewareDeclaration as i, AgentReasoningProfile as j, AgentSpanData as k, AgentTool as l, AskUserAnswer as m, AskUserCustomInputAnswer as n, AskUserMultiOptions as o, AskUserQuestionItem as p, AskUserQuestionOptions as q, AskUserSelectionAnswer as r, CompactionAnchor as s, CompactionConfig as t, CompactionDetails as u, CompactionResult as v, CompactionSpanData as w, CompactionUpdate as x, CurrentTodoSummary as y, Deliverable as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as KodaXMessage } from './types.d-Bp4Lm1jv.js';
|
|
2
|
-
import { Q as QueueEventListener, f as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-
|
|
3
|
-
import {
|
|
2
|
+
import { Q as QueueEventListener, f as QueuedMessage, E as EnqueueInput, D as DequeueFilter } from './types.d-DFf4Sfys.js';
|
|
3
|
+
import { h as AgentMessage, bv as SessionEntry, bt as Session, bx as SessionExtension, af as KodaXSessionLineage, a4 as KodaXJsonValue, u as CompactionDetails, T as KodaXCompactMemorySeed, ab as KodaXSessionEntry, am as KodaXSessionTreeNode, ae as KodaXSessionLabelEntry, ad as KodaXSessionGoalEntry, a8 as KodaXSessionClientNoticeEntry, ai as KodaXSessionNavigationOptions, a6 as KodaXSessionArtifactLedgerEntry, H as FileOperations, ca as WorkflowMeta, cb as WorkflowModelHint, cc as WorkflowModule, cs as WorkflowProcessTrackerOptions, c3 as WorkflowEvent, cm as WorkflowProcessSnapshot, cg as WorkflowProcessEvent } from './process.d-DXkRD7hj.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @kodax-ai/agent Constants
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as PermissionMode, F as FileSessionStorage, S as SessionData } from './storage.d-
|
|
1
|
+
import { b as PermissionMode, F as FileSessionStorage, S as SessionData } from './storage.d-C3umBC4g.js';
|
|
2
2
|
import { E as KodaXReasoningMode, j as KodaXMessage, c as KodaXContentBlock, R as KodaXTaskResultMetadata } from './types.d-Bp4Lm1jv.js';
|
|
3
|
-
import { m as KodaXAgentMode } from './bash-prefix-extractor.d-
|
|
4
|
-
import {
|
|
3
|
+
import { m as KodaXAgentMode } from './bash-prefix-extractor.d-Do_TCAmA.js';
|
|
4
|
+
import { an as KodaXSessionUiHistoryItem, ar as KodaXSessionUiToolCall, a4 as KodaXJsonValue } from './process.d-DXkRD7hj.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* TextBuffer - Text buffer management class - 文本缓冲区管理类
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as BashPrefixExtractor } from './bash-prefix-extractor.d-
|
|
2
|
-
import {
|
|
1
|
+
import { a as BashPrefixExtractor } from './bash-prefix-extractor.d-Do_TCAmA.js';
|
|
2
|
+
import { aa as KodaXSessionData, af as KodaXSessionLineage, ai as KodaXSessionNavigationOptions, aj as KodaXSessionRuntimeInfo, al as KodaXSessionStorage } from './process.d-DXkRD7hj.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Permission Types
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as Guardrail, bp as RunnerToolCall, f as Agent, h as AgentMessage, bs as RunnerToolResult, bB as Span, a2 as KodaXInputArtifact } from './process.d-DXkRD7hj.js';
|
|
2
2
|
import { R as KodaXTaskResultMetadata } from './types.d-Bp4Lm1jv.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Q as KodaXOptions, v as KodaXContextTokenSnapshot, a6 as KodaXSkillDynamicContextPolicy, m as KodaXAgentMode, V as KodaXRepoIntelligenceMode, a7 as KodaXSkillInvocationContext } from './bash-prefix-extractor.d-
|
|
2
|
-
import { c as SessionStorage$1, b as PermissionMode } from './storage.d-
|
|
3
|
-
import {
|
|
1
|
+
import { Q as KodaXOptions, v as KodaXContextTokenSnapshot, a6 as KodaXSkillDynamicContextPolicy, m as KodaXAgentMode, V as KodaXRepoIntelligenceMode, a7 as KodaXSkillInvocationContext } from './bash-prefix-extractor.d-Do_TCAmA.js';
|
|
2
|
+
import { c as SessionStorage$1, b as PermissionMode } from './storage.d-C3umBC4g.js';
|
|
3
|
+
import { an as KodaXSessionUiHistoryItem, af as KodaXSessionLineage, a6 as KodaXSessionArtifactLedgerEntry, V as KodaXExtensionSessionState, U as KodaXExtensionSessionRecord, aj as KodaXSessionRuntimeInfo, al as KodaXSessionStorage, aa as KodaXSessionData, cn as WorkflowProcessSource } from './process.d-DXkRD7hj.js';
|
|
4
4
|
import { j as KodaXMessage, E as KodaXReasoningMode, o as KodaXProviderCapabilityProfile, d as KodaXCustomProviderConfig } from './types.d-Bp4Lm1jv.js';
|
|
5
|
-
import { A as AgentsFile, f as AutoModeStats, l as KodaXMcpServersConfig } from './guardrail.d-
|
|
5
|
+
import { A as AgentsFile, f as AutoModeStats, l as KodaXMcpServersConfig } from './guardrail.d-DRp0Lqvx.js';
|
|
6
6
|
import * as readline from 'readline';
|
|
7
7
|
import { SpawnSyncReturns } from 'child_process';
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kodax-ai/kodax",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.62",
|
|
4
4
|
"description": "KodaX lightweight coding agent - TypeScript implementation with 15 built-in LLM provider aliases, published as a Node-free single-file CLI and SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{Aa as b,za as a}from"./chunk-D7CC6YZC.js";import"./chunk-KIVYMSRH.js";import"./chunk-2OEKUAV4.js";import"./chunk-XHOPSZVL.js";import"./chunk-CGGX3FXE.js";import"./chunk-QCBKLNN5.js";import"./chunk-4NSOBQCU.js";import"./chunk-D6QVXQNI.js";import"./chunk-UA744TZM.js";import"./chunk-7COB3EKF.js";import"./chunk-S4GVQO3W.js";import"./chunk-NJW2LQOP.js";import"./chunk-ZL5CEANW.js";import"./chunk-V4WSBIXB.js";export{a as ArgumentCompleter,b as createArgumentCompleter};
|