@bryanhu/codexly 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +7 -5
- package/README.zh-CN.md +7 -5
- package/dist/{chunk-RGRRUTMD.js → chunk-G4BIMVEW.js} +67 -1
- package/dist/{chunk-PBPNBQQH.js → chunk-OVQSIEIK.js} +1 -1
- package/dist/{chunk-LZVKMW5Y.js → chunk-TVRHN6RY.js} +165 -2
- package/dist/{chunk-7C6JMXNO.js → chunk-XXAU2AQY.js} +275 -82
- package/dist/cli.js +49 -9
- package/dist/client/index.js +36 -2
- package/dist/protocol/index.js +1 -1
- package/dist/providers/codex/index.js +2 -2
- package/dist/server/index.js +4 -4
- package/dist/sqlite-state-worker.js +22 -5
- package/dist/web/.vite/manifest.json +184 -100
- package/dist/web/.vite/manifest.json.br +0 -0
- package/dist/web/.vite/manifest.json.gz +0 -0
- package/dist/web/assets/{button-group-C4BuwxSd.js → button-group-JQ4SKm_M.js} +1 -1
- package/dist/web/assets/button-group-JQ4SKm_M.js.br +0 -0
- package/dist/web/assets/button-group-JQ4SKm_M.js.gz +0 -0
- package/dist/web/assets/context-menu-BY4fW29a.js +1 -0
- package/dist/web/assets/context-menu-BY4fW29a.js.br +0 -0
- package/dist/web/assets/context-menu-BY4fW29a.js.gz +0 -0
- package/dist/web/assets/dist-Czw-hil0.js +1 -0
- package/dist/web/assets/dist-Czw-hil0.js.br +0 -0
- package/dist/web/assets/dist-Czw-hil0.js.gz +0 -0
- package/dist/web/assets/file-review-dialog-CQIeVer4.js +2 -0
- package/dist/web/assets/file-review-dialog-CQIeVer4.js.br +0 -0
- package/dist/web/assets/file-review-dialog-CQIeVer4.js.gz +0 -0
- package/dist/web/assets/git-history-panel-cnmuCR7N.js +2 -0
- package/dist/web/assets/git-history-panel-cnmuCR7N.js.br +0 -0
- package/dist/web/assets/git-history-panel-cnmuCR7N.js.gz +0 -0
- package/dist/web/assets/global-settings-dialog-BtJYh2_p.js +1 -0
- package/dist/web/assets/global-settings-dialog-BtJYh2_p.js.br +0 -0
- package/dist/web/assets/global-settings-dialog-BtJYh2_p.js.gz +0 -0
- package/dist/web/assets/index-BfZBHCrX.css +2 -0
- package/dist/web/assets/index-BfZBHCrX.css.br +0 -0
- package/dist/web/assets/index-BfZBHCrX.css.gz +0 -0
- package/dist/web/assets/index-CaTeB0Nm.js +4 -0
- package/dist/web/assets/index-CaTeB0Nm.js.br +0 -0
- package/dist/web/assets/index-CaTeB0Nm.js.gz +0 -0
- package/dist/web/assets/info-whxTXvIJ.js +1 -0
- package/dist/web/assets/info-whxTXvIJ.js.br +0 -0
- package/dist/web/assets/info-whxTXvIJ.js.gz +0 -0
- package/dist/web/assets/initial-deps-CQxWMuPh.js +1 -0
- package/dist/web/assets/initial-deps-CQxWMuPh.js.br +0 -0
- package/dist/web/assets/initial-deps-CQxWMuPh.js.gz +0 -0
- package/dist/web/assets/initial-deps-Ds-edw-P.js +1 -0
- package/dist/web/assets/initial-deps-Ds-edw-P.js.br +0 -0
- package/dist/web/assets/initial-deps-Ds-edw-P.js.gz +0 -0
- package/dist/web/assets/installed-skills-pane-mwXKrGXA.js +1 -0
- package/dist/web/assets/installed-skills-pane-mwXKrGXA.js.br +0 -0
- package/dist/web/assets/installed-skills-pane-mwXKrGXA.js.gz +0 -0
- package/dist/web/assets/{lazy-message-response-SxI8Oz6v.js → lazy-message-response-Biq2ok2E.js} +2 -2
- package/dist/web/assets/lazy-message-response-Biq2ok2E.js.br +0 -0
- package/dist/web/assets/lazy-message-response-Biq2ok2E.js.gz +0 -0
- package/dist/web/assets/mcp-management-pane-BdtuiZSq.js +1 -0
- package/dist/web/assets/mcp-management-pane-BdtuiZSq.js.br +0 -0
- package/dist/web/assets/mcp-management-pane-BdtuiZSq.js.gz +0 -0
- package/dist/web/assets/{message-response-CTSQq8Ae.js → message-response-CHtn6tyl.js} +1 -1
- package/dist/web/assets/message-response-CHtn6tyl.js.br +0 -0
- package/dist/web/assets/message-response-CHtn6tyl.js.gz +0 -0
- package/dist/web/assets/official-plugins-pane-BCxHJLaj.css +1 -0
- package/dist/web/assets/official-plugins-pane-BCxHJLaj.css.br +0 -0
- package/dist/web/assets/official-plugins-pane-BCxHJLaj.css.gz +0 -0
- package/dist/web/assets/official-plugins-pane-BfNSSHYd.js +1 -0
- package/dist/web/assets/official-plugins-pane-BfNSSHYd.js.br +0 -0
- package/dist/web/assets/official-plugins-pane-BfNSSHYd.js.gz +0 -0
- package/dist/web/assets/{project-file-popup-page-DX-AlvxF.js → project-file-popup-page-CfPvJlpw.js} +1 -1
- package/dist/web/assets/project-file-popup-page-CfPvJlpw.js.br +0 -0
- package/dist/web/assets/project-file-popup-page-CfPvJlpw.js.gz +0 -0
- package/dist/web/assets/{project-source-panel-i4xpffAa.js → project-source-panel-Cw_heTH4.js} +2 -2
- package/dist/web/assets/project-source-panel-Cw_heTH4.js.br +0 -0
- package/dist/web/assets/project-source-panel-Cw_heTH4.js.gz +0 -0
- package/dist/web/assets/{prompt-input-CL1AA6_U.js → prompt-input-C4sSOZy9.js} +1 -1
- package/dist/web/assets/prompt-input-C4sSOZy9.js.br +0 -0
- package/dist/web/assets/prompt-input-C4sSOZy9.js.gz +0 -0
- package/dist/web/assets/{prompt-input-controls-Qsp2rk3i.js → prompt-input-controls-CcVBHVXv.js} +1 -1
- package/dist/web/assets/prompt-input-controls-CcVBHVXv.js.br +0 -0
- package/dist/web/assets/prompt-input-controls-CcVBHVXv.js.gz +0 -0
- package/dist/web/assets/scheduled-task-date-time-picker-DwKbR28n.js +1 -0
- package/dist/web/assets/scheduled-task-date-time-picker-DwKbR28n.js.br +0 -0
- package/dist/web/assets/scheduled-task-date-time-picker-DwKbR28n.js.gz +0 -0
- package/dist/web/assets/{scheduled-task-floating-ui~scheduled-task-date-time-picker-BQ-Lfxrf.js → scheduled-task-floating-ui~scheduled-task-date-time-picker-BischM2-.js} +1 -1
- package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-BischM2-.js.br +0 -0
- package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-BischM2-.js.gz +0 -0
- package/dist/web/assets/scheduled-task-schedule-Cfuv_Kyf.js +1 -0
- package/dist/web/assets/scheduled-task-schedule-Cfuv_Kyf.js.br +0 -0
- package/dist/web/assets/scheduled-task-schedule-Cfuv_Kyf.js.gz +0 -0
- package/dist/web/assets/scheduled-tasks-container-CiYF44lc.js +2 -0
- package/dist/web/assets/scheduled-tasks-container-CiYF44lc.js.br +0 -0
- package/dist/web/assets/scheduled-tasks-container-CiYF44lc.js.gz +0 -0
- package/dist/web/assets/sheet-BNFRnQAh.js +1 -0
- package/dist/web/assets/sheet-BNFRnQAh.js.br +0 -0
- package/dist/web/assets/sheet-BNFRnQAh.js.gz +0 -0
- package/dist/web/assets/skills-market-container-C8okZy75.css +1 -0
- package/dist/web/assets/skills-market-container-C8okZy75.css.br +0 -0
- package/dist/web/assets/skills-market-container-C8okZy75.css.gz +0 -0
- package/dist/web/assets/skills-market-container-CfaZk3xM.js +2 -0
- package/dist/web/assets/skills-market-container-CfaZk3xM.js.br +0 -0
- package/dist/web/assets/skills-market-container-CfaZk3xM.js.gz +0 -0
- package/dist/web/assets/third-party-marketplace-pane-okgMXBqM.js +1 -0
- package/dist/web/assets/third-party-marketplace-pane-okgMXBqM.js.br +0 -0
- package/dist/web/assets/third-party-marketplace-pane-okgMXBqM.js.gz +0 -0
- package/dist/web/assets/workbench-composer-Bx73x_MF.js +10 -0
- package/dist/web/assets/workbench-composer-Bx73x_MF.js.br +0 -0
- package/dist/web/assets/workbench-composer-Bx73x_MF.js.gz +0 -0
- package/dist/web/assets/workbench-inspector-changes-DXkowHaf.js +2 -0
- package/dist/web/assets/workbench-inspector-changes-DXkowHaf.js.br +0 -0
- package/dist/web/assets/workbench-inspector-changes-DXkowHaf.js.gz +0 -0
- package/dist/web/assets/workbench-pet-canvas-BroOHYwq.js +1 -0
- package/dist/web/assets/workbench-pet-canvas-BroOHYwq.js.br +0 -0
- package/dist/web/assets/workbench-pet-canvas-BroOHYwq.js.gz +0 -0
- package/dist/web/assets/workbench-shell-DnnhILPt.js +8 -0
- package/dist/web/assets/workbench-shell-DnnhILPt.js.br +0 -0
- package/dist/web/assets/workbench-shell-DnnhILPt.js.gz +0 -0
- package/dist/web/index.html +5 -5
- 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/button-group-C4BuwxSd.js.br +0 -0
- package/dist/web/assets/button-group-C4BuwxSd.js.gz +0 -0
- package/dist/web/assets/context-menu-DBdIkdO8.js +0 -1
- package/dist/web/assets/context-menu-DBdIkdO8.js.br +0 -0
- package/dist/web/assets/context-menu-DBdIkdO8.js.gz +0 -0
- package/dist/web/assets/dist-B5i0uBCy.js +0 -1
- package/dist/web/assets/dist-B5i0uBCy.js.br +0 -0
- package/dist/web/assets/dist-B5i0uBCy.js.gz +0 -0
- package/dist/web/assets/file-review-dialog-CfW8qcnH.js +0 -2
- package/dist/web/assets/file-review-dialog-CfW8qcnH.js.br +0 -0
- package/dist/web/assets/file-review-dialog-CfW8qcnH.js.gz +0 -0
- package/dist/web/assets/git-history-panel-DDCwLZ_v.js +0 -2
- package/dist/web/assets/git-history-panel-DDCwLZ_v.js.br +0 -0
- package/dist/web/assets/git-history-panel-DDCwLZ_v.js.gz +0 -0
- package/dist/web/assets/global-settings-dialog-Cw-2IvEc.js +0 -1
- package/dist/web/assets/global-settings-dialog-Cw-2IvEc.js.br +0 -0
- package/dist/web/assets/global-settings-dialog-Cw-2IvEc.js.gz +0 -0
- package/dist/web/assets/index-DZEhkOZz.js +0 -4
- package/dist/web/assets/index-DZEhkOZz.js.br +0 -0
- package/dist/web/assets/index-DZEhkOZz.js.gz +0 -0
- package/dist/web/assets/index-mb9dY6_F.css +0 -2
- package/dist/web/assets/index-mb9dY6_F.css.br +0 -0
- package/dist/web/assets/index-mb9dY6_F.css.gz +0 -0
- package/dist/web/assets/initial-deps-Ccn2HMTB.js +0 -1
- package/dist/web/assets/initial-deps-Ccn2HMTB.js.br +0 -0
- package/dist/web/assets/initial-deps-Ccn2HMTB.js.gz +0 -0
- package/dist/web/assets/initial-deps-D1tR2tqv.js +0 -1
- package/dist/web/assets/initial-deps-D1tR2tqv.js.br +0 -0
- package/dist/web/assets/initial-deps-D1tR2tqv.js.gz +0 -0
- package/dist/web/assets/lazy-message-response-SxI8Oz6v.js.br +0 -0
- package/dist/web/assets/lazy-message-response-SxI8Oz6v.js.gz +0 -0
- package/dist/web/assets/message-response-CTSQq8Ae.js.br +0 -0
- package/dist/web/assets/message-response-CTSQq8Ae.js.gz +0 -0
- package/dist/web/assets/project-file-popup-page-DX-AlvxF.js.br +0 -0
- package/dist/web/assets/project-file-popup-page-DX-AlvxF.js.gz +0 -0
- package/dist/web/assets/project-source-panel-i4xpffAa.js.br +0 -0
- package/dist/web/assets/project-source-panel-i4xpffAa.js.gz +0 -0
- package/dist/web/assets/prompt-input-CL1AA6_U.js.br +0 -0
- package/dist/web/assets/prompt-input-CL1AA6_U.js.gz +0 -0
- package/dist/web/assets/prompt-input-controls-Qsp2rk3i.js.br +0 -0
- package/dist/web/assets/prompt-input-controls-Qsp2rk3i.js.gz +0 -0
- package/dist/web/assets/scheduled-task-date-time-picker-B2_XJQa7.js +0 -1
- package/dist/web/assets/scheduled-task-date-time-picker-B2_XJQa7.js.br +0 -0
- package/dist/web/assets/scheduled-task-date-time-picker-B2_XJQa7.js.gz +0 -0
- package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-BQ-Lfxrf.js.br +0 -0
- package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-BQ-Lfxrf.js.gz +0 -0
- package/dist/web/assets/scheduled-task-schedule-DVyf2brf.js +0 -1
- package/dist/web/assets/scheduled-task-schedule-DVyf2brf.js.br +0 -0
- package/dist/web/assets/scheduled-task-schedule-DVyf2brf.js.gz +0 -0
- package/dist/web/assets/scheduled-tasks-container-DWk8eU-x.js +0 -2
- package/dist/web/assets/scheduled-tasks-container-DWk8eU-x.js.br +0 -0
- package/dist/web/assets/scheduled-tasks-container-DWk8eU-x.js.gz +0 -0
- package/dist/web/assets/skills-market-container-C9djEXQt.css +0 -1
- package/dist/web/assets/skills-market-container-C9djEXQt.css.br +0 -0
- package/dist/web/assets/skills-market-container-C9djEXQt.css.gz +0 -0
- package/dist/web/assets/skills-market-container-DGLB9mLM.js +0 -1
- package/dist/web/assets/skills-market-container-DGLB9mLM.js.br +0 -0
- package/dist/web/assets/skills-market-container-DGLB9mLM.js.gz +0 -0
- package/dist/web/assets/workbench-composer-BD9Ki4HB.js +0 -10
- package/dist/web/assets/workbench-composer-BD9Ki4HB.js.br +0 -0
- package/dist/web/assets/workbench-composer-BD9Ki4HB.js.gz +0 -0
- package/dist/web/assets/workbench-inspector-changes-DAh6jOqk.js +0 -2
- package/dist/web/assets/workbench-inspector-changes-DAh6jOqk.js.br +0 -0
- package/dist/web/assets/workbench-inspector-changes-DAh6jOqk.js.gz +0 -0
- package/dist/web/assets/workbench-pet-canvas-BDehkHlv.js +0 -1
- package/dist/web/assets/workbench-pet-canvas-BDehkHlv.js.br +0 -0
- package/dist/web/assets/workbench-pet-canvas-BDehkHlv.js.gz +0 -0
- package/dist/web/assets/workbench-shell-3eEtoMzo.js +0 -8
- package/dist/web/assets/workbench-shell-3eEtoMzo.js.br +0 -0
- package/dist/web/assets/workbench-shell-3eEtoMzo.js.gz +0 -0
- /package/dist/web/assets/{scheduled-task-floating-ui~index~workbench-shell~skills-market-container~workbench-inspecto~y5cwo2qi-DAfditVv.js → scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~project-file-p~olri0nvu-DAfditVv.js} +0 -0
- /package/dist/web/assets/{scheduled-task-floating-ui~index~workbench-shell~skills-market-container~workbench-inspecto~y5cwo2qi-DAfditVv.js.br → scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~project-file-p~olri0nvu-DAfditVv.js.br} +0 -0
- /package/dist/web/assets/{scheduled-task-floating-ui~index~workbench-shell~skills-market-container~workbench-inspecto~y5cwo2qi-DAfditVv.js.gz → scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~project-file-p~olri0nvu-DAfditVv.js.gz} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';
|
|
2
|
-
import { value_exports } from './chunk-
|
|
3
|
-
import { require_pino, require_safe_stable_stringify, CodexProtocolMappingError, CodexProviderConnectionError, RpcConnectionClosedError, RpcProtocolError, RpcResponseError, RpcTimeoutError } from './chunk-
|
|
2
|
+
import { value_exports } from './chunk-OVQSIEIK.js';
|
|
3
|
+
import { require_pino, require_safe_stable_stringify, CodexProtocolMappingError, CodexProviderConnectionError, RpcConnectionClosedError, RpcProtocolError, RpcResponseError, RpcTimeoutError } from './chunk-TVRHN6RY.js';
|
|
4
4
|
import { WorkbenchPetProviderError, PendingRequestResolutionError } from './chunk-RNTA4MFS.js';
|
|
5
|
-
import { AGENT_FILE_EXTENSIONS, AGENT_FILE_MEDIA_TYPES, Type, SkillInstallScopeSchema, ScheduledTaskSchema, DEFAULT_COMMIT_MESSAGE_MODEL, TEMPORARY_TASK_API_PATH, TEMPORARY_TASK_SCOPE_ID, MAX_AGENT_FILE_BYTES, AccessStatusResponseSchema, PairAccessRequestSchema, HealthResponseSchema, AppInfoResponseSchema, AppUpdateProgressResponseSchema, AgentMutationErrorSchema, InstallAppUpdateResponseSchema, InstallAppUpdateRequestSchema, EventStreamMetricsResponseSchema, AgentCapabilitiesSchema, AgentModelPageSchema, AgentGlobalSettingsResponseSchema, AgentGlobalSettingsSchema, MAX_AGENT_IMAGE_BYTES, MAX_AGENT_TEXT_BYTES, AgentProviderConnectionStatusSchema, StartOfficialProviderLoginResponseSchema, StartOfficialProviderLoginRequestSchema, AgentProviderConnectionMutationResponseSchema, CancelProviderLoginRequestSchema, ConfigureCustomProviderResponseSchema, ConfigureCustomProviderRequestSchema, WorkbenchPetCatalogResponseSchema, WorkbenchPetDownloadResponseSchema, WorkbenchPetDownloadRequestSchema, ProjectPageSchema, HostFileListingSchema, HostFileQuerySchema, ProjectDirectoryListingSchema, ProjectDirectoryQuerySchema, ProjectOpenCapabilitiesResponseSchema, OpenProjectResponseSchema, ProjectRootQuerySchema, OpenProjectRequestSchema, ReorderProjectsResponseSchema, ReorderProjectsRequestSchema, AgentSkillPageSchema, AgentProjectDefaultsResponseSchema, AgentProjectDefaultsSchema, AddProjectResponseSchema, AddProjectRequestSchema, RenameProjectResponseSchema, RenameProjectRequestSchema, RemoveProjectResponseSchema, RemoveProjectRequestSchema, InstalledSkillPageSchema, ClawhubSkillPageSchema, ClawhubSkillDetailSchema, ConfiguredMcpServerPageSchema, OpenSkillDirectoryResponseSchema, SetSkillEnabledResponseSchema, SetMcpServerEnabledResponseSchema, SkillInstallResultSchema, ScheduledTaskPageSchema, ScheduledTaskMutationResponseSchema, ScheduledTaskInputSchema, DeleteScheduledTaskResponseSchema, SetScheduledTaskEnabledRequestSchema, AgentTaskPageSchema, UnsubscribeAgentTaskResponseSchema, AgentTaskSnapshotResponseSchema, AgentMcpServerPageSchema, AgentBackgroundTerminalPageSchema, TerminateAgentBackgroundTerminalResponseSchema, PinAgentTaskResponseSchema, PinAgentTaskRequestSchema, RenameAgentTaskResponseSchema, RenameAgentTaskRequestSchema, ArchiveAgentTaskResponseSchema, ArchiveAgentTaskRequestSchema, UnarchiveAgentTaskResponseSchema, UnarchiveAgentTaskRequestSchema, DeleteAgentTaskResponseSchema, DeleteAgentTaskRequestSchema, StartAgentTaskResponseSchema, StartAgentTaskRequestSchema, StartAgentTurnResponseSchema, StartAgentTurnRequestSchema, SteerAgentTurnResponseSchema, SteerAgentTurnRequestSchema, InterruptAgentTurnResponseSchema, InterruptAgentTurnRequestSchema, ResolvePendingRequestResponseSchema, ResolvePendingRequestRequestSchema, AgentQueuedSubmissionPageSchema, AddAgentQueuedSubmissionResponseSchema, AddAgentQueuedSubmissionRequestSchema, UpdateAgentQueuedSubmissionResponseSchema, UpdateAgentQueuedSubmissionRequestSchema, DeleteAgentQueuedSubmissionResponseSchema, ReorderAgentQueuedSubmissionsResponseSchema, ReorderAgentQueuedSubmissionsRequestSchema, StartAgentQueuedSubmissionResponseSchema, StartAgentQueuedSubmissionRequestSchema, AgentPromptInputSchema, AgentProviderConnectionRecordSchema, MAX_AGENT_IMAGES, MAX_AGENT_IMAGE_TOTAL_BYTES, MAX_AGENT_FILE_TOTAL_BYTES, ProjectGitStatusSchema, ProjectGitStatusQuerySchema, ProjectGitHistoryPageSchema, ProjectGitHistoryQuerySchema, ProjectGitCommitFilesPageSchema, ProjectGitCommitFilesQuerySchema, ProjectGitCommitFileDiffSchema, ProjectGitCommitFileDiffQuerySchema, SwitchProjectBranchRequestSchema, CreateProjectBranchRequestSchema, GenerateCommitMessageResponseSchema, GenerateCommitMessageRequestSchema, CommitProjectChangesResponseSchema, CommitProjectChangesRequestSchema, ProjectFileTreeSchema, ProjectFileTreeQuerySchema, ProjectFileSearchPageSchema, ProjectFileSearchQuerySchema, StopProjectFileSearchResponseSchema, StopProjectFileSearchRequestSchema, ProjectSourceFileQuerySchema, ProjectSourceFileSchema, AgentAttachmentUploadResponseSchema, HostFileKindSchema, ImportHostAttachmentRequestSchema, AgentAttachmentKindSchema, AgentTaskSettingsResponseSchema, AgentTaskSettingsSchema, ReloadAgentMcpServersResponseSchema, ReloadAgentMcpServersRequestSchema, ReviewAgentTaskResponseSchema, ReviewAgentTaskRequestSchema, CompactAgentTaskResponseSchema, CompactAgentTaskRequestSchema, ForkAgentTaskResponseSchema, ForkAgentTaskRequestSchema, UploadAgentFeedbackResponseSchema, UploadAgentFeedbackRequestSchema, OpenAgentTaskAttachmentResponseSchema, OpenAgentTaskAttachmentRequestSchema, UpdateAgentGoalResponseSchema, UpdateAgentGoalRequestSchema, ClearAgentGoalResponseSchema, AgentMessageAttachmentSchema, ProjectGitWorktreePageSchema, ProjectWorktreeMutationResponseSchema, CreateProjectWorktreeRequestSchema, SwitchProjectWorktreeRequestSchema, RenameProjectFileResponseSchema, RenameProjectFileRequestSchema, DeleteProjectFileResponseSchema, DeleteProjectFileRequestSchema, MAX_EVENT_BATCH_SIZE } from './chunk-
|
|
5
|
+
import { AGENT_FILE_EXTENSIONS, AGENT_FILE_MEDIA_TYPES, Type, SkillInstallScopeSchema, ScheduledTaskSchema, AgentTurnSchema, DEFAULT_COMMIT_MESSAGE_MODEL, TEMPORARY_TASK_API_PATH, TEMPORARY_TASK_SCOPE_ID, MAX_AGENT_FILE_BYTES, AccessStatusResponseSchema, PairAccessRequestSchema, HealthResponseSchema, AppInfoResponseSchema, AppUpdateProgressResponseSchema, AgentMutationErrorSchema, InstallAppUpdateResponseSchema, InstallAppUpdateRequestSchema, EventStreamMetricsResponseSchema, AgentCapabilitiesSchema, AgentModelPageSchema, AgentGlobalSettingsResponseSchema, AgentGlobalSettingsSchema, MAX_AGENT_IMAGE_BYTES, MAX_AGENT_TEXT_BYTES, AgentProviderConnectionStatusSchema, StartOfficialProviderLoginResponseSchema, StartOfficialProviderLoginRequestSchema, AgentProviderConnectionMutationResponseSchema, CancelProviderLoginRequestSchema, ConfigureCustomProviderResponseSchema, ConfigureCustomProviderRequestSchema, WorkbenchPetCatalogResponseSchema, WorkbenchPetDownloadResponseSchema, WorkbenchPetDownloadRequestSchema, ProjectPageSchema, HostFileListingSchema, HostFileQuerySchema, ProjectDirectoryListingSchema, ProjectDirectoryQuerySchema, ProjectOpenCapabilitiesResponseSchema, OpenProjectResponseSchema, ProjectRootQuerySchema, OpenProjectRequestSchema, ReorderProjectsResponseSchema, ReorderProjectsRequestSchema, AgentSkillPageSchema, AgentProjectDefaultsResponseSchema, AgentProjectDefaultsSchema, AddProjectResponseSchema, AddProjectRequestSchema, RenameProjectResponseSchema, RenameProjectRequestSchema, RemoveProjectResponseSchema, RemoveProjectRequestSchema, InstalledSkillPageSchema, OfficialPluginPageSchema, OfficialPluginDetailSchema, OfficialPluginInstallResultSchema, OfficialPluginUninstallResultSchema, ClawhubSkillPageSchema, ClawhubSkillDetailSchema, ConfiguredMcpServerPageSchema, OpenSkillDirectoryResponseSchema, SetSkillEnabledResponseSchema, SetMcpServerEnabledResponseSchema, SkillInstallResultSchema, ScheduledTaskPageSchema, ScheduledTaskMutationResponseSchema, ScheduledTaskInputSchema, DeleteScheduledTaskResponseSchema, SetScheduledTaskEnabledRequestSchema, AgentTaskPageSchema, UnsubscribeAgentTaskResponseSchema, AgentTaskSnapshotResponseSchema, AgentMcpServerPageSchema, AgentBackgroundTerminalPageSchema, TerminateAgentBackgroundTerminalResponseSchema, PinAgentTaskResponseSchema, PinAgentTaskRequestSchema, RenameAgentTaskResponseSchema, RenameAgentTaskRequestSchema, ArchiveAgentTaskResponseSchema, ArchiveAgentTaskRequestSchema, UnarchiveAgentTaskResponseSchema, UnarchiveAgentTaskRequestSchema, DeleteAgentTaskResponseSchema, DeleteAgentTaskRequestSchema, StartAgentTaskResponseSchema, StartAgentTaskRequestSchema, StartAgentTurnResponseSchema, StartAgentTurnRequestSchema, SteerAgentTurnResponseSchema, SteerAgentTurnRequestSchema, InterruptAgentTurnResponseSchema, InterruptAgentTurnRequestSchema, ResolvePendingRequestResponseSchema, ResolvePendingRequestRequestSchema, AgentQueuedSubmissionPageSchema, AddAgentQueuedSubmissionResponseSchema, AddAgentQueuedSubmissionRequestSchema, UpdateAgentQueuedSubmissionResponseSchema, UpdateAgentQueuedSubmissionRequestSchema, DeleteAgentQueuedSubmissionResponseSchema, ReorderAgentQueuedSubmissionsResponseSchema, ReorderAgentQueuedSubmissionsRequestSchema, StartAgentQueuedSubmissionResponseSchema, StartAgentQueuedSubmissionRequestSchema, AgentPromptInputSchema, AgentProviderConnectionRecordSchema, MAX_AGENT_IMAGES, MAX_AGENT_IMAGE_TOTAL_BYTES, MAX_AGENT_FILE_TOTAL_BYTES, ProjectGitStatusSchema, ProjectGitStatusQuerySchema, ProjectGitHistoryPageSchema, ProjectGitHistoryQuerySchema, ProjectGitCommitFilesPageSchema, ProjectGitCommitFilesQuerySchema, ProjectGitCommitFileDiffSchema, ProjectGitCommitFileDiffQuerySchema, SwitchProjectBranchRequestSchema, CreateProjectBranchRequestSchema, GenerateCommitMessageResponseSchema, GenerateCommitMessageRequestSchema, CommitProjectChangesResponseSchema, CommitProjectChangesRequestSchema, ProjectFileTreeSchema, ProjectFileTreeQuerySchema, ProjectFileSearchPageSchema, ProjectFileSearchQuerySchema, StopProjectFileSearchResponseSchema, StopProjectFileSearchRequestSchema, ProjectSourceFileQuerySchema, ProjectSourceFileSchema, AgentAttachmentUploadResponseSchema, HostFileKindSchema, ImportHostAttachmentRequestSchema, AgentAttachmentKindSchema, AgentTaskSettingsResponseSchema, AgentTaskSettingsSchema, ReloadAgentMcpServersResponseSchema, ReloadAgentMcpServersRequestSchema, ReviewAgentTaskResponseSchema, ReviewAgentTaskRequestSchema, CompactAgentTaskResponseSchema, CompactAgentTaskRequestSchema, ForkAgentTaskResponseSchema, ForkAgentTaskRequestSchema, UploadAgentFeedbackResponseSchema, UploadAgentFeedbackRequestSchema, OpenAgentTaskAttachmentResponseSchema, OpenAgentTaskAttachmentRequestSchema, UpdateAgentGoalResponseSchema, UpdateAgentGoalRequestSchema, ClearAgentGoalResponseSchema, AgentMessageAttachmentSchema, ProjectGitWorktreePageSchema, ProjectWorktreeMutationResponseSchema, CreateProjectWorktreeRequestSchema, SwitchProjectWorktreeRequestSchema, RenameProjectFileResponseSchema, RenameProjectFileRequestSchema, DeleteProjectFileResponseSchema, DeleteProjectFileRequestSchema, MAX_EVENT_BATCH_SIZE } from './chunk-G4BIMVEW.js';
|
|
6
6
|
import { __commonJS, __require, __toESM } from './chunk-K6J42667.js';
|
|
7
7
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
8
8
|
import { randomBytes, createHash, timingSafeEqual, randomUUID } from 'crypto';
|
|
@@ -36591,10 +36591,10 @@ var require_resolve_block_map = __commonJS({
|
|
|
36591
36591
|
let offset = bm.offset;
|
|
36592
36592
|
let commentEnd = null;
|
|
36593
36593
|
for (const collItem of bm.items) {
|
|
36594
|
-
const { start, key, sep:
|
|
36594
|
+
const { start, key, sep: sep7, value } = collItem;
|
|
36595
36595
|
const keyProps = resolveProps.resolveProps(start, {
|
|
36596
36596
|
indicator: "explicit-key-ind",
|
|
36597
|
-
next: key ??
|
|
36597
|
+
next: key ?? sep7?.[0],
|
|
36598
36598
|
offset,
|
|
36599
36599
|
onError: onError2,
|
|
36600
36600
|
parentIndent: bm.indent,
|
|
@@ -36608,7 +36608,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
36608
36608
|
else if ("indent" in key && key.indent !== bm.indent)
|
|
36609
36609
|
onError2(offset, "BAD_INDENT", startColMsg);
|
|
36610
36610
|
}
|
|
36611
|
-
if (!keyProps.anchor && !keyProps.tag && !
|
|
36611
|
+
if (!keyProps.anchor && !keyProps.tag && !sep7) {
|
|
36612
36612
|
commentEnd = keyProps.end;
|
|
36613
36613
|
if (keyProps.comment) {
|
|
36614
36614
|
if (map.comment)
|
|
@@ -36632,7 +36632,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
36632
36632
|
ctx.atKey = false;
|
|
36633
36633
|
if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode))
|
|
36634
36634
|
onError2(keyStart, "DUPLICATE_KEY", "Map keys must be unique");
|
|
36635
|
-
const valueProps = resolveProps.resolveProps(
|
|
36635
|
+
const valueProps = resolveProps.resolveProps(sep7 ?? [], {
|
|
36636
36636
|
indicator: "map-value-ind",
|
|
36637
36637
|
next: value,
|
|
36638
36638
|
offset: keyNode.range[2],
|
|
@@ -36648,7 +36648,7 @@ var require_resolve_block_map = __commonJS({
|
|
|
36648
36648
|
if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024)
|
|
36649
36649
|
onError2(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key");
|
|
36650
36650
|
}
|
|
36651
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError2) : composeEmptyNode(ctx, offset,
|
|
36651
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError2) : composeEmptyNode(ctx, offset, sep7, null, valueProps, onError2);
|
|
36652
36652
|
if (ctx.schema.compat)
|
|
36653
36653
|
utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError2);
|
|
36654
36654
|
offset = valueNode.range[2];
|
|
@@ -36737,7 +36737,7 @@ var require_resolve_end = __commonJS({
|
|
|
36737
36737
|
let comment = "";
|
|
36738
36738
|
if (end) {
|
|
36739
36739
|
let hasSpace = false;
|
|
36740
|
-
let
|
|
36740
|
+
let sep7 = "";
|
|
36741
36741
|
for (const token of end) {
|
|
36742
36742
|
const { source, type } = token;
|
|
36743
36743
|
switch (type) {
|
|
@@ -36751,13 +36751,13 @@ var require_resolve_end = __commonJS({
|
|
|
36751
36751
|
if (!comment)
|
|
36752
36752
|
comment = cb;
|
|
36753
36753
|
else
|
|
36754
|
-
comment +=
|
|
36755
|
-
|
|
36754
|
+
comment += sep7 + cb;
|
|
36755
|
+
sep7 = "";
|
|
36756
36756
|
break;
|
|
36757
36757
|
}
|
|
36758
36758
|
case "newline":
|
|
36759
36759
|
if (comment)
|
|
36760
|
-
|
|
36760
|
+
sep7 += source;
|
|
36761
36761
|
hasSpace = true;
|
|
36762
36762
|
break;
|
|
36763
36763
|
default:
|
|
@@ -36799,18 +36799,18 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
36799
36799
|
let offset = fc.offset + fc.start.source.length;
|
|
36800
36800
|
for (let i2 = 0; i2 < fc.items.length; ++i2) {
|
|
36801
36801
|
const collItem = fc.items[i2];
|
|
36802
|
-
const { start, key, sep:
|
|
36802
|
+
const { start, key, sep: sep7, value } = collItem;
|
|
36803
36803
|
const props = resolveProps.resolveProps(start, {
|
|
36804
36804
|
flow: fcName,
|
|
36805
36805
|
indicator: "explicit-key-ind",
|
|
36806
|
-
next: key ??
|
|
36806
|
+
next: key ?? sep7?.[0],
|
|
36807
36807
|
offset,
|
|
36808
36808
|
onError: onError2,
|
|
36809
36809
|
parentIndent: fc.indent,
|
|
36810
36810
|
startOnNewline: false
|
|
36811
36811
|
});
|
|
36812
36812
|
if (!props.found) {
|
|
36813
|
-
if (!props.anchor && !props.tag && !
|
|
36813
|
+
if (!props.anchor && !props.tag && !sep7 && !value) {
|
|
36814
36814
|
if (i2 === 0 && props.comma)
|
|
36815
36815
|
onError2(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`);
|
|
36816
36816
|
else if (i2 < fc.items.length - 1)
|
|
@@ -36864,8 +36864,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
36864
36864
|
}
|
|
36865
36865
|
}
|
|
36866
36866
|
}
|
|
36867
|
-
if (!isMap && !
|
|
36868
|
-
const valueNode = value ? composeNode(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end,
|
|
36867
|
+
if (!isMap && !sep7 && !props.found) {
|
|
36868
|
+
const valueNode = value ? composeNode(ctx, value, props, onError2) : composeEmptyNode(ctx, props.end, sep7, null, props, onError2);
|
|
36869
36869
|
coll.items.push(valueNode);
|
|
36870
36870
|
offset = valueNode.range[2];
|
|
36871
36871
|
if (isBlock(value))
|
|
@@ -36877,7 +36877,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
36877
36877
|
if (isBlock(key))
|
|
36878
36878
|
onError2(keyNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
36879
36879
|
ctx.atKey = false;
|
|
36880
|
-
const valueProps = resolveProps.resolveProps(
|
|
36880
|
+
const valueProps = resolveProps.resolveProps(sep7 ?? [], {
|
|
36881
36881
|
flow: fcName,
|
|
36882
36882
|
indicator: "map-value-ind",
|
|
36883
36883
|
next: value,
|
|
@@ -36888,8 +36888,8 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
36888
36888
|
});
|
|
36889
36889
|
if (valueProps.found) {
|
|
36890
36890
|
if (!isMap && !props.found && ctx.options.strict) {
|
|
36891
|
-
if (
|
|
36892
|
-
for (const st of
|
|
36891
|
+
if (sep7)
|
|
36892
|
+
for (const st of sep7) {
|
|
36893
36893
|
if (st === valueProps.found)
|
|
36894
36894
|
break;
|
|
36895
36895
|
if (st.type === "newline") {
|
|
@@ -36906,7 +36906,7 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
36906
36906
|
else
|
|
36907
36907
|
onError2(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`);
|
|
36908
36908
|
}
|
|
36909
|
-
const valueNode = value ? composeNode(ctx, value, valueProps, onError2) : valueProps.found ? composeEmptyNode(ctx, valueProps.end,
|
|
36909
|
+
const valueNode = value ? composeNode(ctx, value, valueProps, onError2) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep7, null, valueProps, onError2) : null;
|
|
36910
36910
|
if (valueNode) {
|
|
36911
36911
|
if (isBlock(value))
|
|
36912
36912
|
onError2(valueNode.range, "BLOCK_IN_FLOW", blockMsg);
|
|
@@ -37084,7 +37084,7 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
37084
37084
|
chompStart = i2 + 1;
|
|
37085
37085
|
}
|
|
37086
37086
|
let value = "";
|
|
37087
|
-
let
|
|
37087
|
+
let sep7 = "";
|
|
37088
37088
|
let prevMoreIndented = false;
|
|
37089
37089
|
for (let i2 = 0; i2 < contentStart; ++i2)
|
|
37090
37090
|
value += lines[i2][0].slice(trimIndent) + "\n";
|
|
@@ -37101,24 +37101,24 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
37101
37101
|
indent = "";
|
|
37102
37102
|
}
|
|
37103
37103
|
if (type === Scalar.Scalar.BLOCK_LITERAL) {
|
|
37104
|
-
value +=
|
|
37105
|
-
|
|
37104
|
+
value += sep7 + indent.slice(trimIndent) + content;
|
|
37105
|
+
sep7 = "\n";
|
|
37106
37106
|
} else if (indent.length > trimIndent || content[0] === " ") {
|
|
37107
|
-
if (
|
|
37108
|
-
|
|
37109
|
-
else if (!prevMoreIndented &&
|
|
37110
|
-
|
|
37111
|
-
value +=
|
|
37112
|
-
|
|
37107
|
+
if (sep7 === " ")
|
|
37108
|
+
sep7 = "\n";
|
|
37109
|
+
else if (!prevMoreIndented && sep7 === "\n")
|
|
37110
|
+
sep7 = "\n\n";
|
|
37111
|
+
value += sep7 + indent.slice(trimIndent) + content;
|
|
37112
|
+
sep7 = "\n";
|
|
37113
37113
|
prevMoreIndented = true;
|
|
37114
37114
|
} else if (content === "") {
|
|
37115
|
-
if (
|
|
37115
|
+
if (sep7 === "\n")
|
|
37116
37116
|
value += "\n";
|
|
37117
37117
|
else
|
|
37118
|
-
|
|
37118
|
+
sep7 = "\n";
|
|
37119
37119
|
} else {
|
|
37120
|
-
value +=
|
|
37121
|
-
|
|
37120
|
+
value += sep7 + content;
|
|
37121
|
+
sep7 = " ";
|
|
37122
37122
|
prevMoreIndented = false;
|
|
37123
37123
|
}
|
|
37124
37124
|
}
|
|
@@ -37299,25 +37299,25 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
37299
37299
|
if (!match)
|
|
37300
37300
|
return source;
|
|
37301
37301
|
let res = match[1];
|
|
37302
|
-
let
|
|
37302
|
+
let sep7 = " ";
|
|
37303
37303
|
let pos = first2.lastIndex;
|
|
37304
37304
|
line.lastIndex = pos;
|
|
37305
37305
|
while (match = line.exec(source)) {
|
|
37306
37306
|
if (match[1] === "") {
|
|
37307
|
-
if (
|
|
37308
|
-
res +=
|
|
37307
|
+
if (sep7 === "\n")
|
|
37308
|
+
res += sep7;
|
|
37309
37309
|
else
|
|
37310
|
-
|
|
37310
|
+
sep7 = "\n";
|
|
37311
37311
|
} else {
|
|
37312
|
-
res +=
|
|
37313
|
-
|
|
37312
|
+
res += sep7 + match[1];
|
|
37313
|
+
sep7 = " ";
|
|
37314
37314
|
}
|
|
37315
37315
|
pos = line.lastIndex;
|
|
37316
37316
|
}
|
|
37317
37317
|
const last2 = /[ \t]*(.*)/sy;
|
|
37318
37318
|
last2.lastIndex = pos;
|
|
37319
37319
|
match = last2.exec(source);
|
|
37320
|
-
return res +
|
|
37320
|
+
return res + sep7 + (match?.[1] ?? "");
|
|
37321
37321
|
}
|
|
37322
37322
|
function doubleQuotedValue(source, onError2) {
|
|
37323
37323
|
let res = "";
|
|
@@ -38120,14 +38120,14 @@ var require_cst_stringify = __commonJS({
|
|
|
38120
38120
|
}
|
|
38121
38121
|
}
|
|
38122
38122
|
}
|
|
38123
|
-
function stringifyItem({ start, key, sep:
|
|
38123
|
+
function stringifyItem({ start, key, sep: sep7, value }) {
|
|
38124
38124
|
let res = "";
|
|
38125
38125
|
for (const st of start)
|
|
38126
38126
|
res += st.source;
|
|
38127
38127
|
if (key)
|
|
38128
38128
|
res += stringifyToken(key);
|
|
38129
|
-
if (
|
|
38130
|
-
for (const st of
|
|
38129
|
+
if (sep7)
|
|
38130
|
+
for (const st of sep7)
|
|
38131
38131
|
res += st.source;
|
|
38132
38132
|
if (value)
|
|
38133
38133
|
res += stringifyToken(value);
|
|
@@ -39289,18 +39289,18 @@ var require_parser = __commonJS({
|
|
|
39289
39289
|
if (this.type === "map-value-ind") {
|
|
39290
39290
|
const prev = getPrevProps(this.peek(2));
|
|
39291
39291
|
const start = getFirstKeyStartProps(prev);
|
|
39292
|
-
let
|
|
39292
|
+
let sep7;
|
|
39293
39293
|
if (scalar.end) {
|
|
39294
|
-
|
|
39295
|
-
|
|
39294
|
+
sep7 = scalar.end;
|
|
39295
|
+
sep7.push(this.sourceToken);
|
|
39296
39296
|
delete scalar.end;
|
|
39297
39297
|
} else
|
|
39298
|
-
|
|
39298
|
+
sep7 = [this.sourceToken];
|
|
39299
39299
|
const map = {
|
|
39300
39300
|
type: "block-map",
|
|
39301
39301
|
offset: scalar.offset,
|
|
39302
39302
|
indent: scalar.indent,
|
|
39303
|
-
items: [{ start, key: scalar, sep:
|
|
39303
|
+
items: [{ start, key: scalar, sep: sep7 }]
|
|
39304
39304
|
};
|
|
39305
39305
|
this.onKeyLine = true;
|
|
39306
39306
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -39453,15 +39453,15 @@ var require_parser = __commonJS({
|
|
|
39453
39453
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
39454
39454
|
const start2 = getFirstKeyStartProps(it.start);
|
|
39455
39455
|
const key = it.key;
|
|
39456
|
-
const
|
|
39457
|
-
|
|
39456
|
+
const sep7 = it.sep;
|
|
39457
|
+
sep7.push(this.sourceToken);
|
|
39458
39458
|
delete it.key;
|
|
39459
39459
|
delete it.sep;
|
|
39460
39460
|
this.stack.push({
|
|
39461
39461
|
type: "block-map",
|
|
39462
39462
|
offset: this.offset,
|
|
39463
39463
|
indent: this.indent,
|
|
39464
|
-
items: [{ start: start2, key, sep:
|
|
39464
|
+
items: [{ start: start2, key, sep: sep7 }]
|
|
39465
39465
|
});
|
|
39466
39466
|
} else if (start.length > 0) {
|
|
39467
39467
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -39655,13 +39655,13 @@ var require_parser = __commonJS({
|
|
|
39655
39655
|
const prev = getPrevProps(parent);
|
|
39656
39656
|
const start = getFirstKeyStartProps(prev);
|
|
39657
39657
|
fixFlowSeqItems(fc);
|
|
39658
|
-
const
|
|
39659
|
-
|
|
39658
|
+
const sep7 = fc.end.splice(1, fc.end.length);
|
|
39659
|
+
sep7.push(this.sourceToken);
|
|
39660
39660
|
const map = {
|
|
39661
39661
|
type: "block-map",
|
|
39662
39662
|
offset: fc.offset,
|
|
39663
39663
|
indent: fc.indent,
|
|
39664
|
-
items: [{ start, key: fc, sep:
|
|
39664
|
+
items: [{ start, key: fc, sep: sep7 }]
|
|
39665
39665
|
};
|
|
39666
39666
|
this.onKeyLine = true;
|
|
39667
39667
|
this.stack[this.stack.length - 1] = map;
|
|
@@ -47282,7 +47282,7 @@ var require_send = __commonJS({
|
|
|
47282
47282
|
var join12 = path.join;
|
|
47283
47283
|
var normalize2 = path.normalize;
|
|
47284
47284
|
var resolve8 = path.resolve;
|
|
47285
|
-
var
|
|
47285
|
+
var sep7 = path.sep;
|
|
47286
47286
|
var Readable4 = stream.Readable;
|
|
47287
47287
|
var BYTES_RANGE_REGEXP = /^ *bytes=/;
|
|
47288
47288
|
var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1e3;
|
|
@@ -47359,20 +47359,20 @@ var require_send = __commonJS({
|
|
|
47359
47359
|
let parts;
|
|
47360
47360
|
if (root !== null) {
|
|
47361
47361
|
if (path2) {
|
|
47362
|
-
path2 = normalize2("." +
|
|
47362
|
+
path2 = normalize2("." + sep7 + path2);
|
|
47363
47363
|
}
|
|
47364
47364
|
if (UP_PATH_REGEXP.test(path2)) {
|
|
47365
47365
|
debug2('malicious path "%s"', path2);
|
|
47366
47366
|
return { statusCode: 403 };
|
|
47367
47367
|
}
|
|
47368
|
-
parts = path2.split(
|
|
47368
|
+
parts = path2.split(sep7);
|
|
47369
47369
|
path2 = normalize2(join12(root, path2));
|
|
47370
47370
|
} else {
|
|
47371
47371
|
if (UP_PATH_REGEXP.test(path2)) {
|
|
47372
47372
|
debug2('malicious path "%s"', path2);
|
|
47373
47373
|
return { statusCode: 403 };
|
|
47374
47374
|
}
|
|
47375
|
-
parts = normalize2(path2).split(
|
|
47375
|
+
parts = normalize2(path2).split(sep7);
|
|
47376
47376
|
path2 = resolve8(path2);
|
|
47377
47377
|
}
|
|
47378
47378
|
return { path: path2, parts };
|
|
@@ -47665,7 +47665,7 @@ var require_send = __commonJS({
|
|
|
47665
47665
|
}
|
|
47666
47666
|
async function sendFile(request2, path2, options) {
|
|
47667
47667
|
const { error, stat: stat6 } = await tryStat(path2);
|
|
47668
|
-
if (error && error.code === "ENOENT" && !extname3(path2) && path2[path2.length - 1] !==
|
|
47668
|
+
if (error && error.code === "ENOENT" && !extname3(path2) && path2[path2.length - 1] !== sep7) {
|
|
47669
47669
|
let err2 = error;
|
|
47670
47670
|
for (let i2 = 0; i2 < options.extensions.length; i2++) {
|
|
47671
47671
|
const extension = options.extensions[i2];
|
|
@@ -61599,6 +61599,7 @@ function createGitCommandExecutor(options = {}) {
|
|
|
61599
61599
|
};
|
|
61600
61600
|
if (options.binary !== void 0) {
|
|
61601
61601
|
clientOptions.binary = options.binary;
|
|
61602
|
+
clientOptions.unsafe = { allowUnsafeCustomBinary: true };
|
|
61602
61603
|
}
|
|
61603
61604
|
const git = simpleGit(clientOptions);
|
|
61604
61605
|
let failure;
|
|
@@ -63879,6 +63880,7 @@ async function readProjectFileTree(projectRoot, directoryPath) {
|
|
|
63879
63880
|
}
|
|
63880
63881
|
var MAX_PROJECT_FILE_DEPTH = 20;
|
|
63881
63882
|
var validFileName = /^(?!\.\.?$)[^/\\]{1,255}$/u;
|
|
63883
|
+
var invalidWindowsFileName = /[<>:"|?*]|[. ]$|^(?:con|prn|aux|nul|com[1-9¹²³]|lpt[1-9¹²³])(?:\.|$)/iu;
|
|
63882
63884
|
function parseProjectRelativePath(path) {
|
|
63883
63885
|
const segments = path.split("/");
|
|
63884
63886
|
if (path.startsWith("/") || path.endsWith("/") || path.includes("\\") || /^[A-Za-z]:/u.test(path) || segments.length > MAX_PROJECT_FILE_DEPTH || segments.some((segment) => segment === "" || segment === "." || segment === "..")) {
|
|
@@ -63888,10 +63890,8 @@ function parseProjectRelativePath(path) {
|
|
|
63888
63890
|
}
|
|
63889
63891
|
function assertPathInsideRoot(rootPath, targetPath) {
|
|
63890
63892
|
const pathFromRoot = relative(rootPath, targetPath);
|
|
63891
|
-
if (pathFromRoot === "" || pathFromRoot === ".." || pathFromRoot.startsWith(`..${
|
|
63892
|
-
|
|
63893
|
-
}
|
|
63894
|
-
if (pathFromRoot.startsWith("..\\") || resolve(rootPath, pathFromRoot) !== targetPath) {
|
|
63893
|
+
if (pathFromRoot === "" || pathFromRoot === ".." || pathFromRoot.startsWith(`..${sep}`) || // Windows 跨盘 relative 会返回绝对路径,而不是以 .. 开头。
|
|
63894
|
+
isAbsolute(pathFromRoot)) {
|
|
63895
63895
|
throw new TypeError("Project file path is outside the project root");
|
|
63896
63896
|
}
|
|
63897
63897
|
}
|
|
@@ -63923,7 +63923,7 @@ async function pathExists2(path) {
|
|
|
63923
63923
|
}
|
|
63924
63924
|
}
|
|
63925
63925
|
async function renameProjectFile(projectRoot, path, name) {
|
|
63926
|
-
if (!validFileName.test(name) || name.includes("\0") || name.includes("\r") || name.includes("\n")) {
|
|
63926
|
+
if (!validFileName.test(name) || name.includes("\0") || name.includes("\r") || name.includes("\n") || process.platform === "win32" && (invalidWindowsFileName.test(name) || name.split("").some((character) => character.charCodeAt(0) < 32))) {
|
|
63927
63927
|
throw new TypeError("Project file name is invalid");
|
|
63928
63928
|
}
|
|
63929
63929
|
const { absolutePath, resolvedRoot } = await resolveProjectFileTarget(projectRoot, path);
|
|
@@ -65860,6 +65860,7 @@ function createSkillMarketService(options) {
|
|
|
65860
65860
|
};
|
|
65861
65861
|
return {
|
|
65862
65862
|
getSkill: (owner, slug) => options.catalog.getSkill(owner, slug),
|
|
65863
|
+
getOfficialPlugin: (marketplaceName, marketplacePath, pluginName) => options.provider.getOfficialPlugin(marketplaceName, marketplacePath, pluginName),
|
|
65863
65864
|
async installSkill(owner, slug, input) {
|
|
65864
65865
|
const detail = await options.catalog.getSkill(owner, slug);
|
|
65865
65866
|
if (detail.scanStatus !== "clean") {
|
|
@@ -65886,11 +65887,21 @@ function createSkillMarketService(options) {
|
|
|
65886
65887
|
await options.provider.listInstalledSkills(projects, true);
|
|
65887
65888
|
return result;
|
|
65888
65889
|
},
|
|
65890
|
+
installOfficialPlugin: (marketplaceName, marketplacePath, pluginName, installAttemptId) => options.provider.installOfficialPlugin(
|
|
65891
|
+
marketplaceName,
|
|
65892
|
+
marketplacePath,
|
|
65893
|
+
pluginName,
|
|
65894
|
+
installAttemptId
|
|
65895
|
+
),
|
|
65889
65896
|
listConfiguredMcpServers: () => options.provider.listConfiguredMcpServers(),
|
|
65890
65897
|
async listInstalledSkills(forceReload) {
|
|
65891
65898
|
const { page } = await discover(forceReload);
|
|
65892
65899
|
return { ...page, data: await enrichInstalledSkills(page.data) };
|
|
65893
65900
|
},
|
|
65901
|
+
async listOfficialPlugins(forceRefetch) {
|
|
65902
|
+
const projects = await options.projectRepository.list();
|
|
65903
|
+
return options.provider.listOfficialPlugins(projects, forceRefetch);
|
|
65904
|
+
},
|
|
65894
65905
|
listSkills: (query, cursor, sort2) => options.catalog.listSkills(query, cursor, sort2),
|
|
65895
65906
|
async openSkillDirectory(path) {
|
|
65896
65907
|
const { page } = await discover(false);
|
|
@@ -65911,7 +65922,8 @@ function createSkillMarketService(options) {
|
|
|
65911
65922
|
return { status: "opened" };
|
|
65912
65923
|
},
|
|
65913
65924
|
setMcpServerEnabled: (name, enabled) => options.provider.setMcpServerEnabled(name, enabled),
|
|
65914
|
-
setSkillEnabled: (path, enabled) => options.provider.setSkillEnabled(path, enabled)
|
|
65925
|
+
setSkillEnabled: (path, enabled) => options.provider.setSkillEnabled(path, enabled),
|
|
65926
|
+
uninstallOfficialPlugin: (pluginId) => options.provider.uninstallOfficialPlugin(pluginId)
|
|
65915
65927
|
};
|
|
65916
65928
|
}
|
|
65917
65929
|
function createProjectRuntimeContext(options) {
|
|
@@ -66048,7 +66060,7 @@ var ProjectRuntimeLifecycleLock = class {
|
|
|
66048
66060
|
};
|
|
66049
66061
|
var TaskQueueBlockedError = class extends Error {
|
|
66050
66062
|
constructor() {
|
|
66051
|
-
super("Task queue is blocked by an edited submission");
|
|
66063
|
+
super("Task queue is blocked by an edited or unresolved submission");
|
|
66052
66064
|
this.name = "TaskQueueBlockedError";
|
|
66053
66065
|
}
|
|
66054
66066
|
};
|
|
@@ -66061,6 +66073,7 @@ var TaskQueueItemNotFoundError = class extends Error {
|
|
|
66061
66073
|
var PersistentTaskQueue = class {
|
|
66062
66074
|
#attachmentStore;
|
|
66063
66075
|
#locks = /* @__PURE__ */ new Map();
|
|
66076
|
+
#startResults = /* @__PURE__ */ new Map();
|
|
66064
66077
|
#readTaskSettings;
|
|
66065
66078
|
#repository;
|
|
66066
66079
|
#resolveProviderInput;
|
|
@@ -66098,6 +66111,7 @@ var PersistentTaskQueue = class {
|
|
|
66098
66111
|
queuedSubmissionId
|
|
66099
66112
|
);
|
|
66100
66113
|
if (deleted) {
|
|
66114
|
+
this.#startResults.delete(queuedSubmissionId);
|
|
66101
66115
|
await this.#attachmentStore.releaseQueue(runtime.projectId, queuedSubmissionId);
|
|
66102
66116
|
this.#publishChanged(runtime);
|
|
66103
66117
|
}
|
|
@@ -66133,6 +66147,10 @@ var PersistentTaskQueue = class {
|
|
|
66133
66147
|
}
|
|
66134
66148
|
async update(runtime, queuedSubmissionId, input, status2) {
|
|
66135
66149
|
return this.#withTaskLock(runtime, async () => {
|
|
66150
|
+
const current = (await this.#repository.listQueue(runtime.projectId, runtime.taskId)).find(
|
|
66151
|
+
(record4) => record4.id === queuedSubmissionId
|
|
66152
|
+
);
|
|
66153
|
+
if (current?.execution !== void 0) throw new TaskQueueBlockedError();
|
|
66136
66154
|
const { attachmentIds } = await this.#resolveProviderInput(
|
|
66137
66155
|
runtime.projectId,
|
|
66138
66156
|
input,
|
|
@@ -66184,6 +66202,9 @@ var PersistentTaskQueue = class {
|
|
|
66184
66202
|
if (editingIndex >= 0 && selectedIndex >= editingIndex) throw new TaskQueueBlockedError();
|
|
66185
66203
|
const selected = records[selectedIndex];
|
|
66186
66204
|
if (selected?.status !== "queued") throw new TaskQueueBlockedError();
|
|
66205
|
+
const recovered = selected.execution?.state === "started" ? selected.execution.turn : this.#startResults.get(selected.id);
|
|
66206
|
+
if (recovered !== void 0) return this.#finishStart(runtime, selected, recovered);
|
|
66207
|
+
if (selected.execution !== void 0) throw new TaskQueueBlockedError();
|
|
66187
66208
|
const task = await runtime.provider.readTask(runtime.taskId);
|
|
66188
66209
|
if (task?.turns.some((turn2) => turn2.status === "running") === true) {
|
|
66189
66210
|
throw new TaskQueueBlockedError();
|
|
@@ -66195,9 +66216,21 @@ var PersistentTaskQueue = class {
|
|
|
66195
66216
|
runtime.taskId
|
|
66196
66217
|
);
|
|
66197
66218
|
const settings = await this.#readTaskSettings(runtime.projectId, runtime.taskId);
|
|
66219
|
+
if (this.#startResults.size >= 1e3) throw new TaskQueueBlockedError();
|
|
66220
|
+
if (!await this.#repository.setQueueExecution(selected, { state: "starting" })) {
|
|
66221
|
+
throw new TaskQueueBlockedError();
|
|
66222
|
+
}
|
|
66198
66223
|
const turn = await runtime.provider.startTurn(runtime.taskId, providerInput, settings);
|
|
66199
|
-
|
|
66224
|
+
this.#startResults.set(selected.id, turn);
|
|
66225
|
+
return this.#finishStart(runtime, selected, turn);
|
|
66226
|
+
}
|
|
66227
|
+
async #finishStart(runtime, selected, turn) {
|
|
66228
|
+
if (!await this.#repository.setQueueExecution(selected, { state: "started", turn })) {
|
|
66229
|
+
throw new TaskQueueItemNotFoundError();
|
|
66230
|
+
}
|
|
66231
|
+
this.#startResults.delete(selected.id);
|
|
66200
66232
|
await this.#attachmentStore.startQueue(runtime.projectId, selected.id, turn.id);
|
|
66233
|
+
await this.#repository.deleteQueue(runtime.projectId, runtime.taskId, selected.id);
|
|
66201
66234
|
this.#publishChanged(runtime);
|
|
66202
66235
|
return turn;
|
|
66203
66236
|
}
|
|
@@ -66225,6 +66258,15 @@ function createMemoryTaskQueueRepository() {
|
|
|
66225
66258
|
const records = /* @__PURE__ */ new Map();
|
|
66226
66259
|
const key = (projectId, taskId) => `${projectId}\0${taskId}`;
|
|
66227
66260
|
return {
|
|
66261
|
+
setQueueExecution(record3, execution) {
|
|
66262
|
+
const queue = records.get(key(record3.projectId, record3.taskId)) ?? [];
|
|
66263
|
+
const index = queue.findIndex((item) => item.id === record3.id);
|
|
66264
|
+
const current = queue[index];
|
|
66265
|
+
if (current === void 0 || execution.state === "starting" && current.execution !== void 0)
|
|
66266
|
+
return Promise.resolve(false);
|
|
66267
|
+
queue[index] = { ...current, execution };
|
|
66268
|
+
return Promise.resolve(true);
|
|
66269
|
+
},
|
|
66228
66270
|
addQueue(record3) {
|
|
66229
66271
|
const queue = records.get(key(record3.projectId, record3.taskId)) ?? [];
|
|
66230
66272
|
queue.push(record3);
|
|
@@ -66257,7 +66299,8 @@ function createMemoryTaskQueueRepository() {
|
|
|
66257
66299
|
const queue = records.get(key(projectId, taskId)) ?? [];
|
|
66258
66300
|
const index = queue.findIndex((record3) => record3.id === queuedSubmissionId);
|
|
66259
66301
|
const current = queue[index];
|
|
66260
|
-
if (current === void 0
|
|
66302
|
+
if (current === void 0 || current.execution !== void 0)
|
|
66303
|
+
return Promise.resolve(void 0);
|
|
66261
66304
|
const updated = { ...current, input, status: status2 };
|
|
66262
66305
|
queue[index] = updated;
|
|
66263
66306
|
return Promise.resolve(updated);
|
|
@@ -70096,6 +70139,32 @@ var MarketQuerySchema = Type.Object(
|
|
|
70096
70139
|
},
|
|
70097
70140
|
{ additionalProperties: false }
|
|
70098
70141
|
);
|
|
70142
|
+
var OfficialPluginParamsSchema = Type.Object(
|
|
70143
|
+
{
|
|
70144
|
+
marketplaceName: Type.String({ maxLength: 160, minLength: 1 }),
|
|
70145
|
+
pluginName: Type.String({ maxLength: 240, minLength: 1 })
|
|
70146
|
+
},
|
|
70147
|
+
{ additionalProperties: false }
|
|
70148
|
+
);
|
|
70149
|
+
var OfficialPluginQuerySchema = Type.Object(
|
|
70150
|
+
{ marketplacePath: Type.Optional(Type.String({ maxLength: 4096, minLength: 1 })) },
|
|
70151
|
+
{ additionalProperties: false }
|
|
70152
|
+
);
|
|
70153
|
+
var OfficialPluginListQuerySchema = Type.Object(
|
|
70154
|
+
{ forceRefetch: Type.Optional(Type.Boolean()) },
|
|
70155
|
+
{ additionalProperties: false }
|
|
70156
|
+
);
|
|
70157
|
+
var OfficialPluginInstallBodySchema = Type.Object(
|
|
70158
|
+
{
|
|
70159
|
+
installAttemptId: Type.String({ maxLength: 200, minLength: 1 }),
|
|
70160
|
+
marketplacePath: Type.Union([Type.String({ maxLength: 4096, minLength: 1 }), Type.Null()])
|
|
70161
|
+
},
|
|
70162
|
+
{ additionalProperties: false }
|
|
70163
|
+
);
|
|
70164
|
+
var OfficialPluginUninstallBodySchema = Type.Object(
|
|
70165
|
+
{ pluginId: Type.String({ maxLength: 300, minLength: 1 }) },
|
|
70166
|
+
{ additionalProperties: false }
|
|
70167
|
+
);
|
|
70099
70168
|
function toHttpError(error) {
|
|
70100
70169
|
if (!(error instanceof SkillMarketError)) throw error;
|
|
70101
70170
|
const statusByCode = {
|
|
@@ -70131,6 +70200,70 @@ var registerSkillMarketRoutes = (app, context, done) => {
|
|
|
70131
70200
|
{ schema: { response: { 200: InstalledSkillPageSchema } } },
|
|
70132
70201
|
() => skillMarketService.listInstalledSkills(false)
|
|
70133
70202
|
);
|
|
70203
|
+
app.get(
|
|
70204
|
+
"/v1/plugins/official",
|
|
70205
|
+
{
|
|
70206
|
+
schema: {
|
|
70207
|
+
querystring: OfficialPluginListQuerySchema,
|
|
70208
|
+
response: { 200: OfficialPluginPageSchema }
|
|
70209
|
+
}
|
|
70210
|
+
},
|
|
70211
|
+
(request2) => skillMarketService.listOfficialPlugins(request2.query.forceRefetch ?? false)
|
|
70212
|
+
);
|
|
70213
|
+
app.get(
|
|
70214
|
+
"/v1/plugins/official/:marketplaceName/:pluginName",
|
|
70215
|
+
{
|
|
70216
|
+
schema: {
|
|
70217
|
+
params: OfficialPluginParamsSchema,
|
|
70218
|
+
querystring: OfficialPluginQuerySchema,
|
|
70219
|
+
response: { 200: OfficialPluginDetailSchema, ...mutationErrors }
|
|
70220
|
+
}
|
|
70221
|
+
},
|
|
70222
|
+
(request2) => skillMarketService.getOfficialPlugin(
|
|
70223
|
+
request2.params.marketplaceName,
|
|
70224
|
+
request2.query.marketplacePath ?? null,
|
|
70225
|
+
request2.params.pluginName
|
|
70226
|
+
)
|
|
70227
|
+
);
|
|
70228
|
+
app.post(
|
|
70229
|
+
"/v1/plugins/official/:marketplaceName/:pluginName/install",
|
|
70230
|
+
{
|
|
70231
|
+
schema: {
|
|
70232
|
+
body: OfficialPluginInstallBodySchema,
|
|
70233
|
+
headers: IdempotencyHeadersSchema,
|
|
70234
|
+
params: OfficialPluginParamsSchema,
|
|
70235
|
+
response: { 200: OfficialPluginInstallResultSchema, ...mutationErrors }
|
|
70236
|
+
}
|
|
70237
|
+
},
|
|
70238
|
+
(request2) => runIdempotent(
|
|
70239
|
+
["install-official-plugin", request2.params.marketplaceName, request2.params.pluginName],
|
|
70240
|
+
request2.headers["idempotency-key"],
|
|
70241
|
+
request2.body,
|
|
70242
|
+
() => skillMarketService.installOfficialPlugin(
|
|
70243
|
+
request2.params.marketplaceName,
|
|
70244
|
+
request2.body.marketplacePath,
|
|
70245
|
+
request2.params.pluginName,
|
|
70246
|
+
request2.body.installAttemptId
|
|
70247
|
+
)
|
|
70248
|
+
)
|
|
70249
|
+
);
|
|
70250
|
+
app.post(
|
|
70251
|
+
"/v1/plugins/official/:marketplaceName/:pluginName/uninstall",
|
|
70252
|
+
{
|
|
70253
|
+
schema: {
|
|
70254
|
+
body: OfficialPluginUninstallBodySchema,
|
|
70255
|
+
headers: IdempotencyHeadersSchema,
|
|
70256
|
+
params: OfficialPluginParamsSchema,
|
|
70257
|
+
response: { 200: OfficialPluginUninstallResultSchema, ...mutationErrors }
|
|
70258
|
+
}
|
|
70259
|
+
},
|
|
70260
|
+
(request2) => runIdempotent(
|
|
70261
|
+
["uninstall-official-plugin", request2.params.marketplaceName, request2.params.pluginName],
|
|
70262
|
+
request2.headers["idempotency-key"],
|
|
70263
|
+
request2.body,
|
|
70264
|
+
() => skillMarketService.uninstallOfficialPlugin(request2.body.pluginId)
|
|
70265
|
+
)
|
|
70266
|
+
);
|
|
70134
70267
|
app.get(
|
|
70135
70268
|
"/v1/skills/market",
|
|
70136
70269
|
{ schema: { querystring: MarketQuerySchema, response: { 200: ClawhubSkillPageSchema } } },
|
|
@@ -70321,9 +70454,9 @@ function padStart(item, targetLength, padString) {
|
|
|
70321
70454
|
}
|
|
70322
70455
|
return padString.slice(0, targetLength) + String(str);
|
|
70323
70456
|
}
|
|
70324
|
-
var split = function(str,
|
|
70325
|
-
var splits = str.split(
|
|
70326
|
-
return num ? splits.slice(0, num).concat([splits.slice(num).join(
|
|
70457
|
+
var split = function(str, sep7, num) {
|
|
70458
|
+
var splits = str.split(sep7);
|
|
70459
|
+
return num ? splits.slice(0, num).concat([splits.slice(num).join(sep7)]) : splits;
|
|
70327
70460
|
};
|
|
70328
70461
|
var pymod = function(a, b3) {
|
|
70329
70462
|
var r2 = a % b3;
|
|
@@ -73285,6 +73418,7 @@ var ScheduledTaskService = class {
|
|
|
73285
73418
|
#repository;
|
|
73286
73419
|
#persistTaskResources;
|
|
73287
73420
|
#running = /* @__PURE__ */ new Set();
|
|
73421
|
+
#completions = /* @__PURE__ */ new Map();
|
|
73288
73422
|
#startTask;
|
|
73289
73423
|
#closed = false;
|
|
73290
73424
|
#mutation = Promise.resolve();
|
|
@@ -73383,8 +73517,8 @@ var ScheduledTaskService = class {
|
|
|
73383
73517
|
if (claim === void 0) {
|
|
73384
73518
|
throw new ScheduledTaskServiceError("busy", "Scheduled task is already running");
|
|
73385
73519
|
}
|
|
73386
|
-
this.#running.add(id);
|
|
73387
73520
|
await this.#replace(result.tasks);
|
|
73521
|
+
this.#running.add(id);
|
|
73388
73522
|
this.#launch(claim);
|
|
73389
73523
|
return claim.task;
|
|
73390
73524
|
});
|
|
@@ -73402,14 +73536,41 @@ var ScheduledTaskService = class {
|
|
|
73402
73536
|
return task;
|
|
73403
73537
|
}
|
|
73404
73538
|
#launch(claim) {
|
|
73405
|
-
const launch = this.#startTask(claim.task).then((value) => ({ status: "fulfilled", value })).catch((reason) => ({ reason, status: "rejected" })).then(
|
|
73539
|
+
const launch = Promise.resolve().then(() => this.#startTask(claim.task)).then((value) => ({ status: "fulfilled", value })).catch((reason) => ({ reason, status: "rejected" })).then(
|
|
73406
73540
|
(result) => this.#mutate(async () => {
|
|
73407
|
-
this.#
|
|
73408
|
-
await this.#
|
|
73541
|
+
this.#completions.set(claim.task.id, { claim, finishedAtUnixMs: this.#now(), result });
|
|
73542
|
+
await this.#flushCompletions();
|
|
73409
73543
|
})
|
|
73410
|
-
).
|
|
73544
|
+
).catch(() => {
|
|
73545
|
+
this.#scheduleRetry();
|
|
73546
|
+
}).finally(() => this.#inFlight.delete(launch));
|
|
73411
73547
|
this.#inFlight.add(launch);
|
|
73412
73548
|
}
|
|
73549
|
+
async #flushCompletions() {
|
|
73550
|
+
for (const [id, completion] of this.#completions) {
|
|
73551
|
+
await this.#replace(
|
|
73552
|
+
completeScheduledTaskRun(
|
|
73553
|
+
this.#tasks,
|
|
73554
|
+
completion.claim,
|
|
73555
|
+
completion.finishedAtUnixMs,
|
|
73556
|
+
completion.result
|
|
73557
|
+
)
|
|
73558
|
+
);
|
|
73559
|
+
this.#completions.delete(id);
|
|
73560
|
+
this.#running.delete(id);
|
|
73561
|
+
}
|
|
73562
|
+
}
|
|
73563
|
+
#scheduleRetry() {
|
|
73564
|
+
if (this.#timer !== void 0) clearTimeout(this.#timer);
|
|
73565
|
+
if (this.#closed) return;
|
|
73566
|
+
this.#timer = setTimeout(
|
|
73567
|
+
() => void this.#tick().catch(() => {
|
|
73568
|
+
this.#scheduleRetry();
|
|
73569
|
+
}),
|
|
73570
|
+
1e3
|
|
73571
|
+
);
|
|
73572
|
+
this.#timer.unref();
|
|
73573
|
+
}
|
|
73413
73574
|
#reschedule() {
|
|
73414
73575
|
if (this.#timer !== void 0) clearTimeout(this.#timer);
|
|
73415
73576
|
if (this.#closed) return;
|
|
@@ -73418,14 +73579,21 @@ var ScheduledTaskService = class {
|
|
|
73418
73579
|
void 0
|
|
73419
73580
|
);
|
|
73420
73581
|
const delay2 = next === void 0 ? 24 * 60 * 60 * 1e3 : Math.max(1, next - this.#now());
|
|
73421
|
-
this.#timer = setTimeout(
|
|
73582
|
+
this.#timer = setTimeout(
|
|
73583
|
+
() => void this.#tick().catch(() => {
|
|
73584
|
+
this.#scheduleRetry();
|
|
73585
|
+
}),
|
|
73586
|
+
Math.min(delay2, this.#completions.size > 0 ? 1e3 : 2147483647)
|
|
73587
|
+
);
|
|
73422
73588
|
this.#timer.unref();
|
|
73423
73589
|
}
|
|
73424
73590
|
async #tick() {
|
|
73425
73591
|
await this.#mutate(async () => {
|
|
73592
|
+
if (this.#closed) return;
|
|
73593
|
+
await this.#flushCompletions();
|
|
73426
73594
|
const result = claimScheduledTasks(this.#tasks, this.#running, this.#now());
|
|
73427
|
-
for (const claim of result.claims) this.#running.add(claim.task.id);
|
|
73428
73595
|
await this.#replace(result.tasks);
|
|
73596
|
+
for (const claim of result.claims) this.#running.add(claim.task.id);
|
|
73429
73597
|
for (const claim of result.claims) this.#launch(claim);
|
|
73430
73598
|
});
|
|
73431
73599
|
}
|
|
@@ -74899,6 +75067,11 @@ var SQLITE_MIGRATIONS = [
|
|
|
74899
75067
|
ON scheduled_task_attachments (project_id, attachment_id);
|
|
74900
75068
|
`,
|
|
74901
75069
|
version: 25
|
|
75070
|
+
},
|
|
75071
|
+
{
|
|
75072
|
+
name: "persist_queue_execution",
|
|
75073
|
+
sql: "ALTER TABLE task_queue ADD COLUMN execution_json TEXT;",
|
|
75074
|
+
version: 26
|
|
74902
75075
|
}
|
|
74903
75076
|
];
|
|
74904
75077
|
|
|
@@ -74976,15 +75149,26 @@ var SqliteScheduledTaskRepository = class {
|
|
|
74976
75149
|
}
|
|
74977
75150
|
};
|
|
74978
75151
|
|
|
74979
|
-
// packages/server/src/
|
|
75152
|
+
// packages/server/src/queue-record-persistence.ts
|
|
75153
|
+
var executionSchema = Type.Union([
|
|
75154
|
+
Type.Object({ state: Type.Literal("starting") }),
|
|
75155
|
+
Type.Object({ state: Type.Literal("started"), turn: AgentTurnSchema })
|
|
75156
|
+
]);
|
|
74980
75157
|
function parseQueueWorkerRecord(record3) {
|
|
74981
75158
|
const input = JSON.parse(record3.inputJson);
|
|
74982
75159
|
if (!value_exports.Check(AgentPromptInputSchema, input)) {
|
|
74983
75160
|
throw new Error("Persisted task queue input is invalid");
|
|
74984
75161
|
}
|
|
74985
|
-
const { inputJson: _inputJson, ...identity } = record3;
|
|
74986
|
-
return { ...identity, input };
|
|
75162
|
+
const { inputJson: _inputJson, executionJson, ...identity } = record3;
|
|
75163
|
+
if (executionJson === void 0) return { ...identity, input };
|
|
75164
|
+
const execution = JSON.parse(executionJson);
|
|
75165
|
+
if (!value_exports.Check(executionSchema, execution)) {
|
|
75166
|
+
throw new Error("Persisted task queue execution is invalid");
|
|
75167
|
+
}
|
|
75168
|
+
return { ...identity, execution, input };
|
|
74987
75169
|
}
|
|
75170
|
+
|
|
75171
|
+
// packages/server/src/sqlite-state-repository.ts
|
|
74988
75172
|
var DEFAULT_SQLITE_REQUEST_TIMEOUT_MS = 1e4;
|
|
74989
75173
|
var SqliteStateRepository = class _SqliteStateRepository extends SqliteScheduledTaskRepository {
|
|
74990
75174
|
#databasePath;
|
|
@@ -75166,6 +75350,15 @@ var SqliteStateRepository = class _SqliteStateRepository extends SqliteScheduled
|
|
|
75166
75350
|
})
|
|
75167
75351
|
);
|
|
75168
75352
|
}
|
|
75353
|
+
setQueueExecution(record3, execution) {
|
|
75354
|
+
return this.#call("setTaskQueueExecution", {
|
|
75355
|
+
projectId: record3.projectId,
|
|
75356
|
+
taskId: record3.taskId,
|
|
75357
|
+
id: record3.id,
|
|
75358
|
+
executionJson: JSON.stringify(execution),
|
|
75359
|
+
claim: execution.state === "starting"
|
|
75360
|
+
});
|
|
75361
|
+
}
|
|
75169
75362
|
deleteQueue(projectId, taskId, queuedSubmissionId) {
|
|
75170
75363
|
return this.#call("deleteTaskQueueRecord", { projectId, queuedSubmissionId, taskId });
|
|
75171
75364
|
}
|