@kodax-ai/kodax 0.7.83 → 0.7.85
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 +154 -4
- package/README.md +48 -26
- package/README_CN.md +26 -21
- package/dist/chunks/agent-OQ37XUWF.js +2 -0
- package/dist/chunks/argument-completer-IMRSIF2N.js +2 -0
- package/dist/chunks/chunk-2XJQNFVR.js +379 -0
- package/dist/chunks/chunk-3E4OSFP2.js +1279 -0
- package/dist/chunks/chunk-CDWYKVZC.js +482 -0
- package/dist/chunks/chunk-CZCEFGQG.js +412 -0
- package/dist/chunks/chunk-IA246OAN.js +679 -0
- package/dist/chunks/chunk-IWRNGH4M.js +319 -0
- package/dist/chunks/chunk-MJ4G5ZCW.js +2 -0
- package/dist/chunks/{chunk-RAQGGVIF.js → chunk-ODRLFQQH.js} +1 -1
- package/dist/chunks/chunk-RSOAHVUR.js +5 -0
- package/dist/chunks/chunk-RTFVMEF6.js +415 -0
- package/dist/chunks/{chunk-XB2JNLXH.js → chunk-SR4E5FQK.js} +2 -2
- package/dist/chunks/{chunk-HI6RCW5Y.js → chunk-TBBY2DKE.js} +2 -2
- package/dist/chunks/chunk-UH5WNJXF.js +92 -0
- package/dist/chunks/{chunk-6QILIBOU.js → chunk-ZVOXWLT6.js} +214 -201
- package/dist/chunks/compaction-config-3WLLNN57.js +2 -0
- package/dist/chunks/{construction-bootstrap-E4M3CY3N.js → construction-bootstrap-CZ6NWEWQ.js} +1 -1
- package/dist/chunks/dist-NFLLOZWF.js +2 -0
- package/dist/chunks/host-LWUSSCWH.js +2 -0
- package/dist/chunks/run-manager-PBMOVP7A.js +2 -0
- package/dist/chunks/utils-KFLK3EHJ.js +2 -0
- package/dist/index.d.ts +17 -15
- package/dist/index.js +2 -2
- package/dist/kodax_bootstrap.js +1 -1
- package/dist/kodax_cli.js +1975 -1564
- package/dist/kodax_resume.js +269 -90
- package/dist/runtime-worker.js +1824 -1419
- package/dist/sandbox-workspace-session.js +979 -66
- package/dist/sdk-a2a.d.ts +11 -10
- package/dist/sdk-a2a.js +9 -8
- package/dist/sdk-agent.d.ts +39 -299
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +103 -16
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +7 -20
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +14 -13
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +64 -23
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +7 -6
- 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 +251 -64
- package/dist/types-chunks/{bash-prefix-extractor.d-CJM7OY-L.d.ts → bash-prefix-extractor.d-BnZQDirs.d.ts} +130 -13
- package/dist/types-chunks/{capsule.d-B7yoH4dM.d.ts → capsule.d-CN_iMqAS.d.ts} +2 -1
- package/dist/types-chunks/controller.d-A73Kf6tH.d.ts +105 -0
- package/dist/types-chunks/{controller.d-CYNuR2n9.d.ts → controller.d-Dzxz22X-.d.ts} +28 -1020
- package/dist/types-chunks/{guardrail.d-fM3mn4Op.d.ts → guardrail.d-BCkgaWT1.d.ts} +25 -19
- package/dist/types-chunks/{history-retrieval.d-BDI-ZMvY.d.ts → history-retrieval.d-Debbzn1z.d.ts} +1 -1
- package/dist/types-chunks/{public-api.d-i10kvYFs.d.ts → public-api.d-N6G6Jw8X.d.ts} +3 -2
- package/dist/types-chunks/{repl.d-Cs3eqGVT.d.ts → repl.d-BkTIOkJD.d.ts} +5 -5
- package/dist/types-chunks/review-inbox.d-DuZqFX-z.d.ts +221 -0
- package/dist/types-chunks/{run-manager.d-CodHf6rw.d.ts → run-manager.d-BS4lJfL3.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-CRXu5xNs.d.ts → sdk-session-DLkZTOc-.d.ts} +2 -2
- package/dist/types-chunks/{shell-command-sets.d-DfeSUjjM.d.ts → shell-command-sets.d-BrLw-WN9.d.ts} +3 -2
- package/dist/types-chunks/{types-Bf3Y3mW-.d.ts → types-PHjfwebT.d.ts} +62 -190
- package/dist/types-chunks/{types.d-BbtGlKZu.d.ts → types.d-BSPlmJqf.d.ts} +25 -6
- package/dist/types-chunks/{types.d-DIXZFauU.d.ts → types.d-Bo4fyMLu.d.ts} +1 -1
- package/dist/types-chunks/{types.d-DKs4tfSd.d.ts → types.d-Ch3BD97c.d.ts} +2 -2
- package/dist/types-chunks/types.d-DlLBRqZ9.d.ts +1057 -0
- package/dist/types-chunks/{utils.d-CgITiLyc.d.ts → utils.d-BI-kjuev.d.ts} +7 -4
- package/package.json +4 -2
- package/dist/chunks/agent-S7LMMTG7.js +0 -2
- package/dist/chunks/argument-completer-SQHG2LYE.js +0 -2
- package/dist/chunks/chunk-37RT45HT.js +0 -379
- package/dist/chunks/chunk-3DKQC7A2.js +0 -479
- package/dist/chunks/chunk-45E23YJI.js +0 -885
- package/dist/chunks/chunk-6UENDY33.js +0 -89
- package/dist/chunks/chunk-DSFHIUHZ.js +0 -655
- package/dist/chunks/chunk-DZUMH6GJ.js +0 -2
- package/dist/chunks/chunk-E7C4DRD2.js +0 -5
- package/dist/chunks/chunk-EVXIJPZ6.js +0 -218
- package/dist/chunks/chunk-KHEFUT6O.js +0 -5
- package/dist/chunks/chunk-LF2JBTBG.js +0 -319
- package/dist/chunks/chunk-TC2VHPG5.js +0 -348
- package/dist/chunks/chunk-URCS6CVP.js +0 -292
- package/dist/chunks/compaction-config-SSQ5NXUP.js +0 -2
- package/dist/chunks/dist-MIXP4ULB.js +0 -2
- package/dist/chunks/host-ZCPI7SMC.js +0 -2
- package/dist/chunks/run-manager-4RYG7HSP.js +0 -2
- package/dist/chunks/utils-7DKE2EKT.js +0 -2
- package/docs/SDK_EMBEDDER_GUIDE.md +0 -5735
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as KodaXGoalState, ab as KodaXSessionLineage, g as AgentActorStore, K as AgentTurnExecutor, l as AgentBudgetPort, b as AgentActorOwner, a as AgentActorClient, t as AgentExecutionResult, Y as KodaXJsonValue, Q as KodaXExtensionSessionRecord, R as KodaXExtensionSessionState, a2 as KodaXSessionArtifactLedgerEntry, ba as SessionErrorMetadata, aj as KodaXSessionScope, ak as KodaXSessionStorage, aE as MemoryContextIdentity, aQ as MemoryPack, b4 as MemoryReviewPlan, $ as KodaXMemoryOutcomeDigest, b5 as MemoryReviewRunner } from './types.d-DlLBRqZ9.js';
|
|
2
2
|
import { Diagnostic, Position, Location, Hover, DocumentSymbol, SymbolInformation, WorkspaceSymbol, CallHierarchyItem, CallHierarchyIncomingCall, CallHierarchyOutgoingCall } from 'vscode-languageserver-protocol';
|
|
3
3
|
import { a1 as KodaXTokenUsage, k as KodaXMessage, a2 as KodaXToolDefinition, aa as KodaXWireReasoningEffort, V as KodaXTaskRoutingDecision, W as KodaXTaskType, X as KodaXTaskWorkIntent, R as KodaXTaskComplexity, M as KodaXRiskLevel, h as KodaXHarnessProfile, f as KodaXExecutionMode, b as KodaXChildFanoutClass, G as KodaXReasoningMode, L as KodaXReviewScale } from './types.d-CgrXrFrq.js';
|
|
4
|
-
import {
|
|
4
|
+
import { P as AgentMessage, ct as StopHookFn, o as AgentControllerHealth, G as AgentExecutorPlaneBinding, f as Agent, cV as WorkflowIsolation, aN as GuardrailPermissionIntent, ac as AskUserQuestionOptions, a8 as AskUserAnswer, aa as AskUserMultiOptions, cS as WorkflowEventCorrelation, am as CompactionUpdate, d7 as WorkflowProcessEvent, cR as WorkflowEvent, aJ as Guardrail, at as DiscoveredInstance, a$ as KodaXInputArtifact, cJ as UnifiedLearningReviewRunner } from './controller.d-Dzxz22X-.js';
|
|
5
|
+
import { d as SkillDynamicContextExecutor, I as ISkillRegistry } from './types.d-BSPlmJqf.js';
|
|
5
6
|
import { K as KodaXLlmTimeoutConfig, a as CostTracker } from './cost-tracker.d-BeaenODW.js';
|
|
6
|
-
import {
|
|
7
|
+
import { p as MemoryRecallRunner } from './types-PHjfwebT.js';
|
|
7
8
|
import { C as CapabilityKind, f as CapabilitySearchSnapshot, b as CapabilityResult } from './capability.d-K664nHOS.js';
|
|
8
9
|
import { K as KodaXBaseProvider } from './base.d-DxG0m09Z.js';
|
|
9
10
|
|
|
@@ -1243,7 +1244,7 @@ interface CompactionSavingsDecision {
|
|
|
1243
1244
|
readonly lowSavings: boolean;
|
|
1244
1245
|
readonly enteredCooldown: boolean;
|
|
1245
1246
|
}
|
|
1246
|
-
type CompactionSkipReason = 'low_savings_cooldown' | 'covered_context_unchanged';
|
|
1247
|
+
type CompactionSkipReason = 'low_savings_cooldown' | 'covered_context_unchanged' | 'compactable_below_threshold' | 'no_compactable_prefix' | 'circuit_breaker_cooldown';
|
|
1247
1248
|
interface RuntimeCompactionSkippedEvent {
|
|
1248
1249
|
readonly contextId?: string;
|
|
1249
1250
|
readonly contextKind?: 'root' | 'child';
|
|
@@ -1255,6 +1256,13 @@ interface RuntimeCompactionSkippedEvent {
|
|
|
1255
1256
|
readonly triggerPercent: number;
|
|
1256
1257
|
readonly cooldownTurnsRemaining: number;
|
|
1257
1258
|
readonly lowSavingsStreak: number;
|
|
1259
|
+
/** Full request minus replaceable managed-run-context messages. */
|
|
1260
|
+
readonly compactableTokens?: number;
|
|
1261
|
+
readonly effectiveTriggerTokens?: number;
|
|
1262
|
+
readonly consecutiveFailures?: number;
|
|
1263
|
+
readonly circuitBreakerLimit?: number;
|
|
1264
|
+
readonly circuitBreakerState?: 'closed' | 'open' | 'half_open';
|
|
1265
|
+
readonly rearmAtTokens?: number;
|
|
1258
1266
|
}
|
|
1259
1267
|
declare function createCompactionAntiThrashState(): CompactionAntiThrashState;
|
|
1260
1268
|
declare function shouldSkipLlmCompaction(state: CompactionAntiThrashState | undefined, currentTokens?: number): boolean;
|
|
@@ -1732,6 +1740,41 @@ interface KodaXContextCompactionFinishedEvent extends Partial<KodaXLiveEventMeta
|
|
|
1732
1740
|
readonly summaryTokens?: number;
|
|
1733
1741
|
readonly queryLedgerTokens?: number;
|
|
1734
1742
|
}
|
|
1743
|
+
type KodaXCompactionFailureReason = 'summary_generation_failed' | 'persistence_failed' | 'context_capacity_exceeded' | 'post_processing_failed';
|
|
1744
|
+
interface KodaXCompactionEndState {
|
|
1745
|
+
readonly currentTokens: number;
|
|
1746
|
+
readonly compactableTokens: number;
|
|
1747
|
+
readonly consecutiveFailures: number;
|
|
1748
|
+
readonly circuitBreakerLimit: number;
|
|
1749
|
+
readonly circuitBreakerState: 'closed' | 'open' | 'half_open';
|
|
1750
|
+
readonly cooldownTurnsRemaining: number;
|
|
1751
|
+
}
|
|
1752
|
+
/** Structured outcome attached to the existing compaction-ended lifecycle event. */
|
|
1753
|
+
type KodaXCompactionEndResult = KodaXCompactionEndState & ({
|
|
1754
|
+
readonly outcome: 'compacted';
|
|
1755
|
+
readonly reason?: never;
|
|
1756
|
+
readonly failurePhase?: never;
|
|
1757
|
+
} | {
|
|
1758
|
+
readonly outcome: 'skipped';
|
|
1759
|
+
readonly reason: CompactionSkipReason;
|
|
1760
|
+
readonly failurePhase?: never;
|
|
1761
|
+
} | {
|
|
1762
|
+
readonly outcome: 'failed';
|
|
1763
|
+
readonly reason: 'summary_generation_failed';
|
|
1764
|
+
readonly failurePhase: 'summary_generation';
|
|
1765
|
+
} | {
|
|
1766
|
+
readonly outcome: 'failed';
|
|
1767
|
+
readonly reason: 'persistence_failed';
|
|
1768
|
+
readonly failurePhase: 'persistence';
|
|
1769
|
+
} | {
|
|
1770
|
+
readonly outcome: 'failed';
|
|
1771
|
+
readonly reason: 'post_processing_failed';
|
|
1772
|
+
readonly failurePhase: 'post_processing';
|
|
1773
|
+
} | {
|
|
1774
|
+
readonly outcome: 'failed';
|
|
1775
|
+
readonly reason: 'context_capacity_exceeded';
|
|
1776
|
+
readonly failurePhase?: never;
|
|
1777
|
+
});
|
|
1735
1778
|
interface KodaXSidecarMessageEvent {
|
|
1736
1779
|
readonly source: 'sidecar-verifier';
|
|
1737
1780
|
readonly verdict: 'revise' | 'blocked';
|
|
@@ -1831,6 +1874,16 @@ interface KodaXEvents {
|
|
|
1831
1874
|
name: string;
|
|
1832
1875
|
content: string;
|
|
1833
1876
|
}, meta?: KodaXToolEventMeta) => void;
|
|
1877
|
+
/** Internal execution lease boundary; fires immediately around tool.execute. */
|
|
1878
|
+
onToolExecutionStart?: (tool: {
|
|
1879
|
+
id: string;
|
|
1880
|
+
name: string;
|
|
1881
|
+
}, meta?: KodaXToolEventMeta) => void;
|
|
1882
|
+
/** Pairs with onToolExecutionStart in a finally block. */
|
|
1883
|
+
onToolExecutionEnd?: (tool: {
|
|
1884
|
+
id: string;
|
|
1885
|
+
name: string;
|
|
1886
|
+
}, meta?: KodaXToolEventMeta) => void;
|
|
1834
1887
|
/** FEATURE_067 v2: Real-time tool execution progress update. Updates the tool's display in the REPL transcript. */
|
|
1835
1888
|
onToolProgress?: (update: {
|
|
1836
1889
|
id: string;
|
|
@@ -1886,8 +1939,8 @@ interface KodaXEvents {
|
|
|
1886
1939
|
onCompactedMessages?: (messages: KodaXMessage[], update?: CompactionUpdate, meta?: KodaXActivityEventMeta) => void | Promise<void>;
|
|
1887
1940
|
/** Canonical, post-commit compaction fact. Legacy callbacks are projections. */
|
|
1888
1941
|
onContextCompactionFinished?: (event: KodaXContextCompactionFinishedEvent) => void;
|
|
1889
|
-
/**
|
|
1890
|
-
onCompactEnd?: (meta?: KodaXActivityEventMeta) => void;
|
|
1942
|
+
/** Ends a started compaction attempt; the optional result preserves legacy one-argument handlers. */
|
|
1943
|
+
onCompactEnd?: (meta?: KodaXActivityEventMeta, result?: KodaXCompactionEndResult) => void;
|
|
1891
1944
|
/** Whether the caller has queued follow-up input waiting for the next round */
|
|
1892
1945
|
hasPendingInputs?: () => boolean;
|
|
1893
1946
|
/**
|
|
@@ -1960,7 +2013,7 @@ interface KodaXEvents {
|
|
|
1960
2013
|
onPromptCacheDiagnostics?: (event: KodaXPromptCacheDiagnosticEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1961
2014
|
/** Optional bounded tool-exposure diagnostics. Emitted only when context.contextDiagnostics is true. */
|
|
1962
2015
|
onToolExposurePlanned?: (event: RuntimeToolExposurePlan & Partial<KodaXLiveEventMeta>) => void;
|
|
1963
|
-
/**
|
|
2016
|
+
/** Bounded operational reason whenever a compaction gate skips work. */
|
|
1964
2017
|
onContextCompactionSkipped?: (event: RuntimeCompactionSkippedEvent & Partial<KodaXLiveEventMeta>) => void;
|
|
1965
2018
|
/**
|
|
1966
2019
|
* Fired when the Sidecar Verifier produces an actionable message.
|
|
@@ -2789,15 +2842,30 @@ interface KodaXShellSandboxPrepareInput {
|
|
|
2789
2842
|
readonly deadlineAt?: number;
|
|
2790
2843
|
readonly reportObservation?: (observation: KodaXShellSandboxObservation) => void;
|
|
2791
2844
|
}
|
|
2845
|
+
/** Exclusive host filesystem fence acquired before a sandbox grants temporary ACLs. */
|
|
2846
|
+
interface KodaXFileSystemEffectLease {
|
|
2847
|
+
bindEffectProcess(pid: number, windowsJobContained: boolean): Promise<void>;
|
|
2848
|
+
finishEffectProcess(): Promise<void>;
|
|
2849
|
+
release(): Promise<void>;
|
|
2850
|
+
}
|
|
2792
2851
|
interface KodaXPreparedShellSandboxInvocation {
|
|
2793
2852
|
readonly executable: string;
|
|
2794
2853
|
readonly args: readonly string[];
|
|
2795
2854
|
readonly env: NodeJS.ProcessEnv;
|
|
2796
2855
|
readonly windowsVerbatimArguments?: boolean;
|
|
2856
|
+
readonly fileSystemEffectLease?: KodaXFileSystemEffectLease;
|
|
2797
2857
|
cleanup(): Promise<KodaXShellSandboxObservation | undefined>;
|
|
2798
2858
|
}
|
|
2799
2859
|
/** Runtime-owned OS sandbox broker for selected concrete shell calls. */
|
|
2800
2860
|
interface KodaXShellSandbox {
|
|
2861
|
+
/** Selected calls must not fall back to ordinary host execution. */
|
|
2862
|
+
readonly failClosed?: boolean;
|
|
2863
|
+
/**
|
|
2864
|
+
* Host-trusted proof that the prepared root cannot settle while one of its
|
|
2865
|
+
* descendants remains alive. Omitted adapters remain source-compatible but
|
|
2866
|
+
* cannot authorize opaque process-launching shell calls.
|
|
2867
|
+
*/
|
|
2868
|
+
readonly processTreeContainment?: 'root-exit-drains';
|
|
2801
2869
|
prepare(input: KodaXShellSandboxPrepareInput): Promise<KodaXPreparedShellSandboxInvocation | undefined>;
|
|
2802
2870
|
}
|
|
2803
2871
|
interface KodaXContextOptions {
|
|
@@ -3503,10 +3571,9 @@ interface KodaXToolExecutionContext {
|
|
|
3503
3571
|
readonly evidenceRefs: readonly string[];
|
|
3504
3572
|
} | undefined>;
|
|
3505
3573
|
/**
|
|
3506
|
-
*
|
|
3507
|
-
*
|
|
3508
|
-
*
|
|
3509
|
-
* review job or writes Memory directly.
|
|
3574
|
+
* @deprecated Legacy end-of-episode explicit Memory-intent capture callback.
|
|
3575
|
+
* Hosts may keep providing this callback; the conversation-first management
|
|
3576
|
+
* tool never sends its broader operation protocol through this seam.
|
|
3510
3577
|
*/
|
|
3511
3578
|
memoryIntent?: (input: {
|
|
3512
3579
|
readonly operation: 'remember' | 'correct';
|
|
@@ -3520,6 +3587,56 @@ interface KodaXToolExecutionContext {
|
|
|
3520
3587
|
readonly status: 'rejected';
|
|
3521
3588
|
readonly reason: string;
|
|
3522
3589
|
}>;
|
|
3590
|
+
/** Root-session-only conversation-first Memory management channel. */
|
|
3591
|
+
memoryManagementIntent?: (input: {
|
|
3592
|
+
readonly operation: 'list' | 'remember' | 'correct' | 'forget' | 'decisions' | 'show' | 'approve' | 'reject';
|
|
3593
|
+
readonly statement?: string;
|
|
3594
|
+
readonly targetRefId?: string;
|
|
3595
|
+
readonly claimKind?: 'fact' | 'policy' | 'preference' | 'procedure';
|
|
3596
|
+
readonly claimKey?: string;
|
|
3597
|
+
readonly userQuote?: string;
|
|
3598
|
+
readonly reason?: string;
|
|
3599
|
+
}) => Promise<{
|
|
3600
|
+
readonly status: 'listed';
|
|
3601
|
+
readonly operation: 'list';
|
|
3602
|
+
readonly total: number;
|
|
3603
|
+
readonly memories: readonly {
|
|
3604
|
+
readonly refId: string;
|
|
3605
|
+
readonly title: string;
|
|
3606
|
+
readonly body: string;
|
|
3607
|
+
readonly bodyFingerprint: string;
|
|
3608
|
+
}[];
|
|
3609
|
+
} | {
|
|
3610
|
+
readonly status: 'decisions';
|
|
3611
|
+
readonly operation: 'decisions';
|
|
3612
|
+
readonly total: number;
|
|
3613
|
+
readonly decisions: readonly {
|
|
3614
|
+
readonly refId: string;
|
|
3615
|
+
readonly summary: string;
|
|
3616
|
+
readonly rationale: string;
|
|
3617
|
+
readonly risk: 'low' | 'medium' | 'high';
|
|
3618
|
+
readonly proposedBody?: string;
|
|
3619
|
+
}[];
|
|
3620
|
+
} | {
|
|
3621
|
+
readonly status: 'shown';
|
|
3622
|
+
readonly operation: 'show';
|
|
3623
|
+
readonly decision: {
|
|
3624
|
+
readonly refId: string;
|
|
3625
|
+
readonly summary: string;
|
|
3626
|
+
readonly rationale: string;
|
|
3627
|
+
readonly risk: 'low' | 'medium' | 'high';
|
|
3628
|
+
readonly proposedBody?: string;
|
|
3629
|
+
};
|
|
3630
|
+
} | {
|
|
3631
|
+
readonly status: 'remembered' | 'updated' | 'already_known' | 'forgotten' | 'approved' | 'decision_rejected';
|
|
3632
|
+
readonly operation: 'remember' | 'correct' | 'forget' | 'approve' | 'reject';
|
|
3633
|
+
readonly changedRefIds: readonly string[];
|
|
3634
|
+
} | {
|
|
3635
|
+
readonly status: 'needs_clarification' | 'needs_review' | 'rejected';
|
|
3636
|
+
readonly operation: 'remember' | 'correct' | 'forget' | 'show' | 'approve' | 'reject';
|
|
3637
|
+
readonly reason: string;
|
|
3638
|
+
readonly decisionRefIds?: readonly string[];
|
|
3639
|
+
}>;
|
|
3523
3640
|
/** Exact persisted history loader for the current root or isolated worker Session. */
|
|
3524
3641
|
loadSessionHistory?: () => Promise<KodaXSessionLineage | null>;
|
|
3525
3642
|
/** Git root directory - Git 鏍圭洰褰?*/
|
|
@@ -4024,5 +4141,5 @@ interface CreateBashPrefixExtractorOptions {
|
|
|
4024
4141
|
*/
|
|
4025
4142
|
declare function createBashPrefixExtractor(opts: CreateBashPrefixExtractorOptions): BashPrefixExtractor;
|
|
4026
4143
|
|
|
4027
|
-
export { ALWAYS_RESIDENT_TOOL_NAMES as A, BASH_POLICY_SPEC as B,
|
|
4028
|
-
export type {
|
|
4144
|
+
export { ALWAYS_RESIDENT_TOOL_NAMES as A, BASH_POLICY_SPEC as B, normalizeKodaXAgentMode as b$, LSP_SERVERS as b4, LspService as b6, buildGoalRuntimeBinding as bM, consumeCompactionCooldown as bN, createBashPrefixExtractor as bO, createCompactionAntiThrashState as bP, createExternalActorTurnExecutor as bQ, createLocalCodingActorControl as bR, createRuntimeContextBudgetSnapshot as bS, decideWorkflowInvocation as bT, drainPendingSwaps as bU, estimateToolSchemaTokens as bV, extractCommandPrefix as bW, getDefaultLspService as bX, hasExplicitNaturalLanguageWorkflowIntent as bY, hasPendingSwap as bZ, makeDisabledGoalToolsContext as b_, planToolExposure as c0, providerResilienceConfigFromTimeouts as c1, recordCompactionSavings as c2, resolveConstructedAgent as c3, shouldSkipLlmCompaction as c4, shutdownDefaultLspService as c5, withGoalBeforeNextTurn as c6, withGoalStopHook as c7, workflowStartOutcomeConsumesTurn as c8, CodingActorSession as d };
|
|
4145
|
+
export type { KodaXManualSource as $, CapabilityRuntimeContract as C, DiagnosticsRequest as D, ExtensionRuntimeContract as E, FailureStage as F, GoalBlockedResult as G, KodaXChildContextBundle as H, KodaXChildExecutionResult as I, KodaXCompactionEndResult as J, KodaXActivityEventMeta as K, KodaXCompactionFailureReason as L, KodaXCompactionOverride as M, KodaXContextCompactionFinishedEvent as N, KodaXContextIdentity as O, KodaXContextOptions as P, KodaXContextTokenSnapshot as Q, KodaXEffectiveTaskConfig as R, KodaXEvents as S, KodaXFileSystemEffectLease as T, KodaXLiveEventMeta as U, KodaXManagedBudgetSnapshot as V, KodaXManagedProtocolPayload as W, KodaXManagedTask as X, KodaXManagedTaskRuntimeState as Y, KodaXManagedTaskStatusEvent as Z, KodaXManualIndexTopic as _, BashPrefixExtractor as a, KodaXVerificationScorecard as a$, KodaXManualTopic as a0, KodaXManualTopicId as a1, KodaXManualTopicInput as a2, KodaXMemoryStrategy as a3, KodaXOptions as a4, KodaXOrchestrationVerdict as a5, KodaXParentReductionContract as a6, KodaXPreparedShellSandboxInvocation as a7, KodaXPromptCacheDiagnosticEvent as a8, KodaXProviderPolicyHints as a9, KodaXSkillScriptInputFile as aA, KodaXSkillScriptOutputFile as aB, KodaXSkillScriptRunInput as aC, KodaXSkillScriptRunner as aD, KodaXTaskCapabilityHint as aE, KodaXTaskContract as aF, KodaXTaskEvidenceArtifact as aG, KodaXTaskEvidenceBundle as aH, KodaXTaskEvidenceEntry as aI, KodaXTaskRole as aJ, KodaXTaskRoleAssignment as aK, KodaXTaskStatus as aL, KodaXTaskSurface as aM, KodaXTaskToolPolicy as aN, KodaXTaskVerificationContract as aO, KodaXTaskVerificationCriterion as aP, KodaXTaskWorkItem as aQ, KodaXTimeoutConfig as aR, KodaXToolEventMeta as aS, KodaXToolExecutionContext as aT, KodaXToolSandboxObservationUpdate as aU, KodaXToolVisibilityMeta as aV, KodaXToolVisibilityPolicy as aW, KodaXTurnCompletedEvent as aX, KodaXTurnDeliveryKind as aY, KodaXTurnFailedEvent as aZ, KodaXTurnStartedEvent as a_, KodaXRepoIntelligenceCapability as aa, KodaXRepoIntelligenceMode as ab, KodaXRepoIntelligenceResolvedMode as ac, KodaXRepoIntelligenceTrace as ad, KodaXRepoIntelligenceTraceEvent as ae, KodaXRepoRoutingSignals as af, KodaXResult as ag, KodaXRoleRoundSummary as ah, KodaXRuntimeVerificationContract as ai, KodaXSandboxOptions as aj, KodaXSelfManualConfig as ak, KodaXSessionControl as al, KodaXSessionMutators as am, KodaXSessionOptions as an, KodaXShellExecutionContract as ao, KodaXShellKind as ap, KodaXShellProfileMode as aq, KodaXShellSandbox as ar, KodaXShellSandboxBackend as as, KodaXShellSandboxObservation as at, KodaXShellSandboxPrepareInput as au, KodaXSidecarMessageEvent as av, KodaXSkillDynamicContextPolicy as aw, KodaXSkillInvocationContext as ax, KodaXSkillMap as ay, KodaXSkillProjectionConfidence as az, BashPrefixResult as b, KodaXVerificationScorecardCriterion as b0, KodaXWorkflowAgentDigestEvent as b1, KodaXWorkflowEventMeta as b2, KodaXWorkflowTimeoutConfig as b3, LspServerInfo as b5, LspServiceConfig as b7, ProviderExecutionState as b8, ProviderRecoveryEvent as b9, TodoStatus as bA, ToolSideEffect as bB, WorkflowHostPolicy as bC, WorkflowInvocationAction as bD, WorkflowInvocationPolicyDecision as bE, WorkflowInvocationPolicyInput as bF, WorkflowInvocationSource as bG, WorkflowStartOutcome as bH, WorkflowToolHost as bI, WorkflowToolHostInlineInput as bJ, WorkflowToolHostResult as bK, WorkflowToolHostStartResult as bL, ProviderResilienceConfig as ba, ProviderResiliencePolicy as bb, RecoveryAction as bc, RecoveryDecision as bd, RecoveryLadderStep as be, RecoveryResult as bf, ResilienceClassification as bg, ResilienceErrorClass as bh, ResolveKodaXManualInput as bi, ResolveKodaXManualOptions as bj, ResolveKodaXManualResult as bk, RuntimeCompactionSkippedEvent as bl, RuntimeContextBudgetBreakdown as bm, RuntimeContextBudgetRecommendation as bn, RuntimeContextBudgetSnapshot as bo, RuntimeContextBudgetSnapshotInput as bp, RuntimeContextOptimizationProfile as bq, RuntimeContextPressure as br, RuntimeDefaultsSnapshot as bs, RuntimeToolExposureDecision as bt, RuntimeToolExposureMode as bu, RuntimeToolExposurePlan as bv, RuntimeToolExposurePlanInput as bw, RuntimeToolExposureReason as bx, TodoItem as by, TodoList as bz, BoundExtensionRuntimeController as c, CodingActorSessionOptions as e, CompactionAntiThrashConfig as f, CompactionAntiThrashState as g, CompactionSavingsDecision as h, CompactionSavingsSample as i, CompactionSkipReason as j, CreateBashPrefixExtractorOptions as k, ExtractCommandPrefixOptions as l, GoalCompleteResult as m, GoalCreateInput as n, GoalLifecycleContext as o, GoalRuntimeBinding as p, GoalRuntimeBindingDeps as q, GoalToolsContext as r, KodaXActorHost as s, KodaXAgentMode as t, KodaXAgentProfile as u, KodaXAgentScope as v, KodaXBudgetDisclosureZone as w, KodaXBudgetExtensionRequest as x, KodaXCanonicalAgentMode as y, KodaXChildAgentResult as z };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { k as KodaXMessage } from './types.d-CgrXrFrq.js';
|
|
2
|
-
import {
|
|
2
|
+
import { P as AgentMessage, cd as SessionEntry, cb as Session, ce as SessionExtension, ai as CompactionDetails, aH as FileOperations, cY as WorkflowMeta, cZ as WorkflowModelHint, c_ as WorkflowModule } from './controller.d-Dzxz22X-.js';
|
|
3
|
+
import { ab as KodaXSessionLineage, Y as KodaXJsonValue, P as KodaXCompactMemorySeed, a7 as KodaXSessionEntry, al as KodaXSessionTreeNode, aa as KodaXSessionLabelEntry, a9 as KodaXSessionGoalEntry, a4 as KodaXSessionClientNoticeEntry, ah as KodaXSessionRewindMarkerEntry, ac as KodaXSessionMemoryOutcomeDigestEntry, ad as KodaXSessionMemoryReviewReceiptEntry, ag as KodaXSessionNavigationOptions, a2 as KodaXSessionArtifactLedgerEntry } from './types.d-DlLBRqZ9.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @kodax-ai/agent Constants
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { aE as MemoryContextIdentity, aM as MemoryItemRef, ab as KodaXSessionLineage, a2 as KodaXSessionArtifactLedgerEntry, aI as MemoryEvent, b5 as MemoryReviewRunner, aP as MemoryManagementController, au as MemoryActionProposal, ax as MemoryApplyResult, aX as MemoryRejectResult, aV as MemoryRefFilter, aC as MemoryBodySnapshot, aY as MemoryRememberInput, aZ as MemoryRememberResult, aO as MemoryLifecycleOperationResult, aG as MemoryCuratorInput, aL as MemoryGovernanceReport, aA as MemoryAutoCuratorInput, aB as MemoryAutoCuratorResult, aS as MemoryPackInput, aQ as MemoryPack, b0 as MemoryReviewInput, b4 as MemoryReviewPlan, $ as KodaXMemoryOutcomeDigest, b1 as MemoryReviewModelInput, aH as MemoryEpisodeReviewResult } from './types.d-DlLBRqZ9.js';
|
|
2
|
+
|
|
3
|
+
interface CreateMemoryControlPlaneOptions {
|
|
4
|
+
readonly cwd: string;
|
|
5
|
+
readonly identity?: MemoryContextIdentity;
|
|
6
|
+
readonly learningStorePath?: string;
|
|
7
|
+
readonly memoryRoot?: string;
|
|
8
|
+
readonly projectDocs?: readonly string[];
|
|
9
|
+
readonly extraRefs?: readonly MemoryItemRef[];
|
|
10
|
+
readonly sessionId?: string;
|
|
11
|
+
readonly sessionLineage?: KodaXSessionLineage;
|
|
12
|
+
readonly artifactLedger?: readonly KodaXSessionArtifactLedgerEntry[];
|
|
13
|
+
readonly now?: () => string;
|
|
14
|
+
readonly onEvent?: (event: MemoryEvent) => void;
|
|
15
|
+
readonly discoverSkills?: boolean;
|
|
16
|
+
readonly memoryReviewer?: MemoryReviewRunner;
|
|
17
|
+
}
|
|
18
|
+
declare function createMemoryControlPlane(options: CreateMemoryControlPlaneOptions): MemoryManagementController;
|
|
19
|
+
declare class MemoryControlPlane implements MemoryManagementController {
|
|
20
|
+
private readonly cwd;
|
|
21
|
+
private readonly learningStorePath;
|
|
22
|
+
private readonly memoryRoot;
|
|
23
|
+
private readonly now;
|
|
24
|
+
private readonly onEvent?;
|
|
25
|
+
private readonly projectDocs;
|
|
26
|
+
private readonly extraRefs;
|
|
27
|
+
private readonly sessionId;
|
|
28
|
+
private readonly sessionLineage?;
|
|
29
|
+
private readonly artifactLedger;
|
|
30
|
+
private readonly discoverSkills;
|
|
31
|
+
private readonly memoryReviewer?;
|
|
32
|
+
private readonly identity?;
|
|
33
|
+
private readonly applicability?;
|
|
34
|
+
private readonly scopedRoots;
|
|
35
|
+
constructor(options: CreateMemoryControlPlaneOptions);
|
|
36
|
+
listInbox(): Promise<readonly MemoryActionProposal[]>;
|
|
37
|
+
showProposal(id: string): Promise<MemoryActionProposal | undefined>;
|
|
38
|
+
listHostAppliedEpisodeProposalIds(proposalIds: readonly string[]): Promise<readonly string[]>;
|
|
39
|
+
approveProposal(id: string, expectedFingerprints: Readonly<Record<string, string>>, expectedRevision?: string): Promise<MemoryApplyResult>;
|
|
40
|
+
private approveProposalWithLock;
|
|
41
|
+
rejectProposal(id: string, reason?: string, expectedRevision?: string): Promise<MemoryRejectResult>;
|
|
42
|
+
private rejectProposalWithLocks;
|
|
43
|
+
private reviewRejectedProposal;
|
|
44
|
+
private proposalDecisionLockPath;
|
|
45
|
+
listRefs(filter?: MemoryRefFilter): Promise<readonly MemoryItemRef[]>;
|
|
46
|
+
readRef(ref: MemoryItemRef): Promise<MemoryBodySnapshot>;
|
|
47
|
+
remember(input: MemoryRememberInput): Promise<MemoryRememberResult>;
|
|
48
|
+
private explicitMemoryLockPath;
|
|
49
|
+
private rememberWithLock;
|
|
50
|
+
private inspectMemoryRemember;
|
|
51
|
+
private resolveRememberDuplicate;
|
|
52
|
+
private findRememberDuplicate;
|
|
53
|
+
private applyExplicitMemoryRemember;
|
|
54
|
+
private mapExplicitMemoryResult;
|
|
55
|
+
private findRememberedRefIds;
|
|
56
|
+
archiveRef(id: string): Promise<MemoryLifecycleOperationResult>;
|
|
57
|
+
private archiveRefWithLock;
|
|
58
|
+
forgetRef(id: string, expectedBodyFingerprint?: string): Promise<MemoryLifecycleOperationResult>;
|
|
59
|
+
purgeRef(id: string): Promise<MemoryLifecycleOperationResult>;
|
|
60
|
+
private removeManagedRef;
|
|
61
|
+
runCurator(input?: MemoryCuratorInput): Promise<MemoryGovernanceReport>;
|
|
62
|
+
maybeRunAutoCurator(input?: MemoryAutoCuratorInput): Promise<MemoryAutoCuratorResult>;
|
|
63
|
+
buildMemoryPack(input: MemoryPackInput): Promise<MemoryPack>;
|
|
64
|
+
reviewMemoryFeedback(input: MemoryReviewInput): Promise<MemoryReviewPlan>;
|
|
65
|
+
prepareEpisodeReview(digest: KodaXMemoryOutcomeDigest): Promise<MemoryReviewModelInput>;
|
|
66
|
+
private prepareReviewInput;
|
|
67
|
+
persistReviewPlan(plan: MemoryReviewPlan): Promise<readonly string[]>;
|
|
68
|
+
private persistReviewPlanWithDecisions;
|
|
69
|
+
private resolveReviewMemoryPlacement;
|
|
70
|
+
private customRootPlacement;
|
|
71
|
+
private existingRefPlacement;
|
|
72
|
+
private newClaimPlacement;
|
|
73
|
+
private procedurePromotionStorePath;
|
|
74
|
+
private projectPlacement;
|
|
75
|
+
reviewEpisode(digest: KodaXMemoryOutcomeDigest, signal?: AbortSignal): Promise<MemoryEpisodeReviewResult>;
|
|
76
|
+
applyReviewedEpisode(reviewedPlan: MemoryReviewPlan, digest: KodaXMemoryOutcomeDigest, signal?: AbortSignal, revalidateAuthority?: () => Promise<void>): Promise<MemoryEpisodeReviewResult>;
|
|
77
|
+
private applyReviewedEpisodeWithLock;
|
|
78
|
+
private consultReviewAction;
|
|
79
|
+
private applyHostEligibleProposal;
|
|
80
|
+
private staleProposalClaimReason;
|
|
81
|
+
private projectLearningProposal;
|
|
82
|
+
private projectMemdirHandoff;
|
|
83
|
+
private projectReasoningHandoff;
|
|
84
|
+
private listLearningRefs;
|
|
85
|
+
private readLearningRef;
|
|
86
|
+
private listProjectDocRefs;
|
|
87
|
+
private listSessionTraceRefs;
|
|
88
|
+
private listArtifactLedgerRefs;
|
|
89
|
+
private readSessionTraceRef;
|
|
90
|
+
private readArtifactLedgerRef;
|
|
91
|
+
private listSkillRefs;
|
|
92
|
+
private buildPackHints;
|
|
93
|
+
private selectReviewCandidateRefs;
|
|
94
|
+
private readReviewCandidateRef;
|
|
95
|
+
private adapterForProposal;
|
|
96
|
+
private memdirAdapter;
|
|
97
|
+
private memdirAdapters;
|
|
98
|
+
private memoryRootForHandoff;
|
|
99
|
+
private memoryRootForRef;
|
|
100
|
+
private emit;
|
|
101
|
+
private buildGovernanceReport;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export { MemoryControlPlane as M, createMemoryControlPlane as c };
|
|
105
|
+
export type { CreateMemoryControlPlaneOptions as C };
|