arco-workbench 0.2.2 → 0.2.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 +1 -1
- package/THIRD_PARTY_NOTICES +2 -2
- package/client/dist/assets/{PhosphorBackdrop-BbR3xmfD.js → PhosphorBackdrop-CLILIwOQ.js} +1 -1
- package/client/dist/assets/{ThemedBackgroundShaderImpl-UMjbs9ZN.js → ThemedBackgroundShaderImpl-B87chcb5.js} +1 -1
- package/client/dist/assets/{XtermView-n135qz-f.js → XtermView-BP_j7WSN.js} +1 -1
- package/client/dist/assets/{galleryEditor-CFSke4by.js → galleryEditor-B90phoBI.js} +1 -1
- package/client/dist/assets/{index-DeoJbjI3.js → index-BfPp1Oup.js} +270 -270
- package/client/dist/index.html +1 -1
- package/client/dist/manifest-mobile.webmanifest +1 -0
- package/client/src/App.tsx +2 -2
- package/client/src/components/AuthReloginNotice.tsx +7 -6
- package/client/src/components/ChatMessage.tsx +41 -29
- package/client/src/components/ChatPanel.tsx +17 -4
- package/client/src/components/ClaudeNativeAccountPicker.tsx +32 -0
- package/client/src/components/ClaudeNativeAuthRow.tsx +71 -19
- package/client/src/components/ClusterRightPanel/AddWorkerSection.tsx +11 -281
- package/client/src/components/ClusterRightPanel/AutoPickupControl.tsx +1 -1
- package/client/src/components/ClusterRightPanel/FreshMemberForm.tsx +315 -0
- package/client/src/components/ClusterRightPanel/ReplaceMemberDialog.tsx +17 -7
- package/client/src/components/ClusterRightPanel/index.tsx +1 -1
- package/client/src/components/ClusterRightPanel/useFreshMemberPicker.ts +6 -4
- package/client/src/components/ClusterTab.tsx +2 -2
- package/client/src/components/Connections/Connections.tsx +7 -11
- package/client/src/components/Connections/model.ts +3 -1
- package/client/src/components/FileViewerModal.tsx +54 -17
- package/client/src/components/GitHubPanel/index.tsx +9 -5
- package/client/src/components/HandoffDialog.tsx +5 -3
- package/client/src/components/MobileShell.tsx +1 -33
- package/client/src/components/OperatorQuestionNotice.tsx +5 -4
- package/client/src/components/ProvidersPopover.tsx +6 -2
- package/client/src/components/RightPanel/ActivityTab.tsx +2 -1
- package/client/src/components/RightPanel/ConfigTab.tsx +23 -5
- package/client/src/components/RightPanel/OutputsPanel.tsx +21 -9
- package/client/src/components/RightPanel/outputsReconcile.ts +31 -0
- package/client/src/components/SettingsPanel.tsx +7 -10
- package/client/src/components/SpawnDialog.tsx +14 -3
- package/client/src/components/TabBar.tsx +2 -2
- package/client/src/components/TabContextMenu.tsx +73 -133
- package/client/src/components/TerminalInput.tsx +4 -3
- package/client/src/components/TranscriptWorkerDialog.tsx +14 -4
- package/client/src/components/UsageBar.tsx +37 -18
- package/client/src/components/WorkflowCreator/ClusterMembersSection.tsx +29 -3
- package/client/src/components/WorkflowCreator/index.tsx +29 -15
- package/client/src/components/WorkflowView.tsx +1 -1
- package/client/src/components/providerIndicator.ts +7 -3
- package/client/src/components/research/QuickResearchOverview.tsx +7 -3
- package/client/src/components/research/SavedQuickKeep.tsx +7 -3
- package/client/src/components/settings/GitHubAuthRow.tsx +34 -0
- package/client/src/explorer/ArtifactsLens.tsx +17 -8
- package/client/src/explorer/ExplorerApp.tsx +3 -3
- package/client/src/explorer/types.ts +3 -1
- package/client/src/help/content/cluster.tsx +10 -4
- package/client/src/help/content/composer.tsx +3 -2
- package/client/src/help/content/header.tsx +6 -3
- package/client/src/help/content/misc.tsx +9 -7
- package/client/src/help/content/rightPanel.tsx +11 -6
- package/client/src/help/content/settings.tsx +14 -3
- package/client/src/help/content/tabbar.tsx +1 -1
- package/client/src/help/manualSections/actions.tsx +5 -1
- package/client/src/help/manualSections/clusters.tsx +21 -15
- package/client/src/help/manualSections/configuration.tsx +6 -4
- package/client/src/help/manualSections/gettingStarted.tsx +4 -2
- package/client/src/help/manualSections/maintenance.tsx +24 -0
- package/client/src/help/manualSections/powerFeatures.tsx +4 -2
- package/client/src/help/manualSections/providers.tsx +11 -4
- package/client/src/help/manualSections/workspace.tsx +3 -3
- package/client/src/hooks/useClaudeNativeCatalog.ts +26 -0
- package/client/src/hooks/useClaudeNativeLogin.ts +16 -11
- package/client/src/hooks/useWebSocket.ts +4 -2
- package/client/src/layout/layoutRange.ts +14 -5
- package/client/src/main.tsx +2 -0
- package/client/src/questions/waitingQuestion.ts +2 -0
- package/client/src/stores/appStore.ts +5 -1
- package/client/src/stores/appStore.types.ts +2 -0
- package/client/src/stores/replayContext.ts +20 -0
- package/client/src/utils/chatFileLinks.ts +34 -3
- package/client/src/utils/claudeAuth.ts +9 -1
- package/client/src/ws/handleServerMessage.ts +11 -3
- package/docs/ARCHITECTURE.md +3 -3
- package/docs/BACKUP.md +1 -1
- package/docs/CHECKPOINTS.md +67 -3
- package/docs/CLIENT.md +11 -6
- package/docs/EXTENDING.md +1 -1
- package/docs/FEATURES.md +3 -3
- package/docs/GETTING_STARTED.md +5 -4
- package/docs/GIT_WORKBENCH.md +8 -0
- package/docs/GLOSSARY.md +2 -2
- package/docs/GOTCHAS.md +4 -4
- package/docs/HTTP_API.md +63 -30
- package/docs/OPERATIONS.md +11 -0
- package/docs/OPERATOR_ACTIONS.md +2 -2
- package/docs/OUTPUTS.md +48 -6
- package/docs/PERSISTENCE.md +1 -1
- package/docs/PRIMITIVES.md +4 -2
- package/docs/PROTOCOL_CLUSTER.md +12 -6
- package/docs/PROTOCOL_PRIMITIVES.md +1 -1
- package/docs/PROVIDERS.md +47 -10
- package/docs/RESEARCH.md +3 -3
- package/docs/SETTINGS.md +9 -4
- package/node_modules/@arco/shared/dist/protocol/clusters.d.ts +15 -3
- package/node_modules/@arco/shared/dist/protocol/clusters.js +1 -1
- package/node_modules/@arco/shared/dist/protocol/models.d.ts +6 -1
- package/node_modules/@arco/shared/dist/protocol/operatorQuestions.d.ts +2 -1
- package/node_modules/@arco/shared/dist/protocol/settings.d.ts +3 -0
- package/node_modules/@arco/shared/dist/protocol/settings.js +5 -0
- package/node_modules/@arco/shared/dist/protocol/workflows.d.ts +1 -0
- package/node_modules/@arco/shared/dist/protocol/workflows.js +0 -2
- package/node_modules/@arco/shared/package.json +1 -1
- package/package.json +2 -2
- package/scripts/packaging/services.mjs +20 -1
- package/scripts/packaging/update.mjs +37 -2
- package/server/dist/attention.d.ts +6 -0
- package/server/dist/attention.js +6 -0
- package/server/dist/auth.d.ts +5 -0
- package/server/dist/auth.js +31 -20
- package/server/dist/clusterAutoTurn.d.ts +5 -1
- package/server/dist/clusterAutoTurn.js +31 -9
- package/server/dist/clusterPresets.js +3 -3
- package/server/dist/effortValidation.d.ts +2 -2
- package/server/dist/effortValidation.js +4 -4
- package/server/dist/explorerArtifacts.d.ts +1 -0
- package/server/dist/explorerArtifacts.js +12 -1
- package/server/dist/explorerDocs.d.ts +1 -0
- package/server/dist/explorerDocs.js +4 -4
- package/server/dist/geminiMembers.d.ts +7 -1
- package/server/dist/geminiMembers.js +28 -14
- package/server/dist/gitSnapshots.d.ts +1 -0
- package/server/dist/gitSnapshots.js +547 -83
- package/server/dist/http/clusterRoutes.js +9 -3
- package/server/dist/http/conversationFiles.d.ts +36 -0
- package/server/dist/http/conversationFiles.js +222 -0
- package/server/dist/http/fileBytes.d.ts +3 -0
- package/server/dist/http/fileBytes.js +33 -0
- package/server/dist/http/fileContentRoute.d.ts +2 -0
- package/server/dist/http/fileContentRoute.js +139 -0
- package/server/dist/http/fileRead.d.ts +54 -2
- package/server/dist/http/fileRead.js +31 -24
- package/server/dist/http/outputRoutes.js +14 -21
- package/server/dist/http/readConfinement.d.ts +0 -11
- package/server/dist/http/readConfinement.js +4 -30
- package/server/dist/http/router.js +41 -66
- package/server/dist/index.js +26 -12
- package/server/dist/management/initHubLink.js +1 -1
- package/server/dist/outputs.js +8 -0
- package/server/dist/primitives/exportContext.d.ts +2 -0
- package/server/dist/primitives/exportContext.js +13 -2
- package/server/dist/primitives/runCompare.d.ts +7 -1
- package/server/dist/primitives/runCompare.js +44 -20
- package/server/dist/project/taskLedger.js +46 -34
- package/server/dist/providerAccounts.d.ts +4 -0
- package/server/dist/providerAccounts.js +20 -1
- package/server/dist/providers/antigravity/artifacts.d.ts +23 -0
- package/server/dist/providers/antigravity/artifacts.js +140 -0
- package/server/dist/providers/antigravity/index.js +85 -7
- package/server/dist/providers/antigravity/questions.d.ts +2 -0
- package/server/dist/providers/antigravity/questions.js +58 -0
- package/server/dist/providers/claude-native/auth.d.ts +9 -8
- package/server/dist/providers/claude-native/auth.js +50 -58
- package/server/dist/providers/claude-native/authStatus.d.ts +2 -2
- package/server/dist/providers/claude-native/authStatus.js +9 -7
- package/server/dist/providers/claude-native/catalog.d.ts +6 -5
- package/server/dist/providers/claude-native/catalog.js +50 -39
- package/server/dist/providers/claude-native/oauth.d.ts +10 -9
- package/server/dist/providers/claude-native/oauth.js +120 -96
- package/server/dist/providers/claude-native/worker.d.ts +1 -0
- package/server/dist/providers/claude-native/worker.js +38 -23
- package/server/dist/providers/codex-appserver/operatorQuestions.d.ts +5 -3
- package/server/dist/providers/codex-appserver/operatorQuestions.js +27 -13
- package/server/dist/providers/codexChatBoundary.js +6 -1
- package/server/dist/research/quickPromotion.d.ts +3 -0
- package/server/dist/research/quickPromotion.js +26 -9
- package/server/dist/research/savedQuickPromotion.js +2 -11
- package/server/dist/server/broadcast.js +6 -0
- package/server/dist/settings.d.ts +1 -0
- package/server/dist/settings.js +39 -7
- package/server/dist/skills.js +1 -1
- package/server/dist/smartPickupAdapters.d.ts +1 -0
- package/server/dist/smartPickupAdapters.js +2 -2
- package/server/dist/smartPickupObserver.js +8 -5
- package/server/dist/thirdPartySkills.js +11 -5
- package/server/dist/turnChanges.d.ts +1 -1
- package/server/dist/turnChanges.js +5 -4
- package/server/dist/usage.d.ts +1 -1
- package/server/dist/usage.js +39 -27
- package/server/dist/workers/WorkerManager.d.ts +1 -0
- package/server/dist/workers/WorkerManager.js +1 -0
- package/server/dist/workers/processKill.js +37 -24
- package/server/dist/workflowMeta.js +2 -2
- package/server/dist/ws/clusterHandlers.d.ts +2 -2
- package/server/dist/ws/clusterHandlers.js +127 -113
- package/server/dist/ws/clusterMembers.d.ts +1 -1
- package/server/dist/ws/clusterMembers.js +34 -4
- package/server/dist/ws/compactHandlers.js +30 -14
- package/server/dist/ws/compareHandlers.js +53 -21
- package/server/dist/ws/gateHandlers.js +2 -0
- package/server/dist/ws/genesisHandlers.js +5 -3
- package/server/dist/ws/handoffHandlers.d.ts +1 -1
- package/server/dist/ws/handoffHandlers.js +115 -39
- package/server/dist/ws/transcriptWorkerHandlers.js +7 -2
- package/server/dist/ws/turnEngine.js +37 -19
- package/server/dist/ws/updatePrimaryConfig.d.ts +3 -2
- package/server/dist/ws/updatePrimaryConfig.js +236 -133
- package/server/dist/ws/workflowHandlers.js +21 -4
- package/server/package.json +1 -1
- package/server/src/attention.ts +7 -0
- package/server/src/auth.ts +33 -20
- package/server/src/clusterAutoTurn.ts +31 -11
- package/server/src/clusterPresets.ts +2 -2
- package/server/src/effortValidation.ts +4 -4
- package/server/src/explorerArtifacts.ts +12 -1
- package/server/src/explorerDocs.ts +5 -5
- package/server/src/geminiMembers.ts +26 -15
- package/server/src/gitSnapshots.ts +538 -82
- package/server/src/http/clusterRoutes.ts +10 -3
- package/server/src/http/conversationFiles.ts +231 -0
- package/server/src/http/fileBytes.ts +34 -0
- package/server/src/http/fileContentRoute.ts +123 -0
- package/server/src/http/fileRead.ts +30 -25
- package/server/src/http/outputRoutes.ts +13 -13
- package/server/src/http/readConfinement.ts +3 -30
- package/server/src/http/router.ts +39 -62
- package/server/src/index.ts +27 -18
- package/server/src/management/initHubLink.ts +1 -1
- package/server/src/outputs.ts +8 -0
- package/server/src/primitives/exportContext.ts +14 -2
- package/server/src/primitives/runCompare.ts +73 -46
- package/server/src/project/taskLedger.ts +47 -30
- package/server/src/providerAccounts.ts +20 -1
- package/server/src/providers/antigravity/artifacts.ts +121 -0
- package/server/src/providers/antigravity/index.ts +64 -6
- package/server/src/providers/antigravity/questions.ts +52 -0
- package/server/src/providers/claude-native/auth.ts +45 -60
- package/server/src/providers/claude-native/authStatus.ts +9 -8
- package/server/src/providers/claude-native/catalog.ts +52 -35
- package/server/src/providers/claude-native/oauth.ts +101 -77
- package/server/src/providers/claude-native/worker.ts +38 -22
- package/server/src/providers/codex-appserver/operatorQuestions.ts +26 -12
- package/server/src/providers/codexChatBoundary.ts +6 -1
- package/server/src/research/quickPromotion.ts +24 -6
- package/server/src/research/savedQuickPromotion.ts +2 -8
- package/server/src/server/broadcast.ts +4 -0
- package/server/src/settings.ts +36 -8
- package/server/src/skills.ts +1 -1
- package/server/src/smartPickupAdapters.ts +3 -2
- package/server/src/smartPickupObserver.ts +8 -5
- package/server/src/thirdPartySkills.ts +11 -5
- package/server/src/turnChanges.ts +5 -4
- package/server/src/usage.ts +30 -22
- package/server/src/workers/WorkerManager.ts +2 -0
- package/server/src/workers/processKill.ts +37 -23
- package/server/src/workflowMeta.ts +2 -2
- package/server/src/ws/clusterHandlers.ts +107 -104
- package/server/src/ws/clusterMembers.ts +25 -6
- package/server/src/ws/compactHandlers.ts +29 -15
- package/server/src/ws/compareHandlers.ts +59 -25
- package/server/src/ws/gateHandlers.ts +2 -0
- package/server/src/ws/genesisHandlers.ts +5 -4
- package/server/src/ws/handoffHandlers.ts +105 -37
- package/server/src/ws/transcriptWorkerHandlers.ts +6 -2
- package/server/src/ws/turnEngine.ts +36 -18
- package/server/src/ws/updatePrimaryConfig.ts +230 -132
- package/server/src/ws/workflowHandlers.ts +20 -4
- package/shared/dist/protocol/clusters.d.ts +15 -3
- package/shared/dist/protocol/clusters.js +1 -1
- package/shared/dist/protocol/models.d.ts +6 -1
- package/shared/dist/protocol/operatorQuestions.d.ts +2 -1
- package/shared/dist/protocol/settings.d.ts +3 -0
- package/shared/dist/protocol/settings.js +5 -0
- package/shared/dist/protocol/workflows.d.ts +1 -0
- package/shared/dist/protocol/workflows.js +0 -2
- package/shared/src/protocol/clusters.ts +23 -5
- package/shared/src/protocol/compare.ts +2 -2
- package/shared/src/protocol/models.ts +8 -4
- package/shared/src/protocol/operatorQuestions.ts +2 -1
- package/shared/src/protocol/settings.ts +8 -1
- package/shared/src/protocol/workflows.ts +1 -1
|
@@ -29,7 +29,8 @@ import { createCheckpoint } from '../gitSnapshots.js';
|
|
|
29
29
|
import { summarizeTurnChanges, timelyCheckpoint, shouldCaptureTurn } from '../turnChanges.js';
|
|
30
30
|
import { isManagedBakeoffWorktree } from '../gitBakeoff.js';
|
|
31
31
|
import * as clusterMailbox from '../clusterMailbox.js';
|
|
32
|
-
import
|
|
32
|
+
import * as clusterAutoTurn from '../clusterAutoTurn.js';
|
|
33
|
+
import { consumeGeminiSend, geminiClusterInstructions, geminiPickupAllowed, geminiSendValid, GEMINI_OPERATOR_ONLY_REFUSAL, isGeminiMember } from '../geminiMembers.js';
|
|
33
34
|
import { setTurnOrigin } from '../clusterTurnOrigin.js';
|
|
34
35
|
import * as clusterPlanBridge from '../clusterPlanBridge.js';
|
|
35
36
|
import { clusterToolsPending, CLUSTER_TOOLS_PENDING_NOTICE, CLUSTER_TOOLS_PENDING_AGENT } from '../clusterTurnTools.js';
|
|
@@ -343,7 +344,7 @@ export function startSessionWatcher(workflowId, wf, cwd, initialWs) {
|
|
|
343
344
|
});
|
|
344
345
|
}
|
|
345
346
|
export function derivePrimaryConfig(config) {
|
|
346
|
-
config.primaryEffort = normalizedWorkflowEffort(config.primaryProvider, config.primaryModel, config.primaryEffort);
|
|
347
|
+
config.primaryEffort = normalizedWorkflowEffort(config.primaryProvider, config.primaryModel, config.primaryEffort, config.providerAccountRef);
|
|
347
348
|
return {
|
|
348
349
|
provider: config.primaryProvider ?? 'claude',
|
|
349
350
|
model: config.primaryModel,
|
|
@@ -860,7 +861,7 @@ export async function autoHandoffAvailableFor(workflowId, wf, cwd, cascade) {
|
|
|
860
861
|
});
|
|
861
862
|
}
|
|
862
863
|
export function freshAutoCompactionPercent(provider, transport, outcome) {
|
|
863
|
-
if (outcome.error || !((provider === 'claude' && transport === 'native') || (provider === 'codex' && transport === 'appserver')))
|
|
864
|
+
if (outcome.error || !(provider === 'antigravity-cli' || (provider === 'claude' && transport === 'native') || (provider === 'codex' && transport === 'appserver')))
|
|
864
865
|
return undefined;
|
|
865
866
|
const numerator = outcome.lastPromptTokens;
|
|
866
867
|
const denominator = provider === 'codex' ? outcome.freshContextWindow : outcome.modelContextWindow;
|
|
@@ -878,9 +879,16 @@ export async function maybeAutoCompactPolicy(workflowId, wf, cwd, policy, readin
|
|
|
878
879
|
return false;
|
|
879
880
|
if (reading.provider !== wf.primary.provider || reading.sessionId !== wf.primarySessionId)
|
|
880
881
|
return false;
|
|
881
|
-
|
|
882
|
+
const gemini = reading.provider === 'antigravity-cli';
|
|
883
|
+
if (reading.provider !== 'claude' && reading.provider !== 'codex' && !gemini)
|
|
882
884
|
return false;
|
|
883
|
-
if (reading.provider === 'codex' && !reading.sessionId)
|
|
885
|
+
if ((reading.provider === 'codex' || gemini) && !reading.sessionId)
|
|
886
|
+
return false;
|
|
887
|
+
const isFencedGemini = () => {
|
|
888
|
+
const clusterId = clusterStore.getClusterIdForWorkflow(workflowId);
|
|
889
|
+
return gemini && !!clusterId && isIsolatedAccessMode(clusterStore.getMemberAccessMode(clusterId, workflowId));
|
|
890
|
+
};
|
|
891
|
+
if (isFencedGemini())
|
|
884
892
|
return false;
|
|
885
893
|
let state = policyAttempts.get(wf);
|
|
886
894
|
if (!state || state.sessionId !== reading.sessionId || state.provider !== reading.provider) {
|
|
@@ -916,11 +924,13 @@ export async function maybeAutoCompactPolicy(workflowId, wf, cwd, policy, readin
|
|
|
916
924
|
if (reading.provider === 'claude' && reading.transport && await resolveClaudeTransport(wf, cwd) !== reading.transport)
|
|
917
925
|
return false;
|
|
918
926
|
const current = resolveProviderAutoCompaction(wf.config.autoCompaction, clusterId ? clusterStore.getAutoCompaction(clusterId) : undefined, wf.primary.provider, reading.transport ?? (wf.primary.provider === 'claude' ? 'native' : ''), wf.config.claudeNativeCompact === true);
|
|
919
|
-
if (wf.busy || lastBusyClaim.get(wf) !== observedClaim || wf.primarySessionId !== reading.sessionId || wf.primary.provider !== reading.provider || !current?.enabled || current.thresholdPercent !== policy.thresholdPercent)
|
|
927
|
+
if (isFencedGemini() || wf.busy || lastBusyClaim.get(wf) !== observedClaim || wf.primarySessionId !== reading.sessionId || wf.primary.provider !== reading.provider || !current?.enabled || current.thresholdPercent !== policy.thresholdPercent)
|
|
920
928
|
return false;
|
|
921
929
|
return claim();
|
|
922
930
|
}, `context ${reading.percent}% >= ${policy.thresholdPercent}%`, () => {
|
|
923
|
-
|
|
931
|
+
// The CLI may accept /compact without confirming a smaller retained
|
|
932
|
+
// context. Require a fresh drop before another Gemini attempt.
|
|
933
|
+
if (!gemini && policyAttempts.get(wf) === state) {
|
|
924
934
|
state.fired = false;
|
|
925
935
|
state.awaitingReading = true;
|
|
926
936
|
}
|
|
@@ -1367,13 +1377,15 @@ opts) {
|
|
|
1367
1377
|
return;
|
|
1368
1378
|
}
|
|
1369
1379
|
// docs/PROTOCOL_CLUSTER.md "Gemini members": a Gemini member turn needs the
|
|
1370
|
-
// single-use ticket
|
|
1371
|
-
//
|
|
1372
|
-
//
|
|
1380
|
+
// single-use ticket for this member and this exact text, checked here and
|
|
1381
|
+
// again when queued input is taken. Other Antigravity turns accept only
|
|
1382
|
+
// operator messages.
|
|
1373
1383
|
const geminiMember = wf.primary.provider === 'antigravity-cli' && isGeminiMember(workflowId);
|
|
1374
|
-
const antigravityInputOk = (item, check) =>
|
|
1375
|
-
? (!item.automaticKind || item.automaticKind === 'nudge')
|
|
1376
|
-
|
|
1384
|
+
const antigravityInputOk = (item, check) => geminiMember
|
|
1385
|
+
? ((item.operatorInitiated === true && (!item.automaticKind || item.automaticKind === 'nudge'))
|
|
1386
|
+
|| (item.automaticKind === 'auto-pickup' && geminiPickupAllowed(workflowId)))
|
|
1387
|
+
&& check(item.geminiSend, workflowId, item.content)
|
|
1388
|
+
: item.operatorInitiated === true && !item.automaticKind;
|
|
1377
1389
|
const queuedOperatorInput = fromQueue && [...wf.queue.steering, ...wf.queue.followUp].length > 0
|
|
1378
1390
|
&& [...wf.queue.steering, ...wf.queue.followUp].every(item => antigravityInputOk(item, geminiSendValid));
|
|
1379
1391
|
const directOperatorInput = !fromQueue && antigravityInputOk({ operatorInitiated: opts?.operatorInitiated, automaticKind: opts?.automaticKind, geminiSend: opts?.geminiSend, content }, geminiSendValid);
|
|
@@ -2638,6 +2650,10 @@ opts) {
|
|
|
2638
2650
|
// the sync modelImagePath() and can't wait themselves.
|
|
2639
2651
|
if (promptAttachments && promptAttachments.length > 0)
|
|
2640
2652
|
await awaitModelImages(promptAttachments);
|
|
2653
|
+
const geminiWake = opts?.automaticKind === 'nudge' || opts?.automaticKind === 'auto-pickup';
|
|
2654
|
+
const firstMemberRole = geminiMember && memberClusterId && !wf.primarySessionId && !geminiWake
|
|
2655
|
+
&& clusterStore.getMemberAccessMode(memberClusterId, workflowId) === 'standard'
|
|
2656
|
+
? await geminiClusterInstructions(memberClusterId, workflowId) : '';
|
|
2641
2657
|
// STOP landed during the pre-spawn awaits above (killAll had nothing to
|
|
2642
2658
|
// kill yet). Spawning now would run a turn nobody owns.
|
|
2643
2659
|
if (!ownsBusy(wf, busyToken))
|
|
@@ -2659,7 +2675,10 @@ opts) {
|
|
|
2659
2675
|
if (!(firstIteration && primitive === 'plan-review') && shouldCaptureTurn({ chatMode, planMode: armPlanMode, isolated: isolatedMember, provider: wf.primary.provider, tools: wf.primary.tools })) {
|
|
2660
2676
|
checkpointGuardSeq = currentWorkflowSeq(cwd, workflowId);
|
|
2661
2677
|
activeTurnObservation = observeCheckoutWriters(workflowWritePaths(wf), wf.manager);
|
|
2662
|
-
|
|
2678
|
+
// A capture that misses the cutoff is cancelled, so it neither keeps
|
|
2679
|
+
// working in the background nor publishes an undo point later.
|
|
2680
|
+
const lateCapture = new AbortController();
|
|
2681
|
+
checkpoint = await timelyCheckpoint((deps.captureCheckpoint ?? createCheckpoint)({ cwd, workflowId, seq: checkpointGuardSeq, onSkipped: onCheckpointSkipped, signal: lateCapture.signal }), 2000, () => lateCapture.abort());
|
|
2663
2682
|
if (!checkpoint || !ownsBusy(wf, busyToken)) {
|
|
2664
2683
|
activeTurnObservation.stop();
|
|
2665
2684
|
activeTurnObservation = undefined;
|
|
@@ -2698,8 +2717,8 @@ opts) {
|
|
|
2698
2717
|
}
|
|
2699
2718
|
});
|
|
2700
2719
|
const dispatchCurrent = () => workflows.get(workflowId) === wf && ownsBusy(wf, busyToken) && (dispatchedWorkerId === undefined || primaryTurn.workerId === dispatchedWorkerId);
|
|
2701
|
-
const geminiSkills = wf.primary.provider === 'antigravity-cli' && (!memberClusterId ||
|
|
2702
|
-
const geminiAdditions = [visibleGeminiPlan, geminiSkills].filter(Boolean).join('\n\n');
|
|
2720
|
+
const geminiSkills = wf.primary.provider === 'antigravity-cli' && (!memberClusterId || !geminiWake) && !wf.primarySessionId ? primarySkillsManifest : '';
|
|
2721
|
+
const geminiAdditions = [firstMemberRole, visibleGeminiPlan, geminiSkills].filter(Boolean).join('\n\n');
|
|
2703
2722
|
if (geminiAdditions && dispatchCurrent())
|
|
2704
2723
|
broadcastWorkflow(workflowId, { type: 'system_notice', workflowId, content: geminiAdditions });
|
|
2705
2724
|
const turn = runPrimaryTurn({
|
|
@@ -2777,7 +2796,7 @@ opts) {
|
|
|
2777
2796
|
},
|
|
2778
2797
|
codexTransport,
|
|
2779
2798
|
codexContextPolicy: wf.config.codexContextPolicy,
|
|
2780
|
-
providerAccountRef: providerAccount?.profile.id,
|
|
2799
|
+
providerAccountRef: claudeTransport === 'native' ? wf.config.providerAccountRef : providerAccount?.profile.id,
|
|
2781
2800
|
codexHome: providerAccount?.codexHome,
|
|
2782
2801
|
claudeTransport,
|
|
2783
2802
|
ultracode,
|
|
@@ -2932,6 +2951,7 @@ opts) {
|
|
|
2932
2951
|
}).catch((error) => console.warn('[arco] scratch reminder could not be cleared:', error));
|
|
2933
2952
|
}
|
|
2934
2953
|
lastTurnErrored = !!outcome.error;
|
|
2954
|
+
clusterAutoTurn.noteTurnOutcome(workflowId, outcome.error);
|
|
2935
2955
|
watchHadError ||= lastTurnErrored;
|
|
2936
2956
|
if (firstIteration && opts?.backgroundEvent)
|
|
2937
2957
|
opts.onBackgroundSettled?.(outcome.error ?? undefined);
|
|
@@ -3150,8 +3170,6 @@ opts) {
|
|
|
3150
3170
|
// replaces any fold or compaction of this boundary; otherwise the cheap
|
|
3151
3171
|
// deterministic Fold, then the auto-compaction policy.
|
|
3152
3172
|
context: async () => {
|
|
3153
|
-
if (wf.primary.provider === 'antigravity-cli')
|
|
3154
|
-
return 'continue';
|
|
3155
3173
|
const clusterIdForPolicy = clusterStore.getClusterIdForWorkflow(workflowId);
|
|
3156
3174
|
const explicitPolicy = resolveProviderAutoCompaction(wf.config.autoCompaction, clusterIdForPolicy ? clusterStore.getAutoCompaction(clusterIdForPolicy) : undefined, wf.primary.provider, claudeTransport, wf.config.claudeNativeCompact === true, cascade?.ollama?.compaction?.enabled !== undefined || cascade?.ollama?.compaction?.threshold !== undefined);
|
|
3157
3175
|
if (explicitPolicy) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { WebSocket } from 'ws';
|
|
2
2
|
import { type UpdatePrimaryConfigMessage } from '@arco/shared';
|
|
3
|
-
import type { Session } from '../workflows/types.js';
|
|
4
|
-
export declare function
|
|
3
|
+
import type { Session, WorkflowState } from '../workflows/types.js';
|
|
4
|
+
export declare function isUpdatingNativeAccount(wf: WorkflowState): boolean;
|
|
5
|
+
export declare function handleUpdatePrimaryConfig(ws: WebSocket, _session: Session, msg: UpdatePrimaryConfigMessage): Promise<void>;
|