arco-workbench 0.1.7 → 0.1.8
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 +52 -12
- package/README.md +14 -12
- package/client/dist/assets/{PhosphorBackdrop-DVQdBrTw.js → PhosphorBackdrop-D7jdAV_G.js} +1 -1
- package/client/dist/assets/{ThemedBackgroundShaderImpl-BfSs2tB4.js → ThemedBackgroundShaderImpl-DrDm60h8.js} +1 -1
- package/client/dist/assets/{XtermView-DaMjC8Ny.js → XtermView-BGFujb1e.js} +1 -1
- package/client/dist/assets/{galleryEditor-BCQnXj7R.js → galleryEditor-D951A2sE.js} +1 -1
- package/client/dist/assets/{index-COfbHCYv.js → index-CsVy3eZm.js} +246 -246
- package/client/dist/index.html +1 -1
- package/client/src/components/ClusterRightPanel/ReplaceMemberDialog.tsx +65 -15
- package/client/src/components/ClusterRightPanel/SkillsControl.tsx +107 -0
- package/client/src/components/ClusterRightPanel/index.tsx +4 -0
- package/client/src/components/ClusterTaskBoardTab.tsx +9 -22
- package/client/src/components/NeedsYouBadge.tsx +3 -3
- package/client/src/components/ProviderReleasesModal.tsx +8 -4
- package/client/src/components/ProvidersPopover.tsx +28 -23
- package/client/src/components/SettingsPanel.tsx +2 -2
- package/client/src/components/SkillsSettings.tsx +5 -0
- package/client/src/components/TabBar.tsx +91 -9
- package/client/src/components/TerminalInput.tsx +12 -10
- package/client/src/components/TranscriptSendDialog.tsx +12 -8
- package/client/src/components/TranscriptWorkerDialog.tsx +119 -0
- package/client/src/components/clusterNeedsYou.ts +11 -18
- package/client/src/help/content/cluster.tsx +38 -17
- package/client/src/help/content/composer.tsx +22 -0
- package/client/src/help/content/header.tsx +16 -0
- package/client/src/help/content/misc.tsx +8 -0
- package/client/src/help/content/settings.tsx +18 -4
- package/client/src/help/content/tabbar.tsx +5 -0
- package/client/src/help/manualSections/actions.tsx +31 -0
- package/client/src/help/manualSections/clusters.tsx +41 -20
- package/client/src/help/manualSections/configuration.tsx +18 -0
- package/client/src/help/manualSections/maintenance.tsx +18 -0
- package/client/src/help/manualSections/providers.tsx +32 -8
- package/client/src/help/manualSections/troubleshooting.tsx +2 -1
- package/client/src/help/manualSections/workflows.tsx +12 -0
- package/client/src/help/manualSections/workspace.tsx +6 -0
- package/client/src/utils/transcriptWorkerRequest.ts +24 -0
- package/client/src/ws/handleServerMessage.ts +8 -2
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CLIENT.md +9 -8
- package/docs/FEATURES.md +8 -5
- package/docs/GETTING_STARTED.md +4 -3
- package/docs/GOTCHAS.md +2 -1
- package/docs/OPERATIONS.md +14 -4
- package/docs/PERSISTENCE.md +7 -2
- package/docs/PRIMITIVES.md +42 -0
- package/docs/PROTOCOL_CLUSTER.md +42 -3
- package/docs/PROTOCOL_PRIMITIVES.md +39 -0
- package/docs/PROVIDERS.md +50 -13
- package/docs/SETTINGS.md +27 -3
- package/docs/TASK_LEDGER.md +7 -15
- package/native/darwin-arm64/manifest.json +1 -1
- package/node_modules/@arco/shared/dist/clusterCoordination.d.ts +2 -0
- package/node_modules/@arco/shared/dist/clusterCoordination.js +5 -1
- package/node_modules/@arco/shared/dist/protocol/clientMessages.d.ts +3 -2
- package/node_modules/@arco/shared/dist/protocol/clusters.d.ts +13 -1
- package/node_modules/@arco/shared/dist/protocol/index.d.ts +1 -0
- package/node_modules/@arco/shared/dist/protocol/index.js +1 -0
- package/node_modules/@arco/shared/dist/protocol/models.d.ts +4 -3
- package/node_modules/@arco/shared/dist/protocol/models.js +26 -2
- package/node_modules/@arco/shared/dist/protocol/serverMessages.d.ts +2 -1
- package/node_modules/@arco/shared/dist/protocol/tasks.d.ts +4 -0
- package/node_modules/@arco/shared/dist/protocol/transcriptWorker.d.ts +47 -0
- package/node_modules/@arco/shared/dist/protocol/transcriptWorker.js +2 -0
- package/node_modules/@arco/shared/dist/runtimeVersions.d.ts +1 -0
- package/node_modules/@arco/shared/dist/runtimeVersions.js +14 -0
- package/node_modules/@arco/shared/package.json +1 -1
- package/package.json +2 -2
- package/scripts/packaging/arco.mjs +1 -1
- package/scripts/packaging/native-repair.mjs +32 -4
- package/server/dist/atomicFile.js +1 -2
- package/server/dist/capabilities.d.ts +5 -2
- package/server/dist/capabilities.js +59 -9
- package/server/dist/cliUpdateDecision.d.ts +1 -1
- package/server/dist/cliUpdateDecision.js +5 -3
- package/server/dist/clusterDirector.js +1 -1
- package/server/dist/clusterPeerOps.js +10 -7
- package/server/dist/clusterProgress.js +1 -1
- package/server/dist/clusterSkills.d.ts +13 -0
- package/server/dist/clusterSkills.js +81 -0
- package/server/dist/clusterSnapshots.js +2 -0
- package/server/dist/clusterStore.d.ts +7 -2
- package/server/dist/clusterStore.js +42 -1
- package/server/dist/diagnostics/codeSkew.js +1 -0
- package/server/dist/eventLog.d.ts +7 -0
- package/server/dist/eventLog.js +70 -13
- package/server/dist/historyLimits.d.ts +1 -0
- package/server/dist/historyLimits.js +3 -0
- package/server/dist/http/router.js +1 -1
- package/server/dist/index.js +24 -1
- package/server/dist/jsonlLines.d.ts +4 -0
- package/server/dist/jsonlLines.js +53 -0
- package/server/dist/management/identity.js +1 -0
- package/server/dist/mcp/clusterMcpTools.js +4 -4
- package/server/dist/project/taskLedger.d.ts +4 -0
- package/server/dist/project/taskLedger.js +7 -4
- package/server/dist/providerConversation.d.ts +1 -0
- package/server/dist/providerConversation.js +17 -0
- package/server/dist/providers/claude-native/resumeSummary.d.ts +9 -0
- package/server/dist/providers/claude-native/resumeSummary.js +102 -49
- package/server/dist/providers/claude-native/worker.js +8 -4
- package/server/dist/providers/claude.js +2 -1
- package/server/dist/providers/clusterTaskToolDefinitions.js +4 -4
- package/server/dist/providers/codex-appserver/catalog.js +16 -1
- package/server/dist/providers/codex.js +2 -1
- package/server/dist/providers/codexCodeMode.d.ts +1 -1
- package/server/dist/providers/codexCodeMode.js +4 -3
- package/server/dist/providers/cursor/print.js +2 -1
- package/server/dist/providers/cursor/worker.js +2 -1
- package/server/dist/providers/llamacpp.js +17 -8
- package/server/dist/providers/ollamaRecovery.js +6 -6
- package/server/dist/providers/ollamaResilience.js +3 -3
- package/server/dist/providers/ollamaTokens.js +1 -1
- package/server/dist/quota.d.ts +0 -18
- package/server/dist/quota.js +0 -44
- package/server/dist/replacementHistory.d.ts +19 -0
- package/server/dist/replacementHistory.js +49 -0
- package/server/dist/server/broadcast.d.ts +2 -1
- package/server/dist/server/broadcast.js +1 -0
- package/server/dist/server/prompts.d.ts +1 -0
- package/server/dist/server/prompts.js +6 -1
- package/server/dist/sessionJsonl.d.ts +1 -1
- package/server/dist/sessionJsonl.js +115 -40
- package/server/dist/smartPickupAdapters.js +15 -2
- package/server/dist/transcriptWorker.d.ts +34 -0
- package/server/dist/transcriptWorker.js +201 -0
- package/server/dist/workflowStore.d.ts +1 -0
- package/server/dist/workflowStore.js +31 -0
- package/server/dist/ws/clusterHandlers.d.ts +1 -0
- package/server/dist/ws/clusterHandlers.js +62 -26
- package/server/dist/ws/handoffHandlers.js +5 -2
- package/server/dist/ws/transcriptWorkerHandlers.d.ts +25 -0
- package/server/dist/ws/transcriptWorkerHandlers.js +139 -0
- package/server/dist/ws/turnEngine.js +23 -9
- package/server/dist/ws/updatePrimaryConfig.js +27 -8
- package/server/dist/ws/workflowHandlers.d.ts +4 -1
- package/server/dist/ws/workflowHandlers.js +3 -1
- package/server/package.json +1 -1
- package/server/src/atomicFile.ts +1 -2
- package/server/src/capabilities.ts +58 -17
- package/server/src/cliUpdateDecision.ts +5 -4
- package/server/src/clusterDirector.ts +1 -1
- package/server/src/clusterPeerOps.ts +11 -8
- package/server/src/clusterProgress.ts +1 -1
- package/server/src/clusterSkills.ts +79 -0
- package/server/src/clusterSnapshots.ts +1 -0
- package/server/src/clusterStore.ts +38 -0
- package/server/src/diagnostics/codeSkew.ts +1 -0
- package/server/src/eventLog.ts +73 -13
- package/server/src/historyLimits.ts +2 -0
- package/server/src/http/router.ts +1 -1
- package/server/src/index.ts +23 -0
- package/server/src/jsonlLines.ts +52 -0
- package/server/src/management/identity.ts +1 -0
- package/server/src/mcp/clusterMcpTools.ts +4 -4
- package/server/src/project/taskLedger.ts +7 -5
- package/server/src/providerConversation.ts +15 -0
- package/server/src/providers/claude-native/resumeSummary.ts +98 -50
- package/server/src/providers/claude-native/worker.ts +8 -4
- package/server/src/providers/claude.ts +2 -1
- package/server/src/providers/clusterTaskToolDefinitions.ts +4 -4
- package/server/src/providers/codex-appserver/catalog.ts +14 -1
- package/server/src/providers/codex.ts +2 -1
- package/server/src/providers/codexCodeMode.ts +4 -4
- package/server/src/providers/cursor/print.ts +2 -1
- package/server/src/providers/cursor/worker.ts +2 -1
- package/server/src/providers/llamacpp.ts +18 -7
- package/server/src/providers/llamacppRecovery.ts +2 -0
- package/server/src/providers/ollamaRecovery.ts +6 -6
- package/server/src/providers/ollamaResilience.ts +3 -3
- package/server/src/providers/ollamaTokens.ts +1 -1
- package/server/src/providers/ollamaToolSubset.ts +3 -3
- package/server/src/quota.ts +0 -50
- package/server/src/replacementHistory.ts +44 -0
- package/server/src/server/broadcast.ts +2 -0
- package/server/src/server/prompts.ts +8 -1
- package/server/src/sessionJsonl.ts +92 -32
- package/server/src/smartPickupAdapters.ts +17 -3
- package/server/src/transcriptWorker.ts +182 -0
- package/server/src/workflowStore.ts +21 -0
- package/server/src/ws/clusterHandlers.ts +43 -25
- package/server/src/ws/handoffHandlers.ts +5 -1
- package/server/src/ws/transcriptWorkerHandlers.ts +126 -0
- package/server/src/ws/turnEngine.ts +20 -8
- package/server/src/ws/updatePrimaryConfig.ts +25 -6
- package/server/src/ws/workflowHandlers.ts +3 -1
- package/shared/dist/clusterCoordination.d.ts +2 -0
- package/shared/dist/clusterCoordination.js +5 -1
- package/shared/dist/protocol/clientMessages.d.ts +3 -2
- package/shared/dist/protocol/clusters.d.ts +13 -1
- package/shared/dist/protocol/index.d.ts +1 -0
- package/shared/dist/protocol/index.js +1 -0
- package/shared/dist/protocol/models.d.ts +4 -3
- package/shared/dist/protocol/models.js +26 -2
- package/shared/dist/protocol/serverMessages.d.ts +2 -1
- package/shared/dist/protocol/tasks.d.ts +4 -0
- package/shared/dist/protocol/transcriptWorker.d.ts +47 -0
- package/shared/dist/protocol/transcriptWorker.js +2 -0
- package/shared/dist/runtimeVersions.d.ts +1 -0
- package/shared/dist/runtimeVersions.js +14 -0
- package/shared/src/clusterCoordination.ts +7 -1
- package/shared/src/protocol/clientMessages.ts +5 -0
- package/shared/src/protocol/clusters.ts +16 -1
- package/shared/src/protocol/index.ts +1 -0
- package/shared/src/protocol/models.ts +31 -5
- package/shared/src/protocol/serverMessages.ts +2 -0
- package/shared/src/protocol/settings.ts +2 -3
- package/shared/src/protocol/tasks.ts +4 -7
- package/shared/src/protocol/transcriptWorker.ts +49 -0
- package/shared/src/runtimeVersions.ts +14 -0
|
@@ -3,6 +3,7 @@ import { createTwoFilesPatch } from 'diff';
|
|
|
3
3
|
import { DialogShell } from './DialogShell';
|
|
4
4
|
import { DirectoryBrowser } from './media/DirectoryPicker';
|
|
5
5
|
import { SkillEditorDialog, type SkillEditorTarget } from './SkillEditorDialog';
|
|
6
|
+
import { PinSkillDialog } from './ClusterRightPanel/SkillsControl';
|
|
6
7
|
|
|
7
8
|
// Settings > SKILLS (P8.6): list, create, edit and delete skills, plus IMPORT
|
|
8
9
|
// (GitHub link, folder, zip), UPDATE with a per-file diff, ON/OFF, MOVE between
|
|
@@ -63,6 +64,7 @@ export function SkillsSettings({ cwd }: { cwd: string }) {
|
|
|
63
64
|
const [importing, setImporting] = useState(false);
|
|
64
65
|
const [updating, setUpdating] = useState<SkillSummary | null>(null);
|
|
65
66
|
const [sharing, setSharing] = useState<SkillSummary | null>(null);
|
|
67
|
+
const [pinning, setPinning] = useState<{ skill: SkillSummary; kind: 'tab' | 'cluster' } | null>(null);
|
|
66
68
|
|
|
67
69
|
const refresh = async () => {
|
|
68
70
|
setError(null);
|
|
@@ -118,6 +120,8 @@ export function SkillsSettings({ cwd }: { cwd: string }) {
|
|
|
118
120
|
<div style={{ display: 'flex', gap: '6px', flexWrap: 'wrap' }}>
|
|
119
121
|
<button type="button" style={small} onClick={() => setEditor({ scope: s.scope, slug: s.slug })}>EDIT</button>
|
|
120
122
|
<button type="button" style={small} data-help="settings.skills.toggle" onClick={() => void toggle(s)}>{s.off ? 'TURN ON' : 'TURN OFF'}</button>
|
|
123
|
+
<button type="button" style={small} data-help="settings.skills.pin-tab" disabled={s.off} onClick={() => setPinning({ skill: s, kind: 'tab' })}>PIN TO TAB</button>
|
|
124
|
+
<button type="button" style={small} data-help="settings.skills.pin-cluster" disabled={s.off} onClick={() => setPinning({ skill: s, kind: 'cluster' })}>PIN TO CLUSTER</button>
|
|
121
125
|
{(s.scope === 'global' || cwd) && <button type="button" style={small} data-help="settings.skills.move" disabled={s.scope === 'global' && !cwd} onClick={() => move(s)}>{s.scope === 'project' ? 'MOVE TO GLOBAL' : 'MOVE TO PROJECT'}</button>}
|
|
122
126
|
<button type="button" style={small} data-help="settings.skills.duplicate" onClick={() => duplicate(s)}>DUPLICATE</button>
|
|
123
127
|
{(s.source?.kind === 'github' || s.source?.kind === 'folder') && <button type="button" style={small} data-help="settings.skills.update" onClick={() => setUpdating(s)}>UPDATE</button>}
|
|
@@ -130,6 +134,7 @@ export function SkillsSettings({ cwd }: { cwd: string }) {
|
|
|
130
134
|
|
|
131
135
|
return (
|
|
132
136
|
<div data-help="settings.skills">
|
|
137
|
+
{pinning && <PinSkillDialog skill={pinning.skill} kind={pinning.kind} cwd={cwd} onClose={() => setPinning(null)} />}
|
|
133
138
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '8px', gap: '6px' }}>
|
|
134
139
|
<span className="display-font" style={{ fontSize: '11px', letterSpacing: '2px', color: 'var(--color-accent-primary-dim)' }}>SKILLS</span>
|
|
135
140
|
<span style={{ display: 'flex', gap: '6px' }}>
|
|
@@ -3,7 +3,7 @@ import { hasWaitingQuestion } from '../questions/waitingQuestion';
|
|
|
3
3
|
import { TabStatusChip, useTabStatus } from './TabStatusChip';
|
|
4
4
|
import { clusterHasIdleMail, tabStatusPresentation } from '../utils/tabStatus';
|
|
5
5
|
import { layoutPoint } from '../utils/pointer';
|
|
6
|
-
import { useMemo, useRef, useState } from 'react';
|
|
6
|
+
import { useLayoutEffect, useMemo, useRef, useState, type ReactNode } from 'react';
|
|
7
7
|
import {
|
|
8
8
|
DndContext,
|
|
9
9
|
PointerSensor,
|
|
@@ -125,6 +125,90 @@ function applyTabOrder<T extends { id: string }>(items: T[], order: string[] | u
|
|
|
125
125
|
return [...known, ...unknown];
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
// Keep scrolling local to the strip: scrollIntoView can also move the page.
|
|
129
|
+
function TabScrollRow({ activeKey, children }: { activeKey: string; children: ReactNode }) {
|
|
130
|
+
const row = useRef<HTMLDivElement>(null);
|
|
131
|
+
const content = useRef<HTMLDivElement>(null);
|
|
132
|
+
const [edges, setEdges] = useState({ before: false, after: false });
|
|
133
|
+
|
|
134
|
+
useLayoutEffect(() => {
|
|
135
|
+
const el = row.current;
|
|
136
|
+
const inner = content.current;
|
|
137
|
+
if (!el || !inner) return;
|
|
138
|
+
const measure = () => setEdges((previous) => {
|
|
139
|
+
const before = el.scrollLeft > 1;
|
|
140
|
+
const after = el.scrollLeft + el.clientWidth < el.scrollWidth - 1;
|
|
141
|
+
return previous.before === before && previous.after === after ? previous : { before, after };
|
|
142
|
+
});
|
|
143
|
+
const reveal = (target: Element | null) => {
|
|
144
|
+
if (!target) return;
|
|
145
|
+
const bounds = el.getBoundingClientRect();
|
|
146
|
+
const tab = target.getBoundingClientRect();
|
|
147
|
+
const scale = bounds.width / el.clientWidth || 1;
|
|
148
|
+
const left = (tab.left - bounds.left) / scale;
|
|
149
|
+
const right = (tab.right - bounds.left) / scale;
|
|
150
|
+
if (left < 32) el.scrollLeft += left - 32;
|
|
151
|
+
else if (right > el.clientWidth - 32) el.scrollLeft += Math.min(left - 32, right - el.clientWidth + 32);
|
|
152
|
+
measure();
|
|
153
|
+
};
|
|
154
|
+
let width = el.clientWidth;
|
|
155
|
+
const resize = new ResizeObserver(() => {
|
|
156
|
+
if (width !== el.clientWidth) {
|
|
157
|
+
width = el.clientWidth;
|
|
158
|
+
reveal(inner.querySelector('[data-active-tab="true"]'));
|
|
159
|
+
}
|
|
160
|
+
measure();
|
|
161
|
+
});
|
|
162
|
+
resize.observe(el);
|
|
163
|
+
resize.observe(inner);
|
|
164
|
+
const wheel = (event: WheelEvent) => {
|
|
165
|
+
// Preserve native horizontal gestures and browser zoom.
|
|
166
|
+
if (event.ctrlKey || event.deltaX !== 0 || event.deltaY === 0) return;
|
|
167
|
+
const unit = event.deltaMode === 1 ? 16 : event.deltaMode === 2 ? el.clientWidth : 1;
|
|
168
|
+
const previous = el.scrollLeft;
|
|
169
|
+
el.scrollLeft += event.deltaY * unit;
|
|
170
|
+
if (el.scrollLeft !== previous) event.preventDefault();
|
|
171
|
+
};
|
|
172
|
+
const focus = (event: FocusEvent) => {
|
|
173
|
+
const target = event.target;
|
|
174
|
+
// Pointer focus must not move the control between pointerdown and click.
|
|
175
|
+
if (target instanceof Element && target.matches(':focus-visible')) reveal(target);
|
|
176
|
+
};
|
|
177
|
+
el.addEventListener('wheel', wheel, { passive: false });
|
|
178
|
+
el.addEventListener('scroll', measure);
|
|
179
|
+
el.addEventListener('focusin', focus);
|
|
180
|
+
reveal(inner.querySelector('[data-active-tab="true"]'));
|
|
181
|
+
measure();
|
|
182
|
+
return () => {
|
|
183
|
+
resize.disconnect();
|
|
184
|
+
el.removeEventListener('wheel', wheel);
|
|
185
|
+
el.removeEventListener('scroll', measure);
|
|
186
|
+
el.removeEventListener('focusin', focus);
|
|
187
|
+
};
|
|
188
|
+
}, [activeKey]);
|
|
189
|
+
|
|
190
|
+
return (
|
|
191
|
+
<div style={{ position: 'relative', minWidth: 0 }}>
|
|
192
|
+
<div ref={row} aria-label="Open tabs" style={{ overflowX: 'auto', overscrollBehaviorX: 'contain' }}>
|
|
193
|
+
<div ref={content} style={{ display: 'flex', alignItems: 'stretch', width: 'max-content', minWidth: '100%' }}>
|
|
194
|
+
{children}
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
{([-1, 1] as const).map((direction) => (
|
|
198
|
+
<button key={direction} type="button" aria-label={direction < 0 ? 'Previous tabs' : 'Next tabs'}
|
|
199
|
+
title={direction < 0 ? 'More tabs to the left' : 'More tabs to the right'} data-help="tabbar.scroll"
|
|
200
|
+
hidden={direction < 0 ? !edges.before : !edges.after}
|
|
201
|
+
onClick={() => { const el = row.current; if (el) el.scrollLeft += direction * Math.max(32, el.clientWidth * 0.7); }}
|
|
202
|
+
style={{ position: 'absolute', top: 0, bottom: 0, [direction < 0 ? 'left' : 'right']: 0,
|
|
203
|
+
width: 32, padding: 0, background: 'var(--color-bg-panel)', color: 'var(--color-accent-primary)',
|
|
204
|
+
border: '1px solid var(--color-border)', cursor: 'pointer', fontSize: 20 }}>
|
|
205
|
+
{direction < 0 ? '<' : '>'}
|
|
206
|
+
</button>
|
|
207
|
+
))}
|
|
208
|
+
</div>
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
128
212
|
export function TabBar({ onRemoveWorkflow, requestRecallSummary, onCreateCluster, onDeleteCluster, onAddClusterMember, onCreateClusterWithFreshWorkers }: Props) {
|
|
129
213
|
const jobs = useAppStore((s) => s.jobs);
|
|
130
214
|
const activeJobId = useAppStore((s) => s.activeJobId);
|
|
@@ -224,6 +308,7 @@ export function TabBar({ onRemoveWorkflow, requestRecallSummary, onCreateCluster
|
|
|
224
308
|
aria-current={showHome ? 'page' : undefined}
|
|
225
309
|
aria-label="Home: projects, open work and saved sessions"
|
|
226
310
|
data-help="tabbar.home"
|
|
311
|
+
data-active-tab={showHome}
|
|
227
312
|
className="display-font"
|
|
228
313
|
style={{
|
|
229
314
|
padding: '8px 14px',
|
|
@@ -261,13 +346,7 @@ export function TabBar({ onRemoveWorkflow, requestRecallSummary, onCreateCluster
|
|
|
261
346
|
}}
|
|
262
347
|
>
|
|
263
348
|
{/* Top row — clusters + standalone workflow tabs, drag-reorderable */}
|
|
264
|
-
<
|
|
265
|
-
style={{
|
|
266
|
-
display: 'flex',
|
|
267
|
-
alignItems: 'stretch',
|
|
268
|
-
overflowX: 'auto',
|
|
269
|
-
}}
|
|
270
|
-
>
|
|
349
|
+
<TabScrollRow activeKey={showHome ? 'home' : showCreator ? 'new' : activeClusterId ?? activeJobId ?? ''}>
|
|
271
350
|
{homeButton}
|
|
272
351
|
<DndContext sensors={sensors} onDragEnd={onDragEnd}>
|
|
273
352
|
<SortableContext items={topRowItems.map((it) => it.id)} strategy={horizontalListSortingStrategy}>
|
|
@@ -309,6 +388,7 @@ export function TabBar({ onRemoveWorkflow, requestRecallSummary, onCreateCluster
|
|
|
309
388
|
<button
|
|
310
389
|
onClick={showJobCreator}
|
|
311
390
|
data-help="tabbar.new"
|
|
391
|
+
data-active-tab={showCreator && !showHome}
|
|
312
392
|
className="display-font"
|
|
313
393
|
style={{
|
|
314
394
|
padding: '8px 14px',
|
|
@@ -324,7 +404,7 @@ export function TabBar({ onRemoveWorkflow, requestRecallSummary, onCreateCluster
|
|
|
324
404
|
>
|
|
325
405
|
+ NEW
|
|
326
406
|
</button>
|
|
327
|
-
</
|
|
407
|
+
</TabScrollRow>
|
|
328
408
|
|
|
329
409
|
{/* the per-member bottom row was removed: the cluster's
|
|
330
410
|
left-pane member cards already focus a member, the account badge
|
|
@@ -511,6 +591,7 @@ function SortableWorkflowTab({ job, isActive, onActivate, onClose, onContextMenu
|
|
|
511
591
|
<div
|
|
512
592
|
ref={setNodeRef}
|
|
513
593
|
data-help="tabbar.tab"
|
|
594
|
+
data-active-tab={isActive}
|
|
514
595
|
onContextMenu={onContextMenu}
|
|
515
596
|
{...attributes}
|
|
516
597
|
{...listeners}
|
|
@@ -597,6 +678,7 @@ function SortableClusterTab({ cluster, isActive, onActivate, onClose }: ClusterT
|
|
|
597
678
|
<div
|
|
598
679
|
ref={setNodeRef}
|
|
599
680
|
data-help="tabbar.cluster"
|
|
681
|
+
data-active-tab={isActive}
|
|
600
682
|
{...attributes}
|
|
601
683
|
{...listeners}
|
|
602
684
|
style={{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { effectiveCodexTransport } from '@arco/shared';
|
|
2
2
|
import { TurnTimer } from './TurnTimer';
|
|
3
|
+
import { SkillsControl } from './ClusterRightPanel/SkillsControl';
|
|
3
4
|
import { BriefControl } from './BriefControl';
|
|
4
5
|
import { ClusterComposerButtons, type ClusterComposerControls } from './ClusterComposerButtons';
|
|
5
6
|
import type { SpawnMemberIdentity } from '@arco/shared';
|
|
@@ -457,9 +458,9 @@ export function TerminalInput({ job, onSend, onCancel, onCancelQueued, onUpload,
|
|
|
457
458
|
const [showResearchDialog, setShowResearchDialog] = useState(false);
|
|
458
459
|
const [showTranscriptDialog, setShowTranscriptDialog] = useState(false);
|
|
459
460
|
const [showForwardDialog, setShowForwardDialog] = useState(false);
|
|
460
|
-
// Cluster lookup for
|
|
461
|
-
//
|
|
462
|
-
//
|
|
461
|
+
// Cluster lookup for existing-member transcript and forward destinations.
|
|
462
|
+
// Standalone tabs still offer TRANSCRIPT for a new worker; membership
|
|
463
|
+
// controls whether the existing peer-delivery destination is available.
|
|
463
464
|
const clusterForJob = useAppStore((s) => {
|
|
464
465
|
for (const c of Object.values(s.clusters)) {
|
|
465
466
|
if (c.members.some((m) => m.workflowId === job.id)) return c;
|
|
@@ -841,6 +842,7 @@ export function TerminalInput({ job, onSend, onCancel, onCancelQueued, onUpload,
|
|
|
841
842
|
</span>
|
|
842
843
|
)}
|
|
843
844
|
{onCancelQueued && <QueuedMessagesIndicator job={job} onCancel={onCancelQueued} />}
|
|
845
|
+
{clusterForJob && <SkillsControl cluster={clusterForJob} memberId={job.id} />}
|
|
844
846
|
{/* Standing pins persist in WorkflowConfig/meta.json and are re-injected
|
|
845
847
|
every turn. They remain visible until explicitly removed. */}
|
|
846
848
|
{pinnedSkills.length > 0 && (
|
|
@@ -1443,12 +1445,12 @@ export function TerminalInput({ job, onSend, onCancel, onCancelQueued, onUpload,
|
|
|
1443
1445
|
</button>
|
|
1444
1446
|
)}
|
|
1445
1447
|
|
|
1446
|
-
{
|
|
1448
|
+
{job.config.kind !== 'chat' && job.config.kind !== 'cluster' && (
|
|
1447
1449
|
<button
|
|
1448
1450
|
onClick={() => setShowTranscriptDialog(true)}
|
|
1449
|
-
data-help="
|
|
1451
|
+
data-help="composer.transcript-worker"
|
|
1450
1452
|
className="display-font"
|
|
1451
|
-
title="Send a
|
|
1453
|
+
title="Send a transcript to a cluster member, or copy exact turns to a new worker in another folder"
|
|
1452
1454
|
style={{
|
|
1453
1455
|
padding: '3px 8px',
|
|
1454
1456
|
background: 'transparent',
|
|
@@ -1982,15 +1984,15 @@ export function TerminalInput({ job, onSend, onCancel, onCancelQueued, onUpload,
|
|
|
1982
1984
|
/>
|
|
1983
1985
|
)}
|
|
1984
1986
|
|
|
1985
|
-
{showTranscriptDialog &&
|
|
1987
|
+
{showTranscriptDialog && (
|
|
1986
1988
|
<TranscriptSendDialog
|
|
1987
|
-
cluster={clusterForJob}
|
|
1989
|
+
cluster={clusterForJob ?? undefined}
|
|
1988
1990
|
fromWorkflowId={job.id}
|
|
1989
1991
|
messages={job.messages}
|
|
1990
|
-
onConfirm={(recipients, content) => {
|
|
1992
|
+
onConfirm={onTranscriptSend ? (recipients, content) => {
|
|
1991
1993
|
setShowTranscriptDialog(false);
|
|
1992
1994
|
for (const to of recipients) onTranscriptSend(to, content);
|
|
1993
|
-
}}
|
|
1995
|
+
} : undefined}
|
|
1994
1996
|
onCancel={() => setShowTranscriptDialog(false)}
|
|
1995
1997
|
/>
|
|
1996
1998
|
)}
|
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
// budget + dedupe gates and raises the content cap to 32 KB.
|
|
6
6
|
|
|
7
7
|
import { DialogShell } from './DialogShell';
|
|
8
|
+
import { TranscriptWorkerDialog } from './TranscriptWorkerDialog';
|
|
8
9
|
import { useMemo, useState } from 'react';
|
|
9
10
|
import type { ChatMessage, ClusterStatePayload } from '@arco/shared';
|
|
10
11
|
import { DEFAULT_TRANSCRIPT_INCLUDE, formatRow, turnBoundaries, type TranscriptInclude } from '../utils/transcriptFormat';
|
|
11
12
|
|
|
12
13
|
interface Props {
|
|
13
|
-
cluster
|
|
14
|
+
cluster?: ClusterStatePayload;
|
|
14
15
|
fromWorkflowId: string;
|
|
15
16
|
messages: ChatMessage[];
|
|
16
17
|
/** One delivery per recipient, all with the same text. */
|
|
17
|
-
onConfirm
|
|
18
|
+
onConfirm?: (toWorkflowIds: string[], content: string) => void;
|
|
18
19
|
onCancel: () => void;
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -23,7 +24,8 @@ type Scope = 'full' | 'last-turn' | 'last-n';
|
|
|
23
24
|
const MAX_BYTES = 32 * 1024;
|
|
24
25
|
|
|
25
26
|
export function TranscriptSendDialog({ cluster, fromWorkflowId, messages, onConfirm, onCancel }: Props) {
|
|
26
|
-
const peers = cluster
|
|
27
|
+
const peers = cluster?.members.filter((m) => m.workflowId !== fromWorkflowId) ?? [];
|
|
28
|
+
const [destination, setDestination] = useState<'members' | 'worker'>(peers.length && onConfirm ? 'members' : 'worker');
|
|
27
29
|
const [toWfids, setToWfids] = useState<string[]>(peers.length === 1 ? [peers[0].workflowId] : []);
|
|
28
30
|
const [note, setNote] = useState('');
|
|
29
31
|
const [include, setInclude] = useState<TranscriptInclude>(DEFAULT_TRANSCRIPT_INCLUDE);
|
|
@@ -31,9 +33,9 @@ export function TranscriptSendDialog({ cluster, fromWorkflowId, messages, onConf
|
|
|
31
33
|
const [nTurns, setNTurns] = useState(3);
|
|
32
34
|
|
|
33
35
|
const senderName = useMemo(() => {
|
|
34
|
-
const m = cluster
|
|
36
|
+
const m = cluster?.members.find((mm) => mm.workflowId === fromWorkflowId);
|
|
35
37
|
return m?.displayName ?? fromWorkflowId.slice(0, 8);
|
|
36
|
-
}, [cluster
|
|
38
|
+
}, [cluster?.members, fromWorkflowId]);
|
|
37
39
|
|
|
38
40
|
const content = useMemo(() => {
|
|
39
41
|
const boundaries = turnBoundaries(messages);
|
|
@@ -57,16 +59,18 @@ export function TranscriptSendDialog({ cluster, fromWorkflowId, messages, onConf
|
|
|
57
59
|
|
|
58
60
|
const byteLen = new TextEncoder().encode(content).length;
|
|
59
61
|
const overLimit = byteLen > MAX_BYTES;
|
|
60
|
-
const canSend = toWfids.length > 0 && content.trim().length > 0 && !overLimit;
|
|
62
|
+
const canSend = !!onConfirm && toWfids.length > 0 && content.trim().length > 0 && !overLimit;
|
|
63
|
+
if (destination === 'worker') return <TranscriptWorkerDialog workflowId={fromWorkflowId} onCancel={onCancel} onMembers={peers.length && onConfirm ? () => setDestination('members') : undefined} />;
|
|
61
64
|
|
|
62
65
|
const handleSend = () => {
|
|
63
66
|
if (!canSend) return;
|
|
64
|
-
onConfirm(toWfids, content);
|
|
67
|
+
onConfirm?.(toWfids, content);
|
|
65
68
|
};
|
|
66
69
|
|
|
67
70
|
return (
|
|
68
|
-
<DialogShell title={`Send transcript - from ${senderName}`} ariaLabel="Send transcript" onClose={onCancel} closeOnBackdrop width={720} zIndex={50}
|
|
71
|
+
<DialogShell title={`Send transcript - from ${senderName}`} ariaLabel="Send transcript" dataHelp="cluster.transcript-send" onClose={onCancel} closeOnBackdrop width={720} zIndex={50}
|
|
69
72
|
actions={<>
|
|
73
|
+
<button type="button" data-help="composer.transcript-worker" onClick={() => setDestination('worker')} className="display-font">NEW WORKER</button>
|
|
70
74
|
<button type="button" onClick={onCancel} className="display-font" style={{ background: 'transparent', border: '1px solid var(--color-border-hairline)', color: 'var(--color-fg-muted)', padding: '5px 12px', cursor: 'pointer', fontSize: '10px', letterSpacing: '1px' }}>CANCEL</button>
|
|
71
75
|
<button
|
|
72
76
|
type="button"
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { useEffect, useRef, useState, type CSSProperties } from 'react';
|
|
2
|
+
import { PRIMARY_PROVIDERS, TERMINAL_CODEX_ACCOUNT, type EffortLevel, type ProviderName, type TranscriptWorkerPreview } from '@arco/shared';
|
|
3
|
+
import { useAppStore } from '../stores/appStore';
|
|
4
|
+
import { useCodexCatalogFor } from '../hooks/useCodexCatalog';
|
|
5
|
+
import { defaultModelForProvider, modelsForProvider, useModelCatalogs } from '../utils/modelCatalog';
|
|
6
|
+
import { capDefaultEffort } from '../utils/effortDefaults';
|
|
7
|
+
import { effortsForModel } from '../utils/format';
|
|
8
|
+
import { requestTranscriptWorker } from '../utils/transcriptWorkerRequest';
|
|
9
|
+
import { DialogShell } from './DialogShell';
|
|
10
|
+
import { DirectoryBrowser } from './media/DirectoryPicker';
|
|
11
|
+
|
|
12
|
+
const field: CSSProperties = { width: '100%', minWidth: 0, display: 'block' };
|
|
13
|
+
const button: CSSProperties = { padding: '5px 10px', cursor: 'pointer', fontSize: '11px', letterSpacing: '1px' };
|
|
14
|
+
const labels: Record<ProviderName, string> = { claude: 'Claude', codex: 'Codex', cursor: 'Cursor', ollama: 'Ollama', llamacpp: 'llama.cpp', lmstudio: 'LM Studio', strata: 'Strata', deepseek: 'DeepSeek' };
|
|
15
|
+
|
|
16
|
+
export function TranscriptWorkerDialog({ workflowId, onCancel, onMembers }: { workflowId: string; onCancel: () => void; onMembers?: () => void }) {
|
|
17
|
+
const job = useAppStore(s => s.jobs[workflowId]);
|
|
18
|
+
const connected = useAppStore(s => s.connected);
|
|
19
|
+
const settings = useAppStore(s => s.settings);
|
|
20
|
+
const auth = useAppStore(s => s.authStatus);
|
|
21
|
+
const enabled = useAppStore(s => s.isProviderEnabled);
|
|
22
|
+
const sourceProvider = job?.config.primaryProvider ?? 'claude';
|
|
23
|
+
const [turns, setTurns] = useState(3);
|
|
24
|
+
const [includePartial, setIncludePartial] = useState(false);
|
|
25
|
+
const [preface, setPreface] = useState('');
|
|
26
|
+
const [directory, setDirectory] = useState(job?.config.workingDirectory ?? '');
|
|
27
|
+
const [browse, setBrowse] = useState(false);
|
|
28
|
+
const [name, setName] = useState(`Worker from ${job?.config.name ?? 'conversation'}`);
|
|
29
|
+
const [provider, setProvider] = useState<ProviderName>(sourceProvider);
|
|
30
|
+
const [model, setModel] = useState(String(job?.config.primaryModel ?? ''));
|
|
31
|
+
const [effort, setEffort] = useState<EffortLevel>(capDefaultEffort(job?.config.primaryEffort ?? 'medium'));
|
|
32
|
+
const [account, setAccount] = useState(sourceProvider === 'codex' ? job?.config.providerAccountRef ?? '' : '');
|
|
33
|
+
const [skipPermissions, setSkipPermissions] = useState(false);
|
|
34
|
+
const [preview, setPreview] = useState<TranscriptWorkerPreview | null>(null);
|
|
35
|
+
const [previewInput, setPreviewInput] = useState('');
|
|
36
|
+
const [phase, setPhase] = useState<'preview' | 'create' | null>(null);
|
|
37
|
+
const [error, setError] = useState('');
|
|
38
|
+
const alive = useRef(true);
|
|
39
|
+
useEffect(() => { alive.current = true; return () => { alive.current = false; }; }, []);
|
|
40
|
+
const codexCatalog = useCodexCatalogFor(account || undefined);
|
|
41
|
+
const catalogs = useModelCatalogs({ codex: codexCatalog });
|
|
42
|
+
const models = modelsForProvider(provider, catalogs).map(String);
|
|
43
|
+
if (provider === sourceProvider && job?.config.primaryModel && !models.includes(String(job.config.primaryModel))) models.unshift(String(job.config.primaryModel));
|
|
44
|
+
const effortOptions = effortsForModel(provider, model, catalogs.claude, codexCatalog);
|
|
45
|
+
const offeredEfforts = effortOptions.length ? effortOptions : ['none' as const];
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (!offeredEfforts.includes(effort)) setEffort(offeredEfforts.includes('medium') ? 'medium' : offeredEfforts[0]);
|
|
48
|
+
}, [provider, model, offeredEfforts.join('|'), effort]);
|
|
49
|
+
const providers = PRIMARY_PROVIDERS.filter(value => enabled(value) && !!auth?.[value]?.loggedIn);
|
|
50
|
+
const prefaceBytes = new TextEncoder().encode(preface).length;
|
|
51
|
+
const inputKey = JSON.stringify([turns, includePartial, preface]);
|
|
52
|
+
const invalidate = () => { setPreview(null); setError(''); };
|
|
53
|
+
const readPreview = async () => {
|
|
54
|
+
if (!connected || prefaceBytes > 4096 || phase) return;
|
|
55
|
+
setPhase('preview'); setError('');
|
|
56
|
+
try {
|
|
57
|
+
const result = await requestTranscriptWorker({ type: 'transcript_worker_preview', workflowId, turns, includePartial, preface });
|
|
58
|
+
if (alive.current) {
|
|
59
|
+
if (!result.preview) throw new Error('The preview is unavailable. Try again.');
|
|
60
|
+
setPreview(result.preview);
|
|
61
|
+
setPreviewInput(inputKey);
|
|
62
|
+
}
|
|
63
|
+
} catch (reason) { if (alive.current) { setPreview(null); setError(reason instanceof Error ? reason.message : String(reason)); } }
|
|
64
|
+
finally { if (alive.current) setPhase(null); }
|
|
65
|
+
};
|
|
66
|
+
const create = async () => {
|
|
67
|
+
if (!preview || phase || previewInput !== inputKey) return;
|
|
68
|
+
setPhase('create'); setError('');
|
|
69
|
+
try {
|
|
70
|
+
const result = await requestTranscriptWorker({ type: 'transcript_worker_create', token: preview.token,
|
|
71
|
+
destination: { workingDirectory: directory, name, provider, model, effort, ...(provider === 'codex' && account ? { providerAccountRef: account } : {}), skipPermissions } });
|
|
72
|
+
if (alive.current) {
|
|
73
|
+
if (!result.newWorkflowId) throw new Error('The worker could not be created. Refresh the preview.');
|
|
74
|
+
useAppStore.getState().setActiveJob(result.newWorkflowId);
|
|
75
|
+
onCancel();
|
|
76
|
+
}
|
|
77
|
+
} catch (reason) { if (alive.current) { setPreview(null); setError(reason instanceof Error ? reason.message : String(reason)); } }
|
|
78
|
+
finally { if (alive.current) setPhase(null); }
|
|
79
|
+
};
|
|
80
|
+
if (!job) return null;
|
|
81
|
+
return <DialogShell title="Send turns to a new worker" dataHelp="composer.transcript-worker" onClose={onCancel} width={760}
|
|
82
|
+
status={error ? <span role="alert">{error}</span> : phase ? <span role="status">{phase === 'preview' ? 'Reading stored turns...' : 'Creating the worker...'}</span> : undefined}
|
|
83
|
+
actions={<>
|
|
84
|
+
{onMembers && <button type="button" data-help="composer.transcript-worker" style={button} disabled={!!phase} onClick={onMembers}>EXISTING MEMBERS</button>}
|
|
85
|
+
<button type="button" data-help="composer.transcript-worker" style={button} disabled={!!phase} onClick={onCancel}>CANCEL</button>
|
|
86
|
+
<button type="button" data-help="composer.transcript-worker-preview" style={button} disabled={!!phase || !connected || prefaceBytes > 4096} onClick={() => void readPreview()}>PREVIEW</button>
|
|
87
|
+
<button type="button" data-help="composer.transcript-worker-send" style={button} disabled={!!phase || !preview || previewInput !== inputKey || !connected || !directory.trim() || !model || !providers.includes(provider)} onClick={() => void create()}>SEND TO NEW WORKER</button>
|
|
88
|
+
</>}>
|
|
89
|
+
<p>Source: {job.config.name}. Copy exact operator and agent text. Tools and attachments become receipts; attachment files are not copied.</p>
|
|
90
|
+
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '10px', alignItems: 'end' }}>
|
|
91
|
+
<label>Last turns<input className="arco-field" data-help="composer.transcript-worker-preview" aria-label="Turns to copy" type="number" min={1} max={50} value={turns} disabled={!!phase} onChange={event => { setTurns(Math.max(1, Math.min(50, Number(event.target.value) || 1))); invalidate(); }} style={{ ...field, width: '80px' }} /></label>
|
|
92
|
+
<label><input type="checkbox" data-help="composer.transcript-worker-preview" checked={includePartial} disabled={!!phase || !job.busy} onChange={event => { setIncludePartial(event.target.checked); invalidate(); }} /> Include the current partial turn</label>
|
|
93
|
+
</div>
|
|
94
|
+
<label>Preface, placed before the copied turns<textarea className="arco-field" data-help="composer.transcript-worker-preview" aria-label="New worker preface" rows={3} value={preface} disabled={!!phase} onChange={event => { setPreface(event.target.value); invalidate(); }} style={{ ...field, resize: 'vertical' }} /></label>
|
|
95
|
+
<div style={{ color: prefaceBytes > 4096 ? 'var(--color-warning)' : 'var(--color-fg-muted)' }}>{prefaceBytes} / 4096 preface bytes; the whole seed must fit 32768 bytes. Content is never silently clipped.</div>
|
|
96
|
+
<label>New worker name<input className="arco-field" data-help="composer.transcript-worker-target" aria-label="New worker name" value={name} maxLength={120} disabled={!!phase} onChange={event => setName(event.target.value)} style={field} /></label>
|
|
97
|
+
<label>Working directory<input className="arco-field" data-help="composer.transcript-worker-target" aria-label="New worker working directory" value={directory} disabled={!!phase} onChange={event => setDirectory(event.target.value)} style={field} /></label>
|
|
98
|
+
<button type="button" data-help="composer.transcript-worker-target" style={{ ...button, justifySelf: 'start' }} disabled={!!phase} onClick={() => setBrowse(value => !value)}>BROWSE</button>
|
|
99
|
+
{browse && <DirectoryBrowser inline withFilename={false} initialPath={directory} roots={settings?.projectRoots} title="New worker folder" confirmLabel="Use this folder" onDone={result => { if (result) setDirectory(result.dir); setBrowse(false); }} />}
|
|
100
|
+
<div style={{ display: 'flex', flexWrap: 'wrap', gap: '10px' }}>
|
|
101
|
+
<label style={{ flex: '1 1 150px', minWidth: 0 }}>Provider<select className="arco-field" data-help="composer.transcript-worker-target" aria-label="New worker provider" value={provider} disabled={!!phase} onChange={event => {
|
|
102
|
+
const next = event.target.value as ProviderName; setProvider(next); setModel(defaultModelForProvider(next, catalogs)); setAccount('');
|
|
103
|
+
}} style={field}>{!providers.includes(provider) && <option value={provider} disabled>{labels[provider] ?? provider} (not ready)</option>}{providers.map(value => <option key={value} value={value}>{labels[value]}</option>)}</select></label>
|
|
104
|
+
<label style={{ flex: '2 1 200px', minWidth: 0 }}>Model<select className="arco-field" data-help="composer.transcript-worker-target" aria-label="New worker model" value={model} disabled={!!phase} onChange={event => setModel(event.target.value)} style={field}>{models.map(value => <option key={value} value={value}>{value}</option>)}</select></label>
|
|
105
|
+
<label>Effort<select className="arco-field" data-help="composer.transcript-worker-target" aria-label="New worker effort" value={effort} disabled={!!phase} onChange={event => setEffort(event.target.value as EffortLevel)} style={field}>{offeredEfforts.map(value => <option key={value} value={value}>{value.toUpperCase()}</option>)}</select></label>
|
|
106
|
+
</div>
|
|
107
|
+
{!providers.includes(provider) && <p role="status">{providers.length ? `${labels[provider] ?? provider} is not ready. Choose a connected provider.` : 'No connected provider is enabled. Connect or enable one in Settings before sending.'}</p>}
|
|
108
|
+
{!models.length && <p role="status">No models are available for this provider. Choose another provider or configure it in Settings.</p>}
|
|
109
|
+
{provider === 'codex' && <label>Account<select className="arco-field" data-help="composer.transcript-worker-target" aria-label="New worker account" value={account} disabled={!!phase} onChange={event => setAccount(event.target.value)} style={field}>
|
|
110
|
+
<option value="">Default account</option><option value={TERMINAL_CODEX_ACCOUNT}>Terminal Codex account</option>{(settings?.providerAccounts?.codex ?? []).map(value => <option key={value.id} value={value.id}>{value.label}</option>)}
|
|
111
|
+
</select></label>}
|
|
112
|
+
<label><input type="checkbox" data-help="composer.transcript-worker-target" checked={skipPermissions} disabled={!!phase} onChange={event => setSkipPermissions(event.target.checked)} /> Skip permission prompts in the new worker</label>
|
|
113
|
+
<p>The new worker starts a fresh provider conversation in the chosen folder. It inherits no source pins or cluster membership. The destination's own project settings apply.</p>
|
|
114
|
+
{preview ? <>
|
|
115
|
+
<div role="status">{preview.selectedTurns} of {preview.availableTurns} available turns selected; {preview.bytes} / 32768 seed bytes{preview.partialIncluded ? '; includes a partial-turn snapshot' : ''}.</div>
|
|
116
|
+
<textarea className="arco-field" aria-label="New worker seed preview" data-help="composer.transcript-worker-preview" readOnly value={preview.seed} rows={9} style={{ ...field, fontFamily: 'var(--font-code)', resize: 'vertical' }} />
|
|
117
|
+
</> : <p>PREVIEW reads the stored conversation. Review the exact seed before sending. Editing turns or preface requires a new preview.</p>}
|
|
118
|
+
</DialogShell>;
|
|
119
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Badge semantics are covered by clusterNeedsYou.test.ts. The existing
|
|
3
3
|
// scripts/smoke/task-board.ts checks the board and operator-accept contracts.
|
|
4
4
|
|
|
5
|
-
import type { LedgerTask
|
|
5
|
+
import type { LedgerTask } from '@arco/shared';
|
|
6
6
|
|
|
7
7
|
export const REVIEW_OLDER_MS = 7 * 24 * 60 * 60 * 1000;
|
|
8
8
|
|
|
@@ -10,13 +10,12 @@ export const REVIEW_OLDER_MS = 7 * 24 * 60 * 60 * 1000;
|
|
|
10
10
|
const OPERATOR_BLOCKED =
|
|
11
11
|
/\b(operator|human|you\b|your\s+(?:decision|input|approval|go)|needs?\s+(?:you|operator|human)|awaiting\s+(?:you|operator)|approve|accept|confirm)\b/i;
|
|
12
12
|
|
|
13
|
-
export type NeedsYouKind = '
|
|
13
|
+
export type NeedsYouKind = 'blocked' | 'question' | 'asked';
|
|
14
14
|
|
|
15
15
|
export const NEEDS_YOU_KIND: Record<NeedsYouKind, { label: string; stopped: boolean; description: string }> = {
|
|
16
16
|
question: { label: 'WAITING', stopped: true, description: 'An agent is waiting for an answer before it can continue.' },
|
|
17
17
|
blocked: { label: 'BLOCKED', stopped: true, description: 'A task is blocked on the operator.' },
|
|
18
18
|
asked: { label: 'ASKED', stopped: false, description: 'An agent asked a question and can continue without an answer.' },
|
|
19
|
-
review: { label: 'TO ACCEPT', stopped: false, description: 'Finished and signed off. Accepting is optional; nothing waits on it.' },
|
|
20
19
|
};
|
|
21
20
|
|
|
22
21
|
export interface NeedsYouItem {
|
|
@@ -32,10 +31,6 @@ export function isOperatorBlockedReason(reason: string | undefined | null): bool
|
|
|
32
31
|
return Boolean(reason && OPERATOR_BLOCKED.test(reason.trim()));
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
export function reviewNeedsOperator(task: Pick<LedgerTask, 'status' | 'signoff'>): boolean {
|
|
36
|
-
return task.status === 'review' && Boolean(task.signoff);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
34
|
export function blockedNeedsOperator(task: Pick<LedgerTask, 'status' | 'blockedReason'>): boolean {
|
|
40
35
|
return task.status === 'blocked' && isOperatorBlockedReason(task.blockedReason);
|
|
41
36
|
}
|
|
@@ -59,6 +54,13 @@ export function namedCommitsForTask(task: Pick<LedgerTask, 'notes' | 'signoff'>)
|
|
|
59
54
|
return namedCommitsInText([task.notes ?? '', task.signoff?.summary ?? ''].join('\n'));
|
|
60
55
|
}
|
|
61
56
|
|
|
57
|
+
export function plainSignoffSummary(signoff?: LedgerTask['signoff']): string | undefined {
|
|
58
|
+
const summary = signoff?.summary?.trim();
|
|
59
|
+
if (!signoff || !summary) return undefined;
|
|
60
|
+
if (signoff.state === 'met') return summary;
|
|
61
|
+
return `Not finished: ${summary.replace(/^(?:partial|not[_ -]met)\s*:\s*/i, '')}`;
|
|
62
|
+
}
|
|
63
|
+
|
|
62
64
|
export function reviewTasksWithMetSignoff(tasks: readonly LedgerTask[]): LedgerTask[] {
|
|
63
65
|
return tasks.filter((t) => t.status === 'review' && t.signoff?.state === 'met');
|
|
64
66
|
}
|
|
@@ -129,16 +131,7 @@ export function buildNeedsYouItems(input: {
|
|
|
129
131
|
}): NeedsYouItem[] {
|
|
130
132
|
const items: NeedsYouItem[] = [];
|
|
131
133
|
for (const t of input.tasks) {
|
|
132
|
-
if (
|
|
133
|
-
const so = t.signoff as TaskSignoff;
|
|
134
|
-
items.push({
|
|
135
|
-
kind: 'review',
|
|
136
|
-
id: `review:${t.id}`,
|
|
137
|
-
title: t.title,
|
|
138
|
-
detail: `${so.state}${so.summary ? `: ${so.summary}` : ''}`,
|
|
139
|
-
taskId: t.id,
|
|
140
|
-
});
|
|
141
|
-
} else if (blockedNeedsOperator(t)) {
|
|
134
|
+
if (blockedNeedsOperator(t)) {
|
|
142
135
|
items.push({
|
|
143
136
|
kind: 'blocked',
|
|
144
137
|
id: `blocked:${t.id}`,
|
|
@@ -162,7 +155,7 @@ export function buildNeedsYouItems(input: {
|
|
|
162
155
|
}
|
|
163
156
|
|
|
164
157
|
export function needsYouSummary(items: readonly NeedsYouItem[]) {
|
|
165
|
-
const groups = (['question', 'blocked', 'asked'
|
|
158
|
+
const groups = (['question', 'blocked', 'asked'] as const)
|
|
166
159
|
.map((kind) => ({ kind, count: items.filter((item) => item.kind === kind).length, ...NEEDS_YOU_KIND[kind] }))
|
|
167
160
|
.filter((group) => group.count > 0);
|
|
168
161
|
const stopped = groups.reduce((count, group) => count + (group.stopped ? group.count : 0), 0);
|
|
@@ -2,6 +2,16 @@ import { C } from './shared';
|
|
|
2
2
|
import type { HelpEntry } from './shared';
|
|
3
3
|
|
|
4
4
|
export const clusterHelp: Record<string, HelpEntry> = {
|
|
5
|
+
'cluster.skills': {
|
|
6
|
+
title: 'Cluster skill pins',
|
|
7
|
+
body: <><p><C>SKILLS</C> beside EFFICIENCY shows configured cluster pins, including missing or off skills. Open it to see each skill's source and All members or role target. Full text is added each turn for matching members; new and replaced members inherit it.</p><p>Only the operator pins or unpins. Use Settings > SKILLS to add a pin. Tab, cluster and matching role pins share 12 unique skills and 64 KiB of text.</p></>,
|
|
8
|
+
manualSection: 'skills',
|
|
9
|
+
},
|
|
10
|
+
'cluster.skills.unpin': {
|
|
11
|
+
title: 'Unpin from the cluster',
|
|
12
|
+
body: <p>Removes this skill's cluster or role pin on the next turn. Direct tab pins stay in place. New and replaced members stop inheriting the removed pin. Running turns keep the instructions they started with.</p>,
|
|
13
|
+
manualSection: 'skills',
|
|
14
|
+
},
|
|
5
15
|
// ----------------------------------------------------- CLUSTERS
|
|
6
16
|
'cluster.tab': {
|
|
7
17
|
title: 'Cluster tab',
|
|
@@ -551,19 +561,20 @@ export const clusterHelp: Record<string, HelpEntry> = {
|
|
|
551
561
|
manualSection: 'cluster-member-replacement',
|
|
552
562
|
},
|
|
553
563
|
'cluster.replace.history': {
|
|
554
|
-
title: '
|
|
564
|
+
title: 'Replacement history',
|
|
555
565
|
body: (
|
|
556
566
|
<>
|
|
557
|
-
<p>
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
the
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
+
<p><C>NO HISTORY</C> is the default. <C>RECENT HISTORY</C> copies the last
|
|
568
|
+
10 whole turns; choose 1 to 50 within 128 KiB. Text stays word for
|
|
569
|
+
word, with receipts for tools and attached files.</p>
|
|
570
|
+
<p><C>FULL HISTORY</C> keeps the prior transcript and action digest when
|
|
571
|
+
they fit 512 KiB. Otherwise the newest whole turns that fit are copied
|
|
572
|
+
with tool/file receipts. The preview gives the count before REPLACE;
|
|
573
|
+
nothing is clipped. A zero-turn preview means no history is copied.</p>
|
|
574
|
+
<p>A partial copy adds one plain line to the new tab. Earlier history
|
|
575
|
+
stays in the previous conversation. A nonempty seed spends a model
|
|
576
|
+
call and never reuses the old provider session. History is unavailable
|
|
577
|
+
for <C>ISOLATED</C>.</p>
|
|
567
578
|
</>
|
|
568
579
|
),
|
|
569
580
|
manualSection: 'cluster-member-replacement',
|
|
@@ -592,6 +603,16 @@ export const clusterHelp: Record<string, HelpEntry> = {
|
|
|
592
603
|
),
|
|
593
604
|
manualSection: 'cluster-member-replacement',
|
|
594
605
|
},
|
|
606
|
+
'cluster.replace.cancel': {
|
|
607
|
+
title: 'Cancel replacement',
|
|
608
|
+
body: (
|
|
609
|
+
<p>
|
|
610
|
+
Closes the REPLACE form without creating a worker or changing the
|
|
611
|
+
roster. Choices in the form are discarded.
|
|
612
|
+
</p>
|
|
613
|
+
),
|
|
614
|
+
manualSection: 'cluster-member-replacement',
|
|
615
|
+
},
|
|
595
616
|
'cluster.right-panel.member-focus': {
|
|
596
617
|
title: 'Focus member',
|
|
597
618
|
body: <p>Click a member's name to focus that worker: its chat and controls take over the detail pane. Its status (<C>IDLE</C> or <C>BUSY</C>) and work size sit beside the name. Use PROMOTE or BACK TO CLUSTER to move a member into its own tab and back.</p>,
|
|
@@ -744,7 +765,7 @@ export const clusterHelp: Record<string, HelpEntry> = {
|
|
|
744
765
|
through the operator path; a plain click (under a 4px drag threshold)
|
|
745
766
|
opens the card drawer instead. Touch devices drag after a short press.
|
|
746
767
|
Moving a card to <C>done</C> or <C>archived</C> confirms first: those
|
|
747
|
-
terminal
|
|
768
|
+
direct terminal status changes stay operator-only.
|
|
748
769
|
</p>
|
|
749
770
|
),
|
|
750
771
|
manualSection: 'cluster-board',
|
|
@@ -793,7 +814,7 @@ export const clusterHelp: Record<string, HelpEntry> = {
|
|
|
793
814
|
Runs one deterministic dispatch sweep. Only <C>ready</C> tasks with an
|
|
794
815
|
explicit idle assignee are claimed, moved to <C>in_progress</C>, given a
|
|
795
816
|
run record, and sent to that member as a normal turn. Skips are logged
|
|
796
|
-
with stable reasons; terminal
|
|
817
|
+
with stable reasons; direct terminal status changes remain operator-only. The current assignment, dependencies, membership and idle worker are checked again before each claim.
|
|
797
818
|
</p>
|
|
798
819
|
),
|
|
799
820
|
manualSection: 'cluster-board',
|
|
@@ -872,9 +893,8 @@ export const clusterHelp: Record<string, HelpEntry> = {
|
|
|
872
893
|
<p>
|
|
873
894
|
Names each kind present: WAITING for a question that pauses an agent,
|
|
874
895
|
BLOCKED for a task blocked on you, ASKED for a question the agent can
|
|
875
|
-
continue past
|
|
876
|
-
|
|
877
|
-
muted. Accepting is optional; nothing waits on it. The badge is
|
|
896
|
+
continue past. Stopped kinds come first and use the warning colour.
|
|
897
|
+
ASKED is muted. The badge is
|
|
878
898
|
hidden when there are no items.
|
|
879
899
|
</p>
|
|
880
900
|
<p>
|
|
@@ -984,7 +1004,7 @@ export const clusterHelp: Record<string, HelpEntry> = {
|
|
|
984
1004
|
the existing RECHECK action. Accepting is optional; nothing waits on it.
|
|
985
1005
|
Edit is below and closed initially for REVIEW only. Other statuses keep
|
|
986
1006
|
their existing layout. Overview, links, dependencies, comments, recovery
|
|
987
|
-
controls and run records remain available.
|
|
1007
|
+
controls and run records remain available. Direct terminal status changes stay
|
|
988
1008
|
operator-only through the existing ledger update path.
|
|
989
1009
|
</p>
|
|
990
1010
|
),
|
|
@@ -1206,6 +1226,7 @@ export const clusterHelp: Record<string, HelpEntry> = {
|
|
|
1206
1226
|
<p><C>EFFICIENCY</C> guides coordination and testing each turn. Balanced is the new-cluster default: one test per real fault, at the lowest useful level; changed-area tests per change; the full check once before release. Browser tests cover real-screen journeys, one per journey, without layout, theme or size matrices.</p>
|
|
1207
1227
|
<p>Balanced asks before adding suites, gates, test tooling or CI checks, using the operator-question tool when available. It aims for a full check of about ten minutes and proposes cuts if longer. Flaky tests are fixed or deleted, not retried. Lean runs changed-area tests and adds tests only for faults found; the full check runs only when requested. Thorough tests new behaviour and faults, neighbouring tests, and the full check before handover.</p>
|
|
1208
1228
|
<p>Every level sorts product faults from test faults and states what a user would lose before a failure blocks work. Checks stay useful and green: product faults and faulty tests are fixed; cosmetic or momentary faults are noted. A faulty test is fixed or removed, never ignored, and releases do not go out over red checks. Project rules and plans take precedence when they ask for more or less testing. Safety checks, message guards, requested review and landing review stay unchanged.</p>
|
|
1229
|
+
<p>The Director keeps the 60-second wait rule. Other members and standalone agents wait for results their reports need, in steps of at most 120 seconds, checking messages between waits. They report when the result arrives. After a progress report or an answer while assigned work remains, non-Director members and standalone agents continue that work in the same turn; they end the turn only when it is done or with one stated blocker. If blocked or unable to finish within a reasonable time, they name the pending job and say that a nudge is needed before ending the turn. Automatic completion wakes are not added by this guidance.</p>
|
|
1209
1230
|
<p><C>NOTE</C> adds a standing instruction of your own for the whole cluster. Style and note apply on each member's next turn. The message guard beside it is a separate setting.</p>
|
|
1210
1231
|
</>
|
|
1211
1232
|
),
|