arco-workbench 0.1.5 → 0.1.7
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 +9 -0
- package/README.md +17 -5
- package/client/dist/assets/{PhosphorBackdrop-D6cbmLNY.js → PhosphorBackdrop-DVQdBrTw.js} +1 -1
- package/client/dist/assets/{ThemedBackgroundShaderImpl-2dyerOi4.js → ThemedBackgroundShaderImpl-BfSs2tB4.js} +1 -1
- package/client/dist/assets/{XtermView-AIwo7O3D.js → XtermView-DaMjC8Ny.js} +1 -1
- package/client/dist/assets/{galleryEditor-DXAuxS8D.js → galleryEditor-BCQnXj7R.js} +1 -1
- package/client/dist/assets/{index-8j6p-pmQ.js → index-COfbHCYv.js} +245 -243
- package/client/dist/index.html +1 -1
- package/client/src/alerts/desktopAlerts.ts +13 -0
- package/client/src/buildCheck.ts +3 -1
- package/client/src/components/AppUpdateNotice.tsx +2 -1
- package/client/src/components/ClusterRightPanel/AutoPickupControl.tsx +46 -11
- package/client/src/components/ClusterRightPanel/MemberRow.tsx +1 -1
- package/client/src/components/ClusterRightPanel/index.tsx +2 -1
- package/client/src/components/ClusterTaskBoardTab.tsx +54 -3
- package/client/src/components/ContextMeter.tsx +7 -0
- package/client/src/components/HeaderVersionBox.tsx +7 -4
- package/client/src/components/Home/HomeView.tsx +1 -1
- package/client/src/components/NeedsYouBadge.tsx +31 -16
- package/client/src/components/OperatorQuestionNotice.tsx +10 -1
- package/client/src/components/ProvidersPopover.tsx +23 -12
- package/client/src/components/TabBar.tsx +11 -8
- package/client/src/components/TabStatusChip.tsx +8 -7
- package/client/src/components/UpdateAction.tsx +18 -4
- package/client/src/components/UpdateResultNotice.tsx +3 -1
- package/client/src/components/clusterNeedsYou.ts +27 -8
- package/client/src/help/content/cluster.tsx +50 -27
- package/client/src/help/content/composer.tsx +8 -1
- package/client/src/help/content/header.tsx +25 -14
- package/client/src/help/content/misc.tsx +8 -0
- package/client/src/help/content/rightPanel.tsx +1 -1
- package/client/src/help/content/settings.tsx +1 -1
- package/client/src/help/content/tabbar.tsx +2 -1
- package/client/src/help/manualSections/clusters.tsx +78 -19
- package/client/src/help/manualSections/configuration.tsx +20 -4
- package/client/src/help/manualSections/gettingStarted.tsx +10 -0
- package/client/src/help/manualSections/maintenance.tsx +50 -8
- package/client/src/help/manualSections/plans.tsx +5 -1
- package/client/src/help/manualSections/providers.tsx +10 -3
- package/client/src/help/manualSections/reference.tsx +1 -1
- package/client/src/help/manualSections/workflows.tsx +20 -0
- package/client/src/help/manualSections/workspace.tsx +7 -1
- package/client/src/questions/waitingQuestion.ts +3 -2
- package/client/src/stores/appStore.ts +1 -1
- package/client/src/stores/appStore.types.ts +1 -0
- package/client/src/stores/appUpdateStore.ts +29 -8
- package/client/src/stores/notificationStore.ts +2 -0
- package/client/src/utils/activityPresentation.ts +1 -1
- package/client/src/utils/tabStatus.ts +8 -0
- package/client/src/utils/wsSession.ts +2 -1
- package/client/src/voice/commands.ts +4 -3
- package/client/src/voice/executor.ts +3 -3
- package/client/src/ws/handleServerMessage.ts +22 -2
- package/client/src/ws/operatorQuestions.ts +2 -0
- package/docs/CLIENT.md +3 -3
- package/docs/FEATURES.md +1 -1
- package/docs/GETTING_STARTED.md +16 -6
- package/docs/GLOSSARY.md +6 -2
- package/docs/GOTCHAS.md +17 -5
- package/docs/OPERATIONS.md +207 -5
- package/docs/PERSISTENCE.md +22 -1
- package/docs/PRIMITIVES.md +1 -1
- package/docs/PROTOCOL.md +1 -1
- package/docs/PROTOCOL_CLUSTER.md +18 -7
- package/docs/PROVIDERS.md +10 -5
- package/docs/SETTINGS.md +4 -2
- package/docs/TASK_LEDGER.md +6 -0
- package/docs/VOICE.md +2 -0
- package/native/darwin-arm64/manifest.json +1 -1
- package/native/win32-arm64/manifest.json +1 -1
- package/node_modules/@arco/shared/dist/clusterRolePresets.d.ts +1 -1
- package/node_modules/@arco/shared/dist/clusterRolePresets.js +10 -0
- package/node_modules/@arco/shared/dist/protocol/autoPickup.d.ts +3 -0
- package/node_modules/@arco/shared/dist/protocol/autoPickup.js +9 -1
- package/node_modules/@arco/shared/dist/protocol/clientMessages.d.ts +2 -2
- package/node_modules/@arco/shared/dist/protocol/models.d.ts +6 -0
- package/node_modules/@arco/shared/dist/protocol/notifications.d.ts +4 -0
- package/node_modules/@arco/shared/dist/protocol/operatorQuestions.d.ts +12 -0
- package/node_modules/@arco/shared/dist/protocol/serverMessages.d.ts +9 -3
- package/node_modules/@arco/shared/dist/protocol/workflows.d.ts +1 -0
- package/node_modules/@arco/shared/package.json +1 -1
- package/package.json +2 -2
- package/scripts/packaging/arco.mjs +1 -0
- package/scripts/packaging/native-repair.mjs +46 -8
- package/scripts/packaging/update.mjs +5 -1
- package/server/dist/attention.d.ts +1 -1
- package/server/dist/attention.js +6 -4
- package/server/dist/capabilities.d.ts +9 -8
- package/server/dist/capabilities.js +71 -102
- package/server/dist/cliUpdateDecision.d.ts +34 -0
- package/server/dist/cliUpdateDecision.js +152 -0
- package/server/dist/clusterAutoTurn.d.ts +4 -0
- package/server/dist/clusterAutoTurn.js +29 -25
- package/server/dist/clusterBusyReminder.js +1 -1
- package/server/dist/clusterDirector.js +1 -0
- package/server/dist/clusterPeerOps.js +2 -2
- package/server/dist/clusterStore.d.ts +3 -0
- package/server/dist/clusterStore.js +22 -0
- package/server/dist/defaults/models.md +1 -1
- package/server/dist/fileAccessPolicy.js +7 -5
- package/server/dist/http/workflowDataRoutes.js +1 -1
- package/server/dist/index.js +5 -1
- package/server/dist/primitives/seedWorker.d.ts +1 -0
- package/server/dist/primitives/seedWorker.js +2 -1
- package/server/dist/providerConversation.d.ts +9 -0
- package/server/dist/providerConversation.js +80 -0
- package/server/dist/providers/claude-native/retainedContext.d.ts +4 -0
- package/server/dist/providers/claude-native/retainedContext.js +20 -0
- package/server/dist/providers/claude-native/worker.d.ts +1 -0
- package/server/dist/providers/claude-native/worker.js +34 -6
- package/server/dist/providers/codex-appserver/operatorQuestions.d.ts +5 -0
- package/server/dist/providers/codex-appserver/operatorQuestions.js +30 -0
- package/server/dist/providers/codex-appserver/worker.js +9 -4
- package/server/dist/providers/ollama.js +2 -3
- package/server/dist/server/broadcast.d.ts +1 -1
- package/server/dist/smartPickup.d.ts +2 -1
- package/server/dist/smartPickup.js +28 -1
- package/server/dist/smartPickupAdapters.d.ts +1 -0
- package/server/dist/smartPickupAdapters.js +18 -5
- package/server/dist/smartPickupLedger.js +6 -4
- package/server/dist/smartPickupObserver.d.ts +1 -0
- package/server/dist/smartPickupObserver.js +69 -23
- package/server/dist/workers/WorkerManager.d.ts +1 -0
- package/server/dist/workers/WorkerManager.js +1 -0
- package/server/dist/workers/limits.js +6 -2
- package/server/dist/workflowMeta.d.ts +11 -1
- package/server/dist/workflowMeta.js +132 -6
- package/server/dist/workflows/types.d.ts +1 -0
- package/server/dist/ws/clusterHandlers.d.ts +1 -0
- package/server/dist/ws/clusterHandlers.js +2 -1
- package/server/dist/ws/compactHandlers.d.ts +1 -1
- package/server/dist/ws/compactHandlers.js +11 -4
- package/server/dist/ws/handoffHandlers.js +16 -6
- package/server/dist/ws/operatorQuestionHandlers.d.ts +2 -1
- package/server/dist/ws/operatorQuestionHandlers.js +9 -1
- package/server/dist/ws/turnEngine.d.ts +2 -4
- package/server/dist/ws/turnEngine.js +88 -129
- package/server/package.json +1 -1
- package/server/src/attention.ts +5 -4
- package/server/src/capabilities.ts +70 -111
- package/server/src/cliUpdateDecision.ts +159 -0
- package/server/src/clusterAutoTurn.ts +26 -21
- package/server/src/clusterBusyReminder.ts +1 -1
- package/server/src/clusterDirector.ts +1 -0
- package/server/src/clusterPeerOps.ts +2 -2
- package/server/src/clusterStore.ts +26 -1
- package/server/src/defaults/models.md +1 -1
- package/server/src/fileAccessPolicy.ts +7 -5
- package/server/src/http/workflowDataRoutes.ts +1 -1
- package/server/src/index.ts +5 -1
- package/server/src/primitives/seedWorker.ts +3 -1
- package/server/src/providerConversation.ts +71 -0
- package/server/src/providers/claude-native/retainedContext.ts +22 -0
- package/server/src/providers/claude-native/worker.ts +33 -5
- package/server/src/providers/codex-appserver/operatorQuestions.ts +24 -0
- package/server/src/providers/codex-appserver/worker.ts +8 -4
- package/server/src/providers/ollama.ts +2 -3
- package/server/src/smartPickup.ts +27 -3
- package/server/src/smartPickupAdapters.ts +19 -5
- package/server/src/smartPickupLedger.ts +6 -4
- package/server/src/smartPickupObserver.ts +51 -17
- package/server/src/workers/WorkerManager.ts +2 -0
- package/server/src/workers/limits.ts +7 -2
- package/server/src/workflowMeta.ts +139 -5
- package/server/src/workflows/types.ts +1 -0
- package/server/src/ws/clusterHandlers.ts +3 -2
- package/server/src/ws/compactHandlers.ts +9 -3
- package/server/src/ws/handoffHandlers.ts +13 -6
- package/server/src/ws/operatorQuestionHandlers.ts +10 -2
- package/server/src/ws/turnEngine.ts +80 -135
- package/shared/dist/clusterRolePresets.d.ts +1 -1
- package/shared/dist/clusterRolePresets.js +10 -0
- package/shared/dist/protocol/autoPickup.d.ts +3 -0
- package/shared/dist/protocol/autoPickup.js +9 -1
- package/shared/dist/protocol/clientMessages.d.ts +2 -2
- package/shared/dist/protocol/models.d.ts +6 -0
- package/shared/dist/protocol/notifications.d.ts +4 -0
- package/shared/dist/protocol/operatorQuestions.d.ts +12 -0
- package/shared/dist/protocol/serverMessages.d.ts +9 -3
- package/shared/dist/protocol/workflows.d.ts +1 -0
- package/shared/src/clusterRolePresets.ts +11 -1
- package/shared/src/protocol/autoPickup.ts +14 -1
- package/shared/src/protocol/clientMessages.ts +2 -1
- package/shared/src/protocol/models.ts +5 -2
- package/shared/src/protocol/notifications.ts +5 -0
- package/shared/src/protocol/operatorQuestions.ts +13 -0
- package/shared/src/protocol/serverMessages.ts +12 -2
- package/shared/src/protocol/workflows.ts +4 -0
|
@@ -8,10 +8,18 @@ export function isUpdateStatus(value: unknown): value is UpdateCheckStatus {
|
|
|
8
8
|
&& [s.latest, s.url, s.publishedAt, s.checkedAt].every((v) => v === null || typeof v === 'string');
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
let manualCheck = false;
|
|
12
|
+
let manualRelease: string | null = null;
|
|
13
|
+
|
|
11
14
|
export const useAppUpdateStore = create<{
|
|
12
15
|
status: UpdateCheckStatus | null;
|
|
13
16
|
notice: AppUpdateAvailableMessage | null;
|
|
14
17
|
updating: boolean;
|
|
18
|
+
resultSurfaces: string[];
|
|
19
|
+
showResultAt: (id: string, preferred?: boolean) => void;
|
|
20
|
+
removeResultSurface: (id: string) => void;
|
|
21
|
+
versionOpen: boolean;
|
|
22
|
+
setVersionOpen: (value: boolean) => void;
|
|
15
23
|
setUpdating: (value: boolean) => void;
|
|
16
24
|
receive: (notice: AppUpdateAvailableMessage) => void;
|
|
17
25
|
refresh: (force?: boolean) => Promise<void>;
|
|
@@ -20,20 +28,33 @@ export const useAppUpdateStore = create<{
|
|
|
20
28
|
status: null,
|
|
21
29
|
notice: null,
|
|
22
30
|
updating: false,
|
|
31
|
+
resultSurfaces: [],
|
|
32
|
+
showResultAt: (id, preferred = false) => set(({ resultSurfaces }) => {
|
|
33
|
+
const others = resultSurfaces.filter((value) => value !== id);
|
|
34
|
+
return { resultSurfaces: preferred ? [id, ...others] : [...others, id] };
|
|
35
|
+
}),
|
|
36
|
+
removeResultSurface: (id) => set(({ resultSurfaces }) => ({ resultSurfaces: resultSurfaces.filter((value) => value !== id) })),
|
|
37
|
+
versionOpen: false,
|
|
38
|
+
setVersionOpen: (versionOpen) => set({ versionOpen }),
|
|
23
39
|
setUpdating: (updating) => set({ updating }),
|
|
24
40
|
receive: (notice) => {
|
|
25
41
|
if (typeof notice.latest !== 'string' || typeof notice.url !== 'string' || !/^v\d+\.\d+\.\d+/.test(notice.latest) || !notice.url.startsWith('https://github.com/ghreprimand/arco/releases/tag/')) return;
|
|
42
|
+
if (manualCheck || notice.latest === manualRelease) return;
|
|
26
43
|
if (get().notice?.latest !== notice.latest) set({ notice });
|
|
27
44
|
},
|
|
28
45
|
refresh: async (force = false) => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
if (force) manualCheck = true;
|
|
47
|
+
try {
|
|
48
|
+
const response = await fetch('/api/update-check', { method: force ? 'POST' : 'GET' });
|
|
49
|
+
if (!response.ok) throw new Error('Release check unavailable');
|
|
50
|
+
const status: unknown = await response.json();
|
|
51
|
+
if (!isUpdateStatus(status)) throw new Error('Release check unavailable');
|
|
52
|
+
if (force) manualRelease = status.enabled && status.updateAvailable ? status.latest : null;
|
|
53
|
+
set({ status, ...(force ? { notice: null } : {}) });
|
|
54
|
+
if (status.enabled && status.updateAvailable && status.latest && status.url && status.publishedAt) {
|
|
55
|
+
get().receive({ type: 'app_update_available', current: status.current, latest: status.latest, url: status.url, publishedAt: status.publishedAt });
|
|
56
|
+
} else set({ notice: null });
|
|
57
|
+
} finally { if (force) manualCheck = false; }
|
|
37
58
|
},
|
|
38
59
|
clear: () => set({ notice: null }),
|
|
39
60
|
}));
|
|
@@ -23,6 +23,7 @@ interface NotificationState {
|
|
|
23
23
|
setMutedFromServer: (muted: WorkbenchNoticeCategory[]) => void;
|
|
24
24
|
markAllSeen: () => void;
|
|
25
25
|
clearHistory: () => void;
|
|
26
|
+
removeNotice: (id: string) => void;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export const useNotificationStore = create<NotificationState>((set) => ({
|
|
@@ -37,6 +38,7 @@ export const useNotificationStore = create<NotificationState>((set) => ({
|
|
|
37
38
|
setMutedFromServer: (muted) => set({ muted }),
|
|
38
39
|
markAllSeen: () => set((s) => ({ lastSeenTs: s.notices[0]?.ts ?? s.lastSeenTs })),
|
|
39
40
|
clearHistory: () => set({ notices: [] }),
|
|
41
|
+
removeNotice: (id) => set((s) => ({ notices: s.notices.filter((n) => n.id !== id) })),
|
|
40
42
|
}));
|
|
41
43
|
|
|
42
44
|
// Convenience selector for the unread badge (notices newer than last seen).
|
|
@@ -36,7 +36,7 @@ export function settledCardItem(job: JobState | undefined): { text: string; at:
|
|
|
36
36
|
|
|
37
37
|
export function canPlanFirst(role: string | undefined): boolean {
|
|
38
38
|
const text = role ?? '';
|
|
39
|
-
if (/^\s*(?:director|coordinator|reviewer|researcher|documenter)\b/i.test(text)) return false;
|
|
39
|
+
if (/^\s*(?:director|coordinator|reviewer|researcher|documenter|advisor)\b/i.test(text)) return false;
|
|
40
40
|
if (/^\s*(?:(?:you are|this is|role is)\s+(?:an?\s+)?)?read[ -]only\b/i.test(text)) return false;
|
|
41
41
|
|
|
42
42
|
// A restriction qualified within its sentence permits changes under a condition.
|
|
@@ -25,6 +25,14 @@ export function tabStatus(input: { waiting: boolean; busy: boolean; unviewed: bo
|
|
|
25
25
|
return 'idle';
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/** Attention keeps its colour while the pulse and label also show ongoing work. */
|
|
29
|
+
export function tabStatusPresentation(status: TabStatus, busy: boolean): { label: string; pulsing: boolean } {
|
|
30
|
+
return {
|
|
31
|
+
label: status === 'needs-you' && busy ? 'Needs you - still working' : TAB_STATUS_LABEL[status],
|
|
32
|
+
pulsing: busy,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
/** A member that is idle while messages wait for it: it needs a nudge from the operator. */
|
|
29
37
|
export function idleWithMail(member: { status: string; workflowId: string }, depth: unknown, jobBusy: boolean | undefined): boolean {
|
|
30
38
|
return member.status !== 'busy' && !jobBusy && typeof depth === 'number' && Number.isSafeInteger(depth) && depth > 0;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { reportRecovery } from '../buildCheck';
|
|
12
12
|
|
|
13
13
|
const REFRESH_MS = 20 * 60 * 1000;
|
|
14
|
+
const MINT_TIMEOUT_MS = 5000;
|
|
14
15
|
const nativeFetch: typeof fetch = window.fetch.bind(window);
|
|
15
16
|
let inflight: Promise<void> | null = null;
|
|
16
17
|
|
|
@@ -18,7 +19,7 @@ let inflight: Promise<void> | null = null;
|
|
|
18
19
|
// caller's normal error/reconnect path runs. Concurrent callers share one mint.
|
|
19
20
|
export function ensureWsSession(): Promise<void> {
|
|
20
21
|
if (!inflight) {
|
|
21
|
-
inflight = nativeFetch('/api/session', { method: 'POST', credentials: 'same-origin', cache: 'no-store' })
|
|
22
|
+
inflight = nativeFetch('/api/session', { method: 'POST', credentials: 'same-origin', cache: 'no-store', signal: AbortSignal.timeout(MINT_TIMEOUT_MS) })
|
|
22
23
|
.then(() => undefined, () => undefined)
|
|
23
24
|
.finally(() => { inflight = null; });
|
|
24
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { presetForText, type VoiceCommand, type VoiceContext, type VoiceTarget } from '@arco/shared';
|
|
2
2
|
|
|
3
3
|
// Only an explicit first word arms command parsing. No aliases or "hey"
|
|
4
4
|
// preamble: incidental speech must not reach the interpreter or executor.
|
|
@@ -37,8 +37,9 @@ export function resolveVoiceTarget(query: string, context: VoiceContext, members
|
|
|
37
37
|
// Computer phrases the selection the way the operator did ("this project",
|
|
38
38
|
// "the current tab", "it"); all of these mean the selection.
|
|
39
39
|
if (!q || /^(?:this|it|current|the current|this one|this 1|the current one|the current 1|this member|this chat|this project|the project|project|current project|the current project|this tab|the tab|current tab|the current tab|this cluster|the current cluster|selected|the selected one|selection|the selection)$/.test(q)) return targets.filter((t) => t.id === context.currentId);
|
|
40
|
+
const roleName = (t: VoiceTarget) => t.role ? presetForText(t.role)?.label ?? t.role : '';
|
|
40
41
|
const scoped = targets.filter((t) => t.clusterId === context.clusterId);
|
|
41
|
-
const exact = (list: VoiceTarget[]) => list.filter((t) => [t.name, ...(t.aliases ?? []), ...(t.role ? [t
|
|
42
|
+
const exact = (list: VoiceTarget[]) => list.filter((t) => [t.name, ...(t.aliases ?? []), ...(t.role ? [roleName(t)] : [])].some((name) => normaliseVoiceName(name) === q || normaliseVoiceName(name).replace(/ /g, '') === q.replace(/ /g, ''))
|
|
42
43
|
|| (q.length >= 4 && t.id.startsWith(q)));
|
|
43
44
|
const localExact = exact(scoped);
|
|
44
45
|
if (localExact.length) return localExact;
|
|
@@ -51,7 +52,7 @@ export function resolveVoiceTarget(query: string, context: VoiceContext, members
|
|
|
51
52
|
const clusters = context.targets.filter((t) => t.kind === 'cluster' && normaliseVoiceName(t.name) === qualified[2]);
|
|
52
53
|
if (clusters.length === 1) return resolveVoiceTarget(qualified[1], { ...context, clusterId: clusters[0].id, targets: targets.filter((t) => t.clusterId === clusters[0].id) }, membersOnly);
|
|
53
54
|
}
|
|
54
|
-
const contains = (list: VoiceTarget[]) => list.filter((t) => [t.name, ...(t.aliases ?? []), t
|
|
55
|
+
const contains = (list: VoiceTarget[]) => list.filter((t) => [t.name, ...(t.aliases ?? []), roleName(t)].some((name) => normaliseVoiceName(name).includes(q)));
|
|
55
56
|
const local = contains(scoped);
|
|
56
57
|
if (local.length) return local;
|
|
57
58
|
const any = contains(targets);
|
|
@@ -4,7 +4,7 @@ import { mailRuleRequest } from './mailRules';
|
|
|
4
4
|
import { readVoiceUsage } from './usage';
|
|
5
5
|
import { watchRequest } from './watches';
|
|
6
6
|
import { controlComputer } from './computerControl';
|
|
7
|
-
import { presetForText, VOICE_MAX_TARGETS, VOICE_MAX_TEXT, type VoiceCommand, type VoiceContext, type VoiceTarget, type VoiceToolCallMessage, type WorkflowConfig } from '@arco/shared';
|
|
7
|
+
import { isClusterDirector, presetForText, VOICE_MAX_TARGETS, VOICE_MAX_TEXT, type VoiceCommand, type VoiceContext, type VoiceTarget, type VoiceToolCallMessage, type WorkflowConfig } from '@arco/shared';
|
|
8
8
|
import { useAppStore } from '../stores/appStore';
|
|
9
9
|
import { requestChatFollow } from '../stores/chatFollowStore';
|
|
10
10
|
import type { JobState } from '../stores/appStore.types';
|
|
@@ -145,7 +145,7 @@ export class VoiceExecutor {
|
|
|
145
145
|
private clusterVoice(t: VoiceTarget | string): VoiceTarget | string {
|
|
146
146
|
if (typeof t === 'string' || t.kind !== 'cluster') return t;
|
|
147
147
|
const members = this.context().targets.filter((m) => m.clusterId === t.id);
|
|
148
|
-
const directors = members.filter((m) => (m.role
|
|
148
|
+
const directors = members.filter((m) => isClusterDirector(m.role) || (!m.role?.trim() && /\bdirector\b/i.test(m.name)));
|
|
149
149
|
if (directors.length === 1) return directors[0];
|
|
150
150
|
return `${t.name} is a cluster${directors.length ? ' with several Directors' : ' with no Director'}; name one of its members: ${members.map((m) => m.name).join(', ')}.`;
|
|
151
151
|
}
|
|
@@ -186,7 +186,7 @@ export class VoiceExecutor {
|
|
|
186
186
|
let recipient = t;
|
|
187
187
|
if (t.kind === 'cluster') {
|
|
188
188
|
const directors = this.context().targets.filter((m) => m.clusterId === t.id
|
|
189
|
-
&& (
|
|
189
|
+
&& (isClusterDirector(m.role) || (!m.role?.trim() && /^director$/i.test(m.name.trim()))));
|
|
190
190
|
if (directors.length !== 1) return `Which member of ${t.name} should I ask? Select one, then ask for a project update.`;
|
|
191
191
|
recipient = directors[0];
|
|
192
192
|
}
|
|
@@ -11,7 +11,7 @@ import { useVoiceStore } from '../voice/store';
|
|
|
11
11
|
import { dispatchVoiceToolCall } from '../voice/toolBridge';
|
|
12
12
|
import { setClaudeQuestionIds, notifyQuestion } from '../questions/waitingQuestion';
|
|
13
13
|
import { parseAskNotice } from '../components/AskUserQuestionNotice';
|
|
14
|
-
import { handleAttentionEvent } from '../alerts/desktopAlerts';
|
|
14
|
+
import { handleAttentionEvent, clearQuestionAlert } from '../alerts/desktopAlerts';
|
|
15
15
|
import { applyOperatorQuestion, reconcileOperatorQuestions, questionMessageId } from './operatorQuestions';
|
|
16
16
|
import { useAppStore } from '../stores/appStore';
|
|
17
17
|
import { applyWorkspace, sendWorkspaceSync } from './workspaceSync';
|
|
@@ -1390,6 +1390,12 @@ export function handleServerMessage(msg: ServerMessage, deps: WsDeps): void {
|
|
|
1390
1390
|
if (msg.sessionMetadata) {
|
|
1391
1391
|
store.setSessionMetadata(msg.workflowId, msg.sessionMetadata);
|
|
1392
1392
|
}
|
|
1393
|
+
useAppStore.setState(s => {
|
|
1394
|
+
const job = s.jobs[msg.workflowId];
|
|
1395
|
+
if (!job) return s;
|
|
1396
|
+
return { jobs: { ...s.jobs, [job.id]: { ...job, providerConversation: msg.providerConversation,
|
|
1397
|
+
...(msg.providerConversation ? { contextUsage: undefined, lastTurnTokens: undefined, modelContextWindow: undefined } : {}) } } };
|
|
1398
|
+
});
|
|
1393
1399
|
if (!msg.busy) {
|
|
1394
1400
|
const ref = getStreamRef(msg.workflowId);
|
|
1395
1401
|
ref.passthrough = null;
|
|
@@ -1423,6 +1429,16 @@ export function handleServerMessage(msg: ServerMessage, deps: WsDeps): void {
|
|
|
1423
1429
|
break;
|
|
1424
1430
|
}
|
|
1425
1431
|
|
|
1432
|
+
case 'provider_conversation_state':
|
|
1433
|
+
useAppStore.setState(s => {
|
|
1434
|
+
const job = s.jobs[msg.workflowId];
|
|
1435
|
+
if (!job) return s;
|
|
1436
|
+
const state = msg.state === 'ready' ? undefined : msg.state;
|
|
1437
|
+
return { jobs: { ...s.jobs, [job.id]: { ...job, providerConversation: state,
|
|
1438
|
+
...(state ? { contextUsage: undefined, lastTurnTokens: undefined, modelContextWindow: undefined } : {}) } } };
|
|
1439
|
+
});
|
|
1440
|
+
break;
|
|
1441
|
+
|
|
1426
1442
|
case 'workflow_session_metadata':
|
|
1427
1443
|
store.setSessionMetadata(msg.workflowId, msg.sessionMetadata);
|
|
1428
1444
|
break;
|
|
@@ -2005,7 +2021,7 @@ export function handleServerMessage(msg: ServerMessage, deps: WsDeps): void {
|
|
|
2005
2021
|
case 'operator_question': {
|
|
2006
2022
|
const known = store.jobs[msg.workflowId]?.messages.some((m) => m.id === questionMessageId(msg.question.requestId));
|
|
2007
2023
|
applyOperatorQuestion(msg.workflowId, msg.question, (msg as { seq?: number }).seq);
|
|
2008
|
-
if (msg.question.status === 'pending' && !known && Date.now() - msg.question.createdAt < 10_000) notifyQuestion(msg.workflowId);
|
|
2024
|
+
if (msg.question.status === 'pending' && !known && Date.now() - msg.question.createdAt < 10_000) notifyQuestion(msg.workflowId, msg.question.requestId);
|
|
2009
2025
|
break;
|
|
2010
2026
|
}
|
|
2011
2027
|
case 'computer_activity_changed':
|
|
@@ -2016,6 +2032,7 @@ export function handleServerMessage(msg: ServerMessage, deps: WsDeps): void {
|
|
|
2016
2032
|
// session answers; see voice/toolBridge.ts.
|
|
2017
2033
|
void dispatchVoiceToolCall(msg, (result) => store.wsSendRaw?.(result));
|
|
2018
2034
|
break;
|
|
2035
|
+
case 'operator_question_dismiss_result':
|
|
2019
2036
|
case 'operator_question_reply_result':
|
|
2020
2037
|
if (!msg.ok) store.updateMessage(msg.workflowId, questionMessageId(msg.requestId), { operatorQuestionError: msg.error || 'The answer could not be delivered.' });
|
|
2021
2038
|
break;
|
|
@@ -2351,6 +2368,9 @@ export function handleServerMessage(msg: ServerMessage, deps: WsDeps): void {
|
|
|
2351
2368
|
// suppression, so any notice that arrives is one to surface: record it
|
|
2352
2369
|
// in the notice-center history AND raise a transient toast via the
|
|
2353
2370
|
// existing app strip (error/warning → 'error' styling, else 'info').
|
|
2371
|
+
case 'attention_question_closed':
|
|
2372
|
+
clearQuestionAlert(msg.requestId);
|
|
2373
|
+
break;
|
|
2354
2374
|
case 'attention_event':
|
|
2355
2375
|
handleAttentionEvent(msg);
|
|
2356
2376
|
break;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { OperatorQuestionState } from '@arco/shared';
|
|
2
|
+
import { clearQuestionAlert } from '../alerts/desktopAlerts';
|
|
2
3
|
import { useAppStore } from '../stores/appStore';
|
|
3
4
|
|
|
4
5
|
export const questionMessageId = (requestId: string) => `operator-question-${requestId}`;
|
|
5
6
|
export function applyOperatorQuestion(workflowId: string, question: OperatorQuestionState, eventSeq?: number): void {
|
|
7
|
+
if (question.status !== 'pending') clearQuestionAlert(question.requestId);
|
|
6
8
|
const store = useAppStore.getState();
|
|
7
9
|
const id = questionMessageId(question.requestId);
|
|
8
10
|
const prior = store.jobs[workflowId]?.messages.find((m) => m.id === id);
|
package/docs/CLIENT.md
CHANGED
|
@@ -495,7 +495,7 @@ The 2/3 - 1/3 splitter width and active right-tab key persist to localStorage in
|
|
|
495
495
|
- **`ProvidersPopover`** - folds the former inline per-provider version-chip strip behind one `VERSIONS` trigger (also in Settings > CLI VERSIONS) (click-outside to close). The trigger carries a health dot (warning-color when any provider is outdated); the popover lists the chips. Chips are gated on `settings.enabledProviders` (disabled providers don't show) and un-installed CLIs, include an Ollama/llama.cpp row when reachable, and paint warning-color when the installed version is older than `capabilities.latestVersions.<p>`. Click on Claude/Codex runs the upstream installer via `POST /api/check-updates`; Ollama, Strata and Xolotl open `ProviderReleasesModal`, which receives keyboard focus on entry so Escape dismisses it. Closing returns focus to the opening chip when it remains mounted; closing VERSIONS returns focus to its button. llama.cpp opens GitHub releases. Strata remains visible while stopped using the prepared engine's `BUILD.json`; update comparison uses engine package metadata, separately from the 0.2 app/Terminal release tag. Xolotl displays checkout HEAD as a single-line `XOLOTL` row. Its modal uses recent commits when upstream has no tagged releases, displays matching HEADs as UP TO DATE without a self-comparison request, and compares distinct revisions for source changes. External GitHub links are explicit; these three rows never open a browser or install an update themselves. LOCAL STATUS labels follow the selected theme foreground while runtime state colors retain their meaning. The viewport-clamped panel is portaled below the entire wrapped header; it suppresses dot hover cards, closes on Escape/outside click, and returns focus. llama.cpp displays both semantic version and build/commit identities, using build numbers whenever latest build metadata is available; semantic versions are never substituted for missing builds. Self-contained - owns the update-check + modal state that used to live in `SystemHeader`.
|
|
496
496
|
- **`WorkflowStatusChip`** - a provider-throttling warning shown only when quota state reports a throttle. Click for affected providers, known reset times, a per-provider Clear control and Codex/Claude Recheck usage. A row stays while its recheck is pending; a recheck that shows headroom clears the notice, keeping its row and result for four seconds; exhausted or unavailable usage leaves it. Focus moves back to the chip or layout control only when it was inside the panel and its control disappeared, never while the user is typing elsewhere. Clear restores future eligibility without re-arming a stopped goal run. Known resets expire without a page refresh; a one-second client tick hides expired rows after two seconds of clock grace. Context usage remains in the worker header.
|
|
497
497
|
- **`NotificationCenter`** - the header bell (`◔ BELL`) with an unread badge. Dropdown shows the workbench-notice history + a per-category MUTE grid (checkbox -> `set_notification_mutes` via `onSetNotificationMutes`, threaded App -> SystemHeader -> `useWebSocket`). Backed by the standalone `notificationStore` (notices history + server-authoritative `muted` set + `lastSeenTs` unread marker). Always visible - even in I3 focus mode - since notices are the "agent finished / something broke" signal. Incoming `workbench_notice` also raises a transient toast via the existing top-right strip (`NotificationToasts` / `appStore.pushNotification`), not a second stack. See [`NOTIFICATIONS.md`](NOTIFICATIONS.md).
|
|
498
|
-
- **`TabBar`** - horizontal job list; each workflow and cluster tab carries a compact `TabStatusChip` dot (Needs you, Working, New reply; no dot for Idle, with the status available on hover and to assistive technology) from `utils/tabStatus.ts`: a pending question wins, then a running turn, then New reply. New reply comes from `stores/tabStatusStore.ts`, which marks a tab when a turn ends while another tab or Home is showing and clears it when the tab opens (in memory only; a cluster's members mark the cluster tab). Home Continue cards use the same chip. Click a tab -> `setActiveJob`. The "+" button shows `WorkflowCreator`.
|
|
498
|
+
- **`TabBar`** - horizontal job list; each workflow and cluster tab carries a compact `TabStatusChip` dot (Needs you, Working, New reply; no dot for Idle, with the status available on hover and to assistive technology) from `utils/tabStatus.ts`: a pending question or idle member with mail wins, then a running turn, then New reply. A Needs you dot pulses and its label says it is still working when a turn also runs. New reply comes from `stores/tabStatusStore.ts`, which marks a tab when a turn ends while another tab or Home is showing and clears it when the tab opens (in memory only; a cluster's members mark the cluster tab). Home Continue cards use the same chip. Click a tab -> `setActiveJob`. The "+" button shows `WorkflowCreator`.
|
|
499
499
|
- **`WorkflowView`** - owns the splitter and renders `ChatPanel` + `RightPanel`. Splitter width persists per-workflow. Forwards send/cancel/review/handoff/spawn callbacks to the children. **Focus mode:** when `appStore.focusMode` is true the left (chat) column goes `flex: 1 1 100%` and the splitter + `RightPanel` are unmounted, giving the chat the full width; toggling off restores the persisted split fraction. The chat column `Panel` carries `className="no-frost"` so `html[data-frosted="1"].arco-panel.no-frost { backdrop-filter: none }` (more specific than the generic frosted-blur rule) keeps the transcript crisp over the shader - matching the cluster transcript, which is never a `Panel`.
|
|
500
500
|
- **`NorthStarBar`** - inline-editable north-star chip in the composer status line (empty -> "set a north-star..."; soft-warn 1536 / cap 2048 bytes). Mirrors `job.config.goal`; edits go through `onUpdatePrimary({ goal })`.
|
|
501
501
|
- **`ChatPanel`** - virtualized chat log. The render-side `displayMessages` memo merges sources and dedupes (see "Chat rendering pipeline" below).
|
|
@@ -1123,7 +1123,7 @@ ClusterTab (App.tsx routes here when activeClusterId set)
|
|
|
1123
1123
|
|
|
1124
1124
|
**One typing surface.** The cluster tab has no bottom broadcast composer. It opens with the director focused (the first member whose role starts with director or coordinator, else the first member) and lists the director first until the operator drags a card (a per-cluster flag in `localStorage`, `arco.clusterReordered.<id>`). The focused member's own message box is where the operator types. The empty composer's placeholder names the target: "Message the director, your main contact..." for the director, "Message <member name>..." for another member. Focus never changes on its own: the director card shows a quiet `NEW REPLY` mark when a finished reply has not been looked at, and a question toast from another member offers `GO TO DIRECTOR`. Helpers live in `components/clusterSurface.helpers.ts`.
|
|
1125
1125
|
|
|
1126
|
-
**Cluster composer controls (TO, NUDGE, BRIEF).** The bottom row of the focused member's message box carries the cluster controls (`ClusterComposerButtons`, props passed `ClusterTab` -> `MemberPane` -> `TerminalInput` as `clusterControls`; single-workflow tabs have none). `TO: <NAME>` is the recipient chip; it starts as the member in view and opens a dialog with a per-member checkbox list and an EVERYONE button. Several recipients make the next send a `cluster_broadcast` (server unchanged) with `recipientWorkflowIds` omitted when every member is picked, plus the same local toast (`Sent to all M members`, `Sent to K of M members`, or `Queued for K of M members`); the chip then returns to the member in view, and also resets when focus moves. State is `ClusterTab`-local (`composerRecipients`, `recipientDraft`). BRIEF in the same row opens a two-item menu, THIS WORKER or WHOLE CLUSTER (`BriefControl` with `clusterId`). The header keeps only the LAYOUT row, the
|
|
1126
|
+
**Cluster composer controls (TO, NUDGE, BRIEF).** The bottom row of the focused member's message box carries the cluster controls (`ClusterComposerButtons`, props passed `ClusterTab` -> `MemberPane` -> `TerminalInput` as `clusterControls`; single-workflow tabs have none). `TO: <NAME>` is the recipient chip; it starts as the member in view and opens a dialog with a per-member checkbox list and an EVERYONE button. Several recipients make the next send a `cluster_broadcast` (server unchanged) with `recipientWorkflowIds` omitted when every member is picked, plus the same local toast (`Sent to all M members`, `Sent to K of M members`, or `Queued for K of M members`); the chip then returns to the member in view, and also resets when focus moves. State is `ClusterTab`-local (`composerRecipients`, `recipientDraft`). BRIEF in the same row opens a two-item menu, THIS WORKER or WHOLE CLUSTER (`BriefControl` with `clusterId`). The header keeps only the LAYOUT row, the attention badge and the plan line. `NeedsYouBadge` groups WAITING, BLOCKED, ASKED and TO ACCEPT with stopped groups first; only the first two use the theme warning colour. TO ACCEPT explicitly says acceptance is optional. With the narrow member list closed, one compact badge appears below its opener: `! <count>` counts only WAITING and BLOCKED, while optional-only ASKED/TO ACCEPT items show a plain muted number; opening the list moves the same summary into its header. Choosing a task reveals BOARD and closes the member list; "Members" in the plan line opens WORKSPACE > MEMBERS in the right panel.
|
|
1127
1127
|
|
|
1128
1128
|
**NUDGE button + modal (2026-05-11).** Separate from the TO chip. NUDGE is a larger button in the composer's bottom row beside the send area (highlighted and counting, for example `NUDGE 2`, while any member has undelivered mail); click opens a per-cluster modal with a checkbox list of every member (default selection is **empty** - operator must pick recipients explicitly; this is intentional so reflex-clicking can't fan out to everyone). Each row shows the member's role chip, busy badge, and current mailbox depth (`3 MAIL`). The SEND NUDGE button is disabled until ≥1 member is picked; on submit, the modal sends a steer message to each picked member with the canned prompt `"(nudge) Check your mailbox for any pending peer messages and continue with your assignment."` and the picked `recipientWorkflowIds`. **NUDGE ALL WITH MAIL (n)** beside SEND NUDGE runs the same per-member send for every member whose `mailboxDepth` is above zero (`membersWithMail` in `client/src/utils/clusterNudge.ts`), idle or busy, without touching the checkboxes; busy members get the active reminder through steering. Disabled with the reason when n is 0. The command palette entry `Cluster: nudge all with mail` (shown while a cluster tab is active) asks the owning `ClusterTab` through `requestNudgeAll`. After SEND NUDGE or NUDGE ALL WITH MAIL, a toast reads `Nudged N members` and, when any recipients were busy, appends `(M busy: reminded to read mail when convenient)`. Esc / clicking outside closes without sending. Modal state lives in `ClusterTab`-local `nudgeSelection: Set<string> | null` (null ≡ closed).
|
|
1129
1129
|
|
|
@@ -1277,7 +1277,7 @@ A standalone chromeless window, mounted by `main.tsx` on `?app=explorer`, sharin
|
|
|
1277
1277
|
Codex app-server clarification requests render through `OperatorQuestionNotice`.
|
|
1278
1278
|
`PendingQuestionsButton` beside the Agent/Chat composer opens all pending cards
|
|
1279
1279
|
without finding a virtualized transcript row. Options retain descriptions;
|
|
1280
|
-
freeform inputs and masked secret inputs require explicit SEND ANSWERS. Pending
|
|
1280
|
+
freeform inputs and masked secret inputs require explicit SEND ANSWERS. DISMISS closes a pending question without an answer. When it closes, its matching bell entry and desktop notification are removed; phone pushes already sent cannot be recalled. Pending
|
|
1281
1281
|
cards remain hot within the normal message cap. `ws/operatorQuestions.ts`
|
|
1282
1282
|
upserts by request ID and reconciles against `workflow_state_snapshot.operatorQuestions`;
|
|
1283
1283
|
connection/snapshot gates disable forms during reconnect, and stale cards close.
|
package/docs/FEATURES.md
CHANGED
|
@@ -17,7 +17,7 @@ controls. For installation and first session, see
|
|
|
17
17
|
| Clusters | Multi-member coordinated work | Seven size-ordered templates (Pair through Large team) plus Build my own; at most one director on new work; work size only for repeated roles; member cards default to **ROWS**; AUTO-PICKUP modes Off, Rule-based (recommended automatic), Smart Observe-only, and Smart Automatic. Smart modes need an evaluator on Claude Native, Cursor, Codex, Ollama, LM Studio, llama.cpp, Strata, or DeepSeek through Xolotl. See [Getting started](GETTING_STARTED.md) and [Task ledger](TASK_LEDGER.md) |
|
|
18
18
|
| One status per tab | Shows at a glance which tabs need you | Workflow and cluster tabs show a dot when not idle (hover for the status); Home Continue cards show a word: Working, Needs you (a question waits, or an idle cluster member has mail), New reply (a turn finished while you were elsewhere; cleared when you open the tab; not saved across reloads) or Idle |
|
|
19
19
|
| Waiting mail on member cards | Shows undelivered messages per member | The member card's mail mark shows the count, delivered at the member's next turn; muted while the member is busy; highlighted when it is idle with mail, and clicking it nudges that member, after which the card reads Nudged (and the composer NUDGE button reads NUDGED n) until the member starts its turn or two minutes pass. No sounds or pop-ups |
|
|
20
|
-
|
|
|
20
|
+
| Cluster attention and board accept | Separates stopped work from optional questions and acceptance | The badge names **WAITING**, **BLOCKED**, **ASKED** and **TO ACCEPT**; only the stopped kinds use warning colour and count in the compact warning mark. Signed-off acceptance is optional. REVIEW drawers open on the verdict and existing ACCEPT/RECHECK actions; Edit is below and closed by default for REVIEW only. On the Board, **ACCEPT** replaces DONE on review cards; **ACCEPT ALL MET** accepts met sign-offs; done tasks show by default (**SHOW DONE** hides them, and the choice is remembered) and the header count matches the tasks drawn; an optional release label on a task (RELEASE in the card drawer) adds a release filter and a ready-to-release summary (in, accepted, left); review tasks older than seven days fold into an older row. Optional Settings > Agents and clusters **Board auto-done** marks met tasks done automatically. See [Task ledger](TASK_LEDGER.md) and [Settings](SETTINGS.md) |
|
|
21
21
|
| Utility agent | One operator-chosen provider and model for short side jobs | Settings > Agents and clusters (also offered on the last Welcome screen). Accepts only Claude with Native sign-in, Cursor, Codex, Ollama, LM Studio, llama.cpp, Strata, or DeepSeek through Xolotl. LM Studio, llama.cpp, Strata, and DeepSeek require the chosen model to be loaded; these requests never load or switch models. Replies that are cut off or exceed the limit are reported instead of used. Never chosen silently; **TEST** checks it; **USE UTILITY AGENT** can fill it into Smart AUTO-PICKUP, Research, document edit, and handoff summarizer pickers without changing saved choices. See [Settings](SETTINGS.md#utility-agent) |
|
|
22
22
|
| BRIEF | Short synopsis from visible activity facts | On each member card and in the composer toolbar; in a cluster tab the composer's BRIEF offers THIS WORKER or WHOLE CLUSTER. Uses the utility agent; lists the facts; sends nothing to any worker. |
|
|
23
23
|
| CATCH ME UP | Summary since the last visit or operator message | On a workflow or cluster; the utility agent writes the synopsis for the covered time range. Empty ranges offer SINCE LAST TURN, LAST HOUR and TODAY without a model call. A failed summary stays in the dialog, not in chat. Unloaded or Incognito cluster members are skipped with a note. |
|
package/docs/GETTING_STARTED.md
CHANGED
|
@@ -137,6 +137,12 @@ npm install -g arco-workbench
|
|
|
137
137
|
arco setup
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
When Arco is already installed, update with `arco update` or **UPDATE AND
|
|
141
|
+
RESTART**; do not run `npm install -g arco-workbench` over the existing package.
|
|
142
|
+
See [Updating Arco](OPERATIONS.md#updating-arco). To clear every older copy
|
|
143
|
+
before a fresh install, see
|
|
144
|
+
[Before a fresh install: remove older copies](OPERATIONS.md#before-a-fresh-install-remove-older-copies).
|
|
145
|
+
|
|
140
146
|
`arco setup` asks before installing the per-user service, starts it, and opens
|
|
141
147
|
the local URL. Use `arco start` for a foreground run. Use
|
|
142
148
|
`arco service install|uninstall|start|stop|restart|status|logs|refresh` to manage the
|
|
@@ -145,11 +151,11 @@ service directly.
|
|
|
145
151
|
If npm reports `EACCES` for a global install on Linux or macOS, use nvm or a
|
|
146
152
|
user-owned npm prefix (for example under Homebrew's Node, or a prefix you own
|
|
147
153
|
under your home directory). On Windows, run `arco.cmd` when the PowerShell
|
|
148
|
-
execution policy blocks the shim.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
154
|
+
execution policy blocks the shim. On Windows, `EEXIST` on an existing `arco`
|
|
155
|
+
launcher usually means the earlier package `@ghreprimand/arco` is still
|
|
156
|
+
installed; recover as in [Running locally](OPERATIONS.md#running-locally). If
|
|
157
|
+
`arco doctor` reports missing or incompatible native modules, install the
|
|
158
|
+
platform build tools and run:
|
|
153
159
|
|
|
154
160
|
```bash
|
|
155
161
|
arco setup --repair-native
|
|
@@ -366,7 +372,11 @@ notice and [VOICE.md](VOICE.md) before enabling hands-free mode.
|
|
|
366
372
|
- Per-project workflows, chats, plans, and project settings: `<project>/.arco`.
|
|
367
373
|
Opening a project creates that folder. It ships its own `.gitignore` so its
|
|
368
374
|
contents stay out of Git by default; adding `.arco/` to the project's root
|
|
369
|
-
`.gitignore` is a sensible extra safeguard.
|
|
375
|
+
`.gitignore` is a sensible extra safeguard. Treat `.arco/` as local state that
|
|
376
|
+
is not committed, except a skill shared through SHARE WITH REPOSITORY.
|
|
377
|
+
- Files you want kept in the project (documentation, a README, notes to commit)
|
|
378
|
+
belong in the project tree, for example `docs/`, not only under a conversation's
|
|
379
|
+
`artifacts/` folder inside `.arco`.
|
|
370
380
|
- `ARCO_HOME` relocates the global Arco home. Project state remains in each
|
|
371
381
|
project's `.arco` directory.
|
|
372
382
|
|
package/docs/GLOSSARY.md
CHANGED
|
@@ -24,6 +24,8 @@ independent. See [PHOSPHOR_DEMO.md](PHOSPHOR_DEMO.md).
|
|
|
24
24
|
|
|
25
25
|
**Activity feed** - Right-pane ACTIVITY tab. Live stream of `primary_tool_use` + `primary_thinking` deltas plus `primary_activity` (long-running background jobs). Capped at `MAX_ACTIVITY_ENTRIES = 500` per workflow.
|
|
26
26
|
|
|
27
|
+
**Advisor** - A cluster role that gives the Director a second opinion on request, challenges reasoning, recommends and states uncertainty. It changes no files, assigns no work and lands nothing.
|
|
28
|
+
|
|
27
29
|
**Agent** - Synonym for "primary." The single long-lived AI process that owns the conversation in a tab. Distinct from "worker" (short-lived sub-process spawned by a primitive).
|
|
28
30
|
|
|
29
31
|
**Arco Lite** - The current operator-driven architecture uses Review, Handoff, and Spawn primitives, with bounded, visible, logged, and reversible operator-armed automations. See [`PRIMITIVES.md`](PRIMITIVES.md) for the operator primitives and [`PROTOCOL_CLUSTER.md`](PROTOCOL_CLUSTER.md) for cluster roles and behavior.
|
|
@@ -76,7 +78,9 @@ Also: **inline artifact** - fenced `arco-artifact` blocks the primary emits duri
|
|
|
76
78
|
|
|
77
79
|
**DEBAG gate** (Durable Edit-Before-Approve Gate, `docs/PRIMITIVES.md`) - When **reviewSafeMode** is on and the model proposes a sensitive tool call (`GateCategory: 'bash' | 'git-destructive' | 'write-outside-cwd' | 'kill-shell'`; allowlist in `gateReview.ts`), the Native worker parks the turn (`pendingGates`) and emits `gate_required` (durable in events.jsonl + a `gateStore.ts` sidecar at `<cwd>/.arco/workflows/<wfid>/gate-approvals.json`, so a restart reconstructs pending gates). The operator resolves via the editable `GateApprovalNotice` card - `gate_reply` (`decision: 'approve' | 'reject'`, with an optionally edited `finalArgs`) or `gate_revoke`; resolution emits `gate_resolved` (carrying a `wasEdited` audit bit). A standing "approve all like this" (`gate_reply.remember`, honored only on an unedited approve) is keyed by the call's non-lossy signature and surfaced via `gate_standing` with revoke controls. Native-only v1. See **reviewSafeMode**.
|
|
78
80
|
|
|
79
|
-
**
|
|
81
|
+
**Designer** - A cluster role responsible for how screens look and read, including layout, states, wording and accessibility. It changes UI files only.
|
|
82
|
+
|
|
83
|
+
**Director** - A cluster member whose role hint is `DIRECTOR` (one of the eight canonical `clusterRolePresets`; roles beginning with Director or Coordinator also count). By convention, the director owns the task graph: it creates and links tasks, assigns workers, monitors progress, and reads synthesis results. The director contract also requires staying available to the operator: hand the project's checks to the Tester (or a Builder when there is no Tester), hand CI watching to the change's author, and never sleep or poll inside a turn for more than 60 seconds. A cluster may have at most one director; create, role change, replace and preset save refuse a second. The Director reads the diff and checks that project-required checks ran, without inventing gates or permanent rules from one-off incidents. Before blocking work, the Director states what a user would lose. The role remains a system-prompt hint for day-to-day behavior, and the director cannot set tasks `done` (operator-only fence). See `docs/PROTOCOL_CLUSTER.md`.
|
|
80
84
|
|
|
81
85
|
**Dispatcher** - The operator-armed server-side daemon (`server/src/taskDispatcher.ts`) that deterministically assigns `ready` tasks to idle cluster members. Two modes: `cluster_dispatch_once` (one-shot sweep) and an armed daemon (persistent, toggled via `cluster_dispatch_toggle`). Eligibility: task status `ready`, no open run at the per-member cap, matching member capability. Creates a claim + run before firing the synthetic worker turn. Default OFF; persisted in cluster meta; no double-dispatch on server restart.
|
|
82
86
|
|
|
@@ -314,7 +318,7 @@ Also: **inline artifact** - fenced `arco-artifact` blocks the primary emits duri
|
|
|
314
318
|
|
|
315
319
|
**Circuit breaker** (Codex appserver) - safeguard in `server/src/providers/codex-appserver/index.ts`. Counts consecutive `ensureStarted` / spawn failures; after N failures degrades the tab back to `exec` transport so one dead app-server process doesn't permanently block that tab. Resets on a successful turn completion.
|
|
316
320
|
|
|
317
|
-
**Role preset** - One of the
|
|
321
|
+
**Role preset** - One of the eight canonical cluster-member role hints (DIRECTOR / BUILDER / REVIEWER / RESEARCHER / TESTER / DOCUMENTER / ADVISOR / DESIGNER) defined in [`shared/src/clusterRolePresets.ts`](../shared/src/clusterRolePresets.ts). Operator picks via the `SET` popover on a `MemberRow`; written to `cluster_member_role_set` as the preset's body text. `presetForText` round-trips a stored body back to its preset id (used to highlight the active preset on EDIT and to label the `MemberCard` chip - free-form text labels as `CUSTOM`).
|
|
318
322
|
|
|
319
323
|
**ATTACH TO CLUSTER** - Save button on `PlanCandidateBanner` when the active workflow is a cluster member; it takes the place of SAVE & ATTACH. Routes the plan candidate to the cluster's shared PLAN via `cluster_plan_set` instead of attaching to the worker's per-tab plan slot. See [`PRIMITIVES.md section Cluster-attached plan + role hints`](PRIMITIVES.md).
|
|
320
324
|
|
package/docs/GOTCHAS.md
CHANGED
|
@@ -200,11 +200,22 @@ These guardrails bound worker memory use and prevent a runaway subprocess from d
|
|
|
200
200
|
- **Claude effort levels use doc overrides on top of `/v1/models`.** The live Anthropic catalog can lag newly-published model behavior; on 2026-05-30 it reported Opus 4.8 without `xhigh` while the current API and Claude Code docs list `low/medium/high/xhigh/max`. `effortsForModel()` unions live catalog levels with `CLAUDE_MODEL_EFFORTS` for known Claude IDs so pickers match the documented surface. Fable 5 / Mythos 5 and Opus 4.7/4.8 are adaptive-thinking models with `low/medium/high/xhigh/max`; keep 4.6/Sonnet 4.6 at `low/medium/high/max` (no `xhigh`). `ultracode` is intentionally not in `EffortLevel`: it is a Claude Code session setting (`xhigh` plus dynamic workflow permission), not an API effort value.
|
|
201
201
|
- **ARG_MAX overflow on `--append-system-prompt`** (Claude). Long appendSystemPrompts can push argv past Linux's per-arg limit (~128 KB); the CLI `E2BIG`s the spawn. Mitigation in claude.ts: above `APPEND_SP_ARG_MAX` (64 KB) it writes the value to `/tmp/arco-prompts/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 inline `--append-system-prompt`. Tmpfiles are cleaned up on settle and on server exit.
|
|
202
202
|
- **A CLI that is installed but crashing must NOT collapse into "not installed" - `probeVersion` returns `'unknown'` (absent, ENOENT) vs `'broken'` (present, non-zero exit), and the PROVIDERS popover hides only the former.** 2026-09-03: the popover's own codex update command (`npm install -g @openai/codex@latest`, `capabilities.ts` `UPDATE_COMMAND`) silently skipped the 129 MB `@openai/codex-linux-x64` platform binary - it's an **optional** dependency, so npm exited 0 and reported success - leaving a launcher that threw `Missing optional dependency` on every invocation. `probeVersion` caught the throw and returned `'unknown'`, the popover's `version === 'unknown'` filter dropped the row, and CODEX vanished from the UI entirely: no error, no version, nothing to click. Auth compounded it - `getCodexAuthStatus` shells `codex login status`, so every profile reported logged-out despite intact `auth.json` files, sending the operator after a credential problem that did not exist. Three invariants: (1) keep the absent/broken distinction in `probeVersion` - collapsing them is what made the failure invisible; (2) `runCliUpdate` must not infer success from the version string merely *changing* (`'unknown' !== '0.153.1'` read as `updated: true` and rendered `→ vunknown`) - a post-update probe that can't report a version is a **failure**, and `probeFailureReason` re-runs the binary to surface its first `Error:` line; (3) an update failure is sticky in the popover (it survives the 6 s auto-clear) - auto-dismissing the only line that explains the breakage is how this stayed unexplained. Note the recovery trap: capabilities re-probe only at boot and every 4 h (`index.ts periodicCapabilityProbe`), and the sole manual re-probe is clicking the provider row - which is hidden while broken, so a service restart was the only way out.
|
|
203
|
-
- **Provider updates resolve an installable version BEFORE installing - `@latest` is not automatically installable.** `npmPlatformResolve.ts` (`resolveInstallableVersion`,
|
|
204
|
-
- **Multiple Codex CLI installs can coexist.** Arco
|
|
203
|
+
- **Provider updates resolve an installable version BEFORE installing - `@latest` is not automatically installable.** `npmPlatformResolve.ts` (`resolveInstallableVersion`, used by the Codex installation decision) asks the registry whether the `latest` wrapper's **self-published** platform build exists for this `platform-arch` and, if it doesn't, walks back to the newest version that has one and reports a `notice`. This closes the 2026-09-03 / 2026-09-04 codex breakage at the cause rather than after the fact. The cause is a **publish race**, which is why it recurs: upstream moves the `latest` dist-tag when the wrapper is published and the six platform tarballs land separately. Observed directly on 2026-09-04 - at 19:12 local `@openai/codex@0.153.3` was `latest` with no `0.153.3-linux-x64` in the registry (the `linux-x64` dist-tag still read `0.153.2`); by 19:35 the build had appeared and the identical install succeeded. Anyone clicking update inside that window gets a broken codex; clicking again later silently fixes it. Three invariants: (1) **the `ownPackage` narrowing in `findPlatformDep` is load-bearing** - some CLIs optionally depend on third-party platform packages and run fine without them. Resolve only a platform build published by the CLI package itself; do not downgrade a working CLI based on an unrelated optional dependency. (2) **Never infer success from npm's exit code** - a skipped optional dep exits 0; success is "the binary runs afterwards," which is why `runCliUpdate` still probes and still keeps the post-flight `--force` retry for the case where npm skips a build that *does* exist. (3) **A walk-back is a downgrade, not a fix** - it is capped at `MAX_WALK_BACK` (25) so a package that genuinely stopped shipping this platform fails loudly instead of silently installing something ancient, and the operator-facing notice says to re-run once upstream finishes publishing. Registry lookups are pure HTTP against `registry.npmjs.org`; the abbreviated packument (~4 MB for codex) is fetched **only** on the walk-back path, and an unknown registry result returns null. The Codex update decision now defers an unknown result rather than attempting an unchecked `@latest` install. Once the registry confirms a missing platform build, an unreadable or unusable fallback list defers the update without running npm or replacing the working CLI. Parser shape pinned by `npmPlatformResolve.test.ts`.
|
|
204
|
+
- **Multiple Codex CLI installs can coexist.** PATH order determines which binary Arco runs. The update decision resolves that launcher, distinguishes a recognised standalone release from a proven current npm global package and refuses unknown ownership. A standalone updater never reaches npm, including repair. npm updates require a matching current global package root. Do not replace ownership checks with a filename or a directory-name guess.
|
|
205
|
+
|
|
206
|
+
### Provider update limits
|
|
207
|
+
|
|
208
|
+
`cliUpdateDecision.ts` supplies the Codex action and the target behind its update flag. Standalone release ownership follows the canonical release layout beneath the configured Codex home; the visible command directory must match the installer's default or retained `CODEX_INSTALL_DIR`. The npm package must match the current `npm root -g`. An npm wrapper belonging to another prefix is refused. No install runs for an unknown installation or a standalone release without `codex update`.
|
|
209
|
+
|
|
210
|
+
The npm registry remains the published-version source for standalone installations. There is no separate standalone release feed in this release, so differences between npm and the standalone channel cannot be resolved here. There is also no separate Homebrew cask ownership or version lookup: an unrecognised Homebrew installation receives manual instructions rather than an npm install. These are deliberate scope limits; a location under a Homebrew prefix alone does not prove ownership.
|
|
211
|
+
|
|
212
|
+
Keep the npm platform-build preflight. Modern Codex's own updater cannot pin the older version selected during a publication gap, so defer until the latest platform package exists. Older npm CLIs without self-update support can still use the pinned installable version. Never downgrade a running version that is already newer. Registry failures defer instead of attempting an unchecked install.
|
|
213
|
+
|
|
214
|
+
Updater exit status and the post-update version are separate evidence. A nonzero exit is a failure even if the old version still runs; a zero exit with a broken executable is also a failure. An unchanged version is current only after a successful comparison with the selected target. An update result stays visible and wraps in the existing provider row; instructions and failures must remain readable by touch and keyboard without hover.
|
|
205
215
|
|
|
206
216
|
## Claude Native transport
|
|
207
217
|
|
|
218
|
+
- **A local tool result does not close pending Native server calls.** A mixed response can return `stop_reason: tool_use` before its web search or web fetch results arrive. Match server calls and results by ID across assistant messages in the active turn. While any remain pending, send only the local tool results, leave steering queued and defer in-turn compaction. Each held message gets one notice, even across several pending rounds. Deliver at the next safe local-tool boundary or through the existing next-turn queue. Never fabricate a result or strip search evidence or thinking to insert a steer; actual-abort recovery stays separate.
|
|
208
219
|
- **Ripgrep stdout mixes matches and binary warnings.** Native Grep parses each newline-delimited record before looking for its NUL filename separator. A binary warning has no separator and must be skipped by itself; consuming through the next separator would discard the following text match. The bounded-read regression sorts filenames so the binary warning precedes a readable file.
|
|
209
220
|
|
|
210
221
|
- **Agent shell commands and hooks go through `commandShell()`.** `server/src/commandShell.ts` returns `/bin/sh` on Linux and macOS, Git Bash on Windows and PowerShell on Windows without Git Bash; never spawn `/bin/sh` or `bash` directly for the Bash tools, hooks or sandbox shell scripts, and build the arguments with `shellInvocation()` (PowerShell gets an encoded command, or a temporary script that `cleanup()` removes). Start such children with `spawnShellChild()` and kill them with `signalChildTree()` from `server/src/workers/processKill.ts`: `process.kill(-pid)` does not exist on Windows, `taskkill /T` misses an MSYS background job whose forked parent has exited (the child's `ARCO_PROCESS_TREE` tag finds it through Git Bash's `/proc`), and Node's own argument quoting halves a pair of backslashes on the way into Git Bash (`msysQuote()` with a verbatim command line does not). A hook that cannot start never blocks (`notRun`).
|
|
@@ -228,6 +239,7 @@ These guardrails bound worker memory use and prevent a runaway subprocess from d
|
|
|
228
239
|
- **Anthropic SDK pins `authToken` at construction; rebuild on rotation.** `new Anthropic({ authToken })` captures the token by value - refreshing the token file on disk does NOT update an existing client. A long-lived Native worker that survived a RE-LOGIN keeps its stale token and 401s every subsequent call until the tab closes. `ClaudeNativeWorker.ensureStarted()` stamps `clientTokenObtainedAt` from `ensureLiveTokens()` and rebuilds the SDK client on mismatch (logs `tokens rotated - rebuilding Anthropic client`). The rotation path skips `discoverHooks` and the `init` emit - both are first-time-wiring concerns. Don't pin the SDK client across a token rotation; the auto-refresh path inside `ensureLiveTokens` benefits from the same rebuild.
|
|
229
240
|
- **Callback port (53692) EADDRINUSE.** When the local OAuth callback server can't bind, `oauth.ts` falls back to manual-paste mode automatically and surfaces a flag the UI shows. Don't try a different port - Anthropic's redirect URI is registered against the constant.
|
|
230
241
|
- **H10: the Native worker honors Anthropic's OWN retry timing on 429/529/overload - and with the SDK's internal retries off (`maxRetries:0`) this ladder is the ONLY backoff.** `rateLimit.ts resolveRateLimitWait` reads `retry-after` (delta-seconds or HTTP-date) first, else the soonest `anthropic-ratelimit-*-reset` RFC-3339 timestamp; `classifyRateLimit` distinguishes a genuine rate limit from an overload. When no usable header is present (mid-stream SSE errors carry none) it falls back to the fixed 15/30/60s ladder. Don't re-enable SDK `maxRetries` to "help" - you'd double the backoff and lose the header-honoring wait.
|
|
242
|
+
- **Native gateway and connection failures share that ladder.** HTTP 502/503/504 and 520-524, SDK connection failures/timeouts and recognized dropped-socket errors retry within the existing three-attempt budget. User abort stays fatal. Keep the `text_discard` path for mid-stream retries and the delivered-prefix tracking that prevents duplicate system deltas. Exhaustion reports a short error and an intact-conversation notice; raw gateway bodies never enter either message. The best-effort token counter and compaction requests have separate failure paths.
|
|
231
243
|
- **Wire fingerprint pin is deliberate, not tracked.** `claude-cli/2.1.319` today (`wireFingerprint.ts`; 2.1.75 from Pi -> 2.1.257 for Fable 5.1 -> 2.1.280 for Opus 5.5; 2.1.319 for Fable 5.2, which requires at least 2.1.290). Bumping is a deliberate revalidation against an observed Anthropic-side rejection - not a routine `npm update` or `claude update`. Same rule for `@anthropic-ai/sdk@^0.91.1` (verify `Anthropic({ authToken })` field name + stream-event shape on bumps).
|
|
232
244
|
- **`anthropic-dangerous-direct-browser-access` IS sent on Claude Native OAuth requests.** Current Pi sends it on the SDK `authToken` path together with `x-app: cli`; Arco follows that wire fingerprint. Older Arco docs said Pi did not send it - that was stale after re-checking `earendil-works/pi` on 2026-05-31.
|
|
233
245
|
- **Native web search/fetch are Anthropic server tools, and their response `usage` is NOT the CTX bar.** `buildToolDefs()` appends Anthropic `web_search_20260209` / `web_fetch_20260309` plus `code_execution_20260120` (required for the efficient 2026 dynamic-filtering path). The response usage fields can include internal search/fetch processing tokens from a single request; those are real billing/processing telemetry but they can be hundreds of thousands of tokens larger than the retained conversation context. Do not drive `CTX: N / window` from `response.usage` on server-tool turns. Worker code prunes completed-turn server-tool evidence / citation metadata / hidden thinking from retained Native history, then uses `messages.countTokens()` with client tools only to estimate the next-turn prompt footprint. Do not add local `WebSearch` / `WebFetch` to `tools.ts` unless the product goal changes to operator-owned search providers; that would route browsing through Arco's dispatcher instead of Claude's native server-tool path.
|
|
@@ -312,10 +324,10 @@ These guardrails bound worker memory use and prevent a runaway subprocess from d
|
|
|
312
324
|
- **App-server transport invariants.** When `codex.transport === 'appserver'`, Codex's lifecycle / cancel / steer model is fundamentally different from `exec`. Don't regress these:
|
|
313
325
|
- **One long-lived `codex app-server` child per workflow tab**, not per turn. Cached in `server/src/providers/codex-appserver/index.ts:workersByWorkflow`, disposed only on `handleRemoveWorkflow`. Reviewers and handoff seed turns hard-code `'exec'` (in `handleReviewRequest` / `handleHandoffRequest` / `handleSpawnFromHere` / `runExportContext`) so the per-tab cache never picks them up - don't thread `codexTransport` through those paths.
|
|
314
326
|
- **Cancel is a two-step `turn/interrupt` RPC, not SIGKILL.** Operator cancel sends `turn/interrupt`, waits up to 5 s for the `turn/completed { status: 'interrupted' }` notification, then settles. If the ack times out or the RPC errors, fall through to SIGKILL the app-server child and emit a fatal - the next operator turn re-resumes the thread on disk via `thread/resume`. Don't shortcut to SIGKILL on the happy path; the structured cancel keeps the rollout consistent.
|
|
315
|
-
- **`turn/steer` requires `expectedTurnId` and races against `turn/completed`.** The steer drain hook fires on every `item/completed`. Between drain and round-trip the turn can end; Codex enforces `expectedTurnId` and the steer fails with a mismatch error. Treat that as expected and re-queue via `WorkerConfig.requeueSteer`: `activeTurnNotSteerable {turnKind:'review'|'compact'}` → re-enqueue to **steer** bucket; mismatched turn id or generic transport error → re-enqueue to **follow-up**. Don't paper over the failure or land the steer in a future turn implicitly.
|
|
327
|
+
- **`turn/steer` requires `expectedTurnId` and races against `turn/completed`.** The steer drain hook fires on every `item/completed`. Between drain and round-trip the turn can end; Codex enforces `expectedTurnId` and the steer fails with a mismatch error. Treat that as expected and re-queue via `WorkerConfig.requeueSteer`: `activeTurnNotSteerable {turnKind:'review'|'compact'}` → re-enqueue to **steer** bucket; mismatched turn id or generic transport error → re-enqueue to **follow-up**. Don't paper over the failure or land the steer in a future turn implicitly. If the failure returns after settlement, `requeueSteerForWorker` starts the existing idle-queue drain instead of waiting for another operator send. A pending drain keeps later input queued during async preflight, and the normal admission path still enforces STOP, hold, membership and interrupt-epoch ownership. Both buckets retain their existing priority and delivery receipts.
|
|
316
328
|
- **The toggle flips per-tab, not the running process.** `WorkflowConfig.codexTransport` switches what the *next* operator turn picks up; an already-spawned app-server child stays mounted until the tab closes, regardless of toggle direction. Don't add a "kill on toggle to exec" path - it'd break parity with the documented contract and risk a half-stopped tab. The idle child's RSS is O(100 MB) so the leak window is cheap.
|
|
317
329
|
- **Refresh cached-worker config every turn.** The app-server child is long-lived, but `WorkerConfig` is per-turn. `CodexAppServerTurn.spawn()` must call `worker.updateConfig(config)` before `ensureStarted()` / `beginTurn()` so current-turn attachments become `localImage` input items, non-image attachments fold into the text tail, and live model/effort/cwd/sandbox changes don't reuse stale values from the first turn that created the child. Claude Native has the same pattern. If a current-turn image shows in `user_message_echo.attachments` but the Codex rollout has `images:[]` / `local_images:[]`, this invariant is the first thing to check.
|
|
318
|
-
- **Clarification questions are separate from approvals.** The app-server worker intercepts `item/tool/requestUserInput` for explicit operator answers; approval requests keep deterministic declines. Async `agentMessage.delivery=async` question cards
|
|
330
|
+
- **Clarification questions are separate from approvals.** The app-server worker intercepts `item/tool/requestUserInput` for explicit operator answers; approval requests keep deterministic declines. Async `agentMessage.delivery=async` question cards close when their own thread and turn settle and reply through normal operator messages while pending. DISMISS sends empty answers on the original RPC before publishing closure, or closes a message question directly. RPC handles close with their turn; cancel/transport death closes all handles. Reconnect snapshots must include `operatorQuestions: []` when none remain, so replayed questions cannot silently reactivate after a restart. Redact secret answers before publishing/persistence.
|
|
319
331
|
- **NDJSON over stdio, no JSON-RPC envelope.** Codex's app-server emits bare `{id, method, params}` / `{id, result}` / `{method, params}` lines, not the `"jsonrpc":"2.0"` form. `jsonRpc.ts` parses both directions accordingly. If a future Codex bump starts emitting the envelope field, allow it - don't reject.
|
|
320
332
|
- **`serverOverloaded` is model capacity, not provider quota.** Codex app-server used that enum for the "Selected model is at capacity" error. Marking it throttled promoted one model's transient capacity miss into a provider-wide 30-minute cooldown, made the header claim an invented quota reset, and stopped operator-armed Goal Runs. Only `usageLimitExceeded`, an explicit HTTP 429, or a 429/Too-Many-Requests fallback message changes quota state. Keep `serverOverloaded` as the visible turn error and let the operator retry or choose another model. Regression: `npm run test:codex-quota`.
|
|
321
333
|
- **Operator compact (`thread/compact/start`) must stay locked until the compact turn's own `turn/completed`.** Codex models compaction as an internal turn, but the `Turn` binding carries NO `turnKind`; `compacting` isolates it and `compactTurnId` records the id from `turn/started` without adopting it into operator `current`. `thread/compacted` means the summary landed, **not that the turn is idle** - never resolve on it. A compaction can outlast a short timeout; returning `ok:true` early unlocks Arco while sends during the remaining compaction bounce as `ActiveTurnNotSteerable { turn_kind: Compact }`. The waiter must be registered BEFORE `thread/compact/start` so a fast completion cannot race ahead of it. The 10-minute ceiling is a hard failure: kill/recycle the app-server worker, emit `Compact failed`, and resume the durable thread on the next turn - never claim timeout as success. `teardownProcess()` resolves waiters as `transport-ended`, also a failure. Pinned by `npm run test:codex-compact-lifecycle`.
|
|
@@ -551,7 +563,7 @@ Cursor is an ACP provider (`cursor-agent acp`). Current transport details are su
|
|
|
551
563
|
- **Long-user-message auto-collapse thresholds** (`ChatMessage.tsx`): 800 chars OR 12 lines. Pastes over either threshold route to `LongUserMessage` pill (expandable, same pattern as `HandoffSeedPill`). Attachment chips stay visible on the collapsed pill so operators can see what was sent. Content is always sent verbatim to the agent regardless of render state - only composer transform is `value.trim()` at `TerminalInput.handleSubmit`.
|
|
552
564
|
- **Prior-sessions compression collapses everything through the _most recent_ handoff seed** - one pill at the top, not nested per-handoff. Expanding re-inlines the full history with intermediate handoff seeds rendering as their own `HandoffSeedPill` pills (stacked handoffs still navigable). Message count for the label filters out `toolUse` entries so "N messages" reflects real turns, not tool-call rows.
|
|
553
565
|
- **Operator-message and `LongUserMessage`-expanded text is linkified via `utils/linkify.tsx`**. Operator messages render as plain text (no markdown, intentionally - operator markdown in the composer would be surprising), so the linkifier is the only path that makes URLs clickable there. Assistant messages go through remark-gfm + the `a → target="_blank"` override and don't need it. Linkifier strips trailing punctuation (`. , ; ) ]`) off the URL so "see https://example.com." links the URL and leaves the period.
|
|
554
|
-
- **Attachment pills open `FileViewerModal`, not a custom viewer.** `AttachmentPill` (used by `ChatMessage` + `LongUserMessage`) opens the uploaded file's absolute path via `/api/file-content`. Uploads live
|
|
566
|
+
- **Attachment pills open `FileViewerModal`, not a custom viewer.** `AttachmentPill` (used by `ChatMessage` + `LongUserMessage`) opens the uploaded file's absolute path via `/api/file-content`. Uploads live in the configured uploads folder (see `POST /upload`), including the runtime home for a packaged install. The file-content endpoint confines reads to permitted roots and checks spelling and canonical paths. Runtime-home access permits only the uploads directory and direct files in it; nested paths and protected state remain denied, including through aliases.
|
|
555
567
|
- **Client `sessionChat` is deliberately NOT cleared on `handoff_complete`** - pre-handoff content stays visible above the `[HANDOFF]` marker for continuity.
|
|
556
568
|
- **`ChatMessage.tsx` ReactMarkdown overrides `a → target="_blank" rel="noopener noreferrer"`** so URLs the primary emits don't navigate the Arco tab away. Other ReactMarkdown sites (modals/dialogs) deliberately unchanged until a concrete report hits them.
|
|
557
569
|
- **`TerminalInput.isBusy` is a three-way OR**: `(job.busy === true) || hasActiveWorkers || hasStreaming`. Any code path that ends a turn must clear all three, or the composer stays locked in interjection mode. Normal turn-end works because `primary_complete` fires `finalizeMessage` (flips the live message's `isStreaming: false`) and `primary_turn_ended` fires `endPrimaryTurn` (flips `busy: false`). The cancel path skips `primary_complete` - `endPrimaryTurn` therefore also walks `job.messages` and finalizes any `isStreaming: true` entries itself (matches `applyWorkflowSnapshot`'s behavior when it sees `busy: false`). `recordTurnCancelled` does the same defensive clear so the cancel path doesn't depend on a trailing `primary_turn_ended` to unstick the composer. If you add a new "turn ended" event, either route it through `endPrimaryTurn` or replicate the streaming-finalize step explicitly.
|