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
package/docs/PROVIDERS.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Providers
|
|
2
2
|
|
|
3
|
+
Native and local-model file tools read inside the project folder and refuse links that leave it, including links used as search folders. Links to files inside the same folder remain usable. New nested files can still be created. Files outside the project folder are attached to the message instead of opened through the file tool.
|
|
4
|
+
|
|
3
5
|
**Status:** Guided first-run Connections setup and recovery remain in progress. See [Development status](DEVELOPMENT_STATUS.md).
|
|
4
6
|
|
|
5
7
|
Per-provider deep dive. The generally available providers are **Claude**, **Codex**, **Ollama**, **LM Studio**, **llama.cpp**, and **Cursor**. Two optional integrations, **Strata** and **DeepSeek through Xolotl**, require separately installed external services that Arco does not distribute. All configured providers can act as primaries and reviewers. They differ in spawn mechanism, session resume, auth, and capability detection; this doc tracks each one's particulars. Two providers run multiple transports side-by-side, picked per-tab from the CONFIG tab: **Claude** has `cli` (per-turn `claude` subprocess) and `native` (long-lived in-process Anthropic-API worker via `@anthropic-ai/sdk`); **Codex** has `exec` (per-turn `codex exec` subprocess) and `appserver` (long-lived `codex app-server` child). **Cursor** also has two - `acp` (long-lived) and `print` (stateless one-shot) - but the choice is routed automatically (`sandbox: 'read-only'` -> `print`), not toggled.
|
|
@@ -10,6 +12,14 @@ For the abstract interface, see `server/src/providers/types.ts`. For when these
|
|
|
10
12
|
|
|
11
13
|
---
|
|
12
14
|
|
|
15
|
+
## Child process input failures
|
|
16
|
+
|
|
17
|
+
If a provider CLI, sign-in process, language server or MCP server closes its input early, Arco handles the input-stream error and stays running. Existing exit reporting and request timeouts still apply; failed requests are not automatically resent.
|
|
18
|
+
|
|
19
|
+
## Diagnostic executable lookup
|
|
20
|
+
|
|
21
|
+
Diagnostics uses platform PATH lookup, including Windows PATHEXT suffixes, to find optional tools and language servers. Model Health uses the runtime's `ARCO_LLAMACPP_BIN` override when configured; otherwise it searches PATH. An invalid configured override is reported missing. These checks do not launch a model.
|
|
22
|
+
|
|
13
23
|
## Topics
|
|
14
24
|
|
|
15
25
|
| Topic |
|
|
@@ -36,8 +46,8 @@ For the abstract interface, see `server/src/providers/types.ts`. For when these
|
|
|
36
46
|
|
|
37
47
|
| Provider | Transport | Effort levels | Native resume | Notes |
|
|
38
48
|
|---|---|---|---|---|
|
|
39
|
-
| Claude | `cli` (alternate; also reviewers and handoff seeds) | low / medium / high / xhigh / max | UUID-based (`--session-id` / `--resume`) | Picker: `opus` / `sonnet` family aliases plus pinned ids (Opus 5.5, Fable 5.1, Sonnet 5, Opus 5, Opus 4.8, ...). Per-turn `claude` CLI spawn. Full two-way interop with terminal `claude`. Chat renders from `~/.claude/projects/<cwd-hash>/<sessionId>.jsonl`. Auto-handoff supported. |
|
|
40
|
-
| Claude | `native` (new-home default) | low / medium / high / xhigh / max | Replay from `events.jsonl` (Arco-internal; no terminal resume) | Long-lived in-process `@anthropic-ai/sdk` worker, no CLI spawn. OAuth subscription auth + pinned Claude Code wire fingerprint. Append-only request prefix with preserved thinking (required by Fable 5.
|
|
49
|
+
| Claude | `cli` (alternate; also reviewers and handoff seeds) | low / medium / high / xhigh / max | UUID-based (`--session-id` / `--resume`) | Picker: `opus` / `sonnet` family aliases plus pinned ids (Opus 5.5, Fable 5.2 / 5.1, Sonnet 5, Opus 5, Opus 4.8, ...). Per-turn `claude` CLI spawn. Full two-way interop with terminal `claude`. Chat renders from `~/.claude/projects/<cwd-hash>/<sessionId>.jsonl`. Auto-handoff supported. |
|
|
50
|
+
| Claude | `native` (new-home default) | low / medium / high / xhigh / max | Replay from `events.jsonl` (Arco-internal; no terminal resume) | Long-lived in-process `@anthropic-ai/sdk` worker, no CLI spawn. OAuth subscription auth + pinned Claude Code wire fingerprint. Append-only request prefix with preserved thinking (required by Fable 5.2 / 5.1 and Mythos 5.2 / 5.1 / Opus 5.5). Ships its own Bash / Read / Edit / Grep / Glob / Task tools, Claude-Code-compatible hooks runner, server-side `compact` + auto-handoff + deterministic Fold, operator-armed plan-mode, parallel `Task` subagent fan-out (depth-1 cap), output-style picker (normal / plain / terse), and posture-based toolsets (operator cycles a full / coding / review / chat posture that scopes exposed tools).
|
|
41
51
|
| Codex | `exec` (alternate; also reviewers and handoff seeds) | model/catalog-driven; Astra / Sol: low through ultra, Luna: through max | UUID-based (`codex exec resume`) | Default model GPT-6 Astra (Sol and Luna also in the cold-catalog fallback; the live `model/list` catalog is authoritative). MAX context by default. Per-turn `codex exec` spawn. Full two-way interop with terminal `codex`. Supported effort values pass through; older models are not widened to Astra-only levels. Reviewer runs `-s read-only`. Transcript hydration on Resume for unclaimed rollouts. |
|
|
42
52
|
| Codex | `app-server` (new-home default) | model/catalog-driven (same as `exec`) | UUID-based (rollouts in `~/.codex/sessions/`) | Long-lived `codex app-server` per tab. Structured `turn/interrupt` cancel + non-destructive `turn/steer` mid-turn input + `localImage` attachments + crash-recovery circuit breaker + output-style picker + native compact with context-signal reset. Reviewers / handoff seeds always run on `exec`. |
|
|
43
53
|
| Cursor | `acp` (default) + `print` | baked into the model id (`-low` / `-high` / `-xhigh` / `-max`) | `session/load` (loadSession capability) | Long-lived `cursor-agent acp` ACP worker; ~153 models incl. Grok. Steer / cancel / session resume / live model-swap via `session/set_model`. No per-turn token signal (the Usage tab is dashboard-polled). Cluster member via an in-process loopback HTTP MCP server. Read-only reviewer / primitives run a stateless `cursor-agent -p --mode ask` one-shot. |
|
|
@@ -58,6 +68,12 @@ See [Settings: Utility agent](SETTINGS.md#utility-agent) and
|
|
|
58
68
|
|
|
59
69
|
Auth is per-service: browser OAuth for Claude (CLI login, plus a separate OAuth flow for Native); terminal-launched TUI for Codex; `gh auth token` for GitHub; Ollama / LM Studio / Strata probe their HTTP endpoints (prepared local Strata profiles can also start on demand); llama.cpp probes for the binary + reads `~/.arco/llamacpp.json`; Cursor uses its own `cursor-agent login`. The auth overlay blocks app use only when no primary-capable provider is authed.
|
|
60
70
|
|
|
71
|
+
### Background programs
|
|
72
|
+
|
|
73
|
+
ACTIVITY > BACKGROUND lists programs the agent started through a shell tool and left running, such as a dev server or long build. Arco helpers, configured MCP servers and provider programs are excluded. Jobs remain visible across turns and briefly show completion after exiting. Process discovery currently requires Linux.
|
|
74
|
+
|
|
75
|
+
The tracker matches shell-tool commands to process arguments and follows their known children. Claude CLI, Codex exec and app-server, and Cursor ACP supply these events. Providers without a discoverable child-process id do not feed this process tracker. Native and local tool execution keep their existing task reporting.
|
|
76
|
+
|
|
61
77
|
## The provider abstraction
|
|
62
78
|
|
|
63
79
|
Every provider implements `ProviderProcess` from `server/src/providers/types.ts`:
|
|
@@ -109,7 +125,7 @@ interrupted; unavailable requests visibly queue as follow-ups.
|
|
|
109
125
|
waits for the actual child `exit` (10-second ceiling) before session resume.
|
|
110
126
|
- Claude Native cancels its stream/tools and awaits the actual `runTurn` promise.
|
|
111
127
|
If another correction cancels startup before its prompt entered history,
|
|
112
|
-
`turnInputAccepted:false` carries that unsubmitted correction into the next prompt.
|
|
128
|
+
`turnInputAccepted:false` carries that unsubmitted correction into the next prompt. This also applies while Native startup loads handoff history and sub-agent settings.
|
|
113
129
|
- Codex app-server uses `turn/interrupt` and waits for matching interrupted
|
|
114
130
|
completion. Concurrent STOP/interrupt requests share one cancellation waiter.
|
|
115
131
|
|
|
@@ -120,8 +136,86 @@ turn. Existing edits remain in place; this action disarms an armed Goal Run.
|
|
|
120
136
|
Tests: `npm run test:interrupt-send`, `npm run smoke:interrupt-send` (isolated fake
|
|
121
137
|
CLIs plus real Native loop over mocked Anthropic streaming; zero model spend).
|
|
122
138
|
|
|
139
|
+
### Local file context across turns
|
|
140
|
+
|
|
141
|
+
In Agent tabs, Ollama, llama.cpp, LM Studio, Strata and DeepSeek keep named attachment and tool-file receipts across turns and reload. Each request restores up to two recent fitted images and 8 KiB of decoded text. Current attachments take priority in the request's media budget. Text-only models receive descriptions instead of image inputs. Older receipts name saved files or the original tool and input so the agent can use Read or request another range. Missing files produce an explicit notice.
|
|
142
|
+
|
|
143
|
+
Ollama, llama.cpp and LM Studio replay saved file records as separate chronological messages labelled `Arco historical file context`. These records come from Arco events, not assistant prose, and are not new user requests. Receipt-like assistant text stays assistant text. For a file not listed in the records, the agent must call Read before describing its contents; a saved reference alone does not supply its contents. Existing saved conversations use the same event projection without migration. Receipt text keeps its existing 16 KiB replay budget, with short labels added. New turns append records rather than rebuilding a growing leading system block. Ollama compaction uses the same labelled replay. The prior-turn auto-summary and Strata/DeepSeek replay format are unchanged. This separation does not guarantee model accuracy.
|
|
144
|
+
|
|
145
|
+
Snapshots live in the conversation's `file-context/` folder, outside ARTIFACTS. Each saved result retains at most two images and 32 KiB of decoded text; request preparation considers up to 64 references. Repeated reads reuse snapshots with identical saved content. Older snapshots remain readable. Disk snapshots are immutable and are not automatically deleted. Storage measurement includes them in Conversation files, and operator ARCHIVE, RESTORE and DELETE include the folder. Incognito keeps tool-file context in bounded memory only and clears it on close or reset. Switching to Native retains readable receipts; it does not restore local snapshots as native image blocks.
|
|
146
|
+
|
|
123
147
|
## Claude
|
|
124
148
|
|
|
149
|
+
### Native file reads and attachments
|
|
150
|
+
|
|
151
|
+
Claude Native Read, Task helpers and operator attachments use Arco's portable file decoder. Initial, queued, follow-up and steered attachments use the same preparation. Tool cards show the file name, type, dimensions or selected document range instead of binary bytes. After reload, Native retains MCP media receipts with the original tool name and input for requesting the result again. Text reads retain the 256 KiB cap and line controls. UTF-8 and byte-order-marked UTF-16 text are recognized. Non-UTF-8 text without NUL bytes and with fewer than 1% unexpected control bytes per 16 KiB chunk is decoded as Windows-1252 and marked. Line ranges apply to the decoded text. A selected text range containing NUL bytes receives a binary-file note, including when those bytes occur after the initial header.
|
|
152
|
+
|
|
153
|
+
PNG, JPEG, GIF, WebP, AVIF, HEIC, TIFF, BMP and ICO are fitted with bundled codecs. No image converter installation is required. Available ImageMagick or macOS sips can accelerate decoding. Images fit within 2,000 pixels per side and 5 MB base64. The entire image is scaled without cropping; animated or multipage images use their first frame. ICO uses its largest embedded PNG or bitmap. SVG supplies bounded source text and a fitted preview. Its isolated WebAssembly renderer executes no scripts and resolves no external resources or system fonts. Text requiring a font may be absent from the preview; the source remains available.
|
|
154
|
+
|
|
155
|
+
Read accepts `pages`, such as `"1-3,5"`. PDFs provide extracted text and scanned-page images by default. Use `pdf_mode: "visual"` with `pages` to request selected PDF pages for layout, charts or figures. Word (`.doc`, `.docx`), Excel (`.xls`, `.xlsx`), PowerPoint (`.ppt`, `.pptx`), OpenDocument and RTF become text with headings, table rows, sheet names or slide labels. Notebook cells retain source and outputs, including images. Files ending in `.ipynb` retain cell selection even when metadata precedes the cell list. SVG outputs include source and a fitted image; other unsupported rich outputs leave a cell-numbered receipt naming their media type.
|
|
156
|
+
|
|
157
|
+
For spreadsheets, presentations and notebooks, `pages` selects sheets, slides or cells. Word-processing ranges select explicit page breaks and bounded sections, not printed-layout pages. Embedded images follow supported document relationships; legacy images without section mappings are available when reading the whole document. Macros, external links and notebook code are never executed.
|
|
158
|
+
|
|
159
|
+
Sources can be up to 512 MB. PNG scanline decoding supports 512 megapixels; other raster decoders allow 250 megapixels. Oversized or malformed files produce a note explaining how to supply a smaller file or range. Claude Native uses independent request image and PDF-page caps from the selected context window: 100 images at 200k, 600 above it; 100 PDF pages below 1M, 600 at 1M or above. Unknown windows use 100 for each. Encoded media is capped at 128 MiB for the first-party API and conservatively at 20 MiB for custom or unknown endpoints, whose upstream request limits may be smaller. Text, tools and other request fields still contribute to the provider's total request size.
|
|
160
|
+
|
|
161
|
+
Native context and media limits use 200,000 tokens for Sonnet 4, Sonnet 4.5,
|
|
162
|
+
Opus 4, Opus 4.1 and Opus 4.5, including their dated IDs. Sonnet 4.5 therefore
|
|
163
|
+
shows 50% context fill at 100,000 retained prompt tokens and admits 100 images
|
|
164
|
+
and 100 visual PDF pages. Its former 1M beta is retired. Sonnet 4.6 and newer
|
|
165
|
+
1M families retain their larger windows; Haiku 5.5 also uses 1M. Haiku 4.5
|
|
166
|
+
remains at 200K. See [Anthropic's context-window reference](https://platform.claude.com/docs/en/build-with-claude/context-windows).
|
|
167
|
+
|
|
168
|
+
Only real image blocks and base64 PDF documents consume media counts. Fetched text and ordinary text documents do not; a fetched base64 PDF counts its real pages. Tool input JSON is not media. Missing PDF page counts are measured from the bytes. Above 20 images, Arco retains its 2,000-pixel per-side rule.
|
|
169
|
+
|
|
170
|
+
Between API requests, older media becomes text receipts when needed to admit new media. One notice at the end of the turn totals the old images and PDF documents replaced, omitting empty categories; attach or request a file again to bring it back. Tool pairing remains intact; older signed reasoning is omitted and prompt-prefix bookkeeping restarts. An in-progress assistant/tool-result round keeps its original signed thinking and tool identifiers, matching in-turn compaction. Unaffected histories stay unchanged. If the new media alone exceeds the guard, a notice names the limit and image, page and encoded-size totals. Use COMPACT or HANDOFF, then attach or request the file again. A managed upload path does not grant Read access outside the workflow.
|
|
171
|
+
|
|
172
|
+
See the provider's [vision limits](https://platform.claude.com/docs/en/build-with-claude/vision) and [PDF limits](https://platform.claude.com/docs/en/build-with-claude/pdf-support).
|
|
173
|
+
|
|
174
|
+
MCP image and embedded document results use the same decoder. Linked resources are described rather than fetched automatically. Native `read_url` uses the shared public URL decoder for file links. Anthropic's server-side `web_fetch` remains available for web pages and citations. Utility jobs remain bounded text-only tasks without file tools.
|
|
175
|
+
|
|
176
|
+
Live requests and token counting receive typed media. Saved events and text summaries keep receipts and attachment references, never base64 payloads. Use Read again after reload or compaction for exact detail. Evicted raw results remain recoverable in local artifacts. Saved replay drops reasoning signatures when replacing their media with receipts.
|
|
177
|
+
|
|
178
|
+
[Anthropic's vision limits](https://platform.claude.com/docs/en/build-with-claude/vision) and [PDF limits](https://platform.claude.com/docs/en/build-with-claude/pdf-support) vary by endpoint and model. Arco deliberately uses stricter limits.
|
|
179
|
+
|
|
180
|
+
Native shell results carry exit, signal, timeout and cancellation status separately from output text. Failed commands show failed activity, run PostToolUseFailure hooks and select failure filters. Compiler, configuration and test-collection diagnostics remain visible when a test-result filter cannot safely summarize them.
|
|
181
|
+
|
|
182
|
+
Native Task model overrides are applied to the child workflow configuration before deriving its primary. The live child, emitted tab configuration and saved metadata therefore name the same requested model, including after promotion or reopen.
|
|
183
|
+
|
|
184
|
+
### Claude Native sub-agent controls
|
|
185
|
+
|
|
186
|
+
Settings - Agents and clusters supplies `nativeSubagents` defaults; a tab's CONFIG values override individual fields. `maxRunning` defaults to 4 (range 1-32), `maxStarts` to 8 per parent turn (range 1-128), and `model` to Agent's choice. Both finite limits apply to existing installs on the next parent turn. Blank limits inherit Settings in a tab or the defaults in Settings. Settings changes apply next turn.
|
|
187
|
+
|
|
188
|
+
Agent's choice preserves the existing rule: use the parent's model unless the agent names another. A selected catalog model overrides the agent's requested model, including after hooks. An unavailable selection is refused instead of substituted. This does not bound token use or spending; no ask-first or pricing control is included.
|
|
189
|
+
|
|
190
|
+
Each parent has a FIFO running limit and a cumulative start budget across all tool rounds. Admitted extra Tasks wait with a QUEUED row and no child workflow yet. Queued tasks reserve budget places; cancellation before start refunds the reservation. A started child counts even if it fails or is cancelled. Calls beyond the budget return a plain refusal telling the agent not to retry unless requested. A new parent turn resets the budget. Queued and running tasks can be cancelled individually; parent cancellation stops both. Individual CANCEL tells the parent that the operator cancelled that sub-agent, asks it not to start a replacement unless the operator requests one, and asks it to count the task as cancelled. These are model instructions, not an additional admission limit. Chat, cluster members and depth-capped Task children are refused at dispatch and again before child creation.
|
|
191
|
+
|
|
192
|
+
Inline and TASKS rows retain the effective model through event replay, including the concrete model when reported by the child. Older rows use saved child metadata or show Model not recorded. The silence strip says Waiting for N sub-agents while Tasks remain pending. The parent still waits for final Task replies; this is not background execution.
|
|
193
|
+
|
|
194
|
+
| Provider | Sub-agent enforcement in this release |
|
|
195
|
+
| --- | --- |
|
|
196
|
+
| Claude Native | Arco enforces the running limit, per-turn start budget and selected model for ordinary Agent tabs outside clusters. |
|
|
197
|
+
| Claude CLI | Provider-owned Agent and ultracode Workflow calls; Native limits/model do not apply. Existing `--tools`/`--disallowedTools` remove tools but do not impose these limits. No new switches are applied. |
|
|
198
|
+
| Codex exec and app-server | Provider-owned harness; Native limits/model do not apply. Installed feature switches `multi_agent` and `multi_agent_v2` exist but alone do not prove all code-mode spawning routes absent. No new Agent switches are applied. |
|
|
199
|
+
| Cursor ACP/print | Provider-owned Agent tools; no child count/model control established by installed help. Ordinary print Chat keeps its existing empty tool allowlist. |
|
|
200
|
+
| Local providers | No built-in Arco Task/spawn tool. Peer messages address existing members. These limits do not cover shell-launched programs or third-party MCP tools. |
|
|
201
|
+
|
|
202
|
+
Missing CLI, Codex or Cursor child-specific settings remain unconfirmed, not established as unsupported. Provider-owned children are not converted into Native task rows by these controls.
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
Spawn from a HISTORY point reads the selected earlier prefix even when it is outside the recent replay tail. Cancelled handoffs leave prior Native context intact, including the older-history summary. A cancellation or failure during pre-warm revokes an earlier prepared artifact for replay; a successful fallback after a failed reflection remains valid. Derived summary caches from the earlier replay rule are rebuilt automatically; original events remain unchanged.
|
|
206
|
+
|
|
207
|
+
Context `@file:` references expand supported documents and notebook cells as text, and send supported media through the provider attachment path. Unsupported binary content becomes a note. Text is limited to 64 KiB per reference; the aggregate context budget also applies to media.
|
|
208
|
+
|
|
209
|
+
Native Read and local Read keep their 256 KiB and 32 KiB output caps while reading in chunks; `offset` and `limit` still select later lines. Special files are refused.
|
|
210
|
+
|
|
211
|
+
Grep skips binary files and searches UTF-8, UTF-16 and Windows-1252 text. A legacy text chunk with at least one percent disallowed control characters is treated as binary. JavaScript search reports shortened long lines. Native ripgrep decodes legacy text output and also checks legacy text for non-ASCII search terms.
|
|
212
|
+
|
|
213
|
+
Native `read_url`, local WebFetch and the read-only CLI `fetch_file` tool use `fileFetch.ts`. Text downloads stop at 128 KiB; recognized images and documents have the shared 512 MiB source budget before decoding and provider limits apply. The reader checks public HTTP(S) hosts, resolved addresses and every direct HTTP redirect. Source-size and deadline refusals return a note. Native server web tools run on the provider service.
|
|
214
|
+
|
|
215
|
+
Native Read keeps the partial-read warning when its output is capped, until a later complete read covers the file. Native Grep reports invalid patterns and search failures as errors; a successful search with no matches remains empty. Native Bash keeps its newest output tail even if saving the full output fails, and reports that full output is unavailable. Native and local-model Write create nested parent directories on Windows.
|
|
216
|
+
|
|
217
|
+
Registry MCP schemas keep their definitions and validation metadata, including local references. Unsupported top-level `oneOf`, `allOf` and `anyOf` are still removed before Native requests.
|
|
218
|
+
|
|
125
219
|
### Chat-mode execution contract
|
|
126
220
|
|
|
127
221
|
`WorkerConfig.interactionMode:'chat'` is a hard tool boundary shared by the
|
|
@@ -130,24 +224,40 @@ first). The one exception is the per-tab web toggle - `chatWebArmed()` in
|
|
|
130
224
|
`server/src/chatMode.ts` decides, and every transport states the mode
|
|
131
225
|
explicitly instead of inheriting a provider default:
|
|
132
226
|
|
|
133
|
-
- **Claude Native** - empty `tools`, or `buildChatWebTools()` (
|
|
134
|
-
`web_search` + `web_fetch`
|
|
227
|
+
- **Claude Native** - empty `tools`, or `buildChatWebTools()` (server
|
|
228
|
+
`web_search` + `web_fetch` and portable `read_url`, deliberately no `code_execution`) when armed;
|
|
135
229
|
only the chat system block.
|
|
136
|
-
- **Claude CLI** - `--tools ""`, or `--tools WebSearch,WebFetch` when armed,
|
|
230
|
+
- **Claude CLI** - `--tools ""`, or `--tools WebSearch,WebFetch` when armed, WEB grants permission for exactly `WebSearch` and `WebFetch` with `--allowedTools`, so the non-interactive CLI can run the enabled pair.
|
|
137
231
|
plus `--strict-mcp-config`.
|
|
138
|
-
- **Codex** - read-only sandbox
|
|
139
|
-
universal tool allowlist, so isolation + sandboxing are the defense);
|
|
140
|
-
`web_search="live"|"disabled"` on both `exec` (`-c`) and app-server (thread
|
|
141
|
-
config), plus chat `baseInstructions` on app-server.
|
|
232
|
+
- **Codex** - ordinary Chat always runs on `exec`, including saved tabs configured for app-server. Saved app-server conversations resume the same Codex session ID on exec, preserving provider history. Start and resume disable command execution, local image reading, apps, plugins, remote plugins, subagents, image generation, memories and hooks, plus skills and project documents. `--ignore-user-config --ignore-rules` keep user tools and rules out. Chat additionally disables agents and goals and excludes the host's builtin functions namespace, which contains patch tools. Strict startup validation refuses unsupported controls before a model turn. The lowest tested compatible Codex version is `0.167.0`; its strict startup check accepts both WEB policies. WEB keeps the exec host enabled for live web tools while command execution, local image readers and extension restrictions stay in force; WEB off disables that host. A cached installed-capability probe refuses unsupported versions before a model turn. The read-only sandbox is additional protection, not a disk-read boundary. Documents arrive as inline text and images through explicit `-i` inputs; `web_search="live"|"disabled"` follows WEB. The header shows EXEC. There is no mid-turn steering; send the next message after the reply. Native compaction and structured questions remain Agent app-server features. Computer mode keeps its separate privileged transport.
|
|
142
233
|
- **Ollama** - no tools, or exactly `WebSearch` / `WebFetch` (local SearXNG +
|
|
143
234
|
fetch) when armed, re-checked at dispatch by `ollamaToolCallAllowed()` so a
|
|
144
235
|
hallucinated known tool name cannot cross the boundary.
|
|
145
236
|
- **Strata** - the shared OpenAI HTTP worker advertises and dispatches only
|
|
146
237
|
`WebSearch` / `WebFetch` when Chat web access is armed. Standalone logs/image
|
|
147
238
|
caches mean it is unavailable in strict Incognito.
|
|
148
|
-
- **llama.cpp, LM Studio** - tool schemas omitted; no web option.
|
|
149
|
-
-
|
|
150
|
-
(
|
|
239
|
+
- **llama.cpp, LM Studio** - tool schemas omitted; no web option. Both still
|
|
240
|
+
re-check `ollamaToolCallAllowed()` at dispatch, so a tool call the model
|
|
241
|
+
writes as text (llama.cpp's `<tool_call>` fallback) is refused in Chat and
|
|
242
|
+
in plan-review turns, even with AUTO on.
|
|
243
|
+
- **Cursor** - each Chat turn runs `-p --mode ask` in a private folder under
|
|
244
|
+
the selected Arco home, removed when the turn ends. Startup removes abandoned
|
|
245
|
+
turn folders without following links. Cursor Chat has no web access; its
|
|
246
|
+
header shows `NO WEB` and offers no web toggle. It receives no project
|
|
247
|
+
plugin, additional read folders or `--force`. Explicit permissions deny all
|
|
248
|
+
reads, writes, shell, web fetches and MCP tools, including previously approved
|
|
249
|
+
servers. An empty `--allowed-tools` list excludes every built-in tool family;
|
|
250
|
+
indexing, semantic search and lint context are disabled. Workspace context
|
|
251
|
+
comes from the private turn folder; the restricted workspace-exclusion flag
|
|
252
|
+
is not used. Account, team or model refusals appear as one plain sentence
|
|
253
|
+
naming Cursor, without the retry dump.
|
|
254
|
+
Documents arrive as extracted text. Only fitted copies of the current
|
|
255
|
+
message's images go through `--image`, never through a Read fallback.
|
|
256
|
+
Arco checks required flags with a deliberate parser error before starting a turn.
|
|
257
|
+
Missing required isolation controls refuse Chat; an unsupported image input
|
|
258
|
+
refuses images with a plain message. These Cursor flags are internal and may
|
|
259
|
+
change between versions. Agent ACP sessions and read-only reviews retain
|
|
260
|
+
their existing project access and argument builder.
|
|
151
261
|
|
|
152
262
|
**Computer voice exception.** A `voiceOperator` Chat receives only the
|
|
153
263
|
bounded `arco_*` tools from `server/src/voice/toolDefinitions.ts`, with
|
|
@@ -202,7 +312,7 @@ Reviewers and handoff seed turns always run on `cli` regardless of the tab's tra
|
|
|
202
312
|
|
|
203
313
|
### Native transport - append-only prefix (2026-09-01)
|
|
204
314
|
|
|
205
|
-
Append-only prefix delivery is a current Native transport invariant. The in-process worker freezes `system` + `tools` on its first request and delivers every later config change (north-star, output style, cluster plan, CLAUDE.md re-read, posture, plan mode, MCP attach) as an appended `role:'system'` message with text and/or `tool_addition` / `tool_removal` blocks, so Claude Fable 5.1's preserved-thinking check never sees an edited prefix and the prompt cache survives config changes. Thinking blocks persist across turns (they used to be pruned at turn end). Every prefix mutation is a `ctx_action` in `events.jsonl`; `input_transformations` from Anthropic are logged per round. Pure helpers: `server/src/providers/claude-native/appendOnlyPrefix.ts` (`npm run test:append-only -w server`). Invariants: [Gotchas: Claude Native transport](GOTCHAS.md#claude-native-transport).
|
|
315
|
+
Append-only prefix delivery is a current Native transport invariant. The in-process worker freezes `system` + `tools` on its first request and delivers every later config change (north-star, output style, cluster plan, CLAUDE.md re-read, posture, plan mode, MCP attach) as an appended `role:'system'` message with text and/or `tool_addition` / `tool_removal` blocks, so Claude Fable 5.2 / 5.1's preserved-thinking check never sees an edited prefix and the prompt cache survives config changes. Thinking blocks persist across turns (they used to be pruned at turn end). Every prefix mutation is a `ctx_action` in `events.jsonl`; `input_transformations` from Anthropic are logged per round. Pure helpers: `server/src/providers/claude-native/appendOnlyPrefix.ts` (`npm run test:append-only -w server`). Invariants: [Gotchas: Claude Native transport](GOTCHAS.md#claude-native-transport).
|
|
206
316
|
|
|
207
317
|
### CLI transport
|
|
208
318
|
|
|
@@ -210,7 +320,7 @@ Append-only prefix delivery is a current Native transport invariant. The in-proc
|
|
|
210
320
|
|
|
211
321
|
### Spawn
|
|
212
322
|
|
|
213
|
-
`spawn('claude', args, { detached: true, env: { ...process.env
|
|
323
|
+
`spawn('claude', args, { detached: true, env: { ...process.env } })` (through `commandArgs`, so Windows resolves the command shim). The concurrent-writer guard reads the `entrypoint` field the Claude CLI writes on each session JSONL row: `sdk-cli` for turns Arco started, any other value for a `claude --resume` terminal writing to the same JSONL (`server/src/ws/turnEngine.ts`).
|
|
214
324
|
|
|
215
325
|
### Argv (primary)
|
|
216
326
|
|
|
@@ -222,7 +332,7 @@ claude
|
|
|
222
332
|
--include-partial-messages
|
|
223
333
|
--model <m>
|
|
224
334
|
--effort <e> # forced xhigh under ultracode
|
|
225
|
-
[--input-format stream-json] #
|
|
335
|
+
[--input-format stream-json] # when image or PDF blocks are present
|
|
226
336
|
[--session-id <uuid>] # first turn (Arco pre-mints)
|
|
227
337
|
[--resume <uuid>] # subsequent turns
|
|
228
338
|
[--no-session-persistence] # neither id set (workers, incognito)
|
|
@@ -246,7 +356,7 @@ Same base + `--no-session-persistence` (don't write a session JSONL) + optional
|
|
|
246
356
|
|
|
247
357
|
### Stdin
|
|
248
358
|
|
|
249
|
-
|
|
359
|
+
Text-only prompts use plain stdin. When prepared attachments contain images, stdin carries a single `stream-json` user envelope with media before the request text. Documents provide decoded text, with scanned PDF pages sent as images.
|
|
250
360
|
|
|
251
361
|
**GOTCHA - ARG_MAX overflow** (large-prompt handling): when an inline `--append-system-prompt` value would push the argv past Linux's `MAX_ARG_STRLEN` (~128 KB/arg), `execve` kills the spawn with `E2BIG`. Arco's mitigation: above that threshold it writes the appendSystemPrompt to a tmpfile (`append-sp-{id}-{pid}.txt`) and passes it via the **separate** `--append-system-prompt-file` flag (a documented peer of `--append-system-prompt` in the CLI's bare help) - not the same flag with a path. If the tmpfile write fails it falls back to the inline `--append-system-prompt` argv (which may then E2BIG, but the operator sees a real spawn error rather than a silently-dropped prompt). Tmpfiles are cleaned up on settle and on server exit.
|
|
252
362
|
|
|
@@ -286,7 +396,7 @@ API-key fallback: if `ANTHROPIC_API_KEY` is set in the spawned process env, the
|
|
|
286
396
|
- **API overload retry loop** - `overloaded_error` and `{"type":"error"}` envelopes from the CLI are caught, surfaced as `system_notice`, and retried with 15s/30s/60s backoff up to 3 attempts. Same session id, so retries are idempotent. Implemented in the result path inside `claude.ts`.
|
|
287
397
|
- **Throttle detection** - stderr regexes catch "usage limit reached", "try again at HH:MM", "resets at <ISO>". Translated to `quota.markThrottled('claude', errorText, resetsAt)`.
|
|
288
398
|
- **Output cap** - accumulated text is capped at `MAX_WORKER_OUTPUT_BYTES = 50 MB` (override via `ARCO_MAX_WORKER_OUTPUT_BYTES` env). Beyond that, Arco emits a truncation notice and forces the worker to settle. The 32 GB tree-RSS guard handles actual memory runaways; the text cap is the secondary safety net for "model went berserk printing forever."
|
|
289
|
-
- **
|
|
399
|
+
- **Attachments** - fitted images use stream-json `content` blocks. Documents and notebooks provide decoded text, while other binaries provide a note. Agent labels identify the source path alongside its decoded content; Chat labels use the attachment name.
|
|
290
400
|
- **Concurrent-writer guard** - the JSONL watcher inspects new entries' `entrypoint` field. If a foreign (`!= 'sdk-cli'`) entrypoint appears, Arco fires `[WARN] Concurrent writer detected on session <uuid>...` and refuses new turns for 60 seconds. Operator must Handoff to recover.
|
|
291
401
|
|
|
292
402
|
### Ultracode (sticky, CLI-only)
|
|
@@ -354,23 +464,33 @@ These moves are pure (no behavior change); `workerParity.test.ts` / `stripTraili
|
|
|
354
464
|
|
|
355
465
|
#### Auth
|
|
356
466
|
|
|
357
|
-
OAuth subscription flow
|
|
467
|
+
OAuth subscription flow adapted from `earendil-works/pi`:
|
|
358
468
|
|
|
359
469
|
- `CLIENT_ID = 9d1c250a-e61b-44d9-88ed-5944d1962f5e` (stored as base64 + `atob` at module load - minor protection against repo scrapes; not a security boundary).
|
|
360
|
-
- Callback `127.0.0.1:53692/callback` (overridable via `ARCO_OAUTH_CALLBACK_HOST`). On `EADDRINUSE` we fall back to manual-paste mode automatically.
|
|
470
|
+
- OAuth state and the PKCE verifier are independent random values. The authorization URL carries state and the S256 challenge; the callback carries code and state; the verifier stays server-side until the token exchange. Callback `127.0.0.1:53692/callback` (overridable via `ARCO_OAUTH_CALLBACK_HOST`). On `EADDRINUSE` we fall back to manual-paste mode automatically.
|
|
361
471
|
- Tokens persist to `~/.arco/auth.json` under `claude.native` - mode 0600, parent dir 0700, atomic tmp+rename, `proper-lockfile` around the read-refresh-write cycle. Lock is **not** held across the SDK call.
|
|
362
472
|
- Refresh runs 30s ahead of expiry. On `400 invalid_grant`, the loop emits `[AUTH:claude]` system_notice and fails the turn; after three consecutive auth failures within the workflow the notice escalates and auto-retry stops until the operator re-logs in.
|
|
363
473
|
- Re-login goes through `POST /api/auth/claude-native/login` (returns the authorize URL + a `manualFallback` flag); the callback is captured by the local server or accepted via `POST /api/auth/claude-native/callback` (`{ url }` body) for headless / port-blocked operators.
|
|
364
474
|
|
|
475
|
+
Saved Native login tokens use `https://api.anthropic.com` for both workflow requests and the Native evaluator. An inherited `ANTHROPIC_BASE_URL` alone cannot redirect them. An explicit `claudeNative.baseUrl` in the global settings file selects a custom endpoint; project settings cannot select that destination. The next turn or evaluation reads the setting, and an existing worker rebuilds its SDK client when the endpoint changes. Remove the setting to restore the provider default.
|
|
476
|
+
|
|
477
|
+
Saved-login worker and evaluator clients explicitly disable SDK API-key inheritance. Their requests carry the saved OAuth Authorization header without an unrelated environment X-Api-Key header. API-key-only SDK clients keep their environment key and endpoint.
|
|
478
|
+
|
|
479
|
+
A configured custom endpoint receives the saved Native login token. Configure only a trusted destination. This setting does not add API-key-only Native sign-in or change the SDK's environment endpoint behavior for API-key-only callers.
|
|
480
|
+
|
|
365
481
|
#### Headers (wire fingerprint)
|
|
366
482
|
|
|
367
483
|
| Header | Value | Notes |
|
|
368
484
|
|---|---|---|
|
|
369
485
|
| `anthropic-beta` | `claude-code-20250219,oauth-2025-04-20` | `+,interleaved-thinking-2025-05-14` is appended only for non-adaptive Anthropic thinking paths by default. Current Pi skips it for adaptive-thinking models because those models have interleaving built in. CONFIG has a Native-only debug override (`claudeNativeForceInterleavedThinkingBeta`) to force it for A/B testing. |
|
|
370
|
-
| `user-agent` | `claude-cli/2.1.
|
|
486
|
+
| `user-agent` | `claude-cli/2.1.319` | Pinned in `wireFingerprint.ts`, **not** tracked from `claude --version`. Anthropic gates new models on it (Fable 5.2 requires 2.1.290 or newer). Bump only on an observed rejection. |
|
|
371
487
|
| `x-app` | `cli` | Constant. |
|
|
372
488
|
| `anthropic-dangerous-direct-browser-access` | `true` | Current Pi sends it on the SDK `authToken` path; Arco mirrors that wire fingerprint. |
|
|
373
489
|
|
|
490
|
+
Fable 5.2 and Mythos 5.2 use a 1M context window and five effort levels: low, medium, high, xhigh and max. Native keeps their thinking and request prefix intact. A date suffix on bare Fable 5 or Mythos 5 keeps the original model behavior. Switching a tab from 5.2 to another model drops its earlier reasoning; the request still works.
|
|
491
|
+
|
|
492
|
+
Short utility jobs (including BRIEF, CATCH ME UP, TIDY and Smart AUTO-PICKUP) and text compaction summaries use low effort on Fable/Mythos 5.2 and later 5.x point releases. Their response caps reserve another 8,192 tokens for reasoning. Utility answers keep the original visible-size limit. Compaction input splitting reserves this extra output space too. Normal worker turns keep the selected effort and 128K response cap.
|
|
493
|
+
|
|
374
494
|
Adaptive-thinking `max_tokens` follows current Pi model metadata: Fable/Mythos 5, Opus 5 / 5.5, Opus 4.6/4.7/4.8, Sonnet 5, and the `opus`/`opus[1m]` family aliases use 128K output; Sonnet 4.6 uses 64K. Effort still rides through `output_config.effort`; the cap is headroom, not a request to spend it. Capability decisions (thinking params, max_tokens, ctx window, catalog ctx-management gating) key on `capModel()` - the concrete id Anthropic echoed for an alias tab (persisted as `meta.resolvedModelId`, announced via the `model_resolved` event). The request `model:` field is **always a concrete id**: the Messages API does not resolve family aliases (`model: "opus"` → `not_found_error: model: opus` - only the Claude Code CLI resolves them, client-side), so `requestModel()` maps an alias through `resolveClaudeAliasFromCatalog()` to the newest in-family catalog id before dispatch. The tab's configured model stays the alias, so auto-tracking lives in the resolution rather than on the wire. A turn ending `stop_reason: 'refusal'` (HTTP 200) surfaces as a `system_notice` + durable `primary_refusal` event instead of a blank turn. See [Gotchas: Claude Native transport](GOTCHAS.md#claude-native-transport) for both invariants.
|
|
375
495
|
|
|
376
496
|
The first system block is hardcoded to `"You are Claude Code, Anthropic's official CLI for Claude."` and marked `cache_control: { type: 'ephemeral', ttl: '1h' }` so all Native tabs on a machine share the cached prefix. The appendSystemPrompt block (rendered transcript / skills / CLAUDE.md) carries the standard ephemeral marker.
|
|
@@ -382,17 +502,19 @@ The first system block is hardcoded to `"You are Claude Code, Anthropic's offici
|
|
|
382
502
|
Per-tab `WorkflowConfig.claudeNativeThinkingDisplay` (`'omitted'` default | `'summarized'` | `'updates'`, Native-only). `buildThinkingParams(model, effort, display)` stamps `thinking: { type: 'adaptive', display }` on adaptive-thinking models. `omitted` is Claude-Code parity, but a multi-minute Opus/Fable adaptive think then streams only `ping` events - nothing bumps `lastPrimaryEventAt`, so the client's 30s stuck banner fires on a healthy worker (547s of legitimate silence observed with Fable 5 @ high). The CONFIG-tab **THINKING VISIBILITY** picker flips to `summarized`, streaming thinking deltas into the Activity tab (which also refresh the stuck clock). The round-trip stderr label reads `adaptive(effort,display)`. Primitives leave it unset ⇒ `omitted`; **Task children inherit** the parent's value.
|
|
383
503
|
|
|
384
504
|
**Thinking display is not retention.** `updates` requests short progress notes on
|
|
385
|
-
supported models (Fable 5 / 5.1, Mythos 5.1, Opus 5.5) but cannot guarantee them:
|
|
505
|
+
supported models (Fable 5 / 5.1 / 5.2, Mythos 5.1 / 5.2, Opus 5.5) but cannot guarantee them:
|
|
386
506
|
the 2026-09-01 Fable 5.1 Native acceptance emitted none. On Opus 5.5 the notes Opus 5
|
|
387
507
|
returned as `text` arrive as thinking blocks, so `omitted` hides them - prefer
|
|
388
|
-
`summarized` there. Binding-enforcing Fable/Mythos 5.1 and Opus 5.5 keep thinking
|
|
508
|
+
`summarized` there. Binding-enforcing Fable/Mythos 5.2 / 5.1 and Opus 5.5 keep thinking
|
|
389
509
|
and an append-only prefix regardless of display mode. See `FABLE_51_APPEND_ONLY_PLAN.md`.
|
|
390
510
|
|
|
391
511
|
#### Tool surface (7a)
|
|
392
512
|
|
|
393
|
-
Read / Write / Edit / Bash / Grep / Glob / KillShell / TodoWrite. Path validation reuses `resolveWithinCwd`. Per-tool output cap 64 KB; Read gets 256 KB (looser than Ollama's 32 KB - Claude windows are larger). Edit refuses if the target file wasn't Read in this turn (Claude Code parity). Bash registers each spawned shell against the worker's per-turn shell map so KillShell + cancel can target it; `run_in_background:true` returns a `shellId` immediately.
|
|
513
|
+
Read / Write / Edit / Bash / Grep / Glob / KillShell / TodoWrite. Path validation reuses `resolveWithinCwd`. Per-tool output cap 64 KB; Read gets 256 KB (looser than Ollama's 32 KB - Claude windows are larger). Edit refuses if the target file wasn't Read in this turn (Claude Code parity). Bash registers each spawned shell against the worker's per-turn shell map so KillShell + cancel can target it; `run_in_background:true` returns a `shellId` immediately. Closing or handing off the tab ends background shells still running (SIGTERM, then SIGKILL after 2 s; `taskkill` on Windows), and the worker waits until they have ended.
|
|
394
514
|
|
|
395
|
-
|
|
515
|
+
CLI version and help probes stop after five seconds and cap output at 2 MB. Unanswered Codex app-server RPC requests expire after 30 seconds; interrupt and compaction deadlines also cover the initial acknowledgement.
|
|
516
|
+
|
|
517
|
+
**Edit apply.** `replace_all` selects non-overlapping matches from left to right, including when whitespace normalization is needed; unmatched lines remain unchanged. When the exact `old_string` match fails, `Edit` (`editApply.ts`) falls through an ordered set of fuzzy strategies - `escape-drift` → `trailing-ws` → `indent` - each of which must resolve to exactly one location unless `replace_all`; an ambiguous fuzzy match is refused with a `closestLinesHint` rather than guessed. **Bash output** is bounded-tail: the model sees the last ~64 KB of combined chronological stdout+stderr through one accumulator, while the COMPLETE output spills to a per-run tempfile so a noisy command can't evict context. **File mutations** are serialized through a module-level per-realpath queue (`file-mutation-queue.ts`, keyed by `realpath` so symlink aliases share one queue) - this closes the silent edit-loss window when two Native workers on one cwd (e.g. cluster members) write the same file; a write that actually had to wait emits `file_mutation_queued`.
|
|
396
518
|
|
|
397
519
|
Native also advertises Anthropic server-side `web_search_20260209` and `web_fetch_20260309` tools as `web_search` / `web_fetch`, plus `code_execution_20260120` so Anthropic's 2026 server-tool dynamic filtering path is available. These are not Arco-local tools: Anthropic executes them server-side and returns `server_tool_use` plus `web_search_tool_result` / `web_fetch_tool_result` content blocks. The Native worker surfaces the invocation in activity, but never routes it through `executeNativeTool()`. After the final answer, retained Native history is pruned of completed server-tool evidence, citation metadata, and hidden thinking; the model has already integrated the useful findings, and the next-turn prompt should not retain hundreds of KB of raw server-search evidence.
|
|
398
520
|
|
|
@@ -412,9 +534,9 @@ The Native worker is a first-class MCP host for the operator's enabled-and-allow
|
|
|
412
534
|
|
|
413
535
|
#### Post-write LSP diagnostics (C3)
|
|
414
536
|
|
|
415
|
-
After a successful `Write`/`Edit`, the tool calls a **fire-and-forget** `ctx.onFileWritten?.(abs)` hook (wrapped in `try/catch` - a diagnostics failure must NEVER break the write; the write path is P0). The worker wires it to the `lspManager` subsystem (`server/src/lsp/`), which lazy-spawns the project's language server (`typescript-language-server` / `pyright` / `gopls` / `rust-analyzer`, whichever is on PATH), opens the changed file, and forwards the server's `publishDiagnostics` to the client as a workflow-scoped `diagnostics {file, items[]}` message (rendered as a count badge + list on the Activity tab). Absent server ⇒ silent no-op (operator installs the LSP server themselves - bring-your-own-upstream
|
|
537
|
+
After a successful `Write`/`Edit`, the tool calls a **fire-and-forget** `ctx.onFileWritten?.(abs)` hook (wrapped in `try/catch` - a diagnostics failure must NEVER break the write; the write path is P0). The worker wires it to the `lspManager` subsystem (`server/src/lsp/`), which lazy-spawns the project's language server (`typescript-language-server` / `pyright` / `gopls` / `rust-analyzer`, whichever is on PATH), opens the changed file, and forwards the server's `publishDiagnostics` to the client as a workflow-scoped `diagnostics {file, items[]}` message (rendered as a count badge + list on the Activity tab). Absent server ⇒ silent no-op (operator installs the LSP server themselves - bring-your-own-upstream). Lifecycle mirrors `llamacppManager` (one server per `(cwd, languageId)`, dedup, idle-reap, shutdown-kill). **Full detail: `docs/LSP.md`.**
|
|
416
538
|
|
|
417
|
-
** (WebFetch / WebSearch) - server-side.** The plan-doc spec called for ~150 LOC of local WebFetch + WebSearch with SSRF guard, Camoufox stealth fallback, and pluggable Brave/Tavily/Kagi/SearXNG providers. Not needed: Native authenticates as Claude Code (OAuth + the pinned `claude-cli/<version>` user-agent from `wireFingerprint.ts`) and advertises Anthropic's server-side web tools. Anthropic executes calls server-side.
|
|
539
|
+
** (WebFetch / WebSearch) - server-side.** The plan-doc spec called for ~150 LOC of local WebFetch + WebSearch with SSRF guard, Camoufox stealth fallback, and pluggable Brave/Tavily/Kagi/SearXNG providers. Not needed: Native authenticates as Claude Code (OAuth + the pinned `claude-cli/<version>` user-agent from `wireFingerprint.ts`) and advertises Anthropic's server-side web tools. Anthropic executes calls server-side. The separate `read_url` companion uses Arco's public URL reader for file links.
|
|
418
540
|
|
|
419
541
|
#### Tool surface (7b - Arco-integrated)
|
|
420
542
|
|
|
@@ -446,7 +568,7 @@ Plus 11 board-gated `cluster_task_*` task-board tools (list / show / create / cl
|
|
|
446
568
|
**Restricted cluster members.** A BLIND member keeps its project cwd but the
|
|
447
569
|
turn engine withholds the normal cluster plan/board/roster/role/focus/
|
|
448
570
|
efficiency/progress context and registers only `peer_send` / `peer_read` from
|
|
449
|
-
the cluster surface. ISOLATED is a stricter Claude-Native-only bootstrap: the
|
|
571
|
+
the cluster surface. llama.cpp and LM Studio advertise only those cluster tools to BLIND members. ISOLATED is a stricter Claude-Native-only bootstrap: the
|
|
450
572
|
worker cwd becomes
|
|
451
573
|
`~/.arco/clusters/<clusterId>/isolates/<wfid>/workspace`; Bash, KillShell,
|
|
452
574
|
Task, project prompt/resource discovery, attachments, hooks, skills,
|
|
@@ -464,35 +586,47 @@ CLI Claude and both Codex transports get the same peer surface via a stdio MCP c
|
|
|
464
586
|
|
|
465
587
|
**Project-trust gate.** Project-local agent surfaces that the worker would otherwise honor - the repo's `CLAUDE.md` (`claudeMdDiscovery.ts`), its `.claude/skills`, and its `.claude/settings.json` hooks - are suppressed until the operator vouches for the repo. `projectTrust.ts` resolves an effective trust for the cwd from a USER/GLOBAL-scope `~/.arco/trust.json` (deepest recorded ancestor wins) in a two-pass bootstrap, so a cloned repo can't self-grant trust by shipping its own trust file. Decision values are `always` / `never` (`ask` until the operator chooses); the gate logs its decision plus the suppressed-resource summary, and a recorded decision is one reversible line in `trust.json`. This closes the cloned-repo prompt-injection vector.
|
|
466
588
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
|
470
|
-
|
|
471
|
-
| `UserPromptSubmit` |
|
|
472
|
-
| `
|
|
473
|
-
| `
|
|
474
|
-
| `
|
|
475
|
-
| `
|
|
589
|
+
Native runs command hooks as Claude Code's public hooks reference describes (`fireHooks()` and `evaluateHooks()` in `hooks.ts`). The events it fires:
|
|
590
|
+
|
|
591
|
+
| Event | When | Exit 2, or a blocking JSON decision |
|
|
592
|
+
|---|---|---|
|
|
593
|
+
| `UserPromptSubmit` | At the top of `runTurn`, before the first request. Matcher ignored. | Rejects the prompt: no request is made, the operator sees the reason and the original prompt (`suppressOriginalPrompt` leaves it out). `additionalContext` and plain-text stdout ride with the prompt. |
|
|
594
|
+
| `PreToolUse` | Before each tool call, matched against the tool name. | Refuses the call; the model gets `PreToolUse:<tool> hook error: [<command>]: <reason>`. `permissionDecision` `deny` refuses with its reason, `ask` parks the call on the approval card (category `hook-ask`), `allow` skips no Arco check, `defer` is ignored (non-interactive mode only). `updatedInput` replaces the whole input. `additionalContext` rides with the result. |
|
|
595
|
+
| `PostToolUse` | After a tool that succeeded. | The tool already ran: exit 2 stderr and the `reason` of `decision: "block"` are added next to the result. `updatedToolOutput` (a string, or `{ stdout, stderr }` for the shell tool) replaces what the model sees. `additionalContext` follows the result. |
|
|
596
|
+
| `PostToolUseFailure` | After a tool that failed (`error` holds its text). | As PostToolUse. |
|
|
597
|
+
| `Stop` | When the model finished responding (not after a cancel, truncation or refusal). Matcher ignored. | Keeps the model working: the reason (or `additionalContext`) becomes its next instruction. `stop_hook_active` is true on the continuation; after `CLAUDE_CODE_STOP_HOOK_BLOCK_CAP` (default 8) continuations in a row, counted from the last tool call, the turn ends. |
|
|
598
|
+
| `SubagentStop` | Instead of Stop on a Task child's first turn, matched against the agent type the parent asked for (`subagent_type`, default `general-purpose`). Input adds `agent_id`, `agent_type` and `agent_transcript_path`. | As Stop, for the child. |
|
|
599
|
+
| `PreCompact` | Before COMPACT, FOLD and SERVER FOLD, matched against `manual` (a button) or `auto` (auto-compaction, including a compaction inside a long turn, or auto-fold). Input: `trigger`, `custom_instructions` (null). | Skips the compaction; the notice gives the reason. `systemMessage` and `continue` are discarded. Not fired for the API's own server-side compaction, which happens inside a request. |
|
|
600
|
+
| `Notification` | `permission_prompt` when an approval card (review gate or hook `ask`) has waited 6 s; `idle_prompt` 60 s after a turn finished with no new message since (not after a cancel, not for a Task child). Matched against the type. Input: `message`, `title`, `notification_type`. | Cannot block. Runs in the background; exit code, stdout and stderr are ignored. |
|
|
476
601
|
|
|
477
|
-
|
|
602
|
+
Reading a hook's result, as in the reference: exit 0 applies the JSON object on stdout (plain text is success, and context on UserPromptSubmit); exit 2 is a blocking error where the event can block, with stderr as the reason unless the JSON makes a blocking decision with its own; any other exit is a non-blocking error the operator sees as a `[HOOKS] <event>:<tool> hook error` notice with the first line of stderr, unless stdout is a valid JSON object, whose fields then decide. `continue: false` stops processing (the call is refused and the turn ends after the round; on Stop it lets the turn end), with `stopReason` shown to the operator. `systemMessage` is shown to the operator. Matching handlers run in parallel; an identical handler defined in more than one settings file runs once. Matchers: `*`, empty or none match everything; letters, digits, `_`, `-`, spaces, `,` and `|` only is an exact name or list of names; anything else is an unanchored regular expression.
|
|
478
603
|
|
|
479
|
-
|
|
604
|
+
`onFailure`: a failure (cannot start, exit other than 0 or 2, timeout, invalid JSON) lets the action go ahead unless `onFailure` is `"block"`, which then does what exit 2 does (no effect on Stop and SubagentStop). On Windows without Git Bash, a shell-form PreToolUse hook with `onFailure` unset also blocks on failure, as in Claude Code. `async: true` starts the hook in the background with no timeout; its `additionalContext` and `systemMessage` reach the model with the next request. `asyncRewake: true` also runs in the background (with its timeout); exit 2 wakes the model with its stderr (or stdout): during a turn with the next request, on an idle tab as a queued follow-up that starts a turn. Closing the tab or handing it off ends every background hook still running, with its child processes, and the worker waits until they have ended.
|
|
480
605
|
|
|
481
|
-
|
|
482
|
-
- `hookSpecificOutput.additionalContext` (PostToolUse) - appended to the tool_result the model sees on the next turn.
|
|
483
|
-
- `hookSpecificOutput.permissionDecision` - recognized but not yet acted on (today's PreToolUse-block behavior is exit-code-driven; permission decisions slot here for a future revision).
|
|
484
|
-
- `decision: "block"` (PostToolUse) - synthesizes a `[PostToolUse hook blocked]` is_error tool_result and the model retries.
|
|
485
|
-
- `reason` - surfaced in the synthetic tool_result for blocking decisions.
|
|
606
|
+
Hook input carries Claude Code's common fields plus Arco's `workflow_id`: `session_id` (the workflow id), `transcript_path` (the tab's event log, `<project>/.arco/workflows/<id>/events.jsonl`, JSON lines in Arco's own format, written in the background so it can lag the current turn), `cwd`, `permission_mode`, `hook_event_name`, and `tool_use_id` on tool events. File paths in `tool_input` (`file_path`, `notebook_path`) are absolute. During a Task child's first turn every hook also gets `agent_id` (the child's workflow id) and `agent_type`, and `session_id` and `transcript_path` name the parent. Not sent: `prompt_id`, `scratchpad_dir`, `effort`. Plugin placeholders are only rewritten in PowerShell commands.
|
|
486
607
|
|
|
487
|
-
|
|
608
|
+
**`if`** (`hookIf.ts`): one permission rule per handler, as in Claude Code, read on tool events only; on any other event a handler with `if` never runs. `Bash(git *)` and `PowerShell(Remove-Item *)` check each subcommand (split on `&&`, `||`, `;`, `|`, `&` and newlines, plus the bodies of `$()`, backticks, subshells and loops; leading `VAR=value`, `timeout`, `nice`, `nohup` and similar wrappers and bare `xargs` are skipped; PowerShell aliases become the cmdlet and case is ignored). A pattern naming more than the program also matches a command holding `$()`, backticks or `$VAR`. `Edit(path)` covers Edit and Write, `Read(path)` covers Read, Grep and Glob, in gitignore syntax: `//` absolute, `~/` home, `/` the settings file's project (or `~/.claude` for user settings), else the project folder, with a bare name matching at any depth. Also `WebFetch(domain:host)`, `Agent(type)` or `Task(type)`, `mcp__server`, and `Tool(param:value)`. A command it cannot take apart (an unclosed quote, a here-document, a trailing operator) or a rule it cannot read runs the hook.
|
|
609
|
+
|
|
610
|
+
Command hooks follow Claude Code's exec form and shell form (`hookLaunch()` in `hooks.ts`):
|
|
611
|
+
|
|
612
|
+
- **Exec form** (`args` set): `command` is the program, resolved on `PATH`, started with `args` as its argument list and no shell, on every system. `${CLAUDE_PROJECT_DIR}` in `command` and in each argument is replaced by the project folder as plain text. On Windows `command` must be a real program such as `node.exe`; a `.cmd` or `.bat` file needs shell form. `shell` is ignored.
|
|
613
|
+
- **Shell form** (no `args`): the hook's `shell` field (`"bash"` or `"powershell"`) when set, else `commandShell()` (`server/src/commandShell.ts`): `/bin/sh -c` on Linux and macOS; Git Bash on Windows (`CLAUDE_CODE_GIT_BASH_PATH`, then the Git install of `git` on `PATH`, then the standard install folders; never the WSL `bash.exe` in the Windows system folder); PowerShell on Windows without Git Bash (`pwsh.exe`, then Windows PowerShell 5.1). PowerShell gets the command base64-encoded (`-EncodedCommand`, or a temporary `.ps1` when too long for a command line) with UTF-8 input and output, and `${CLAUDE_PROJECT_DIR}`, `${CLAUDE_PLUGIN_ROOT}` and `${CLAUDE_PLUGIN_DATA}` rewritten to `${env:NAME}`. `"shell": "powershell"` uses `pwsh` on Linux and macOS when it is installed.
|
|
614
|
+
|
|
615
|
+
A hook that runs in PowerShell only because Git Bash is missing carries `shellNotice`, and the worker emits it once as a `[HOOKS]` system notice (information). A hook that cannot start (no shell at all, the shell it asks for is missing, or a spawn error such as a missing program or working folder) carries `notRun`; unless that failure blocks (above), the action goes ahead and the worker emits one `[HOOKS]` notice per reason.
|
|
616
|
+
|
|
617
|
+
**The shell tool on Windows without Git Bash.** As in Claude Code, the model then gets a `PowerShell` tool instead of `Bash` (`shellToolName()`), so hooks matching `PowerShell` fire for it and `Bash` matchers do not. The other name is an unknown tool, refused before any hook. Every check keyed on Bash treats it the same (`isShellToolName()` in `shared/src/shellTool.ts`): the hardline floor (which also knows the PowerShell and cmd forms of its hazards), the review gate, tool postures, isolated members, the output filter, eviction, Fold and resume digests, the tool-call counter and the tool cards. The local-model Bash tool keeps its name.
|
|
618
|
+
|
|
619
|
+
Default hook timeout 600 s (30 s on UserPromptSubmit); per-hook `timeout` field overrides. Timed-out hooks get SIGTERM then SIGKILL after 2s grace; the output is discarded. On Windows `taskkill /T /F` ends the tree at once; with Git Bash the child also carries `ARCO_PROCESS_TREE` in its environment, and the kill first lists every MSYS process holding it through Git Bash's `/proc`, because a background job (`cmd &`) loses its Windows parent and `/T` alone misses it (`spawnShellChild()` and `signalChildTree()` in `server/src/workers/processKill.ts`, used by hooks, both Bash tools and sandbox shell scripts). Git Bash commands are passed in MSYS quoting on a verbatim command line, so backslashes (a JSON hook output with a Windows path) arrive unchanged. `CLAUDE_PROJECT_DIR=cfg.cwd` is set on the subprocess env; the per-event JSON payload is written to stdin. Inherited env minus any `ARCO_*` debug flags. Hook subprocesses register against the per-turn shell map so cancel + KillShell tear them down; background hooks end when the worker is disposed.
|
|
620
|
+
|
|
621
|
+
Reading `updatedInput` is the load-bearing piece for using rtk (`rtk-ai/rtk`) on Native: drop rtk into `~/.claude/settings.json` once and Native + CLI both apply its tool_input rewrites; each rewrite emits a `hook_rewrote_input` event so transcript review can attribute it.
|
|
488
622
|
|
|
489
623
|
**Pre-tool-use guards.** `pretoolGuards.ts` runs after the PreToolUse hook fold and before `executeNativeTool`. Today: `checkConfigProtection` blocks `Edit`/`Write`/`MultiEdit` against lint/format/type-check config (`.eslintrc*`, `.prettierrc*`, `tsconfig.json`, `tsconfig.*.json`, `.editorconfig`, `.ruff.toml`, etc.) by basename match on the resolved absolute path. Returns a synthetic `[blocked by config-protection]` tool_result that nudges the model to fix the code instead of weakening the gate. Emits `tool_gate_triggered` with `gate: "config-protection"`. Default ON; per-tab CONFIG-tab toggle deferred.
|
|
490
624
|
|
|
491
|
-
Three more deterministic floors run in the same dispatcher pre-flight (all static rules, no model judgment): **H17 hardline-command floor** (`detectHardlineCommand` / `checkHardlineCommand`) refuses a Bash command that would restart or kill the Arco service (`systemctl ... arco...`) or `rm -rf` the repo / cwd / `$HOME` / `/` / `*` - returns `[blocked by hardline-command-floor]`. It's a coarse always-on floor, not a sandbox: nothing the model does from a turn needs to restart Arco or wipe the repo. **H47 sensitive-path write floor** (`gateSensitiveWrite`, `tools.ts`) gates a `Write` / `Edit` whose resolved path is a `.env*` file or sits under a `.git` / `.ssh` segment behind an explicit operator allow via the AskUserQuestion machinery - fail-closed (refused outright when no approval channel is wired). **H62 partial-read→full-write warning** (`checkPartialReadFullWrite`) flags a full-file `Write` to a file only partially `Read` this turn, so the model doesn't clobber the untouched tail.
|
|
625
|
+
Three more deterministic floors run in the same dispatcher pre-flight (all static rules, no model judgment; their order is the `PRE_TOOL_GUARDS` list in `claude-native/toolChecks.ts`): **H17 hardline-command floor** (`detectHardlineCommand` / `checkHardlineCommand`) refuses a Bash command that would restart or kill the Arco service (`systemctl ... arco...`) or `rm -rf` the repo / cwd / `$HOME` / `/` / `*` - returns `[blocked by hardline-command-floor]`. It's a coarse always-on floor, not a sandbox: nothing the model does from a turn needs to restart Arco or wipe the repo. **H47 sensitive-path write floor** (`gateSensitiveWrite`, `tools.ts`) gates a `Write` / `Edit` whose resolved path is a `.env*` file or sits under a `.git` / `.ssh` segment behind an explicit operator allow via the AskUserQuestion machinery - fail-closed (refused outright when no approval channel is wired). **H62 partial-read→full-write warning** (`checkPartialReadFullWrite`) flags a full-file `Write` to a file only partially `Read` this turn, so the model doesn't clobber the untouched tail.
|
|
492
626
|
|
|
493
627
|
**In-turn tool-loop guardrail.** `toolLoopGuard.ts` watches for the same `(tool, args)` repeating within one operator turn - the in-turn sibling of 3.1's cross-turn stuck-worker breaker. Default posture is warnings-only: a `tool_loop_warning` event + `system_notice`. The hard-stop (abort the loop) is opt-in via `ARCO_TOOL_LOOP_GUARD=stop`.
|
|
494
628
|
|
|
495
|
-
**Tool-result filtering.** `filterToolResult.ts` is a pure-TS staged pipeline applied to a single tool_result before it enters `messages[]`. Plugged into `dispatchTool` between `
|
|
629
|
+
**Tool-result filtering.** `filterToolResult.ts` is a pure-TS staged pipeline applied to a single tool_result before it enters `messages[]`. Plugged into `dispatchTool` between `executeNativeToolResult` and the PostToolUse hook fold so operator-curated hook stderr / `additionalContext` stays unfiltered. Stages, all optional per pack:
|
|
496
630
|
|
|
497
631
|
1. `strip_ansi` - removes CSI / OSC / single-byte ESC sequences.
|
|
498
632
|
2. `replace[]` - `{ pattern: RegExp, replacement: string }[]` substitutions.
|
|
@@ -522,11 +656,39 @@ When the filter actually shrinks output, the worker writes the pre-filter raw by
|
|
|
522
656
|
|
|
523
657
|
**Auto-compaction.** Provider uses Arco compaction near 90% for Claude Native and Ollama, reserving 10% headroom; Claude CLI and Codex retain their own behavior. Explicit per-worker and cluster policies win. Older Native `efficiencyAutoCompact` values migrate from conservative to On at 80%, aggressive to On at 70%, and off to Provider. Claude API compaction is an optional per-tab beta under ADVANCED, off for new tabs. When it is on, the Provider default does not start a second Native compaction.
|
|
524
658
|
|
|
525
|
-
**
|
|
659
|
+
**In-turn auto-compaction (Claude Native).** A single long turn (hundreds of tool calls) can fill the window before the turn ends, and the between-turn policy never gets a turn boundary. Arco runs the Native request loop itself, so the worker also checks after each tool round: when the round's measured prompt size (see "Context size from usage" below; never the summed usage of a round that ran web search, web fetch or code execution) is at least the threshold of the model's context window, it compacts before the next request and continues the same turn. A round whose size cannot be measured is skipped, never compacted. The threshold is the tab's or cluster's AUTO-COMPACTION threshold when one is set, 70% under Provider; Off means off; with Claude API compaction (beta) on, Arco does not compact in the turn. The check runs at a clean boundary: every `tool_use` of the round has its `tool_result` and no request is in flight. The history before that round is summarized with the same summarizer and projection as COMPACT (recent user and assistant text kept verbatim through `projectKeptTail`); the round itself is kept raw (the assistant message with its thinking and `tool_use` blocks, and the user message with every `tool_result`), after a user note saying the compaction was automatic and to continue the task. The request that started the turn is always kept word for word: its text and attachment references are placed before the automatic note unless a kept-tail message already carries that text; a request over `KEPT_REQUEST_MAX_BYTES` (128,000 UTF-8 bytes) is never cut, the in-turn compaction is deferred for that turn and one notice says why; `native_compacted` persists it as `keptRequest` and replay rebuilds the same user text from it. The kept tail alone does not guarantee this: in a long turn it holds tool rounds, and when the model wrote no text between tool calls a later steer or mail message collapses the opening request out of the tail. If the summary request would not fit the window, the prefix is summarized in parts, oldest first. Every part stays within its estimated input budget, including the carried summary and any leading context note; a single message larger than a part is cut into consecutive slices, so nothing is dropped. At most one in-turn compaction runs per threshold crossing: if the next request is still at or above the threshold, one notice says so and Arco does not compact again until a request falls below it. A failed summary leaves the history unchanged, posts a notice and the turn continues. CANCEL during the summary ends the turn the usual way with the history unchanged. Cancellation is latched for the whole compaction, including between summary parts and before a new summary request; later parts are not started. A later explicit compaction starts a fresh operation. A steer that arrives meanwhile is delivered after the compacted history. Events: `native_compacting` and `native_compacted` carry `trigger: 'auto-in-turn'`, `percent` and `thresholdPercent`; `native_compacted` also carries `inTurn`, the `continueNote` (replay rebuilds it so the rest of the turn pairs with it) and, when `count_tokens` answers, `promptTokensAfter` with `contextWindow`, which refresh CTX at once. Chat shows `Compacting automatically (context N%)` and then `Compacted, continuing`; there is no takeover and no COMPACTED: CONTINUE. The compaction counts for auto-handoff like any other.
|
|
660
|
+
|
|
661
|
+
**Context size from usage (Claude Native).** A response that ran server tools (web search, web fetch, code execution) is sampled several times inside one request, and its top-level `usage` fields are the sum over those passes: right for billing, wrong as a prompt size. One research round with eleven passes of about 90k tokens reads as 97% of a 1M window while the real context is under 30%. `server/src/providers/claude-native/usageContext.ts` holds the rule every context decision uses: the last `message` entry of `usage.iterations` when the API sends it (its `input_tokens` plus cache read and cache creation); otherwise the top-level usage, but only for a round with no `server_tool_use` block or server tool result; otherwise no figure. The in-turn check measures an unmeasured round with `count_tokens` on the history as it stands and skips the decision when that fails. `count_tokens` leaves out the server-tool definitions (web search, web fetch, code execution: a few hundred tokens together, under 0.5% of any window), so the count sits marginally under the next request's size; the threshold is unaffected. The end-of-turn `lastPromptTokens` (which drives `context_usage`, `context_budget`, the between-turn auto-compaction and auto-handoff readings and the CTX meter) is `count_tokens` first and the single-pass usage second; a final round that ran server tools without `usage.iterations` and without a count reports no context figure for that turn rather than an inflated one. USAGE totals keep summing every pass; when `usage.iterations` lists a `compaction` pass, which the top-level fields leave out, the billed round is the sum over all entries. Displays follow the same rule: the CTX meter and the ACTIVITY session line show the measured context size or `-`, and Claude helper usage totals are not context readings; the worker context badge remains `-` until a separate measurement is available. Turn usage is never labelled as context. Anthropic's documentation states that `usage.iterations` is present when a compaction ran during the request; whether it is also sent for plain server-tool rounds is not documented, so the fallbacks above are the normal path and the console records which one measured a round.
|
|
662
|
+
|
|
663
|
+
Saved in-turn summaries also include the verbatim assistant narration of the retained round. The live worker keeps that round raw instead, so each representation retains the narration once. Rebuilt workers recover that text through the existing text-only replay; tool protocol blocks are not added to replay. The marker schema is unchanged.
|
|
664
|
+
|
|
665
|
+
**Auto-continue.** COMPACTION AUTO-CONTINUE applies only to automatic compactions between turns. The manual COMPACT button never sends a continue message; the composer offers COMPACTED: CONTINUE instead. An in-turn compaction needs no continue message, because the turn itself goes on.
|
|
666
|
+
|
|
667
|
+
**Output style.** A per-tab picker on the CONFIG tab, in the New workflow and cluster creator, and in the cluster member settings (ADD WORKERS, REPLACE). Three levels:
|
|
668
|
+
|
|
669
|
+
- `normal`: no addendum.
|
|
670
|
+
- `plain` (the default): full sentences with articles, short where possible (long ones are split, with no word limit), the answer first, one name per thing, no filler or hedging, and no repeating of earlier messages. The final reply of every turn is complete: what was done, what was checked and how, what was found with exact numbers, assumptions, risks, what is left with the next step, and anything that needs the operator.
|
|
671
|
+
- `terse`: full sentences with articles, at most about 20 words each, the answer first, no filler, hedging or recap, and one short line per tool phase with no chatter between routine calls.
|
|
672
|
+
|
|
673
|
+
Both addenda keep every negation (not, never, no, only, except), number and unit, keep code, commands, paths, identifiers and error text verbatim, and say that text which persists outside the chat (code, comments, commits, docs, plans, board tasks and comments, mail to other agents, skills, memory files) follows the project's conventions and is never compressed. Both also keep the operator's language (or the one asked for; quoted text never switches it), show a code change as the changed lines with one or two lines of context unless the whole file is asked for, new or mostly changed, and quote only the shortest decisive error line. During tool runs both ask for one short line per phase; Plain also asks for the reason when the approach changes. No saving is claimed: current models already answer concisely, so the levels are about readability.
|
|
674
|
+
|
|
675
|
+
`DEFAULT_OUTPUT_STYLE` (`shared/src/outputStyle.ts`) is the one default. A tab, member, preset or template with no saved style uses it; an explicit `normal` stays `normal`. A saved `lite` (before 0.1.5) reads as `plain` and `caveman` (before 2026-05-10) as `terse`, on every read path (`normalizeOutputStyle`). The default is stored as unset. `outputStyleAddendum(level)` (`server/src/providers/outputStyle.ts`) returns the fixed text; it is a constant, so the prompt prefix stays byte-identical from turn to turn. Switching takes effect on the next turn.
|
|
676
|
+
|
|
677
|
+
Where each provider puts it:
|
|
678
|
+
|
|
679
|
+
| Provider | Applied | How |
|
|
680
|
+
|---|---|---|
|
|
681
|
+
| Claude Native | yes | Last system block, after `appendSystemPrompt` and `systemPrompt`; a later change is an appended system message (append-only prefix). |
|
|
682
|
+
| Claude CLI | yes | End of `--append-system-prompt`, after the north star and the appended prompt. |
|
|
683
|
+
| Codex app-server | yes | End of the stable prompt prefix, before the `---` separator. |
|
|
684
|
+
| Codex exec | yes | End of the prompt prefix on stdin, before the `---` separator. |
|
|
685
|
+
| Cursor (ACP and print) | yes | End of the prompt prefix, after the north star, before the `---` separator. |
|
|
686
|
+
| Ollama, llama.cpp | yes | End of the system message; `/no_think` stays first on low effort. |
|
|
687
|
+
| LM Studio, Strata, DeepSeek | yes | End of the system message (the shared OpenAI-compatible worker). |
|
|
526
688
|
|
|
527
|
-
**Adding a
|
|
689
|
+
**Adding a level** needs the operator's decision first. Its text keeps the negation, number, verbatim and persisted-text rules above.
|
|
528
690
|
|
|
529
|
-
**Output-style scope for primitives.** Review / Handoff seed / DOCS / GIT spawn paths force `outputStyle: 'normal'` regardless of the source tab's pick. Hard-coded at
|
|
691
|
+
**Output-style scope for primitives.** Review / Handoff seed / DOCS / GIT spawn paths force `outputStyle: 'normal'` regardless of the source tab's pick. Hard-coded at: `runReviewer.ts` (reviewer WorkerConfig), `exportContext.ts` (CLI handoff path, Native handoff path, fresh-summarizer path), `runResearch.ts`, `runCompare.ts` and `compareHandlers.ts`, `runDocEdit.ts`, `runMdTuneup.ts`, `recall/summarize.ts`, `knowledge/distill.ts`, `genesisHandlers.ts`, and `handleUserMessage` (overrides outputStyle when `UserMessage.primitive === 'docs' | 'git'`, set by the in-tab DOCS / GIT composer dialogs, and on the first turn of a plan review). DOCS / GIT new-tab spawn forces normal client-side via `spawnConfigFromRunAs`. Any other worker spawned without a level gets no addendum: only a tab's own turns resolve the default (`resolveTurnSettings`). Spawn-from-here and Task children DO inherit the tab's level - operator flips in the child tab if needed. `outputStyle.test.ts` checks the hard-coded sites.
|
|
530
692
|
|
|
531
693
|
#### Review safe-mode - edit-before-approve gate (DEBAG)
|
|
532
694
|
|
|
@@ -540,7 +702,7 @@ Native sessions are Arco-internal - there's no `~/.claude/projects/<sid>.jsonl`
|
|
|
540
702
|
|
|
541
703
|
On `ensureStarted`, if the workflow's `events.jsonl` has prior `user_message_echo` + `primary_text` entries, the worker reconstructs `this.messages` from them so a server restart picks up where it left off (replay-only - periodic snapshot deferred per 14 Q7). The reconstructed shape is logged to stderr under `[claude-native:<wfid>]` for forensic comparison; tool_use / tool_result events are not replayed (the next turn sees a clean USER/ASSISTANT history).
|
|
542
704
|
|
|
543
|
-
**Restore points / forks (Native-first).** A `revert_to_point_request` (HistoryTab "REWIND CONVERSATION" action) makes the server append a `leaf_move` event and set `meta.leafSeq`; a branch-aware replay pre-pass (`filterEventsToBranch` in `resumeSummary.ts`, driven by `replayMessagesWithResumePolicy`) then reconstructs `messages` along the active leaf only (absent `leafSeq` ⇒ byte-identical to the old linear replay). The rewind is reversible - "undo the undo" is just another `leaf_move`. Native-first
|
|
705
|
+
**Restore points / forks (Native-first).** A `revert_to_point_request` (HistoryTab "REWIND CONVERSATION" action) makes the server append a `leaf_move` event and set `meta.leafSeq`; a branch-aware replay pre-pass (`filterEventsToBranch` in `resumeSummary.ts`, driven by `replayMessagesWithResumePolicy`) then reconstructs `messages` along the active leaf only (absent `leafSeq` ⇒ byte-identical to the old linear replay). The rewind is reversible - "undo the undo" is just another `leaf_move`. Native-first: the button stays visible for every provider, disabled with the reason beside it when the worker is not Claude Native, and the server refuses those requests. `branch_summary` is RESERVED and unemitted - forks ship via `leaf_move`, not `branch_summary`. This is the active-branch behavior used when resuming the conversation.
|
|
544
706
|
|
|
545
707
|
#### Context management
|
|
546
708
|
|
|
@@ -551,7 +713,7 @@ Anthropic's `/v1/models` exposes three context-management capabilities. Arco kee
|
|
|
551
713
|
| `clear_thinking` (strip stale thinking blocks server-side) | off | none today; keep off unless an explicit operator surface is added |
|
|
552
714
|
| `clear_tool_uses` (strip stale tool i/o server-side) | off | none today; keep off unless an explicit operator surface is added |
|
|
553
715
|
| `compact_20260112` (server-managed summarization at threshold) | off for Native | CONFIG > ADVANCED "Claude API compaction (beta)" toggle (`WorkflowConfig.claudeNativeCompact`; explicit `true` enables) |
|
|
554
|
-
| Auto-handoff (Arco
|
|
716
|
+
| Auto-handoff (Arco starts a fresh session after N compactions, default 5) | opt-in (default `false` for new tabs) | CONFIG-tab "AUTO-HANDOFF" Hand off after N compactions (`WorkflowConfig.autoHandoff.enabled`, `afterCompactions`) |
|
|
555
717
|
|
|
556
718
|
`clear_thinking` and `clear_tool_uses` ship behind `anthropic-beta: context-management-2025-06-27` if they are ever used, but Native deliberately does not send that beta or those edits by default. The 2026-05-31 Opus 4.8 A/B test showed that `clear_tool_uses` can replace live web-search evidence with `Search result was cleared`, causing repeated searches and stale-source answers. Compact rides on `compact-2026-01-12` and is emitted only when the operator has explicitly enabled the per-tab toggle and the active model's cached `/v1/models` catalog entry advertises `compact_20260112`. An unrecognized model conservatively skips all betas rather than risk a 400. Compaction is `{ type: 'compact_20260112' }` in `context_management.edits`, not a sibling `context_management.compact` object. Per-request beta-header override is set on the SDK call so a live model swap mid-tab re-evaluates capabilities cleanly. The `Claude API compaction (beta)` toggle is only rendered when `transport === 'native'` and the active model's catalog entry has `compact_20260112: { supported: true }`; missing `WorkflowConfig.claudeNativeCompact` means disabled, and explicit `true` is the durable enable.
|
|
557
719
|
|
|
@@ -559,10 +721,10 @@ Anthropic's `/v1/models` exposes three context-management capabilities. Arco kee
|
|
|
559
721
|
|
|
560
722
|
Distinct from the Anthropic server-side edits above - these are Arco-owned, deterministic, and run in-process:
|
|
561
723
|
|
|
562
|
-
- **Token-budget meter (2.3).** `contextBudget.ts` emits a `context_budget` event (`{ usedTokens, effectiveWindow, pct, thresholds: {
|
|
563
|
-
- **Fold + auto-fold (2.1).** A deterministic in-place transcript trim (`foldDigest.ts`) - keeps recent turns verbatim and digests the older middle, no LLM call. Manual via the composer FOLD button (`fold_workflow` WS message); armed per-tab via the CONFIG `autoFold` toggle - an `autoFold { enabled, foldAt }` field on the per-tab config-update message (default OFF; `foldAt` is the budget-meter pct that triggers the in-place Fold
|
|
724
|
+
- **Token-budget meter (2.3).** `contextBudget.ts` emits a `context_budget` event (`{ usedTokens, effectiveWindow, pct, thresholds: { foldAt? }, crossed: { fold } }`) each turn - `pct` is measured against the *effective* window (raw window minus reserved output tokens), so it's the signal the Fold / auto-fold gate reads rather than the raw-window `context_usage` that drives the CTX bar. Transient (derived from persisted `lastPromptTokens`), not persisted itself.
|
|
725
|
+
- **Fold + auto-fold (2.1).** A deterministic in-place transcript trim (`foldDigest.ts`) - keeps recent turns verbatim and digests the older middle, no LLM call. Manual via the composer FOLD button (`fold_workflow` WS message); armed per-tab via the CONFIG `autoFold` toggle - an `autoFold { enabled, foldAt }` field on the per-tab config-update message (default OFF; `foldAt` is **FOLD AT**, the budget-meter pct that triggers the in-place Fold; persists to `meta.json` + `WorkflowConfig.autoFold`). A Fold is not counted toward auto-handoff. Emits `context_folded`. Cheaper than Handoff or compact - same worker, no summarizer round-trip, no fresh spawn.
|
|
564
726
|
- **Tool-result eviction (2.2).** `toolResultEviction.ts` is the aggregate largest-first spill that fires only when a batch of tool results' summed cost exceeds the turn budget; the raw output is gzipped to a workspace-relative `rawArtifactPath` (same convention as `tool_filtered`, fully reversible) and a `tool_evicted` event (`{ toolUseId, toolName, originalBytes, filteredBytes, rawArtifactPath }`) records what was spilled.
|
|
565
|
-
- **Retained-history server-tool prune (`retainedContext.ts`).** After a settled turn, `pruneServerToolEvidenceAfterTurn` drops that turn's `server_tool_use` / `*_tool_result` / citation blocks (the final answer already absorbed the findings) - thinking is always kept, and the whole prune is skipped on binding-enforcing models (`enforcesPreservedThinking()`: `fable-5-1` / `mythos-5-1` / `opus-5-5`). Two pairing invariants make it safe, and breaking either one wedges the tab permanently with a 400 that every later request replays: it never edits the **latest assistant message**, and it keeps any `server_tool_use` whose result lives *in* that protected message (the `pause_turn` shape, where call and result straddle two assistant messages). `stripDanglingServerToolResults` runs at the top of each turn as the mirror of `pruneOrphanToolUse` - one detector per direction. Both failure shapes and the exact 400 wordings: [Gotchas: Claude Native transport](GOTCHAS.md#claude-native-transport).
|
|
727
|
+
- **Retained-history server-tool prune (`retainedContext.ts`).** After a settled turn, `pruneServerToolEvidenceAfterTurn` drops that turn's `server_tool_use` / `*_tool_result` / citation blocks (the final answer already absorbed the findings) - thinking is always kept, and the whole prune is skipped on binding-enforcing models (`enforcesPreservedThinking()`: `fable-5-2` / `fable-5-1` / `mythos-5-2` / `mythos-5-1` / `opus-5-5`). Two pairing invariants make it safe, and breaking either one wedges the tab permanently with a 400 that every later request replays: it never edits the **latest assistant message**, and it keeps any `server_tool_use` whose result lives *in* that protected message (the `pause_turn` shape, where call and result straddle two assistant messages). `stripDanglingServerToolResults` runs at the top of each turn as the mirror of `pruneOrphanToolUse` - one detector per direction. Both failure shapes and the exact 400 wordings: [Gotchas: Claude Native transport](GOTCHAS.md#claude-native-transport).
|
|
566
728
|
- **Workspace facts.** `workspaceFacts.ts` auto-detects the project's ecosystem / package manager / verify commands / git branch once at session start and folds a short `--- Workspace facts ---` block into the system prompt (omitted entirely when nothing is detected ⇒ zero input-token cost), so the model and any verify-loop agree on the single "did I break it?" command.
|
|
567
729
|
- **Aggregate `@`-ref budget gate.** Beyond the per-ref 64 KB cap, `contextRefs.ts` tracks the aggregate of all `@`-file expansions in one message: soft-warn past ~25% of the model's window, hard-refuse any ref that would push the aggregate past ~50% (with a clear "drop a ref or send fewer files" reason) so a big paste can't silently crowd out the operator's instruction.
|
|
568
730
|
|
|
@@ -570,7 +732,7 @@ Distinct from the Anthropic server-side edits above - these are Arco-owned, dete
|
|
|
570
732
|
|
|
571
733
|
`server/src/catalog.ts` polls `https://api.anthropic.com/v1/models` (using the worker's OAuth tokens + standard wire fingerprint), distills the wire shape to the picker's camelCase form via `distillCatalogModel()`, and caches the result for one hour (`REFRESH_INTERVAL_MS = 60 * 60 * 1000`). Refresh is lazy - the next request after expiry triggers it; `?force=1` on `GET /api/claude-native/catalog` bypasses the cache. Capability flags (`clearThinking`, `clearToolUses`, `compact`) are derived from the catalog entry's `supportedFeatures`, but only `compact` is consumed by the worker by default. The CONFIG-tab model picker uses `compact` to gate the CONFIG > ADVANCED Claude API compaction (beta) toggle, and `getCachedModelCapabilities(modelId)` is called per Native request to decide whether to send `compact-2026-01-12` + `{ type: 'compact_20260112' }`. Cold-start, fetch failure, or an unrecognized id (operator typo, picker out of sync) all return `null` and the worker conservatively skips the beta - the `[claude-native:<wfid>] → messages.create ... ctx_mgmt=compact` log line shows what actually went out. Static fallbacks still need to be updated when a new family ships: `supportsClaudeAdaptiveThinking()` / `CLAUDE_MODEL_EFFORTS` control effort semantics, `adaptiveMaxTokensForModel()` controls output cap, and `contextEstimator.ts` controls the CTX denominator before the live catalog can help.
|
|
572
734
|
|
|
573
|
-
|
|
735
|
+
Compaction handles context fill; auto-handoff counts compactions (`native_compacted`, automatic and COMPACT) and starts a fresh session after N of them in one conversation. On Claude Native it needs Arco's auto-compaction on; Claude API compaction (`compact_20260112`) is not counted. See plan-doc 15 for the full combination matrix and the resolved beta-header strings.
|
|
574
736
|
|
|
575
737
|
#### Operator in-place compact (`⊟ COMPACT` / `native_compacted`)
|
|
576
738
|
|
|
@@ -680,11 +842,15 @@ Default `unicode61` tokenizer (no stopwords - 'added' / 'fix' / 'the' all retain
|
|
|
680
842
|
|
|
681
843
|
## Codex
|
|
682
844
|
|
|
845
|
+
App-server ignores a late turn/start acknowledgement after that turn has ended. Generated images finish saving and emit their artifact and terminal tool status before the turn settles. Enabled registry servers are passed to app-server as well as exec; changing a launch definition recycles the app-server child before its next turn.
|
|
846
|
+
|
|
847
|
+
Context-window and code-mode metadata use the selected account home first, then `CODEX_HOME`, then the CLI default home. MAX therefore reads the same account metadata as the spawned CLI. Concurrent Native, Codex and Cursor catalog refreshes share the complete fallback result: unavailable catalogs return their last snapshot or an empty result for the normal picker fallback.
|
|
848
|
+
|
|
683
849
|
Two transports ship side-by-side, selected per-tab via `codex.transport`. New Arco homes use `appserver`; the home and project settings cascade can select either transport, and a per-tab choice takes precedence. Existing cascade and per-tab choices remain unchanged. Per-tab override lives on `WorkflowConfig.codexTransport` and is editable from the CONFIG tab without a server restart.
|
|
684
850
|
|
|
685
851
|
Reviewers and handoff seed turns always run on `exec` regardless of the tab's transport - the per-workflow appserver child is too heavy for one-shot reviewer paths and there's no reviewer feature that benefits from mid-turn steer.
|
|
686
852
|
|
|
687
|
-
The Codex CONFIG tab is sparse next to Claude Native by design, not omission. The Native-only efficiency knobs (Claude API compaction (beta) under CONFIG > ADVANCED, interleaved-thinking beta, tool-result filter, fact-force first edit, sandbox tools) all reach *inside* the in-process Anthropic request - request body, `anthropic-beta` headers, the `tools[]` array, or per-tool dispatch. Codex runs as an external subprocess, so Arco can't mutate those internals and the controls have nowhere to attach. **Output style is the exception
|
|
853
|
+
The Codex CONFIG tab is sparse next to Claude Native by design, not omission. The Native-only efficiency knobs (Claude API compaction (beta) under CONFIG > ADVANCED, interleaved-thinking beta, tool-result filter, fact-force first edit, sandbox tools) all reach *inside* the in-process Anthropic request - request body, `anthropic-beta` headers, the `tools[]` array, or per-tool dispatch. Codex runs as an external subprocess, so Arco can't mutate those internals and the controls have nowhere to attach. **Output style is the exception:** Arco owns the prompt prefix on both transports (`turn/start` input on `appserver`, stdin on `exec`) and folds the style addendum into it. What Codex *does* surface besides output style - codebase-index/memory + MCP servers - are the things you configure *around* a subprocess rather than inside its request. See [Gotchas: Efficiency behavior](GOTCHAS.md#efficiency-behavior) for the fact-force-specific analysis (notably why the `appserver` approval bindings don't give a usable pre-execution gate today).
|
|
688
854
|
|
|
689
855
|
### `exec` transport
|
|
690
856
|
|
|
@@ -782,6 +948,12 @@ API-key fallback: `OPENAI_API_KEY` env var.
|
|
|
782
948
|
|
|
783
949
|
### `app-server` transport
|
|
784
950
|
|
|
951
|
+
A status update for an existing tool call updates its original Activity card
|
|
952
|
+
without splitting an assistant reply that is still streaming. New tool calls
|
|
953
|
+
still separate reply segments. The same ordering applies after reload or event
|
|
954
|
+
replay; tool cards keep their starting position when they complete or fail.
|
|
955
|
+
Cursor reasoning, Cursor tool updates and operator steering still separate reply segments. Cursor keeps those boundaries after reconnect while the tool card stays in its original position.
|
|
956
|
+
|
|
785
957
|
Settled app-server results now carry the last token-usage notification's
|
|
786
958
|
`lastPromptTokens` for ordinary workers as well as Incognito. Computer scripts
|
|
787
959
|
read that final-request prompt and the reported window directly for context
|
|
@@ -804,9 +976,9 @@ before announcing the boundary; the next request uses `thread/start` with no
|
|
|
804
976
|
summary or old transcript. KEEP CONTEXT/OFF pause automatic resets. This is
|
|
805
977
|
separate from Codex compaction, which remains the fallback within a long turn.
|
|
806
978
|
|
|
807
|
-
The child is long-lived, but `WorkerConfig` is per-turn. The per-turn wrapper refreshes the cached worker with the current config before `ensureStarted()` / `beginTurn()`, then `beginTurn()` converts
|
|
979
|
+
The child is long-lived, but `WorkerConfig` is per-turn. The per-turn wrapper refreshes the cached worker with the current config before `ensureStarted()` / `beginTurn()`, then `beginTurn()` converts fitted images into `localImage` input items. Documents and notebooks provide decoded text alongside `[attached file: <path>]` labels; other binaries provide a note. This is what makes images attached to a cluster member/broadcast arrive in Codex app-server as actual image inputs instead of merely persisting on the Arco chat echo.
|
|
808
980
|
|
|
809
|
-
Arco passes a minimal thread config override on both `thread/start` and `thread/resume`: `web_search: "live"` (Chat tabs send `"live"` or `"disabled"` per the web toggle).
|
|
981
|
+
Arco passes a minimal thread config override on both `thread/start` and `thread/resume`: `web_search: "live"` (Chat tabs send `"live"` or `"disabled"` per the web toggle). Exec and exec resume explicitly send the same search policy: Agent tabs use live search; Chat follows its web toggle. This makes web search available when the model chooses to look online, without changing approvals, sandboxing, model, profile, or MCP wiring. Do not set `tools.web_search` from the vendored 0.128 bindings without revalidating against the installed Codex CLI; Codex 0.131 rejects the stale generated shape during thread bootstrap.
|
|
810
982
|
|
|
811
983
|
Reviewers and handoff seed turns always run on `exec` regardless of the tab's transport. The dispatcher branch in `server/src/providers/index.ts` only takes the appserver path when `config.codexTransport === 'appserver'`; reviewer / seed paths leave that field unset.
|
|
812
984
|
|
|
@@ -821,7 +993,7 @@ Implemented in `jsonRpc.ts`. Message names locked in vendored bindings - methods
|
|
|
821
993
|
|
|
822
994
|
#### Mid-turn steer
|
|
823
995
|
|
|
824
|
-
The `WorkerConfig.drainSteer` callback fires on every `item/completed` notification while a turn is in flight (any item type - `commandExecution`, `fileChange`, `mcpToolCall`, etc.). When the bucket is non-empty, the worker sends `turn/steer` with `expectedTurnId: currentTurnId` and
|
|
996
|
+
The `WorkerConfig.drainSteer` callback fires on every `item/completed` notification while a turn is in flight (any item type - `commandExecution`, `fileChange`, `mcpToolCall`, etc.). When the bucket is non-empty, the worker sends `turn/steer` with `expectedTurnId: currentTurnId` and text plus any fitted `localImage` input items. Codex's protocol enforces the precondition - if the turn ended in the round-trip window the steer fails loudly rather than landing in the next turn.
|
|
825
997
|
|
|
826
998
|
The drain is destructive (server-side `splice(0)`); the worker re-enqueues on three failure shapes via the new `WorkerConfig.requeueSteer` hook:
|
|
827
999
|
|
|
@@ -829,9 +1001,9 @@ The drain is destructive (server-side `splice(0)`); the worker re-enqueues on th
|
|
|
829
1001
|
- Mismatched `expectedTurnId` (turn ended) → re-enqueue as **follow-up**. The post-turn merge path picks them up.
|
|
830
1002
|
- Other RPC / transport errors → re-enqueue as **follow-up** *plus* a `system_notice` so the operator sees the slip.
|
|
831
1003
|
|
|
832
|
-
Re-broadcasts `queue_update` after the re-enqueue (the original drain emitted a snapshot showing the bucket empty). The originator's optimistic chat row stays cleared from the prior `queued_messages_drained`;
|
|
1004
|
+
Re-broadcasts `queue_update` after the re-enqueue (the original drain emitted a snapshot showing the bucket empty). The originator's optimistic chat row stays cleared from the prior `queued_messages_drained`; PENDING is the source of truth for "items waiting" until the next drain succeeds.
|
|
833
1005
|
|
|
834
|
-
Steer attachments
|
|
1006
|
+
Steer attachments use the same decoder as initial attachments: fitted images become `localImage` items, documents and notebooks provide text, and other binaries provide a note. Agent path labels and Chat name labels identify attachments. Local providers likewise prepare steering attachments and check vision support before sending images.
|
|
835
1007
|
|
|
836
1008
|
#### Cancel
|
|
837
1009
|
|
|
@@ -906,7 +1078,7 @@ Operator's `~/.codex/config.toml` is left untouched - `-c` overrides only set th
|
|
|
906
1078
|
|
|
907
1079
|
### Registry MCP
|
|
908
1080
|
|
|
909
|
-
Both Codex transports
|
|
1081
|
+
Both Codex transports register enabled MCP registry servers through `-c mcp_servers.<key>.*` overrides. Codex 0.167 and later receive `disabled_tools` for explicitly disabled tools and cached dangerous tools that were not ticked. Older or unknown versions keep server-level wiring and show a per-tool enforcement warning in CONFIG. Registry denylist changes recycle app-server before the next turn. See `docs/MCP_REGISTRY.md` for probe and compatibility limits.
|
|
910
1082
|
|
|
911
1083
|
#### `exec` lifecycle
|
|
912
1084
|
|
|
@@ -914,9 +1086,9 @@ Per-turn - symmetric with Claude CLI. `codex.ts buildArgs()` appends the two `-c
|
|
|
914
1086
|
|
|
915
1087
|
#### `app-server` lifecycle
|
|
916
1088
|
|
|
917
|
-
Per-appserver-process - the MCP child lives for the full lifetime of the long-lived `codex app-server` child, NOT per-turn. Asymmetric with `exec` and Claude CLI. `CodexAppServerWorker.ensureStarted()` injects the `-c` overrides into the `codex app-server` argv at bootstrap; `
|
|
1089
|
+
Per-appserver-process - the MCP child lives for the full lifetime of the long-lived `codex app-server` child, NOT per-turn. Asymmetric with `exec` and Claude CLI. `CodexAppServerWorker.ensureStarted()` injects the `-c` overrides into the `codex app-server` argv at bootstrap; `currentMcpSignature` records the bootstrap context (cluster id, board attachment, codebase-memory index, account, Codex home, access mode, role, model, context policy and tool surface).
|
|
918
1090
|
|
|
919
|
-
When the operator joins / detaches a workflow from a cluster mid-conversation, the cached worker's `
|
|
1091
|
+
When the operator joins / detaches a workflow from a cluster mid-conversation, or another part of that context changes, the cached worker's `currentMcpSignature` no longer matches the signature computed from the next turn's config (`computeMcpSignature`). The dispatcher (`codex-appserver/index.ts acquireWorker`) detects the mismatch, retires the cached worker, and re-bootstraps with (or without) the MCP child wired in. Codex thread state survives via `thread/resume`, so the conversation continues unbroken - only the MCP wiring flips.
|
|
920
1092
|
|
|
921
1093
|
Per-turn injection (plan + role + mailbox prologue) flows through `beginTurn(prompt, appendSystemPrompt)` and lands in the `UserInput[]` payload's trailing text element. Same `${appendSystemPrompt}\n\n---\n\n${prompt}` shape as `exec`. App-server has a separate bounded 48 KB cluster fold because JSON-RPC stdin has no argv ceiling; this admits the full 32 KB maximum plan plus the small cluster blocks. The 16 KB cap remains on CLI transports. Repeating a large plan consumes thread context, so 48 KB remains a ceiling rather than becoming unlimited.
|
|
922
1094
|
|
|
@@ -968,6 +1140,8 @@ against isolated Vite with all API/WebSocket traffic stubbed.
|
|
|
968
1140
|
|
|
969
1141
|
## Cursor
|
|
970
1142
|
|
|
1143
|
+
ACP and print output decode UTF-8 across pipe chunks, preserving multibyte text and filenames. Cancelling native compression finishes its cancellation wait when compression settles; its fallback timer cannot kill a later turn.
|
|
1144
|
+
|
|
971
1145
|
`server/src/providers/cursor/` - a long-lived per-workflow ACP worker (`worker.ts`) driving
|
|
972
1146
|
`cursor-agent acp` over JSON-RPC (`acpJsonRpc.ts`), a per-turn wrapper + worker cache (`index.ts`),
|
|
973
1147
|
a `cursor-agent models` catalog (`catalog.ts`), and a stateless `cursor-agent -p --mode ask` one-shot
|
|
@@ -989,8 +1163,44 @@ ACP error. `CursorAcpTurn` narrowly recognizes that exact response, withholds on
|
|
|
989
1163
|
prefix from the normal stream, emits `[AUTH:cursor]` for the shared inline re-login UI, and disposes the
|
|
990
1164
|
cached worker. After the operator completes login and resends, `acquireWorker` starts the current CLI
|
|
991
1165
|
with the current credentials and attempts the normal `session/load` resume. Any longer answer that only
|
|
992
|
-
mentions signing in falls through as normal assistant text.
|
|
993
|
-
|
|
1166
|
+
mentions signing in falls through as normal assistant text.
|
|
1167
|
+
|
|
1168
|
+
Connections > Cursor runs `cursor-agent login` inside Arco (`authLoginSession.ts`, with
|
|
1169
|
+
`NO_OPEN_BROWSER=1`) and shows the link it prints; the CLI finishes on its own once the page confirms.
|
|
1170
|
+
`POST /api/auth-login?provider=cursor` still returns the terminal command as a fallback.
|
|
1171
|
+
|
|
1172
|
+
A readable token is not proof of a working sign-in. `providers/cursor/authState.ts` remembers the last
|
|
1173
|
+
rejection (`Authentication required` from `session/new`, the sign-in reply above, a `401` from the usage
|
|
1174
|
+
API, or an authentication error from the catalog refresh) with a fingerprint of the token it was seen
|
|
1175
|
+
with. While that token is unchanged, the Cursor status reads not signed in with `signInRejected` and
|
|
1176
|
+
Connections offers Sign in again; a new token (a fresh login) clears it. Status polls make no network
|
|
1177
|
+
call; the explicit Connections check also runs `cursor-agent status` once.
|
|
1178
|
+
|
|
1179
|
+
Sign-in failures never count toward the start-failure breaker in `index.ts` (three failed starts in a
|
|
1180
|
+
row stop a tab from retrying until HANDOFF): they show the `[AUTH:cursor]` sign-in notice instead, so
|
|
1181
|
+
signing in again and resending is enough. A start that fails also ends its `cursor-agent acp` child.
|
|
1182
|
+
|
|
1183
|
+
### Model selection
|
|
1184
|
+
|
|
1185
|
+
`cursor-agent acp` ignores `--model`: every `session/new` reports `currentModelId: "default[]"`,
|
|
1186
|
+
whatever was passed (captured in `providers/cursor/fixtures/acp-models.json`). ACP advertises one id
|
|
1187
|
+
per model, carrying the settings saved for that model in the Cursor CLI, for example
|
|
1188
|
+
`grok-4.7[context=256k,reasoning_effort=high,fast=true]`, and `session/set_model` and
|
|
1189
|
+
`session/set_config_option` accept only those ids. The catalog that Arco's picker shows lists every
|
|
1190
|
+
variant separately (`grok-4.7-medium`, `grok-4.7-high-fast`).
|
|
1191
|
+
|
|
1192
|
+
After every `session/new` and `session/load`, and whenever the CONFIG model changes, the worker maps
|
|
1193
|
+
the catalog id to the advertised id by model name, effort, fast and thinking (`modelMap.ts`), selects
|
|
1194
|
+
it with `session/set_config_option` (or `session/set_model` on a CLI without it) and checks the
|
|
1195
|
+
returned `currentValue`. When the advertised id carries other settings than the chosen variant, the
|
|
1196
|
+
session runs that variant and a notice names both models and how to change the saved setting (choose
|
|
1197
|
+
the variant once in the Cursor CLI with `/model`, then HANDOFF). A model Cursor does not offer, a
|
|
1198
|
+
refused or an unconfirmed switch also produce a notice naming the model the session runs on. The model
|
|
1199
|
+
chip shows the effective model. Selecting a model over ACP also saves it as the Cursor CLI's default
|
|
1200
|
+
model. The print transport passes the catalog id with `--model`, `auto` included, so a chat on Auto
|
|
1201
|
+
does not run the CLI's saved default. The Smart AUTO-PICKUP Cursor evaluator selects and confirms the
|
|
1202
|
+
exact model the same way and refuses (`startup_model_unavailable`, `startup_model_unconfirmed`)
|
|
1203
|
+
otherwise.
|
|
994
1204
|
|
|
995
1205
|
### Usage
|
|
996
1206
|
|
|
@@ -1010,6 +1220,8 @@ usage nor the standard `usage_update { used, size }` notification, even though t
|
|
|
1010
1220
|
those optional shapes. Dashboard events are billing totals across internal calls, not a retained
|
|
1011
1221
|
prompt snapshot, so they are not a valid substitute for context fill.
|
|
1012
1222
|
|
|
1223
|
+
Incomplete Cursor usage pages never appear as complete monthly totals. A page cap or an early end before the reported event count makes the snapshot unavailable with an incomplete-usage message and a dashboard link.
|
|
1224
|
+
|
|
1013
1225
|
### Context compression
|
|
1014
1226
|
|
|
1015
1227
|
Cursor automatically summarizes older history as its context fills. Arco also exposes an idle-only
|
|
@@ -1021,7 +1233,7 @@ an ordinary model prompt instead of a slash command. `available_commands_update`
|
|
|
1021
1233
|
active turn; when Cursor has supplied an authoritative snapshot, Arco refuses rather than guessing
|
|
1022
1234
|
if `compress` is absent. The underlying Cursor session persists the summary. Arco records the action
|
|
1023
1235
|
through the existing `ctx_action` + system-notice compact path; Handoff remains the clean-session escape
|
|
1024
|
-
hatch. Cursor
|
|
1236
|
+
hatch. Cursor has no Arco auto-handoff: ACP does not report Cursor's own compressions, so Arco cannot count them.
|
|
1025
1237
|
|
|
1026
1238
|
**Included-allocation gauge.** `cursorUsage.ts` also GETs `/api/usage-summary` (the endpoint the Spending
|
|
1027
1239
|
page calls) → `CursorIncludedUsage` (`used`/`limit`/`remaining` cents, `totalPercentUsed` /
|
|
@@ -1114,15 +1326,26 @@ listener down).
|
|
|
1114
1326
|
|
|
1115
1327
|
## Ollama
|
|
1116
1328
|
|
|
1329
|
+
Stateless local replay keeps the brief and later exchanges after a completed handoff, without reintroducing the archived prefix. Failed or cancelled handoffs preserve earlier context. Messages containing literal USER or AGENT role labels use a tagged JSON-string representation internally so those lines, their whitespace and their backslashes stay inside the original message. Existing plain rendered transcripts remain readable.
|
|
1330
|
+
|
|
1117
1331
|
`server/src/providers/ollama.ts` + `server/src/providers/ollamaTools.ts`. Pure HTTP, no subprocess.
|
|
1118
1332
|
|
|
1119
1333
|
> **Operator health readout.** The System modal's **Models** tab (A3 - `docs/DIAGNOSTICS.md` Local model health panel) surfaces the resolved base URL, reachability, installed-model count + names, and the daemon version for Ollama, reusing `probeOllama()` / `getOllamaBase()`. Read-only, operator-triggered.
|
|
1120
1334
|
|
|
1121
1335
|
### Spawn
|
|
1122
1336
|
|
|
1123
|
-
`fetch(\`${OLLAMA_URL_BASE}/api/chat\`, { method: 'POST', body: JSON.stringify({ model, messages, stream: true, keep_alive: '10m', tools }) })`. No subprocess; the response is an NDJSON stream.
|
|
1337
|
+
`fetch(\`${OLLAMA_URL_BASE}/api/chat\`, { method: 'POST', body: JSON.stringify({ model, messages, stream: true, keep_alive: '10m', tools }) })`. No subprocess; the response is an NDJSON stream. Fitted image attachments ride the final user message's `images` field when the model reports vision support; otherwise the message contains an image note. Documents and notebooks provide decoded text with source-path labels in Agent tabs and name labels in Chat, while other binaries provide a note.
|
|
1124
1338
|
|
|
1125
|
-
**Image
|
|
1339
|
+
**Image fitting.** `providers/attachments.ts` uses the shared portable decoder
|
|
1340
|
+
for upload copies. It fits images within 2,000 pixels per side and 5 MB base64,
|
|
1341
|
+
including large GIFs. ImageMagick and macOS sips are optional accelerators.
|
|
1342
|
+
Project files and their text references remain unchanged; derived model copies use
|
|
1343
|
+
PNG or JPEG as needed. Managed JPEG and PNG uploads follow the replacement
|
|
1344
|
+
policy below before model fitting. Path-based adapters select a copy through
|
|
1345
|
+
`modelImagePath` or `awaitModelImage`. Claude Native prepares typed attachment
|
|
1346
|
+
content through `readFileContent` directly. See
|
|
1347
|
+
[Native file reads and attachments](#native-file-reads-and-attachments) for
|
|
1348
|
+
formats, document ranges and decoder limits.
|
|
1126
1349
|
|
|
1127
1350
|
`OLLAMA_URL_BASE` defaults to `http://localhost:11434`. Override it with the env var. `settings.ollama.baseUrl` supports DD12 config-value interpolation (`!cmd ...` runs a command; `${ENV}` reads an env var) through `resolveConfigValue`, so the endpoint can be derived at resolve time. `keep_alive` is per request (`'10m'`), long enough for consecutive turns and short enough to return VRAM when a tab is idle; see Quirks.
|
|
1128
1351
|
|
|
@@ -1181,6 +1404,7 @@ The applied `options` envelope is the **single insertion point** and is prefix-c
|
|
|
1181
1404
|
|
|
1182
1405
|
- **Ground truth** is Ollama's `prompt_eval_count` on the `done:true` line (the actual prompt count the daemon saw) → carried on the result event as `lastPromptTokens`.
|
|
1183
1406
|
- **`estimatePromptTokens`** is the forward-looking pre-turn estimate. It **counts tool-call arguments** (a tool-only assistant turn has `content:null` with the whole payload in `tool_calls[].function.arguments` - naïve counting undershoots ~20-30% and the compaction gate goes blind), plus tool results and the advertised tool schemas (sent every turn).
|
|
1407
|
+
- Compaction estimates first apply the serving model's vision support and request image budget. Admitted images use pixel dimensions through the same pure helper as Native context management. Compression size does not alter this visual estimate. Unknown or incomplete headers use a bounded conservative image cost. The daemon's later `prompt_eval_count` remains the measured context figure.
|
|
1184
1408
|
- Reuses the existing `ContextUsageMessage` → CTX bar; the denominator is the per-backend probed `num_ctx` (`OLLAMA_DEFAULT_WINDOW` = 2048 fallback). Context compaction reads `context_usage.percentOfWindow` (post-turn) + `estimatePromptTokens()` (forward-looking) to decide whether to compact.
|
|
1185
1409
|
|
|
1186
1410
|
### Auto-compaction
|
|
@@ -1197,13 +1421,13 @@ The applied `options` envelope is the **single insertion point** and is prefix-c
|
|
|
1197
1421
|
`server/src/providers/ollamaCtxFallback.ts` `planCtxEscalation` - on a detected overflow, re-dispatch to a larger window instead of failing. Builds on multi-backend routing. Emits a `context_window_fallback` `system_notice` (from→to). **Escalate, don't re-compact** - context compaction owns the transcript; this is the escape hatch when even compaction isn't enough or a bigger window exists.
|
|
1198
1422
|
|
|
1199
1423
|
- **Order:** (1) `numctx_bump` - same backend/model, request the **full probed ceiling**, only when it's `>` the failing window; (2) `peer_backend` - a different backend whose probed window for the same model is known-larger.
|
|
1200
|
-
- Reuses multi-backend routing's `contextOverflow` classification (
|
|
1424
|
+
- Reuses multi-backend routing's `contextOverflow` classification (only explicit context-overflow detail in a 400 triggers widening; unrelated 400 errors remain validation failures). Bounded re-dispatch (max 2 hops, `MAX_CTX_ESCALATIONS`, no re-pick), with a mid-stream guard so a re-dispatch can't double-emit.
|
|
1201
1425
|
|
|
1202
1426
|
### Relevant-tool subsetting
|
|
1203
1427
|
|
|
1204
1428
|
`server/src/providers/ollamaToolSubset.ts` (pure) caps the advertised tool catalog so large schema payloads don't degrade small-model tool selection (Hardening 7 - heuristic, no embeddings).
|
|
1205
1429
|
|
|
1206
|
-
- **`OLLAMA_CORE_TOOLS`** = `Read/Grep/Glob/Bash` (+ cluster peer/plan tools when the workflow is a member) - never trimmed. The remainder is ranked by term-overlap relevance against the **stable system-block signal** (not the volatile last message - see prefix-cache invariant in GOTCHAS), capped at **9** (`ARCO_OLLAMA_TOOL_CAP`, floored at the core size).
|
|
1430
|
+
- **`OLLAMA_CORE_TOOLS`** = `Read/Grep/Glob/Bash` (+ cluster peer/plan tools when the workflow is a member) - never trimmed. The remainder is ranked by term-overlap relevance against the **stable system-block signal** (not the volatile last message - see prefix-cache invariant in GOTCHAS), capped at **9** (`ARCO_OLLAMA_TOOL_CAP`, floored at the core size), plus a separate allowance for the advertised cluster coordination tools.
|
|
1207
1431
|
- Computed **once per turn** from a stable signal → byte-identical `tools[]` across turns = prefix-cache-safe. Passthrough below the cap; disable entirely with `ARCO_OLLAMA_TOOL_SUBSET=0`. The chosen subset is logged to `events.jsonl`.
|
|
1208
1432
|
|
|
1209
1433
|
### Capability-gated tool handling
|
|
@@ -1212,6 +1436,7 @@ The applied `options` envelope is the **single insertion point** and is prefix-c
|
|
|
1212
1436
|
|
|
1213
1437
|
- **`resolveToolMode`** gates on the model's probed `tools` capability (`/api/show`): `'native'` (advertise `tools[]`, parse native `tool_calls` - behavior before native tool-call support for capable models), `'fenced'` (inject the protocol, parse fenced blocks), `'none'` (no tools - no cwd / one-shot / structured `format`). Override: `ARCO_OLLAMA_TOOL_MODE = auto|native|fenced`.
|
|
1214
1438
|
- **Protocol.** A ` ```tool ` / ` ~~~tool ` fenced block holding a JSON object, folded **into the system block** (prefix-cache-stable + counted by the context-fill estimator for free - the fenced-prompt text rides every request where native schemas would). `buildFencedToolPrompt` is a **pure** function of the (already-subsetted, already-stable) tool list.
|
|
1439
|
+
- Only explicit `tool` fences or recognized tool-call shapes request an action. Ordinary code and JSON examples remain answer text; malformed explicit tool blocks still return an argument error. `cluster_plan_tick` stays callable because changing a checkbox is a mutation, while plan readers remain injected context.
|
|
1215
1440
|
- Robust parser (fence → brace-slice → key-drift → bare-JSON fallback, with `argError` feedback). Parsed calls reuse the native `dispatchToolCalls` path; results are reframed as labeled `role:'user'` messages. The action-vs-context split: context-reader tools stay prompt-injected rather than exposed as callable tools.
|
|
1216
1441
|
|
|
1217
1442
|
### Model-lifecycle console
|
|
@@ -1233,7 +1458,7 @@ Turns "why did my model unload / why is VRAM full" into visible operator state.
|
|
|
1233
1458
|
|
|
1234
1459
|
`server/src/providers/ollamaUtility.ts` is a **separate, non-streaming, JSON-only, capped** call shape for discrete BACKGROUND jobs - distinct from the interactive `streamOneTurn`. A configurable cheap/small model (e.g. a 3B) runs the context compaction summary (its most important consumer) and, when their operator-armed triggers ship, model-titles + recall summaries - keeping the expensive primary free.
|
|
1235
1460
|
|
|
1236
|
-
**Config (`settings.ollama.utility
|
|
1461
|
+
**Config (`settings.ollama.utility`; set in Settings > Providers and models > Sign-in, accounts and local endpoints, field OLLAMA COMPACTION UTILITY MODEL, or in the settings file):**
|
|
1237
1462
|
|
|
1238
1463
|
```jsonc
|
|
1239
1464
|
"ollama": {
|
|
@@ -1249,7 +1474,7 @@ Turns "why did my model unload / why is VRAM full" into visible operator state.
|
|
|
1249
1474
|
|
|
1250
1475
|
**utility-model summary seam:** `runUtilitySummaryJob({ messages, maxTokens?, framing?, onNotice? }) → Promise<string | null>`. Context compaction passes the **pre-sliced older-half messages** + a cap; this returns the summary text, or `null` when the utility model is unconfigured/failed. **Context compaction supplies the deterministic fallback** (a structural digest) for the `null` case - this seam never invents one, so the "never fails closed" guarantee lives in context compaction.
|
|
1251
1476
|
|
|
1252
|
-
**Pause switch (2026-09-29):** `settings.ollama.utility.enabled: false` (Settings
|
|
1477
|
+
**Pause switch (2026-09-29):** `settings.ollama.utility.enabled: false` (Settings > Providers and models > OLLAMA COMPACTION UTILITY MODEL > ENABLED) makes `resolveUtilityConfig` return null - every job behaves as unconfigured (compaction → deterministic digest, titles skip, the fit calculator reserves nothing) while model/host/titles stay saved. Absent ⇒ enabled. The Settings save path carries `enabled`/`titles` through its whole-object replace (it used to drop them).
|
|
1253
1478
|
|
|
1254
1479
|
**Session titles (opt-in, 2026-09-29):** `settings.ollama.utility.titles: true` (default OFF - arming the utility model for compaction does NOT arm titles) makes `workflows/modelTitles.ts` generate a 5-8-word RESUME-picker title after a workflow's turns: one-shot per session, first ≤4 operator messages, 32-token cap, job `session-title` (visible `system_notice`), applied through `applyModelTitle` (logged to `title-events.jsonl`; an operator rename always outranks). Fire-and-forget after the session-index upsert in `writeMeta`; failure leaves the derived title. Tab labels (`config.name`) are operator-owned and never touched. `npm run test:model-titles`.
|
|
1255
1480
|
|
|
@@ -1305,16 +1530,18 @@ The v1 allowlist (`server/src/providers/ollamaTools.ts`):
|
|
|
1305
1530
|
| Tool | Args | Notes |
|
|
1306
1531
|
|---|---|---|
|
|
1307
1532
|
| `Read` | `file_path`, optional `offset` (1-based start line) / `limit` (max lines) | 32 KB byte cap, refuses directories. Tighter than Claude's 256 KB because local model windows are smaller; chunk via `offset`/`limit` for larger files. |
|
|
1308
|
-
| `Glob` | `pattern`, optional `path` |
|
|
1309
|
-
| `Grep` | `pattern`, optional `path` / `case_insensitive` / `files_only` |
|
|
1533
|
+
| `Glob` | `pattern`, optional `path` | Bounded matching under the cwd or `path`: 1,000 results, 20,000 visited entries or 1,000 milliseconds. Skips ignored folders and nested checkouts; reports results truncated. Individually ignored files and explicit ignored-folder scopes remain searchable. |
|
|
1534
|
+
| `Grep` | `pattern`, optional `path` / `case_insensitive` / `files_only` | JavaScript content search without a ripgrep dependency; supports a single-file `path`. Skips ignored folders and nested checkouts, retaining individually ignored files and explicit ignored-folder scopes. Stops at 5,000 files, 20,000 entries or 1,000 milliseconds; 64 KB output cap and truncation notices. |
|
|
1310
1535
|
| `Write` | `file_path`, `content` | mkdir -p parents, refuses to clobber a directory. |
|
|
1311
|
-
| `Bash` | `command`, optional `description` / `timeout` | `/bin/sh -c` in the workflow cwd. Stdin closed (no hangs). Combined stdout+stderr cap 64 KB, default 60s timeout, hard ceiling 600s. Spawned `detached:true` so timeout / abort / output-cap kills the whole process tree. Footer reminders apply. |
|
|
1536
|
+
| `Bash` | `command`, optional `description` / `timeout` | `/bin/sh -c` (Git Bash on Windows, see `commandShell.ts`; on Windows without Git Bash it is the `PowerShell` tool, as in Claude Code) in the workflow cwd. Stdin closed (no hangs). Combined stdout+stderr cap 64 KB, default 60s timeout, hard ceiling 600s. Spawned `detached:true` so timeout / abort / output-cap kills the whole process tree. Footer reminders apply. |
|
|
1312
1537
|
| `WebSearch` | `query`, optional `max_results` (1-10, default 5) | Hits the operator's local SearXNG instance (`ARCO_SEARXNG_URL`, default `http://127.0.0.1:8888`). Returns a markdown list of `title - url\n snippet`. SearXNG bang syntax (`!g foo`) routes to specific engines. 10s timeout. |
|
|
1313
1538
|
| `WebFetch` | `url`, optional `mode` (`auto` / `fast` / `stealth`) | Fast path: native `fetch()` with browser UA, 10s timeout, HTML→text strip. Stealth path: shells out to `/opt/camoufox/bin/python` (configurable via `ARCO_CAMOUFOX_PYTHON`) and uses Camoufox's `inner_text("body")`, 30s timeout. Auto mode tries fast, falls back to stealth on Cloudflare/403/empty signals. SSRF guard blocks loopback / RFC1918 / link-local hosts (`127.0.0.0/8`, `10/8`, `172.16/12`, `192.168/16`, `169.254/16`, IPv6 loopback / unique-local / link-local). |
|
|
1314
1539
|
|
|
1540
|
+
STOP ends the active local Bash tree. Closing or handing off its tab also ends active local shells and drains tree cleanup and pipe closure for up to 15 seconds. This runtime is shared by Ollama, llama.cpp, LM Studio, Strata and DeepSeek; it does not expose Native's `run_in_background` API. A fully redirected background job whose command has already returned is outside this active-shell tracking.
|
|
1541
|
+
|
|
1315
1542
|
The web tools are the only network-touching ones in v1. SSRF guard is intentional - operators who genuinely need to fetch a localhost URL can use `Bash + curl` in AUTO mode (their explicit choice).
|
|
1316
1543
|
|
|
1317
|
-
**Path validation.**
|
|
1544
|
+
**Path validation.** Arco-managed file tools stay within the project folder and reject links that leave it. Files elsewhere are attached to the message instead of opened through the file tool. Browser file views use a separate allowed-root policy that refuses private folders. That private-folder list does not apply inside project folders, so agent file tools can read project content such as `.claude` or `.codex`. Claude Native also asks before writes to a small set of sensitive targets; that approval is not a read filter. These checks are not a shell sandbox. In AUTO, local-model Bash commands execute; SAFE returns a denial. Provider CLI tools follow their own sandbox and approval settings.
|
|
1318
1545
|
|
|
1319
1546
|
**AUTO vs SAFE.** AUTO mode (`WorkerConfig.skipPermissions = true`) executes tools server-side. SAFE mode (default) returns a denial string the model sees as the tool result, so the loop converges without a new operator-approval protocol surface - the operator can always cancel mid-turn. Per 5.4 design choice (a).
|
|
1320
1547
|
|
|
@@ -1352,7 +1579,7 @@ None. Ollama is a local daemon - Arco just probes `${OLLAMA_URL_BASE}/api/tags`
|
|
|
1352
1579
|
- **Tool-loop cap.** `MAX_TOOL_TURNS = 50` by default (`ARCO_OLLAMA_MAX_TOOL_TURNS`, max 200). A workflow that needs more is suspect; split the task or open an issue.
|
|
1353
1580
|
- **False-final recovery.** Local thinking models sometimes answer with preparation text ("let me check...", "step 1...") and no tool calls. `OllamaWorkerProcess.run()` detects short preparatory-only replies and injects up to two private continuation prompts so the model actually calls tools or gives a real answer.
|
|
1354
1581
|
- **Cluster completion guard.** In cluster member turns, non-director Ollama workers get one bounded continuation if they try to finish without `peer_send`. The coaching prompt tells them to send a concise PASS/FAIL or DONE/BLOCKED report to the assigning peer before ending. This is a deterministic backstop for local models that understand the task but forget the peer-report tool.
|
|
1355
|
-
- **Mid-turn steer.** Operator messages typed while an Ollama tool-loop is running are queued to the steering bucket and delivered at the next iteration boundary - `OllamaWorkerProcess.run` calls `WorkerConfig.drainSteer` after `messages.push(...toolResults)` and before the next `streamOneTurn`, appending each drained item as a `role:'user'` message. Drains the *whole* steering bucket per hook fire (not one-at-a-time); follow-up bucket is untouched and still drains as the merged post-turn turn. Steers landing while the worker is mid-API-call deliver on the *next* iteration - Arco does not abort in-flight calls. Persistence shape is unchanged: the `user_message_echo` with `kind: 'steer'` was emitted at enqueue time in `handleUserMessage`, so transcript replay shows the steer at its enqueue position. The drain-time broadcasts are `queue_update` (
|
|
1582
|
+
- **Mid-turn steer.** Operator messages typed while an Ollama tool-loop is running are queued to the steering bucket and delivered at the next iteration boundary - `OllamaWorkerProcess.run` calls `WorkerConfig.drainSteer` after `messages.push(...toolResults)` and before the next `streamOneTurn`, appending each drained item as a `role:'user'` message. Drains the *whole* steering bucket per hook fire (not one-at-a-time); follow-up bucket is untouched and still drains as the merged post-turn turn. Steers landing while the worker is mid-API-call deliver on the *next* iteration - Arco does not abort in-flight calls. Persistence shape is unchanged: the `user_message_echo` with `kind: 'steer'` was emitted at enqueue time in `handleUserMessage`, so transcript replay shows the steer at its enqueue position. The drain-time broadcasts are `queue_update` (updates PENDING) + `queued_messages_drained` (clears the originator's queued optimistic).
|
|
1356
1583
|
- **Single-slot daemon.** `OLLAMA_NUM_PARALLEL=1` + `OLLAMA_MAX_LOADED_MODELS=1` are required for prefix-cache reliability; concurrent workflows hitting the same daemon will serialize.
|
|
1357
1584
|
- **Polite eviction.** `keep_alive` defaults to `'10m'` per request - long enough that consecutive turns never reload, short enough that walking away from a workflow returns VRAM to other GPU consumers (Resolve, games). Override via daemon-level `OLLAMA_KEEP_ALIVE` env if you want forever-loaded; per-request value still wins.
|
|
1358
1585
|
- **Cache invariance.** Anything that mutates the system prompt, transcript bytes, or `options` between turns flushes the prefix cache. Don't inject timestamps / random ids into system prompts.
|
|
@@ -1388,6 +1615,8 @@ When a retriever lands, it calls `fuseRRF` (`Σ 1/(k+rank)`, `RRF_DEFAULT_K`=60
|
|
|
1388
1615
|
|
|
1389
1616
|
## LM Studio
|
|
1390
1617
|
|
|
1618
|
+
Standard cluster members using LM Studio, Strata or DeepSeek receive the same shared plan, assigned role and coordination instructions as the other local HTTP providers, once each. Blind members keep the existing restricted context and do not receive the shared plan.
|
|
1619
|
+
|
|
1391
1620
|
`server/src/providers/lmstudio.ts`. Pure HTTP, no subprocess - a standalone module that talks LM Studio's **OpenAI-compatible** REST API .
|
|
1392
1621
|
|
|
1393
1622
|
**Standing verdict: OpenAI-compat endpoint, NOT the SDK.** LM Studio is a *runtime* (an Ollama competitor), not a frontend; its app/engine are closed-source and only the client SDKs are public. It exposes an OpenAI-compatible API on `http://localhost:1234/v1` (`/chat/completions`, `/models`, `/embeddings`). Adding it as a configurable OpenAI-compat endpoint reuses Arco's existing HTTP plumbing for near-zero cost - adopting the native `lmstudio.js` `ws://` SDK would add a dependency tracking LM Studio's app version for features Arco already owns (its own tool-loop). It is **not** modeled on llama.cpp's lifecycle-coupled worker either; it's its own module.
|
|
@@ -1569,6 +1798,10 @@ require operator coordination and leave both profiles stopped afterward.
|
|
|
1569
1798
|
|
|
1570
1799
|
## llama.cpp
|
|
1571
1800
|
|
|
1801
|
+
A managed server exit or process error clears ready state; the next request can load a replacement.
|
|
1802
|
+
|
|
1803
|
+
Endpoint overrides in `extraArgs`, including the suggested `--port 8081` fix, use one host and port for listener checks, health polling, loaded state and inference. The final `--host` or `--port` flag wins; malformed port overrides are refused before launch.
|
|
1804
|
+
|
|
1572
1805
|
`server/src/providers/llamacpp.ts` (provider) + `server/src/providers/llamacppManager.ts` (lifecycle) + `server/src/llamacppCatalog.ts` (operator-declared model registry).
|
|
1573
1806
|
|
|
1574
1807
|
Supported in Chat (tools omitted) but rejected for Incognito: the shared daemon always writes `~/.arco/llamacpp.log`.
|
|
@@ -1584,6 +1817,8 @@ Two non-obvious differences from Ollama:
|
|
|
1584
1817
|
1. **Operator-declared model registry, not auto-discovery.** llama-server is one model per process and needs explicit `-m` / `--mmproj` / `-c` / `-ngl` flags. The catalog at `~/.arco/llamacpp.json` names each loadout up front; the lifecycle manager spawns `llama-server` with the right flags on first use.
|
|
1585
1818
|
2. **Arco owns the daemon process.** Ollama runs as its own systemd / homebrew daemon; llama-server is spawned + babysat by Arco. Switching models is SIGTERM old → wait → spawn new. Idle eviction reclaims VRAM after `ARCO_LLAMACPP_KEEPALIVE_MS` (default 10 minutes).
|
|
1586
1819
|
|
|
1820
|
+
Catalog edits and deletions use the version that was reviewed. Duplicate aliases are refused, including renames. If another change wins first, reload the registry and review the pending edit again. A diagnosis fix follows the same rule and does not reload a model when its catalog save conflicts.
|
|
1821
|
+
|
|
1587
1822
|
### Spawn
|
|
1588
1823
|
|
|
1589
1824
|
`POST /v1/chat/completions` with `stream: true`. OpenAI SSE format (not Ollama NDJSON). Workers always go through `llamacppManager.ensureLoaded(alias)` first, which blocks 20-30s on the cold-start of a 17GB GGUF and is a no-op once loaded.
|
|
@@ -1650,7 +1885,7 @@ Same 5 MB cap and `.png/.jpg/.jpeg/.gif/.webp` allowlist as the Ollama path.
|
|
|
1650
1885
|
|
|
1651
1886
|
### Tool runtime
|
|
1652
1887
|
|
|
1653
|
-
Reused from `ollamaTools.ts` - the local-tool runtime (Bash/Read/Write/etc.) is provider-agnostic. AUTO mode executes; SAFE mode returns a denial string the model treats as the tool result so the loop converges without an operator-approval ping-pong. `isKnownOllamaTool()` is a strict allowlist gate; tools the model invents are rejected.
|
|
1888
|
+
Reused from `ollamaTools.ts` - the local-tool runtime (Bash/Read/Write/etc.) is provider-agnostic, and every local provider decides each call through `decideLocalToolCall` in `localToolDispatch.ts` with its own rules. AUTO mode executes; SAFE mode returns a denial string the model treats as the tool result so the loop converges without an operator-approval ping-pong. `isKnownOllamaTool()` is a strict allowlist gate; tools the model invents are rejected.
|
|
1654
1889
|
|
|
1655
1890
|
OpenAI fragment-assembly: tool calls arrive across multiple SSE events, partial by `index`. Reassembled in `partialToolCalls` map, emitted as a single `ToolCall[]` once `finish_reason === 'tool_calls'`.
|
|
1656
1891
|
|
|
@@ -1720,7 +1955,7 @@ The compaction path (context fill) does require a model call. The model summariz
|
|
|
1720
1955
|
|
|
1721
1956
|
## External MCP integrations
|
|
1722
1957
|
|
|
1723
|
-
External MCP servers that Arco surfaces as operator-attachable per-tab options. Unlike the in-process per-cluster MCP server (Cluster + scope), these are operator-installed binaries running on the same machine. Arco's job is the UX (toggle, status, re-index button) + persistence of intent + spawn-time wiring to inject the server entry into the worker's `--mcp-config`.
|
|
1958
|
+
External MCP servers that Arco surfaces as operator-attachable per-tab options. CONFIG > MCP SERVERS is available on Claude Native and CLI, Codex exec and app-server, Cursor Agent, Ollama, llama.cpp, LM Studio, Strata and DeepSeek Agent tabs. The registry list is shared across tabs; enablement and tool choices belong to each tab. Standard and BLIND cluster members have the same controls. Chat tabs and isolated members do not receive configured servers and do not show this section. Unlike the in-process per-cluster MCP server (Cluster + scope), these are operator-installed binaries running on the same machine. Arco's job is the UX (toggle, status, re-index button) + persistence of intent + spawn-time wiring to inject the server entry into the worker's `--mcp-config`.
|
|
1724
1959
|
|
|
1725
1960
|
Each entry below follows the same shape: install path → operator surface → fences → persistence shape.
|
|
1726
1961
|
|
|
@@ -1765,7 +2000,7 @@ Future entries (e.g. operator-installed Linear / Jira MCPs) should follow the sa
|
|
|
1765
2000
|
| Mid-turn cancel | yes (SIGKILL) | yes (loop-abort, in-process) | yes (SIGKILL) | yes (`turn/interrupt` + 5s ack; SIGKILL fallback) | yes (abort fetch) | yes (abort fetch) | yes (abort fetch) |
|
|
1766
2001
|
| Mid-turn steer | post-turn drain | drain hook between tool-result append + next API call | post-turn drain | `turn/steer` RPC (precondition: `expectedTurnId`) | yes (between tool-loop iterations) | yes (between tool-loop iterations) | yes (between tool-loop iterations) |
|
|
1767
2002
|
| Concurrent-writer guard | yes | n/a (Arco-internal session) | no | no | n/a | n/a | n/a |
|
|
1768
|
-
| Auto-handoff support | yes | yes |
|
|
2003
|
+
| Auto-handoff support (after N compactions) | yes (CLI `compact_boundary`) | yes (`native_compacted`; needs auto-compaction) | no (exec reports no compactions) | yes (`contextCompaction` / `thread/compacted`) | yes (durable compaction; needs auto-compaction) | no - in-place auto-recovery instead (context fill / stall / tool-cap / reasoning runaway) | no |
|
|
1769
2004
|
| Server-side context-mgmt | n/a | operator-armed (`compact` OFF by default - CONFIG ADVANCED Claude API compaction (beta) toggle, gated on catalog support; `clear_thinking` / `clear_tool_uses` intentionally off) | n/a | n/a | n/a | n/a | n/a |
|
|
1770
2005
|
| Cluster peer tools | per-spawn stdio MCP child via `--mcp-config` | registered in-process | per-turn stdio MCP child via `-c mcp_servers.*` TOML overrides | per-appserver-process stdio MCP child via `-c mcp_servers.*` TOML overrides | in-process tool registry (`localClusterCapacity`, default 1) | in-process tool registry (`localClusterCapacity`, default 1) | no |
|
|
1771
2006
|
| Chat tabs | yes (+ web) | yes (+ web) | yes (+ web) | yes (+ web) | yes (+ web) | yes (not Incognito) | yes |
|
|
@@ -1819,6 +2054,8 @@ Smoke: `npm run smoke:error-classify` (pure unit - no WS, no server boot).
|
|
|
1819
2054
|
|
|
1820
2055
|
## Provider fallback chains
|
|
1821
2056
|
|
|
2057
|
+
HTTP provider error envelopes retain their status when passed through text results. A 429 can advance to the next configured bounded-job provider; a 413 stays on context recovery, and transient server errors retain their retry classification. Ordinary prose containing an HTTP example does not supply a status.
|
|
2058
|
+
|
|
1822
2059
|
`server/src/providers/fallbackChain.ts` runs a **bounded job** (a reviewer or a
|
|
1823
2060
|
research leg - never a live operator conversation) across an ordered list of
|
|
1824
2061
|
provider "legs". It spawns leg 0; if that leg fails with a classified error
|
|
@@ -1937,3 +2174,155 @@ error.
|
|
|
1937
2174
|
- [Settings](SETTINGS.md)
|
|
1938
2175
|
- [Gotchas](GOTCHAS.md)
|
|
1939
2176
|
- [Documentation style](STYLE.md)
|
|
2177
|
+
|
|
2178
|
+
HANDOFF starts a fresh session and can help when changing to an unrelated task, correcting a worker on a wrong track, switching provider or model, or using a provider without compaction. Compaction is lossy but has no fixed limit. Plans, board, goal, artifacts and Git remain outside the conversation. QUICK builds a deterministic seed; ORIGINAL WORKER writes a reflection; FRESH SUMMARIZER uses a separate worker.
|
|
2179
|
+
|
|
2180
|
+
## Request completion bounds
|
|
2181
|
+
|
|
2182
|
+
OpenAI-compatible generation includes waiting for response headers in its stall deadline. llama.cpp uses the smaller of the recovery stall and turn budgets while recovery is enabled. Discovery keeps its three-second deadline through model-list JSON parsing. WebSearch keeps its deadline and operator cancellation active through JSON parsing.
|
|
2183
|
+
|
|
2184
|
+
OpenAI-compatible streams finish at `[DONE]`; Ollama streams finish at `done: true`, even when the HTTP body remains open. Claude CLI snapshots track text by message and block so repeated snapshots do not hide later blocks or shorter final answers.
|
|
2185
|
+
|
|
2186
|
+
Claude Native token-count telemetry has a five-second deadline and is cancelled by STOP. A cancelled or failed count falls back to response usage so turn completion does not wait on telemetry.
|
|
2187
|
+
|
|
2188
|
+
Claude Native checks MCP session health and launch settings at each turn boundary. Failed or closed sessions reconnect, and a changed command, arguments or environment replaces the previous session. Healthy unchanged sessions stay open.
|
|
2189
|
+
|
|
2190
|
+
FOLD and S-FOLD can restore a saved Claude Native conversation after a server restart, before its next turn. Deterministic Fold replays the saved log without needing provider credentials; Server Fold retains its normal request and fallback behavior.
|
|
2191
|
+
|
|
2192
|
+
Deterministic Fold keeps the newest complete question and answer together, even when that exchange exceeds the tail token target or is the whole saved conversation.
|
|
2193
|
+
|
|
2194
|
+
Claude CLI session watching belongs to the current workflow and session generation. A delayed load from an older reconnect or handoff cannot replay rows or replace a newer watcher.
|
|
2195
|
+
|
|
2196
|
+
Automatic Claude CLI calibration starts only while the same session remains idle. A new primary turn or cancellation during estimation or probe admission prevents a concurrent context probe.
|
|
2197
|
+
|
|
2198
|
+
STOP also revokes a normal message still preparing prompt or file context. It cannot enter a queue or start a provider turn after that cancellation.
|
|
2199
|
+
|
|
2200
|
+
A busy message resolves its selected one-shot skills before entering the queue. The same skill context is delivered once whether the provider consumes it as mid-turn steering or the queue runs it after the turn.
|
|
2201
|
+
|
|
2202
|
+
## Local-model recovery and cluster tools
|
|
2203
|
+
|
|
2204
|
+
A successful larger context window is retained for later tool requests on that backend during the same turn. Peer escalation sends the larger window explicitly. Only identified context-overflow errors trigger widening; other request validation errors retain their original explanation.
|
|
2205
|
+
|
|
2206
|
+
Transient backend failures receive bounded retries even with one backend. DNS lookup failures can use the configured hostname fallback. A rejected structured review synthesis keeps the completed free-text review and reports the fallback.
|
|
2207
|
+
|
|
2208
|
+
Cluster coordination tools have a separate allowance from action tools, so joining a cluster does not remove file-writing and web-research tools. Local-model peer messages can retry with confirm after a status-confirmation response; the first-send guard still applies.
|
|
2209
|
+
|
|
2210
|
+
Claude Native file guards use the same resolved file identity as Read, Write and Edit. A linked project folder or an in-project file alias preserves the partial-read warning and first-edit tracking. Configuration protection checks both the requested name and the resolved target. These checks do not expand which folders file tools may access.
|
|
2211
|
+
|
|
2212
|
+
### Bounded file discovery
|
|
2213
|
+
|
|
2214
|
+
Claude Native and local-model Glob, and JavaScript Grep when used instead of ripgrep, skip Git-ignored directories and nested Git checkouts or worktrees below the search root. Each walk has an entry and time budget; a limited response says "results truncated" and asks for a narrower path or pattern. Individually ignored files and explicitly selected ignored folders stay searchable. Useful hidden folders remain searchable, including explicit `.github/**` patterns. Grep can also target a single file. Selecting a nested checkout itself as the search root searches that checkout normally. Ripgrep keeps its existing Git-ignore behavior and execution limit.
|
|
2215
|
+
|
|
2216
|
+
Claude Native and local-model Glob can return a directory alias for a directory-only pattern such as `src-link/`. The alias must resolve within the project and pass the path checks. Glob does not walk through directory aliases.
|
|
2217
|
+
|
|
2218
|
+
## Reading files and attachments
|
|
2219
|
+
|
|
2220
|
+
Arco's file tools read inside the project folder. Files elsewhere reach the model only when the operator attaches them to the message.
|
|
2221
|
+
|
|
2222
|
+
Arco decodes file contents before sending them to a model. Local providers use
|
|
2223
|
+
this reader for `Read`; Claude CLI, Codex and Cursor can use the read-only
|
|
2224
|
+
`read_file` MCP tool for files in their workflow folder. It fits images,
|
|
2225
|
+
extracts document text and reads notebook cells without extra software.
|
|
2226
|
+
Other binary files produce a named-file note instead of raw bytes.
|
|
2227
|
+
|
|
2228
|
+
The same decoding applies to operator attachments, including Chat tabs that
|
|
2229
|
+
have no file tools. Chat labels attachments by name and restores earlier uploads
|
|
2230
|
+
within the same limits after restart; unavailable uploads require reattachment.
|
|
2231
|
+
Claude Native and Claude CLI send PDF text by default; scanned pages provide fitted images. Agent attachment receipts explain how to request visual pages.
|
|
2232
|
+
|
|
2233
|
+
Larger PDFs send a bounded range and a notice; use `read_file` with `pages` for another range. For layout, charts or figures, use `pdf_mode: "visual"` with an explicit `pages` range. Word, Excel, PowerPoint,
|
|
2234
|
+
OpenDocument and RTF files become text. Other local and CLI transports
|
|
2235
|
+
receive extracted PDF text and fitted scanned-page images.
|
|
2236
|
+
|
|
2237
|
+
Large documents are bounded; use
|
|
2238
|
+
`pages` on `Read` or `read_file` to select PDF pages, spreadsheet sheets,
|
|
2239
|
+
presentation slides or notebook cells, for example `1-3,5`. Text files retain
|
|
2240
|
+
line addressing through `offset` and `limit`.
|
|
2241
|
+
|
|
2242
|
+
Images use the selected transport's native image input. Ollama checks the
|
|
2243
|
+
serving model's reported vision capability for every request. llama.cpp needs
|
|
2244
|
+
both a vision-capable catalog entry and its projector. LM Studio uses native
|
|
2245
|
+
model metadata when available; Strata and DeepSeek use their reported model
|
|
2246
|
+
capabilities. An unknown or text-only model receives a clear image note.
|
|
2247
|
+
MCP image results follow the same capability checks.
|
|
2248
|
+
|
|
2249
|
+
Codex exec, Codex app-server and Claude CLI receive file-reading guidance only
|
|
2250
|
+
when the workflow file server is attached. Chat omits that guidance. Cursor ACP
|
|
2251
|
+
uses its loopback file server in solo tabs too; cluster membership alone without
|
|
2252
|
+
a working folder does not advertise file tools.
|
|
2253
|
+
|
|
2254
|
+
Codex enables its local image tool on both transports. Arco inspects `codex
|
|
2255
|
+
features list`: CLIs advertising `view_image` receive `features.view_image=true`;
|
|
2256
|
+
older CLIs retain `tools.view_image=true`. The probe is cached for one minute. Cursor ACP exposes the
|
|
2257
|
+
file reader in solo and cluster tabs and avoids decoding binary bytes in its
|
|
2258
|
+
text-file callback. Cursor print Agent turns use a temporary read-only file-reader
|
|
2259
|
+
plugin in a private nested temporary folder, which meets Cursor's minimum plugin-path depth. When a workflow identity is supplied, it also exposes only `plan_list`,
|
|
2260
|
+
`plan_ref_list` and `plan_ref_read` through a separate plan server. It receives
|
|
2261
|
+
no plan writers, cluster board tools or configured registry tools. Chat turns
|
|
2262
|
+
omit the project plugin and file-tool guidance while retaining decoded operator
|
|
2263
|
+
attachments. Agent turns keep ask mode and the original workflow folder, and
|
|
2264
|
+
remove the temporary plugin when the subprocess ends. It does not change saved Cursor MCP configuration or
|
|
2265
|
+
approve unrelated MCP servers.
|
|
2266
|
+
|
|
2267
|
+
|
|
2268
|
+
Claude CLI streaming input uses the documented `SDKUserMessage.message`
|
|
2269
|
+
content blocks. Images and PDFs precede the request text. See the
|
|
2270
|
+
[Claude SDK input schema](https://code.claude.com/docs/en/agent-sdk/typescript#sdkusermessage).
|
|
2271
|
+
|
|
2272
|
+
### Public URL files
|
|
2273
|
+
|
|
2274
|
+
Native `read_url`, local `WebFetch` and the read-only `fetch_file` tool in the Claude CLI, Codex and
|
|
2275
|
+
Cursor file servers share the public URL reader. Fetched images become fitted
|
|
2276
|
+
image blocks. PDFs provide selected page text or scanned-page images; Native `read_url` and `fetch_file` accept `pdf_mode: "visual"` with `pages` for selected visual pages. MCP tools return fitted images for visual pages. `pages`, such as `2-4`, also selects supported document ranges.
|
|
2277
|
+
The range selects decoded content; the downloaded source still has a byte cap.
|
|
2278
|
+
|
|
2279
|
+
The direct reader accepts HTTP(S), checks every resolved address and rechecks
|
|
2280
|
+
each redirect before following it. Loopback, private and link-local targets are
|
|
2281
|
+
refused. Text downloads have a 128 KiB budget; media and document sources have
|
|
2282
|
+
the shared 512 MiB limit. The direct request and decoding deadline is 10,000 ms.
|
|
2283
|
+
Cancellation releases the response reader. Local WebFetch can use its existing
|
|
2284
|
+
browser fallback for bot-protected text pages.
|
|
2285
|
+
|
|
2286
|
+
Native `read_url` returns PDF text and scanned-page images by default. Use `pdf_mode: "visual"` with `pages` for selected native PDF pages. It follows
|
|
2287
|
+
Chat web access and the agent tool posture. WEB LOOKUPS / TURN also sets its
|
|
2288
|
+
separate per-turn call cap, including failed attempts; the default is 15.
|
|
2289
|
+
Its image and document results share Native context media limits. Reload keeps
|
|
2290
|
+
the source URL and a receipt so the model can call `read_url` again.
|
|
2291
|
+
|
|
2292
|
+
### Local cluster board tools
|
|
2293
|
+
|
|
2294
|
+
Ollama, llama.cpp, LM Studio, Strata and DeepSeek expose all eleven `cluster_task_*` tools to standard-access cluster members with an attached task board. These tools list, show, create, claim, update, heartbeat, comment, link, unlink, block and submit completion reports through the existing cluster board API. Completion submits to review; done and archived remain operator-only.
|
|
2295
|
+
|
|
2296
|
+
The BOARD mode takes effect on the next turn. Detached boards and BLIND members receive no board tools, and execution repeats those checks. Local execution still requires AUTO mode and a workflow folder. Explicit tool allowlists still apply. Ollama models without native tools use the existing fenced-call protocol. LM Studio history requires the selected model to report `trained_for_tool_use` in its [native model metadata](https://lmstudio.ai/docs/developer/rest/list); false or missing metadata leaves history unattached. This does not change the older server's other tools. Ollama keeps attached board tools in its coordination core, outside relevance trimming; its tool cap grows by the attached coordination-tool count. Native and local providers share the board descriptions and argument schemas.
|
|
2297
|
+
|
|
2298
|
+
### Workflow plan tools on Native and local providers
|
|
2299
|
+
|
|
2300
|
+
Claude Native, Ollama, llama.cpp, LM Studio, Strata and DeepSeek offer `plan_create`, `plan_attach`, `plan_list`, `plan_ref_write`, `plan_ref_list` and `plan_ref_read` in Agent tabs with a workflow folder and identity. These are workflow plan tools, separate from cluster shared-plan tools and Native plan mode. Ordinary Chat tabs and ISOLATED Native members do not receive them. Local execution requires AUTO mode; explicit local tool allowlists still apply.
|
|
2301
|
+
|
|
2302
|
+
The schemas, descriptions, structure checks, reference slug validation and REST operations live in `server/src/planTools.ts`. MCP, Native and local adapters share them. Creating a plan attaches it to the calling workflow; model-supplied arguments cannot replace that identity or its project folder. Replacing a plan body or deleting a plan remains outside this tool family. Ollama ranks these tools as ordinary relevance candidates by default. Plan-related task context or an explicit plan request keeps all six for that turn, adding their count to the normal cap.
|
|
2303
|
+
|
|
2304
|
+
### MCP response media accounting
|
|
2305
|
+
|
|
2306
|
+
The MCP reader retains up to 20 decoded image blocks per tool response; PDF resources are decoded to text and scanned-page images. Encoded text resources use the bounded text path and do not consume that media count. A PDF document block can contain several pages; provider request guards count its actual pages separately. Source decoding remains bounded to 100 response entries and the per-source byte limit.
|
|
2307
|
+
|
|
2308
|
+
### Uploaded image storage
|
|
2309
|
+
|
|
2310
|
+
Uploaded JPEG and PNG files over 1 MiB (1,048,576 bytes) or 2,000 pixels on their long edge are optimized inside Arco's managed uploads folder. A successfully written, decoded and dimension-checked smaller file replaces the larger upload at the same path. The larger uploaded copy is deleted by that replacement; messages, event logs, saved file context and handoff/replay references continue to resolve. Arco does not keep a full-size upload backup.
|
|
2311
|
+
|
|
2312
|
+
Source format determines encoding: JPEG photos stay JPEG at quality 90, retaining EXIF orientation metadata; PNG screenshots stay PNG. PNG pixels are reduced only above the 2,000-pixel edge limit. Images are never enlarged. Files at or below both thresholds stay byte-identical. A failed write, verification or replacement, or an encoded result that is not smaller, leaves the upload untouched.
|
|
2313
|
+
|
|
2314
|
+
Only regular files beneath the managed uploads folder qualify. Symlinked files, links at or inside the uploads folder, escaping realpaths and files outside that folder are refused. A linked parent of the uploads folder is supported. Project images read through Read, file references or a request to inspect a path are never rewritten, replaced or deleted, and no copy is written beside them. PDF, Word and other non-image uploads are unchanged. Other image formats retain the existing model-copy behavior without replacing their uploaded originals.
|
|
2315
|
+
|
|
2316
|
+
Animated and 16-bit PNG uploads remain unchanged. The smaller copy keeps the picture, but PNG text chunks and colour profiles, and JPEG metadata other than EXIF, are not carried over.
|
|
2317
|
+
|
|
2318
|
+
Model fitting does not enlarge images. JPEG, PNG, GIF and WebP uploads that already fit the 2,000-pixel edge and 3.75 MiB model byte limits need no model-copy sibling; optional image converters are checked against the source dimensions.
|
|
2319
|
+
|
|
2320
|
+
### Earlier conversations after a handoff
|
|
2321
|
+
|
|
2322
|
+
Successful Handoff and Spawn operations save their source conversation and the event boundary used for the transfer. The latest seed and HANDOFFS panel show **From** and earlier sources. Opening one selects or reopens that conversation in HISTORY, limited to the recorded boundary; **Show full history** removes that display filter. A source request opens the side panel from a closed narrow drawer or focus mode. Closing a tab preserves the source. Deleted or archived sources remain unavailable until a retained archive is restored through Storage.
|
|
2323
|
+
|
|
2324
|
+
Source links survive restart and chains of handoffs, including a handoff within the same tab. Chat, incognito, BLIND and ISOLATED conversations do not receive these links. The links contain references, not copied transcripts. Eligible agents on Claude Native, Claude CLI, Codex exec and app-server, Cursor print and ACP, and local providers can use `handoff_history` to list, search and read their earlier conversation chain. CLI and Codex expose it through the workflow MCP server; Cursor uses its reader plugin or loopback server. Local providers keep it in the advertised subset when attached. Explicit tool allowlists still apply. Ollama models without native tools use the existing fenced-call protocol. LM Studio history requires the selected model to report `trained_for_tool_use` in its [native model metadata](https://lmstudio.ai/docs/developer/rest/list); false or missing metadata leaves history unattached. This does not change the older server's other tools. The tool and its availability block are rebuilt on ordinary turns and after compaction or model changes; Chat, incognito, BLIND and ISOLATED remain excluded.
|
|
2325
|
+
|
|
2326
|
+
`handoff_history` accepts `sources`, `list`, `search` and `read`. Source keys come from `sources`; turn ids come from `list` or `search`. Search is literal, case-insensitive and excludes tool calls/results unless `include_tools` is true. A no-match result explains that exclusion. Returned history is labelled as earlier conversation, not instructions.
|
|
2327
|
+
|
|
2328
|
+
Responses contain at most 20 turns and 24 KiB of JSON. Each text chunk is at most 8 KiB; repeat the same arguments with the returned cursor to continue a long turn or page. Previews are capped at 512 bytes. Binary payloads and reasoning events are excluded. The underlying reader may buffer existing log records, including oversized ones; these limits bound returned content, not internal log-reading memory. HANDOFFS reads availability from the server even when a reload loads only recent turns and omits the seed.
|