@bryanhu/codexly 0.37.0 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -1
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/{chunk-JHBSDMIM.js → chunk-5AELLXXE.js} +1 -1
- package/dist/{chunk-43QCECCY.js → chunk-5ULADQG3.js} +16 -16
- package/dist/{chunk-YAHXVRU3.js → chunk-63NQMTXZ.js} +1 -1
- package/dist/{chunk-ZK5H37U3.js → chunk-PFNMH4LN.js} +3 -3
- package/dist/cli.js +3 -3
- package/dist/client/index.js +2 -2
- package/dist/{command-RGXPFWPR.js → command-R5BTONU5.js} +1 -1
- package/dist/protocol/index.js +1 -1
- package/dist/providers/codex/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/web/.vite/manifest.json +114 -114
- package/dist/web/.vite/manifest.json.br +0 -0
- package/dist/web/.vite/manifest.json.gz +0 -0
- package/dist/web/assets/{agent-settings-panel-K1YqqkJL.js → agent-settings-panel-CRNaBDDS.js} +1 -1
- package/dist/web/assets/agent-settings-panel-CRNaBDDS.js.br +0 -0
- package/dist/web/assets/agent-settings-panel-CRNaBDDS.js.gz +0 -0
- package/dist/web/assets/{background-image-picker-BHqZ3SX1.js → background-image-picker-glORbeMR.js} +1 -1
- package/dist/web/assets/background-image-picker-glORbeMR.js.br +0 -0
- package/dist/web/assets/background-image-picker-glORbeMR.js.gz +0 -0
- package/dist/web/assets/{code-highlighter-DIfBIRTg.js → code-highlighter-Cg1b4nzi.js} +1 -1
- package/dist/web/assets/code-highlighter-Cg1b4nzi.js.br +5 -0
- package/dist/web/assets/code-highlighter-Cg1b4nzi.js.gz +0 -0
- package/dist/web/assets/{commit-settings-panel-B0i2Bqmu.js → commit-settings-panel-C-ALJcjd.js} +1 -1
- package/dist/web/assets/commit-settings-panel-C-ALJcjd.js.br +0 -0
- package/dist/web/assets/commit-settings-panel-C-ALJcjd.js.gz +0 -0
- package/dist/web/assets/{file-review-dialog-B3jUcADI.js → file-review-dialog-DNWufkfZ.js} +2 -2
- package/dist/web/assets/file-review-dialog-DNWufkfZ.js.br +0 -0
- package/dist/web/assets/file-review-dialog-DNWufkfZ.js.gz +0 -0
- package/dist/web/assets/{git-commit-review-Bz_j3wJo.js → git-commit-review-B3GGQldl.js} +2 -2
- package/dist/web/assets/git-commit-review-B3GGQldl.js.br +0 -0
- package/dist/web/assets/git-commit-review-B3GGQldl.js.gz +0 -0
- package/dist/web/assets/{git-history-panel-Bk5XtV-h.js → git-history-panel-BvNkd60B.js} +1 -1
- package/dist/web/assets/git-history-panel-BvNkd60B.js.br +0 -0
- package/dist/web/assets/git-history-panel-BvNkd60B.js.gz +0 -0
- package/dist/web/assets/{global-search-dialog-nP5Zoo16.js → global-search-dialog-CZnsxRQ7.js} +1 -1
- package/dist/web/assets/global-search-dialog-CZnsxRQ7.js.br +0 -0
- package/dist/web/assets/global-search-dialog-CZnsxRQ7.js.gz +0 -0
- package/dist/web/assets/{global-settings-about-Bdzkr5Fi.js → global-settings-about-CnBVv1BA.js} +1 -1
- package/dist/web/assets/global-settings-about-CnBVv1BA.js.br +0 -0
- package/dist/web/assets/global-settings-about-CnBVv1BA.js.gz +0 -0
- package/dist/web/assets/{global-settings-page-Bm6WTYej.js → global-settings-page-VbyWoa5s.js} +2 -2
- package/dist/web/assets/global-settings-page-VbyWoa5s.js.br +0 -0
- package/dist/web/assets/global-settings-page-VbyWoa5s.js.gz +0 -0
- package/dist/web/assets/{global-settings-pets-ChV29f_6.js → global-settings-pets-CAXRRfK_.js} +1 -1
- package/dist/web/assets/global-settings-pets-CAXRRfK_.js.br +0 -0
- package/dist/web/assets/global-settings-pets-CAXRRfK_.js.gz +0 -0
- package/dist/web/assets/{highlighted-body-OFNGDK62-D1VJUKau.js → highlighted-body-OFNGDK62-ClNmIb2W.js} +1 -1
- package/dist/web/assets/highlighted-body-OFNGDK62-ClNmIb2W.js.br +0 -0
- package/dist/web/assets/highlighted-body-OFNGDK62-ClNmIb2W.js.gz +0 -0
- package/dist/web/assets/{history-task-timeline-CphChwX0.js → history-task-timeline-bx1YeO4E.js} +1 -1
- package/dist/web/assets/history-task-timeline-bx1YeO4E.js.br +0 -0
- package/dist/web/assets/history-task-timeline-bx1YeO4E.js.gz +0 -0
- package/dist/web/assets/{image-preview-CZiY9KQs.js → image-preview-Cufuk95q.js} +2 -2
- package/dist/web/assets/image-preview-Cufuk95q.js.br +0 -0
- package/dist/web/assets/image-preview-Cufuk95q.js.gz +0 -0
- package/dist/web/assets/{image-preview-content-D54Quns6.js → image-preview-content-C9_jCSeW.js} +1 -1
- package/dist/web/assets/image-preview-content-C9_jCSeW.js.br +0 -0
- package/dist/web/assets/image-preview-content-C9_jCSeW.js.gz +0 -0
- package/dist/web/assets/index-DudvUciK.js +4 -0
- package/dist/web/assets/index-DudvUciK.js.br +0 -0
- package/dist/web/assets/index-DudvUciK.js.gz +0 -0
- package/dist/web/assets/initial-deps-B7SS8XxM.js +2 -0
- package/dist/web/assets/initial-deps-B7SS8XxM.js.br +0 -0
- package/dist/web/assets/initial-deps-B7SS8XxM.js.gz +0 -0
- package/dist/web/assets/{installed-skills-pane-DnKCXx4r.js → installed-skills-pane-B0a8IOZ0.js} +1 -1
- package/dist/web/assets/installed-skills-pane-B0a8IOZ0.js.br +0 -0
- package/dist/web/assets/installed-skills-pane-B0a8IOZ0.js.gz +0 -0
- package/dist/web/assets/{lazy-message-response-S2-ZO_oT.js → lazy-message-response-Q7-W7qvB.js} +2 -2
- package/dist/web/assets/lazy-message-response-Q7-W7qvB.js.br +0 -0
- package/dist/web/assets/lazy-message-response-Q7-W7qvB.js.gz +0 -0
- package/dist/web/assets/{mcp-management-pane-CAcqH6Ft.js → mcp-management-pane-BaRHPwX2.js} +1 -1
- package/dist/web/assets/mcp-management-pane-BaRHPwX2.js.br +0 -0
- package/dist/web/assets/mcp-management-pane-BaRHPwX2.js.gz +0 -0
- package/dist/web/assets/mermaid-GHXKKRXX-DywTXJ81.js +1 -0
- package/dist/web/assets/mermaid-GHXKKRXX-DywTXJ81.js.br +0 -0
- package/dist/web/assets/mermaid-GHXKKRXX-DywTXJ81.js.gz +0 -0
- package/dist/web/assets/message-assistant-directive-CaNrh5lx.js +3 -0
- package/dist/web/assets/message-assistant-directive-CaNrh5lx.js.br +0 -0
- package/dist/web/assets/message-assistant-directive-CaNrh5lx.js.gz +0 -0
- package/dist/web/assets/{message-response-D6AZoXZR.js → message-response-WYZfuphQ.js} +25 -25
- package/dist/web/assets/message-response-WYZfuphQ.js.br +0 -0
- package/dist/web/assets/message-response-WYZfuphQ.js.gz +0 -0
- package/dist/web/assets/{official-plugins-pane-CBk4rbLt.js → official-plugins-pane-KGXjJvv3.js} +1 -1
- package/dist/web/assets/official-plugins-pane-KGXjJvv3.js.br +0 -0
- package/dist/web/assets/official-plugins-pane-KGXjJvv3.js.gz +0 -0
- package/dist/web/assets/{patch-diff-viewer-nIzfWkKE.js → patch-diff-viewer-D_Ts5rez.js} +2 -2
- package/dist/web/assets/patch-diff-viewer-D_Ts5rez.js.br +0 -0
- package/dist/web/assets/patch-diff-viewer-D_Ts5rez.js.gz +0 -0
- package/dist/web/assets/{pdf-preview-Zrj4u-KR.js → pdf-preview-D46KssiK.js} +3 -3
- package/dist/web/assets/pdf-preview-D46KssiK.js.br +0 -0
- package/dist/web/assets/pdf-preview-D46KssiK.js.gz +0 -0
- package/dist/web/assets/{personalization-settings-panel-D3OqsNUV.js → personalization-settings-panel-CllzRqsG.js} +1 -1
- package/dist/web/assets/personalization-settings-panel-CllzRqsG.js.br +0 -0
- package/dist/web/assets/personalization-settings-panel-CllzRqsG.js.gz +0 -0
- package/dist/web/assets/{project-file-popup-page-7yzFqPZq.js → project-file-popup-page-CVnfABUU.js} +1 -1
- package/dist/web/assets/project-file-popup-page-CVnfABUU.js.br +0 -0
- package/dist/web/assets/project-file-popup-page-CVnfABUU.js.gz +0 -0
- package/dist/web/assets/{project-source-panel-C1tTwC1j.js → project-source-panel-Dl6nuWfg.js} +1 -1
- package/dist/web/assets/project-source-panel-Dl6nuWfg.js.br +0 -0
- package/dist/web/assets/project-source-panel-Dl6nuWfg.js.gz +0 -0
- package/dist/web/assets/{prompt-input--2KQl6SR.js → prompt-input-Ceptl3B-.js} +1 -1
- package/dist/web/assets/prompt-input-Ceptl3B-.js.br +0 -0
- package/dist/web/assets/prompt-input-Ceptl3B-.js.gz +0 -0
- package/dist/web/assets/resources-en-CzuCDOU2.js +1 -0
- package/dist/web/assets/resources-en-CzuCDOU2.js.br +0 -0
- package/dist/web/assets/resources-en-CzuCDOU2.js.gz +0 -0
- package/dist/web/assets/{scheduled-task-date-time-picker-BVYVGT78.js → scheduled-task-date-time-picker-CpT4cTpn.js} +1 -1
- package/dist/web/assets/scheduled-task-date-time-picker-CpT4cTpn.js.br +0 -0
- package/dist/web/assets/scheduled-task-date-time-picker-CpT4cTpn.js.gz +0 -0
- package/dist/web/assets/{scheduled-tasks-container-CQkfAgKW.js → scheduled-tasks-container-CRV2di5K.js} +2 -2
- package/dist/web/assets/scheduled-tasks-container-CRV2di5K.js.br +0 -0
- package/dist/web/assets/scheduled-tasks-container-CRV2di5K.js.gz +0 -0
- package/dist/web/assets/{shiki-bundle-COC_j-nR.js → shiki-bundle-C942xz2H.js} +1 -1
- package/dist/web/assets/shiki-bundle-C942xz2H.js.br +2 -0
- package/dist/web/assets/shiki-bundle-C942xz2H.js.gz +0 -0
- package/dist/web/assets/{skills-market-container-_ME3wZFP.js → skills-market-container--8qzUyrx.js} +2 -2
- package/dist/web/assets/skills-market-container--8qzUyrx.js.br +0 -0
- package/dist/web/assets/skills-market-container--8qzUyrx.js.gz +0 -0
- package/dist/web/assets/{split-workspace-menu-content-CkpZv1Nz.js → split-workspace-menu-content-CAL4JQt9.js} +1 -1
- package/dist/web/assets/split-workspace-menu-content-CAL4JQt9.js.br +5 -0
- package/dist/web/assets/split-workspace-menu-content-CAL4JQt9.js.gz +0 -0
- package/dist/web/assets/{third-party-marketplace-pane-D3AJNSoF.js → third-party-marketplace-pane-Can5ly44.js} +1 -1
- package/dist/web/assets/third-party-marketplace-pane-Can5ly44.js.br +0 -0
- package/dist/web/assets/third-party-marketplace-pane-Can5ly44.js.gz +0 -0
- package/dist/web/assets/{workbench-inspector-changes-DSbBqbXe.js → workbench-inspector-changes-D2ZiHtIT.js} +1 -1
- package/dist/web/assets/workbench-inspector-changes-D2ZiHtIT.js.br +0 -0
- package/dist/web/assets/workbench-inspector-changes-D2ZiHtIT.js.gz +0 -0
- package/dist/web/assets/{workbench-pet-canvas-Ct1J6Adp.js → workbench-pet-canvas-DuBL3mip.js} +1 -1
- package/dist/web/assets/workbench-pet-canvas-DuBL3mip.js.br +0 -0
- package/dist/web/assets/workbench-pet-canvas-DuBL3mip.js.gz +0 -0
- package/dist/web/assets/workbench-shell-CfN-sr8U.js +16 -0
- package/dist/web/assets/workbench-shell-CfN-sr8U.js.br +0 -0
- package/dist/web/assets/workbench-shell-CfN-sr8U.js.gz +0 -0
- package/dist/web/index.html +2 -2
- package/dist/web/index.html.br +0 -0
- package/dist/web/index.html.gz +0 -0
- package/package.json +1 -1
- package/dist/web/assets/agent-settings-panel-K1YqqkJL.js.br +0 -0
- package/dist/web/assets/agent-settings-panel-K1YqqkJL.js.gz +0 -0
- package/dist/web/assets/background-image-picker-BHqZ3SX1.js.br +0 -0
- package/dist/web/assets/background-image-picker-BHqZ3SX1.js.gz +0 -0
- package/dist/web/assets/code-highlighter-DIfBIRTg.js.br +0 -0
- package/dist/web/assets/code-highlighter-DIfBIRTg.js.gz +0 -0
- package/dist/web/assets/commit-settings-panel-B0i2Bqmu.js.br +0 -0
- package/dist/web/assets/commit-settings-panel-B0i2Bqmu.js.gz +0 -0
- package/dist/web/assets/file-review-dialog-B3jUcADI.js.br +0 -0
- package/dist/web/assets/file-review-dialog-B3jUcADI.js.gz +0 -0
- package/dist/web/assets/git-commit-review-Bz_j3wJo.js.br +0 -0
- package/dist/web/assets/git-commit-review-Bz_j3wJo.js.gz +0 -0
- package/dist/web/assets/git-history-panel-Bk5XtV-h.js.br +0 -0
- package/dist/web/assets/git-history-panel-Bk5XtV-h.js.gz +0 -0
- package/dist/web/assets/global-search-dialog-nP5Zoo16.js.br +0 -0
- package/dist/web/assets/global-search-dialog-nP5Zoo16.js.gz +0 -0
- package/dist/web/assets/global-settings-about-Bdzkr5Fi.js.br +0 -0
- package/dist/web/assets/global-settings-about-Bdzkr5Fi.js.gz +0 -0
- package/dist/web/assets/global-settings-page-Bm6WTYej.js.br +0 -0
- package/dist/web/assets/global-settings-page-Bm6WTYej.js.gz +0 -0
- package/dist/web/assets/global-settings-pets-ChV29f_6.js.br +0 -0
- package/dist/web/assets/global-settings-pets-ChV29f_6.js.gz +0 -0
- package/dist/web/assets/highlighted-body-OFNGDK62-D1VJUKau.js.br +0 -0
- package/dist/web/assets/highlighted-body-OFNGDK62-D1VJUKau.js.gz +0 -0
- package/dist/web/assets/history-task-timeline-CphChwX0.js.br +0 -0
- package/dist/web/assets/history-task-timeline-CphChwX0.js.gz +0 -0
- package/dist/web/assets/image-preview-CZiY9KQs.js.br +0 -4
- package/dist/web/assets/image-preview-CZiY9KQs.js.gz +0 -0
- package/dist/web/assets/image-preview-content-D54Quns6.js.br +0 -0
- package/dist/web/assets/image-preview-content-D54Quns6.js.gz +0 -0
- package/dist/web/assets/index-CV7PO8FJ.js +0 -4
- package/dist/web/assets/index-CV7PO8FJ.js.br +0 -0
- package/dist/web/assets/index-CV7PO8FJ.js.gz +0 -0
- package/dist/web/assets/initial-deps-DElr8S4a.js +0 -2
- package/dist/web/assets/initial-deps-DElr8S4a.js.br +0 -0
- package/dist/web/assets/initial-deps-DElr8S4a.js.gz +0 -0
- package/dist/web/assets/installed-skills-pane-DnKCXx4r.js.br +0 -0
- package/dist/web/assets/installed-skills-pane-DnKCXx4r.js.gz +0 -0
- package/dist/web/assets/lazy-message-response-S2-ZO_oT.js.br +0 -0
- package/dist/web/assets/lazy-message-response-S2-ZO_oT.js.gz +0 -0
- package/dist/web/assets/mcp-management-pane-CAcqH6Ft.js.br +0 -0
- package/dist/web/assets/mcp-management-pane-CAcqH6Ft.js.gz +0 -0
- package/dist/web/assets/mermaid-GHXKKRXX-CRcc_eOq.js +0 -1
- package/dist/web/assets/mermaid-GHXKKRXX-CRcc_eOq.js.br +0 -1
- package/dist/web/assets/mermaid-GHXKKRXX-CRcc_eOq.js.gz +0 -0
- package/dist/web/assets/message-assistant-directive-7AH4Pn2V.js +0 -3
- package/dist/web/assets/message-assistant-directive-7AH4Pn2V.js.br +0 -0
- package/dist/web/assets/message-assistant-directive-7AH4Pn2V.js.gz +0 -0
- package/dist/web/assets/message-response-D6AZoXZR.js.br +0 -0
- package/dist/web/assets/message-response-D6AZoXZR.js.gz +0 -0
- package/dist/web/assets/official-plugins-pane-CBk4rbLt.js.br +0 -0
- package/dist/web/assets/official-plugins-pane-CBk4rbLt.js.gz +0 -0
- package/dist/web/assets/patch-diff-viewer-nIzfWkKE.js.br +0 -0
- package/dist/web/assets/patch-diff-viewer-nIzfWkKE.js.gz +0 -0
- package/dist/web/assets/pdf-preview-Zrj4u-KR.js.br +0 -0
- package/dist/web/assets/pdf-preview-Zrj4u-KR.js.gz +0 -0
- package/dist/web/assets/personalization-settings-panel-D3OqsNUV.js.br +0 -0
- package/dist/web/assets/personalization-settings-panel-D3OqsNUV.js.gz +0 -0
- package/dist/web/assets/project-file-popup-page-7yzFqPZq.js.br +0 -0
- package/dist/web/assets/project-file-popup-page-7yzFqPZq.js.gz +0 -0
- package/dist/web/assets/project-source-panel-C1tTwC1j.js.br +0 -0
- package/dist/web/assets/project-source-panel-C1tTwC1j.js.gz +0 -0
- package/dist/web/assets/prompt-input--2KQl6SR.js.br +0 -0
- package/dist/web/assets/prompt-input--2KQl6SR.js.gz +0 -0
- package/dist/web/assets/resources-en-CNO1wrxl.js +0 -1
- package/dist/web/assets/resources-en-CNO1wrxl.js.br +0 -0
- package/dist/web/assets/resources-en-CNO1wrxl.js.gz +0 -0
- package/dist/web/assets/scheduled-task-date-time-picker-BVYVGT78.js.br +0 -0
- package/dist/web/assets/scheduled-task-date-time-picker-BVYVGT78.js.gz +0 -0
- package/dist/web/assets/scheduled-tasks-container-CQkfAgKW.js.br +0 -0
- package/dist/web/assets/scheduled-tasks-container-CQkfAgKW.js.gz +0 -0
- package/dist/web/assets/shiki-bundle-COC_j-nR.js.br +0 -3
- package/dist/web/assets/shiki-bundle-COC_j-nR.js.gz +0 -0
- package/dist/web/assets/skills-market-container-_ME3wZFP.js.br +0 -0
- package/dist/web/assets/skills-market-container-_ME3wZFP.js.gz +0 -0
- package/dist/web/assets/split-workspace-menu-content-CkpZv1Nz.js.br +0 -0
- package/dist/web/assets/split-workspace-menu-content-CkpZv1Nz.js.gz +0 -0
- package/dist/web/assets/third-party-marketplace-pane-D3AJNSoF.js.br +0 -0
- package/dist/web/assets/third-party-marketplace-pane-D3AJNSoF.js.gz +0 -0
- package/dist/web/assets/workbench-inspector-changes-DSbBqbXe.js.br +0 -0
- package/dist/web/assets/workbench-inspector-changes-DSbBqbXe.js.gz +0 -0
- package/dist/web/assets/workbench-pet-canvas-Ct1J6Adp.js.br +0 -0
- package/dist/web/assets/workbench-pet-canvas-Ct1J6Adp.js.gz +0 -0
- package/dist/web/assets/workbench-shell-CP0njkD8.js +0 -16
- package/dist/web/assets/workbench-shell-CP0njkD8.js.br +0 -0
- package/dist/web/assets/workbench-shell-CP0njkD8.js.gz +0 -0
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {createRequire}from'node:module';import {i,m,l,a,b,f,k as k$1,j as j$3,g,h as h$1,c}from'./chunk-PQPYP3AR.js';import {i as i$2,j as j$2,h}from'./chunk-
|
|
3
|
-
var V={version:"0.37.
|
|
2
|
+
import {createRequire}from'node:module';import {i,m,l,a,b,f,k as k$1,j as j$3,g,h as h$1,c}from'./chunk-PQPYP3AR.js';import {i as i$2,j as j$2,h}from'./chunk-PFNMH4LN.js';import'./chunk-5AELLXXE.js';import {u,i as i$1,p,x,v as v$1,j as j$1}from'./chunk-5ULADQG3.js';import'./chunk-XJOOU7A5.js';import'./chunk-3WW7LK46.js';import {rd,ia}from'./chunk-63NQMTXZ.js';import'./chunk-IV4NRE4S.js';import'./chunk-YXJGRSCL.js';import {homedir,tmpdir}from'os';import {join,dirname,parse,basename,win32,resolve}from'path';import {fileURLToPath}from'url';import {mkdtemp,rm,readFile,access}from'fs/promises';import {spawn}from'child_process';import {constants,existsSync}from'fs';import {createInterface}from'readline/promises';createRequire(import.meta.url);
|
|
3
|
+
var V={version:"0.37.1"};var He=2*6e4;function me(e,t=process.platform,r=process.execPath,n=false){let s=join(dirname(r),"..","lib","node_modules","npm","bin","npm-cli.js"),i=t==="win32"?{args:[win32.join(win32.dirname(r),"node_modules","npm","bin","npm-cli.js"),...e],command:r}:existsSync(s)?{args:[s,...e],command:r}:{args:e,command:"npm"};if(!n)return i;if(t==="win32")throw new Error("Elevated npm updates are not supported on Windows");return {args:["--",i.command,...i.args],command:"sudo"}}async function ge(e,t=process.platform){if(t!=="linux"||process.getuid?.()===0)return false;try{return await access(dirname(e),constants.W_OK),!1}catch{return true}}async function fe(e,t={}){let r=me(e,process.platform,process.execPath,t.elevated),n=t.elevated===true;return new Promise((s,i)=>{let o=spawn(r.command,r.args,{shell:false,signal:t.signal,stdio:n?["inherit","pipe","inherit"]:["ignore","pipe","pipe"],timeout:He,windowsHide:true}),l="",p="";o.stdout?.setEncoding("utf8"),o.stdout?.on("data",a=>{l+=a;}),o.stderr?.setEncoding("utf8"),o.stderr?.on("data",a=>{p+=a;}),o.once("error",i),o.once("close",(a,g)=>{if(a===0){s(l);return}let u=p.trim();i(new Error(`npm command failed${g===null?` with exit code ${String(a)}`:` with signal ${g}`}${u===""?"":`: ${u}`}`));});})}var ye="https://registry.npmmirror.com",_="https://registry.npmjs.org",Ge=3e3;async function L(e){e?.throwIfAborted();let t=new AbortController,r=AbortSignal.any([t.signal,AbortSignal.timeout(Ge),...e===void 0?[]:[e]]),n=[_,ye];try{let s=await Promise.any(n.map(async i=>{let o=await fetch(`${i}/@openai/codex`,{method:"HEAD",headers:{"user-agent":ia},signal:r});if(!o.ok)throw new Error(`Registry probe returned ${String(o.status)}`);return i}));return e?.throwIfAborted(),s===_?n:[ye,_]}catch{return e?.throwIfAborted(),n}finally{t.abort();}}async function $(e,t,r){let n=r??await L(t);t?.throwIfAborted();try{return await e(n[0])}catch{return t?.throwIfAborted(),e(n[1])}}function we(e,t,r={},n){return $(s=>e([...t.slice(0,1),`--registry=${s}`,`--@openai:registry=${s}`,`--@bryanhu:registry=${s}`,"--fetch-retries=0","--fetch-timeout=30000",...t.slice(1)],r),r.signal,n)}var j="@bryanhu/codexly",Je="0.1.0",Ke="https://raw.githubusercontent.com/BryanHoo/Codexly/v",be=1e4,Ze=32*1024,et=5*6e4,tt=/^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-((?:(?:0|[1-9][0-9]*)|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:(?:0|[1-9][0-9]*)|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/u,v=class extends Error{constructor(r,n){super(n);this.code=r;this.name="AppUpdateError";}code},R=class extends Error{};function E(e){let t=tt.exec(e);if(t!==null)return {core:[t[1]??"0",t[2]??"0",t[3]??"0"],prerelease:t[4]?.split(".")??[]}}function xe(e,t){return e.length!==t.length?e.length-t.length:e===t?0:e<t?-1:1}function rt(e,t){if(e.length===0||t.length===0)return e.length===t.length?0:e.length===0?1:-1;for(let r=0;r<Math.max(e.length,t.length);r+=1){let n=e[r],s=t[r];if(n===void 0||s===void 0)return n===s?0:n===void 0?-1:1;if(n===s)continue;let i=/^\d+$/u.test(n),o=/^\d+$/u.test(s);return i&&o?xe(n,s):i?-1:o?1:n<s?-1:1}return 0}function nt(e,t){let r=Buffer.from(e,"utf8");return r.byteLength<=t?e:new TextDecoder("utf-8",{fatal:false}).decode(r.subarray(0,t)).trimEnd()}function ot(e,t){let r=e.split(/\r?\n/u),n=r.findIndex(l=>l.startsWith(`## [${t}]`));if(n<0)return;let s=r.slice(n+1).findIndex(l=>/^## \[[^\]]+\]/u.test(l)),i=s<0?r.length:n+1+s,o=r.slice(n+1,i).join(`
|
|
4
4
|
`).trim();return o===""?void 0:nt(o,Ze)}function S(e,t){let r=E(e),n=E(t);if(r===void 0||n===void 0)return false;for(let s=0;s<r.core.length;s+=1){let i=r.core[s],o=n.core[s];if(i===void 0||o===void 0)return false;let l=xe(i,o);if(l!==0)return l>0}return rt(r.prerelease,n.prerelease)>0}async function st(){return $(it)}async function it(e){let t=await fetch(`${e}/-/package/${encodeURIComponent(j)}/dist-tags`,{headers:{accept:"application/json","user-agent":ia},signal:AbortSignal.timeout(be)});if(t.status===401||t.status===404)throw new R("Package has not been published");if(!t.ok)throw new Error(`Registry returned ${String(t.status)}`);let r=await t.json();if(typeof r!="object"||r===null||!("latest"in r)||typeof r.latest!="string"||E(r.latest)===void 0)throw new Error("Registry returned an invalid latest version");return r.latest}async function at(e){let t=await fetch(`${Ke}${e}/CHANGELOG.md`,{headers:{accept:"text/markdown","user-agent":ia},signal:AbortSignal.timeout(be)});if(!t.ok)throw new Error(`GitHub returned ${String(t.status)}`);return t.text()}async function ct(){let e=dirname(fileURLToPath(import.meta.url)),t=parse(e).root;for(;e!==t;){try{let r=JSON.parse(await readFile(join(e,"package.json"),"utf8"));if(typeof r=="object"&&r!==null&&"name"in r&&r.name===j)return e}catch{}e=dirname(e);}throw new Error("Unable to locate the installed Codexly package")}function lt(e){let t=dirname(dirname(e));if(basename(t)!=="node_modules")throw new Error("Codexly is not installed as a global npm package");let r=dirname(t);return basename(r)==="lib"?dirname(r):r}function pt(e,t){let r=JSON.parse(e),s=(Array.isArray(r)?r:[])[0];if(typeof s!="object"||s===null||!("filename"in s)||typeof s.filename!="string"||basename(s.filename)!==s.filename)throw new Error("npm pack returned an invalid archive name");return resolve(t,s.filename)}async function he(e,t,r,n){let s=await r(["pack","--ignore-scripts","--json","--pack-destination",t,e],{signal:n});return pt(s,t)}async function dt(e,t={}){let r=t.runNpm??fe,n,s=async(c,m)=>(n??=L(m?.signal),we(r,c,m,await n)),i=t.currentPackageRoot??await ct(),o=`--prefix=${lt(i)}`,l=await mkdtemp(join(tmpdir(),"codexly-update-")),p=new AbortController,a=()=>{p.abort(new Error("Codexly update interrupted"));},g,u=false,y=false;process.once("SIGINT",a),process.once("SIGTERM",a);try{u=await(t.requiresElevation??ge)(i),t.onProgress?.({percent:10,phase:"backing-up"}),g=await he(i,l,r,p.signal),t.onProgress?.({percent:30,phase:"downloading"});let c=await he(`${j}@${e}`,l,s,p.signal);if(p.signal.aborted)throw p.signal.reason;t.onProgress?.({percent:80,phase:"installing"}),y=!0,await s(["install","--global",o,c],{elevated:u,signal:p.signal});}catch(c){if(y&&g!==void 0)try{t.onProgress?.({percent:90,phase:"rolling-back"}),await s(["install","--global",o,g],{elevated:u});}catch(m){let d=c instanceof Error?c.message:String(c),f=m instanceof Error?m.message:String(m);throw new Error(`Codexly update failed: ${d}; rollback failed: ${f}`,{cause:m})}throw c}finally{process.off("SIGINT",a),process.off("SIGTERM",a),await rm(l,{force:true,recursive:true});}}async function ut(e,t){await dt(e,t===void 0?{}:{onProgress:t});}function k(e){let t=e.fetchChangelog??at,r=e.fetchLatestVersion??st,n=e.runNpmInstall??ut,s,i=null,o,l,p,a,g=async()=>{try{let c=await r();if(E(c)===void 0)throw new Error("Invalid version");return c}catch(c){if(c instanceof R&&e.appVersion===Je)return e.appVersion;throw new v("UPDATE_CHECK_FAILED","Failed to check for Codexly updates")}},u=async(c=false)=>(c&&(await l?.catch(()=>{}),o=void 0),o!==void 0&&Date.now()<o.expiresAt?o.version:(l??=g().then(m=>(o={version:m,expiresAt:Date.now()+et},m)).finally(()=>{l=void 0;}),l)),y=c=>{if(p?.version===c)return Promise.resolve(p.text);if(a?.version===c)return a.promise;let m=t(c).then(d=>{let f=ot(d,c)??null;return a?.promise===m&&(p={version:c,text:f}),f}).finally(()=>{a?.promise===m&&(a=void 0);});return a={version:c,promise:m},m};return {async install(c,m){let d=h=>{i=h,m?.(h);};d({percent:5,phase:"checking"});let f=await u(true);if(!(S(c,e.appVersion)&&!S(c,f))||!S(f,e.appVersion))throw i=null,new v("UPDATE_NOT_AVAILABLE","The requested update is not available");try{await n(f,d);}catch{throw new v("UPDATE_INSTALL_FAILED","Failed to install the Codexly update")}return s=f,d({percent:100,phase:"completed"}),{appVersion:e.appVersion,codexVersion:e.codexVersion,latestVersion:f,releaseNotes:null,status:"restart-required",updateAvailable:false}},readProgress(){return Promise.resolve({progress:i})},async read(){let c;try{c=await u();}catch{return {appVersion:e.appVersion,codexVersion:e.codexVersion,latestVersion:null,releaseNotes:null,status:"check-failed",updateAvailable:false}}if(s===c)return {appVersion:e.appVersion,codexVersion:e.codexVersion,latestVersion:c,releaseNotes:null,status:"restart-required",updateAvailable:false};let m=S(c,e.appVersion),d=null;if(m)try{d=await y(c);}catch{d=null;}return {appVersion:e.appVersion,codexVersion:e.codexVersion,latestVersion:c,releaseNotes:d,status:m?"available":"current",updateAvailable:m}}}}function mt(e){return e instanceof Error&&"code"in e&&e.code==="EADDRINUSE"}async function ve(e,t,r){for(let n=r;n<=65535;n+=1)try{return await e.listen({host:t,port:n}),n}catch(s){if(!mt(s)||n===65535)throw s}throw new Error(`\u7AEF\u53E3 ${String(r)} \u5230 ${String(65535)} \u5747\u4E0D\u53EF\u7528`)}var D="CODEXLY_STARTUP_UPDATE_APPLIED";function Ae(e){let t=k({appVersion:e,codexVersion:"not-started"});return {check:async()=>{let r=await t.read();return {latestVersion:r.latestVersion,status:r.status==="available"?"available":r.status==="check-failed"?"check-failed":"current"}},install:async(r,n)=>{await t.install(r,n);}}}function Ce(e){let t={"backing-up":"\u6B63\u5728\u5907\u4EFD\u5F53\u524D\u7248\u672C",checking:"\u6B63\u5728\u786E\u8BA4\u6700\u65B0\u7248\u672C",completed:"\u66F4\u65B0\u5B89\u88C5\u5B8C\u6210",downloading:"\u6B63\u5728\u4E0B\u8F7D\u66F4\u65B0\u5305",installing:"\u6B63\u5728\u5B89\u88C5\u65B0\u7248\u672C","rolling-back":"\u5B89\u88C5\u5931\u8D25\uFF0C\u6B63\u5728\u6062\u590D\u539F\u7248\u672C"},r=Math.round(e.percent/5);return `[${`${"\u2588".repeat(r)}${"\u2591".repeat(20-r)}`}] ${String(e.percent)}% ${t[e.phase]}`}async function Se(e,t){if(!process.stdin.isTTY||!process.stdout.isTTY)return false;let r=createInterface({input:process.stdin,output:process.stdout});try{let s=(await r.question(`\u53D1\u73B0 Codexly \u65B0\u7248\u672C ${t}\uFF08\u5F53\u524D ${e}\uFF09\uFF0C\u662F\u5426\u66F4\u65B0\u540E\u542F\u52A8\uFF1F[y/N] `)).trim().toLocaleLowerCase();return s==="y"||s==="yes"}finally{r.close();}}async function Re(e){let t=process.argv[1];if(t===void 0)throw new Error("\u65E0\u6CD5\u786E\u5B9A Codexly CLI \u5165\u53E3");return new Promise((r,n)=>{let s=spawn(process.execPath,[t,...e],{env:{...process.env,[D]:"1"},shell:false,stdio:"inherit",windowsHide:true});s.once("error",n),s.once("exit",(i,o)=>{if(o!==null){n(new Error(`\u66F4\u65B0\u540E\u7684 Codexly \u542F\u52A8\u8FDB\u7A0B\u88AB\u4FE1\u53F7 ${o} \u7EC8\u6B62`));return}r(i??1);});})}var wt=500;function ht(e,t){return t==="darwin"?[{args:[e],executable:"open"}]:t==="win32"?[{args:["/c","start","",e],executable:"cmd.exe"}]:[{args:[e],executable:"xdg-open"},{args:["open",e],executable:"gio"},{args:[e],executable:"sensible-browser"}]}function Pt(e){return new Promise((t,r)=>{let n=spawn(e.executable,[...e.args],{detached:true,shell:false,stdio:"ignore"}),s=false,i,o=l=>{s||(s=true,i!==void 0&&clearTimeout(i),l());};n.once("error",l=>{o(()=>{r(l);});}),n.once("spawn",()=>{i=setTimeout(()=>{o(()=>{n.unref(),t();});},wt);}),n.once("exit",(l,p)=>{if(l===0){o(t);return}let a=p?`signal ${p}`:`code ${String(l)}`;o(()=>{r(Object.assign(new Error(`${e.executable} exited with ${a}`),{code:"LAUNCHER_EXIT"}));});});})}async function Ee(e,t={}){let r=t.platform??process.platform,n=ht(e,r),s=t.launch??Pt,i;for(let o of n)try{await s(o);return}catch(l){if(r!=="linux"&&l.code!=="ENOENT")throw l;i=l;}throw new Error("No supported browser launcher is installed",{cause:i})}var ke=Ae(V.version),xt={appVersion:V.version,checkAppUpdate:ke.check,checkCodexVersion:j$1,confirmAppUpdate:Se,createProjectRepository:({client:e,projection:t})=>new v$1(e,t),createPetProvider:x,createStateRepository:e=>j$2.open(e),createRuntimeProvider:p,createServer:async e=>{let t=await i$2({...e});return {close:()=>t.close(),listen:r=>t.listen(r)}},generateLanPairingCode:l,listLanAccessUrls:m,locateCodexBinary:i$1,nodeVersion:process.versions.node,openBrowser:Ee,installAppUpdate:ke.install,restartAfterUpdate:Re,startCodexAppServer:u,webRoot:fileURLToPath(new URL("../dist/web",import.meta.url))};function vt(e){let t=Number(e.split(".")[0]);if(!Number.isInteger(t)||t<24)throw new Error(`\u9700\u8981 Node.js 24.0.0 \u6216\u66F4\u9AD8\u7248\u672C\uFF0C\u5F53\u524D\u7248\u672C\u4E3A ${e}`)}function Ie(e){return e.codexHome??process.env.CODEX_HOME??join(homedir(),".codex")}function At(e){if(!e.writable)throw new Error("SQLite database is not writable");if(e.migrationVersion<1)throw new Error("SQLite migrations are not applied");if(e.integrityCheck!=="ok")throw new Error(`SQLite integrity_check failed: ${e.integrityCheck}`);if(e.journalMode.toLocaleLowerCase()!=="wal")throw new Error(`SQLite journal_mode must be WAL; found ${e.journalMode}`);if(!e.foreignKeys||e.synchronous!=="normal"||e.busyTimeout!==5e3)throw new Error("SQLite PRAGMA configuration is invalid")}async function Ct(e,t,r){let n=c(e,new Set(["--codex-bin","--codex-home"]));vt(t.nodeVersion),r.success(`Node.js ${t.nodeVersion}`);let s=await t.locateCodexBinary(n.codexBin?{explicitPath:n.codexBin}:{}),i=await t.checkCodexVersion(s.path);r.success(`Codex ${i.version} (${s.path})`);let o=Ie(n),l=await t.createStateRepository(join(o,"codexly","state.sqlite3"));try{let p=await l.diagnose();At(p),r.success(`SQLite \u53EF\u5199 (${join(o,"codexly","state.sqlite3")})`),r.success(`SQLite migration ${String(p.migrationVersion)}`),r.success(`SQLite integrity_check ${p.integrityCheck}`),r.success(`SQLite journal_mode ${p.journalMode}`),r.success(`SQLite PRAGMA foreign_keys=ON synchronous=NORMAL busy_timeout=${String(p.busyTimeout)}`);}finally{await l.close();}return 0}async function Te(e,t,r,n,s){let i=s?.environment??process.env,o=s?.options??f(e,i);if(o.sessionTtl!==void 0&&o.lan!==true)throw new Error("--session-ttl \u53EA\u80FD\u4E0E --lan \u4E00\u8D77\u4F7F\u7528");if(o.lanPassword!==void 0&&o.lan!==true)throw new Error("--lan-password \u53EA\u80FD\u4E0E --lan \u4E00\u8D77\u4F7F\u7528");o.lanPassword!==void 0&&k$1(o.lanPassword);let l=o.allowedHosts?.map(h),p=o.port??3210,a=o.sessionTtl?j$3(o.sessionTtl):void 0,g$1=o.lan!==true?void 0:{pairingCode:o.lanPassword??t.generateLanPairingCode(),...a===void 0?{}:{sessionTtlMs:a}};if(!s?.background&&process.env[D]!=="1"){let f=await t.checkAppUpdate();if(f.status==="check-failed")n.warning("\u65E0\u6CD5\u68C0\u67E5 Codexly \u66F4\u65B0\uFF0C\u5C06\u7EE7\u7EED\u542F\u52A8\u5F53\u524D\u7248\u672C\u3002");else if(f.status==="available"&&f.latestVersion!==null){if(await t.confirmAppUpdate(t.appVersion,f.latestVersion))return n.info(`\u6B63\u5728\u66F4\u65B0 Codexly \u5230 ${f.latestVersion}...`),await t.installAppUpdate(f.latestVersion,h=>{n.info(Ce(h));}),n.success(`Codexly \u5DF2\u66F4\u65B0\u5230 ${f.latestVersion}\uFF0C\u6B63\u5728\u91CD\u65B0\u542F\u52A8\u3002`),t.restartAfterUpdate(["start",...e]);n.info("\u5DF2\u8DF3\u8FC7\u66F4\u65B0\uFF0C\u7EE7\u7EED\u542F\u52A8\u5F53\u524D\u7248\u672C\u3002");}}let u=r?null:g(),y=r??u?.signal;if(!y)throw new Error("Shutdown signal is unavailable");let c,m,d;try{let f=Ie(o),A=homedir(),h={...i,...o.codexHome?{CODEX_HOME:o.codexHome}:{}};d=await t.createStateRepository(join(f,"codexly","state.sqlite3"));let B=d,H=()=>{let w=()=>t.startCodexAppServer({appVersion:t.appVersion,cwd:A,env:h,...o.codexBin?{binaryPath:o.codexBin}:{}});return B.withScheduledTaskLock===void 0?w():B.withScheduledTaskLock(w)};c=await H();let N=t.createProjectRepository({client:c.client,projection:d}),I=await d.readProjectSourceMigration();I.completed||await N.migrateLegacyProjects({recoverUnassigned:I.recoverUnassigned}),await N.synchronize(),I.completed||await d.completeProjectSourceMigration();let Oe=d,Ve=await t.createRuntimeProvider({codexHome:f,client:c.client,modelCatalogRuntimeFactory:H,readTaskTitleModel:async()=>(await Oe.readGlobalSettings())?.commitMessageModel??rd}),_e=t.createPetProvider({codexHome:f}),U=k({appVersion:t.appVersion,codexVersion:c.version.version});m=await t.createServer({...s?.background?{logDestination:{write:n.plain}}:{},...g$1===void 0?{}:{access:g$1},...l===void 0?{}:{allowedHosts:l},projectRepository:N,providerConnectionRepository:d,provider:Ve,preloadModelCatalog:!0,petProvider:_e,installAppUpdate:U.install,readAppInfo:U.read,readAppUpdateProgress:U.readProgress,queueRepository:d,scheduledTaskAttachmentRepository:d,scheduledTaskRepository:d,submissionRepository:d,asyncQuestionRepository:d,projectTodoRepository:d,settingsRepository:d,staticRoot:t.webRoot,standaloneCwd:o.workspaceRoots?.[0]??A,...o.workspaceRoots===void 0?{}:{workspaceRoots:o.workspaceRoots}});let G=o.lan===!0?"0.0.0.0":"127.0.0.1",P=await ve(m,G,p);if(P!==p&&n.warning(`\u7AEF\u53E3 ${String(p)} \u5DF2\u88AB\u5360\u7528\uFF0C\u5DF2\u81EA\u52A8\u5207\u6362\u5230\u7AEF\u53E3 ${String(P)}\u3002`),await s?.onReady({host:G,port:P}),n.success("Codexly \u5DF2\u542F\u52A8"),g$1!==void 0){let w=t.listLanAccessUrls(P);n.warning("\u5C40\u57DF\u7F51\u6A21\u5F0F\u4F7F\u7528\u672A\u52A0\u5BC6\u7684 HTTP\uFF0C\u8BF7\u4EC5\u5728\u53EF\u4FE1\u7F51\u7EDC\u4E2D\u4F7F\u7528\u3002"),w.length===0?n.warning("\u672A\u627E\u5230\u53EF\u7528\u7684\u5C40\u57DF\u7F51 IPv4 \u5730\u5740\uFF0C\u670D\u52A1\u4ECD\u5728\u8FD0\u884C\u3002"):n.info(`\u5C40\u57DF\u7F51\u8BBF\u95EE\u5730\u5740:
|
|
5
5
|
${w.map(O=>` ${O}`).join(`
|
|
6
|
-
`)}`),o.lanPassword===void 0?n.info(`\u914D\u5BF9\u7801: ${g$1.pairingCode}`):n.info("\u5DF2\u4F7F\u7528\u81EA\u5B9A\u4E49\u8BBF\u95EE\u5BC6\u7801\uFF08\u4E0D\u4F1A\u5728\u7EC8\u7AEF\u56DE\u663E\uFF09\u3002"),n.info(o.sessionTtl===void 0?"\u4F1A\u8BDD\u6709\u6548\u671F: \u6C38\u4E0D\u8FC7\u671F\uFF08\u4EC5\u5F53\u524D\u8FDB\u7A0B\uFF09":`\u4F1A\u8BDD\u6709\u6548\u671F: ${o.sessionTtl}\uFF08\u56FA\u5B9A\u671F\u9650\uFF0C\u4E0D\u81EA\u52A8\u7EED\u671F\uFF09`),n.info(o.lanPassword===void 0?"\u91CD\u542F Codexly \u540E\uFF0C\u5F53\u524D\u914D\u5BF9\u7801\u548C\u6240\u6709\u5C40\u57DF\u7F51\u4F1A\u8BDD\u5C06\u5931\u6548\u3002":"\u91CD\u542F Codexly \u540E\uFF0C\u6240\u6709\u5C40\u57DF\u7F51\u4F1A\u8BDD\u5C06\u5931\u6548\uFF1B\u56FA\u5B9A\u8BBF\u95EE\u5BC6\u7801\u4FDD\u6301\u6709\u6548\u3002");}else n.info(`\u8BBF\u95EE\u5730\u5740: http://127.0.0.1:${String(P)}`);if(!s?.background&&o.lan!==!0&&o.noOpen!==!0)try{await t.openBrowser(`http://127.0.0.1:${String(P)}`);}catch(w){let O=w instanceof Error?w.message:String(w);n.warning(`\u65E0\u6CD5\u81EA\u52A8\u6253\u5F00\u6D4F\u89C8\u5668\uFF0C\u8BF7\u624B\u52A8\u8BBF\u95EE\u4E0A\u8FF0\u5730\u5740\u3002\u539F\u56E0: ${O}`);}let C=await Promise.race([c.waitForExit().then(w=>({exit:w,type:"process-exit"})),h$1(y).then(()=>({type:"shutdown"}))]);if(C.type==="process-exit"){let w=C.exit.signal?`\u4FE1\u53F7 ${C.exit.signal}`:`\u9000\u51FA\u7801 ${String(C.exit.code)}`;throw new Error(`Codex App Server \u5728 Codexly \u5173\u95ED\u524D\u610F\u5916\u9000\u51FA\uFF0C${w}`)}return 0}finally{try{await m?.close();}finally{try{await d?.close();}finally{try{await c?.close();}finally{u?.cleanup();}}}}}async function Ue(e,t={}){let r=t.dependencies??xt,n=t.stdout??(u=>process.stdout.write(u)),s=t.stderr??(u=>process.stderr.write(u)),i$1=t.color??(process.stdout.isTTY&&process.env.NO_COLOR===void 0),o=i(n,s,i$1),[l,...p]=e,a$1=l??"start",g=p[0]==="--"?p.slice(1):p;try{if(a$1==="autostart"){let{runAutostartCommand:u}=await import('./command-
|
|
6
|
+
`)}`),o.lanPassword===void 0?n.info(`\u914D\u5BF9\u7801: ${g$1.pairingCode}`):n.info("\u5DF2\u4F7F\u7528\u81EA\u5B9A\u4E49\u8BBF\u95EE\u5BC6\u7801\uFF08\u4E0D\u4F1A\u5728\u7EC8\u7AEF\u56DE\u663E\uFF09\u3002"),n.info(o.sessionTtl===void 0?"\u4F1A\u8BDD\u6709\u6548\u671F: \u6C38\u4E0D\u8FC7\u671F\uFF08\u4EC5\u5F53\u524D\u8FDB\u7A0B\uFF09":`\u4F1A\u8BDD\u6709\u6548\u671F: ${o.sessionTtl}\uFF08\u56FA\u5B9A\u671F\u9650\uFF0C\u4E0D\u81EA\u52A8\u7EED\u671F\uFF09`),n.info(o.lanPassword===void 0?"\u91CD\u542F Codexly \u540E\uFF0C\u5F53\u524D\u914D\u5BF9\u7801\u548C\u6240\u6709\u5C40\u57DF\u7F51\u4F1A\u8BDD\u5C06\u5931\u6548\u3002":"\u91CD\u542F Codexly \u540E\uFF0C\u6240\u6709\u5C40\u57DF\u7F51\u4F1A\u8BDD\u5C06\u5931\u6548\uFF1B\u56FA\u5B9A\u8BBF\u95EE\u5BC6\u7801\u4FDD\u6301\u6709\u6548\u3002");}else n.info(`\u8BBF\u95EE\u5730\u5740: http://127.0.0.1:${String(P)}`);if(!s?.background&&o.lan!==!0&&o.noOpen!==!0)try{await t.openBrowser(`http://127.0.0.1:${String(P)}`);}catch(w){let O=w instanceof Error?w.message:String(w);n.warning(`\u65E0\u6CD5\u81EA\u52A8\u6253\u5F00\u6D4F\u89C8\u5668\uFF0C\u8BF7\u624B\u52A8\u8BBF\u95EE\u4E0A\u8FF0\u5730\u5740\u3002\u539F\u56E0: ${O}`);}let C=await Promise.race([c.waitForExit().then(w=>({exit:w,type:"process-exit"})),h$1(y).then(()=>({type:"shutdown"}))]);if(C.type==="process-exit"){let w=C.exit.signal?`\u4FE1\u53F7 ${C.exit.signal}`:`\u9000\u51FA\u7801 ${String(C.exit.code)}`;throw new Error(`Codex App Server \u5728 Codexly \u5173\u95ED\u524D\u610F\u5916\u9000\u51FA\uFF0C${w}`)}return 0}finally{try{await m?.close();}finally{try{await d?.close();}finally{try{await c?.close();}finally{u?.cleanup();}}}}}async function Ue(e,t={}){let r=t.dependencies??xt,n=t.stdout??(u=>process.stdout.write(u)),s=t.stderr??(u=>process.stderr.write(u)),i$1=t.color??(process.stdout.isTTY&&process.env.NO_COLOR===void 0),o=i(n,s,i$1),[l,...p]=e,a$1=l??"start",g=p[0]==="--"?p.slice(1):p;try{if(a$1==="autostart"){let{runAutostartCommand:u}=await import('./command-R5BTONU5.js');return await u(g,o,y=>Te([],r,y.signal,y.output,y))}if(a$1==="--help"||a$1==="-h"||!a$1.startsWith("-")&&(g[0]==="--help"||g[0]==="-h")){if(g.length>(a$1.startsWith("-")?0:1))throw new Error(`\u672A\u77E5\u9009\u9879: ${g[a$1.startsWith("-")?0:1]??"<empty>"}`);let u=a$1.startsWith("-")?a:b[a$1];if(!u)throw new Error(`\u672A\u77E5\u547D\u4EE4: ${a$1}`);return o.plain(u),0}if(a$1==="version"||a$1==="--version"||a$1==="-V"){if(g.length>0)throw new Error(`\u672A\u77E5\u9009\u9879: ${g[0]??"<empty>"}`);return o.plain(`codexly ${r.appVersion}
|
|
7
7
|
`),0}if(a$1==="doctor")return await Ct(g,r,o);if(a$1==="start")return await Te(g,r,t.signal,o);throw new Error(`\u672A\u77E5\u547D\u4EE4: ${a$1}`)}catch(u){let y=u instanceof Error?u.message:String(u);return o.error(y),1}}process.exitCode=await Ue(process.argv.slice(2));
|
package/dist/client/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {createRequire}from'node:module';import {a}from'../chunk-
|
|
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===we?`${xe}/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>pg)return true;if(o.length*3<=pg)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>pg)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(tg,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===we?xe:`/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",He,e)}async getAppInfo(e={}){return this.read("/v1/app-info",pc,e)}async getAppUpdateProgress(e={}){return this.read("/v1/app-update/progress",oc,e)}async installAppUpdate(e,t={}){return this.mutation("/v1/app-update",{version:e},rc,t,"POST",Cn)}async getAccessStatus(e={}){return this.read("/v1/access",Zd,e)}async pairAccess(e){return this.request("/v1/access/pair",Zd,{body:JSON.stringify({code:e}),headers:{"content-type":"application/json"},method:"POST"},Xf,{timeoutMs:this.requestTimeouts.mutationMs})}async logoutAccess(){return this.request("/v1/access/logout",Zd,{body:"{}",headers:{"content-type":"application/json"},method:"POST"},Xf,{timeoutMs:this.requestTimeouts.mutationMs})}subscribeUnauthorized(e){return this.unauthorizedListeners.add(e),()=>this.unauthorizedListeners.delete(e)}async getCapabilities(e={}){return this.read("/v1/capabilities",Ie,e)}async listModels(e={}){return this.read("/v1/models",Fe,e)}async getProviderConnection(e={}){return this.read("/v1/provider-connection",Ne,e)}async startOfficialProviderLogin(e={}){return this.mutation("/v1/provider-connection/official-login",{},Pe$1,e)}async cancelProviderLogin(e,t={}){return this.mutation("/v1/provider-connection/official-login/cancel",{loginId:e},Te,t)}async configureCustomProvider(e,t={}){return this.mutation("/v1/provider-connection/custom",e,Re$1,t,"PUT")}async logoutProvider(e={}){return this.mutation("/v1/provider-connection/logout",{},Te,e)}async getGlobalSettings(e={}){return this.read("/v1/settings",Cd,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,Cd,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},Xf,{...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",{},sc,e)}async listOfficialPlugins(e,t={}){return this.read(i("/v1/plugins/official",{forceRefetch:e?"true":void 0}),Lc,t)}async getOfficialPlugin(e,t,n,s={}){return this.read(i(`/v1/plugins/official/${encodeURIComponent(e)}/${encodeURIComponent(n)}`,{marketplacePath:t??void 0}),Oc,s,Xf)}async installOfficialPlugin(e,t,n,s,a={}){return this.mutation(`/v1/plugins/official/${encodeURIComponent(e)}/${encodeURIComponent(n)}/install`,{installAttemptId:s,marketplacePath:t},Qc,a)}async uninstallOfficialPlugin(e,t,n,s={}){return this.mutation(`/v1/plugins/official/${encodeURIComponent(e)}/${encodeURIComponent(t)}/uninstall`,{pluginId:n},Sc,s)}async listInstalledSkills(e={}){return this.read("/v1/skills/installed",uc,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}),yc,s,Xf)}async getClawhubSkill(e,t,n={}){return this.read(`/v1/skills/market/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,Ac,n,Xf)}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},Dc,p)}async openSkillDirectory(e,t={}){return this.mutation("/v1/skills/open",{path:e},Ic,t)}async setSkillEnabled(e,t,n={}){return this.mutation("/v1/skills/enabled",{enabled:t,path:e},Fc,n,"PUT")}async listConfiguredMcpServers(e={}){return this.read("/v1/mcp-servers/configured",wc,e)}async setMcpServerEnabled(e,t,n={}){return this.mutation(`/v1/mcp-servers/configured/${encodeURIComponent(e)}/enabled`,{enabled:t},Hc,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}),ah,s)}async saveProjectTextFile(e,t,n,s={}){return this.mutation(i(`${r(e)}/files/text`,{rootPath:t}),n,ch,s)}};var K=class extends N{async pushProjectCommits(e,t,n,s={}){return this.mutation(i(`${r(e)}/git/push`,{rootPath:t}),n,nb,s)}};var J=class extends K{async listSkills(e,t={}){return this.read(`${r(e)}/skills`,Ge,t)}async listMcpServers(e,t,n={}){return this.read(`${c(e,t)}/mcp-servers`,kd,n,Xf)}async retryMcpServers(e,t,n={}){return this.mutation(`${c(e,t)}/mcp-servers/retry`,{},Ef,n)}async listProjects(e={}){return this.read("/v1/projects",Ce,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},De,t,"PUT")}async getProjectDefaults(e,t={}){return this.read(`${r(e)}/defaults`,Ed,t)}async updateProjectDefaults(e,t,n={}){return this.mutation(`${r(e)}/defaults`,t,Ed,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,ob,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,rb,s)}async renameProjectFile(e,t,n,s={}){return this.mutation(i(`/v1/projects/${encodeURIComponent(e)}/files/rename`,{rootPath:t}),n,ub,s)}async deleteProjectFile(e,t,n,s={}){return this.mutation(i(`/v1/projects/${encodeURIComponent(e)}/files/delete`,{rootPath:t}),n,wb,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,yb,a)}};var V=class extends J{deleteArchivedTasks(e,t={}){return this.mutation(`${r(e)}/tasks/archived`,{},kc,t,"DELETE")}async archiveTask(e,t,n={}){return this.mutation(`${c(e,t)}/archive`,{},rf,n)}async unarchiveTask(e,t,n={}){return this.mutation(`${c(e,t)}/unarchive`,{},tf,n)}async deleteTask(e,t,n={}){return this.mutation(c(e,t),{},vf,n,"DELETE")}};var Y=class extends V{async updateTaskGoal(e,t,n,s={}){return this.mutation(`${c(e,t)}/goal`,n,ue,s,"PUT")}async clearTaskGoal(e,t,n={}){return this.mutation(`${c(e,t)}/goal`,{},ve,n,"DELETE")}};var X=class extends Y{readNavigableTask(e,t,n={}){return this.read(`${c(e,t)}/navigation`,vg,n)}updateTaskSettingsAndDefaults(e,t,n,s={}){return this.mutation(`${c(e,t)}/settings-and-defaults`,n,Hd,s,"PUT")}queryCompletedTasks(e,t={}){return this.request("/v1/tasks/completed/query",Zg,{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),jf,n)}};var Z=class extends X{async searchTasks(e,t={}){return this.read(i("/v1/search/tasks",e),ic,t)}async searchTaskOccurrences(e,t,n,s,a={}){return this.read(i(`${c(e,t)}/search-occurrences`,{cursor:s,query:n}),hc,a)}};var ee=class extends Z{submitTask(e,t,n={}){return this.mutation(`${r(e)}/submissions`,t,Ig,n)}async listQueuedSubmissions(e,t,n={}){return this.read(`${c(e,t)}/queue`,qd,n)}async addQueuedSubmission(e,t,n,s,a={}){return this.mutation(`${c(e,t)}/queue`,{clientUserMessageId:s,input:n},Mf,a)}async updateQueuedSubmission(e,t,n,s,a,p={}){return this.mutation(`${c(e,t)}/queue/${encodeURIComponent(n)}`,{input:s,status:a},Of,p,"PUT")}async deleteQueuedSubmission(e,t,n,s={}){return this.mutation(`${c(e,t)}/queue/${encodeURIComponent(n)}`,{},Pf,s,"DELETE")}async reorderQueuedSubmissions(e,t,n,s={}){return this.mutation(`${c(e,t)}/queue/reorder`,{queuedSubmissionIds:n},Rf,s,"PUT")}async startQueuedSubmission(e,t,n,s={}){return this.mutation(`${c(e,t)}/queue/start`,{...n===void 0?{}:{queuedSubmissionId:n}},Tf,s)}async listTasks(e,t={},n={}){let s=i(`${r(e)}/tasks`,t);return this.read(s,Ee,n)}async readTask(e,t,n={}){let{cursor:s,...a}=n;return this.read(i(c(e,t),{cursor:s}),ug,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`,{},Vb,s)}async listBackgroundTerminals(e,t,n={}){return this.read(`${c(e,t)}/background-terminals`,ac,n)}async terminateBackgroundTerminal(e,t,n,s={}){return this.mutation(`${c(e,t)}/background-terminals/${encodeURIComponent(n)}/terminate`,{},bc,s)}async getTaskSettings(e,t,n={}){return this.read(`${c(e,t)}/settings`,Fd,n)}async updateTaskSettings(e,t,n,s={}){return this.mutation(`${c(e,t)}/settings`,n,Fd,s,"PUT")}async startTask(e,t={}){return this.mutation(`${r(e)}/tasks`,{},lf,t)}async startWorktreeTask(e,t,n={}){return this.mutation(`${r(e)}/tasks`,t,lf,n)}async pinTask(e,t,n,s={}){return this.mutation(`${c(e,t)}/pin`,{pinned:n},nf,s,"PUT")}async renameTask(e,t,n,s={}){return this.mutation(`${c(e,t)}/rename`,{title:n},pf,s)}async unsubscribeTask(e,t){return this.request(`${c(e,t)}/unsubscribe`,wf,{body:"{}",headers:{"content-type":"application/json"},method:"POST"})}async startReview(e,t,n,s={}){return this.mutation(`${c(e,t)}/review`,n,yf,s)}async compactTask(e,t,n={}){return this.mutation(`${c(e,t)}/compact`,{},Af,n)}async forkTask(e,t,n,s={}){return this.mutation(`${c(e,t)}/fork`,n,Cf,s)}async uploadFeedback(e,t,n,s={}){return this.mutation(`${c(e,t)}/feedback`,n,Gf,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}`,dd,{body:s,headers:{"idempotency-key":n.idempotencyKey??$()},method:"POST"},Xf,{...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},dd,s)}async startTurn(e,t,n,s,a={}){return this.mutation(`${c(e,t)}/turns`,{input:n,options:s},If,a)}async steerTurn(e,t,n,s,a={}){return this.mutation(`${c(e,t)}/turns/${encodeURIComponent(n)}/steer`,{input:s,taskId:t},Kf,a)}async interruptTurn(e,t,n,s={}){return this.mutation(`${c(e,t)}/turns/${encodeURIComponent(n)}/interrupt`,{taskId:t},Vf,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,qe,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",Md,t)}var ne=class extends ee{previewScheduledTask(e,t={}){return this.mutation("/v1/scheduled-tasks/preview",{schedule:e},Pd,t)}subscribeScheduledTasks(e){return kn(this.baseUrl,this.webSocketFactory,e)}listScheduledTasks(e={}){return this.read("/v1/scheduled-tasks",Ud,e)}createScheduledTask(e,t={}){return this.mutation("/v1/scheduled-tasks",e,Vd,t)}updateScheduledTask(e,t,n={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}`,t,Vd,n,"PUT")}deleteScheduledTask(e,t={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}`,{},Wd,t,"DELETE")}setScheduledTaskEnabled(e,t,n={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}/enabled`,{enabled:t},Vd,n,"PATCH")}runScheduledTaskNow(e,t={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}/run`,{},Vd,t)}};var se=class extends ne{compressHistory(e={}){return this.mutation("/v1/history/compress",{},Eg,e)}listWorkbenchBackgrounds(e={}){return this.read("/v1/workbench-background/bing/catalog",Gg,e)}getGlobalInstructions(e={}){return this.read("/v1/personalization/instructions",yg,e)}saveGlobalInstructions(e,t,n={}){return this.mutation("/v1/personalization/instructions",{content:e,expectedContent:t},yg,n,"PUT")}getMemorySettings(e={}){return this.read("/v1/personalization/memories",Ag,e)}updateMemorySettings(e,t={}){return this.mutation("/v1/personalization/memories",e,Ag,t,"PUT")}resetMemories(e={}){return this.mutation("/v1/personalization/memories/reset",{},Dg,e)}getAgentPreferences(e={}){return this.read("/v1/personalization/agent",Cg,e)}updateAgentPreferences(e,t={}){return this.mutation("/v1/personalization/agent",e,Cg,t,"PUT")}};var oe=class extends se{subscribeWorkbenchChanges(e){return te(this.baseUrl,this.webSocketFactory,"/v1/workbench/events",dh,e)}importProjectTodo(e,t,n,s={}){return this.mutation(`${r(e)}/todos/${encodeURIComponent(t)}/import`,n,Ng,s)}listProjectTodos(e,t={}){return this.read(`${r(e)}/todos`,Mg,t)}createProjectTodo(e,t,n={}){return this.mutation(`${r(e)}/todos`,t,Ng,n)}saveProjectTodo(e,t,n,s={}){return this.mutation(`${r(e)}/todos/${encodeURIComponent(t)}`,n,Ng,s,"PUT")}deleteProjectTodo(e,t,n,s={}){return this.mutation(`${r(e)}/todos/${encodeURIComponent(t)}`,{expectedVersion:n},Qg,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),Tg,n)}answerAsyncQuestion(e,t,n,s,a={}){return this.mutation(`${Re(e,t)}/${encodeURIComponent(n)}/answer`,{answers:s},Wg,a)}dismissAsyncQuestions(e,t,n,s={}){return this.mutation(`${Re(e,t)}/dismiss`,{ids:n},Tg,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};
|
|
1
|
+
import {createRequire}from'node:module';import {a}from'../chunk-5AELLXXE.js';import {tg,xe,we,Tg,Wg,pg,Ng,Mg,Qg,Eg,Gg,yg,Ag,Dg,Cg,Pd,Ud,Vd,Wd,Ig,qd,Mf,Of,Pf,Rf,Tf,Ee,ug,Vb,ac,bc,Fd,lf,nf,pf,wf,yf,Af,Cf,Gf,dd,Xf,If,Kf,Vf,qe,ic,hc,vg,Hd,Zg,jf,ue,ve,kc,rf,tf,vf,Ge,kd,Ef,Ce,wa,Aa,De,Ed,Da,Na,Pa,Ia,Ka,Ra,Va,Ya,_a,cb,gb,fb,jb,ob,rb,ub,wb,oa,qa,yb,nb,$g,ah,ch,$ as $$1,hb,sc,Lc,Oc,Qc,Sc,uc,yc,Ac,Dc,Ic,Fc,wc,Hc,He,pc,oc,rc,Zd,Ie,Fe,Ne,Pe as Pe$1,Te,Re as Re$1,Cd,fa,ha,Md,dh}from'../chunk-63NQMTXZ.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===we?`${xe}/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>pg)return true;if(o.length*3<=pg)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>pg)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(tg,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===we?xe:`/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",He,e)}async getAppInfo(e={}){return this.read("/v1/app-info",pc,e)}async getAppUpdateProgress(e={}){return this.read("/v1/app-update/progress",oc,e)}async installAppUpdate(e,t={}){return this.mutation("/v1/app-update",{version:e},rc,t,"POST",Cn)}async getAccessStatus(e={}){return this.read("/v1/access",Zd,e)}async pairAccess(e){return this.request("/v1/access/pair",Zd,{body:JSON.stringify({code:e}),headers:{"content-type":"application/json"},method:"POST"},Xf,{timeoutMs:this.requestTimeouts.mutationMs})}async logoutAccess(){return this.request("/v1/access/logout",Zd,{body:"{}",headers:{"content-type":"application/json"},method:"POST"},Xf,{timeoutMs:this.requestTimeouts.mutationMs})}subscribeUnauthorized(e){return this.unauthorizedListeners.add(e),()=>this.unauthorizedListeners.delete(e)}async getCapabilities(e={}){return this.read("/v1/capabilities",Ie,e)}async listModels(e={}){return this.read("/v1/models",Fe,e)}async getProviderConnection(e={}){return this.read("/v1/provider-connection",Ne,e)}async startOfficialProviderLogin(e={}){return this.mutation("/v1/provider-connection/official-login",{},Pe$1,e)}async cancelProviderLogin(e,t={}){return this.mutation("/v1/provider-connection/official-login/cancel",{loginId:e},Te,t)}async configureCustomProvider(e,t={}){return this.mutation("/v1/provider-connection/custom",e,Re$1,t,"PUT")}async logoutProvider(e={}){return this.mutation("/v1/provider-connection/logout",{},Te,e)}async getGlobalSettings(e={}){return this.read("/v1/settings",Cd,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,Cd,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},Xf,{...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",{},sc,e)}async listOfficialPlugins(e,t={}){return this.read(i("/v1/plugins/official",{forceRefetch:e?"true":void 0}),Lc,t)}async getOfficialPlugin(e,t,n,s={}){return this.read(i(`/v1/plugins/official/${encodeURIComponent(e)}/${encodeURIComponent(n)}`,{marketplacePath:t??void 0}),Oc,s,Xf)}async installOfficialPlugin(e,t,n,s,a={}){return this.mutation(`/v1/plugins/official/${encodeURIComponent(e)}/${encodeURIComponent(n)}/install`,{installAttemptId:s,marketplacePath:t},Qc,a)}async uninstallOfficialPlugin(e,t,n,s={}){return this.mutation(`/v1/plugins/official/${encodeURIComponent(e)}/${encodeURIComponent(t)}/uninstall`,{pluginId:n},Sc,s)}async listInstalledSkills(e={}){return this.read("/v1/skills/installed",uc,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}),yc,s,Xf)}async getClawhubSkill(e,t,n={}){return this.read(`/v1/skills/market/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,Ac,n,Xf)}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},Dc,p)}async openSkillDirectory(e,t={}){return this.mutation("/v1/skills/open",{path:e},Ic,t)}async setSkillEnabled(e,t,n={}){return this.mutation("/v1/skills/enabled",{enabled:t,path:e},Fc,n,"PUT")}async listConfiguredMcpServers(e={}){return this.read("/v1/mcp-servers/configured",wc,e)}async setMcpServerEnabled(e,t,n={}){return this.mutation(`/v1/mcp-servers/configured/${encodeURIComponent(e)}/enabled`,{enabled:t},Hc,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}),ah,s)}async saveProjectTextFile(e,t,n,s={}){return this.mutation(i(`${r(e)}/files/text`,{rootPath:t}),n,ch,s)}};var K=class extends N{async pushProjectCommits(e,t,n,s={}){return this.mutation(i(`${r(e)}/git/push`,{rootPath:t}),n,nb,s)}};var J=class extends K{async listSkills(e,t={}){return this.read(`${r(e)}/skills`,Ge,t)}async listMcpServers(e,t,n={}){return this.read(`${c(e,t)}/mcp-servers`,kd,n,Xf)}async retryMcpServers(e,t,n={}){return this.mutation(`${c(e,t)}/mcp-servers/retry`,{},Ef,n)}async listProjects(e={}){return this.read("/v1/projects",Ce,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},De,t,"PUT")}async getProjectDefaults(e,t={}){return this.read(`${r(e)}/defaults`,Ed,t)}async updateProjectDefaults(e,t,n={}){return this.mutation(`${r(e)}/defaults`,t,Ed,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,ob,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,rb,s)}async renameProjectFile(e,t,n,s={}){return this.mutation(i(`/v1/projects/${encodeURIComponent(e)}/files/rename`,{rootPath:t}),n,ub,s)}async deleteProjectFile(e,t,n,s={}){return this.mutation(i(`/v1/projects/${encodeURIComponent(e)}/files/delete`,{rootPath:t}),n,wb,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,yb,a)}};var V=class extends J{deleteArchivedTasks(e,t={}){return this.mutation(`${r(e)}/tasks/archived`,{},kc,t,"DELETE")}async archiveTask(e,t,n={}){return this.mutation(`${c(e,t)}/archive`,{},rf,n)}async unarchiveTask(e,t,n={}){return this.mutation(`${c(e,t)}/unarchive`,{},tf,n)}async deleteTask(e,t,n={}){return this.mutation(c(e,t),{},vf,n,"DELETE")}};var Y=class extends V{async updateTaskGoal(e,t,n,s={}){return this.mutation(`${c(e,t)}/goal`,n,ue,s,"PUT")}async clearTaskGoal(e,t,n={}){return this.mutation(`${c(e,t)}/goal`,{},ve,n,"DELETE")}};var X=class extends Y{readNavigableTask(e,t,n={}){return this.read(`${c(e,t)}/navigation`,vg,n)}updateTaskSettingsAndDefaults(e,t,n,s={}){return this.mutation(`${c(e,t)}/settings-and-defaults`,n,Hd,s,"PUT")}queryCompletedTasks(e,t={}){return this.request("/v1/tasks/completed/query",Zg,{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),jf,n)}};var Z=class extends X{async searchTasks(e,t={}){return this.read(i("/v1/search/tasks",e),ic,t)}async searchTaskOccurrences(e,t,n,s,a={}){return this.read(i(`${c(e,t)}/search-occurrences`,{cursor:s,query:n}),hc,a)}};var ee=class extends Z{submitTask(e,t,n={}){return this.mutation(`${r(e)}/submissions`,t,Ig,n)}async listQueuedSubmissions(e,t,n={}){return this.read(`${c(e,t)}/queue`,qd,n)}async addQueuedSubmission(e,t,n,s,a={}){return this.mutation(`${c(e,t)}/queue`,{clientUserMessageId:s,input:n},Mf,a)}async updateQueuedSubmission(e,t,n,s,a,p={}){return this.mutation(`${c(e,t)}/queue/${encodeURIComponent(n)}`,{input:s,status:a},Of,p,"PUT")}async deleteQueuedSubmission(e,t,n,s={}){return this.mutation(`${c(e,t)}/queue/${encodeURIComponent(n)}`,{},Pf,s,"DELETE")}async reorderQueuedSubmissions(e,t,n,s={}){return this.mutation(`${c(e,t)}/queue/reorder`,{queuedSubmissionIds:n},Rf,s,"PUT")}async startQueuedSubmission(e,t,n,s={}){return this.mutation(`${c(e,t)}/queue/start`,{...n===void 0?{}:{queuedSubmissionId:n}},Tf,s)}async listTasks(e,t={},n={}){let s=i(`${r(e)}/tasks`,t);return this.read(s,Ee,n)}async readTask(e,t,n={}){let{cursor:s,summary:a,...p}=n;return this.read(i(c(e,t),{cursor:s,summary:a}),ug,p)}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`,{},Vb,s)}async listBackgroundTerminals(e,t,n={}){return this.read(`${c(e,t)}/background-terminals`,ac,n)}async terminateBackgroundTerminal(e,t,n,s={}){return this.mutation(`${c(e,t)}/background-terminals/${encodeURIComponent(n)}/terminate`,{},bc,s)}async getTaskSettings(e,t,n={}){return this.read(`${c(e,t)}/settings`,Fd,n)}async updateTaskSettings(e,t,n,s={}){return this.mutation(`${c(e,t)}/settings`,n,Fd,s,"PUT")}async startTask(e,t={}){return this.mutation(`${r(e)}/tasks`,{},lf,t)}async startWorktreeTask(e,t,n={}){return this.mutation(`${r(e)}/tasks`,t,lf,n)}async pinTask(e,t,n,s={}){return this.mutation(`${c(e,t)}/pin`,{pinned:n},nf,s,"PUT")}async renameTask(e,t,n,s={}){return this.mutation(`${c(e,t)}/rename`,{title:n},pf,s)}async unsubscribeTask(e,t){return this.request(`${c(e,t)}/unsubscribe`,wf,{body:"{}",headers:{"content-type":"application/json"},method:"POST"})}async startReview(e,t,n,s={}){return this.mutation(`${c(e,t)}/review`,n,yf,s)}async compactTask(e,t,n={}){return this.mutation(`${c(e,t)}/compact`,{},Af,n)}async forkTask(e,t,n,s={}){return this.mutation(`${c(e,t)}/fork`,n,Cf,s)}async uploadFeedback(e,t,n,s={}){return this.mutation(`${c(e,t)}/feedback`,n,Gf,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}`,dd,{body:s,headers:{"idempotency-key":n.idempotencyKey??$()},method:"POST"},Xf,{...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},dd,s)}async startTurn(e,t,n,s,a={}){return this.mutation(`${c(e,t)}/turns`,{input:n,options:s},If,a)}async steerTurn(e,t,n,s,a={}){return this.mutation(`${c(e,t)}/turns/${encodeURIComponent(n)}/steer`,{input:s,taskId:t},Kf,a)}async interruptTurn(e,t,n,s={}){return this.mutation(`${c(e,t)}/turns/${encodeURIComponent(n)}/interrupt`,{taskId:t},Vf,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,qe,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",Md,t)}var ne=class extends ee{previewScheduledTask(e,t={}){return this.mutation("/v1/scheduled-tasks/preview",{schedule:e},Pd,t)}subscribeScheduledTasks(e){return kn(this.baseUrl,this.webSocketFactory,e)}listScheduledTasks(e={}){return this.read("/v1/scheduled-tasks",Ud,e)}createScheduledTask(e,t={}){return this.mutation("/v1/scheduled-tasks",e,Vd,t)}updateScheduledTask(e,t,n={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}`,t,Vd,n,"PUT")}deleteScheduledTask(e,t={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}`,{},Wd,t,"DELETE")}setScheduledTaskEnabled(e,t,n={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}/enabled`,{enabled:t},Vd,n,"PATCH")}runScheduledTaskNow(e,t={}){return this.mutation(`/v1/scheduled-tasks/${encodeURIComponent(e)}/run`,{},Vd,t)}};var se=class extends ne{compressHistory(e={}){return this.mutation("/v1/history/compress",{},Eg,e)}listWorkbenchBackgrounds(e={}){return this.read("/v1/workbench-background/bing/catalog",Gg,e)}getGlobalInstructions(e={}){return this.read("/v1/personalization/instructions",yg,e)}saveGlobalInstructions(e,t,n={}){return this.mutation("/v1/personalization/instructions",{content:e,expectedContent:t},yg,n,"PUT")}getMemorySettings(e={}){return this.read("/v1/personalization/memories",Ag,e)}updateMemorySettings(e,t={}){return this.mutation("/v1/personalization/memories",e,Ag,t,"PUT")}resetMemories(e={}){return this.mutation("/v1/personalization/memories/reset",{},Dg,e)}getAgentPreferences(e={}){return this.read("/v1/personalization/agent",Cg,e)}updateAgentPreferences(e,t={}){return this.mutation("/v1/personalization/agent",e,Cg,t,"PUT")}};var oe=class extends se{subscribeWorkbenchChanges(e){return te(this.baseUrl,this.webSocketFactory,"/v1/workbench/events",dh,e)}importProjectTodo(e,t,n,s={}){return this.mutation(`${r(e)}/todos/${encodeURIComponent(t)}/import`,n,Ng,s)}listProjectTodos(e,t={}){return this.read(`${r(e)}/todos`,Mg,t)}createProjectTodo(e,t,n={}){return this.mutation(`${r(e)}/todos`,t,Ng,n)}saveProjectTodo(e,t,n,s={}){return this.mutation(`${r(e)}/todos/${encodeURIComponent(t)}`,n,Ng,s,"PUT")}deleteProjectTodo(e,t,n,s={}){return this.mutation(`${r(e)}/todos/${encodeURIComponent(t)}`,{expectedVersion:n},Qg,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),Tg,n)}answerAsyncQuestion(e,t,n,s,a={}){return this.mutation(`${Re(e,t)}/${encodeURIComponent(n)}/answer`,{answers:s},Wg,a)}dismissAsyncQuestions(e,t,n,s={}){return this.mutation(`${Re(e,t)}/dismiss`,{ids:n},Tg,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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {createRequire}from'node:module';import {m,c,e,g,i,k as k$1,j,d}from'./chunk-PQPYP3AR.js';import {h as h$1}from'./chunk-
|
|
1
|
+
import {createRequire}from'node:module';import {m,c,e,g,i,k as k$1,j,d}from'./chunk-PQPYP3AR.js';import {h as h$1}from'./chunk-PFNMH4LN.js';import'./chunk-5AELLXXE.js';import'./chunk-5ULADQG3.js';import'./chunk-XJOOU7A5.js';import'./chunk-3WW7LK46.js';import'./chunk-63NQMTXZ.js';import'./chunk-IV4NRE4S.js';import'./chunk-YXJGRSCL.js';import {realpath,access,readFile,open,rm,mkdir,lstat,chmod,appendFile,stat,rename,writeFile}from'fs/promises';import {homedir}from'os';import {join,dirname,isAbsolute,resolve}from'path';import {setTimeout}from'timers/promises';import {randomBytes,timingSafeEqual,createHash}from'crypto';import {execFile}from'child_process';import {promisify}from'util';import {createServer,createConnection}from'net';createRequire(import.meta.url);
|
|
2
2
|
function Q(t,e,o){let r=o.XDG_CONFIG_HOME&&isAbsolute(o.XDG_CONFIG_HOME)?o.XDG_CONFIG_HOME:join(e,".config"),n=t==="darwin"?join(e,"Library","Application Support","Codexly","autostart"):t==="linux"?join(r,"codexly","autostart"):t==="win32"?join(o.LOCALAPPDATA??join(e,"AppData","Local"),"Codexly","autostart"):void 0;if(!n)throw new Error(`\u5F53\u524D\u7CFB\u7EDF\u4E0D\u652F\u6301\u7528\u6237\u81EA\u542F\u52A8: ${t}`);return {root:n,config:join(n,"config.json"),state:join(n,"runtime.json"),log:join(n,"service.log"),registration:t==="darwin"?join(e,"Library","LaunchAgents","io.codexly.web.plist"):t==="linux"?join(r,"systemd","user","codexly-web.service"):join(n,"task.xml")}}function V(t){if(t.lan!==true&&(t.lanPassword!==void 0||t.sessionTtl!==void 0))throw new Error("--lan-password \u548C --session-ttl \u53EA\u80FD\u4E0E --lan \u4E00\u8D77\u4F7F\u7528");t.lanPassword!==void 0&&k$1(t.lanPassword),t.sessionTtl!==void 0&&j(t.sessionTtl);}function Y(t,e,o){let r=d(t,e.environment);return V(r),r.noOpen=true,r.port??=3210,r.codexHome=resolve(e.cwd,r.codexHome??e.environment.CODEX_HOME??join(e.home,".codex")),r.codexBin&&(r.codexBin=resolve(e.cwd,r.codexBin)),r.workspaceRoots&&(r.workspaceRoots=r.workspaceRoots.map(n=>resolve(e.cwd,n))),r.lan&&(r.lanPassword??=o?.start.lanPassword??`Aa1_${randomBytes(24).toString("base64url")}`),{version:1,node:e.node,cli:e.cli,home:e.home,environment:e.environment.PATH?{PATH:e.environment.PATH}:{},start:r}}async function b(t){await mkdir(t,{recursive:true,mode:448});let e=await lstat(t);if(!e.isDirectory()||e.isSymbolicLink())throw new Error("\u81EA\u542F\u52A8\u76EE\u5F55\u5FC5\u987B\u662F\u5B9E\u9645\u76EE\u5F55");process.platform!=="win32"&&await chmod(t,448);}async function P(t,e){await mkdir(dirname(t),{recursive:true,mode:448});let o=`${t}.${randomBytes(8).toString("hex")}.tmp`;try{await writeFile(o,e,{mode:384,flag:"wx"});for(let r=0;;r++)try{await rename(o,t);break}catch(n){if(process.platform!=="win32"||r===7||!["EPERM","EACCES","EBUSY"].includes(n.code??""))throw n;await setTimeout(25*2**r);}}finally{await rm(o,{force:true});}}async function h(t,e){await P(t,`${JSON.stringify(e,null,2)}
|
|
3
3
|
`);}function v(t){return t instanceof Error&&t.code==="ENOENT"}async function A(t){let e;try{e=JSON.parse(await readFile(t,"utf8"));}catch(o){if(v(o))return;throw new Error("\u65E0\u6CD5\u8BFB\u53D6\u81EA\u542F\u52A8\u914D\u7F6E\uFF0C\u8BF7\u4FEE\u590D config.json\uFF0C\u6216 disable \u540E\u79FB\u9664\u8BE5\u6587\u4EF6\u518D enable",{cause:o})}try{let o=a=>typeof a=="object"&&a!==null&&!Array.isArray(a),r=a=>typeof a=="string"&&isAbsolute(a);if(!o(e)||e.version!==1||![e.node,e.cli,e.home].every(r))throw new Error("\u542F\u52A8\u8DEF\u5F84\u65E0\u6548");let n=e.start;if(!o(n)||n.noOpen!==!0||!r(n.codexHome))throw new Error("\u542F\u52A8\u53C2\u6570\u65E0\u6548");let c=n.port;if(typeof c!="number"||!Number.isInteger(c)||c<1||c>65535)throw new Error("\u7AEF\u53E3\u65E0\u6548");if(n.lan!==void 0&&typeof n.lan!="boolean")throw new Error("\u6A21\u5F0F\u65E0\u6548");if(n.lan===!0&&typeof n.lanPassword!="string")throw new Error("\u7F3A\u5C11 LAN \u5BC6\u7801");if(n.lanPassword!==void 0&&typeof n.lanPassword!="string")throw new Error("LAN \u5BC6\u7801\u65E0\u6548");if(n.sessionTtl!==void 0&&typeof n.sessionTtl!="string")throw new Error("\u4F1A\u8BDD\u671F\u9650\u65E0\u6548");if(n.codexBin!==void 0&&!r(n.codexBin))throw new Error("Codex \u8DEF\u5F84\u65E0\u6548");for(let a of ["workspaceRoots","allowedHosts"]){let w=n[a];if(w!==void 0&&(!Array.isArray(w)||!w.every(l=>a==="workspaceRoots"?r(l):typeof l=="string")))throw new Error("\u5217\u8868\u53C2\u6570\u65E0\u6548")}let d=e.environment;if(!o(d)||Object.entries(d).some(([a,w])=>a!=="PATH"||typeof w!="string"))throw new Error("\u73AF\u5883\u914D\u7F6E\u65E0\u6548");if(e.linuxTarget!==void 0&&e.linuxTarget!=="default.target"&&e.linuxTarget!=="graphical-session.target")throw new Error("\u767B\u5F55\u76EE\u6807\u65E0\u6548");let i=e;return V(i.start),i}catch(o){throw new Error("\u81EA\u542F\u52A8\u914D\u7F6E\u65E0\u6548\u6216\u7248\u672C\u4E0D\u517C\u5BB9\uFF0C\u8BF7\u4FEE\u590D config.json\uFF0C\u6216 disable \u540E\u79FB\u9664\u8BE5\u6587\u4EF6\u518D enable",{cause:o})}}var Et=promisify(execFile),k=async(t,e)=>{try{return {code:0,...await Et(t,[...e],{encoding:"utf8",windowsHide:!0,timeout:15e3,maxBuffer:524288})}}catch(o){let r=o;if(typeof r.code!="number")throw o;return {code:r.code,stdout:r.stdout??"",stderr:r.stderr??r.message}}};function x(t){return t.replace(/&/gu,"&").replace(/</gu,"<").replace(/>/gu,">").replace(/"/gu,""").replace(/'/gu,"'")}function R(t){if(t.split("").some(e=>e.charCodeAt(0)<32))throw new Error("\u542F\u52A8\u8DEF\u5F84\u4E0D\u80FD\u5305\u542B\u63A7\u5236\u5B57\u7B26");return t}function O(t,e){return [t.node,t.cli,"autostart","run","--config",e].map(R)}function St(t,e){return `<?xml version="1.0" encoding="UTF-8"?>
|
|
4
4
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
package/dist/protocol/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {createRequire}from'node:module';export{Nb as AGENT_FILE_ACCEPT,Mb as AGENT_IMAGE_ACCEPT,Yd as AccessModeSchema,Zd as AccessStatusResponseSchema,Lf as AddAgentQueuedSubmissionRequestSchema,Mf as AddAgentQueuedSubmissionResponseSchema,Ca as AddProjectRequestSchema,Da as AddProjectResponseSchema,Wc as AgentActivityItemSchema,Yc as AgentApprovalReviewActionSchema,Zc as AgentApprovalReviewItemSchema,Xc as AgentApprovalReviewStatusSchema,xd as AgentApprovalsReviewerSchema,Qb as AgentAttachmentKindSchema,Pb as AgentAttachmentMediaTypeSchema,cd as AgentAttachmentSchema,dd as AgentAttachmentUploadResponseSchema,ac as AgentBackgroundTerminalPageSchema,$b as AgentBackgroundTerminalSchema,Ie as AgentCapabilitiesSchema,Ad as AgentCollaborationModeSchema,_b as AgentCommandItemSchema,Zb as AgentCommandOutputOmissionSchema,Ld as AgentContextUsageSchema,Xe as AgentEventEnvelopeProperties,mg as AgentEventSchema,Tc as AgentFileChangeItemSchema,Qa as AgentFileChangeSchema,vd as AgentGlobalApprovalPolicySchema,Cd as AgentGlobalSettingsResponseSchema,Bd as AgentGlobalSettingsSchema,se as AgentGoalSchema,re as AgentGoalStatusSchema,sd as AgentGranularApprovalConfigSchema,td as AgentGranularApprovalPolicySchema,Ob as AgentImageMediaTypeSchema,$c as AgentItemSchema,Bb as AgentItemStatusSchema,gd as AgentMcpServerConnectionStatusSchema,id as AgentMcpServerFailureReasonSchema,kd as AgentMcpServerPageSchema,jd as AgentMcpServerSchema,hd as AgentMcpServerStartupStatusSchema,Tb as AgentMessageAttachmentSchema,Xb as AgentMessageItemSchema,Wb as AgentMessagePhaseSchema,Rb as AgentMessageSkillSchema,Fe as AgentModelPageSchema,Kd as AgentModelSchema,Wf as AgentMutationErrorCodeSchema,Xf as AgentMutationErrorSchema,Vc as AgentPlanItemSchema,Ae as AgentPlanSchema,ze as AgentPlanStepSchema,ye as AgentPlanStepStatusSchema,Cg as AgentPreferencesSchema,Ed as AgentProjectDefaultsResponseSchema,Dd as AgentProjectDefaultsSchema,md as AgentPromptInputSchema,Le as AgentProviderAccountSchema,Te as AgentProviderConnectionMutationResponseSchema,Ue as AgentProviderConnectionRecordSchema,Ke as AgentProviderConnectionStateSchema,Ne as AgentProviderConnectionStatusSchema,Je as AgentProviderModeSchema,Me as AgentProviderPendingLoginSchema,qd as AgentQueuedSubmissionListSchema,pd as AgentQueuedSubmissionPageSchema,od as AgentQueuedSubmissionSchema,nd as AgentQueuedSubmissionStatusSchema,Jd as AgentReasoningEffortOptionSchema,Yb as AgentReasoningItemSchema,_c as AgentReviewItemSchema,Cb as AgentReviewTargetSchema,yd as AgentSandboxModeSchema,Ge as AgentSkillPageSchema,ld as AgentSkillReferenceSchema,fd as AgentSkillSchema,ed as AgentSkillScopeSchema,zb as AgentTaskBaseSchema,jf as AgentTaskCatalogSchema,Ee as AgentTaskPageSchema,Ab as AgentTaskSchema,Fd as AgentTaskSettingsResponseSchema,zd as AgentTaskSettingsSchema,ug as AgentTaskSnapshotResponseSchema,Be as AgentTaskSnapshotSchema,Uc as AgentToolItemSchema,wd as AgentTurnApprovalPolicySchema,Id as AgentTurnOptionsSchema,bd as AgentTurnSchema,ad as AgentTurnStatusSchema,Ug as AnswerAsyncQuestionRequestSchema,Wg as AnswerAsyncQuestionResponseSchema,Vg as AnswerAsyncQuestionResultSchema,pc as AppInfoResponseSchema,mc as AppUpdateProgressPhaseSchema,oc as AppUpdateProgressResponseSchema,nc as AppUpdateProgressSchema,lc as AppUpdateStatusSchema,qf as ArchiveAgentTaskRequestSchema,rf as ArchiveAgentTaskResponseSchema,Sg as AsyncQuestionGroupSchema,Tg as AsyncQuestionPageSchema,Rg as AsyncQuestionSchema,Gg as BingWallpaperCatalogSchema,Fg as BingWallpaperSchema,ia as CODEXLY_USER_AGENT,Se as CancelProviderLoginRequestSchema,Ac as ClawhubSkillDetailSchema,yc as ClawhubSkillPageSchema,xc as ClawhubSkillSummarySchema,zc as ClawhubSkillVersionSchema,ve as ClearAgentGoalResponseSchema,ke as CommandApprovalPendingRequestSchema,ff as CommandOutputDeltaEventSchema,kb as CommitProjectChangesRequestSchema,ob as CommitProjectChangesResponseSchema,zf as CompactAgentTaskRequestSchema,Af as CompactAgentTaskResponseSchema,Zg as CompletedTasksPageSchema,Yg as CompletedTasksQuerySchema,Qe as ConfigureCustomProviderRequestSchema,Re as ConfigureCustomProviderResponseSchema,wc as ConfiguredMcpServerPageSchema,vc as ConfiguredMcpServerSchema,rg as ConnectionReadySchema,ab as CreateProjectBranchRequestSchema,_ as CreateProjectDirectoryRequestSchema,$ as CreateProjectDirectoryResponseSchema,db as CreateProjectWorktreeRequestSchema,gb as CreateProjectWorktreeResponseSchema,hb as CreateTaskWorktreeResponseSchema,ud as DEFAULT_AGENT_GRANULAR_APPROVAL_POLICY,rd as DEFAULT_COMMIT_MESSAGE_MODEL,Pf as DeleteAgentQueuedSubmissionResponseSchema,uf as DeleteAgentTaskRequestSchema,vf as DeleteAgentTaskResponseSchema,jc as DeleteArchivedTasksRequestSchema,kc as DeleteArchivedTasksResponseSchema,vb as DeleteProjectFileRequestSchema,wb as DeleteProjectFileResponseSchema,Pg as DeleteProjectTodoRequestSchema,Qg as DeleteProjectTodoResponseSchema,Wd as DeleteScheduledTaskResponseSchema,Xg as DismissAsyncQuestionsRequestSchema,qg as EventBatchSchema,We as EventCheckpointSchema,tg as EventStreamMessageSchema,xg as EventStreamMetricsResponseSchema,wg as EventStreamProjectMetricsSchema,ie as FileChangeApprovalPendingRequestSchema,ag as FileChangeUpdatedEventSchema,va as FilesystemRootSchema,Bf as ForkAgentTaskRequestSchema,Cf as ForkAgentTaskResponseSchema,ib as GenerateCommitMessageRequestSchema,jb as GenerateCommitMessageResponseSchema,mb as GitRemoteStateSchema,yg as GlobalInstructionsSchema,cc as GlobalSearchKindSchema,hf as GoalClearedEventSchema,ig as GoalUpdatedEventSchema,He as HealthResponseSchema,Eg as HistoryCompressionResultSchema,za as HostFileEntrySchema,xa as HostFileKindSchema,Aa as HostFileListingSchema,ya as HostFileQuerySchema,Ba as ImportHostAttachmentRequestSchema,qc as InstallAppUpdateRequestSchema,rc as InstallAppUpdateResponseSchema,uc as InstalledSkillPageSchema,tc as InstalledSkillSchema,Uf as InterruptAgentTurnRequestSchema,Vf as InterruptAgentTurnResponseSchema,dg as ItemCompletedEventSchema,eg as ItemStartedEventSchema,ae as LogoutAccessResponseSchema,Jb as MAX_AGENT_ATTACHMENT_BYTES,og as MAX_AGENT_EVENT_BYTES,Db as MAX_AGENT_FILE_BYTES,Eb as MAX_AGENT_FILE_TOTAL_BYTES,Kb as MAX_AGENT_HISTORY_IMAGES,Lb as MAX_AGENT_HISTORY_IMAGE_TOTAL_BYTES,Gb as MAX_AGENT_IMAGES,Fb as MAX_AGENT_IMAGE_BYTES,Hb as MAX_AGENT_IMAGE_TOTAL_BYTES,Ib as MAX_AGENT_TEXT_BYTES,pg as MAX_EVENT_BATCH_BYTES,ng as MAX_EVENT_BATCH_SIZE,Yf as MAX_REALTIME_DIFF_BYTES,Zf as MAX_REALTIME_FILE_CHANGES,_g as MAX_TEXT_FILE_BYTES,ce as McpElicitationFieldSchema,be as McpElicitationOptionSchema,ne as McpElicitationPendingRequestSchema,de as McpElicitationResolutionSchema,bg as McpServerStatusUpdatedEventSchema,Ag as MemorySettingsSchema,Bg as MemorySettingsUpdateSchema,Ye as MessageDeltaEventSchema,vg as NavigableAgentTaskResponseSchema,Nc as OfficialPluginAppSchema,Mc as OfficialPluginAssetSchema,Jc as OfficialPluginAuthPolicySchema,Oc as OfficialPluginDetailSchema,Qc as OfficialPluginInstallResponseSchema,Pc as OfficialPluginInstallResultSchema,Lc as OfficialPluginPageSchema,Kc as OfficialPluginSummarySchema,Sc as OfficialPluginUninstallResponseSchema,Rc as OfficialPluginUninstallResultSchema,Ub as OpenAgentTaskAttachmentRequestSchema,Vb as OpenAgentTaskAttachmentResponseSchema,Ja as OpenProjectRequestSchema,Ka as OpenProjectResponseSchema,Ic as OpenSkillDirectoryResponseSchema,_d as PairAccessRequestSchema,$d as PairAccessResponseSchema,fe as PendingApprovalDecisionSchema,je as PendingPermissionCategorySchema,jg as PendingRequestCreatedEventSchema,lg as PendingRequestExpiredEventSchema,kg as PendingRequestResolvedEventSchema,oe as PendingRequestSchema,ee as PendingRequestStatusSchema,ge as PendingUserInputOptionSchema,he as PendingUserInputQuestionSchema,le as PermissionApprovalPendingRequestSchema,Dg as PersonalizationResetSchema,mf as PinAgentTaskRequestSchema,nf as PinAgentTaskResponseSchema,Ze as PlanDeltaEventSchema,hg as PlanUpdatedEventSchema,sc as PluginReconcileResultSchema,ua as ProjectDirectoryEntrySchema,wa as ProjectDirectoryListingSchema,sa as ProjectDirectoryPathSchema,ta as ProjectDirectoryQuerySchema,sb as ProjectFileNameSchema,ra as ProjectFileReferencePathSchema,na as ProjectFileSearchEntrySchema,oa as ProjectFileSearchPageSchema,ma as ProjectFileSearchQuerySchema,la as ProjectFileSearchSessionIdSchema,pb as ProjectFileTreeEntrySchema,qb as ProjectFileTreeQuerySchema,rb as ProjectFileTreeSchema,Za as ProjectGitCommitFileDiffQuerySchema,_a as ProjectGitCommitFileDiffSchema,Xa as ProjectGitCommitFileSchema,Ya as ProjectGitCommitFilesPageSchema,Wa as ProjectGitCommitFilesQuerySchema,Ta as ProjectGitCommitSchema,Va as ProjectGitHistoryPageSchema,Ua as ProjectGitHistoryQuerySchema,ef as ProjectGitMetadataChangedEventSchema,Sa as ProjectGitStatusQuerySchema,Ra as ProjectGitStatusSchema,cb as ProjectGitWorktreePageSchema,bb as ProjectGitWorktreeSchema,Ea as ProjectOpenAppIdSchema,Fa as ProjectOpenAppKindSchema,Ga as ProjectOpenAppSchema,Ia as ProjectOpenCapabilitiesResponseSchema,Ha as ProjectOpenPlatformSchema,Ce as ProjectPageSchema,ka as ProjectRelativePathSchema,T as ProjectRootIdSchema,U as ProjectRootInputSchema,X as ProjectRootInputsSchema,S as ProjectRootPathSchema,Y as ProjectRootQuerySchema,V as ProjectRootSchema,W as ProjectRootsSchema,ja as ProjectSchema,xb as ProjectSourceFileQuerySchema,yb as ProjectSourceFileSchema,$g as ProjectTextFileRevisionSchema,ah as ProjectTextFileSchema,Kg as ProjectTodoDraftSchema,Mg as ProjectTodoPageSchema,Ng as ProjectTodoResponseSchema,Lg as ProjectTodoSchema,fb as ProjectWorktreeMutationResponseSchema,Jg as PromptDocumentPartSchema,gf as ProviderErrorEventSchema,lb as PushProjectCommitsRequestSchema,nb as PushProjectCommitsResponseSchema,df as QueueChangedEventSchema,$f as ReasoningDeltaEventSchema,Df as ReloadAgentMcpServersRequestSchema,Ef as ReloadAgentMcpServersResponseSchema,Oa as RemoveProjectRequestSchema,Pa as RemoveProjectResponseSchema,of as RenameAgentTaskRequestSchema,pf as RenameAgentTaskResponseSchema,tb as RenameProjectFileRequestSchema,ub as RenameProjectFileResponseSchema,Ma as RenameProjectRequestSchema,Na as RenameProjectResponseSchema,Qf as ReorderAgentQueuedSubmissionsRequestSchema,Rf as ReorderAgentQueuedSubmissionsResponseSchema,La as ReorderProjectsRequestSchema,De as ReorderProjectsResponseSchema,pe as ResolvePendingRequestRequestSchema,qe as ResolvePendingRequestResponseSchema,sg as ResyncRequiredSchema,xf as ReviewAgentTaskRequestSchema,yf as ReviewAgentTaskResponseSchema,zg as SaveGlobalInstructionsSchema,bh as SaveProjectTextFileRequestSchema,ch as SaveProjectTextFileResponseSchema,Og as SaveProjectTodoRequestSchema,Md as ScheduledTaskChangeSchema,Sd as ScheduledTaskInputSchema,Vd as ScheduledTaskMutationResponseSchema,Ud as ScheduledTaskPageSchema,Od as ScheduledTaskPreviewRequestSchema,Pd as ScheduledTaskPreviewSchema,Rd as ScheduledTaskRunSchema,Qd as ScheduledTaskRunStatusSchema,Nd as ScheduledTaskScheduleSchema,Td as ScheduledTaskSchema,fc as SearchOccurrenceSchema,hc as SearchOccurrencesPageSchema,gc as SearchOccurrencesQuerySchema,ec as SearchTextRangeSchema,Hc as SetMcpServerEnabledResponseSchema,Gc as SetMcpServerEnabledResultSchema,Xd as SetScheduledTaskEnabledRequestSchema,Fc as SetSkillEnabledResponseSchema,Ec as SetSkillEnabledResultSchema,Dc as SkillInstallResponseSchema,Cc as SkillInstallResultSchema,Bc as SkillInstallScopeSchema,cf as SkillsChangedEventSchema,Sf as StartAgentQueuedSubmissionRequestSchema,Tf as StartAgentQueuedSubmissionResponseSchema,kf as StartAgentTaskRequestSchema,lf as StartAgentTaskResponseSchema,Hf as StartAgentTurnRequestSchema,If as StartAgentTurnResponseSchema,Oe as StartOfficialProviderLoginRequestSchema,Pe as StartOfficialProviderLoginResponseSchema,Jf as SteerAgentTurnRequestSchema,Kf as SteerAgentTurnResponseSchema,pa as StopProjectFileSearchRequestSchema,qa as StopProjectFileSearchResponseSchema,Hg as SubmitTaskRequestSchema,Ig as SubmitTaskResponseSchema,$a as SwitchProjectBranchRequestSchema,eb as SwitchProjectWorktreeRequestSchema,xe as TEMPORARY_TASK_API_PATH,we as TEMPORARY_TASK_SCOPE_ID,if as TaskCatalogQuerySchema,cg as TaskMetadataChangedEventSchema,$e as TaskNoticeEventSchema,bf as TaskRemovedEventSchema,ic as TaskSearchPageSchema,dc as TaskSearchQuerySchema,af as TaskStatusUpdatedEventSchema,bc as TerminateAgentBackgroundTerminalResponseSchema,_e as ToolProgressEventSchema,fg as TurnCompletedEventSchema,_f as TurnStartedEventSchema,sf as UnarchiveAgentTaskRequestSchema,tf as UnarchiveAgentTaskResponseSchema,wf as UnsubscribeAgentTaskResponseSchema,te as UpdateAgentGoalRequestSchema,ue as UpdateAgentGoalResponseSchema,Nf as UpdateAgentQueuedSubmissionRequestSchema,Of as UpdateAgentQueuedSubmissionResponseSchema,Gd as UpdateTaskSettingsAndDefaultsRequestSchema,Hd as UpdateTaskSettingsAndDefaultsResponseSchema,Ff as UploadAgentFeedbackRequestSchema,Gf as UploadAgentFeedbackResponseSchema,gg as UsageUpdatedEventSchema,me as UserInputPendingRequestSchema,dh as WorkbenchChangeSchema,ca as WorkbenchPetAnimationFrameSchema,da as WorkbenchPetAnimationSchema,fa as WorkbenchPetCatalogResponseSchema,ea as WorkbenchPetDescriptorSchema,ga as WorkbenchPetDownloadRequestSchema,ha as WorkbenchPetDownloadResponseSchema,ba as WorkbenchPetFrameSchema,aa as WorkbenchPetSettingsSchema,Ve as isAgentFastModeAvailable,Z as isValidProjectDirectoryName,Sb as stripLeadingAgentSkillReferences}from'../chunk-YAHXVRU3.js';export{b as wallTimeToUnix,a as zonedDateTime}from'../chunk-IV4NRE4S.js';import'../chunk-YXJGRSCL.js';createRequire(import.meta.url);
|
|
1
|
+
import {createRequire}from'node:module';export{Nb as AGENT_FILE_ACCEPT,Mb as AGENT_IMAGE_ACCEPT,Yd as AccessModeSchema,Zd as AccessStatusResponseSchema,Lf as AddAgentQueuedSubmissionRequestSchema,Mf as AddAgentQueuedSubmissionResponseSchema,Ca as AddProjectRequestSchema,Da as AddProjectResponseSchema,Wc as AgentActivityItemSchema,Yc as AgentApprovalReviewActionSchema,Zc as AgentApprovalReviewItemSchema,Xc as AgentApprovalReviewStatusSchema,xd as AgentApprovalsReviewerSchema,Qb as AgentAttachmentKindSchema,Pb as AgentAttachmentMediaTypeSchema,cd as AgentAttachmentSchema,dd as AgentAttachmentUploadResponseSchema,ac as AgentBackgroundTerminalPageSchema,$b as AgentBackgroundTerminalSchema,Ie as AgentCapabilitiesSchema,Ad as AgentCollaborationModeSchema,_b as AgentCommandItemSchema,Zb as AgentCommandOutputOmissionSchema,Ld as AgentContextUsageSchema,Xe as AgentEventEnvelopeProperties,mg as AgentEventSchema,Tc as AgentFileChangeItemSchema,Qa as AgentFileChangeSchema,vd as AgentGlobalApprovalPolicySchema,Cd as AgentGlobalSettingsResponseSchema,Bd as AgentGlobalSettingsSchema,se as AgentGoalSchema,re as AgentGoalStatusSchema,sd as AgentGranularApprovalConfigSchema,td as AgentGranularApprovalPolicySchema,Ob as AgentImageMediaTypeSchema,$c as AgentItemSchema,Bb as AgentItemStatusSchema,gd as AgentMcpServerConnectionStatusSchema,id as AgentMcpServerFailureReasonSchema,kd as AgentMcpServerPageSchema,jd as AgentMcpServerSchema,hd as AgentMcpServerStartupStatusSchema,Tb as AgentMessageAttachmentSchema,Xb as AgentMessageItemSchema,Wb as AgentMessagePhaseSchema,Rb as AgentMessageSkillSchema,Fe as AgentModelPageSchema,Kd as AgentModelSchema,Wf as AgentMutationErrorCodeSchema,Xf as AgentMutationErrorSchema,Vc as AgentPlanItemSchema,Ae as AgentPlanSchema,ze as AgentPlanStepSchema,ye as AgentPlanStepStatusSchema,Cg as AgentPreferencesSchema,Ed as AgentProjectDefaultsResponseSchema,Dd as AgentProjectDefaultsSchema,md as AgentPromptInputSchema,Le as AgentProviderAccountSchema,Te as AgentProviderConnectionMutationResponseSchema,Ue as AgentProviderConnectionRecordSchema,Ke as AgentProviderConnectionStateSchema,Ne as AgentProviderConnectionStatusSchema,Je as AgentProviderModeSchema,Me as AgentProviderPendingLoginSchema,qd as AgentQueuedSubmissionListSchema,pd as AgentQueuedSubmissionPageSchema,od as AgentQueuedSubmissionSchema,nd as AgentQueuedSubmissionStatusSchema,Jd as AgentReasoningEffortOptionSchema,Yb as AgentReasoningItemSchema,_c as AgentReviewItemSchema,Cb as AgentReviewTargetSchema,yd as AgentSandboxModeSchema,Ge as AgentSkillPageSchema,ld as AgentSkillReferenceSchema,fd as AgentSkillSchema,ed as AgentSkillScopeSchema,zb as AgentTaskBaseSchema,jf as AgentTaskCatalogSchema,Ee as AgentTaskPageSchema,Ab as AgentTaskSchema,Fd as AgentTaskSettingsResponseSchema,zd as AgentTaskSettingsSchema,ug as AgentTaskSnapshotResponseSchema,Be as AgentTaskSnapshotSchema,Uc as AgentToolItemSchema,wd as AgentTurnApprovalPolicySchema,Id as AgentTurnOptionsSchema,bd as AgentTurnSchema,ad as AgentTurnStatusSchema,Ug as AnswerAsyncQuestionRequestSchema,Wg as AnswerAsyncQuestionResponseSchema,Vg as AnswerAsyncQuestionResultSchema,pc as AppInfoResponseSchema,mc as AppUpdateProgressPhaseSchema,oc as AppUpdateProgressResponseSchema,nc as AppUpdateProgressSchema,lc as AppUpdateStatusSchema,qf as ArchiveAgentTaskRequestSchema,rf as ArchiveAgentTaskResponseSchema,Sg as AsyncQuestionGroupSchema,Tg as AsyncQuestionPageSchema,Rg as AsyncQuestionSchema,Gg as BingWallpaperCatalogSchema,Fg as BingWallpaperSchema,ia as CODEXLY_USER_AGENT,Se as CancelProviderLoginRequestSchema,Ac as ClawhubSkillDetailSchema,yc as ClawhubSkillPageSchema,xc as ClawhubSkillSummarySchema,zc as ClawhubSkillVersionSchema,ve as ClearAgentGoalResponseSchema,ke as CommandApprovalPendingRequestSchema,ff as CommandOutputDeltaEventSchema,kb as CommitProjectChangesRequestSchema,ob as CommitProjectChangesResponseSchema,zf as CompactAgentTaskRequestSchema,Af as CompactAgentTaskResponseSchema,Zg as CompletedTasksPageSchema,Yg as CompletedTasksQuerySchema,Qe as ConfigureCustomProviderRequestSchema,Re as ConfigureCustomProviderResponseSchema,wc as ConfiguredMcpServerPageSchema,vc as ConfiguredMcpServerSchema,rg as ConnectionReadySchema,ab as CreateProjectBranchRequestSchema,_ as CreateProjectDirectoryRequestSchema,$ as CreateProjectDirectoryResponseSchema,db as CreateProjectWorktreeRequestSchema,gb as CreateProjectWorktreeResponseSchema,hb as CreateTaskWorktreeResponseSchema,ud as DEFAULT_AGENT_GRANULAR_APPROVAL_POLICY,rd as DEFAULT_COMMIT_MESSAGE_MODEL,Pf as DeleteAgentQueuedSubmissionResponseSchema,uf as DeleteAgentTaskRequestSchema,vf as DeleteAgentTaskResponseSchema,jc as DeleteArchivedTasksRequestSchema,kc as DeleteArchivedTasksResponseSchema,vb as DeleteProjectFileRequestSchema,wb as DeleteProjectFileResponseSchema,Pg as DeleteProjectTodoRequestSchema,Qg as DeleteProjectTodoResponseSchema,Wd as DeleteScheduledTaskResponseSchema,Xg as DismissAsyncQuestionsRequestSchema,qg as EventBatchSchema,We as EventCheckpointSchema,tg as EventStreamMessageSchema,xg as EventStreamMetricsResponseSchema,wg as EventStreamProjectMetricsSchema,ie as FileChangeApprovalPendingRequestSchema,ag as FileChangeUpdatedEventSchema,va as FilesystemRootSchema,Bf as ForkAgentTaskRequestSchema,Cf as ForkAgentTaskResponseSchema,ib as GenerateCommitMessageRequestSchema,jb as GenerateCommitMessageResponseSchema,mb as GitRemoteStateSchema,yg as GlobalInstructionsSchema,cc as GlobalSearchKindSchema,hf as GoalClearedEventSchema,ig as GoalUpdatedEventSchema,He as HealthResponseSchema,Eg as HistoryCompressionResultSchema,za as HostFileEntrySchema,xa as HostFileKindSchema,Aa as HostFileListingSchema,ya as HostFileQuerySchema,Ba as ImportHostAttachmentRequestSchema,qc as InstallAppUpdateRequestSchema,rc as InstallAppUpdateResponseSchema,uc as InstalledSkillPageSchema,tc as InstalledSkillSchema,Uf as InterruptAgentTurnRequestSchema,Vf as InterruptAgentTurnResponseSchema,dg as ItemCompletedEventSchema,eg as ItemStartedEventSchema,ae as LogoutAccessResponseSchema,Jb as MAX_AGENT_ATTACHMENT_BYTES,og as MAX_AGENT_EVENT_BYTES,Db as MAX_AGENT_FILE_BYTES,Eb as MAX_AGENT_FILE_TOTAL_BYTES,Kb as MAX_AGENT_HISTORY_IMAGES,Lb as MAX_AGENT_HISTORY_IMAGE_TOTAL_BYTES,Gb as MAX_AGENT_IMAGES,Fb as MAX_AGENT_IMAGE_BYTES,Hb as MAX_AGENT_IMAGE_TOTAL_BYTES,Ib as MAX_AGENT_TEXT_BYTES,pg as MAX_EVENT_BATCH_BYTES,ng as MAX_EVENT_BATCH_SIZE,Yf as MAX_REALTIME_DIFF_BYTES,Zf as MAX_REALTIME_FILE_CHANGES,_g as MAX_TEXT_FILE_BYTES,ce as McpElicitationFieldSchema,be as McpElicitationOptionSchema,ne as McpElicitationPendingRequestSchema,de as McpElicitationResolutionSchema,bg as McpServerStatusUpdatedEventSchema,Ag as MemorySettingsSchema,Bg as MemorySettingsUpdateSchema,Ye as MessageDeltaEventSchema,vg as NavigableAgentTaskResponseSchema,Nc as OfficialPluginAppSchema,Mc as OfficialPluginAssetSchema,Jc as OfficialPluginAuthPolicySchema,Oc as OfficialPluginDetailSchema,Qc as OfficialPluginInstallResponseSchema,Pc as OfficialPluginInstallResultSchema,Lc as OfficialPluginPageSchema,Kc as OfficialPluginSummarySchema,Sc as OfficialPluginUninstallResponseSchema,Rc as OfficialPluginUninstallResultSchema,Ub as OpenAgentTaskAttachmentRequestSchema,Vb as OpenAgentTaskAttachmentResponseSchema,Ja as OpenProjectRequestSchema,Ka as OpenProjectResponseSchema,Ic as OpenSkillDirectoryResponseSchema,_d as PairAccessRequestSchema,$d as PairAccessResponseSchema,fe as PendingApprovalDecisionSchema,je as PendingPermissionCategorySchema,jg as PendingRequestCreatedEventSchema,lg as PendingRequestExpiredEventSchema,kg as PendingRequestResolvedEventSchema,oe as PendingRequestSchema,ee as PendingRequestStatusSchema,ge as PendingUserInputOptionSchema,he as PendingUserInputQuestionSchema,le as PermissionApprovalPendingRequestSchema,Dg as PersonalizationResetSchema,mf as PinAgentTaskRequestSchema,nf as PinAgentTaskResponseSchema,Ze as PlanDeltaEventSchema,hg as PlanUpdatedEventSchema,sc as PluginReconcileResultSchema,ua as ProjectDirectoryEntrySchema,wa as ProjectDirectoryListingSchema,sa as ProjectDirectoryPathSchema,ta as ProjectDirectoryQuerySchema,sb as ProjectFileNameSchema,ra as ProjectFileReferencePathSchema,na as ProjectFileSearchEntrySchema,oa as ProjectFileSearchPageSchema,ma as ProjectFileSearchQuerySchema,la as ProjectFileSearchSessionIdSchema,pb as ProjectFileTreeEntrySchema,qb as ProjectFileTreeQuerySchema,rb as ProjectFileTreeSchema,Za as ProjectGitCommitFileDiffQuerySchema,_a as ProjectGitCommitFileDiffSchema,Xa as ProjectGitCommitFileSchema,Ya as ProjectGitCommitFilesPageSchema,Wa as ProjectGitCommitFilesQuerySchema,Ta as ProjectGitCommitSchema,Va as ProjectGitHistoryPageSchema,Ua as ProjectGitHistoryQuerySchema,ef as ProjectGitMetadataChangedEventSchema,Sa as ProjectGitStatusQuerySchema,Ra as ProjectGitStatusSchema,cb as ProjectGitWorktreePageSchema,bb as ProjectGitWorktreeSchema,Ea as ProjectOpenAppIdSchema,Fa as ProjectOpenAppKindSchema,Ga as ProjectOpenAppSchema,Ia as ProjectOpenCapabilitiesResponseSchema,Ha as ProjectOpenPlatformSchema,Ce as ProjectPageSchema,ka as ProjectRelativePathSchema,T as ProjectRootIdSchema,U as ProjectRootInputSchema,X as ProjectRootInputsSchema,S as ProjectRootPathSchema,Y as ProjectRootQuerySchema,V as ProjectRootSchema,W as ProjectRootsSchema,ja as ProjectSchema,xb as ProjectSourceFileQuerySchema,yb as ProjectSourceFileSchema,$g as ProjectTextFileRevisionSchema,ah as ProjectTextFileSchema,Kg as ProjectTodoDraftSchema,Mg as ProjectTodoPageSchema,Ng as ProjectTodoResponseSchema,Lg as ProjectTodoSchema,fb as ProjectWorktreeMutationResponseSchema,Jg as PromptDocumentPartSchema,gf as ProviderErrorEventSchema,lb as PushProjectCommitsRequestSchema,nb as PushProjectCommitsResponseSchema,df as QueueChangedEventSchema,$f as ReasoningDeltaEventSchema,Df as ReloadAgentMcpServersRequestSchema,Ef as ReloadAgentMcpServersResponseSchema,Oa as RemoveProjectRequestSchema,Pa as RemoveProjectResponseSchema,of as RenameAgentTaskRequestSchema,pf as RenameAgentTaskResponseSchema,tb as RenameProjectFileRequestSchema,ub as RenameProjectFileResponseSchema,Ma as RenameProjectRequestSchema,Na as RenameProjectResponseSchema,Qf as ReorderAgentQueuedSubmissionsRequestSchema,Rf as ReorderAgentQueuedSubmissionsResponseSchema,La as ReorderProjectsRequestSchema,De as ReorderProjectsResponseSchema,pe as ResolvePendingRequestRequestSchema,qe as ResolvePendingRequestResponseSchema,sg as ResyncRequiredSchema,xf as ReviewAgentTaskRequestSchema,yf as ReviewAgentTaskResponseSchema,zg as SaveGlobalInstructionsSchema,bh as SaveProjectTextFileRequestSchema,ch as SaveProjectTextFileResponseSchema,Og as SaveProjectTodoRequestSchema,Md as ScheduledTaskChangeSchema,Sd as ScheduledTaskInputSchema,Vd as ScheduledTaskMutationResponseSchema,Ud as ScheduledTaskPageSchema,Od as ScheduledTaskPreviewRequestSchema,Pd as ScheduledTaskPreviewSchema,Rd as ScheduledTaskRunSchema,Qd as ScheduledTaskRunStatusSchema,Nd as ScheduledTaskScheduleSchema,Td as ScheduledTaskSchema,fc as SearchOccurrenceSchema,hc as SearchOccurrencesPageSchema,gc as SearchOccurrencesQuerySchema,ec as SearchTextRangeSchema,Hc as SetMcpServerEnabledResponseSchema,Gc as SetMcpServerEnabledResultSchema,Xd as SetScheduledTaskEnabledRequestSchema,Fc as SetSkillEnabledResponseSchema,Ec as SetSkillEnabledResultSchema,Dc as SkillInstallResponseSchema,Cc as SkillInstallResultSchema,Bc as SkillInstallScopeSchema,cf as SkillsChangedEventSchema,Sf as StartAgentQueuedSubmissionRequestSchema,Tf as StartAgentQueuedSubmissionResponseSchema,kf as StartAgentTaskRequestSchema,lf as StartAgentTaskResponseSchema,Hf as StartAgentTurnRequestSchema,If as StartAgentTurnResponseSchema,Oe as StartOfficialProviderLoginRequestSchema,Pe as StartOfficialProviderLoginResponseSchema,Jf as SteerAgentTurnRequestSchema,Kf as SteerAgentTurnResponseSchema,pa as StopProjectFileSearchRequestSchema,qa as StopProjectFileSearchResponseSchema,Hg as SubmitTaskRequestSchema,Ig as SubmitTaskResponseSchema,$a as SwitchProjectBranchRequestSchema,eb as SwitchProjectWorktreeRequestSchema,xe as TEMPORARY_TASK_API_PATH,we as TEMPORARY_TASK_SCOPE_ID,if as TaskCatalogQuerySchema,cg as TaskMetadataChangedEventSchema,$e as TaskNoticeEventSchema,bf as TaskRemovedEventSchema,ic as TaskSearchPageSchema,dc as TaskSearchQuerySchema,af as TaskStatusUpdatedEventSchema,bc as TerminateAgentBackgroundTerminalResponseSchema,_e as ToolProgressEventSchema,fg as TurnCompletedEventSchema,_f as TurnStartedEventSchema,sf as UnarchiveAgentTaskRequestSchema,tf as UnarchiveAgentTaskResponseSchema,wf as UnsubscribeAgentTaskResponseSchema,te as UpdateAgentGoalRequestSchema,ue as UpdateAgentGoalResponseSchema,Nf as UpdateAgentQueuedSubmissionRequestSchema,Of as UpdateAgentQueuedSubmissionResponseSchema,Gd as UpdateTaskSettingsAndDefaultsRequestSchema,Hd as UpdateTaskSettingsAndDefaultsResponseSchema,Ff as UploadAgentFeedbackRequestSchema,Gf as UploadAgentFeedbackResponseSchema,gg as UsageUpdatedEventSchema,me as UserInputPendingRequestSchema,dh as WorkbenchChangeSchema,ca as WorkbenchPetAnimationFrameSchema,da as WorkbenchPetAnimationSchema,fa as WorkbenchPetCatalogResponseSchema,ea as WorkbenchPetDescriptorSchema,ga as WorkbenchPetDownloadRequestSchema,ha as WorkbenchPetDownloadResponseSchema,ba as WorkbenchPetFrameSchema,aa as WorkbenchPetSettingsSchema,Ve as isAgentFastModeAvailable,Z as isValidProjectDirectoryName,Sb as stripLeadingAgentSkillReferences}from'../chunk-63NQMTXZ.js';export{b as wallTimeToUnix,a as zonedDateTime}from'../chunk-IV4NRE4S.js';import'../chunk-YXJGRSCL.js';createRequire(import.meta.url);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {createRequire}from'node:module';export{q as CodexAppServerExitedError,t as CodexAppServerProcess,s as CodexAppServerShutdownError,r as CodexAppServerSpawnError,v as CodexProjectRepository,a as CodexProtocolMappingError,m as CodexProviderConnectionError,n as CodexProviderConnectionService,o as CodexRuntimeProvider,w as CodexWorkbenchPetProvider,f as JsonlRpcClient,b as RpcConnectionClosedError,c as RpcProtocolError,d as RpcResponseError,e as RpcTimeoutError,g as SUPPORTED_CODEX_VERSION,h as SUPPORTED_CODEX_VERSION_RANGE,j as checkCodexVersion,p as createCodexRuntimeProvider,x as createCodexWorkbenchPetProvider,i as locateCodexBinary,u as startCodexAppServer}from'../../chunk-
|
|
1
|
+
import {createRequire}from'node:module';export{q as CodexAppServerExitedError,t as CodexAppServerProcess,s as CodexAppServerShutdownError,r as CodexAppServerSpawnError,v as CodexProjectRepository,a as CodexProtocolMappingError,m as CodexProviderConnectionError,n as CodexProviderConnectionService,o as CodexRuntimeProvider,w as CodexWorkbenchPetProvider,f as JsonlRpcClient,b as RpcConnectionClosedError,c as RpcProtocolError,d as RpcResponseError,e as RpcTimeoutError,g as SUPPORTED_CODEX_VERSION,h as SUPPORTED_CODEX_VERSION_RANGE,j as checkCodexVersion,p as createCodexRuntimeProvider,x as createCodexWorkbenchPetProvider,i as locateCodexBinary,u as startCodexAppServer}from'../../chunk-5ULADQG3.js';import'../../chunk-XJOOU7A5.js';import'../../chunk-3WW7LK46.js';import'../../chunk-63NQMTXZ.js';import'../../chunk-IV4NRE4S.js';import'../../chunk-YXJGRSCL.js';createRequire(import.meta.url);
|
package/dist/server/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {createRequire}from'node:module';export{g as AccessSessionService,a as AgentEventStream,b as GitCommitError,d as GitCommitReviewError,j as SqliteStateRepository,c as commitSelectedProjectChanges,i as createCodexlyServer,h as normalizeAllowedHost,f as readProjectGitCommitFileDiff,e as readProjectGitCommitFiles}from'../chunk-
|
|
1
|
+
import {createRequire}from'node:module';export{g as AccessSessionService,a as AgentEventStream,b as GitCommitError,d as GitCommitReviewError,j as SqliteStateRepository,c as commitSelectedProjectChanges,i as createCodexlyServer,h as normalizeAllowedHost,f as readProjectGitCommitFileDiff,e as readProjectGitCommitFiles}from'../chunk-PFNMH4LN.js';import'../chunk-5AELLXXE.js';import'../chunk-5ULADQG3.js';import'../chunk-XJOOU7A5.js';import'../chunk-3WW7LK46.js';import'../chunk-63NQMTXZ.js';import'../chunk-IV4NRE4S.js';import'../chunk-YXJGRSCL.js';createRequire(import.meta.url);
|