dal-code 1.0.56 → 1.0.58

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 (132) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/bundle/chunks/{anthropic-messages-HHQLDDZH.js → anthropic-messages-FOIJU7LX.js} +1 -1
  3. package/dist/bundle/chunks/{azure-openai-responses-S7VKEJTH.js → azure-openai-responses-7NBJZKX5.js} +1 -1
  4. package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
  5. package/dist/bundle/chunks/{chunk-QCT6OHUR.js → chunk-3QG7FIE4.js} +1 -1
  6. package/dist/bundle/chunks/chunk-4BOWD7PQ.js +1 -0
  7. package/dist/bundle/chunks/{chunk-UULAEZ3H.js → chunk-4PBY6OYS.js} +1 -1
  8. package/dist/bundle/chunks/{chunk-BIY5HTFI.js → chunk-5MF5GEDD.js} +1 -1
  9. package/dist/bundle/chunks/{chunk-3XMZ5UC3.js → chunk-B7KZDIWA.js} +1 -1
  10. package/dist/bundle/chunks/chunk-C5ELI234.js +17 -0
  11. package/dist/bundle/chunks/{chunk-RX6CC5RH.js → chunk-CCU76UL3.js} +443 -472
  12. package/dist/bundle/chunks/{chunk-PH42AQ66.js → chunk-DVEPGKL5.js} +1 -1
  13. package/dist/bundle/chunks/chunk-G5AMLGXC.js +1 -0
  14. package/dist/bundle/chunks/chunk-HF334NQU.js +21 -0
  15. package/dist/bundle/chunks/{chunk-Z64M4Q7A.js → chunk-IONGABQF.js} +1 -1
  16. package/dist/bundle/chunks/{chunk-F37JXTCY.js → chunk-JK74OC6W.js} +1 -1
  17. package/dist/bundle/chunks/chunk-JUUJCOIR.js +7 -0
  18. package/dist/bundle/chunks/chunk-JXAFVEE4.js +17 -0
  19. package/dist/bundle/chunks/chunk-LMZYTWXD.js +14 -0
  20. package/dist/bundle/chunks/chunk-NJDCSLWK.js +1 -0
  21. package/dist/bundle/chunks/{chunk-BCFLC6CK.js → chunk-NYSVXLKF.js} +1 -1
  22. package/dist/bundle/chunks/{chunk-P4IBZA6D.js → chunk-PMFHJN7I.js} +1 -1
  23. package/dist/bundle/chunks/chunk-QFBU27TM.js +30 -0
  24. package/dist/bundle/chunks/{chunk-SZZVJTVX.js → chunk-QU2VEHMW.js} +1 -1
  25. package/dist/bundle/chunks/chunk-SCZEDPDC.js +9 -0
  26. package/dist/bundle/chunks/{chunk-VGMP27KM.js → chunk-T5PI6B5P.js} +1 -1
  27. package/dist/bundle/chunks/{chunk-ZR6PGIL7.js → chunk-X7I3V6OA.js} +1 -1
  28. package/dist/bundle/chunks/{chunk-3HGUIN22.js → chunk-XQF5XDEM.js} +2 -2
  29. package/dist/bundle/chunks/{cli-TVPE43YN.js → cli-NQ7B7BGV.js} +1 -1
  30. package/dist/bundle/chunks/{cli-NGGC23SK.js → cli-RY666QAD.js} +1 -1
  31. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-RK2YCJXC.js → cloudflare-workers-ai-system-one-CFGOMWWZ.js} +1 -1
  32. package/dist/bundle/chunks/{execute-MGTKJB44.js → execute-NJRE4WBO.js} +2 -2
  33. package/dist/bundle/chunks/{google-generative-ai-ZPA4VBXP.js → google-generative-ai-ZA2RHPNE.js} +1 -1
  34. package/dist/bundle/chunks/{google-vertex-IWHW2RX7.js → google-vertex-Y2GRWOK7.js} +1 -1
  35. package/dist/bundle/chunks/{llama-cpp-classify-FXJM52Q3.js → llama-cpp-classify-G2JDOFHY.js} +1 -1
  36. package/dist/bundle/chunks/{mcp-RLFUDVHN.js → mcp-45D7KCZZ.js} +1 -1
  37. package/dist/bundle/chunks/{mistral-conversations-JXVPTO5Y.js → mistral-conversations-MLV32BRV.js} +1 -1
  38. package/dist/bundle/chunks/{office-RTREQQ7W.js → office-UBOUFRAU.js} +1 -1
  39. package/dist/bundle/chunks/{openai-codex-responses-EYW27UUE.js → openai-codex-responses-BDK3PY6G.js} +1 -1
  40. package/dist/bundle/chunks/{openai-completions-ROBKXDOC.js → openai-completions-BLXHKAB3.js} +1 -1
  41. package/dist/bundle/chunks/{openai-decisions-4T5LPJRA.js → openai-decisions-IGVID576.js} +1 -1
  42. package/dist/bundle/chunks/{openai-responses-ZVFZ75QW.js → openai-responses-KHZOEDF2.js} +1 -1
  43. package/dist/bundle/chunks/{openrouter-images-6VJYTLAX.js → openrouter-images-SA6PUASF.js} +1 -1
  44. package/dist/bundle/chunks/{pi-messages-Y6HBOGKH.js → pi-messages-3VAOLQ2Y.js} +1 -1
  45. package/dist/bundle/chunks/{review-USSKCVWP.js → review-RZXLHPUZ.js} +2 -2
  46. package/dist/bundle/chunks/{router-4JLK3BTT.js → router-YBVXODIL.js} +1 -1
  47. package/dist/bundle/chunks/runtime-FNCZJKOC.js +1 -0
  48. package/dist/bundle/chunks/sdk-X6RX7FNE.js +1 -0
  49. package/dist/bundle/chunks/{sync-UCHKAOUU.js → sync-CRV6BXXC.js} +3 -3
  50. package/dist/bundle/chunks/{typesafe-system-one-XPDE7VYD.js → typesafe-system-one-ER3DLYNF.js} +1 -1
  51. package/dist/bundle/chunks/usage-LMRFS2HV.js +1 -0
  52. package/dist/bundle/chunks/virtual-modules-XIUNRFOZ.js +1 -0
  53. package/dist/bundle/cli-runtime.js +1 -1
  54. package/dist/bundle/index.js +1 -1
  55. package/dist/bundle/rpc-entry.js +1 -1
  56. package/dist/node_modules/@dalcode/dal-advisor/package.json +3 -3
  57. package/dist/node_modules/@dalcode/dal-awake/package.json +2 -2
  58. package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
  59. package/dist/node_modules/@dalcode/dal-capabilities/package.json +4 -4
  60. package/dist/node_modules/@dalcode/dal-codeindex/package.json +2 -2
  61. package/dist/node_modules/@dalcode/dal-compat/package.json +2 -2
  62. package/dist/node_modules/@dalcode/dal-dap/package.json +2 -2
  63. package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
  64. package/dist/node_modules/@dalcode/dal-goal/package.json +3 -3
  65. package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
  66. package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
  67. package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
  68. package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
  69. package/dist/node_modules/@dalcode/dal-learn/package.json +2 -2
  70. package/dist/node_modules/@dalcode/dal-learn/src/engine.js +3 -3
  71. package/dist/node_modules/@dalcode/dal-learn/src/index.js +11 -11
  72. package/dist/node_modules/@dalcode/dal-learn/src/lessons.js +4 -4
  73. package/dist/node_modules/@dalcode/dal-learn/src/project-map.js +2 -2
  74. package/dist/node_modules/@dalcode/dal-learn/src/signals.js +6 -6
  75. package/dist/node_modules/@dalcode/dal-learn/src/store.js +3 -3
  76. package/dist/node_modules/@dalcode/dal-lsp/package.json +4 -4
  77. package/dist/node_modules/@dalcode/dal-mcp/package.json +6 -6
  78. package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
  79. package/dist/node_modules/@dalcode/dal-pi-kit/dist/agent-dir.js +1 -0
  80. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +1 -1
  81. package/dist/node_modules/@dalcode/dal-pi-kit/dist/index.js +1 -1
  82. package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
  83. package/dist/node_modules/@dalcode/dal-pi-kit/src/agent-dir.js +1 -0
  84. package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +1 -1
  85. package/dist/node_modules/@dalcode/dal-pi-kit/src/index.js +1 -1
  86. package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -4
  87. package/dist/node_modules/@dalcode/dal-recall/package.json +2 -2
  88. package/dist/node_modules/@dalcode/dal-remote/package.json +2 -2
  89. package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
  90. package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
  91. package/dist/node_modules/@dalcode/dal-router/package.json +6 -6
  92. package/dist/node_modules/@dalcode/dal-rtk/package.json +2 -2
  93. package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
  94. package/dist/node_modules/@dalcode/dal-statusline/package.json +2 -2
  95. package/dist/node_modules/@dalcode/dal-structured/package.json +2 -2
  96. package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
  97. package/dist/node_modules/@dalcode/dal-sync/package.json +4 -4
  98. package/dist/node_modules/@dalcode/dal-telemetry/package.json +4 -4
  99. package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
  100. package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
  101. package/dist/node_modules/@dalcode/dal-usage/package.json +2 -2
  102. package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
  103. package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
  104. package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
  105. package/dist/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  106. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  107. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  108. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.d.ts +1 -1
  109. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
  110. package/dist/node_modules/@earendil-works/pi-ai/package.json +3 -3
  111. package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
  112. package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
  113. package/dist/node_modules/@earendil-works/pi-mcp/package.json +1 -1
  114. package/dist/node_modules/@earendil-works/pi-schema/package.json +1 -1
  115. package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  116. package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
  117. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  118. package/examples/extensions/gondolin/package-lock.json +2 -2
  119. package/examples/extensions/gondolin/package.json +1 -1
  120. package/examples/extensions/with-deps/package-lock.json +2 -2
  121. package/examples/extensions/with-deps/package.json +1 -1
  122. package/npm-shrinkwrap.json +2 -2
  123. package/package.json +1 -1
  124. package/dist/bundle/chunks/chunk-3YGHTGYM.js +0 -7
  125. package/dist/bundle/chunks/chunk-MKMLENQD.js +0 -17
  126. package/dist/bundle/chunks/chunk-SE42OS3U.js +0 -21
  127. package/dist/bundle/chunks/chunk-T3TEURLR.js +0 -30
  128. package/dist/bundle/chunks/chunk-XTN2LDU3.js +0 -9
  129. package/dist/bundle/chunks/runtime-G7F6UQLA.js +0 -1
  130. package/dist/bundle/chunks/sdk-CEIRR6KD.js +0 -1
  131. package/dist/bundle/chunks/usage-3ACOJWR3.js +0 -1
  132. package/dist/bundle/chunks/virtual-modules-P4JE2EA6.js +0 -1
@@ -1,9 +0,0 @@
1
- var ye=Object.defineProperty;var e=(o,t)=>ye(o,"name",{value:t,configurable:!0});import{createRequire as Le}from"node:module";const Ai=Le(import.meta.url);import{ADAPTATION_FILE as Fe,AgentSession as Ie,AgentSessionRuntime as Oe,AssistantMessageComponent as Ne,BackgroundProcessManager as we,BashExecutionComponent as ve,BorderedLoader as Me,BranchSummaryMessageComponent as He,CURRENT_SESSION_VERSION as xe,CompactionSummaryMessageComponent as be,CustomEditor as Be,CustomMessageComponent as Ue,DEFAULT_COMPACTION_SETTINGS as je,DefaultPackageManager as Ke,DefaultResourceLoader as We,DynamicBorder as Ge,ENGINE_MARKET_CACHE_FILE as $e,ExtensionEditorComponent as Ve,ExtensionFatalError as ze,ExtensionInputComponent as Je,ExtensionRunner as Xe,ExtensionSelectorComponent as Ye,FooterComponent as qe,HOST_CAPABILITIES_ENV as Qe,HOST_TOKEN_ENV as Ze,HOST_TOKEN_HEADER as et,HOST_URL_ENV as tt,HostCallError as ot,HostCapabilities as rt,InteractiveMode as nt,LoginDialogComponent as it,MARKET_SECTIONS as st,MAX_BACKGROUND_PROCESSES as at,ModelRegistry as lt,ModelSelectorComponent as ut,OAuthSelectorComponent as ct,PROTECTED_WRITE_NAMES as dt,REQUIRED_EXTENSION_FAILED as mt,RequiredExtensionError as pt,RpcClient as Et,RpcCommandError as St,SANDBOX_ENV as gt,SessionManager as ht,SessionSelectorComponent as ft,SettingsManager as Tt,SettingsSelectorComponent as Ct,ShellSandbox as kt,SkillInvocationMessageComponent as _t,ThinkingSelectorComponent as Dt,ToolExecutionComponent as At,TreeSelectorComponent as Rt,UserMessageComponent as Pt,UserMessageSelectorComponent as yt,adaptPackage as Lt,adaptationState as Ft,agentLogPath as It,appendAgentLog as Ot,applyCommunityEnv as Nt,buildContextEntries as wt,buildProjectMap as vt,buildRuleSet as Mt,buildSessionContext as Ht,buildSessionProjection as xt,calculateContextTokens as bt,chromeBottom as te,chromeTop as oe,collectEntriesForBranchSummary as Bt,communityEnv as Ut,compact as jt,convertToLlm as Kt,convertToPng as Wt,copyToClipboard as Gt,createAgentSession as $t,createAgentSessionFromServices as Vt,createAgentSessionRuntime as zt,createAgentSessionServices as Jt,createBashTool as Xt,createBashToolDefinition as Yt,createCodemodeExtension as qt,createCodingTools as Qt,createEditTool as Zt,createEditToolDefinition as eo,createEventBus as to,createExtensionRuntime as oo,createFindTool as ro,createFindToolDefinition as no,createGrepTool as io,createGrepToolDefinition as so,createLocalBashOperations as ao,createLocalPowerShellOperations as lo,createLsTool as uo,createLsToolDefinition as co,createMcpExtension as mo,createPowerShellTool as po,createPowerShellToolDefinition as Eo,createProcessToolDefinition as So,createReadOnlyTools as go,createReadTool as ho,createReadToolDefinition as fo,createSyntheticSourceInfo as To,createToolSearchExtension as Co,createWriteTool as ko,createWriteToolDefinition as _o,defineTool as Do,describeProjectFacts as Ao,detectProjectFacts as Ro,detectSandboxAvailability as Po,detectSupportedImageMimeTypeFromFile as yo,discoverAndLoadExtensions as Lo,ensurePackageAdapted as Fo,estimateTokens as Io,evaluateToolPolicy as Oo,expandTempDirVariable as No,fetchSignedMarket as wo,findCutPoint as vo,findTurnStartIndex as Mo,formatDimensionNote as Ho,formatProjectMapPrompt as xo,formatSkillsForPrompt as bo,generateBranchSummary as Bo,generateDiffString as Uo,generateSummary as jo,generateSummaryWithUsage as Ko,generateUnifiedPatch as Wo,getDefaultSessionDir as Go,getDefaultSessionDirs as $o,getHostCapabilities as Vo,getLastAssistantUsage as zo,getLatestCompactionEntry as Jo,getProcessShellSandbox as Xo,getToolDenial as Yo,isAdaptablePackage as qo,isBashToolResult as Qo,isEditToolResult as Zo,isFatalExtensionError as er,isFindToolResult as tr,isGrepToolResult as or,isHostExtensionPath as rr,isLsToolResult as nr,isPowerShellToolResult as ir,isReadOnlyBashCommand as sr,isReadToolResult as ar,isToolCallEventType as lr,isWriteToolResult as ur,loadMcpRuntime as cr,loadProjectContextFiles as dr,loadSkills as mr,loadSkillsFromDir as pr,main as Er,markHostExtensionPaths as Sr,marketCacheDir as gr,matchPermissionRules as hr,migrateSessionEntries as fr,normalizeForFuzzyMatch as Tr,parseArgs as Cr,parseFrontmatter as kr,parseHostCapabilities as _r,parsePermissionRule as Dr,parseSessionEntries as Ar,parseSkillBlock as Rr,prepareBranchEntries as Pr,projectPackageManager as yr,readAccessDenial as Lr,readAdaptation as Fr,readSignedSection as Ir,registerPermissionAskHandler as Or,registerSandboxEscalationHandler as Nr,registerShellExecutionGuard as wr,renderDiff as vr,resizeImage as Mr,resolveCliModel as Hr,resolveMarketEndpoint as xr,resolveModelScopeWithDiagnostics as br,resolveSandboxPolicy as Br,resolveToCwd as Ur,runPrintMode as jr,runRpcMode as Kr,scanHardcodedPiPaths as Wr,serializeConversation as Gr,sessionEntryToContextMessages as $r,shellExecutionRefusal as Vr,shouldCompact as zr,simpleCommands as Jr,stripFrontmatter as Xr,systemTempDirs as Yr,tryEnsurePackageAdapted as qr,unwrapCommand as Qr,verifyAdaptation as Zr,verifySignedSection as en,withFileMutationQueue as tn,wrapRegisteredTool as on,wrapRegisteredTools as rn}from"./chunk-RX6CC5RH.js";import{CredentialSynchronizationError as nn,DALCODE_PROJECT_DIR_NAME as sn,DEFAULT_HOOK_TIMEOUT_SECONDS as an,ModelRuntime as ln,PROJECT_HOOKS_FILE_ENV as un,ProjectTrustStore as cn,TRUST_REQUIRING_PROJECT_HOOK_FILES as dn,VIRTUAL_MODEL_STATE_ENTRY as mn,dalHookSourceFiles as pn,deriveHookName as En,hasTrustRequiringProjectResources as Sn,loadDalHooks as re,openBrowser as gn,projectFileDeclaresHooks as hn,projectHooksFileFromEnv as ne}from"./chunk-T3TEURLR.js";import{formatReadLineRange as fn,truncateToVisualLines as Tn}from"./chunk-3HGUIN22.js";import{readStoredCredential as Cn}from"./chunk-MKMLENQD.js";import{DEFAULT_MAX_BYTES as kn,DEFAULT_MAX_LINES as _n,DEFAULT_SHELL_ENV_EXCLUDES as Dn,applyShellEnvironmentPolicy as An,formatSize as Rn,getPowerShellConfig as Pn,getShellConfig as yn,getShellEnv as Ln,isDalCodeCredentialName as Fn,truncateHead as In,truncateLine as On,truncateTail as Nn,withoutDalCodeCredentials as ie}from"./chunk-SE42OS3U.js";import{ArminComponent as wn}from"./chunk-F5SIUTR7.js";import{Container as se,SelectList as ae,Theme as vn,getAvailableThemes as Mn,getLanguageFromPath as Hn,getMarkdownTheme as xn,getSelectListTheme as N,getSettingsListTheme as bn,highlightCode as Bn,initTheme as Un,keyHint as jn,keyText as Kn,rawKeyHint as Wn}from"./chunk-AL3DFAIM.js";import{CONFIG_DIR_NAME as Gn,SHARED_SKILL_CONFIG_DIRS as $n,VERSION as Vn,getAgentDir as le,getDocsPath as zn,getExamplesPath as Jn,getPackageDir as Xn,getReadmePath as Yn}from"./chunk-R47JBGS3.js";import{t as S}from"./chunk-SZZVJTVX.js";import{__export as qn}from"./chunk-JXWJOIH4.js";var ue={};qn(ue,{ADAPTATION_FILE:e(()=>Fe,"ADAPTATION_FILE"),AgentSession:e(()=>Ie,"AgentSession"),AgentSessionRuntime:e(()=>Oe,"AgentSessionRuntime"),ArminComponent:e(()=>wn,"ArminComponent"),AssistantMessageComponent:e(()=>Ne,"AssistantMessageComponent"),BackgroundProcessManager:e(()=>we,"BackgroundProcessManager"),BashExecutionComponent:e(()=>ve,"BashExecutionComponent"),BorderedLoader:e(()=>Me,"BorderedLoader"),BranchSummaryMessageComponent:e(()=>He,"BranchSummaryMessageComponent"),CONFIG_DIR_NAME:e(()=>Gn,"CONFIG_DIR_NAME"),CURRENT_SESSION_VERSION:e(()=>xe,"CURRENT_SESSION_VERSION"),CompactionSummaryMessageComponent:e(()=>be,"CompactionSummaryMessageComponent"),CredentialSynchronizationError:e(()=>nn,"CredentialSynchronizationError"),CustomEditor:e(()=>Be,"CustomEditor"),CustomMessageComponent:e(()=>Ue,"CustomMessageComponent"),DALCODE_PROJECT_DIR_NAME:e(()=>sn,"DALCODE_PROJECT_DIR_NAME"),DAL_HOOK_ENTRY_TYPE:e(()=>B,"DAL_HOOK_ENTRY_TYPE"),DAL_HOOK_NOTIFICATION_CHANNEL:e(()=>ee,"DAL_HOOK_NOTIFICATION_CHANNEL"),DEFAULT_COMPACTION_SETTINGS:e(()=>je,"DEFAULT_COMPACTION_SETTINGS"),DEFAULT_HOOK_TIMEOUT_SECONDS:e(()=>an,"DEFAULT_HOOK_TIMEOUT_SECONDS"),DEFAULT_MAX_BYTES:e(()=>kn,"DEFAULT_MAX_BYTES"),DEFAULT_MAX_LINES:e(()=>_n,"DEFAULT_MAX_LINES"),DEFAULT_SHELL_ENV_EXCLUDES:e(()=>Dn,"DEFAULT_SHELL_ENV_EXCLUDES"),DefaultPackageManager:e(()=>Ke,"DefaultPackageManager"),DefaultResourceLoader:e(()=>We,"DefaultResourceLoader"),DynamicBorder:e(()=>Ge,"DynamicBorder"),ENGINE_MARKET_CACHE_FILE:e(()=>$e,"ENGINE_MARKET_CACHE_FILE"),ExtensionEditorComponent:e(()=>Ve,"ExtensionEditorComponent"),ExtensionFatalError:e(()=>ze,"ExtensionFatalError"),ExtensionInputComponent:e(()=>Je,"ExtensionInputComponent"),ExtensionRunner:e(()=>Xe,"ExtensionRunner"),ExtensionSelectorComponent:e(()=>Ye,"ExtensionSelectorComponent"),FooterComponent:e(()=>qe,"FooterComponent"),HOST_CAPABILITIES_ENV:e(()=>Qe,"HOST_CAPABILITIES_ENV"),HOST_TOKEN_ENV:e(()=>Ze,"HOST_TOKEN_ENV"),HOST_TOKEN_HEADER:e(()=>et,"HOST_TOKEN_HEADER"),HOST_URL_ENV:e(()=>tt,"HOST_URL_ENV"),HostCallError:e(()=>ot,"HostCallError"),HostCapabilities:e(()=>rt,"HostCapabilities"),InteractiveMode:e(()=>nt,"InteractiveMode"),LoginDialogComponent:e(()=>it,"LoginDialogComponent"),MARKET_SECTIONS:e(()=>st,"MARKET_SECTIONS"),MAX_BACKGROUND_PROCESSES:e(()=>at,"MAX_BACKGROUND_PROCESSES"),ModelRegistry:e(()=>lt,"ModelRegistry"),ModelRuntime:e(()=>ln,"ModelRuntime"),ModelSelectorComponent:e(()=>ut,"ModelSelectorComponent"),OAuthSelectorComponent:e(()=>ct,"OAuthSelectorComponent"),PROJECT_HOOKS_FILE_ENV:e(()=>un,"PROJECT_HOOKS_FILE_ENV"),PROTECTED_WRITE_NAMES:e(()=>dt,"PROTECTED_WRITE_NAMES"),ProjectTrustStore:e(()=>cn,"ProjectTrustStore"),REQUIRED_EXTENSION_FAILED:e(()=>mt,"REQUIRED_EXTENSION_FAILED"),RequiredExtensionError:e(()=>pt,"RequiredExtensionError"),RpcClient:e(()=>Et,"RpcClient"),RpcCommandError:e(()=>St,"RpcCommandError"),SANDBOX_ENV:e(()=>gt,"SANDBOX_ENV"),SHARED_SKILL_CONFIG_DIRS:e(()=>$n,"SHARED_SKILL_CONFIG_DIRS"),STALE_AFTER_MS:e(()=>H,"STALE_AFTER_MS"),SessionManager:e(()=>ht,"SessionManager"),SessionSelectorComponent:e(()=>ft,"SessionSelectorComponent"),SettingsManager:e(()=>Tt,"SettingsManager"),SettingsSelectorComponent:e(()=>Ct,"SettingsSelectorComponent"),ShellSandbox:e(()=>kt,"ShellSandbox"),ShowImagesSelectorComponent:e(()=>Re,"ShowImagesSelectorComponent"),SkillInvocationMessageComponent:e(()=>_t,"SkillInvocationMessageComponent"),TRUST_REQUIRING_PROJECT_HOOK_FILES:e(()=>dn,"TRUST_REQUIRING_PROJECT_HOOK_FILES"),Theme:e(()=>vn,"Theme"),ThemeSelectorComponent:e(()=>Pe,"ThemeSelectorComponent"),ThinkingSelectorComponent:e(()=>Dt,"ThinkingSelectorComponent"),ToolExecutionComponent:e(()=>At,"ToolExecutionComponent"),TreeSelectorComponent:e(()=>Rt,"TreeSelectorComponent"),UserMessageComponent:e(()=>Pt,"UserMessageComponent"),UserMessageSelectorComponent:e(()=>yt,"UserMessageSelectorComponent"),VERSION:e(()=>Vn,"VERSION"),VIRTUAL_MODEL_STATE_ENTRY:e(()=>mn,"VIRTUAL_MODEL_STATE_ENTRY"),WORKSPACE_LOCK_DIR_NAME:e(()=>v,"WORKSPACE_LOCK_DIR_NAME"),WORKSPACE_LOCK_FILE:e(()=>L,"WORKSPACE_LOCK_FILE"),adaptPackage:e(()=>Lt,"adaptPackage"),adaptationState:e(()=>Ft,"adaptationState"),agentLogPath:e(()=>It,"agentLogPath"),appendAgentLog:e(()=>Ot,"appendAgentLog"),applyCommunityEnv:e(()=>Nt,"applyCommunityEnv"),applyShellEnvironmentPolicy:e(()=>An,"applyShellEnvironmentPolicy"),buildContextEntries:e(()=>wt,"buildContextEntries"),buildDalHookInput:e(()=>V,"buildDalHookInput"),buildProjectMap:e(()=>vt,"buildProjectMap"),buildRuleSet:e(()=>Mt,"buildRuleSet"),buildSessionContext:e(()=>Ht,"buildSessionContext"),buildSessionProjection:e(()=>xt,"buildSessionProjection"),calculateContextTokens:e(()=>bt,"calculateContextTokens"),claimWorkspace:e(()=>pe,"claimWorkspace"),collectEntriesForBranchSummary:e(()=>Bt,"collectEntriesForBranchSummary"),communityEnv:e(()=>Ut,"communityEnv"),compact:e(()=>jt,"compact"),convertToLlm:e(()=>Kt,"convertToLlm"),convertToPng:e(()=>Wt,"convertToPng"),copyToClipboard:e(()=>Gt,"copyToClipboard"),createAgentSession:e(()=>$t,"createAgentSession"),createAgentSessionFromServices:e(()=>Vt,"createAgentSessionFromServices"),createAgentSessionRuntime:e(()=>zt,"createAgentSessionRuntime"),createAgentSessionServices:e(()=>Jt,"createAgentSessionServices"),createBashTool:e(()=>Xt,"createBashTool"),createBashToolDefinition:e(()=>Yt,"createBashToolDefinition"),createCodemodeExtension:e(()=>qt,"createCodemodeExtension"),createCodingTools:e(()=>Qt,"createCodingTools"),createEditTool:e(()=>Zt,"createEditTool"),createEditToolDefinition:e(()=>eo,"createEditToolDefinition"),createEventBus:e(()=>to,"createEventBus"),createExtensionRuntime:e(()=>oo,"createExtensionRuntime"),createFindTool:e(()=>ro,"createFindTool"),createFindToolDefinition:e(()=>no,"createFindToolDefinition"),createGrepTool:e(()=>io,"createGrepTool"),createGrepToolDefinition:e(()=>so,"createGrepToolDefinition"),createLocalBashOperations:e(()=>ao,"createLocalBashOperations"),createLocalPowerShellOperations:e(()=>lo,"createLocalPowerShellOperations"),createLsTool:e(()=>uo,"createLsTool"),createLsToolDefinition:e(()=>co,"createLsToolDefinition"),createMcpExtension:e(()=>mo,"createMcpExtension"),createPowerShellTool:e(()=>po,"createPowerShellTool"),createPowerShellToolDefinition:e(()=>Eo,"createPowerShellToolDefinition"),createProcessToolDefinition:e(()=>So,"createProcessToolDefinition"),createReadOnlyTools:e(()=>go,"createReadOnlyTools"),createReadTool:e(()=>ho,"createReadTool"),createReadToolDefinition:e(()=>fo,"createReadToolDefinition"),createSyntheticSourceInfo:e(()=>To,"createSyntheticSourceInfo"),createToolSearchExtension:e(()=>Co,"createToolSearchExtension"),createWriteTool:e(()=>ko,"createWriteTool"),createWriteToolDefinition:e(()=>_o,"createWriteToolDefinition"),dalHookActivity:e(()=>g,"dalHookActivity"),dalHookSourceFiles:e(()=>pn,"dalHookSourceFiles"),dalHooksExtension:e(()=>Ae,"dalHooksExtension"),decideDalHooks:e(()=>$,"decideDalHooks"),defaultWorkspaceLockDir:e(()=>M,"defaultWorkspaceLockDir"),defineTool:e(()=>Do,"defineTool"),deriveHookName:e(()=>En,"deriveHookName"),describeProjectFacts:e(()=>Ao,"describeProjectFacts"),detectProjectFacts:e(()=>Ro,"detectProjectFacts"),detectSandboxAvailability:e(()=>Po,"detectSandboxAvailability"),detectSupportedImageMimeTypeFromFile:e(()=>yo,"detectSupportedImageMimeTypeFromFile"),discoverAndLoadExtensions:e(()=>Lo,"discoverAndLoadExtensions"),engineToolInput:e(()=>j,"engineToolInput"),ensurePackageAdapted:e(()=>Fo,"ensurePackageAdapted"),estimateTokens:e(()=>Io,"estimateTokens"),evaluateToolPolicy:e(()=>Oo,"evaluateToolPolicy"),expandTempDirVariable:e(()=>No,"expandTempDirVariable"),fetchSignedMarket:e(()=>wo,"fetchSignedMarket"),findCutPoint:e(()=>vo,"findCutPoint"),findTurnStartIndex:e(()=>Mo,"findTurnStartIndex"),formatDalHookActivity:e(()=>U,"formatDalHookActivity"),formatDimensionNote:e(()=>Ho,"formatDimensionNote"),formatProjectMapPrompt:e(()=>xo,"formatProjectMapPrompt"),formatReadLineRange:e(()=>fn,"formatReadLineRange"),formatSize:e(()=>Rn,"formatSize"),formatSkillsForPrompt:e(()=>bo,"formatSkillsForPrompt"),generateBranchSummary:e(()=>Bo,"generateBranchSummary"),generateDiffString:e(()=>Uo,"generateDiffString"),generateSummary:e(()=>jo,"generateSummary"),generateSummaryWithUsage:e(()=>Ko,"generateSummaryWithUsage"),generateUnifiedPatch:e(()=>Wo,"generateUnifiedPatch"),getAgentDir:e(()=>le,"getAgentDir"),getDefaultSessionDir:e(()=>Go,"getDefaultSessionDir"),getDefaultSessionDirs:e(()=>$o,"getDefaultSessionDirs"),getDocsPath:e(()=>zn,"getDocsPath"),getExamplesPath:e(()=>Jn,"getExamplesPath"),getHostCapabilities:e(()=>Vo,"getHostCapabilities"),getLanguageFromPath:e(()=>Hn,"getLanguageFromPath"),getLastAssistantUsage:e(()=>zo,"getLastAssistantUsage"),getLatestCompactionEntry:e(()=>Jo,"getLatestCompactionEntry"),getMarkdownTheme:e(()=>xn,"getMarkdownTheme"),getPackageDir:e(()=>Xn,"getPackageDir"),getPowerShellConfig:e(()=>Pn,"getPowerShellConfig"),getProcessShellSandbox:e(()=>Xo,"getProcessShellSandbox"),getReadmePath:e(()=>Yn,"getReadmePath"),getSelectListTheme:e(()=>N,"getSelectListTheme"),getSettingsListTheme:e(()=>bn,"getSettingsListTheme"),getShellConfig:e(()=>yn,"getShellConfig"),getShellEnv:e(()=>Ln,"getShellEnv"),getToolDenial:e(()=>Yo,"getToolDenial"),gitDirOf:e(()=>x,"gitDirOf"),hasTrustRequiringProjectResources:e(()=>Sn,"hasTrustRequiringProjectResources"),highlightCode:e(()=>Bn,"highlightCode"),hookToolInput:e(()=>I,"hookToolInput"),hookToolName:e(()=>R,"hookToolName"),initTheme:e(()=>Un,"initTheme"),isAdaptablePackage:e(()=>qo,"isAdaptablePackage"),isBashToolResult:e(()=>Qo,"isBashToolResult"),isDalCodeCredentialName:e(()=>Fn,"isDalCodeCredentialName"),isDalHookActivity:e(()=>ge,"isDalHookActivity"),isEditToolResult:e(()=>Zo,"isEditToolResult"),isFatalExtensionError:e(()=>er,"isFatalExtensionError"),isFindToolResult:e(()=>tr,"isFindToolResult"),isGrepToolResult:e(()=>or,"isGrepToolResult"),isHostExtensionPath:e(()=>rr,"isHostExtensionPath"),isLsToolResult:e(()=>nr,"isLsToolResult"),isPowerShellToolResult:e(()=>ir,"isPowerShellToolResult"),isReadOnlyBashCommand:e(()=>sr,"isReadOnlyBashCommand"),isReadToolResult:e(()=>ar,"isReadToolResult"),isToolCallEventType:e(()=>lr,"isToolCallEventType"),isWriteToolResult:e(()=>ur,"isWriteToolResult"),keyHint:e(()=>jn,"keyHint"),keyText:e(()=>Kn,"keyText"),loadDalHooks:e(()=>re,"loadDalHooks"),loadMcpRuntime:e(()=>cr,"loadMcpRuntime"),loadProjectContextFiles:e(()=>dr,"loadProjectContextFiles"),loadSkills:e(()=>mr,"loadSkills"),loadSkillsFromDir:e(()=>pr,"loadSkillsFromDir"),main:e(()=>Er,"main"),markHostExtensionPaths:e(()=>Sr,"markHostExtensionPaths"),marketCacheDir:e(()=>gr,"marketCacheDir"),matchPermissionRules:e(()=>hr,"matchPermissionRules"),migrateSessionEntries:e(()=>fr,"migrateSessionEntries"),normalizeForFuzzyMatch:e(()=>Tr,"normalizeForFuzzyMatch"),openBrowser:e(()=>gn,"openBrowser"),parseArgs:e(()=>Cr,"parseArgs"),parseFrontmatter:e(()=>kr,"parseFrontmatter"),parseHostCapabilities:e(()=>_r,"parseHostCapabilities"),parsePermissionRule:e(()=>Dr,"parsePermissionRule"),parseSessionEntries:e(()=>Ar,"parseSessionEntries"),parseSkillBlock:e(()=>Rr,"parseSkillBlock"),prepareBranchEntries:e(()=>Pr,"prepareBranchEntries"),projectFileDeclaresHooks:e(()=>hn,"projectFileDeclaresHooks"),projectHooksFileFromEnv:e(()=>ne,"projectHooksFileFromEnv"),projectPackageManager:e(()=>yr,"projectPackageManager"),rawKeyHint:e(()=>Wn,"rawKeyHint"),readAccessDenial:e(()=>Lr,"readAccessDenial"),readAdaptation:e(()=>Fr,"readAdaptation"),readSignedSection:e(()=>Ir,"readSignedSection"),readStoredCredential:e(()=>Cn,"readStoredCredential"),readWorkspaceLock:e(()=>de,"readWorkspaceLock"),registerPermissionAskHandler:e(()=>Or,"registerPermissionAskHandler"),registerSandboxEscalationHandler:e(()=>Nr,"registerSandboxEscalationHandler"),registerShellExecutionGuard:e(()=>wr,"registerShellExecutionGuard"),releaseWorkspace:e(()=>Ee,"releaseWorkspace"),renderDiff:e(()=>vr,"renderDiff"),reportDalHookProblems:e(()=>z,"reportDalHookProblems"),resizeImage:e(()=>Mr,"resizeImage"),resolveCliModel:e(()=>Hr,"resolveCliModel"),resolveMarketEndpoint:e(()=>xr,"resolveMarketEndpoint"),resolveModelScopeWithDiagnostics:e(()=>br,"resolveModelScopeWithDiagnostics"),resolveSandboxPolicy:e(()=>Br,"resolveSandboxPolicy"),resolveToCwd:e(()=>Ur,"resolveToCwd"),runDalCommandHook:e(()=>W,"runDalCommandHook"),runDalHookEvent:e(()=>T,"runDalHookEvent"),runDalHooks:e(()=>G,"runDalHooks"),runNotificationHooks:e(()=>Z,"runNotificationHooks"),runPostToolUseHooks:e(()=>X,"runPostToolUseHooks"),runPreToolUseHooks:e(()=>J,"runPreToolUseHooks"),runPrintMode:e(()=>jr,"runPrintMode"),runRpcMode:e(()=>Kr,"runRpcMode"),runSessionStartHooks:e(()=>Y,"runSessionStartHooks"),runStopHooks:e(()=>Q,"runStopHooks"),runUserPromptSubmitHooks:e(()=>q,"runUserPromptSubmitHooks"),scanHardcodedPiPaths:e(()=>Wr,"scanHardcodedPiPaths"),selectDalHooks:e(()=>K,"selectDalHooks"),serializeConversation:e(()=>Gr,"serializeConversation"),sessionEntryToContextMessages:e(()=>$r,"sessionEntryToContextMessages"),shellCommandDirectory:e(()=>Se,"shellCommandDirectory"),shellExecutionRefusal:e(()=>Vr,"shellExecutionRefusal"),shouldCompact:e(()=>zr,"shouldCompact"),simpleCommands:e(()=>Jr,"simpleCommands"),stripFrontmatter:e(()=>Xr,"stripFrontmatter"),systemTempDirs:e(()=>Yr,"systemTempDirs"),toolMatchNames:e(()=>O,"toolMatchNames"),truncateHead:e(()=>In,"truncateHead"),truncateLine:e(()=>On,"truncateLine"),truncateTail:e(()=>Nn,"truncateTail"),truncateToVisualLines:e(()=>Tn,"truncateToVisualLines"),tryEnsurePackageAdapted:e(()=>qr,"tryEnsurePackageAdapted"),unwrapCommand:e(()=>Qr,"unwrapCommand"),verifyAdaptation:e(()=>Zr,"verifyAdaptation"),verifySignedSection:e(()=>en,"verifySignedSection"),withFileMutationQueue:e(()=>tn,"withFileMutationQueue"),withoutDalCodeCredentials:e(()=>ie,"withoutDalCodeCredentials"),workspaceLockIsLive:e(()=>F,"workspaceLockIsLive"),workspaceLockPath:e(()=>D,"workspaceLockPath"),workspaceOwnerSessionId:e(()=>b,"workspaceOwnerSessionId"),wrapRegisteredTool:e(()=>on,"wrapRegisteredTool"),wrapRegisteredTools:e(()=>rn,"wrapRegisteredTools")});import{execFileSync as Qn}from"node:child_process";import{createHash as Zn}from"node:crypto";import{mkdirSync as ei,readFileSync as ti,realpathSync as oi,renameSync as ri,rmSync as ni,writeFileSync as ii}from"node:fs";import{hostname as P}from"node:os";import{basename as w,isAbsolute as si,join as y,resolve as k}from"node:path";var v="workspace-locks",L="dal-workspace.lock";function M(){return y(le(),v)}e(M,"defaultWorkspaceLockDir");function D(o,t=M()){let r=k(o);try{r=oi.native(r)}catch{}let n=Zn("sha256").update(r).digest("hex").slice(0,16),a=w(r)===".git"?w(k(r,"..")):w(r);return y(t,`${a.replace(/[^\w.-]/g,"_").slice(0,40)||"repo"}-${n}.lock`)}e(D,"workspaceLockPath");var H=7200*1e3,ai=60*1e3,li="DALCODE_PARENT_SESSION_ID",ce=new Map;function x(o){let t=k(o),r=ce.get(t);if(r!==void 0)return r??void 0;let n=null;try{let a=Qn("git",["rev-parse","--git-dir","--show-toplevel"],{cwd:t,encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:3e3}).trim().split(`
2
- `),l=a[0]?.trim();l&&(n={gitDir:si(l)?l:k(t,l),worktree:a[1]?.trim()})}catch{n=null}return ce.set(t,n),n??void 0}e(x,"gitDirOf");function b(o,t=process.env){return t[li]||o}e(b,"workspaceOwnerSessionId");function A(o){try{let t=JSON.parse(ti(o,"utf8"));return typeof t.pid!="number"||typeof t.sessionId!="string"||typeof t.host!="string"?void 0:{pid:t.pid,host:t.host,sessionId:t.sessionId,startedAt:typeof t.startedAt=="string"?t.startedAt:new Date(0).toISOString(),refreshedAt:typeof t.refreshedAt=="string"?t.refreshedAt:new Date(0).toISOString(),...typeof t.worktree=="string"?{worktree:t.worktree}:{}}}catch{return}}e(A,"readLockFile");function de(o,t){return A(D(o,t))??A(y(o,L))}e(de,"readWorkspaceLock");function ui(o){try{return process.kill(o,0),!0}catch(t){return t.code==="EPERM"}}e(ui,"processAlive");function F(o,t=Date.now()){let r=Date.parse(o.refreshedAt);return!Number.isFinite(r)||t-r>H?!1:o.host===P()?ui(o.pid):!0}e(F,"workspaceLockIsLive");function me(o,t){ei(k(o,".."),{recursive:!0});let r=`${o}.${process.pid}.tmp`;ii(r,`${JSON.stringify(t,null,2)}
3
- `),ri(r,o)}e(me,"writeLock");function pe(o,t,r={}){let n=x(o);if(!n)return;let a=r.now??Date.now(),l=b(t,r.env),d=D(n.gitDir,r.lockDir),c=A(d),u={gitDir:n.gitDir,...n.worktree?{worktree:n.worktree}:{}},i=A(y(n.gitDir,L));for(let s of[c,i])if(s&&s.sessionId!==l&&F(s,a)&&!r.force)return{...u,heldBy:s};if(c?.sessionId===l&&F(c,a)){if(!(c.pid===process.pid&&c.host===P())||a-Date.parse(c.refreshedAt)<ai)return u;try{me(d,{...c,refreshedAt:new Date(a).toISOString()})}catch{}return u}try{me(d,{pid:process.pid,host:P(),sessionId:l,startedAt:new Date(a).toISOString(),refreshedAt:new Date(a).toISOString(),...n.worktree?{worktree:n.worktree}:{}})}catch{return}return u}e(pe,"claimWorkspace");function Ee(o,t){let r=D(o,t),n=A(r);if(!(!n||n.pid!==process.pid||n.host!==P()))try{ni(r,{force:!0})}catch{}}e(Ee,"releaseWorkspace");function Se(o,t){let r=t;for(let a of o.split(/&&|;|\n/)){let l=/^\s*cd\s+("([^"]+)"|'([^']+)'|(\S+))\s*$/.exec(a);if(!l)break;let d=(l[2]??l[3]??l[4]??"").replace(/^~(?=\/|$)/,process.env.HOME??"~");r=k(r,d)}let n=/\bgit\s+-C\s+("([^"]+)"|'([^']+)'|(\S+))/.exec(o);return n&&(r=k(r,n[2]??n[3]??n[4]??".")),r}e(Se,"shellCommandDirectory");var B="dal-hook";function h(o,t){return o.replace(/\{(\w+)\}/g,(r,n)=>String(t[n]??""))}e(h,"fill");function ci(o,t=300){let r=(o??"").replace(/\s+/g," ").trim();return r.length>t?`${r.slice(0,t-1)}\u2026`:r}e(ci,"oneLine");function U(o){let t={name:o.hookName??"",tool:o.toolName??"",event:o.event,detail:ci(o.detail),path:o.path??"",seconds:o.timeoutSeconds??""};switch(o.kind){case"blocked":return o.toolName?h(S("\u94A9\u5B50 {name} \u62E6\u622A\u4E86 {tool}\uFF1A{detail}"),t):h(S("\u94A9\u5B50 {name} \u62E6\u622A\u4E86\u8FD9\u6761\u6D88\u606F\uFF1A{detail}"),t);case"modified":return h(S("\u94A9\u5B50 {name} \u4FEE\u6539\u4E86 {tool} \u7684\u8F93\u5165"),t);case"context":return h(S("\u94A9\u5B50 {name} \u4E3A {event} \u8865\u5145\u4E86\u4E0A\u4E0B\u6587"),t);case"message":return h(S("\u94A9\u5B50 {name}\uFF1A{detail}"),t);case"stop-ignored":return h(S("\u94A9\u5B50 {name} \u8981\u6C42\u7EE7\u7EED\u5DE5\u4F5C\uFF0C\u4F46 Stop \u94A9\u5B50\u4E0D\u80FD\u8BA9\u56DE\u5408\u7EED\u8DD1\uFF0C\u5DF2\u5FFD\u7565\uFF1A{detail}"),t);case"failed":return h(S("\u94A9\u5B50 {name}\uFF08{event}\uFF09\u8FD0\u884C\u5931\u8D25\uFF0C\u5DF2\u7EE7\u7EED\uFF1A{detail}"),t);case"timeout":return h(S("\u94A9\u5B50 {name}\uFF08{event}\uFF09\u8D85\u8FC7 {seconds} \u79D2\u672A\u7ED3\u675F\uFF0C\u5DF2\u7EC8\u6B62\u5E76\u7EE7\u7EED"),t);case"config":return h(S("\u94A9\u5B50\u914D\u7F6E\u6709\u8BEF\uFF08{path}\uFF09\uFF1A{detail}"),t)}}e(U,"formatDalHookActivity");var di=new Set(["stop-ignored","failed","timeout","config"]);function g(o){return{...o,text:U(o),level:di.has(o.kind)?"warning":"info"}}e(g,"dalHookActivity");function ge(o){if(typeof o!="object"||o===null)return!1;let t=o;return typeof t.kind=="string"&&typeof t.event=="string"&&typeof t.text=="string"}e(ge,"isDalHookActivity");import{spawn as he}from"node:child_process";var fe=64*1024,mi={bash:"Bash",powershell:"PowerShell",read:"Read",write:"Write",edit:"Edit",grep:"Grep",find:"Glob",ls:"LS",task:"Task"},Te=new Set(["read","write","edit"]);function R(o){return mi[o]??o}e(R,"hookToolName");function I(o,t){return Te.has(o)&&typeof t.path=="string"&&t.file_path===void 0?{...t,file_path:t.path}:{...t}}e(I,"hookToolInput");function j(o,t){if(!Te.has(o)||!("file_path"in t))return{...t};let{file_path:r,...n}=t;return typeof r=="string"?{...n,path:r}:n}e(j,"engineToolInput");function pi(o,t){if(/^[A-Za-z0-9_|-]+$/.test(o)){let n=o.split("|").filter(Boolean);return t.some(a=>n.includes(a))}let r;try{r=new RegExp(`^(?:${o})$`)}catch{return!1}return t.some(n=>r.test(n))}e(pi,"matcherAccepts");function K(o,t,r){return o.filter(n=>n.event!==t?!1:n.matcher===void 0||r===void 0?!0:pi(n.matcher,r))}e(K,"selectDalHooks");function O(o){return[o,R(o)]}e(O,"toolMatchNames");function Ce(o){if(o!==void 0)try{process.platform==="win32"?he("taskkill",["/pid",String(o),"/t","/f"],{stdio:"ignore"}):process.kill(-o,"SIGKILL")}catch{}}e(Ce,"killTree");function Ei(o){let t=o.trim();if(t.startsWith("{"))try{let r=JSON.parse(t);return typeof r=="object"&&r!==null&&!Array.isArray(r)?r:void 0}catch{return}}e(Ei,"parseJsonObject");function W(o,t,r){let n=Date.now();return new Promise(a=>{let l="",d="",c=!1,u=!1,i=he(o.command,{cwd:r.cwd,shell:!0,detached:process.platform!=="win32",stdio:["pipe","pipe","pipe"],env:{...ie(process.env),...r.env,DAL_PROJECT_DIR:r.cwd,CLAUDE_PROJECT_DIR:r.cwd}}),s=e(m=>{c||(c=!0,clearTimeout(p),r.signal?.removeEventListener("abort",E),a({hook:o,stdout:l,stderr:d,durationMs:Date.now()-n,...m}))},"finish"),p=setTimeout(()=>{u=!0,Ce(i.pid)},o.timeoutSeconds*1e3),E=e(()=>Ce(i.pid),"onAbort");r.signal?.addEventListener("abort",E,{once:!0}),i.stdout.setEncoding("utf8"),i.stderr.setEncoding("utf8"),i.stdout.on("data",m=>{l.length<fe&&(l+=m)}),i.stderr.on("data",m=>{d.length<fe&&(d+=m)}),i.stdin.on("error",()=>{}),i.stdin.end(JSON.stringify(t)),i.on("error",m=>{s({status:"failed",exitCode:null,error:m.message})}),i.on("close",m=>{if(u){s({status:"timeout",exitCode:m,error:`timed out after ${o.timeoutSeconds}s`});return}if(r.signal?.aborted){s({status:"failed",exitCode:m,error:"cancelled"});return}if(m===2){s({status:"blocked",exitCode:m});return}if(m!==0){s({status:"failed",exitCode:m,error:`exited with code ${m}`});return}let C=Ei(l);s({status:"success",exitCode:0,...C?{output:C}:{}})})})}e(W,"runDalCommandHook");function G(o,t,r){return Promise.all(o.map(n=>W(n,t,r)))}e(G,"runDalHooks");function _(o,t){let r=o?.[t];return typeof r=="string"&&r.trim()!==""?r:void 0}e(_,"stringField");var Si=new Set(["SessionStart","UserPromptSubmit"]);function $(o,t){let r,n,a,l=[],d=[],c=[];for(let u of t){if(u.status==="failed"||u.status==="timeout"){c.push(u);continue}if(u.status==="blocked"){r??={hook:u.hook,reason:u.stderr.trim()||`hook ${u.hook.name} blocked (exit 2)`};continue}let i=u.output;if(!i){Si.has(o)&&u.stdout.trim()!==""&&l.push({hook:u.hook,text:u.stdout.trim()});continue}let s=typeof i.hookSpecificOutput=="object"&&i.hookSpecificOutput!==null?i.hookSpecificOutput:void 0,p=_(s,"permissionDecisionReason")??_(i,"reason");i.continue===!1&&(n??={hook:u.hook,reason:_(i,"stopReason")??p??u.hook.name}),(_(s,"permissionDecision")==="deny"||i.decision==="block")&&(r??={hook:u.hook,reason:p??`hook ${u.hook.name} blocked`});let E=s?.updatedInput;typeof E=="object"&&E!==null&&!Array.isArray(E)&&(a={hook:u.hook,input:E});let m=_(s,"additionalContext");m&&l.push({hook:u.hook,text:m});let C=_(i,"systemMessage");C&&d.push({hook:u.hook,text:C})}return{...r?{blocked:r}:{},...n?{stop:n}:{},...a?{updatedInput:a}:{},additionalContext:l,systemMessages:d,failures:c}}e($,"decideDalHooks");function V(o,t,r={}){return{session_id:t.sessionId,transcript_path:t.transcriptPath??"",cwd:t.cwd,...t.permissionMode?{permission_mode:t.permissionMode}:{},...t.agentId?{agent_id:t.agentId}:{},...t.agentType?{agent_type:t.agentType}:{},hook_event_name:o,...r}}e(V,"buildDalHookInput");function f(o){return{hookName:o.name,scope:o.scope}}e(f,"scopeOf");function gi(o,t,r){for(let n of t.failures)r(g({kind:n.status==="timeout"?"timeout":"failed",event:o,...f(n.hook),detail:hi(n),timeoutSeconds:n.hook.timeoutSeconds}));for(let n of t.systemMessages)r(g({kind:"message",event:o,...f(n.hook),detail:n.text}))}e(gi,"reportCommon");function hi(o){let t=o.stderr.trim();return t?`${o.error??""} ${t}`.trim():o.error??""}e(hi,"failureDetail");function z(o,t){for(let r of o.problems)t(g({kind:"config",event:r.event??"",path:r.path,detail:r.message}))}e(z,"reportDalHookProblems");async function T(o,t,r,n){let a=K(o.config.hooks,t,n);if(a.length===0)return;let l=await G(a,V(t,o.base,r),{cwd:o.base.cwd,...o.signal?{signal:o.signal}:{}}),d=$(t,l);return gi(t,d,o.report),d}e(T,"runDalHookEvent");async function J(o,t){let r=await T(o,"PreToolUse",{tool_name:R(t.toolName),tool_input:I(t.toolName,t.input),tool_use_id:t.toolCallId},O(t.toolName));if(!r)return{};let n=r.stop??r.blocked;return n?(o.report(g({kind:"blocked",event:"PreToolUse",...f(n.hook),toolName:t.toolName,detail:n.reason})),{blockReason:`[hook ${n.hook.name}] ${n.reason}`,...r.stop?{stop:!0}:{}}):r.updatedInput?(o.report(g({kind:"modified",event:"PreToolUse",...f(r.updatedInput.hook),toolName:t.toolName})),{input:j(t.toolName,r.updatedInput.input)}):{}}e(J,"runPreToolUseHooks");async function X(o,t){let r=t.isError?"PostToolUseFailure":"PostToolUse",n=await T(o,r,{tool_name:R(t.toolName),tool_input:I(t.toolName,t.input),tool_use_id:t.toolCallId,...t.isError?{error:t.output}:{tool_response:{content:t.output,...t.details!==void 0?{details:t.details}:{}}}},O(t.toolName));if(!n)return{};let a=[],l=n.stop??n.blocked;l&&(o.report(g({kind:"blocked",event:r,...f(l.hook),toolName:t.toolName,detail:l.reason})),a.push(`[hook ${l.hook.name}] ${l.reason}`));for(let d of n.additionalContext)o.report(g({kind:"context",event:r,...f(d.hook),toolName:t.toolName})),a.push(`[hook ${d.hook.name}] ${d.text}`);return a.length>0?{appendText:a.join(`
4
- `)}:{}}e(X,"runPostToolUseHooks");async function Y(o,t){let r=await T(o,"SessionStart",{source:t},[t]);return ke("SessionStart",r,o.report)}e(Y,"runSessionStartHooks");function ke(o,t,r){if(!(!t||t.additionalContext.length===0)){for(let n of t.additionalContext)r(g({kind:"context",event:o,...f(n.hook)}));return t.additionalContext.map(n=>n.text).join(`
5
-
6
- `)}}e(ke,"contextOf");async function q(o,t){let r=await T(o,"UserPromptSubmit",{prompt:t});if(!r)return{};let n=r.stop??r.blocked;if(n)return o.report(g({kind:"blocked",event:"UserPromptSubmit",...f(n.hook),detail:n.reason})),{blockReason:n.reason};let a=ke("UserPromptSubmit",r,o.report);return a?{additionalContext:a}:{}}e(q,"runUserPromptSubmitHooks");async function Q(o){let t=await T(o,"Stop",{stop_hook_active:!1}),r=t?.blocked??t?.stop;r&&o.report(g({kind:"stop-ignored",event:"Stop",...f(r.hook),detail:r.reason}))}e(Q,"runStopHooks");async function Z(o,t){await T(o,"Notification",{message:t.message,notification_type:t.type},[t.type])}e(Z,"runNotificationHooks");var _e="dal-hook-context",ee="dal:hook-notification";function De(o=process.env){return o.DALCODE_BRIDGE_URL?!1:Number.parseInt(o.DAL_SUBAGENT_DEPTH??"0",10)<=0}e(De,"runsPromptHooksHere");function fi(o){if(typeof o!="object"||o===null)return!1;let{type:t,message:r}=o;return typeof t=="string"&&typeof r=="string"}e(fi,"isNotification");function Ti(o){return o.filter(t=>t.type==="text"&&typeof t.text=="string").map(t=>t.text).join(`
7
- `)}e(Ti,"textOf");function Ae(o){let t,r="",n,a,l=e(i=>{n=n?`${n}
8
-
9
- ${i}`:i},"queueContext"),d=e(i=>s=>{o.appendEntry(B,s),i.hasUI&&i.ui.notify(s.text,s.level)},"report"),c=e(i=>{t=re({cwd:i.cwd,projectTrusted:i.isProjectTrusted(),projectHooksFile:ne()});let s=JSON.stringify(t.problems);return s!==r&&(r=s,z(t,d(i))),t},"refresh"),u=e((i,s)=>({config:s,base:{sessionId:i.sessionManager.getSessionId(),transcriptPath:i.sessionManager.getSessionFile()??"",cwd:i.cwd},report:d(i),...i.signal?{signal:i.signal}:{}}),"callContext");o.on("session_start",async(i,s)=>{a=s;let p=c(s),E=await Y(u(s,p),i.reason);E&&l(E)}),o.on("input",async(i,s)=>{if(i.source==="extension"||!De())return;a=s;let p=await q(u(s,c(s)),i.text);if(p.blockReason!==void 0)return{action:"handled"};p.additionalContext&&(i.streamingBehavior?o.sendMessage({customType:_e,content:p.additionalContext,display:!1},{deliverAs:i.streamingBehavior}):l(p.additionalContext))}),o.events.on(ee,async i=>{let s=a;!s||!fi(i)||!De()||await Z(u(s,t??c(s)),i)}),o.on("before_agent_start",async(i,s)=>{if(c(s),!n)return;let p=n;return n=void 0,{message:{customType:_e,content:p,display:!1}}}),o.on("tool_call",async(i,s)=>{a=s;let p=t??c(s),E=await J(u(s,p),{toolName:i.toolName,toolCallId:i.toolCallId,input:i.input});if(E.blockReason!==void 0)return{block:!0,reason:E.blockReason,...E.stop?{terminate:!0}:{}};if(E.input){let m=i.input;for(let C of Object.keys(m))delete m[C];Object.assign(m,E.input)}}),o.on("tool_result",async(i,s)=>{let p=t??c(s),{appendText:E}=await X(u(s,p),{toolName:i.toolName,toolCallId:i.toolCallId,input:i.input,output:Ti(i.content),isError:i.isError,details:i.details});if(E)return{content:[...i.content,{type:"text",text:E}]}}),o.on("agent_end",async(i,s)=>{let p=t??c(s);await Q(u(s,p))})}e(Ae,"dalHooksExtension");var Ci={minPrimaryColumnWidth:12,maxPrimaryColumnWidth:32},Re=class extends se{static{e(this,"ShowImagesSelectorComponent")}selectList;constructor(o,t,r){super();let n=[{value:"yes",label:S("\u662F"),description:S("\u5728\u7EC8\u7AEF\u91CC\u76F4\u63A5\u663E\u793A\u56FE\u7247")},{value:"no",label:S("\u5426"),description:S("\u6539\u4E3A\u663E\u793A\u6587\u5B57\u5360\u4F4D")}];this.addChild(oe(S("\u56FE\u7247\u663E\u793A"))),this.selectList=new ae(n,5,N(),Ci),this.selectList.setSelectedIndex(o?0:1),this.selectList.onSelect=a=>{t(a.value==="yes")},this.selectList.onCancel=()=>{r()},this.addChild(this.selectList),this.addChild(te())}getSelectList(){return this.selectList}},ki={minPrimaryColumnWidth:12,maxPrimaryColumnWidth:32},Pe=class extends se{static{e(this,"ThemeSelectorComponent")}selectList;onPreview;constructor(o,t,r,n){super(),this.onPreview=n;let a=Mn(),l=a.map(c=>({value:c,label:c,description:c===o?S("(\u5F53\u524D)"):void 0}));this.addChild(oe(S("\u9009\u62E9\u4E3B\u9898"))),this.selectList=new ae(l,10,N(),ki);let d=a.indexOf(o);d!==-1&&this.selectList.setSelectedIndex(d),this.selectList.onSelect=c=>{t(c.value)},this.selectList.onCancel=()=>{r()},this.selectList.onSelectionChange=c=>{this.onPreview(c.value)},this.addChild(this.selectList),this.addChild(te())}getSelectList(){return this.selectList}};export{B as DAL_HOOK_ENTRY_TYPE,ee as DAL_HOOK_NOTIFICATION_CHANNEL,H as STALE_AFTER_MS,Re as ShowImagesSelectorComponent,Pe as ThemeSelectorComponent,v as WORKSPACE_LOCK_DIR_NAME,L as WORKSPACE_LOCK_FILE,V as buildDalHookInput,pe as claimWorkspace,g as dalHookActivity,Ae as dalHooksExtension,$ as decideDalHooks,M as defaultWorkspaceLockDir,ue as dist_exports,j as engineToolInput,U as formatDalHookActivity,x as gitDirOf,I as hookToolInput,R as hookToolName,ge as isDalHookActivity,de as readWorkspaceLock,Ee as releaseWorkspace,z as reportDalHookProblems,W as runDalCommandHook,T as runDalHookEvent,G as runDalHooks,Z as runNotificationHooks,X as runPostToolUseHooks,J as runPreToolUseHooks,Y as runSessionStartHooks,Q as runStopHooks,q as runUserPromptSubmitHooks,K as selectDalHooks,Se as shellCommandDirectory,O as toolMatchNames,F as workspaceLockIsLive,D as workspaceLockPath,b as workspaceOwnerSessionId};
@@ -1 +0,0 @@
1
- import{createRequire as r}from"node:module";const u=r(import.meta.url);import{McpOAuthAuthorizationRequiredError as e,McpOAuthCredentialStore as t,McpServerConnection as o,McpServerLog as i,McpSignInCancelledError as p,createDefaultTransport as c,createMcpAuthProvider as m,signInMcpServer as n}from"./chunk-P4IBZA6D.js";import"./chunk-MKMLENQD.js";import"./chunk-SE42OS3U.js";import"./chunk-R47JBGS3.js";import"./chunk-XJFQKN3N.js";import"./chunk-SZZVJTVX.js";import"./chunk-JXWJOIH4.js";export{e as McpOAuthAuthorizationRequiredError,t as McpOAuthCredentialStore,o as McpServerConnection,i as McpServerLog,p as McpSignInCancelledError,c as createDefaultTransport,m as createMcpAuthProvider,n as signInMcpServer};
@@ -1 +0,0 @@
1
- var m=Object.defineProperty;var t=(r,o)=>m(r,"name",{value:o,configurable:!0});import{createRequire as a}from"node:module";const Z=a(import.meta.url);import{BUILTIN_AGENT_DESCRIPTIONS as i,READ_ONLY_TOOL_NAMES as p}from"./chunk-Z64M4Q7A.js";import"./chunk-UULAEZ3H.js";import{DAL_HOOK_ENTRY_TYPE as n,dalHookActivity as s,isDalHookActivity as l,runDalHookEvent as E,runNotificationHooks as _,runUserPromptSubmitHooks as N}from"./chunk-XTN2LDU3.js";import{BUNDLED_EXTENSION_PACKAGES as O,DAL_TOOL_NAMES as A,DefaultPackageManager as S,HOST_CAPABILITIES_ENV as T,HOST_TOKEN_ENV as I,HOST_TOKEN_HEADER as c,HOST_URL_ENV as u,RpcClient as D,RpcCommandError as R,SessionManager as L,SettingsManager as d,buildProjectMap as P,formatProjectMapPrompt as H,getDefaultSessionDirs as f,listBundledExtensions as C,listToolCatalog as g,loadProjectContextFiles as k,loadSkills as M,parseFrontmatter as v,parseSessionEntries as B,toolDisplayLabel as w}from"./chunk-RX6CC5RH.js";import{ModelRuntime as y,PROJECT_HOOKS_FILE_ENV as F,loadDalHooks as K,projectHooksFileFromEnv as V}from"./chunk-T3TEURLR.js";import"./chunk-3HGUIN22.js";import"./chunk-3YGHTGYM.js";import"./chunk-MKMLENQD.js";import"./chunk-SE42OS3U.js";import"./chunk-F5SIUTR7.js";import"./chunk-AL3DFAIM.js";import"./chunk-6QGV3IWD.js";import{CONFIG_DIR_NAME as b,SHARED_SKILL_CONFIG_DIRS as x,VERSION as Y,getAgentDir as j,getExamplesPath as G}from"./chunk-R47JBGS3.js";import"./chunk-XJFQKN3N.js";import{getLanguage as U,translate as e}from"./chunk-SZZVJTVX.js";import"./chunk-IEBK4HQA.js";import"./chunk-5AGIVGSV.js";import"./chunk-723ZGEZ2.js";import"./chunk-ZG74NES2.js";import"./chunk-TMTOQ7H7.js";import"./chunk-7DDKXS2Q.js";import"./chunk-FFMDRXC4.js";import"./chunk-BIY5HTFI.js";import"./chunk-4LDEEFCY.js";import"./chunk-F37JXTCY.js";import"./chunk-JXWJOIH4.js";var q=/(?<![\w@./\\~-])(?:pi|Pi)(?![\w/-]|\.\w)/g;function h(r){return r.replace(q,"DAL")}t(h,"brandText");var J="terminal",X=1;function z(r=U()){let o=[...p];return[{name:"scout",description:e(i.scout,r),tools:o,readOnly:!0},{name:"worker",description:e(i.worker,r),readOnly:!1},{name:"reviewer",description:e(i.reviewer,r),tools:o,readOnly:!0}]}t(z,"listBuiltinSubagents");export{O as BUNDLED_EXTENSION_PACKAGES,b as CONFIG_DIR_NAME,n as DAL_HOOK_ENTRY_TYPE,A as DAL_TOOL_NAMES,S as DefaultPackageManager,T as HOST_CAPABILITIES_ENV,I as HOST_TOKEN_ENV,c as HOST_TOKEN_HEADER,u as HOST_URL_ENV,y as ModelRuntime,F as PROJECT_HOOKS_FILE_ENV,D as RpcClient,R as RpcCommandError,x as SHARED_SKILL_CONFIG_DIRS,L as SessionManager,d as SettingsManager,J as TERMINAL_CAPABILITY,X as TERMINAL_CAPABILITY_VERSION,Y as VERSION,h as brandText,P as buildProjectMap,s as dalHookActivity,H as formatProjectMapPrompt,j as getAgentDir,f as getDefaultSessionDirs,G as getExamplesPath,l as isDalHookActivity,z as listBuiltinSubagents,C as listBundledExtensions,g as listToolCatalog,K as loadDalHooks,k as loadProjectContextFiles,M as loadSkills,v as parseFrontmatter,B as parseSessionEntries,V as projectHooksFileFromEnv,E as runDalHookEvent,_ as runNotificationHooks,N as runUserPromptSubmitHooks,w as toolDisplayLabel};
@@ -1 +0,0 @@
1
- var k=Object.defineProperty;var i=(e,t)=>k(e,"name",{value:t,configurable:!0});import{createRequire as v}from"node:module";const pe=v(import.meta.url);import"./chunk-XTN2LDU3.js";import"./chunk-RX6CC5RH.js";import"./chunk-T3TEURLR.js";import"./chunk-3HGUIN22.js";import"./chunk-3YGHTGYM.js";import"./chunk-MKMLENQD.js";import"./chunk-SE42OS3U.js";import"./chunk-F5SIUTR7.js";import"./chunk-AL3DFAIM.js";import"./chunk-6QGV3IWD.js";import{getAgentDir as F}from"./chunk-R47JBGS3.js";import"./chunk-XJFQKN3N.js";import{declaredDataFormat as B,reportNewerDataFormat as C,t as U,writeFileAtomicSync as L}from"./chunk-SZZVJTVX.js";import"./chunk-IEBK4HQA.js";import"./chunk-5AGIVGSV.js";import"./chunk-723ZGEZ2.js";import"./chunk-ZG74NES2.js";import"./chunk-TMTOQ7H7.js";import"./chunk-7DDKXS2Q.js";import"./chunk-FFMDRXC4.js";import"./chunk-BIY5HTFI.js";import"./chunk-4LDEEFCY.js";import"./chunk-F37JXTCY.js";import"./chunk-JXWJOIH4.js";import{readdir as W,readFile as I,stat as x}from"node:fs/promises";import{homedir as z}from"node:os";import{join as E}from"node:path";var P="sessions",V="usage-cache.json",w=1,T="dal-tool-repair",H=10,q=['"role":"assistant"','"type":"session"','"type":"usage"','"type":"compaction"','"type":"branch_summary"',`"customType":"${T}"`].flatMap(e=>[Buffer.from(e),Buffer.from(e.replace(":",": "))]),G=[Buffer.from('"role":"toolResult"'),Buffer.from('"role": "toolResult"')],J=[Buffer.from('"usage":{'),Buffer.from('"usage": {')],D=i((e,t)=>t.some(r=>e.includes(r)),"includesAny");function Y(e){let t=e.length>1024?e.subarray(0,1024):e;if(D(t,q))return!0;if(!D(t,G))return!1;let r=e.length>4096?e.subarray(e.length-4096):e;return D(r,J)}i(Y,"mightCarryUsage");var g=i(e=>typeof e=="number"&&Number.isFinite(e)?e:0,"finite");function A(e){if(!e||typeof e!="object")return;let t=e,r=t.cost,a={input:g(t.input),output:g(t.output),cacheRead:g(t.cacheRead),cacheWrite:g(t.cacheWrite),cost:typeof r=="number"?g(r):r&&typeof r=="object"?g(r.total):0};return a.cost===0&&a.input+a.output+a.cacheRead+a.cacheWrite===0?void 0:a}i(A,"amountOf");function S(...e){for(let t of e){let r=typeof t=="number"?t:Date.parse(String(t??""));if(Number.isFinite(r)&&r>0)return r}return 0}i(S,"timeOf");var j=i(e=>`${e.input}:${e.output}:${e.cacheRead}:${e.cacheWrite}`,"fingerprint");function K(e){let t={sessionId:"",cwd:"",records:[],toolRepairs:[]},r=i((n,d,o,f,s)=>{let p=n==="model"&&!s?`${d}:${f}:${j(o)}`:`${n}:${s}:${f}:${j(o)}`;t.records.push({source:n,label:d,timestamp:f,key:p,...o})},"add"),a=0;for(;a<e.length;){let n=e.indexOf(H,a);n===-1&&(n=e.length);let d=e.subarray(a,n);if(a=n+1,d.length===0||!Y(d))continue;let o;try{o=JSON.parse(d.toString("utf8"))}catch{continue}let f=typeof o.id=="string"?o.id:"";if(o.type==="session"){typeof o.id=="string"&&(t.sessionId=o.id),typeof o.cwd=="string"&&(t.cwd=o.cwd);continue}if(o.type==="usage"){let u=A(o.usage);u&&o.provider&&o.model&&r("model",`${o.provider}/${o.model}`,u,S(o.timestamp),f);continue}if(o.type==="custom"&&o.customType===T){let u=Array.isArray(o.data?.repairs)?o.data.repairs.length:0;u>0&&t.toolRepairs?.push({timestamp:S(o.timestamp),key:f,count:u});continue}if(o.type==="compaction"||o.type==="branch_summary"){let u=A(o.usage);u&&r("housekeeping","",u,S(o.timestamp),f);continue}let s=o.message;if(o.type!=="message"||!s)continue;let p=A(s.usage);if(!p)continue;let y=S(s.timestamp,o.timestamp);if(s.role==="assistant"&&s.provider&&s.model)r("model",`${s.provider}/${s.model}`,p,y,"");else if(s.role==="toolResult"){let u=s.toolName??"";r(u==="task"?"subagents":"tools",u,p,y,f)}}return t}i(K,"parseSessionBuffer");async function O(e,t=[]){let r;try{r=await W(e,{withFileTypes:!0})}catch{return t}for(let a of r){let n=E(e,a.name);a.isDirectory()?await O(n,t):a.isFile()&&a.name.endsWith(".jsonl")&&t.push(n)}return t}i(O,"sessionFiles");async function Q(e){try{let t=JSON.parse(await I(e,"utf8"));if(B(t)>w)return C(e),{doc:{formatVersion:w,files:{}},writable:!1};let r=t.files;if(r&&typeof r=="object")return{doc:{formatVersion:w,files:r},writable:!0}}catch{}return{doc:{formatVersion:w,files:{}},writable:!0}}i(Q,"readCache");async function X(e){let t=E(e,V),{doc:r,writable:a}=await Q(t),n={},d=!1,o=(await O(E(e,P))).sort(),f=[];for(let s of o){let p;try{p=await x(s)}catch{continue}let y=r.files[s];if(y&&y.size===p.size&&y.mtimeMs===p.mtimeMs&&y.parsed)n[s]=y;else{let u;try{u=await I(s)}catch{continue}n[s]={size:p.size,mtimeMs:p.mtimeMs,parsed:K(u)},d=!0}f.push(n[s].parsed)}if(Object.keys(r.files).length!==Object.keys(n).length&&(d=!0),a&&d)try{L(t,JSON.stringify({formatVersion:w,files:n}))}catch{}return f}i(X,"loadSessions");function Z(e){if(!e)return"?";let t=z(),r;e===t||e.startsWith(`${t}/`)?r=t:r=/^(\/Users\/[^/]+|\/home\/[^/]+)(?=\/|$)/.exec(e)?.[1];let a=(r===void 0?e:e.slice(r.length)).split(/[\\/]/).filter(Boolean).slice(0,2);return r===void 0?`/${a.join("/")}`:a.length>0?`~/${a.join("/")}`:"~"}i(Z,"projectLabel");function ee(e){let t=e.trim().toLowerCase();if(t==="")return{kind:"days",days:30,label:"30d"};if(t==="today")return{kind:"today",label:"today"};if(t==="all")return{kind:"all",label:"all"};let r=/^(\d{1,4})d$/.exec(t);if(r){let a=Number(r[1]);if(a>=1)return{kind:"days",days:a,label:`${a}d`}}}i(ee,"parseUsageRange");var _=i(()=>({input:0,output:0,cacheRead:0,cacheWrite:0,cost:0}),"empty");function M(e,t){e.input+=t.input,e.output+=t.output,e.cacheRead+=t.cacheRead,e.cacheWrite+=t.cacheWrite,e.cost+=t.cost}i(M,"addInto");function te(e){let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}i(te,"startOfLocalDay");function re(e){let t=new Date(e),r=i(a=>String(a).padStart(2,"0"),"pad");return`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}`}i(re,"dayKey");function oe(e,t){if(e.kind==="all")return Number.NEGATIVE_INFINITY;let r=te(t);if(e.kind==="today")return r;let a=new Date(r);return a.setDate(a.getDate()-(e.days-1)),a.getTime()}i(oe,"rangeStart");function ae(e){return e.source==="model"?e.label:e.source}i(ae,"modelKey");var ie={subagents:"\u5B50\u52A9\u624B",tools:"\u5DE5\u5177",housekeeping:"\u4E0A\u4E0B\u6587\u6574\u7406"};function se(e,t,r){let a=oe(t,r),n=new Set,d=_(),o={day:new Map,model:new Map,project:new Map},f={day:new Map,model:new Map,project:new Map},s=new Set,p=i((l,c,m,$,R)=>{let h=o[l].get(c);h||(h={key:c,label:m,sessions:0,..._()},o[l].set(c,h)),M(h,R);let b=f[l].get(c);b||(b=new Set,f[l].set(c,b)),b.add($),h.sessions=b.size},"bump");for(let l of e){if(!l.sessionId)continue;let c=Z(l.cwd);for(let m of l.records){if(m.timestamp<a||m.timestamp>r||n.has(m.key))continue;n.add(m.key),M(d,m),s.add(l.sessionId);let $=ae(m),R=re(m.timestamp);p("day",R,R,l.sessionId,m),p("model",$,m.source==="model"?m.label:U(ie[m.source]),l.sessionId,m),p("project",c,c,l.sessionId,m)}}let y=0,u=new Set;for(let l of e)for(let c of l.toolRepairs??[])c.timestamp<a||c.timestamp>r||u.has(c.key)||(u.add(c.key),y+=c.count);let N=i((l,c)=>c.cost-l.cost||l.label.localeCompare(c.label),"byCost");return{range:t,sessions:s.size,total:d,byDay:[...o.day.values()].sort((l,c)=>c.key.localeCompare(l.key)),byModel:[...o.model.values()].sort(N),byProject:[...o.project.values()].sort(N),toolRepairs:y}}i(se,"buildReport");async function ne(e){let t=await X(e.agentDir??F());return se(t,e.range,e.now??Date.now())}i(ne,"collectUsage");async function le(e){let t=ee(e.range);if(!t)throw new Error(`Unknown usage range: ${String(e.range)}`);return ne({range:t,...e.agentDir?{agentDir:e.agentDir}:{}})}i(le,"collectUsage2");export{le as collectUsage};
@@ -1 +0,0 @@
1
- var c=Object.defineProperty;var e=(r,t)=>c(r,"name",{value:t,configurable:!0});import{createRequire as u}from"node:module";const Tr=u(import.meta.url);import{dist_exports as i}from"./chunk-XTN2LDU3.js";import{DAL_ENGINE_PACKAGE_NAMES as n,dist_exports as p}from"./chunk-RX6CC5RH.js";import{CACHE_WARMING_IDLE_CONTINUATION_PROBABILITY as M,CACHE_WARMING_MAX_AGE_MS as S,CACHE_WARMING_MAX_IDLE_AGE_MS as v,CACHE_WARMING_MINIMUM_EXPECTED_SAVINGS as R,all_exports as l,anthropicMessagesApi as N,azureOpenAIResponsesApi as O,bedrockConverseStreamApi as P,compile_exports as m,complete as y,completeSimple as h,createFauxCore as x,envApiKeyAuth as f,evaluateCacheWarming as D,fauxAssistantMessage as H,fauxProvider as V,fauxText as G,fauxThinking as L,fauxToolCall as k,generateImages as w,generateImagesOpenRouter as b,getApiProvider as U,getApiProviders as z,getCacheWarmingDelayMs as K,getCacheWarmingRequestOptions as W,getImageModel as B,getImageModels as F,getImageProviders as Y,getImagesApiProvider as q,getModel as J,getModels as X,getOverflowPatterns as j,getPromptCacheTtlMs as Z,getProviders as $,googleGenerativeAIApi as Q,googleVertexApi as ee,isCacheWarmingReplayable as te,isContextOverflow as re,isRecoverableLength as se,lazyOAuth as ie,mistralConversationsApi as oe,openAICodexResponsesApi as ae,openAICompletionsApi as ne,openAIResponsesApi as pe,piMessagesApi as le,registerApiProvider as me,registerBuiltInApiProviders as Ae,registerBuiltInImagesApiProviders as ge,registerFauxProvider as de,registerImagesApiProvider as Ie,resetApiProviders as _e,setBedrockProviderLoader as Te,setBedrockProviderModule as Ce,stream as Ee,streamAnthropic as ce,streamAzureOpenAIResponses as ue,streamGoogle as Me,streamGoogleVertex as Se,streamMistral as ve,streamOpenAICodexResponses as Re,streamOpenAICompletions as Ne,streamOpenAIResponses as Oe,streamSimple as Pe,streamSimpleAnthropic as ye,streamSimpleAzureOpenAIResponses as he,streamSimpleGoogle as xe,streamSimpleGoogleVertex as fe,streamSimpleMistral as De,streamSimpleOpenAICodexResponses as He,streamSimpleOpenAICompletions as Ve,streamSimpleOpenAIResponses as Ge,unregisterApiProviders as Le,validateToolArguments as ke,validateToolCall as we,value_exports as A}from"./chunk-T3TEURLR.js";import"./chunk-3HGUIN22.js";import{DEFAULT_MAX_AGENT_RETRY_DELAY_MS as be,build_exports as g,isAccountLimitAssistantError as Ue,isNetworkAssistantError as ze,isRetryableAssistantError as Ke,retryAssistantCall as We,retryDelayMs as Be,typebox_exports as d}from"./chunk-3YGHTGYM.js";import"./chunk-MKMLENQD.js";import"./chunk-SE42OS3U.js";import"./chunk-F5SIUTR7.js";import{dist_exports as I}from"./chunk-AL3DFAIM.js";import"./chunk-6QGV3IWD.js";import"./chunk-R47JBGS3.js";import"./chunk-XJFQKN3N.js";import"./chunk-SZZVJTVX.js";import{uuidv7 as Fe}from"./chunk-IEBK4HQA.js";import"./chunk-5AGIVGSV.js";import{ANTHROPIC_API_KEY_ENV as Ye,ANTHROPIC_AUTH_TOKEN_ENV as qe,ANTHROPIC_FEDERATION_RULE_ID_ENV as Je,ANTHROPIC_IDENTITY_TOKEN_FILE_ENV as Xe,ANTHROPIC_OAUTH_TOKEN_ENV as je,ANTHROPIC_ORGANIZATION_ID_ENV as Ze,ANTHROPIC_SERVICE_ACCOUNT_ID_ENV as $e,ANTHROPIC_WORKSPACE_ID_ENV as Qe,findEnvKeys as et,getEnvApiKey as tt,setEnvApiKeyPolicy as rt}from"./chunk-723ZGEZ2.js";import{cleanupSessionResources as st,registerSessionResourceCleanup as it}from"./chunk-ZG74NES2.js";import"./chunk-TMTOQ7H7.js";import"./chunk-7DDKXS2Q.js";import{StreamingJsonParser as ot,ToolCallArgumentsStream as at,parseJsonWithRepair as nt,parseStreamingJson as pt,parseToolCallArguments as lt,repairJson as mt}from"./chunk-FFMDRXC4.js";import{AI_TELEMETRY_SCHEMA as At,InMemoryCredentialStore as gt,InMemoryModelsStore as dt,ModelsError as It,calculateCost as _t,clampThinkingLevel as Tt,collapseSystemMessages as Ct,createInitialSystemMessage as Et,createModels as ct,createProvider as ut,declarationsEqual as Mt,defaultProviderAuthContext as St,getCurrentSystemMessage as vt,getCurrentSystemPrompt as Rt,getCurrentTools as Nt,getDeclaredTools as Ot,getInitialSystemMessage as Pt,getModelType as yt,getSupportedThinkingLevels as ht,getToolStateChanges as xt,hasApi as ft,hasNonAdditiveToolChanges as Dt,hasToolRedefinitions as Ht,isModelType as Vt,lazyApi as Gt,lazyStream as Lt,modelsAreEqual as kt,models_exports as _,normalizeContext as wt,resolveTranscript as bt,resolveTranscriptTools as Ut,setAmbientAuthPolicy as zt,toToolDeclaration as Kt,withoutInitialSystemMessage as Wt}from"./chunk-BIY5HTFI.js";import{AssistantMessageEventStream as Bt,EventStream as Ft,appendAssistantMessageDiagnostic as Yt,createAssistantMessageDiagnostic as qt,createAssistantMessageEventStream as Jt,extractDiagnosticError as Xt,firstTokenTimeoutMessage as jt,formatThrownValue as Zt,withFirstTokenTimeout as $t}from"./chunk-4LDEEFCY.js";import{PI_AI_VERSION as Qt,PI_ATTRIBUTION as er,contentText as tr,formatUserAgent as rr,getAttributionHeaders as sr,getClientVersion as ir,getIdentityHeaders as or,getOpenCodeSessionHeaders as ar,getSystemMessageText as nr,mergeClientIdentity as pr,renderSystemMessageUpdate as lr,withClientIdentity as mr}from"./chunk-F37JXTCY.js";import{__export as Ar}from"./chunk-JXWJOIH4.js";var T={},s={};Ar(s,{AI_TELEMETRY_SCHEMA:e(()=>At,"AI_TELEMETRY_SCHEMA"),ANTHROPIC_API_KEY_ENV:e(()=>Ye,"ANTHROPIC_API_KEY_ENV"),ANTHROPIC_AUTH_TOKEN_ENV:e(()=>qe,"ANTHROPIC_AUTH_TOKEN_ENV"),ANTHROPIC_FEDERATION_RULE_ID_ENV:e(()=>Je,"ANTHROPIC_FEDERATION_RULE_ID_ENV"),ANTHROPIC_IDENTITY_TOKEN_FILE_ENV:e(()=>Xe,"ANTHROPIC_IDENTITY_TOKEN_FILE_ENV"),ANTHROPIC_OAUTH_TOKEN_ENV:e(()=>je,"ANTHROPIC_OAUTH_TOKEN_ENV"),ANTHROPIC_ORGANIZATION_ID_ENV:e(()=>Ze,"ANTHROPIC_ORGANIZATION_ID_ENV"),ANTHROPIC_SERVICE_ACCOUNT_ID_ENV:e(()=>$e,"ANTHROPIC_SERVICE_ACCOUNT_ID_ENV"),ANTHROPIC_WORKSPACE_ID_ENV:e(()=>Qe,"ANTHROPIC_WORKSPACE_ID_ENV"),AssistantMessageEventStream:e(()=>Bt,"AssistantMessageEventStream"),CACHE_WARMING_IDLE_CONTINUATION_PROBABILITY:e(()=>M,"CACHE_WARMING_IDLE_CONTINUATION_PROBABILITY"),CACHE_WARMING_MAX_AGE_MS:e(()=>S,"CACHE_WARMING_MAX_AGE_MS"),CACHE_WARMING_MAX_IDLE_AGE_MS:e(()=>v,"CACHE_WARMING_MAX_IDLE_AGE_MS"),CACHE_WARMING_MINIMUM_EXPECTED_SAVINGS:e(()=>R,"CACHE_WARMING_MINIMUM_EXPECTED_SAVINGS"),DEFAULT_MAX_AGENT_RETRY_DELAY_MS:e(()=>be,"DEFAULT_MAX_AGENT_RETRY_DELAY_MS"),EventStream:e(()=>Ft,"EventStream"),InMemoryCredentialStore:e(()=>gt,"InMemoryCredentialStore"),InMemoryModelsStore:e(()=>dt,"InMemoryModelsStore"),ModelsError:e(()=>It,"ModelsError"),PI_AI_VERSION:e(()=>Qt,"PI_AI_VERSION"),PI_ATTRIBUTION:e(()=>er,"PI_ATTRIBUTION"),StreamingJsonParser:e(()=>ot,"StreamingJsonParser"),StringEnum:e(()=>gr,"StringEnum"),ToolCallArgumentsStream:e(()=>at,"ToolCallArgumentsStream"),Type:e(()=>d,"Type"),anthropicMessagesApi:e(()=>N,"anthropicMessagesApi"),appendAssistantMessageDiagnostic:e(()=>Yt,"appendAssistantMessageDiagnostic"),azureOpenAIResponsesApi:e(()=>O,"azureOpenAIResponsesApi"),bedrockConverseStreamApi:e(()=>P,"bedrockConverseStreamApi"),calculateCost:e(()=>_t,"calculateCost"),clampThinkingLevel:e(()=>Tt,"clampThinkingLevel"),cleanupSessionResources:e(()=>st,"cleanupSessionResources"),collapseSystemMessages:e(()=>Ct,"collapseSystemMessages"),complete:e(()=>y,"complete"),completeSimple:e(()=>h,"completeSimple"),contentText:e(()=>tr,"contentText"),createAssistantMessageDiagnostic:e(()=>qt,"createAssistantMessageDiagnostic"),createAssistantMessageEventStream:e(()=>Jt,"createAssistantMessageEventStream"),createFauxCore:e(()=>x,"createFauxCore"),createInitialSystemMessage:e(()=>Et,"createInitialSystemMessage"),createModels:e(()=>ct,"createModels"),createProvider:e(()=>ut,"createProvider"),declarationsEqual:e(()=>Mt,"declarationsEqual"),defaultProviderAuthContext:e(()=>St,"defaultProviderAuthContext"),envApiKeyAuth:e(()=>f,"envApiKeyAuth"),evaluateCacheWarming:e(()=>D,"evaluateCacheWarming"),extractDiagnosticError:e(()=>Xt,"extractDiagnosticError"),fauxAssistantMessage:e(()=>H,"fauxAssistantMessage"),fauxProvider:e(()=>V,"fauxProvider"),fauxText:e(()=>G,"fauxText"),fauxThinking:e(()=>L,"fauxThinking"),fauxToolCall:e(()=>k,"fauxToolCall"),findEnvKeys:e(()=>et,"findEnvKeys"),firstTokenTimeoutMessage:e(()=>jt,"firstTokenTimeoutMessage"),formatThrownValue:e(()=>Zt,"formatThrownValue"),formatUserAgent:e(()=>rr,"formatUserAgent"),generateImages:e(()=>w,"generateImages"),generateImagesOpenRouter:e(()=>b,"generateImagesOpenRouter"),getApiProvider:e(()=>U,"getApiProvider"),getApiProviders:e(()=>z,"getApiProviders"),getAttributionHeaders:e(()=>sr,"getAttributionHeaders"),getCacheWarmingDelayMs:e(()=>K,"getCacheWarmingDelayMs"),getCacheWarmingRequestOptions:e(()=>W,"getCacheWarmingRequestOptions"),getClientVersion:e(()=>ir,"getClientVersion"),getCurrentSystemMessage:e(()=>vt,"getCurrentSystemMessage"),getCurrentSystemPrompt:e(()=>Rt,"getCurrentSystemPrompt"),getCurrentTools:e(()=>Nt,"getCurrentTools"),getDeclaredTools:e(()=>Ot,"getDeclaredTools"),getEnvApiKey:e(()=>tt,"getEnvApiKey"),getIdentityHeaders:e(()=>or,"getIdentityHeaders"),getImageModel:e(()=>B,"getImageModel"),getImageModels:e(()=>F,"getImageModels"),getImageProviders:e(()=>Y,"getImageProviders"),getImagesApiProvider:e(()=>q,"getImagesApiProvider"),getInitialSystemMessage:e(()=>Pt,"getInitialSystemMessage"),getModel:e(()=>J,"getModel"),getModelType:e(()=>yt,"getModelType"),getModels:e(()=>X,"getModels"),getOpenCodeSessionHeaders:e(()=>ar,"getOpenCodeSessionHeaders"),getOverflowPatterns:e(()=>j,"getOverflowPatterns"),getPromptCacheTtlMs:e(()=>Z,"getPromptCacheTtlMs"),getProviders:e(()=>$,"getProviders"),getSupportedThinkingLevels:e(()=>ht,"getSupportedThinkingLevels"),getSystemMessageText:e(()=>nr,"getSystemMessageText"),getToolStateChanges:e(()=>xt,"getToolStateChanges"),googleGenerativeAIApi:e(()=>Q,"googleGenerativeAIApi"),googleVertexApi:e(()=>ee,"googleVertexApi"),hasApi:e(()=>ft,"hasApi"),hasNonAdditiveToolChanges:e(()=>Dt,"hasNonAdditiveToolChanges"),hasToolRedefinitions:e(()=>Ht,"hasToolRedefinitions"),isAccountLimitAssistantError:e(()=>Ue,"isAccountLimitAssistantError"),isCacheWarmingReplayable:e(()=>te,"isCacheWarmingReplayable"),isContextOverflow:e(()=>re,"isContextOverflow"),isModelType:e(()=>Vt,"isModelType"),isNetworkAssistantError:e(()=>ze,"isNetworkAssistantError"),isRecoverableLength:e(()=>se,"isRecoverableLength"),isRetryableAssistantError:e(()=>Ke,"isRetryableAssistantError"),lazyApi:e(()=>Gt,"lazyApi"),lazyOAuth:e(()=>ie,"lazyOAuth"),lazyStream:e(()=>Lt,"lazyStream"),mergeClientIdentity:e(()=>pr,"mergeClientIdentity"),mistralConversationsApi:e(()=>oe,"mistralConversationsApi"),modelsAreEqual:e(()=>kt,"modelsAreEqual"),normalizeContext:e(()=>wt,"normalizeContext"),openAICodexResponsesApi:e(()=>ae,"openAICodexResponsesApi"),openAICompletionsApi:e(()=>ne,"openAICompletionsApi"),openAIResponsesApi:e(()=>pe,"openAIResponsesApi"),parseJsonWithRepair:e(()=>nt,"parseJsonWithRepair"),parseStreamingJson:e(()=>pt,"parseStreamingJson"),parseToolCallArguments:e(()=>lt,"parseToolCallArguments"),piMessagesApi:e(()=>le,"piMessagesApi"),registerApiProvider:e(()=>me,"registerApiProvider"),registerBuiltInApiProviders:e(()=>Ae,"registerBuiltInApiProviders"),registerBuiltInImagesApiProviders:e(()=>ge,"registerBuiltInImagesApiProviders"),registerFauxProvider:e(()=>de,"registerFauxProvider"),registerImagesApiProvider:e(()=>Ie,"registerImagesApiProvider"),registerSessionResourceCleanup:e(()=>it,"registerSessionResourceCleanup"),renderSystemMessageUpdate:e(()=>lr,"renderSystemMessageUpdate"),repairJson:e(()=>mt,"repairJson"),resetApiProviders:e(()=>_e,"resetApiProviders"),resolveTranscript:e(()=>bt,"resolveTranscript"),resolveTranscriptTools:e(()=>Ut,"resolveTranscriptTools"),retryAssistantCall:e(()=>We,"retryAssistantCall"),retryDelayMs:e(()=>Be,"retryDelayMs"),setAmbientAuthPolicy:e(()=>zt,"setAmbientAuthPolicy"),setBedrockProviderLoader:e(()=>Te,"setBedrockProviderLoader"),setBedrockProviderModule:e(()=>Ce,"setBedrockProviderModule"),setEnvApiKeyPolicy:e(()=>rt,"setEnvApiKeyPolicy"),stream:e(()=>Ee,"stream"),streamAnthropic:e(()=>ce,"streamAnthropic"),streamAzureOpenAIResponses:e(()=>ue,"streamAzureOpenAIResponses"),streamGoogle:e(()=>Me,"streamGoogle"),streamGoogleVertex:e(()=>Se,"streamGoogleVertex"),streamMistral:e(()=>ve,"streamMistral"),streamOpenAICodexResponses:e(()=>Re,"streamOpenAICodexResponses"),streamOpenAICompletions:e(()=>Ne,"streamOpenAICompletions"),streamOpenAIResponses:e(()=>Oe,"streamOpenAIResponses"),streamSimple:e(()=>Pe,"streamSimple"),streamSimpleAnthropic:e(()=>ye,"streamSimpleAnthropic"),streamSimpleAzureOpenAIResponses:e(()=>he,"streamSimpleAzureOpenAIResponses"),streamSimpleGoogle:e(()=>xe,"streamSimpleGoogle"),streamSimpleGoogleVertex:e(()=>fe,"streamSimpleGoogleVertex"),streamSimpleMistral:e(()=>De,"streamSimpleMistral"),streamSimpleOpenAICodexResponses:e(()=>He,"streamSimpleOpenAICodexResponses"),streamSimpleOpenAICompletions:e(()=>Ve,"streamSimpleOpenAICompletions"),streamSimpleOpenAIResponses:e(()=>Ge,"streamSimpleOpenAIResponses"),toToolDeclaration:e(()=>Kt,"toToolDeclaration"),unregisterApiProviders:e(()=>Le,"unregisterApiProviders"),uuidv7:e(()=>Fe,"uuidv7"),validateToolArguments:e(()=>ke,"validateToolArguments"),validateToolCall:e(()=>we,"validateToolCall"),withClientIdentity:e(()=>mr,"withClientIdentity"),withFirstTokenTimeout:e(()=>$t,"withFirstTokenTimeout"),withoutInitialSystemMessage:e(()=>Wt,"withoutInitialSystemMessage")});function gr(r,t){return d.Unsafe({type:"string",enum:r,...t?.description&&{description:t.description},...t?.default&&{default:t.default}})}e(gr,"StringEnum");var o={typebox:g,"typebox/compile":m,"typebox/value":A,"@sinclair/typebox":g,"@sinclair/typebox/compile":m,"@sinclair/typebox/value":A,"@earendil-works/pi-agent-core":p,"@earendil-works/pi-tui":I,"@earendil-works/pi-ai":s,"@earendil-works/pi-ai/compat":s,"@earendil-works/pi-ai/models":_,"@earendil-works/pi-ai/oauth":T,"@earendil-works/pi-ai/providers/all":l,"@earendil-works/pi-coding-agent":i,"@mariozechner/pi-agent-core":p,"@mariozechner/pi-tui":I,"@mariozechner/pi-ai":s,"@mariozechner/pi-ai/compat":s,"@mariozechner/pi-ai/models":_,"@mariozechner/pi-ai/oauth":T,"@mariozechner/pi-ai/providers/all":l,"@mariozechner/pi-coding-agent":i},dr={sdk:e(()=>import("./sdk-CEIRR6KD.js"),"sdk"),office:e(()=>import("./office-RTREQQ7W.js"),"office"),mcp:e(()=>import("./mcp-RLFUDVHN.js"),"mcp"),router:e(()=>import("./router-4JLK3BTT.js"),"router"),rewind:e(()=>import("./rewind-2OYLDDHH.js"),"rewind"),review:e(()=>import("./review-USSKCVWP.js"),"review"),usage:e(()=>import("./usage-3ACOJWR3.js"),"usage"),sync:e(()=>import("./sync-UCHKAOUU.js"),"sync")};for(let r of n)o[r]=i;for(let[r,t]of Object.entries(dr)){let a,C={enumerable:!0,get:e(()=>(a??=t(),a),"get")};for(let E of n)Object.defineProperty(o,`${E}/${r}`,C)}export{o as VIRTUAL_MODULES};