arco-workbench 0.1.3 → 0.1.5
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/CONTRIBUTING.md +41 -9
- package/README.md +40 -22
- package/THIRD_PARTY_NOTICES +789 -0
- package/client/dist/assets/{PhosphorBackdrop-CkVIGkeX.js → PhosphorBackdrop-D6cbmLNY.js} +1 -1
- package/client/dist/assets/{ThemedBackgroundShaderImpl-DHF7CnpE.js → ThemedBackgroundShaderImpl-2dyerOi4.js} +1 -1
- package/client/dist/assets/{XtermView-SY0UcZUS.js → XtermView-AIwo7O3D.js} +2 -2
- package/client/dist/assets/galleryEditor-DXAuxS8D.js +702 -0
- package/client/dist/assets/index-8j6p-pmQ.js +610 -0
- package/client/dist/assets/index-DD9kFGsF.css +1 -0
- package/client/dist/index.html +2 -2
- package/client/src/App.tsx +46 -55
- package/client/src/alerts/desktopAlerts.ts +29 -9
- package/client/src/alerts/desktopTest.ts +68 -0
- package/client/src/alerts/focusNotice.ts +16 -0
- package/client/src/brief/briefFacts.ts +22 -0
- package/client/src/brief/briefFromStore.ts +7 -2
- package/client/src/buildCheck.ts +42 -2
- package/client/src/components/ArchitectureReviewDialog.tsx +98 -0
- package/client/src/components/ArtifactModal.tsx +4 -6
- package/client/src/components/ArtifactMoveDialog.tsx +68 -0
- package/client/src/components/AskUserQuestionNotice.tsx +2 -1
- package/client/src/components/AutomaticMessage.tsx +19 -0
- package/client/src/components/BriefControl.tsx +42 -49
- package/client/src/components/BrowserNotice.tsx +35 -0
- package/client/src/components/CatchMeUp.tsx +35 -29
- package/client/src/components/ChatMessage.tsx +15 -4
- package/client/src/components/ChatModeView.tsx +23 -16
- package/client/src/components/ChatPanel.tsx +33 -5
- package/client/src/components/CheckpointActions.tsx +97 -29
- package/client/src/components/ClusterActivityTab.tsx +4 -2
- package/client/src/components/ClusterComposerButtons.tsx +6 -3
- package/client/src/components/ClusterMemberPicker.tsx +6 -3
- package/client/src/components/ClusterPlanTab.tsx +108 -63
- package/client/src/components/ClusterRightPanel/AddWorkerSection.tsx +16 -5
- package/client/src/components/ClusterRightPanel/AutoPickupControl.tsx +31 -16
- package/client/src/components/ClusterRightPanel/MailboxModal.tsx +7 -3
- package/client/src/components/ClusterRightPanel/MemberRow.tsx +5 -2
- package/client/src/components/ClusterRightPanel/MemberSettingsFields.tsx +104 -0
- package/client/src/components/ClusterRightPanel/MessageGuardControl.tsx +1 -1
- package/client/src/components/ClusterRightPanel/ReplaceMemberDialog.tsx +85 -7
- package/client/src/components/ClusterRightPanel/index.tsx +90 -36
- package/client/src/components/ClusterRightPanel/memberSettings.ts +52 -0
- package/client/src/components/ClusterRightPanel/panels.ts +18 -0
- package/client/src/components/ClusterRightPanel/types.ts +9 -10
- package/client/src/components/ClusterTab.tsx +281 -61
- package/client/src/components/ClusterTaskBoardTab.tsx +84 -606
- package/client/src/components/CommandPalette.tsx +17 -6
- package/client/src/components/ComputerAgentPicker.tsx +1 -1
- package/client/src/components/ComputerPanel.tsx +4 -2
- package/client/src/components/Connections/Connections.tsx +5 -2
- package/client/src/components/Connections/EndpointEditor.tsx +2 -2
- package/client/src/components/Connections/connections.css +1 -1
- package/client/src/components/Connections/model.ts +5 -1
- package/client/src/components/ContextMeter.tsx +15 -4
- package/client/src/components/DeepSeekControls.tsx +7 -6
- package/client/src/components/DiagnosticsTab.tsx +3 -2
- package/client/src/components/DialogShell.tsx +123 -0
- package/client/src/components/DocsUpdateDialog.tsx +16 -42
- package/client/src/components/FileExplorer.tsx +8 -9
- package/client/src/components/FileViewerModal.tsx +37 -12
- package/client/src/components/FirstRun.tsx +8 -7
- package/client/src/components/ForwardMessages.tsx +28 -32
- package/client/src/components/GateApprovalNotice.tsx +4 -2
- package/client/src/components/GitDialog.tsx +53 -52
- package/client/src/components/GitHubPanel/CodeView.tsx +35 -23
- package/client/src/components/GitHubPanel/IssueView.tsx +6 -4
- package/client/src/components/GitHubPanel/PullView.tsx +7 -6
- package/client/src/components/GitHubPanel/RunView.tsx +7 -5
- package/client/src/components/GitHubPanel/shared.tsx +23 -8
- package/client/src/components/GitOtherWork.tsx +4 -2
- package/client/src/components/HandoffDialog.tsx +19 -45
- package/client/src/components/HandoffSeedPill.tsx +5 -5
- package/client/src/components/HandoffSource.tsx +54 -0
- package/client/src/components/HeaderAuthChip.tsx +22 -1
- package/client/src/components/HeaderDropdown.tsx +5 -0
- package/client/src/components/HeaderVersionBox.tsx +3 -0
- package/client/src/components/HistoryTab.tsx +59 -32
- package/client/src/components/Home/AddProject.tsx +1 -1
- package/client/src/components/Home/HomeView.tsx +59 -22
- package/client/src/components/Home/LocationDialog.tsx +1 -1
- package/client/src/components/Home/ProjectCard.tsx +5 -3
- package/client/src/components/Home/home.css +11 -4
- package/client/src/components/KeepButton.tsx +45 -0
- package/client/src/components/LlamacppCatalogEditor.tsx +12 -3
- package/client/src/components/LocalRuntimeStatus.tsx +54 -0
- package/client/src/components/MdTuneupDialog.tsx +55 -52
- package/client/src/components/MemberCard.tsx +47 -42
- package/client/src/components/MemberPane.tsx +12 -11
- package/client/src/components/ModelHealthPanel.tsx +5 -4
- package/client/src/components/NativeSubagentControls.tsx +64 -0
- package/client/src/components/NeedsYouBadge.tsx +13 -6
- package/client/src/components/NorthStarBar.tsx +5 -3
- package/client/src/components/NotificationCenter.tsx +18 -5
- package/client/src/components/NotificationChannelsSettings.tsx +50 -24
- package/client/src/components/NotificationToasts.tsx +6 -8
- package/client/src/components/PendingQuestionsButton.tsx +4 -1
- package/client/src/components/PlanBodyRenderer.tsx +1 -0
- package/client/src/components/PlanCandidateBanner.tsx +129 -58
- package/client/src/components/PlanComposerDialog.tsx +55 -87
- package/client/src/components/PlanReviewPicker.tsx +6 -3
- package/client/src/components/PreviewTab.tsx +62 -25
- package/client/src/components/PrimaryStatus.tsx +20 -74
- package/client/src/components/ProjectStateNotice.tsx +60 -0
- package/client/src/components/ProjectsSettings.tsx +28 -2
- package/client/src/components/ProviderReleasesModal.tsx +13 -3
- package/client/src/components/ProvidersPopover.tsx +81 -23
- package/client/src/components/PublicProjectBox.tsx +29 -0
- package/client/src/components/PurgeConversationModal.tsx +7 -2
- package/client/src/components/QueuedMessagesIndicator.tsx +42 -150
- package/client/src/components/Recall/RecallResultRow.tsx +4 -2
- package/client/src/components/Recall/RecallView.tsx +12 -9
- package/client/src/components/ResearchDialog.tsx +16 -25
- package/client/src/components/ReviewDialog.tsx +44 -62
- package/client/src/components/RightPanel/ActivityTab.tsx +32 -16
- package/client/src/components/RightPanel/CodebaseMemorySection.tsx +3 -1
- package/client/src/components/RightPanel/ConfigTab.tsx +129 -140
- package/client/src/components/RightPanel/GenesisTab.tsx +67 -24
- package/client/src/components/RightPanel/HandoffsTab.tsx +4 -0
- package/client/src/components/RightPanel/KnowledgeTab.tsx +1 -1
- package/client/src/components/RightPanel/LedgerTab.tsx +1 -1
- package/client/src/components/RightPanel/McpRegistrySection.tsx +7 -6
- package/client/src/components/RightPanel/MoveTargetModal.tsx +6 -3
- package/client/src/components/RightPanel/OutputsPanel.tsx +44 -17
- package/client/src/components/RightPanel/PlanTab.tsx +131 -111
- package/client/src/components/RightPanel/ReviewTab.tsx +7 -4
- package/client/src/components/RightPanel/UsageTab.tsx +92 -3
- package/client/src/components/RightPanel/format.ts +3 -1
- package/client/src/components/RightPanel/index.tsx +10 -2
- package/client/src/components/RightPanel/types.ts +4 -2
- package/client/src/components/RunAsPicker.tsx +5 -3
- package/client/src/components/RuntimeStateBanner.tsx +13 -3
- package/client/src/components/SavedClustersList.tsx +30 -3
- package/client/src/components/ServicesTab.tsx +17 -34
- package/client/src/components/SettingsPanel.tsx +101 -337
- package/client/src/components/ShortcutCheatSheet.tsx +6 -4
- package/client/src/components/SkillEditorDialog.tsx +40 -74
- package/client/src/components/SkillsSettings.tsx +307 -0
- package/client/src/components/SpawnDialog.tsx +22 -44
- package/client/src/components/SpawnSeedPill.tsx +5 -4
- package/client/src/components/StaleBuildBanner.tsx +3 -1
- package/client/src/components/StorageWarnings.tsx +23 -0
- package/client/src/components/SystemHeader.tsx +19 -12
- package/client/src/components/SystemModal.tsx +6 -5
- package/client/src/components/TabBar.tsx +20 -10
- package/client/src/components/TabContextMenu.tsx +36 -10
- package/client/src/components/TaskCard.tsx +16 -11
- package/client/src/components/TasksPanel.tsx +13 -11
- package/client/src/components/Terminal/XtermView.tsx +2 -0
- package/client/src/components/TerminalInput.tsx +251 -446
- package/client/src/components/TerminalSessions.tsx +1 -1
- package/client/src/components/TidyComposer.tsx +24 -41
- package/client/src/components/TokenBadge.tsx +20 -17
- package/client/src/components/ToolCallPill.tsx +5 -3
- package/client/src/components/ToolboxMenu.tsx +5 -5
- package/client/src/components/TranscriptSendDialog.tsx +151 -202
- package/client/src/components/TurnTimer.tsx +21 -0
- package/client/src/components/UpdateAction.tsx +4 -1
- package/client/src/components/UsageBar.tsx +32 -126
- package/client/src/components/UserManual/index.tsx +6 -4
- package/client/src/components/UtilityAgentPicker.tsx +4 -2
- package/client/src/components/VoiceMenu.tsx +5 -1
- package/client/src/components/VoiceSetupSettings.tsx +21 -11
- package/client/src/components/WorkerCard.tsx +7 -1
- package/client/src/components/WorkerDetailModal.tsx +7 -3
- package/client/src/components/WorkflowCreator/ClusterMembersSection.tsx +6 -6
- package/client/src/components/WorkflowCreator/ProjectPicker.tsx +13 -12
- package/client/src/components/WorkflowCreator/index.tsx +238 -77
- package/client/src/components/WorkflowCreator/types.ts +5 -3
- package/client/src/components/WorkflowStatusChip.tsx +93 -13
- package/client/src/components/WorkflowView.tsx +59 -25
- package/client/src/components/WorkspaceRename.tsx +11 -1
- package/client/src/components/activityTime.ts +4 -0
- package/client/src/components/clusterNeedsYou.ts +35 -3
- package/client/src/components/compare/CompareDialog.tsx +32 -5
- package/client/src/components/compare/CompareOverlay.tsx +10 -3
- package/client/src/components/composer/submitComposer.ts +191 -0
- package/client/src/components/diff/ChangesPanel.tsx +4 -2
- package/client/src/components/diff/LiveChangesPanel.tsx +18 -2
- package/client/src/components/editor/CodeEditor.tsx +17 -2
- package/client/src/components/headerPopoverState.ts +15 -0
- package/client/src/components/help/DocViewer.tsx +6 -4
- package/client/src/components/help/HelpCard.tsx +3 -2
- package/client/src/components/help/HelpPopover.tsx +3 -1
- package/client/src/components/media/AudioEditor/AudioOpsPanel.tsx +16 -2
- package/client/src/components/media/DirectoryPicker.tsx +18 -11
- package/client/src/components/media/ImageEditor/ImageEditor.tsx +2 -2
- package/client/src/components/media/MediaModalHost.tsx +7 -15
- package/client/src/components/media/MediaStemsControls.tsx +16 -2
- package/client/src/components/media/VideoEditor/VideoOpsPanel.tsx +16 -2
- package/client/src/components/media/launchers.ts +4 -0
- package/client/src/components/plans/PlanChooser.tsx +135 -0
- package/client/src/components/plans/PlanRefsSection.tsx +47 -28
- package/client/src/components/plans/planBodySave.ts +17 -0
- package/client/src/components/plans/planRefs.ts +21 -11
- package/client/src/components/plans/startPlanGenesis.ts +37 -0
- package/client/src/components/primitives/Panel.tsx +1 -0
- package/client/src/components/providerPanelState.ts +17 -0
- package/client/src/components/settings/AppVersionSection.tsx +5 -5
- package/client/src/components/settings/AppWindowBrowserSection.tsx +88 -0
- package/client/src/components/settings/PreviewPortsSection.tsx +31 -0
- package/client/src/components/settings/SettingsLayout.tsx +1 -1
- package/client/src/components/settings/appWindowBrowserReport.ts +23 -0
- package/client/src/components/settings/navigation.ts +5 -1
- package/client/src/components/settings/settings.css +6 -0
- package/client/src/components/terminalInput/planDraft.ts +34 -5
- package/client/src/components/usageVisibility.ts +3 -2
- package/client/src/components/utilityResult.ts +5 -1
- package/client/src/components/workSurface/WorkSurfaceControls.tsx +125 -10
- package/client/src/components/workSurface/workSurface.css +10 -2
- package/client/src/explorer/ArtifactsLens.tsx +53 -17
- package/client/src/explorer/ExplorerApp.tsx +12 -7
- package/client/src/explorer/PlansLens.tsx +140 -39
- package/client/src/explorer/RecentsLens.tsx +22 -61
- package/client/src/explorer/StorageLens.tsx +281 -0
- package/client/src/explorer/changedAttribution.ts +23 -0
- package/client/src/explorer/launch.ts +6 -3
- package/client/src/explorer/plansGrouping.ts +15 -0
- package/client/src/explorer/treeReveal.ts +21 -0
- package/client/src/explorer/types.ts +3 -3
- package/client/src/help/content/chat.tsx +17 -10
- package/client/src/help/content/cluster.tsx +175 -109
- package/client/src/help/content/composer.tsx +149 -48
- package/client/src/help/content/gitOps.tsx +19 -19
- package/client/src/help/content/github.tsx +9 -4
- package/client/src/help/content/header.tsx +82 -61
- package/client/src/help/content/media.tsx +20 -20
- package/client/src/help/content/misc.tsx +475 -156
- package/client/src/help/content/recall.tsx +12 -12
- package/client/src/help/content/rightPanel.tsx +210 -97
- package/client/src/help/content/settings.tsx +120 -47
- package/client/src/help/content/shared.tsx +1 -1
- package/client/src/help/content/tabbar.tsx +1 -1
- package/client/src/help/manualSections/actions.tsx +43 -21
- package/client/src/help/manualSections/chat.tsx +28 -5
- package/client/src/help/manualSections/clusters.tsx +222 -147
- package/client/src/help/manualSections/configuration.tsx +236 -50
- package/client/src/help/manualSections/deepseek.tsx +7 -5
- package/client/src/help/manualSections/gettingStarted.tsx +74 -12
- package/client/src/help/manualSections/maintenance.tsx +84 -15
- package/client/src/help/manualSections/media.tsx +14 -12
- package/client/src/help/manualSections/plans.tsx +192 -15
- package/client/src/help/manualSections/powerFeatures.tsx +146 -51
- package/client/src/help/manualSections/providers.tsx +237 -42
- package/client/src/help/manualSections/reference.tsx +24 -10
- package/client/src/help/manualSections/strata.tsx +6 -6
- package/client/src/help/manualSections/troubleshooting.tsx +14 -8
- package/client/src/help/manualSections/voice.tsx +12 -7
- package/client/src/help/manualSections/workflows.tsx +76 -19
- package/client/src/help/manualSections/workspace.tsx +179 -48
- package/client/src/help/shortcuts.ts +1 -0
- package/client/src/hooks/useWebSocket.ts +49 -25
- package/client/src/layout/SlideOut.tsx +77 -0
- package/client/src/layout/ToolbarOverflow.tsx +97 -0
- package/client/src/layout/keepInWindow.ts +216 -0
- package/client/src/layout/layoutRange.ts +129 -0
- package/client/src/main.tsx +2 -0
- package/client/src/phosphor-demo/Demo.tsx +5 -13
- package/client/src/phosphor-demo/demo.css +1 -1
- package/client/src/stores/appStore.ts +75 -15
- package/client/src/stores/appStore.types.ts +37 -16
- package/client/src/stores/docEditStore.ts +13 -21
- package/client/src/stores/draftStore.ts +28 -4
- package/client/src/stores/knowledgeDistillStore.ts +4 -2
- package/client/src/stores/mdTuneupStore.ts +12 -6
- package/client/src/stores/memoryTrim.ts +18 -2
- package/client/src/stores/notificationChannelsStore.ts +21 -11
- package/client/src/stores/planGenesisStore.ts +67 -0
- package/client/src/stores/recallStore.ts +6 -0
- package/client/src/stores/storageWarningStore.ts +18 -0
- package/client/src/stores/terminalStore.ts +1 -1
- package/client/src/styles/global.css +72 -0
- package/client/src/styles/matrix.css +7 -0
- package/client/src/themes/apply.ts +3 -3
- package/client/src/themes/bootstrap.ts +3 -0
- package/client/src/utils/activeProject.ts +6 -0
- package/client/src/utils/activityPresentation.ts +51 -0
- package/client/src/utils/browserFamily.ts +22 -0
- package/client/src/utils/chatFileLinks.ts +3 -2
- package/client/src/utils/chatText.ts +14 -6
- package/client/src/utils/checkedJson.ts +11 -0
- package/client/src/utils/checkpointChanges.ts +18 -0
- package/client/src/utils/clusterCreation.ts +39 -0
- package/client/src/utils/clusterNudge.ts +31 -0
- package/client/src/utils/displayMessages.ts +45 -7
- package/client/src/utils/effortDefaults.ts +4 -3
- package/client/src/utils/format.ts +11 -4
- package/client/src/utils/gateArgs.ts +3 -2
- package/client/src/utils/gitDialogMemory.ts +26 -0
- package/client/src/utils/handoffSeeds.ts +13 -0
- package/client/src/utils/historyEvents.ts +22 -12
- package/client/src/utils/homeModel.ts +38 -3
- package/client/src/utils/memberReviewScope.ts +6 -0
- package/client/src/utils/outputNavigation.ts +16 -0
- package/client/src/utils/outputStyleText.ts +8 -0
- package/client/src/utils/publicProject.ts +130 -0
- package/client/src/utils/queuedMessageEdit.ts +40 -0
- package/client/src/utils/requestGeneration.ts +8 -0
- package/client/src/utils/rewindSupport.ts +17 -0
- package/client/src/utils/settingsRequests.ts +36 -0
- package/client/src/utils/settingsResponse.ts +8 -0
- package/client/src/utils/wsSession.ts +12 -5
- package/client/src/vendor/odysseus-editor/editor/clipboard-and-drop.js +9 -9
- package/client/src/vendor/odysseus-editor/editor/keyboard-shortcuts.js +2 -2
- package/client/src/vendor/odysseus-editor/editor/state.js +8 -0
- package/client/src/vendor/odysseus-editor/editor.css +13 -5
- package/client/src/vendor/odysseus-editor/galleryEditor.d.ts +1 -1
- package/client/src/vendor/odysseus-editor/galleryEditor.js +16 -5
- package/client/src/voice/executor.ts +4 -3
- package/client/src/voice/panels.ts +14 -3
- package/client/src/voice/screen.ts +48 -6
- package/client/src/voice/setupAudio.ts +5 -3
- package/client/src/ws/handleServerMessage.ts +158 -35
- package/client/src/ws/operatorQuestions.ts +2 -2
- package/docs/ARCHITECTURE.md +95 -55
- package/docs/ARCHITECTURE_REVIEW.md +47 -0
- package/docs/BACKUP.md +5 -2
- package/docs/CHAT.md +48 -37
- package/docs/CHECKPOINTS.md +45 -16
- package/docs/CLIENT.md +242 -88
- package/docs/CODEX_GPT56_CLUSTER_INCOMPAT.md +1 -1
- package/docs/DEEPSEEK.md +6 -6
- package/docs/DIAGNOSTICS.md +12 -7
- package/docs/EXTENDING.md +52 -48
- package/docs/FEATURES.md +42 -26
- package/docs/GENESIS.md +42 -6
- package/docs/GETTING_STARTED.md +63 -29
- package/docs/GIT_WORKBENCH.md +15 -9
- package/docs/GLOSSARY.md +44 -42
- package/docs/GOTCHAS.md +73 -59
- package/docs/HTTP_API.md +167 -39
- package/docs/INDEX.md +3 -4
- package/docs/KNOWLEDGE.md +6 -4
- package/docs/LOCAL_SERVICES.md +6 -6
- package/docs/LSP.md +4 -3
- package/docs/MCP_REGISTRY.md +16 -12
- package/docs/MEDIA_STUDIO.md +23 -16
- package/docs/NOTIFICATIONS.md +60 -28
- package/docs/OPERATIONS.md +237 -120
- package/docs/OPERATOR_ACTIONS.md +44 -25
- package/docs/OUTPUTS.md +35 -9
- package/docs/PERSISTENCE.md +117 -33
- package/docs/PHOSPHOR_DEMO.md +4 -4
- package/docs/PLAN_OR_BOARD.md +13 -1
- package/docs/PREVIEW_VERIFY.md +10 -8
- package/docs/PRIMITIVES.md +92 -89
- package/docs/PROTOCOL.md +113 -32
- package/docs/PROTOCOL_CLUSTER.md +80 -16
- package/docs/PROTOCOL_PRIMITIVES.md +9 -9
- package/docs/PROVIDERS.md +471 -82
- package/docs/RECALL.md +17 -12
- package/docs/REMOTE_MANAGEMENT.md +69 -8
- package/docs/REPO_LAYOUT.md +1 -1
- package/docs/RESUME_INDEX.md +16 -17
- package/docs/SERVICE_MODE.md +50 -11
- package/docs/SETTINGS.md +66 -13
- package/docs/STORAGE_PLAN.md +329 -0
- package/docs/STRATA.md +4 -4
- package/docs/TASK_LEDGER.md +38 -16
- package/docs/TERMINAL.md +14 -12
- package/docs/THIRD_PARTY.md +1 -3
- package/docs/VOICE.md +15 -7
- package/native/darwin-arm64/manifest.json +1 -1
- package/native/linux-arm64/manifest.json +1 -1
- package/native/win32-arm64/manifest.json +1 -1
- package/node_modules/@arco/shared/dist/clusterCoordination.js +15 -7
- package/node_modules/@arco/shared/dist/clusterRolePresets.js +8 -6
- package/node_modules/@arco/shared/dist/codexChat.d.ts +2 -0
- package/node_modules/@arco/shared/dist/codexChat.js +5 -0
- package/node_modules/@arco/shared/dist/folderName.d.ts +1 -0
- package/node_modules/@arco/shared/dist/folderName.js +18 -0
- package/node_modules/@arco/shared/dist/index.d.ts +8 -0
- package/node_modules/@arco/shared/dist/index.js +8 -0
- package/node_modules/@arco/shared/dist/localRuntimeStatus.d.ts +23 -0
- package/node_modules/@arco/shared/dist/localRuntimeStatus.js +47 -0
- package/node_modules/@arco/shared/dist/notificationTitle.d.ts +9 -0
- package/node_modules/@arco/shared/dist/notificationTitle.js +23 -0
- package/node_modules/@arco/shared/dist/outputStyle.d.ts +10 -0
- package/node_modules/@arco/shared/dist/outputStyle.js +28 -0
- package/node_modules/@arco/shared/dist/outputs.d.ts +1 -0
- package/node_modules/@arco/shared/dist/protocol/autoPickup.d.ts +3 -1
- package/node_modules/@arco/shared/dist/protocol/autoPickup.js +1 -1
- package/node_modules/@arco/shared/dist/protocol/chat.d.ts +4 -0
- package/node_modules/@arco/shared/dist/protocol/checkpoints.d.ts +25 -2
- package/node_modules/@arco/shared/dist/protocol/checkpoints.js +1 -0
- package/node_modules/@arco/shared/dist/protocol/clientMessages.d.ts +9 -14
- package/node_modules/@arco/shared/dist/protocol/clusters.d.ts +23 -5
- package/node_modules/@arco/shared/dist/protocol/clusters.js +3 -3
- package/node_modules/@arco/shared/dist/protocol/connections.d.ts +2 -0
- package/node_modules/@arco/shared/dist/protocol/diagnostics.js +1 -1
- package/node_modules/@arco/shared/dist/protocol/genesis.d.ts +9 -0
- package/node_modules/@arco/shared/dist/protocol/index.d.ts +1 -0
- package/node_modules/@arco/shared/dist/protocol/index.js +1 -0
- package/node_modules/@arco/shared/dist/protocol/mcp.d.ts +1 -0
- package/node_modules/@arco/shared/dist/protocol/mcp.js +8 -5
- package/node_modules/@arco/shared/dist/protocol/mdTuneup.d.ts +8 -0
- package/node_modules/@arco/shared/dist/protocol/models.d.ts +3 -1
- package/node_modules/@arco/shared/dist/protocol/models.js +19 -8
- package/node_modules/@arco/shared/dist/protocol/notifications.d.ts +4 -2
- package/node_modules/@arco/shared/dist/protocol/notifications.js +18 -5
- package/node_modules/@arco/shared/dist/protocol/plans.d.ts +4 -1
- package/node_modules/@arco/shared/dist/protocol/remoteManagement.d.ts +6 -0
- package/node_modules/@arco/shared/dist/protocol/serverMessages.d.ts +70 -10
- package/node_modules/@arco/shared/dist/protocol/settings.d.ts +16 -4
- package/node_modules/@arco/shared/dist/protocol/settings.js +17 -1
- package/node_modules/@arco/shared/dist/protocol/storage.d.ts +21 -0
- package/node_modules/@arco/shared/dist/protocol/storage.js +3 -0
- package/node_modules/@arco/shared/dist/protocol/tasks.d.ts +4 -0
- package/node_modules/@arco/shared/dist/protocol/usage.d.ts +1 -0
- package/node_modules/@arco/shared/dist/protocol/utilityAgent.d.ts +2 -2
- package/node_modules/@arco/shared/dist/protocol/utilityAgent.js +2 -2
- package/node_modules/@arco/shared/dist/protocol/workers.d.ts +1 -0
- package/node_modules/@arco/shared/dist/protocol/workflows.d.ts +73 -14
- package/node_modules/@arco/shared/dist/protocol/workflows.js +66 -0
- package/node_modules/@arco/shared/dist/publicGuardrails.d.ts +7 -0
- package/node_modules/@arco/shared/dist/publicGuardrails.js +47 -0
- package/node_modules/@arco/shared/dist/publicSafetyRules.d.ts +1 -0
- package/node_modules/@arco/shared/dist/publicSafetyRules.js +6 -0
- package/node_modules/@arco/shared/dist/runtimeVersions.d.ts +2 -0
- package/node_modules/@arco/shared/dist/runtimeVersions.js +13 -0
- package/node_modules/@arco/shared/dist/shellTool.d.ts +2 -0
- package/node_modules/@arco/shared/dist/shellTool.js +9 -0
- package/node_modules/@arco/shared/package.json +1 -1
- package/node_modules/xlsx/LICENSE +201 -0
- package/node_modules/xlsx/dist/cpexcel.js +1506 -0
- package/node_modules/xlsx/package.json +69 -0
- package/node_modules/xlsx/xlsx.js +28103 -0
- package/node_modules/xlsx/xlsx.mjs +28228 -0
- package/package.json +23 -3
- package/scripts/packaging/arco.mjs +19 -3
- package/scripts/packaging/browsers.mjs +366 -0
- package/scripts/packaging/launch.mjs +34 -20
- package/scripts/packaging/services.mjs +36 -6
- package/scripts/packaging/storage.mjs +161 -0
- package/scripts/packaging/update.mjs +3 -3
- package/server/dist/appBrowsers.d.ts +45 -0
- package/server/dist/appBrowsers.js +73 -0
- package/server/dist/architectureReview.d.ts +60 -0
- package/server/dist/architectureReview.js +347 -0
- package/server/dist/architectureSkill.d.ts +8 -0
- package/server/dist/architectureSkill.js +70 -0
- package/server/dist/arcoHome.d.ts +1 -0
- package/server/dist/arcoHome.js +43 -3
- package/server/dist/artifactCopy.d.ts +29 -0
- package/server/dist/artifactCopy.js +475 -0
- package/server/dist/atomicFile.d.ts +1 -0
- package/server/dist/atomicFile.js +6 -1
- package/server/dist/attention.d.ts +6 -2
- package/server/dist/attention.js +37 -29
- package/server/dist/auth.d.ts +1 -0
- package/server/dist/auth.js +19 -6
- package/server/dist/authLoginSession.d.ts +2 -0
- package/server/dist/authLoginSession.js +6 -1
- package/server/dist/boundedRead.d.ts +26 -0
- package/server/dist/boundedRead.js +246 -0
- package/server/dist/capabilities.d.ts +4 -1
- package/server/dist/capabilities.js +25 -8
- package/server/dist/catchUp.d.ts +9 -0
- package/server/dist/catchUp.js +66 -24
- package/server/dist/checkedFile.d.ts +5 -0
- package/server/dist/checkedFile.js +138 -0
- package/server/dist/claudeTransport.d.ts +7 -0
- package/server/dist/claudeTransport.js +14 -0
- package/server/dist/clusterAutoTurn.d.ts +7 -0
- package/server/dist/clusterAutoTurn.js +54 -7
- package/server/dist/clusterBusyReminder.d.ts +7 -0
- package/server/dist/clusterBusyReminder.js +45 -0
- package/server/dist/clusterDirector.js +6 -3
- package/server/dist/clusterIdleNudger.d.ts +6 -0
- package/server/dist/clusterIdleNudger.js +5 -0
- package/server/dist/clusterMailbox.d.ts +4 -2
- package/server/dist/clusterMailbox.js +104 -24
- package/server/dist/clusterPeerOps.d.ts +2 -0
- package/server/dist/clusterPeerOps.js +11 -21
- package/server/dist/clusterPlanBridge.d.ts +6 -3
- package/server/dist/clusterPlanBridge.js +48 -45
- package/server/dist/clusterPresets.js +46 -32
- package/server/dist/clusterProgress.js +3 -0
- package/server/dist/clusterSnapshots.d.ts +1 -1
- package/server/dist/clusterSnapshots.js +39 -14
- package/server/dist/clusterStore.d.ts +3 -0
- package/server/dist/clusterStore.js +23 -13
- package/server/dist/clusterTurnTools.d.ts +4 -0
- package/server/dist/clusterTurnTools.js +9 -0
- package/server/dist/commandShell.d.ts +56 -0
- package/server/dist/commandShell.js +278 -0
- package/server/dist/compactionCounter.d.ts +6 -0
- package/server/dist/compactionCounter.js +73 -0
- package/server/dist/compactionReport.d.ts +8 -0
- package/server/dist/compactionReport.js +15 -0
- package/server/dist/contentSearch.js +16 -6
- package/server/dist/contextCalibrator.js +7 -2
- package/server/dist/contextEstimator.d.ts +4 -0
- package/server/dist/contextEstimator.js +76 -17
- package/server/dist/contextRefs.d.ts +1 -0
- package/server/dist/contextRefs.js +44 -9
- package/server/dist/conversationActivity.d.ts +3 -0
- package/server/dist/conversationActivity.js +27 -0
- package/server/dist/cursorUsage.js +15 -4
- package/server/dist/diagnostics/checks.js +4 -12
- package/server/dist/diagnostics/executableLookup.d.ts +2 -0
- package/server/dist/diagnostics/executableLookup.js +28 -0
- package/server/dist/diagnostics/modelHealth.js +3 -12
- package/server/dist/diagnostics/supportBundle.js +5 -13
- package/server/dist/eventLog.d.ts +74 -0
- package/server/dist/eventLog.js +992 -0
- package/server/dist/existingClusterMembers.d.ts +1 -0
- package/server/dist/existingClusterMembers.js +9 -0
- package/server/dist/explorerArtifacts.js +46 -12
- package/server/dist/explorerChanged.d.ts +7 -0
- package/server/dist/explorerChanged.js +116 -80
- package/server/dist/explorerDocs.d.ts +11 -0
- package/server/dist/explorerDocs.js +46 -48
- package/server/dist/explorerLaunch.d.ts +8 -1
- package/server/dist/explorerLaunch.js +11 -2
- package/server/dist/explorerPlans.d.ts +4 -0
- package/server/dist/explorerPlans.js +27 -2
- package/server/dist/fileAccessPolicy.d.ts +21 -0
- package/server/dist/fileAccessPolicy.js +89 -1
- package/server/dist/fileContent/decodeSlots.d.ts +1 -0
- package/server/dist/fileContent/decodeSlots.js +50 -0
- package/server/dist/fileContent/detect.d.ts +2 -0
- package/server/dist/fileContent/detect.js +55 -0
- package/server/dist/fileContent/externalImage.d.ts +3 -0
- package/server/dist/fileContent/externalImage.js +68 -0
- package/server/dist/fileContent/icons.d.ts +4 -0
- package/server/dist/fileContent/icons.js +58 -0
- package/server/dist/fileContent/images.d.ts +15 -0
- package/server/dist/fileContent/images.js +182 -0
- package/server/dist/fileContent/legacyText.d.ts +3 -0
- package/server/dist/fileContent/legacyText.js +19 -0
- package/server/dist/fileContent/notebook.d.ts +2 -0
- package/server/dist/fileContent/notebook.js +54 -0
- package/server/dist/fileContent/office.d.ts +3 -0
- package/server/dist/fileContent/office.js +349 -0
- package/server/dist/fileContent/pdf.d.ts +2 -0
- package/server/dist/fileContent/pdf.js +76 -0
- package/server/dist/fileContent/pngRows.d.ts +4 -0
- package/server/dist/fileContent/pngRows.js +118 -0
- package/server/dist/fileContent/svg.d.ts +3 -0
- package/server/dist/fileContent/svg.js +60 -0
- package/server/dist/fileContent/types.d.ts +8 -0
- package/server/dist/fileContent/types.js +43 -0
- package/server/dist/fileContent/worker.d.ts +1 -0
- package/server/dist/fileContent/worker.js +68 -0
- package/server/dist/fileContent.d.ts +55 -0
- package/server/dist/fileContent.js +81 -0
- package/server/dist/fileContextReceipts.d.ts +12 -0
- package/server/dist/fileContextReceipts.js +53 -0
- package/server/dist/fileFetch.d.ts +17 -0
- package/server/dist/fileFetch.js +191 -0
- package/server/dist/fileVersion.d.ts +10 -0
- package/server/dist/fileVersion.js +43 -0
- package/server/dist/genesis/creative.js +28 -36
- package/server/dist/genesis/prompts.js +4 -0
- package/server/dist/genesis/savePlan.d.ts +5 -0
- package/server/dist/genesis/savePlan.js +49 -0
- package/server/dist/genesis/stages.js +4 -4
- package/server/dist/gitDiff.js +25 -5
- package/server/dist/gitSnapshots.d.ts +18 -0
- package/server/dist/gitSnapshots.js +280 -149
- package/server/dist/gitWorking.js +15 -13
- package/server/dist/github.js +5 -1
- package/server/dist/goalRun.d.ts +1 -1
- package/server/dist/goalRun.js +7 -5
- package/server/dist/handoffHistory.d.ts +26 -0
- package/server/dist/handoffHistory.js +80 -0
- package/server/dist/handoffHistoryProtocol.d.ts +59 -0
- package/server/dist/handoffHistoryProtocol.js +20 -0
- package/server/dist/handoffHistorySupport.d.ts +2 -0
- package/server/dist/handoffHistorySupport.js +11 -0
- package/server/dist/handoffHistoryTool.d.ts +29 -0
- package/server/dist/handoffHistoryTool.js +235 -0
- package/server/dist/handoffPrompts.js +6 -4
- package/server/dist/handoffReplay.d.ts +9 -0
- package/server/dist/handoffReplay.js +14 -0
- package/server/dist/handoffSeedCache.d.ts +3 -0
- package/server/dist/handoffSeedCache.js +26 -0
- package/server/dist/http/appBrowserRoutes.d.ts +3 -0
- package/server/dist/http/appBrowserRoutes.js +16 -0
- package/server/dist/http/architectureReviewRoutes.d.ts +3 -0
- package/server/dist/http/architectureReviewRoutes.js +117 -0
- package/server/dist/http/clusterRoutes.js +15 -1
- package/server/dist/http/clusterSnapshotRoutes.js +8 -3
- package/server/dist/http/connectionsRoutes.js +3 -1
- package/server/dist/http/diffRoutes.js +37 -3
- package/server/dist/http/explorerRoot.d.ts +3 -0
- package/server/dist/http/explorerRoot.js +22 -0
- package/server/dist/http/explorerRoutes.js +66 -12
- package/server/dist/http/fileRead.js +2 -3
- package/server/dist/http/fileWriteRoutes.js +4 -3
- package/server/dist/http/gitCompareRoutes.js +4 -6
- package/server/dist/http/gitDiffRoutes.js +3 -3
- package/server/dist/http/gitOpRoutes.js +3 -5
- package/server/dist/http/gitWorktreeRoutes.js +3 -3
- package/server/dist/http/handoffHistoryRoutes.d.ts +4 -0
- package/server/dist/http/handoffHistoryRoutes.js +59 -0
- package/server/dist/http/imageWriteRoutes.js +6 -2
- package/server/dist/http/knowledgeRoutes.js +2 -0
- package/server/dist/http/mediaOpsRoutes.js +2 -3
- package/server/dist/http/originGuard.d.ts +1 -1
- package/server/dist/http/originGuard.js +95 -12
- package/server/dist/http/outputRoutes.js +31 -6
- package/server/dist/http/projectBinding.d.ts +3 -0
- package/server/dist/http/projectBinding.js +133 -0
- package/server/dist/http/providerThrottleRoutes.d.ts +8 -0
- package/server/dist/http/providerThrottleRoutes.js +96 -0
- package/server/dist/http/publicProjectRoutes.d.ts +2 -0
- package/server/dist/http/publicProjectRoutes.js +109 -0
- package/server/dist/http/readConfinement.d.ts +2 -1
- package/server/dist/http/readConfinement.js +17 -15
- package/server/dist/http/router.js +230 -62
- package/server/dist/http/searchRoutes.js +4 -4
- package/server/dist/http/sessionTransport.d.ts +2 -0
- package/server/dist/http/sessionTransport.js +32 -0
- package/server/dist/http/skillManagementRoutes.d.ts +5 -0
- package/server/dist/http/skillManagementRoutes.js +166 -0
- package/server/dist/http/storageRoutes.d.ts +2 -0
- package/server/dist/http/storageRoutes.js +268 -0
- package/server/dist/http/usageStatsRoutes.js +3 -12
- package/server/dist/http/utilityAgentRoutes.js +27 -5
- package/server/dist/http/workflowDataRoutes.js +75 -14
- package/server/dist/http/writeConfinement.d.ts +5 -3
- package/server/dist/http/writeConfinement.js +37 -11
- package/server/dist/http/wsAuth.d.ts +3 -2
- package/server/dist/http/wsAuth.js +26 -8
- package/server/dist/imageTokens.d.ts +7 -0
- package/server/dist/imageTokens.js +85 -0
- package/server/dist/index.js +287 -178
- package/server/dist/inputDeliveryHistory.d.ts +21 -0
- package/server/dist/inputDeliveryHistory.js +146 -0
- package/server/dist/keepStore.d.ts +20 -0
- package/server/dist/keepStore.js +167 -0
- package/server/dist/knowledge/store.js +28 -20
- package/server/dist/legacyTarRestore.d.ts +1 -0
- package/server/dist/legacyTarRestore.js +240 -0
- package/server/dist/llamacppCatalog.d.ts +8 -1
- package/server/dist/llamacppCatalog.js +65 -13
- package/server/dist/localRuntimeStatus.d.ts +35 -0
- package/server/dist/localRuntimeStatus.js +136 -0
- package/server/dist/lsp/client.js +28 -9
- package/server/dist/lsp/servers.js +2 -2
- package/server/dist/managedPath.d.ts +2 -0
- package/server/dist/managedPath.js +47 -0
- package/server/dist/management/clusterActivity.js +6 -20
- package/server/dist/management/hubGuard.d.ts +23 -0
- package/server/dist/management/hubGuard.js +118 -0
- package/server/dist/management/hubLink.d.ts +4 -1
- package/server/dist/management/hubLink.js +8 -1
- package/server/dist/management/initHubLink.d.ts +12 -0
- package/server/dist/management/initHubLink.js +54 -65
- package/server/dist/manualCompactCapability.d.ts +2 -0
- package/server/dist/manualCompactCapability.js +7 -0
- package/server/dist/mcp/arcoMcpServer.js +4 -0
- package/server/dist/mcp/client.d.ts +4 -4
- package/server/dist/mcp/client.js +31 -10
- package/server/dist/mcp/clusterMcpLoopback.d.ts +4 -0
- package/server/dist/mcp/clusterMcpLoopback.js +21 -1
- package/server/dist/mcp/clusterMcpTools.js +33 -27
- package/server/dist/mcp/fileContent.d.ts +8 -0
- package/server/dist/mcp/fileContent.js +55 -0
- package/server/dist/mcp/fileMcpServer.d.ts +1 -0
- package/server/dist/mcp/fileMcpServer.js +13 -0
- package/server/dist/mcp/fileMcpTools.d.ts +2 -0
- package/server/dist/mcp/fileMcpTools.js +54 -0
- package/server/dist/mcp/handoffHistoryMcpTools.d.ts +3 -0
- package/server/dist/mcp/handoffHistoryMcpTools.js +27 -0
- package/server/dist/mcp/mcpConfigWriter.d.ts +5 -0
- package/server/dist/mcp/mcpConfigWriter.js +44 -12
- package/server/dist/mcp/planMcpTools.d.ts +6 -14
- package/server/dist/mcp/planMcpTools.js +6 -250
- package/server/dist/mcp/planReadMcpServer.d.ts +1 -0
- package/server/dist/mcp/planReadMcpServer.js +19 -0
- package/server/dist/mcp/registry.js +44 -38
- package/server/dist/mcp/registryWiring.js +4 -5
- package/server/dist/media/demucs.d.ts +5 -0
- package/server/dist/media/demucs.js +16 -4
- package/server/dist/media/ffmpeg.js +24 -16
- package/server/dist/media/scratch.js +24 -9
- package/server/dist/noticeSource.d.ts +2 -0
- package/server/dist/noticeSource.js +11 -0
- package/server/dist/notifications.d.ts +4 -1
- package/server/dist/notifications.js +11 -6
- package/server/dist/npmPlatformResolve.d.ts +9 -3
- package/server/dist/npmPlatformResolve.js +24 -5
- package/server/dist/ntfyTransport.d.ts +2 -1
- package/server/dist/ntfyTransport.js +15 -4
- package/server/dist/outputGrants.d.ts +9 -0
- package/server/dist/outputGrants.js +63 -0
- package/server/dist/outputStore.d.ts +1 -0
- package/server/dist/outputStore.js +1 -1
- package/server/dist/outputs.js +117 -21
- package/server/dist/peerRecipientContext.js +22 -5
- package/server/dist/planHistory.d.ts +3 -0
- package/server/dist/planHistory.js +60 -0
- package/server/dist/planStore.d.ts +11 -2
- package/server/dist/planStore.js +236 -64
- package/server/dist/planTools.d.ts +41 -0
- package/server/dist/planTools.js +259 -0
- package/server/dist/previewAutoDetect.js +31 -23
- package/server/dist/previewPortConfiguration.d.ts +2 -0
- package/server/dist/previewPortConfiguration.js +32 -0
- package/server/dist/previewPorts.d.ts +1 -0
- package/server/dist/previewPorts.js +3 -0
- package/server/dist/previewProxy.d.ts +30 -9
- package/server/dist/previewProxy.js +226 -183
- package/server/dist/primaryBackgroundTracker.d.ts +15 -2
- package/server/dist/primaryBackgroundTracker.js +172 -63
- package/server/dist/primitives/exportContext.d.ts +3 -0
- package/server/dist/primitives/exportContext.js +77 -15
- package/server/dist/primitives/localFileContext.d.ts +3 -0
- package/server/dist/primitives/localFileContext.js +38 -0
- package/server/dist/primitives/reviewContent.d.ts +2 -0
- package/server/dist/primitives/reviewContent.js +53 -6
- package/server/dist/primitives/runCompare.js +1 -1
- package/server/dist/primitives/runDocEdit.js +1 -1
- package/server/dist/primitives/runMdTuneup.d.ts +7 -2
- package/server/dist/primitives/runMdTuneup.js +59 -32
- package/server/dist/primitives/runResearch.js +1 -1
- package/server/dist/primitives/runReviewer.d.ts +2 -0
- package/server/dist/primitives/runReviewer.js +5 -2
- package/server/dist/primitives/seedWorker.d.ts +11 -2
- package/server/dist/primitives/seedWorker.js +26 -12
- package/server/dist/project/orchestrationProposals.d.ts +1 -0
- package/server/dist/project/orchestrationProposals.js +5 -1
- package/server/dist/project/taskLedger.d.ts +5 -0
- package/server/dist/project/taskLedger.js +36 -11
- package/server/dist/projectGlob.d.ts +1 -0
- package/server/dist/projectGlob.js +9 -0
- package/server/dist/projectIgnore.d.ts +1 -0
- package/server/dist/projectIgnore.js +24 -0
- package/server/dist/projectScan.d.ts +24 -0
- package/server/dist/projectScan.js +101 -0
- package/server/dist/projectStateIgnore.d.ts +13 -0
- package/server/dist/projectStateIgnore.js +36 -1
- package/server/dist/projects.d.ts +11 -3
- package/server/dist/projects.js +141 -40
- package/server/dist/prompts.js +7 -8
- package/server/dist/proportionateTestingSkill.d.ts +7 -0
- package/server/dist/proportionateTestingSkill.js +32 -0
- package/server/dist/providers/attachmentLabels.d.ts +4 -0
- package/server/dist/providers/attachmentLabels.js +9 -0
- package/server/dist/providers/attachments.d.ts +1 -3
- package/server/dist/providers/attachments.js +58 -173
- package/server/dist/providers/claude-native/apiEndpoint.d.ts +2 -0
- package/server/dist/providers/claude-native/apiEndpoint.js +8 -0
- package/server/dist/providers/claude-native/appendOnlyPrefix.js +21 -1
- package/server/dist/providers/claude-native/catalog.js +17 -15
- package/server/dist/providers/claude-native/contentBlocks.d.ts +22 -2
- package/server/dist/providers/claude-native/contentBlocks.js +31 -8
- package/server/dist/providers/claude-native/contextBudget.d.ts +0 -4
- package/server/dist/providers/claude-native/contextBudget.js +0 -2
- package/server/dist/providers/claude-native/editApply.js +6 -1
- package/server/dist/providers/claude-native/fileContent.d.ts +15 -0
- package/server/dist/providers/claude-native/fileContent.js +120 -0
- package/server/dist/providers/claude-native/filterConfigs/bash-cargo-test.js +2 -0
- package/server/dist/providers/claude-native/filterConfigs/bash-jest-vitest.js +2 -0
- package/server/dist/providers/claude-native/filterConfigs/bash-pytest.js +2 -0
- package/server/dist/providers/claude-native/filterConfigs/index.js +2 -1
- package/server/dist/providers/claude-native/foldDigest.js +10 -2
- package/server/dist/providers/claude-native/gateReview.d.ts +1 -1
- package/server/dist/providers/claude-native/gateReview.js +0 -0
- package/server/dist/providers/claude-native/hookIf.d.ts +28 -0
- package/server/dist/providers/claude-native/hookIf.js +590 -0
- package/server/dist/providers/claude-native/hooks.d.ts +77 -7
- package/server/dist/providers/claude-native/hooks.js +344 -52
- package/server/dist/providers/claude-native/imageRead.d.ts +15 -0
- package/server/dist/providers/claude-native/imageRead.js +108 -0
- package/server/dist/providers/claude-native/index.d.ts +4 -1
- package/server/dist/providers/claude-native/index.js +32 -2
- package/server/dist/providers/claude-native/mediaLimits.d.ts +6 -0
- package/server/dist/providers/claude-native/mediaLimits.js +15 -0
- package/server/dist/providers/claude-native/mediaRetention.d.ts +11 -0
- package/server/dist/providers/claude-native/mediaRetention.js +66 -0
- package/server/dist/providers/claude-native/mediaRetirementNotice.d.ts +1 -0
- package/server/dist/providers/claude-native/mediaRetirementNotice.js +12 -0
- package/server/dist/providers/claude-native/modelParams.d.ts +6 -0
- package/server/dist/providers/claude-native/modelParams.js +21 -3
- package/server/dist/providers/claude-native/oauth.js +9 -8
- package/server/dist/providers/claude-native/outputAccumulator.d.ts +2 -0
- package/server/dist/providers/claude-native/outputAccumulator.js +29 -18
- package/server/dist/providers/claude-native/peerTools.js +5 -156
- package/server/dist/providers/claude-native/pretoolGuards.js +92 -9
- package/server/dist/providers/claude-native/registryTools.js +4 -2
- package/server/dist/providers/claude-native/resumeSummary.d.ts +23 -2
- package/server/dist/providers/claude-native/resumeSummary.js +163 -45
- package/server/dist/providers/claude-native/sandboxExecutor.js +26 -19
- package/server/dist/providers/claude-native/taskAdmission.d.ts +21 -0
- package/server/dist/providers/claude-native/taskAdmission.js +75 -0
- package/server/dist/providers/claude-native/toolChecks.d.ts +38 -0
- package/server/dist/providers/claude-native/toolChecks.js +96 -0
- package/server/dist/providers/claude-native/toolPosture.js +5 -3
- package/server/dist/providers/claude-native/toolResultEviction.d.ts +4 -3
- package/server/dist/providers/claude-native/toolResultEviction.js +18 -29
- package/server/dist/providers/claude-native/tools.d.ts +17 -4
- package/server/dist/providers/claude-native/tools.js +248 -135
- package/server/dist/providers/claude-native/usageContext.d.ts +30 -0
- package/server/dist/providers/claude-native/usageContext.js +70 -0
- package/server/dist/providers/claude-native/wireFingerprint.d.ts +2 -2
- package/server/dist/providers/claude-native/wireFingerprint.js +2 -2
- package/server/dist/providers/claude-native/worker.d.ts +63 -1
- package/server/dist/providers/claude-native/worker.js +1103 -324
- package/server/dist/providers/claude-native/workerHelpers.d.ts +13 -0
- package/server/dist/providers/claude-native/workerHelpers.js +117 -6
- package/server/dist/providers/claude-native/workspaceFacts.js +2 -2
- package/server/dist/providers/claude.d.ts +1 -0
- package/server/dist/providers/claude.js +69 -85
- package/server/dist/providers/clusterTaskToolDefinitions.d.ts +11 -0
- package/server/dist/providers/clusterTaskToolDefinitions.js +161 -0
- package/server/dist/providers/codex-appserver/catalog.js +26 -20
- package/server/dist/providers/codex-appserver/index.js +10 -3
- package/server/dist/providers/codex-appserver/jsonRpc.d.ts +2 -1
- package/server/dist/providers/codex-appserver/jsonRpc.js +11 -3
- package/server/dist/providers/codex-appserver/worker.d.ts +5 -0
- package/server/dist/providers/codex-appserver/worker.js +119 -81
- package/server/dist/providers/codex.js +55 -58
- package/server/dist/providers/codexChatBoundary.d.ts +11 -0
- package/server/dist/providers/codexChatBoundary.js +60 -0
- package/server/dist/providers/codexCodeMode.js +2 -2
- package/server/dist/providers/codexContextWindow.js +2 -2
- package/server/dist/providers/codexHome.d.ts +1 -0
- package/server/dist/providers/codexHome.js +6 -0
- package/server/dist/providers/codexImageTool.d.ts +6 -0
- package/server/dist/providers/codexImageTool.js +21 -0
- package/server/dist/providers/codexVersion.d.ts +1 -0
- package/server/dist/providers/codexVersion.js +14 -0
- package/server/dist/providers/codexWebSearch.d.ts +2 -0
- package/server/dist/providers/codexWebSearch.js +4 -0
- package/server/dist/providers/cursor/acpJsonRpc.d.ts +1 -0
- package/server/dist/providers/cursor/acpJsonRpc.js +3 -1
- package/server/dist/providers/cursor/authState.d.ts +10 -0
- package/server/dist/providers/cursor/authState.js +78 -0
- package/server/dist/providers/cursor/catalog.js +22 -14
- package/server/dist/providers/cursor/chatSandbox.d.ts +11 -0
- package/server/dist/providers/cursor/chatSandbox.js +81 -0
- package/server/dist/providers/cursor/filePlugin.d.ts +4 -0
- package/server/dist/providers/cursor/filePlugin.js +31 -0
- package/server/dist/providers/cursor/index.d.ts +1 -0
- package/server/dist/providers/cursor/index.js +30 -4
- package/server/dist/providers/cursor/modelMap.d.ts +35 -0
- package/server/dist/providers/cursor/modelMap.js +180 -0
- package/server/dist/providers/cursor/print.js +95 -30
- package/server/dist/providers/cursor/worker.d.ts +4 -1
- package/server/dist/providers/cursor/worker.js +169 -89
- package/server/dist/providers/errorClassifier.js +6 -2
- package/server/dist/providers/handoffHistoryBinding.d.ts +11 -0
- package/server/dist/providers/handoffHistoryBinding.js +43 -0
- package/server/dist/providers/index.d.ts +1 -1
- package/server/dist/providers/index.js +18 -18
- package/server/dist/providers/llamacpp.d.ts +1 -0
- package/server/dist/providers/llamacpp.js +102 -192
- package/server/dist/providers/llamacppManager.d.ts +5 -0
- package/server/dist/providers/llamacppManager.js +68 -32
- package/server/dist/providers/llamacppVersion.d.ts +1 -0
- package/server/dist/providers/llamacppVersion.js +5 -0
- package/server/dist/providers/lmstudio.d.ts +3 -3
- package/server/dist/providers/lmstudio.js +133 -207
- package/server/dist/providers/localFileMedia.d.ts +25 -0
- package/server/dist/providers/localFileMedia.js +302 -0
- package/server/dist/providers/localMcp.d.ts +17 -0
- package/server/dist/providers/localMcp.js +85 -0
- package/server/dist/providers/localProviderQueue.d.ts +2 -0
- package/server/dist/providers/localProviderQueue.js +11 -0
- package/server/dist/providers/localShellLifecycle.d.ts +7 -0
- package/server/dist/providers/localShellLifecycle.js +33 -0
- package/server/dist/providers/localToolDispatch.d.ts +28 -0
- package/server/dist/providers/localToolDispatch.js +90 -0
- package/server/dist/providers/ollama.d.ts +2 -1
- package/server/dist/providers/ollama.js +180 -181
- package/server/dist/providers/ollamaDurableCompaction.js +5 -4
- package/server/dist/providers/ollamaExecutionHistory.d.ts +1 -1
- package/server/dist/providers/ollamaExecutionHistory.js +55 -14
- package/server/dist/providers/ollamaFencedTools.js +10 -11
- package/server/dist/providers/ollamaResilience.js +9 -13
- package/server/dist/providers/ollamaTokens.js +3 -4
- package/server/dist/providers/ollamaToolSubset.d.ts +2 -0
- package/server/dist/providers/ollamaToolSubset.js +11 -40
- package/server/dist/providers/ollamaTools.d.ts +13 -0
- package/server/dist/providers/ollamaTools.js +225 -219
- package/server/dist/providers/outputStyle.d.ts +2 -1
- package/server/dist/providers/outputStyle.js +70 -76
- package/server/dist/providers/providerFileContent.d.ts +40 -0
- package/server/dist/providers/providerFileContent.js +151 -0
- package/server/dist/providers/renderedTranscript.d.ts +1 -0
- package/server/dist/providers/renderedTranscript.js +3 -0
- package/server/dist/providers/requestDeadline.d.ts +1 -0
- package/server/dist/providers/requestDeadline.js +26 -0
- package/server/dist/providers/sessionScope.d.ts +2 -0
- package/server/dist/providers/sessionScope.js +8 -0
- package/server/dist/providers/types.d.ts +1 -0
- package/server/dist/publicProject.d.ts +62 -0
- package/server/dist/publicProject.js +181 -0
- package/server/dist/publicProjectChoice.d.ts +4 -0
- package/server/dist/publicProjectChoice.js +46 -0
- package/server/dist/quota.d.ts +10 -7
- package/server/dist/quota.js +49 -19
- package/server/dist/recall/index.js +22 -23
- package/server/dist/recall/search.js +9 -32
- package/server/dist/recall/transcriptSearch.d.ts +4 -0
- package/server/dist/recall/transcriptSearch.js +29 -0
- package/server/dist/recentFilesLedger.js +9 -7
- package/server/dist/recentProjectActivity.d.ts +11 -0
- package/server/dist/recentProjectActivity.js +69 -0
- package/server/dist/scanDeadline.d.ts +4 -0
- package/server/dist/scanDeadline.js +48 -0
- package/server/dist/searchText.d.ts +1 -0
- package/server/dist/searchText.js +22 -0
- package/server/dist/server/broadcast.d.ts +2 -1
- package/server/dist/server/broadcast.js +177 -50
- package/server/dist/sessionJsonl.js +45 -19
- package/server/dist/settings.d.ts +6 -1
- package/server/dist/settings.js +183 -56
- package/server/dist/skillManagement.d.ts +125 -0
- package/server/dist/skillManagement.js +709 -0
- package/server/dist/skillMutation.d.ts +1 -0
- package/server/dist/skillMutation.js +6 -0
- package/server/dist/skills.d.ts +75 -1
- package/server/dist/skills.js +254 -75
- package/server/dist/smartPickup.d.ts +1 -0
- package/server/dist/smartPickup.js +2 -1
- package/server/dist/smartPickupAdapters.d.ts +8 -0
- package/server/dist/smartPickupAdapters.js +201 -14
- package/server/dist/storageActions.d.ts +50 -0
- package/server/dist/storageActions.js +326 -0
- package/server/dist/storageArchive.d.ts +24 -0
- package/server/dist/storageArchive.js +389 -0
- package/server/dist/storageOverview.d.ts +47 -0
- package/server/dist/storageOverview.js +197 -0
- package/server/dist/storageReport.d.ts +48 -0
- package/server/dist/storageReport.js +185 -0
- package/server/dist/storageRoot.d.ts +5 -0
- package/server/dist/storageRoot.js +38 -0
- package/server/dist/storageTurnWatch.d.ts +6 -0
- package/server/dist/storageTurnWatch.js +36 -0
- package/server/dist/storageWarnings.d.ts +4 -0
- package/server/dist/storageWarnings.js +96 -0
- package/server/dist/taskDispatcher.js +69 -41
- package/server/dist/templates/store.js +75 -59
- package/server/dist/terminal/ptyManager.d.ts +3 -1
- package/server/dist/terminal/ptyManager.js +44 -37
- package/server/dist/terminal/ptyPidRegistry.d.ts +4 -2
- package/server/dist/terminal/ptyPidRegistry.js +9 -63
- package/server/dist/thirdPartySkills.d.ts +4 -0
- package/server/dist/thirdPartySkills.js +80 -0
- package/server/dist/toolPath.d.ts +1 -0
- package/server/dist/toolPath.js +38 -0
- package/server/dist/toolboxWorkflow.js +2 -1
- package/server/dist/uploadImages.d.ts +6 -0
- package/server/dist/uploadImages.js +155 -0
- package/server/dist/voice/computerContext.js +2 -0
- package/server/dist/voice/conditionSchema.d.ts +1 -0
- package/server/dist/voice/conditionSchema.js +3 -1
- package/server/dist/voice/conditions.js +1 -1
- package/server/dist/workers/StreamParser.d.ts +3 -0
- package/server/dist/workers/StreamParser.js +45 -11
- package/server/dist/workers/WorkerManager.d.ts +9 -2
- package/server/dist/workers/WorkerManager.js +18 -18
- package/server/dist/workers/durablePidRegistry.d.ts +53 -0
- package/server/dist/workers/durablePidRegistry.js +289 -0
- package/server/dist/workers/limits.js +5 -2
- package/server/dist/workers/pidRegistry.d.ts +6 -9
- package/server/dist/workers/pidRegistry.js +13 -101
- package/server/dist/workers/processActivity.d.ts +6 -0
- package/server/dist/workers/processActivity.js +13 -0
- package/server/dist/workers/processKill.d.ts +30 -0
- package/server/dist/workers/processKill.js +174 -0
- package/server/dist/workers/processStartTime.d.ts +21 -5
- package/server/dist/workers/processStartTime.js +127 -50
- package/server/dist/workflowMeta.d.ts +15 -12
- package/server/dist/workflowMeta.js +42 -10
- package/server/dist/workflowStore.d.ts +3 -0
- package/server/dist/workflowStore.js +275 -88
- package/server/dist/workflows/modelTitles.js +4 -3
- package/server/dist/workflows/purgeWorkflow.d.ts +1 -0
- package/server/dist/workflows/purgeWorkflow.js +15 -2
- package/server/dist/workflows/sessionDiscovery.js +5 -17
- package/server/dist/workflows/sessionIndex.d.ts +2 -0
- package/server/dist/workflows/sessionIndex.js +46 -19
- package/server/dist/workflows/types.d.ts +15 -5
- package/server/dist/workspace.d.ts +1 -0
- package/server/dist/workspace.js +5 -0
- package/server/dist/ws/afterTurn.d.ts +9 -0
- package/server/dist/ws/afterTurn.js +25 -0
- package/server/dist/ws/clusterHandlers.d.ts +7 -2
- package/server/dist/ws/clusterHandlers.js +361 -407
- package/server/dist/ws/clusterMembers.d.ts +42 -0
- package/server/dist/ws/clusterMembers.js +165 -0
- package/server/dist/ws/compactHandlers.js +38 -28
- package/server/dist/ws/gateHandlers.js +2 -1
- package/server/dist/ws/genesisHandlers.js +171 -116
- package/server/dist/ws/handoffHandlers.d.ts +3 -1
- package/server/dist/ws/handoffHandlers.js +367 -196
- package/server/dist/ws/previewCaptureHandlers.js +1 -4
- package/server/dist/ws/taskLedgerHandlers.d.ts +6 -1
- package/server/dist/ws/taskLedgerHandlers.js +34 -13
- package/server/dist/ws/taskLifecycle.d.ts +15 -0
- package/server/dist/ws/taskLifecycle.js +39 -0
- package/server/dist/ws/turnEngine.d.ts +27 -8
- package/server/dist/ws/turnEngine.js +1790 -1637
- package/server/dist/ws/turnPrompt.d.ts +17 -0
- package/server/dist/ws/turnPrompt.js +47 -0
- package/server/dist/ws/turnSettings.d.ts +41 -0
- package/server/dist/ws/turnSettings.js +61 -0
- package/server/dist/ws/updatePrimaryConfig.js +63 -40
- package/server/dist/ws/workflowHandlers.d.ts +2 -1
- package/server/dist/ws/workflowHandlers.js +223 -182
- package/server/package.json +1 -1
- package/server/src/appBrowsers.ts +95 -0
- package/server/src/architectureReview.ts +327 -0
- package/server/src/architectureSkill.ts +71 -0
- package/server/src/arcoHome.ts +42 -3
- package/server/src/artifactCopy.ts +320 -0
- package/server/src/atomicFile.ts +6 -1
- package/server/src/attention.ts +33 -27
- package/server/src/auth.ts +20 -6
- package/server/src/authLoginSession.ts +7 -2
- package/server/src/boundedRead.ts +172 -0
- package/server/src/capabilities.ts +26 -9
- package/server/src/catchUp.ts +56 -17
- package/server/src/checkedFile.ts +90 -0
- package/server/src/claudeTransport.ts +14 -0
- package/server/src/clusterAutoTurn.ts +55 -7
- package/server/src/clusterBusyReminder.ts +45 -0
- package/server/src/clusterDirector.ts +6 -3
- package/server/src/clusterIdleNudger.ts +6 -0
- package/server/src/clusterMailbox.ts +96 -26
- package/server/src/clusterPeerOps.ts +11 -19
- package/server/src/clusterPlanBridge.ts +37 -45
- package/server/src/clusterPresets.ts +44 -31
- package/server/src/clusterProgress.ts +3 -0
- package/server/src/clusterSnapshots.ts +36 -15
- package/server/src/clusterStore.ts +25 -14
- package/server/src/clusterTurnTools.ts +11 -0
- package/server/src/commandShell.ts +287 -0
- package/server/src/compactionCounter.ts +69 -0
- package/server/src/compactionReport.ts +20 -0
- package/server/src/contentSearch.ts +8 -3
- package/server/src/contextCalibrator.ts +6 -1
- package/server/src/contextEstimator.ts +71 -16
- package/server/src/contextRefs.ts +41 -11
- package/server/src/conversationActivity.ts +26 -0
- package/server/src/cursorUsage.ts +13 -3
- package/server/src/diagnostics/checks.ts +4 -11
- package/server/src/diagnostics/executableLookup.ts +20 -0
- package/server/src/diagnostics/modelHealth.ts +3 -11
- package/server/src/diagnostics/supportBundle.ts +5 -13
- package/server/src/eventLog.ts +718 -0
- package/server/src/existingClusterMembers.ts +9 -0
- package/server/src/explorerArtifacts.ts +27 -10
- package/server/src/explorerChanged.ts +99 -67
- package/server/src/explorerDocs.ts +37 -31
- package/server/src/explorerLaunch.ts +11 -2
- package/server/src/explorerPlans.ts +22 -2
- package/server/src/fileAccessPolicy.ts +82 -1
- package/server/src/fileContent/decodeSlots.ts +31 -0
- package/server/src/fileContent/detect.ts +28 -0
- package/server/src/fileContent/externalImage.ts +49 -0
- package/server/src/fileContent/icons.ts +37 -0
- package/server/src/fileContent/images.ts +140 -0
- package/server/src/fileContent/legacyText.ts +16 -0
- package/server/src/fileContent/notebook.ts +37 -0
- package/server/src/fileContent/office.ts +234 -0
- package/server/src/fileContent/pdf.ts +59 -0
- package/server/src/fileContent/pngRows.ts +54 -0
- package/server/src/fileContent/svg.ts +42 -0
- package/server/src/fileContent/types.ts +39 -0
- package/server/src/fileContent/worker.ts +43 -0
- package/server/src/fileContent.ts +108 -0
- package/server/src/fileContextReceipts.ts +44 -0
- package/server/src/fileFetch.ts +167 -0
- package/server/src/fileVersion.ts +36 -0
- package/server/src/genesis/creative.ts +27 -33
- package/server/src/genesis/prompts.ts +3 -0
- package/server/src/genesis/savePlan.ts +45 -0
- package/server/src/genesis/stages.ts +4 -4
- package/server/src/gitDiff.ts +20 -5
- package/server/src/gitSnapshots.ts +288 -191
- package/server/src/gitWorking.ts +11 -11
- package/server/src/github.ts +3 -1
- package/server/src/goalRun.ts +7 -4
- package/server/src/handoffHistory.ts +89 -0
- package/server/src/handoffHistoryProtocol.ts +20 -0
- package/server/src/handoffHistorySupport.ts +10 -0
- package/server/src/handoffHistoryTool.ts +192 -0
- package/server/src/handoffPrompts.ts +6 -4
- package/server/src/handoffReplay.ts +20 -0
- package/server/src/handoffSeedCache.ts +22 -0
- package/server/src/http/appBrowserRoutes.ts +17 -0
- package/server/src/http/architectureReviewRoutes.ts +86 -0
- package/server/src/http/clusterRoutes.ts +17 -2
- package/server/src/http/clusterSnapshotRoutes.ts +8 -3
- package/server/src/http/connectionsRoutes.ts +5 -1
- package/server/src/http/diffRoutes.ts +36 -3
- package/server/src/http/explorerRoot.ts +20 -0
- package/server/src/http/explorerRoutes.ts +60 -12
- package/server/src/http/fileRead.ts +2 -1
- package/server/src/http/fileWriteRoutes.ts +3 -2
- package/server/src/http/gitCompareRoutes.ts +4 -5
- package/server/src/http/gitDiffRoutes.ts +3 -2
- package/server/src/http/gitOpRoutes.ts +3 -4
- package/server/src/http/gitWorktreeRoutes.ts +3 -2
- package/server/src/http/handoffHistoryRoutes.ts +42 -0
- package/server/src/http/imageWriteRoutes.ts +5 -1
- package/server/src/http/knowledgeRoutes.ts +2 -0
- package/server/src/http/mediaOpsRoutes.ts +2 -1
- package/server/src/http/originGuard.ts +71 -14
- package/server/src/http/outputRoutes.ts +26 -5
- package/server/src/http/projectBinding.ts +108 -0
- package/server/src/http/providerThrottleRoutes.ts +76 -0
- package/server/src/http/publicProjectRoutes.ts +86 -0
- package/server/src/http/readConfinement.ts +16 -9
- package/server/src/http/router.ts +177 -60
- package/server/src/http/searchRoutes.ts +4 -4
- package/server/src/http/sessionTransport.ts +27 -0
- package/server/src/http/skillManagementRoutes.ts +120 -0
- package/server/src/http/storageRoutes.ts +200 -0
- package/server/src/http/usageStatsRoutes.ts +3 -11
- package/server/src/http/utilityAgentRoutes.ts +19 -5
- package/server/src/http/workflowDataRoutes.ts +68 -16
- package/server/src/http/writeConfinement.ts +31 -12
- package/server/src/http/wsAuth.ts +27 -9
- package/server/src/imageTokens.ts +60 -0
- package/server/src/index.ts +269 -178
- package/server/src/inputDeliveryHistory.ts +122 -0
- package/server/src/keepStore.ts +139 -0
- package/server/src/knowledge/store.ts +27 -19
- package/server/src/legacyTarRestore.ts +177 -0
- package/server/src/llamacppCatalog.ts +47 -12
- package/server/src/localRuntimeStatus.ts +121 -0
- package/server/src/lsp/client.ts +19 -11
- package/server/src/lsp/servers.ts +2 -2
- package/server/src/managedPath.ts +38 -0
- package/server/src/management/clusterActivity.ts +6 -16
- package/server/src/management/hubGuard.ts +135 -0
- package/server/src/management/hubLink.ts +8 -2
- package/server/src/management/initHubLink.ts +54 -75
- package/server/src/manualCompactCapability.ts +8 -0
- package/server/src/mcp/arcoMcpServer.ts +4 -0
- package/server/src/mcp/client.ts +28 -11
- package/server/src/mcp/clusterMcpLoopback.ts +27 -1
- package/server/src/mcp/clusterMcpTools.ts +32 -27
- package/server/src/mcp/fileContent.ts +34 -0
- package/server/src/mcp/fileMcpServer.ts +12 -0
- package/server/src/mcp/fileMcpTools.ts +51 -0
- package/server/src/mcp/handoffHistoryMcpTools.ts +21 -0
- package/server/src/mcp/mcpConfigWriter.ts +43 -12
- package/server/src/mcp/planMcpTools.ts +9 -285
- package/server/src/mcp/planReadMcpServer.ts +19 -0
- package/server/src/mcp/registry.ts +41 -35
- package/server/src/mcp/registryWiring.ts +4 -5
- package/server/src/media/demucs.ts +11 -4
- package/server/src/media/ffmpeg.ts +21 -16
- package/server/src/media/scratch.ts +17 -10
- package/server/src/noticeSource.ts +11 -0
- package/server/src/notifications.ts +10 -5
- package/server/src/npmPlatformResolve.ts +25 -8
- package/server/src/ntfyTransport.ts +12 -4
- package/server/src/outputGrants.ts +53 -0
- package/server/src/outputStore.ts +5 -2
- package/server/src/outputs.ts +84 -17
- package/server/src/peerRecipientContext.ts +16 -5
- package/server/src/planHistory.ts +48 -0
- package/server/src/planStore.ts +201 -55
- package/server/src/planTools.ts +303 -0
- package/server/src/previewAutoDetect.ts +26 -19
- package/server/src/previewPortConfiguration.ts +28 -0
- package/server/src/previewPorts.ts +2 -0
- package/server/src/previewProxy.ts +156 -189
- package/server/src/primaryBackgroundTracker.ts +151 -61
- package/server/src/primitives/exportContext.ts +67 -16
- package/server/src/primitives/localFileContext.ts +31 -0
- package/server/src/primitives/reviewContent.ts +42 -7
- package/server/src/primitives/runCompare.ts +1 -1
- package/server/src/primitives/runDocEdit.ts +1 -1
- package/server/src/primitives/runMdTuneup.ts +45 -25
- package/server/src/primitives/runResearch.ts +1 -1
- package/server/src/primitives/runReviewer.ts +6 -2
- package/server/src/primitives/seedWorker.ts +36 -17
- package/server/src/project/orchestrationProposals.ts +6 -1
- package/server/src/project/taskLedger.ts +37 -11
- package/server/src/projectGlob.ts +9 -0
- package/server/src/projectIgnore.ts +19 -0
- package/server/src/projectScan.ts +76 -0
- package/server/src/projectStateIgnore.ts +40 -1
- package/server/src/projects.ts +114 -36
- package/server/src/prompts.ts +5 -8
- package/server/src/proportionateTestingSkill.ts +31 -0
- package/server/src/providers/attachmentLabels.ts +8 -0
- package/server/src/providers/attachments.ts +52 -174
- package/server/src/providers/claude-native/apiEndpoint.ts +9 -0
- package/server/src/providers/claude-native/appendOnlyPrefix.ts +17 -1
- package/server/src/providers/claude-native/catalog.ts +16 -14
- package/server/src/providers/claude-native/contentBlocks.ts +39 -8
- package/server/src/providers/claude-native/contextBudget.ts +0 -6
- package/server/src/providers/claude-native/editApply.ts +6 -1
- package/server/src/providers/claude-native/fileContent.ts +98 -0
- package/server/src/providers/claude-native/filterConfigs/bash-cargo-test.ts +1 -0
- package/server/src/providers/claude-native/filterConfigs/bash-jest-vitest.ts +1 -0
- package/server/src/providers/claude-native/filterConfigs/bash-pytest.ts +1 -0
- package/server/src/providers/claude-native/filterConfigs/index.ts +2 -1
- package/server/src/providers/claude-native/foldDigest.ts +9 -2
- package/server/src/providers/claude-native/gateReview.ts +0 -0
- package/server/src/providers/claude-native/hookIf.ts +414 -0
- package/server/src/providers/claude-native/hooks.ts +398 -54
- package/server/src/providers/claude-native/imageRead.ts +92 -0
- package/server/src/providers/claude-native/index.ts +32 -1
- package/server/src/providers/claude-native/mediaLimits.ts +14 -0
- package/server/src/providers/claude-native/mediaRetention.ts +49 -0
- package/server/src/providers/claude-native/mediaRetirementNotice.ts +8 -0
- package/server/src/providers/claude-native/modelParams.ts +23 -2
- package/server/src/providers/claude-native/oauth.ts +9 -8
- package/server/src/providers/claude-native/outputAccumulator.ts +29 -17
- package/server/src/providers/claude-native/peerTools.ts +5 -167
- package/server/src/providers/claude-native/pretoolGuards.ts +76 -9
- package/server/src/providers/claude-native/registryTools.ts +4 -2
- package/server/src/providers/claude-native/resumeSummary.ts +168 -44
- package/server/src/providers/claude-native/sandboxExecutor.ts +24 -16
- package/server/src/providers/claude-native/taskAdmission.ts +62 -0
- package/server/src/providers/claude-native/toolChecks.ts +127 -0
- package/server/src/providers/claude-native/toolPosture.ts +5 -3
- package/server/src/providers/claude-native/toolResultEviction.ts +17 -7
- package/server/src/providers/claude-native/tools.ts +228 -130
- package/server/src/providers/claude-native/usageContext.ts +93 -0
- package/server/src/providers/claude-native/wireFingerprint.ts +2 -2
- package/server/src/providers/claude-native/worker.ts +1056 -334
- package/server/src/providers/claude-native/workerHelpers.ts +133 -6
- package/server/src/providers/claude-native/workspaceFacts.ts +2 -2
- package/server/src/providers/claude.ts +65 -93
- package/server/src/providers/clusterTaskToolDefinitions.ts +180 -0
- package/server/src/providers/codex-appserver/catalog.ts +26 -19
- package/server/src/providers/codex-appserver/index.ts +8 -3
- package/server/src/providers/codex-appserver/jsonRpc.ts +9 -2
- package/server/src/providers/codex-appserver/worker.ts +108 -77
- package/server/src/providers/codex.ts +49 -57
- package/server/src/providers/codexChatBoundary.ts +55 -0
- package/server/src/providers/codexCodeMode.ts +2 -2
- package/server/src/providers/codexContextWindow.ts +2 -2
- package/server/src/providers/codexHome.ts +6 -0
- package/server/src/providers/codexImageTool.ts +22 -0
- package/server/src/providers/codexVersion.ts +13 -0
- package/server/src/providers/codexWebSearch.ts +5 -0
- package/server/src/providers/cursor/acpJsonRpc.ts +3 -1
- package/server/src/providers/cursor/authState.ts +72 -0
- package/server/src/providers/cursor/catalog.ts +20 -13
- package/server/src/providers/cursor/chatSandbox.ts +71 -0
- package/server/src/providers/cursor/filePlugin.ts +27 -0
- package/server/src/providers/cursor/index.ts +29 -4
- package/server/src/providers/cursor/modelMap.ts +182 -0
- package/server/src/providers/cursor/print.ts +80 -27
- package/server/src/providers/cursor/worker.ts +156 -84
- package/server/src/providers/errorClassifier.ts +7 -2
- package/server/src/providers/handoffHistoryBinding.ts +40 -0
- package/server/src/providers/index.ts +14 -22
- package/server/src/providers/llamacpp.ts +93 -176
- package/server/src/providers/llamacppManager.ts +62 -33
- package/server/src/providers/llamacppVersion.ts +4 -0
- package/server/src/providers/lmstudio.ts +124 -190
- package/server/src/providers/localFileMedia.ts +229 -0
- package/server/src/providers/localMcp.ts +76 -0
- package/server/src/providers/localProviderQueue.ts +13 -0
- package/server/src/providers/localShellLifecycle.ts +30 -0
- package/server/src/providers/localToolDispatch.ts +111 -0
- package/server/src/providers/ollama.ts +161 -171
- package/server/src/providers/ollamaCtxFallback.ts +1 -2
- package/server/src/providers/ollamaDurableCompaction.ts +5 -4
- package/server/src/providers/ollamaExecutionHistory.ts +40 -13
- package/server/src/providers/ollamaFencedTools.ts +10 -11
- package/server/src/providers/ollamaResilience.ts +10 -13
- package/server/src/providers/ollamaTokens.ts +4 -7
- package/server/src/providers/ollamaToolSubset.ts +14 -2
- package/server/src/providers/ollamaTools.ts +212 -200
- package/server/src/providers/outputStyle.ts +72 -72
- package/server/src/providers/providerFileContent.ts +133 -0
- package/server/src/providers/renderedTranscript.ts +2 -0
- package/server/src/providers/requestDeadline.ts +27 -0
- package/server/src/providers/sessionScope.ts +9 -0
- package/server/src/providers/types.ts +3 -0
- package/server/src/publicProject.ts +183 -0
- package/server/src/publicProjectChoice.ts +39 -0
- package/server/src/quota.ts +48 -23
- package/server/src/recall/index.ts +4 -9
- package/server/src/recall/search.ts +9 -32
- package/server/src/recall/transcriptSearch.ts +27 -0
- package/server/src/recentFilesLedger.ts +10 -8
- package/server/src/recentProjectActivity.ts +56 -0
- package/server/src/scanDeadline.ts +26 -0
- package/server/src/searchText.ts +16 -0
- package/server/src/server/broadcast.ts +166 -48
- package/server/src/sessionJsonl.ts +31 -17
- package/server/src/settings.ts +137 -41
- package/server/src/skillManagement.ts +585 -0
- package/server/src/skillMutation.ts +6 -0
- package/server/src/skills.ts +195 -25
- package/server/src/smartPickup.ts +3 -2
- package/server/src/smartPickupAdapters.ts +157 -13
- package/server/src/storageActions.ts +216 -0
- package/server/src/storageArchive.ts +297 -0
- package/server/src/storageOverview.ts +184 -0
- package/server/src/storageReport.ts +210 -0
- package/server/src/storageRoot.ts +30 -0
- package/server/src/storageTurnWatch.ts +39 -0
- package/server/src/storageWarnings.ts +84 -0
- package/server/src/taskDispatcher.ts +22 -2
- package/server/src/templates/store.ts +72 -57
- package/server/src/terminal/ptyManager.ts +37 -27
- package/server/src/terminal/ptyPidRegistry.ts +10 -58
- package/server/src/thirdPartySkills.ts +79 -0
- package/server/src/toolPath.ts +31 -0
- package/server/src/toolboxWorkflow.ts +2 -1
- package/server/src/uploadImages.ts +124 -0
- package/server/src/voice/computerContext.ts +2 -1
- package/server/src/voice/conditionSchema.ts +3 -1
- package/server/src/voice/conditions.ts +1 -1
- package/server/src/workers/StreamParser.ts +42 -11
- package/server/src/workers/WorkerManager.ts +32 -35
- package/server/src/workers/durablePidRegistry.ts +266 -0
- package/server/src/workers/limits.ts +5 -2
- package/server/src/workers/pidRegistry.ts +15 -89
- package/server/src/workers/processActivity.ts +14 -0
- package/server/src/workers/processKill.ts +175 -1
- package/server/src/workers/processStartTime.ts +137 -49
- package/server/src/workflowMeta.ts +59 -19
- package/server/src/workflowStore.ts +248 -76
- package/server/src/workflows/modelTitles.ts +4 -3
- package/server/src/workflows/purgeWorkflow.ts +12 -3
- package/server/src/workflows/sessionDiscovery.ts +5 -13
- package/server/src/workflows/sessionIndex.ts +29 -12
- package/server/src/workflows/types.ts +20 -10
- package/server/src/workspace.ts +6 -0
- package/server/src/ws/afterTurn.ts +34 -0
- package/server/src/ws/clusterHandlers.ts +198 -276
- package/server/src/ws/clusterMembers.ts +204 -0
- package/server/src/ws/compactHandlers.ts +38 -11
- package/server/src/ws/gateHandlers.ts +2 -1
- package/server/src/ws/genesisHandlers.ts +49 -6
- package/server/src/ws/handoffHandlers.ts +168 -53
- package/server/src/ws/previewCaptureHandlers.ts +1 -4
- package/server/src/ws/taskLedgerHandlers.ts +28 -14
- package/server/src/ws/taskLifecycle.ts +41 -0
- package/server/src/ws/turnEngine.ts +488 -366
- package/server/src/ws/turnPrompt.ts +60 -0
- package/server/src/ws/turnSettings.ts +95 -0
- package/server/src/ws/updatePrimaryConfig.ts +55 -31
- package/server/src/ws/workflowHandlers.ts +190 -160
- package/shared/dist/clusterCoordination.js +15 -7
- package/shared/dist/clusterRolePresets.js +8 -6
- package/shared/dist/codexChat.d.ts +2 -0
- package/shared/dist/codexChat.js +5 -0
- package/shared/dist/folderName.d.ts +1 -0
- package/shared/dist/folderName.js +18 -0
- package/shared/dist/index.d.ts +8 -0
- package/shared/dist/index.js +8 -0
- package/shared/dist/localRuntimeStatus.d.ts +23 -0
- package/shared/dist/localRuntimeStatus.js +47 -0
- package/shared/dist/notificationTitle.d.ts +9 -0
- package/shared/dist/notificationTitle.js +23 -0
- package/shared/dist/outputStyle.d.ts +10 -0
- package/shared/dist/outputStyle.js +28 -0
- package/shared/dist/outputs.d.ts +1 -0
- package/shared/dist/protocol/autoPickup.d.ts +3 -1
- package/shared/dist/protocol/autoPickup.js +1 -1
- package/shared/dist/protocol/chat.d.ts +4 -0
- package/shared/dist/protocol/checkpoints.d.ts +25 -2
- package/shared/dist/protocol/checkpoints.js +1 -0
- package/shared/dist/protocol/clientMessages.d.ts +9 -14
- package/shared/dist/protocol/clusters.d.ts +23 -5
- package/shared/dist/protocol/clusters.js +3 -3
- package/shared/dist/protocol/connections.d.ts +2 -0
- package/shared/dist/protocol/diagnostics.js +1 -1
- package/shared/dist/protocol/genesis.d.ts +9 -0
- package/shared/dist/protocol/index.d.ts +1 -0
- package/shared/dist/protocol/index.js +1 -0
- package/shared/dist/protocol/mcp.d.ts +1 -0
- package/shared/dist/protocol/mcp.js +8 -5
- package/shared/dist/protocol/mdTuneup.d.ts +8 -0
- package/shared/dist/protocol/models.d.ts +3 -1
- package/shared/dist/protocol/models.js +19 -8
- package/shared/dist/protocol/notifications.d.ts +4 -2
- package/shared/dist/protocol/notifications.js +18 -5
- package/shared/dist/protocol/plans.d.ts +4 -1
- package/shared/dist/protocol/remoteManagement.d.ts +6 -0
- package/shared/dist/protocol/serverMessages.d.ts +70 -10
- package/shared/dist/protocol/settings.d.ts +16 -4
- package/shared/dist/protocol/settings.js +17 -1
- package/shared/dist/protocol/storage.d.ts +21 -0
- package/shared/dist/protocol/storage.js +3 -0
- package/shared/dist/protocol/tasks.d.ts +4 -0
- package/shared/dist/protocol/usage.d.ts +1 -0
- package/shared/dist/protocol/utilityAgent.d.ts +2 -2
- package/shared/dist/protocol/utilityAgent.js +2 -2
- package/shared/dist/protocol/workers.d.ts +1 -0
- package/shared/dist/protocol/workflows.d.ts +73 -14
- package/shared/dist/protocol/workflows.js +66 -0
- package/shared/dist/publicGuardrails.d.ts +7 -0
- package/shared/dist/publicGuardrails.js +47 -0
- package/shared/dist/publicSafetyRules.d.ts +1 -0
- package/shared/dist/publicSafetyRules.js +6 -0
- package/shared/dist/runtimeVersions.d.ts +2 -0
- package/shared/dist/runtimeVersions.js +13 -0
- package/shared/dist/shellTool.d.ts +2 -0
- package/shared/dist/shellTool.js +9 -0
- package/shared/src/clusterCoordination.ts +12 -7
- package/shared/src/clusterRolePresets.ts +8 -6
- package/shared/src/codexChat.ts +8 -0
- package/shared/src/folderName.ts +11 -0
- package/shared/src/index.ts +11 -0
- package/shared/src/localRuntimeStatus.ts +53 -0
- package/shared/src/notificationTitle.ts +23 -0
- package/shared/src/outputStyle.ts +35 -0
- package/shared/src/outputs.ts +3 -0
- package/shared/src/protocol/autoPickup.ts +3 -1
- package/shared/src/protocol/chat.ts +5 -0
- package/shared/src/protocol/checkpoints.ts +41 -5
- package/shared/src/protocol/clientMessages.ts +11 -11
- package/shared/src/protocol/clusters.ts +46 -11
- package/shared/src/protocol/connections.ts +6 -0
- package/shared/src/protocol/diagnostics.ts +1 -1
- package/shared/src/protocol/genesis.ts +11 -0
- package/shared/src/protocol/index.ts +1 -0
- package/shared/src/protocol/mcp.ts +12 -7
- package/shared/src/protocol/mdTuneup.ts +9 -2
- package/shared/src/protocol/models.ts +22 -8
- package/shared/src/protocol/notifications.ts +22 -5
- package/shared/src/protocol/plans.ts +7 -7
- package/shared/src/protocol/remoteManagement.ts +10 -3
- package/shared/src/protocol/serverMessages.ts +90 -7
- package/shared/src/protocol/settings.ts +35 -5
- package/shared/src/protocol/storage.ts +35 -0
- package/shared/src/protocol/tasks.ts +7 -0
- package/shared/src/protocol/usage.ts +3 -3
- package/shared/src/protocol/utilityAgent.ts +2 -2
- package/shared/src/protocol/workers.ts +5 -0
- package/shared/src/protocol/workflows.ts +133 -21
- package/shared/src/publicGuardrails.ts +50 -0
- package/shared/src/publicSafetyRules.ts +5 -0
- package/shared/src/runtimeVersions.ts +15 -0
- package/shared/src/shellTool.ts +9 -0
- package/client/dist/assets/galleryEditor-Ca4F8HiM.js +0 -702
- package/client/dist/assets/index-CcNtMA2y.js +0 -546
- package/client/dist/assets/index-Dl8tYsSp.css +0 -1
- package/client/src/components/ConversationMenu.tsx +0 -467
- package/client/src/stores/sessionIndexStore.ts +0 -92
|
@@ -1,7 +1,24 @@
|
|
|
1
|
+
import { PORT } from '../server/constants.js';
|
|
2
|
+
import { HANDOFF_HISTORY_TOOL } from '../handoffHistoryProtocol.js';
|
|
3
|
+
import { callHandoffHistory } from '../mcp/handoffHistoryMcpTools.js';
|
|
4
|
+
import { CLUSTER_TASK_TOOL_DEFINITIONS } from './clusterTaskToolDefinitions.js';
|
|
5
|
+
import { PLAN_TOOL_DEFINITIONS, executePlanTool } from '../planTools.js';
|
|
6
|
+
import { FileScanDeadlineExceeded, regularFileLines } from '../boundedRead.js';
|
|
7
|
+
import { isSearchableTextFile } from '../searchText.js';
|
|
8
|
+
import { writeCheckedFile } from '../checkedFile.js';
|
|
9
|
+
import { readFileContent } from '../fileContent.js';
|
|
10
|
+
import { fetchFileContent, assertPublicFileFetchUrl } from '../fileFetch.js';
|
|
11
|
+
import { resolveToolPath } from '../toolPath.js';
|
|
12
|
+
import { requestWithDeadline } from './requestDeadline.js';
|
|
13
|
+
import { projectFiles, scanBudget } from '../projectScan.js';
|
|
14
|
+
import { matchesProjectGlob } from '../projectGlob.js';
|
|
1
15
|
import { promises as fs } from 'node:fs';
|
|
2
|
-
import { resolve, relative, isAbsolute,
|
|
16
|
+
import { resolve, relative, isAbsolute, dirname } from 'node:path';
|
|
3
17
|
import { spawn } from 'node:child_process';
|
|
4
|
-
import
|
|
18
|
+
import { commandShell, shellInvocation, shellToolLabel } from '../commandShell.js';
|
|
19
|
+
import { signalChildTree, spawnShellChild } from '../workers/processKill.js';
|
|
20
|
+
import { trackLocalShell } from './localShellLifecycle.js';
|
|
21
|
+
import { readBuiltinVirtualFile } from '../skills.js';
|
|
5
22
|
// Server-side tool runtime for local Ollama workers. File access is resolved
|
|
6
23
|
// against the workflow working directory and bounded output limits keep large
|
|
7
24
|
// reads, searches, and command results from exhausting the model context.
|
|
@@ -100,14 +117,15 @@ const ReadTool = {
|
|
|
100
117
|
type: 'function',
|
|
101
118
|
function: {
|
|
102
119
|
name: 'Read',
|
|
103
|
-
description: 'Read the
|
|
120
|
+
description: 'Read a file inside the workflow cwd, or a built-in skill file listed in the skill manifest. Relative paths resolve against cwd. Images are returned visually when the model supports vision; PDFs, office documents and notebooks are decoded as text, and other binaries return a note. Use pages for a document unit range. Default returns up to 32 KB; for larger files use `offset` + `limit` to read a specific line range. Don\'t fire many parallel Reads of large files — the local context window is finite and 5 large Reads will overflow it.',
|
|
104
121
|
parameters: {
|
|
105
122
|
type: 'object',
|
|
106
123
|
properties: {
|
|
107
124
|
file_path: {
|
|
108
125
|
type: 'string',
|
|
109
|
-
description: 'Path to the file. Relative paths resolve against cwd;
|
|
126
|
+
description: 'Path to the file. Relative paths resolve against cwd; built-in skill files use the absolute paths in their manifest.',
|
|
110
127
|
},
|
|
128
|
+
pages: { type: 'string', description: '1-based PDF page, office sheet/slide or notebook cell range, for example 1-3,5.' },
|
|
111
129
|
offset: {
|
|
112
130
|
type: 'number',
|
|
113
131
|
description: 'Optional 1-based starting line number. Default 1.',
|
|
@@ -131,30 +149,25 @@ const ReadTool = {
|
|
|
131
149
|
const limit = typeof rawLimit === 'number' && Number.isFinite(rawLimit) && rawLimit >= 1
|
|
132
150
|
? Math.floor(rawLimit)
|
|
133
151
|
: undefined;
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
const start = Math.min(offset - 1, lines.length);
|
|
148
|
-
const end = limit === undefined ? lines.length : Math.min(start + limit, lines.length);
|
|
149
|
-
body = lines.slice(start, end).join('\n');
|
|
150
|
-
}
|
|
151
|
-
// Hard byte cap regardless of line params.
|
|
152
|
-
if (body.length > READ_BYTE_CAP) {
|
|
153
|
-
const note = totalLines > 0
|
|
154
|
-
? `\n\n[truncated at ${READ_BYTE_CAP} bytes — file has ${totalLines} lines; use offset+limit to read a smaller range]`
|
|
155
|
-
: `\n\n[truncated at ${READ_BYTE_CAP} bytes — pass offset+limit to read a specific line range]`;
|
|
156
|
-
body = body.slice(0, READ_BYTE_CAP) + note;
|
|
152
|
+
const builtin = readBuiltinVirtualFile(filePath);
|
|
153
|
+
const abs = builtin === undefined ? (ctx.readPathResolver ? await ctx.readPathResolver(filePath) : resolveToolPath(ctx.cwd, filePath)) : filePath;
|
|
154
|
+
if (builtin === undefined) {
|
|
155
|
+
const result = await readFileContent(abs, {
|
|
156
|
+
signal: ctx.abortSignal, offset, limit,
|
|
157
|
+
pages: typeof args.pages === 'string' ? args.pages : undefined,
|
|
158
|
+
limits: { images: !!ctx.onImages, documents: false, maxTextBytes: READ_BYTE_CAP },
|
|
159
|
+
});
|
|
160
|
+
ctx.onFileContent?.(result);
|
|
161
|
+
const images = result.blocks.filter((b) => b.type === 'image');
|
|
162
|
+
if (images.length)
|
|
163
|
+
ctx.onImages?.(images);
|
|
164
|
+
return result.isError ? `[error] ${result.text}` : result.text;
|
|
157
165
|
}
|
|
166
|
+
const result = { text: builtin.split('\n').slice(offset - 1, limit === undefined ? undefined : offset - 1 + limit).join('\n'), truncated: false };
|
|
167
|
+
const truncated = result.truncated || Buffer.byteLength(result.text) > READ_BYTE_CAP;
|
|
168
|
+
let body = Buffer.from(result.text).subarray(0, READ_BYTE_CAP).toString('utf8');
|
|
169
|
+
if (truncated)
|
|
170
|
+
body += `\n\n[truncated at ${READ_BYTE_CAP} bytes; use offset+limit to read a smaller range]`;
|
|
158
171
|
return body;
|
|
159
172
|
},
|
|
160
173
|
};
|
|
@@ -164,7 +177,7 @@ const GlobTool = {
|
|
|
164
177
|
type: 'function',
|
|
165
178
|
function: {
|
|
166
179
|
name: 'Glob',
|
|
167
|
-
description: 'List files matching a glob pattern (e.g. "**/*.ts", "src/**/*.{ts,tsx}"). Searches under the workflow cwd unless `path` narrows the base.',
|
|
180
|
+
description: 'List files matching a glob pattern (e.g. "**/*.ts", "src/**/*.{ts,tsx}"). Searches under the workflow cwd unless `path` narrows the base. Skips ignored folders and nested checkouts; bounded walks report results truncated. Individually ignored files and explicitly selected ignored folders remain searchable.',
|
|
168
181
|
parameters: {
|
|
169
182
|
type: 'object',
|
|
170
183
|
properties: {
|
|
@@ -183,25 +196,36 @@ const GlobTool = {
|
|
|
183
196
|
},
|
|
184
197
|
execute: async (args, ctx) => {
|
|
185
198
|
const pattern = asString(args.pattern, 'pattern');
|
|
199
|
+
if (isAbsolute(pattern) || /(^|[\\/({,])\.\.($|[\\/}),])/.test(pattern))
|
|
200
|
+
throw new Error('Glob pattern must stay inside the workflow folder');
|
|
186
201
|
const basePath = asOptionalString(args.path, 'path');
|
|
187
|
-
const baseAbs =
|
|
202
|
+
const baseAbs = resolveToolPath(ctx.cwd, basePath || '.');
|
|
188
203
|
const out = [];
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
for await (const
|
|
193
|
-
|
|
194
|
-
|
|
204
|
+
if (matchesProjectGlob('', pattern, true) || matchesProjectGlob('.', pattern, true))
|
|
205
|
+
out.push('.');
|
|
206
|
+
const budget = scanBudget(20_000, 1000);
|
|
207
|
+
for await (const file of projectFiles(baseAbs, { budget, skip: SKIP_DIRS, respectGitIgnore: true, includeDirectories: true, includeLinks: true, maxDepth: 64 })) {
|
|
208
|
+
const entry = relative(baseAbs, file.path);
|
|
209
|
+
const matches = matchesProjectGlob(entry, pattern, file.directory);
|
|
210
|
+
if (!matches && !matchesProjectGlob(entry, pattern, true))
|
|
211
|
+
continue;
|
|
195
212
|
try {
|
|
196
|
-
|
|
213
|
+
const canonical = resolveToolPath(ctx.cwd, file.path);
|
|
214
|
+
// A confined directory alias can match a trailing slash without being walked.
|
|
215
|
+
if (!matches && !(await fs.lstat(canonical)).isDirectory())
|
|
216
|
+
continue;
|
|
197
217
|
}
|
|
198
218
|
catch {
|
|
199
219
|
continue;
|
|
200
220
|
}
|
|
201
221
|
out.push(entry);
|
|
202
|
-
if (out.length >= 1000)
|
|
222
|
+
if (out.length >= 1000) {
|
|
223
|
+
budget.partial = true;
|
|
203
224
|
break;
|
|
225
|
+
}
|
|
204
226
|
}
|
|
227
|
+
if (budget.partial)
|
|
228
|
+
out.push('[results truncated; narrow the search path or pattern]');
|
|
205
229
|
if (out.length === 0)
|
|
206
230
|
return '(no matches)';
|
|
207
231
|
return truncate(out.join('\n'), TOOL_OUTPUT_CAP, 'Glob result');
|
|
@@ -212,35 +236,12 @@ const GlobTool = {
|
|
|
212
236
|
// We don't shell out to ripgrep — it's not guaranteed installed (the
|
|
213
237
|
// reference machine doesn't have it as of 2026-04-26). POSIX walk is fine for
|
|
214
238
|
// the v1 use case and avoids a system dep flag.
|
|
215
|
-
async function* walkFiles(dir, skip, fileCap, counter) {
|
|
216
|
-
let entries;
|
|
217
|
-
try {
|
|
218
|
-
entries = await fs.readdir(dir, { withFileTypes: true });
|
|
219
|
-
}
|
|
220
|
-
catch {
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
for (const ent of entries) {
|
|
224
|
-
if (counter.n >= fileCap)
|
|
225
|
-
return;
|
|
226
|
-
const full = join(dir, ent.name);
|
|
227
|
-
if (ent.isDirectory()) {
|
|
228
|
-
if (skip.has(ent.name))
|
|
229
|
-
continue;
|
|
230
|
-
yield* walkFiles(full, skip, fileCap, counter);
|
|
231
|
-
}
|
|
232
|
-
else if (ent.isFile()) {
|
|
233
|
-
counter.n++;
|
|
234
|
-
yield full;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
239
|
const GrepTool = {
|
|
239
240
|
def: {
|
|
240
241
|
type: 'function',
|
|
241
242
|
function: {
|
|
242
243
|
name: 'Grep',
|
|
243
|
-
description: 'Search file contents for a regular expression. Results are matched lines (with file:line: prefix) unless `files_only` is true. Recurses under the workflow cwd, skipping
|
|
244
|
+
description: 'Search file contents for a regular expression. Results are matched lines (with file:line: prefix) unless `files_only` is true. Recurses under the workflow cwd, skipping ignored folders and nested checkouts. Bounded walks report results truncated.',
|
|
244
245
|
parameters: {
|
|
245
246
|
type: 'object',
|
|
246
247
|
properties: {
|
|
@@ -277,51 +278,65 @@ const GrepTool = {
|
|
|
277
278
|
catch (err) {
|
|
278
279
|
throw new Error(`invalid regex: ${err instanceof Error ? err.message : String(err)}`);
|
|
279
280
|
}
|
|
280
|
-
const baseAbs =
|
|
281
|
+
const baseAbs = resolveToolPath(ctx.cwd, basePath || '.');
|
|
282
|
+
const baseStat = await fs.stat(baseAbs);
|
|
283
|
+
if (!baseStat.isFile() && !baseStat.isDirectory())
|
|
284
|
+
throw new Error('not a regular file or directory');
|
|
281
285
|
const out = [];
|
|
282
286
|
let bytes = 0;
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
287
|
+
let shortened = false;
|
|
288
|
+
const budget = scanBudget(20_000, 1000);
|
|
289
|
+
let files = 0;
|
|
290
|
+
const paths = baseStat.isFile() ? [{ path: baseAbs }] : projectFiles(baseAbs, { budget, skip: SKIP_DIRS, respectGitIgnore: true, maxDepth: 64 });
|
|
291
|
+
for await (const { path: filePath } of paths) {
|
|
292
|
+
if (++files > GREP_WALK_FILE_CAP) {
|
|
293
|
+
budget.partial = true;
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
286
296
|
try {
|
|
287
|
-
|
|
297
|
+
resolveToolPath(ctx.cwd, filePath);
|
|
288
298
|
}
|
|
289
299
|
catch {
|
|
290
300
|
continue;
|
|
291
301
|
}
|
|
292
|
-
// Skip likely-binary files (NUL byte in first 1KB).
|
|
293
|
-
if (buf.subarray(0, 1024).includes(0))
|
|
294
|
-
continue;
|
|
295
|
-
const text = buf.toString('utf8');
|
|
296
302
|
const rel = relative(ctx.cwd, filePath);
|
|
297
|
-
|
|
298
|
-
if (
|
|
299
|
-
|
|
300
|
-
|
|
303
|
+
try {
|
|
304
|
+
if (!(await isSearchableTextFile(filePath)))
|
|
305
|
+
continue;
|
|
306
|
+
const fileOut = [];
|
|
307
|
+
let fileBytes = 0, fileShortened = false;
|
|
308
|
+
for await (const line of regularFileLines(filePath, TOOL_OUTPUT_CAP, ctx.abortSignal, true, budget.deadline)) {
|
|
309
|
+
if (line.truncated)
|
|
310
|
+
fileShortened = true;
|
|
311
|
+
if ((filesOnly && fileOut.length) || bytes + fileBytes >= TOOL_OUTPUT_CAP)
|
|
312
|
+
continue;
|
|
313
|
+
if (regex.test(line.text)) {
|
|
314
|
+
const entry = filesOnly ? rel : `${rel}:${line.number}: ${line.text}`;
|
|
315
|
+
fileOut.push(entry);
|
|
316
|
+
fileBytes += Buffer.byteLength(entry) + 1;
|
|
317
|
+
}
|
|
301
318
|
}
|
|
319
|
+
out.push(...fileOut);
|
|
320
|
+
bytes += fileBytes;
|
|
321
|
+
shortened ||= fileShortened;
|
|
302
322
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
bytes += entry.length + 1;
|
|
310
|
-
if (bytes >= TOOL_OUTPUT_CAP)
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
323
|
+
catch (error) {
|
|
324
|
+
if (ctx.abortSignal?.aborted)
|
|
325
|
+
throw error;
|
|
326
|
+
if (error instanceof FileScanDeadlineExceeded) {
|
|
327
|
+
budget.partial = true;
|
|
328
|
+
break;
|
|
313
329
|
}
|
|
314
330
|
}
|
|
315
331
|
if (bytes >= TOOL_OUTPUT_CAP)
|
|
316
332
|
break;
|
|
317
333
|
}
|
|
318
|
-
if (out.length === 0)
|
|
334
|
+
if (out.length === 0 && !shortened && !budget.partial)
|
|
319
335
|
return '(no matches)';
|
|
320
336
|
const joined = out.join('\n');
|
|
321
|
-
let suffix = '';
|
|
322
|
-
if (
|
|
323
|
-
suffix
|
|
324
|
-
}
|
|
337
|
+
let suffix = shortened ? '\n\n[truncated long lines during search; narrow the search or use a line range]' : '';
|
|
338
|
+
if (budget.partial)
|
|
339
|
+
suffix += '\n\n[results truncated; narrow the search path or pattern]';
|
|
325
340
|
return truncate(joined + suffix, TOOL_OUTPUT_CAP, 'Grep result');
|
|
326
341
|
},
|
|
327
342
|
};
|
|
@@ -351,7 +366,7 @@ const WriteTool = {
|
|
|
351
366
|
execute: async (args, ctx) => {
|
|
352
367
|
const filePath = asString(args.file_path, 'file_path');
|
|
353
368
|
const content = asString(args.content, 'content');
|
|
354
|
-
const abs =
|
|
369
|
+
const abs = resolveToolPath(ctx.cwd, filePath);
|
|
355
370
|
// Refuse to clobber a directory with a file write.
|
|
356
371
|
try {
|
|
357
372
|
const stat = await fs.stat(abs);
|
|
@@ -365,11 +380,11 @@ const WriteTool = {
|
|
|
365
380
|
}
|
|
366
381
|
// mkdir -p the parent. join + dirname avoid resolving outside cwd
|
|
367
382
|
// because resolveWithinCwd already validated `abs`.
|
|
368
|
-
const parent =
|
|
383
|
+
const parent = dirname(abs);
|
|
369
384
|
if (parent && parent !== resolve(ctx.cwd)) {
|
|
370
385
|
await fs.mkdir(parent, { recursive: true });
|
|
371
386
|
}
|
|
372
|
-
await
|
|
387
|
+
await writeCheckedFile(abs, content);
|
|
373
388
|
return `wrote ${content.length} bytes to ${relative(ctx.cwd, abs)}`;
|
|
374
389
|
},
|
|
375
390
|
};
|
|
@@ -402,29 +417,20 @@ const WebSearchTool = {
|
|
|
402
417
|
? Math.max(1, Math.min(10, Math.round(rawMax)))
|
|
403
418
|
: 5;
|
|
404
419
|
const url = `${SEARXNG_URL}/search?q=${encodeURIComponent(query)}&format=json`;
|
|
405
|
-
|
|
406
|
-
const timer = setTimeout(() => controller.abort(), WEBSEARCH_TIMEOUT_MS);
|
|
407
|
-
const onAbort = () => controller.abort();
|
|
408
|
-
ctx.abortSignal?.addEventListener('abort', onAbort, { once: true });
|
|
409
|
-
let res;
|
|
420
|
+
let data;
|
|
410
421
|
try {
|
|
411
|
-
|
|
422
|
+
data = await requestWithDeadline(ctx.abortSignal, WEBSEARCH_TIMEOUT_MS, async (signal) => {
|
|
423
|
+
const res = await fetch(url, { signal });
|
|
424
|
+
if (!res.ok) {
|
|
425
|
+
const detail = await res.text().catch(() => '');
|
|
426
|
+
throw new Error(`WebSearch HTTP ${res.status}: ${detail.slice(0, 200)}`);
|
|
427
|
+
}
|
|
428
|
+
return await res.json();
|
|
429
|
+
});
|
|
412
430
|
}
|
|
413
431
|
catch (err) {
|
|
414
|
-
if (controller.signal.aborted && !ctx.abortSignal?.aborted) {
|
|
415
|
-
return `[error] WebSearch timed out after ${WEBSEARCH_TIMEOUT_MS}ms — is SearXNG running on ${SEARXNG_URL}?`;
|
|
416
|
-
}
|
|
417
432
|
return `[error] WebSearch request failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
418
433
|
}
|
|
419
|
-
finally {
|
|
420
|
-
clearTimeout(timer);
|
|
421
|
-
ctx.abortSignal?.removeEventListener('abort', onAbort);
|
|
422
|
-
}
|
|
423
|
-
if (!res.ok) {
|
|
424
|
-
const detail = await res.text().catch(() => '');
|
|
425
|
-
return `[error] WebSearch HTTP ${res.status}: ${detail.slice(0, 200)}`;
|
|
426
|
-
}
|
|
427
|
-
const data = await res.json();
|
|
428
434
|
const results = (data.results ?? []).slice(0, maxResults);
|
|
429
435
|
if (results.length === 0) {
|
|
430
436
|
return `(no results for "${query}")`;
|
|
@@ -442,68 +448,15 @@ const WebSearchTool = {
|
|
|
442
448
|
return truncate(lines.join('\n'), TOOL_OUTPUT_CAP, 'WebSearch result');
|
|
443
449
|
},
|
|
444
450
|
};
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
if (lc === 'localhost' || lc.endsWith('.localhost'))
|
|
455
|
-
return true;
|
|
456
|
-
// IPv4 literal
|
|
457
|
-
const v4 = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(lc);
|
|
458
|
-
if (v4) {
|
|
459
|
-
const [a, b] = [parseInt(v4[1], 10), parseInt(v4[2], 10)];
|
|
460
|
-
if (a === 127)
|
|
461
|
-
return true; // 127/8 loopback
|
|
462
|
-
if (a === 10)
|
|
463
|
-
return true; // 10/8 private
|
|
464
|
-
if (a === 172 && b >= 16 && b <= 31)
|
|
465
|
-
return true; // 172.16/12 private
|
|
466
|
-
if (a === 192 && b === 168)
|
|
467
|
-
return true; // 192.168/16 private
|
|
468
|
-
if (a === 169 && b === 254)
|
|
469
|
-
return true; // 169.254/16 link-local (incl. cloud metadata)
|
|
470
|
-
if (a === 0)
|
|
471
|
-
return true; // 0/8 unspecified
|
|
472
|
-
return false;
|
|
473
|
-
}
|
|
474
|
-
// IPv6 literal — quick checks for the most common private forms.
|
|
475
|
-
if (lc === '::1' || lc.startsWith('::1'))
|
|
476
|
-
return true; // loopback
|
|
477
|
-
if (lc.startsWith('fc') || lc.startsWith('fd'))
|
|
478
|
-
return true; // fc00::/7 unique-local
|
|
479
|
-
if (lc.startsWith('fe80'))
|
|
480
|
-
return true; // fe80::/10 link-local
|
|
481
|
-
return false;
|
|
482
|
-
}
|
|
483
|
-
async function fastFetch(targetUrl, signal) {
|
|
484
|
-
let res;
|
|
485
|
-
try {
|
|
486
|
-
res = await fetch(targetUrl, {
|
|
487
|
-
signal,
|
|
488
|
-
redirect: 'follow',
|
|
489
|
-
headers: {
|
|
490
|
-
// Pretend to be a normal browser for sites that 403 on default
|
|
491
|
-
// node fetch UA. Stealth path covers the harder cases.
|
|
492
|
-
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0',
|
|
493
|
-
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
|
494
|
-
'Accept-Language': 'en-US,en;q=0.5',
|
|
495
|
-
},
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
catch (err) {
|
|
499
|
-
return { ok: false, text: '', reason: err instanceof Error ? err.message : String(err) };
|
|
500
|
-
}
|
|
501
|
-
const contentType = res.headers.get('content-type') ?? '';
|
|
502
|
-
// Read up to 2x the cap so post-strip we still have a shot at filling
|
|
503
|
-
// the budget. Beyond that we truncate.
|
|
504
|
-
const buf = await res.arrayBuffer();
|
|
505
|
-
const raw = new TextDecoder('utf-8', { fatal: false }).decode(buf).slice(0, TOOL_OUTPUT_CAP * 2);
|
|
506
|
-
return { ok: res.ok, status: res.status, contentType, text: raw };
|
|
451
|
+
async function fastFetch(targetUrl, signal, pages, images) {
|
|
452
|
+
const result = await fetchFileContent(targetUrl, { signal, pages, limits: { images, documents: false, maxTextBytes: TOOL_OUTPUT_CAP * 2 } });
|
|
453
|
+
return {
|
|
454
|
+
ok: result.status !== undefined && result.status >= 200 && result.status < 300,
|
|
455
|
+
status: result.status, contentType: result.contentType, text: result.text,
|
|
456
|
+
blocks: result.blocks, refused: result.refused, truncated: result.truncated, fileContent: result,
|
|
457
|
+
fileLike: result.kind !== 'text' && result.kind !== 'error',
|
|
458
|
+
...(result.isError ? { reason: result.text } : {}),
|
|
459
|
+
};
|
|
507
460
|
}
|
|
508
461
|
// Cheap HTML→text. Strips <script> and <style> blocks, replaces line-
|
|
509
462
|
// breaking tags with newlines, decodes the most common entities, and
|
|
@@ -533,6 +486,8 @@ function stripHtml(html) {
|
|
|
533
486
|
function looksBlocked(outcome) {
|
|
534
487
|
if (!outcome.ok)
|
|
535
488
|
return true;
|
|
489
|
+
if (outcome.fileLike)
|
|
490
|
+
return false;
|
|
536
491
|
if (outcome.text.length < 200)
|
|
537
492
|
return true;
|
|
538
493
|
const lc = outcome.text.toLowerCase().slice(0, 4096);
|
|
@@ -630,7 +585,7 @@ const WebFetchTool = {
|
|
|
630
585
|
type: 'function',
|
|
631
586
|
function: {
|
|
632
587
|
name: 'WebFetch',
|
|
633
|
-
description: 'Fetch a URL and
|
|
588
|
+
description: 'Fetch a URL. Images are returned visually when supported; PDFs and office files become text, other binaries a note. Default mode is "auto": tries a fast HTTP fetch first, falls back to a real browser (Camoufox) if the page returns 403, looks Cloudflare-blocked, or comes back empty. Use "fast" for sites you know respond to plain HTTP, "stealth" for sites you know are bot-protected. Output is capped at 64 KB. Loopback / private / link-local hosts are refused — those are operator-internal services, not fair game for the model.',
|
|
634
589
|
parameters: {
|
|
635
590
|
type: 'object',
|
|
636
591
|
properties: {
|
|
@@ -638,6 +593,7 @@ const WebFetchTool = {
|
|
|
638
593
|
type: 'string',
|
|
639
594
|
description: 'http:// or https:// URL to fetch.',
|
|
640
595
|
},
|
|
596
|
+
pages: { type: 'string', description: 'Optional 1-based document page, sheet or slide range, such as 1-3.' },
|
|
641
597
|
mode: {
|
|
642
598
|
type: 'string',
|
|
643
599
|
enum: ['auto', 'fast', 'stealth'],
|
|
@@ -661,28 +617,6 @@ const WebFetchTool = {
|
|
|
661
617
|
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
|
|
662
618
|
return `[error] WebFetch only supports http(s); got ${parsed.protocol}`;
|
|
663
619
|
}
|
|
664
|
-
if (isPrivateOrLoopbackHost(parsed.hostname)) {
|
|
665
|
-
return `[error] WebFetch refuses loopback / private / link-local hosts ("${parsed.hostname}"). Use WebSearch for general web search; use Bash + curl if you genuinely need an internal URL (and the operator has AUTO on).`;
|
|
666
|
-
}
|
|
667
|
-
// Resolve the hostname ourselves and re-validate the resolved IPs.
|
|
668
|
-
// Without this, a DNS server returning a public IP to our hostname-
|
|
669
|
-
// string check and a loopback IP to fetch()'s lookup (DNS rebinding)
|
|
670
|
-
// would slip past the guard above. There's a residual TOCTOU window
|
|
671
|
-
// (the kernel resolver re-queries when fetch runs) but this catches
|
|
672
|
-
// the common case where DNS gives consistent stable answers.
|
|
673
|
-
if (!/^\[?[0-9a-f.:]+\]?$/i.test(parsed.hostname)) {
|
|
674
|
-
try {
|
|
675
|
-
const records = await dns.lookup(parsed.hostname, { all: true });
|
|
676
|
-
for (const r of records) {
|
|
677
|
-
if (isPrivateOrLoopbackHost(r.address)) {
|
|
678
|
-
return `[error] WebFetch refuses "${parsed.hostname}" — resolves to private/loopback IP ${r.address}.`;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
catch (err) {
|
|
683
|
-
return `[error] WebFetch could not resolve "${parsed.hostname}": ${err instanceof Error ? err.message : String(err)}`;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
620
|
const fastSignal = AbortSignal.any([
|
|
687
621
|
AbortSignal.timeout(WEBFETCH_FAST_TIMEOUT_MS),
|
|
688
622
|
...(ctx.abortSignal ? [ctx.abortSignal] : []),
|
|
@@ -690,7 +624,9 @@ const WebFetchTool = {
|
|
|
690
624
|
let outcome = null;
|
|
691
625
|
let usedMode = mode;
|
|
692
626
|
if (mode === 'fast' || mode === 'auto') {
|
|
693
|
-
outcome = await fastFetch(parsed.toString(), fastSignal);
|
|
627
|
+
outcome = await fastFetch(parsed.toString(), fastSignal, typeof args.pages === 'string' ? args.pages : undefined, !!ctx.onImages);
|
|
628
|
+
if (outcome.refused || ctx.abortSignal?.aborted)
|
|
629
|
+
return outcome.text;
|
|
694
630
|
usedMode = 'fast';
|
|
695
631
|
if (mode === 'auto' && looksBlocked(outcome)) {
|
|
696
632
|
// Fall through to stealth.
|
|
@@ -698,6 +634,12 @@ const WebFetchTool = {
|
|
|
698
634
|
}
|
|
699
635
|
}
|
|
700
636
|
if (!outcome && (mode === 'stealth' || mode === 'auto')) {
|
|
637
|
+
try {
|
|
638
|
+
await assertPublicFileFetchUrl(parsed.toString(), ctx.abortSignal);
|
|
639
|
+
}
|
|
640
|
+
catch (error) {
|
|
641
|
+
return `[error] WebFetch refused URL: ${error instanceof Error ? error.message : String(error)}`;
|
|
642
|
+
}
|
|
701
643
|
outcome = await stealthFetch(parsed.toString(), ctx.abortSignal);
|
|
702
644
|
usedMode = 'stealth';
|
|
703
645
|
}
|
|
@@ -711,15 +653,19 @@ const WebFetchTool = {
|
|
|
711
653
|
// is already plain text, and JSON / markdown bodies should pass
|
|
712
654
|
// through verbatim.
|
|
713
655
|
let body = outcome.text;
|
|
714
|
-
if (
|
|
656
|
+
if (outcome.fileContent && !outcome.fileContent.isError)
|
|
657
|
+
ctx.onFileContent?.(outcome.fileContent);
|
|
658
|
+
ctx.onImages?.((outcome.blocks ?? []).filter((block) => block.type === 'image'));
|
|
659
|
+
if (usedMode === 'fast' && !outcome.fileLike && outcome.contentType && /html|xml/i.test(outcome.contentType)) {
|
|
715
660
|
body = stripHtml(body);
|
|
716
661
|
}
|
|
717
662
|
const header = `[${usedMode}${outcome.status ? ` ${outcome.status}` : ''}] ${parsed.toString()}`;
|
|
718
|
-
return truncate(`${header}\n\n${body}`, TOOL_OUTPUT_CAP, 'WebFetch result');
|
|
663
|
+
return truncate(`${header}\n\n${body}`, TOOL_OUTPUT_CAP, 'WebFetch result') + (outcome.truncated ? '\n[truncated response at byte budget]' : '');
|
|
719
664
|
},
|
|
720
665
|
};
|
|
721
666
|
// ── Bash ──────────────────────────────────────────────────────────────────
|
|
722
|
-
// Run `command` under /bin/sh -c
|
|
667
|
+
// Run `command` under /bin/sh -c (Git Bash on Windows, PowerShell on Windows
|
|
668
|
+
// without Git Bash; see commandShell.ts) with the workflow cwd. Capped output (64
|
|
723
669
|
// KB combined stdout+stderr), capped wall time (default 60s, hard ceiling
|
|
724
670
|
// 10min), no stdin (so accidental `read` calls don't hang). The child is
|
|
725
671
|
// spawned `detached:true` and killed via `process.kill(-pid, SIGKILL)` on
|
|
@@ -733,6 +679,9 @@ const WebFetchTool = {
|
|
|
733
679
|
// answer. A model intent on running `rm -rf ~` could already do it through
|
|
734
680
|
// Write; the right primary defense is operator awareness of AUTO mode.
|
|
735
681
|
async function runBashCommand(command, timeoutMs, ctx) {
|
|
682
|
+
const shell = commandShell();
|
|
683
|
+
if (!shell.ok)
|
|
684
|
+
return `[error] The Bash tool cannot run: ${shell.problem}`;
|
|
736
685
|
return new Promise((resolveResult) => {
|
|
737
686
|
let stdout = '';
|
|
738
687
|
let stderr = '';
|
|
@@ -740,23 +689,20 @@ async function runBashCommand(command, timeoutMs, ctx) {
|
|
|
740
689
|
let outputCapped = false;
|
|
741
690
|
let timedOut = false;
|
|
742
691
|
let aborted = false;
|
|
743
|
-
const
|
|
692
|
+
const run = shellInvocation(shell, command);
|
|
693
|
+
const child = spawnShellChild(run, {
|
|
744
694
|
cwd: ctx.cwd,
|
|
745
695
|
env: { ...process.env },
|
|
746
696
|
// ignore stdin so commands that read from stdin don't hang waiting.
|
|
697
|
+
// Unix: session leader, so process.kill(-pid) reaches all descendants.
|
|
747
698
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
748
|
-
// session leader → process.kill(-pid) reaches all descendants.
|
|
749
|
-
detached: true,
|
|
750
699
|
});
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
}
|
|
758
|
-
catch { /* already gone */ }
|
|
759
|
-
};
|
|
700
|
+
child.once('close', run.cleanup);
|
|
701
|
+
let stopping;
|
|
702
|
+
const killTree = () => stopping ??= signalChildTree(child, 'SIGKILL');
|
|
703
|
+
let markEnded;
|
|
704
|
+
const ended = new Promise(resolve => { markEnded = resolve; });
|
|
705
|
+
const untrack = trackLocalShell(ctx.workflowId, { stop: killTree, ended });
|
|
760
706
|
const timer = setTimeout(() => {
|
|
761
707
|
timedOut = true;
|
|
762
708
|
killTree();
|
|
@@ -801,10 +747,11 @@ async function runBashCommand(command, timeoutMs, ctx) {
|
|
|
801
747
|
};
|
|
802
748
|
child.stdout?.on('data', (b) => append('stdout', b));
|
|
803
749
|
child.stderr?.on('data', (b) => append('stderr', b));
|
|
804
|
-
const finish = (exitDescription) => {
|
|
750
|
+
const finish = async (exitDescription) => {
|
|
805
751
|
clearTimeout(timer);
|
|
806
752
|
if (onAbort && ctx.abortSignal)
|
|
807
753
|
ctx.abortSignal.removeEventListener('abort', onAbort);
|
|
754
|
+
await stopping;
|
|
808
755
|
const parts = [];
|
|
809
756
|
if (timedOut)
|
|
810
757
|
parts.push(`[timed out after ${timeoutMs}ms]`);
|
|
@@ -821,16 +768,17 @@ async function runBashCommand(command, timeoutMs, ctx) {
|
|
|
821
768
|
parts.push('--- stderr ---', trimmedStderr);
|
|
822
769
|
if (!trimmedStdout && !trimmedStderr)
|
|
823
770
|
parts.push('(no output)');
|
|
771
|
+
untrack();
|
|
772
|
+
markEnded();
|
|
824
773
|
resolveResult(parts.join('\n'));
|
|
825
774
|
};
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
});
|
|
775
|
+
let spawnError;
|
|
776
|
+
child.once('error', (err) => { spawnError = err; });
|
|
829
777
|
child.on('close', (code, signal) => {
|
|
830
778
|
const exitDesc = code === null
|
|
831
779
|
? `exit signal: ${signal ?? 'unknown'}`
|
|
832
780
|
: `exit code: ${code}`;
|
|
833
|
-
finish(exitDesc);
|
|
781
|
+
void finish(spawnError ? `[error] failed to spawn shell: ${spawnError.message}` : exitDesc);
|
|
834
782
|
});
|
|
835
783
|
});
|
|
836
784
|
}
|
|
@@ -839,13 +787,13 @@ const BashTool = {
|
|
|
839
787
|
type: 'function',
|
|
840
788
|
function: {
|
|
841
789
|
name: 'Bash',
|
|
842
|
-
description: 'Run a shell command in the workflow cwd via
|
|
790
|
+
description: 'Run a shell command in the workflow cwd via sh -c. Captures stdout + stderr (combined cap 64 KB) and an exit code. Default timeout 60s; max 600s. Active shell trees end on tab close. Stdin is closed — commands that read stdin will not hang. Honor the safety reminders in your prompt: cap unknown-size output, no `find /` without `-maxdepth`, no unbounded journalctl, etc.',
|
|
843
791
|
parameters: {
|
|
844
792
|
type: 'object',
|
|
845
793
|
properties: {
|
|
846
794
|
command: {
|
|
847
795
|
type: 'string',
|
|
848
|
-
description: 'Shell command. Pipes, redirects, and shell builtins are supported (passed verbatim to
|
|
796
|
+
description: 'Shell command. Pipes, redirects, and shell builtins are supported (passed verbatim to the shell).',
|
|
849
797
|
},
|
|
850
798
|
description: {
|
|
851
799
|
type: 'string',
|
|
@@ -944,6 +892,7 @@ const PeerSendTool = {
|
|
|
944
892
|
type: 'string',
|
|
945
893
|
description: 'Peer workflowId, unique 8-char prefix, unique display name, or unique role text.',
|
|
946
894
|
},
|
|
895
|
+
confirm: { type: 'boolean', description: 'Set true only when retrying a status_confirmation response.' },
|
|
947
896
|
content: {
|
|
948
897
|
type: 'string',
|
|
949
898
|
description: 'Message body, up to 16 KB.',
|
|
@@ -960,6 +909,7 @@ const PeerSendTool = {
|
|
|
960
909
|
from: ctx.workflowId,
|
|
961
910
|
to: asString(args.to, 'to'),
|
|
962
911
|
content: asString(args.content, 'content'),
|
|
912
|
+
...(args.confirm === true ? { confirm: true } : {}),
|
|
963
913
|
}),
|
|
964
914
|
}),
|
|
965
915
|
};
|
|
@@ -1039,8 +989,55 @@ const ClusterPlanWriteTool = {
|
|
|
1039
989
|
body: JSON.stringify({ workflowId: ctx.workflowId, body: asString(args.body, 'body') }),
|
|
1040
990
|
}),
|
|
1041
991
|
};
|
|
992
|
+
// Board schemas match Native. Calls use the same server routes as MCP, so
|
|
993
|
+
// ownership checks, attached-board state and operator-only completion remain
|
|
994
|
+
// authoritative on the server even if a worker has an older config snapshot.
|
|
995
|
+
const boardTools = Object.fromEntries(CLUSTER_TASK_TOOL_DEFINITIONS.map(tool => [tool.name, {
|
|
996
|
+
clusterOnly: true,
|
|
997
|
+
boardOnly: true,
|
|
998
|
+
def: { type: 'function', function: { name: tool.name, description: tool.description, parameters: tool.input_schema } },
|
|
999
|
+
execute: async (args, ctx) => {
|
|
1000
|
+
if (ctx.accessMode && ctx.accessMode !== 'standard')
|
|
1001
|
+
return '[error] access_denied: board tools require standard cluster access.';
|
|
1002
|
+
if (!ctx.taskBoardAttached)
|
|
1003
|
+
return '[error] board_detached: the project task board is not attached to this cluster.';
|
|
1004
|
+
// Validate required string arguments before issuing a request. Select
|
|
1005
|
+
// only declared properties; identity always comes from worker context.
|
|
1006
|
+
for (const key of tool.input_schema.required ?? [])
|
|
1007
|
+
asString(args[key], key);
|
|
1008
|
+
const op = tool.name.replace('cluster_', '').replaceAll('_', '-');
|
|
1009
|
+
if (tool.name === 'cluster_task_list' || tool.name === 'cluster_task_show') {
|
|
1010
|
+
const query = new URLSearchParams({ workflowId: ctx.workflowId ?? '' });
|
|
1011
|
+
if (tool.name === 'cluster_task_show')
|
|
1012
|
+
query.set('id', asString(args.id, 'id'));
|
|
1013
|
+
return clusterFetch(ctx, `${op}?${query}`, { method: 'GET' });
|
|
1014
|
+
}
|
|
1015
|
+
const payload = Object.fromEntries(Object.keys(tool.input_schema.properties).filter(key => args[key] !== undefined).map(key => [key, args[key]]));
|
|
1016
|
+
return clusterFetch(ctx, op, {
|
|
1017
|
+
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
1018
|
+
body: JSON.stringify({ ...payload, workflowId: ctx.workflowId }),
|
|
1019
|
+
});
|
|
1020
|
+
},
|
|
1021
|
+
}]));
|
|
1042
1022
|
// ── Registry ──────────────────────────────────────────────────────────────
|
|
1043
1023
|
const REGISTRY = {
|
|
1024
|
+
handoff_history: {
|
|
1025
|
+
workflowOnly: true,
|
|
1026
|
+
def: { type: 'function', function: { name: 'handoff_history', description: HANDOFF_HISTORY_TOOL.description, parameters: HANDOFF_HISTORY_TOOL.input_schema } },
|
|
1027
|
+
execute: async (args, ctx) => {
|
|
1028
|
+
if (!ctx.handoffHistoryToken)
|
|
1029
|
+
throw new Error('Earlier conversation history is unavailable.');
|
|
1030
|
+
return callHandoffHistory(ctx.handoffHistoryToken, PORT, args);
|
|
1031
|
+
},
|
|
1032
|
+
},
|
|
1033
|
+
...boardTools,
|
|
1034
|
+
...Object.fromEntries(PLAN_TOOL_DEFINITIONS.map(tool => [tool.name, {
|
|
1035
|
+
workflowOnly: true,
|
|
1036
|
+
def: { type: 'function', function: { name: tool.name, description: tool.description, parameters: tool.input_schema } },
|
|
1037
|
+
execute: (args, ctx) => executePlanTool(tool.name, args, {
|
|
1038
|
+
cwd: ctx.cwd, workflowId: ctx.workflowId ?? '', arcoPort: parseInt(process.env.ARCO_PORT ?? '3001', 10),
|
|
1039
|
+
}),
|
|
1040
|
+
}])),
|
|
1044
1041
|
Read: ReadTool,
|
|
1045
1042
|
Glob: GlobTool,
|
|
1046
1043
|
Grep: GrepTool,
|
|
@@ -1057,9 +1054,18 @@ const REGISTRY = {
|
|
|
1057
1054
|
};
|
|
1058
1055
|
export function getOllamaToolDefinitions(opts) {
|
|
1059
1056
|
return Object.values(REGISTRY)
|
|
1057
|
+
.filter(entry => entry.def.function.name !== 'handoff_history' || opts?.historyEnabled === true)
|
|
1058
|
+
.filter((entry) => !entry.workflowOnly || opts?.workflowEnabled === true)
|
|
1060
1059
|
.filter((entry) => !entry.clusterOnly || opts?.clusterEnabled === true)
|
|
1060
|
+
.filter((entry) => !entry.boardOnly || opts?.taskBoardAttached === true)
|
|
1061
1061
|
.filter((entry) => !opts?.mailboxOnly || !entry.clusterOnly || entry.def.function.name === 'peer_send' || entry.def.function.name === 'peer_read')
|
|
1062
|
-
.map((entry) => entry.def);
|
|
1062
|
+
.map((entry) => (entry === BashTool ? bashToolDef(entry.def) : entry.def));
|
|
1063
|
+
}
|
|
1064
|
+
// The Bash tool's description names the shell it really runs in (PowerShell
|
|
1065
|
+
// on Windows without Git Bash, so the model does not write bash for it).
|
|
1066
|
+
function bashToolDef(def) {
|
|
1067
|
+
const label = shellToolLabel();
|
|
1068
|
+
return label === 'sh -c' ? def : { ...def, function: { ...def.function, description: def.function.description.replace('via sh -c.', `via ${label}.`) } };
|
|
1063
1069
|
}
|
|
1064
1070
|
export function isKnownOllamaTool(name) {
|
|
1065
1071
|
return name in REGISTRY;
|