@kodax-ai/kodax 0.7.66 → 0.7.68
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 +180 -3
- package/README.md +51 -16
- package/README_CN.md +34 -13
- package/dist/chunks/agent-DATNZOBK.js +2 -0
- package/dist/chunks/argument-completer-X7MMM7Y6.js +2 -0
- package/dist/chunks/chunk-5GL55MOH.js +36 -0
- package/dist/chunks/chunk-67XJ4YUA.js +703 -0
- package/dist/chunks/chunk-C4SBXBWH.js +346 -0
- package/dist/chunks/{chunk-ALS32RNZ.js → chunk-CC4BVVE7.js} +9 -9
- package/dist/chunks/{chunk-VS4CDDEF.js → chunk-CTHUX5ZH.js} +221 -221
- package/dist/chunks/{chunk-YRBNXFHY.js → chunk-HFM2D5BP.js} +1 -1
- package/dist/chunks/chunk-HLBHSA2B.js +325 -0
- package/dist/chunks/{chunk-O7N22GJ3.js → chunk-K2NCKRVY.js} +16 -14
- package/dist/chunks/chunk-KGAI32VS.js +22 -0
- package/dist/chunks/{chunk-QAQ2HNXD.js → chunk-KIQRCGVR.js} +126 -112
- package/dist/chunks/chunk-MP52BDK5.js +15 -0
- package/dist/chunks/chunk-O5OJQFPY.js +307 -0
- package/dist/chunks/chunk-OIELNE6Z.js +56 -0
- package/dist/chunks/chunk-PEGSHZAA.js +5 -0
- package/dist/chunks/chunk-TOGESFRN.js +2 -0
- package/dist/chunks/compaction-config-BXEDHIQP.js +2 -0
- package/dist/chunks/{construction-bootstrap-3XDS2D5K.js → construction-bootstrap-PYWJHO35.js} +1 -1
- package/dist/chunks/dist-76PJHNSG.js +2 -0
- package/dist/chunks/{dist-4PXB7U22.js → dist-HTDJRAD6.js} +1 -1
- package/dist/chunks/host-UAXIDZ6V.js +2 -0
- package/dist/chunks/run-manager-UCXB4G22.js +2 -0
- package/dist/chunks/utils-S63V5UCM.js +2 -0
- package/dist/index.d.ts +19 -16
- package/dist/index.js +6 -6
- package/dist/kodax_cli.js +1292 -1255
- package/dist/runtime-worker.js +1196 -1153
- package/dist/sdk-agent.d.ts +143 -18
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +281 -20
- 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 +6 -6
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.d.ts +1 -1
- package/dist/sdk-repl.d.ts +26 -17
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +102 -14
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-session.d.ts +6 -6
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +12 -12
- package/dist/types-chunks/{base.d-DalIRhbb.d.ts → base.d-C8mXDhLL.d.ts} +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-BjkITAva.d.ts → bash-prefix-extractor.d-Dm-T865v.d.ts} +67 -12
- package/dist/types-chunks/{capability-learning.d-BQB0M70w.d.ts → capability-learning.d-BLEmCib0.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-hVhPNkHd.d.ts → capsule.d-CzaamUUv.d.ts} +5 -5
- package/dist/types-chunks/{commands.d-C3B1TdGM.d.ts → commands.d-DxKjVSNU.d.ts} +4 -4
- package/dist/types-chunks/{guardrail.d-wk-s0psS.d.ts → guardrail.d-CPDfZyJp.d.ts} +3 -3
- package/dist/types-chunks/{guardrail.d-C_Siraua.d.ts → guardrail.d-D7r6zVSR.d.ts} +1 -1
- package/dist/types-chunks/{public-api.d-jtREVfEq.d.ts → public-api.d-BcKbBy1E.d.ts} +12 -7
- package/dist/types-chunks/{resolver.d-CGkfRULj.d.ts → resolver.d-DmBnoilY.d.ts} +2 -2
- package/dist/types-chunks/{run-manager.d-CFknOfo1.d.ts → run-manager.d-CSj7_kWk.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-CLqyfAmf.d.ts → sdk-session-C6nDgyh8.d.ts} +4 -4
- package/dist/types-chunks/{types.d-Bp4Lm1jv.d.ts → types.d-CO_ZkmOd.d.ts} +6 -1
- package/dist/types-chunks/{types.d-CUN_bZU7.d.ts → types.d-CzscbsG0.d.ts} +4 -4
- package/dist/types-chunks/{process.d-CY2g03Mb.d.ts → types.d-D2frCRaY.d.ts} +505 -10
- package/dist/types-chunks/{types.d-BMLxKV69.d.ts → types.d-D9FKbAmf.d.ts} +2 -2
- package/dist/types-chunks/{utils.d-C1rpoeDh.d.ts → utils.d-DOXxnOnI.d.ts} +9 -5
- package/docs/SDK_EMBEDDER_GUIDE.md +3179 -0
- package/package.json +6 -1
- package/dist/chunks/agent-KER4WDNO.js +0 -2
- package/dist/chunks/argument-completer-HK3MHA3K.js +0 -2
- package/dist/chunks/chunk-3HKBBY74.js +0 -339
- package/dist/chunks/chunk-AKBH2EEE.js +0 -8
- package/dist/chunks/chunk-MHRN2LQV.js +0 -328
- package/dist/chunks/chunk-NBQW7PNZ.js +0 -18
- package/dist/chunks/chunk-QJVZZSEO.js +0 -56
- package/dist/chunks/chunk-TLJGOKBT.js +0 -729
- package/dist/chunks/chunk-WBBEJIAY.js +0 -306
- package/dist/chunks/chunk-WMIZCY2J.js +0 -2
- package/dist/chunks/compaction-config-7GMUFNPB.js +0 -2
- package/dist/chunks/dist-4YAYT2TO.js +0 -2
- package/dist/chunks/host-KG3456QP.js +0 -2
- package/dist/chunks/run-manager-6CAH3KTA.js +0 -2
- package/dist/chunks/utils-OT5ENFUL.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-CO_ZkmOd.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';
|
|
@@ -2563,8 +2617,30 @@ interface DiscoveryOptions {
|
|
|
2563
2617
|
*/
|
|
2564
2618
|
declare function discoverInstances(options?: DiscoveryOptions): DiscoveredInstance[];
|
|
2565
2619
|
|
|
2620
|
+
interface MemoryContextIdentity {
|
|
2621
|
+
readonly tenantId: string;
|
|
2622
|
+
readonly workspaceId?: string;
|
|
2623
|
+
readonly userId?: string;
|
|
2624
|
+
readonly agentId: string;
|
|
2625
|
+
readonly projectId?: string;
|
|
2626
|
+
readonly sessionId: string;
|
|
2627
|
+
}
|
|
2628
|
+
interface MemoryApplicability {
|
|
2629
|
+
readonly tenantId: string;
|
|
2630
|
+
readonly workspaceId?: string;
|
|
2631
|
+
readonly userId?: string;
|
|
2632
|
+
readonly agentId?: string;
|
|
2633
|
+
readonly projectId?: string;
|
|
2634
|
+
readonly sessionId?: string;
|
|
2635
|
+
}
|
|
2636
|
+
declare function matchesMemoryApplicability(identity: MemoryContextIdentity, applicability: MemoryApplicability): boolean;
|
|
2637
|
+
declare function hashMemoryIdentityComponent(kind: string, canonicalId: string): string;
|
|
2638
|
+
declare function memoryApplicabilityFingerprint(applicability: MemoryApplicability): string;
|
|
2639
|
+
|
|
2566
2640
|
type MemoryRefKind = 'working_context' | 'session_trace' | 'artifact_ledger' | 'learning_proposal' | 'memdir' | 'skill' | 'workflow_run' | 'reasoning_report' | 'self_manual' | 'project_doc';
|
|
2567
|
-
|
|
2641
|
+
|
|
2642
|
+
type MemoryScope = 'turn' | 'session' | 'project' | 'workspace' | 'agent' | 'user' | 'builtin';
|
|
2643
|
+
type MemoryClaimKind = 'fact' | 'policy' | 'preference' | 'procedure' | 'episode';
|
|
2568
2644
|
type MemoryLifecycle = 'pending' | 'active' | 'provisional' | 'trusted' | 'stale' | 'quarantined' | 'archived' | 'readonly';
|
|
2569
2645
|
type MemoryAuthority = 'read_only' | 'proposal_only' | 'approved_write';
|
|
2570
2646
|
type MemoryVisibility = 'prompt_safe' | 'private' | 'sensitive';
|
|
@@ -2572,6 +2648,11 @@ interface MemoryItemRef {
|
|
|
2572
2648
|
readonly kind: MemoryRefKind;
|
|
2573
2649
|
readonly id: string;
|
|
2574
2650
|
readonly scope: MemoryScope;
|
|
2651
|
+
readonly scopeId?: string;
|
|
2652
|
+
readonly applicability?: MemoryApplicability;
|
|
2653
|
+
readonly claimKind?: MemoryClaimKind;
|
|
2654
|
+
readonly claimKey?: string;
|
|
2655
|
+
readonly actionSignature?: string;
|
|
2575
2656
|
readonly title?: string;
|
|
2576
2657
|
readonly owner: 'user' | 'project' | 'kodax' | 'external';
|
|
2577
2658
|
readonly lifecycle: MemoryLifecycle;
|
|
@@ -2586,6 +2667,9 @@ interface MemoryItemRef {
|
|
|
2586
2667
|
readonly updatedAt?: string;
|
|
2587
2668
|
readonly lastUsedAt?: string;
|
|
2588
2669
|
readonly pinned?: boolean;
|
|
2670
|
+
readonly applyReceiptRef?: string;
|
|
2671
|
+
readonly expectedFingerprint?: string;
|
|
2672
|
+
readonly resultingFingerprint?: string;
|
|
2589
2673
|
}
|
|
2590
2674
|
interface MemoryRefFilter {
|
|
2591
2675
|
readonly kinds?: readonly MemoryRefKind[];
|
|
@@ -2630,6 +2714,8 @@ interface MemoryApproval {
|
|
|
2630
2714
|
readonly approvedBy: 'user' | 'host';
|
|
2631
2715
|
readonly approvedAt: string;
|
|
2632
2716
|
readonly expectedFingerprints: Readonly<Record<string, string>>;
|
|
2717
|
+
readonly policyId?: string;
|
|
2718
|
+
readonly policyReason?: string;
|
|
2633
2719
|
}
|
|
2634
2720
|
interface MemoryApplyResult {
|
|
2635
2721
|
readonly proposalId: string;
|
|
@@ -2646,6 +2732,13 @@ interface MemoryRejectResult {
|
|
|
2646
2732
|
readonly review?: MemoryReviewPlan;
|
|
2647
2733
|
readonly warnings: readonly string[];
|
|
2648
2734
|
}
|
|
2735
|
+
interface MemoryLifecycleOperationResult {
|
|
2736
|
+
readonly refId: string;
|
|
2737
|
+
readonly operation: 'archive' | 'forget' | 'purge';
|
|
2738
|
+
readonly acknowledged: boolean;
|
|
2739
|
+
readonly residualSourceRefs: readonly string[];
|
|
2740
|
+
readonly warnings: readonly string[];
|
|
2741
|
+
}
|
|
2649
2742
|
interface MemorySourceAdapter {
|
|
2650
2743
|
readonly kind: MemoryRefKind;
|
|
2651
2744
|
listRefs(filter?: MemoryRefFilter): Promise<readonly MemoryItemRef[]>;
|
|
@@ -2686,11 +2779,16 @@ interface MemoryGovernanceReport {
|
|
|
2686
2779
|
}
|
|
2687
2780
|
interface MemoryPackInput {
|
|
2688
2781
|
readonly task: string;
|
|
2782
|
+
readonly identity?: MemoryContextIdentity;
|
|
2783
|
+
readonly decisionIntent?: string;
|
|
2784
|
+
readonly actionSignature?: string;
|
|
2785
|
+
readonly maxCandidates?: number;
|
|
2689
2786
|
readonly maxHints?: number;
|
|
2690
2787
|
readonly includePrivate?: boolean;
|
|
2691
2788
|
readonly includeSensitive?: boolean;
|
|
2692
2789
|
readonly includeSnippets?: boolean;
|
|
2693
2790
|
readonly ignoreMemory?: boolean;
|
|
2791
|
+
readonly purpose?: 'automatic' | 'deliberate_query';
|
|
2694
2792
|
}
|
|
2695
2793
|
interface MemoryPackHint {
|
|
2696
2794
|
readonly ref: MemoryItemRef;
|
|
@@ -2702,6 +2800,10 @@ interface MemoryPackHint {
|
|
|
2702
2800
|
interface MemoryPack {
|
|
2703
2801
|
readonly generatedAt: string;
|
|
2704
2802
|
readonly taskFingerprint: string;
|
|
2803
|
+
readonly memoryRevision: string;
|
|
2804
|
+
readonly candidates: readonly MemoryPackHint[];
|
|
2805
|
+
readonly promptHints: readonly MemoryPackHint[];
|
|
2806
|
+
/** @deprecated Use promptHints. Retained for F228 source compatibility. */
|
|
2705
2807
|
readonly hints: readonly MemoryPackHint[];
|
|
2706
2808
|
readonly omitted: readonly string[];
|
|
2707
2809
|
readonly traceMetadata: MemoryPackTraceMetadata;
|
|
@@ -2712,7 +2814,7 @@ interface MemoryPackTraceMetadata {
|
|
|
2712
2814
|
readonly taskFingerprint: string;
|
|
2713
2815
|
readonly suppressed: boolean;
|
|
2714
2816
|
}
|
|
2715
|
-
type MemoryReviewTrigger = 'user_correction' | 'explicit_remember' | 'explicit_forget' | 'proposal_rejected' | 'conflict_detected';
|
|
2817
|
+
type MemoryReviewTrigger = 'user_correction' | 'explicit_remember' | 'explicit_forget' | 'proposal_rejected' | 'conflict_detected' | 'episode_completed';
|
|
2716
2818
|
interface MemoryReviewCandidateRef {
|
|
2717
2819
|
readonly ref: MemoryItemRef;
|
|
2718
2820
|
readonly bodySnippet?: string;
|
|
@@ -2721,7 +2823,8 @@ interface MemoryReviewCandidateRef {
|
|
|
2721
2823
|
}
|
|
2722
2824
|
interface MemoryReviewInput {
|
|
2723
2825
|
readonly trigger: MemoryReviewTrigger;
|
|
2724
|
-
readonly userFeedback
|
|
2826
|
+
readonly userFeedback?: string;
|
|
2827
|
+
readonly episodeDigest?: KodaXMemoryOutcomeDigest;
|
|
2725
2828
|
readonly task?: string;
|
|
2726
2829
|
readonly sourceRefs?: readonly string[];
|
|
2727
2830
|
readonly candidateRefIds?: readonly string[];
|
|
@@ -2746,6 +2849,12 @@ interface MemoryReviewDraftAction {
|
|
|
2746
2849
|
readonly risk: 'low' | 'medium' | 'high';
|
|
2747
2850
|
readonly requiresApproval: true;
|
|
2748
2851
|
readonly proposedBody?: string;
|
|
2852
|
+
readonly claimKind?: MemoryClaimKind;
|
|
2853
|
+
readonly claimKey?: string;
|
|
2854
|
+
readonly actionSignature?: string;
|
|
2855
|
+
readonly preconditions?: string;
|
|
2856
|
+
readonly counterexamples?: readonly string[];
|
|
2857
|
+
readonly relationship?: 'same_claim' | 'condition_refinement' | 'conflict';
|
|
2749
2858
|
}
|
|
2750
2859
|
interface MemoryReviewPlan {
|
|
2751
2860
|
readonly trigger: MemoryReviewTrigger;
|
|
@@ -2754,6 +2863,22 @@ interface MemoryReviewPlan {
|
|
|
2754
2863
|
readonly candidateRefs: readonly MemoryReviewCandidateRef[];
|
|
2755
2864
|
readonly actions: readonly MemoryReviewDraftAction[];
|
|
2756
2865
|
readonly warnings: readonly string[];
|
|
2866
|
+
readonly episodeDigest?: KodaXMemoryOutcomeDigest;
|
|
2867
|
+
}
|
|
2868
|
+
interface MemoryEpisodeReviewResult {
|
|
2869
|
+
readonly plan: MemoryReviewPlan;
|
|
2870
|
+
readonly proposalIds: readonly string[];
|
|
2871
|
+
readonly appliedProposalIds: readonly string[];
|
|
2872
|
+
readonly decisions: readonly MemoryReviewPersistenceDecision[];
|
|
2873
|
+
readonly warnings: readonly string[];
|
|
2874
|
+
}
|
|
2875
|
+
type MemoryReviewPersistenceKind = 'create' | 'evidence_update' | 'condition_refinement' | 'conflict' | 'no_action' | 'reject' | 'quarantine';
|
|
2876
|
+
interface MemoryReviewPersistenceDecision {
|
|
2877
|
+
readonly actionIndex: number;
|
|
2878
|
+
readonly kind: MemoryReviewPersistenceKind;
|
|
2879
|
+
readonly reason: string;
|
|
2880
|
+
readonly existingRefId?: string;
|
|
2881
|
+
readonly proposalId?: string;
|
|
2757
2882
|
}
|
|
2758
2883
|
type MemoryReviewRunner = (input: MemoryReviewModelInput) => Promise<MemoryReviewPlan>;
|
|
2759
2884
|
interface MemoryController {
|
|
@@ -2767,6 +2892,11 @@ interface MemoryController {
|
|
|
2767
2892
|
maybeRunAutoCurator(input?: MemoryAutoCuratorInput): Promise<MemoryAutoCuratorResult>;
|
|
2768
2893
|
buildMemoryPack(input: MemoryPackInput): Promise<MemoryPack>;
|
|
2769
2894
|
reviewMemoryFeedback(input: MemoryReviewInput): Promise<MemoryReviewPlan>;
|
|
2895
|
+
persistReviewPlan(plan: MemoryReviewPlan): Promise<readonly string[]>;
|
|
2896
|
+
reviewEpisode(digest: KodaXMemoryOutcomeDigest, signal?: AbortSignal): Promise<MemoryEpisodeReviewResult>;
|
|
2897
|
+
archiveRef(id: string): Promise<MemoryLifecycleOperationResult>;
|
|
2898
|
+
forgetRef(id: string): Promise<MemoryLifecycleOperationResult>;
|
|
2899
|
+
purgeRef(id: string): Promise<MemoryLifecycleOperationResult>;
|
|
2770
2900
|
}
|
|
2771
2901
|
type MemoryEvent = {
|
|
2772
2902
|
readonly type: 'proposal.created';
|
|
@@ -2930,6 +3060,8 @@ interface WorkflowTaskVerification {
|
|
|
2930
3060
|
readonly enforcement?: 'hard' | 'warn';
|
|
2931
3061
|
readonly requiresMutation?: boolean;
|
|
2932
3062
|
readonly requiredChangedPaths?: readonly string[];
|
|
3063
|
+
/** Read-tool paths that must be observed before accepting a review verdict. */
|
|
3064
|
+
readonly requiredReadPaths?: readonly string[];
|
|
2933
3065
|
readonly minFinalTextChars?: number;
|
|
2934
3066
|
readonly rejectPreparatoryFinalText?: boolean;
|
|
2935
3067
|
}
|
|
@@ -2940,6 +3072,11 @@ interface WorkflowTaskVerificationResult {
|
|
|
2940
3072
|
readonly changedPaths?: readonly string[];
|
|
2941
3073
|
readonly mutationToolCalls?: readonly string[];
|
|
2942
3074
|
readonly mutationEvidence?: boolean;
|
|
3075
|
+
readonly readPaths?: readonly string[];
|
|
3076
|
+
}
|
|
3077
|
+
interface WorkflowAgentTarget {
|
|
3078
|
+
readonly agentId: string;
|
|
3079
|
+
readonly expectedConfigurationRevision?: string;
|
|
2943
3080
|
}
|
|
2944
3081
|
interface WorkflowSpawnAgentInput {
|
|
2945
3082
|
/** Human-readable label for the agent — surfaces in events / UI. */
|
|
@@ -2954,18 +3091,24 @@ interface WorkflowSpawnAgentInput {
|
|
|
2954
3091
|
readonly phase?: string;
|
|
2955
3092
|
/** The task prompt handed to the child agent. */
|
|
2956
3093
|
readonly prompt: string;
|
|
3094
|
+
/** Compact scope summary copied into the child briefing without retyping the diff. */
|
|
3095
|
+
readonly scopeSummary?: string;
|
|
3096
|
+
/** Binding constraints/interfaces the child cannot discover locally. */
|
|
3097
|
+
readonly constraints?: readonly string[];
|
|
2957
3098
|
/** When true, the child runs with a read-only tool whitelist. */
|
|
2958
3099
|
readonly readOnly?: boolean;
|
|
2959
3100
|
/** Route to a registered specialist agent (FEATURE_191). */
|
|
2960
3101
|
readonly subagentType?: string;
|
|
3102
|
+
/** Route through the shared dispatchable-agent catalog (FEATURE_258). */
|
|
3103
|
+
readonly target?: WorkflowAgentTarget;
|
|
2961
3104
|
/**
|
|
2962
3105
|
* Per-agent model TIER (FEATURE_120 model_hint). The script expresses semantic
|
|
2963
3106
|
* intent — 'fast' (cheap), 'deep' (strong), 'balanced' (default) — NOT a
|
|
2964
3107
|
* concrete model name: the authoring model has no cognition of which
|
|
2965
3108
|
* providers/models a given operator has configured. The operator maps the
|
|
2966
3109
|
* tiers to concrete models via env (KODAX_FAST/DEEP_PROVIDER/MODEL); when a
|
|
2967
|
-
* tier is unconfigured the child inherits the parent provider/model
|
|
2968
|
-
*
|
|
3110
|
+
* tier is unconfigured the child inherits the parent provider/model. 'fast'
|
|
3111
|
+
* applies to read-only children
|
|
2969
3112
|
* only (write/codegen stays on the parent tier — a quality guard).
|
|
2970
3113
|
*/
|
|
2971
3114
|
readonly modelHint?: WorkflowModelHint;
|
|
@@ -2989,6 +3132,8 @@ interface WorkflowSpawnAgentInput {
|
|
|
2989
3132
|
* opaque value so the agent layer needs no JSON-Schema dependency.
|
|
2990
3133
|
*/
|
|
2991
3134
|
readonly outputSchema?: unknown;
|
|
3135
|
+
/** Register concise finalText for digest reuse; trusted host provenance is checked separately. */
|
|
3136
|
+
readonly terseResult?: boolean;
|
|
2992
3137
|
}
|
|
2993
3138
|
/** Returned by `spawnAgent` — the child is in-flight, not yet complete. */
|
|
2994
3139
|
interface WorkflowTaskHandle {
|
|
@@ -2999,6 +3144,7 @@ interface WorkflowTaskUsage {
|
|
|
2999
3144
|
readonly inputTokens?: number;
|
|
3000
3145
|
readonly outputTokens?: number;
|
|
3001
3146
|
readonly totalTokens?: number;
|
|
3147
|
+
readonly cacheReadTokens?: number;
|
|
3002
3148
|
}
|
|
3003
3149
|
type WorkflowTaskSummaryKind = 'digest' | 'excerpt' | 'digest-failed' | 'pending';
|
|
3004
3150
|
interface WorkflowTaskSummaryEventUpdate {
|
|
@@ -3029,6 +3175,20 @@ interface WorkflowTaskResult {
|
|
|
3029
3175
|
/** Best-known provider/model used by the child, for host correlation only. */
|
|
3030
3176
|
readonly provider?: string;
|
|
3031
3177
|
readonly model?: string;
|
|
3178
|
+
/** Requested semantic tier and how the local runtime resolved it. */
|
|
3179
|
+
readonly requestedTier?: WorkflowModelHint | 'inherited';
|
|
3180
|
+
readonly tierOutcome?: 'applied' | 'balanced-parent' | 'fast-write-ineligible' | 'unconfigured' | 'shadowed-by-selector' | 'inherited';
|
|
3181
|
+
readonly providerSource?: 'explicit' | 'specialist' | 'tier' | 'parent' | 'default';
|
|
3182
|
+
readonly modelSource?: 'explicit' | 'specialist' | 'tier' | 'parent';
|
|
3183
|
+
readonly initialProvider?: string;
|
|
3184
|
+
readonly initialModel?: string;
|
|
3185
|
+
readonly finalProvider?: string;
|
|
3186
|
+
readonly finalModel?: string;
|
|
3187
|
+
readonly fallbackReason?: string;
|
|
3188
|
+
readonly resolvedEffort?: string;
|
|
3189
|
+
readonly iterations?: number;
|
|
3190
|
+
readonly durationMs?: number;
|
|
3191
|
+
readonly digestUsage?: WorkflowTaskUsage;
|
|
3032
3192
|
readonly usage?: WorkflowTaskUsage;
|
|
3033
3193
|
}
|
|
3034
3194
|
/** Point-in-time snapshot of a (possibly still-running) agent. */
|
|
@@ -3358,5 +3518,340 @@ declare function isFinalWorkflowProcessStatus(status: WorkflowProcessStatus): bo
|
|
|
3358
3518
|
declare function normalizeHostMetadata(value: unknown): Record<string, string> | undefined;
|
|
3359
3519
|
declare function createWorkflowProcessTracker(options: WorkflowProcessTrackerOptions): WorkflowProcessTracker;
|
|
3360
3520
|
|
|
3361
|
-
|
|
3362
|
-
|
|
3521
|
+
type DispatchableAgentOrigin = 'native' | 'constructed' | 'external';
|
|
3522
|
+
type AgentExecutorProtocol = 'native' | 'a2a' | 'mcp' | 'http';
|
|
3523
|
+
type ExternalAgentProtocol = Exclude<AgentExecutorProtocol, 'native'>;
|
|
3524
|
+
type CapabilitySupport = 'supported' | 'unsupported' | 'conditional';
|
|
3525
|
+
interface AgentCapabilityDeclaration {
|
|
3526
|
+
readonly streaming: CapabilitySupport;
|
|
3527
|
+
readonly durableTasks: CapabilitySupport;
|
|
3528
|
+
readonly inputRequired: CapabilitySupport;
|
|
3529
|
+
readonly cancellation: CapabilitySupport;
|
|
3530
|
+
readonly artifacts: CapabilitySupport;
|
|
3531
|
+
}
|
|
3532
|
+
interface AgentEffectDeclaration {
|
|
3533
|
+
readonly remote: 'none' | 'read' | 'write' | 'unknown';
|
|
3534
|
+
readonly workspace: 'none' | 'proposal' | 'direct';
|
|
3535
|
+
}
|
|
3536
|
+
interface ExternalAgentEffectDeclaration extends AgentEffectDeclaration {
|
|
3537
|
+
readonly workspace: 'none' | 'proposal';
|
|
3538
|
+
}
|
|
3539
|
+
interface DispatchableAgentDescriptor {
|
|
3540
|
+
readonly agentId: string;
|
|
3541
|
+
readonly displayName: string;
|
|
3542
|
+
readonly description?: string;
|
|
3543
|
+
readonly origin: DispatchableAgentOrigin;
|
|
3544
|
+
readonly protocol: AgentExecutorProtocol;
|
|
3545
|
+
readonly configurationRevision: string;
|
|
3546
|
+
readonly skills: readonly string[];
|
|
3547
|
+
readonly inputModalities: readonly string[];
|
|
3548
|
+
readonly outputModalities: readonly string[];
|
|
3549
|
+
readonly capabilities: AgentCapabilityDeclaration;
|
|
3550
|
+
readonly effects: AgentEffectDeclaration;
|
|
3551
|
+
}
|
|
3552
|
+
type AgentDispatchabilityStatus = 'dispatchable' | 'degraded' | 'busy' | 'unavailable';
|
|
3553
|
+
interface AgentDispatchabilitySnapshot {
|
|
3554
|
+
readonly status: AgentDispatchabilityStatus;
|
|
3555
|
+
readonly checkedAt: string;
|
|
3556
|
+
readonly reasons: readonly string[];
|
|
3557
|
+
readonly retryAfterMs?: number;
|
|
3558
|
+
}
|
|
3559
|
+
interface DispatchableAgentListing {
|
|
3560
|
+
readonly descriptor: DispatchableAgentDescriptor;
|
|
3561
|
+
readonly dispatchability: AgentDispatchabilitySnapshot;
|
|
3562
|
+
}
|
|
3563
|
+
interface AgentDispatchContext {
|
|
3564
|
+
readonly actorId: string;
|
|
3565
|
+
readonly projectId?: string;
|
|
3566
|
+
readonly workflowId?: string;
|
|
3567
|
+
readonly parentTaskId?: string;
|
|
3568
|
+
readonly runId?: string;
|
|
3569
|
+
readonly nodeId?: string;
|
|
3570
|
+
readonly dataClassifications?: readonly string[];
|
|
3571
|
+
readonly budget?: number;
|
|
3572
|
+
}
|
|
3573
|
+
interface AgentCapabilityRequirements {
|
|
3574
|
+
readonly streaming?: boolean;
|
|
3575
|
+
readonly durableTasks?: boolean;
|
|
3576
|
+
readonly inputRequired?: boolean;
|
|
3577
|
+
readonly cancellation?: boolean;
|
|
3578
|
+
readonly artifacts?: boolean;
|
|
3579
|
+
}
|
|
3580
|
+
interface DispatchableAgentQuery extends AgentDispatchContext {
|
|
3581
|
+
readonly requiredSkills?: readonly string[];
|
|
3582
|
+
readonly requiredCapabilities?: AgentCapabilityRequirements;
|
|
3583
|
+
readonly readOnly?: boolean;
|
|
3584
|
+
}
|
|
3585
|
+
interface ExternalAgentHealth {
|
|
3586
|
+
readonly status: 'healthy' | 'degraded' | 'unhealthy';
|
|
3587
|
+
readonly checkedAt: string;
|
|
3588
|
+
readonly retryAfterMs?: number;
|
|
3589
|
+
readonly diagnostic?: string;
|
|
3590
|
+
}
|
|
3591
|
+
interface ExternalAgentRegistration {
|
|
3592
|
+
readonly agentId: string;
|
|
3593
|
+
readonly displayName: string;
|
|
3594
|
+
readonly description?: string;
|
|
3595
|
+
readonly enabled: boolean;
|
|
3596
|
+
readonly executorId: string;
|
|
3597
|
+
readonly protocol: ExternalAgentProtocol;
|
|
3598
|
+
readonly configurationRevision: string;
|
|
3599
|
+
readonly endpointIdentityHash: string;
|
|
3600
|
+
readonly credentialRef?: string;
|
|
3601
|
+
readonly executorConfig?: Readonly<Record<string, unknown>>;
|
|
3602
|
+
readonly skills?: readonly string[];
|
|
3603
|
+
readonly inputModalities?: readonly string[];
|
|
3604
|
+
readonly outputModalities?: readonly string[];
|
|
3605
|
+
readonly capabilities: AgentCapabilityDeclaration;
|
|
3606
|
+
readonly effects: ExternalAgentEffectDeclaration;
|
|
3607
|
+
readonly health?: ExternalAgentHealth;
|
|
3608
|
+
readonly maxConcurrency?: number;
|
|
3609
|
+
readonly minimumBudget?: number;
|
|
3610
|
+
readonly allowedDataClassifications?: readonly string[];
|
|
3611
|
+
}
|
|
3612
|
+
interface ExternalAgentRegistrationSummary {
|
|
3613
|
+
readonly agentId: string;
|
|
3614
|
+
readonly displayName: string;
|
|
3615
|
+
readonly description?: string;
|
|
3616
|
+
readonly enabled: boolean;
|
|
3617
|
+
readonly executorId: string;
|
|
3618
|
+
readonly protocol: ExternalAgentProtocol;
|
|
3619
|
+
readonly configurationRevision: string;
|
|
3620
|
+
readonly endpointIdentityHash: string;
|
|
3621
|
+
readonly credentialConfigured: boolean;
|
|
3622
|
+
readonly capabilities: AgentCapabilityDeclaration;
|
|
3623
|
+
readonly effects: ExternalAgentEffectDeclaration;
|
|
3624
|
+
readonly health?: ExternalAgentHealth;
|
|
3625
|
+
readonly diagnostics: readonly string[];
|
|
3626
|
+
}
|
|
3627
|
+
interface AgentDispatchPolicyInput {
|
|
3628
|
+
readonly registration: ExternalAgentRegistration;
|
|
3629
|
+
readonly query: DispatchableAgentQuery;
|
|
3630
|
+
}
|
|
3631
|
+
interface AgentDispatchPolicyDecision {
|
|
3632
|
+
readonly allowed: boolean;
|
|
3633
|
+
readonly reasons?: readonly string[];
|
|
3634
|
+
}
|
|
3635
|
+
type AgentDispatchPolicy = (input: AgentDispatchPolicyInput) => AgentDispatchPolicyDecision | Promise<AgentDispatchPolicyDecision>;
|
|
3636
|
+
interface AgentCredentialBroker {
|
|
3637
|
+
isAvailable?(credentialRef: string): boolean | Promise<boolean>;
|
|
3638
|
+
withCredential<T>(credentialRef: string, use: (credential: string) => Promise<T>): Promise<T>;
|
|
3639
|
+
}
|
|
3640
|
+
interface AgentArtifactReference {
|
|
3641
|
+
readonly name: string;
|
|
3642
|
+
readonly mimeType?: string;
|
|
3643
|
+
readonly size?: number;
|
|
3644
|
+
readonly hash?: string;
|
|
3645
|
+
readonly uri?: string;
|
|
3646
|
+
readonly provenance?: string;
|
|
3647
|
+
readonly producingAgentId?: string;
|
|
3648
|
+
readonly remoteTaskId?: string;
|
|
3649
|
+
}
|
|
3650
|
+
interface AgentArtifactPolicyInput {
|
|
3651
|
+
readonly registration: ExternalAgentRegistration;
|
|
3652
|
+
readonly artifact: AgentArtifactReference;
|
|
3653
|
+
}
|
|
3654
|
+
interface AgentArtifactPolicyDecision {
|
|
3655
|
+
readonly allowed: boolean;
|
|
3656
|
+
readonly reason?: string;
|
|
3657
|
+
}
|
|
3658
|
+
type AgentArtifactPolicy = (input: AgentArtifactPolicyInput) => AgentArtifactPolicyDecision | Promise<AgentArtifactPolicyDecision>;
|
|
3659
|
+
interface AgentTaskUsage {
|
|
3660
|
+
readonly inputTokens?: number;
|
|
3661
|
+
readonly outputTokens?: number;
|
|
3662
|
+
readonly totalTokens?: number;
|
|
3663
|
+
readonly cost?: number;
|
|
3664
|
+
readonly currency?: string;
|
|
3665
|
+
}
|
|
3666
|
+
type AgentTaskState = 'submitted' | 'working' | 'input-required' | 'auth-required' | 'completed' | 'failed' | 'canceled' | 'rejected' | 'unknown';
|
|
3667
|
+
type AgentTaskCancellation = 'none' | 'requested' | 'confirmed' | 'unsupported' | 'failed' | 'unknown';
|
|
3668
|
+
interface AgentTaskProgress {
|
|
3669
|
+
readonly message?: string;
|
|
3670
|
+
readonly percent?: number;
|
|
3671
|
+
}
|
|
3672
|
+
interface AgentTaskCorrelation {
|
|
3673
|
+
readonly parentTaskId?: string;
|
|
3674
|
+
readonly workflowId?: string;
|
|
3675
|
+
readonly runId?: string;
|
|
3676
|
+
readonly nodeId?: string;
|
|
3677
|
+
}
|
|
3678
|
+
interface AgentTaskRegistrationSnapshot {
|
|
3679
|
+
readonly agentId: string;
|
|
3680
|
+
readonly origin: DispatchableAgentOrigin;
|
|
3681
|
+
readonly executorId: string;
|
|
3682
|
+
readonly protocol: AgentExecutorProtocol;
|
|
3683
|
+
readonly configurationRevision: string;
|
|
3684
|
+
readonly endpointIdentityHash?: string;
|
|
3685
|
+
readonly capabilities: AgentCapabilityDeclaration;
|
|
3686
|
+
readonly effects: AgentEffectDeclaration;
|
|
3687
|
+
}
|
|
3688
|
+
interface AgentExecutorTaskReference {
|
|
3689
|
+
readonly idempotencyKey: string;
|
|
3690
|
+
readonly remoteTaskId?: string;
|
|
3691
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
3692
|
+
}
|
|
3693
|
+
interface AgentTaskSnapshot extends AgentTaskCorrelation {
|
|
3694
|
+
readonly taskId: string;
|
|
3695
|
+
readonly route: 'local' | 'external';
|
|
3696
|
+
readonly agentId: string;
|
|
3697
|
+
readonly objective: string;
|
|
3698
|
+
readonly state: AgentTaskState;
|
|
3699
|
+
readonly cancellation: AgentTaskCancellation;
|
|
3700
|
+
readonly registration: AgentTaskRegistrationSnapshot;
|
|
3701
|
+
readonly idempotencyKey: string;
|
|
3702
|
+
readonly dispatchAttempt: number;
|
|
3703
|
+
readonly createdAt: string;
|
|
3704
|
+
readonly updatedAt: string;
|
|
3705
|
+
readonly remoteTaskId?: string;
|
|
3706
|
+
readonly executorReference?: AgentExecutorTaskReference;
|
|
3707
|
+
readonly progress?: AgentTaskProgress;
|
|
3708
|
+
readonly output?: string;
|
|
3709
|
+
readonly error?: string;
|
|
3710
|
+
readonly cancellationError?: string;
|
|
3711
|
+
readonly artifacts?: readonly AgentArtifactReference[];
|
|
3712
|
+
readonly usage?: AgentTaskUsage;
|
|
3713
|
+
}
|
|
3714
|
+
interface AgentExecutorTaskSnapshot {
|
|
3715
|
+
readonly state: AgentTaskState;
|
|
3716
|
+
readonly progress?: AgentTaskProgress;
|
|
3717
|
+
readonly output?: string;
|
|
3718
|
+
readonly error?: string;
|
|
3719
|
+
readonly artifacts?: readonly AgentArtifactReference[];
|
|
3720
|
+
readonly usage?: AgentTaskUsage;
|
|
3721
|
+
}
|
|
3722
|
+
interface AgentTaskStartInput {
|
|
3723
|
+
readonly taskId?: string;
|
|
3724
|
+
readonly agentId: string;
|
|
3725
|
+
readonly objective: string;
|
|
3726
|
+
readonly context: AgentDispatchContext;
|
|
3727
|
+
readonly readOnly?: boolean;
|
|
3728
|
+
readonly requiredSkills?: readonly string[];
|
|
3729
|
+
readonly requiredCapabilities?: AgentCapabilityRequirements;
|
|
3730
|
+
readonly expectedConfigurationRevision?: string;
|
|
3731
|
+
readonly idempotencyKey?: string;
|
|
3732
|
+
readonly input?: string;
|
|
3733
|
+
}
|
|
3734
|
+
interface AgentContinuationInput {
|
|
3735
|
+
readonly content: string;
|
|
3736
|
+
}
|
|
3737
|
+
interface AgentExecutorEvent {
|
|
3738
|
+
readonly state?: AgentTaskState;
|
|
3739
|
+
readonly progress?: AgentTaskProgress;
|
|
3740
|
+
readonly output?: string;
|
|
3741
|
+
readonly error?: string;
|
|
3742
|
+
readonly artifacts?: readonly AgentArtifactReference[];
|
|
3743
|
+
readonly usage?: AgentTaskUsage;
|
|
3744
|
+
}
|
|
3745
|
+
interface AgentTaskEvent extends AgentExecutorEvent {
|
|
3746
|
+
readonly taskId: string;
|
|
3747
|
+
readonly seq: number;
|
|
3748
|
+
readonly timestamp: string;
|
|
3749
|
+
readonly type: 'submitted' | 'state' | 'progress' | 'output' | 'artifact' | 'usage' | 'error' | 'cancellation';
|
|
3750
|
+
readonly cancellation?: AgentTaskCancellation;
|
|
3751
|
+
}
|
|
3752
|
+
interface AgentExecutorPreflightResult {
|
|
3753
|
+
readonly ok: boolean;
|
|
3754
|
+
readonly reasons?: readonly string[];
|
|
3755
|
+
}
|
|
3756
|
+
interface AgentExecutor {
|
|
3757
|
+
preflight?(input: AgentTaskStartInput): Promise<AgentExecutorPreflightResult>;
|
|
3758
|
+
start(input: AgentTaskStartInput): Promise<AgentExecutorTaskReference>;
|
|
3759
|
+
events(reference: AgentExecutorTaskReference): AsyncIterable<AgentExecutorEvent>;
|
|
3760
|
+
get(reference: AgentExecutorTaskReference): Promise<AgentExecutorTaskSnapshot>;
|
|
3761
|
+
sendInput(reference: AgentExecutorTaskReference, input: AgentContinuationInput): Promise<void>;
|
|
3762
|
+
cancel(reference: AgentExecutorTaskReference, reason?: string): Promise<AgentExecutorTaskSnapshot>;
|
|
3763
|
+
reconcile(reference: AgentExecutorTaskReference): Promise<AgentExecutorTaskSnapshot>;
|
|
3764
|
+
dispose(): Promise<void>;
|
|
3765
|
+
}
|
|
3766
|
+
interface AgentExecutorFactoryContext {
|
|
3767
|
+
withCredential<T>(credentialRef: string, use: (credential: string) => Promise<T>): Promise<T>;
|
|
3768
|
+
authorizeArtifact(artifact: AgentArtifactReference): Promise<void>;
|
|
3769
|
+
}
|
|
3770
|
+
interface AgentExecutorFactory {
|
|
3771
|
+
readonly executorId: string;
|
|
3772
|
+
readonly protocol: ExternalAgentProtocol;
|
|
3773
|
+
create(registration: ExternalAgentRegistration, context: AgentExecutorFactoryContext): Promise<AgentExecutor>;
|
|
3774
|
+
}
|
|
3775
|
+
interface AgentPreflightInput {
|
|
3776
|
+
readonly agentId: string;
|
|
3777
|
+
readonly query: DispatchableAgentQuery;
|
|
3778
|
+
readonly expectedConfigurationRevision?: string;
|
|
3779
|
+
}
|
|
3780
|
+
interface AgentPreflightResult {
|
|
3781
|
+
readonly ok: boolean;
|
|
3782
|
+
readonly descriptor?: DispatchableAgentDescriptor;
|
|
3783
|
+
readonly dispatchability: AgentDispatchabilitySnapshot;
|
|
3784
|
+
readonly reasons: readonly string[];
|
|
3785
|
+
}
|
|
3786
|
+
interface AgentTaskFilter {
|
|
3787
|
+
readonly agentId?: string;
|
|
3788
|
+
readonly parentTaskId?: string;
|
|
3789
|
+
readonly workflowId?: string;
|
|
3790
|
+
readonly runId?: string;
|
|
3791
|
+
readonly state?: AgentTaskState | readonly AgentTaskState[];
|
|
3792
|
+
}
|
|
3793
|
+
interface LocalAgentTaskInput extends AgentTaskCorrelation {
|
|
3794
|
+
readonly taskId: string;
|
|
3795
|
+
readonly agentId: string;
|
|
3796
|
+
readonly objective: string;
|
|
3797
|
+
readonly configurationRevision: string;
|
|
3798
|
+
readonly origin?: 'native' | 'constructed';
|
|
3799
|
+
}
|
|
3800
|
+
interface LocalAgentTaskUpdate {
|
|
3801
|
+
readonly state?: AgentTaskState;
|
|
3802
|
+
readonly progress?: AgentTaskProgress;
|
|
3803
|
+
readonly output?: string;
|
|
3804
|
+
readonly error?: string;
|
|
3805
|
+
readonly artifacts?: readonly AgentArtifactReference[];
|
|
3806
|
+
readonly usage?: AgentTaskUsage;
|
|
3807
|
+
}
|
|
3808
|
+
interface AgentExecutorPlaneStore {
|
|
3809
|
+
loadRegistrations(): Promise<readonly ExternalAgentRegistration[]>;
|
|
3810
|
+
saveRegistrations(registrations: readonly ExternalAgentRegistration[]): Promise<void>;
|
|
3811
|
+
loadTasks(): Promise<readonly AgentTaskSnapshot[]>;
|
|
3812
|
+
saveTask(task: AgentTaskSnapshot): Promise<void>;
|
|
3813
|
+
loadEvents(taskId: string): Promise<readonly AgentTaskEvent[]>;
|
|
3814
|
+
appendEvent(event: AgentTaskEvent): Promise<void>;
|
|
3815
|
+
}
|
|
3816
|
+
interface AgentRegistrationService {
|
|
3817
|
+
list(): Promise<readonly ExternalAgentRegistrationSummary[]>;
|
|
3818
|
+
upsert(input: ExternalAgentRegistration): Promise<ExternalAgentRegistrationSummary>;
|
|
3819
|
+
remove(agentId: string): Promise<boolean>;
|
|
3820
|
+
}
|
|
3821
|
+
interface AgentTaskService {
|
|
3822
|
+
start(input: AgentTaskStartInput): Promise<AgentTaskSnapshot>;
|
|
3823
|
+
list(filter?: AgentTaskFilter): Promise<readonly AgentTaskSnapshot[]>;
|
|
3824
|
+
get(taskId: string): Promise<AgentTaskSnapshot>;
|
|
3825
|
+
events(taskId: string, cursor?: number): Promise<readonly AgentTaskEvent[]>;
|
|
3826
|
+
wait(taskId: string, timeoutMs?: number): Promise<AgentTaskSnapshot>;
|
|
3827
|
+
sendInput(taskId: string, input: AgentContinuationInput): Promise<AgentTaskSnapshot>;
|
|
3828
|
+
cancel(taskId: string, reason?: string): Promise<AgentTaskSnapshot>;
|
|
3829
|
+
reconcile(taskId: string): Promise<AgentTaskSnapshot>;
|
|
3830
|
+
recordLocal(input: LocalAgentTaskInput): Promise<AgentTaskSnapshot>;
|
|
3831
|
+
updateLocal(taskId: string, update: LocalAgentTaskUpdate): Promise<AgentTaskSnapshot>;
|
|
3832
|
+
}
|
|
3833
|
+
interface AgentExecutorPlaneBinding {
|
|
3834
|
+
readonly plane: AgentExecutorPlane;
|
|
3835
|
+
readonly context: AgentDispatchContext;
|
|
3836
|
+
}
|
|
3837
|
+
interface AgentExecutorPlane {
|
|
3838
|
+
readonly registrations: AgentRegistrationService;
|
|
3839
|
+
readonly tasks: AgentTaskService;
|
|
3840
|
+
listDispatchable(query: DispatchableAgentQuery, localAgents?: readonly DispatchableAgentDescriptor[]): Promise<readonly DispatchableAgentListing[]>;
|
|
3841
|
+
describe(agentId: string, query: DispatchableAgentQuery, localAgents?: readonly DispatchableAgentDescriptor[]): Promise<DispatchableAgentListing | undefined>;
|
|
3842
|
+
preflight(input: AgentPreflightInput, localAgents?: readonly DispatchableAgentDescriptor[]): Promise<AgentPreflightResult>;
|
|
3843
|
+
close(): Promise<void>;
|
|
3844
|
+
}
|
|
3845
|
+
interface CreateAgentExecutorPlaneOptions {
|
|
3846
|
+
readonly factories: readonly AgentExecutorFactory[];
|
|
3847
|
+
readonly policy: AgentDispatchPolicy;
|
|
3848
|
+
readonly credentialBroker?: AgentCredentialBroker;
|
|
3849
|
+
readonly artifactPolicy?: AgentArtifactPolicy;
|
|
3850
|
+
readonly store?: AgentExecutorPlaneStore;
|
|
3851
|
+
readonly now?: () => Date;
|
|
3852
|
+
readonly createTaskId?: () => string;
|
|
3853
|
+
readonly createIdempotencyKey?: () => string;
|
|
3854
|
+
}
|
|
3855
|
+
|
|
3856
|
+
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 cH, Tracer as cZ, Runner as co, defaultTracer as d$, WorkflowEventRecorder as d8, _resetAdmittedAgentBindings as dO, _resetPresetDispatchers as dP, asSingleSelection as dQ, buildAssistantMessageFromLlmResult as dR, buildSystemPrompt as dS, buildToolResultMessage as dT, createAgent as dU, createHandoff as dV, createInMemorySession as dW, createInvariantSessionForAgent as dX, createStateWriter as dY, createTrace as dZ, createWorkflowProcessTracker as d_, detectInstructionsInjection as e0, discoverInstances as e1, executeRunnerToolCall as e2, extractAssistantTextFromMessage as e3, getActiveUserInteraction as e4, getAdmittedAgentBindings as e5, hashMemoryIdentityComponent as e6, isAskUserCustomInputAnswer as e7, isFinalWorkflowProcessStatus as e8, isRunnableTool as e9, isRunnerLlmResult as ea, matchesMemoryApplicability as eb, memoryApplicabilityFingerprint as ec, normalizeHostMetadata as ed, registerChildTask as ee, registerPresetDispatcher as ef, requestTaskStop as eg, runAdmissionAudit as eh, setActiveUserInteraction as ei, setAdmittedAgentBindings as ej };
|
|
3857
|
+
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, UserInteraction 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, SessionExtension as cA, SessionForkOptions as cB, SessionMeta as cC, SessionStateSnapshot as cD, Span as cE, SpanData as cF, SpanError as cG, SpanImplOptions as cI, StartTraceOptions as cJ, StateWriter as cK, StateWriterFs as cL, StateWriterOptions as cM, StopHookContext as cN, StopHookFn as cO, StopHookResult as cP, StopHookSpanData as cQ, SystemCap as cR, TaskAbortRegistry as cS, TerminalCtx as cT, ToolCallSpanData as cU, ToolCapability as cV, ToolPermission as cW, Trace as cX, TraceOptions as cY, TracerOptions 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, RunnerToolCall as cs, RunnerToolContext as ct, RunnerToolObserver as cu, RunnerToolResult as cv, Session as cw, SessionDispatchResult as cx, SessionEntry as cy, SessionErrorMetadata as cz, AdmissionVerdict as d, WorkflowAgentBackend as d0, WorkflowApi as d1, WorkflowApproval as d2, WorkflowApprovalSummary as d3, WorkflowArtifactRef as d4, WorkflowBudget as d5, WorkflowEvent as d6, WorkflowEventCorrelation as d7, WorkflowEventType as d9, WorkflowSpawnAgentInput as dA, WorkflowSynthesis as dB, WorkflowSynthesizeInput as dC, WorkflowTaskHandle as dD, WorkflowTaskResult as dE, WorkflowTaskSnapshot as dF, WorkflowTaskStatus as dG, WorkflowTaskSummaryEventUpdate as dH, WorkflowTaskSummaryKind as dI, WorkflowTaskSummaryUpdate as dJ, WorkflowTaskUsage as dK, WorkflowTaskVerification as dL, WorkflowTaskVerificationResult as dM, WorkflowWaitOptions as dN, WorkflowIsolation as da, WorkflowLimits as db, WorkflowLogEvent as dc, WorkflowMeta as dd, WorkflowModelHint as de, WorkflowModule as df, WorkflowParallelOptions as dg, WorkflowProcessArtifact as dh, WorkflowProcessCounts as di, WorkflowProcessEvent as dj, WorkflowProcessItem as dk, WorkflowProcessItemKind as dl, WorkflowProcessItemOrigin as dm, WorkflowProcessItemStatus as dn, WorkflowProcessProgress as dp, WorkflowProcessSnapshot as dq, WorkflowProcessSource as dr, WorkflowProcessStatus as ds, WorkflowProcessSummaryStatus as dt, WorkflowProcessTokenUsage as du, WorkflowProcessTracker as dv, WorkflowProcessTrackerOptions as dw, WorkflowRun as dx, WorkflowRunState as dy, WorkflowRunStatus 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 };
|