@kodax-ai/kodax 0.7.78 → 0.7.80
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 +3556 -3197
- package/README.md +371 -277
- package/README_CN.md +295 -215
- package/config-templates/config.example.jsonc +24 -2
- package/config-templates/integrations/a2a.example.jsonc +23 -7
- package/dist/builtin/skill-creator/scripts/aggregate-benchmark.js +2 -1
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/analyze-benchmark.js +4 -3
- package/dist/builtin/skill-creator/scripts/compare-runs.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/compare-runs.js +4 -3
- package/dist/builtin/skill-creator/scripts/generate-review.js +2 -1
- package/dist/builtin/skill-creator/scripts/grade-evals.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/grade-evals.js +4 -3
- package/dist/builtin/skill-creator/scripts/improve-description.js +2 -1
- package/dist/builtin/skill-creator/scripts/init-skill.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/init-skill.js +4 -3
- package/dist/builtin/skill-creator/scripts/install-skill.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/install-skill.js +4 -3
- package/dist/builtin/skill-creator/scripts/package-skill.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/package-skill.js +4 -3
- package/dist/builtin/skill-creator/scripts/quick-validate.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/quick-validate.js +4 -3
- package/dist/builtin/skill-creator/scripts/run-eval.d.ts +1 -0
- package/dist/builtin/skill-creator/scripts/run-eval.js +4 -3
- package/dist/builtin/skill-creator/scripts/run-loop.js +2 -1
- package/dist/builtin/skill-creator/scripts/run-trigger-eval.js +2 -1
- package/dist/builtin/skill-creator/scripts/utils.d.ts +3 -0
- package/dist/builtin/skill-creator/scripts/utils.js +5 -1
- package/dist/chunks/agent-5PHGNFW3.js +2 -0
- package/dist/chunks/argument-completer-FXRZFMTC.js +2 -0
- package/dist/chunks/chunk-6UENDY33.js +89 -0
- package/dist/chunks/{chunk-6FOJVETH.js → chunk-BWX4YZX3.js} +7 -7
- package/dist/chunks/chunk-CDCCTM5I.js +278 -0
- package/dist/chunks/chunk-CEB5FDND.js +810 -0
- package/dist/chunks/{chunk-2CFHBKRE.js → chunk-E7C4DRD2.js} +2 -2
- package/dist/chunks/chunk-EVXIJPZ6.js +218 -0
- package/dist/chunks/chunk-FQ7NVMSU.js +319 -0
- package/dist/chunks/chunk-GC4JBMBS.js +385 -0
- package/dist/chunks/{chunk-Z3KFRTSB.js → chunk-HTVLCHWH.js} +1 -1
- package/dist/chunks/chunk-IHPH3444.js +655 -0
- package/dist/chunks/{chunk-YAZQTC2L.js → chunk-KHEFUT6O.js} +1 -1
- package/dist/chunks/{chunk-7OEBJGHK.js → chunk-PMKAG4SZ.js} +1 -1
- package/dist/chunks/chunk-RPF5RGWZ.js +479 -0
- package/dist/chunks/{chunk-UID7BLAB.js → chunk-RXXKDR6Y.js} +1 -1
- package/dist/chunks/chunk-T5U4OP2N.js +292 -0
- package/dist/chunks/chunk-TRNAWSXP.js +123 -0
- package/dist/chunks/chunk-UZSHBQER.js +30 -0
- package/dist/chunks/{chunk-TQDBTTIM.js → chunk-VECRQTSD.js} +44 -44
- package/dist/chunks/compaction-config-6J6XCBJS.js +2 -0
- package/dist/chunks/{construction-bootstrap-VQLQGWPY.js → construction-bootstrap-KPCAE3VN.js} +1 -1
- package/dist/chunks/dist-RWEVZOFK.js +2 -0
- package/dist/chunks/{dist-BFT5YIGU.js → dist-WWL2DNIJ.js} +1 -1
- package/dist/chunks/host-OGS2R5J4.js +2 -0
- package/dist/chunks/run-manager-2YMM3BOT.js +2 -0
- package/dist/chunks/{utils-SID4HW2Q.js → utils-2YHRUZYC.js} +1 -1
- package/dist/index.d.ts +21 -20
- package/dist/index.js +4 -4
- package/dist/kodax_bootstrap.js +2 -1
- package/dist/kodax_cli.js +1850 -1476
- package/dist/kodax_resume.js +570 -34
- package/dist/provider-capabilities.json +85 -50
- package/dist/runtime-worker.js +1737 -1369
- package/dist/sandbox-workspace-session.js +285 -19
- package/dist/sdk-a2a.d.ts +19 -13
- package/dist/sdk-a2a.js +8 -8
- package/dist/sdk-agent.d.ts +80 -150
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +186 -66
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-experimental-memory.d.ts +3 -3
- package/dist/sdk-experimental-memory.js +1 -1
- package/dist/sdk-llm.d.ts +7 -7
- 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 +31 -213
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +230 -31
- package/dist/sdk-runtime.js +1 -1
- package/dist/sdk-sandbox.js +1 -1
- package/dist/sdk-session.d.ts +8 -8
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +283 -18
- package/dist/types-chunks/{base.d-4e74xDdy.d.ts → base.d-DxG0m09Z.d.ts} +1 -1
- package/dist/types-chunks/{bash-prefix-extractor.d-uAe2Oqda.d.ts → bash-prefix-extractor.d-DStqKIlu.d.ts} +31 -8
- package/dist/types-chunks/{capability-learning.d-CVsdHw4j.d.ts → capability-learning.d-iPSiAmc_.d.ts} +1 -1
- package/dist/types-chunks/{capsule.d-BlSv9l3V.d.ts → capsule.d-BuFJaYxA.d.ts} +14 -21
- package/dist/types-chunks/{types.d-BA-Jwpfs.d.ts → controller.d-C2aHqzHj.d.ts} +344 -11
- package/dist/types-chunks/{guardrail.d-CXDYRgZ3.d.ts → guardrail.d-DM-OK0m3.d.ts} +187 -116
- package/dist/types-chunks/{history-retrieval.d-DtCy7x64.d.ts → history-retrieval.d-DImTKgO6.d.ts} +16 -3
- package/dist/types-chunks/{oauth-login.d-Bgb4rdLN.d.ts → oauth-login.d-6i-vidxv.d.ts} +6 -2
- package/dist/types-chunks/{public-api.d-B3AohsxN.d.ts → public-api.d-CewTvUKV.d.ts} +335 -38
- package/dist/types-chunks/{repl.d-Ie_ZXb_U.d.ts → repl.d-DvXQtgr7.d.ts} +5 -5
- package/dist/types-chunks/{resolver.d-iAQ9ocLB.d.ts → resolver.d-C9IW4fmU.d.ts} +5 -2
- package/dist/types-chunks/{run-manager.d-D1twIhF9.d.ts → run-manager.d-C6ahvZqK.d.ts} +1 -1
- package/dist/types-chunks/{sdk-session-DB9KksIx.d.ts → sdk-session-C59RUrri.d.ts} +3 -3
- package/dist/types-chunks/shell-command-sets.d-Dp4UvPLL.d.ts +297 -0
- package/dist/types-chunks/{side-query.d-DTuLPcC5.d.ts → side-query.d-CP1LiRiH.d.ts} +8 -2
- package/dist/types-chunks/{types-D3g6XUQr.d.ts → types-Bf3Y3mW-.d.ts} +1 -1
- package/dist/types-chunks/{types.d-BH0ZkTGf.d.ts → types.d-BzpPDBPV.d.ts} +2 -2
- package/dist/types-chunks/{types.d-DIpZJKUl.d.ts → types.d-CgrXrFrq.d.ts} +16 -2
- package/dist/types-chunks/{types.d-DVDTIfB_.d.ts → types.d-yuJzE82x.d.ts} +4 -4
- package/dist/types-chunks/{utils.d-CVp6bFl9.d.ts → utils.d-BpACJmzt.d.ts} +24 -6
- package/docs/SDK_EMBEDDER_GUIDE.md +1148 -598
- package/package.json +6 -3
- package/dist/chunks/agent-ASP4MS3X.js +0 -2
- package/dist/chunks/argument-completer-JYQ7FX3W.js +0 -2
- package/dist/chunks/chunk-35PPHOQ2.js +0 -292
- package/dist/chunks/chunk-43QNNDHR.js +0 -29
- package/dist/chunks/chunk-5GO6FH7L.js +0 -458
- package/dist/chunks/chunk-5NDCSFOP.js +0 -78
- package/dist/chunks/chunk-6XM4B6K2.js +0 -48
- package/dist/chunks/chunk-6YZUE6NC.js +0 -240
- package/dist/chunks/chunk-KQLQYHWU.js +0 -386
- package/dist/chunks/chunk-NXO6GWSY.js +0 -46
- package/dist/chunks/chunk-T2XZTLYE.js +0 -316
- package/dist/chunks/chunk-VAT2QYXM.js +0 -765
- package/dist/chunks/chunk-YVRYHC4C.js +0 -655
- package/dist/chunks/compaction-config-BQSSIWK5.js +0 -2
- package/dist/chunks/dist-PCFE24YP.js +0 -2
- package/dist/chunks/host-UTFXCYYM.js +0 -2
- package/dist/chunks/run-manager-PJU3WIFJ.js +0 -2
- package/dist/types-chunks/guardrail.d-BRE_ErEj.d.ts +0 -156
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as BashPrefixExtractor, t as KodaXAgentMode } from './bash-prefix-extractor.d-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { a as BashPrefixExtractor, t as KodaXAgentMode } from './bash-prefix-extractor.d-DStqKIlu.js';
|
|
2
|
+
import { G as KodaXReasoningMode, k as KodaXMessage, T as KodaXTaskResultMetadata } from './types.d-CgrXrFrq.js';
|
|
3
|
+
import { cY as LearningSurfaceSnapshot$1, cT as LearningQuery, cS as LearningPage, cv as LearnedCapabilityRecord, cO as LearningEvent, cX as LearningSubscribeOptions, bY as KodaXSessionData, c1 as KodaXSessionLineage, c6 as KodaXSessionNavigationOptions, c8 as KodaXSessionRuntimeInfo, ca as KodaXSessionStorage, bZ as KodaXSessionEntry, bU as KodaXSessionArtifactLedgerEntry, bC as KodaXExtensionSessionRecord, cc as KodaXSessionUiHistoryItem, c9 as KodaXSessionScope, k as AgentActorSnapshot, aX as CompactionReport, bO as KodaXJsonValue } from './controller.d-C2aHqzHj.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* TextBuffer - Text buffer management class - 文本缓冲区管理类
|
|
@@ -266,19 +266,7 @@ interface ConfirmResult {
|
|
|
266
266
|
always?: boolean;
|
|
267
267
|
runtimeGrantKind?: 'session' | 'persistent';
|
|
268
268
|
}
|
|
269
|
-
|
|
270
|
-
* Tools that mutate the local filesystem AND accept a `path` input.
|
|
271
|
-
* Eligible for plan-mode's path-aware escape (writes to
|
|
272
|
-
* `.agent/plan_mode_doc.md` or the system temp dir are permitted; all
|
|
273
|
-
* other paths block).
|
|
274
|
-
*
|
|
275
|
-
* Derived from metadata: `sideEffect === 'mutates-fs'` AND
|
|
276
|
-
* `requiredParams.includes('path')`. Tools that mutate the FS without a
|
|
277
|
-
* `path` input (`undo`, `worktree_*`, construction-staircase tools) are
|
|
278
|
-
* NOT in this set — their plan-mode block reason is computed elsewhere
|
|
279
|
-
* via `isToolPlanModeAllowed()` instead of a path check.
|
|
280
|
-
*/
|
|
281
|
-
declare const FILE_MODIFICATION_TOOLS: Set<string>;
|
|
269
|
+
|
|
282
270
|
interface PermissionContext {
|
|
283
271
|
permissionMode: PermissionMode;
|
|
284
272
|
confirmTools: Set<string>;
|
|
@@ -897,13 +885,182 @@ declare class MemorySessionStorage implements SessionStorage {
|
|
|
897
885
|
}
|
|
898
886
|
declare function createMemorySessionStorage(): SessionStorage;
|
|
899
887
|
|
|
888
|
+
type SessionConversationHistoryStatus = 'resolved' | 'partial' | 'ambiguous';
|
|
889
|
+
type SessionConversationHistoryIssueCode = 'active_entry_missing' | 'compaction_boundary_invalid' | 'compaction_predecessor_ambiguous' | 'compaction_predecessor_missing' | 'legacy_overlap_ambiguous' | 'lineage_path_incomplete' | 'lineage_unavailable' | 'logical_identity_conflict';
|
|
890
|
+
interface SessionConversationHistoryIssue {
|
|
891
|
+
readonly code: SessionConversationHistoryIssueCode;
|
|
892
|
+
readonly message: string;
|
|
893
|
+
/** Number of diagnostics of this code represented by this bounded summary. */
|
|
894
|
+
readonly occurrenceCount: number;
|
|
895
|
+
/** Total evidence references before `entryIds` was bounded. */
|
|
896
|
+
readonly entryCount: number;
|
|
897
|
+
readonly entryIds: readonly string[];
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* One SDK-resolved conversation item. `auditEntryIds` names every proven
|
|
901
|
+
* physical copy represented by it; raw bodies remain in the audit API.
|
|
902
|
+
*/
|
|
903
|
+
interface SessionConversationHistoryEntry {
|
|
904
|
+
readonly boundaryId?: string;
|
|
905
|
+
readonly auditEntryIds: readonly string[];
|
|
906
|
+
readonly message: KodaXMessage;
|
|
907
|
+
}
|
|
908
|
+
interface SessionConversationHistoryData {
|
|
909
|
+
readonly sourceRevision: string;
|
|
910
|
+
readonly status: SessionConversationHistoryStatus;
|
|
911
|
+
readonly entries: readonly SessionConversationHistoryEntry[];
|
|
912
|
+
readonly issues: readonly SessionConversationHistoryIssue[];
|
|
913
|
+
}
|
|
914
|
+
declare function emptyConversationEntryChain(): string;
|
|
915
|
+
declare function extendConversationEntryChain(previous: string, entries: readonly SessionConversationHistoryEntry[]): string;
|
|
916
|
+
declare function createConversationEntryChain(entries: readonly SessionConversationHistoryEntry[]): string;
|
|
917
|
+
declare function createSessionConversationHistoryRevision(history: SessionConversationHistoryData, entryChain?: string): string;
|
|
918
|
+
|
|
919
|
+
type SessionSourceFileKind = 'main' | 'islands' | 'legacy_archive';
|
|
920
|
+
interface SessionSourceFileRevisionState {
|
|
921
|
+
readonly kind: SessionSourceFileKind;
|
|
922
|
+
readonly relativePath: string;
|
|
923
|
+
readonly byteLength: number;
|
|
924
|
+
readonly chunkCount: number;
|
|
925
|
+
readonly chain: string;
|
|
926
|
+
/** Canonical base64 for the final incomplete source chunk. */
|
|
927
|
+
readonly tail: string;
|
|
928
|
+
}
|
|
929
|
+
interface SessionSourceRevisionState {
|
|
930
|
+
readonly version: 1;
|
|
931
|
+
readonly files: readonly SessionSourceFileRevisionState[];
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
interface ConversationPageCacheAdmission {
|
|
935
|
+
readonly surface?: string;
|
|
936
|
+
readonly profileId?: string;
|
|
937
|
+
}
|
|
938
|
+
interface ConversationPageCacheInput {
|
|
939
|
+
readonly expectedRevision?: string;
|
|
940
|
+
readonly end?: number;
|
|
941
|
+
readonly limit: number;
|
|
942
|
+
readonly maxPageBytes: number;
|
|
943
|
+
readonly maxInlineEntryBytes: number;
|
|
944
|
+
readonly reservedBytes: number;
|
|
945
|
+
readonly authorize?: (admission: ConversationPageCacheAdmission) => void | Promise<void>;
|
|
946
|
+
readonly signal?: AbortSignal;
|
|
947
|
+
}
|
|
948
|
+
interface ConversationPageCacheEntry {
|
|
949
|
+
readonly index: number;
|
|
950
|
+
readonly boundaryId?: string;
|
|
951
|
+
readonly byteLength: number;
|
|
952
|
+
readonly oversized: boolean;
|
|
953
|
+
readonly entry?: SessionConversationHistoryEntry;
|
|
954
|
+
}
|
|
955
|
+
interface ConversationPageCachePage {
|
|
956
|
+
readonly revision: string;
|
|
957
|
+
readonly sourceRevision: string;
|
|
958
|
+
readonly status: SessionConversationHistoryStatus;
|
|
959
|
+
readonly issues: readonly SessionConversationHistoryIssue[];
|
|
960
|
+
readonly entries: readonly ConversationPageCacheEntry[];
|
|
961
|
+
readonly hasMore: boolean;
|
|
962
|
+
readonly nextEnd?: number;
|
|
963
|
+
}
|
|
964
|
+
interface ConversationPageCacheChunkInput {
|
|
965
|
+
readonly revision: string;
|
|
966
|
+
readonly entryIndex: number;
|
|
967
|
+
readonly offset: number;
|
|
968
|
+
readonly authorize?: (admission: ConversationPageCacheAdmission) => void | Promise<void>;
|
|
969
|
+
readonly signal?: AbortSignal;
|
|
970
|
+
}
|
|
971
|
+
interface ConversationPageCacheChunk {
|
|
972
|
+
readonly revision: string;
|
|
973
|
+
readonly entryIndex: number;
|
|
974
|
+
readonly boundaryId?: string;
|
|
975
|
+
readonly data: Buffer;
|
|
976
|
+
readonly nextOffset?: number;
|
|
977
|
+
}
|
|
978
|
+
declare class ConversationPageCacheCapacityError extends Error {
|
|
979
|
+
constructor();
|
|
980
|
+
}
|
|
981
|
+
|
|
900
982
|
/**
|
|
901
983
|
* KodaX session storage - filesystem implementation.
|
|
902
984
|
*/
|
|
903
985
|
|
|
986
|
+
/**
|
|
987
|
+
* Opaque process-local boundary for a prepared, append-only Session write.
|
|
988
|
+
* Obtain a fresh value from {@link FileSessionStorage.prepareSessionAppend};
|
|
989
|
+
* a committed append consumes the boundary. It returns a reusable successor
|
|
990
|
+
* when that successor can be witnessed safely, or `null` when the caller must
|
|
991
|
+
* reload before another append.
|
|
992
|
+
*/
|
|
993
|
+
interface PreparedSessionAppendBaseline {
|
|
994
|
+
readonly sessionId: string;
|
|
995
|
+
readonly revision: string;
|
|
996
|
+
readonly lineageCount: number;
|
|
997
|
+
readonly artifactCount: number;
|
|
998
|
+
readonly extensionCount: number;
|
|
999
|
+
readonly activeEntryId: string | null;
|
|
1000
|
+
readonly tag?: string;
|
|
1001
|
+
}
|
|
1002
|
+
/**
|
|
1003
|
+
* An explicit append-only delta. Historical arrays are intentionally absent:
|
|
1004
|
+
* callers that need to rewrite existing Session data must use
|
|
1005
|
+
* {@link FileSessionStorage.appendSessionDelta}, which performs an exact merge.
|
|
1006
|
+
*/
|
|
1007
|
+
interface PreparedSessionTailDelta {
|
|
1008
|
+
readonly baseline: PreparedSessionAppendBaseline;
|
|
1009
|
+
readonly title: string;
|
|
1010
|
+
readonly activeEntryId: string | null;
|
|
1011
|
+
readonly lineageEntries: readonly KodaXSessionEntry[];
|
|
1012
|
+
readonly artifactEntries?: readonly KodaXSessionArtifactLedgerEntry[];
|
|
1013
|
+
readonly extensionRecords?: readonly KodaXExtensionSessionRecord[];
|
|
1014
|
+
readonly uiHistory?: readonly KodaXSessionUiHistoryItem[];
|
|
1015
|
+
readonly scope?: KodaXSessionScope;
|
|
1016
|
+
}
|
|
1017
|
+
type SessionReadErrorCode = 'data_corrupt' | 'data_changed' | 'version_incompatible' | 'read_timeout' | 'read_cancelled';
|
|
1018
|
+
declare class SessionReadError extends Error {
|
|
1019
|
+
readonly code: SessionReadErrorCode;
|
|
1020
|
+
constructor(code: SessionReadErrorCode, message: string);
|
|
1021
|
+
}
|
|
1022
|
+
interface SessionReadOptions {
|
|
1023
|
+
readonly timeoutMs?: number;
|
|
1024
|
+
readonly signal?: AbortSignal;
|
|
1025
|
+
}
|
|
1026
|
+
/** Immutable read boundary used by conversation-history fork/rewind. */
|
|
1027
|
+
interface SessionHistoryBoundary {
|
|
1028
|
+
readonly sourceRevision: string;
|
|
1029
|
+
}
|
|
1030
|
+
interface SessionReadSnapshot {
|
|
1031
|
+
readonly data: SessionData;
|
|
1032
|
+
readonly lineage: KodaXSessionLineage | null;
|
|
1033
|
+
/** Exact identity of the immutable persisted bundle used for this capture. */
|
|
1034
|
+
readonly sourceRevision: string;
|
|
1035
|
+
/** Incrementally extendable witness for the exact persisted bundle revision. */
|
|
1036
|
+
readonly sourceRevisionState: SessionSourceRevisionState;
|
|
1037
|
+
/** Stat-derived witness for prepared-page validation at this exact capture. */
|
|
1038
|
+
readonly boundaryRevision: string;
|
|
1039
|
+
}
|
|
1040
|
+
type StableFileIdentity = {
|
|
1041
|
+
readonly dev: bigint;
|
|
1042
|
+
readonly ino: bigint;
|
|
1043
|
+
readonly size: bigint;
|
|
1044
|
+
readonly mtimeNs: bigint;
|
|
1045
|
+
readonly ctimeNs: bigint;
|
|
1046
|
+
};
|
|
1047
|
+
type SessionTopologyIdentity = {
|
|
1048
|
+
readonly root: StableFileIdentity;
|
|
1049
|
+
readonly epoch: string | null;
|
|
1050
|
+
readonly writerScope: 'session' | 'global';
|
|
1051
|
+
readonly writerIdentity: StableFileIdentity | null;
|
|
1052
|
+
readonly activeWriterIdentity: StableFileIdentity | null;
|
|
1053
|
+
};
|
|
1054
|
+
type SessionLocationTraversalBoundary = {
|
|
1055
|
+
readonly topologyBefore?: SessionTopologyIdentity;
|
|
1056
|
+
readonly writerTopologyDigestBefore?: string;
|
|
1057
|
+
readonly topologyMutationBefore: boolean;
|
|
1058
|
+
};
|
|
904
1059
|
declare class FileSessionStorage implements KodaXSessionStorage {
|
|
905
1060
|
private readonly sessionsDir;
|
|
906
1061
|
private readonly configHome;
|
|
1062
|
+
private readonly sessionLocations;
|
|
1063
|
+
private readonly verifiedLocationMisses;
|
|
907
1064
|
/**
|
|
908
1065
|
* v0.7.46 — optional explicit project cwd for in-process embedders
|
|
909
1066
|
* (KodaX Space) serving multiple projects from a single runtime.
|
|
@@ -933,21 +1090,50 @@ declare class FileSessionStorage implements KodaXSessionStorage {
|
|
|
933
1090
|
});
|
|
934
1091
|
/** Absolute session root used by this storage instance. */
|
|
935
1092
|
getSessionsDir(): string;
|
|
1093
|
+
/**
|
|
1094
|
+
* Return the current one-shot boundary for an explicit tail-only append.
|
|
1095
|
+
* A full save/load initializes this boundary; every successful write rotates
|
|
1096
|
+
* it so stale or concurrent deltas fail with `data_changed`.
|
|
1097
|
+
*/
|
|
1098
|
+
private currentPreparedSessionAppend;
|
|
1099
|
+
/**
|
|
1100
|
+
* Prepare an authenticated one-shot boundary for a bounded tail append.
|
|
1101
|
+
* Returns `null` when no canonical cache witness is available; callers must
|
|
1102
|
+
* then load/rebuild or use the exact full-snapshot append path.
|
|
1103
|
+
*/
|
|
1104
|
+
prepareSessionAppend(id: string): Promise<PreparedSessionAppendBaseline | null>;
|
|
1105
|
+
/** @internal Register main paths found by one list traversal. */
|
|
1106
|
+
indexSessionLocations(filePaths: readonly string[], globallyVerified: boolean, topologyIdentity?: SessionTopologyIdentity): void;
|
|
1107
|
+
/** @internal Start an authoritative all-project locator traversal. */
|
|
1108
|
+
beginSessionLocationTraversal(): SessionLocationTraversalBoundary;
|
|
1109
|
+
/** @internal Commit locator hints only when the whole traversal was stable. */
|
|
1110
|
+
completeSessionLocationTraversal(boundary: SessionLocationTraversalBoundary, filePaths: readonly string[], traversalComplete: boolean): void;
|
|
936
1111
|
private writeQueues;
|
|
937
1112
|
private serializedWrite;
|
|
1113
|
+
private refreshSelfVerifiedLocationTopology;
|
|
938
1114
|
private sessionWriteLockPath;
|
|
1115
|
+
private persistSessionLocationHint;
|
|
1116
|
+
private resolveSessionLocationHint;
|
|
939
1117
|
private appendState;
|
|
940
|
-
private
|
|
1118
|
+
private lineageIdentityFilterHashes;
|
|
941
1119
|
private projectJsonWritten;
|
|
942
1120
|
private migrationPromise?;
|
|
943
1121
|
private ensureMigrated;
|
|
944
|
-
/** Update watermarks
|
|
1122
|
+
/** Update watermarks without retaining or serializing the full Session graph. */
|
|
945
1123
|
private syncAppendState;
|
|
1124
|
+
private syncAppendStateFromFile;
|
|
946
1125
|
private legacyFlatPath;
|
|
947
1126
|
private legacyFlatArchivePath;
|
|
948
1127
|
private projectDir;
|
|
949
1128
|
/** Resolve (and cache) the project directory a write for `id` should land in. */
|
|
950
1129
|
private resolveWriteDir;
|
|
1130
|
+
private isLocationGloballyVerified;
|
|
1131
|
+
private verifiedLocationTopology;
|
|
1132
|
+
private verifiedMissingLocationTopology;
|
|
1133
|
+
private assertLocationTopologyUnchanged;
|
|
1134
|
+
private readSessionTopologyIdentitySync;
|
|
1135
|
+
private advanceSessionLocationTopology;
|
|
1136
|
+
private withSessionLocationTopologyChange;
|
|
951
1137
|
private writeFilePath;
|
|
952
1138
|
/**
|
|
953
1139
|
* id-only locator (ADR-038 §7). Resolution order:
|
|
@@ -960,22 +1146,51 @@ declare class FileSessionStorage implements KodaXSessionStorage {
|
|
|
960
1146
|
* returns null with a warning rather than guessing.
|
|
961
1147
|
*/
|
|
962
1148
|
private resolveSessionLocation;
|
|
1149
|
+
private resolveAmbiguousSessionLocation;
|
|
963
1150
|
private readSession;
|
|
964
1151
|
private readArchivedEntries;
|
|
1152
|
+
private completeConversationLineage;
|
|
965
1153
|
private appendIslandArchive;
|
|
966
1154
|
/** Write `<dir>/project.json` once per process per directory (best-effort). */
|
|
967
1155
|
private ensureProjectJson;
|
|
1156
|
+
private rebuildConversationCache;
|
|
1157
|
+
private updateConversationCacheAfterAppend;
|
|
968
1158
|
private writeSessionInternal;
|
|
969
1159
|
private mergeAndWriteInternal;
|
|
970
1160
|
appendSessionDelta(id: string, data: SessionData): Promise<void>;
|
|
971
|
-
|
|
972
|
-
|
|
1161
|
+
/**
|
|
1162
|
+
* Append an explicit new tail without accepting any historical prefix.
|
|
1163
|
+
* A fulfilled non-null value means the append committed and its successor
|
|
1164
|
+
* boundary is reusable. A fulfilled `null` also means the append committed,
|
|
1165
|
+
* but the successor could not be witnessed: reload and do not retry the same
|
|
1166
|
+
* tail. Pre-commit validation conflicts reject with `data_changed`.
|
|
1167
|
+
*/
|
|
1168
|
+
appendPreparedSessionTail(id: string, delta: PreparedSessionTailDelta): Promise<PreparedSessionAppendBaseline | null>;
|
|
973
1169
|
save(id: string, data: SessionData): Promise<void>;
|
|
1170
|
+
/**
|
|
1171
|
+
* Fast creation path for IDs produced by KodaX's timestamp + random-bit
|
|
1172
|
+
* generator. The per-ID cross-process lock and exact target check preserve
|
|
1173
|
+
* atomic creation without an all-project negative lookup. Caller-supplied
|
|
1174
|
+
* IDs must continue through the ordinary global conflict check.
|
|
1175
|
+
*/
|
|
1176
|
+
createGenerated(id: string, data: SessionData): Promise<void>;
|
|
974
1177
|
mutateLineage(id: string, mutation: (lineage: KodaXSessionLineage) => KodaXSessionLineage): Promise<boolean>;
|
|
975
1178
|
/** F270/F269 owner mutation: CAS-update only the Actor section of a session snapshot. */
|
|
976
1179
|
saveActorSnapshot(id: string, snapshot: AgentActorSnapshot, expectedRevision: number): Promise<void>;
|
|
977
1180
|
/** Read Session data without recovery writes or append-watermark mutation. */
|
|
978
1181
|
peek(id: string): Promise<SessionData | null>;
|
|
1182
|
+
/** Strict read-only Session load. It never migrates or repairs persisted data. */
|
|
1183
|
+
read(id: string, options?: SessionReadOptions): Promise<SessionData | null>;
|
|
1184
|
+
readConversationPageCache(id: string, input: ConversationPageCacheInput, options?: SessionReadOptions): Promise<ConversationPageCachePage | null>;
|
|
1185
|
+
readConversationPageBoundary(id: string, options?: SessionReadOptions): Promise<{
|
|
1186
|
+
readonly boundaryRevision: string;
|
|
1187
|
+
readonly admission: ConversationPageCacheAdmission;
|
|
1188
|
+
} | null>;
|
|
1189
|
+
prepareConversationPageCache(id: string, history: SessionConversationHistoryData, lineage: KodaXSessionLineage, runtimeInfo: KodaXSessionRuntimeInfo | undefined, boundaryRevision: string, sourceRevisionState: SessionSourceRevisionState, options?: SessionReadOptions): Promise<void>;
|
|
1190
|
+
readConversationPageCacheChunk(id: string, input: ConversationPageCacheChunkInput, options?: SessionReadOptions): Promise<ConversationPageCacheChunk | null>;
|
|
1191
|
+
/** Stable read-only main + sidecar snapshot with no lock or migration writes. */
|
|
1192
|
+
readFullSnapshot(id: string, options?: SessionReadOptions): Promise<SessionReadSnapshot | null>;
|
|
1193
|
+
private readFullSnapshotAtPath;
|
|
979
1194
|
load(id: string): Promise<SessionData | null>;
|
|
980
1195
|
isArchived(id: string): Promise<boolean>;
|
|
981
1196
|
getLineage(id: string): Promise<KodaXSessionLineage | null>;
|
|
@@ -983,11 +1198,14 @@ declare class FileSessionStorage implements KodaXSessionStorage {
|
|
|
983
1198
|
setActiveEntry(id: string, selector: string, options?: {
|
|
984
1199
|
summarizeCurrentBranch?: boolean;
|
|
985
1200
|
}): Promise<SessionData | null>;
|
|
986
|
-
rewind(id: string, selector?: string
|
|
1201
|
+
rewind(id: string, selector?: string, options?: {
|
|
1202
|
+
historyBoundary?: SessionHistoryBoundary;
|
|
1203
|
+
}): Promise<SessionData | null>;
|
|
987
1204
|
setLabel(id: string, selector: string, label?: string): Promise<SessionData | null>;
|
|
988
1205
|
fork(id: string, selector?: string, options?: {
|
|
989
1206
|
sessionId?: string;
|
|
990
1207
|
title?: string;
|
|
1208
|
+
historyBoundary?: SessionHistoryBoundary;
|
|
991
1209
|
}): Promise<{
|
|
992
1210
|
sessionId: string;
|
|
993
1211
|
data: SessionData;
|
|
@@ -1023,13 +1241,15 @@ declare class FileSessionStorage implements KodaXSessionStorage {
|
|
|
1023
1241
|
*/
|
|
1024
1242
|
archive(id: string): Promise<boolean>;
|
|
1025
1243
|
archiveOwned(id: string, ownerId: string): Promise<boolean>;
|
|
1244
|
+
private sessionConversationCacheMainPaths;
|
|
1245
|
+
private removeSessionConversationCaches;
|
|
1026
1246
|
private archiveWithActorOwner;
|
|
1027
1247
|
/** Restore an archived session back into its project directory. */
|
|
1028
1248
|
unarchive(id: string): Promise<boolean>;
|
|
1029
1249
|
unarchiveOwned(id: string, ownerId: string): Promise<boolean>;
|
|
1030
1250
|
private unarchiveWithActorOwner;
|
|
1031
1251
|
/**
|
|
1032
|
-
* Move a session +
|
|
1252
|
+
* Move a session + modern and legacy island sidecars between two directories. Propagates a
|
|
1033
1253
|
* non-ENOENT rename error (e.g. Windows file-in-use) so a partial move is
|
|
1034
1254
|
* surfaced as a failure instead of silently splitting main + sidecar.
|
|
1035
1255
|
*/
|
|
@@ -1055,9 +1275,10 @@ declare class FileSessionStorage implements KodaXSessionStorage {
|
|
|
1055
1275
|
* `cleanup.ts` (`unlinkIfOld`). Bounds the sessions directory so it never
|
|
1056
1276
|
* accumulates unboundedly — which is what keeps `list()`'s head-read pass
|
|
1057
1277
|
* fast (its cost scales with file COUNT, not size). A non-positive /
|
|
1058
|
-
* non-finite `retentionDays` disables cleanup (no-op).
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1278
|
+
* non-finite `retentionDays` disables cleanup (no-op). The sweep continues
|
|
1279
|
+
* after individual failures, then reports them together so cleanup is
|
|
1280
|
+
* observable and retryable. Durable Actor owners and non-terminal turns are
|
|
1281
|
+
* never eligible.
|
|
1061
1282
|
* Returns the number of files removed.
|
|
1062
1283
|
*/
|
|
1063
1284
|
cleanupOldSessions(retentionDays: number): Promise<number>;
|
|
@@ -1177,10 +1398,54 @@ interface SessionTranscriptEntry {
|
|
|
1177
1398
|
readonly taskResults?: readonly KodaXTaskResultMetadata[];
|
|
1178
1399
|
}
|
|
1179
1400
|
interface FullTranscriptSessionData extends Omit<SessionData, 'messages'> {
|
|
1401
|
+
/** Legacy flattened projection. Rewind markers are excluded. */
|
|
1180
1402
|
readonly messages: KodaXMessage[];
|
|
1403
|
+
/** Messages on the active branch that are eligible for model context. */
|
|
1181
1404
|
readonly activeMessages: KodaXMessage[];
|
|
1405
|
+
/**
|
|
1406
|
+
* Authoritative raw append-order audit entries, including archived islands
|
|
1407
|
+
* and inactive branches. The host owns visibility, folding, and presentation.
|
|
1408
|
+
*/
|
|
1182
1409
|
readonly transcriptEntries: SessionTranscriptEntry[];
|
|
1183
1410
|
}
|
|
1411
|
+
/** One immutable storage boundary shared by Runtime admission and history. */
|
|
1412
|
+
interface SessionReadCapture {
|
|
1413
|
+
readonly data: SessionData;
|
|
1414
|
+
readonly transcript: FullTranscriptSessionData;
|
|
1415
|
+
readonly sourceRevision: string;
|
|
1416
|
+
/** Internal exact-revision witness used to extend prepared page caches. */
|
|
1417
|
+
readonly sourceRevisionState: SessionSourceRevisionState;
|
|
1418
|
+
/** Bounded persisted-file witness corresponding to sourceRevision. */
|
|
1419
|
+
readonly boundaryRevision: string;
|
|
1420
|
+
}
|
|
1421
|
+
type SessionBundleExportStatus = 'ok' | 'partial' | 'unsupported' | 'corrupt' | 'ambiguous' | 'missing';
|
|
1422
|
+
interface SessionBundleExportFile {
|
|
1423
|
+
readonly kind: 'main' | 'islands' | 'legacy_archive';
|
|
1424
|
+
readonly path: string;
|
|
1425
|
+
readonly byteLength: number;
|
|
1426
|
+
readonly sha256: string;
|
|
1427
|
+
readonly modifiedAt: string;
|
|
1428
|
+
/** Best-effort UTF-8 projection for inspection and JSONL diagnostics. */
|
|
1429
|
+
readonly content: string;
|
|
1430
|
+
/** Canonical byte-preserving representation. */
|
|
1431
|
+
readonly contentBase64: string;
|
|
1432
|
+
}
|
|
1433
|
+
interface SessionBundleExportDiagnostic {
|
|
1434
|
+
readonly code: 'partial_tail' | 'malformed_record' | 'unsupported_record' | 'unsupported_version';
|
|
1435
|
+
readonly file: string;
|
|
1436
|
+
readonly line?: number;
|
|
1437
|
+
readonly message: string;
|
|
1438
|
+
}
|
|
1439
|
+
interface SessionBundleExportResult {
|
|
1440
|
+
readonly sessionId: string;
|
|
1441
|
+
readonly status: SessionBundleExportStatus;
|
|
1442
|
+
readonly files: readonly SessionBundleExportFile[];
|
|
1443
|
+
readonly candidates?: readonly string[];
|
|
1444
|
+
readonly diagnostics: readonly SessionBundleExportDiagnostic[];
|
|
1445
|
+
}
|
|
1446
|
+
interface SessionBundleExportOptions extends SessionReadOptions {
|
|
1447
|
+
readonly sessionsDir?: string;
|
|
1448
|
+
}
|
|
1184
1449
|
interface AppendClientNoticeOptions {
|
|
1185
1450
|
readonly source?: string;
|
|
1186
1451
|
readonly content: string;
|
|
@@ -1229,6 +1494,9 @@ interface SessionManager {
|
|
|
1229
1494
|
listSessions: typeof listSessions;
|
|
1230
1495
|
loadSession: typeof loadSession;
|
|
1231
1496
|
loadFullTranscript: typeof loadFullTranscript;
|
|
1497
|
+
readFullTranscript: typeof readFullTranscript;
|
|
1498
|
+
readConversationHistory: typeof readConversationHistory;
|
|
1499
|
+
readSessionCapture(id: string, options?: SessionReadOptions): Promise<SessionReadCapture | null>;
|
|
1232
1500
|
appendClientNotice: typeof appendClientNotice;
|
|
1233
1501
|
forkSession: typeof forkSession;
|
|
1234
1502
|
rewindSession: typeof rewindSession;
|
|
@@ -1265,11 +1533,32 @@ declare function loadSession(id: string): Promise<SessionData | null>;
|
|
|
1265
1533
|
/**
|
|
1266
1534
|
* Load append-order transcript data by ID.
|
|
1267
1535
|
*
|
|
1268
|
-
* `loadSession` remains the active model-context API. This helper
|
|
1269
|
-
* scrollback
|
|
1270
|
-
* append order
|
|
1536
|
+
* `loadSession` remains the active model-context API. This helper returns raw
|
|
1537
|
+
* host-facing scrollback/audit data, including archived islands and inactive
|
|
1538
|
+
* branches, in append order. Hosts decide what to show or fold.
|
|
1271
1539
|
*/
|
|
1272
1540
|
declare function loadFullTranscript(id: string): Promise<FullTranscriptSessionData | null>;
|
|
1541
|
+
/**
|
|
1542
|
+
* Strict, boundary-consistent history read.
|
|
1543
|
+
*
|
|
1544
|
+
* Unlike the legacy null-on-error helper, this never migrates or repairs the
|
|
1545
|
+
* Session and preserves structured read errors for the host.
|
|
1546
|
+
*/
|
|
1547
|
+
declare function readFullTranscript(id: string, options?: SessionReadOptions): Promise<FullTranscriptSessionData | null>;
|
|
1548
|
+
/**
|
|
1549
|
+
* Read the SDK-resolved ordinary conversation view at one immutable boundary.
|
|
1550
|
+
* Raw append-order audit data remains available through `readFullTranscript`.
|
|
1551
|
+
*/
|
|
1552
|
+
declare function readConversationHistory(id: string, options?: SessionReadOptions): Promise<SessionConversationHistoryData | null>;
|
|
1553
|
+
/** Build the conversation projection from an already captured read boundary. */
|
|
1554
|
+
declare function conversationHistoryFromCapture(capture: SessionReadCapture, checkpoint?: () => void): SessionConversationHistoryData;
|
|
1555
|
+
declare function readSessionCapture(id: string, options?: SessionReadOptions): Promise<SessionReadCapture | null>;
|
|
1556
|
+
/**
|
|
1557
|
+
* Export the exact persisted Session bundle without migration, recovery, or
|
|
1558
|
+
* schema rewriting. Unknown and malformed records remain byte-for-byte intact
|
|
1559
|
+
* and are described by diagnostics instead of being discarded.
|
|
1560
|
+
*/
|
|
1561
|
+
declare function exportSessionBundle(id: string, options?: SessionBundleExportOptions): Promise<SessionBundleExportResult>;
|
|
1273
1562
|
/**
|
|
1274
1563
|
* Append a host-owned transcript notice that never enters model context.
|
|
1275
1564
|
*
|
|
@@ -1278,15 +1567,25 @@ declare function loadFullTranscript(id: string): Promise<FullTranscriptSessionDa
|
|
|
1278
1567
|
* `loadSession()` keeps returning only the active model messages.
|
|
1279
1568
|
*/
|
|
1280
1569
|
declare function appendClientNotice(id: string, options: AppendClientNoticeOptions): Promise<SessionTranscriptEntry | null>;
|
|
1570
|
+
interface SessionConversationMutationBoundary {
|
|
1571
|
+
readonly boundaryId: string;
|
|
1572
|
+
readonly sourceRevision: string;
|
|
1573
|
+
}
|
|
1574
|
+
interface ForkSessionOptions {
|
|
1575
|
+
readonly selector?: string;
|
|
1576
|
+
readonly sessionId?: string;
|
|
1577
|
+
readonly title?: string;
|
|
1578
|
+
readonly historyBoundary?: SessionConversationMutationBoundary;
|
|
1579
|
+
}
|
|
1580
|
+
interface RewindSessionOptions {
|
|
1581
|
+
readonly selector?: string;
|
|
1582
|
+
readonly historyBoundary?: SessionConversationMutationBoundary;
|
|
1583
|
+
}
|
|
1281
1584
|
/**
|
|
1282
1585
|
* Fork a session at an optional selector.
|
|
1283
1586
|
* Returns null for a missing session. NEVER throws.
|
|
1284
1587
|
*/
|
|
1285
|
-
declare function forkSession(id: string, opts?: {
|
|
1286
|
-
selector?: string;
|
|
1287
|
-
sessionId?: string;
|
|
1288
|
-
title?: string;
|
|
1289
|
-
}): Promise<{
|
|
1588
|
+
declare function forkSession(id: string, opts?: ForkSessionOptions): Promise<{
|
|
1290
1589
|
sessionId: string;
|
|
1291
1590
|
data: SessionData;
|
|
1292
1591
|
} | null>;
|
|
@@ -1294,9 +1593,7 @@ declare function forkSession(id: string, opts?: {
|
|
|
1294
1593
|
* Rewind a session to a previous user entry.
|
|
1295
1594
|
* Returns null for a missing session. NEVER throws.
|
|
1296
1595
|
*/
|
|
1297
|
-
declare function rewindSession(id: string, opts?:
|
|
1298
|
-
selector?: string;
|
|
1299
|
-
}): Promise<SessionData | null>;
|
|
1596
|
+
declare function rewindSession(id: string, opts?: RewindSessionOptions): Promise<SessionData | null>;
|
|
1300
1597
|
/**
|
|
1301
1598
|
* Set the active lineage entry by selector.
|
|
1302
1599
|
* Returns null for a missing session. NEVER throws.
|
|
@@ -1381,5 +1678,5 @@ declare function createSessionManager(opts?: {
|
|
|
1381
1678
|
configHome?: string;
|
|
1382
1679
|
}): SessionManager;
|
|
1383
1680
|
|
|
1384
|
-
export {
|
|
1385
|
-
export type {
|
|
1681
|
+
export { DEFAULT_UI_STATE as D, KeypressHandlerPriority as E, FileSessionStorage as F, MemorySessionStorage as N, PERMISSION_MODES as P, archiveSession as aA, compactSession as aB, computeConfirmTools as aC, conversationHistoryFromCapture as aD, createConversationEntryChain as aE, createMemorySessionStorage as aF, createSessionConversationHistoryRevision as aG, createSessionManager as aH, deleteSession as aI, emptyConversationEntryChain as aJ, exportSessionBundle as aK, extendConversationEntryChain as aL, forkSession as aM, isPermissionMode as aN, listRunningSessions as aO, listSessions as aP, loadFullTranscript as aQ, loadSession as aR, normalizePermissionMode as aS, permissionModeDisplayName as aT, readConversationHistory as aU, readFullTranscript as aV, readSessionCapture as aW, rewindSession as aX, setActiveEntry as aY, unarchiveSession as aZ, watchSessions as a_, SessionReadError as ab, StreamingState as aj, TOOL_STATUS_ICONS as al, TextBuffer as am, ToolCallStatus as as, appendClientNotice as az, ConversationPageCacheCapacityError as g };
|
|
1682
|
+
export type { SessionBundleExportOptions as $, AppProps as A, KeypressHandler as B, CompactSessionOptions as C, LearningSurfaceSnapshot as G, HistoryEntry as H, InputPromptProps as I, LegacyMessageListProps as J, KeyInfo as K, LearningBinding as L, ListSessionsOptions as M, Message as O, PastedContent as Q, PermissionContext as R, PermissionMode as S, PreparedSessionAppendBaseline as T, PreparedSessionTailDelta as U, PromptEditingMode as V, PromptSubmitPayload as W, RewindSessionOptions as X, RunningSessionInfo as Y, SessionBundleExportDiagnostic as Z, SessionBundleExportFile as _, AppState as a, SessionBundleExportResult as a0, SessionBundleExportStatus as a1, SessionConversationHistoryData as a2, SessionConversationHistoryEntry as a3, SessionConversationHistoryIssue as a4, SessionConversationHistoryIssueCode as a5, SessionConversationHistoryStatus as a6, SessionConversationMutationBoundary as a7, SessionData as a8, SessionManager as a9, SessionReadCapture as aa, SessionReadErrorCode as ac, SessionReadOptions as ad, SessionStorage as ae, SessionSummary as af, SessionTranscriptEntry as ag, SessionTranscriptEntryType as ah, StatusBarProps as ai, Suggestion as ak, TextBufferOptions as an, Theme as ao, ThemeColors as ap, ThemeSymbols as aq, ToolCall as ar, UIActions as at, UIState as au, UseTextBufferReturn as av, VisualCursor as aw, VisualLayout as ax, WatchSessionsCallback as ay, AppendClientNoticeOptions as b, CompactSessionResult as c, Completer as d, Completion as e, ConfirmResult as f, CreatableHistoryItem as h, CursorPosition as i, DeleteSessionResult as j, ForkSessionOptions as k, FullTranscriptSessionData as l, HistoryItem as m, HistoryItemAssistant as n, HistoryItemBase as o, HistoryItemError as p, HistoryItemEvent as q, HistoryItemHint as r, HistoryItemInfo as s, HistoryItemSidecar as t, HistoryItemSystem as u, HistoryItemThinking as v, HistoryItemToolGroup as w, HistoryItemType as x, HistoryItemUser as y, KeypressEvent as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as ResolvedAutoModeSettings, b as CommandDefinition, e as CommandSource, c as CommandInfo, C as Command$1, I as InteractiveContext, a as CommandCallbacks, g as CurrentConfig, d as CommandInvocationRequest, f as CommandWorkflowInvocationRequest, p as RuntimeSurfaceStatus } from './utils.d-
|
|
2
|
-
import {
|
|
3
|
-
import { a1 as KodaXOptions, ad as KodaXResult } from './bash-prefix-extractor.d-
|
|
4
|
-
import {
|
|
5
|
-
import { s as AutoModeStats } from './guardrail.d-
|
|
1
|
+
import { n as ResolvedAutoModeSettings, b as CommandDefinition, e as CommandSource, c as CommandInfo, C as Command$1, I as InteractiveContext, a as CommandCallbacks, g as CurrentConfig, d as CommandInvocationRequest, f as CommandWorkflowInvocationRequest, p as RuntimeSurfaceStatus } from './utils.d-BpACJmzt.js';
|
|
2
|
+
import { ae as SessionStorage$1, S as PermissionMode, L as LearningBinding } from './public-api.d-CewTvUKV.js';
|
|
3
|
+
import { a1 as KodaXOptions, ad as KodaXResult } from './bash-prefix-extractor.d-DStqKIlu.js';
|
|
4
|
+
import { ca as KodaXSessionStorage, bY as KodaXSessionData } from './controller.d-C2aHqzHj.js';
|
|
5
|
+
import { s as AutoModeStats } from './guardrail.d-DM-OK0m3.js';
|
|
6
6
|
|
|
7
7
|
interface ReplRuntimePermissionGrantSuggestion {
|
|
8
8
|
readonly id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as KodaXReasoningMode, N as KodaXStableEffortIntent, aa as KodaXWireReasoningEffort, H as KodaXReasoningProfile, _ as KodaXThinkingBudgetMap, $ as KodaXThinkingDepth, r as KodaXProviderConfig, C as KodaXReasoningCapability, I as KodaXReasoningRequest, n as KodaXNormalizedReasoningRequest, W as KodaXTaskType, a8 as KodaXVerifyCredentialResult, a2 as KodaXToolDefinition, k as KodaXMessage, z as KodaXProviderStreamOptions, O as KodaXStreamResult, l as KodaXModelDescriptor, q as KodaXProviderCapabilityProfile, o as KodaXOpenAICompatMaxOutputTokensField, a9 as KodaXVerifyStrategy, d as KodaXCustomProviderConfig, j as KodaXListModelsResult } from './types.d-CgrXrFrq.js';
|
|
2
2
|
import Anthropic from '@anthropic-ai/sdk';
|
|
3
|
-
import { K as KodaXBaseProvider } from './base.d-
|
|
3
|
+
import { K as KodaXBaseProvider } from './base.d-DxG0m09Z.js';
|
|
4
4
|
import OpenAI from 'openai';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -282,6 +282,7 @@ declare abstract class KodaXOpenAICompatProvider extends KodaXBaseProvider {
|
|
|
282
282
|
protected get client(): OpenAI;
|
|
283
283
|
protected set client(client: OpenAI);
|
|
284
284
|
protected buildClient(): OpenAI;
|
|
285
|
+
private getEffectiveMaxOutputTokensField;
|
|
285
286
|
protected onStaleConnection(): void;
|
|
286
287
|
/**
|
|
287
288
|
* FEATURE_216 v0.7.45 — Lightweight credential verification.
|
|
@@ -389,6 +390,8 @@ type ProviderSnapshot = {
|
|
|
389
390
|
readonly contextWindow?: number;
|
|
390
391
|
/** Per-turn output token cap KodaX requests. Provider-level default. */
|
|
391
392
|
readonly maxOutputTokens?: number;
|
|
393
|
+
/** OpenAI Chat Completions field used for the output-token cap. */
|
|
394
|
+
readonly maxOutputTokensField?: KodaXOpenAICompatMaxOutputTokensField;
|
|
392
395
|
/** Upper bound on `thinking_budget` for native-budget reasoning providers. */
|
|
393
396
|
readonly thinkingBudgetCap?: number;
|
|
394
397
|
/** Whether the provider supports `thinking_budget` / native reasoning. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fh as WorkflowProcessTrackerOptions, eP as WorkflowEvent, fb as WorkflowProcessSnapshot, f5 as WorkflowProcessEvent } from './controller.d-C2aHqzHj.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* FEATURE_246 Part A0 (ADR-046) — neutral workflow run lifecycle manager.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { k as KodaXMessage, c as KodaXContentBlock } from './types.d-
|
|
3
|
-
import {
|
|
1
|
+
import { h as CreatableHistoryItem, ar as ToolCall } from './public-api.d-CewTvUKV.js';
|
|
2
|
+
import { k as KodaXMessage, c as KodaXContentBlock } from './types.d-CgrXrFrq.js';
|
|
3
|
+
import { cc as KodaXSessionUiHistoryItem, cg as KodaXSessionUiToolCall } from './controller.d-C2aHqzHj.js';
|
|
4
4
|
|
|
5
5
|
interface RestoreHistoryItemsFromSessionInput {
|
|
6
6
|
messages: readonly KodaXMessage[];
|