@kodax-ai/kodax 0.7.67 → 0.7.69
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 +209 -3
- package/README.md +61 -9
- package/README_CN.md +58 -9
- package/config-templates/config.example.jsonc +26 -0
- package/config-templates/integrations/a2a.example.jsonc +54 -0
- package/config-templates/integrations/extensions.example.jsonc +7 -0
- package/config-templates/integrations/mcp.example.jsonc +16 -0
- package/dist/chunks/agent-DQRXT6M7.js +2 -0
- package/dist/chunks/argument-completer-RSK6CCGP.js +2 -0
- package/dist/chunks/chunk-4WIODYOH.js +329 -0
- package/dist/chunks/chunk-AWMTNUDS.js +37 -0
- package/dist/chunks/chunk-F7C7J6IM.js +7 -0
- package/dist/chunks/chunk-I4TPQEJN.js +5 -0
- package/dist/chunks/chunk-M7TCFYTO.js +107 -0
- package/dist/chunks/chunk-NGHQIGVW.js +46 -0
- package/dist/chunks/chunk-NGJURAY5.js +306 -0
- package/dist/chunks/{chunk-KBBGDRER.js → chunk-PA76WUBL.js} +2 -2
- package/dist/chunks/chunk-PQ3XUSY2.js +357 -0
- package/dist/chunks/chunk-UJEMSPM5.js +78 -0
- package/dist/chunks/{chunk-DEICMTHO.js → chunk-URC6ZI6P.js} +1 -1
- package/dist/chunks/{chunk-EN3O2C43.js → chunk-VAZ25MDX.js} +122 -122
- package/dist/chunks/chunk-VYKFM3TB.js +751 -0
- package/dist/chunks/chunk-WW2O2DEP.js +2 -0
- package/dist/chunks/chunk-Y4WOTWUC.js +2 -0
- package/dist/chunks/chunk-Z4PPLJF2.js +60 -0
- package/dist/chunks/chunk-ZG4DMYBS.js +422 -0
- package/dist/chunks/compaction-config-ABLL6UH3.js +2 -0
- package/dist/chunks/{construction-bootstrap-GLEHQ2KB.js → construction-bootstrap-GH6RW6ST.js} +1 -1
- package/dist/chunks/dist-DRBKYVHF.js +2 -0
- package/dist/chunks/dist-RWL2RBO4.js +2 -0
- package/dist/chunks/host-7SAB4WEC.js +2 -0
- package/dist/chunks/run-manager-XMDKTONJ.js +2 -0
- package/dist/chunks/utils-QYE5Y73D.js +2 -0
- package/dist/index.d.ts +19 -19
- package/dist/index.js +6 -6
- package/dist/kodax_cli.js +1497 -1209
- package/dist/runtime-worker.js +1371 -1107
- package/dist/sdk-a2a.d.ts +397 -0
- package/dist/sdk-a2a.js +9 -0
- package/dist/sdk-agent.d.ts +172 -33
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +126 -51
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +618 -0
- package/dist/sdk-experimental-memory.js +2 -0
- package/dist/sdk-llm.d.ts +16 -9
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +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 +35 -101
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +744 -21
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-session.d.ts +7 -7
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +100 -12
- package/dist/types-chunks/{base.d-DalIRhbb.d.ts → base.d-CYjtB68X.d.ts} +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-D57Gt6n8.d.ts → bash-prefix-extractor.d-BkIA8Wto.d.ts} +89 -18
- package/dist/types-chunks/{capability-learning.d-BQB0M70w.d.ts → capability-learning.d-WtsyRv3O.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-BZmqu_HL.d.ts → capsule.d-xJvfh4YR.d.ts} +5 -5
- package/dist/types-chunks/{commands.d-Cg26ud-Y.d.ts → commands.d-DkPfcQWG.d.ts} +4 -4
- package/dist/types-chunks/{cost-tracker.d-CBLk1fiD.d.ts → cost-tracker.d-BeaenODW.d.ts} +4 -1
- package/dist/types-chunks/{guardrail.d-Ds7JHxR1.d.ts → guardrail.d-6ZDbNbHO.d.ts} +1 -1
- package/dist/types-chunks/{guardrail.d-vSaBe64I.d.ts → guardrail.d-R7AiGfrI.d.ts} +4 -4
- package/dist/types-chunks/integration-config.d-ojG4swOP.d.ts +95 -0
- package/dist/types-chunks/{manager.d-Zum9cGHU.d.ts → manager.d-CoEuPRAo.d.ts} +4 -1
- package/dist/types-chunks/{public-api.d-CPBMPDiU.d.ts → public-api.d-7G4--RZE.d.ts} +6 -7
- package/dist/types-chunks/{resolver.d-CGkfRULj.d.ts → resolver.d-CIVoGc97.d.ts} +2 -2
- package/dist/types-chunks/{run-manager.d-lnwnfyNC.d.ts → run-manager.d-BaXtkryp.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-ByoMLoUS.d.ts → sdk-session-BQccrODn.d.ts} +6 -4
- package/dist/types-chunks/{types.d-DG9B4SMm.d.ts → types.d-BtC4yLYO.d.ts} +170 -13
- package/dist/types-chunks/{types.d-DYv3a1ka.d.ts → types.d-C9YHEAmA.d.ts} +38 -7
- package/dist/types-chunks/{types.d-DU9lLkmE.d.ts → types.d-CJR7t6iW.d.ts} +2 -2
- package/dist/types-chunks/{types.d-Bp4Lm1jv.d.ts → types.d-TTvpAGWf.d.ts} +11 -1
- package/dist/types-chunks/{utils.d-DMI-9GTR.d.ts → utils.d-BbB5jzi1.d.ts} +15 -7
- package/docs/SDK_EMBEDDER_GUIDE.md +732 -14
- package/package.json +14 -2
- package/dist/chunks/agent-E4V5SLX6.js +0 -2
- package/dist/chunks/argument-completer-N6RT5KYT.js +0 -2
- package/dist/chunks/chunk-AKMXJSGM.js +0 -56
- package/dist/chunks/chunk-CW32NQFO.js +0 -2
- package/dist/chunks/chunk-D6QVXQNI.js +0 -1
- package/dist/chunks/chunk-NVDK375I.js +0 -729
- package/dist/chunks/chunk-O7N22GJ3.js +0 -31
- package/dist/chunks/chunk-PZTG2C33.js +0 -7
- package/dist/chunks/chunk-QI6SQ2UQ.js +0 -306
- package/dist/chunks/chunk-QJJKMNZF.js +0 -2
- package/dist/chunks/chunk-RS2GAABJ.js +0 -328
- package/dist/chunks/chunk-W2XMNYLK.js +0 -15
- package/dist/chunks/chunk-WCSSXBHR.js +0 -419
- package/dist/chunks/chunk-YH5BTUQO.js +0 -343
- package/dist/chunks/chunk-YRBNXFHY.js +0 -2
- package/dist/chunks/compaction-config-56NO42ZI.js +0 -2
- package/dist/chunks/dist-4PXB7U22.js +0 -2
- package/dist/chunks/dist-4UIRSSFS.js +0 -2
- package/dist/chunks/host-DMREFNSO.js +0 -2
- package/dist/chunks/paste-C33GZQV5.js +0 -2
- package/dist/chunks/run-manager-P5XMSGZ7.js +0 -2
- package/dist/chunks/utils-JENPFKAE.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as KodaXMessage, a1 as KodaXToolDefinition, F as KodaXReasoningMode, a9 as KodaXWireReasoningEffort, a3 as KodaXToolResultContentItem, Y as KodaXThinkingBlock, I as KodaXRedactedThinkingBlock } from './types.d-TTvpAGWf.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @kodax-ai/agent Types
|
|
@@ -104,6 +104,46 @@ interface KodaXSessionClientNoticeEntry extends KodaXSessionEntryBase {
|
|
|
104
104
|
turnId?: string;
|
|
105
105
|
payload?: KodaXJsonValue;
|
|
106
106
|
}
|
|
107
|
+
interface KodaXMemoryOutcomeDigest {
|
|
108
|
+
readonly id: string;
|
|
109
|
+
readonly reviewKey: string;
|
|
110
|
+
readonly sessionId: string;
|
|
111
|
+
readonly branchId: string;
|
|
112
|
+
readonly sequence: number;
|
|
113
|
+
readonly objective: string;
|
|
114
|
+
readonly actionSignature?: string;
|
|
115
|
+
readonly approach: string;
|
|
116
|
+
readonly outcome: 'succeeded' | 'failed';
|
|
117
|
+
readonly summary: string;
|
|
118
|
+
readonly preconditions?: string;
|
|
119
|
+
readonly lesson?: string;
|
|
120
|
+
readonly evidenceRefs: readonly string[];
|
|
121
|
+
readonly evidence?: readonly KodaXMemoryOutcomeEvidence[];
|
|
122
|
+
readonly memoryInfluence?: readonly KodaXMemoryInfluenceRef[];
|
|
123
|
+
readonly visibility: 'prompt_safe' | 'private' | 'sensitive';
|
|
124
|
+
readonly createdAt: string;
|
|
125
|
+
}
|
|
126
|
+
interface KodaXMemoryOutcomeEvidence {
|
|
127
|
+
readonly ref: string;
|
|
128
|
+
readonly grade: 'authoritative' | 'verified' | 'corroborated' | 'observed' | 'inferred';
|
|
129
|
+
readonly source: 'user' | 'host' | 'tool' | 'environment' | 'agent';
|
|
130
|
+
readonly observedAt: string;
|
|
131
|
+
}
|
|
132
|
+
interface KodaXMemoryInfluenceRef {
|
|
133
|
+
readonly decisionReceiptRef: string;
|
|
134
|
+
readonly grade: 'direct' | 'supporting' | 'exposed' | 'unknown';
|
|
135
|
+
}
|
|
136
|
+
interface KodaXSessionMemoryOutcomeDigestEntry extends KodaXSessionEntryBase {
|
|
137
|
+
readonly type: 'memory_outcome_digest';
|
|
138
|
+
readonly digest: KodaXMemoryOutcomeDigest;
|
|
139
|
+
}
|
|
140
|
+
interface KodaXSessionMemoryReviewReceiptEntry extends KodaXSessionEntryBase {
|
|
141
|
+
readonly type: 'memory_review_receipt';
|
|
142
|
+
readonly reviewKey: string;
|
|
143
|
+
readonly proposalIds: readonly string[];
|
|
144
|
+
readonly status: 'completed' | 'no_action';
|
|
145
|
+
readonly completedAt: string;
|
|
146
|
+
}
|
|
107
147
|
type KodaXGoalStatus = 'active' | 'paused' | 'budget_limited' | 'blocked' | 'complete';
|
|
108
148
|
/**
|
|
109
149
|
* Persistent user-set goal state. v0.7.44 FEATURE_192 — backs the
|
|
@@ -142,7 +182,7 @@ interface KodaXSessionGoalEntry extends KodaXSessionEntryBase {
|
|
|
142
182
|
goal: KodaXGoalState | null;
|
|
143
183
|
event: KodaXGoalEventType;
|
|
144
184
|
}
|
|
145
|
-
type KodaXSessionEntry = KodaXSessionMessageEntry | KodaXSessionCompactionEntry | KodaXSessionBranchSummaryEntry | KodaXSessionLabelEntry | KodaXSessionArchiveMarkerEntry | KodaXSessionRewindMarkerEntry | KodaXSessionClientNoticeEntry | KodaXSessionGoalEntry;
|
|
185
|
+
type KodaXSessionEntry = KodaXSessionMessageEntry | KodaXSessionCompactionEntry | KodaXSessionBranchSummaryEntry | KodaXSessionLabelEntry | KodaXSessionArchiveMarkerEntry | KodaXSessionRewindMarkerEntry | KodaXSessionClientNoticeEntry | KodaXSessionMemoryOutcomeDigestEntry | KodaXSessionMemoryReviewReceiptEntry | KodaXSessionGoalEntry;
|
|
146
186
|
interface KodaXSessionArtifactLedgerEntry {
|
|
147
187
|
id: string;
|
|
148
188
|
kind: 'file_read' | 'file_modified' | 'file_created' | 'file_deleted' | 'path_scope' | 'search_scope' | 'command_scope' | 'check_result' | 'decision' | 'image_input' | 'tombstone';
|
|
@@ -179,7 +219,7 @@ interface KodaXSessionNavigationOptions {
|
|
|
179
219
|
summarizeCurrentBranch?: boolean;
|
|
180
220
|
}
|
|
181
221
|
interface KodaXSessionTreeNode {
|
|
182
|
-
entry: Exclude<KodaXSessionEntry, KodaXSessionLabelEntry | KodaXSessionGoalEntry | KodaXSessionClientNoticeEntry | KodaXSessionRewindMarkerEntry>;
|
|
222
|
+
entry: Exclude<KodaXSessionEntry, KodaXSessionLabelEntry | KodaXSessionGoalEntry | KodaXSessionClientNoticeEntry | KodaXSessionRewindMarkerEntry | KodaXSessionMemoryOutcomeDigestEntry | KodaXSessionMemoryReviewReceiptEntry>;
|
|
183
223
|
children: KodaXSessionTreeNode[];
|
|
184
224
|
label?: string;
|
|
185
225
|
active: boolean;
|
|
@@ -678,6 +718,20 @@ interface GenerationSpanData {
|
|
|
678
718
|
};
|
|
679
719
|
readonly finishReason?: string;
|
|
680
720
|
readonly error?: string;
|
|
721
|
+
readonly memoryDecisionReceipts?: readonly MemoryDecisionTraceReceipt[];
|
|
722
|
+
}
|
|
723
|
+
interface MemoryDecisionTraceReceipt {
|
|
724
|
+
readonly id: string;
|
|
725
|
+
readonly decisionEpoch: string;
|
|
726
|
+
readonly decisionRevision: string;
|
|
727
|
+
readonly policyVersion: string;
|
|
728
|
+
readonly candidateSetFingerprint: string;
|
|
729
|
+
readonly candidateRefs: readonly string[];
|
|
730
|
+
readonly selectedRefs: readonly string[];
|
|
731
|
+
readonly injectedRefs: readonly string[];
|
|
732
|
+
readonly selectionModes: readonly ('task_hint' | 'exact' | 'semantic_prefetch' | 'deliberate_query')[];
|
|
733
|
+
readonly actionSignature?: string;
|
|
734
|
+
readonly throughSequence: number;
|
|
681
735
|
}
|
|
682
736
|
interface ToolCallSpanData {
|
|
683
737
|
readonly kind: 'tool_call';
|
|
@@ -1528,6 +1582,8 @@ interface RunnerToolObserver {
|
|
|
1528
1582
|
interface RunnerToolContext {
|
|
1529
1583
|
readonly agent: Agent;
|
|
1530
1584
|
readonly abortSignal?: AbortSignal;
|
|
1585
|
+
/** Transcript that the resulting tool_result batch will extend. */
|
|
1586
|
+
readonly transcript?: readonly AgentMessage[];
|
|
1531
1587
|
/** The agent's Span, so tool implementations can nest custom spans if needed. */
|
|
1532
1588
|
readonly agentSpan?: Span | null;
|
|
1533
1589
|
/**
|
|
@@ -1553,6 +1609,14 @@ interface RunnerToolResult {
|
|
|
1553
1609
|
readonly isError?: boolean;
|
|
1554
1610
|
readonly metadata?: Record<string, unknown>;
|
|
1555
1611
|
}
|
|
1612
|
+
/** Complete settled batch presented once before the tool_result message. */
|
|
1613
|
+
interface RunnerToolResultBatch {
|
|
1614
|
+
readonly calls: readonly RunnerToolCall[];
|
|
1615
|
+
readonly results: readonly RunnerToolResult[];
|
|
1616
|
+
readonly transcript: readonly AgentMessage[];
|
|
1617
|
+
}
|
|
1618
|
+
/** Optional host-owned transform for aggregate result admission. */
|
|
1619
|
+
type RunnerToolResultBatchTransform = (batch: RunnerToolResultBatch) => Promise<readonly RunnerToolResult[]>;
|
|
1556
1620
|
/**
|
|
1557
1621
|
* A tool bundled with its executor. Extends `AgentTool` (the wire-format
|
|
1558
1622
|
* `KodaXToolDefinition`) so it can be passed through to the provider
|
|
@@ -1687,6 +1751,12 @@ interface RunOptions {
|
|
|
1687
1751
|
* `onToolResult` through the usual `KodaXEvents` bus.
|
|
1688
1752
|
*/
|
|
1689
1753
|
readonly toolObserver?: RunnerToolObserver;
|
|
1754
|
+
/**
|
|
1755
|
+
* Runs once after every tool call in a batch has settled and before the
|
|
1756
|
+
* corresponding tool_result message is built. The transform must preserve
|
|
1757
|
+
* result count/order so tool_use pairing remains valid.
|
|
1758
|
+
*/
|
|
1759
|
+
readonly toolResultBatchTransform?: RunnerToolResultBatchTransform;
|
|
1690
1760
|
/**
|
|
1691
1761
|
* Compaction hook. Fires at the TOP of every tool-loop iteration,
|
|
1692
1762
|
* BEFORE the LLM call. Return the replacement transcript to trigger
|
|
@@ -1919,6 +1989,12 @@ interface RunResult<TData = unknown> {
|
|
|
1919
1989
|
* outputs a `blocked` verdict (halt + surface to user). */
|
|
1920
1990
|
readonly stoppedByHook?: boolean;
|
|
1921
1991
|
}
|
|
1992
|
+
/** Non-enumerable recovery payload carried across Runner error boundaries. */
|
|
1993
|
+
interface RunnerRecoveryTranscriptCarrier {
|
|
1994
|
+
readonly __kodaxRecoveredMessages?: readonly AgentMessage[];
|
|
1995
|
+
}
|
|
1996
|
+
declare function attachRunnerRecoveryTranscript(error: Error, messages: readonly AgentMessage[]): void;
|
|
1997
|
+
declare function readRunnerRecoveryTranscript(error: unknown): readonly AgentMessage[] | undefined;
|
|
1922
1998
|
/**
|
|
1923
1999
|
* Stream events emitted by `Runner.runStream`. The event surface is
|
|
1924
2000
|
* intentionally small in v0.7.23; FEATURE_084 expands it to mirror the
|
|
@@ -2563,8 +2639,30 @@ interface DiscoveryOptions {
|
|
|
2563
2639
|
*/
|
|
2564
2640
|
declare function discoverInstances(options?: DiscoveryOptions): DiscoveredInstance[];
|
|
2565
2641
|
|
|
2642
|
+
interface MemoryContextIdentity {
|
|
2643
|
+
readonly tenantId: string;
|
|
2644
|
+
readonly workspaceId?: string;
|
|
2645
|
+
readonly userId?: string;
|
|
2646
|
+
readonly agentId: string;
|
|
2647
|
+
readonly projectId?: string;
|
|
2648
|
+
readonly sessionId: string;
|
|
2649
|
+
}
|
|
2650
|
+
interface MemoryApplicability {
|
|
2651
|
+
readonly tenantId: string;
|
|
2652
|
+
readonly workspaceId?: string;
|
|
2653
|
+
readonly userId?: string;
|
|
2654
|
+
readonly agentId?: string;
|
|
2655
|
+
readonly projectId?: string;
|
|
2656
|
+
readonly sessionId?: string;
|
|
2657
|
+
}
|
|
2658
|
+
declare function matchesMemoryApplicability(identity: MemoryContextIdentity, applicability: MemoryApplicability): boolean;
|
|
2659
|
+
declare function hashMemoryIdentityComponent(kind: string, canonicalId: string): string;
|
|
2660
|
+
declare function memoryApplicabilityFingerprint(applicability: MemoryApplicability): string;
|
|
2661
|
+
|
|
2566
2662
|
type MemoryRefKind = 'working_context' | 'session_trace' | 'artifact_ledger' | 'learning_proposal' | 'memdir' | 'skill' | 'workflow_run' | 'reasoning_report' | 'self_manual' | 'project_doc';
|
|
2567
|
-
|
|
2663
|
+
|
|
2664
|
+
type MemoryScope = 'turn' | 'session' | 'project' | 'workspace' | 'agent' | 'user' | 'builtin';
|
|
2665
|
+
type MemoryClaimKind = 'fact' | 'policy' | 'preference' | 'procedure' | 'episode';
|
|
2568
2666
|
type MemoryLifecycle = 'pending' | 'active' | 'provisional' | 'trusted' | 'stale' | 'quarantined' | 'archived' | 'readonly';
|
|
2569
2667
|
type MemoryAuthority = 'read_only' | 'proposal_only' | 'approved_write';
|
|
2570
2668
|
type MemoryVisibility = 'prompt_safe' | 'private' | 'sensitive';
|
|
@@ -2572,6 +2670,11 @@ interface MemoryItemRef {
|
|
|
2572
2670
|
readonly kind: MemoryRefKind;
|
|
2573
2671
|
readonly id: string;
|
|
2574
2672
|
readonly scope: MemoryScope;
|
|
2673
|
+
readonly scopeId?: string;
|
|
2674
|
+
readonly applicability?: MemoryApplicability;
|
|
2675
|
+
readonly claimKind?: MemoryClaimKind;
|
|
2676
|
+
readonly claimKey?: string;
|
|
2677
|
+
readonly actionSignature?: string;
|
|
2575
2678
|
readonly title?: string;
|
|
2576
2679
|
readonly owner: 'user' | 'project' | 'kodax' | 'external';
|
|
2577
2680
|
readonly lifecycle: MemoryLifecycle;
|
|
@@ -2586,6 +2689,9 @@ interface MemoryItemRef {
|
|
|
2586
2689
|
readonly updatedAt?: string;
|
|
2587
2690
|
readonly lastUsedAt?: string;
|
|
2588
2691
|
readonly pinned?: boolean;
|
|
2692
|
+
readonly applyReceiptRef?: string;
|
|
2693
|
+
readonly expectedFingerprint?: string;
|
|
2694
|
+
readonly resultingFingerprint?: string;
|
|
2589
2695
|
}
|
|
2590
2696
|
interface MemoryRefFilter {
|
|
2591
2697
|
readonly kinds?: readonly MemoryRefKind[];
|
|
@@ -2630,6 +2736,8 @@ interface MemoryApproval {
|
|
|
2630
2736
|
readonly approvedBy: 'user' | 'host';
|
|
2631
2737
|
readonly approvedAt: string;
|
|
2632
2738
|
readonly expectedFingerprints: Readonly<Record<string, string>>;
|
|
2739
|
+
readonly policyId?: string;
|
|
2740
|
+
readonly policyReason?: string;
|
|
2633
2741
|
}
|
|
2634
2742
|
interface MemoryApplyResult {
|
|
2635
2743
|
readonly proposalId: string;
|
|
@@ -2646,6 +2754,13 @@ interface MemoryRejectResult {
|
|
|
2646
2754
|
readonly review?: MemoryReviewPlan;
|
|
2647
2755
|
readonly warnings: readonly string[];
|
|
2648
2756
|
}
|
|
2757
|
+
interface MemoryLifecycleOperationResult {
|
|
2758
|
+
readonly refId: string;
|
|
2759
|
+
readonly operation: 'archive' | 'forget' | 'purge';
|
|
2760
|
+
readonly acknowledged: boolean;
|
|
2761
|
+
readonly residualSourceRefs: readonly string[];
|
|
2762
|
+
readonly warnings: readonly string[];
|
|
2763
|
+
}
|
|
2649
2764
|
interface MemorySourceAdapter {
|
|
2650
2765
|
readonly kind: MemoryRefKind;
|
|
2651
2766
|
listRefs(filter?: MemoryRefFilter): Promise<readonly MemoryItemRef[]>;
|
|
@@ -2686,11 +2801,16 @@ interface MemoryGovernanceReport {
|
|
|
2686
2801
|
}
|
|
2687
2802
|
interface MemoryPackInput {
|
|
2688
2803
|
readonly task: string;
|
|
2804
|
+
readonly identity?: MemoryContextIdentity;
|
|
2805
|
+
readonly decisionIntent?: string;
|
|
2806
|
+
readonly actionSignature?: string;
|
|
2807
|
+
readonly maxCandidates?: number;
|
|
2689
2808
|
readonly maxHints?: number;
|
|
2690
2809
|
readonly includePrivate?: boolean;
|
|
2691
2810
|
readonly includeSensitive?: boolean;
|
|
2692
2811
|
readonly includeSnippets?: boolean;
|
|
2693
2812
|
readonly ignoreMemory?: boolean;
|
|
2813
|
+
readonly purpose?: 'automatic' | 'deliberate_query';
|
|
2694
2814
|
}
|
|
2695
2815
|
interface MemoryPackHint {
|
|
2696
2816
|
readonly ref: MemoryItemRef;
|
|
@@ -2702,6 +2822,10 @@ interface MemoryPackHint {
|
|
|
2702
2822
|
interface MemoryPack {
|
|
2703
2823
|
readonly generatedAt: string;
|
|
2704
2824
|
readonly taskFingerprint: string;
|
|
2825
|
+
readonly memoryRevision: string;
|
|
2826
|
+
readonly candidates: readonly MemoryPackHint[];
|
|
2827
|
+
readonly promptHints: readonly MemoryPackHint[];
|
|
2828
|
+
/** @deprecated Use promptHints. Retained for F228 source compatibility. */
|
|
2705
2829
|
readonly hints: readonly MemoryPackHint[];
|
|
2706
2830
|
readonly omitted: readonly string[];
|
|
2707
2831
|
readonly traceMetadata: MemoryPackTraceMetadata;
|
|
@@ -2712,7 +2836,7 @@ interface MemoryPackTraceMetadata {
|
|
|
2712
2836
|
readonly taskFingerprint: string;
|
|
2713
2837
|
readonly suppressed: boolean;
|
|
2714
2838
|
}
|
|
2715
|
-
type MemoryReviewTrigger = 'user_correction' | 'explicit_remember' | 'explicit_forget' | 'proposal_rejected' | 'conflict_detected';
|
|
2839
|
+
type MemoryReviewTrigger = 'user_correction' | 'explicit_remember' | 'explicit_forget' | 'proposal_rejected' | 'conflict_detected' | 'episode_completed';
|
|
2716
2840
|
interface MemoryReviewCandidateRef {
|
|
2717
2841
|
readonly ref: MemoryItemRef;
|
|
2718
2842
|
readonly bodySnippet?: string;
|
|
@@ -2721,7 +2845,8 @@ interface MemoryReviewCandidateRef {
|
|
|
2721
2845
|
}
|
|
2722
2846
|
interface MemoryReviewInput {
|
|
2723
2847
|
readonly trigger: MemoryReviewTrigger;
|
|
2724
|
-
readonly userFeedback
|
|
2848
|
+
readonly userFeedback?: string;
|
|
2849
|
+
readonly episodeDigest?: KodaXMemoryOutcomeDigest;
|
|
2725
2850
|
readonly task?: string;
|
|
2726
2851
|
readonly sourceRefs?: readonly string[];
|
|
2727
2852
|
readonly candidateRefIds?: readonly string[];
|
|
@@ -2746,6 +2871,12 @@ interface MemoryReviewDraftAction {
|
|
|
2746
2871
|
readonly risk: 'low' | 'medium' | 'high';
|
|
2747
2872
|
readonly requiresApproval: true;
|
|
2748
2873
|
readonly proposedBody?: string;
|
|
2874
|
+
readonly claimKind?: MemoryClaimKind;
|
|
2875
|
+
readonly claimKey?: string;
|
|
2876
|
+
readonly actionSignature?: string;
|
|
2877
|
+
readonly preconditions?: string;
|
|
2878
|
+
readonly counterexamples?: readonly string[];
|
|
2879
|
+
readonly relationship?: 'same_claim' | 'condition_refinement' | 'conflict';
|
|
2749
2880
|
}
|
|
2750
2881
|
interface MemoryReviewPlan {
|
|
2751
2882
|
readonly trigger: MemoryReviewTrigger;
|
|
@@ -2754,6 +2885,22 @@ interface MemoryReviewPlan {
|
|
|
2754
2885
|
readonly candidateRefs: readonly MemoryReviewCandidateRef[];
|
|
2755
2886
|
readonly actions: readonly MemoryReviewDraftAction[];
|
|
2756
2887
|
readonly warnings: readonly string[];
|
|
2888
|
+
readonly episodeDigest?: KodaXMemoryOutcomeDigest;
|
|
2889
|
+
}
|
|
2890
|
+
interface MemoryEpisodeReviewResult {
|
|
2891
|
+
readonly plan: MemoryReviewPlan;
|
|
2892
|
+
readonly proposalIds: readonly string[];
|
|
2893
|
+
readonly appliedProposalIds: readonly string[];
|
|
2894
|
+
readonly decisions: readonly MemoryReviewPersistenceDecision[];
|
|
2895
|
+
readonly warnings: readonly string[];
|
|
2896
|
+
}
|
|
2897
|
+
type MemoryReviewPersistenceKind = 'create' | 'evidence_update' | 'condition_refinement' | 'conflict' | 'no_action' | 'reject' | 'quarantine';
|
|
2898
|
+
interface MemoryReviewPersistenceDecision {
|
|
2899
|
+
readonly actionIndex: number;
|
|
2900
|
+
readonly kind: MemoryReviewPersistenceKind;
|
|
2901
|
+
readonly reason: string;
|
|
2902
|
+
readonly existingRefId?: string;
|
|
2903
|
+
readonly proposalId?: string;
|
|
2757
2904
|
}
|
|
2758
2905
|
type MemoryReviewRunner = (input: MemoryReviewModelInput) => Promise<MemoryReviewPlan>;
|
|
2759
2906
|
interface MemoryController {
|
|
@@ -2767,6 +2914,11 @@ interface MemoryController {
|
|
|
2767
2914
|
maybeRunAutoCurator(input?: MemoryAutoCuratorInput): Promise<MemoryAutoCuratorResult>;
|
|
2768
2915
|
buildMemoryPack(input: MemoryPackInput): Promise<MemoryPack>;
|
|
2769
2916
|
reviewMemoryFeedback(input: MemoryReviewInput): Promise<MemoryReviewPlan>;
|
|
2917
|
+
persistReviewPlan(plan: MemoryReviewPlan): Promise<readonly string[]>;
|
|
2918
|
+
reviewEpisode(digest: KodaXMemoryOutcomeDigest, signal?: AbortSignal): Promise<MemoryEpisodeReviewResult>;
|
|
2919
|
+
archiveRef(id: string): Promise<MemoryLifecycleOperationResult>;
|
|
2920
|
+
forgetRef(id: string): Promise<MemoryLifecycleOperationResult>;
|
|
2921
|
+
purgeRef(id: string): Promise<MemoryLifecycleOperationResult>;
|
|
2770
2922
|
}
|
|
2771
2923
|
type MemoryEvent = {
|
|
2772
2924
|
readonly type: 'proposal.created';
|
|
@@ -2796,7 +2948,10 @@ type MemoryEvent = {
|
|
|
2796
2948
|
interface CompactionConfig {
|
|
2797
2949
|
/** Whether automatic compaction is enabled. */
|
|
2798
2950
|
enabled: boolean;
|
|
2799
|
-
/**
|
|
2951
|
+
/**
|
|
2952
|
+
* Optional early trigger percentage. `100` means capacity-only; values below
|
|
2953
|
+
* 100 explicitly opt in to semantic compaction before physical pressure.
|
|
2954
|
+
*/
|
|
2800
2955
|
triggerPercent: number;
|
|
2801
2956
|
/**
|
|
2802
2957
|
* @deprecated V2 compaction no longer uses this option.
|
|
@@ -2812,12 +2967,14 @@ interface CompactionConfig {
|
|
|
2812
2967
|
* summary pass. Defaults to 10.
|
|
2813
2968
|
*/
|
|
2814
2969
|
rollingSummaryPercent?: number;
|
|
2815
|
-
/**
|
|
2970
|
+
/**
|
|
2971
|
+
* Explicit legacy opt-in for destructive pre-summary tool-result pruning.
|
|
2972
|
+
* Undefined keeps the complete evidence for semantic summarization.
|
|
2973
|
+
*/
|
|
2816
2974
|
pruningThresholdTokens?: number;
|
|
2817
2975
|
/**
|
|
2818
|
-
*
|
|
2819
|
-
*
|
|
2820
|
-
* instead of returning early. Defaults to 0.8.
|
|
2976
|
+
* Legacy deterministic-pruning gap ratio. Only relevant when
|
|
2977
|
+
* `pruningThresholdTokens` is explicitly configured.
|
|
2821
2978
|
*/
|
|
2822
2979
|
pruningGapRatio?: number;
|
|
2823
2980
|
/** Optional override for the provider context window. */
|
|
@@ -3723,5 +3880,5 @@ interface CreateAgentExecutorPlaneOptions {
|
|
|
3723
3880
|
readonly createIdempotencyKey?: () => string;
|
|
3724
3881
|
}
|
|
3725
3882
|
|
|
3726
|
-
export { ASK_USER_BACK_SIGNAL as A, ASK_USER_CUSTOM_INPUT_SIGNAL as a, InvariantSession as aE, DEFAULT_SYSTEM_CAP as af, MAX_TOOL_LOOP_ITERATIONS as
|
|
3727
|
-
export type { AskUserAnswer as $, AgentExecutorPlaneBinding as B, AgentExecutorPlaneStore as C, AgentExecutorPreflightResult as D, AgentExecutorProtocol as E, AgentExecutorTaskReference as F, AgentExecutorTaskSnapshot as G, AgentManifest as H, AgentMessage as I, AgentMiddlewareDeclaration as J, AgentPreflightInput as K, AgentPreflightResult as L, AgentReasoningProfile as M, AgentRegistrationService as N, AgentSpanData as O, AgentTaskCancellation as P, AgentTaskCorrelation as Q, AgentTaskEvent as R, AgentTaskFilter as S, AgentTaskProgress as T, AgentTaskRegistrationSnapshot as U, AgentTaskService as V, AgentTaskSnapshot as W, AgentTaskStartInput as X, AgentTaskState as Y, AgentTaskUsage as Z, AgentTool as _,
|
|
3883
|
+
export { ASK_USER_BACK_SIGNAL as A, ASK_USER_CUSTOM_INPUT_SIGNAL as a, InvariantSession as aE, DEFAULT_SYSTEM_CAP as af, MAX_TOOL_LOOP_ITERATIONS as bs, SpanImpl as cK, Runner as co, createInvariantSessionForAgent as d$, Tracer as d0, _resetAdmittedAgentBindings as dR, _resetPresetDispatchers as dS, asSingleSelection as dT, attachRunnerRecoveryTranscript as dU, buildAssistantMessageFromLlmResult as dV, buildSystemPrompt as dW, buildToolResultMessage as dX, createAgent as dY, createHandoff as dZ, createInMemorySession as d_, WorkflowEventRecorder as db, createStateWriter as e0, createTrace as e1, createWorkflowProcessTracker as e2, defaultTracer as e3, detectInstructionsInjection as e4, discoverInstances as e5, executeRunnerToolCall as e6, extractAssistantTextFromMessage as e7, getActiveUserInteraction as e8, getAdmittedAgentBindings as e9, hashMemoryIdentityComponent as ea, isAskUserCustomInputAnswer as eb, isFinalWorkflowProcessStatus as ec, isRunnableTool as ed, isRunnerLlmResult as ee, matchesMemoryApplicability as ef, memoryApplicabilityFingerprint as eg, normalizeHostMetadata as eh, readRunnerRecoveryTranscript as ei, registerChildTask as ej, registerPresetDispatcher as ek, requestTaskStop as el, runAdmissionAudit as em, setActiveUserInteraction as en, setAdmittedAgentBindings as eo };
|
|
3884
|
+
export type { AskUserAnswer as $, AgentExecutorPlaneBinding as B, AgentExecutorPlaneStore as C, AgentExecutorPreflightResult as D, AgentExecutorProtocol as E, AgentExecutorTaskReference as F, AgentExecutorTaskSnapshot as G, AgentManifest as H, AgentMessage as I, AgentMiddlewareDeclaration as J, AgentPreflightInput as K, AgentPreflightResult as L, AgentReasoningProfile as M, AgentRegistrationService as N, AgentSpanData as O, AgentTaskCancellation as P, AgentTaskCorrelation as Q, AgentTaskEvent as R, AgentTaskFilter as S, AgentTaskProgress as T, AgentTaskRegistrationSnapshot as U, AgentTaskService as V, AgentTaskSnapshot as W, AgentTaskStartInput as X, AgentTaskState as Y, AgentTaskUsage as Z, AgentTool as _, KodaXSessionCompactionEntry as a$, AskUserCustomInputAnswer as a0, AskUserMultiOptions as a1, AskUserQuestionItem as a2, AskUserQuestionOptions as a3, AskUserSelectionAnswer as a4, CapabilitySupport as a5, ChildTaskRegistry as a6, CompactionAnchor as a7, CompactionConfig as a8, CompactionDetails as a9, InMemorySessionOptions as aA, InstanceDiscoveryFs as aB, InvariantId as aC, InvariantResult as aD, KodaXCompactMemoryProgress as aF, KodaXCompactMemorySeed as aG, KodaXExtensionSessionRecord as aH, KodaXExtensionSessionState as aI, KodaXExtensionStore as aJ, KodaXExtensionStoreEntry as aK, KodaXFileInputArtifact as aL, KodaXGoalEventType as aM, KodaXGoalState as aN, KodaXGoalStatus as aO, KodaXImageInputArtifact as aP, KodaXImageMediaType as aQ, KodaXInputArtifact as aR, KodaXInputArtifactSource as aS, KodaXJsonValue as aT, KodaXMemoryInfluenceRef as aU, KodaXMemoryOutcomeDigest as aV, KodaXMemoryOutcomeEvidence as aW, KodaXSessionArchiveMarkerEntry as aX, KodaXSessionArtifactLedgerEntry as aY, KodaXSessionBranchSummaryEntry as aZ, KodaXSessionClientNoticeEntry as a_, CompactionResult as aa, CompactionSpanData as ab, CompactionUpdate as ac, CreateAgentExecutorPlaneOptions as ad, CurrentTodoSummary as ae, Deliverable as ag, DiscoveredInstance as ah, DiscoveryOptions as ai, DispatchableAgentDescriptor as aj, DispatchableAgentListing as ak, DispatchableAgentOrigin as al, DispatchableAgentQuery as am, EvidenceSpanData as an, ExternalAgentEffectDeclaration as ao, ExternalAgentHealth as ap, ExternalAgentProtocol as aq, ExternalAgentRegistration as ar, ExternalAgentRegistrationSummary as as, FanoutSpanData as at, FileOperations as au, GenerationSpanData as av, Guardrail as aw, GuardrailSpanData as ax, Handoff as ay, HandoffSpanData as az, AdmissionAuditOptions as b, MemoryReviewModelInput as b$, KodaXSessionData as b0, KodaXSessionEntry as b1, KodaXSessionEntryBase as b2, KodaXSessionGoalEntry as b3, KodaXSessionLabelEntry as b4, KodaXSessionLineage as b5, KodaXSessionMemoryOutcomeDigestEntry as b6, KodaXSessionMemoryReviewReceiptEntry as b7, KodaXSessionMessageEntry as b8, KodaXSessionMeta as b9, MemoryAutoCuratorInput as bA, MemoryAutoCuratorResult as bB, MemoryBodySnapshot as bC, MemoryClaimKind as bD, MemoryContextIdentity as bE, MemoryController as bF, MemoryCuratorInput as bG, MemoryDecisionTraceReceipt as bH, MemoryEpisodeReviewResult as bI, MemoryEvent as bJ, MemoryGovernanceFinding as bK, MemoryGovernanceFindingKind as bL, MemoryGovernanceReport as bM, MemoryItemRef as bN, MemoryLifecycle as bO, MemoryLifecycleOperationResult as bP, MemoryPack as bQ, MemoryPackHint as bR, MemoryPackInput as bS, MemoryPackTraceMetadata as bT, MemoryProposalAction as bU, MemoryRefFilter as bV, MemoryRefKind as bW, MemoryRejectResult as bX, MemoryReviewCandidateRef as bY, MemoryReviewDraftAction as bZ, MemoryReviewInput as b_, KodaXSessionNavigationOptions as ba, KodaXSessionRewindMarkerEntry as bb, KodaXSessionRuntimeInfo as bc, KodaXSessionScope as bd, KodaXSessionStorage as be, KodaXSessionTreeNode as bf, KodaXSessionUiHistoryItem as bg, KodaXSessionUiHistoryItemType as bh, KodaXSessionUiTextHistoryItem as bi, KodaXSessionUiTextHistoryItemType as bj, KodaXSessionUiToolCall as bk, KodaXSessionUiToolCallStatus as bl, KodaXSessionUiToolGroupHistoryItem as bm, KodaXSessionWorkspaceKind as bn, KodaXVideoInputArtifact as bo, KodaXVideoMediaType as bp, LocalAgentTaskInput as bq, LocalAgentTaskUpdate as br, ManifestPatch as bt, MemoryActionProposal as bu, MemoryApplicability as bv, MemoryApplyPreview as bw, MemoryApplyResult as bx, MemoryApproval as by, MemoryAuthority as bz, AdmissionCtx as c, TraceOptions as c$, MemoryReviewPersistenceDecision as c0, MemoryReviewPersistenceKind as c1, MemoryReviewPlan as c2, MemoryReviewRunner as c3, MemoryReviewTrigger as c4, MemoryScope as c5, MemorySourceAdapter as c6, MemoryVisibility as c7, MessageEntry as c8, ObserveCtx as c9, SessionDispatchResult as cA, SessionEntry as cB, SessionErrorMetadata as cC, SessionExtension as cD, SessionForkOptions as cE, SessionMeta as cF, SessionStateSnapshot as cG, Span as cH, SpanData as cI, SpanError as cJ, SpanImplOptions as cL, StartTraceOptions as cM, StateWriter as cN, StateWriterFs as cO, StateWriterOptions as cP, StopHookContext as cQ, StopHookFn as cR, StopHookResult as cS, StopHookSpanData as cT, SystemCap as cU, TaskAbortRegistry as cV, TerminalCtx as cW, ToolCallSpanData as cX, ToolCapability as cY, ToolPermission as cZ, Trace as c_, PersistedSessionState as ca, PresetDispatcher as cb, PresetTracingContext as cc, QualityInvariant as cd, ReadonlyMutationTracker as ce, ReadonlyRecorder as cf, ReasoningDepth as cg, RecentlyModifiedFile as ch, RequestTaskStopOptions as ci, RequestTaskStopResult as cj, RunEvent as ck, RunOptions as cl, RunResult as cm, RunnableTool as cn, RunnerEvent as cp, RunnerLlmResult as cq, RunnerLlmReturn as cr, RunnerRecoveryTranscriptCarrier as cs, RunnerToolCall as ct, RunnerToolContext as cu, RunnerToolObserver as cv, RunnerToolResult as cw, RunnerToolResultBatch as cx, RunnerToolResultBatchTransform as cy, Session as cz, AdmissionVerdict as d, TracerOptions as d1, UserInteraction as d2, WorkflowAgentBackend as d3, WorkflowApi as d4, WorkflowApproval as d5, WorkflowApprovalSummary as d6, WorkflowArtifactRef as d7, WorkflowBudget as d8, WorkflowEvent as d9, WorkflowRun as dA, WorkflowRunState as dB, WorkflowRunStatus as dC, WorkflowSpawnAgentInput as dD, WorkflowSynthesis as dE, WorkflowSynthesizeInput as dF, WorkflowTaskHandle as dG, WorkflowTaskResult as dH, WorkflowTaskSnapshot as dI, WorkflowTaskStatus as dJ, WorkflowTaskSummaryEventUpdate as dK, WorkflowTaskSummaryKind as dL, WorkflowTaskSummaryUpdate as dM, WorkflowTaskUsage as dN, WorkflowTaskVerification as dO, WorkflowTaskVerificationResult as dP, WorkflowWaitOptions as dQ, WorkflowEventCorrelation as da, WorkflowEventType as dc, WorkflowIsolation as dd, WorkflowLimits as de, WorkflowLogEvent as df, WorkflowMeta as dg, WorkflowModelHint as dh, WorkflowModule as di, WorkflowParallelOptions as dj, WorkflowProcessArtifact as dk, WorkflowProcessCounts as dl, WorkflowProcessEvent as dm, WorkflowProcessItem as dn, WorkflowProcessItemKind as dp, WorkflowProcessItemOrigin as dq, WorkflowProcessItemStatus as dr, WorkflowProcessProgress as ds, WorkflowProcessSnapshot as dt, WorkflowProcessSource as du, WorkflowProcessStatus as dv, WorkflowProcessSummaryStatus as dw, WorkflowProcessTokenUsage as dx, WorkflowProcessTracker as dy, WorkflowProcessTrackerOptions as dz, AdmittedHandle as e, Agent as f, AgentArtifactPolicy as g, AgentArtifactPolicyDecision as h, AgentArtifactPolicyInput as i, AgentArtifactReference as j, AgentCapabilityDeclaration as k, AgentCapabilityRequirements as l, AgentContinuationInput as m, AgentCredentialBroker as n, AgentDispatchContext as o, AgentDispatchPolicy as p, AgentDispatchPolicyDecision as q, AgentDispatchPolicyInput as r, AgentDispatchabilitySnapshot as s, AgentDispatchabilityStatus as t, AgentEffectDeclaration as u, AgentExecutor as v, AgentExecutorEvent as w, AgentExecutorFactory as x, AgentExecutorFactoryContext as y, AgentExecutorPlane as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
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-TTvpAGWf.js';
|
|
2
|
+
import { K as KodaXBaseProvider } from './base.d-CYjtB68X.js';
|
|
3
3
|
import { C as CapabilityKind, a as CapabilityProvider } from './capability.d-3C62G8Eq.js';
|
|
4
|
-
import { aT as KodaXJsonValue, aH as KodaXExtensionSessionRecord, aJ as KodaXExtensionStore } from './types.d-
|
|
5
|
-
import {
|
|
4
|
+
import { aT as KodaXJsonValue, aH as KodaXExtensionSessionRecord, aJ as KodaXExtensionStore } from './types.d-BtC4yLYO.js';
|
|
5
|
+
import { aB as KodaXToolExecutionContext, bi as ToolSideEffect } from './bash-prefix-extractor.d-BkIA8Wto.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* KodaX Constructed-World types (FEATURE_087, v0.7.28).
|
|
@@ -323,6 +323,35 @@ type ToolHandlerStreaming = (input: Record<string, unknown>, context: KodaXToolE
|
|
|
323
323
|
/** Union of both handler types. Existing tools use ToolHandlerSync; new long-running tools may use ToolHandlerStreaming. */
|
|
324
324
|
type ToolHandler = ToolHandlerSync | ToolHandlerStreaming;
|
|
325
325
|
|
|
326
|
+
interface RuntimeRemoteWorkspaceBroker {
|
|
327
|
+
resolveReadablePath(relativePath: string): Promise<string>;
|
|
328
|
+
stageOutput(suggestedName: string): Promise<{
|
|
329
|
+
readonly stagingId: string;
|
|
330
|
+
readonly path: string;
|
|
331
|
+
}>;
|
|
332
|
+
}
|
|
333
|
+
interface RuntimeRemoteToolContext {
|
|
334
|
+
readonly workspaceAccess: 'none' | 'read' | 'write';
|
|
335
|
+
readonly allowedNetworkOrigins: readonly string[];
|
|
336
|
+
readonly workspace: RuntimeRemoteWorkspaceBroker;
|
|
337
|
+
readonly signal: AbortSignal;
|
|
338
|
+
}
|
|
339
|
+
type RuntimeRemoteToolDecision = {
|
|
340
|
+
readonly allowed: true;
|
|
341
|
+
readonly input: Readonly<Record<string, unknown>>;
|
|
342
|
+
} | {
|
|
343
|
+
readonly allowed: false;
|
|
344
|
+
readonly reason: string;
|
|
345
|
+
};
|
|
346
|
+
/** Explicit opt-in contract required before a non-native tool can serve remote callers. */
|
|
347
|
+
interface RuntimeRemoteToolContract {
|
|
348
|
+
readonly kind: 'managed-service' | 'narrow';
|
|
349
|
+
readonly workspaceEffect: 'none' | 'read' | 'write';
|
|
350
|
+
readonly networkOrigins: readonly string[];
|
|
351
|
+
readonly credentialHandling: 'none' | 'internal-only';
|
|
352
|
+
readonly processImplementation: 'none' | 'fixed-host-operation';
|
|
353
|
+
authorizeCall(input: Readonly<Record<string, unknown>>, context: RuntimeRemoteToolContext): Promise<RuntimeRemoteToolDecision>;
|
|
354
|
+
}
|
|
326
355
|
/**
|
|
327
356
|
* FEATURE_149 (v0.7.38) — interrupt-on-submit policy for in-flight tools.
|
|
328
357
|
*
|
|
@@ -352,6 +381,8 @@ interface LocalToolDefinition extends KodaXToolDefinition {
|
|
|
352
381
|
* not optional, to prevent silent drift when new tools are added).
|
|
353
382
|
*/
|
|
354
383
|
sideEffect: ToolSideEffect;
|
|
384
|
+
/** Absent means this tool is not eligible for remote A2A execution. */
|
|
385
|
+
remoteContract?: RuntimeRemoteToolContract;
|
|
355
386
|
/**
|
|
356
387
|
* v0.7.42 — Optional plan-mode override.
|
|
357
388
|
*
|
|
@@ -603,7 +634,7 @@ interface RegisteredHookDiagnostic {
|
|
|
603
634
|
order: number;
|
|
604
635
|
source: ExtensionContributionSource;
|
|
605
636
|
}
|
|
606
|
-
type ExtensionFailureStage = 'load' | 'reload' | 'event' | 'hook' | 'persistence';
|
|
637
|
+
type ExtensionFailureStage = 'load' | 'reload' | 'event' | 'hook' | 'persistence' | 'dispose';
|
|
607
638
|
interface ExtensionFailureDiagnostic {
|
|
608
639
|
stage: ExtensionFailureStage;
|
|
609
640
|
target: string;
|
|
@@ -971,5 +1002,5 @@ interface KodaXExtensionModule {
|
|
|
971
1002
|
activate?: (api: KodaXExtensionAPI) => KodaXExtensionActivationResult;
|
|
972
1003
|
}
|
|
973
1004
|
|
|
974
|
-
export { DEFAULT_HANDLER_TIMEOUT_MS as D, defaultPolicy as
|
|
975
|
-
export type {
|
|
1005
|
+
export { DEFAULT_HANDLER_TIMEOUT_MS as D, defaultPolicy as a5, exec as a6, webhook as a7, CapabilityDeniedError as c, ConstructionManifestError as e };
|
|
1006
|
+
export type { ToolHandler as $, AgentArtifact as A, KodaXRetrievalItem as B, Capabilities as C, ExecOptions as E, KodaXRetrievalResult as F, KodaXRetrievalScope as G, KodaXRetrievalToolName as H, KodaXRetrievalTrust as I, LocalToolDefinition as J, KodaXExtensionAPI as K, LoadedExtensionDiagnostic as L, ModelProviderRegistration as M, RegisteredCommandDiagnostic as N, RegisteredHookDiagnostic as O, RegisteredToolDefinition as P, RegisteredToolDiagnostic as Q, RegisteredCapabilityProviderDiagnostic as R, RuntimeRemoteToolContext as S, RuntimeRemoteToolContract as T, RuntimeRemoteToolDecision as U, RuntimeRemoteWorkspaceBroker as V, ScriptSource as W, StagedHandle as X, TestResult as Y, ToolContent as Z, ToolDefinitionSource as _, AgentContent as a, ToolHandlerSync as a0, ToolRegistrationOptions as a1, ToolRegistry as a2, WebhookOptions as a3, WebhookResult as a4, ArtifactStatus as b, ConstructionArtifact as d, ConstructionPolicy as f, ConstructionPolicyVerdict as g, ExecResult as h, ExtensionCommandContext as i, ExtensionCommandDefinition as j, ExtensionCommandInvocation as k, ExtensionCommandResult as l, ExtensionContributionSource as m, ExtensionEventMap as n, ExtensionFailureDiagnostic as o, ExtensionFailureStage as p, ExtensionHookMap as q, ExtensionLoadSource as r, ExtensionLogger as s, ExtensionRuntimeController as t, ExtensionRuntimeDiagnostics as u, ExtensionToolBeforeHookContext as v, KodaXExtensionActivationResult as w, KodaXExtensionModule as x, KodaXRetrievalArtifact as y, KodaXRetrievalFreshness as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aR as KodaXInputArtifact } from './types.d-
|
|
2
|
-
import {
|
|
1
|
+
import { aR as KodaXInputArtifact } from './types.d-BtC4yLYO.js';
|
|
2
|
+
import { S as KodaXTaskResultMetadata } from './types.d-TTvpAGWf.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @kodax-ai/agent/messaging — Message queue types
|
|
@@ -73,6 +73,11 @@ interface KodaXToolResultBlock {
|
|
|
73
73
|
*/
|
|
74
74
|
content: string | readonly KodaXToolResultContentItem[];
|
|
75
75
|
is_error?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Local recovery/accounting metadata. Provider serializers intentionally
|
|
78
|
+
* omit this field from the wire payload.
|
|
79
|
+
*/
|
|
80
|
+
metadata?: Record<string, unknown>;
|
|
76
81
|
}
|
|
77
82
|
interface KodaXImageBlock {
|
|
78
83
|
type: 'image';
|
|
@@ -161,6 +166,9 @@ interface KodaXMessage {
|
|
|
161
166
|
*/
|
|
162
167
|
timestamp?: string;
|
|
163
168
|
}
|
|
169
|
+
interface KodaXEphemeralSuffix {
|
|
170
|
+
readonly content: string;
|
|
171
|
+
}
|
|
164
172
|
interface KodaXTokenUsage {
|
|
165
173
|
inputTokens: number;
|
|
166
174
|
outputTokens: number;
|
|
@@ -567,6 +575,8 @@ interface KodaXProviderConfig {
|
|
|
567
575
|
verifyStrategy?: KodaXVerifyStrategy;
|
|
568
576
|
}
|
|
569
577
|
interface KodaXProviderStreamOptions {
|
|
578
|
+
/** Request-only tail context. Providers must not mutate persisted messages. */
|
|
579
|
+
ephemeralSuffix?: KodaXEphemeralSuffix;
|
|
570
580
|
onTextDelta?: (text: string) => void;
|
|
571
581
|
onThinkingDelta?: (text: string) => void;
|
|
572
582
|
onThinkingEnd?: (thinking: string) => void;
|
|
@@ -629,4 +639,4 @@ interface KodaXProviderStreamOptions {
|
|
|
629
639
|
signal?: AbortSignal;
|
|
630
640
|
}
|
|
631
641
|
|
|
632
|
-
export type {
|
|
642
|
+
export type { KodaXThinkingWireStrategy as $, KodaXProviderTransport as A, KodaXReasoningCapability as B, KodaXReasoningEffortPreset as C, KodaXReasoningEffortRequest as D, KodaXReasoningEffortWireStrategy as E, KodaXReasoningMode as F, KodaXReasoningProfile as G, KodaXReasoningRequest as H, KodaXRedactedThinkingBlock as I, KodaXReviewScale as J, KodaXAssuranceIntent as K, KodaXRiskLevel as L, KodaXStableEffortIntent as M, KodaXStreamResult as N, KodaXTaskActionability as O, KodaXTaskBudgetOverrides as P, KodaXTaskComplexity as Q, KodaXTaskFamily as R, KodaXTaskResultMetadata as S, KodaXTaskResultSource as T, KodaXTaskRoutingDecision as U, KodaXTaskType as V, KodaXTaskWorkIntent as W, KodaXTextBlock as X, KodaXThinkingBlock as Y, KodaXThinkingBudgetMap as Z, KodaXThinkingDepth as _, KodaXCacheBoundary as a, KodaXTokenUsage as a0, KodaXToolDefinition as a1, KodaXToolResultBlock as a2, KodaXToolResultContentItem as a3, KodaXToolResultImageItem as a4, KodaXToolResultTextItem as a5, KodaXToolUseBlock as a6, KodaXVerifyCredentialResult as a7, KodaXVerifyStrategy as a8, KodaXWireReasoningEffort as a9, KodaXChildFanoutClass as b, KodaXContentBlock as c, KodaXCustomProviderConfig as d, KodaXEphemeralSuffix as e, KodaXExecutionMode as f, KodaXExecutionPattern as g, KodaXHarnessProfile as h, KodaXImageBlock as i, KodaXListModelsResult as j, KodaXMessage as k, KodaXModelDescriptor as l, KodaXMutationSurface as m, KodaXNormalizedReasoningRequest as n, KodaXProtocolFamily as o, KodaXProviderCapabilityProfile as p, KodaXProviderConfig as q, KodaXProviderContextFidelity as r, KodaXProviderConversationSemantics as s, KodaXProviderEvidenceSupport as t, KodaXProviderLongRunningSupport as u, KodaXProviderMcpSupport as v, KodaXProviderMultimodalSupport as w, KodaXProviderSessionSupport as x, KodaXProviderStreamOptions as y, KodaXProviderToolCallingFidelity as z };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { I as KodaXContextTokenSnapshot,
|
|
3
|
-
import {
|
|
4
|
-
import { A as AgentsFile, f as AutoModeStats, l as KodaXMcpServersConfig } from './guardrail.d-
|
|
1
|
+
import { k as KodaXMessage, F as KodaXReasoningMode, d as KodaXCustomProviderConfig, p as KodaXProviderCapabilityProfile } from './types.d-TTvpAGWf.js';
|
|
2
|
+
import { I as KodaXContextTokenSnapshot, ae as KodaXSkillDynamicContextPolicy, r as KodaXAgentMode, a1 as KodaXRepoIntelligenceMode, Y as KodaXOptions, af as KodaXSkillInvocationContext } from './bash-prefix-extractor.d-BkIA8Wto.js';
|
|
3
|
+
import { bg as KodaXSessionUiHistoryItem, b5 as KodaXSessionLineage, aY as KodaXSessionArtifactLedgerEntry, aI as KodaXExtensionSessionState, aH as KodaXExtensionSessionRecord, bc as KodaXSessionRuntimeInfo, du as WorkflowProcessSource } from './types.d-BtC4yLYO.js';
|
|
4
|
+
import { A as AgentsFile, f as AutoModeStats, l as KodaXMcpServersConfig } from './guardrail.d-R7AiGfrI.js';
|
|
5
5
|
import * as readline from 'readline';
|
|
6
|
-
import { f as PermissionMode } from './public-api.d-
|
|
6
|
+
import { f as PermissionMode } from './public-api.d-7G4--RZE.js';
|
|
7
7
|
import { SpawnSyncReturns } from 'child_process';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -512,6 +512,14 @@ declare function loadConfig(): {
|
|
|
512
512
|
* not block startup.
|
|
513
513
|
*/
|
|
514
514
|
declare const KODAX_EXAMPLE_CONFIG_FILE: string;
|
|
515
|
+
declare const KODAX_INTEGRATION_EXAMPLE_FILES: {
|
|
516
|
+
readonly mcp: string;
|
|
517
|
+
readonly a2a: string;
|
|
518
|
+
readonly extensions: string;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
declare function ensureExampleConfigFiles(): readonly string[];
|
|
522
|
+
/** @deprecated Use ensureExampleConfigFiles() to observe every created path. */
|
|
515
523
|
declare function ensureExampleConfigFile(): string | undefined;
|
|
516
524
|
declare function prepareRuntimeConfig(): ReturnType<typeof loadConfig>;
|
|
517
525
|
declare function saveConfig(config: {
|
|
@@ -594,5 +602,5 @@ declare function resolveRuntimeEffortSelection(input: {
|
|
|
594
602
|
declare function getGitRoot(cwd?: string): Promise<string | null>;
|
|
595
603
|
declare function rateLimitedCall<T>(fn: () => Promise<T>): Promise<T>;
|
|
596
604
|
|
|
597
|
-
export {
|
|
598
|
-
export type { Command as C, InteractiveContext as I, RuntimeSurfaceMode as R, CommandCallbacks as a, CommandDefinition as b, CommandInfo as c, CommandInvocationRequest as d, CommandSource as e, CommandWorkflowInvocationRequest as f, CurrentConfig as g, InteractiveMode as h, RuntimeSurfaceStatus as
|
|
605
|
+
export { registerConfiguredCustomProviders as A, resolveRuntimeEffortSelection as B, resolveRuntimeModelSelection as D, resolveRuntimeProviderSelection as E, saveConfig as F, touchContext as G, KODAX_CONFIG_FILE as K, PREVIEW_MAX_LENGTH as P, KODAX_DIR as i, KODAX_EXAMPLE_CONFIG_FILE as j, KODAX_INTEGRATION_EXAMPLE_FILES as k, KODAX_SESSIONS_DIR as l, KODAX_VERSION as m, createInteractiveContext as o, ensureExampleConfigFile as p, ensureExampleConfigFiles as q, getGitRoot as r, getProviderList as s, getProviderModel as t, getVersion as u, hydrateProcessEnvFromShell as v, isProviderConfigured as w, loadConfig as x, prepareRuntimeConfig as y, rateLimitedCall as z };
|
|
606
|
+
export type { Command as C, InteractiveContext as I, RuntimeSurfaceMode as R, CommandCallbacks as a, CommandDefinition as b, CommandInfo as c, CommandInvocationRequest as d, CommandSource as e, CommandWorkflowInvocationRequest as f, CurrentConfig as g, InteractiveMode as h, RuntimeSurfaceStatus as n };
|