dal-code 1.0.59 → 1.0.60

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 (122) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/bundle/chunks/{anthropic-messages-HVFHIIGX.js → anthropic-messages-XQHIW2F5.js} +1 -1
  3. package/dist/bundle/chunks/{azure-openai-responses-RMWKIGFW.js → azure-openai-responses-2STR7FU2.js} +1 -1
  4. package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
  5. package/dist/bundle/chunks/{chunk-4PBY6OYS.js → chunk-2SQ577MS.js} +1 -1
  6. package/dist/bundle/chunks/{chunk-KQRRELCF.js → chunk-2TJCPBNY.js} +1 -1
  7. package/dist/bundle/chunks/{chunk-QU2VEHMW.js → chunk-3KEFLXX2.js} +2 -2
  8. package/dist/bundle/chunks/{chunk-4BOWD7PQ.js → chunk-425HIJ4E.js} +1 -1
  9. package/dist/bundle/chunks/{chunk-VDPDHGGJ.js → chunk-4KCKRVPN.js} +1 -1
  10. package/dist/bundle/chunks/{chunk-X63WCLSX.js → chunk-4TEICWYC.js} +7 -7
  11. package/dist/bundle/chunks/{chunk-HF334NQU.js → chunk-B66W54NL.js} +1 -1
  12. package/dist/bundle/chunks/{chunk-F52JQCLE.js → chunk-CIJDL6I3.js} +1 -1
  13. package/dist/bundle/chunks/{chunk-J6H2LYOZ.js → chunk-E6RWRE6C.js} +1 -1
  14. package/dist/bundle/chunks/chunk-EXWCUM6H.js +9 -0
  15. package/dist/bundle/chunks/{chunk-C5ELI234.js → chunk-H3KG4L7I.js} +1 -1
  16. package/dist/bundle/chunks/{chunk-TPOKZ2EU.js → chunk-HZWPNFQO.js} +1 -1
  17. package/dist/bundle/chunks/{chunk-GZJEAFRS.js → chunk-KMTIPRJ5.js} +1 -1
  18. package/dist/bundle/chunks/{chunk-F5SIUTR7.js → chunk-LGD3AMTG.js} +1 -1
  19. package/dist/bundle/chunks/{chunk-AL3DFAIM.js → chunk-NRQYSXAU.js} +1 -1
  20. package/dist/bundle/chunks/{chunk-IONGABQF.js → chunk-O5BJV54H.js} +1 -1
  21. package/dist/bundle/chunks/{chunk-KT7CXVDN.js → chunk-P3KSBU23.js} +8 -8
  22. package/dist/bundle/chunks/{chunk-R47JBGS3.js → chunk-QM5JU2GS.js} +1 -1
  23. package/dist/bundle/chunks/{chunk-YOQ3KBG5.js → chunk-RNSD5PAD.js} +1 -1
  24. package/dist/bundle/chunks/{chunk-MPLE6M5C.js → chunk-RRLI6IMC.js} +1 -1
  25. package/dist/bundle/chunks/{chunk-PMFHJN7I.js → chunk-SI4QX273.js} +1 -1
  26. package/dist/bundle/chunks/{chunk-BBNE2TWS.js → chunk-THJSXCE4.js} +1 -1
  27. package/dist/bundle/chunks/{chunk-IKSSB5ZJ.js → chunk-X2O23QIN.js} +1 -1
  28. package/dist/bundle/chunks/{chunk-XQF5XDEM.js → chunk-XQ6Z77K4.js} +2 -2
  29. package/dist/bundle/chunks/{cli-NQ7B7BGV.js → cli-H3PJUN3W.js} +1 -1
  30. package/dist/bundle/chunks/{cli-BFWJUYZ5.js → cli-OEEFOWRC.js} +1 -1
  31. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-RXFI2EBV.js → cloudflare-workers-ai-system-one-55VRUHTE.js} +1 -1
  32. package/dist/bundle/chunks/{easter-egg-3d-W2F3ROZ6.js → easter-egg-3d-JQUBBOXE.js} +1 -1
  33. package/dist/bundle/chunks/{execute-NJRE4WBO.js → execute-DAF3F222.js} +1 -1
  34. package/dist/bundle/chunks/{google-generative-ai-5F5544G4.js → google-generative-ai-BQMG6OLH.js} +1 -1
  35. package/dist/bundle/chunks/{google-vertex-4PSVELDG.js → google-vertex-WUZF5EYV.js} +1 -1
  36. package/dist/bundle/chunks/{llama-cpp-classify-IPNT4VOW.js → llama-cpp-classify-MADWJYHP.js} +1 -1
  37. package/dist/bundle/chunks/{mcp-F3BQ6MQW.js → mcp-GYBI424O.js} +1 -1
  38. package/dist/bundle/chunks/{mistral-conversations-RSYLYGE4.js → mistral-conversations-GSSWAQLZ.js} +1 -1
  39. package/dist/bundle/chunks/{office-UBOUFRAU.js → office-OKOPPNJS.js} +1 -1
  40. package/dist/bundle/chunks/{openai-codex-responses-OKPZLYIS.js → openai-codex-responses-LJCENL64.js} +1 -1
  41. package/dist/bundle/chunks/{openai-completions-BFCQZRZ2.js → openai-completions-MT4XYSLH.js} +1 -1
  42. package/dist/bundle/chunks/{openai-decisions-RJ4MH5XI.js → openai-decisions-Y3TPPQUQ.js} +1 -1
  43. package/dist/bundle/chunks/{openai-responses-PT5MXG3Q.js → openai-responses-5EXHN2JI.js} +1 -1
  44. package/dist/bundle/chunks/{openrouter-images-ICCH2YHW.js → openrouter-images-4YZGO774.js} +1 -1
  45. package/dist/bundle/chunks/{pi-messages-Z2XWHIYT.js → pi-messages-EGKKYUGE.js} +1 -1
  46. package/dist/bundle/chunks/{review-WTYIVWYR.js → review-GXC4JNBH.js} +1 -1
  47. package/dist/bundle/chunks/{router-V3EIAYOF.js → router-6IBMTBKX.js} +1 -1
  48. package/dist/bundle/chunks/{runtime-FNCZJKOC.js → runtime-MD23I2NI.js} +1 -1
  49. package/dist/bundle/chunks/{sdk-32L63XRF.js → sdk-Z2BPQBYQ.js} +1 -1
  50. package/dist/bundle/chunks/{sync-Z5USQ7AN.js → sync-Q7ZHP4AB.js} +1 -1
  51. package/dist/bundle/chunks/{typesafe-system-one-6UYWINOZ.js → typesafe-system-one-ZIS4YIPV.js} +1 -1
  52. package/dist/bundle/chunks/{usage-JODQIC2H.js → usage-WQOCA772.js} +1 -1
  53. package/dist/bundle/chunks/{virtual-modules-ERCLFZEY.js → virtual-modules-SEIIF76E.js} +1 -1
  54. package/dist/bundle/cli-runtime.js +1 -1
  55. package/dist/bundle/index.js +1 -1
  56. package/dist/bundle/rpc-entry.js +1 -1
  57. package/dist/config.d.ts +1 -0
  58. package/dist/config.js +1 -1
  59. package/dist/index.d.ts +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/node_modules/@dalcode/dal-advisor/package.json +3 -3
  62. package/dist/node_modules/@dalcode/dal-awake/package.json +2 -2
  63. package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
  64. package/dist/node_modules/@dalcode/dal-bridge/src/index.js +1 -1
  65. package/dist/node_modules/@dalcode/dal-capabilities/package.json +4 -4
  66. package/dist/node_modules/@dalcode/dal-codeindex/package.json +2 -2
  67. package/dist/node_modules/@dalcode/dal-compat/package.json +2 -2
  68. package/dist/node_modules/@dalcode/dal-dap/package.json +2 -2
  69. package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
  70. package/dist/node_modules/@dalcode/dal-goal/package.json +3 -3
  71. package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
  72. package/dist/node_modules/@dalcode/dal-guard/src/attribution.js +1 -1
  73. package/dist/node_modules/@dalcode/dal-guard/src/index.js +4 -4
  74. package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
  75. package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
  76. package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
  77. package/dist/node_modules/@dalcode/dal-learn/package.json +2 -2
  78. package/dist/node_modules/@dalcode/dal-lsp/package.json +4 -4
  79. package/dist/node_modules/@dalcode/dal-mcp/package.json +6 -6
  80. package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
  81. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +2 -2
  82. package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
  83. package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +3 -3
  84. package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -4
  85. package/dist/node_modules/@dalcode/dal-recall/package.json +2 -2
  86. package/dist/node_modules/@dalcode/dal-remote/package.json +2 -2
  87. package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
  88. package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
  89. package/dist/node_modules/@dalcode/dal-router/package.json +6 -6
  90. package/dist/node_modules/@dalcode/dal-rtk/package.json +2 -2
  91. package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
  92. package/dist/node_modules/@dalcode/dal-statusline/package.json +2 -2
  93. package/dist/node_modules/@dalcode/dal-structured/package.json +2 -2
  94. package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
  95. package/dist/node_modules/@dalcode/dal-sync/package.json +4 -4
  96. package/dist/node_modules/@dalcode/dal-telemetry/package.json +4 -4
  97. package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
  98. package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
  99. package/dist/node_modules/@dalcode/dal-usage/package.json +2 -2
  100. package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
  101. package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
  102. package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
  103. package/dist/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  104. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  105. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
  106. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.d.ts +1 -1
  107. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
  108. package/dist/node_modules/@earendil-works/pi-ai/package.json +3 -3
  109. package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
  110. package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
  111. package/dist/node_modules/@earendil-works/pi-mcp/package.json +1 -1
  112. package/dist/node_modules/@earendil-works/pi-schema/package.json +1 -1
  113. package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  114. package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
  115. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  116. package/examples/extensions/gondolin/package-lock.json +2 -2
  117. package/examples/extensions/gondolin/package.json +1 -1
  118. package/examples/extensions/with-deps/package-lock.json +2 -2
  119. package/examples/extensions/with-deps/package.json +1 -1
  120. package/npm-shrinkwrap.json +2 -2
  121. package/package.json +1 -1
  122. package/dist/bundle/chunks/chunk-WLQ33LIH.js +0 -9
@@ -1 +1 @@
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 m,createMcpAuthProvider as c,signInMcpServer as n}from"./chunk-PMFHJN7I.js";import"./chunk-C5ELI234.js";import"./chunk-4BOWD7PQ.js";import"./chunk-HF334NQU.js";import"./chunk-G5AMLGXC.js";import"./chunk-R47JBGS3.js";import"./chunk-XJFQKN3N.js";import"./chunk-QU2VEHMW.js";import"./chunk-JXWJOIH4.js";export{e as McpOAuthAuthorizationRequiredError,t as McpOAuthCredentialStore,o as McpServerConnection,i as McpServerLog,p as McpSignInCancelledError,m as createDefaultTransport,c as createMcpAuthProvider,n as signInMcpServer};
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 m,createMcpAuthProvider as c,signInMcpServer as n}from"./chunk-SI4QX273.js";import"./chunk-H3KG4L7I.js";import"./chunk-425HIJ4E.js";import"./chunk-B66W54NL.js";import"./chunk-G5AMLGXC.js";import"./chunk-QM5JU2GS.js";import"./chunk-XJFQKN3N.js";import"./chunk-3KEFLXX2.js";import"./chunk-JXWJOIH4.js";export{e as McpOAuthAuthorizationRequiredError,t as McpOAuthCredentialStore,o as McpServerConnection,i as McpServerLog,p as McpSignInCancelledError,m as createDefaultTransport,c as createMcpAuthProvider,n as signInMcpServer};
@@ -1 +1 @@
1
- var m=Object.defineProperty;var t=(r,o)=>m(r,"name",{value:o,configurable:!0});import{createRequire as p}from"node:module";const Z=p(import.meta.url);import{BUILTIN_AGENT_DESCRIPTIONS as i,READ_ONLY_TOOL_NAMES as a}from"./chunk-IONGABQF.js";import"./chunk-4PBY6OYS.js";import{DAL_HOOK_ENTRY_TYPE as n,dalHookActivity as s,isDalHookActivity as l,runDalHookEvent as E,runNotificationHooks as _,runUserPromptSubmitHooks as N}from"./chunk-WLQ33LIH.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,SettingsManager as L,buildProjectMap as d,formatProjectMapPrompt as P,listBundledExtensions as H,listToolCatalog as f,loadProjectContextFiles as C,loadSkills as g,parseFrontmatter as k,toolDisplayLabel as M}from"./chunk-X63WCLSX.js";import{SessionManager as v,getDefaultSessionDirs as B,parseSessionEntries as w}from"./chunk-J6H2LYOZ.js";import{ModelRuntime as y,PROJECT_HOOKS_FILE_ENV as F,loadDalHooks as K,projectHooksFileFromEnv as V}from"./chunk-KT7CXVDN.js";import"./chunk-YOQ3KBG5.js";import"./chunk-XQF5XDEM.js";import"./chunk-JUUJCOIR.js";import"./chunk-NJDCSLWK.js";import"./chunk-C5ELI234.js";import"./chunk-4BOWD7PQ.js";import"./chunk-HF334NQU.js";import"./chunk-G5AMLGXC.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-QU2VEHMW.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-VDPDHGGJ.js";import"./chunk-4LDEEFCY.js";import"./chunk-F52JQCLE.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=[...a];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,v as SessionManager,L as SettingsManager,J as TERMINAL_CAPABILITY,X as TERMINAL_CAPABILITY_VERSION,Y as VERSION,h as brandText,d as buildProjectMap,s as dalHookActivity,P as formatProjectMapPrompt,j as getAgentDir,B as getDefaultSessionDirs,G as getExamplesPath,l as isDalHookActivity,z as listBuiltinSubagents,H as listBundledExtensions,f as listToolCatalog,K as loadDalHooks,C as loadProjectContextFiles,g as loadSkills,k as parseFrontmatter,w as parseSessionEntries,V as projectHooksFileFromEnv,E as runDalHookEvent,_ as runNotificationHooks,N as runUserPromptSubmitHooks,M as toolDisplayLabel};
1
+ var m=Object.defineProperty;var t=(r,o)=>m(r,"name",{value:o,configurable:!0});import{createRequire as p}from"node:module";const Z=p(import.meta.url);import{BUILTIN_AGENT_DESCRIPTIONS as i,READ_ONLY_TOOL_NAMES as a}from"./chunk-O5BJV54H.js";import"./chunk-2SQ577MS.js";import{DAL_HOOK_ENTRY_TYPE as n,dalHookActivity as s,isDalHookActivity as l,runDalHookEvent as E,runNotificationHooks as _,runUserPromptSubmitHooks as N}from"./chunk-EXWCUM6H.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,SettingsManager as L,buildProjectMap as d,formatProjectMapPrompt as P,listBundledExtensions as H,listToolCatalog as f,loadProjectContextFiles as C,loadSkills as g,parseFrontmatter as k,toolDisplayLabel as M}from"./chunk-4TEICWYC.js";import{SessionManager as v,getDefaultSessionDirs as B,parseSessionEntries as w}from"./chunk-E6RWRE6C.js";import{ModelRuntime as y,PROJECT_HOOKS_FILE_ENV as F,loadDalHooks as K,projectHooksFileFromEnv as V}from"./chunk-P3KSBU23.js";import"./chunk-RNSD5PAD.js";import"./chunk-XQ6Z77K4.js";import"./chunk-JUUJCOIR.js";import"./chunk-NJDCSLWK.js";import"./chunk-H3KG4L7I.js";import"./chunk-425HIJ4E.js";import"./chunk-B66W54NL.js";import"./chunk-G5AMLGXC.js";import"./chunk-LGD3AMTG.js";import"./chunk-NRQYSXAU.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-QM5JU2GS.js";import"./chunk-XJFQKN3N.js";import{getLanguage as U,translate as e}from"./chunk-3KEFLXX2.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-4KCKRVPN.js";import"./chunk-4LDEEFCY.js";import"./chunk-CIJDL6I3.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=[...a];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,v as SessionManager,L as SettingsManager,J as TERMINAL_CAPABILITY,X as TERMINAL_CAPABILITY_VERSION,Y as VERSION,h as brandText,d as buildProjectMap,s as dalHookActivity,P as formatProjectMapPrompt,j as getAgentDir,B as getDefaultSessionDirs,G as getExamplesPath,l as isDalHookActivity,z as listBuiltinSubagents,H as listBundledExtensions,f as listToolCatalog,K as loadDalHooks,C as loadProjectContextFiles,g as loadSkills,k as parseFrontmatter,w as parseSessionEntries,V as projectHooksFileFromEnv,E as runDalHookEvent,_ as runNotificationHooks,N as runUserPromptSubmitHooks,M as toolDisplayLabel};
@@ -1,4 +1,4 @@
1
- var wt=Object.defineProperty;var a=(e,t)=>wt(e,"name",{value:t,configurable:!0});import{createRequire as Et}from"node:module";const Yn=Et(import.meta.url);import{getDefaultSessionDir as vt}from"./chunk-J6H2LYOZ.js";import"./chunk-YOQ3KBG5.js";import"./chunk-NJDCSLWK.js";import"./chunk-4BOWD7PQ.js";import"./chunk-G5AMLGXC.js";import"./chunk-R47JBGS3.js";import{DATA_FORMAT_KEY as At,declaredDataFormat as re,reportNewerDataFormat as $e,t as B,withFileLockSync as ie,writeFileAtomicSync as P}from"./chunk-QU2VEHMW.js";import"./chunk-IEBK4HQA.js";import"./chunk-723ZGEZ2.js";import"./chunk-ZG74NES2.js";import"./chunk-7DDKXS2Q.js";import"./chunk-FFMDRXC4.js";import"./chunk-VDPDHGGJ.js";import"./chunk-4LDEEFCY.js";import"./chunk-F52JQCLE.js";import"./chunk-JXWJOIH4.js";import{existsSync as xt,readFileSync as kt}from"node:fs";import{join as _t}from"node:path";import{createHash as jt,randomBytes as $t}from"node:crypto";import{existsSync as Oe,mkdirSync as ae,readdirSync as Ot,readFileSync as Ne,rmSync as Nt,statSync as It}from"node:fs";import{join as T}from"node:path";import{join as Tt}from"node:path";import{homedir as Rt}from"node:os";var Ct=[[/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?(?:-----END [A-Z ]*PRIVATE KEY-----|$)/g,"<private-key>"],[/\b(?:sk|pk|rk)-[A-Za-z0-9_-]{8,}/g,"<secret>"],[/\bBearer\s+[A-Za-z0-9._~+/=-]{8,}/gi,"Bearer <secret>"],[/\beyJ[A-Za-z0-9._-]{16,}/g,"<secret>"],[/\b(?:ghp|gho|ghu|ghs|ghr|github_pat)_[A-Za-z0-9_]{8,}/g,"<secret>"],[/\bglpat-[A-Za-z0-9_-]{8,}/g,"<secret>"],[/\bAKIA[0-9A-Z]{12,}/g,"<secret>"],[/\bxox[abposr]-[A-Za-z0-9-]{8,}/g,"<secret>"],[/\bnpm_[A-Za-z0-9]{20,}/g,"<secret>"],[/\b([A-Za-z0-9_.-]*(?:token|secret|password|passwd|api[_-]?key|access[_-]?key|private[_-]?key|auth|cookie|session)[A-Za-z0-9_.-]*)(["']?\s*[:=]\s*["']?)([^\s"',;]{4,})/gi,"$1$2<secret>"],[/(\b[a-z][a-z0-9+.-]*:\/\/)[^\s/@:]+:[^\s/@]+@/gi,"$1<secret>@"],[/[A-Za-z0-9+/_-]{40,}={0,2}/g,"<opaque>"]];function U(e){let t=e;for(let[r,n]of Ct)t=t.replace(r,n);let s=Rt();return s&&s.length>1&&(t=t.split(s).join("~")),t=t.replace(/(?:\/Users\/|\/home\/|[A-Za-z]:\\Users\\)[^\s/\\]+/g,"~"),t}a(U,"redact");var Ft=[{reason:"weakens_safety",pattern:/\b(?:skip|bypass|disable|ignore|override|turn off|circumvent)\b[^\n]{0,40}\b(?:approvals?|permissions?|sandbox(?:es)?|safety|guards?|confirmations?|hooks?|polic(?:y|ies)|protections?)\b/i},{reason:"weakens_safety",pattern:/(?:跳过|绕过|关闭|禁用|忽略|无视)[^。\n]{0,12}(?:审批|权限|确认|沙箱|安全|保护|钩子|拦截)/u},{reason:"weakens_safety",pattern:/(?:不要|不必|无需)(?![^。\n]{0,6}未经)[^。\n]{0,6}(?:审批|确认|沙箱)/u},{reason:"weakens_safety",pattern:/\b(?:skip|disable)\b[^\n]{0,20}\btests?\b|--no-verify\b/i},{reason:"weakens_safety",pattern:/--dangerously|\byolo\b|bypassPermissions|\bsudo\b|chmod\s+777|rm\s+-rf\s+[/~]/i},{reason:"exfiltrates",pattern:/\b(?:curl|wget|scp|rsync|nc|upload|send|post|exfiltrate|share)\b[^\n]{0,60}\b(?:tokens?|keys?|secrets?|passwords?|credentials?|cookies?|env|\.ssh|sessions?)\b/i},{reason:"exfiltrates",pattern:/(?:上传|发送|发到|外发|分享|传到)[^。\n]{0,20}(?:密钥|令牌|密码|凭据|凭证|cookie|环境变量|私钥)/iu},{reason:"installs",pattern:/\b(?:npm|pnpm|bun)\s+(?:i|install|add)\b[^\n]*?(?:\s-g\b|--global\b)|\byarn\s+global\s+add\b/i},{reason:"installs",pattern:/\b(?:brew|apt(?:-get)?|yum|dnf|pacman|apk|choco|winget|scoop|snap|cargo|gem|pipx)\s+(?:install|add)\b|\bgo\s+install\b|\buv\s+tool\s+install\b/i},{reason:"installs",pattern:/\b(?:npm\s+(?:i|install)|pnpm\s+(?:add|i|install)|yarn\s+add|bun\s+add)\s+(?!(?:in|at|from|first|before|after|then|and|again|once|for|inside|to|with|when|so|instead|works|fails|succeeds)\b)[@a-z][\w@./-]*/i},{reason:"installs",pattern:/\|\s*(?:sudo\s+)?(?:ba|z)?sh\b|\binstall(?:er)?\s+script\b/i},{reason:"installs",pattern:/\b(?:npx|npm\s+exec)\b[^\n`]*?\s(?:-y|--yes)\b|\bnpx\s+(?:-\S+\s+)*@?[a-z][\w./-]*@[\w.^~*-]+|\b(?:pnpm|yarn)\s+dlx\b|\bbunx\b|\buvx\b|\bpipx\s+run\b/i},{reason:"installs",pattern:/全局安装|从[^。\n]{1,30}下载|下载(?:并|后)?(?:运行|执行|安装)/u},{reason:"concrete_value",pattern:/\bhttps?:\/\/|\bwww\./i},{reason:"concrete_value",pattern:/<(?:secret|opaque|private-key)>/},{reason:"concrete_value",pattern:/[A-Za-z0-9+/=_-]{40,}/},{reason:"concrete_value",pattern:/\b\d{1,3}(?:\.\d{1,3}){3}\b/},{reason:"concrete_value",pattern:/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/},{reason:"concrete_value",pattern:/(?:\/Users\/|\/home\/|[A-Za-z]:\\Users\\)[^\s/\\]+/}];function Dt(e){let t=[e.content,e.rootCause??"",e.note??""].join(`
1
+ var wt=Object.defineProperty;var a=(e,t)=>wt(e,"name",{value:t,configurable:!0});import{createRequire as Et}from"node:module";const Yn=Et(import.meta.url);import{getDefaultSessionDir as vt}from"./chunk-E6RWRE6C.js";import"./chunk-RNSD5PAD.js";import"./chunk-NJDCSLWK.js";import"./chunk-425HIJ4E.js";import"./chunk-G5AMLGXC.js";import"./chunk-QM5JU2GS.js";import{DATA_FORMAT_KEY as At,declaredDataFormat as re,reportNewerDataFormat as $e,t as B,withFileLockSync as ie,writeFileAtomicSync as P}from"./chunk-3KEFLXX2.js";import"./chunk-IEBK4HQA.js";import"./chunk-723ZGEZ2.js";import"./chunk-ZG74NES2.js";import"./chunk-7DDKXS2Q.js";import"./chunk-FFMDRXC4.js";import"./chunk-4KCKRVPN.js";import"./chunk-4LDEEFCY.js";import"./chunk-CIJDL6I3.js";import"./chunk-JXWJOIH4.js";import{existsSync as xt,readFileSync as kt}from"node:fs";import{join as _t}from"node:path";import{createHash as jt,randomBytes as $t}from"node:crypto";import{existsSync as Oe,mkdirSync as ae,readdirSync as Ot,readFileSync as Ne,rmSync as Nt,statSync as It}from"node:fs";import{join as T}from"node:path";import{join as Tt}from"node:path";import{homedir as Rt}from"node:os";var Ct=[[/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?(?:-----END [A-Z ]*PRIVATE KEY-----|$)/g,"<private-key>"],[/\b(?:sk|pk|rk)-[A-Za-z0-9_-]{8,}/g,"<secret>"],[/\bBearer\s+[A-Za-z0-9._~+/=-]{8,}/gi,"Bearer <secret>"],[/\beyJ[A-Za-z0-9._-]{16,}/g,"<secret>"],[/\b(?:ghp|gho|ghu|ghs|ghr|github_pat)_[A-Za-z0-9_]{8,}/g,"<secret>"],[/\bglpat-[A-Za-z0-9_-]{8,}/g,"<secret>"],[/\bAKIA[0-9A-Z]{12,}/g,"<secret>"],[/\bxox[abposr]-[A-Za-z0-9-]{8,}/g,"<secret>"],[/\bnpm_[A-Za-z0-9]{20,}/g,"<secret>"],[/\b([A-Za-z0-9_.-]*(?:token|secret|password|passwd|api[_-]?key|access[_-]?key|private[_-]?key|auth|cookie|session)[A-Za-z0-9_.-]*)(["']?\s*[:=]\s*["']?)([^\s"',;]{4,})/gi,"$1$2<secret>"],[/(\b[a-z][a-z0-9+.-]*:\/\/)[^\s/@:]+:[^\s/@]+@/gi,"$1<secret>@"],[/[A-Za-z0-9+/_-]{40,}={0,2}/g,"<opaque>"]];function U(e){let t=e;for(let[r,n]of Ct)t=t.replace(r,n);let s=Rt();return s&&s.length>1&&(t=t.split(s).join("~")),t=t.replace(/(?:\/Users\/|\/home\/|[A-Za-z]:\\Users\\)[^\s/\\]+/g,"~"),t}a(U,"redact");var Ft=[{reason:"weakens_safety",pattern:/\b(?:skip|bypass|disable|ignore|override|turn off|circumvent)\b[^\n]{0,40}\b(?:approvals?|permissions?|sandbox(?:es)?|safety|guards?|confirmations?|hooks?|polic(?:y|ies)|protections?)\b/i},{reason:"weakens_safety",pattern:/(?:跳过|绕过|关闭|禁用|忽略|无视)[^。\n]{0,12}(?:审批|权限|确认|沙箱|安全|保护|钩子|拦截)/u},{reason:"weakens_safety",pattern:/(?:不要|不必|无需)(?![^。\n]{0,6}未经)[^。\n]{0,6}(?:审批|确认|沙箱)/u},{reason:"weakens_safety",pattern:/\b(?:skip|disable)\b[^\n]{0,20}\btests?\b|--no-verify\b/i},{reason:"weakens_safety",pattern:/--dangerously|\byolo\b|bypassPermissions|\bsudo\b|chmod\s+777|rm\s+-rf\s+[/~]/i},{reason:"exfiltrates",pattern:/\b(?:curl|wget|scp|rsync|nc|upload|send|post|exfiltrate|share)\b[^\n]{0,60}\b(?:tokens?|keys?|secrets?|passwords?|credentials?|cookies?|env|\.ssh|sessions?)\b/i},{reason:"exfiltrates",pattern:/(?:上传|发送|发到|外发|分享|传到)[^。\n]{0,20}(?:密钥|令牌|密码|凭据|凭证|cookie|环境变量|私钥)/iu},{reason:"installs",pattern:/\b(?:npm|pnpm|bun)\s+(?:i|install|add)\b[^\n]*?(?:\s-g\b|--global\b)|\byarn\s+global\s+add\b/i},{reason:"installs",pattern:/\b(?:brew|apt(?:-get)?|yum|dnf|pacman|apk|choco|winget|scoop|snap|cargo|gem|pipx)\s+(?:install|add)\b|\bgo\s+install\b|\buv\s+tool\s+install\b/i},{reason:"installs",pattern:/\b(?:npm\s+(?:i|install)|pnpm\s+(?:add|i|install)|yarn\s+add|bun\s+add)\s+(?!(?:in|at|from|first|before|after|then|and|again|once|for|inside|to|with|when|so|instead|works|fails|succeeds)\b)[@a-z][\w@./-]*/i},{reason:"installs",pattern:/\|\s*(?:sudo\s+)?(?:ba|z)?sh\b|\binstall(?:er)?\s+script\b/i},{reason:"installs",pattern:/\b(?:npx|npm\s+exec)\b[^\n`]*?\s(?:-y|--yes)\b|\bnpx\s+(?:-\S+\s+)*@?[a-z][\w./-]*@[\w.^~*-]+|\b(?:pnpm|yarn)\s+dlx\b|\bbunx\b|\buvx\b|\bpipx\s+run\b/i},{reason:"installs",pattern:/全局安装|从[^。\n]{1,30}下载|下载(?:并|后)?(?:运行|执行|安装)/u},{reason:"concrete_value",pattern:/\bhttps?:\/\/|\bwww\./i},{reason:"concrete_value",pattern:/<(?:secret|opaque|private-key)>/},{reason:"concrete_value",pattern:/[A-Za-z0-9+/=_-]{40,}/},{reason:"concrete_value",pattern:/\b\d{1,3}(?:\.\d{1,3}){3}\b/},{reason:"concrete_value",pattern:/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/},{reason:"concrete_value",pattern:/(?:\/Users\/|\/home\/|[A-Za-z]:\\Users\\)[^\s/\\]+/}];function Dt(e){let t=[e.content,e.rootCause??"",e.note??""].join(`
2
2
  `);for(let{reason:r,pattern:n}of Ft)if(n.test(t))return r;let s=e.content.trim().length;if(s<6||s>320)return"length"}a(Dt,"rejectLesson");var Mt=[{category:"deletion",pattern:/\b(?:rm|rmdir|del|unlink|truncate|shred)\b|\bdelet(?:e|es|ed|ing)\b|\bremov(?:e|es|ed|ing)\b|\bdrop\s+(?:table|database|schema)\b|\bgit\s+(?:clean|reset\s+--hard|push\s+[^\n]*--force|branch\s+-D)\b|\bwip(?:e|ing)\b|\bpurge\b|删除|删掉|清空|清除|覆盖(?!率)|重置/iu},{category:"permissions",pattern:/\b(?:chmod|chown|sudo|setfacl|icacls)\b|\bpermissions?\b|\bapprov(?:al|e)s?\b|\bsandbox\b|\bguard\b|\bescalat\w*|权限|审批|放行|沙箱|提权/iu},{category:"credentials",pattern:/\b(?:tokens?|secrets?|passwords?|passwd|credentials?|api[\s_-]?keys?|private\s+keys?|ssh\s+keys?|auth(?:\.json)?|login|cookies?|\.env)\b|凭据|凭证|密钥|密码|令牌|登录|私钥/iu},{category:"network",pattern:/\b(?:curl|wget|http|https|proxy|download|upload|dns|ssh|scp|rsync|webhook)\b|联网|下载|上传|代理|外网/iu},{category:"publishing",pattern:/\b(?:publish|release|deploy|push|git\s+tag|merge\s+to\s+main)\b|发布|发版|上线|部署|推送|合并到主/iu}],oe=String.raw`(?:package\.json|package-lock\.json|lock\s?files?|pnpm-lock|yarn\.lock|requirements[\w.-]*\.txt|pyproject\.toml|Cargo\.toml|go\.mod|\.github\/workflows[\w./-]*|CI\s+config(?:uration)?)`,Ie=/\b(?:npm|pnpm|yarn|bun)[ \t]+(?:i|install|add)[ \t]+(?:-{1,2}[\w-]+[ \t]+)*[@a-z][\w@./-]*|\bpip3?[ \t]+install[ \t]+(?!-r\b)[a-z]|--save-dev\b|\binstall(?:ing)?\s+(?:the\s+|a\s+|an\s+|it\s+)?(?:missing\s+)?(?:tool|package|module|librar\w*|runner|linter|dependenc\w*)|as\s+a\s+dev-?dependency|(?:安装|装上|装一下|补装)\s*(?:缺少的|缺失的)?\s*(?:工具|依赖|包|插件|运行器)|装依赖/iu,qt=new RegExp(String.raw`\b(?:fix|edit|change|modify|update|rewrite|patch|add\b[^.;\n]{0,40}?\bto)\b[^.;\n]{0,40}?${oe}|\b(?:fix|edit|change|modify|update|rewrite|patch)\b[^.;\n]{0,12}?\b(?:the\s+)?(?:npm\s+|test\s+|lint\s+|build\s+)?scripts?\b|(?:改|修改|改写|修复)[^。;;\n]{0,6}?(?:测试|npm|lint|构建)?\s*脚本|${oe}[^.;\n]{0,20}?\b(?:should|must)\s+be\s+(?:changed|edited|updated|fixed)|(?:改|修改|编辑|调整|修复|补上|加到|写进)[^。;;\n]{0,12}?${oe}`,"iu"),Te=/\b(?:before|instead\s+of|rather\s+than|don'?t|do\s+not|never|avoid|without)\b[^.;\n]{0,24}$|(?:不要|别|不许|先别|而不是|避免|不用)[^。;;\n]{0,8}$/iu;function Lt(e){if(Ie.test(e)){let s=e.search(Ie);if(!Te.test(e.slice(Math.max(0,s-30),s)))return!0}let t=qt.exec(e);return!!(t&&!Te.test(e.slice(Math.max(0,t.index-30),t.index)))}a(Lt,"prescribesDependencyChange");function zt(e){let t=Mt.filter(({pattern:s})=>Ht(e,s)).map(({category:s})=>s);return Lt(e)?[...t,"dependencies"]:t}a(zt,"riskOf");var Bt=/[。;;,,!?!?\n]|\.(?=\s|$)/u,Pt=/\b(?:don'?t|do\s+not|never|avoid|stop|instead\s+of|rather\s+than|refuse|no\s+longer)\b|不要|不得|不能|不应|不该|(?<![区分类级识特个差告])别(?![的处人名])|切勿|勿|禁止|避免|停止|不再|而不是|而非|拒绝|不可|严禁|防止/iu,Ut=/^\s*(?:当|如果|若|假如|一旦|万一|when\b|if\b|once\b|whenever\b)/iu,Re=/就|则|便|\bthen\b/iu,Jt=/(?:时|之后|以后|的时候)\s*$/u;function Gt(e){return Ut.test(e)?Re.test(e)?[e]:[]:Jt.test(e)&&!Re.test(e)?[]:[e]}a(Gt,"prescriptiveParts");function Ht(e,t){let s=new RegExp(t.source,t.flags.includes("g")?t.flags:`${t.flags}g`);for(let r of e.split(Bt))for(let n of Gt(r))for(let i of n.matchAll(s))if(!Pt.test(n.slice(0,i.index)))return!0;return!1}a(Ht,"prescribedIn");function Y(e){let t=String.raw`(?:\s+(?:-{1,2}[\w-]+(?:=\S+|\s+[^\s-]\S*)?|workspace\s+\S+|workspaces(?:\s+foreach)?))*`;return[String.raw`\b(?:npm|pnpm|yarn|bun)${t}\s+(?:run\s+)?(?:${e})\b`,String.raw`\bturbo\s+(?:run\s+)?(?:[^\s-]\S*\s+)*?(?:${e})(?![\w-])`,String.raw`\bnx\s+(?:run\s+\S+:|(?:run-many|affected)\b.*?(?:-t|--targets?)(?:=|\s+)(?:\S*,)?)?(?:${e})(?![\w-])`].join("|")}a(Y,"scriptPattern");var Kt=[["typecheck",new RegExp(String.raw`\btsc\b(?!.*--build)|\bmypy\b|\bpyright\b|${Y("typecheck|type-check|check-types")}`)],["test",new RegExp(String.raw`\b(?:vitest|jest|mocha|ava|pytest|tox|rspec|phpunit)\b|${Y("test")}|\bnode\s+--test\b|\b(?:go|cargo|dotnet|mix|deno)\s+test\b|\bmake\s+test\b|\bgradlew?\s+test\b|\bmvn\s+test\b`)],["lint",new RegExp(String.raw`\b(?:eslint|biome|ruff|flake8|pylint|golangci-lint|clippy|prettier\s+--check)\b|${Y("lint|check")}`)],["build",new RegExp(String.raw`${Y("build")}|\b(?:cargo|go|dotnet|swift)\s+build\b|\bmake\b(?!\s+test)|\bgradlew?\s+(?:build|assemble)\b|\bmvn\s+(?:package|install)\b|\btsc\s+--build\b|\bvite\s+build\b|\bwebpack\b`)],["install",/^(?:npm\s+(?:ci|install|i)|pnpm\s+(?:install|i)|yarn(?:\s+install)?|bun\s+install|pip3?\s+install\s+(?:-r|-e|\.)|poetry\s+install|uv\s+sync|bundle\s+install|composer\s+install|go\s+mod\s+download)(?:\s|$)/]],Zt=/^(?:tail|head|grep|egrep|fgrep|cat|less|more|tee|wc|sort|uniq|cut|column|sed|awk|nl)\b/,Wt=/^(?:head|grep|egrep|fgrep|cut|sed|awk)\b/,Yt=/^(?:echo|printf|cat|ls|pwd|true|false|:|#|sed|awk|grep|rg|head|tail|wc|find|git\s+(?:diff|status|log|show|stash|add)|set|export|printenv|which|whereis|type|command\s+-v|test\s|\[|stat|file|(?:node|npm|pnpm|yarn|bun|npx)\s+(?:-v|--version)|(?:npm|pnpm|yarn)\s+(?:ls|list|view|info|bin|root|config|why))(?:\b|(?=\s|$))/;function Vt(e){let t=e.replace(/<<-?\s*(['"]?)(\w+)\1([^\n]*)\n[\s\S]*?\n[ \t]*\2[ \t]*(?=\n|$)/g,"<<$2$3").replace(/\s*\d*>&\d+/g,""),s=[],r=[],n="",i,o=a(()=>{r.push(n.trim()),n=""},"endStage"),l=a(()=>{o();let d=r.filter(Boolean);d.length&&s.push(d),r=[]},"endStatement");for(let d=0;d<t.length;d++){let h=t[d];if(i){if(h==="\\"&&i==='"'){n+=h+(t[d+1]??""),d++;continue}h===i&&(i=void 0),n+=h;continue}h==="'"||h==='"'?(i=h,n+=h):h==="\\"?(n+=h+(t[d+1]??""),d++):h===";"||h===`
3
3
  `?l():(h==="&"||h==="|")&&t[d+1]===h?(l(),d++):h==="&"?l():h==="|"?o():n+=h}return l(),s}a(Vt,"splitStatements");function Xt(e){let t=[],s=!1;for(let r of Vt(e)){let n=[...r],i=!1;for(;n.length>1&&Zt.test(n.at(-1));)Wt.test(n.at(-1))&&(i=!0),n.pop();let o=n.join(" | ").replace(/\s+/g," ");/^cd\s/.test(o)?t.push(o):!Yt.test(o)&&Ce(o)&&(t.push(o),i&&(s=!0))}for(;t.length&&/^cd\s/.test(t.at(-1));)t.pop();return{statements:t,selected:s}}a(Xt,"checkParts");function Ce(e){for(let[t,s]of Kt)if(s.test(e))return t}a(Ce,"intentOf");var Fe=120,De=/^(?:at\s|\S+\s\(\S+:\d+:\d+\)$|(?:file:\/\/)?\S+\.(?:[cm]?[jt]sx?|py|go|rs|rb|java|kt|php)(?::\d+){1,2}$|.*\bnode:internal\/|Node\.js v\d)/,Me=/^(?:>?\s*\d+\s*\|.*|[\s|]*\^+[\s^~]*|(?:if|else|for|while|switch|const|let|var|return|function|class|import|export|async|await|def|try|catch)\b.*|\}.*)$|\bthrow new\b|=>|[;{]$/,qe=/^(?:(?:duration_ms|type|location|failureType|code|stack|operator|expected|actual|generatedMessage|name):|\.{3}$|-{3}$|TAP version|Subtest:|1\.\.\d+$|(?:tests|suites|pass|fail|cancelled|skipped|todo|duration_ms)\s+\d|Command exited with code)/,Qt=/^(?:E\s+)?(?:Uncaught\s+)?(?:[A-Z][\w.]*(?:Error|Exception)|Error|error(?: TS\d+|\[E\d+\])?)(?:\s*\[[\w-]+\])?:\s*\S|\berror TS\d+:\s*\S/,es=/^(?:expected\b.*\b(?:received|to (?:be|equal)|but got)\b|(?:Expected|Received)(?: value)?:\s*\S|.+\s!==?\s.+)/i,ts=/^(?:FAIL(?:ED)?\b|not ok \d+|[✖×✗]\s|--- FAIL:?)/,ss=/not found|no such|cannot|can't|unable|error|fail|missing|denied|unknown|invalid|找不到|不存在|失败|错误/i;function ns(e){let t=e.trim().replace(/^#\s?/,"").trim();return t!==""&&(De.test(t)||Me.test(t)||qe.test(t))}a(ns,"isUntellingReason");function rs(e){let t=e.findIndex(n=>es.test(n));if(t<0)return;let s=e[t],r=/^Expected(?: value)?:/i.test(s)?e.slice(t+1,t+4).find(n=>/^Received(?: value)?:/i.test(n)):void 0;return r?`${s}, ${r}`:s}a(rs,"comparison");function is(e){let t=U(e).replace(/\s+/g," ").trim();return t.length>Fe?`${t.slice(0,Fe-1)}\u2026`:t}a(is,"clipReason");function as(e){let t=[];for(let s=0;s<e.length;s++){let r=/^error:\s*(.*)$/.exec(e[s]);if(!r)continue;let n=r[1].replace(/^'(.*)'$/,"$1").replace(/^"(.*)"$/,"$1");if(/^\|-?$/.test(n)){let o=[];for(let l=s+1;l<e.length&&o.length<2&&!/^[a-z_]+:\s/i.test(e[l]);l++)o.push(e[l]);n=o.join(" ")}if(!n||n==="test failed")continue;let i="";for(let o=s+1;o<Math.min(e.length,s+12)&&!/^(?:\.{3}|not ok|ok)\b/.test(e[o]);o++){let l=/^name:\s*'?([\w.]+)'?$/.exec(e[o]);if(l){i=l[1];break}}t.push(i&&!n.startsWith(i)?`${i}: ${n}`:n)}return t}a(as,"tapErrors");function os(e){let t=e.split(/\r?\n/).map(n=>n.trim().replace(/^#\s?/,"").trim()).filter(Boolean),s=t.filter(n=>!De.test(n)&&!Me.test(n)&&!qe.test(n)),r=as(t)[0]??s.find(n=>Qt.test(n))??rs(s)??s.find(n=>ts.test(n))??s.find(n=>ss.test(n))??"";return is(r)}a(os,"failureReason");var J=a(e=>e,"asIs"),V=a(e=>`dir:${e.replace(/^\.\//,"").replace(/\/+$/,"")||"."}`,"dirTarget"),Le={pnpm:[{names:["-F","--filter","--filter-prod"],value:!0,target:J},{names:["-r","--recursive"],value:!1,target:a(()=>"*","target")},{names:["-C","--dir"],value:!0,target:V},{names:["-w","--workspace-root"],value:!1,target:a(()=>"root","target")}],npm:[{names:["-w","--workspace"],value:!0,target:J},{names:["-ws","--workspaces"],value:!1,target:a(()=>"*","target")},{names:["--prefix"],value:!0,target:V}],yarn:[{names:["--cwd"],value:!0,target:V}],bun:[{names:["-F","--filter"],value:!0,target:J},{names:["--cwd"],value:!0,target:V}]};function D(e,t,s){let r=e[t];for(let n of s)for(let i of n.names){if(n.value&&r.startsWith(`${i}=`))return{target:n.target(r.slice(i.length+1)),next:t+1};if(r!==i)continue;if(!n.value)return{target:n.target(""),next:t+1};let o=e[t+1];return o===void 0?void 0:{target:n.target(o),next:t+2}}}a(D,"targetOption");var us=/^(?:add|audit|bin|cache|ci|config|create|dedupe|deploy|dlx|env|exec|fetch|help|i|import|info|init|install|link|list|ls|login|logout|outdated|pack|patch|prune|publish|rebuild|remove|rm|root|set|setup|store|unlink|up|update|upgrade|version|view|why|x)$/;function ls(e,t){if(e==="npm")return/^(?:test|t|tst)$/.test(t)?"test":void 0;if(e!=="bun")return us.test(t)?void 0:t}a(ls,"scriptOf");function cs(e){let t=e[0],s=Le[t],r=[],n=[],i=1;for(;i<e.length;){let m=e[i],f=D(e,i,s);if(f)r.push(f.target),i=f.next;else if(t==="yarn"&&m==="workspace"&&e[i+1])r.push(e[i+1]),i+=2;else if(t==="yarn"&&m==="workspaces")for(r.push("*"),i+=e[i+1]==="foreach"?2:1;e[i]?.startsWith("-");)n.push(e[i++]);else if(m.startsWith("-"))n.push(m),i++;else break}let o=e[i];if(!o)return;let l=o==="run"||o==="run-script",d=l?e[i+1]:ls(t,o);if(l&&!d)return;i+=l?2:1;let h=[];for(;i<e.length;){let m=t==="npm"&&e[i]!=="--"?D(e,i,s):void 0;if(e[i]==="--"){h.push(...e.slice(i));break}m?(r.push(m.target),i=m.next):h.push(e[i++])}return{base:[...d?[t,...n,"run",d]:[t,...n,o],...h].join(" "),targets:r}}a(cs,"packageShape");function ds(e,t){let s=[{names:["-F","--filter"],value:!0,target:J}],r=[],n=[],i=[];for(let o=t[0]==="run"?1:0;o<t.length;){let l=D(t,o,s);l?(r.push(l.target),o=l.next):t[o].startsWith("-")||i.length>0?i.push(t[o++]):n.push(t[o++])}return{base:[...e,"turbo","run",...n.sort(),...i].join(" "),targets:r}}a(ds,"turboShape");var fs=/^(?:add|connect|daemon|exec|format(?::\w+)?|g|generate|graph|init|list|migrate|release|repair|report|reset|show|sync|view-logs|watch)$/;function ps(e,t){let[s,r]=t;if(!s||fs.test(s))return;let n=[...e,"nx"];if(s==="run-many"||s==="affected"){let o=[],l=[],d=[],h=[{names:["-p","--projects"],value:!0,target:J},{names:["-t","--target","--targets"],value:!0,target:a(m=>`task:${m}`,"target")}];for(let m=1;m<t.length;){let f=D(t,m,h);if(!f){d.push(t[m++]);continue}let p=f.target.replace(/^task:/,"").split(",").filter(Boolean);(f.target.startsWith("task:")?l:o).push(...p),m=f.next}return{base:[...n,s,...l.sort(),...d].join(" "),targets:o}}if(s==="run"){let o=r?.indexOf(":")??-1;return!r||o<0?void 0:{base:[...n,"run",r.slice(o),...t.slice(2)].join(" "),targets:o>0?[r.slice(0,o)]:[]}}let i=r&&!r.startsWith("-")?r:void 0;return{base:[...n,"run",`:${s}`,...t.slice(i?2:1)].join(" "),targets:i?[i]:[]}}a(ps,"nxShape");function ms(e){let t=[{names:["-p","--package"],value:!0,target:J}],s=[],r=[];for(let n=0;n<e.length;){let i=D(e,n,t);i?(s.push(i.target),n=i.next):r.push(e[n++])}return{base:r.join(" "),targets:s}}a(ms,"cargoShape");var ze=new Set(["-bench","-benchtime","-count","-coverpkg","-coverprofile","-covermode","-cpu","-exec","-o","-p","-parallel","-shuffle","-tags","-timeout","-vet"]);function hs(e){let t=[{names:["-run","--run"],value:!0,target:a(n=>`run:${n}`,"target")},{names:["-skip","--skip"],value:!0,target:a(n=>`skip:${n}`,"target")}],s=[],r=[];for(let n=2;n<e.length;){let i=e[n],o=D(e,n,t);o?(s.push(o.target),n=o.next):i.startsWith("-")?(r.push(ze.has(i)&&e[n+1]?`${i}=${e[n+1]}`:i),n+=ze.has(i)&&e[n+1]?2:1):(s.push(i),n++)}return{base:[...e.slice(0,2),...r].join(" "),targets:s}}a(hs,"goShape");var gs=new Set(["-c","-n","-o","-p","-W","--basetemp","--cov","--cov-report","--deselect","--durations","--ignore","--junitxml","--log-level","--maxfail","--rootdir","--tb"]);function ys(e,t){let s=[{names:["-k"],value:!0,target:a(i=>`k:${i}`,"target")},{names:["-m"],value:!0,target:a(i=>`m:${i}`,"target")}],r=[],n=[];for(let i=0;i<t.length;){let o=t[i],l=D(t,i,s);l?(r.push(l.target),i=l.next):gs.has(o)&&t[i+1]?(n.push(`${o}=${t[i+1]}`),i+=2):o.startsWith("-")?(n.push(o),i++):(r.push(o.replace(/^\.\//,"")),i++)}return{base:[...e,...n.sort()].join(" "),targets:r}}a(ys,"pytestShape");function bs(e){let t=[],s="",r,n=!1;for(let i of e)if(r)i===r?r=void 0:s+=i;else if(i==="'"||i==='"')r=i,n=!0;else if(/\s/.test(i))n&&t.push(s),s="",n=!1;else{if(/[|<>`$()]/.test(i))return;s+=i,n=!0}if(!r)return n&&t.push(s),t}a(bs,"words");function Ss(e){let t=bs(e),s={base:e,targets:[]};if(!t?.length)return s;let r=t.findIndex(n=>/^(?:turbo|nx|pytest|py\.test)$/.test(n));if(r>=0&&r<=3){let n=t.slice(0,r),i=t.slice(r+1);return t[r]==="turbo"?ds(n,i):t[r]==="nx"?ps(n,i)??s:ys([...n,"pytest"],i)}return Le[t[0]]?cs(t)??s:t[0]==="cargo"?ms(t):t[0]==="go"&&/^(?:test|build|vet)$/.test(t[1]??"")?hs(t):s}a(Ss,"shapeOf");function Be(e){let t="",s=[];for(let r of Xt(e).statements){let n=/^cd\s+("[^"]+"|'[^']+'|\S+)$/.exec(r);if(n){let m=n[1].replace(/^["']|["']$/g,"");t=t&&!m.startsWith("/")?`${t}/${m}`:m;continue}let i=r.replace(/\s+/g," ").trim(),o=Ss(i),l=[...new Set(o.targets)].sort(),d=l.length?`${o.base} \u27E8${l.join(" ")}\u27E9`:o.base;if(s.some(m=>m.dir===t&&m.key===d))continue;let h=Ce(i);s.push({dir:t,check:i,base:o.base,targets:l,key:d,...h?{intent:h}:{}})}return s}a(Be,"segmentsOf");function ws(e,t){let s=a((r,n)=>r.every(i=>n.includes(i)),"nested");return e.base===t.base&&(s(e.targets,t.targets)||s(t.targets,e.targets))?!0:e.check===t.check||` ${e.check} `.includes(` ${t.check} `)||` ${t.check} `.includes(` ${e.check} `)}a(ws,"overlaps");var Pe=/^(?:\/|~|\$)/;function Es(e,t){let s=Be(e),r=Be(t),n=a((u,c)=>u.dir===c.dir&&u.key===c.key,"same"),i=s.filter(u=>!r.some(c=>n(u,c)));if(i.length===0)return;let o=new Set(i.map(u=>u.intent)),l=r.filter(u=>!s.some(c=>n(u,c))||o.has(u.intent)),d=i.filter(u=>l.some(c=>c.intent===u.intent));if(d.length===0||l.length===0)return;let h=a(u=>Pe.test(u.dir)||u.targets.some(c=>c.startsWith("dir:")&&Pe.test(c.slice(4))),"elsewhere");if([...d,...l].some(h)||d.some(u=>l.some(c=>c.dir===u.dir&&ws(u,c))))return;let m=a(u=>{let c=u[0].dir;if(u.some(w=>w.dir!==c))return;let y=u.map(w=>w.check).join(" && ");return c?`cd ${c} && ${y}`:y},"joined"),f=m(d),p=m(l);if(!f||!p||f===p)return;let g=l.every(u=>d.some(c=>c.dir===u.dir&&c.base===u.base));return{bad:f,good:p,...g?{retargeted:!0}:{}}}a(Es,"fixCommands");var vs=/command not found|: not found|is not (?:set|defined)|Missing script|Cannot find (?:module|package)|ERR_MODULE_NOT_FOUND|ENOENT|No such file|unknown (?:option|command|script|flag)|not recognized as|No test files|No tests found|permission denied|EACCES|找不到|未设置|不存在|未找到/i,As=/AssertionError|^\s*(?:Expected|Received)(?: value)?:|\bexpected\b.*\b(?:received|to (?:be|equal)|but got)\b|\s!==?\s|^not ok \d+|^#\s*fail\s+[1-9]|^\s*\d+ (?:failing|failed)\b|Tests?:\s+\d+ failed|\berror TS\d+:|\d+ problems? \(\d+ errors?/im;function xs(e){return As.test(e)&&!vs.test(e)}a(xs,"codeFailed");import{mkdirSync as ks,readFileSync as _s}from"node:fs";import{dirname as js}from"node:path";var ue=1;function Ue(e){let t;try{t=_s(e,"utf8")}catch{return}try{let s=JSON.parse(t);return s&&typeof s=="object"&&!Array.isArray(s)?s:void 0}catch{return}}a(Ue,"readRaw");function $s(e,t){let s=Ue(e),r=s!==void 0&&re(s)>ue;return r&&$e(e),{value:t(s),readOnly:r}}a($s,"readDoc");function Os(e,t,s){return ks(js(e),{recursive:!0,mode:448}),ie(e,()=>{let r=Ue(e);if(r!==void 0&&re(r)>ue){$e(e);return}let n=s(t(r));if(n===void 0)return;let i={...r??{},...n,[At]:ue};return P(e,`${JSON.stringify(i,null," ")}
4
4
  `,{mode:384}),n})}a(Os,"updateDoc");function E(e,t){return typeof e=="string"?e.trim().slice(0,t):""}a(E,"str");function M(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?Math.floor(e):0}a(M,"num");function le(e,t,s){return Array.isArray(e)?e.filter(r=>typeof r=="string"&&r.length>0).map(r=>r.slice(0,s)).slice(-t):[]}a(le,"strList");function ce(e){return Array.isArray(e)?e.filter(t=>!!t&&typeof t=="object"&&!Array.isArray(t)):[]}a(ce,"records");var Or=10080*60*1e3,Ns=["harmful","ineffective","unused","user","malformed","outdated"],Is=6,Ts=12,Rs=20,Cs=["candidate","active","awaiting_user","retired","undone","expired"],Fs=["failure_then_fix","user_correction","repeated_detour","guard_denial","success_workflow","imported"],Ds=["helpful","harmful","neutral"],Ms=["deletion","permissions","credentials","network","publishing","dependencies"];function Je(e){return Tt(e,"lessons.json")}a(Je,"lessonsPath");function qs(e){let t=E(e.id,16),s=E(e.content,400);if(!/^[lu]-\d{4,6}$/.test(t)||!s)return;let r=Cs.includes(e.status)?e.status:"candidate",n=e.fix,i=e.proof,o=e.origin;return{...e,id:t,scope:e.scope==="user"?"user":"project",section:E(e.section,40)||"general",content:s,rootCause:E(e.rootCause,400),...E(e.signature,300)?{signature:E(e.signature,300)}:{},...n&&typeof n.good=="string"?{fix:{intent:E(n.intent,20),bad:E(n.bad,200),good:E(n.good,200),...E(n.dir,200)?{dir:E(n.dir,200)}:{}}}:{},status:r,risk:le(e.risk,5,20).filter(l=>Ms.includes(l)),sessions:le(e.sessions,Ts,80),evidence:ce(e.evidence).map(l=>({sessionId:E(l.sessionId,80),at:E(l.at,32),signal:Fs.includes(l.signal)?l.signal:"user_correction",note:E(l.note,300)})).slice(-Is),...i&&typeof i.at=="string"?{proof:{kind:i.kind==="outcome"?"outcome":"test",at:E(i.at,32),sessionId:E(i.sessionId,80),note:E(i.note,300)}}:{},helpful:M(e.helpful),harmful:M(e.harmful),...M(e.neutral)>0?{neutral:M(e.neutral)}:{},...M(e.injections)>0?{injections:M(e.injections)}:{},...E(e.lastInjectedAt,32)?{lastInjectedAt:E(e.lastInjectedAt,32)}:{},feedback:ce(e.feedback).filter(l=>Ds.includes(l.tag)).map(l=>({sessionId:E(l.sessionId,80),tag:l.tag,at:E(l.at,32),why:E(l.why,200)})).slice(-Rs),created:E(e.created,32),updated:E(e.updated,32),...E(e.activatedAt,32)?{activatedAt:E(e.activatedAt,32)}:{},...["sessions","proof","user","import","trial"].includes(e.activatedBy)?{activatedBy:e.activatedBy}:{},...E(e.lastHelpfulAt,32)?{lastHelpfulAt:E(e.lastHelpfulAt,32)}:{},...E(e.retiredAt,32)?{retiredAt:E(e.retiredAt,32)}:{},...Ns.includes(e.retiredReason)?{retiredReason:e.retiredReason}:{},...o&&o.kind==="desktop"?{origin:{kind:"desktop",projectId:E(o.projectId,32),ruleId:E(o.ruleId,16)}}:{}}}a(qs,"parseLesson");var X=a(e=>e.replace(/\s+/g," ").trim(),"fold");function Ls(e){if(!e.fix||!e.signature?.startsWith("fix:")||e.activatedBy==="user"||e.activatedBy==="import")return!1;let t=Es(e.fix.bad,e.fix.good);return!t||X(t.bad)!==X(e.fix.bad)||X(t.good)!==X(e.fix.good)||ns(e.rootCause)||e.rootCause.trim()&&!os(e.rootCause)||xs(e.rootCause)?!0:Dt({content:e.content})!==void 0}a(Ls,"isMalformed");var zs=["candidate","active","awaiting_user"];function Bs(e){return!zs.includes(e.status)||!Ls(e)?e:{...e,status:"retired",retiredAt:e.updated||e.created,retiredReason:"malformed"}}a(Bs,"retireMalformed");function Ps(e){if(e.activatedBy==="user"||e.activatedBy==="import")return e;let t=zt(e.fix?`${e.fix.good}
@@ -1 +1 @@
1
- var p=Object.defineProperty;var r=(e,t)=>p(e,"name",{value:t,configurable:!0});import{createRequire as a}from"node:module";const d=a(import.meta.url);import{classifySystemOne as s}from"./chunk-MPLE6M5C.js";import{isRecord as i}from"./chunk-IKSSB5ZJ.js";import"./chunk-ML5DIOWR.js";import"./chunk-BBNE2TWS.js";import"./chunk-UTB4DTYQ.js";import"./chunk-VDPDHGGJ.js";import"./chunk-4LDEEFCY.js";import"./chunk-F52JQCLE.js";import"./chunk-JXWJOIH4.js";var m={api:"typesafe-system-one",label:"System One API",detectCompat:r(e=>e.provider==="openrouter"||e.baseUrl.includes("openrouter.ai")?{imageInput:"state-image-urls",sendImageOptInHeader:!1}:{imageInput:"assets",sendImageOptInHeader:!0},"detectCompat"),url:r(e=>new URL("systemone",`${e.baseUrl.replace(/\/+$/u,"")}/`),"url"),payload:r((e,t)=>({model:e.id,...t}),"payload"),output:r(e=>{if(!i(e))throw new Error("System One API returned an unexpected response");return e},"output")},n=r((e,t,o)=>s(m,e,t,o),"classify");export{n as classify};
1
+ var p=Object.defineProperty;var r=(e,t)=>p(e,"name",{value:t,configurable:!0});import{createRequire as a}from"node:module";const d=a(import.meta.url);import{classifySystemOne as s}from"./chunk-RRLI6IMC.js";import{isRecord as i}from"./chunk-X2O23QIN.js";import"./chunk-ML5DIOWR.js";import"./chunk-THJSXCE4.js";import"./chunk-UTB4DTYQ.js";import"./chunk-4KCKRVPN.js";import"./chunk-4LDEEFCY.js";import"./chunk-CIJDL6I3.js";import"./chunk-JXWJOIH4.js";var m={api:"typesafe-system-one",label:"System One API",detectCompat:r(e=>e.provider==="openrouter"||e.baseUrl.includes("openrouter.ai")?{imageInput:"state-image-urls",sendImageOptInHeader:!1}:{imageInput:"assets",sendImageOptInHeader:!0},"detectCompat"),url:r(e=>new URL("systemone",`${e.baseUrl.replace(/\/+$/u,"")}/`),"url"),payload:r((e,t)=>({model:e.id,...t}),"payload"),output:r(e=>{if(!i(e))throw new Error("System One API returned an unexpected response");return e},"output")},n=r((e,t,o)=>s(m,e,t,o),"classify");export{n as classify};
@@ -1 +1 @@
1
- var k=Object.defineProperty;var a=(e,t)=>k(e,"name",{value:t,configurable:!0});import{createRequire as v}from"node:module";const pe=v(import.meta.url);import"./chunk-WLQ33LIH.js";import"./chunk-X63WCLSX.js";import"./chunk-J6H2LYOZ.js";import"./chunk-KT7CXVDN.js";import"./chunk-YOQ3KBG5.js";import"./chunk-XQF5XDEM.js";import"./chunk-JUUJCOIR.js";import"./chunk-NJDCSLWK.js";import"./chunk-C5ELI234.js";import"./chunk-4BOWD7PQ.js";import"./chunk-HF334NQU.js";import"./chunk-G5AMLGXC.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-QU2VEHMW.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-VDPDHGGJ.js";import"./chunk-4LDEEFCY.js";import"./chunk-F52JQCLE.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=a((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)}a(Y,"mightCarryUsage");var g=a(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,i={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 i.cost===0&&i.input+i.output+i.cacheRead+i.cacheWrite===0?void 0:i}a(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}a(S,"timeOf");var j=a(e=>`${e.input}:${e.output}:${e.cacheRead}:${e.cacheWrite}`,"fingerprint");function K(e){let t={sessionId:"",cwd:"",records:[],toolRepairs:[]},r=a((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"),i=0;for(;i<e.length;){let n=e.indexOf(H,i);n===-1&&(n=e.length);let d=e.subarray(i,n);if(i=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}a(K,"parseSessionBuffer");async function O(e,t=[]){let r;try{r=await W(e,{withFileTypes:!0})}catch{return t}for(let i of r){let n=E(e,i.name);i.isDirectory()?await O(n,t):i.isFile()&&i.name.endsWith(".jsonl")&&t.push(n)}return t}a(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}}a(Q,"readCache");async function X(e){let t=E(e,V),{doc:r,writable:i}=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),i&&d)try{L(t,JSON.stringify({formatVersion:w,files:n}))}catch{}return f}a(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 i=(r===void 0?e:e.slice(r.length)).split(/[\\/]/).filter(Boolean).slice(0,2);return r===void 0?`/${i.join("/")}`:i.length>0?`~/${i.join("/")}`:"~"}a(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 i=Number(r[1]);if(i>=1)return{kind:"days",days:i,label:`${i}d`}}}a(ee,"parseUsageRange");var _=a(()=>({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}a(M,"addInto");function te(e){let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}a(te,"startOfLocalDay");function re(e){let t=new Date(e),r=a(i=>String(i).padStart(2,"0"),"pad");return`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}`}a(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 i=new Date(r);return i.setDate(i.getDate()-(e.days-1)),i.getTime()}a(oe,"rangeStart");function ie(e){return e.source==="model"?e.label:e.source}a(ie,"modelKey");var ae={subagents:"\u5B50\u52A9\u624B",tools:"\u5DE5\u5177",housekeeping:"\u4E0A\u4E0B\u6587\u6574\u7406"};function se(e,t,r){let i=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=a((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<i||m.timestamp>r||n.has(m.key))continue;n.add(m.key),M(d,m),s.add(l.sessionId);let $=ie(m),R=re(m.timestamp);p("day",R,R,l.sessionId,m),p("model",$,m.source==="model"?m.label:U(ae[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<i||c.timestamp>r||u.has(c.key)||(u.add(c.key),y+=c.count);let N=a((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}}a(se,"buildReport");async function ne(e){let t=await X(e.agentDir??F());return se(t,e.range,e.now??Date.now())}a(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}:{}})}a(le,"collectUsage2");export{le as collectUsage};
1
+ var k=Object.defineProperty;var a=(e,t)=>k(e,"name",{value:t,configurable:!0});import{createRequire as v}from"node:module";const pe=v(import.meta.url);import"./chunk-EXWCUM6H.js";import"./chunk-4TEICWYC.js";import"./chunk-E6RWRE6C.js";import"./chunk-P3KSBU23.js";import"./chunk-RNSD5PAD.js";import"./chunk-XQ6Z77K4.js";import"./chunk-JUUJCOIR.js";import"./chunk-NJDCSLWK.js";import"./chunk-H3KG4L7I.js";import"./chunk-425HIJ4E.js";import"./chunk-B66W54NL.js";import"./chunk-G5AMLGXC.js";import"./chunk-LGD3AMTG.js";import"./chunk-NRQYSXAU.js";import"./chunk-6QGV3IWD.js";import{getAgentDir as F}from"./chunk-QM5JU2GS.js";import"./chunk-XJFQKN3N.js";import{declaredDataFormat as B,reportNewerDataFormat as C,t as U,writeFileAtomicSync as L}from"./chunk-3KEFLXX2.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-4KCKRVPN.js";import"./chunk-4LDEEFCY.js";import"./chunk-CIJDL6I3.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=a((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)}a(Y,"mightCarryUsage");var g=a(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,i={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 i.cost===0&&i.input+i.output+i.cacheRead+i.cacheWrite===0?void 0:i}a(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}a(S,"timeOf");var j=a(e=>`${e.input}:${e.output}:${e.cacheRead}:${e.cacheWrite}`,"fingerprint");function K(e){let t={sessionId:"",cwd:"",records:[],toolRepairs:[]},r=a((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"),i=0;for(;i<e.length;){let n=e.indexOf(H,i);n===-1&&(n=e.length);let d=e.subarray(i,n);if(i=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}a(K,"parseSessionBuffer");async function O(e,t=[]){let r;try{r=await W(e,{withFileTypes:!0})}catch{return t}for(let i of r){let n=E(e,i.name);i.isDirectory()?await O(n,t):i.isFile()&&i.name.endsWith(".jsonl")&&t.push(n)}return t}a(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}}a(Q,"readCache");async function X(e){let t=E(e,V),{doc:r,writable:i}=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),i&&d)try{L(t,JSON.stringify({formatVersion:w,files:n}))}catch{}return f}a(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 i=(r===void 0?e:e.slice(r.length)).split(/[\\/]/).filter(Boolean).slice(0,2);return r===void 0?`/${i.join("/")}`:i.length>0?`~/${i.join("/")}`:"~"}a(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 i=Number(r[1]);if(i>=1)return{kind:"days",days:i,label:`${i}d`}}}a(ee,"parseUsageRange");var _=a(()=>({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}a(M,"addInto");function te(e){let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}a(te,"startOfLocalDay");function re(e){let t=new Date(e),r=a(i=>String(i).padStart(2,"0"),"pad");return`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}`}a(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 i=new Date(r);return i.setDate(i.getDate()-(e.days-1)),i.getTime()}a(oe,"rangeStart");function ie(e){return e.source==="model"?e.label:e.source}a(ie,"modelKey");var ae={subagents:"\u5B50\u52A9\u624B",tools:"\u5DE5\u5177",housekeeping:"\u4E0A\u4E0B\u6587\u6574\u7406"};function se(e,t,r){let i=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=a((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<i||m.timestamp>r||n.has(m.key))continue;n.add(m.key),M(d,m),s.add(l.sessionId);let $=ie(m),R=re(m.timestamp);p("day",R,R,l.sessionId,m),p("model",$,m.source==="model"?m.label:U(ae[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<i||c.timestamp>r||u.has(c.key)||(u.add(c.key),y+=c.count);let N=a((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}}a(se,"buildReport");async function ne(e){let t=await X(e.agentDir??F());return se(t,e.range,e.now??Date.now())}a(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}:{}})}a(le,"collectUsage2");export{le as collectUsage};
@@ -1 +1 @@
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 o}from"./chunk-WLQ33LIH.js";import{DAL_ENGINE_PACKAGE_NAMES as n,dist_exports as p}from"./chunk-X63WCLSX.js";import"./chunk-J6H2LYOZ.js";import{all_exports as l,anthropicMessagesApi as M,azureOpenAIResponsesApi as S,bedrockConverseStreamApi as v,compile_exports as m,complete as R,completeSimple as N,generateImages as O,generateImagesOpenRouter as P,getApiProvider as y,getApiProviders as h,getImageModel as x,getImageModels as f,getImageProviders as D,getImagesApiProvider as H,getModel as V,getModels as G,getProviders as L,googleGenerativeAIApi as k,googleVertexApi as w,mistralConversationsApi as b,openAICodexResponsesApi as U,openAICompletionsApi as z,openAIResponsesApi as K,piMessagesApi as W,registerApiProvider as B,registerBuiltInApiProviders as F,registerBuiltInImagesApiProviders as Y,registerFauxProvider as q,registerImagesApiProvider as J,resetApiProviders as X,setBedrockProviderLoader as j,setBedrockProviderModule as Z,stream as $,streamAnthropic as Q,streamAzureOpenAIResponses as ee,streamGoogle as te,streamGoogleVertex as re,streamMistral as se,streamOpenAICodexResponses as oe,streamOpenAICompletions as ie,streamOpenAIResponses as ae,streamSimple as ne,streamSimpleAnthropic as pe,streamSimpleAzureOpenAIResponses as le,streamSimpleGoogle as me,streamSimpleGoogleVertex as Ae,streamSimpleMistral as ge,streamSimpleOpenAICodexResponses as de,streamSimpleOpenAICompletions as Ie,streamSimpleOpenAIResponses as _e,unregisterApiProviders as Te,value_exports as A}from"./chunk-KT7CXVDN.js";import{CACHE_WARMING_IDLE_CONTINUATION_PROBABILITY as Ce,CACHE_WARMING_MAX_AGE_MS as Ee,CACHE_WARMING_MAX_IDLE_AGE_MS as ce,CACHE_WARMING_MINIMUM_EXPECTED_SAVINGS as ue,createFauxCore as Me,envApiKeyAuth as Se,evaluateCacheWarming as ve,fauxAssistantMessage as Re,fauxProvider as Ne,fauxText as Oe,fauxThinking as Pe,fauxToolCall as ye,getCacheWarmingDelayMs as he,getCacheWarmingRequestOptions as xe,getOverflowPatterns as fe,getPromptCacheTtlMs as De,isCacheWarmingReplayable as He,isContextOverflow as Ve,isRecoverableLength as Ge,lazyOAuth as Le,validateToolArguments as ke,validateToolCall as we}from"./chunk-YOQ3KBG5.js";import"./chunk-XQF5XDEM.js";import{build_exports as g,typebox_exports as d}from"./chunk-JUUJCOIR.js";import{DEFAULT_MAX_AGENT_RETRY_DELAY_MS as be,isAccountLimitAssistantError as Ue,isNetworkAssistantError as ze,isRetryableAssistantError as Ke,retryAssistantCall as We,retryDelayMs as Be}from"./chunk-NJDCSLWK.js";import"./chunk-C5ELI234.js";import"./chunk-4BOWD7PQ.js";import"./chunk-HF334NQU.js";import"./chunk-G5AMLGXC.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-QU2VEHMW.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 ot}from"./chunk-ZG74NES2.js";import"./chunk-TMTOQ7H7.js";import"./chunk-7DDKXS2Q.js";import{StreamingJsonParser as it,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-VDPDHGGJ.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 or,getIdentityHeaders as ir,getOpenCodeSessionHeaders as ar,getSystemMessageText as nr,mergeClientIdentity as pr,renderSystemMessageUpdate as lr,withClientIdentity as mr}from"./chunk-F52JQCLE.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(()=>Ce,"CACHE_WARMING_IDLE_CONTINUATION_PROBABILITY"),CACHE_WARMING_MAX_AGE_MS:e(()=>Ee,"CACHE_WARMING_MAX_AGE_MS"),CACHE_WARMING_MAX_IDLE_AGE_MS:e(()=>ce,"CACHE_WARMING_MAX_IDLE_AGE_MS"),CACHE_WARMING_MINIMUM_EXPECTED_SAVINGS:e(()=>ue,"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(()=>it,"StreamingJsonParser"),StringEnum:e(()=>gr,"StringEnum"),ToolCallArgumentsStream:e(()=>at,"ToolCallArgumentsStream"),Type:e(()=>d,"Type"),anthropicMessagesApi:e(()=>M,"anthropicMessagesApi"),appendAssistantMessageDiagnostic:e(()=>Yt,"appendAssistantMessageDiagnostic"),azureOpenAIResponsesApi:e(()=>S,"azureOpenAIResponsesApi"),bedrockConverseStreamApi:e(()=>v,"bedrockConverseStreamApi"),calculateCost:e(()=>_t,"calculateCost"),clampThinkingLevel:e(()=>Tt,"clampThinkingLevel"),cleanupSessionResources:e(()=>st,"cleanupSessionResources"),collapseSystemMessages:e(()=>Ct,"collapseSystemMessages"),complete:e(()=>R,"complete"),completeSimple:e(()=>N,"completeSimple"),contentText:e(()=>tr,"contentText"),createAssistantMessageDiagnostic:e(()=>qt,"createAssistantMessageDiagnostic"),createAssistantMessageEventStream:e(()=>Jt,"createAssistantMessageEventStream"),createFauxCore:e(()=>Me,"createFauxCore"),createInitialSystemMessage:e(()=>Et,"createInitialSystemMessage"),createModels:e(()=>ct,"createModels"),createProvider:e(()=>ut,"createProvider"),declarationsEqual:e(()=>Mt,"declarationsEqual"),defaultProviderAuthContext:e(()=>St,"defaultProviderAuthContext"),envApiKeyAuth:e(()=>Se,"envApiKeyAuth"),evaluateCacheWarming:e(()=>ve,"evaluateCacheWarming"),extractDiagnosticError:e(()=>Xt,"extractDiagnosticError"),fauxAssistantMessage:e(()=>Re,"fauxAssistantMessage"),fauxProvider:e(()=>Ne,"fauxProvider"),fauxText:e(()=>Oe,"fauxText"),fauxThinking:e(()=>Pe,"fauxThinking"),fauxToolCall:e(()=>ye,"fauxToolCall"),findEnvKeys:e(()=>et,"findEnvKeys"),firstTokenTimeoutMessage:e(()=>jt,"firstTokenTimeoutMessage"),formatThrownValue:e(()=>Zt,"formatThrownValue"),formatUserAgent:e(()=>rr,"formatUserAgent"),generateImages:e(()=>O,"generateImages"),generateImagesOpenRouter:e(()=>P,"generateImagesOpenRouter"),getApiProvider:e(()=>y,"getApiProvider"),getApiProviders:e(()=>h,"getApiProviders"),getAttributionHeaders:e(()=>sr,"getAttributionHeaders"),getCacheWarmingDelayMs:e(()=>he,"getCacheWarmingDelayMs"),getCacheWarmingRequestOptions:e(()=>xe,"getCacheWarmingRequestOptions"),getClientVersion:e(()=>or,"getClientVersion"),getCurrentSystemMessage:e(()=>vt,"getCurrentSystemMessage"),getCurrentSystemPrompt:e(()=>Rt,"getCurrentSystemPrompt"),getCurrentTools:e(()=>Nt,"getCurrentTools"),getDeclaredTools:e(()=>Ot,"getDeclaredTools"),getEnvApiKey:e(()=>tt,"getEnvApiKey"),getIdentityHeaders:e(()=>ir,"getIdentityHeaders"),getImageModel:e(()=>x,"getImageModel"),getImageModels:e(()=>f,"getImageModels"),getImageProviders:e(()=>D,"getImageProviders"),getImagesApiProvider:e(()=>H,"getImagesApiProvider"),getInitialSystemMessage:e(()=>Pt,"getInitialSystemMessage"),getModel:e(()=>V,"getModel"),getModelType:e(()=>yt,"getModelType"),getModels:e(()=>G,"getModels"),getOpenCodeSessionHeaders:e(()=>ar,"getOpenCodeSessionHeaders"),getOverflowPatterns:e(()=>fe,"getOverflowPatterns"),getPromptCacheTtlMs:e(()=>De,"getPromptCacheTtlMs"),getProviders:e(()=>L,"getProviders"),getSupportedThinkingLevels:e(()=>ht,"getSupportedThinkingLevels"),getSystemMessageText:e(()=>nr,"getSystemMessageText"),getToolStateChanges:e(()=>xt,"getToolStateChanges"),googleGenerativeAIApi:e(()=>k,"googleGenerativeAIApi"),googleVertexApi:e(()=>w,"googleVertexApi"),hasApi:e(()=>ft,"hasApi"),hasNonAdditiveToolChanges:e(()=>Dt,"hasNonAdditiveToolChanges"),hasToolRedefinitions:e(()=>Ht,"hasToolRedefinitions"),isAccountLimitAssistantError:e(()=>Ue,"isAccountLimitAssistantError"),isCacheWarmingReplayable:e(()=>He,"isCacheWarmingReplayable"),isContextOverflow:e(()=>Ve,"isContextOverflow"),isModelType:e(()=>Vt,"isModelType"),isNetworkAssistantError:e(()=>ze,"isNetworkAssistantError"),isRecoverableLength:e(()=>Ge,"isRecoverableLength"),isRetryableAssistantError:e(()=>Ke,"isRetryableAssistantError"),lazyApi:e(()=>Gt,"lazyApi"),lazyOAuth:e(()=>Le,"lazyOAuth"),lazyStream:e(()=>Lt,"lazyStream"),mergeClientIdentity:e(()=>pr,"mergeClientIdentity"),mistralConversationsApi:e(()=>b,"mistralConversationsApi"),modelsAreEqual:e(()=>kt,"modelsAreEqual"),normalizeContext:e(()=>wt,"normalizeContext"),openAICodexResponsesApi:e(()=>U,"openAICodexResponsesApi"),openAICompletionsApi:e(()=>z,"openAICompletionsApi"),openAIResponsesApi:e(()=>K,"openAIResponsesApi"),parseJsonWithRepair:e(()=>nt,"parseJsonWithRepair"),parseStreamingJson:e(()=>pt,"parseStreamingJson"),parseToolCallArguments:e(()=>lt,"parseToolCallArguments"),piMessagesApi:e(()=>W,"piMessagesApi"),registerApiProvider:e(()=>B,"registerApiProvider"),registerBuiltInApiProviders:e(()=>F,"registerBuiltInApiProviders"),registerBuiltInImagesApiProviders:e(()=>Y,"registerBuiltInImagesApiProviders"),registerFauxProvider:e(()=>q,"registerFauxProvider"),registerImagesApiProvider:e(()=>J,"registerImagesApiProvider"),registerSessionResourceCleanup:e(()=>ot,"registerSessionResourceCleanup"),renderSystemMessageUpdate:e(()=>lr,"renderSystemMessageUpdate"),repairJson:e(()=>mt,"repairJson"),resetApiProviders:e(()=>X,"resetApiProviders"),resolveTranscript:e(()=>bt,"resolveTranscript"),resolveTranscriptTools:e(()=>Ut,"resolveTranscriptTools"),retryAssistantCall:e(()=>We,"retryAssistantCall"),retryDelayMs:e(()=>Be,"retryDelayMs"),setAmbientAuthPolicy:e(()=>zt,"setAmbientAuthPolicy"),setBedrockProviderLoader:e(()=>j,"setBedrockProviderLoader"),setBedrockProviderModule:e(()=>Z,"setBedrockProviderModule"),setEnvApiKeyPolicy:e(()=>rt,"setEnvApiKeyPolicy"),stream:e(()=>$,"stream"),streamAnthropic:e(()=>Q,"streamAnthropic"),streamAzureOpenAIResponses:e(()=>ee,"streamAzureOpenAIResponses"),streamGoogle:e(()=>te,"streamGoogle"),streamGoogleVertex:e(()=>re,"streamGoogleVertex"),streamMistral:e(()=>se,"streamMistral"),streamOpenAICodexResponses:e(()=>oe,"streamOpenAICodexResponses"),streamOpenAICompletions:e(()=>ie,"streamOpenAICompletions"),streamOpenAIResponses:e(()=>ae,"streamOpenAIResponses"),streamSimple:e(()=>ne,"streamSimple"),streamSimpleAnthropic:e(()=>pe,"streamSimpleAnthropic"),streamSimpleAzureOpenAIResponses:e(()=>le,"streamSimpleAzureOpenAIResponses"),streamSimpleGoogle:e(()=>me,"streamSimpleGoogle"),streamSimpleGoogleVertex:e(()=>Ae,"streamSimpleGoogleVertex"),streamSimpleMistral:e(()=>ge,"streamSimpleMistral"),streamSimpleOpenAICodexResponses:e(()=>de,"streamSimpleOpenAICodexResponses"),streamSimpleOpenAICompletions:e(()=>Ie,"streamSimpleOpenAICompletions"),streamSimpleOpenAIResponses:e(()=>_e,"streamSimpleOpenAIResponses"),toToolDeclaration:e(()=>Kt,"toToolDeclaration"),unregisterApiProviders:e(()=>Te,"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 i={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":o,"@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":o},dr={sdk:e(()=>import("./sdk-32L63XRF.js"),"sdk"),office:e(()=>import("./office-UBOUFRAU.js"),"office"),mcp:e(()=>import("./mcp-F3BQ6MQW.js"),"mcp"),router:e(()=>import("./router-V3EIAYOF.js"),"router"),rewind:e(()=>import("./rewind-2OYLDDHH.js"),"rewind"),review:e(()=>import("./review-WTYIVWYR.js"),"review"),usage:e(()=>import("./usage-JODQIC2H.js"),"usage"),sync:e(()=>import("./sync-Z5USQ7AN.js"),"sync")};for(let r of n)i[r]=o;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(i,`${E}/${r}`,C)}export{i as VIRTUAL_MODULES};
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 o}from"./chunk-EXWCUM6H.js";import{DAL_ENGINE_PACKAGE_NAMES as n,dist_exports as p}from"./chunk-4TEICWYC.js";import"./chunk-E6RWRE6C.js";import{all_exports as l,anthropicMessagesApi as M,azureOpenAIResponsesApi as S,bedrockConverseStreamApi as v,compile_exports as m,complete as R,completeSimple as N,generateImages as O,generateImagesOpenRouter as P,getApiProvider as y,getApiProviders as h,getImageModel as x,getImageModels as f,getImageProviders as D,getImagesApiProvider as H,getModel as V,getModels as G,getProviders as L,googleGenerativeAIApi as k,googleVertexApi as w,mistralConversationsApi as b,openAICodexResponsesApi as U,openAICompletionsApi as z,openAIResponsesApi as K,piMessagesApi as W,registerApiProvider as B,registerBuiltInApiProviders as F,registerBuiltInImagesApiProviders as Y,registerFauxProvider as q,registerImagesApiProvider as J,resetApiProviders as X,setBedrockProviderLoader as j,setBedrockProviderModule as Z,stream as $,streamAnthropic as Q,streamAzureOpenAIResponses as ee,streamGoogle as te,streamGoogleVertex as re,streamMistral as se,streamOpenAICodexResponses as oe,streamOpenAICompletions as ie,streamOpenAIResponses as ae,streamSimple as ne,streamSimpleAnthropic as pe,streamSimpleAzureOpenAIResponses as le,streamSimpleGoogle as me,streamSimpleGoogleVertex as Ae,streamSimpleMistral as ge,streamSimpleOpenAICodexResponses as de,streamSimpleOpenAICompletions as Ie,streamSimpleOpenAIResponses as _e,unregisterApiProviders as Te,value_exports as A}from"./chunk-P3KSBU23.js";import{CACHE_WARMING_IDLE_CONTINUATION_PROBABILITY as Ce,CACHE_WARMING_MAX_AGE_MS as Ee,CACHE_WARMING_MAX_IDLE_AGE_MS as ce,CACHE_WARMING_MINIMUM_EXPECTED_SAVINGS as ue,createFauxCore as Me,envApiKeyAuth as Se,evaluateCacheWarming as ve,fauxAssistantMessage as Re,fauxProvider as Ne,fauxText as Oe,fauxThinking as Pe,fauxToolCall as ye,getCacheWarmingDelayMs as he,getCacheWarmingRequestOptions as xe,getOverflowPatterns as fe,getPromptCacheTtlMs as De,isCacheWarmingReplayable as He,isContextOverflow as Ve,isRecoverableLength as Ge,lazyOAuth as Le,validateToolArguments as ke,validateToolCall as we}from"./chunk-RNSD5PAD.js";import"./chunk-XQ6Z77K4.js";import{build_exports as g,typebox_exports as d}from"./chunk-JUUJCOIR.js";import{DEFAULT_MAX_AGENT_RETRY_DELAY_MS as be,isAccountLimitAssistantError as Ue,isNetworkAssistantError as ze,isRetryableAssistantError as Ke,retryAssistantCall as We,retryDelayMs as Be}from"./chunk-NJDCSLWK.js";import"./chunk-H3KG4L7I.js";import"./chunk-425HIJ4E.js";import"./chunk-B66W54NL.js";import"./chunk-G5AMLGXC.js";import"./chunk-LGD3AMTG.js";import{dist_exports as I}from"./chunk-NRQYSXAU.js";import"./chunk-6QGV3IWD.js";import"./chunk-QM5JU2GS.js";import"./chunk-XJFQKN3N.js";import"./chunk-3KEFLXX2.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 ot}from"./chunk-ZG74NES2.js";import"./chunk-TMTOQ7H7.js";import"./chunk-7DDKXS2Q.js";import{StreamingJsonParser as it,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-4KCKRVPN.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 or,getIdentityHeaders as ir,getOpenCodeSessionHeaders as ar,getSystemMessageText as nr,mergeClientIdentity as pr,renderSystemMessageUpdate as lr,withClientIdentity as mr}from"./chunk-CIJDL6I3.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(()=>Ce,"CACHE_WARMING_IDLE_CONTINUATION_PROBABILITY"),CACHE_WARMING_MAX_AGE_MS:e(()=>Ee,"CACHE_WARMING_MAX_AGE_MS"),CACHE_WARMING_MAX_IDLE_AGE_MS:e(()=>ce,"CACHE_WARMING_MAX_IDLE_AGE_MS"),CACHE_WARMING_MINIMUM_EXPECTED_SAVINGS:e(()=>ue,"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(()=>it,"StreamingJsonParser"),StringEnum:e(()=>gr,"StringEnum"),ToolCallArgumentsStream:e(()=>at,"ToolCallArgumentsStream"),Type:e(()=>d,"Type"),anthropicMessagesApi:e(()=>M,"anthropicMessagesApi"),appendAssistantMessageDiagnostic:e(()=>Yt,"appendAssistantMessageDiagnostic"),azureOpenAIResponsesApi:e(()=>S,"azureOpenAIResponsesApi"),bedrockConverseStreamApi:e(()=>v,"bedrockConverseStreamApi"),calculateCost:e(()=>_t,"calculateCost"),clampThinkingLevel:e(()=>Tt,"clampThinkingLevel"),cleanupSessionResources:e(()=>st,"cleanupSessionResources"),collapseSystemMessages:e(()=>Ct,"collapseSystemMessages"),complete:e(()=>R,"complete"),completeSimple:e(()=>N,"completeSimple"),contentText:e(()=>tr,"contentText"),createAssistantMessageDiagnostic:e(()=>qt,"createAssistantMessageDiagnostic"),createAssistantMessageEventStream:e(()=>Jt,"createAssistantMessageEventStream"),createFauxCore:e(()=>Me,"createFauxCore"),createInitialSystemMessage:e(()=>Et,"createInitialSystemMessage"),createModels:e(()=>ct,"createModels"),createProvider:e(()=>ut,"createProvider"),declarationsEqual:e(()=>Mt,"declarationsEqual"),defaultProviderAuthContext:e(()=>St,"defaultProviderAuthContext"),envApiKeyAuth:e(()=>Se,"envApiKeyAuth"),evaluateCacheWarming:e(()=>ve,"evaluateCacheWarming"),extractDiagnosticError:e(()=>Xt,"extractDiagnosticError"),fauxAssistantMessage:e(()=>Re,"fauxAssistantMessage"),fauxProvider:e(()=>Ne,"fauxProvider"),fauxText:e(()=>Oe,"fauxText"),fauxThinking:e(()=>Pe,"fauxThinking"),fauxToolCall:e(()=>ye,"fauxToolCall"),findEnvKeys:e(()=>et,"findEnvKeys"),firstTokenTimeoutMessage:e(()=>jt,"firstTokenTimeoutMessage"),formatThrownValue:e(()=>Zt,"formatThrownValue"),formatUserAgent:e(()=>rr,"formatUserAgent"),generateImages:e(()=>O,"generateImages"),generateImagesOpenRouter:e(()=>P,"generateImagesOpenRouter"),getApiProvider:e(()=>y,"getApiProvider"),getApiProviders:e(()=>h,"getApiProviders"),getAttributionHeaders:e(()=>sr,"getAttributionHeaders"),getCacheWarmingDelayMs:e(()=>he,"getCacheWarmingDelayMs"),getCacheWarmingRequestOptions:e(()=>xe,"getCacheWarmingRequestOptions"),getClientVersion:e(()=>or,"getClientVersion"),getCurrentSystemMessage:e(()=>vt,"getCurrentSystemMessage"),getCurrentSystemPrompt:e(()=>Rt,"getCurrentSystemPrompt"),getCurrentTools:e(()=>Nt,"getCurrentTools"),getDeclaredTools:e(()=>Ot,"getDeclaredTools"),getEnvApiKey:e(()=>tt,"getEnvApiKey"),getIdentityHeaders:e(()=>ir,"getIdentityHeaders"),getImageModel:e(()=>x,"getImageModel"),getImageModels:e(()=>f,"getImageModels"),getImageProviders:e(()=>D,"getImageProviders"),getImagesApiProvider:e(()=>H,"getImagesApiProvider"),getInitialSystemMessage:e(()=>Pt,"getInitialSystemMessage"),getModel:e(()=>V,"getModel"),getModelType:e(()=>yt,"getModelType"),getModels:e(()=>G,"getModels"),getOpenCodeSessionHeaders:e(()=>ar,"getOpenCodeSessionHeaders"),getOverflowPatterns:e(()=>fe,"getOverflowPatterns"),getPromptCacheTtlMs:e(()=>De,"getPromptCacheTtlMs"),getProviders:e(()=>L,"getProviders"),getSupportedThinkingLevels:e(()=>ht,"getSupportedThinkingLevels"),getSystemMessageText:e(()=>nr,"getSystemMessageText"),getToolStateChanges:e(()=>xt,"getToolStateChanges"),googleGenerativeAIApi:e(()=>k,"googleGenerativeAIApi"),googleVertexApi:e(()=>w,"googleVertexApi"),hasApi:e(()=>ft,"hasApi"),hasNonAdditiveToolChanges:e(()=>Dt,"hasNonAdditiveToolChanges"),hasToolRedefinitions:e(()=>Ht,"hasToolRedefinitions"),isAccountLimitAssistantError:e(()=>Ue,"isAccountLimitAssistantError"),isCacheWarmingReplayable:e(()=>He,"isCacheWarmingReplayable"),isContextOverflow:e(()=>Ve,"isContextOverflow"),isModelType:e(()=>Vt,"isModelType"),isNetworkAssistantError:e(()=>ze,"isNetworkAssistantError"),isRecoverableLength:e(()=>Ge,"isRecoverableLength"),isRetryableAssistantError:e(()=>Ke,"isRetryableAssistantError"),lazyApi:e(()=>Gt,"lazyApi"),lazyOAuth:e(()=>Le,"lazyOAuth"),lazyStream:e(()=>Lt,"lazyStream"),mergeClientIdentity:e(()=>pr,"mergeClientIdentity"),mistralConversationsApi:e(()=>b,"mistralConversationsApi"),modelsAreEqual:e(()=>kt,"modelsAreEqual"),normalizeContext:e(()=>wt,"normalizeContext"),openAICodexResponsesApi:e(()=>U,"openAICodexResponsesApi"),openAICompletionsApi:e(()=>z,"openAICompletionsApi"),openAIResponsesApi:e(()=>K,"openAIResponsesApi"),parseJsonWithRepair:e(()=>nt,"parseJsonWithRepair"),parseStreamingJson:e(()=>pt,"parseStreamingJson"),parseToolCallArguments:e(()=>lt,"parseToolCallArguments"),piMessagesApi:e(()=>W,"piMessagesApi"),registerApiProvider:e(()=>B,"registerApiProvider"),registerBuiltInApiProviders:e(()=>F,"registerBuiltInApiProviders"),registerBuiltInImagesApiProviders:e(()=>Y,"registerBuiltInImagesApiProviders"),registerFauxProvider:e(()=>q,"registerFauxProvider"),registerImagesApiProvider:e(()=>J,"registerImagesApiProvider"),registerSessionResourceCleanup:e(()=>ot,"registerSessionResourceCleanup"),renderSystemMessageUpdate:e(()=>lr,"renderSystemMessageUpdate"),repairJson:e(()=>mt,"repairJson"),resetApiProviders:e(()=>X,"resetApiProviders"),resolveTranscript:e(()=>bt,"resolveTranscript"),resolveTranscriptTools:e(()=>Ut,"resolveTranscriptTools"),retryAssistantCall:e(()=>We,"retryAssistantCall"),retryDelayMs:e(()=>Be,"retryDelayMs"),setAmbientAuthPolicy:e(()=>zt,"setAmbientAuthPolicy"),setBedrockProviderLoader:e(()=>j,"setBedrockProviderLoader"),setBedrockProviderModule:e(()=>Z,"setBedrockProviderModule"),setEnvApiKeyPolicy:e(()=>rt,"setEnvApiKeyPolicy"),stream:e(()=>$,"stream"),streamAnthropic:e(()=>Q,"streamAnthropic"),streamAzureOpenAIResponses:e(()=>ee,"streamAzureOpenAIResponses"),streamGoogle:e(()=>te,"streamGoogle"),streamGoogleVertex:e(()=>re,"streamGoogleVertex"),streamMistral:e(()=>se,"streamMistral"),streamOpenAICodexResponses:e(()=>oe,"streamOpenAICodexResponses"),streamOpenAICompletions:e(()=>ie,"streamOpenAICompletions"),streamOpenAIResponses:e(()=>ae,"streamOpenAIResponses"),streamSimple:e(()=>ne,"streamSimple"),streamSimpleAnthropic:e(()=>pe,"streamSimpleAnthropic"),streamSimpleAzureOpenAIResponses:e(()=>le,"streamSimpleAzureOpenAIResponses"),streamSimpleGoogle:e(()=>me,"streamSimpleGoogle"),streamSimpleGoogleVertex:e(()=>Ae,"streamSimpleGoogleVertex"),streamSimpleMistral:e(()=>ge,"streamSimpleMistral"),streamSimpleOpenAICodexResponses:e(()=>de,"streamSimpleOpenAICodexResponses"),streamSimpleOpenAICompletions:e(()=>Ie,"streamSimpleOpenAICompletions"),streamSimpleOpenAIResponses:e(()=>_e,"streamSimpleOpenAIResponses"),toToolDeclaration:e(()=>Kt,"toToolDeclaration"),unregisterApiProviders:e(()=>Te,"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 i={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":o,"@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":o},dr={sdk:e(()=>import("./sdk-Z2BPQBYQ.js"),"sdk"),office:e(()=>import("./office-OKOPPNJS.js"),"office"),mcp:e(()=>import("./mcp-GYBI424O.js"),"mcp"),router:e(()=>import("./router-6IBMTBKX.js"),"router"),rewind:e(()=>import("./rewind-2OYLDDHH.js"),"rewind"),review:e(()=>import("./review-GXC4JNBH.js"),"review"),usage:e(()=>import("./usage-WQOCA772.js"),"usage"),sync:e(()=>import("./sync-Q7ZHP4AB.js"),"sync")};for(let r of n)i[r]=o;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(i,`${E}/${r}`,C)}export{i as VIRTUAL_MODULES};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- var o=Object.defineProperty;var r=(i,t)=>o(i,"name",{value:t,configurable:!0});import{createRequire as p}from"node:module";const a=p(import.meta.url);import{configureHttpDispatcher as m,main as e}from"./chunks/chunk-X63WCLSX.js";import"./chunks/chunk-J6H2LYOZ.js";import"./chunks/chunk-KT7CXVDN.js";import"./chunks/chunk-YOQ3KBG5.js";import"./chunks/chunk-XQF5XDEM.js";import"./chunks/chunk-JUUJCOIR.js";import"./chunks/chunk-NJDCSLWK.js";import"./chunks/chunk-C5ELI234.js";import"./chunks/chunk-4BOWD7PQ.js";import"./chunks/chunk-HF334NQU.js";import"./chunks/chunk-G5AMLGXC.js";import"./chunks/chunk-F5SIUTR7.js";import"./chunks/chunk-AL3DFAIM.js";import"./chunks/chunk-6QGV3IWD.js";import{APP_NAME as s}from"./chunks/chunk-R47JBGS3.js";import"./chunks/chunk-XJFQKN3N.js";import"./chunks/chunk-QU2VEHMW.js";import"./chunks/chunk-IEBK4HQA.js";import"./chunks/chunk-5AGIVGSV.js";import"./chunks/chunk-723ZGEZ2.js";import"./chunks/chunk-ZG74NES2.js";import"./chunks/chunk-TMTOQ7H7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-FFMDRXC4.js";import"./chunks/chunk-VDPDHGGJ.js";import"./chunks/chunk-4LDEEFCY.js";import"./chunks/chunk-F52JQCLE.js";import"./chunks/chunk-JXWJOIH4.js";function n(){process.title=s,process.env.PI_CODING_AGENT="true",process.env.AI_AGENT="pi",process.emitWarning=(()=>{}),m()}r(n,"setupCli"),n(),e(process.argv.slice(2));
2
+ var o=Object.defineProperty;var r=(i,t)=>o(i,"name",{value:t,configurable:!0});import{createRequire as p}from"node:module";const a=p(import.meta.url);import{configureHttpDispatcher as m,main as e}from"./chunks/chunk-4TEICWYC.js";import"./chunks/chunk-E6RWRE6C.js";import"./chunks/chunk-P3KSBU23.js";import"./chunks/chunk-RNSD5PAD.js";import"./chunks/chunk-XQ6Z77K4.js";import"./chunks/chunk-JUUJCOIR.js";import"./chunks/chunk-NJDCSLWK.js";import"./chunks/chunk-H3KG4L7I.js";import"./chunks/chunk-425HIJ4E.js";import"./chunks/chunk-B66W54NL.js";import"./chunks/chunk-G5AMLGXC.js";import"./chunks/chunk-LGD3AMTG.js";import"./chunks/chunk-NRQYSXAU.js";import"./chunks/chunk-6QGV3IWD.js";import{APP_NAME as s}from"./chunks/chunk-QM5JU2GS.js";import"./chunks/chunk-XJFQKN3N.js";import"./chunks/chunk-3KEFLXX2.js";import"./chunks/chunk-IEBK4HQA.js";import"./chunks/chunk-5AGIVGSV.js";import"./chunks/chunk-723ZGEZ2.js";import"./chunks/chunk-ZG74NES2.js";import"./chunks/chunk-TMTOQ7H7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-FFMDRXC4.js";import"./chunks/chunk-4KCKRVPN.js";import"./chunks/chunk-4LDEEFCY.js";import"./chunks/chunk-CIJDL6I3.js";import"./chunks/chunk-JXWJOIH4.js";function n(){process.title=s,process.env.PI_CODING_AGENT="true",process.env.AI_AGENT="pi",process.emitWarning=(()=>{}),m()}r(n,"setupCli"),n(),e(process.argv.slice(2));
@@ -1 +1 @@
1
- import{createRequire as e}from"node:module";const ci=e(import.meta.url);import{DAL_HOOK_ENTRY_TYPE as o,DAL_HOOK_NOTIFICATION_CHANNEL as t,STALE_AFTER_MS as r,ShowImagesSelectorComponent as i,ThemeSelectorComponent as n,WORKSPACE_LOCK_DIR_NAME as a,WORKSPACE_LOCK_FILE as s,buildDalHookInput as l,claimWorkspace as m,dalHookActivity as c,dalHooksExtension as p,decideDalHooks as S,defaultWorkspaceLockDir as d,engineToolInput as E,formatDalHookActivity as T,gitDirOf as u,hookToolInput as g,hookToolName as C,isDalHookActivity as D,readWorkspaceLock as R,releaseWorkspace as _,reportDalHookProblems as A,runDalCommandHook as h,runDalHookEvent as k,runDalHooks as P,runNotificationHooks as L,runPostToolUseHooks as O,runPreToolUseHooks as f,runSessionStartHooks as H,runStopHooks as I,runUserPromptSubmitHooks as M,selectDalHooks as N,shellCommandDirectory as F,toolMatchNames as y,workspaceLockIsLive as x,workspaceLockPath as v,workspaceOwnerSessionId as U}from"./chunks/chunk-WLQ33LIH.js";import{ADAPTATION_FILE as b,AgentSession as B,AgentSessionRuntime as w,AssistantMessageComponent as K,BackgroundProcessManager as W,BashExecutionComponent as j,BorderedLoader as V,BranchSummaryMessageComponent as G,CompactionSummaryMessageComponent as z,CustomEditor as X,CustomMessageComponent as q,DEFAULT_COMPACTION_SETTINGS as Y,DefaultPackageManager as J,DefaultResourceLoader as Q,DynamicBorder as Z,ENGINE_MARKET_CACHE_FILE as $,ExtensionEditorComponent as ee,ExtensionFatalError as oe,ExtensionInputComponent as te,ExtensionRunner as re,ExtensionSelectorComponent as ie,FooterComponent as ne,HOST_CAPABILITIES_ENV as ae,HOST_TOKEN_ENV as se,HOST_TOKEN_HEADER as le,HOST_URL_ENV as me,HostCallError as ce,HostCapabilities as pe,InteractiveMode as Se,LoginDialogComponent as de,MARKET_SECTIONS as Ee,MAX_BACKGROUND_PROCESSES as Te,ModelRegistry as ue,ModelSelectorComponent as ge,OAuthSelectorComponent as Ce,PROTECTED_WRITE_NAMES as De,REQUIRED_EXTENSION_FAILED as Re,RequiredExtensionError as _e,RpcClient as Ae,RpcCommandError as he,SANDBOX_ENV as ke,SessionSelectorComponent as Pe,SettingsManager as Le,SettingsSelectorComponent as Oe,ShellSandbox as fe,SkillInvocationMessageComponent as He,ThinkingSelectorComponent as Ie,ToolExecutionComponent as Me,TreeSelectorComponent as Ne,UserMessageComponent as Fe,UserMessageSelectorComponent as ye,adaptPackage as xe,adaptationState as ve,agentLogPath as Ue,appendAgentLog as be,applyCommunityEnv as Be,buildProjectMap as we,buildRuleSet as Ke,calculateContextTokens as We,collectEntriesForBranchSummary as je,communityEnv as Ve,compact as Ge,convertToPng as ze,copyToClipboard as Xe,createAgentSession as qe,createAgentSessionFromServices as Ye,createAgentSessionRuntime as Je,createAgentSessionServices as Qe,createBashTool as Ze,createBashToolDefinition as $e,createCodemodeExtension as eo,createCodingTools as oo,createEditTool as to,createEditToolDefinition as ro,createEventBus as io,createExtensionRuntime as no,createFindTool as ao,createFindToolDefinition as so,createGrepTool as lo,createGrepToolDefinition as mo,createLocalBashOperations as co,createLocalPowerShellOperations as po,createLsTool as So,createLsToolDefinition as Eo,createMcpExtension as To,createPowerShellTool as uo,createPowerShellToolDefinition as go,createProcessToolDefinition as Co,createReadOnlyTools as Do,createReadTool as Ro,createReadToolDefinition as _o,createSyntheticSourceInfo as Ao,createToolSearchExtension as ho,createWriteTool as ko,createWriteToolDefinition as Po,defineTool as Lo,describeProjectFacts as Oo,detectProjectFacts as fo,detectSandboxAvailability as Ho,detectSupportedImageMimeTypeFromFile as Io,discoverAndLoadExtensions as Mo,ensurePackageAdapted as No,estimateTokens as Fo,evaluateToolPolicy as yo,expandTempDirVariable as xo,fetchSignedMarket as vo,findCutPoint as Uo,findTurnStartIndex as bo,formatDimensionNote as Bo,formatProjectMapPrompt as wo,formatSkillsForPrompt as Ko,generateBranchSummary as Wo,generateDiffString as jo,generateSummary as Vo,generateSummaryWithUsage as Go,generateUnifiedPatch as zo,getHostCapabilities as Xo,getLastAssistantUsage as qo,getProcessShellSandbox as Yo,getToolDenial as Jo,isAdaptablePackage as Qo,isBashToolResult as Zo,isEditToolResult as $o,isFatalExtensionError as et,isFindToolResult as ot,isGrepToolResult as tt,isHostExtensionPath as rt,isLsToolResult as it,isPowerShellToolResult as nt,isReadOnlyBashCommand as at,isReadToolResult as st,isToolCallEventType as lt,isWriteToolResult as mt,loadMcpRuntime as ct,loadProjectContextFiles as pt,loadSkills as St,loadSkillsFromDir as dt,main as Et,markHostExtensionPaths as Tt,marketCacheDir as ut,matchPermissionRules as gt,normalizeForFuzzyMatch as Ct,parseArgs as Dt,parseFrontmatter as Rt,parseHostCapabilities as _t,parsePermissionRule as At,parseSkillBlock as ht,prepareBranchEntries as kt,projectPackageManager as Pt,readAccessDenial as Lt,readAdaptation as Ot,readSignedSection as ft,registerPermissionAskHandler as Ht,registerSandboxEscalationHandler as It,registerShellExecutionGuard as Mt,renderDiff as Nt,resizeImage as Ft,resolveCliModel as yt,resolveMarketEndpoint as xt,resolveModelScopeWithDiagnostics as vt,resolveSandboxPolicy as Ut,resolveToCwd as bt,runPrintMode as Bt,runRpcMode as wt,scanHardcodedPiPaths as Kt,serializeConversation as Wt,shellExecutionRefusal as jt,shouldCompact as Vt,simpleCommands as Gt,stripFrontmatter as zt,systemTempDirs as Xt,tryEnsurePackageAdapted as qt,unwrapCommand as Yt,verifyAdaptation as Jt,verifySignedSection as Qt,withFileMutationQueue as Zt,wrapRegisteredTool as $t,wrapRegisteredTools as er}from"./chunks/chunk-X63WCLSX.js";import{CURRENT_SESSION_VERSION as or,SessionManager as tr,buildContextEntries as rr,buildSessionContext as ir,buildSessionProjection as nr,convertToLlm as ar,getDefaultSessionDir as sr,getDefaultSessionDirs as lr,getLatestCompactionEntry as mr,migrateSessionEntries as cr,parseSessionEntries as pr,sessionEntryToContextMessages as Sr}from"./chunks/chunk-J6H2LYOZ.js";import{CredentialSynchronizationError as dr,DALCODE_PROJECT_DIR_NAME as Er,DEFAULT_HOOK_TIMEOUT_SECONDS as Tr,ModelRuntime as ur,PROJECT_HOOKS_FILE_ENV as gr,ProjectTrustStore as Cr,TRUST_REQUIRING_PROJECT_HOOK_FILES as Dr,VIRTUAL_MODEL_STATE_ENTRY as Rr,dalHookSourceFiles as _r,deriveHookName as Ar,hasTrustRequiringProjectResources as hr,loadDalHooks as kr,openBrowser as Pr,projectFileDeclaresHooks as Lr,projectHooksFileFromEnv as Or}from"./chunks/chunk-KT7CXVDN.js";import"./chunks/chunk-YOQ3KBG5.js";import{formatReadLineRange as fr,truncateToVisualLines as Hr}from"./chunks/chunk-XQF5XDEM.js";import"./chunks/chunk-JUUJCOIR.js";import"./chunks/chunk-NJDCSLWK.js";import{readStoredCredential as Ir}from"./chunks/chunk-C5ELI234.js";import"./chunks/chunk-4BOWD7PQ.js";import{DEFAULT_MAX_BYTES as Mr,DEFAULT_MAX_LINES as Nr,DEFAULT_SHELL_ENV_EXCLUDES as Fr,applyShellEnvironmentPolicy as yr,formatSize as xr,getPowerShellConfig as vr,getShellConfig as Ur,getShellEnv as br,isDalCodeCredentialName as Br,truncateHead as wr,truncateLine as Kr,truncateTail as Wr,withoutDalCodeCredentials as jr}from"./chunks/chunk-HF334NQU.js";import"./chunks/chunk-G5AMLGXC.js";import{ArminComponent as Vr}from"./chunks/chunk-F5SIUTR7.js";import{Theme as Gr,getLanguageFromPath as zr,getMarkdownTheme as Xr,getSelectListTheme as qr,getSettingsListTheme as Yr,highlightCode as Jr,initTheme as Qr,keyHint as Zr,keyText as $r,rawKeyHint as ei}from"./chunks/chunk-AL3DFAIM.js";import"./chunks/chunk-6QGV3IWD.js";import{CONFIG_DIR_NAME as oi,SHARED_SKILL_CONFIG_DIRS as ti,VERSION as ri,getAgentDir as ii,getDocsPath as ni,getExamplesPath as ai,getPackageDir as si,getReadmePath as li}from"./chunks/chunk-R47JBGS3.js";import"./chunks/chunk-XJFQKN3N.js";import"./chunks/chunk-QU2VEHMW.js";import"./chunks/chunk-IEBK4HQA.js";import"./chunks/chunk-5AGIVGSV.js";import"./chunks/chunk-723ZGEZ2.js";import"./chunks/chunk-ZG74NES2.js";import"./chunks/chunk-TMTOQ7H7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-FFMDRXC4.js";import"./chunks/chunk-VDPDHGGJ.js";import"./chunks/chunk-4LDEEFCY.js";import"./chunks/chunk-F52JQCLE.js";import"./chunks/chunk-JXWJOIH4.js";export{b as ADAPTATION_FILE,B as AgentSession,w as AgentSessionRuntime,Vr as ArminComponent,K as AssistantMessageComponent,W as BackgroundProcessManager,j as BashExecutionComponent,V as BorderedLoader,G as BranchSummaryMessageComponent,oi as CONFIG_DIR_NAME,or as CURRENT_SESSION_VERSION,z as CompactionSummaryMessageComponent,dr as CredentialSynchronizationError,X as CustomEditor,q as CustomMessageComponent,Er as DALCODE_PROJECT_DIR_NAME,o as DAL_HOOK_ENTRY_TYPE,t as DAL_HOOK_NOTIFICATION_CHANNEL,Y as DEFAULT_COMPACTION_SETTINGS,Tr as DEFAULT_HOOK_TIMEOUT_SECONDS,Mr as DEFAULT_MAX_BYTES,Nr as DEFAULT_MAX_LINES,Fr as DEFAULT_SHELL_ENV_EXCLUDES,J as DefaultPackageManager,Q as DefaultResourceLoader,Z as DynamicBorder,$ as ENGINE_MARKET_CACHE_FILE,ee as ExtensionEditorComponent,oe as ExtensionFatalError,te as ExtensionInputComponent,re as ExtensionRunner,ie as ExtensionSelectorComponent,ne as FooterComponent,ae as HOST_CAPABILITIES_ENV,se as HOST_TOKEN_ENV,le as HOST_TOKEN_HEADER,me as HOST_URL_ENV,ce as HostCallError,pe as HostCapabilities,Se as InteractiveMode,de as LoginDialogComponent,Ee as MARKET_SECTIONS,Te as MAX_BACKGROUND_PROCESSES,ue as ModelRegistry,ur as ModelRuntime,ge as ModelSelectorComponent,Ce as OAuthSelectorComponent,gr as PROJECT_HOOKS_FILE_ENV,De as PROTECTED_WRITE_NAMES,Cr as ProjectTrustStore,Re as REQUIRED_EXTENSION_FAILED,_e as RequiredExtensionError,Ae as RpcClient,he as RpcCommandError,ke as SANDBOX_ENV,ti as SHARED_SKILL_CONFIG_DIRS,r as STALE_AFTER_MS,tr as SessionManager,Pe as SessionSelectorComponent,Le as SettingsManager,Oe as SettingsSelectorComponent,fe as ShellSandbox,i as ShowImagesSelectorComponent,He as SkillInvocationMessageComponent,Dr as TRUST_REQUIRING_PROJECT_HOOK_FILES,Gr as Theme,n as ThemeSelectorComponent,Ie as ThinkingSelectorComponent,Me as ToolExecutionComponent,Ne as TreeSelectorComponent,Fe as UserMessageComponent,ye as UserMessageSelectorComponent,ri as VERSION,Rr as VIRTUAL_MODEL_STATE_ENTRY,a as WORKSPACE_LOCK_DIR_NAME,s as WORKSPACE_LOCK_FILE,xe as adaptPackage,ve as adaptationState,Ue as agentLogPath,be as appendAgentLog,Be as applyCommunityEnv,yr as applyShellEnvironmentPolicy,rr as buildContextEntries,l as buildDalHookInput,we as buildProjectMap,Ke as buildRuleSet,ir as buildSessionContext,nr as buildSessionProjection,We as calculateContextTokens,m as claimWorkspace,je as collectEntriesForBranchSummary,Ve as communityEnv,Ge as compact,ar as convertToLlm,ze as convertToPng,Xe as copyToClipboard,qe as createAgentSession,Ye as createAgentSessionFromServices,Je as createAgentSessionRuntime,Qe as createAgentSessionServices,Ze as createBashTool,$e as createBashToolDefinition,eo as createCodemodeExtension,oo as createCodingTools,to as createEditTool,ro as createEditToolDefinition,io as createEventBus,no as createExtensionRuntime,ao as createFindTool,so as createFindToolDefinition,lo as createGrepTool,mo as createGrepToolDefinition,co as createLocalBashOperations,po as createLocalPowerShellOperations,So as createLsTool,Eo as createLsToolDefinition,To as createMcpExtension,uo as createPowerShellTool,go as createPowerShellToolDefinition,Co as createProcessToolDefinition,Do as createReadOnlyTools,Ro as createReadTool,_o as createReadToolDefinition,Ao as createSyntheticSourceInfo,ho as createToolSearchExtension,ko as createWriteTool,Po as createWriteToolDefinition,c as dalHookActivity,_r as dalHookSourceFiles,p as dalHooksExtension,S as decideDalHooks,d as defaultWorkspaceLockDir,Lo as defineTool,Ar as deriveHookName,Oo as describeProjectFacts,fo as detectProjectFacts,Ho as detectSandboxAvailability,Io as detectSupportedImageMimeTypeFromFile,Mo as discoverAndLoadExtensions,E as engineToolInput,No as ensurePackageAdapted,Fo as estimateTokens,yo as evaluateToolPolicy,xo as expandTempDirVariable,vo as fetchSignedMarket,Uo as findCutPoint,bo as findTurnStartIndex,T as formatDalHookActivity,Bo as formatDimensionNote,wo as formatProjectMapPrompt,fr as formatReadLineRange,xr as formatSize,Ko as formatSkillsForPrompt,Wo as generateBranchSummary,jo as generateDiffString,Vo as generateSummary,Go as generateSummaryWithUsage,zo as generateUnifiedPatch,ii as getAgentDir,sr as getDefaultSessionDir,lr as getDefaultSessionDirs,ni as getDocsPath,ai as getExamplesPath,Xo as getHostCapabilities,zr as getLanguageFromPath,qo as getLastAssistantUsage,mr as getLatestCompactionEntry,Xr as getMarkdownTheme,si as getPackageDir,vr as getPowerShellConfig,Yo as getProcessShellSandbox,li as getReadmePath,qr as getSelectListTheme,Yr as getSettingsListTheme,Ur as getShellConfig,br as getShellEnv,Jo as getToolDenial,u as gitDirOf,hr as hasTrustRequiringProjectResources,Jr as highlightCode,g as hookToolInput,C as hookToolName,Qr as initTheme,Qo as isAdaptablePackage,Zo as isBashToolResult,Br as isDalCodeCredentialName,D as isDalHookActivity,$o as isEditToolResult,et as isFatalExtensionError,ot as isFindToolResult,tt as isGrepToolResult,rt as isHostExtensionPath,it as isLsToolResult,nt as isPowerShellToolResult,at as isReadOnlyBashCommand,st as isReadToolResult,lt as isToolCallEventType,mt as isWriteToolResult,Zr as keyHint,$r as keyText,kr as loadDalHooks,ct as loadMcpRuntime,pt as loadProjectContextFiles,St as loadSkills,dt as loadSkillsFromDir,Et as main,Tt as markHostExtensionPaths,ut as marketCacheDir,gt as matchPermissionRules,cr as migrateSessionEntries,Ct as normalizeForFuzzyMatch,Pr as openBrowser,Dt as parseArgs,Rt as parseFrontmatter,_t as parseHostCapabilities,At as parsePermissionRule,pr as parseSessionEntries,ht as parseSkillBlock,kt as prepareBranchEntries,Lr as projectFileDeclaresHooks,Or as projectHooksFileFromEnv,Pt as projectPackageManager,ei as rawKeyHint,Lt as readAccessDenial,Ot as readAdaptation,ft as readSignedSection,Ir as readStoredCredential,R as readWorkspaceLock,Ht as registerPermissionAskHandler,It as registerSandboxEscalationHandler,Mt as registerShellExecutionGuard,_ as releaseWorkspace,Nt as renderDiff,A as reportDalHookProblems,Ft as resizeImage,yt as resolveCliModel,xt as resolveMarketEndpoint,vt as resolveModelScopeWithDiagnostics,Ut as resolveSandboxPolicy,bt as resolveToCwd,h as runDalCommandHook,k as runDalHookEvent,P as runDalHooks,L as runNotificationHooks,O as runPostToolUseHooks,f as runPreToolUseHooks,Bt as runPrintMode,wt as runRpcMode,H as runSessionStartHooks,I as runStopHooks,M as runUserPromptSubmitHooks,Kt as scanHardcodedPiPaths,N as selectDalHooks,Wt as serializeConversation,Sr as sessionEntryToContextMessages,F as shellCommandDirectory,jt as shellExecutionRefusal,Vt as shouldCompact,Gt as simpleCommands,zt as stripFrontmatter,Xt as systemTempDirs,y as toolMatchNames,wr as truncateHead,Kr as truncateLine,Wr as truncateTail,Hr as truncateToVisualLines,qt as tryEnsurePackageAdapted,Yt as unwrapCommand,Jt as verifyAdaptation,Qt as verifySignedSection,Zt as withFileMutationQueue,jr as withoutDalCodeCredentials,x as workspaceLockIsLive,v as workspaceLockPath,U as workspaceOwnerSessionId,$t as wrapRegisteredTool,er as wrapRegisteredTools};
1
+ import{createRequire as e}from"node:module";const pi=e(import.meta.url);import{DAL_HOOK_ENTRY_TYPE as o,DAL_HOOK_NOTIFICATION_CHANNEL as t,STALE_AFTER_MS as r,ShowImagesSelectorComponent as i,ThemeSelectorComponent as n,WORKSPACE_LOCK_DIR_NAME as a,WORKSPACE_LOCK_FILE as s,buildDalHookInput as l,claimWorkspace as m,dalHookActivity as c,dalHooksExtension as p,decideDalHooks as E,defaultWorkspaceLockDir as S,engineToolInput as d,formatDalHookActivity as T,gitDirOf as u,hookToolInput as g,hookToolName as C,isDalHookActivity as D,readWorkspaceLock as R,releaseWorkspace as _,reportDalHookProblems as A,runDalCommandHook as P,runDalHookEvent as h,runDalHooks as k,runNotificationHooks as L,runPostToolUseHooks as O,runPreToolUseHooks as I,runSessionStartHooks as f,runStopHooks as H,runUserPromptSubmitHooks as M,selectDalHooks as N,shellCommandDirectory as F,toolMatchNames as y,workspaceLockIsLive as x,workspaceLockPath as v,workspaceOwnerSessionId as U}from"./chunks/chunk-EXWCUM6H.js";import{ADAPTATION_FILE as b,AgentSession as B,AgentSessionRuntime as w,AssistantMessageComponent as K,BackgroundProcessManager as W,BashExecutionComponent as j,BorderedLoader as V,BranchSummaryMessageComponent as G,CompactionSummaryMessageComponent as z,CustomEditor as X,CustomMessageComponent as q,DEFAULT_COMPACTION_SETTINGS as Y,DefaultPackageManager as J,DefaultResourceLoader as Q,DynamicBorder as Z,ENGINE_MARKET_CACHE_FILE as $,ExtensionEditorComponent as ee,ExtensionFatalError as oe,ExtensionInputComponent as te,ExtensionRunner as re,ExtensionSelectorComponent as ie,FooterComponent as ne,HOST_CAPABILITIES_ENV as ae,HOST_TOKEN_ENV as se,HOST_TOKEN_HEADER as le,HOST_URL_ENV as me,HostCallError as ce,HostCapabilities as pe,InteractiveMode as Ee,LoginDialogComponent as Se,MARKET_SECTIONS as de,MAX_BACKGROUND_PROCESSES as Te,ModelRegistry as ue,ModelSelectorComponent as ge,OAuthSelectorComponent as Ce,PROTECTED_WRITE_NAMES as De,REQUIRED_EXTENSION_FAILED as Re,RequiredExtensionError as _e,RpcClient as Ae,RpcCommandError as Pe,SANDBOX_ENV as he,SessionSelectorComponent as ke,SettingsManager as Le,SettingsSelectorComponent as Oe,ShellSandbox as Ie,SkillInvocationMessageComponent as fe,ThinkingSelectorComponent as He,ToolExecutionComponent as Me,TreeSelectorComponent as Ne,UserMessageComponent as Fe,UserMessageSelectorComponent as ye,adaptPackage as xe,adaptationState as ve,agentLogPath as Ue,appendAgentLog as be,applyCommunityEnv as Be,buildProjectMap as we,buildRuleSet as Ke,calculateContextTokens as We,collectEntriesForBranchSummary as je,communityEnv as Ve,compact as Ge,convertToPng as ze,copyToClipboard as Xe,createAgentSession as qe,createAgentSessionFromServices as Ye,createAgentSessionRuntime as Je,createAgentSessionServices as Qe,createBashTool as Ze,createBashToolDefinition as $e,createCodemodeExtension as eo,createCodingTools as oo,createEditTool as to,createEditToolDefinition as ro,createEventBus as io,createExtensionRuntime as no,createFindTool as ao,createFindToolDefinition as so,createGrepTool as lo,createGrepToolDefinition as mo,createLocalBashOperations as co,createLocalPowerShellOperations as po,createLsTool as Eo,createLsToolDefinition as So,createMcpExtension as To,createPowerShellTool as uo,createPowerShellToolDefinition as go,createProcessToolDefinition as Co,createReadOnlyTools as Do,createReadTool as Ro,createReadToolDefinition as _o,createSyntheticSourceInfo as Ao,createToolSearchExtension as Po,createWriteTool as ho,createWriteToolDefinition as ko,defineTool as Lo,describeProjectFacts as Oo,detectProjectFacts as Io,detectSandboxAvailability as fo,detectSupportedImageMimeTypeFromFile as Ho,discoverAndLoadExtensions as Mo,ensurePackageAdapted as No,estimateTokens as Fo,evaluateToolPolicy as yo,expandTempDirVariable as xo,fetchSignedMarket as vo,findCutPoint as Uo,findTurnStartIndex as bo,formatDimensionNote as Bo,formatProjectMapPrompt as wo,formatSkillsForPrompt as Ko,generateBranchSummary as Wo,generateDiffString as jo,generateSummary as Vo,generateSummaryWithUsage as Go,generateUnifiedPatch as zo,getHostCapabilities as Xo,getLastAssistantUsage as qo,getProcessShellSandbox as Yo,getToolDenial as Jo,isAdaptablePackage as Qo,isBashToolResult as Zo,isEditToolResult as $o,isFatalExtensionError as et,isFindToolResult as ot,isGrepToolResult as tt,isHostExtensionPath as rt,isLsToolResult as it,isPowerShellToolResult as nt,isReadOnlyBashCommand as at,isReadToolResult as st,isToolCallEventType as lt,isWriteToolResult as mt,loadMcpRuntime as ct,loadProjectContextFiles as pt,loadSkills as Et,loadSkillsFromDir as St,main as dt,markHostExtensionPaths as Tt,marketCacheDir as ut,matchPermissionRules as gt,normalizeForFuzzyMatch as Ct,parseArgs as Dt,parseFrontmatter as Rt,parseHostCapabilities as _t,parsePermissionRule as At,parseSkillBlock as Pt,prepareBranchEntries as ht,projectPackageManager as kt,readAccessDenial as Lt,readAdaptation as Ot,readSignedSection as It,registerPermissionAskHandler as ft,registerSandboxEscalationHandler as Ht,registerShellExecutionGuard as Mt,renderDiff as Nt,resizeImage as Ft,resolveCliModel as yt,resolveMarketEndpoint as xt,resolveModelScopeWithDiagnostics as vt,resolveSandboxPolicy as Ut,resolveToCwd as bt,runPrintMode as Bt,runRpcMode as wt,scanHardcodedPiPaths as Kt,serializeConversation as Wt,shellExecutionRefusal as jt,shouldCompact as Vt,simpleCommands as Gt,stripFrontmatter as zt,systemTempDirs as Xt,tryEnsurePackageAdapted as qt,unwrapCommand as Yt,verifyAdaptation as Jt,verifySignedSection as Qt,withFileMutationQueue as Zt,wrapRegisteredTool as $t,wrapRegisteredTools as er}from"./chunks/chunk-4TEICWYC.js";import{CURRENT_SESSION_VERSION as or,SessionManager as tr,buildContextEntries as rr,buildSessionContext as ir,buildSessionProjection as nr,convertToLlm as ar,getDefaultSessionDir as sr,getDefaultSessionDirs as lr,getLatestCompactionEntry as mr,migrateSessionEntries as cr,parseSessionEntries as pr,sessionEntryToContextMessages as Er}from"./chunks/chunk-E6RWRE6C.js";import{CredentialSynchronizationError as Sr,DALCODE_PROJECT_DIR_NAME as dr,DEFAULT_HOOK_TIMEOUT_SECONDS as Tr,ModelRuntime as ur,PROJECT_HOOKS_FILE_ENV as gr,ProjectTrustStore as Cr,TRUST_REQUIRING_PROJECT_HOOK_FILES as Dr,VIRTUAL_MODEL_STATE_ENTRY as Rr,dalHookSourceFiles as _r,deriveHookName as Ar,hasTrustRequiringProjectResources as Pr,loadDalHooks as hr,openBrowser as kr,projectFileDeclaresHooks as Lr,projectHooksFileFromEnv as Or}from"./chunks/chunk-P3KSBU23.js";import"./chunks/chunk-RNSD5PAD.js";import{formatReadLineRange as Ir,truncateToVisualLines as fr}from"./chunks/chunk-XQ6Z77K4.js";import"./chunks/chunk-JUUJCOIR.js";import"./chunks/chunk-NJDCSLWK.js";import{readStoredCredential as Hr}from"./chunks/chunk-H3KG4L7I.js";import"./chunks/chunk-425HIJ4E.js";import{DEFAULT_MAX_BYTES as Mr,DEFAULT_MAX_LINES as Nr,DEFAULT_SHELL_ENV_EXCLUDES as Fr,applyShellEnvironmentPolicy as yr,formatSize as xr,getPowerShellConfig as vr,getShellConfig as Ur,getShellEnv as br,isDalCodeCredentialName as Br,truncateHead as wr,truncateLine as Kr,truncateTail as Wr,withoutDalCodeCredentials as jr}from"./chunks/chunk-B66W54NL.js";import"./chunks/chunk-G5AMLGXC.js";import{ArminComponent as Vr}from"./chunks/chunk-LGD3AMTG.js";import{Theme as Gr,getLanguageFromPath as zr,getMarkdownTheme as Xr,getSelectListTheme as qr,getSettingsListTheme as Yr,highlightCode as Jr,initTheme as Qr,keyHint as Zr,keyText as $r,rawKeyHint as ei}from"./chunks/chunk-NRQYSXAU.js";import"./chunks/chunk-6QGV3IWD.js";import{APP_TITLE as oi,CONFIG_DIR_NAME as ti,SHARED_SKILL_CONFIG_DIRS as ri,VERSION as ii,getAgentDir as ni,getDocsPath as ai,getExamplesPath as si,getPackageDir as li,getReadmePath as mi}from"./chunks/chunk-QM5JU2GS.js";import"./chunks/chunk-XJFQKN3N.js";import"./chunks/chunk-3KEFLXX2.js";import"./chunks/chunk-IEBK4HQA.js";import"./chunks/chunk-5AGIVGSV.js";import"./chunks/chunk-723ZGEZ2.js";import"./chunks/chunk-ZG74NES2.js";import"./chunks/chunk-TMTOQ7H7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-FFMDRXC4.js";import"./chunks/chunk-4KCKRVPN.js";import"./chunks/chunk-4LDEEFCY.js";import"./chunks/chunk-CIJDL6I3.js";import"./chunks/chunk-JXWJOIH4.js";export{b as ADAPTATION_FILE,oi as APP_TITLE,B as AgentSession,w as AgentSessionRuntime,Vr as ArminComponent,K as AssistantMessageComponent,W as BackgroundProcessManager,j as BashExecutionComponent,V as BorderedLoader,G as BranchSummaryMessageComponent,ti as CONFIG_DIR_NAME,or as CURRENT_SESSION_VERSION,z as CompactionSummaryMessageComponent,Sr as CredentialSynchronizationError,X as CustomEditor,q as CustomMessageComponent,dr as DALCODE_PROJECT_DIR_NAME,o as DAL_HOOK_ENTRY_TYPE,t as DAL_HOOK_NOTIFICATION_CHANNEL,Y as DEFAULT_COMPACTION_SETTINGS,Tr as DEFAULT_HOOK_TIMEOUT_SECONDS,Mr as DEFAULT_MAX_BYTES,Nr as DEFAULT_MAX_LINES,Fr as DEFAULT_SHELL_ENV_EXCLUDES,J as DefaultPackageManager,Q as DefaultResourceLoader,Z as DynamicBorder,$ as ENGINE_MARKET_CACHE_FILE,ee as ExtensionEditorComponent,oe as ExtensionFatalError,te as ExtensionInputComponent,re as ExtensionRunner,ie as ExtensionSelectorComponent,ne as FooterComponent,ae as HOST_CAPABILITIES_ENV,se as HOST_TOKEN_ENV,le as HOST_TOKEN_HEADER,me as HOST_URL_ENV,ce as HostCallError,pe as HostCapabilities,Ee as InteractiveMode,Se as LoginDialogComponent,de as MARKET_SECTIONS,Te as MAX_BACKGROUND_PROCESSES,ue as ModelRegistry,ur as ModelRuntime,ge as ModelSelectorComponent,Ce as OAuthSelectorComponent,gr as PROJECT_HOOKS_FILE_ENV,De as PROTECTED_WRITE_NAMES,Cr as ProjectTrustStore,Re as REQUIRED_EXTENSION_FAILED,_e as RequiredExtensionError,Ae as RpcClient,Pe as RpcCommandError,he as SANDBOX_ENV,ri as SHARED_SKILL_CONFIG_DIRS,r as STALE_AFTER_MS,tr as SessionManager,ke as SessionSelectorComponent,Le as SettingsManager,Oe as SettingsSelectorComponent,Ie as ShellSandbox,i as ShowImagesSelectorComponent,fe as SkillInvocationMessageComponent,Dr as TRUST_REQUIRING_PROJECT_HOOK_FILES,Gr as Theme,n as ThemeSelectorComponent,He as ThinkingSelectorComponent,Me as ToolExecutionComponent,Ne as TreeSelectorComponent,Fe as UserMessageComponent,ye as UserMessageSelectorComponent,ii as VERSION,Rr as VIRTUAL_MODEL_STATE_ENTRY,a as WORKSPACE_LOCK_DIR_NAME,s as WORKSPACE_LOCK_FILE,xe as adaptPackage,ve as adaptationState,Ue as agentLogPath,be as appendAgentLog,Be as applyCommunityEnv,yr as applyShellEnvironmentPolicy,rr as buildContextEntries,l as buildDalHookInput,we as buildProjectMap,Ke as buildRuleSet,ir as buildSessionContext,nr as buildSessionProjection,We as calculateContextTokens,m as claimWorkspace,je as collectEntriesForBranchSummary,Ve as communityEnv,Ge as compact,ar as convertToLlm,ze as convertToPng,Xe as copyToClipboard,qe as createAgentSession,Ye as createAgentSessionFromServices,Je as createAgentSessionRuntime,Qe as createAgentSessionServices,Ze as createBashTool,$e as createBashToolDefinition,eo as createCodemodeExtension,oo as createCodingTools,to as createEditTool,ro as createEditToolDefinition,io as createEventBus,no as createExtensionRuntime,ao as createFindTool,so as createFindToolDefinition,lo as createGrepTool,mo as createGrepToolDefinition,co as createLocalBashOperations,po as createLocalPowerShellOperations,Eo as createLsTool,So as createLsToolDefinition,To as createMcpExtension,uo as createPowerShellTool,go as createPowerShellToolDefinition,Co as createProcessToolDefinition,Do as createReadOnlyTools,Ro as createReadTool,_o as createReadToolDefinition,Ao as createSyntheticSourceInfo,Po as createToolSearchExtension,ho as createWriteTool,ko as createWriteToolDefinition,c as dalHookActivity,_r as dalHookSourceFiles,p as dalHooksExtension,E as decideDalHooks,S as defaultWorkspaceLockDir,Lo as defineTool,Ar as deriveHookName,Oo as describeProjectFacts,Io as detectProjectFacts,fo as detectSandboxAvailability,Ho as detectSupportedImageMimeTypeFromFile,Mo as discoverAndLoadExtensions,d as engineToolInput,No as ensurePackageAdapted,Fo as estimateTokens,yo as evaluateToolPolicy,xo as expandTempDirVariable,vo as fetchSignedMarket,Uo as findCutPoint,bo as findTurnStartIndex,T as formatDalHookActivity,Bo as formatDimensionNote,wo as formatProjectMapPrompt,Ir as formatReadLineRange,xr as formatSize,Ko as formatSkillsForPrompt,Wo as generateBranchSummary,jo as generateDiffString,Vo as generateSummary,Go as generateSummaryWithUsage,zo as generateUnifiedPatch,ni as getAgentDir,sr as getDefaultSessionDir,lr as getDefaultSessionDirs,ai as getDocsPath,si as getExamplesPath,Xo as getHostCapabilities,zr as getLanguageFromPath,qo as getLastAssistantUsage,mr as getLatestCompactionEntry,Xr as getMarkdownTheme,li as getPackageDir,vr as getPowerShellConfig,Yo as getProcessShellSandbox,mi as getReadmePath,qr as getSelectListTheme,Yr as getSettingsListTheme,Ur as getShellConfig,br as getShellEnv,Jo as getToolDenial,u as gitDirOf,Pr as hasTrustRequiringProjectResources,Jr as highlightCode,g as hookToolInput,C as hookToolName,Qr as initTheme,Qo as isAdaptablePackage,Zo as isBashToolResult,Br as isDalCodeCredentialName,D as isDalHookActivity,$o as isEditToolResult,et as isFatalExtensionError,ot as isFindToolResult,tt as isGrepToolResult,rt as isHostExtensionPath,it as isLsToolResult,nt as isPowerShellToolResult,at as isReadOnlyBashCommand,st as isReadToolResult,lt as isToolCallEventType,mt as isWriteToolResult,Zr as keyHint,$r as keyText,hr as loadDalHooks,ct as loadMcpRuntime,pt as loadProjectContextFiles,Et as loadSkills,St as loadSkillsFromDir,dt as main,Tt as markHostExtensionPaths,ut as marketCacheDir,gt as matchPermissionRules,cr as migrateSessionEntries,Ct as normalizeForFuzzyMatch,kr as openBrowser,Dt as parseArgs,Rt as parseFrontmatter,_t as parseHostCapabilities,At as parsePermissionRule,pr as parseSessionEntries,Pt as parseSkillBlock,ht as prepareBranchEntries,Lr as projectFileDeclaresHooks,Or as projectHooksFileFromEnv,kt as projectPackageManager,ei as rawKeyHint,Lt as readAccessDenial,Ot as readAdaptation,It as readSignedSection,Hr as readStoredCredential,R as readWorkspaceLock,ft as registerPermissionAskHandler,Ht as registerSandboxEscalationHandler,Mt as registerShellExecutionGuard,_ as releaseWorkspace,Nt as renderDiff,A as reportDalHookProblems,Ft as resizeImage,yt as resolveCliModel,xt as resolveMarketEndpoint,vt as resolveModelScopeWithDiagnostics,Ut as resolveSandboxPolicy,bt as resolveToCwd,P as runDalCommandHook,h as runDalHookEvent,k as runDalHooks,L as runNotificationHooks,O as runPostToolUseHooks,I as runPreToolUseHooks,Bt as runPrintMode,wt as runRpcMode,f as runSessionStartHooks,H as runStopHooks,M as runUserPromptSubmitHooks,Kt as scanHardcodedPiPaths,N as selectDalHooks,Wt as serializeConversation,Er as sessionEntryToContextMessages,F as shellCommandDirectory,jt as shellExecutionRefusal,Vt as shouldCompact,Gt as simpleCommands,zt as stripFrontmatter,Xt as systemTempDirs,y as toolMatchNames,wr as truncateHead,Kr as truncateLine,Wr as truncateTail,fr as truncateToVisualLines,qt as tryEnsurePackageAdapted,Yt as unwrapCommand,Jt as verifyAdaptation,Qt as verifySignedSection,Zt as withFileMutationQueue,jr as withoutDalCodeCredentials,x as workspaceLockIsLive,v as workspaceLockPath,U as workspaceOwnerSessionId,$t as wrapRegisteredTool,er as wrapRegisteredTools};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as r}from"node:module";const m=r(import.meta.url);import{configureHttpDispatcher as i,main as o}from"./chunks/chunk-X63WCLSX.js";import"./chunks/chunk-J6H2LYOZ.js";import"./chunks/chunk-KT7CXVDN.js";import"./chunks/chunk-YOQ3KBG5.js";import"./chunks/chunk-XQF5XDEM.js";import"./chunks/chunk-JUUJCOIR.js";import"./chunks/chunk-NJDCSLWK.js";import"./chunks/chunk-C5ELI234.js";import"./chunks/chunk-4BOWD7PQ.js";import"./chunks/chunk-HF334NQU.js";import"./chunks/chunk-G5AMLGXC.js";import"./chunks/chunk-F5SIUTR7.js";import"./chunks/chunk-AL3DFAIM.js";import"./chunks/chunk-6QGV3IWD.js";import{APP_NAME as p}from"./chunks/chunk-R47JBGS3.js";import"./chunks/chunk-XJFQKN3N.js";import"./chunks/chunk-QU2VEHMW.js";import"./chunks/chunk-IEBK4HQA.js";import"./chunks/chunk-5AGIVGSV.js";import"./chunks/chunk-723ZGEZ2.js";import"./chunks/chunk-ZG74NES2.js";import"./chunks/chunk-TMTOQ7H7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-FFMDRXC4.js";import"./chunks/chunk-VDPDHGGJ.js";import"./chunks/chunk-4LDEEFCY.js";import"./chunks/chunk-F52JQCLE.js";import"./chunks/chunk-JXWJOIH4.js";process.title=`${p}-rpc`,process.env.PI_CODING_AGENT="true",process.env.AI_AGENT="pi",process.emitWarning=(()=>{}),i(),o(["--mode","rpc",...process.argv.slice(2)]);
2
+ import{createRequire as r}from"node:module";const m=r(import.meta.url);import{configureHttpDispatcher as i,main as o}from"./chunks/chunk-4TEICWYC.js";import"./chunks/chunk-E6RWRE6C.js";import"./chunks/chunk-P3KSBU23.js";import"./chunks/chunk-RNSD5PAD.js";import"./chunks/chunk-XQ6Z77K4.js";import"./chunks/chunk-JUUJCOIR.js";import"./chunks/chunk-NJDCSLWK.js";import"./chunks/chunk-H3KG4L7I.js";import"./chunks/chunk-425HIJ4E.js";import"./chunks/chunk-B66W54NL.js";import"./chunks/chunk-G5AMLGXC.js";import"./chunks/chunk-LGD3AMTG.js";import"./chunks/chunk-NRQYSXAU.js";import"./chunks/chunk-6QGV3IWD.js";import{APP_NAME as p}from"./chunks/chunk-QM5JU2GS.js";import"./chunks/chunk-XJFQKN3N.js";import"./chunks/chunk-3KEFLXX2.js";import"./chunks/chunk-IEBK4HQA.js";import"./chunks/chunk-5AGIVGSV.js";import"./chunks/chunk-723ZGEZ2.js";import"./chunks/chunk-ZG74NES2.js";import"./chunks/chunk-TMTOQ7H7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-FFMDRXC4.js";import"./chunks/chunk-4KCKRVPN.js";import"./chunks/chunk-4LDEEFCY.js";import"./chunks/chunk-CIJDL6I3.js";import"./chunks/chunk-JXWJOIH4.js";process.title=`${p}-rpc`,process.env.PI_CODING_AGENT="true",process.env.AI_AGENT="pi",process.emitWarning=(()=>{}),i(),o(["--mode","rpc",...process.argv.slice(2)]);
package/dist/config.d.ts CHANGED
@@ -52,6 +52,7 @@ export type InstallChange = {
52
52
  export declare function detectInstallChange(packageJsonPath?: string | undefined): InstallChange | undefined;
53
53
  export declare const PACKAGE_NAME: string;
54
54
  export declare const APP_NAME: string;
55
+ export declare function hostProductTitle(value: string | undefined): string | undefined;
55
56
  export declare const APP_TITLE: string;
56
57
  export declare const CONFIG_DIR_NAME: string;
57
58
  export declare const IS_WHITE_LABEL_BUILD: boolean;
package/dist/config.js CHANGED
@@ -1 +1 @@
1
- var K=Object.defineProperty;var n=(e,t)=>K(e,"name",{value:t,configurable:!0});import{accessSync as v,constants as U,existsSync as f,readFileSync as S,realpathSync as H}from"fs";import{createRequire as V}from"module";import{homedir as A}from"os";import{basename as C,dirname as u,join as i,resolve as h,sep as w,win32 as z}from"path";import{fileURLToPath as Q}from"url";import{spawnProcessSync as X}from"./utils/child-process.js";import{normalizePath as R}from"./utils/paths.js";import{stripBom as k}from"./utils/text.js";const Y=Q(import.meta.url),L=u(Y),x=import.meta.url.includes("$bunfs")||import.meta.url.includes("~BUN")||import.meta.url.includes("%7EBUN"),Z=!!process.versions.bun,ee=typeof PI_BUNDLED_NODE<"u"&&PI_BUNDLED_NODE;function te(e){return e.startsWith("https://")||e.startsWith("http://")}n(te,"isUrlInstallSpec");function O(e){return typeof e=="string"?{packageName:e,installSpec:e}:{packageName:e.packageName,installSpec:e.installSpec??e.packageName}}n(O,"normalizeSelfUpdatePackageTarget");function P(e,t){return t?{...e,display:`${t.display} && ${e.display}`,steps:[t,e]}:e}n(P,"makeSelfUpdateCommand");function m(e,t){return{command:e,args:t,display:[e,...t].map(o=>/\s/.test(o)?`"${o}"`:o).join(" ")}}n(m,"makeSelfUpdateCommandStep");function y(){if(x)return"bun-binary";const e=`${L}\0${process.execPath||""}`.toLowerCase().replace(/\\/g,"/");return e.includes("/pnpm/")||e.includes("/.pnpm/")?"pnpm":e.includes("/yarn/")||e.includes("/.yarn/")?"yarn":Z||e.includes("/install/global/node_modules/")?"bun":e.includes("/npm/")||e.includes("/node_modules/")?"npm":"unknown"}n(y,"detectInstallMethod");function $(){const e=c(),t=process.platform==="win32"||e.includes("\\")?z:{basename:C,dirname:u},o=t.dirname(e);let r;if(t.basename(o).startsWith("@")&&t.basename(t.dirname(o))==="node_modules"?r=t.dirname(o):t.basename(o)==="node_modules"&&(r=o),!r)return;const s=t.dirname(r);if(t.basename(s)==="lib")return{root:r,prefix:t.dirname(s)}}n($,"getInferredNpmInstall");function I(e,t,o=t,r){const s=O(o),a=s.packageName===me&&!te(s.installSpec)?[`--${ge}:registry=${be}/`]:[];switch(e){case"bun-binary":return;case"pnpm":{const p=_("pnpm",["root","-g"])?void 0:/^(.*[\\/]global[\\/][^\\/]+)[\\/]\.pnpm[\\/]/.exec(c()),d=p?[`--config.global-bin-dir=${process.env.PNPM_HOME||u(u(p[1]))}`]:[];return P(m("pnpm",["install","-g","--ignore-scripts","--config.minimumReleaseAge=0",...d,...a,s.installSpec]),s.packageName===t?void 0:m("pnpm",["remove","-g",...d,t]))}case"yarn":return P(m("yarn",["global","add","--ignore-scripts",...a,s.installSpec]),s.packageName===t?void 0:m("yarn",["global","remove",t]));case"bun":return P(m("bun",["install","-g","--ignore-scripts","--minimum-release-age=0",...a,s.installSpec]),s.packageName===t?void 0:m("bun",["uninstall","-g",t]));case"npm":{const[p="npm",...d]=r??[],l=r?.length?void 0:$(),D=[...d,...l?["--prefix",l.prefix]:[]],J=m(p,[...D,"install","-g","--ignore-scripts","--min-release-age=0",...a,s.installSpec]),q=s.packageName===t?void 0:m(p,[...D,"uninstall","-g",t]);return P(J,q)}case"unknown":return}}n(I,"getSelfUpdateCommandForMethod");function _(e,t,o={}){const r=X(e,t,{encoding:"utf-8",stdio:["ignore","pipe","pipe"]});if(r.status===0)return r.stdout.trim()||void 0;if(o.requireSuccess){const s=r.error?.message||r.stderr.trim()||`exit code ${r.status??"unknown"}`;throw new Error(`Failed to run ${[e,...t].join(" ")}: ${s}`)}}n(_,"readCommandOutput");function ne(e,t,o){switch(e){case"npm":{const r=!!o?.length,[s="npm",...a]=o??[];if(r&&s==="bun"){const l=_(s,[...a,"pm","bin","-g"],{requireSuccess:!0}),D=[i(A(),".bun","install","global","node_modules")];return l&&D.push(i(u(l),"install","global","node_modules")),D}const p=_(s,[...a,"root","-g"],{requireSuccess:r}),d=r?void 0:$();return[p,d?.root].filter(l=>!!l)}case"pnpm":{const r=_("pnpm",["root","-g"]);if(r)return[r,u(r)];const s=/^(.*[\\/]global[\\/][^\\/]+)[\\/]\.pnpm[\\/]/.exec(c());return s?[s[1]]:[]}case"yarn":{const r=_("yarn",["global","dir"]);return r?[r,i(r,"node_modules")]:[]}case"bun":{const r=_("bun",["pm","bin","-g"]),s=[i(A(),".bun","install","global","node_modules")];return r&&s.push(i(u(r),"install","global","node_modules")),s}case"bun-binary":case"unknown":return[]}}n(ne,"getGlobalPackageRoots");function T(e,t){const o=h(e);if(!f(o))return;let r=o;if(t)try{r=H(o)}catch{return}return process.platform==="win32"&&(r=r.toLowerCase()),r}n(T,"normalizeExistingPathForComparison");function B(e){return Array.from(new Set([T(e,!1),T(e,!0)].filter(t=>!!t)))}n(B,"getPathComparisonCandidates");function re(){const e=process.argv[1];if(!e)return;let t=u(e);for(;t!==u(t);){if(f(i(t,"package.json")))return t;t=u(t)}}n(re,"getEntrypointPackageDir");function W(){const e=c();try{return v(e,U.W_OK),v(u(e),U.W_OK),!0}catch{return!1}}n(W,"isSelfUpdatePathWritable");function G(e,t,o){const s=[c(),re()].filter(a=>!!a).flatMap(a=>B(a));return ne(e,t,o).some(a=>B(a).some(p=>{const d=p.endsWith(w)?p:`${p}${w}`;return s.some(l=>l.startsWith(d))}))}n(G,"isManagedByGlobalPackageManager");function Ue(e,t,o=e){const r=y(),s=I(r,e,o,t);if(!(!s||!G(r,e,t)||!W()))return s}n(Ue,"getSelfUpdateCommand");function Ce(e){const t=process.env.PI_SELF_UPDATE_COMMAND?.trim().split(/\s+/).filter(Boolean);return t?.length?t:e?.length?e:void 0}n(Ce,"getConfiguredSelfUpdateArgv");function we(e,t){const o={packageName:t.packageName,version:t.version,installSpec:`${t.packageName}@${t.version}`},[r="",...s]=e.map(a=>a.replace(/\{(packageName|version|installSpec)\}/g,(p,d)=>o[d]));return m(r,s)}n(we,"makeConfiguredSelfUpdateCommand");function oe(e,t,o=e){const r=y(),s=O(o);if(r==="bun-binary")return`Download from: ${E==="pi"?"https://github.com/earendil-works/pi/releases/latest":xe}`;const a=I(r,e,s,t);return a&&G(r,e,t)&&!W()?`This installation is managed by a global ${r} install, but the install path is not writable. Update it yourself with: ${a.display}`:`Update ${s.installSpec} using the package manager, wrapper, or source checkout that provides this installation.`}n(oe,"getSelfUpdateUnavailableInstruction");function Re(e){const t=y(),o=I(t,e);return o?`Run: ${o.display}`:oe(e)}n(Re,"getUpdateInstruction");function ie(e){let t=e;for(;t!==u(t);){if(f(i(t,"package.json"))){const o=u(t);return C(t)==="dist"&&f(i(o,"package.json"))?o:t}t=u(t)}return e}n(ie,"findNodePackageDir");function c(){const e=process.env.PI_PACKAGE_DIR;return e?R(e):x?u(process.execPath):ie(L)}n(c,"getPackageDir");function Le(){if(x)return i(c(),"theme");const e=c(),t=f(i(e,"src"))?"src":"dist";return i(e,t,"modes","interactive","theme")}n(Le,"getThemesDir");function Oe(){if(x)return i(c(),"export-html");const e=c(),t=f(i(e,"src"))?"src":"dist";return i(e,t,"core","export-html")}n(Oe,"getExportTemplateDir");function se(){return i(c(),"package.json")}n(se,"getPackageJsonPath");function $e(){return h(i(c(),"README.md"))}n($e,"getReadmePath");function Te(){return h(i(c(),"docs"))}n(Te,"getDocsPath");function ae(){return h(i(c(),"examples"))}n(ae,"getExamplesPath");function ce(){return h(i(c(),"dal-docs"))}n(ce,"getDalDocsPath");function Be(){return i(ce(),"examples","extensions")}n(Be,"getDalExtensionExamplesPath");function We(){return h(i(ae(),"extensions","official"))}n(We,"getOfficialExtensionsPath");const ue="@deepailab/dal-official-extensions";function Ge(e){try{return JSON.parse(k(S(i(e,"package.json"),"utf-8"))).name===ue}catch{return!1}}n(Ge,"isOfficialExtensionsPackage");function Me(){return h(i(c(),"CHANGELOG.md"))}n(Me,"getChangelogPath");function pe(){if(x)return i(c(),"assets");const e=c(),t=f(i(e,"src"))?"src":"dist";return i(e,t,"modes","interactive","assets")}n(pe,"getInteractiveAssetsDir");function je(e){return i(pe(),e)}n(je,"getBundledInteractiveAssetPath");let N;function Fe(e){N=e}n(Fe,"setEmbeddedQuickJSWasmPath");function Je(){return N??=V(import.meta.url).resolve("quickjs-wasi/quickjs.wasm"),N}n(Je,"getQuickJSWasmPath");function de(e,t){if(e==="bun-binary")return"./src/extensions/codemode/worker.ts";if(e==="bundled-node")return new URL("./codemode-worker.js",t)}n(de,"resolveCodemodeWorkerSpecifier");let M;function qe(){const e=x?"bun-binary":ee?"bundled-node":"unbundled",t=de(e,import.meta.url);return e!=="bundled-node"||!(t instanceof URL)?t:(M??=new URL(`data:text/javascript;base64,${S(t).toString("base64")}`),M)}n(qe,"getCodemodeWorkerSpecifier");function Ke(e=j){if(x||!e)return;let t;try{t=JSON.parse(k(S(e,"utf-8")))}catch(o){return o.code==="ENOENT"?{kind:"removed"}:void 0}return t.version&&t.version!==fe?{kind:"updated",version:t.version}:void 0}n(Ke,"detectInstallChange");let b={},j;try{const e=se();b=JSON.parse(k(S(e,"utf-8"))),j=e}catch(e){if(e.code!=="ENOENT")throw e}const F=b.piConfig?.name,He=b.name||"@earendil-works/pi-coding-agent",E=F||"pi",Ve=b.piConfig?.title||(F?E:"\u03C0"),le=b.piConfig?.configDir||".dal",ze=E!=="pi",Qe=[".agents",".claude"],fe=b.version||"0.0.0",Xe=b.piConfig?.upstreamPi,me="@deepailab/dal",ge="@deepailab",he="DeepAILab-Team/dal-dist",xe=`https://github.com/${he}/releases`,be="https://git.siweibot.com/api/packages/gitea/npm",_e=`${E.toUpperCase()}_CODING_AGENT_DIR`,Ye=`${E.toUpperCase()}_CODING_AGENT_SESSION_DIR`;function Ee(e){return R(e)}n(Ee,"expandTildePath");function Ze(e,t=`https://gist.github.com/${e}`){const o=process.env.DAL_SHARE_VIEWER_URL||process.env.PI_SHARE_VIEWER_URL;return o?`${o}#${e}`:t}n(Ze,"getShareViewerUrl");function g(){const e=process.env[_e];return e?Ee(e):i(A(),le,"agent")}n(g,"getAgentDir");function et(){return i(g(),"themes")}n(et,"getCustomThemesDir");function tt(){return i(g(),"models.json")}n(tt,"getModelsPath");function nt(){return i(g(),"auth.json")}n(nt,"getAuthPath");function rt(){return i(g(),"settings.json")}n(rt,"getSettingsPath");function ot(){return i(g(),"tools")}n(ot,"getToolsDir");function it(){return i(g(),"bin")}n(it,"getBinDir");function st(){return i(g(),"prompts")}n(st,"getPromptsDir");function at(e){const t=i(e,"prompts"),o=i(e,"commands");return!f(t)&&f(o)?o:t}n(at,"getProjectPromptsDir");function ct(){return i(g(),"sessions")}n(ct,"getSessionsDir");function ut(){return i(g(),`${E}-debug.log`)}n(ut,"getDebugLogPath");export{E as APP_NAME,Ve as APP_TITLE,le as CONFIG_DIR_NAME,xe as DAL_RELEASES_URL,he as DAL_RELEASE_REPO,me as DAL_UPDATE_PACKAGE,be as DAL_UPDATE_REGISTRY,ge as DAL_UPDATE_SCOPE,_e as ENV_AGENT_DIR,Ye as ENV_SESSION_DIR,ze as IS_WHITE_LABEL_BUILD,ue as OFFICIAL_EXTENSIONS_PACKAGE_NAME,He as PACKAGE_NAME,Qe as SHARED_SKILL_CONFIG_DIRS,Xe as UPSTREAM_PI,fe as VERSION,Ke as detectInstallChange,y as detectInstallMethod,Ee as expandTildePath,ie as findNodePackageDir,g as getAgentDir,nt as getAuthPath,it as getBinDir,je as getBundledInteractiveAssetPath,Me as getChangelogPath,qe as getCodemodeWorkerSpecifier,Ce as getConfiguredSelfUpdateArgv,et as getCustomThemesDir,ce as getDalDocsPath,Be as getDalExtensionExamplesPath,ut as getDebugLogPath,Te as getDocsPath,ae as getExamplesPath,Oe as getExportTemplateDir,pe as getInteractiveAssetsDir,tt as getModelsPath,We as getOfficialExtensionsPath,c as getPackageDir,se as getPackageJsonPath,at as getProjectPromptsDir,st as getPromptsDir,Je as getQuickJSWasmPath,$e as getReadmePath,Ue as getSelfUpdateCommand,oe as getSelfUpdateUnavailableInstruction,ct as getSessionsDir,rt as getSettingsPath,Ze as getShareViewerUrl,Le as getThemesDir,ot as getToolsDir,Re as getUpdateInstruction,x as isBunBinary,Z as isBunRuntime,ee as isBundledNode,Ge as isOfficialExtensionsPackage,we as makeConfiguredSelfUpdateCommand,de as resolveCodemodeWorkerSpecifier,Fe as setEmbeddedQuickJSWasmPath};
1
+ var K=Object.defineProperty;var n=(e,t)=>K(e,"name",{value:t,configurable:!0});import{accessSync as v,constants as U,existsSync as f,readFileSync as P,realpathSync as H}from"fs";import{createRequire as V}from"module";import{homedir as A}from"os";import{basename as C,dirname as u,join as i,resolve as h,sep as w,win32 as z}from"path";import{fileURLToPath as Q}from"url";import{spawnProcessSync as X}from"./utils/child-process.js";import{normalizePath as L}from"./utils/paths.js";import{stripBom as k}from"./utils/text.js";const Y=Q(import.meta.url),R=u(Y),x=import.meta.url.includes("$bunfs")||import.meta.url.includes("~BUN")||import.meta.url.includes("%7EBUN"),Z=!!process.versions.bun,ee=typeof PI_BUNDLED_NODE<"u"&&PI_BUNDLED_NODE;function te(e){return e.startsWith("https://")||e.startsWith("http://")}n(te,"isUrlInstallSpec");function O(e){return typeof e=="string"?{packageName:e,installSpec:e}:{packageName:e.packageName,installSpec:e.installSpec??e.packageName}}n(O,"normalizeSelfUpdatePackageTarget");function S(e,t){return t?{...e,display:`${t.display} && ${e.display}`,steps:[t,e]}:e}n(S,"makeSelfUpdateCommand");function m(e,t){return{command:e,args:t,display:[e,...t].map(o=>/\s/.test(o)?`"${o}"`:o).join(" ")}}n(m,"makeSelfUpdateCommandStep");function y(){if(x)return"bun-binary";const e=`${R}\0${process.execPath||""}`.toLowerCase().replace(/\\/g,"/");return e.includes("/pnpm/")||e.includes("/.pnpm/")?"pnpm":e.includes("/yarn/")||e.includes("/.yarn/")?"yarn":Z||e.includes("/install/global/node_modules/")?"bun":e.includes("/npm/")||e.includes("/node_modules/")?"npm":"unknown"}n(y,"detectInstallMethod");function $(){const e=c(),t=process.platform==="win32"||e.includes("\\")?z:{basename:C,dirname:u},o=t.dirname(e);let r;if(t.basename(o).startsWith("@")&&t.basename(t.dirname(o))==="node_modules"?r=t.dirname(o):t.basename(o)==="node_modules"&&(r=o),!r)return;const s=t.dirname(r);if(t.basename(s)==="lib")return{root:r,prefix:t.dirname(s)}}n($,"getInferredNpmInstall");function I(e,t,o=t,r){const s=O(o),a=s.packageName===ge&&!te(s.installSpec)?[`--${he}:registry=${_e}/`]:[];switch(e){case"bun-binary":return;case"pnpm":{const p=_("pnpm",["root","-g"])?void 0:/^(.*[\\/]global[\\/][^\\/]+)[\\/]\.pnpm[\\/]/.exec(c()),d=p?[`--config.global-bin-dir=${process.env.PNPM_HOME||u(u(p[1]))}`]:[];return S(m("pnpm",["install","-g","--ignore-scripts","--config.minimumReleaseAge=0",...d,...a,s.installSpec]),s.packageName===t?void 0:m("pnpm",["remove","-g",...d,t]))}case"yarn":return S(m("yarn",["global","add","--ignore-scripts",...a,s.installSpec]),s.packageName===t?void 0:m("yarn",["global","remove",t]));case"bun":return S(m("bun",["install","-g","--ignore-scripts","--minimum-release-age=0",...a,s.installSpec]),s.packageName===t?void 0:m("bun",["uninstall","-g",t]));case"npm":{const[p="npm",...d]=r??[],l=r?.length?void 0:$(),D=[...d,...l?["--prefix",l.prefix]:[]],J=m(p,[...D,"install","-g","--ignore-scripts","--min-release-age=0",...a,s.installSpec]),q=s.packageName===t?void 0:m(p,[...D,"uninstall","-g",t]);return S(J,q)}case"unknown":return}}n(I,"getSelfUpdateCommandForMethod");function _(e,t,o={}){const r=X(e,t,{encoding:"utf-8",stdio:["ignore","pipe","pipe"]});if(r.status===0)return r.stdout.trim()||void 0;if(o.requireSuccess){const s=r.error?.message||r.stderr.trim()||`exit code ${r.status??"unknown"}`;throw new Error(`Failed to run ${[e,...t].join(" ")}: ${s}`)}}n(_,"readCommandOutput");function ne(e,t,o){switch(e){case"npm":{const r=!!o?.length,[s="npm",...a]=o??[];if(r&&s==="bun"){const l=_(s,[...a,"pm","bin","-g"],{requireSuccess:!0}),D=[i(A(),".bun","install","global","node_modules")];return l&&D.push(i(u(l),"install","global","node_modules")),D}const p=_(s,[...a,"root","-g"],{requireSuccess:r}),d=r?void 0:$();return[p,d?.root].filter(l=>!!l)}case"pnpm":{const r=_("pnpm",["root","-g"]);if(r)return[r,u(r)];const s=/^(.*[\\/]global[\\/][^\\/]+)[\\/]\.pnpm[\\/]/.exec(c());return s?[s[1]]:[]}case"yarn":{const r=_("yarn",["global","dir"]);return r?[r,i(r,"node_modules")]:[]}case"bun":{const r=_("bun",["pm","bin","-g"]),s=[i(A(),".bun","install","global","node_modules")];return r&&s.push(i(u(r),"install","global","node_modules")),s}case"bun-binary":case"unknown":return[]}}n(ne,"getGlobalPackageRoots");function T(e,t){const o=h(e);if(!f(o))return;let r=o;if(t)try{r=H(o)}catch{return}return process.platform==="win32"&&(r=r.toLowerCase()),r}n(T,"normalizeExistingPathForComparison");function B(e){return Array.from(new Set([T(e,!1),T(e,!0)].filter(t=>!!t)))}n(B,"getPathComparisonCandidates");function re(){const e=process.argv[1];if(!e)return;let t=u(e);for(;t!==u(t);){if(f(i(t,"package.json")))return t;t=u(t)}}n(re,"getEntrypointPackageDir");function W(){const e=c();try{return v(e,U.W_OK),v(u(e),U.W_OK),!0}catch{return!1}}n(W,"isSelfUpdatePathWritable");function G(e,t,o){const s=[c(),re()].filter(a=>!!a).flatMap(a=>B(a));return ne(e,t,o).some(a=>B(a).some(p=>{const d=p.endsWith(w)?p:`${p}${w}`;return s.some(l=>l.startsWith(d))}))}n(G,"isManagedByGlobalPackageManager");function Ce(e,t,o=e){const r=y(),s=I(r,e,o,t);if(!(!s||!G(r,e,t)||!W()))return s}n(Ce,"getSelfUpdateCommand");function we(e){const t=process.env.PI_SELF_UPDATE_COMMAND?.trim().split(/\s+/).filter(Boolean);return t?.length?t:e?.length?e:void 0}n(we,"getConfiguredSelfUpdateArgv");function Le(e,t){const o={packageName:t.packageName,version:t.version,installSpec:`${t.packageName}@${t.version}`},[r="",...s]=e.map(a=>a.replace(/\{(packageName|version|installSpec)\}/g,(p,d)=>o[d]));return m(r,s)}n(Le,"makeConfiguredSelfUpdateCommand");function oe(e,t,o=e){const r=y(),s=O(o);if(r==="bun-binary")return`Download from: ${E==="pi"?"https://github.com/earendil-works/pi/releases/latest":be}`;const a=I(r,e,s,t);return a&&G(r,e,t)&&!W()?`This installation is managed by a global ${r} install, but the install path is not writable. Update it yourself with: ${a.display}`:`Update ${s.installSpec} using the package manager, wrapper, or source checkout that provides this installation.`}n(oe,"getSelfUpdateUnavailableInstruction");function Re(e){const t=y(),o=I(t,e);return o?`Run: ${o.display}`:oe(e)}n(Re,"getUpdateInstruction");function ie(e){let t=e;for(;t!==u(t);){if(f(i(t,"package.json"))){const o=u(t);return C(t)==="dist"&&f(i(o,"package.json"))?o:t}t=u(t)}return e}n(ie,"findNodePackageDir");function c(){const e=process.env.PI_PACKAGE_DIR;return e?L(e):x?u(process.execPath):ie(R)}n(c,"getPackageDir");function Oe(){if(x)return i(c(),"theme");const e=c(),t=f(i(e,"src"))?"src":"dist";return i(e,t,"modes","interactive","theme")}n(Oe,"getThemesDir");function $e(){if(x)return i(c(),"export-html");const e=c(),t=f(i(e,"src"))?"src":"dist";return i(e,t,"core","export-html")}n($e,"getExportTemplateDir");function se(){return i(c(),"package.json")}n(se,"getPackageJsonPath");function Te(){return h(i(c(),"README.md"))}n(Te,"getReadmePath");function Be(){return h(i(c(),"docs"))}n(Be,"getDocsPath");function ae(){return h(i(c(),"examples"))}n(ae,"getExamplesPath");function ce(){return h(i(c(),"dal-docs"))}n(ce,"getDalDocsPath");function We(){return i(ce(),"examples","extensions")}n(We,"getDalExtensionExamplesPath");function Ge(){return h(i(ae(),"extensions","official"))}n(Ge,"getOfficialExtensionsPath");const ue="@deepailab/dal-official-extensions";function Me(e){try{return JSON.parse(k(P(i(e,"package.json"),"utf-8"))).name===ue}catch{return!1}}n(Me,"isOfficialExtensionsPackage");function je(){return h(i(c(),"CHANGELOG.md"))}n(je,"getChangelogPath");function pe(){if(x)return i(c(),"assets");const e=c(),t=f(i(e,"src"))?"src":"dist";return i(e,t,"modes","interactive","assets")}n(pe,"getInteractiveAssetsDir");function Fe(e){return i(pe(),e)}n(Fe,"getBundledInteractiveAssetPath");let N;function Je(e){N=e}n(Je,"setEmbeddedQuickJSWasmPath");function qe(){return N??=V(import.meta.url).resolve("quickjs-wasi/quickjs.wasm"),N}n(qe,"getQuickJSWasmPath");function de(e,t){if(e==="bun-binary")return"./src/extensions/codemode/worker.ts";if(e==="bundled-node")return new URL("./codemode-worker.js",t)}n(de,"resolveCodemodeWorkerSpecifier");let M;function Ke(){const e=x?"bun-binary":ee?"bundled-node":"unbundled",t=de(e,import.meta.url);return e!=="bundled-node"||!(t instanceof URL)?t:(M??=new URL(`data:text/javascript;base64,${P(t).toString("base64")}`),M)}n(Ke,"getCodemodeWorkerSpecifier");function He(e=j){if(x||!e)return;let t;try{t=JSON.parse(k(P(e,"utf-8")))}catch(o){return o.code==="ENOENT"?{kind:"removed"}:void 0}return t.version&&t.version!==me?{kind:"updated",version:t.version}:void 0}n(He,"detectInstallChange");let b={},j;try{const e=se();b=JSON.parse(k(P(e,"utf-8"))),j=e}catch(e){if(e.code!=="ENOENT")throw e}const F=b.piConfig?.name,Ve=b.name||"@earendil-works/pi-coding-agent",E=F||"pi";function le(e){const t=e?.trim();if(!(!t||t.length>40||/[\u0000-\u001f\u007f<>]/.test(t)))return t}n(le,"hostProductTitle");const ze=le(process.env.DAL_PRODUCT_TITLE)||b.piConfig?.title||(F?E:"\u03C0"),fe=b.piConfig?.configDir||".dal",Qe=E!=="pi",Xe=[".agents",".claude"],me=b.version||"0.0.0",Ye=b.piConfig?.upstreamPi,ge="@deepailab/dal",he="@deepailab",xe="DeepAILab-Team/dal-dist",be=`https://github.com/${xe}/releases`,_e="https://git.siweibot.com/api/packages/gitea/npm",Ee=`${E.toUpperCase()}_CODING_AGENT_DIR`,Ze=`${E.toUpperCase()}_CODING_AGENT_SESSION_DIR`;function De(e){return L(e)}n(De,"expandTildePath");function et(e,t=`https://gist.github.com/${e}`){const o=process.env.DAL_SHARE_VIEWER_URL||process.env.PI_SHARE_VIEWER_URL;return o?`${o}#${e}`:t}n(et,"getShareViewerUrl");function g(){const e=process.env[Ee];return e?De(e):i(A(),fe,"agent")}n(g,"getAgentDir");function tt(){return i(g(),"themes")}n(tt,"getCustomThemesDir");function nt(){return i(g(),"models.json")}n(nt,"getModelsPath");function rt(){return i(g(),"auth.json")}n(rt,"getAuthPath");function ot(){return i(g(),"settings.json")}n(ot,"getSettingsPath");function it(){return i(g(),"tools")}n(it,"getToolsDir");function st(){return i(g(),"bin")}n(st,"getBinDir");function at(){return i(g(),"prompts")}n(at,"getPromptsDir");function ct(e){const t=i(e,"prompts"),o=i(e,"commands");return!f(t)&&f(o)?o:t}n(ct,"getProjectPromptsDir");function ut(){return i(g(),"sessions")}n(ut,"getSessionsDir");function pt(){return i(g(),`${E}-debug.log`)}n(pt,"getDebugLogPath");export{E as APP_NAME,ze as APP_TITLE,fe as CONFIG_DIR_NAME,be as DAL_RELEASES_URL,xe as DAL_RELEASE_REPO,ge as DAL_UPDATE_PACKAGE,_e as DAL_UPDATE_REGISTRY,he as DAL_UPDATE_SCOPE,Ee as ENV_AGENT_DIR,Ze as ENV_SESSION_DIR,Qe as IS_WHITE_LABEL_BUILD,ue as OFFICIAL_EXTENSIONS_PACKAGE_NAME,Ve as PACKAGE_NAME,Xe as SHARED_SKILL_CONFIG_DIRS,Ye as UPSTREAM_PI,me as VERSION,He as detectInstallChange,y as detectInstallMethod,De as expandTildePath,ie as findNodePackageDir,g as getAgentDir,rt as getAuthPath,st as getBinDir,Fe as getBundledInteractiveAssetPath,je as getChangelogPath,Ke as getCodemodeWorkerSpecifier,we as getConfiguredSelfUpdateArgv,tt as getCustomThemesDir,ce as getDalDocsPath,We as getDalExtensionExamplesPath,pt as getDebugLogPath,Be as getDocsPath,ae as getExamplesPath,$e as getExportTemplateDir,pe as getInteractiveAssetsDir,nt as getModelsPath,Ge as getOfficialExtensionsPath,c as getPackageDir,se as getPackageJsonPath,ct as getProjectPromptsDir,at as getPromptsDir,qe as getQuickJSWasmPath,Te as getReadmePath,Ce as getSelfUpdateCommand,oe as getSelfUpdateUnavailableInstruction,ut as getSessionsDir,ot as getSettingsPath,et as getShareViewerUrl,Oe as getThemesDir,it as getToolsDir,Re as getUpdateInstruction,le as hostProductTitle,x as isBunBinary,Z as isBunRuntime,ee as isBundledNode,Me as isOfficialExtensionsPackage,Le as makeConfiguredSelfUpdateCommand,de as resolveCodemodeWorkerSpecifier,Je as setEmbeddedQuickJSWasmPath};
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { type Args, parseArgs } from "./cli/args.ts";
2
- export { CONFIG_DIR_NAME, getAgentDir, getDocsPath, getExamplesPath, getPackageDir, getReadmePath, SHARED_SKILL_CONFIG_DIRS, VERSION, } from "./config.ts";
2
+ export { APP_TITLE, CONFIG_DIR_NAME, getAgentDir, getDocsPath, getExamplesPath, getPackageDir, getReadmePath, SHARED_SKILL_CONFIG_DIRS, VERSION, } from "./config.ts";
3
3
  export { agentLogPath, appendAgentLog } from "./core/agent-log.ts";
4
4
  export { AgentSession, type AgentSessionConfig, type AgentSessionEvent, type AgentSessionEventListener, type ModelCycleResult, type ParsedSkillBlock, type PromptOptions, parseSkillBlock, type SessionStats, } from "./core/agent-session.ts";
5
5
  export { readStoredCredential } from "./core/auth-storage.ts";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{parseArgs as t}from"./cli/args.js";import{CONFIG_DIR_NAME as n,getAgentDir as a,getDocsPath as i,getExamplesPath as s,getPackageDir as l,getReadmePath as m,SHARED_SKILL_CONFIG_DIRS as p,VERSION as c}from"./config.js";import{agentLogPath as S,appendAgentLog as E}from"./core/agent-log.js";import{AgentSession as g,parseSkillBlock as T}from"./core/agent-session.js";import{readStoredCredential as C}from"./core/auth-storage.js";import{BackgroundProcessManager as R,MAX_BACKGROUND_PROCESSES as h}from"./core/background-processes.js";import{calculateContextTokens as D,collectEntriesForBranchSummary as P,compact as L,DEFAULT_COMPACTION_SETTINGS as _,estimateTokens as M,findCutPoint as k,findTurnStartIndex as I,generateBranchSummary as y,generateSummary as F,generateSummaryWithUsage as O,getLastAssistantUsage as N,prepareBranchEntries as v,serializeConversation as B,shouldCompact as H}from"./core/compaction/index.js";import{createEventBus as b}from"./core/event-bus.js";import{createExtensionRuntime as W,defineTool as K,discoverAndLoadExtensions as V,ExtensionFatalError as j,ExtensionRunner as G,isBashToolResult as z,isEditToolResult as X,isFatalExtensionError as q,isFindToolResult as Q,isGrepToolResult as Y,isLsToolResult as J,isPowerShellToolResult as Z,isReadToolResult as $,isToolCallEventType as ee,isWriteToolResult as oe,REQUIRED_EXTENSION_FAILED as te,RequiredExtensionError as re,wrapRegisteredTool as ne,wrapRegisteredTools as ae}from"./core/extensions/index.js";import{getHostCapabilities as se,HOST_CAPABILITIES_ENV as le,HOST_TOKEN_ENV as me,HOST_TOKEN_HEADER as pe,HOST_URL_ENV as ce,HostCallError as de,HostCapabilities as Se,parseHostCapabilities as Ee}from"./core/host-capabilities.js";import{convertToLlm as ge}from"./core/messages.js";import{ModelRegistry as xe}from"./core/model-registry.js";import{resolveCliModel as ue,resolveModelScopeWithDiagnostics as Re}from"./core/model-resolver.js";import{CredentialSynchronizationError as Ae,ModelRuntime as De}from"./core/model-runtime.js";import{DefaultPackageManager as Le}from"./core/package-manager.js";import{buildRuleSet as Me,matchPermissionRules as ke,parsePermissionRule as Ie}from"./core/permissions/rules.js";import{simpleCommands as Fe,unwrapCommand as Oe}from"./core/permissions/shell-words.js";import{evaluateToolPolicy as ve,readAccessDenial as Be,registerPermissionAskHandler as He}from"./core/permissions/tool-policy.js";import{describeProjectFacts as be,detectProjectFacts as Ue,projectPackageManager as We}from"./core/project-facts.js";import{buildProjectMap as Ve,formatProjectMapPrompt as je}from"./core/project-map.js";import{DefaultResourceLoader as ze,loadProjectContextFiles as Xe}from"./core/resource-loader.js";import{detectSandboxAvailability as Qe,getProcessShellSandbox as Ye,PROTECTED_WRITE_NAMES as Je,registerSandboxEscalationHandler as Ze,resolveSandboxPolicy as $e,SANDBOX_ENV as eo,ShellSandbox as oo,systemTempDirs as to}from"./core/sandbox/index.js";import{AgentSessionRuntime as no,createAgentSession as ao,createAgentSessionFromServices as io,createAgentSessionRuntime as so,createAgentSessionServices as lo,createBashTool as mo,createCodingTools as po,createEditTool as co,createFindTool as So,createGrepTool as Eo,createLsTool as fo,createPowerShellTool as go,createReadOnlyTools as To,createReadTool as xo,createWriteTool as Co}from"./core/sdk.js";import{buildContextEntries as Ro,buildSessionContext as ho,buildSessionProjection as Ao,CURRENT_SESSION_VERSION as Do,getDefaultSessionDir as Po,getDefaultSessionDirs as Lo,getLatestCompactionEntry as _o,migrateSessionEntries as Mo,parseSessionEntries as ko,SessionManager as Io,sessionEntryToContextMessages as yo}from"./core/session-manager.js";import{SettingsManager as Oo}from"./core/settings-manager.js";import{formatSkillsForPrompt as vo,loadSkills as Bo,loadSkillsFromDir as Ho}from"./core/skills.js";import{createSyntheticSourceInfo as bo}from"./core/source-info.js";import{getToolDenial as Wo}from"./core/tool-denial.js";import{isReadOnlyBashCommand as Vo}from"./core/tools/bash-read-only.js";import{generateDiffString as Go,generateUnifiedPatch as zo,normalizeForFuzzyMatch as Xo}from"./core/tools/edit-diff.js";import{createBashToolDefinition as Qo,createEditToolDefinition as Yo,createFindToolDefinition as Jo,createGrepToolDefinition as Zo,createLocalBashOperations as $o,createLocalPowerShellOperations as et,createLsToolDefinition as ot,createPowerShellToolDefinition as tt,createProcessToolDefinition as rt,createReadToolDefinition as nt,createWriteToolDefinition as at,DEFAULT_MAX_BYTES as it,DEFAULT_MAX_LINES as st,formatSize as lt,registerShellExecutionGuard as mt,shellExecutionRefusal as pt,truncateHead as ct,truncateLine as dt,truncateTail as St,withFileMutationQueue as Et}from"./core/tools/index.js";import{expandTempDirVariable as gt,resolveToCwd as Tt}from"./core/tools/path-utils.js";import{formatReadLineRange as Ct}from"./core/tools/render-utils.js";import{hasTrustRequiringProjectResources as Rt,ProjectTrustStore as ht}from"./core/trust-manager.js";import{VIRTUAL_MODEL_STATE_ENTRY as Dt}from"./core/virtual-models.js";import{claimWorkspace as Lt,defaultWorkspaceLockDir as _t,gitDirOf as Mt,readWorkspaceLock as kt,releaseWorkspace as It,STALE_AFTER_MS as yt,shellCommandDirectory as Ft,WORKSPACE_LOCK_DIR_NAME as Ot,WORKSPACE_LOCK_FILE as Nt,workspaceLockIsLive as vt,workspaceLockPath as Bt,workspaceOwnerSessionId as Ht}from"./core/workspace-lock.js";import{applyShellEnvironmentPolicy as bt,DEFAULT_SHELL_ENV_EXCLUDES as Ut,isDalCodeCredentialName as Wt,withoutDalCodeCredentials as Kt}from"./dal/child-env.js";import{ADAPTATION_FILE as jt,adaptationState as Gt,adaptPackage as zt,applyCommunityEnv as Xt,communityEnv as qt,ensurePackageAdapted as Qt,isAdaptablePackage as Yt,readAdaptation as Jt,scanHardcodedPiPaths as Zt,tryEnsurePackageAdapted as $t,verifyAdaptation as er}from"./dal/extension-compat.js";export*from"./dal/hooks/index.js";import{isHostExtensionPath as rr,markHostExtensionPaths as nr}from"./dal/host-extensions.js";import{ENGINE_MARKET_CACHE_FILE as ir,fetchSignedMarket as sr,MARKET_SECTIONS as lr,marketCacheDir as mr,readSignedSection as pr,resolveMarketEndpoint as cr,verifySignedSection as dr}from"./dal/reviewed/market.js";import{createCodemodeExtension as Er}from"./extensions/codemode/index.js";import{createMcpExtension as gr}from"./extensions/mcp/index.js";import{loadMcpRuntime as xr}from"./extensions/mcp/runtime.lazy.js";import{createToolSearchExtension as ur}from"./extensions/tool-search/index.js";import{main as hr}from"./main.js";import{InteractiveMode as Dr,RpcClient as Pr,RpcCommandError as Lr,runPrintMode as _r,runRpcMode as Mr}from"./modes/index.js";import{ArminComponent as Ir,AssistantMessageComponent as yr,BashExecutionComponent as Fr,BorderedLoader as Or,BranchSummaryMessageComponent as Nr,CompactionSummaryMessageComponent as vr,CustomEditor as Br,CustomMessageComponent as Hr,DynamicBorder as wr,ExtensionEditorComponent as br,ExtensionInputComponent as Ur,ExtensionSelectorComponent as Wr,FooterComponent as Kr,keyHint as Vr,keyText as jr,LoginDialogComponent as Gr,ModelSelectorComponent as zr,OAuthSelectorComponent as Xr,rawKeyHint as qr,renderDiff as Qr,SessionSelectorComponent as Yr,SettingsSelectorComponent as Jr,ShowImagesSelectorComponent as Zr,SkillInvocationMessageComponent as $r,ThemeSelectorComponent as en,ThinkingSelectorComponent as on,ToolExecutionComponent as tn,TreeSelectorComponent as rn,truncateToVisualLines as nn,UserMessageComponent as an,UserMessageSelectorComponent as sn}from"./modes/interactive/components/index.js";import{getLanguageFromPath as mn,getMarkdownTheme as pn,getSelectListTheme as cn,getSettingsListTheme as dn,highlightCode as Sn,initTheme as En,Theme as fn}from"./modes/interactive/theme/theme.js";import{copyToClipboard as Tn}from"./utils/clipboard.js";import{parseFrontmatter as Cn,stripFrontmatter as un}from"./utils/frontmatter.js";import{convertToPng as hn}from"./utils/image-convert.js";import{formatDimensionNote as Dn,resizeImage as Pn}from"./utils/image-resize.js";import{detectSupportedImageMimeTypeFromFile as _n}from"./utils/mime.js";import{openBrowser as kn}from"./utils/open-browser.js";import{getPowerShellConfig as yn,getShellConfig as Fn,getShellEnv as On}from"./utils/shell.js";export{jt as ADAPTATION_FILE,g as AgentSession,no as AgentSessionRuntime,Ir as ArminComponent,yr as AssistantMessageComponent,R as BackgroundProcessManager,Fr as BashExecutionComponent,Or as BorderedLoader,Nr as BranchSummaryMessageComponent,n as CONFIG_DIR_NAME,Do as CURRENT_SESSION_VERSION,vr as CompactionSummaryMessageComponent,Ae as CredentialSynchronizationError,Br as CustomEditor,Hr as CustomMessageComponent,_ as DEFAULT_COMPACTION_SETTINGS,it as DEFAULT_MAX_BYTES,st as DEFAULT_MAX_LINES,Ut as DEFAULT_SHELL_ENV_EXCLUDES,Le as DefaultPackageManager,ze as DefaultResourceLoader,wr as DynamicBorder,ir as ENGINE_MARKET_CACHE_FILE,br as ExtensionEditorComponent,j as ExtensionFatalError,Ur as ExtensionInputComponent,G as ExtensionRunner,Wr as ExtensionSelectorComponent,Kr as FooterComponent,le as HOST_CAPABILITIES_ENV,me as HOST_TOKEN_ENV,pe as HOST_TOKEN_HEADER,ce as HOST_URL_ENV,de as HostCallError,Se as HostCapabilities,Dr as InteractiveMode,Gr as LoginDialogComponent,lr as MARKET_SECTIONS,h as MAX_BACKGROUND_PROCESSES,xe as ModelRegistry,De as ModelRuntime,zr as ModelSelectorComponent,Xr as OAuthSelectorComponent,Je as PROTECTED_WRITE_NAMES,ht as ProjectTrustStore,te as REQUIRED_EXTENSION_FAILED,re as RequiredExtensionError,Pr as RpcClient,Lr as RpcCommandError,eo as SANDBOX_ENV,p as SHARED_SKILL_CONFIG_DIRS,yt as STALE_AFTER_MS,Io as SessionManager,Yr as SessionSelectorComponent,Oo as SettingsManager,Jr as SettingsSelectorComponent,oo as ShellSandbox,Zr as ShowImagesSelectorComponent,$r as SkillInvocationMessageComponent,fn as Theme,en as ThemeSelectorComponent,on as ThinkingSelectorComponent,tn as ToolExecutionComponent,rn as TreeSelectorComponent,an as UserMessageComponent,sn as UserMessageSelectorComponent,c as VERSION,Dt as VIRTUAL_MODEL_STATE_ENTRY,Ot as WORKSPACE_LOCK_DIR_NAME,Nt as WORKSPACE_LOCK_FILE,zt as adaptPackage,Gt as adaptationState,S as agentLogPath,E as appendAgentLog,Xt as applyCommunityEnv,bt as applyShellEnvironmentPolicy,Ro as buildContextEntries,Ve as buildProjectMap,Me as buildRuleSet,ho as buildSessionContext,Ao as buildSessionProjection,D as calculateContextTokens,Lt as claimWorkspace,P as collectEntriesForBranchSummary,qt as communityEnv,L as compact,ge as convertToLlm,hn as convertToPng,Tn as copyToClipboard,ao as createAgentSession,io as createAgentSessionFromServices,so as createAgentSessionRuntime,lo as createAgentSessionServices,mo as createBashTool,Qo as createBashToolDefinition,Er as createCodemodeExtension,po as createCodingTools,co as createEditTool,Yo as createEditToolDefinition,b as createEventBus,W as createExtensionRuntime,So as createFindTool,Jo as createFindToolDefinition,Eo as createGrepTool,Zo as createGrepToolDefinition,$o as createLocalBashOperations,et as createLocalPowerShellOperations,fo as createLsTool,ot as createLsToolDefinition,gr as createMcpExtension,go as createPowerShellTool,tt as createPowerShellToolDefinition,rt as createProcessToolDefinition,To as createReadOnlyTools,xo as createReadTool,nt as createReadToolDefinition,bo as createSyntheticSourceInfo,ur as createToolSearchExtension,Co as createWriteTool,at as createWriteToolDefinition,_t as defaultWorkspaceLockDir,K as defineTool,be as describeProjectFacts,Ue as detectProjectFacts,Qe as detectSandboxAvailability,_n as detectSupportedImageMimeTypeFromFile,V as discoverAndLoadExtensions,Qt as ensurePackageAdapted,M as estimateTokens,ve as evaluateToolPolicy,gt as expandTempDirVariable,sr as fetchSignedMarket,k as findCutPoint,I as findTurnStartIndex,Dn as formatDimensionNote,je as formatProjectMapPrompt,Ct as formatReadLineRange,lt as formatSize,vo as formatSkillsForPrompt,y as generateBranchSummary,Go as generateDiffString,F as generateSummary,O as generateSummaryWithUsage,zo as generateUnifiedPatch,a as getAgentDir,Po as getDefaultSessionDir,Lo as getDefaultSessionDirs,i as getDocsPath,s as getExamplesPath,se as getHostCapabilities,mn as getLanguageFromPath,N as getLastAssistantUsage,_o as getLatestCompactionEntry,pn as getMarkdownTheme,l as getPackageDir,yn as getPowerShellConfig,Ye as getProcessShellSandbox,m as getReadmePath,cn as getSelectListTheme,dn as getSettingsListTheme,Fn as getShellConfig,On as getShellEnv,Wo as getToolDenial,Mt as gitDirOf,Rt as hasTrustRequiringProjectResources,Sn as highlightCode,En as initTheme,Yt as isAdaptablePackage,z as isBashToolResult,Wt as isDalCodeCredentialName,X as isEditToolResult,q as isFatalExtensionError,Q as isFindToolResult,Y as isGrepToolResult,rr as isHostExtensionPath,J as isLsToolResult,Z as isPowerShellToolResult,Vo as isReadOnlyBashCommand,$ as isReadToolResult,ee as isToolCallEventType,oe as isWriteToolResult,Vr as keyHint,jr as keyText,xr as loadMcpRuntime,Xe as loadProjectContextFiles,Bo as loadSkills,Ho as loadSkillsFromDir,hr as main,nr as markHostExtensionPaths,mr as marketCacheDir,ke as matchPermissionRules,Mo as migrateSessionEntries,Xo as normalizeForFuzzyMatch,kn as openBrowser,t as parseArgs,Cn as parseFrontmatter,Ee as parseHostCapabilities,Ie as parsePermissionRule,ko as parseSessionEntries,T as parseSkillBlock,v as prepareBranchEntries,We as projectPackageManager,qr as rawKeyHint,Be as readAccessDenial,Jt as readAdaptation,pr as readSignedSection,C as readStoredCredential,kt as readWorkspaceLock,He as registerPermissionAskHandler,Ze as registerSandboxEscalationHandler,mt as registerShellExecutionGuard,It as releaseWorkspace,Qr as renderDiff,Pn as resizeImage,ue as resolveCliModel,cr as resolveMarketEndpoint,Re as resolveModelScopeWithDiagnostics,$e as resolveSandboxPolicy,Tt as resolveToCwd,_r as runPrintMode,Mr as runRpcMode,Zt as scanHardcodedPiPaths,B as serializeConversation,yo as sessionEntryToContextMessages,Ft as shellCommandDirectory,pt as shellExecutionRefusal,H as shouldCompact,Fe as simpleCommands,un as stripFrontmatter,to as systemTempDirs,ct as truncateHead,dt as truncateLine,St as truncateTail,nn as truncateToVisualLines,$t as tryEnsurePackageAdapted,Oe as unwrapCommand,er as verifyAdaptation,dr as verifySignedSection,Et as withFileMutationQueue,Kt as withoutDalCodeCredentials,vt as workspaceLockIsLive,Bt as workspaceLockPath,Ht as workspaceOwnerSessionId,ne as wrapRegisteredTool,ae as wrapRegisteredTools};
1
+ import{parseArgs as t}from"./cli/args.js";import{APP_TITLE as n,CONFIG_DIR_NAME as a,getAgentDir as i,getDocsPath as s,getExamplesPath as l,getPackageDir as m,getReadmePath as p,SHARED_SKILL_CONFIG_DIRS as c,VERSION as d}from"./config.js";import{agentLogPath as E,appendAgentLog as T}from"./core/agent-log.js";import{AgentSession as g,parseSkillBlock as x}from"./core/agent-session.js";import{readStoredCredential as u}from"./core/auth-storage.js";import{BackgroundProcessManager as h,MAX_BACKGROUND_PROCESSES as P}from"./core/background-processes.js";import{calculateContextTokens as D,collectEntriesForBranchSummary as L,compact as _,DEFAULT_COMPACTION_SETTINGS as M,estimateTokens as I,findCutPoint as k,findTurnStartIndex as y,generateBranchSummary as F,generateSummary as O,generateSummaryWithUsage as N,getLastAssistantUsage as v,prepareBranchEntries as B,serializeConversation as H,shouldCompact as w}from"./core/compaction/index.js";import{createEventBus as U}from"./core/event-bus.js";import{createExtensionRuntime as K,defineTool as V,discoverAndLoadExtensions as j,ExtensionFatalError as G,ExtensionRunner as z,isBashToolResult as X,isEditToolResult as q,isFatalExtensionError as Q,isFindToolResult as Y,isGrepToolResult as J,isLsToolResult as Z,isPowerShellToolResult as $,isReadToolResult as ee,isToolCallEventType as oe,isWriteToolResult as te,REQUIRED_EXTENSION_FAILED as re,RequiredExtensionError as ne,wrapRegisteredTool as ae,wrapRegisteredTools as ie}from"./core/extensions/index.js";import{getHostCapabilities as le,HOST_CAPABILITIES_ENV as me,HOST_TOKEN_ENV as pe,HOST_TOKEN_HEADER as ce,HOST_URL_ENV as de,HostCallError as Se,HostCapabilities as Ee,parseHostCapabilities as Te}from"./core/host-capabilities.js";import{convertToLlm as ge}from"./core/messages.js";import{ModelRegistry as Ce}from"./core/model-registry.js";import{resolveCliModel as Re,resolveModelScopeWithDiagnostics as he}from"./core/model-resolver.js";import{CredentialSynchronizationError as Ae,ModelRuntime as De}from"./core/model-runtime.js";import{DefaultPackageManager as _e}from"./core/package-manager.js";import{buildRuleSet as Ie,matchPermissionRules as ke,parsePermissionRule as ye}from"./core/permissions/rules.js";import{simpleCommands as Oe,unwrapCommand as Ne}from"./core/permissions/shell-words.js";import{evaluateToolPolicy as Be,readAccessDenial as He,registerPermissionAskHandler as we}from"./core/permissions/tool-policy.js";import{describeProjectFacts as Ue,detectProjectFacts as We,projectPackageManager as Ke}from"./core/project-facts.js";import{buildProjectMap as je,formatProjectMapPrompt as Ge}from"./core/project-map.js";import{DefaultResourceLoader as Xe,loadProjectContextFiles as qe}from"./core/resource-loader.js";import{detectSandboxAvailability as Ye,getProcessShellSandbox as Je,PROTECTED_WRITE_NAMES as Ze,registerSandboxEscalationHandler as $e,resolveSandboxPolicy as eo,SANDBOX_ENV as oo,ShellSandbox as to,systemTempDirs as ro}from"./core/sandbox/index.js";import{AgentSessionRuntime as ao,createAgentSession as io,createAgentSessionFromServices as so,createAgentSessionRuntime as lo,createAgentSessionServices as mo,createBashTool as po,createCodingTools as co,createEditTool as So,createFindTool as Eo,createGrepTool as To,createLsTool as fo,createPowerShellTool as go,createReadOnlyTools as xo,createReadTool as Co,createWriteTool as uo}from"./core/sdk.js";import{buildContextEntries as ho,buildSessionContext as Po,buildSessionProjection as Ao,CURRENT_SESSION_VERSION as Do,getDefaultSessionDir as Lo,getDefaultSessionDirs as _o,getLatestCompactionEntry as Mo,migrateSessionEntries as Io,parseSessionEntries as ko,SessionManager as yo,sessionEntryToContextMessages as Fo}from"./core/session-manager.js";import{SettingsManager as No}from"./core/settings-manager.js";import{formatSkillsForPrompt as Bo,loadSkills as Ho,loadSkillsFromDir as wo}from"./core/skills.js";import{createSyntheticSourceInfo as Uo}from"./core/source-info.js";import{getToolDenial as Ko}from"./core/tool-denial.js";import{isReadOnlyBashCommand as jo}from"./core/tools/bash-read-only.js";import{generateDiffString as zo,generateUnifiedPatch as Xo,normalizeForFuzzyMatch as qo}from"./core/tools/edit-diff.js";import{createBashToolDefinition as Yo,createEditToolDefinition as Jo,createFindToolDefinition as Zo,createGrepToolDefinition as $o,createLocalBashOperations as et,createLocalPowerShellOperations as ot,createLsToolDefinition as tt,createPowerShellToolDefinition as rt,createProcessToolDefinition as nt,createReadToolDefinition as at,createWriteToolDefinition as it,DEFAULT_MAX_BYTES as st,DEFAULT_MAX_LINES as lt,formatSize as mt,registerShellExecutionGuard as pt,shellExecutionRefusal as ct,truncateHead as dt,truncateLine as St,truncateTail as Et,withFileMutationQueue as Tt}from"./core/tools/index.js";import{expandTempDirVariable as gt,resolveToCwd as xt}from"./core/tools/path-utils.js";import{formatReadLineRange as ut}from"./core/tools/render-utils.js";import{hasTrustRequiringProjectResources as ht,ProjectTrustStore as Pt}from"./core/trust-manager.js";import{VIRTUAL_MODEL_STATE_ENTRY as Dt}from"./core/virtual-models.js";import{claimWorkspace as _t,defaultWorkspaceLockDir as Mt,gitDirOf as It,readWorkspaceLock as kt,releaseWorkspace as yt,STALE_AFTER_MS as Ft,shellCommandDirectory as Ot,WORKSPACE_LOCK_DIR_NAME as Nt,WORKSPACE_LOCK_FILE as vt,workspaceLockIsLive as Bt,workspaceLockPath as Ht,workspaceOwnerSessionId as wt}from"./core/workspace-lock.js";import{applyShellEnvironmentPolicy as Ut,DEFAULT_SHELL_ENV_EXCLUDES as Wt,isDalCodeCredentialName as Kt,withoutDalCodeCredentials as Vt}from"./dal/child-env.js";import{ADAPTATION_FILE as Gt,adaptationState as zt,adaptPackage as Xt,applyCommunityEnv as qt,communityEnv as Qt,ensurePackageAdapted as Yt,isAdaptablePackage as Jt,readAdaptation as Zt,scanHardcodedPiPaths as $t,tryEnsurePackageAdapted as er,verifyAdaptation as or}from"./dal/extension-compat.js";export*from"./dal/hooks/index.js";import{isHostExtensionPath as nr,markHostExtensionPaths as ar}from"./dal/host-extensions.js";import{ENGINE_MARKET_CACHE_FILE as sr,fetchSignedMarket as lr,MARKET_SECTIONS as mr,marketCacheDir as pr,readSignedSection as cr,resolveMarketEndpoint as dr,verifySignedSection as Sr}from"./dal/reviewed/market.js";import{createCodemodeExtension as Tr}from"./extensions/codemode/index.js";import{createMcpExtension as gr}from"./extensions/mcp/index.js";import{loadMcpRuntime as Cr}from"./extensions/mcp/runtime.lazy.js";import{createToolSearchExtension as Rr}from"./extensions/tool-search/index.js";import{main as Pr}from"./main.js";import{InteractiveMode as Dr,RpcClient as Lr,RpcCommandError as _r,runPrintMode as Mr,runRpcMode as Ir}from"./modes/index.js";import{ArminComponent as yr,AssistantMessageComponent as Fr,BashExecutionComponent as Or,BorderedLoader as Nr,BranchSummaryMessageComponent as vr,CompactionSummaryMessageComponent as Br,CustomEditor as Hr,CustomMessageComponent as wr,DynamicBorder as br,ExtensionEditorComponent as Ur,ExtensionInputComponent as Wr,ExtensionSelectorComponent as Kr,FooterComponent as Vr,keyHint as jr,keyText as Gr,LoginDialogComponent as zr,ModelSelectorComponent as Xr,OAuthSelectorComponent as qr,rawKeyHint as Qr,renderDiff as Yr,SessionSelectorComponent as Jr,SettingsSelectorComponent as Zr,ShowImagesSelectorComponent as $r,SkillInvocationMessageComponent as en,ThemeSelectorComponent as on,ThinkingSelectorComponent as tn,ToolExecutionComponent as rn,TreeSelectorComponent as nn,truncateToVisualLines as an,UserMessageComponent as sn,UserMessageSelectorComponent as ln}from"./modes/interactive/components/index.js";import{getLanguageFromPath as pn,getMarkdownTheme as cn,getSelectListTheme as dn,getSettingsListTheme as Sn,highlightCode as En,initTheme as Tn,Theme as fn}from"./modes/interactive/theme/theme.js";import{copyToClipboard as xn}from"./utils/clipboard.js";import{parseFrontmatter as un,stripFrontmatter as Rn}from"./utils/frontmatter.js";import{convertToPng as Pn}from"./utils/image-convert.js";import{formatDimensionNote as Dn,resizeImage as Ln}from"./utils/image-resize.js";import{detectSupportedImageMimeTypeFromFile as Mn}from"./utils/mime.js";import{openBrowser as kn}from"./utils/open-browser.js";import{getPowerShellConfig as Fn,getShellConfig as On,getShellEnv as Nn}from"./utils/shell.js";export{Gt as ADAPTATION_FILE,n as APP_TITLE,g as AgentSession,ao as AgentSessionRuntime,yr as ArminComponent,Fr as AssistantMessageComponent,h as BackgroundProcessManager,Or as BashExecutionComponent,Nr as BorderedLoader,vr as BranchSummaryMessageComponent,a as CONFIG_DIR_NAME,Do as CURRENT_SESSION_VERSION,Br as CompactionSummaryMessageComponent,Ae as CredentialSynchronizationError,Hr as CustomEditor,wr as CustomMessageComponent,M as DEFAULT_COMPACTION_SETTINGS,st as DEFAULT_MAX_BYTES,lt as DEFAULT_MAX_LINES,Wt as DEFAULT_SHELL_ENV_EXCLUDES,_e as DefaultPackageManager,Xe as DefaultResourceLoader,br as DynamicBorder,sr as ENGINE_MARKET_CACHE_FILE,Ur as ExtensionEditorComponent,G as ExtensionFatalError,Wr as ExtensionInputComponent,z as ExtensionRunner,Kr as ExtensionSelectorComponent,Vr as FooterComponent,me as HOST_CAPABILITIES_ENV,pe as HOST_TOKEN_ENV,ce as HOST_TOKEN_HEADER,de as HOST_URL_ENV,Se as HostCallError,Ee as HostCapabilities,Dr as InteractiveMode,zr as LoginDialogComponent,mr as MARKET_SECTIONS,P as MAX_BACKGROUND_PROCESSES,Ce as ModelRegistry,De as ModelRuntime,Xr as ModelSelectorComponent,qr as OAuthSelectorComponent,Ze as PROTECTED_WRITE_NAMES,Pt as ProjectTrustStore,re as REQUIRED_EXTENSION_FAILED,ne as RequiredExtensionError,Lr as RpcClient,_r as RpcCommandError,oo as SANDBOX_ENV,c as SHARED_SKILL_CONFIG_DIRS,Ft as STALE_AFTER_MS,yo as SessionManager,Jr as SessionSelectorComponent,No as SettingsManager,Zr as SettingsSelectorComponent,to as ShellSandbox,$r as ShowImagesSelectorComponent,en as SkillInvocationMessageComponent,fn as Theme,on as ThemeSelectorComponent,tn as ThinkingSelectorComponent,rn as ToolExecutionComponent,nn as TreeSelectorComponent,sn as UserMessageComponent,ln as UserMessageSelectorComponent,d as VERSION,Dt as VIRTUAL_MODEL_STATE_ENTRY,Nt as WORKSPACE_LOCK_DIR_NAME,vt as WORKSPACE_LOCK_FILE,Xt as adaptPackage,zt as adaptationState,E as agentLogPath,T as appendAgentLog,qt as applyCommunityEnv,Ut as applyShellEnvironmentPolicy,ho as buildContextEntries,je as buildProjectMap,Ie as buildRuleSet,Po as buildSessionContext,Ao as buildSessionProjection,D as calculateContextTokens,_t as claimWorkspace,L as collectEntriesForBranchSummary,Qt as communityEnv,_ as compact,ge as convertToLlm,Pn as convertToPng,xn as copyToClipboard,io as createAgentSession,so as createAgentSessionFromServices,lo as createAgentSessionRuntime,mo as createAgentSessionServices,po as createBashTool,Yo as createBashToolDefinition,Tr as createCodemodeExtension,co as createCodingTools,So as createEditTool,Jo as createEditToolDefinition,U as createEventBus,K as createExtensionRuntime,Eo as createFindTool,Zo as createFindToolDefinition,To as createGrepTool,$o as createGrepToolDefinition,et as createLocalBashOperations,ot as createLocalPowerShellOperations,fo as createLsTool,tt as createLsToolDefinition,gr as createMcpExtension,go as createPowerShellTool,rt as createPowerShellToolDefinition,nt as createProcessToolDefinition,xo as createReadOnlyTools,Co as createReadTool,at as createReadToolDefinition,Uo as createSyntheticSourceInfo,Rr as createToolSearchExtension,uo as createWriteTool,it as createWriteToolDefinition,Mt as defaultWorkspaceLockDir,V as defineTool,Ue as describeProjectFacts,We as detectProjectFacts,Ye as detectSandboxAvailability,Mn as detectSupportedImageMimeTypeFromFile,j as discoverAndLoadExtensions,Yt as ensurePackageAdapted,I as estimateTokens,Be as evaluateToolPolicy,gt as expandTempDirVariable,lr as fetchSignedMarket,k as findCutPoint,y as findTurnStartIndex,Dn as formatDimensionNote,Ge as formatProjectMapPrompt,ut as formatReadLineRange,mt as formatSize,Bo as formatSkillsForPrompt,F as generateBranchSummary,zo as generateDiffString,O as generateSummary,N as generateSummaryWithUsage,Xo as generateUnifiedPatch,i as getAgentDir,Lo as getDefaultSessionDir,_o as getDefaultSessionDirs,s as getDocsPath,l as getExamplesPath,le as getHostCapabilities,pn as getLanguageFromPath,v as getLastAssistantUsage,Mo as getLatestCompactionEntry,cn as getMarkdownTheme,m as getPackageDir,Fn as getPowerShellConfig,Je as getProcessShellSandbox,p as getReadmePath,dn as getSelectListTheme,Sn as getSettingsListTheme,On as getShellConfig,Nn as getShellEnv,Ko as getToolDenial,It as gitDirOf,ht as hasTrustRequiringProjectResources,En as highlightCode,Tn as initTheme,Jt as isAdaptablePackage,X as isBashToolResult,Kt as isDalCodeCredentialName,q as isEditToolResult,Q as isFatalExtensionError,Y as isFindToolResult,J as isGrepToolResult,nr as isHostExtensionPath,Z as isLsToolResult,$ as isPowerShellToolResult,jo as isReadOnlyBashCommand,ee as isReadToolResult,oe as isToolCallEventType,te as isWriteToolResult,jr as keyHint,Gr as keyText,Cr as loadMcpRuntime,qe as loadProjectContextFiles,Ho as loadSkills,wo as loadSkillsFromDir,Pr as main,ar as markHostExtensionPaths,pr as marketCacheDir,ke as matchPermissionRules,Io as migrateSessionEntries,qo as normalizeForFuzzyMatch,kn as openBrowser,t as parseArgs,un as parseFrontmatter,Te as parseHostCapabilities,ye as parsePermissionRule,ko as parseSessionEntries,x as parseSkillBlock,B as prepareBranchEntries,Ke as projectPackageManager,Qr as rawKeyHint,He as readAccessDenial,Zt as readAdaptation,cr as readSignedSection,u as readStoredCredential,kt as readWorkspaceLock,we as registerPermissionAskHandler,$e as registerSandboxEscalationHandler,pt as registerShellExecutionGuard,yt as releaseWorkspace,Yr as renderDiff,Ln as resizeImage,Re as resolveCliModel,dr as resolveMarketEndpoint,he as resolveModelScopeWithDiagnostics,eo as resolveSandboxPolicy,xt as resolveToCwd,Mr as runPrintMode,Ir as runRpcMode,$t as scanHardcodedPiPaths,H as serializeConversation,Fo as sessionEntryToContextMessages,Ot as shellCommandDirectory,ct as shellExecutionRefusal,w as shouldCompact,Oe as simpleCommands,Rn as stripFrontmatter,ro as systemTempDirs,dt as truncateHead,St as truncateLine,Et as truncateTail,an as truncateToVisualLines,er as tryEnsurePackageAdapted,Ne as unwrapCommand,or as verifyAdaptation,Sr as verifySignedSection,Tt as withFileMutationQueue,Vt as withoutDalCodeCredentials,Bt as workspaceLockIsLive,Ht as workspaceLockPath,wt as workspaceOwnerSessionId,ae as wrapRegisteredTool,ie as wrapRegisteredTools};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dalcode/dal-advisor",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "private": true,
5
5
  "description": "advisor: the model asks another strong model to review its current plan and point out risks. Adapted from @juicesharp/rpiv-advisor 2.13.8 (MIT).",
6
6
  "license": "MIT",
@@ -20,8 +20,8 @@
20
20
  ]
21
21
  },
22
22
  "dependencies": {
23
- "@dalcode/dal-pi-kit": "1.0.59",
24
- "@dalcode/dal-router": "1.0.59",
23
+ "@dalcode/dal-pi-kit": "1.0.60",
24
+ "@dalcode/dal-router": "1.0.60",
25
25
  "typebox": "1.3.27"
26
26
  },
27
27
  "peerDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dalcode/dal-awake",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "private": true,
5
5
  "description": "Keeps the computer from going to sleep while a long agent run is in progress, and lets it sleep again when the run ends. Adapted from @narumitw/pi-caffeinate (MIT).",
6
6
  "type": "module",
@@ -18,7 +18,7 @@
18
18
  ]
19
19
  },
20
20
  "dependencies": {
21
- "@dalcode/dal-pi-kit": "1.0.59"
21
+ "@dalcode/dal-pi-kit": "1.0.60"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@earendil-works/pi-coding-agent": "^1.0.9"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dalcode/dal-bridge",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -18,7 +18,7 @@
18
18
  ]
19
19
  },
20
20
  "dependencies": {
21
- "@dalcode/dal-pi-kit": "1.0.59",
21
+ "@dalcode/dal-pi-kit": "1.0.60",
22
22
  "typebox": "1.3.7"
23
23
  },
24
24
  "peerDependencies": {