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,8 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
import { PORT } from '../server/constants.js';
|
|
2
|
+
import { HANDOFF_HISTORY_TOOL } from '../handoffHistoryProtocol.js';
|
|
3
|
+
import { callHandoffHistory } from '../mcp/handoffHistoryMcpTools.js';
|
|
4
|
+
import type { ClusterMemberAccessMode } from '@arco/shared';
|
|
5
|
+
import { CLUSTER_TASK_TOOL_DEFINITIONS } from './clusterTaskToolDefinitions.js';
|
|
6
|
+
import { PLAN_TOOL_DEFINITIONS, executePlanTool } from '../planTools.js';
|
|
7
|
+
import { FileScanDeadlineExceeded, regularFileLines } from '../boundedRead.js';
|
|
8
|
+
import { isSearchableTextFile } from '../searchText.js';
|
|
9
|
+
import { writeCheckedFile } from '../checkedFile.js';
|
|
10
|
+
import { readFileContent, type FileContentBlock, type FileContentResult } from '../fileContent.js';
|
|
11
|
+
import { fetchFileContent, assertPublicFileFetchUrl } from '../fileFetch.js';
|
|
12
|
+
import { resolveToolPath } from '../toolPath.js';
|
|
13
|
+
import { requestWithDeadline } from './requestDeadline.js';
|
|
14
|
+
|
|
15
|
+
import { projectFiles, scanBudget } from '../projectScan.js';
|
|
16
|
+
import { matchesProjectGlob } from '../projectGlob.js';
|
|
2
17
|
import { promises as fs } from 'node:fs';
|
|
3
|
-
import { resolve, relative, isAbsolute, join } from 'node:path';
|
|
18
|
+
import { resolve, relative, isAbsolute, join, dirname } from 'node:path';
|
|
4
19
|
import { spawn } from 'node:child_process';
|
|
5
|
-
import
|
|
20
|
+
import { commandShell, shellInvocation, shellToolLabel } from '../commandShell.js';
|
|
21
|
+
import { signalChildTree, spawnShellChild } from '../workers/processKill.js';
|
|
22
|
+
import { trackLocalShell } from './localShellLifecycle.js';
|
|
23
|
+
import { readBuiltinVirtualFile } from '../skills.js';
|
|
6
24
|
|
|
7
25
|
// Server-side tool runtime for local Ollama workers. File access is resolved
|
|
8
26
|
// against the workflow working directory and bounded output limits keep large
|
|
@@ -65,10 +83,16 @@ const SKIP_DIRS = new Set([
|
|
|
65
83
|
]);
|
|
66
84
|
|
|
67
85
|
export interface OllamaToolContext {
|
|
86
|
+
handoffHistoryToken?: string;
|
|
87
|
+
readPathResolver?: (path: string) => Promise<string>;
|
|
88
|
+
onFileContent?: (result: FileContentResult) => void;
|
|
68
89
|
cwd: string;
|
|
69
90
|
abortSignal?: AbortSignal;
|
|
70
91
|
workflowId?: string;
|
|
71
92
|
clusterId?: string;
|
|
93
|
+
taskBoardAttached?: boolean;
|
|
94
|
+
accessMode?: ClusterMemberAccessMode;
|
|
95
|
+
onImages?: (images: Extract<FileContentBlock, { type: 'image' }>[]) => void;
|
|
72
96
|
}
|
|
73
97
|
|
|
74
98
|
export interface OllamaToolDefinition {
|
|
@@ -93,6 +117,8 @@ interface OllamaToolEntry {
|
|
|
93
117
|
def: OllamaToolDefinition;
|
|
94
118
|
execute: OllamaToolExecutor;
|
|
95
119
|
clusterOnly?: boolean;
|
|
120
|
+
boardOnly?: boolean;
|
|
121
|
+
workflowOnly?: boolean;
|
|
96
122
|
}
|
|
97
123
|
|
|
98
124
|
// Resolve `p` against `cwd` and refuse anything that escapes. Both relative
|
|
@@ -142,14 +168,15 @@ const ReadTool: OllamaToolEntry = {
|
|
|
142
168
|
function: {
|
|
143
169
|
name: 'Read',
|
|
144
170
|
description:
|
|
145
|
-
'Read the
|
|
171
|
+
'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.',
|
|
146
172
|
parameters: {
|
|
147
173
|
type: 'object',
|
|
148
174
|
properties: {
|
|
149
175
|
file_path: {
|
|
150
176
|
type: 'string',
|
|
151
|
-
description: 'Path to the file. Relative paths resolve against cwd;
|
|
177
|
+
description: 'Path to the file. Relative paths resolve against cwd; built-in skill files use the absolute paths in their manifest.',
|
|
152
178
|
},
|
|
179
|
+
pages: { type: 'string', description: '1-based PDF page, office sheet/slide or notebook cell range, for example 1-3,5.' },
|
|
153
180
|
offset: {
|
|
154
181
|
type: 'number',
|
|
155
182
|
description: 'Optional 1-based starting line number. Default 1.',
|
|
@@ -173,30 +200,23 @@ const ReadTool: OllamaToolEntry = {
|
|
|
173
200
|
const limit = typeof rawLimit === 'number' && Number.isFinite(rawLimit) && rawLimit >= 1
|
|
174
201
|
? Math.floor(rawLimit)
|
|
175
202
|
: undefined;
|
|
176
|
-
const
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
totalLines = lines.length;
|
|
189
|
-
const start = Math.min(offset - 1, lines.length);
|
|
190
|
-
const end = limit === undefined ? lines.length : Math.min(start + limit, lines.length);
|
|
191
|
-
body = lines.slice(start, end).join('\n');
|
|
192
|
-
}
|
|
193
|
-
// Hard byte cap regardless of line params.
|
|
194
|
-
if (body.length > READ_BYTE_CAP) {
|
|
195
|
-
const note = totalLines > 0
|
|
196
|
-
? `\n\n[truncated at ${READ_BYTE_CAP} bytes — file has ${totalLines} lines; use offset+limit to read a smaller range]`
|
|
197
|
-
: `\n\n[truncated at ${READ_BYTE_CAP} bytes — pass offset+limit to read a specific line range]`;
|
|
198
|
-
body = body.slice(0, READ_BYTE_CAP) + note;
|
|
203
|
+
const builtin = readBuiltinVirtualFile(filePath);
|
|
204
|
+
const abs = builtin === undefined ? (ctx.readPathResolver ? await ctx.readPathResolver(filePath) : resolveToolPath(ctx.cwd, filePath)) : filePath;
|
|
205
|
+
if (builtin === undefined) {
|
|
206
|
+
const result = await readFileContent(abs, {
|
|
207
|
+
signal: ctx.abortSignal, offset, limit,
|
|
208
|
+
pages: typeof args.pages === 'string' ? args.pages : undefined,
|
|
209
|
+
limits: { images: !!ctx.onImages, documents: false, maxTextBytes: READ_BYTE_CAP },
|
|
210
|
+
});
|
|
211
|
+
ctx.onFileContent?.(result);
|
|
212
|
+
const images = result.blocks.filter((b): b is Extract<FileContentBlock, {type:'image'}> => b.type === 'image');
|
|
213
|
+
if (images.length) ctx.onImages?.(images);
|
|
214
|
+
return result.isError ? `[error] ${result.text}` : result.text;
|
|
199
215
|
}
|
|
216
|
+
const result = { text: builtin.split('\n').slice(offset - 1, limit === undefined ? undefined : offset - 1 + limit).join('\n'), truncated: false };
|
|
217
|
+
const truncated = result.truncated || Buffer.byteLength(result.text) > READ_BYTE_CAP;
|
|
218
|
+
let body = Buffer.from(result.text).subarray(0, READ_BYTE_CAP).toString('utf8');
|
|
219
|
+
if (truncated) body += `\n\n[truncated at ${READ_BYTE_CAP} bytes; use offset+limit to read a smaller range]`;
|
|
200
220
|
return body;
|
|
201
221
|
},
|
|
202
222
|
};
|
|
@@ -209,7 +229,7 @@ const GlobTool: OllamaToolEntry = {
|
|
|
209
229
|
function: {
|
|
210
230
|
name: 'Glob',
|
|
211
231
|
description:
|
|
212
|
-
'List files matching a glob pattern (e.g. "**/*.ts", "src/**/*.{ts,tsx}"). Searches under the workflow cwd unless `path` narrows the base.',
|
|
232
|
+
'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.',
|
|
213
233
|
parameters: {
|
|
214
234
|
type: 'object',
|
|
215
235
|
properties: {
|
|
@@ -228,23 +248,25 @@ const GlobTool: OllamaToolEntry = {
|
|
|
228
248
|
},
|
|
229
249
|
execute: async (args, ctx) => {
|
|
230
250
|
const pattern = asString(args.pattern, 'pattern');
|
|
251
|
+
if (isAbsolute(pattern) || /(^|[\\/({,])\.\.($|[\\/}),])/.test(pattern)) throw new Error('Glob pattern must stay inside the workflow folder');
|
|
231
252
|
const basePath = asOptionalString(args.path, 'path');
|
|
232
|
-
const baseAbs =
|
|
253
|
+
const baseAbs = resolveToolPath(ctx.cwd, basePath || '.');
|
|
233
254
|
const out: string[] = [];
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
255
|
+
if (matchesProjectGlob('', pattern, true) || matchesProjectGlob('.', pattern, true)) out.push('.');
|
|
256
|
+
const budget = scanBudget(20_000, 1000);
|
|
257
|
+
for await (const file of projectFiles(baseAbs, { budget, skip: SKIP_DIRS, respectGitIgnore: true, includeDirectories: true, includeLinks: true, maxDepth: 64 })) {
|
|
258
|
+
const entry = relative(baseAbs, file.path);
|
|
259
|
+
const matches = matchesProjectGlob(entry, pattern, file.directory);
|
|
260
|
+
if (!matches && !matchesProjectGlob(entry, pattern, true)) continue;
|
|
240
261
|
try {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
continue;
|
|
244
|
-
}
|
|
262
|
+
const canonical = resolveToolPath(ctx.cwd, file.path);
|
|
263
|
+
// A confined directory alias can match a trailing slash without being walked.
|
|
264
|
+
if (!matches && !(await fs.lstat(canonical)).isDirectory()) continue;
|
|
265
|
+
} catch { continue; }
|
|
245
266
|
out.push(entry);
|
|
246
|
-
if (out.length >= 1000) break;
|
|
267
|
+
if (out.length >= 1000) { budget.partial = true; break; }
|
|
247
268
|
}
|
|
269
|
+
if (budget.partial) out.push('[results truncated; narrow the search path or pattern]');
|
|
248
270
|
if (out.length === 0) return '(no matches)';
|
|
249
271
|
return truncate(out.join('\n'), TOOL_OUTPUT_CAP, 'Glob result');
|
|
250
272
|
},
|
|
@@ -256,25 +278,6 @@ const GlobTool: OllamaToolEntry = {
|
|
|
256
278
|
// We don't shell out to ripgrep — it's not guaranteed installed (the
|
|
257
279
|
// reference machine doesn't have it as of 2026-04-26). POSIX walk is fine for
|
|
258
280
|
// the v1 use case and avoids a system dep flag.
|
|
259
|
-
async function* walkFiles(dir: string, skip: Set<string>, fileCap: number, counter: { n: number }): AsyncGenerator<string> {
|
|
260
|
-
let entries: import('node:fs').Dirent[];
|
|
261
|
-
try {
|
|
262
|
-
entries = await fs.readdir(dir, { withFileTypes: true });
|
|
263
|
-
} catch {
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
for (const ent of entries) {
|
|
267
|
-
if (counter.n >= fileCap) return;
|
|
268
|
-
const full = join(dir, ent.name);
|
|
269
|
-
if (ent.isDirectory()) {
|
|
270
|
-
if (skip.has(ent.name)) continue;
|
|
271
|
-
yield* walkFiles(full, skip, fileCap, counter);
|
|
272
|
-
} else if (ent.isFile()) {
|
|
273
|
-
counter.n++;
|
|
274
|
-
yield full;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
281
|
|
|
279
282
|
const GrepTool: OllamaToolEntry = {
|
|
280
283
|
def: {
|
|
@@ -282,7 +285,7 @@ const GrepTool: OllamaToolEntry = {
|
|
|
282
285
|
function: {
|
|
283
286
|
name: 'Grep',
|
|
284
287
|
description:
|
|
285
|
-
'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
|
|
288
|
+
'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.',
|
|
286
289
|
parameters: {
|
|
287
290
|
type: 'object',
|
|
288
291
|
properties: {
|
|
@@ -318,45 +321,45 @@ const GrepTool: OllamaToolEntry = {
|
|
|
318
321
|
} catch (err) {
|
|
319
322
|
throw new Error(`invalid regex: ${err instanceof Error ? err.message : String(err)}`);
|
|
320
323
|
}
|
|
321
|
-
const baseAbs =
|
|
324
|
+
const baseAbs = resolveToolPath(ctx.cwd, basePath || '.');
|
|
325
|
+
const baseStat = await fs.stat(baseAbs);
|
|
326
|
+
if (!baseStat.isFile() && !baseStat.isDirectory()) throw new Error('not a regular file or directory');
|
|
322
327
|
const out: string[] = [];
|
|
323
328
|
let bytes = 0;
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
// Skip likely-binary files (NUL byte in first 1KB).
|
|
333
|
-
if (buf.subarray(0, 1024).includes(0)) continue;
|
|
334
|
-
const text = buf.toString('utf8');
|
|
329
|
+
let shortened = false;
|
|
330
|
+
const budget = scanBudget(20_000, 1000);
|
|
331
|
+
let files = 0;
|
|
332
|
+
const paths = baseStat.isFile() ? [{ path: baseAbs }] : projectFiles(baseAbs, { budget, skip: SKIP_DIRS, respectGitIgnore: true, maxDepth: 64 });
|
|
333
|
+
for await (const { path: filePath } of paths) {
|
|
334
|
+
if (++files > GREP_WALK_FILE_CAP) { budget.partial = true; break; }
|
|
335
|
+
try { resolveToolPath(ctx.cwd, filePath); } catch { continue; }
|
|
335
336
|
const rel = relative(ctx.cwd, filePath);
|
|
336
|
-
|
|
337
|
-
if (
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
bytes += entry.length + 1;
|
|
348
|
-
if (bytes >= TOOL_OUTPUT_CAP) break;
|
|
337
|
+
try {
|
|
338
|
+
if (!(await isSearchableTextFile(filePath))) continue;
|
|
339
|
+
const fileOut: string[] = [];
|
|
340
|
+
let fileBytes = 0, fileShortened = false;
|
|
341
|
+
for await (const line of regularFileLines(filePath, TOOL_OUTPUT_CAP, ctx.abortSignal, true, budget.deadline)) {
|
|
342
|
+
if (line.truncated) fileShortened = true;
|
|
343
|
+
if ((filesOnly && fileOut.length) || bytes + fileBytes >= TOOL_OUTPUT_CAP) continue;
|
|
344
|
+
if (regex.test(line.text)) {
|
|
345
|
+
const entry = filesOnly ? rel : `${rel}:${line.number}: ${line.text}`;
|
|
346
|
+
fileOut.push(entry);
|
|
347
|
+
fileBytes += Buffer.byteLength(entry) + 1;
|
|
349
348
|
}
|
|
350
349
|
}
|
|
350
|
+
out.push(...fileOut);
|
|
351
|
+
bytes += fileBytes;
|
|
352
|
+
shortened ||= fileShortened;
|
|
353
|
+
} catch (error) {
|
|
354
|
+
if (ctx.abortSignal?.aborted) throw error;
|
|
355
|
+
if (error instanceof FileScanDeadlineExceeded) { budget.partial = true; break; }
|
|
351
356
|
}
|
|
352
357
|
if (bytes >= TOOL_OUTPUT_CAP) break;
|
|
353
358
|
}
|
|
354
|
-
if (out.length === 0) return '(no matches)';
|
|
359
|
+
if (out.length === 0 && !shortened && !budget.partial) return '(no matches)';
|
|
355
360
|
const joined = out.join('\n');
|
|
356
|
-
let suffix = '';
|
|
357
|
-
if (
|
|
358
|
-
suffix = `\n\n[walk capped at ${GREP_WALK_FILE_CAP} files — narrow the search with \`path\` to see more]`;
|
|
359
|
-
}
|
|
361
|
+
let suffix = shortened ? '\n\n[truncated long lines during search; narrow the search or use a line range]' : '';
|
|
362
|
+
if (budget.partial) suffix += '\n\n[results truncated; narrow the search path or pattern]';
|
|
360
363
|
return truncate(joined + suffix, TOOL_OUTPUT_CAP, 'Grep result');
|
|
361
364
|
},
|
|
362
365
|
};
|
|
@@ -389,7 +392,7 @@ const WriteTool: OllamaToolEntry = {
|
|
|
389
392
|
execute: async (args, ctx) => {
|
|
390
393
|
const filePath = asString(args.file_path, 'file_path');
|
|
391
394
|
const content = asString(args.content, 'content');
|
|
392
|
-
const abs =
|
|
395
|
+
const abs = resolveToolPath(ctx.cwd, filePath);
|
|
393
396
|
// Refuse to clobber a directory with a file write.
|
|
394
397
|
try {
|
|
395
398
|
const stat = await fs.stat(abs);
|
|
@@ -401,11 +404,11 @@ const WriteTool: OllamaToolEntry = {
|
|
|
401
404
|
}
|
|
402
405
|
// mkdir -p the parent. join + dirname avoid resolving outside cwd
|
|
403
406
|
// because resolveWithinCwd already validated `abs`.
|
|
404
|
-
const parent =
|
|
407
|
+
const parent = dirname(abs);
|
|
405
408
|
if (parent && parent !== resolve(ctx.cwd)) {
|
|
406
409
|
await fs.mkdir(parent, { recursive: true });
|
|
407
410
|
}
|
|
408
|
-
await
|
|
411
|
+
await writeCheckedFile(abs, content);
|
|
409
412
|
return `wrote ${content.length} bytes to ${relative(ctx.cwd, abs)}`;
|
|
410
413
|
},
|
|
411
414
|
};
|
|
@@ -449,27 +452,19 @@ const WebSearchTool: OllamaToolEntry = {
|
|
|
449
452
|
? Math.max(1, Math.min(10, Math.round(rawMax)))
|
|
450
453
|
: 5;
|
|
451
454
|
const url = `${SEARXNG_URL}/search?q=${encodeURIComponent(query)}&format=json`;
|
|
452
|
-
|
|
453
|
-
const timer = setTimeout(() => controller.abort(), WEBSEARCH_TIMEOUT_MS);
|
|
454
|
-
const onAbort = (): void => controller.abort();
|
|
455
|
-
ctx.abortSignal?.addEventListener('abort', onAbort, { once: true });
|
|
456
|
-
let res: Response;
|
|
455
|
+
let data: { results?: SearxngResult[] };
|
|
457
456
|
try {
|
|
458
|
-
|
|
457
|
+
data = await requestWithDeadline(ctx.abortSignal, WEBSEARCH_TIMEOUT_MS, async (signal) => {
|
|
458
|
+
const res = await fetch(url, { signal });
|
|
459
|
+
if (!res.ok) {
|
|
460
|
+
const detail = await res.text().catch(() => '');
|
|
461
|
+
throw new Error(`WebSearch HTTP ${res.status}: ${detail.slice(0, 200)}`);
|
|
462
|
+
}
|
|
463
|
+
return await res.json() as { results?: SearxngResult[] };
|
|
464
|
+
});
|
|
459
465
|
} catch (err) {
|
|
460
|
-
if (controller.signal.aborted && !ctx.abortSignal?.aborted) {
|
|
461
|
-
return `[error] WebSearch timed out after ${WEBSEARCH_TIMEOUT_MS}ms — is SearXNG running on ${SEARXNG_URL}?`;
|
|
462
|
-
}
|
|
463
466
|
return `[error] WebSearch request failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
464
|
-
} finally {
|
|
465
|
-
clearTimeout(timer);
|
|
466
|
-
ctx.abortSignal?.removeEventListener('abort', onAbort);
|
|
467
|
-
}
|
|
468
|
-
if (!res.ok) {
|
|
469
|
-
const detail = await res.text().catch(() => '');
|
|
470
|
-
return `[error] WebSearch HTTP ${res.status}: ${detail.slice(0, 200)}`;
|
|
471
467
|
}
|
|
472
|
-
const data = await res.json() as { results?: SearxngResult[] };
|
|
473
468
|
const results = (data.results ?? []).slice(0, maxResults);
|
|
474
469
|
if (results.length === 0) {
|
|
475
470
|
return `(no results for "${query}")`;
|
|
@@ -495,29 +490,13 @@ const WebSearchTool: OllamaToolEntry = {
|
|
|
495
490
|
// data have no business reaching internal services. Operators who *want*
|
|
496
491
|
// to fetch a localhost URL can do it via Bash + curl in AUTO mode (their
|
|
497
492
|
// own choice, explicitly).
|
|
498
|
-
function isPrivateOrLoopbackHost(host: string): boolean {
|
|
499
|
-
const lc = host.toLowerCase();
|
|
500
|
-
if (lc === 'localhost' || lc.endsWith('.localhost')) return true;
|
|
501
|
-
// IPv4 literal
|
|
502
|
-
const v4 = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(lc);
|
|
503
|
-
if (v4) {
|
|
504
|
-
const [a, b] = [parseInt(v4[1], 10), parseInt(v4[2], 10)];
|
|
505
|
-
if (a === 127) return true; // 127/8 loopback
|
|
506
|
-
if (a === 10) return true; // 10/8 private
|
|
507
|
-
if (a === 172 && b >= 16 && b <= 31) return true; // 172.16/12 private
|
|
508
|
-
if (a === 192 && b === 168) return true; // 192.168/16 private
|
|
509
|
-
if (a === 169 && b === 254) return true; // 169.254/16 link-local (incl. cloud metadata)
|
|
510
|
-
if (a === 0) return true; // 0/8 unspecified
|
|
511
|
-
return false;
|
|
512
|
-
}
|
|
513
|
-
// IPv6 literal — quick checks for the most common private forms.
|
|
514
|
-
if (lc === '::1' || lc.startsWith('::1')) return true; // loopback
|
|
515
|
-
if (lc.startsWith('fc') || lc.startsWith('fd')) return true; // fc00::/7 unique-local
|
|
516
|
-
if (lc.startsWith('fe80')) return true; // fe80::/10 link-local
|
|
517
|
-
return false;
|
|
518
|
-
}
|
|
519
493
|
|
|
520
494
|
interface FetchOutcome {
|
|
495
|
+
fileContent?: FileContentResult;
|
|
496
|
+
blocks?: FileContentBlock[];
|
|
497
|
+
refused?: boolean;
|
|
498
|
+
fileLike?: boolean;
|
|
499
|
+
truncated?: boolean;
|
|
521
500
|
ok: boolean;
|
|
522
501
|
status?: number;
|
|
523
502
|
contentType?: string;
|
|
@@ -525,29 +504,15 @@ interface FetchOutcome {
|
|
|
525
504
|
reason?: string;
|
|
526
505
|
}
|
|
527
506
|
|
|
528
|
-
async function fastFetch(targetUrl: string, signal: AbortSignal): Promise<FetchOutcome> {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0',
|
|
538
|
-
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
|
539
|
-
'Accept-Language': 'en-US,en;q=0.5',
|
|
540
|
-
},
|
|
541
|
-
});
|
|
542
|
-
} catch (err) {
|
|
543
|
-
return { ok: false, text: '', reason: err instanceof Error ? err.message : String(err) };
|
|
544
|
-
}
|
|
545
|
-
const contentType = res.headers.get('content-type') ?? '';
|
|
546
|
-
// Read up to 2x the cap so post-strip we still have a shot at filling
|
|
547
|
-
// the budget. Beyond that we truncate.
|
|
548
|
-
const buf = await res.arrayBuffer();
|
|
549
|
-
const raw = new TextDecoder('utf-8', { fatal: false }).decode(buf).slice(0, TOOL_OUTPUT_CAP * 2);
|
|
550
|
-
return { ok: res.ok, status: res.status, contentType, text: raw };
|
|
507
|
+
async function fastFetch(targetUrl: string, signal: AbortSignal, pages: string | undefined, images: boolean): Promise<FetchOutcome> {
|
|
508
|
+
const result = await fetchFileContent(targetUrl, { signal, pages, limits: { images, documents: false, maxTextBytes: TOOL_OUTPUT_CAP * 2 } });
|
|
509
|
+
return {
|
|
510
|
+
ok: result.status !== undefined && result.status >= 200 && result.status < 300,
|
|
511
|
+
status: result.status, contentType: result.contentType, text: result.text,
|
|
512
|
+
blocks: result.blocks, refused: result.refused, truncated: result.truncated, fileContent: result,
|
|
513
|
+
fileLike: result.kind !== 'text' && result.kind !== 'error',
|
|
514
|
+
...(result.isError ? { reason: result.text } : {}),
|
|
515
|
+
};
|
|
551
516
|
}
|
|
552
517
|
|
|
553
518
|
// Cheap HTML→text. Strips <script> and <style> blocks, replaces line-
|
|
@@ -578,6 +543,7 @@ function stripHtml(html: string): string {
|
|
|
578
543
|
|
|
579
544
|
function looksBlocked(outcome: FetchOutcome): boolean {
|
|
580
545
|
if (!outcome.ok) return true;
|
|
546
|
+
if (outcome.fileLike) return false;
|
|
581
547
|
if (outcome.text.length < 200) return true;
|
|
582
548
|
const lc = outcome.text.toLowerCase().slice(0, 4096);
|
|
583
549
|
if (lc.includes('cf-chl-bypass') || lc.includes('cloudflare') && lc.includes('challenge')) return true;
|
|
@@ -666,7 +632,7 @@ const WebFetchTool: OllamaToolEntry = {
|
|
|
666
632
|
function: {
|
|
667
633
|
name: 'WebFetch',
|
|
668
634
|
description:
|
|
669
|
-
'Fetch a URL and
|
|
635
|
+
'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.',
|
|
670
636
|
parameters: {
|
|
671
637
|
type: 'object',
|
|
672
638
|
properties: {
|
|
@@ -674,6 +640,7 @@ const WebFetchTool: OllamaToolEntry = {
|
|
|
674
640
|
type: 'string',
|
|
675
641
|
description: 'http:// or https:// URL to fetch.',
|
|
676
642
|
},
|
|
643
|
+
pages: { type:'string', description:'Optional 1-based document page, sheet or slide range, such as 1-3.' },
|
|
677
644
|
mode: {
|
|
678
645
|
type: 'string',
|
|
679
646
|
enum: ['auto', 'fast', 'stealth'],
|
|
@@ -696,28 +663,6 @@ const WebFetchTool: OllamaToolEntry = {
|
|
|
696
663
|
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
|
|
697
664
|
return `[error] WebFetch only supports http(s); got ${parsed.protocol}`;
|
|
698
665
|
}
|
|
699
|
-
if (isPrivateOrLoopbackHost(parsed.hostname)) {
|
|
700
|
-
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).`;
|
|
701
|
-
}
|
|
702
|
-
// Resolve the hostname ourselves and re-validate the resolved IPs.
|
|
703
|
-
// Without this, a DNS server returning a public IP to our hostname-
|
|
704
|
-
// string check and a loopback IP to fetch()'s lookup (DNS rebinding)
|
|
705
|
-
// would slip past the guard above. There's a residual TOCTOU window
|
|
706
|
-
// (the kernel resolver re-queries when fetch runs) but this catches
|
|
707
|
-
// the common case where DNS gives consistent stable answers.
|
|
708
|
-
if (!/^\[?[0-9a-f.:]+\]?$/i.test(parsed.hostname)) {
|
|
709
|
-
try {
|
|
710
|
-
const records = await dns.lookup(parsed.hostname, { all: true });
|
|
711
|
-
for (const r of records) {
|
|
712
|
-
if (isPrivateOrLoopbackHost(r.address)) {
|
|
713
|
-
return `[error] WebFetch refuses "${parsed.hostname}" — resolves to private/loopback IP ${r.address}.`;
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
} catch (err) {
|
|
717
|
-
return `[error] WebFetch could not resolve "${parsed.hostname}": ${err instanceof Error ? err.message : String(err)}`;
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
|
|
721
666
|
const fastSignal = AbortSignal.any([
|
|
722
667
|
AbortSignal.timeout(WEBFETCH_FAST_TIMEOUT_MS),
|
|
723
668
|
...(ctx.abortSignal ? [ctx.abortSignal] : []),
|
|
@@ -727,7 +672,8 @@ const WebFetchTool: OllamaToolEntry = {
|
|
|
727
672
|
let usedMode = mode;
|
|
728
673
|
|
|
729
674
|
if (mode === 'fast' || mode === 'auto') {
|
|
730
|
-
outcome = await fastFetch(parsed.toString(), fastSignal);
|
|
675
|
+
outcome = await fastFetch(parsed.toString(), fastSignal, typeof args.pages === 'string' ? args.pages : undefined, !!ctx.onImages);
|
|
676
|
+
if (outcome.refused || ctx.abortSignal?.aborted) return outcome.text;
|
|
731
677
|
usedMode = 'fast';
|
|
732
678
|
if (mode === 'auto' && looksBlocked(outcome)) {
|
|
733
679
|
// Fall through to stealth.
|
|
@@ -736,6 +682,8 @@ const WebFetchTool: OllamaToolEntry = {
|
|
|
736
682
|
}
|
|
737
683
|
|
|
738
684
|
if (!outcome && (mode === 'stealth' || mode === 'auto')) {
|
|
685
|
+
try { await assertPublicFileFetchUrl(parsed.toString(), ctx.abortSignal); }
|
|
686
|
+
catch (error) { return `[error] WebFetch refused URL: ${error instanceof Error ? error.message : String(error)}`; }
|
|
739
687
|
outcome = await stealthFetch(parsed.toString(), ctx.abortSignal);
|
|
740
688
|
usedMode = 'stealth';
|
|
741
689
|
}
|
|
@@ -750,17 +698,20 @@ const WebFetchTool: OllamaToolEntry = {
|
|
|
750
698
|
// is already plain text, and JSON / markdown bodies should pass
|
|
751
699
|
// through verbatim.
|
|
752
700
|
let body = outcome.text;
|
|
753
|
-
if (
|
|
701
|
+
if (outcome.fileContent && !outcome.fileContent.isError) ctx.onFileContent?.(outcome.fileContent);
|
|
702
|
+
ctx.onImages?.((outcome.blocks ?? []).filter((block): block is Extract<FileContentBlock, { type: 'image' }> => block.type === 'image'));
|
|
703
|
+
if (usedMode === 'fast' && !outcome.fileLike && outcome.contentType && /html|xml/i.test(outcome.contentType)) {
|
|
754
704
|
body = stripHtml(body);
|
|
755
705
|
}
|
|
756
706
|
const header = `[${usedMode}${outcome.status ? ` ${outcome.status}` : ''}] ${parsed.toString()}`;
|
|
757
|
-
return truncate(`${header}\n\n${body}`, TOOL_OUTPUT_CAP, 'WebFetch result');
|
|
707
|
+
return truncate(`${header}\n\n${body}`, TOOL_OUTPUT_CAP, 'WebFetch result') + (outcome.truncated ? '\n[truncated response at byte budget]' : '');
|
|
758
708
|
},
|
|
759
709
|
};
|
|
760
710
|
|
|
761
711
|
// ── Bash ──────────────────────────────────────────────────────────────────
|
|
762
712
|
|
|
763
|
-
// Run `command` under /bin/sh -c
|
|
713
|
+
// Run `command` under /bin/sh -c (Git Bash on Windows, PowerShell on Windows
|
|
714
|
+
// without Git Bash; see commandShell.ts) with the workflow cwd. Capped output (64
|
|
764
715
|
// KB combined stdout+stderr), capped wall time (default 60s, hard ceiling
|
|
765
716
|
// 10min), no stdin (so accidental `read` calls don't hang). The child is
|
|
766
717
|
// spawned `detached:true` and killed via `process.kill(-pid, SIGKILL)` on
|
|
@@ -778,6 +729,8 @@ async function runBashCommand(
|
|
|
778
729
|
timeoutMs: number,
|
|
779
730
|
ctx: OllamaToolContext,
|
|
780
731
|
): Promise<string> {
|
|
732
|
+
const shell = commandShell();
|
|
733
|
+
if (!shell.ok) return `[error] The Bash tool cannot run: ${shell.problem}`;
|
|
781
734
|
return new Promise<string>((resolveResult) => {
|
|
782
735
|
let stdout = '';
|
|
783
736
|
let stderr = '';
|
|
@@ -786,21 +739,21 @@ async function runBashCommand(
|
|
|
786
739
|
let timedOut = false;
|
|
787
740
|
let aborted = false;
|
|
788
741
|
|
|
789
|
-
const
|
|
742
|
+
const run = shellInvocation(shell, command);
|
|
743
|
+
const child = spawnShellChild(run, {
|
|
790
744
|
cwd: ctx.cwd,
|
|
791
745
|
env: { ...process.env },
|
|
792
746
|
// ignore stdin so commands that read from stdin don't hang waiting.
|
|
747
|
+
// Unix: session leader, so process.kill(-pid) reaches all descendants.
|
|
793
748
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
794
|
-
// session leader → process.kill(-pid) reaches all descendants.
|
|
795
|
-
detached: true,
|
|
796
749
|
});
|
|
750
|
+
child.once('close', run.cleanup);
|
|
797
751
|
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
};
|
|
752
|
+
let stopping: Promise<void> | undefined;
|
|
753
|
+
const killTree = (): Promise<void> => stopping ??= signalChildTree(child, 'SIGKILL');
|
|
754
|
+
let markEnded!: () => void;
|
|
755
|
+
const ended = new Promise<void>(resolve => { markEnded = resolve; });
|
|
756
|
+
const untrack = trackLocalShell(ctx.workflowId, { stop: killTree, ended });
|
|
804
757
|
|
|
805
758
|
const timer = setTimeout(() => {
|
|
806
759
|
timedOut = true;
|
|
@@ -844,9 +797,10 @@ async function runBashCommand(
|
|
|
844
797
|
child.stdout?.on('data', (b: Buffer) => append('stdout', b));
|
|
845
798
|
child.stderr?.on('data', (b: Buffer) => append('stderr', b));
|
|
846
799
|
|
|
847
|
-
const finish = (exitDescription: string): void => {
|
|
800
|
+
const finish = async (exitDescription: string): Promise<void> => {
|
|
848
801
|
clearTimeout(timer);
|
|
849
802
|
if (onAbort && ctx.abortSignal) ctx.abortSignal.removeEventListener('abort', onAbort);
|
|
803
|
+
await stopping;
|
|
850
804
|
const parts: string[] = [];
|
|
851
805
|
if (timedOut) parts.push(`[timed out after ${timeoutMs}ms]`);
|
|
852
806
|
if (aborted) parts.push('[aborted]');
|
|
@@ -857,18 +811,19 @@ async function runBashCommand(
|
|
|
857
811
|
if (trimmedStdout) parts.push('--- stdout ---', trimmedStdout);
|
|
858
812
|
if (trimmedStderr) parts.push('--- stderr ---', trimmedStderr);
|
|
859
813
|
if (!trimmedStdout && !trimmedStderr) parts.push('(no output)');
|
|
814
|
+
untrack();
|
|
815
|
+
markEnded();
|
|
860
816
|
resolveResult(parts.join('\n'));
|
|
861
817
|
};
|
|
862
818
|
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
});
|
|
819
|
+
let spawnError: Error | undefined;
|
|
820
|
+
child.once('error', (err) => { spawnError = err; });
|
|
866
821
|
|
|
867
822
|
child.on('close', (code, signal) => {
|
|
868
823
|
const exitDesc = code === null
|
|
869
824
|
? `exit signal: ${signal ?? 'unknown'}`
|
|
870
825
|
: `exit code: ${code}`;
|
|
871
|
-
finish(exitDesc);
|
|
826
|
+
void finish(spawnError ? `[error] failed to spawn shell: ${spawnError.message}` : exitDesc);
|
|
872
827
|
});
|
|
873
828
|
});
|
|
874
829
|
}
|
|
@@ -879,13 +834,13 @@ const BashTool: OllamaToolEntry = {
|
|
|
879
834
|
function: {
|
|
880
835
|
name: 'Bash',
|
|
881
836
|
description:
|
|
882
|
-
'Run a shell command in the workflow cwd via
|
|
837
|
+
'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.',
|
|
883
838
|
parameters: {
|
|
884
839
|
type: 'object',
|
|
885
840
|
properties: {
|
|
886
841
|
command: {
|
|
887
842
|
type: 'string',
|
|
888
|
-
description: 'Shell command. Pipes, redirects, and shell builtins are supported (passed verbatim to
|
|
843
|
+
description: 'Shell command. Pipes, redirects, and shell builtins are supported (passed verbatim to the shell).',
|
|
889
844
|
},
|
|
890
845
|
description: {
|
|
891
846
|
type: 'string',
|
|
@@ -991,6 +946,7 @@ const PeerSendTool: OllamaToolEntry = {
|
|
|
991
946
|
type: 'string',
|
|
992
947
|
description: 'Peer workflowId, unique 8-char prefix, unique display name, or unique role text.',
|
|
993
948
|
},
|
|
949
|
+
confirm: { type: 'boolean', description: 'Set true only when retrying a status_confirmation response.' },
|
|
994
950
|
content: {
|
|
995
951
|
type: 'string',
|
|
996
952
|
description: 'Message body, up to 16 KB.',
|
|
@@ -1007,6 +963,7 @@ const PeerSendTool: OllamaToolEntry = {
|
|
|
1007
963
|
from: ctx.workflowId,
|
|
1008
964
|
to: asString(args.to, 'to'),
|
|
1009
965
|
content: asString(args.content, 'content'),
|
|
966
|
+
...(args.confirm === true ? { confirm: true } : {}),
|
|
1010
967
|
}),
|
|
1011
968
|
}),
|
|
1012
969
|
};
|
|
@@ -1091,9 +1048,54 @@ const ClusterPlanWriteTool: OllamaToolEntry = {
|
|
|
1091
1048
|
}),
|
|
1092
1049
|
};
|
|
1093
1050
|
|
|
1051
|
+
// Board schemas match Native. Calls use the same server routes as MCP, so
|
|
1052
|
+
// ownership checks, attached-board state and operator-only completion remain
|
|
1053
|
+
// authoritative on the server even if a worker has an older config snapshot.
|
|
1054
|
+
const boardTools: Record<string, OllamaToolEntry> = Object.fromEntries(
|
|
1055
|
+
CLUSTER_TASK_TOOL_DEFINITIONS.map(tool => [tool.name, {
|
|
1056
|
+
clusterOnly: true,
|
|
1057
|
+
boardOnly: true,
|
|
1058
|
+
def: { type: 'function', function: { name: tool.name, description: tool.description, parameters: tool.input_schema } },
|
|
1059
|
+
execute: async (args: Record<string, unknown>, ctx: OllamaToolContext) => {
|
|
1060
|
+
if (ctx.accessMode && ctx.accessMode !== 'standard') return '[error] access_denied: board tools require standard cluster access.';
|
|
1061
|
+
if (!ctx.taskBoardAttached) return '[error] board_detached: the project task board is not attached to this cluster.';
|
|
1062
|
+
// Validate required string arguments before issuing a request. Select
|
|
1063
|
+
// only declared properties; identity always comes from worker context.
|
|
1064
|
+
for (const key of tool.input_schema.required ?? []) asString(args[key], key);
|
|
1065
|
+
const op = tool.name.replace('cluster_', '').replaceAll('_', '-');
|
|
1066
|
+
if (tool.name === 'cluster_task_list' || tool.name === 'cluster_task_show') {
|
|
1067
|
+
const query = new URLSearchParams({ workflowId: ctx.workflowId ?? '' });
|
|
1068
|
+
if (tool.name === 'cluster_task_show') query.set('id', asString(args.id, 'id'));
|
|
1069
|
+
return clusterFetch(ctx, `${op}?${query}`, { method: 'GET' });
|
|
1070
|
+
}
|
|
1071
|
+
const payload = Object.fromEntries(Object.keys(tool.input_schema.properties).filter(key => args[key] !== undefined).map(key => [key, args[key]]));
|
|
1072
|
+
return clusterFetch(ctx, op, {
|
|
1073
|
+
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
1074
|
+
body: JSON.stringify({ ...payload, workflowId: ctx.workflowId }),
|
|
1075
|
+
});
|
|
1076
|
+
},
|
|
1077
|
+
}]),
|
|
1078
|
+
);
|
|
1079
|
+
|
|
1094
1080
|
// ── Registry ──────────────────────────────────────────────────────────────
|
|
1095
1081
|
|
|
1096
1082
|
const REGISTRY: Record<string, OllamaToolEntry> = {
|
|
1083
|
+
handoff_history: {
|
|
1084
|
+
workflowOnly: true,
|
|
1085
|
+
def: { type: 'function', function: { name: 'handoff_history', description: HANDOFF_HISTORY_TOOL.description, parameters: HANDOFF_HISTORY_TOOL.input_schema } },
|
|
1086
|
+
execute: async (args, ctx) => {
|
|
1087
|
+
if (!ctx.handoffHistoryToken) throw new Error('Earlier conversation history is unavailable.');
|
|
1088
|
+
return callHandoffHistory(ctx.handoffHistoryToken, PORT, args);
|
|
1089
|
+
},
|
|
1090
|
+
},
|
|
1091
|
+
...boardTools,
|
|
1092
|
+
...Object.fromEntries(PLAN_TOOL_DEFINITIONS.map(tool => [tool.name, {
|
|
1093
|
+
workflowOnly: true,
|
|
1094
|
+
def: { type: 'function', function: { name: tool.name, description: tool.description, parameters: tool.input_schema } },
|
|
1095
|
+
execute: (args: Record<string, unknown>, ctx: OllamaToolContext) => executePlanTool(tool.name, args, {
|
|
1096
|
+
cwd: ctx.cwd, workflowId: ctx.workflowId ?? '', arcoPort: parseInt(process.env.ARCO_PORT ?? '3001', 10),
|
|
1097
|
+
}),
|
|
1098
|
+
}])),
|
|
1097
1099
|
Read: ReadTool,
|
|
1098
1100
|
Glob: GlobTool,
|
|
1099
1101
|
Grep: GrepTool,
|
|
@@ -1109,11 +1111,21 @@ const REGISTRY: Record<string, OllamaToolEntry> = {
|
|
|
1109
1111
|
cluster_plan_write: ClusterPlanWriteTool,
|
|
1110
1112
|
};
|
|
1111
1113
|
|
|
1112
|
-
export function getOllamaToolDefinitions(opts?: { clusterEnabled?: boolean; mailboxOnly?: boolean }): OllamaToolDefinition[] {
|
|
1114
|
+
export function getOllamaToolDefinitions(opts?: { clusterEnabled?: boolean; mailboxOnly?: boolean; taskBoardAttached?: boolean; workflowEnabled?: boolean; historyEnabled?: boolean }): OllamaToolDefinition[] {
|
|
1113
1115
|
return Object.values(REGISTRY)
|
|
1116
|
+
.filter(entry => entry.def.function.name !== 'handoff_history' || opts?.historyEnabled === true)
|
|
1117
|
+
.filter((entry) => !entry.workflowOnly || opts?.workflowEnabled === true)
|
|
1114
1118
|
.filter((entry) => !entry.clusterOnly || opts?.clusterEnabled === true)
|
|
1119
|
+
.filter((entry) => !entry.boardOnly || opts?.taskBoardAttached === true)
|
|
1115
1120
|
.filter((entry) => !opts?.mailboxOnly || !entry.clusterOnly || entry.def.function.name === 'peer_send' || entry.def.function.name === 'peer_read')
|
|
1116
|
-
.map((entry) => entry.def);
|
|
1121
|
+
.map((entry) => (entry === BashTool ? bashToolDef(entry.def) : entry.def));
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
// The Bash tool's description names the shell it really runs in (PowerShell
|
|
1125
|
+
// on Windows without Git Bash, so the model does not write bash for it).
|
|
1126
|
+
function bashToolDef(def: OllamaToolDefinition): OllamaToolDefinition {
|
|
1127
|
+
const label = shellToolLabel();
|
|
1128
|
+
return label === 'sh -c' ? def : { ...def, function: { ...def.function, description: def.function.description.replace('via sh -c.', `via ${label}.`) } };
|
|
1117
1129
|
}
|
|
1118
1130
|
|
|
1119
1131
|
export function isKnownOllamaTool(name: string): boolean {
|