@bryanhu/codexly 0.34.1 → 0.36.0

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 (485) hide show
  1. package/CHANGELOG.md +61 -1
  2. package/README.md +30 -6
  3. package/README.zh-CN.md +36 -6
  4. package/dist/chunk-3WW7LK46.js +5 -0
  5. package/dist/chunk-DRIJMD7S.js +1040 -0
  6. package/dist/chunk-GFASBWL4.js +3 -0
  7. package/dist/chunk-HD7TOFDV.js +3 -0
  8. package/dist/chunk-IV4NRE4S.js +2 -0
  9. package/dist/chunk-PQPYP3AR.js +77 -0
  10. package/dist/chunk-XJOOU7A5.js +2 -0
  11. package/dist/chunk-YXJGRSCL.js +2 -0
  12. package/dist/chunk-ZK7RF5XC.js +40 -0
  13. package/dist/cli.js +6 -1269
  14. package/dist/client/index.js +2 -1564
  15. package/dist/codex-jsonl-frame-worker.js +2 -120
  16. package/dist/command-VIK5GXBS.js +84 -0
  17. package/dist/core/index.js +1 -5
  18. package/dist/dist-2UQZKK3B.js +2 -0
  19. package/dist/historical-attachment-worker.js +2 -0
  20. package/dist/protocol/index.js +1 -6
  21. package/dist/providers/codex/index.js +1 -8
  22. package/dist/scheduled-task-recurrence-worker.js +9 -2969
  23. package/dist/server/index.js +1 -10
  24. package/dist/sqlite-state-worker.js +31 -872
  25. package/dist/web/.vite/manifest.json +348 -304
  26. package/dist/web/.vite/manifest.json.br +0 -0
  27. package/dist/web/.vite/manifest.json.gz +0 -0
  28. package/dist/web/assets/abnfDiagram-N423BO3Z-BA9G7eND.js +1 -0
  29. package/dist/web/assets/abnfDiagram-N423BO3Z-BA9G7eND.js.br +0 -0
  30. package/dist/web/assets/abnfDiagram-N423BO3Z-BA9G7eND.js.gz +0 -0
  31. package/dist/web/assets/agent-settings-panel-B0qVVJ3_.js +1 -0
  32. package/dist/web/assets/agent-settings-panel-B0qVVJ3_.js.br +0 -0
  33. package/dist/web/assets/agent-settings-panel-B0qVVJ3_.js.gz +0 -0
  34. package/dist/web/assets/architectureDiagram-T3A2C74G-hY1IIQ-y.js +36 -0
  35. package/dist/web/assets/architectureDiagram-T3A2C74G-hY1IIQ-y.js.br +0 -0
  36. package/dist/web/assets/architectureDiagram-T3A2C74G-hY1IIQ-y.js.gz +0 -0
  37. package/dist/web/assets/{background-image-picker-qVC2tyE3.js → background-image-picker-CVhVTosp.js} +1 -1
  38. package/dist/web/assets/background-image-picker-CVhVTosp.js.br +0 -0
  39. package/dist/web/assets/background-image-picker-CVhVTosp.js.gz +0 -0
  40. package/dist/web/assets/{chunk-5RXB4S5H-CZZnhtaV.js → chunk-5RXB4S5H-fg31GjQR.js} +1 -1
  41. package/dist/web/assets/chunk-5RXB4S5H-fg31GjQR.js.br +0 -0
  42. package/dist/web/assets/chunk-5RXB4S5H-fg31GjQR.js.gz +0 -0
  43. package/dist/web/assets/{chunk-6Q2QTUOP-F3pSVbiC.js → chunk-6Q2QTUOP-UGVxaGe-.js} +1 -1
  44. package/dist/web/assets/chunk-6Q2QTUOP-UGVxaGe-.js.br +0 -0
  45. package/dist/web/assets/chunk-6Q2QTUOP-UGVxaGe-.js.gz +0 -0
  46. package/dist/web/assets/{chunk-GF5L2VYU-DtEOvQdn.js → chunk-GF5L2VYU-iTLU6Gbu.js} +2 -2
  47. package/dist/web/assets/chunk-GF5L2VYU-iTLU6Gbu.js.br +0 -0
  48. package/dist/web/assets/chunk-GF5L2VYU-iTLU6Gbu.js.gz +0 -0
  49. package/dist/web/assets/{chunk-JQJVKLGR-BHL4KhjZ.js → chunk-JQJVKLGR-DzWAKhHq.js} +3 -3
  50. package/dist/web/assets/chunk-JQJVKLGR-DzWAKhHq.js.br +0 -0
  51. package/dist/web/assets/chunk-JQJVKLGR-DzWAKhHq.js.gz +0 -0
  52. package/dist/web/assets/classDiagram-JCYQIIEL-Cc_4r5xo.js +1 -0
  53. package/dist/web/assets/classDiagram-JCYQIIEL-Cc_4r5xo.js.br +0 -0
  54. package/dist/web/assets/classDiagram-JCYQIIEL-Cc_4r5xo.js.gz +0 -0
  55. package/dist/web/assets/classDiagram-v2-OCEON4UE-Cc_4r5xo.js +1 -0
  56. package/dist/web/assets/classDiagram-v2-OCEON4UE-Cc_4r5xo.js.br +0 -0
  57. package/dist/web/assets/classDiagram-v2-OCEON4UE-Cc_4r5xo.js.gz +0 -0
  58. package/dist/web/assets/code-highlighter-CTwU6LuI.js +3 -0
  59. package/dist/web/assets/code-highlighter-CTwU6LuI.js.br +0 -0
  60. package/dist/web/assets/code-highlighter-CTwU6LuI.js.gz +0 -0
  61. package/dist/web/assets/{commit-settings-panel-2rAqVa_3.js → commit-settings-panel-Ctb-LmoD.js} +1 -1
  62. package/dist/web/assets/commit-settings-panel-Ctb-LmoD.js.br +0 -0
  63. package/dist/web/assets/commit-settings-panel-Ctb-LmoD.js.gz +0 -0
  64. package/dist/web/assets/cynefinDiagram-MW4NZA55-CarrAQe_.js +62 -0
  65. package/dist/web/assets/cynefinDiagram-MW4NZA55-CarrAQe_.js.br +0 -0
  66. package/dist/web/assets/cynefinDiagram-MW4NZA55-CarrAQe_.js.gz +0 -0
  67. package/dist/web/assets/{diagram-7IWD3JNH-B9Lkv0en.js → diagram-7IWD3JNH-CHgQ34Br.js} +3 -3
  68. package/dist/web/assets/diagram-7IWD3JNH-CHgQ34Br.js.br +0 -0
  69. package/dist/web/assets/diagram-7IWD3JNH-CHgQ34Br.js.gz +0 -0
  70. package/dist/web/assets/diagram-B4RE2ZJO-qtdLm98R.js +3 -0
  71. package/dist/web/assets/diagram-B4RE2ZJO-qtdLm98R.js.br +0 -0
  72. package/dist/web/assets/diagram-B4RE2ZJO-qtdLm98R.js.gz +0 -0
  73. package/dist/web/assets/diagram-LBJQPF4R-Do0sclzV.js +24 -0
  74. package/dist/web/assets/diagram-LBJQPF4R-Do0sclzV.js.br +0 -0
  75. package/dist/web/assets/diagram-LBJQPF4R-Do0sclzV.js.gz +0 -0
  76. package/dist/web/assets/diagram-Q27KOJAE-CuX25bnK.js +24 -0
  77. package/dist/web/assets/diagram-Q27KOJAE-CuX25bnK.js.br +0 -0
  78. package/dist/web/assets/diagram-Q27KOJAE-CuX25bnK.js.gz +0 -0
  79. package/dist/web/assets/diagram-UB23O5K3-C8vf7TKH.js +41 -0
  80. package/dist/web/assets/diagram-UB23O5K3-C8vf7TKH.js.br +0 -0
  81. package/dist/web/assets/diagram-UB23O5K3-C8vf7TKH.js.gz +0 -0
  82. package/dist/web/assets/{dist-jnof4ZZu.js → dist-C12Fexcu.js} +1 -1
  83. package/dist/web/assets/dist-C12Fexcu.js.br +0 -0
  84. package/dist/web/assets/dist-C12Fexcu.js.gz +0 -0
  85. package/dist/web/assets/dist-DHnVkR1t.js +42 -0
  86. package/dist/web/assets/dist-DHnVkR1t.js.br +0 -0
  87. package/dist/web/assets/dist-DHnVkR1t.js.gz +0 -0
  88. package/dist/web/assets/ebnfDiagram-BXEA7PRR-DctRYehy.js +1 -0
  89. package/dist/web/assets/ebnfDiagram-BXEA7PRR-DctRYehy.js.br +0 -0
  90. package/dist/web/assets/ebnfDiagram-BXEA7PRR-DctRYehy.js.gz +0 -0
  91. package/dist/web/assets/{erDiagram-JOGREHBK-B83NMJhw.js → erDiagram-JOGREHBK-BkfLzWvS.js} +2 -2
  92. package/dist/web/assets/erDiagram-JOGREHBK-BkfLzWvS.js.br +0 -0
  93. package/dist/web/assets/erDiagram-JOGREHBK-BkfLzWvS.js.gz +0 -0
  94. package/dist/web/assets/file-review-dialog-pkoiV9C7.js +2 -0
  95. package/dist/web/assets/file-review-dialog-pkoiV9C7.js.br +0 -0
  96. package/dist/web/assets/file-review-dialog-pkoiV9C7.js.gz +0 -0
  97. package/dist/web/assets/{flowDiagram-UKHOOZJN-4x6NyWk2.js → flowDiagram-UKHOOZJN-CQWRJfj_.js} +1 -1
  98. package/dist/web/assets/flowDiagram-UKHOOZJN-CQWRJfj_.js.br +0 -0
  99. package/dist/web/assets/flowDiagram-UKHOOZJN-CQWRJfj_.js.gz +0 -0
  100. package/dist/web/assets/git-commit-review-BK6Ykgxx.js +2 -0
  101. package/dist/web/assets/git-commit-review-BK6Ykgxx.js.br +0 -0
  102. package/dist/web/assets/git-commit-review-BK6Ykgxx.js.gz +0 -0
  103. package/dist/web/assets/git-history-panel-BYunPg_Y.js +1 -0
  104. package/dist/web/assets/git-history-panel-BYunPg_Y.js.br +0 -0
  105. package/dist/web/assets/git-history-panel-BYunPg_Y.js.gz +0 -0
  106. package/dist/web/assets/gitGraphDiagram-DS77QQ5N-JH4oE096.js +106 -0
  107. package/dist/web/assets/gitGraphDiagram-DS77QQ5N-JH4oE096.js.br +0 -0
  108. package/dist/web/assets/gitGraphDiagram-DS77QQ5N-JH4oE096.js.gz +0 -0
  109. package/dist/web/assets/global-search-dialog-DKnqW_9p.js +2 -0
  110. package/dist/web/assets/global-search-dialog-DKnqW_9p.js.br +0 -0
  111. package/dist/web/assets/global-search-dialog-DKnqW_9p.js.gz +0 -0
  112. package/dist/web/assets/{global-settings-about-QnPZzZuN.js → global-settings-about-CUWtouNQ.js} +1 -1
  113. package/dist/web/assets/global-settings-about-CUWtouNQ.js.br +0 -0
  114. package/dist/web/assets/global-settings-about-CUWtouNQ.js.gz +0 -0
  115. package/dist/web/assets/global-settings-page-7DIqvRQV.js +2 -0
  116. package/dist/web/assets/global-settings-page-7DIqvRQV.js.br +0 -0
  117. package/dist/web/assets/global-settings-page-7DIqvRQV.js.gz +0 -0
  118. package/dist/web/assets/{global-settings-pets-Bx1MItgn.js → global-settings-pets-DOp0Bwxj.js} +1 -1
  119. package/dist/web/assets/global-settings-pets-DOp0Bwxj.js.br +0 -0
  120. package/dist/web/assets/global-settings-pets-DOp0Bwxj.js.gz +0 -0
  121. package/dist/web/assets/{highlighted-body-OFNGDK62-DUyZcQSF.js → highlighted-body-OFNGDK62-BN31gHcf.js} +1 -1
  122. package/dist/web/assets/highlighted-body-OFNGDK62-BN31gHcf.js.br +0 -0
  123. package/dist/web/assets/highlighted-body-OFNGDK62-BN31gHcf.js.gz +0 -0
  124. package/dist/web/assets/{history-task-timeline-7DRGPm6t.js → history-task-timeline-Db7jVbJQ.js} +1 -1
  125. package/dist/web/assets/history-task-timeline-Db7jVbJQ.js.br +0 -0
  126. package/dist/web/assets/history-task-timeline-Db7jVbJQ.js.gz +0 -0
  127. package/dist/web/assets/{image-preview-DivFRWxv.js → image-preview-NyGMcveW.js} +2 -2
  128. package/dist/web/assets/image-preview-NyGMcveW.js.br +0 -0
  129. package/dist/web/assets/image-preview-NyGMcveW.js.gz +0 -0
  130. package/dist/web/assets/{image-preview-content-SHlFPatX.js → image-preview-content-BBgkjUms.js} +2 -2
  131. package/dist/web/assets/image-preview-content-BBgkjUms.js.br +0 -0
  132. package/dist/web/assets/image-preview-content-BBgkjUms.js.gz +0 -0
  133. package/dist/web/assets/index-Bea8TUta.css +2 -0
  134. package/dist/web/assets/index-Bea8TUta.css.br +0 -0
  135. package/dist/web/assets/index-Bea8TUta.css.gz +0 -0
  136. package/dist/web/assets/index-CGGXkww0.js +4 -0
  137. package/dist/web/assets/index-CGGXkww0.js.br +0 -0
  138. package/dist/web/assets/index-CGGXkww0.js.gz +0 -0
  139. package/dist/web/assets/infoDiagram-6WML65LV-smD1e7u3.js +2 -0
  140. package/dist/web/assets/infoDiagram-6WML65LV-smD1e7u3.js.br +0 -0
  141. package/dist/web/assets/infoDiagram-6WML65LV-smD1e7u3.js.gz +0 -0
  142. package/dist/web/assets/{initial-deps-CjThEvcM.js → initial-deps-CJDv_c3Y.js} +1 -1
  143. package/dist/web/assets/initial-deps-CJDv_c3Y.js.br +0 -0
  144. package/dist/web/assets/{initial-deps-CjThEvcM.js.gz → initial-deps-CJDv_c3Y.js.gz} +0 -0
  145. package/dist/web/assets/initial-deps-DwgXix97.js +2 -0
  146. package/dist/web/assets/initial-deps-DwgXix97.js.br +0 -0
  147. package/dist/web/assets/initial-deps-DwgXix97.js.gz +0 -0
  148. package/dist/web/assets/{installed-skills-pane-xlfIyXj3.js → installed-skills-pane-BjwoHdKg.js} +1 -1
  149. package/dist/web/assets/installed-skills-pane-BjwoHdKg.js.br +0 -0
  150. package/dist/web/assets/installed-skills-pane-BjwoHdKg.js.gz +0 -0
  151. package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-DL-EqtUw.js → ishikawaDiagram-WSZJBQD7-BMJ0kCX-.js} +1 -1
  152. package/dist/web/assets/ishikawaDiagram-WSZJBQD7-BMJ0kCX-.js.br +0 -0
  153. package/dist/web/assets/ishikawaDiagram-WSZJBQD7-BMJ0kCX-.js.gz +0 -0
  154. package/dist/web/assets/{kanban-definition-27J2QSJJ-C2eEzeXr.js → kanban-definition-27J2QSJJ-pQQ3ybGq.js} +3 -3
  155. package/dist/web/assets/kanban-definition-27J2QSJJ-pQQ3ybGq.js.br +0 -0
  156. package/dist/web/assets/kanban-definition-27J2QSJJ-pQQ3ybGq.js.gz +0 -0
  157. package/dist/web/assets/lazy-message-response-lBhr_q1o.js +2 -0
  158. package/dist/web/assets/lazy-message-response-lBhr_q1o.js.br +5 -0
  159. package/dist/web/assets/lazy-message-response-lBhr_q1o.js.gz +0 -0
  160. package/dist/web/assets/markdown-finalization.worker-DzLgTkf3.js +65 -0
  161. package/dist/web/assets/markdown-finalization.worker-DzLgTkf3.js.br +0 -0
  162. package/dist/web/assets/markdown-finalization.worker-DzLgTkf3.js.gz +0 -0
  163. package/dist/web/assets/{mcp-management-pane-DkGnQLeq.js → mcp-management-pane-sSqs8EvB.js} +1 -1
  164. package/dist/web/assets/mcp-management-pane-sSqs8EvB.js.br +0 -0
  165. package/dist/web/assets/mcp-management-pane-sSqs8EvB.js.gz +0 -0
  166. package/dist/web/assets/mermaid-GHXKKRXX-DqH-ybrY.js +1 -0
  167. package/dist/web/assets/mermaid-GHXKKRXX-DqH-ybrY.js.br +1 -0
  168. package/dist/web/assets/mermaid-GHXKKRXX-DqH-ybrY.js.gz +0 -0
  169. package/dist/web/assets/message-assistant-directive-B5_Hjs0F.js +3 -0
  170. package/dist/web/assets/message-assistant-directive-B5_Hjs0F.js.br +0 -0
  171. package/dist/web/assets/message-assistant-directive-B5_Hjs0F.js.gz +0 -0
  172. package/dist/web/assets/message-response-B1MUkN4A.js +151 -0
  173. package/dist/web/assets/message-response-B1MUkN4A.js.br +0 -0
  174. package/dist/web/assets/message-response-B1MUkN4A.js.gz +0 -0
  175. package/dist/web/assets/{mindmap-definition-FAOFIHXS-BYjrCygr.js → mindmap-definition-FAOFIHXS-CgQ5woK5.js} +2 -2
  176. package/dist/web/assets/mindmap-definition-FAOFIHXS-CgQ5woK5.js.br +0 -0
  177. package/dist/web/assets/{mindmap-definition-FAOFIHXS-BYjrCygr.js.gz → mindmap-definition-FAOFIHXS-CgQ5woK5.js.gz} +0 -0
  178. package/dist/web/assets/{official-plugins-pane-DAdYsWfC.js → official-plugins-pane-wD25peXQ.js} +1 -1
  179. package/dist/web/assets/official-plugins-pane-wD25peXQ.js.br +0 -0
  180. package/dist/web/assets/official-plugins-pane-wD25peXQ.js.gz +0 -0
  181. package/dist/web/assets/{patch-diff-viewer-xS0oLx5O.js → patch-diff-viewer-VOHL2ZQz.js} +24 -24
  182. package/dist/web/assets/patch-diff-viewer-VOHL2ZQz.js.br +0 -0
  183. package/dist/web/assets/patch-diff-viewer-VOHL2ZQz.js.gz +0 -0
  184. package/dist/web/assets/pdf-preview-BWJWSwA6.js +3 -0
  185. package/dist/web/assets/pdf-preview-BWJWSwA6.js.br +0 -0
  186. package/dist/web/assets/pdf-preview-BWJWSwA6.js.gz +0 -0
  187. package/dist/web/assets/pegDiagram-VL7TDLO6-CEECg9Qv.js +1 -0
  188. package/dist/web/assets/pegDiagram-VL7TDLO6-CEECg9Qv.js.br +0 -0
  189. package/dist/web/assets/pegDiagram-VL7TDLO6-CEECg9Qv.js.gz +0 -0
  190. package/dist/web/assets/{personalization-settings-panel-CT3SQ4Vu.js → personalization-settings-panel-Be8r7yUH.js} +1 -1
  191. package/dist/web/assets/personalization-settings-panel-Be8r7yUH.js.br +0 -0
  192. package/dist/web/assets/personalization-settings-panel-Be8r7yUH.js.gz +0 -0
  193. package/dist/web/assets/pieDiagram-7S7Q4E2Y-C3L4IYmx.js +39 -0
  194. package/dist/web/assets/pieDiagram-7S7Q4E2Y-C3L4IYmx.js.br +0 -0
  195. package/dist/web/assets/pieDiagram-7S7Q4E2Y-C3L4IYmx.js.gz +0 -0
  196. package/dist/web/assets/{project-file-popup-page-zPj3Gecj.js → project-file-popup-page-3kD_QzID.js} +1 -1
  197. package/dist/web/assets/project-file-popup-page-3kD_QzID.js.br +0 -0
  198. package/dist/web/assets/project-file-popup-page-3kD_QzID.js.gz +0 -0
  199. package/dist/web/assets/project-source-panel-ZKxkrM_q.js +2 -0
  200. package/dist/web/assets/project-source-panel-ZKxkrM_q.js.br +0 -0
  201. package/dist/web/assets/project-source-panel-ZKxkrM_q.js.gz +0 -0
  202. package/dist/web/assets/{prompt-input-HHHMHdzj.js → prompt-input-DpTzQpMu.js} +1 -1
  203. package/dist/web/assets/prompt-input-DpTzQpMu.js.br +0 -0
  204. package/dist/web/assets/prompt-input-DpTzQpMu.js.gz +0 -0
  205. package/dist/web/assets/railroadDiagram-AXF67PYL-CXSGJisB.js +1 -0
  206. package/dist/web/assets/railroadDiagram-AXF67PYL-CXSGJisB.js.br +0 -0
  207. package/dist/web/assets/railroadDiagram-AXF67PYL-CXSGJisB.js.gz +0 -0
  208. package/dist/web/assets/{requirementDiagram-LRYGKXZP-B9-6SM38.js → requirementDiagram-LRYGKXZP-uB3tW141.js} +2 -2
  209. package/dist/web/assets/requirementDiagram-LRYGKXZP-uB3tW141.js.br +0 -0
  210. package/dist/web/assets/requirementDiagram-LRYGKXZP-uB3tW141.js.gz +0 -0
  211. package/dist/web/assets/resources-en-gaD7QZkd.js +1 -0
  212. package/dist/web/assets/resources-en-gaD7QZkd.js.br +0 -0
  213. package/dist/web/assets/resources-en-gaD7QZkd.js.gz +0 -0
  214. package/dist/web/assets/{scheduled-task-date-time-picker-DtFk2PIk.js → scheduled-task-date-time-picker-CA-dPI35.js} +1 -1
  215. package/dist/web/assets/scheduled-task-date-time-picker-CA-dPI35.js.br +0 -0
  216. package/dist/web/assets/scheduled-task-date-time-picker-CA-dPI35.js.gz +0 -0
  217. package/dist/web/assets/{scheduled-task-floating-ui~scheduled-task-date-time-picker-C9XdROQX.js → scheduled-task-floating-ui~scheduled-task-date-time-picker-wwPq7k9m.js} +1 -1
  218. package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-wwPq7k9m.js.br +0 -0
  219. package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-wwPq7k9m.js.gz +0 -0
  220. package/dist/web/assets/scheduled-tasks-BBUd86IL.js +1 -0
  221. package/dist/web/assets/scheduled-tasks-BBUd86IL.js.br +0 -0
  222. package/dist/web/assets/scheduled-tasks-BBUd86IL.js.gz +0 -0
  223. package/dist/web/assets/scheduled-tasks-container-D0Zpvskg.js +2 -0
  224. package/dist/web/assets/scheduled-tasks-container-D0Zpvskg.js.br +0 -0
  225. package/dist/web/assets/scheduled-tasks-container-D0Zpvskg.js.gz +0 -0
  226. package/dist/web/assets/{sequenceDiagram-SI44F4Z6-DS13cFp5.js → sequenceDiagram-SI44F4Z6-BikVJyrh.js} +2 -2
  227. package/dist/web/assets/sequenceDiagram-SI44F4Z6-BikVJyrh.js.br +0 -0
  228. package/dist/web/assets/sequenceDiagram-SI44F4Z6-BikVJyrh.js.gz +0 -0
  229. package/dist/web/assets/{sheet-Byg2gkAE.js → sheet-BSeAYy7W.js} +1 -1
  230. package/dist/web/assets/sheet-BSeAYy7W.js.br +0 -0
  231. package/dist/web/assets/sheet-BSeAYy7W.js.gz +0 -0
  232. package/dist/web/assets/{shiki-bundle-CLewxArG.js → shiki-bundle-BZV5obW1.js} +1 -1
  233. package/dist/web/assets/shiki-bundle-BZV5obW1.js.br +2 -0
  234. package/dist/web/assets/shiki-bundle-BZV5obW1.js.gz +0 -0
  235. package/dist/web/assets/skills-market-container-iC2hoU-7.js +2 -0
  236. package/dist/web/assets/skills-market-container-iC2hoU-7.js.br +0 -0
  237. package/dist/web/assets/skills-market-container-iC2hoU-7.js.gz +0 -0
  238. package/dist/web/assets/split-workspace-menu-content-BlNIoxF5.js +1 -0
  239. package/dist/web/assets/split-workspace-menu-content-BlNIoxF5.js.br +3 -0
  240. package/dist/web/assets/split-workspace-menu-content-BlNIoxF5.js.gz +0 -0
  241. package/dist/web/assets/stateDiagram-OKZ733FA-CBWRnaGO.js +1 -0
  242. package/dist/web/assets/stateDiagram-OKZ733FA-CBWRnaGO.js.br +0 -0
  243. package/dist/web/assets/stateDiagram-OKZ733FA-CBWRnaGO.js.gz +0 -0
  244. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-CJYWLmtB.js +1 -0
  245. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-CJYWLmtB.js.br +0 -0
  246. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-CJYWLmtB.js.gz +0 -0
  247. package/dist/web/assets/{swimlanesDiagram-ULZ7WXOC-BFGAe9px.js → swimlanesDiagram-ULZ7WXOC-5agQ3ner.js} +1 -1
  248. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-5agQ3ner.js.br +0 -0
  249. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-5agQ3ner.js.gz +0 -0
  250. package/dist/web/assets/{third-party-marketplace-pane-Bt9mm_bV.js → third-party-marketplace-pane-DvF5pfS7.js} +1 -1
  251. package/dist/web/assets/third-party-marketplace-pane-DvF5pfS7.js.br +0 -0
  252. package/dist/web/assets/third-party-marketplace-pane-DvF5pfS7.js.gz +0 -0
  253. package/dist/web/assets/{timeline-definition-Z64GVDOM-B-ybp4wL.js → timeline-definition-Z64GVDOM-D_09Q10V.js} +1 -1
  254. package/dist/web/assets/timeline-definition-Z64GVDOM-D_09Q10V.js.br +0 -0
  255. package/dist/web/assets/timeline-definition-Z64GVDOM-D_09Q10V.js.gz +0 -0
  256. package/dist/web/assets/{vennDiagram-T6HMQDX7-Du4Kq6DY.js → vennDiagram-T6HMQDX7-3WtBk1Fg.js} +1 -1
  257. package/dist/web/assets/vennDiagram-T6HMQDX7-3WtBk1Fg.js.br +0 -0
  258. package/dist/web/assets/vennDiagram-T6HMQDX7-3WtBk1Fg.js.gz +0 -0
  259. package/dist/web/assets/{wardleyDiagram-T6FBY63Y-Dn8N9v_V.js → wardleyDiagram-T6FBY63Y-DBIzys3u.js} +3 -3
  260. package/dist/web/assets/wardleyDiagram-T6FBY63Y-DBIzys3u.js.br +0 -0
  261. package/dist/web/assets/wardleyDiagram-T6FBY63Y-DBIzys3u.js.gz +0 -0
  262. package/dist/web/assets/workbench-inspector-changes-DGOGbxn8.js +2 -0
  263. package/dist/web/assets/workbench-inspector-changes-DGOGbxn8.js.br +0 -0
  264. package/dist/web/assets/workbench-inspector-changes-DGOGbxn8.js.gz +0 -0
  265. package/dist/web/assets/{workbench-pet-canvas-CEcRG47k.js → workbench-pet-canvas-06NCdnyp.js} +1 -1
  266. package/dist/web/assets/workbench-pet-canvas-06NCdnyp.js.br +0 -0
  267. package/dist/web/assets/workbench-pet-canvas-06NCdnyp.js.gz +0 -0
  268. package/dist/web/assets/workbench-shell-BmVPybzn.js +16 -0
  269. package/dist/web/assets/workbench-shell-BmVPybzn.js.br +0 -0
  270. package/dist/web/assets/workbench-shell-BmVPybzn.js.gz +0 -0
  271. package/dist/web/assets/{xychartDiagram-ELKLHX3M-BUDqP7n9.js → xychartDiagram-ELKLHX3M-DwDj5q-W.js} +1 -1
  272. package/dist/web/assets/xychartDiagram-ELKLHX3M-DwDj5q-W.js.br +0 -0
  273. package/dist/web/assets/xychartDiagram-ELKLHX3M-DwDj5q-W.js.gz +0 -0
  274. package/dist/web/index.html +5 -6
  275. package/dist/web/index.html.br +0 -0
  276. package/dist/web/index.html.gz +0 -0
  277. package/docs/git-workflow.md +41 -0
  278. package/docs/model-context-window.md +31 -0
  279. package/docs/web-autostart.md +104 -0
  280. package/docs/web-autostart.zh-CN.md +104 -0
  281. package/package.json +5 -1
  282. package/dist/chunk-CX3MHD3W.js +0 -73909
  283. package/dist/chunk-GT7XTSEG.js +0 -56
  284. package/dist/chunk-GTANGQWE.js +0 -3360
  285. package/dist/chunk-JHTU6235.js +0 -15747
  286. package/dist/chunk-K6J42667.js +0 -43
  287. package/dist/chunk-N244YZAA.js +0 -6050
  288. package/dist/chunk-REIMOLGX.js +0 -317
  289. package/dist/dist-NGSIFQU5.js +0 -252
  290. package/dist/runtime-instance-worker.js +0 -19
  291. package/dist/web/assets/abnfDiagram-N423BO3Z-CIs8hIzJ.js +0 -1
  292. package/dist/web/assets/abnfDiagram-N423BO3Z-CIs8hIzJ.js.br +0 -0
  293. package/dist/web/assets/abnfDiagram-N423BO3Z-CIs8hIzJ.js.gz +0 -0
  294. package/dist/web/assets/agent-settings-panel-nlSHgUSn.js +0 -1
  295. package/dist/web/assets/agent-settings-panel-nlSHgUSn.js.br +0 -0
  296. package/dist/web/assets/agent-settings-panel-nlSHgUSn.js.gz +0 -0
  297. package/dist/web/assets/architectureDiagram-T3A2C74G-Bs3ktNP5.js +0 -36
  298. package/dist/web/assets/architectureDiagram-T3A2C74G-Bs3ktNP5.js.br +0 -0
  299. package/dist/web/assets/architectureDiagram-T3A2C74G-Bs3ktNP5.js.gz +0 -0
  300. package/dist/web/assets/background-image-picker-qVC2tyE3.js.br +0 -0
  301. package/dist/web/assets/background-image-picker-qVC2tyE3.js.gz +0 -0
  302. package/dist/web/assets/chunk-5RXB4S5H-CZZnhtaV.js.br +0 -0
  303. package/dist/web/assets/chunk-5RXB4S5H-CZZnhtaV.js.gz +0 -0
  304. package/dist/web/assets/chunk-6Q2QTUOP-F3pSVbiC.js.br +0 -0
  305. package/dist/web/assets/chunk-6Q2QTUOP-F3pSVbiC.js.gz +0 -0
  306. package/dist/web/assets/chunk-GF5L2VYU-DtEOvQdn.js.br +0 -0
  307. package/dist/web/assets/chunk-GF5L2VYU-DtEOvQdn.js.gz +0 -0
  308. package/dist/web/assets/chunk-JQJVKLGR-BHL4KhjZ.js.br +0 -0
  309. package/dist/web/assets/chunk-JQJVKLGR-BHL4KhjZ.js.gz +0 -0
  310. package/dist/web/assets/classDiagram-JCYQIIEL-CVbDkB9M.js +0 -1
  311. package/dist/web/assets/classDiagram-JCYQIIEL-CVbDkB9M.js.br +0 -0
  312. package/dist/web/assets/classDiagram-JCYQIIEL-CVbDkB9M.js.gz +0 -0
  313. package/dist/web/assets/classDiagram-v2-OCEON4UE-CVbDkB9M.js +0 -1
  314. package/dist/web/assets/classDiagram-v2-OCEON4UE-CVbDkB9M.js.br +0 -0
  315. package/dist/web/assets/classDiagram-v2-OCEON4UE-CVbDkB9M.js.gz +0 -0
  316. package/dist/web/assets/code-highlighter-DRXtndXt.js +0 -1
  317. package/dist/web/assets/code-highlighter-DRXtndXt.js.br +0 -0
  318. package/dist/web/assets/code-highlighter-DRXtndXt.js.gz +0 -0
  319. package/dist/web/assets/commit-settings-panel-2rAqVa_3.js.br +0 -0
  320. package/dist/web/assets/commit-settings-panel-2rAqVa_3.js.gz +0 -0
  321. package/dist/web/assets/cynefinDiagram-MW4NZA55-a8_N7W-y.js +0 -62
  322. package/dist/web/assets/cynefinDiagram-MW4NZA55-a8_N7W-y.js.br +0 -0
  323. package/dist/web/assets/cynefinDiagram-MW4NZA55-a8_N7W-y.js.gz +0 -0
  324. package/dist/web/assets/diagram-7IWD3JNH-B9Lkv0en.js.br +0 -0
  325. package/dist/web/assets/diagram-7IWD3JNH-B9Lkv0en.js.gz +0 -0
  326. package/dist/web/assets/diagram-B4RE2ZJO-Ct90H1dH.js +0 -3
  327. package/dist/web/assets/diagram-B4RE2ZJO-Ct90H1dH.js.br +0 -0
  328. package/dist/web/assets/diagram-B4RE2ZJO-Ct90H1dH.js.gz +0 -0
  329. package/dist/web/assets/diagram-LBJQPF4R-CL0t6Ia0.js +0 -24
  330. package/dist/web/assets/diagram-LBJQPF4R-CL0t6Ia0.js.br +0 -0
  331. package/dist/web/assets/diagram-LBJQPF4R-CL0t6Ia0.js.gz +0 -0
  332. package/dist/web/assets/diagram-Q27KOJAE-D7QB_48L.js +0 -24
  333. package/dist/web/assets/diagram-Q27KOJAE-D7QB_48L.js.br +0 -0
  334. package/dist/web/assets/diagram-Q27KOJAE-D7QB_48L.js.gz +0 -0
  335. package/dist/web/assets/diagram-UB23O5K3-DV58iDyq.js +0 -41
  336. package/dist/web/assets/diagram-UB23O5K3-DV58iDyq.js.br +0 -0
  337. package/dist/web/assets/diagram-UB23O5K3-DV58iDyq.js.gz +0 -0
  338. package/dist/web/assets/dist-jnof4ZZu.js.br +0 -0
  339. package/dist/web/assets/dist-jnof4ZZu.js.gz +0 -0
  340. package/dist/web/assets/ebnfDiagram-BXEA7PRR-C54Dd_kV.js +0 -1
  341. package/dist/web/assets/ebnfDiagram-BXEA7PRR-C54Dd_kV.js.br +0 -0
  342. package/dist/web/assets/ebnfDiagram-BXEA7PRR-C54Dd_kV.js.gz +0 -0
  343. package/dist/web/assets/erDiagram-JOGREHBK-B83NMJhw.js.br +0 -0
  344. package/dist/web/assets/erDiagram-JOGREHBK-B83NMJhw.js.gz +0 -0
  345. package/dist/web/assets/file-review-dialog-CcxGGOW7.js +0 -2
  346. package/dist/web/assets/file-review-dialog-CcxGGOW7.js.br +0 -0
  347. package/dist/web/assets/file-review-dialog-CcxGGOW7.js.gz +0 -0
  348. package/dist/web/assets/flowDiagram-UKHOOZJN-4x6NyWk2.js.br +0 -2
  349. package/dist/web/assets/flowDiagram-UKHOOZJN-4x6NyWk2.js.gz +0 -0
  350. package/dist/web/assets/git-commit-review-sswj11C9.js +0 -2
  351. package/dist/web/assets/git-commit-review-sswj11C9.js.br +0 -0
  352. package/dist/web/assets/git-commit-review-sswj11C9.js.gz +0 -0
  353. package/dist/web/assets/git-history-panel-rd3E2f9s.js +0 -1
  354. package/dist/web/assets/git-history-panel-rd3E2f9s.js.br +0 -0
  355. package/dist/web/assets/git-history-panel-rd3E2f9s.js.gz +0 -0
  356. package/dist/web/assets/gitGraphDiagram-DS77QQ5N-CuMvIZdK.js +0 -106
  357. package/dist/web/assets/gitGraphDiagram-DS77QQ5N-CuMvIZdK.js.br +0 -0
  358. package/dist/web/assets/gitGraphDiagram-DS77QQ5N-CuMvIZdK.js.gz +0 -0
  359. package/dist/web/assets/global-search-dialog-PwyNRt1N.js +0 -2
  360. package/dist/web/assets/global-search-dialog-PwyNRt1N.js.br +0 -0
  361. package/dist/web/assets/global-search-dialog-PwyNRt1N.js.gz +0 -0
  362. package/dist/web/assets/global-settings-about-QnPZzZuN.js.br +0 -0
  363. package/dist/web/assets/global-settings-about-QnPZzZuN.js.gz +0 -0
  364. package/dist/web/assets/global-settings-page-DYYJnyg0.js +0 -2
  365. package/dist/web/assets/global-settings-page-DYYJnyg0.js.br +0 -0
  366. package/dist/web/assets/global-settings-page-DYYJnyg0.js.gz +0 -0
  367. package/dist/web/assets/global-settings-pets-Bx1MItgn.js.br +0 -0
  368. package/dist/web/assets/global-settings-pets-Bx1MItgn.js.gz +0 -0
  369. package/dist/web/assets/highlighted-body-OFNGDK62-DUyZcQSF.js.br +0 -0
  370. package/dist/web/assets/highlighted-body-OFNGDK62-DUyZcQSF.js.gz +0 -0
  371. package/dist/web/assets/history-task-timeline-7DRGPm6t.js.br +0 -0
  372. package/dist/web/assets/history-task-timeline-7DRGPm6t.js.gz +0 -0
  373. package/dist/web/assets/image-preview-DivFRWxv.js.br +0 -0
  374. package/dist/web/assets/image-preview-DivFRWxv.js.gz +0 -0
  375. package/dist/web/assets/image-preview-content-SHlFPatX.js.br +0 -0
  376. package/dist/web/assets/image-preview-content-SHlFPatX.js.gz +0 -0
  377. package/dist/web/assets/index-BVD-j9ba.css +0 -2
  378. package/dist/web/assets/index-BVD-j9ba.css.br +0 -0
  379. package/dist/web/assets/index-BVD-j9ba.css.gz +0 -0
  380. package/dist/web/assets/index-C-YUvCZy.js +0 -4
  381. package/dist/web/assets/index-C-YUvCZy.js.br +0 -0
  382. package/dist/web/assets/index-C-YUvCZy.js.gz +0 -0
  383. package/dist/web/assets/infoDiagram-6WML65LV-Dudzuljd.js +0 -2
  384. package/dist/web/assets/infoDiagram-6WML65LV-Dudzuljd.js.br +0 -0
  385. package/dist/web/assets/infoDiagram-6WML65LV-Dudzuljd.js.gz +0 -0
  386. package/dist/web/assets/initial-deps-CANa4ch0.js +0 -2
  387. package/dist/web/assets/initial-deps-CANa4ch0.js.br +0 -0
  388. package/dist/web/assets/initial-deps-CANa4ch0.js.gz +0 -0
  389. package/dist/web/assets/initial-deps-CjThEvcM.js.br +0 -0
  390. package/dist/web/assets/installed-skills-pane-xlfIyXj3.js.br +0 -0
  391. package/dist/web/assets/installed-skills-pane-xlfIyXj3.js.gz +0 -0
  392. package/dist/web/assets/ishikawaDiagram-WSZJBQD7-DL-EqtUw.js.br +0 -0
  393. package/dist/web/assets/ishikawaDiagram-WSZJBQD7-DL-EqtUw.js.gz +0 -0
  394. package/dist/web/assets/kanban-definition-27J2QSJJ-C2eEzeXr.js.br +0 -0
  395. package/dist/web/assets/kanban-definition-27J2QSJJ-C2eEzeXr.js.gz +0 -0
  396. package/dist/web/assets/lazy-message-response-BHNzFjnC.js +0 -2
  397. package/dist/web/assets/lazy-message-response-BHNzFjnC.js.br +0 -0
  398. package/dist/web/assets/lazy-message-response-BHNzFjnC.js.gz +0 -0
  399. package/dist/web/assets/mcp-management-pane-DkGnQLeq.js.br +0 -0
  400. package/dist/web/assets/mcp-management-pane-DkGnQLeq.js.gz +0 -0
  401. package/dist/web/assets/mermaid-GHXKKRXX-D8qgMyDU.js +0 -1
  402. package/dist/web/assets/mermaid-GHXKKRXX-D8qgMyDU.js.br +0 -0
  403. package/dist/web/assets/mermaid-GHXKKRXX-D8qgMyDU.js.gz +0 -0
  404. package/dist/web/assets/message-response-Cmz2Diu3.js +0 -188
  405. package/dist/web/assets/message-response-Cmz2Diu3.js.br +0 -0
  406. package/dist/web/assets/message-response-Cmz2Diu3.js.gz +0 -0
  407. package/dist/web/assets/mindmap-definition-FAOFIHXS-BYjrCygr.js.br +0 -0
  408. package/dist/web/assets/official-plugins-pane-DAdYsWfC.js.br +0 -0
  409. package/dist/web/assets/official-plugins-pane-DAdYsWfC.js.gz +0 -0
  410. package/dist/web/assets/patch-diff-viewer-xS0oLx5O.js.br +0 -0
  411. package/dist/web/assets/patch-diff-viewer-xS0oLx5O.js.gz +0 -0
  412. package/dist/web/assets/pegDiagram-VL7TDLO6-CtYRxL4U.js +0 -1
  413. package/dist/web/assets/pegDiagram-VL7TDLO6-CtYRxL4U.js.br +0 -0
  414. package/dist/web/assets/pegDiagram-VL7TDLO6-CtYRxL4U.js.gz +0 -0
  415. package/dist/web/assets/personalization-settings-panel-CT3SQ4Vu.js.br +0 -0
  416. package/dist/web/assets/personalization-settings-panel-CT3SQ4Vu.js.gz +0 -0
  417. package/dist/web/assets/pieDiagram-7S7Q4E2Y-Bdq2vyip.js +0 -39
  418. package/dist/web/assets/pieDiagram-7S7Q4E2Y-Bdq2vyip.js.br +0 -0
  419. package/dist/web/assets/pieDiagram-7S7Q4E2Y-Bdq2vyip.js.gz +0 -0
  420. package/dist/web/assets/project-file-popup-page-zPj3Gecj.js.br +0 -0
  421. package/dist/web/assets/project-file-popup-page-zPj3Gecj.js.gz +0 -0
  422. package/dist/web/assets/project-source-panel-DMqwrWYJ.js +0 -3
  423. package/dist/web/assets/project-source-panel-DMqwrWYJ.js.br +0 -0
  424. package/dist/web/assets/project-source-panel-DMqwrWYJ.js.gz +0 -0
  425. package/dist/web/assets/prompt-input-HHHMHdzj.js.br +0 -0
  426. package/dist/web/assets/prompt-input-HHHMHdzj.js.gz +0 -0
  427. package/dist/web/assets/prompt-reference-token-BW8a7fO2.js +0 -3
  428. package/dist/web/assets/prompt-reference-token-BW8a7fO2.js.br +0 -0
  429. package/dist/web/assets/prompt-reference-token-BW8a7fO2.js.gz +0 -0
  430. package/dist/web/assets/railroadDiagram-AXF67PYL-C_xKQjH6.js +0 -1
  431. package/dist/web/assets/railroadDiagram-AXF67PYL-C_xKQjH6.js.br +0 -0
  432. package/dist/web/assets/railroadDiagram-AXF67PYL-C_xKQjH6.js.gz +0 -0
  433. package/dist/web/assets/requirementDiagram-LRYGKXZP-B9-6SM38.js.br +0 -0
  434. package/dist/web/assets/requirementDiagram-LRYGKXZP-B9-6SM38.js.gz +0 -0
  435. package/dist/web/assets/scheduled-task-date-time-picker-DtFk2PIk.js.br +0 -0
  436. package/dist/web/assets/scheduled-task-date-time-picker-DtFk2PIk.js.gz +0 -0
  437. package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-C9XdROQX.js.br +0 -0
  438. package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-C9XdROQX.js.gz +0 -0
  439. package/dist/web/assets/scheduled-tasks-container-CkXA7caR.js +0 -2
  440. package/dist/web/assets/scheduled-tasks-container-CkXA7caR.js.br +0 -0
  441. package/dist/web/assets/scheduled-tasks-container-CkXA7caR.js.gz +0 -0
  442. package/dist/web/assets/sequenceDiagram-SI44F4Z6-DS13cFp5.js.br +0 -0
  443. package/dist/web/assets/sequenceDiagram-SI44F4Z6-DS13cFp5.js.gz +0 -0
  444. package/dist/web/assets/sheet-Byg2gkAE.js.br +0 -0
  445. package/dist/web/assets/sheet-Byg2gkAE.js.gz +0 -0
  446. package/dist/web/assets/shiki-bundle-CLewxArG.js.br +0 -3
  447. package/dist/web/assets/shiki-bundle-CLewxArG.js.gz +0 -0
  448. package/dist/web/assets/skills-market-container-BQkCE5hm.js +0 -2
  449. package/dist/web/assets/skills-market-container-BQkCE5hm.js.br +0 -0
  450. package/dist/web/assets/skills-market-container-BQkCE5hm.js.gz +0 -0
  451. package/dist/web/assets/snapshot-memory-BU8oqjvK.js +0 -1
  452. package/dist/web/assets/snapshot-memory-BU8oqjvK.js.br +0 -0
  453. package/dist/web/assets/snapshot-memory-BU8oqjvK.js.gz +0 -0
  454. package/dist/web/assets/split-workspace-menu-content-6G08udT3.js +0 -1
  455. package/dist/web/assets/split-workspace-menu-content-6G08udT3.js.br +0 -0
  456. package/dist/web/assets/split-workspace-menu-content-6G08udT3.js.gz +0 -0
  457. package/dist/web/assets/stateDiagram-OKZ733FA-Dc16lzBR.js +0 -1
  458. package/dist/web/assets/stateDiagram-OKZ733FA-Dc16lzBR.js.br +0 -0
  459. package/dist/web/assets/stateDiagram-OKZ733FA-Dc16lzBR.js.gz +0 -0
  460. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-DMpPTWm4.js +0 -1
  461. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-DMpPTWm4.js.br +0 -0
  462. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-DMpPTWm4.js.gz +0 -0
  463. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-BFGAe9px.js.br +0 -0
  464. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-BFGAe9px.js.gz +0 -0
  465. package/dist/web/assets/third-party-marketplace-pane-Bt9mm_bV.js.br +0 -0
  466. package/dist/web/assets/third-party-marketplace-pane-Bt9mm_bV.js.gz +0 -0
  467. package/dist/web/assets/timeline-definition-Z64GVDOM-B-ybp4wL.js.br +0 -0
  468. package/dist/web/assets/timeline-definition-Z64GVDOM-B-ybp4wL.js.gz +0 -0
  469. package/dist/web/assets/vennDiagram-T6HMQDX7-Du4Kq6DY.js.br +0 -0
  470. package/dist/web/assets/vennDiagram-T6HMQDX7-Du4Kq6DY.js.gz +0 -0
  471. package/dist/web/assets/wardleyDiagram-T6FBY63Y-Dn8N9v_V.js.br +0 -0
  472. package/dist/web/assets/wardleyDiagram-T6FBY63Y-Dn8N9v_V.js.gz +0 -0
  473. package/dist/web/assets/workbench-inspector-changes-Bz2Q8-Uy.js +0 -2
  474. package/dist/web/assets/workbench-inspector-changes-Bz2Q8-Uy.js.br +0 -0
  475. package/dist/web/assets/workbench-inspector-changes-Bz2Q8-Uy.js.gz +0 -0
  476. package/dist/web/assets/workbench-pet-canvas-CEcRG47k.js.br +0 -0
  477. package/dist/web/assets/workbench-pet-canvas-CEcRG47k.js.gz +0 -0
  478. package/dist/web/assets/workbench-shell-D01RgKwg.js +0 -14
  479. package/dist/web/assets/workbench-shell-D01RgKwg.js.br +0 -0
  480. package/dist/web/assets/workbench-shell-D01RgKwg.js.gz +0 -0
  481. package/dist/web/assets/xychartDiagram-ELKLHX3M-BUDqP7n9.js.br +0 -0
  482. package/dist/web/assets/xychartDiagram-ELKLHX3M-BUDqP7n9.js.gz +0 -0
  483. /package/dist/web/assets/{scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~git-history-pa~5gghezpc-ClgveiMa.js → scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~project-source~c6tt9j64-ClgveiMa.js} +0 -0
  484. /package/dist/web/assets/{scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~git-history-pa~5gghezpc-ClgveiMa.js.br → scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~project-source~c6tt9j64-ClgveiMa.js.br} +0 -0
  485. /package/dist/web/assets/{scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~git-history-pa~5gghezpc-ClgveiMa.js.gz → scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~project-source~c6tt9j64-ClgveiMa.js.gz} +0 -0
@@ -1,1564 +1,2 @@
1
- import { createRequire } from 'node:module';
2
- import { value_exports } from '../chunk-GTANGQWE.js';
3
- import { EventStreamMessageSchema, TEMPORARY_TASK_SCOPE_ID, TEMPORARY_TASK_API_PATH, AsyncQuestionPageSchema, AnswerAsyncQuestionResponseSchema, ProjectTodoResponseSchema, ProjectTodoPageSchema, DeleteProjectTodoResponseSchema, HistoryCompressionResultSchema, BingWallpaperCatalogSchema, GlobalInstructionsSchema, MemorySettingsSchema, PersonalizationResetSchema, AgentPreferencesSchema, ScheduledTaskPreviewSchema, ScheduledTaskPageSchema, ScheduledTaskMutationResponseSchema, DeleteScheduledTaskResponseSchema, SubmitTaskResponseSchema, AgentQueuedSubmissionListSchema, AddAgentQueuedSubmissionResponseSchema, UpdateAgentQueuedSubmissionResponseSchema, DeleteAgentQueuedSubmissionResponseSchema, ReorderAgentQueuedSubmissionsResponseSchema, StartAgentQueuedSubmissionResponseSchema, AgentTaskPageSchema, AgentTaskSnapshotResponseSchema, OpenAgentTaskAttachmentResponseSchema, AgentBackgroundTerminalPageSchema, TerminateAgentBackgroundTerminalResponseSchema, AgentTaskSettingsResponseSchema, StartAgentTaskResponseSchema, PinAgentTaskResponseSchema, RenameAgentTaskResponseSchema, UnsubscribeAgentTaskResponseSchema, ReviewAgentTaskResponseSchema, CompactAgentTaskResponseSchema, ForkAgentTaskResponseSchema, UploadAgentFeedbackResponseSchema, AgentAttachmentUploadResponseSchema, AgentMutationErrorSchema, StartAgentTurnResponseSchema, SteerAgentTurnResponseSchema, InterruptAgentTurnResponseSchema, ResolvePendingRequestResponseSchema, TaskSearchPageSchema, SearchOccurrencesPageSchema, NavigableAgentTaskResponseSchema, UpdateTaskSettingsAndDefaultsResponseSchema, CompletedTasksPageSchema, AgentTaskCatalogSchema, ScheduledTaskChangeSchema, UpdateAgentGoalResponseSchema, ClearAgentGoalResponseSchema, DeleteArchivedTasksResponseSchema, ArchiveAgentTaskResponseSchema, UnarchiveAgentTaskResponseSchema, DeleteAgentTaskResponseSchema, AgentSkillPageSchema, AgentMcpServerPageSchema, ReloadAgentMcpServersResponseSchema, ProjectPageSchema, ProjectDirectoryListingSchema, HostFileListingSchema, ReorderProjectsResponseSchema, AgentProjectDefaultsResponseSchema, AddProjectResponseSchema, RenameProjectResponseSchema, RemoveProjectResponseSchema, ProjectOpenCapabilitiesResponseSchema, OpenProjectResponseSchema, ProjectGitStatusSchema, ProjectGitHistoryPageSchema, ProjectGitCommitFilesPageSchema, ProjectGitCommitFileDiffSchema, ProjectGitWorktreePageSchema, CreateProjectWorktreeResponseSchema, ProjectWorktreeMutationResponseSchema, GenerateCommitMessageResponseSchema, CommitProjectChangesResponseSchema, ProjectFileTreeSchema, RenameProjectFileResponseSchema, DeleteProjectFileResponseSchema, ProjectFileSearchPageSchema, StopProjectFileSearchResponseSchema, ProjectSourceFileSchema, ProjectTextFileRevisionSchema, ProjectTextFileSchema, SaveProjectTextFileResponseSchema, CreateProjectDirectoryResponseSchema, CreateTaskWorktreeResponseSchema, PluginReconcileResultSchema, OfficialPluginPageSchema, OfficialPluginDetailSchema, OfficialPluginInstallResponseSchema, OfficialPluginUninstallResponseSchema, InstalledSkillPageSchema, ClawhubSkillPageSchema, ClawhubSkillDetailSchema, SkillInstallResponseSchema, OpenSkillDirectoryResponseSchema, SetSkillEnabledResponseSchema, ConfiguredMcpServerPageSchema, SetMcpServerEnabledResponseSchema, HealthResponseSchema, AppInfoResponseSchema, AppUpdateProgressResponseSchema, InstallAppUpdateResponseSchema, AccessStatusResponseSchema, AgentCapabilitiesSchema, AgentModelPageSchema, AgentProviderConnectionStatusSchema, StartOfficialProviderLoginResponseSchema, AgentProviderConnectionMutationResponseSchema, ConfigureCustomProviderResponseSchema, AgentGlobalSettingsResponseSchema, WorkbenchPetCatalogResponseSchema, WorkbenchPetDownloadResponseSchema } from '../chunk-N244YZAA.js';
4
- import '../chunk-GT7XTSEG.js';
5
- import '../chunk-K6J42667.js';
6
-
7
- createRequire(import.meta.url);
8
-
9
- // node_modules/.pnpm/uuid@14.0.1/node_modules/uuid/dist-node/stringify.js
10
- var byteToHex = [];
11
- for (let i = 0; i < 256; ++i) {
12
- byteToHex.push((i + 256).toString(16).slice(1));
13
- }
14
- function unsafeStringify(arr, offset = 0) {
15
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
16
- }
17
-
18
- // node_modules/.pnpm/uuid@14.0.1/node_modules/uuid/dist-node/rng.js
19
- var rnds8 = new Uint8Array(16);
20
- function rng() {
21
- return crypto.getRandomValues(rnds8);
22
- }
23
-
24
- // node_modules/.pnpm/uuid@14.0.1/node_modules/uuid/dist-node/v4.js
25
- function v4(options, buf, offset) {
26
- if (!buf && !options && crypto.randomUUID) {
27
- return crypto.randomUUID();
28
- }
29
- return _v4(options, buf, offset);
30
- }
31
- function _v4(options, buf, offset) {
32
- options = options || {};
33
- const rnds = options.random ?? options.rng?.() ?? rng();
34
- if (rnds.length < 16) {
35
- throw new Error("Random bytes length must be >= 16");
36
- }
37
- rnds[6] = rnds[6] & 15 | 64;
38
- rnds[8] = rnds[8] & 63 | 128;
39
- if (buf) {
40
- offset = offset || 0;
41
- if (offset < 0 || offset + 16 > buf.length) {
42
- throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
43
- }
44
- for (let i = 0; i < 16; ++i) {
45
- buf[offset + i] = rnds[i];
46
- }
47
- return buf;
48
- }
49
- return unsafeStringify(rnds);
50
- }
51
- var v4_default = v4;
52
-
53
- // packages/client/src/event-client.ts
54
- var CodexlyEventError = class extends Error {
55
- constructor(message, options) {
56
- super(message, options);
57
- this.name = "CodexlyEventError";
58
- }
59
- };
60
- function createEventUrl(baseUrl, projectId, afterSequence) {
61
- const path = projectId === TEMPORARY_TASK_SCOPE_ID ? `${TEMPORARY_TASK_API_PATH}/events` : `/v1/projects/${encodeURIComponent(projectId)}/events`;
62
- const httpUrl = baseUrl ? new URL(`${baseUrl}${path}`) : new URL(path, globalThis.location.href);
63
- httpUrl.protocol = httpUrl.protocol === "https:" ? "wss:" : "ws:";
64
- httpUrl.searchParams.set("afterSequence", String(afterSequence));
65
- return httpUrl.toString();
66
- }
67
- function createResyncRequired(sessionId, latestSequence, reason) {
68
- return {
69
- latestSequence,
70
- reason,
71
- sessionId,
72
- type: "resync.required",
73
- version: 3
74
- };
75
- }
76
- function startAgentEventSubscription(options) {
77
- const reconnectDelayMs = options.reconnectDelayMs ?? 250;
78
- let active = true;
79
- let allowReconnect = true;
80
- let lastSequence = options.afterSequence;
81
- let reconnectAttempt = 0;
82
- let retryTimer;
83
- let socket;
84
- let detachSocketListeners;
85
- const setState = (state) => {
86
- options.onConnectionState?.(state);
87
- };
88
- const closeSocket = (code, reason) => {
89
- const currentSocket = socket;
90
- if (currentSocket === void 0) {
91
- return;
92
- }
93
- detachSocketListeners?.();
94
- detachSocketListeners = void 0;
95
- socket = void 0;
96
- currentSocket.close(code, reason);
97
- };
98
- const stopForResync = (message) => {
99
- allowReconnect = false;
100
- options.onResyncRequired(message);
101
- closeSocket(1e3, "Snapshot resync required");
102
- setState("closed");
103
- };
104
- const failProtocol = (message, cause) => {
105
- allowReconnect = false;
106
- options.onError?.(new CodexlyEventError(message, cause === void 0 ? void 0 : { cause }));
107
- closeSocket(1002, "Invalid Agent Event frame");
108
- setState("closed");
109
- };
110
- const connect = () => {
111
- if (!active) {
112
- return;
113
- }
114
- retryTimer = void 0;
115
- let connectionReady = false;
116
- const currentSocket = options.webSocketFactory(
117
- createEventUrl(options.baseUrl, options.projectId, lastSequence)
118
- );
119
- socket = currentSocket;
120
- const isCurrentConnection = () => active && socket === currentSocket;
121
- const onMessage = (event) => {
122
- if (!isCurrentConnection()) {
123
- return;
124
- }
125
- let frame;
126
- try {
127
- frame = JSON.parse(String(event.data));
128
- } catch (error) {
129
- failProtocol("Codexly event frame is not valid JSON", error);
130
- return;
131
- }
132
- if (!value_exports.Check(EventStreamMessageSchema, frame)) {
133
- failProtocol("Codexly event frame does not match the protocol schema");
134
- return;
135
- }
136
- const message = frame;
137
- if (message.type === "resync.required") {
138
- stopForResync(message);
139
- return;
140
- }
141
- if (message.type === "connection.ready") {
142
- if (message.sessionId !== options.sessionId || message.latestSequence < lastSequence) {
143
- stopForResync(
144
- createResyncRequired(message.sessionId, message.latestSequence, "session_changed")
145
- );
146
- return;
147
- }
148
- connectionReady = true;
149
- reconnectAttempt = 0;
150
- setState("connected");
151
- return;
152
- }
153
- if (!connectionReady) {
154
- failProtocol("Codexly event arrived before connection.ready");
155
- return;
156
- }
157
- for (const agentEvent of message.events) {
158
- if (agentEvent.sessionId !== options.sessionId) {
159
- stopForResync(
160
- createResyncRequired(agentEvent.sessionId, agentEvent.sequence, "session_changed")
161
- );
162
- return;
163
- }
164
- if (agentEvent.sequence <= lastSequence) {
165
- continue;
166
- }
167
- if (agentEvent.sequence !== lastSequence + 1) {
168
- stopForResync(
169
- createResyncRequired(agentEvent.sessionId, agentEvent.sequence, "sequence_gap")
170
- );
171
- return;
172
- }
173
- lastSequence = agentEvent.sequence;
174
- options.onEvent(agentEvent);
175
- if (!isCurrentConnection()) {
176
- return;
177
- }
178
- }
179
- };
180
- const onError = () => {
181
- if (!active || socket !== currentSocket) {
182
- return;
183
- }
184
- options.onError?.(new CodexlyEventError("Codexly event connection failed"));
185
- };
186
- const onClose = () => {
187
- if (socket !== currentSocket) {
188
- return;
189
- }
190
- detachSocketListeners?.();
191
- detachSocketListeners = void 0;
192
- socket = void 0;
193
- if (!active) {
194
- return;
195
- }
196
- if (!allowReconnect) {
197
- setState("closed");
198
- return;
199
- }
200
- setState("reconnecting");
201
- const delay = Math.min(reconnectDelayMs * 2 ** reconnectAttempt, 5e3);
202
- reconnectAttempt += 1;
203
- retryTimer = setTimeout(connect, delay);
204
- };
205
- detachSocketListeners = () => {
206
- currentSocket.removeEventListener("message", onMessage);
207
- currentSocket.removeEventListener("error", onError);
208
- currentSocket.removeEventListener("close", onClose);
209
- };
210
- currentSocket.addEventListener("message", onMessage);
211
- currentSocket.addEventListener("error", onError);
212
- currentSocket.addEventListener("close", onClose);
213
- };
214
- setState("connecting");
215
- connect();
216
- return () => {
217
- if (!active) {
218
- return;
219
- }
220
- active = false;
221
- allowReconnect = false;
222
- if (retryTimer !== void 0) {
223
- clearTimeout(retryTimer);
224
- }
225
- closeSocket(1e3, "Subscription cancelled");
226
- setState("closed");
227
- };
228
- }
229
-
230
- // packages/client/src/http-client-transport.ts
231
- var APP_UPDATE_REQUEST_TIMEOUT_MS = 15e4;
232
- var CodexlyHttpError = class extends Error {
233
- status;
234
- constructor(status, statusText, message) {
235
- super(message ?? `Codexly request failed with ${String(status)} ${statusText}`.trim());
236
- this.name = "CodexlyHttpError";
237
- this.status = status;
238
- }
239
- };
240
- var CodexlyMutationError = class extends CodexlyHttpError {
241
- code;
242
- retryable;
243
- constructor(status, statusText, error) {
244
- super(status, statusText, error.message);
245
- this.name = "CodexlyMutationError";
246
- this.code = error.code;
247
- this.retryable = error.retryable;
248
- }
249
- };
250
- var CodexlyResponseError = class extends Error {
251
- constructor(message, options) {
252
- super(message, options);
253
- this.name = "CodexlyResponseError";
254
- }
255
- };
256
- function appendQuery(path, values) {
257
- const query = new URLSearchParams();
258
- for (const [key, value] of Object.entries(values)) {
259
- if (value !== void 0) {
260
- query.set(key, String(value));
261
- }
262
- }
263
- const encoded = query.toString();
264
- return encoded ? `${path}?${encoded}` : path;
265
- }
266
- function projectPath(projectId) {
267
- if (projectId === TEMPORARY_TASK_SCOPE_ID) {
268
- return TEMPORARY_TASK_API_PATH;
269
- }
270
- return `/v1/projects/${encodeURIComponent(projectId)}`;
271
- }
272
- function taskPath(projectId, taskId) {
273
- return `${projectPath(projectId)}/tasks/${encodeURIComponent(taskId)}`;
274
- }
275
- function buildTaskAttachmentUrl(baseUrl, projectId, taskId, attachmentId) {
276
- return `${baseUrl.replace(/\/$/u, "")}${taskPath(projectId, taskId)}/attachments/${encodeURIComponent(attachmentId)}`;
277
- }
278
- function buildProjectImageFileUrl(baseUrl, projectId, path, rootPath) {
279
- const requestPath = appendQuery(`${projectPath(projectId)}/files/image`, { path, rootPath });
280
- return `${baseUrl.replace(/\/$/u, "")}${requestPath}`;
281
- }
282
- function buildProjectFileDownloadUrl(baseUrl, projectId, path, rootPath) {
283
- const requestPath = appendQuery(`${projectPath(projectId)}/files/download`, {
284
- path,
285
- rootPath: rootPath === "" ? void 0 : rootPath
286
- });
287
- return `${baseUrl.replace(/\/$/u, "")}${requestPath}`;
288
- }
289
- function buildProjectAttachmentUrl(baseUrl, projectId, attachmentId) {
290
- return `${baseUrl.replace(/\/$/u, "")}${projectPath(projectId)}/attachments/${encodeURIComponent(attachmentId)}`;
291
- }
292
- function buildWorkbenchPetAssetUrl(assetId, baseUrl = "") {
293
- return `${baseUrl.replace(/\/$/u, "")}/v1/pets/assets/${encodeURIComponent(assetId)}`;
294
- }
295
- var CodexlyTransport = class {
296
- baseUrl;
297
- fetchImplementation;
298
- requestTimeouts;
299
- webSocketFactory;
300
- unauthorizedListeners = /* @__PURE__ */ new Set();
301
- constructor(options = {}) {
302
- this.baseUrl = options.baseUrl?.replace(/\/$/u, "") ?? "";
303
- this.fetchImplementation = options.fetch ?? globalThis.fetch.bind(globalThis);
304
- this.requestTimeouts = {
305
- mutationMs: options.requestTimeouts?.mutationMs ?? 6e4,
306
- queryMs: options.requestTimeouts?.queryMs ?? 3e4,
307
- readMs: options.requestTimeouts?.readMs ?? 15e3
308
- };
309
- this.webSocketFactory = options.webSocketFactory ?? ((url) => new WebSocket(url));
310
- }
311
- async getHealth(options = {}) {
312
- return this.read("/v1/health", HealthResponseSchema, options);
313
- }
314
- async getAppInfo(options = {}) {
315
- return this.read("/v1/app-info", AppInfoResponseSchema, options);
316
- }
317
- async getAppUpdateProgress(options = {}) {
318
- return this.read("/v1/app-update/progress", AppUpdateProgressResponseSchema, options);
319
- }
320
- async installAppUpdate(version, options = {}) {
321
- return this.mutation(
322
- "/v1/app-update",
323
- { version },
324
- InstallAppUpdateResponseSchema,
325
- options,
326
- "POST",
327
- APP_UPDATE_REQUEST_TIMEOUT_MS
328
- );
329
- }
330
- async getAccessStatus(options = {}) {
331
- return this.read("/v1/access", AccessStatusResponseSchema, options);
332
- }
333
- async pairAccess(code) {
334
- return this.request(
335
- "/v1/access/pair",
336
- AccessStatusResponseSchema,
337
- {
338
- body: JSON.stringify({ code }),
339
- headers: { "content-type": "application/json" },
340
- method: "POST"
341
- },
342
- AgentMutationErrorSchema,
343
- { timeoutMs: this.requestTimeouts.mutationMs }
344
- );
345
- }
346
- async logoutAccess() {
347
- return this.request(
348
- "/v1/access/logout",
349
- AccessStatusResponseSchema,
350
- { body: "{}", headers: { "content-type": "application/json" }, method: "POST" },
351
- AgentMutationErrorSchema,
352
- { timeoutMs: this.requestTimeouts.mutationMs }
353
- );
354
- }
355
- subscribeUnauthorized(listener) {
356
- this.unauthorizedListeners.add(listener);
357
- return () => this.unauthorizedListeners.delete(listener);
358
- }
359
- async getCapabilities(options = {}) {
360
- return this.read("/v1/capabilities", AgentCapabilitiesSchema, options);
361
- }
362
- async listModels(options = {}) {
363
- return this.read("/v1/models", AgentModelPageSchema, options);
364
- }
365
- async getProviderConnection(options = {}) {
366
- return this.read("/v1/provider-connection", AgentProviderConnectionStatusSchema, options);
367
- }
368
- async startOfficialProviderLogin(options = {}) {
369
- return this.mutation(
370
- "/v1/provider-connection/official-login",
371
- {},
372
- StartOfficialProviderLoginResponseSchema,
373
- options
374
- );
375
- }
376
- async cancelProviderLogin(loginId, options = {}) {
377
- return this.mutation(
378
- "/v1/provider-connection/official-login/cancel",
379
- { loginId },
380
- AgentProviderConnectionMutationResponseSchema,
381
- options
382
- );
383
- }
384
- async configureCustomProvider(input, options = {}) {
385
- return this.mutation(
386
- "/v1/provider-connection/custom",
387
- input,
388
- ConfigureCustomProviderResponseSchema,
389
- options,
390
- "PUT"
391
- );
392
- }
393
- async logoutProvider(options = {}) {
394
- return this.mutation(
395
- "/v1/provider-connection/logout",
396
- {},
397
- AgentProviderConnectionMutationResponseSchema,
398
- options
399
- );
400
- }
401
- async getGlobalSettings(options = {}) {
402
- return this.read("/v1/settings", AgentGlobalSettingsResponseSchema, options);
403
- }
404
- async listWorkbenchPets(options = {}) {
405
- return this.read("/v1/pets", WorkbenchPetCatalogResponseSchema, options);
406
- }
407
- async downloadWorkbenchPet(petId, options = {}) {
408
- return this.mutation(
409
- "/v1/pets/downloads",
410
- { petId },
411
- WorkbenchPetDownloadResponseSchema,
412
- options
413
- );
414
- }
415
- async updateGlobalSettings(settings, options = {}) {
416
- return this.mutation(
417
- "/v1/settings",
418
- settings,
419
- AgentGlobalSettingsResponseSchema,
420
- options,
421
- "PUT"
422
- );
423
- }
424
- subscribeEvents(options) {
425
- return startAgentEventSubscription({
426
- ...options,
427
- baseUrl: this.baseUrl,
428
- webSocketFactory: this.webSocketFactory
429
- });
430
- }
431
- mutation(path, body, schema, options, method = "POST", timeoutMs = this.requestTimeouts.mutationMs) {
432
- return this.request(
433
- path,
434
- schema,
435
- {
436
- body: JSON.stringify(body),
437
- headers: {
438
- "content-type": "application/json",
439
- "idempotency-key": options.idempotencyKey ?? v4_default()
440
- },
441
- method
442
- },
443
- AgentMutationErrorSchema,
444
- {
445
- ...options.signal === void 0 ? {} : { signal: options.signal },
446
- timeoutMs
447
- }
448
- );
449
- }
450
- read(path, schema, options, errorSchema) {
451
- return this.request(path, schema, {}, errorSchema, {
452
- ...options.signal === void 0 ? {} : { signal: options.signal },
453
- timeoutMs: options.signal === void 0 ? this.requestTimeouts.readMs : this.requestTimeouts.queryMs
454
- });
455
- }
456
- async request(path, schema, init = {}, errorSchema, requestOptions = {}) {
457
- const timeoutSignal = AbortSignal.timeout(
458
- requestOptions.timeoutMs ?? this.requestTimeouts.readMs
459
- );
460
- const signal = requestOptions.signal === void 0 ? timeoutSignal : AbortSignal.any([requestOptions.signal, timeoutSignal]);
461
- const response = await this.fetchImplementation(`${this.baseUrl}${path}`, {
462
- ...init,
463
- credentials: "same-origin",
464
- headers: { accept: "application/json", ...init.headers },
465
- signal
466
- });
467
- if (!response.ok) {
468
- if (response.status === 401) {
469
- for (const listener of this.unauthorizedListeners) {
470
- try {
471
- listener();
472
- } catch {
473
- }
474
- }
475
- }
476
- if (errorSchema !== void 0) {
477
- let errorBody;
478
- try {
479
- errorBody = await response.json();
480
- } catch (error) {
481
- throw new CodexlyResponseError("Codexly error response is not valid JSON", {
482
- cause: error
483
- });
484
- }
485
- if (!value_exports.Check(errorSchema, errorBody)) {
486
- throw new CodexlyResponseError(
487
- "Codexly error response does not match the protocol schema"
488
- );
489
- }
490
- throw new CodexlyMutationError(
491
- response.status,
492
- response.statusText,
493
- errorBody
494
- );
495
- }
496
- try {
497
- const errorBody = await response.json();
498
- if (typeof errorBody === "object" && errorBody !== null && "message" in errorBody && typeof errorBody.message === "string" && errorBody.message.length > 0) {
499
- throw new CodexlyHttpError(response.status, response.statusText, errorBody.message);
500
- }
501
- } catch (error) {
502
- if (error instanceof CodexlyHttpError) throw error;
503
- }
504
- throw new CodexlyHttpError(response.status, response.statusText);
505
- }
506
- let body;
507
- try {
508
- body = await response.json();
509
- } catch (error) {
510
- throw new CodexlyResponseError("Codexly response is not valid JSON", { cause: error });
511
- }
512
- if (!value_exports.Check(schema, body)) {
513
- throw new CodexlyResponseError("Codexly response does not match the protocol schema");
514
- }
515
- return body;
516
- }
517
- };
518
-
519
- // packages/client/src/project-pdf-url.ts
520
- function buildProjectPdfFileUrl(baseUrl, projectId, path, rootPath) {
521
- const requestPath = appendQuery(`${projectPath(projectId)}/files/pdf`, {
522
- path,
523
- rootPath: rootPath === "" ? void 0 : rootPath
524
- });
525
- return `${baseUrl.replace(/\/$/u, "")}${requestPath}`;
526
- }
527
-
528
- // packages/client/src/http-client-skill-market.ts
529
- var SkillMarketHttpClient = class extends CodexlyTransport {
530
- async reconcileOfficialPlugins(options = {}) {
531
- return this.mutation(
532
- "/v1/plugins/official/reconcile",
533
- {},
534
- PluginReconcileResultSchema,
535
- options
536
- );
537
- }
538
- async listOfficialPlugins(forceRefetch, options = {}) {
539
- return this.read(
540
- appendQuery("/v1/plugins/official", { forceRefetch: forceRefetch ? "true" : void 0 }),
541
- OfficialPluginPageSchema,
542
- options
543
- );
544
- }
545
- async getOfficialPlugin(marketplaceName, marketplacePath, pluginName, options = {}) {
546
- return this.read(
547
- appendQuery(
548
- `/v1/plugins/official/${encodeURIComponent(marketplaceName)}/${encodeURIComponent(pluginName)}`,
549
- { marketplacePath: marketplacePath ?? void 0 }
550
- ),
551
- OfficialPluginDetailSchema,
552
- options,
553
- AgentMutationErrorSchema
554
- );
555
- }
556
- async installOfficialPlugin(marketplaceName, marketplacePath, pluginName, installAttemptId, options = {}) {
557
- return this.mutation(
558
- `/v1/plugins/official/${encodeURIComponent(marketplaceName)}/${encodeURIComponent(pluginName)}/install`,
559
- { installAttemptId, marketplacePath },
560
- OfficialPluginInstallResponseSchema,
561
- options
562
- );
563
- }
564
- async uninstallOfficialPlugin(marketplaceName, pluginName, pluginId, options = {}) {
565
- return this.mutation(
566
- `/v1/plugins/official/${encodeURIComponent(marketplaceName)}/${encodeURIComponent(pluginName)}/uninstall`,
567
- { pluginId },
568
- OfficialPluginUninstallResponseSchema,
569
- options
570
- );
571
- }
572
- async listInstalledSkills(options = {}) {
573
- return this.read("/v1/skills/installed", InstalledSkillPageSchema, options);
574
- }
575
- async listClawhubSkills(query, cursor, sort, options = {}) {
576
- return this.read(
577
- appendQuery("/v1/skills/market", {
578
- cursor: cursor ?? void 0,
579
- query: query.length === 0 ? void 0 : query,
580
- sort
581
- }),
582
- ClawhubSkillPageSchema,
583
- options,
584
- AgentMutationErrorSchema
585
- );
586
- }
587
- async getClawhubSkill(owner, slug, options = {}) {
588
- return this.read(
589
- `/v1/skills/market/${encodeURIComponent(owner)}/${encodeURIComponent(slug)}`,
590
- ClawhubSkillDetailSchema,
591
- options,
592
- AgentMutationErrorSchema
593
- );
594
- }
595
- async installClawhubSkill(owner, slug, scope, projectId, rootPath, options = {}) {
596
- return this.mutation(
597
- `/v1/skills/market/${encodeURIComponent(owner)}/${encodeURIComponent(slug)}/install`,
598
- { projectId, rootPath, scope },
599
- SkillInstallResponseSchema,
600
- options
601
- );
602
- }
603
- async openSkillDirectory(path, options = {}) {
604
- return this.mutation("/v1/skills/open", { path }, OpenSkillDirectoryResponseSchema, options);
605
- }
606
- async setSkillEnabled(path, enabled, options = {}) {
607
- return this.mutation(
608
- "/v1/skills/enabled",
609
- { enabled, path },
610
- SetSkillEnabledResponseSchema,
611
- options,
612
- "PUT"
613
- );
614
- }
615
- async listConfiguredMcpServers(options = {}) {
616
- return this.read("/v1/mcp-servers/configured", ConfiguredMcpServerPageSchema, options);
617
- }
618
- async setMcpServerEnabled(name, enabled, options = {}) {
619
- return this.mutation(
620
- `/v1/mcp-servers/configured/${encodeURIComponent(name)}/enabled`,
621
- { enabled },
622
- SetMcpServerEnabledResponseSchema,
623
- options,
624
- "PUT"
625
- );
626
- }
627
- };
628
-
629
- // packages/client/src/http-client-task-worktrees.ts
630
- var TaskWorktreeHttpClient = class extends SkillMarketHttpClient {
631
- async createTaskWorktree(projectId, rootPath, request, options = {}) {
632
- return this.mutation(
633
- appendQuery(`${projectPath(projectId)}/git/task-worktrees`, { rootPath }),
634
- request,
635
- CreateTaskWorktreeResponseSchema,
636
- options
637
- );
638
- }
639
- };
640
-
641
- // packages/client/src/http-client-project-directory.ts
642
- var ProjectDirectoryHttpClient = class extends TaskWorktreeHttpClient {
643
- async createProjectDirectory(request, options = {}) {
644
- return this.mutation(
645
- "/v1/project-directories",
646
- request,
647
- CreateProjectDirectoryResponseSchema,
648
- options
649
- );
650
- }
651
- };
652
-
653
- // packages/client/src/http-client-text-file.ts
654
- var ProjectTextFileHttpClient = class extends ProjectDirectoryHttpClient {
655
- async readProjectTextFileRevision(projectId, rootPath, path, options = {}) {
656
- return this.read(
657
- appendQuery(`${projectPath(projectId)}/files/text/revision`, { path, rootPath }),
658
- ProjectTextFileRevisionSchema,
659
- options
660
- );
661
- }
662
- async readProjectTextFile(projectId, rootPath, path, options = {}) {
663
- return this.read(
664
- appendQuery(`${projectPath(projectId)}/files/text`, { path, rootPath }),
665
- ProjectTextFileSchema,
666
- options
667
- );
668
- }
669
- async saveProjectTextFile(projectId, rootPath, input, options = {}) {
670
- return this.mutation(
671
- appendQuery(`${projectPath(projectId)}/files/text`, { rootPath }),
672
- input,
673
- SaveProjectTextFileResponseSchema,
674
- options
675
- );
676
- }
677
- };
678
-
679
- // packages/client/src/http-client-projects.ts
680
- var ProjectHttpClient = class extends ProjectTextFileHttpClient {
681
- async listSkills(projectId, options = {}) {
682
- return this.read(`${projectPath(projectId)}/skills`, AgentSkillPageSchema, options);
683
- }
684
- async listMcpServers(projectId, taskId, options = {}) {
685
- return this.read(
686
- `${taskPath(projectId, taskId)}/mcp-servers`,
687
- AgentMcpServerPageSchema,
688
- options,
689
- AgentMutationErrorSchema
690
- );
691
- }
692
- async retryMcpServers(projectId, taskId, options = {}) {
693
- return this.mutation(
694
- `${taskPath(projectId, taskId)}/mcp-servers/retry`,
695
- {},
696
- ReloadAgentMcpServersResponseSchema,
697
- options
698
- );
699
- }
700
- async listProjects(options = {}) {
701
- return this.read("/v1/projects", ProjectPageSchema, options);
702
- }
703
- async listProjectDirectories(path, options = {}) {
704
- return this.read(
705
- appendQuery("/v1/project-directories", {
706
- path,
707
- includeHidden: options.includeHidden === true ? "true" : void 0
708
- }),
709
- ProjectDirectoryListingSchema,
710
- options
711
- );
712
- }
713
- async listHostFiles(kind, path, options = {}) {
714
- return this.read(
715
- appendQuery("/v1/host-files", {
716
- kind,
717
- path,
718
- includeHidden: options.includeHidden === true ? "true" : void 0
719
- }),
720
- HostFileListingSchema,
721
- options
722
- );
723
- }
724
- async reorderProjects(projectIds, options = {}) {
725
- return this.mutation(
726
- "/v1/projects/order",
727
- { projectIds },
728
- ReorderProjectsResponseSchema,
729
- options,
730
- "PUT"
731
- );
732
- }
733
- async getProjectDefaults(projectId, options = {}) {
734
- return this.read(
735
- `${projectPath(projectId)}/defaults`,
736
- AgentProjectDefaultsResponseSchema,
737
- options
738
- );
739
- }
740
- async updateProjectDefaults(projectId, settings, options = {}) {
741
- return this.mutation(
742
- `${projectPath(projectId)}/defaults`,
743
- settings,
744
- AgentProjectDefaultsResponseSchema,
745
- options,
746
- "PUT"
747
- );
748
- }
749
- async addProject(rootPaths, options = {}) {
750
- return this.mutation(
751
- "/v1/projects",
752
- { roots: rootPaths.map((path) => ({ path })) },
753
- AddProjectResponseSchema,
754
- options
755
- );
756
- }
757
- async renameProject(projectId, name, options = {}) {
758
- return this.mutation(
759
- `${projectPath(projectId)}/rename`,
760
- { name },
761
- RenameProjectResponseSchema,
762
- options
763
- );
764
- }
765
- async removeProject(projectId, options = {}) {
766
- return this.mutation(
767
- `${projectPath(projectId)}/remove`,
768
- {},
769
- RemoveProjectResponseSchema,
770
- options
771
- );
772
- }
773
- async getProjectOpenCapabilities(projectId, options = {}) {
774
- return this.read(
775
- `${projectPath(projectId)}/open-capabilities`,
776
- ProjectOpenCapabilitiesResponseSchema,
777
- options
778
- );
779
- }
780
- async openProject(projectId, rootPath, request, options = {}) {
781
- return this.mutation(
782
- appendQuery(`${projectPath(projectId)}/open`, { rootPath }),
783
- request,
784
- OpenProjectResponseSchema,
785
- options
786
- );
787
- }
788
- async getProjectGitStatus(projectId, query, options = {}) {
789
- return this.read(
790
- appendQuery(`/v1/projects/${encodeURIComponent(projectId)}/git/status`, {
791
- includeDiff: query.includeDiff === true ? "true" : void 0,
792
- repository: query.repository,
793
- rootPath: query.rootPath
794
- }),
795
- ProjectGitStatusSchema,
796
- options
797
- );
798
- }
799
- async getProjectGitHistory(projectId, query, options = {}) {
800
- return this.read(
801
- appendQuery(`${projectPath(projectId)}/git/history`, {
802
- cursor: query.cursor,
803
- repository: query.repository,
804
- rootPath: query.rootPath
805
- }),
806
- ProjectGitHistoryPageSchema,
807
- options
808
- );
809
- }
810
- async getProjectGitCommitFiles(projectId, query, options = {}) {
811
- return this.read(
812
- appendQuery(`${projectPath(projectId)}/git/commit-files`, {
813
- cursor: query.cursor,
814
- repository: query.repository,
815
- rootPath: query.rootPath,
816
- sha: query.sha
817
- }),
818
- ProjectGitCommitFilesPageSchema,
819
- options
820
- );
821
- }
822
- async getProjectGitCommitFileDiff(projectId, query, options = {}) {
823
- return this.read(
824
- appendQuery(`${projectPath(projectId)}/git/commit-diff`, {
825
- path: query.path,
826
- repository: query.repository,
827
- rootPath: query.rootPath,
828
- sha: query.sha
829
- }),
830
- ProjectGitCommitFileDiffSchema,
831
- options
832
- );
833
- }
834
- async switchProjectBranch(projectId, rootPath, request, options = {}) {
835
- return this.mutation(
836
- appendQuery(`${projectPath(projectId)}/git/branch`, { rootPath }),
837
- request,
838
- ProjectGitStatusSchema,
839
- options
840
- );
841
- }
842
- async createProjectBranch(projectId, rootPath, request, options = {}) {
843
- return this.mutation(
844
- appendQuery(`${projectPath(projectId)}/git/branches`, { rootPath }),
845
- request,
846
- ProjectGitStatusSchema,
847
- options
848
- );
849
- }
850
- async listProjectWorktrees(projectId, rootPath, options = {}) {
851
- return this.read(
852
- appendQuery(`${projectPath(projectId)}/git/worktrees`, { rootPath }),
853
- ProjectGitWorktreePageSchema,
854
- options
855
- );
856
- }
857
- async createProjectWorktree(projectId, rootPath, request, options = {}) {
858
- return this.mutation(
859
- appendQuery(`${projectPath(projectId)}/git/worktrees`, { rootPath }),
860
- request,
861
- CreateProjectWorktreeResponseSchema,
862
- options
863
- );
864
- }
865
- async switchProjectWorktree(projectId, rootPath, request, options = {}) {
866
- return this.mutation(
867
- appendQuery(`${projectPath(projectId)}/git/worktree`, { rootPath }),
868
- request,
869
- ProjectWorktreeMutationResponseSchema,
870
- options
871
- );
872
- }
873
- async generateCommitMessage(projectId, rootPath, request, options = {}) {
874
- return this.mutation(
875
- appendQuery(`${projectPath(projectId)}/git/commit-message`, { rootPath }),
876
- request,
877
- GenerateCommitMessageResponseSchema,
878
- options
879
- );
880
- }
881
- async commitProjectChanges(projectId, rootPath, request, options = {}) {
882
- return this.mutation(
883
- appendQuery(`${projectPath(projectId)}/git/commits`, { rootPath }),
884
- request,
885
- CommitProjectChangesResponseSchema,
886
- options
887
- );
888
- }
889
- async listProjectFiles(projectId, rootPath, directoryPath, options = {}) {
890
- const requestPath = appendQuery(`/v1/projects/${encodeURIComponent(projectId)}/files/tree`, {
891
- path: directoryPath ?? void 0,
892
- rootPath
893
- });
894
- return this.read(requestPath, ProjectFileTreeSchema, options);
895
- }
896
- async renameProjectFile(projectId, rootPath, request, options = {}) {
897
- return this.mutation(
898
- appendQuery(`/v1/projects/${encodeURIComponent(projectId)}/files/rename`, { rootPath }),
899
- request,
900
- RenameProjectFileResponseSchema,
901
- options
902
- );
903
- }
904
- async deleteProjectFile(projectId, rootPath, request, options = {}) {
905
- return this.mutation(
906
- appendQuery(`/v1/projects/${encodeURIComponent(projectId)}/files/delete`, { rootPath }),
907
- request,
908
- DeleteProjectFileResponseSchema,
909
- options
910
- );
911
- }
912
- async searchProjectFiles(projectId, rootPath, query, sessionId, options = {}) {
913
- const requestPath = appendQuery(`/v1/projects/${encodeURIComponent(projectId)}/files/search`, {
914
- query,
915
- rootPath,
916
- sessionId
917
- });
918
- return this.read(requestPath, ProjectFileSearchPageSchema, options);
919
- }
920
- async stopProjectFileSearch(projectId, rootPath, sessionId, options = {}) {
921
- return this.mutation(
922
- `/v1/projects/${encodeURIComponent(projectId)}/files/search/stop`,
923
- { rootPath, sessionId },
924
- StopProjectFileSearchResponseSchema,
925
- options
926
- );
927
- }
928
- async readProjectSourceFile(projectId, rootPath, path, cursor, options = {}) {
929
- const requestPath = appendQuery(`${projectPath(projectId)}/files/source`, {
930
- cursor,
931
- path,
932
- rootPath
933
- });
934
- return this.read(requestPath, ProjectSourceFileSchema, options);
935
- }
936
- };
937
-
938
- // packages/client/src/http-client-task-archive.ts
939
- var TaskArchiveHttpClient = class extends ProjectHttpClient {
940
- deleteArchivedTasks(projectId, options = {}) {
941
- return this.mutation(
942
- `${projectPath(projectId)}/tasks/archived`,
943
- {},
944
- DeleteArchivedTasksResponseSchema,
945
- options,
946
- "DELETE"
947
- );
948
- }
949
- async archiveTask(projectId, taskId, options = {}) {
950
- return this.mutation(
951
- `${taskPath(projectId, taskId)}/archive`,
952
- {},
953
- ArchiveAgentTaskResponseSchema,
954
- options
955
- );
956
- }
957
- async unarchiveTask(projectId, taskId, options = {}) {
958
- return this.mutation(
959
- `${taskPath(projectId, taskId)}/unarchive`,
960
- {},
961
- UnarchiveAgentTaskResponseSchema,
962
- options
963
- );
964
- }
965
- async deleteTask(projectId, taskId, options = {}) {
966
- return this.mutation(
967
- taskPath(projectId, taskId),
968
- {},
969
- DeleteAgentTaskResponseSchema,
970
- options,
971
- "DELETE"
972
- );
973
- }
974
- };
975
-
976
- // packages/client/src/http-client-task-goals.ts
977
- var TaskGoalHttpClient = class extends TaskArchiveHttpClient {
978
- async updateTaskGoal(projectId, taskId, input, options = {}) {
979
- return this.mutation(
980
- `${taskPath(projectId, taskId)}/goal`,
981
- input,
982
- UpdateAgentGoalResponseSchema,
983
- options,
984
- "PUT"
985
- );
986
- }
987
- async clearTaskGoal(projectId, taskId, options = {}) {
988
- return this.mutation(
989
- `${taskPath(projectId, taskId)}/goal`,
990
- {},
991
- ClearAgentGoalResponseSchema,
992
- options,
993
- "DELETE"
994
- );
995
- }
996
- };
997
-
998
- // packages/client/src/http-client-task-catalog.ts
999
- var TaskCatalogHttpClient = class extends TaskGoalHttpClient {
1000
- readNavigableTask(projectId, taskId, options = {}) {
1001
- return this.read(
1002
- `${taskPath(projectId, taskId)}/navigation`,
1003
- NavigableAgentTaskResponseSchema,
1004
- options
1005
- );
1006
- }
1007
- updateTaskSettingsAndDefaults(projectId, taskId, input, options = {}) {
1008
- return this.mutation(
1009
- `${taskPath(projectId, taskId)}/settings-and-defaults`,
1010
- input,
1011
- UpdateTaskSettingsAndDefaultsResponseSchema,
1012
- options,
1013
- "PUT"
1014
- );
1015
- }
1016
- queryCompletedTasks(input, options = {}) {
1017
- return this.request(
1018
- "/v1/tasks/completed/query",
1019
- CompletedTasksPageSchema,
1020
- {
1021
- method: "POST",
1022
- headers: { "content-type": "application/json" },
1023
- body: JSON.stringify(input)
1024
- },
1025
- void 0,
1026
- { ...options, timeoutMs: this.requestTimeouts.queryMs }
1027
- );
1028
- }
1029
- listTaskCatalog(projectId, input = {}, options = {}) {
1030
- return this.read(
1031
- appendQuery(`${projectPath(projectId)}/tasks/catalog`, input),
1032
- AgentTaskCatalogSchema,
1033
- options
1034
- );
1035
- }
1036
- };
1037
-
1038
- // packages/client/src/http-client-global-search.ts
1039
- var GlobalSearchHttpClient = class extends TaskCatalogHttpClient {
1040
- async searchTasks(input, options = {}) {
1041
- return this.read(appendQuery("/v1/search/tasks", input), TaskSearchPageSchema, options);
1042
- }
1043
- async searchTaskOccurrences(projectId, taskId, query, cursor, options = {}) {
1044
- return this.read(
1045
- appendQuery(`${taskPath(projectId, taskId)}/search-occurrences`, { cursor, query }),
1046
- SearchOccurrencesPageSchema,
1047
- options
1048
- );
1049
- }
1050
- };
1051
-
1052
- // packages/client/src/http-client-tasks.ts
1053
- var TaskHttpClient = class extends GlobalSearchHttpClient {
1054
- submitTask(projectId, input, options = {}) {
1055
- return this.mutation(
1056
- `${projectPath(projectId)}/submissions`,
1057
- input,
1058
- SubmitTaskResponseSchema,
1059
- options
1060
- );
1061
- }
1062
- async listQueuedSubmissions(projectId, taskId, options = {}) {
1063
- return this.read(
1064
- `${taskPath(projectId, taskId)}/queue`,
1065
- AgentQueuedSubmissionListSchema,
1066
- options
1067
- );
1068
- }
1069
- async addQueuedSubmission(projectId, taskId, input, clientUserMessageId, options = {}) {
1070
- return this.mutation(
1071
- `${taskPath(projectId, taskId)}/queue`,
1072
- { clientUserMessageId, input },
1073
- AddAgentQueuedSubmissionResponseSchema,
1074
- options
1075
- );
1076
- }
1077
- async updateQueuedSubmission(projectId, taskId, queuedSubmissionId, input, status, options = {}) {
1078
- return this.mutation(
1079
- `${taskPath(projectId, taskId)}/queue/${encodeURIComponent(queuedSubmissionId)}`,
1080
- { input, status },
1081
- UpdateAgentQueuedSubmissionResponseSchema,
1082
- options,
1083
- "PUT"
1084
- );
1085
- }
1086
- async deleteQueuedSubmission(projectId, taskId, queuedSubmissionId, options = {}) {
1087
- return this.mutation(
1088
- `${taskPath(projectId, taskId)}/queue/${encodeURIComponent(queuedSubmissionId)}`,
1089
- {},
1090
- DeleteAgentQueuedSubmissionResponseSchema,
1091
- options,
1092
- "DELETE"
1093
- );
1094
- }
1095
- async reorderQueuedSubmissions(projectId, taskId, queuedSubmissionIds, options = {}) {
1096
- return this.mutation(
1097
- `${taskPath(projectId, taskId)}/queue/reorder`,
1098
- { queuedSubmissionIds },
1099
- ReorderAgentQueuedSubmissionsResponseSchema,
1100
- options,
1101
- "PUT"
1102
- );
1103
- }
1104
- async startQueuedSubmission(projectId, taskId, queuedSubmissionId, options = {}) {
1105
- return this.mutation(
1106
- `${taskPath(projectId, taskId)}/queue/start`,
1107
- { ...queuedSubmissionId === void 0 ? {} : { queuedSubmissionId } },
1108
- StartAgentQueuedSubmissionResponseSchema,
1109
- options
1110
- );
1111
- }
1112
- async listTasks(projectId, options = {}, requestOptions = {}) {
1113
- const path = appendQuery(`${projectPath(projectId)}/tasks`, options);
1114
- return this.read(path, AgentTaskPageSchema, requestOptions);
1115
- }
1116
- async readTask(projectId, taskId, options = {}) {
1117
- const { cursor, ...readOptions } = options;
1118
- return this.read(
1119
- appendQuery(taskPath(projectId, taskId), { cursor }),
1120
- AgentTaskSnapshotResponseSchema,
1121
- readOptions
1122
- );
1123
- }
1124
- getTaskAttachmentUrl(projectId, taskId, attachmentId) {
1125
- return buildTaskAttachmentUrl(this.baseUrl, projectId, taskId, attachmentId);
1126
- }
1127
- async openTaskAttachment(projectId, taskId, attachmentId, options = {}) {
1128
- return this.mutation(
1129
- `${taskPath(projectId, taskId)}/attachments/${encodeURIComponent(attachmentId)}/open`,
1130
- {},
1131
- OpenAgentTaskAttachmentResponseSchema,
1132
- options
1133
- );
1134
- }
1135
- async listBackgroundTerminals(projectId, taskId, options = {}) {
1136
- return this.read(
1137
- `${taskPath(projectId, taskId)}/background-terminals`,
1138
- AgentBackgroundTerminalPageSchema,
1139
- options
1140
- );
1141
- }
1142
- async terminateBackgroundTerminal(projectId, taskId, terminalId, options = {}) {
1143
- return this.mutation(
1144
- `${taskPath(projectId, taskId)}/background-terminals/${encodeURIComponent(terminalId)}/terminate`,
1145
- {},
1146
- TerminateAgentBackgroundTerminalResponseSchema,
1147
- options
1148
- );
1149
- }
1150
- async getTaskSettings(projectId, taskId, options = {}) {
1151
- return this.read(
1152
- `${taskPath(projectId, taskId)}/settings`,
1153
- AgentTaskSettingsResponseSchema,
1154
- options
1155
- );
1156
- }
1157
- async updateTaskSettings(projectId, taskId, settings, options = {}) {
1158
- return this.mutation(
1159
- `${taskPath(projectId, taskId)}/settings`,
1160
- settings,
1161
- AgentTaskSettingsResponseSchema,
1162
- options,
1163
- "PUT"
1164
- );
1165
- }
1166
- async startTask(projectId, options = {}) {
1167
- return this.mutation(
1168
- `${projectPath(projectId)}/tasks`,
1169
- {},
1170
- StartAgentTaskResponseSchema,
1171
- options
1172
- );
1173
- }
1174
- async startWorktreeTask(projectId, request, options = {}) {
1175
- return this.mutation(
1176
- `${projectPath(projectId)}/tasks`,
1177
- request,
1178
- StartAgentTaskResponseSchema,
1179
- options
1180
- );
1181
- }
1182
- async pinTask(projectId, taskId, pinned, options = {}) {
1183
- return this.mutation(
1184
- `${taskPath(projectId, taskId)}/pin`,
1185
- { pinned },
1186
- PinAgentTaskResponseSchema,
1187
- options,
1188
- "PUT"
1189
- );
1190
- }
1191
- async renameTask(projectId, taskId, title, options = {}) {
1192
- return this.mutation(
1193
- `${taskPath(projectId, taskId)}/rename`,
1194
- { title },
1195
- RenameAgentTaskResponseSchema,
1196
- options
1197
- );
1198
- }
1199
- async unsubscribeTask(projectId, taskId) {
1200
- return this.request(
1201
- `${taskPath(projectId, taskId)}/unsubscribe`,
1202
- UnsubscribeAgentTaskResponseSchema,
1203
- { body: "{}", headers: { "content-type": "application/json" }, method: "POST" }
1204
- );
1205
- }
1206
- async startReview(projectId, taskId, input, options = {}) {
1207
- return this.mutation(
1208
- `${taskPath(projectId, taskId)}/review`,
1209
- input,
1210
- ReviewAgentTaskResponseSchema,
1211
- options
1212
- );
1213
- }
1214
- async compactTask(projectId, taskId, options = {}) {
1215
- return this.mutation(
1216
- `${taskPath(projectId, taskId)}/compact`,
1217
- {},
1218
- CompactAgentTaskResponseSchema,
1219
- options
1220
- );
1221
- }
1222
- async forkTask(projectId, taskId, input, options = {}) {
1223
- return this.mutation(
1224
- `${taskPath(projectId, taskId)}/fork`,
1225
- input,
1226
- ForkAgentTaskResponseSchema,
1227
- options
1228
- );
1229
- }
1230
- async uploadFeedback(projectId, taskId, input, options = {}) {
1231
- return this.mutation(
1232
- `${taskPath(projectId, taskId)}/feedback`,
1233
- input,
1234
- UploadAgentFeedbackResponseSchema,
1235
- options
1236
- );
1237
- }
1238
- async uploadAttachment(projectId, input, options = {}) {
1239
- const body = new FormData();
1240
- body.set("attachment", input.content, input.name);
1241
- return this.request(
1242
- `${projectPath(projectId)}/attachments/${input.kind}`,
1243
- AgentAttachmentUploadResponseSchema,
1244
- {
1245
- body,
1246
- headers: {
1247
- "idempotency-key": options.idempotencyKey ?? v4_default()
1248
- },
1249
- method: "POST"
1250
- },
1251
- AgentMutationErrorSchema,
1252
- {
1253
- ...options.signal === void 0 ? {} : { signal: options.signal },
1254
- timeoutMs: this.requestTimeouts.mutationMs
1255
- }
1256
- );
1257
- }
1258
- async importHostAttachment(projectId, kind, path, options = {}) {
1259
- return this.mutation(
1260
- `${projectPath(projectId)}/attachments/${kind}/host`,
1261
- { path },
1262
- AgentAttachmentUploadResponseSchema,
1263
- options
1264
- );
1265
- }
1266
- async startTurn(projectId, taskId, input, turnOptions, options = {}) {
1267
- return this.mutation(
1268
- `${taskPath(projectId, taskId)}/turns`,
1269
- { input, options: turnOptions },
1270
- StartAgentTurnResponseSchema,
1271
- options
1272
- );
1273
- }
1274
- async steerTurn(projectId, taskId, turnId, input, options = {}) {
1275
- return this.mutation(
1276
- `${taskPath(projectId, taskId)}/turns/${encodeURIComponent(turnId)}/steer`,
1277
- { input, taskId },
1278
- SteerAgentTurnResponseSchema,
1279
- options
1280
- );
1281
- }
1282
- async interruptTurn(projectId, taskId, turnId, options = {}) {
1283
- return this.mutation(
1284
- `${taskPath(projectId, taskId)}/turns/${encodeURIComponent(turnId)}/interrupt`,
1285
- { taskId },
1286
- InterruptAgentTurnResponseSchema,
1287
- options
1288
- );
1289
- }
1290
- async resolvePendingRequest(request, resolution, options = {}) {
1291
- const body = {
1292
- itemId: request.itemId,
1293
- projectId: request.projectId,
1294
- resolution,
1295
- taskId: request.taskId,
1296
- turnId: request.turnId,
1297
- type: request.type
1298
- };
1299
- return this.mutation(
1300
- `${taskPath(request.projectId, request.taskId)}/pending-requests/${encodeURIComponent(request.requestId)}/resolve`,
1301
- body,
1302
- ResolvePendingRequestResponseSchema,
1303
- options
1304
- );
1305
- }
1306
- };
1307
-
1308
- // packages/client/src/scheduled-task-events.ts
1309
- function subscribeScheduledTaskChanges(baseUrl, factory, onChange) {
1310
- const url = baseUrl ? new URL(`${baseUrl}/v1/scheduled-tasks/events`) : new URL("/v1/scheduled-tasks/events", globalThis.location.href);
1311
- url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
1312
- let active = true;
1313
- let attempt = 0;
1314
- let timer;
1315
- let socket;
1316
- let detach;
1317
- const retry = () => {
1318
- if (!active) return;
1319
- timer = setTimeout(
1320
- connect,
1321
- Math.min(3e4, 500 * 2 ** Math.min(attempt++, 6)) * (0.8 + Math.random() * 0.4)
1322
- );
1323
- };
1324
- const connect = () => {
1325
- if (!active) return;
1326
- timer = void 0;
1327
- let current;
1328
- try {
1329
- current = factory(url.toString());
1330
- } catch {
1331
- retry();
1332
- return;
1333
- }
1334
- socket = current;
1335
- const onMessage = (event) => {
1336
- if (!active || socket !== current) return;
1337
- let message;
1338
- try {
1339
- message = JSON.parse(String(event.data));
1340
- } catch {
1341
- current.close(1002, "Invalid scheduled task frame");
1342
- return;
1343
- }
1344
- if (!value_exports.Check(ScheduledTaskChangeSchema, message)) {
1345
- current.close(1002, "Invalid scheduled task frame");
1346
- return;
1347
- }
1348
- attempt = 0;
1349
- onChange();
1350
- };
1351
- const onClose = (event) => {
1352
- if (socket !== current) return;
1353
- detach?.();
1354
- socket = void 0;
1355
- if (event.code !== 1008 && event.code !== 1002) retry();
1356
- };
1357
- const onError = () => {
1358
- current.close();
1359
- };
1360
- detach = () => {
1361
- current.removeEventListener("message", onMessage);
1362
- current.removeEventListener("close", onClose);
1363
- current.removeEventListener("error", onError);
1364
- };
1365
- current.addEventListener("message", onMessage);
1366
- current.addEventListener("close", onClose);
1367
- current.addEventListener("error", onError);
1368
- };
1369
- connect();
1370
- return () => {
1371
- active = false;
1372
- if (timer !== void 0) clearTimeout(timer);
1373
- detach?.();
1374
- socket?.close(1e3, "Scheduled task subscription closed");
1375
- socket = void 0;
1376
- };
1377
- }
1378
-
1379
- // packages/client/src/http-client-scheduled-tasks.ts
1380
- var ScheduledTaskHttpClient = class extends TaskHttpClient {
1381
- previewScheduledTask(schedule, options = {}) {
1382
- return this.mutation(
1383
- "/v1/scheduled-tasks/preview",
1384
- { schedule },
1385
- ScheduledTaskPreviewSchema,
1386
- options
1387
- );
1388
- }
1389
- subscribeScheduledTasks(onChange) {
1390
- return subscribeScheduledTaskChanges(this.baseUrl, this.webSocketFactory, onChange);
1391
- }
1392
- listScheduledTasks(options = {}) {
1393
- return this.read("/v1/scheduled-tasks", ScheduledTaskPageSchema, options);
1394
- }
1395
- createScheduledTask(input, options = {}) {
1396
- return this.mutation(
1397
- "/v1/scheduled-tasks",
1398
- input,
1399
- ScheduledTaskMutationResponseSchema,
1400
- options
1401
- );
1402
- }
1403
- updateScheduledTask(taskId, input, options = {}) {
1404
- return this.mutation(
1405
- `/v1/scheduled-tasks/${encodeURIComponent(taskId)}`,
1406
- input,
1407
- ScheduledTaskMutationResponseSchema,
1408
- options,
1409
- "PUT"
1410
- );
1411
- }
1412
- deleteScheduledTask(taskId, options = {}) {
1413
- return this.mutation(
1414
- `/v1/scheduled-tasks/${encodeURIComponent(taskId)}`,
1415
- {},
1416
- DeleteScheduledTaskResponseSchema,
1417
- options,
1418
- "DELETE"
1419
- );
1420
- }
1421
- setScheduledTaskEnabled(taskId, enabled, options = {}) {
1422
- return this.mutation(
1423
- `/v1/scheduled-tasks/${encodeURIComponent(taskId)}/enabled`,
1424
- { enabled },
1425
- ScheduledTaskMutationResponseSchema,
1426
- options,
1427
- "PATCH"
1428
- );
1429
- }
1430
- runScheduledTaskNow(taskId, options = {}) {
1431
- return this.mutation(
1432
- `/v1/scheduled-tasks/${encodeURIComponent(taskId)}/run`,
1433
- {},
1434
- ScheduledTaskMutationResponseSchema,
1435
- options
1436
- );
1437
- }
1438
- };
1439
-
1440
- // packages/client/src/http-client-personalization.ts
1441
- var PersonalizationHttpClient = class extends ScheduledTaskHttpClient {
1442
- compressHistory(options = {}) {
1443
- return this.mutation("/v1/history/compress", {}, HistoryCompressionResultSchema, options);
1444
- }
1445
- listWorkbenchBackgrounds(options = {}) {
1446
- return this.read("/v1/workbench-background/bing/catalog", BingWallpaperCatalogSchema, options);
1447
- }
1448
- getGlobalInstructions(options = {}) {
1449
- return this.read("/v1/personalization/instructions", GlobalInstructionsSchema, options);
1450
- }
1451
- saveGlobalInstructions(content, expectedContent, options = {}) {
1452
- return this.mutation(
1453
- "/v1/personalization/instructions",
1454
- { content, expectedContent },
1455
- GlobalInstructionsSchema,
1456
- options,
1457
- "PUT"
1458
- );
1459
- }
1460
- getMemorySettings(options = {}) {
1461
- return this.read("/v1/personalization/memories", MemorySettingsSchema, options);
1462
- }
1463
- updateMemorySettings(input, options = {}) {
1464
- return this.mutation(
1465
- "/v1/personalization/memories",
1466
- input,
1467
- MemorySettingsSchema,
1468
- options,
1469
- "PUT"
1470
- );
1471
- }
1472
- resetMemories(options = {}) {
1473
- return this.mutation(
1474
- "/v1/personalization/memories/reset",
1475
- {},
1476
- PersonalizationResetSchema,
1477
- options
1478
- );
1479
- }
1480
- getAgentPreferences(options = {}) {
1481
- return this.read("/v1/personalization/agent", AgentPreferencesSchema, options);
1482
- }
1483
- updateAgentPreferences(input, options = {}) {
1484
- return this.mutation(
1485
- "/v1/personalization/agent",
1486
- input,
1487
- AgentPreferencesSchema,
1488
- options,
1489
- "PUT"
1490
- );
1491
- }
1492
- };
1493
-
1494
- // packages/client/src/http-client-project-todos.ts
1495
- var ProjectTodoHttpClient = class extends PersonalizationHttpClient {
1496
- // 浏览器历史记录属于不可信输入,由后端统一按当前协议校验。
1497
- importProjectTodo(projectId, todoId, draft, options = {}) {
1498
- return this.mutation(
1499
- `${projectPath(projectId)}/todos/${encodeURIComponent(todoId)}/import`,
1500
- draft,
1501
- ProjectTodoResponseSchema,
1502
- options
1503
- );
1504
- }
1505
- listProjectTodos(projectId, options = {}) {
1506
- return this.read(`${projectPath(projectId)}/todos`, ProjectTodoPageSchema, options);
1507
- }
1508
- createProjectTodo(projectId, draft, options = {}) {
1509
- return this.mutation(
1510
- `${projectPath(projectId)}/todos`,
1511
- draft,
1512
- ProjectTodoResponseSchema,
1513
- options
1514
- );
1515
- }
1516
- saveProjectTodo(projectId, todoId, input, options = {}) {
1517
- return this.mutation(
1518
- `${projectPath(projectId)}/todos/${encodeURIComponent(todoId)}`,
1519
- input,
1520
- ProjectTodoResponseSchema,
1521
- options,
1522
- "PUT"
1523
- );
1524
- }
1525
- deleteProjectTodo(projectId, todoId, expectedVersion, options = {}) {
1526
- return this.mutation(
1527
- `${projectPath(projectId)}/todos/${encodeURIComponent(todoId)}`,
1528
- { expectedVersion },
1529
- DeleteProjectTodoResponseSchema,
1530
- options,
1531
- "DELETE"
1532
- );
1533
- }
1534
- };
1535
-
1536
- // packages/client/src/http-client-async-questions.ts
1537
- var questionPath = (projectId, taskId) => `${projectPath(projectId)}/tasks/${encodeURIComponent(taskId)}/async-questions`;
1538
- var AsyncQuestionHttpClient = class extends ProjectTodoHttpClient {
1539
- listAsyncQuestions(projectId, taskId, options = {}) {
1540
- return this.read(questionPath(projectId, taskId), AsyncQuestionPageSchema, options);
1541
- }
1542
- answerAsyncQuestion(projectId, taskId, id, answers, options = {}) {
1543
- return this.mutation(
1544
- `${questionPath(projectId, taskId)}/${encodeURIComponent(id)}/answer`,
1545
- { answers },
1546
- AnswerAsyncQuestionResponseSchema,
1547
- options
1548
- );
1549
- }
1550
- dismissAsyncQuestions(projectId, taskId, ids, options = {}) {
1551
- return this.mutation(
1552
- `${questionPath(projectId, taskId)}/dismiss`,
1553
- { ids },
1554
- AsyncQuestionPageSchema,
1555
- options
1556
- );
1557
- }
1558
- };
1559
-
1560
- // packages/client/src/http-client.ts
1561
- var CodexlyClient = class extends AsyncQuestionHttpClient {
1562
- };
1563
-
1564
- export { CodexlyClient, CodexlyEventError, CodexlyHttpError, CodexlyMutationError, CodexlyResponseError, buildProjectAttachmentUrl, buildProjectFileDownloadUrl, buildProjectImageFileUrl, buildProjectPdfFileUrl, buildTaskAttachmentUrl, buildWorkbenchPetAssetUrl, startAgentEventSubscription };
1
+ import {createRequire}from'node:module';import {a}from'../chunk-GFASBWL4.js';import {sg,we,ve,Sg,Vg,og,Mg,Lg,Pg,Dg,Fg,xg,zg,Cg,Bg,Od,Td,Ud,Vd,Hg,pd,Lf,Nf,Of,Qf,Sf,De,tg,Ub,$b,ac,Ed,kf,mf,of,vf,xf,zf,Bf,Ff,cd,Wf,Hf,Jf,Uf,pe,hc,gc,ug,Gd,Yg,if as _if,te as te$1,ue,jc,qf,sf,uf,Fe,jd,Df,Be,wa,Aa,Ce,Dd,Da,Na,Pa,Ia,Ka,Ra,Va,Ya,_a,cb,gb,fb,jb,nb,qb,tb,vb,oa,qa,xb,mb,_g,$g,bh,$ as $$1,hb,rc,Kc,Nc,Pc,Rc,tc,xc,zc,Cc,Hc,Ec,vc,Gc,Ge,oc,nc,qc,Yd,He,Ee,Me,Oe,Se as Se$1,Qe,Bd,fa,ha,Ld,ch}from'../chunk-HD7TOFDV.js';import'../chunk-IV4NRE4S.js';import'../chunk-YXJGRSCL.js';createRequire(import.meta.url);
2
+ var g=[];for(let o=0;o<256;++o)g.push((o+256).toString(16).slice(1));function Pn(o,e=0){return (g[o[e+0]]+g[o[e+1]]+g[o[e+2]]+g[o[e+3]]+"-"+g[o[e+4]]+g[o[e+5]]+"-"+g[o[e+6]]+g[o[e+7]]+"-"+g[o[e+8]]+g[o[e+9]]+"-"+g[o[e+10]]+g[o[e+11]]+g[o[e+12]]+g[o[e+13]]+g[o[e+14]]+g[o[e+15]]).toLowerCase()}var Tn=new Uint8Array(16);function ye(){return crypto.getRandomValues(Tn)}function An(o,e,t){return !e&&!o&&crypto.randomUUID?crypto.randomUUID():vn(o,e,t)}function vn(o,e,t){o=o||{};let n=o.random??o.rng?.()??ye();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let s=0;s<16;++s)e[t+s]=n[s];return e}return Pn(n)}var $=An;var q=class extends Error{constructor(e,t){super(e,t),this.name="CodexlyEventError";}};function On(o,e,t){let n=e===ve?`${we}/events`:`/v1/projects/${encodeURIComponent(e)}/events`,s=o?new URL(`${o}${n}`):new URL(n,globalThis.location.href);return s.protocol=s.protocol==="https:"?"wss:":"ws:",s.searchParams.set("afterSequence",String(t)),s.toString()}function E(o,e,t){return {latestSequence:e,reason:t,sessionId:o,type:"resync.required",version:3}}function jn(o){if(o.length>og)return true;if(o.length*3<=og)return false;let e=0;for(let t=0;t<o.length;t+=1){let n=o.codePointAt(t);if(n===void 0)break;if(e+=n<=127?1:n<=2047?2:n<=65535?3:4,e>og)return true;n>65535&&(t+=1);}return false}function Pe(o){let e=o.reconnectDelayMs??250,t=true,n=true,s=o.afterSequence,a$1=0,p,P,l,d=y=>{o.onConnectionState?.(y);},u=(y,m)=>{let f=P;f!==void 0&&(l?.(),l=void 0,P=void 0,f.close(y,m));},S=y=>{n=false,o.onResyncRequired(y),u(1e3,"Snapshot resync required"),d("closed");},v=(y,m)=>{n=false,o.onError?.(new q(y,m===void 0?void 0:{cause:m})),u(1002,"Invalid Agent Event frame"),d("closed");},h=()=>{if(!t)return;p=void 0;let y=false,m=o.webSocketFactory(On(o.baseUrl,o.projectId,s));P=m;let f=()=>t&&P===m,O=M=>{if(!f())return;if(typeof M.data!="string"){v("Codexly event frame must be text");return}if(jn(M.data)){S(E(o.sessionId,s,"event_retention_exceeded"));return}let x;try{x=JSON.parse(M.data);}catch(b){v("Codexly event frame is not valid JSON",b);return}if(!a.Check(sg,x)){v("Codexly event frame does not match the protocol schema");return}let k=x;if(k.type==="resync.required"){S(k);return}if(k.type==="connection.ready"){if(k.sessionId!==o.sessionId||k.latestSequence<s){S(E(k.sessionId,k.latestSequence,"session_changed"));return}y=true,a$1=0,d("connected");return}if(!y){v("Codexly event arrived before connection.ready");return}for(let b of k.events){if(b.sessionId!==o.sessionId){S(E(b.sessionId,b.sequence,"session_changed"));return}if(!(b.sequence<=s)){if(b.sequence!==s+1){S(E(b.sessionId,b.sequence,"sequence_gap"));return}if(s=b.sequence,o.onEvent(b),!f())return}}},C=()=>{!t||P!==m||o.onError?.(new q("Codexly event connection failed"));},be=M=>{if(P!==m)return;if(t&&M.code===1009){S(E(o.sessionId,s,"event_retention_exceeded"));return}if(l?.(),l=void 0,P=void 0,!t)return;if(!n){d("closed");return}d("reconnecting");let x=Math.min(e*2**a$1,5e3);a$1+=1,p=setTimeout(h,x);};l=()=>{m.removeEventListener("message",O),m.removeEventListener("error",C),m.removeEventListener("close",be);},m.addEventListener("message",O),m.addEventListener("error",C),m.addEventListener("close",be);};return d("connecting"),h(),()=>{t&&(t=false,n=false,p!==void 0&&clearTimeout(p),u(1e3,"Subscription cancelled"),d("closed"));}}var Cn=15e4,A=class extends Error{status;constructor(e,t,n){super(n??`Codexly request failed with ${String(e)} ${t}`.trim()),this.name="CodexlyHttpError",this.status=e;}},I=class extends A{code;retryable;constructor(e,t,n){super(e,t,n.message),this.name="CodexlyMutationError",this.code=n.code,this.retryable=n.retryable;}},T=class extends Error{constructor(e,t){super(e,t),this.name="CodexlyResponseError";}};function i(o,e){let t=new URLSearchParams;for(let[s,a]of Object.entries(e))a!==void 0&&t.set(s,String(a));let n=t.toString();return n?`${o}?${n}`:o}function r(o){return o===ve?we:`/v1/projects/${encodeURIComponent(o)}`}function c(o,e){return `${r(o)}/tasks/${encodeURIComponent(e)}`}function H(o,e,t,n){return `${o.replace(/\/$/u,"")}${c(e,t)}/attachments/${encodeURIComponent(n)}`}function Rn(o,e,t,n){let s=i(`${r(e)}/files/image`,{path:t,rootPath:n});return `${o.replace(/\/$/u,"")}${s}`}function Sn(o,e,t,n){let s=i(`${r(e)}/files/download`,{path:t,rootPath:n===""?void 0:n});return `${o.replace(/\/$/u,"")}${s}`}function bn(o,e,t){return `${o.replace(/\/$/u,"")}${r(e)}/attachments/${encodeURIComponent(t)}`}function fn(o,e=""){return `${e.replace(/\/$/u,"")}/v1/pets/assets/${encodeURIComponent(o)}`}var W=class{baseUrl;fetchImplementation;requestTimeouts;webSocketFactory;unauthorizedListeners=new Set;constructor(e={}){this.baseUrl=e.baseUrl?.replace(/\/$/u,"")??"",this.fetchImplementation=e.fetch??globalThis.fetch.bind(globalThis),this.requestTimeouts={mutationMs:e.requestTimeouts?.mutationMs??6e4,queryMs:e.requestTimeouts?.queryMs??3e4,readMs:e.requestTimeouts?.readMs??15e3},this.webSocketFactory=e.webSocketFactory??(t=>new WebSocket(t));}async getHealth(e={}){return this.read("/v1/health",Ge,e)}async getAppInfo(e={}){return this.read("/v1/app-info",oc,e)}async getAppUpdateProgress(e={}){return this.read("/v1/app-update/progress",nc,e)}async installAppUpdate(e,t={}){return this.mutation("/v1/app-update",{version:e},qc,t,"POST",Cn)}async getAccessStatus(e={}){return this.read("/v1/access",Yd,e)}async pairAccess(e){return this.request("/v1/access/pair",Yd,{body:JSON.stringify({code:e}),headers:{"content-type":"application/json"},method:"POST"},Wf,{timeoutMs:this.requestTimeouts.mutationMs})}async logoutAccess(){return this.request("/v1/access/logout",Yd,{body:"{}",headers:{"content-type":"application/json"},method:"POST"},Wf,{timeoutMs:this.requestTimeouts.mutationMs})}subscribeUnauthorized(e){return this.unauthorizedListeners.add(e),()=>this.unauthorizedListeners.delete(e)}async getCapabilities(e={}){return this.read("/v1/capabilities",He,e)}async listModels(e={}){return this.read("/v1/models",Ee,e)}async getProviderConnection(e={}){return this.read("/v1/provider-connection",Me,e)}async startOfficialProviderLogin(e={}){return this.mutation("/v1/provider-connection/official-login",{},Oe,e)}async cancelProviderLogin(e,t={}){return this.mutation("/v1/provider-connection/official-login/cancel",{loginId:e},Se$1,t)}async configureCustomProvider(e,t={}){return this.mutation("/v1/provider-connection/custom",e,Qe,t,"PUT")}async logoutProvider(e={}){return this.mutation("/v1/provider-connection/logout",{},Se$1,e)}async getGlobalSettings(e={}){return this.read("/v1/settings",Bd,e)}async listWorkbenchPets(e={}){return this.read("/v1/pets",fa,e)}async downloadWorkbenchPet(e,t={}){return this.mutation("/v1/pets/downloads",{petId:e},ha,t)}async updateGlobalSettings(e,t={}){return this.mutation("/v1/settings",e,Bd,t,"PUT")}subscribeEvents(e){return Pe({...e,baseUrl:this.baseUrl,webSocketFactory:this.webSocketFactory})}mutation(e,t,n,s,a="POST",p=this.requestTimeouts.mutationMs){return this.request(e,n,{body:JSON.stringify(t),headers:{"content-type":"application/json","idempotency-key":s.idempotencyKey??$()},method:a},Wf,{...s.signal===void 0?{}:{signal:s.signal},timeoutMs:p})}read(e,t,n,s){return this.request(e,t,{},s,{...n.signal===void 0?{}:{signal:n.signal},timeoutMs:n.signal===void 0?this.requestTimeouts.readMs:this.requestTimeouts.queryMs})}async request(e,t,n={},s,a$1={}){let p=AbortSignal.timeout(a$1.timeoutMs??this.requestTimeouts.readMs),P=a$1.signal===void 0?p:AbortSignal.any([a$1.signal,p]),l=await this.fetchImplementation(`${this.baseUrl}${e}`,{...n,credentials:"same-origin",headers:{accept:"application/json",...n.headers},signal:P});if(!l.ok){if(l.status===401)for(let u of this.unauthorizedListeners)try{u();}catch{}if(s!==void 0){let u;try{u=await l.json();}catch(S){throw new T("Codexly error response is not valid JSON",{cause:S})}throw a.Check(s,u)?new I(l.status,l.statusText,u):new T("Codexly error response does not match the protocol schema")}try{let u=await l.json();if(typeof u=="object"&&u!==null&&"message"in u&&typeof u.message=="string"&&u.message.length>0)throw new A(l.status,l.statusText,u.message)}catch(u){if(u instanceof A)throw u}throw new A(l.status,l.statusText)}let d;try{d=await l.json();}catch(u){throw new T("Codexly response is not valid JSON",{cause:u})}if(!a.Check(t,d))throw new T("Codexly response does not match the protocol schema");return d}};function Mn(o,e,t,n){let s=i(`${r(e)}/files/pdf`,{path:t,rootPath:n===""?void 0:n});return `${o.replace(/\/$/u,"")}${s}`}var _=class extends W{async reconcileOfficialPlugins(e={}){return this.mutation("/v1/plugins/official/reconcile",{},rc,e)}async listOfficialPlugins(e,t={}){return this.read(i("/v1/plugins/official",{forceRefetch:e?"true":void 0}),Kc,t)}async getOfficialPlugin(e,t,n,s={}){return this.read(i(`/v1/plugins/official/${encodeURIComponent(e)}/${encodeURIComponent(n)}`,{marketplacePath:t??void 0}),Nc,s,Wf)}async installOfficialPlugin(e,t,n,s,a={}){return this.mutation(`/v1/plugins/official/${encodeURIComponent(e)}/${encodeURIComponent(n)}/install`,{installAttemptId:s,marketplacePath:t},Pc,a)}async uninstallOfficialPlugin(e,t,n,s={}){return this.mutation(`/v1/plugins/official/${encodeURIComponent(e)}/${encodeURIComponent(t)}/uninstall`,{pluginId:n},Rc,s)}async listInstalledSkills(e={}){return this.read("/v1/skills/installed",tc,e)}async listClawhubSkills(e,t,n,s={}){return this.read(i("/v1/skills/market",{cursor:t??void 0,query:e.length===0?void 0:e,sort:n}),xc,s,Wf)}async getClawhubSkill(e,t,n={}){return this.read(`/v1/skills/market/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,zc,n,Wf)}async installClawhubSkill(e,t,n,s,a,p={}){return this.mutation(`/v1/skills/market/${encodeURIComponent(e)}/${encodeURIComponent(t)}/install`,{projectId:s,rootPath:a,scope:n},Cc,p)}async openSkillDirectory(e,t={}){return this.mutation("/v1/skills/open",{path:e},Hc,t)}async setSkillEnabled(e,t,n={}){return this.mutation("/v1/skills/enabled",{enabled:t,path:e},Ec,n,"PUT")}async listConfiguredMcpServers(e={}){return this.read("/v1/mcp-servers/configured",vc,e)}async setMcpServerEnabled(e,t,n={}){return this.mutation(`/v1/mcp-servers/configured/${encodeURIComponent(e)}/enabled`,{enabled:t},Gc,n,"PUT")}};var B=class extends _{async createTaskWorktree(e,t,n,s={}){return this.mutation(i(`${r(e)}/git/task-worktrees`,{rootPath:t}),n,hb,s)}};var z=class extends B{async createProjectDirectory(e,t={}){return this.mutation("/v1/project-directories",e,$$1,t)}};var N=class extends z{async readProjectTextFileRevision(e,t,n,s={}){return this.read(i(`${r(e)}/files/text/revision`,{path:n,rootPath:t}),_g,s)}async readProjectTextFile(e,t,n,s={}){return this.read(i(`${r(e)}/files/text`,{path:n,rootPath:t}),$g,s)}async saveProjectTextFile(e,t,n,s={}){return this.mutation(i(`${r(e)}/files/text`,{rootPath:t}),n,bh,s)}};var K=class extends N{async pushProjectCommits(e,t,n,s={}){return this.mutation(i(`${r(e)}/git/push`,{rootPath:t}),n,mb,s)}};var J=class extends K{async listSkills(e,t={}){return this.read(`${r(e)}/skills`,Fe,t)}async listMcpServers(e,t,n={}){return this.read(`${c(e,t)}/mcp-servers`,jd,n,Wf)}async retryMcpServers(e,t,n={}){return this.mutation(`${c(e,t)}/mcp-servers/retry`,{},Df,n)}async listProjects(e={}){return this.read("/v1/projects",Be,e)}async listProjectDirectories(e,t={}){return this.read(i("/v1/project-directories",{path:e,includeHidden:t.includeHidden===true?"true":void 0}),wa,t)}async listHostFiles(e,t,n={}){return this.read(i("/v1/host-files",{kind:e,path:t,includeHidden:n.includeHidden===true?"true":void 0}),Aa,n)}async reorderProjects(e,t={}){return this.mutation("/v1/projects/order",{projectIds:e},Ce,t,"PUT")}async getProjectDefaults(e,t={}){return this.read(`${r(e)}/defaults`,Dd,t)}async updateProjectDefaults(e,t,n={}){return this.mutation(`${r(e)}/defaults`,t,Dd,n,"PUT")}async addProject(e,t={}){return this.mutation("/v1/projects",{roots:e.map(n=>({path:n}))},Da,t)}async renameProject(e,t,n={}){return this.mutation(`${r(e)}/rename`,{name:t},Na,n)}async removeProject(e,t={}){return this.mutation(`${r(e)}/remove`,{},Pa,t)}async getProjectOpenCapabilities(e,t={}){return this.read(`${r(e)}/open-capabilities`,Ia,t)}async openProject(e,t,n,s={}){return this.mutation(i(`${r(e)}/open`,{rootPath:t}),n,Ka,s)}async getProjectGitStatus(e,t,n={}){return this.read(i(`/v1/projects/${encodeURIComponent(e)}/git/status`,{includeDiff:t.includeDiff===true?"true":void 0,repository:t.repository,rootPath:t.rootPath}),Ra,n)}async getProjectGitHistory(e,t,n={}){return this.read(i(`${r(e)}/git/history`,{cursor:t.cursor,repository:t.repository,rootPath:t.rootPath}),Va,n)}async getProjectGitCommitFiles(e,t,n={}){return this.read(i(`${r(e)}/git/commit-files`,{cursor:t.cursor,repository:t.repository,rootPath:t.rootPath,sha:t.sha}),Ya,n)}async getProjectGitCommitFileDiff(e,t,n={}){return this.read(i(`${r(e)}/git/commit-diff`,{path:t.path,repository:t.repository,rootPath:t.rootPath,sha:t.sha}),_a,n)}async switchProjectBranch(e,t,n,s={}){return this.mutation(i(`${r(e)}/git/branch`,{rootPath:t}),n,Ra,s)}async createProjectBranch(e,t,n,s={}){return this.mutation(i(`${r(e)}/git/branches`,{rootPath:t}),n,Ra,s)}async listProjectWorktrees(e,t,n={}){return this.read(i(`${r(e)}/git/worktrees`,{rootPath:t}),cb,n)}async createProjectWorktree(e,t,n,s={}){return this.mutation(i(`${r(e)}/git/worktrees`,{rootPath:t}),n,gb,s)}async switchProjectWorktree(e,t,n,s={}){return this.mutation(i(`${r(e)}/git/worktree`,{rootPath:t}),n,fb,s)}async generateCommitMessage(e,t,n,s={}){return this.mutation(i(`${r(e)}/git/commit-message`,{rootPath:t}),n,jb,s)}async commitProjectChanges(e,t,n,s={}){return this.mutation(i(`${r(e)}/git/commits`,{rootPath:t}),n,nb,s)}async listProjectFiles(e,t,n,s={}){let a=i(`/v1/projects/${encodeURIComponent(e)}/files/tree`,{path:n??void 0,rootPath:t});return this.read(a,qb,s)}async renameProjectFile(e,t,n,s={}){return this.mutation(i(`/v1/projects/${encodeURIComponent(e)}/files/rename`,{rootPath:t}),n,tb,s)}async deleteProjectFile(e,t,n,s={}){return this.mutation(i(`/v1/projects/${encodeURIComponent(e)}/files/delete`,{rootPath:t}),n,vb,s)}async searchProjectFiles(e,t,n,s,a={}){let p=i(`/v1/projects/${encodeURIComponent(e)}/files/search`,{query:n,rootPath:t,sessionId:s});return this.read(p,oa,a)}async stopProjectFileSearch(e,t,n,s={}){return this.mutation(`/v1/projects/${encodeURIComponent(e)}/files/search/stop`,{rootPath:t,sessionId:n},qa,s)}async readProjectSourceFile(e,t,n,s,a={}){let p=i(`${r(e)}/files/source`,{cursor:s,path:n,rootPath:t});return this.read(p,xb,a)}};var V=class extends J{deleteArchivedTasks(e,t={}){return this.mutation(`${r(e)}/tasks/archived`,{},jc,t,"DELETE")}async archiveTask(e,t,n={}){return this.mutation(`${c(e,t)}/archive`,{},qf,n)}async unarchiveTask(e,t,n={}){return this.mutation(`${c(e,t)}/unarchive`,{},sf,n)}async deleteTask(e,t,n={}){return this.mutation(c(e,t),{},uf,n,"DELETE")}};var Y=class extends V{async updateTaskGoal(e,t,n,s={}){return this.mutation(`${c(e,t)}/goal`,n,te$1,s,"PUT")}async clearTaskGoal(e,t,n={}){return this.mutation(`${c(e,t)}/goal`,{},ue,n,"DELETE")}};var X=class extends Y{readNavigableTask(e,t,n={}){return this.read(`${c(e,t)}/navigation`,ug,n)}updateTaskSettingsAndDefaults(e,t,n,s={}){return this.mutation(`${c(e,t)}/settings-and-defaults`,n,Gd,s,"PUT")}queryCompletedTasks(e,t={}){return this.request("/v1/tasks/completed/query",Yg,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)},void 0,{...t,timeoutMs:this.requestTimeouts.queryMs})}listTaskCatalog(e,t={},n={}){return this.read(i(`${r(e)}/tasks/catalog`,t),_if,n)}};var Z=class extends X{async searchTasks(e,t={}){return this.read(i("/v1/search/tasks",e),hc,t)}async searchTaskOccurrences(e,t,n,s,a={}){return this.read(i(`${c(e,t)}/search-occurrences`,{cursor:s,query:n}),gc,a)}};var ee=class extends Z{submitTask(e,t,n={}){return this.mutation(`${r(e)}/submissions`,t,Hg,n)}async listQueuedSubmissions(e,t,n={}){return this.read(`${c(e,t)}/queue`,pd,n)}async addQueuedSubmission(e,t,n,s,a={}){return this.mutation(`${c(e,t)}/queue`,{clientUserMessageId:s,input:n},Lf,a)}async updateQueuedSubmission(e,t,n,s,a,p={}){return this.mutation(`${c(e,t)}/queue/${encodeURIComponent(n)}`,{input:s,status:a},Nf,p,"PUT")}async deleteQueuedSubmission(e,t,n,s={}){return this.mutation(`${c(e,t)}/queue/${encodeURIComponent(n)}`,{},Of,s,"DELETE")}async reorderQueuedSubmissions(e,t,n,s={}){return this.mutation(`${c(e,t)}/queue/reorder`,{queuedSubmissionIds:n},Qf,s,"PUT")}async startQueuedSubmission(e,t,n,s={}){return this.mutation(`${c(e,t)}/queue/start`,{...n===void 0?{}:{queuedSubmissionId:n}},Sf,s)}async listTasks(e,t={},n={}){let s=i(`${r(e)}/tasks`,t);return this.read(s,De,n)}async readTask(e,t,n={}){let{cursor:s,...a}=n;return this.read(i(c(e,t),{cursor:s}),tg,a)}getTaskAttachmentUrl(e,t,n){return H(this.baseUrl,e,t,n)}async openTaskAttachment(e,t,n,s={}){return this.mutation(`${c(e,t)}/attachments/${encodeURIComponent(n)}/open`,{},Ub,s)}async listBackgroundTerminals(e,t,n={}){return this.read(`${c(e,t)}/background-terminals`,$b,n)}async terminateBackgroundTerminal(e,t,n,s={}){return this.mutation(`${c(e,t)}/background-terminals/${encodeURIComponent(n)}/terminate`,{},ac,s)}async getTaskSettings(e,t,n={}){return this.read(`${c(e,t)}/settings`,Ed,n)}async updateTaskSettings(e,t,n,s={}){return this.mutation(`${c(e,t)}/settings`,n,Ed,s,"PUT")}async startTask(e,t={}){return this.mutation(`${r(e)}/tasks`,{},kf,t)}async startWorktreeTask(e,t,n={}){return this.mutation(`${r(e)}/tasks`,t,kf,n)}async pinTask(e,t,n,s={}){return this.mutation(`${c(e,t)}/pin`,{pinned:n},mf,s,"PUT")}async renameTask(e,t,n,s={}){return this.mutation(`${c(e,t)}/rename`,{title:n},of,s)}async unsubscribeTask(e,t){return this.request(`${c(e,t)}/unsubscribe`,vf,{body:"{}",headers:{"content-type":"application/json"},method:"POST"})}async startReview(e,t,n,s={}){return this.mutation(`${c(e,t)}/review`,n,xf,s)}async compactTask(e,t,n={}){return this.mutation(`${c(e,t)}/compact`,{},zf,n)}async forkTask(e,t,n,s={}){return this.mutation(`${c(e,t)}/fork`,n,Bf,s)}async uploadFeedback(e,t,n,s={}){return this.mutation(`${c(e,t)}/feedback`,n,Ff,s)}async uploadAttachment(e,t,n={}){let s=new FormData;return s.set("attachment",t.content,t.name),this.request(`${r(e)}/attachments/${t.kind}`,cd,{body:s,headers:{"idempotency-key":n.idempotencyKey??$()},method:"POST"},Wf,{...n.signal===void 0?{}:{signal:n.signal},timeoutMs:this.requestTimeouts.mutationMs})}async importHostAttachment(e,t,n,s={}){return this.mutation(`${r(e)}/attachments/${t}/host`,{path:n},cd,s)}async startTurn(e,t,n,s,a={}){return this.mutation(`${c(e,t)}/turns`,{input:n,options:s},Hf,a)}async steerTurn(e,t,n,s,a={}){return this.mutation(`${c(e,t)}/turns/${encodeURIComponent(n)}/steer`,{input:s,taskId:t},Jf,a)}async interruptTurn(e,t,n,s={}){return this.mutation(`${c(e,t)}/turns/${encodeURIComponent(n)}/interrupt`,{taskId:t},Uf,s)}async resolvePendingRequest(e,t,n={}){let s={itemId:e.itemId,projectId:e.projectId,resolution:t,taskId:e.taskId,turnId:e.turnId,type:e.type};return this.mutation(`${c(e.projectId,e.taskId)}/pending-requests/${encodeURIComponent(e.requestId)}/resolve`,s,pe,n)}};function te(o,e,t,n,s){let a$1=o?new URL(`${o}${t}`):new URL(t,globalThis.location.href);a$1.protocol=a$1.protocol==="https:"?"wss:":"ws:";let p=true,P=0,l,d,u,S=()=>{p&&(l=setTimeout(v,Math.min(3e4,500*2**Math.min(P++,6))*(.8+Math.random()*.4)));},v=()=>{if(!p)return;l=void 0;let h;try{h=e(a$1.toString());}catch{S();return}d=h;let y=O=>{if(!p||d!==h)return;let C;try{C=JSON.parse(String(O.data));}catch{h.close(1002,"Invalid resource change frame");return}if(!a.Check(n,C)){h.close(1002,"Invalid resource change frame");return}P=0,s(C);},m=O=>{d===h&&(u?.(),d=void 0,O.code!==1008&&O.code!==1002&&S());},f=()=>{h.close();};u=()=>{h.removeEventListener("message",y),h.removeEventListener("close",m),h.removeEventListener("error",f);},h.addEventListener("message",y),h.addEventListener("close",m),h.addEventListener("error",f);};return v(),()=>{p=false,l!==void 0&&clearTimeout(l),u?.(),d?.close(1e3,"Resource subscription closed"),d=void 0;}}function kn(o,e,t){return te(o,e,"/v1/scheduled-tasks/events",Ld,t)}var ne=class extends ee{previewScheduledTask(e,t={}){return this.mutation("/v1/scheduled-tasks/preview",{schedule:e},Od,t)}subscribeScheduledTasks(e){return kn(this.baseUrl,this.webSocketFactory,e)}listScheduledTasks(e={}){return this.read("/v1/scheduled-tasks",Td,e)}createScheduledTask(e,t={}){return this.mutation("/v1/scheduled-tasks",e,Ud,t)}updateScheduledTask(e,t,n={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}`,t,Ud,n,"PUT")}deleteScheduledTask(e,t={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}`,{},Vd,t,"DELETE")}setScheduledTaskEnabled(e,t,n={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}/enabled`,{enabled:t},Ud,n,"PATCH")}runScheduledTaskNow(e,t={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}/run`,{},Ud,t)}};var se=class extends ne{compressHistory(e={}){return this.mutation("/v1/history/compress",{},Dg,e)}listWorkbenchBackgrounds(e={}){return this.read("/v1/workbench-background/bing/catalog",Fg,e)}getGlobalInstructions(e={}){return this.read("/v1/personalization/instructions",xg,e)}saveGlobalInstructions(e,t,n={}){return this.mutation("/v1/personalization/instructions",{content:e,expectedContent:t},xg,n,"PUT")}getMemorySettings(e={}){return this.read("/v1/personalization/memories",zg,e)}updateMemorySettings(e,t={}){return this.mutation("/v1/personalization/memories",e,zg,t,"PUT")}resetMemories(e={}){return this.mutation("/v1/personalization/memories/reset",{},Cg,e)}getAgentPreferences(e={}){return this.read("/v1/personalization/agent",Bg,e)}updateAgentPreferences(e,t={}){return this.mutation("/v1/personalization/agent",e,Bg,t,"PUT")}};var oe=class extends se{subscribeWorkbenchChanges(e){return te(this.baseUrl,this.webSocketFactory,"/v1/workbench/events",ch,e)}importProjectTodo(e,t,n,s={}){return this.mutation(`${r(e)}/todos/${encodeURIComponent(t)}/import`,n,Mg,s)}listProjectTodos(e,t={}){return this.read(`${r(e)}/todos`,Lg,t)}createProjectTodo(e,t,n={}){return this.mutation(`${r(e)}/todos`,t,Mg,n)}saveProjectTodo(e,t,n,s={}){return this.mutation(`${r(e)}/todos/${encodeURIComponent(t)}`,n,Mg,s,"PUT")}deleteProjectTodo(e,t,n,s={}){return this.mutation(`${r(e)}/todos/${encodeURIComponent(t)}`,{expectedVersion:n},Pg,s,"DELETE")}};var Re=(o,e)=>`${r(o)}/tasks/${encodeURIComponent(e)}/async-questions`,re=class extends oe{listAsyncQuestions(e,t,n={}){return this.read(Re(e,t),Sg,n)}answerAsyncQuestion(e,t,n,s,a={}){return this.mutation(`${Re(e,t)}/${encodeURIComponent(n)}/answer`,{answers:s},Vg,a)}dismissAsyncQuestions(e,t,n,s={}){return this.mutation(`${Re(e,t)}/dismiss`,{ids:n},Sg,s)}};var Se=class extends re{};export{Se as CodexlyClient,q as CodexlyEventError,A as CodexlyHttpError,I as CodexlyMutationError,T as CodexlyResponseError,bn as buildProjectAttachmentUrl,Sn as buildProjectFileDownloadUrl,Rn as buildProjectImageFileUrl,Mn as buildProjectPdfFileUrl,H as buildTaskAttachmentUrl,fn as buildWorkbenchPetAssetUrl,Pe as startAgentEventSubscription};