arco-workbench 0.2.1 → 0.2.4
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 +26 -24
- package/client/dist/assets/{PhosphorBackdrop-BbR3xmfD.js → PhosphorBackdrop-CHXVFLGT.js} +1 -1
- package/client/dist/assets/{ThemedBackgroundShaderImpl-UMjbs9ZN.js → ThemedBackgroundShaderImpl-Bhs4I9jA.js} +1 -1
- package/client/dist/assets/{XtermView-n135qz-f.js → XtermView-CdfurwFx.js} +1 -1
- package/client/dist/assets/{galleryEditor-CFSke4by.js → galleryEditor-DYjZZ4cf.js} +1 -1
- package/client/dist/assets/{index-DeoJbjI3.js → index-BjDmFvqG.js} +219 -219
- package/client/dist/index.html +1 -1
- package/client/dist/manifest-mobile.webmanifest +1 -0
- package/client/src/components/Connections/Connections.tsx +3 -3
- package/client/src/components/research/QuickResearchOverview.tsx +7 -3
- package/client/src/components/research/SavedQuickKeep.tsx +7 -3
- package/client/src/help/content/misc.tsx +2 -2
- package/client/src/help/content/rightPanel.tsx +3 -2
- package/client/src/help/manualSections/clusters.tsx +1 -1
- package/client/src/help/manualSections/powerFeatures.tsx +3 -2
- package/client/src/layout/layoutRange.ts +10 -0
- package/client/src/main.tsx +2 -0
- package/docs/CHECKPOINTS.md +67 -3
- package/docs/CLIENT.md +1 -1
- package/docs/HTTP_API.md +9 -7
- package/docs/PROVIDERS.md +1 -1
- package/docs/RESEARCH.md +2 -2
- package/node_modules/@arco/shared/package.json +1 -1
- package/package.json +2 -2
- package/server/dist/capabilities.d.ts +6 -0
- package/server/dist/capabilities.js +13 -4
- package/server/dist/explorerDocs.d.ts +1 -0
- package/server/dist/explorerDocs.js +4 -4
- package/server/dist/gitSnapshots.d.ts +1 -0
- package/server/dist/gitSnapshots.js +547 -83
- package/server/dist/http/clusterRoutes.js +9 -3
- package/server/dist/http/router.js +1 -0
- package/server/dist/providers/codexChatBoundary.js +6 -1
- package/server/dist/research/quickPromotion.d.ts +3 -0
- package/server/dist/research/quickPromotion.js +26 -9
- package/server/dist/research/savedQuickPromotion.js +2 -11
- package/server/dist/turnChanges.d.ts +1 -1
- package/server/dist/turnChanges.js +5 -4
- package/server/dist/ws/turnEngine.js +4 -1
- package/server/package.json +1 -1
- package/server/src/capabilities.ts +14 -4
- package/server/src/explorerDocs.ts +5 -5
- package/server/src/gitSnapshots.ts +538 -82
- package/server/src/http/clusterRoutes.ts +10 -3
- package/server/src/http/router.ts +1 -0
- package/server/src/providers/codexChatBoundary.ts +6 -1
- package/server/src/research/quickPromotion.ts +24 -6
- package/server/src/research/savedQuickPromotion.ts +2 -8
- package/server/src/turnChanges.ts +5 -4
- package/server/src/ws/turnEngine.ts +4 -1
package/client/dist/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
10
10
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
11
11
|
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Share+Tech+Mono&display=swap" rel="stylesheet" />
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-BjDmFvqG.js"></script>
|
|
13
13
|
<link rel="stylesheet" crossorigin href="/assets/index-CVJVD2Vn.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"Arco","short_name":"Arco","start_url":"/mobile","scope":"/","display":"standalone","icons":[{"src":"/arco-192.png","sizes":"192x192","type":"image/png"},{"src":"/arco-512.png","sizes":"512x512","type":"image/png"}]}
|
|
@@ -171,16 +171,16 @@ export function Connections({ mode='gate', onContinue, onSkip, canContinue = fal
|
|
|
171
171
|
<p>{provider.access}</p><h3>1. Check the prerequisites</h3><p>{provider.prerequisite}</p>
|
|
172
172
|
{unavailable && <p role="alert">Unavailable in the stock Docker runtime. Use a supported connection or an explicitly configured host integration.</p>}
|
|
173
173
|
{!enabled && <p>This provider is disabled for new work. Connect it or enable it below.</p>}
|
|
174
|
-
{selected!=='github' && <button type="button" onClick={()=>void toggleEnabled()} disabled={enabling || !settings}>{enabled?'Disable provider':'Enable provider'}</button>}
|
|
174
|
+
{selected!=='github' && <button type="button" onClick={()=>void toggleEnabled()} disabled={enabling || usingCli || !settings}>{enabled?'Disable provider':'Enable provider'}</button>}
|
|
175
175
|
<h3>2. Connect</h3><p>{credentialSource(provider,status,catalog)}</p>
|
|
176
176
|
{status?.email && <p>{selected === 'claude' ? 'Reported CLI account' : 'Reported account'}: {status.email}{status.orgName ? ` - ${status.orgName}`:''}</p>}
|
|
177
177
|
{claude && <div data-testid="claude-native-panel">
|
|
178
178
|
<p>Native and CLI are separate sign-ins. Native is the default transport and needs its own sign-in here; the CLI sign-in does not carry over.</p>
|
|
179
179
|
{transport==='native' && !claude.connected && <>
|
|
180
180
|
<button type="button" data-testid="claude-native-signin" disabled={nativeLogin.session?.busy} onClick={()=>void nativeLogin.start()}>{nativeLogin.session?.busy?'Starting sign-in...':'SIGN IN FOR NATIVE'}</button>
|
|
181
|
-
{claude.cliSignedIn && <button type="button" data-testid="claude-use-cli" disabled={usingCli} onClick={()=>void useCliInstead()}>Use Claude CLI instead</button>}
|
|
181
|
+
{claude.cliSignedIn && <button type="button" data-testid="claude-use-cli" disabled={usingCli || enabling} onClick={()=>void useCliInstead()}>Use Claude CLI instead</button>}
|
|
182
182
|
</>}
|
|
183
|
-
{transport==='cli' && <button type="button" data-testid="claude-use-native" disabled={usingCli} onClick={()=>void setTransport('native')}>Use Native (default) instead</button>}
|
|
183
|
+
{transport==='cli' && <button type="button" data-testid="claude-use-native" disabled={usingCli || enabling} onClick={()=>void setTransport('native')}>Use Native (default) instead</button>}
|
|
184
184
|
{catalog.commandShellProblem && <p role="note" data-testid="claude-native-shell" data-help="connections.command-shell">Shell commands and hooks: {catalog.commandShellProblem} Until then the Bash tool reports this error and configured hooks are skipped with a notice.</p>}
|
|
185
185
|
{!catalog.commandShellProblem && catalog.commandShellNotice && <p role="note" data-testid="claude-native-shell-powershell" data-help="connections.command-shell">Shell commands and hooks: {catalog.commandShellNotice}</p>}
|
|
186
186
|
<NativeLoginControls key={nativeLogin.session?.flow?.id} login={nativeLogin} />
|
|
@@ -48,8 +48,11 @@ export function QuickResearchOverview({ clusterId, research, onResults }: { clus
|
|
|
48
48
|
const keep = async (folderRoot?: string) => {
|
|
49
49
|
try {
|
|
50
50
|
const response = await fetch(`/api/research/${clusterId}/keep-as-project`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(folderRoot ? { folderRoot } : {}) });
|
|
51
|
-
const body = await response.json() as { phase?: string; message?: string; error?: string };
|
|
52
|
-
if (!response.ok)
|
|
51
|
+
const body = await response.json() as { phase?: string; message?: string; error?: string; code?: string };
|
|
52
|
+
if (!response.ok) {
|
|
53
|
+
if (body.code === 'research_folder_missing') setChoosing(true);
|
|
54
|
+
throw new Error(body.error || 'Could not keep the project.');
|
|
55
|
+
}
|
|
53
56
|
setPromotion({ phase: body.phase ?? 'waiting', message: body.message }); setChoosing(false);
|
|
54
57
|
} catch (error) { setPromotion({ phase: 'error', message: error instanceof Error ? error.message : 'The copy did not complete. Quick research is still available.' }); }
|
|
55
58
|
};
|
|
@@ -80,8 +83,9 @@ export function QuickResearchOverview({ clusterId, research, onResults }: { clus
|
|
|
80
83
|
</div>
|
|
81
84
|
{promotion.phase === 'waiting' && <div role="status">WAITING — research stays usable until the copy starts.</div>}
|
|
82
85
|
{['copying', 'switching'].includes(promotion.phase) && <div role="status">COPYING — the project is being kept.</div>}
|
|
83
|
-
{promotion.message && <div role="status">{promotion.message}</div>}
|
|
86
|
+
{promotion.message && (!choosing || promotion.phase !== 'error') && <div role="status">{promotion.message}</div>}
|
|
84
87
|
{choosing && <DialogShell title="Choose the research folder" onClose={() => setChoosing(false)}>
|
|
88
|
+
{promotion.phase === 'error' && promotion.message && <p role="alert">{promotion.message}</p>}
|
|
85
89
|
<p>A project folder will be created here and this location saved for future research projects.</p>
|
|
86
90
|
<DirectoryBrowser inline withFilename={false} roots={roots} title="Choose research folder" confirmLabel="KEEP HERE" onDone={choice => { if (choice) void keep(choice.dir); else setChoosing(false); }} />
|
|
87
91
|
</DialogShell>}
|
|
@@ -38,8 +38,11 @@ export function SavedQuickKeep({ chatId }: { chatId: string }) {
|
|
|
38
38
|
const keep = async (folderRoot?: string) => {
|
|
39
39
|
try {
|
|
40
40
|
const response = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(folderRoot ? { folderRoot } : {}) });
|
|
41
|
-
const body = await response.json() as { phase?: string; message?: string; error?: string };
|
|
42
|
-
if (!response.ok)
|
|
41
|
+
const body = await response.json() as { phase?: string; message?: string; error?: string; code?: string };
|
|
42
|
+
if (!response.ok) {
|
|
43
|
+
if (body.code === 'research_folder_missing') setChoosing(true);
|
|
44
|
+
throw new Error(body.error || 'Could not keep the project.');
|
|
45
|
+
}
|
|
43
46
|
setStatus({ phase: body.phase ?? 'waiting', message: body.message }); setChoosing(false);
|
|
44
47
|
} catch (error) { setStatus({ phase: 'error', message: error instanceof Error ? error.message : 'Could not keep the project.' }); }
|
|
45
48
|
};
|
|
@@ -48,9 +51,10 @@ export function SavedQuickKeep({ chatId }: { chatId: string }) {
|
|
|
48
51
|
{status.phase !== 'done' && <button type="button" disabled={['waiting', 'copying', 'switching'].includes(status.phase)} onClick={() => folder ? void keep() : setChoosing(true)} style={{ minHeight: 44 }}>KEEP AS PROJECT</button>}
|
|
49
52
|
{status.phase === 'waiting' && <div role="status">WAITING — the Chat stays usable until the copy starts.</div>}
|
|
50
53
|
{['copying', 'switching'].includes(status.phase) && <div role="status">COPYING — the project is being kept.</div>}
|
|
51
|
-
{status.message && <div role="status">{status.message}</div>}
|
|
54
|
+
{status.message && (!choosing || status.phase !== 'error') && <div role="status">{status.message}</div>}
|
|
52
55
|
{status.message === 'Could not refresh the project status.' && <button type="button" onClick={() => void refresh()} style={{ minHeight: 44 }}>RETRY STATUS</button>}
|
|
53
56
|
{choosing && <DialogShell title="Choose the research folder" onClose={() => setChoosing(false)}>
|
|
57
|
+
{status.phase === 'error' && status.message && <p role="alert">{status.message}</p>}
|
|
54
58
|
<p>A project folder will be created here and this location saved for future research projects.</p>
|
|
55
59
|
<DirectoryBrowser inline withFilename={false} roots={roots} title="Choose research folder" confirmLabel="KEEP HERE" onDone={choice => { if (choice) void keep(choice.dir); else setChoosing(false); }} />
|
|
56
60
|
</DialogShell>}
|
|
@@ -141,7 +141,7 @@ export const miscHelp: Record<string, HelpEntry> = {
|
|
|
141
141
|
},
|
|
142
142
|
'chat.turn-changes': {
|
|
143
143
|
title: 'Changes during this turn',
|
|
144
|
-
body: <p>Shadow checkpoints omit nested repositories, name those exclusions in the preview and result, and leave them unchanged. Checkpoints also leave Arco's state folder and provider account and conversation state in the home folder unchanged; an older checkpoint containing that state cannot be restored. Older checkpoints also preserve unrecorded folders; if restoring a file would overwrite one, preview and undo refuse without changing files. Open the changed-files line to view the captured checkpoint diff. UNDO THIS TURN uses the checkpoint restore and asks for confirmation; it restores included files to the earlier checkpoint, including changes made after the turn. A safety checkpoint is taken first. Once it has run the line reads Undone, UNDO THIS TURN is disabled, and the diff is labelled as the undone change. Oversized files
|
|
144
|
+
body: <p>Shadow checkpoints omit nested repositories, name those exclusions in the preview and result, and leave them unchanged. Checkpoints also leave Arco's state folder and provider account and conversation state in the home folder unchanged; an older checkpoint containing that state cannot be restored. Older checkpoints also preserve unrecorded folders; if restoring a file would overwrite one, preview and undo refuse without changing files. Open the changed-files line to view the captured checkpoint diff. UNDO THIS TURN uses the checkpoint restore and asks for confirmation; it restores included files to the earlier checkpoint, including changes made after the turn. A safety checkpoint is taken first. Once it has run the line reads Undone, UNDO THIS TURN is disabled, and the diff is labelled as the undone change. Oversized files a checkpoint left out are counted in the line and left unchanged by undo. If another managed writer was active in the folder, the line says so and offers VIEW DIFF without undo. External writers are not detected. Additional directories outside the working tree are outside the checkpoint. Git-backed checkpoints honor Git ignore rules and the per-file and total size limits; shadow checkpoints also use their traversal and nested-repository scope. Isolated scratch members do not produce a project-checkpoint line.</p>,
|
|
145
145
|
manualSection: 'chat-panel',
|
|
146
146
|
},
|
|
147
147
|
'utility.catch-up': {
|
|
@@ -575,7 +575,7 @@ export const miscHelp: Record<string, HelpEntry> = {
|
|
|
575
575
|
'creator.research-blind': { title: 'Blind reports', body: <p>On by default. The Research Director sees reports as A, B, C without provider or model until you reveal them. Researchers never see each other either way.</p>, manualSection: 'research-start' },
|
|
576
576
|
'creator.research-name': { title: 'Project name', body: <p>A short name of up to 60 characters. It names the project tab, the research folder and research.json.</p>, manualSection: 'research-start' },
|
|
577
577
|
'creator.research-brief': { title: 'Brief', body: <p>Everything the researchers should know: the question, budget, region, must-haves and sources to avoid. The Research Director receives it unchanged and starts on it as soon as the project opens.</p>, manualSection: 'research-start' },
|
|
578
|
-
'research.quick': { title: 'Quick research', body: <p>Shows the brief and live researcher activity above the Director conversation. Select a row for a read-only activity view. KEEP AS PROJECT waits for members to become idle and creates a research folder. Closing saves the conversation in Past Chats and can attach unsent researcher files. Open that Chat to keep the project later. Deleting the Chat removes its Quick research sources; a project already kept remains.</p>, manualSection: 'research-project' },
|
|
578
|
+
'research.quick': { title: 'Quick research', body: <p>Shows the brief and live researcher activity above the Director conversation. Select a row for a read-only activity view. KEEP AS PROJECT waits for members to become idle and creates a research folder. If the saved folder is gone, choose another folder and select KEEP HERE. Closing saves the conversation in Past Chats and can attach unsent researcher files. Open that Chat to keep the project later. Deleting the Chat removes its Quick research sources; a project already kept remains.</p>, manualSection: 'research-project' },
|
|
579
579
|
'research.brief': { title: 'Brief', body: <p>Shows the brief you started the project with.</p>, manualSection: 'research-project' },
|
|
580
580
|
'creator.research-start': { title: 'Start research', body: <p>Starts the Research Director and researchers. A project creates a research folder; Quick research stays in Arco until KEEP AS PROJECT.</p>, manualSection: 'research-start' },
|
|
581
581
|
'research.rounds': { title: 'Rounds strip', body: <p>Shows the saved folder and OPEN FOLDER. The default is set in Settings > Projects > Research folder. One row per round shows each researcher's state and time taken. Choose a round to see outcomes and the deadline; in a released round, a replied line opens that report. Failed outcomes include a provider refusal or last message when available. PLAN is available to the Research Director; researchers cannot read or change it.</p>, manualSection: 'research-project' },
|
|
@@ -737,8 +737,9 @@ export const rightPanelHelp: Record<string, HelpEntry> = {
|
|
|
737
737
|
title: 'CHECKPOINT REVERT',
|
|
738
738
|
body: (
|
|
739
739
|
<>
|
|
740
|
-
<p>Shadow checkpoints exclude nested Git repositories and worktrees. Their names are shown on the checkpoint, in the confirmation and after a revert. Only included files count or change. Recorded exclusions remain protected if a Git marker moves. Older checkpoints without scope metadata preserve unrecorded folders and explain that limitation. If restoring a file would overwrite a preserved folder, the comparison and revert refuse without changing files
|
|
741
|
-
<p>In non-Git folders, checkpoint discovery has entry and time budgets. Exceeding a byte or scan budget skips the whole checkpoint and shows one notice; no partial checkpoint is published. A budget-limited comparison or REVERT TO HERE changes nothing. The scan limits are ARCO_CHECKPOINT_SCAN_ENTRIES and ARCO_CHECKPOINT_SCAN_MS; the included-byte limit is ARCO_CHECKPOINT_TOTAL_CAP_BYTES
|
|
740
|
+
<p>Shadow checkpoints exclude nested Git repositories and worktrees. Their names are shown on the checkpoint, in the confirmation and after a revert. Only included files count or change. Recorded exclusions remain protected if a Git marker moves. Older checkpoints without scope metadata preserve unrecorded folders and explain that limitation. If restoring a file would overwrite a preserved folder, the comparison and revert refuse without changing files.</p>
|
|
741
|
+
<p>In non-Git folders, checkpoint discovery has entry and time budgets. Exceeding a byte or scan budget skips the whole checkpoint and shows one notice; no partial checkpoint is published. A budget-limited comparison or REVERT TO HERE changes nothing. The scan limits are ARCO_CHECKPOINT_SCAN_ENTRIES and ARCO_CHECKPOINT_SCAN_MS; the included-byte limit is ARCO_CHECKPOINT_TOTAL_CAP_BYTES.</p>
|
|
742
|
+
<p>In Git folders, a checkpoint leaves out files over 32 MiB that are untracked or differ from the last commit, counts them on the changed-files line, and undo leaves them as they are. An unchanged committed file stays covered.</p><p>When new or changed files that Git does not ignore total more than 1 GiB, the checkpoint is skipped with one notice; unchanged committed files do not count. A comparison or revert that would overwrite a new or changed file now over 32 MiB with different content refuses without changing files.</p><p>A failed, timed-out or cancelled checkpoint removes its own temporary objects; a server crash can still leave one temporary folder. The limits are ARCO_CHECKPOINT_FILE_CAP_BYTES and ARCO_CHECKPOINT_TOTAL_CAP_BYTES.</p>
|
|
742
743
|
<p>
|
|
743
744
|
Each <C>CHECKPOINT ●</C> row is a working-tree snapshot Arco took
|
|
744
745
|
before a file-mutating turn (your real git HEAD / index are never
|
|
@@ -524,7 +524,7 @@ export const clusters: Section[] = [
|
|
|
524
524
|
read or change it. BOARD is not shown in a research project.
|
|
525
525
|
</p>
|
|
526
526
|
<p>
|
|
527
|
-
Quick research runs one round in Arco without a research folder. Its brief and researcher rows sit above the Director conversation; select a row to inspect activity. RESULTS opens the released material. KEEP AS PROJECT waits for idle members and creates a research folder without rerunning the round.
|
|
527
|
+
Quick research runs one round in Arco without a research folder. Its brief and researcher rows sit above the Director conversation; select a row to inspect activity. RESULTS opens the released material. KEEP AS PROJECT waits for idle members and creates a research folder without rerunning the round. If the saved research folder is gone, choose another folder and select KEEP HERE. The Quick research stays open while you choose.
|
|
528
528
|
</p>
|
|
529
529
|
<p>
|
|
530
530
|
Closing Quick research keeps the Director conversation in Past Chats and offers to attach unsent researcher files. Open the saved Chat to use KEEP AS PROJECT after closing. The saved conversation is included in the project; deleting the Chat removes its Quick research sources but leaves a project already kept.
|
|
@@ -135,8 +135,9 @@ export const powerFeatures: Section[] = [
|
|
|
135
135
|
faithfully: files created after it are removed, not just overwritten.
|
|
136
136
|
</li>
|
|
137
137
|
</ul>
|
|
138
|
-
<p>Shadow checkpoints exclude nested Git repositories and worktrees. Their names are shown on the checkpoint, in the confirmation and after a revert. Only included files count or change. Recorded exclusions remain protected if a Git marker moves. Older checkpoints without scope metadata preserve unrecorded folders and explain that limitation. If restoring a file would overwrite a preserved folder, the comparison and revert refuse without changing files
|
|
139
|
-
<p>In non-Git folders, checkpoint discovery has entry and time budgets. Exceeding a byte or scan budget skips the whole checkpoint and shows one notice; no partial checkpoint is published. A budget-limited comparison or REVERT TO HERE changes nothing. The scan limits are ARCO_CHECKPOINT_SCAN_ENTRIES and ARCO_CHECKPOINT_SCAN_MS; the included-byte limit is ARCO_CHECKPOINT_TOTAL_CAP_BYTES
|
|
138
|
+
<p>Shadow checkpoints exclude nested Git repositories and worktrees. Their names are shown on the checkpoint, in the confirmation and after a revert. Only included files count or change. Recorded exclusions remain protected if a Git marker moves. Older checkpoints without scope metadata preserve unrecorded folders and explain that limitation. If restoring a file would overwrite a preserved folder, the comparison and revert refuse without changing files.</p>
|
|
139
|
+
<p>In non-Git folders, checkpoint discovery has entry and time budgets. Exceeding a byte or scan budget skips the whole checkpoint and shows one notice; no partial checkpoint is published. A budget-limited comparison or REVERT TO HERE changes nothing. The scan limits are ARCO_CHECKPOINT_SCAN_ENTRIES and ARCO_CHECKPOINT_SCAN_MS; the included-byte limit is ARCO_CHECKPOINT_TOTAL_CAP_BYTES.</p>
|
|
140
|
+
<p>In Git folders, a checkpoint leaves out files over 32 MiB that are untracked or differ from the last commit, counts them on the changed-files line, and undo leaves them as they are. An unchanged committed file stays covered.</p><p>When new or changed files that Git does not ignore total more than 1 GiB, the checkpoint is skipped with one notice; unchanged committed files do not count. A comparison or revert that would overwrite a new or changed file now over 32 MiB with different content refuses without changing files.</p><p>A failed, timed-out or cancelled checkpoint removes its own temporary objects; a server crash can still leave one temporary folder. The limits are ARCO_CHECKPOINT_FILE_CAP_BYTES and ARCO_CHECKPOINT_TOTAL_CAP_BYTES.</p>
|
|
140
141
|
<p>
|
|
141
142
|
Older tar checkpoints keep files created after the checkpoint. On POSIX systems,
|
|
142
143
|
their file and directory permissions are restored too; new directories stay
|
|
@@ -24,6 +24,16 @@ export function isMobilePath(pathname: string): boolean {
|
|
|
24
24
|
return pathname === MOBILE_PATH || pathname.startsWith(`${MOBILE_PATH}/`);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
// A shortcut installed from the phone view must open the phone view. The page
|
|
28
|
+
// at /mobile points at a manifest whose start_url is /mobile; every other
|
|
29
|
+
// address keeps the manifest that starts at /.
|
|
30
|
+
export const MANIFEST_HREF = '/manifest.webmanifest';
|
|
31
|
+
export const MOBILE_MANIFEST_HREF = '/manifest-mobile.webmanifest';
|
|
32
|
+
|
|
33
|
+
export function manifestHrefFor(pathname: string): string {
|
|
34
|
+
return isMobilePath(pathname) ? MOBILE_MANIFEST_HREF : MANIFEST_HREF;
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
function mobileRoute(): boolean {
|
|
28
38
|
return typeof window !== 'undefined' && isMobilePath(window.location.pathname);
|
|
29
39
|
}
|
package/client/src/main.tsx
CHANGED
|
@@ -10,12 +10,14 @@ import { TerminalPopout } from './components/Terminal/TerminalPopout';
|
|
|
10
10
|
import { ExplorerApp } from './explorer/ExplorerApp';
|
|
11
11
|
import { installSessionFetch, startSessionRefresh } from './utils/wsSession';
|
|
12
12
|
import { startRecoveryGuard } from './buildCheck';
|
|
13
|
+
import { manifestHrefFor } from './layout/layoutRange';
|
|
13
14
|
|
|
14
15
|
// Apply cached theme synchronously before React mounts so the first paint
|
|
15
16
|
// matches the operator's saved theme. Without this the :root defaults
|
|
16
17
|
// (matrix green) render for ~100–500ms while /api/settings fetches. The pop-out
|
|
17
18
|
// route (below) inherits this for free — it is same-origin / same-localStorage.
|
|
18
19
|
bootstrapCachedTheme();
|
|
20
|
+
document.querySelector('link[rel="manifest"]')?.setAttribute('href', manifestHrefFor(window.location.pathname));
|
|
19
21
|
|
|
20
22
|
// WORKBENCH_EXPANSION §K4 — terminal pop-out route. There is NO router in this
|
|
21
23
|
// app; main.tsx mounts a single <App/>. The pop-out is a `window.open` to
|
package/docs/CHECKPOINTS.md
CHANGED
|
@@ -16,7 +16,44 @@ Both checkpoint backends exclude the actual Arco state folder, including when AR
|
|
|
16
16
|
- A unique `GIT_INDEX_FILE=$TMPDIR/arco-snapshot-<cwd-hash>-<pid>-<uuid>.index` for every operation
|
|
17
17
|
(the isolation is load-bearing; uniqueness prevents concurrent workflows in one cwd contending on the
|
|
18
18
|
same index lock, and keeping it outside the worktree prevents one capture staging another's scratch).
|
|
19
|
-
-
|
|
19
|
+
- The snap index starts as a copy of the user's index (its timestamp kept, so racy-clean detection
|
|
20
|
+
still applies) merged with `read-tree -m HEAD`: the content is exactly the HEAD tree, and entries that
|
|
21
|
+
match HEAD borrow the user's stat data, so unchanged files are not read again. The user's index is
|
|
22
|
+
only read. If the copy or merge fails, plain `read-tree HEAD` is used. An unborn HEAD starts empty.
|
|
23
|
+
- **Scope before staging.** `diff-files` against the snap index lists paths that may differ from HEAD
|
|
24
|
+
(entries without borrowed stat data are listed too), and `ls-files --others --exclude-standard`
|
|
25
|
+
lists untracked, non-ignored files. Only those are measured. A file over the per-file cap (32 MiB by
|
|
26
|
+
default) is left out of `add -A` and the snapshot tree, counted as `skippedLargeFiles`, and recorded
|
|
27
|
+
in the `<wfid>.<seq>.skipped.json` manifest. An unchanged committed large file keeps its committed
|
|
28
|
+
entry without being read. When the remaining new or changed bytes exceed the included-total cap
|
|
29
|
+
(1 GiB by default), the snapshot is skipped with the checkpoint skip notice; unchanged committed data
|
|
30
|
+
never counts. The same `ARCO_CHECKPOINT_FILE_CAP_BYTES` / `ARCO_CHECKPOINT_TOTAL_CAP_BYTES` overrides
|
|
31
|
+
apply (`0` disables either). Then `add -A` and `write-tree`.
|
|
32
|
+
- **Measured staging.** Only the measured paths are staged, and the staged blobs are checked against
|
|
33
|
+
the same caps before anything is kept, so a file that appears or grows after the scan cannot enter
|
|
34
|
+
the checkpoint unmeasured; such a capture fails and the next turn captures again. A tracked path
|
|
35
|
+
that is gone, or is now a folder or special file, is recorded as a deletion before staging, and the
|
|
36
|
+
files of a replacing folder are measured on their own. If staging leaves any index entry that was
|
|
37
|
+
neither seeded nor measured (a measured file replaced by a folder meanwhile), the capture fails and
|
|
38
|
+
its objects are discarded with the quarantine. The shadow store checks its staged paths the same way.
|
|
39
|
+
- **Object quarantine.** New objects go to an operation-owned directory, `<objects>/arco-incoming-*`,
|
|
40
|
+
through `GIT_OBJECT_DIRECTORY`, with the real object store as `GIT_ALTERNATE_OBJECT_DIRECTORIES` so
|
|
41
|
+
existing objects still dedupe. `GIT_QUARANTINE_PATH` makes Git refuse ref updates meanwhile. On
|
|
42
|
+
success, finished objects are moved into the real store before the ref is written: each by a hard
|
|
43
|
+
link, or by a copy to a `tmp_obj_*` name and a rename, so no partial object is ever visible. Pack data
|
|
44
|
+
goes before its index. Nothing placed under a final name is removed again, even when a later step
|
|
45
|
+
fails, because another operation may already reference it. A failed or cancelled move can therefore
|
|
46
|
+
leave unreferenced loose objects, or pack data without its index, bounded by the caps. Git's own
|
|
47
|
+
`tmp_*` files are never moved. On failure, timeout or cancellation the operation removes its own
|
|
48
|
+
directory. A server crash can leave that directory behind. It is never swept automatically: its
|
|
49
|
+
name, its age and a moment without activity do not prove that no other process owns it. Treat it
|
|
50
|
+
like the leftovers described under [Repositories used with earlier versions](#repositories-used-with-earlier-versions).
|
|
51
|
+
- **Cancellation.** `createCheckpoint` takes an `AbortSignal`. Cancelling stops running Git commands,
|
|
52
|
+
stops moving objects between files, discards the quarantine and publishes no ref. A kept capture
|
|
53
|
+
finishes its cleanup before a last cancellation check; if the deadline passed by then, the ref is
|
|
54
|
+
withdrawn with a conditional `update-ref -d`. Nothing awaits between that check and the result, so
|
|
55
|
+
the caller sees a result exactly when the ref stays. Pruning of older checkpoints starts only after
|
|
56
|
+
a capture is kept, so a discarded attempt never removes a usable one.
|
|
20
57
|
- `commit-tree` wraps the tree in a **parentless** commit (checkpoints are a flat series, not a branch).
|
|
21
58
|
- `update-ref refs/arco/<workflowId>/<seq>` stores it. The user's `git status`, index, branch, and
|
|
22
59
|
HEAD are **byte-identical** afterward.
|
|
@@ -32,7 +69,8 @@ Both checkpoint backends exclude the actual Arco state folder, including when AR
|
|
|
32
69
|
videos are inert ballast no per-turn snapshot scheme can afford to copy. A **1 GiB included-total cap**
|
|
33
70
|
backstops many-small-file trees; over it the snapshot is skipped entirely (logged, returns null).
|
|
34
71
|
Overrides: `ARCO_CHECKPOINT_FILE_CAP_BYTES` / `ARCO_CHECKPOINT_TOTAL_CAP_BYTES` (`0` disables
|
|
35
|
-
either).
|
|
72
|
+
either). Git-backed snapshots apply the same caps before staging (see above). The shadow store uses
|
|
73
|
+
the same object quarantine. Every ref has a small
|
|
36
74
|
`<wfid>.<seq>.skipped.json` sidecar recording the exact out-of-scope paths: a target-skipped file remains
|
|
37
75
|
untouched even if it later shrinks, and revert aborts before writing when a currently over-cap path
|
|
38
76
|
overlaps the target tree. The safety snapshot cannot recover those bytes, so abort is the only safe path.
|
|
@@ -55,6 +93,25 @@ revert.
|
|
|
55
93
|
Returns `{ ref, fileCount, ts, backend, skippedLargeFiles? }`, or `null` if it skipped/failed (never throws
|
|
56
94
|
into the turn).
|
|
57
95
|
|
|
96
|
+
## Repositories used with earlier versions
|
|
97
|
+
|
|
98
|
+
Before this scoping and quarantine, a Git-backed capture hashed every untracked, non-ignored file. A
|
|
99
|
+
capture that timed out could leave `tmp_pack_*` files in `.git/objects/pack/` (Git streams files over
|
|
100
|
+
`core.bigFileThreshold`, 512 MiB by default, into a temporary pack) or loose objects, once per turn.
|
|
101
|
+
|
|
102
|
+
Containment and recovery are separate. Updating stops new growth; it does not remove what is already on
|
|
103
|
+
disk. Keeping large read-only inputs outside the work tree, or listing them in `.gitignore` or
|
|
104
|
+
`.git/info/exclude`, keeps any version from staging them.
|
|
105
|
+
|
|
106
|
+
Recovery deletes nothing automatically. A file's name, its location and a moment without open handles
|
|
107
|
+
do not prove it is abandoned. Before deleting a `tmp_pack_*` file or an `arco-incoming-*` directory,
|
|
108
|
+
stop every Arco turn and every other process that writes to that object store, attribute the file to a
|
|
109
|
+
known failed or interrupted capture (its time matching that failure), check again that nothing is
|
|
110
|
+
running, back up the project, and delete only the files individually identified this way. Leave
|
|
111
|
+
doubtful files. Finished `pack-*` files are never deleted by name; ordinary `git gc` handles
|
|
112
|
+
unreferenced objects. Immediate pruning such as `git gc --prune=now` can remove objects another writer
|
|
113
|
+
has not yet referenced and is not a recovery step.
|
|
114
|
+
|
|
58
115
|
## Hook (`server/src/ws/turnEngine.ts`)
|
|
59
116
|
|
|
60
117
|
The snapshot fires in `handleUserMessage`, immediately before `runPrimaryTurn(...)`, **only for operator
|
|
@@ -63,7 +120,7 @@ primitive also used by reviewers, handoff seeds, `exportContext`, and Task child
|
|
|
63
120
|
checkpoint the operator's working tree. It is:
|
|
64
121
|
|
|
65
122
|
- **Skipped when `armPlanMode` is true** (plan-mode turns are read-only until `ExitPlanMode`), for chat and isolated scratch sessions, and for an explicit Ollama allowlist containing only known read-only tools. Unknown or dynamic tools are treated as potentially mutating.
|
|
66
|
-
- **Bounded pre-capture**: wait up to two seconds before starting the provider. A timeout or failure lets the turn proceed and omits its changed-files line
|
|
123
|
+
- **Bounded pre-capture**: wait up to two seconds before starting the provider. A timeout or failure lets the turn proceed and omits its changed-files line. A capture that misses the cutoff is cancelled: it stops its Git commands, discards its objects and publishes no ref, so it never becomes a baseline or an undo point and cannot pile up behind later turns. The end-of-turn capture is not cut off; the workflow stays busy until it finishes, and each Git step it runs has the existing timeout.
|
|
67
124
|
- Followed by a `checkpoint_created { workflowId, checkpointSeq, ref, label, ts, fileCount, skippedLargeFiles? }`
|
|
68
125
|
broadcast (`shared/src/protocol/checkpoints.ts`). `checkpointSeq` is the **guard seq** (the turn the
|
|
69
126
|
checkpoint protects, from `currentSeq()`); the event gets its own next events.jsonl `seq`. `skippedLargeFiles` appears on shadow-store snapshots that excluded per-file-capped
|
|
@@ -133,6 +190,13 @@ reservation does not replace isolation through a separate worktree.
|
|
|
133
190
|
REFUSES ("ignored by one of your .gitignore files"), failing every revert in a repo containing
|
|
134
191
|
`.arco` (found 2026-08-19). Both seed steps must succeed: a seeded `.arco` would be swept from the
|
|
135
192
|
working tree by `read-tree -u --reset` (it's absent from every checkpoint tree).
|
|
193
|
+
- The seed applies the same size scope. Current files over the per-file cap and paths in the target's
|
|
194
|
+
skipped-path manifest stay out of it, so the restore neither hashes nor deletes them. If the target
|
|
195
|
+
tree would write a changed or untracked path that is now over the cap, the current file must match
|
|
196
|
+
the target blob (`hash-object` without `-w`) and is recorded with that blob; otherwise preview and
|
|
197
|
+
revert refuse (`capped-overlap`) before any write. An unchanged committed large file is held by HEAD
|
|
198
|
+
and the safety snapshot, so the restore may replace it. New or changed bytes over the total cap refuse
|
|
199
|
+
as `too-large`. Seed and comparison objects go to an operation quarantine that is always discarded.
|
|
136
200
|
- `read-tree -u --reset <tree>` against the scratch index updates the working tree to match the
|
|
137
201
|
checkpoint tree AND **deletes files the scratch index tracked but the target tree lacks**, that's
|
|
138
202
|
what makes "files created after the checkpoint are removed" a TRUE revert.
|
package/docs/CLIENT.md
CHANGED
|
@@ -1265,7 +1265,7 @@ In the mobile view, Recall places project, time, pinned and transcript filters i
|
|
|
1265
1265
|
|
|
1266
1266
|
In the mobile view, UPLOAD FROM PHONE opens the device's own file and photo picker and adds its selection to the current conversation draft. On the workbench the same control continues to offer the QR upload window. Media uses "Choose a file" in the mobile view.
|
|
1267
1267
|
|
|
1268
|
-
The mobile view is the `/mobile` address of the same client (`isMobilePath` in `client/src/layout/layoutRange.ts`). The server already answers unmatched paths with `index.html`, so nothing new reaches the server. `useLayout()` reports `phone` on `/mobile` and draws the Narrow range underneath; `/` never switches by itself. Below `PHONE_BELOW` (600 CSS pixels of width, or of the shorter side on a touch-only screen) `useLayout()` reports `phoneSized`, and the desktop workbench shows an "Open mobile view" link (`OpenMobileViewLink`) above the chat and is otherwise unchanged.
|
|
1268
|
+
The mobile view is the `/mobile` address of the same client (`isMobilePath` in `client/src/layout/layoutRange.ts`). The server already answers unmatched paths with `index.html`, so nothing new reaches the server. `useLayout()` reports `phone` on `/mobile` and draws the Narrow range underneath; `/` never switches by itself. Below `PHONE_BELOW` (600 CSS pixels of width, or of the shorter side on a touch-only screen) `useLayout()` reports `phoneSized`, and the desktop workbench shows an "Open mobile view" link (`OpenMobileViewLink`) above the chat and is otherwise unchanged. A shortcut added to a phone's home screen from `/mobile` opens `/mobile`: `main.tsx` points the manifest link at `/manifest-mobile.webmanifest` (`start_url` `/mobile`, chosen by `manifestHrefFor`), and every other address keeps `/manifest.webmanifest`, which starts at `/`. A shortcut added from the workbench address still opens the workbench.
|
|
1269
1269
|
|
|
1270
1270
|
`App.tsx` replaces the top bar and tab strip with `MobileHeader` and draws `MobileScreenHost` over the conversation area (both in `client/src/components/MobileShell.tsx`; view state in `client/src/stores/phoneStore.ts`). There are two screens. The directory (`MobileDirectory`) lists NEEDS YOU (members and tabs waiting on a decision, and members idle with unread mail; a row says which and whether it is also working, and opens the questions sheet directly), then clusters (with working and needs-you counts; the row opens the cluster on the member last in view, else its Director, as a research project's row does, and a separate MEMBERS control folds the member list open), research projects, agents, chats and Home, in the saved tab order. Quick research appears with Chats. Choosing a row calls the same store actions as the tab strip (`setActiveCluster`, `setClusterFocusedMember`, `setActiveJob`, `focusNoticeWorkflow`) and shows the conversation screen. The open clusters and the scroll position are kept in `phoneStore` for the return. A decision is a pending Arco question, a pending Claude Native question (including a sub-agent batch approval) or a parked review gate: `pendingDecisions(..., all)` in `PendingQuestionsButton.tsx`; the desktop PENDING QUESTIONS list keeps Arco questions and batches only.
|
|
1271
1271
|
|
package/docs/HTTP_API.md
CHANGED
|
@@ -652,7 +652,7 @@ See `docs/LOCAL_SERVICES.md`.
|
|
|
652
652
|
|
|
653
653
|
### `POST /api/files/write`
|
|
654
654
|
|
|
655
|
-
Workbench Expansion A6. The only operator-driven write path that bypasses an agent turn - backs the `FileViewerModal` Edit/Lock toggle's **Save**. Route: `server/src/http/fileWriteRoutes.ts`; the path-guarded core is `writeFileWithinCwd` (exported so the smoke calls it directly).
|
|
655
|
+
Workbench Expansion A6. The only operator-driven write path that bypasses an agent turn - backs the `FileViewerModal` Edit/Lock toggle's **Save**. Route: `server/src/http/fileWriteRoutes.ts`; cwd binding is `resolveBoundCwd` in `writeConfinement.ts`; the path-guarded core is `writeFileWithinCwd` (exported so the smoke calls it directly).
|
|
656
656
|
|
|
657
657
|
Request body (JSON):
|
|
658
658
|
|
|
@@ -660,10 +660,11 @@ Request body (JSON):
|
|
|
660
660
|
{ "cwd": "<absolute cwd>", "wfid": "<workflowId>", "path": "<file path>", "content": "<new contents>" }
|
|
661
661
|
```
|
|
662
662
|
|
|
663
|
-
- `
|
|
664
|
-
- `
|
|
663
|
+
- `wfid` - optional workflow id. When present and valid, the write uses only that workflow's registered working directory on this server (`workflowCwds` or the live workflow config). The body's `cwd` is ignored. An invalid id answers 400 (`invalid wfid`). An id with no bound cwd answers 400 (`workflow id has no bound cwd on this server`). Nothing is written in either case.
|
|
664
|
+
- `cwd` - absolute project root. Used only when `wfid` is omitted. It must exactly match a root the server already knows (a live workflow or cluster cwd, an entry in the known-cwds registry, or the explorer default root). An unknown directory answers 400 (`cwd is not a known workflow or project directory`). When both `wfid` and `cwd` are omitted, the request answers 400 (`cwd or a workflow id with a bound cwd is required`).
|
|
665
|
+
- `path` - relative-to-cwd or absolute. **Resolved against the bound cwd and re-checked with `confineRealPath` (lexical `resolveWithinCwd` plus a realpath check).** Symlink escapes are refused. Any path that escapes the bound cwd (relative `../`, an absolute path outside, or a traversal like `foo/../../x`) is **rejected with 400 and nothing is written.** This is load-bearing: a fat-fingered or agent-suggested path must never write outside the project.
|
|
665
666
|
- `content` - the full new file contents (whole-file replace, not a patch). It must be a string: a missing, `null` or non-string `content` is rejected with 400 (`content must be a string`) and the file is left as it was. An explicit empty string is valid and empties the file. Parent dirs inside cwd are created as needed; an existing directory at the target is refused.
|
|
666
|
-
- Response: `200 { ok: true, path: "<cwd-relative>", bytes: N }` on success; `400 { ok: false, error }` on a rejected escape
|
|
667
|
+
- Response: `200 { ok: true, path: "<cwd-relative>", bytes: N }` on success; `400 { ok: false, error }` on a rejected binding, escape or bad input; `500 { ok: false, error }` on an unexpected fs error.
|
|
667
668
|
|
|
668
669
|
---
|
|
669
670
|
|
|
@@ -985,8 +986,9 @@ Request body (JSON):
|
|
|
985
986
|
{ "cwd": "<absolute cwd>", "workflowId": "<wfid>", "path": "edited.png", "dataUrl": "data:image/png;base64,<payload>", "overwrite": false }
|
|
986
987
|
```
|
|
987
988
|
|
|
988
|
-
- `
|
|
989
|
-
- `
|
|
989
|
+
- `workflowId` - optional workflow id. When present and valid, the write uses only that workflow's registered working directory on this server. The body's `cwd` is ignored. An id with no bound cwd answers `code: 'no-cwd'` (`workflow id has no bound cwd on this server`) and nothing is written.
|
|
990
|
+
- `cwd` - absolute project root. Used only when `workflowId` is omitted. It must exactly match a root the server already knows (a live workflow or cluster cwd, an entry in the known-cwds registry, or the explorer default root). An unknown directory, or neither field, answers `code: 'no-cwd'` with the matching `boundCwdError` text.
|
|
991
|
+
- `path` - the relative (or absolute-within-cwd) **target** filename. **Resolved against the bound cwd and re-checked with `confineRealPath`** - a `../`/absolute-outside/traversal path or an in-cwd symlink that escapes is rejected (`code: 'path-escape'`, nothing written). Must carry an image extension (`.png`/`.jpg`/`.jpeg`/`.webp`, else `code: 'bad-ext'`). A new subfolder's parent dirs are created (confined).
|
|
990
992
|
- `dataUrl` - `data:image/<png|jpeg|webp>;base64,<payload>`. Parsed defensively: a non-image mime / malformed URL / empty decode -> `code: 'bad-image'`. A decoded payload over **64 MiB** is rejected (`code: 'too-large'`) via a cheap base64-length pre-check - no oversize Buffer is allocated.
|
|
991
993
|
- `overwrite` - when the resolved target **already exists**, the write only proceeds if this is explicitly `true`; otherwise `code: 'exists'` and **nothing is written** (original bytes unchanged). A brand-new filename writes unconditionally.
|
|
992
994
|
- **Response:** always `200` with `ImageWriteResult` for an operator-visible condition - `{ ok: true, relPath, bytes }` on success, or `{ ok: false, error, code }` where `code` ∈ `no-cwd | bad-path | path-escape | bad-image | bad-ext | too-large | exists | write-failed`. Only a truly unexpected server bug is a 500. (An on-disk checkpoint of the change is covered by the A2 checkpoint path once the editor wires it.)
|
|
@@ -1128,7 +1130,7 @@ See [RESEARCH.md](RESEARCH.md).
|
|
|
1128
1130
|
- `POST /api/research/library/:projectId/locate`: body `{ folder }`. Accepts only a folder whose `research.json` belongs to the project and updates the library and the closed record. 400 `invalid_folder` or `not_this_project`; 404 `unknown_project`.
|
|
1129
1131
|
- `POST /api/research/library/:projectId/forget`: removes the project from the library only. 409 `project_open`; 404 when unknown.
|
|
1130
1132
|
- `POST /api/research/:clusterId/close`: body `{ moveUnsent }`. Writes the researcher logs, moves unsent files when asked and removes the researchers' folders. `{ ok: true, logsWrittenTo, moved, removed }`; 409 `researcher_busy` with `letters`; 404 `unknown_research`.
|
|
1131
|
-
- `GET /api/research/:clusterId/keep-as-project` and `POST` the same path; `GET` and `POST /api/research/saved-quick/:chatId/keep-as-project`: promote a Quick research result to a project. `GET` answers the journal phase (`{ phase, message, folder? }`, or `{ phase: 'idle' }`; the saved-quick form answers `404 unknown_chat` for an unknown chat). `POST` takes `{ folderRoot? }` (16 KB cap) and answers `202 { phase, message }`. A
|
|
1133
|
+
- `GET /api/research/:clusterId/keep-as-project` and `POST` the same path; `GET` and `POST /api/research/saved-quick/:chatId/keep-as-project`: promote a Quick research result to a project. `GET` answers the journal phase (`{ phase, message, folder? }`, or `{ phase: 'idle' }`; the saved-quick form answers `404 unknown_chat` for an unknown chat). `POST` takes `{ folderRoot? }` (16 KB cap) and answers `202 { phase, message }`. A supplied folder replaces the configured destination after validation. A failed request returns `400 { error }`. A missing destination adds `code: "research_folder_missing"` so the caller can ask for another folder and retry.
|
|
1132
1134
|
- `POST /api/research/:clusterId/rounds/:n/extend`: the operator's +15 MIN on a round deadline. `{ deadline }`; `404 unknown_round`; `409` with another code when the round cannot be extended.
|
|
1133
1135
|
- `POST /api/research/:clusterId/rounds/:n/retry/:letter`: RETRY on a failed or timed-out researcher. `{ late, file }`; `404` for `not_research`, `unknown_round` or `unknown_researcher`; `409 { error, message }` otherwise (for example `busy`).
|
|
1134
1136
|
- `GET /api/research/:clusterId/rerun-preview` and `POST /api/research/:clusterId/rerun-round`: read the settings of an open project for a rerun (`{ name, brief, blind, sourceProject, director, researchers }`), and start another round with the current panel from `{ brief }` (at most 20000 characters, 32 KB body). `rerun-round` answers `{ round, receiptError? }`. Both answer `400 { error }` for a closed project; any other method is `405`.
|
package/docs/PROVIDERS.md
CHANGED
|
@@ -290,7 +290,7 @@ tools in a separate working folder, which is not a security fence.
|
|
|
290
290
|
only the chat system block.
|
|
291
291
|
- **Claude CLI** - `--tools ""`, or `--tools WebSearch,WebFetch` when armed, WEB grants permission for exactly `WebSearch` and `WebFetch` with `--allowedTools`, so the non-interactive CLI can run the enabled pair.
|
|
292
292
|
plus `--strict-mcp-config`.
|
|
293
|
-
- **Codex** - ordinary Chat always runs on `exec`, including saved tabs configured for app-server. Saved app-server conversations resume the same Codex session ID on exec, preserving provider history. Start and resume disable command execution, local image reading, apps, plugins, remote plugins, subagents, image generation, memories and hooks, plus skills and project documents. `--ignore-user-config --ignore-rules` keep user tools and rules out. Chat additionally disables agents and goals and excludes the host's builtin functions namespace, which contains patch tools. Strict startup validation refuses unsupported controls before a model turn. The lowest tested compatible Codex version is `0.167.0`; its strict startup check accepts both WEB policies. WEB keeps the exec host enabled for live web tools while command execution, local image readers and extension restrictions stay in force; WEB off disables that host. A cached installed-capability probe refuses unsupported versions before a model turn. The read-only sandbox is additional protection, not a disk-read boundary. Documents arrive as inline text and images through explicit `-i` inputs; `web_search="live"|"disabled"` follows WEB. The header shows EXEC. There is no mid-turn steering; send the next message after the reply. Native compaction and structured questions remain Agent app-server features. Computer mode keeps its separate privileged transport.
|
|
293
|
+
- **Codex** - ordinary Chat always runs on `exec`, including saved tabs configured for app-server. Saved app-server conversations resume the same Codex session ID on exec, preserving provider history. Start and resume disable command execution, local image reading, apps, plugins, remote plugins, subagents, image generation, memories and hooks, plus skills and project documents. `--ignore-user-config --ignore-rules` keep user tools and rules out. Chat additionally disables agents and goals and excludes the host's builtin functions namespace, which contains patch tools. Strict startup validation refuses unsupported controls before a model turn. The lowest tested compatible Codex version is `0.167.0`; its strict startup check accepts both WEB policies. WEB keeps the exec host enabled for live web tools while command execution, local image readers and extension restrictions stay in force; WEB off disables that host. A cached installed-capability probe refuses unsupported versions before a model turn. Optional features reported as deprecated or removed pass only when the probe sees them disabled and strict configuration still passes. The same checks apply when a Codex original-worker handoff runs its tool-free reflection. The read-only sandbox is additional protection, not a disk-read boundary. Documents arrive as inline text and images through explicit `-i` inputs; `web_search="live"|"disabled"` follows WEB. The header shows EXEC. There is no mid-turn steering; send the next message after the reply. Native compaction and structured questions remain Agent app-server features. Computer mode keeps its separate privileged transport.
|
|
294
294
|
- **Ollama** - no tools, or exactly `WebSearch` / `WebFetch` (local SearXNG +
|
|
295
295
|
fetch) when armed, re-checked at dispatch by `ollamaToolCallAllowed()` so a
|
|
296
296
|
hallucinated known tool name cannot cross the boundary.
|
package/docs/RESEARCH.md
CHANGED
|
@@ -137,9 +137,9 @@ A research project opens in an ordinary cluster tab (`ClusterTab`) with these ad
|
|
|
137
137
|
|
|
138
138
|
Quick research starts from Past Chats or the research start form. It runs one round in Arco without choosing a research folder. The brief and researcher rows appear above the Research Director conversation; select a row for its read-only activity. Follow-up messages go to the Director. RESULTS opens the released material.
|
|
139
139
|
|
|
140
|
-
KEEP AS PROJECT
|
|
140
|
+
KEEP AS PROJECT uses the configured research folder. If the folder was removed, the folder picker opens and the Quick research stays open. Choose an existing folder and select KEEP HERE to save the new location for future research. A request waits while members work and follow-up messages remain available during the wait. Once members are idle, Arco copies the work and opens it as a research project without rerunning the round. If the copy cannot complete, Quick research stays open. Closing unpromoted Quick research saves the Director conversation in Past Chats and offers to attach unsent researcher files before removing researcher workspaces.
|
|
141
141
|
|
|
142
|
-
The saved Chat also offers KEEP AS PROJECT. It keeps the research as a closed project and includes the saved conversation in `saved-chat.md`; reopen the project from the Research library to continue. Deleting the saved Chat removes its Quick research record and sources. A project already kept has its own copy and remains available.
|
|
142
|
+
The saved Chat also offers KEEP AS PROJECT and the same folder recovery. It keeps the research as a closed project and includes the saved conversation in `saved-chat.md`; reopen the project from the Research library to continue. Deleting the saved Chat removes its Quick research record and sources. A project already kept has its own copy and remains available.
|
|
143
143
|
|
|
144
144
|
At `/mobile`, the directory lists research projects separately and Quick research with Chats. A project opens on the Director with the member strip; PANELS offers RESULTS, ACTIVITY and PLAN. Quick research shows its brief, researcher rows and the Director conversation.
|
|
145
145
|
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"node-pty": "1.1.0"
|
|
5
5
|
},
|
|
6
6
|
"name": "arco-workbench",
|
|
7
|
-
"version": "0.2.
|
|
7
|
+
"version": "0.2.4",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/ghreprimand/arco.git"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"word-extractor": "1.0.4",
|
|
68
68
|
"ws": "8.22.0",
|
|
69
69
|
"xlsx": "0.20.3",
|
|
70
|
-
"@arco/shared": "0.2.
|
|
70
|
+
"@arco/shared": "0.2.4"
|
|
71
71
|
},
|
|
72
72
|
"bundleDependencies": [
|
|
73
73
|
"@arco/shared",
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { Capabilities, CliUpdateOutcome } from '@arco/shared';
|
|
2
2
|
import { type CliUpdateDecision, type UpdateCommandResult } from './cliUpdateDecision.js';
|
|
3
|
+
import { type ResolveOptions } from './windowsCommand.js';
|
|
3
4
|
export type CliProvider = 'claude' | 'codex' | 'cursor' | 'antigravity-cli';
|
|
5
|
+
export declare function probeCommandFor(bin: string, args: string[], opts?: ResolveOptions): {
|
|
6
|
+
command: string;
|
|
7
|
+
args: string[];
|
|
8
|
+
env?: NodeJS.ProcessEnv;
|
|
9
|
+
};
|
|
4
10
|
export declare function probeVersion(bin: string, flags?: string[], timeoutMs?: number): Promise<string>;
|
|
5
11
|
export declare function probeCapabilities(): Promise<Capabilities>;
|
|
6
12
|
export declare function refreshRuntimeVersions(previous: Capabilities): Promise<Capabilities>;
|
|
@@ -11,7 +11,7 @@ import { atomicWriteFile } from './atomicFile.js';
|
|
|
11
11
|
import { probeCodexUpdate, describeCliUpdate } from './cliUpdateDecision.js';
|
|
12
12
|
import { compareVersions } from './updateCheck.js';
|
|
13
13
|
import { arcoHome } from './arcoHome.js';
|
|
14
|
-
import { commandArgs } from './windowsCommand.js';
|
|
14
|
+
import { commandArgs, resolveCommand } from './windowsCommand.js';
|
|
15
15
|
const execFileAsync = promisify(execFile);
|
|
16
16
|
const CLI_PROBE_OPTIONS = {
|
|
17
17
|
timeout: 5_000,
|
|
@@ -28,9 +28,16 @@ const cliBinary = (provider) => provider === 'cursor' ? 'cursor-agent' : provide
|
|
|
28
28
|
// optional dep, so npm exited 0 — and every `codex --version` threw. Collapsing
|
|
29
29
|
// that into 'unknown' made the whole CODEX row disappear from the popover, which
|
|
30
30
|
// reads as "not installed" and gives the operator nothing to click or diagnose.
|
|
31
|
+
// Antigravity is found the way its status, usage, sign-in and turns find it: a
|
|
32
|
+
// program installed after Arco started, or on the new-terminal PATH only, still
|
|
33
|
+
// counts. Every other program keeps the plain lookup.
|
|
34
|
+
export function probeCommandFor(bin, args, opts = {}) {
|
|
35
|
+
return resolveCommand(bin, args, bin === 'agy' ? { fresh: true, ...opts } : opts);
|
|
36
|
+
}
|
|
31
37
|
export async function probeVersion(bin, flags = ['--version'], timeoutMs = 5_000) {
|
|
32
38
|
try {
|
|
33
|
-
const
|
|
39
|
+
const cmd = probeCommandFor(bin, flags);
|
|
40
|
+
const { stdout } = await execFileAsync(cmd.command, cmd.args, { ...CLI_PROBE_OPTIONS, timeout: timeoutMs, ...(cmd.env ? { env: cmd.env } : {}) });
|
|
34
41
|
const match = stdout.match(/(\d+\.\d+\.\d+(?:[-.][A-Za-z0-9.-]+)?)/);
|
|
35
42
|
return match ? match[1] : 'unknown';
|
|
36
43
|
}
|
|
@@ -43,7 +50,8 @@ export async function probeVersion(bin, flags = ['--version'], timeoutMs = 5_000
|
|
|
43
50
|
// fits the popover's one-line result slot.
|
|
44
51
|
async function probeFailureReason(bin) {
|
|
45
52
|
try {
|
|
46
|
-
|
|
53
|
+
const cmd = probeCommandFor(bin, ['--version']);
|
|
54
|
+
await execFileAsync(cmd.command, cmd.args, { ...CLI_PROBE_OPTIONS, ...(cmd.env ? { env: cmd.env } : {}) });
|
|
47
55
|
return null;
|
|
48
56
|
}
|
|
49
57
|
catch (err) {
|
|
@@ -280,7 +288,8 @@ async function runUpdateCommand(cmd, args, provider) {
|
|
|
280
288
|
delete env[name];
|
|
281
289
|
}
|
|
282
290
|
try {
|
|
283
|
-
const
|
|
291
|
+
const run = probeCommandFor(cmd, args);
|
|
292
|
+
const { stdout, stderr } = await execFileAsync(run.command, run.args, { env: run.env ? { ...env, ...run.env } : env, maxBuffer: 4 * 1024 * 1024, timeout: 180_000 });
|
|
284
293
|
return { output: (stdout + stderr).trim(), exitCode: 0 };
|
|
285
294
|
}
|
|
286
295
|
catch (err) {
|
|
@@ -21,6 +21,7 @@ export declare function collectProjectDocsPage(project: string, limit?: number,
|
|
|
21
21
|
export declare function collectProjectDocs(project: string, limit?: number): Promise<DocEntry[]>;
|
|
22
22
|
export declare function collectDocsPage(opts?: {
|
|
23
23
|
project?: string;
|
|
24
|
+
budget?: ScanBudget;
|
|
24
25
|
}): Promise<DocsPage>;
|
|
25
26
|
export declare function collectDocs(opts?: {
|
|
26
27
|
project?: string;
|
|
@@ -71,8 +71,7 @@ export async function collectProjectDocsPage(project, limit = 1000, global) {
|
|
|
71
71
|
export async function collectProjectDocs(project, limit = 1000) {
|
|
72
72
|
return (await collectProjectDocsPage(project, limit)).entries;
|
|
73
73
|
}
|
|
74
|
-
async function collectScopedDocs(project) {
|
|
75
|
-
const budget = scanBudget();
|
|
74
|
+
async function collectScopedDocs(project, budget = scanBudget()) {
|
|
76
75
|
const out = [];
|
|
77
76
|
const root = await scanBeforeDeadline(realpathWithinHome(project), budget);
|
|
78
77
|
if (root)
|
|
@@ -109,10 +108,11 @@ async function collectScopedDocs(project) {
|
|
|
109
108
|
}
|
|
110
109
|
// Global doc scan across known projects, bounded per-project so a home load over
|
|
111
110
|
// dozens of projects stays responsive. `project` scopes to one (full limit).
|
|
111
|
+
// `budget` replaces the default scan budget; routes always use the defaults.
|
|
112
112
|
export async function collectDocsPage(opts = {}) {
|
|
113
113
|
if (opts.project)
|
|
114
|
-
return collectScopedDocs(opts.project);
|
|
115
|
-
const global = scanBudget(50_000, 650);
|
|
114
|
+
return collectScopedDocs(opts.project, opts.budget);
|
|
115
|
+
const global = opts.budget ?? scanBudget(50_000, 650);
|
|
116
116
|
const known = await scanBeforeDeadline(readKnownCwds(), global);
|
|
117
117
|
if (!known)
|
|
118
118
|
return { entries: [], partial: true };
|