@seekskyworld/open-browser 0.2.0 → 0.3.1
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 +2 -0
- package/Docs/desktop-packages.md +45 -0
- package/Docs/open-browser-api.d.ts +13 -9
- package/Docs//350/267/250/345/271/263/345/217/260/350/257/225/347/224/250/344/270/216/345/217/221/350/241/214.md +6 -6
- package/README.md +11 -9
- package/README.zh-CN.md +6 -4
- package/access-registry.mjs +8 -3
- package/action-execution.mjs +30 -5
- package/api-contract.mjs +8 -7
- package/browser-extension/_locales/en/messages.json +8 -0
- package/browser-extension/_locales/zh_CN/messages.json +8 -0
- package/browser-extension/i18n.js +84 -0
- package/browser-extension/manifest.json +5 -4
- package/browser-extension/messages.js +266 -0
- package/browser-extension/newtab.css +4 -0
- package/browser-extension/newtab.html +9 -9
- package/browser-extension/newtab.js +38 -35
- package/browser-extension/page-locale.js +23 -0
- package/browser-extension/phase-labels.js +33 -6
- package/browser-extension/popup.css +2 -2
- package/browser-extension/popup.html +25 -25
- package/browser-extension/popup.js +102 -59
- package/browser-extension/tab-action.js +31 -25
- package/browser-extension/worker.js +31 -7
- package/browser-extension/workspace-title.js +2 -2
- package/build-profile.mjs +10 -2
- package/capability-matrix.mjs +1 -1
- package/chromium-host.mjs +26 -19
- package/chromium-shell.mjs +7 -5
- package/cli.mjs +51 -48
- package/contract-validation.mjs +1 -1
- package/control.mjs +9 -8
- package/desktop/Info.plist +4 -2
- package/desktop/Launcher.m +10 -2
- package/desktop/OBControlBar.m +12 -8
- package/desktop/OBLocalization.h +20 -0
- package/desktop/OBPageView.m +2 -1
- package/desktop/WorkspacePanel.m +85 -83
- package/desktop/archive-release.py +5 -1
- package/desktop/build-macos.mjs +17 -8
- package/desktop/build-managed-input.mjs +2 -1
- package/desktop/build-portable.mjs +5 -3
- package/desktop/build-profile.mjs +2 -1
- package/desktop/build.mjs +2 -1
- package/desktop/create-shortcut.ps1 +7 -1
- package/desktop/en.lproj/Localizable.strings +106 -0
- package/desktop/install-menu-entry.mjs +2 -0
- package/desktop/notarize-macos.mjs +70 -29
- package/desktop/package-macos.mjs +4 -3
- package/desktop/sign.mjs +22 -6
- package/desktop/start-profile.mjs +2 -1
- package/desktop/start.mjs +3 -1
- package/desktop/verify-macos-release.mjs +27 -18
- package/desktop/verify-version.mjs +22 -2
- package/desktop/zh-Hans.lproj/Localizable.strings +106 -0
- package/engine-service.mjs +86 -27
- package/hosted/cli.mjs +2 -1
- package/hosted/init.mjs +2 -1
- package/i18n.mjs +41 -0
- package/managed-input.mjs +22 -5
- package/mcp-http.mjs +12 -11
- package/mcp-server.mjs +27 -10
- package/mcp.mjs +1 -0
- package/messages.zh-CN.mjs +175 -0
- package/package.json +9 -5
- package/page-activity.mjs +10 -7
- package/page-observation.mjs +4 -1
- package/paths.mjs +2 -5
- package/receipt-store.mjs +17 -7
- package/runtime.mjs +5 -4
- package/sdk.mjs +57 -46
- package/service.mjs +38 -21
- package/skill-links.mjs +72 -18
- package/skills/open-browser/SKILL.md +10 -97
- package/skills/open-browser/SKILL.zh-CN.md +22 -0
- package/skills/open-browser/references/macos.en.md +3 -0
- package/skills/open-browser/references/macos.md +5 -0
- package/skills/open-browser/references/operations.en.md +54 -0
- package/skills/open-browser/{SKILL.windows.md → references/operations.md} +8 -59
- package/skills/open-browser/references/recovery.en.md +36 -0
- package/skills/open-browser/references/recovery.md +38 -0
- package/skills/open-browser/references/windows.en.md +3 -0
- package/skills/open-browser/references/windows.md +5 -0
- package/skills/open-browser/scripts/bootstrap.mjs +80 -90
- package/skills/open-browser/scripts/guide.mjs +20 -0
- package/skills/open-browser/scripts/open-browser +5 -1
- package/studio/demo-site.mjs +5 -4
- package/studio/index.html +37 -33
- package/studio/index.mjs +10 -3
- package/studio/native-demo.mjs +8 -7
- package/studio/studio.css +3 -0
- package/studio/studio.js +99 -69
- package/system-i18n.mjs +19 -0
- package/tab-adoption.mjs +9 -3
- package/tab-recovery.mjs +100 -0
- package/visual-page.mjs +17 -7
- package/workspace-lifecycle.mjs +18 -2
- package/workspace-state.mjs +57 -16
- package/skills/open-browser/SKILL.macos.md +0 -112
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
|
-
<html lang="
|
|
2
|
+
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>
|
|
6
|
+
<title data-i18n>Open Browser Workspace</title>
|
|
7
7
|
<link rel="icon" type="image/png" href="icons/open-browser-32.png">
|
|
8
8
|
<link rel="stylesheet" href="popup.css">
|
|
9
|
-
<script
|
|
10
|
-
<script defer src="phase-labels.js"></script>
|
|
11
|
-
<script defer src="popup.js"></script>
|
|
9
|
+
<script type="module" src="page-locale.js"></script>
|
|
12
10
|
</head>
|
|
13
11
|
<body>
|
|
14
|
-
<header><strong><img src="icons/open-browser-48.png" width="24" height="24" alt="">open-browser</strong><span id="status" role="status"
|
|
12
|
+
<header><strong><img src="icons/open-browser-48.png" width="24" height="24" alt="">open-browser</strong><span data-i18n id="status" role="status">Connecting…</span></header>
|
|
15
13
|
<main>
|
|
16
|
-
<p id="empty" hidden
|
|
14
|
+
<p data-i18n id="empty" hidden>No active tasks. Open a new tab to see the Agent Console.</p>
|
|
17
15
|
<section id="adoption" hidden>
|
|
18
16
|
<p id="adopt-site"></p>
|
|
19
|
-
<label for="adopt-task"
|
|
20
|
-
<label for="adopt-alias"
|
|
21
|
-
<
|
|
22
|
-
<
|
|
17
|
+
<label data-i18n for="adopt-task">Agent task to authorize</label><select id="adopt-task"></select>
|
|
18
|
+
<label data-i18n for="adopt-alias">Account alias (optional)</label><input data-i18n-attrs="placeholder" id="adopt-alias" maxlength="48" placeholder="For example, Work account">
|
|
19
|
+
<label data-i18n><input type="checkbox" id="resume-tab">Restore the last browser session on restart and resume this task</label>
|
|
20
|
+
<div class="action"><button data-i18n id="adopt" type="button">Give this tab to the agent</button><button data-i18n class="secondary" id="adopt-manual" type="button">Generate backup authorization code</button></div>
|
|
21
|
+
<label data-i18n id="adopt-result" hidden>Send this authorization to the selected agent within two minutes<input id="adopt-token" readonly></label>
|
|
23
22
|
</section>
|
|
24
23
|
<section id="workspace" hidden>
|
|
25
24
|
<div id="context-selection" hidden>
|
|
26
|
-
<label for="workspaces"
|
|
27
|
-
<label for="pages"
|
|
25
|
+
<label data-i18n for="workspaces">Workspace</label><select id="workspaces"></select>
|
|
26
|
+
<label data-i18n for="pages">Tabs</label><select id="pages"></select>
|
|
28
27
|
</div>
|
|
29
28
|
<p id="page-details"></p>
|
|
30
29
|
<div class="action"><button id="control" type="button"></button></div>
|
|
31
30
|
<div id="dialogs"></div>
|
|
32
31
|
<div id="blocked"></div>
|
|
33
|
-
<details id="uploads"><summary
|
|
32
|
+
<details id="uploads"><summary data-i18n>Allow file uploads</summary><p id="upload-origin"></p>
|
|
34
33
|
<input id="upload-file" type="file"><div id="upload-list"></div></details>
|
|
35
|
-
<details id="downloads" hidden><summary
|
|
34
|
+
<details id="downloads" hidden><summary data-i18n>Task downloads</summary><div id="download-list"></div></details>
|
|
35
|
+
<button id="pixel-permission" type="button" class="secondary" hidden></button>
|
|
36
36
|
<p id="visual-status" hidden></p>
|
|
37
|
-
<details><summary
|
|
38
|
-
<p
|
|
39
|
-
<button id="diagnostic-export-button" type="button" class="secondary"
|
|
40
|
-
<a id="diagnostic-export" download="open-browser-error-log.json" hidden
|
|
37
|
+
<details><summary data-i18n>Export error log</summary>
|
|
38
|
+
<p data-i18n>Export redacted failures for this task to help diagnose problems.</p>
|
|
39
|
+
<button data-i18n id="diagnostic-export-button" type="button" class="secondary">Export error log</button>
|
|
40
|
+
<a data-i18n id="diagnostic-export" download="open-browser-error-log.json" hidden>Download error log</a>
|
|
41
41
|
</details>
|
|
42
|
-
<details id="delivery"><summary
|
|
43
|
-
<p
|
|
44
|
-
<div id="keep"></div><button id="finish" type="button"
|
|
42
|
+
<details id="delivery"><summary data-i18n>Finish task</summary>
|
|
43
|
+
<p data-i18n>Select the tabs to keep. The other task tabs will close.</p>
|
|
44
|
+
<div id="keep"></div><button data-i18n id="finish" type="button">Finish</button>
|
|
45
45
|
</details>
|
|
46
46
|
</section>
|
|
47
47
|
<form id="credential" hidden>
|
|
48
|
-
<h2
|
|
48
|
+
<h2 data-i18n>Supply credentials</h2>
|
|
49
49
|
<p id="credential-target"></p>
|
|
50
|
-
<label for="secret"
|
|
51
|
-
<div class="action"><button id="save" type="submit"
|
|
50
|
+
<label data-i18n for="secret">Credential value</label><input id="secret" type="password" autocomplete="off" required>
|
|
51
|
+
<div class="action"><button data-i18n id="save" type="submit">Bind credential</button></div>
|
|
52
52
|
</form>
|
|
53
53
|
<p id="notice" role="status" hidden></p>
|
|
54
54
|
</main>
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { errorLabel, phases } from './phase-labels.js';
|
|
2
|
+
|
|
3
|
+
const { t } = globalThis.openBrowserI18n;
|
|
2
4
|
|
|
3
5
|
const el = id => document.getElementById(id);
|
|
4
6
|
let selected = '', detail, request, selectedTab = '', revision = 0, busy = false, refreshing = false, contextTab = false;
|
|
5
|
-
const
|
|
7
|
+
const workspaceTitle = globalThis.openBrowserWorkspaceTitle;
|
|
6
8
|
|
|
7
9
|
async function call(method, params = {}) {
|
|
8
10
|
const reply = await chrome.runtime.sendMessage({ method, params });
|
|
@@ -16,14 +18,15 @@ function notify(text = '') {
|
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
function describe(w) {
|
|
19
|
-
if (w.activity?.needsHumanVerification) return
|
|
20
|
-
if (w.mode === 'human') return
|
|
21
|
-
if (w.mode === 'transferring') return
|
|
22
|
-
if (w.activity?.needsCredential) return
|
|
21
|
+
if (w.activity?.needsHumanVerification) return t("Human verification required");
|
|
22
|
+
if (w.mode === 'human') return t("Human in control");
|
|
23
|
+
if (w.mode === 'transferring') return t("Transferring");
|
|
24
|
+
if (w.activity?.needsCredential) return t("Waiting for credentials");
|
|
25
|
+
if (w.activity?.needsVisualPermission) return t("Screenshot permission required");
|
|
23
26
|
const current = w.activity?.current;
|
|
24
27
|
const stage = current?.dispatchState;
|
|
25
|
-
if (stage) return stage === 'dispatched' ?
|
|
26
|
-
return phases[current?.phase] || phases[w.activity?.phase] ||
|
|
28
|
+
if (stage) return stage === 'dispatched' ? t("Dispatched") : t("Waiting for page");
|
|
29
|
+
return phases[current?.phase] || phases[w.activity?.phase] || t("Agent in control");
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
function options(node, entries, value) {
|
|
@@ -42,36 +45,44 @@ function showCredential(next) {
|
|
|
42
45
|
el('credential').hidden = !next;
|
|
43
46
|
if (!next) return;
|
|
44
47
|
el('credential-target').textContent = next.origin + ' · ' + next.credentialRef;
|
|
45
|
-
el('save').textContent =
|
|
48
|
+
el('save').textContent = t("Bind credential");
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
let popupTabId, ordinaryTarget, tokenTimer, standalone = false;
|
|
51
|
+
let popupTabId, ordinaryTarget, tokenTimer, standalone = false, initialized = false;
|
|
49
52
|
function clearToken() {
|
|
50
53
|
clearTimeout(tokenTimer);
|
|
51
54
|
el('adopt-token').value = '';
|
|
52
55
|
el('adopt-result').hidden = true;
|
|
53
56
|
}
|
|
54
|
-
el('adopt-task').onchange = () => { clearToken(); el('adopt').disabled = !el('adopt-task').value; };
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
57
|
+
el('adopt-task').onchange = () => { clearToken(); el('adopt-manual').disabled = el('adopt').disabled = !el('adopt-task').value; };
|
|
58
|
+
function authorizeTab(bindOnApproval) {
|
|
59
|
+
return perform(async () => {
|
|
60
|
+
clearToken();
|
|
61
|
+
const {id:targetId, origin} = ordinaryTarget;
|
|
62
|
+
const reply = await call('offerCurrentTab',{workspaceId:el('adopt-task').value, tabId:popupTabId,
|
|
63
|
+
targetId, origin, bindOnApproval, resumeOnRestart:el('resume-tab').checked, accountAlias:el('adopt-alias').value.trim()});
|
|
64
|
+
if (bindOnApproval && reply.pageId) {
|
|
65
|
+
notify(t("This tab is now assigned to the selected task."));
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
el('adopt-token').value = JSON.stringify({workspaceId:reply.workspaceId,adoptionToken:reply.adoptionToken});
|
|
69
|
+
el('adopt-result').hidden = false;
|
|
70
|
+
el('adopt-token').select();
|
|
71
|
+
tokenTimer = setTimeout(clearToken, Math.max(0, reply.expiresAt - Date.now()));
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
el('adopt').onclick = () => authorizeTab(true);
|
|
75
|
+
el('adopt-manual').onclick = () => authorizeTab(false);
|
|
65
76
|
|
|
66
77
|
let deliveryKey = '', finishId;
|
|
67
78
|
function renderDelivery(w) {
|
|
68
|
-
const originLabels = {resource:
|
|
79
|
+
const originLabels = {resource:t("Load static resources"),navigation:t("Allow navigation and page actions")};
|
|
69
80
|
const blocks = (w.blockedOrigins || []).filter(item => originLabels[item.scope]);
|
|
70
81
|
el('blocked').replaceChildren(...blocks.map(item => {
|
|
71
82
|
const button = document.createElement('button');
|
|
72
83
|
button.type = 'button';
|
|
73
84
|
button.className = 'secondary';
|
|
74
|
-
button.textContent =
|
|
85
|
+
button.textContent = t("For this task: {0} · {1}", originLabels[item.scope], item.origin);
|
|
75
86
|
button.onclick = () => perform(() => call('grantOrigin',{workspaceId:w.workspaceId,
|
|
76
87
|
controlGeneration:w.controlGeneration,origin:item.origin,scope:item.scope}));
|
|
77
88
|
return button;
|
|
@@ -88,7 +99,7 @@ function renderDelivery(w) {
|
|
|
88
99
|
input.disabled = p.ownership === 'user';
|
|
89
100
|
input.value = p.pageId;
|
|
90
101
|
input.onchange = () => { finishId = crypto.randomUUID(); };
|
|
91
|
-
label.append(input, ' ' + (p.title || p.origin ||
|
|
102
|
+
label.append(input, ' ' + (p.title || p.origin || t("Page")));
|
|
92
103
|
return label;
|
|
93
104
|
}));
|
|
94
105
|
}
|
|
@@ -96,8 +107,8 @@ el('finish').onclick = () => perform(async () => {
|
|
|
96
107
|
const keepPageIds = [...el('keep').querySelectorAll('input:checked')].map(input => input.value);
|
|
97
108
|
const receipt = await call('finishWorkspace',{workspaceId:selected,keepPageIds,operationId:finishId,
|
|
98
109
|
controlGeneration:detail.controlGeneration});
|
|
99
|
-
if (receipt.state !== 'completed') { notify(
|
|
100
|
-
notify(
|
|
110
|
+
if (receipt.state !== 'completed') { notify(t("Delivery needs verification · {0}", receipt.operationId)); return; }
|
|
111
|
+
notify(t("Pages kept: {0} · Pages closed: {1}", receipt.keptPageIds.length, receipt.closedPageIds.length));
|
|
101
112
|
render(null);
|
|
102
113
|
});
|
|
103
114
|
|
|
@@ -120,7 +131,7 @@ el('diagnostic-export-button').onclick = () => perform(async () => {
|
|
|
120
131
|
const link = el('diagnostic-export');
|
|
121
132
|
link.href = URL.createObjectURL(new Blob([text], {type:'application/json'}));
|
|
122
133
|
link.hidden = false;
|
|
123
|
-
link.textContent =
|
|
134
|
+
link.textContent = t("Download error log");
|
|
124
135
|
link.click();
|
|
125
136
|
});
|
|
126
137
|
|
|
@@ -133,26 +144,26 @@ function render(w) {
|
|
|
133
144
|
el('workspace').hidden = !w;
|
|
134
145
|
el('empty').hidden = !!w;
|
|
135
146
|
el('context-selection').hidden = contextTab || !w;
|
|
136
|
-
el('status').textContent = w ?
|
|
147
|
+
el('status').textContent = w ? t("{0} · Profile {1}", describe(w), w.profileId) : t("No workspaces");
|
|
137
148
|
if (!w) { showCredential(null); return; }
|
|
138
149
|
renderDialogs(w);
|
|
139
150
|
renderDelivery(w);
|
|
140
151
|
const pages = w.pages || [];
|
|
141
152
|
if (standalone && !selectedTab) selectedTab = pages[0]?.pageId || '';
|
|
142
153
|
const page = pages.find(p => p.pageId === selectedTab);
|
|
143
|
-
options(el('pages'), pages.map((p, i) => [p.pageId, (i+1) + ' · ' + (p.title || p.origin ||
|
|
154
|
+
options(el('pages'), pages.map((p, i) => [p.pageId, (i+1) + ' · ' + (p.title || p.origin || t("Page"))]), selectedTab);
|
|
144
155
|
if (!page) {
|
|
145
156
|
el('workspace').hidden = !standalone;
|
|
146
157
|
el('control').disabled = true;
|
|
147
158
|
el('uploads').hidden = true;
|
|
148
159
|
el('page-details').textContent = '';
|
|
149
|
-
el('status').textContent =
|
|
160
|
+
el('status').textContent = t("The original tab was closed or detached.");
|
|
150
161
|
showCredential(null);
|
|
151
162
|
return;
|
|
152
163
|
}
|
|
153
|
-
const sync = page.lastSyncedAt ?
|
|
154
|
-
el('page-details').textContent = [page.origin, w.accountAlias, page.syncState === 'sync_pending' ?
|
|
155
|
-
el('control').textContent = w.unlockPending ?
|
|
164
|
+
const sync = page.lastSyncedAt ? t("Last synced {0}", new Date(page.lastSyncedAt).toLocaleTimeString(globalThis.openBrowserI18n.locale)) : '';
|
|
165
|
+
el('page-details').textContent = [page.origin, w.accountAlias, page.syncState === 'sync_pending' ? t("Syncing") : sync].filter(Boolean).join(' · ');
|
|
166
|
+
el('control').textContent = w.unlockPending ? t("Retry takeover") : w.mode === 'human' ? t("Return to agent") : w.scope === 'single_tab' ? t("Take over this tab") : t("Take over workspace");
|
|
156
167
|
el('control').disabled = busy || (w.mode === 'transferring' && !w.unlockPending) || (!selectedTab && w.mode !== 'human');
|
|
157
168
|
el('uploads').hidden = w.mode!=='agent' || !selectedTab;
|
|
158
169
|
el('upload-origin').textContent = pages.find(p=>p.pageId===selectedTab)?.origin || '';
|
|
@@ -187,12 +198,12 @@ async function sync() {
|
|
|
187
198
|
const tasks = list.filter(w => w.pageAvailability === 'unregistered' && w.mode === 'agent');
|
|
188
199
|
el('adoption').hidden = false;
|
|
189
200
|
el('empty').hidden = true;
|
|
190
|
-
el('status').textContent =
|
|
191
|
-
el('adopt-site').textContent = origin.origin + (tasks.length ? '' :
|
|
201
|
+
el('status').textContent = t("Ordinary tab");
|
|
202
|
+
el('adopt-site').textContent = origin.origin + (tasks.length ? '' : t(" · Ask the agent to create a named workspace first"));
|
|
192
203
|
const chooser = el('adopt-task');
|
|
193
204
|
options(chooser, tasks.map(w => [w.workspaceId, workspaceTitle(w) + ' · ' + w.workspaceId.slice(0,8)]),
|
|
194
205
|
tasks.some(w => w.workspaceId === chooser.value) ? chooser.value : tasks.length === 1 ? tasks[0].workspaceId : '');
|
|
195
|
-
el('adopt').disabled = !chooser.value;
|
|
206
|
+
el('adopt-manual').disabled = el('adopt').disabled = !chooser.value;
|
|
196
207
|
return;
|
|
197
208
|
}
|
|
198
209
|
const list = contextTab ? (selected ? [await call('getWorkspace', {workspaceId: selected })] : []) : await call('listWorkspaces');
|
|
@@ -212,7 +223,7 @@ async function sync() {
|
|
|
212
223
|
options(el('workspaces'), entries, selected);
|
|
213
224
|
const w = contextTab ? list[0] || null : selected ? await call('getWorkspace', { workspaceId: selected }) : null;
|
|
214
225
|
const [captureReply, downloads, uploads] = w ? await Promise.all([
|
|
215
|
-
call('visualStatus',{workspaceId:selected}).catch(()=>({})),
|
|
226
|
+
call('visualStatus',{workspaceId:selected,pageId:selectedTab}).catch(()=>({})),
|
|
216
227
|
call('listDownloads',{workspaceId:selected}),
|
|
217
228
|
call('listUploads',{workspaceId:selected}),
|
|
218
229
|
]) : [{}, [], []];
|
|
@@ -221,25 +232,38 @@ async function sync() {
|
|
|
221
232
|
render(w);
|
|
222
233
|
el('upload-list').replaceChildren(...uploads.map(file=>{
|
|
223
234
|
const button=document.createElement('button');
|
|
224
|
-
button.textContent=
|
|
235
|
+
button.textContent=t("Revoke {0} · {1}", file.name, file.origin);
|
|
225
236
|
button.onclick=()=>perform(()=>call('revokeUpload',{workspaceId:w.workspaceId,fileId:file.fileId}));
|
|
226
237
|
return button;
|
|
227
238
|
}));
|
|
228
239
|
renderDownloads(downloads);
|
|
240
|
+
const permission = captureReply.pagePermission;
|
|
241
|
+
const button = el('pixel-permission');
|
|
242
|
+
const pageId = selectedTab;
|
|
243
|
+
button.hidden = !permission;
|
|
244
|
+
if (permission) {
|
|
245
|
+
button.textContent = permission.allow ? t("Revoke screenshot permission for this task · {0}", permission.origin) : t("Allow screenshots for this task · {0}", permission.origin);
|
|
246
|
+
button.onclick = () => perform(() => call('setPagePixelPermission',{
|
|
247
|
+
workspaceId:w.workspaceId, pageId, documentId:permission.documentId, controlGeneration:w.controlGeneration,
|
|
248
|
+
origin:permission.origin, allow:!permission.allow
|
|
249
|
+
}));
|
|
250
|
+
}
|
|
229
251
|
const status=el('visual-status');
|
|
230
252
|
status.hidden=!capture;
|
|
231
|
-
if(capture)
|
|
232
|
-
|
|
253
|
+
if (capture) {
|
|
254
|
+
const { x, y, width, height } = capture.clip;
|
|
255
|
+
status.textContent = t("Last capture · {0} · {1} · {2}", capture.principalId, capture.origin, `(${x}, ${y}) ${width} × ${height}`);
|
|
256
|
+
}
|
|
233
257
|
}
|
|
234
258
|
} catch (error) {
|
|
235
259
|
if (serial === revision) {
|
|
236
260
|
render(null);
|
|
237
261
|
if (contextTab && error.message === 'workspace_not_found') {
|
|
238
|
-
el('status').textContent =
|
|
239
|
-
notify(
|
|
262
|
+
el('status').textContent = t("The task ended or the service restarted.");
|
|
263
|
+
notify(t("Reopen the extension on the tab you want to authorize."));
|
|
240
264
|
} else {
|
|
241
|
-
el('status').textContent =
|
|
242
|
-
notify(error.message);
|
|
265
|
+
el('status').textContent = t("Connection failed");
|
|
266
|
+
notify(errorLabel(error.message));
|
|
243
267
|
}
|
|
244
268
|
}
|
|
245
269
|
} finally {
|
|
@@ -255,23 +279,34 @@ function renderDialogs(w) {
|
|
|
255
279
|
panel.dataset.signature = signature;
|
|
256
280
|
panel.replaceChildren(...items.map(item => {
|
|
257
281
|
const row = document.createElement('div');
|
|
258
|
-
|
|
282
|
+
const caption = document.createElement('span');
|
|
283
|
+
const labels = [];
|
|
284
|
+
const bindLabel = renderLabel => { labels.push(renderLabel); renderLabel(); };
|
|
285
|
+
row.updateLanguage = () => labels.forEach(renderLabel => renderLabel());
|
|
286
|
+
bindLabel(() => {
|
|
287
|
+
caption.textContent = [item.origin, {alert:t('Alert'), confirm:t('Confirmation'), prompt:t('Prompt')}[item.type] || item.type, item.message].join(' · ');
|
|
288
|
+
});
|
|
289
|
+
row.append(caption);
|
|
259
290
|
if (w.mode === 'agent') {
|
|
260
291
|
const take = document.createElement('button');
|
|
261
|
-
take.textContent =
|
|
292
|
+
bindLabel(() => { take.textContent = t("Take over to respond"); });
|
|
262
293
|
take.onclick = () => {
|
|
263
294
|
take.disabled = true;
|
|
264
295
|
void call('takeControl',{workspaceId:w.workspaceId,pageId:item.pageId,controlGeneration:w.controlGeneration})
|
|
265
|
-
.catch(error=>notify(error.message)).finally(()=>void sync());
|
|
296
|
+
.catch(error=>notify(errorLabel(error.message))).finally(()=>void sync());
|
|
266
297
|
};
|
|
267
298
|
row.append(take);
|
|
268
299
|
return row;
|
|
269
300
|
}
|
|
270
301
|
const input = document.createElement('input');
|
|
271
|
-
if (item.type === 'prompt') {
|
|
302
|
+
if (item.type === 'prompt') {
|
|
303
|
+
bindLabel(() => { input.placeholder = t("Reply"); });
|
|
304
|
+
input.maxLength = 2048;
|
|
305
|
+
row.append(input);
|
|
306
|
+
}
|
|
272
307
|
for (const accept of [true,false]) {
|
|
273
308
|
const button = document.createElement('button');
|
|
274
|
-
button.textContent = accept ?
|
|
309
|
+
bindLabel(() => { button.textContent = accept ? t("OK") : t("Cancel"); });
|
|
275
310
|
button.onclick = () => perform(() => call('respondDialog',{workspaceId:w.workspaceId,pageId:item.pageId,
|
|
276
311
|
dialogId:item.dialogId,controlGeneration:w.controlGeneration,accept,
|
|
277
312
|
...(accept && item.type === 'prompt' && {text:input.value})}));
|
|
@@ -281,9 +316,16 @@ function renderDialogs(w) {
|
|
|
281
316
|
}));
|
|
282
317
|
}
|
|
283
318
|
|
|
319
|
+
export function updateLanguage() {
|
|
320
|
+
if (!initialized) return;
|
|
321
|
+
for (const row of el('dialogs').children) row.updateLanguage();
|
|
322
|
+
if (detail && !busy) render(detail);
|
|
323
|
+
void sync();
|
|
324
|
+
}
|
|
325
|
+
|
|
284
326
|
function renderDownloads(items) {
|
|
285
327
|
el('downloads').hidden = !items.length;
|
|
286
|
-
const labels = {receiving:
|
|
328
|
+
const labels = {receiving:t("Downloading"),ready:t("Ready to keep"),failed:t("Failed"),cancelled:t("Cancelled"),kept:t("Kept")};
|
|
287
329
|
el('download-list').replaceChildren(...items.map(item => {
|
|
288
330
|
const row = document.createElement('p');
|
|
289
331
|
row.textContent = item.filename + ' · ' + labels[item.state] + ' ';
|
|
@@ -296,8 +338,8 @@ function renderDownloads(items) {
|
|
|
296
338
|
}
|
|
297
339
|
const params = {workspaceId:item.workspaceId,downloadId:item.downloadId};
|
|
298
340
|
if (item.state === 'ready' || item.state === 'kept')
|
|
299
|
-
button(item.state === 'kept' ?
|
|
300
|
-
if (item.state === 'receiving' || item.state === 'ready') button(
|
|
341
|
+
button(item.state === 'kept' ? t("Show saved location") : t("Keep file"), async () => notify((await call('keepDownload',params)).path));
|
|
342
|
+
if (item.state === 'receiving' || item.state === 'ready') button(t("Cancel"), () => call('cancelDownload',params));
|
|
301
343
|
return row;
|
|
302
344
|
}));
|
|
303
345
|
}
|
|
@@ -309,7 +351,7 @@ async function perform(action) {
|
|
|
309
351
|
notify();
|
|
310
352
|
const enabled = [...document.querySelectorAll('button:enabled, select:enabled, input:enabled')];
|
|
311
353
|
for (const element of enabled) element.disabled = true;
|
|
312
|
-
try { await action(); } catch (error) { notify(error.message); }
|
|
354
|
+
try { await action(); } catch (error) { notify(errorLabel(error.message)); }
|
|
313
355
|
finally {
|
|
314
356
|
busy = false;
|
|
315
357
|
for (const element of enabled) element.disabled = false;
|
|
@@ -344,20 +386,20 @@ el('upload-file').onchange = event => {
|
|
|
344
386
|
const target=uploadTarget, current=selectedUploadTarget();
|
|
345
387
|
uploadTarget=null;
|
|
346
388
|
if (!target || !current || Object.keys(target).some(key=>target[key]!==current[key])) {
|
|
347
|
-
notify(
|
|
389
|
+
notify(t("The page or control changed. Select the file again."));
|
|
348
390
|
return;
|
|
349
391
|
}
|
|
350
392
|
const params={...target,name:file.name,mimeType:file.type};
|
|
351
393
|
void perform(async()=>{
|
|
352
|
-
if (file.size>8*1024*1024) throw Error(
|
|
394
|
+
if (file.size>8*1024*1024) throw Error(t("Each file must be 8 MiB or smaller."));
|
|
353
395
|
const data=await new Promise((resolve,reject)=>{
|
|
354
396
|
const reader=new FileReader();
|
|
355
397
|
reader.onload=()=>resolve(reader.result.split(',')[1]);
|
|
356
|
-
reader.onerror=()=>reject(Error(
|
|
398
|
+
reader.onerror=()=>reject(Error(t("Could not read the file.")));
|
|
357
399
|
reader.readAsDataURL(file);
|
|
358
400
|
});
|
|
359
401
|
await call('grantUpload',{...params,data});
|
|
360
|
-
notify(
|
|
402
|
+
notify(t("Granted {0} access to {1} for five minutes.", params.origin, file.name));
|
|
361
403
|
});
|
|
362
404
|
};
|
|
363
405
|
el('control').onclick = () => perform(async () => {
|
|
@@ -375,9 +417,9 @@ el('credential').onsubmit = event => {
|
|
|
375
417
|
const w = await call('getWorkspace', { workspaceId });
|
|
376
418
|
const fresh = w.activity?.credentialRequest;
|
|
377
419
|
if (w.mode !== 'agent' || generation !== w.controlGeneration || !fresh ||
|
|
378
|
-
['pageId', 'origin', 'credentialRef', 'operationId'].some(k => fresh[k] !== pending[k])) throw new Error(
|
|
420
|
+
['pageId', 'origin', 'credentialRef', 'operationId'].some(k => fresh[k] !== pending[k])) throw new Error(t("The credential request has changed."));
|
|
379
421
|
await call('resolveCredential', { workspaceId, ...pending, value });
|
|
380
|
-
notify(
|
|
422
|
+
notify(t("Credential bound. The agent can retry."));
|
|
381
423
|
});
|
|
382
424
|
};
|
|
383
425
|
|
|
@@ -391,6 +433,7 @@ async function open() {
|
|
|
391
433
|
contextTab = Boolean(owned);
|
|
392
434
|
if (owned) { selected = owned.workspaceId; selectedTab = owned.pageId; }
|
|
393
435
|
}
|
|
436
|
+
initialized = true;
|
|
394
437
|
await sync();
|
|
395
438
|
if (explicit?.[2] && detail) el('delivery').open = true;
|
|
396
439
|
}
|
|
@@ -21,24 +21,26 @@ function showRunning(tabId, running) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const actionStates = {
|
|
24
|
-
running: ['▶', '#1556b0',
|
|
25
|
-
queued: ['…', '#6757a4',
|
|
26
|
-
actionability: ['⌁', '#1556b0',
|
|
27
|
-
dispatching: ['▶', '#1556b0',
|
|
28
|
-
waiting: ['…', '#6757a4',
|
|
29
|
-
verifying: ['✓', '#526675',
|
|
30
|
-
needs_credential: ['!', '#a72f24',
|
|
31
|
-
needs_human_verification: ['!', '#a75d08',
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
running: ['▶', '#1556b0', "Running"],
|
|
25
|
+
queued: ['…', '#6757a4', "In queue"],
|
|
26
|
+
actionability: ['⌁', '#1556b0', "Checking target"],
|
|
27
|
+
dispatching: ['▶', '#1556b0', "Dispatching"],
|
|
28
|
+
waiting: ['…', '#6757a4', "Waiting for page"],
|
|
29
|
+
verifying: ['✓', '#526675', "Checking result"],
|
|
30
|
+
needs_credential: ['!', '#a72f24', "Waiting for credentials"],
|
|
31
|
+
needs_human_verification: ['!', '#a75d08', "Human verification required"],
|
|
32
|
+
needs_visual_permission: ['!', '#a75d08', "Screenshot permission required"],
|
|
33
|
+
completed: ['✓', '#526675', "Completed"],
|
|
34
|
+
failed: ['!', '#a72f24', "Action failed"],
|
|
35
|
+
outcome_unknown: ['?', '#a75d08', "Outcome unknown"],
|
|
36
|
+
cancelled: ['−', '#626977', "Cancelled"],
|
|
37
|
+
idle: ['·', '#626977', "Waiting for instructions"],
|
|
38
|
+
human: ["H", '#176344', "Human in control"],
|
|
39
|
+
transferring: ['↔', '#926407', "Transferring"],
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
async function writeAction(tabId, record) {
|
|
43
|
+
await localeReady;
|
|
42
44
|
const key = tabKey(tabId);
|
|
43
45
|
if (!record) {
|
|
44
46
|
showRunning(tabId, false);
|
|
@@ -46,23 +48,23 @@ async function writeAction(tabId, record) {
|
|
|
46
48
|
if (!await chrome.tabs.get(tabId).catch(() => null)) return;
|
|
47
49
|
await Promise.all([
|
|
48
50
|
chrome.action.setPopup({ tabId, popup: defaultPopup }),
|
|
49
|
-
chrome.action.setTitle({ tabId, title:
|
|
51
|
+
chrome.action.setTitle({ tabId, title: t("Open Browser Workspace") }),
|
|
50
52
|
chrome.action.setBadgeText({ tabId, text: '' }),
|
|
51
53
|
]);
|
|
52
54
|
return;
|
|
53
55
|
}
|
|
54
56
|
await chrome.storage.session.set({ [key]: record });
|
|
55
|
-
const phase = record.mode !== 'agent' ? record.mode : record.needsHumanVerification ? 'needs_human_verification' : record.needsCredential ? 'needs_credential' : record.phase;
|
|
57
|
+
const phase = record.mode !== 'agent' ? record.mode : record.needsHumanVerification ? 'needs_human_verification' : record.needsVisualPermission ? 'needs_visual_permission' : record.needsCredential ? 'needs_credential' : record.phase;
|
|
56
58
|
showRunning(tabId, ['running', 'actionability', 'dispatching', 'waiting', 'verifying'].includes(phase));
|
|
57
59
|
const [text, color, status] = actionStates[phase] || actionStates.idle;
|
|
58
|
-
const panel = phase === 'needs_credential' || phase === 'needs_human_verification' || phase === 'transferring' || !record.controlGeneration;
|
|
59
|
-
const steps = { click:
|
|
60
|
-
const step = phase === 'running' && record.dispatchState ? (record.dispatchState === 'dispatched' ?
|
|
61
|
-
const hint = record.mode === 'human' ?
|
|
60
|
+
const panel = phase === 'needs_credential' || phase === 'needs_human_verification' || phase === 'needs_visual_permission' || phase === 'transferring' || !record.controlGeneration;
|
|
61
|
+
const steps = { click: t("Click"), fill: t("Fill"), fillCredential: t("Fill credential") };
|
|
62
|
+
const step = phase === 'running' && record.dispatchState ? (record.dispatchState === 'dispatched' ? t("Dispatched") : t("Waiting for page")) : phase === 'running' ? steps[record.stepKind] : '';
|
|
63
|
+
const hint = record.mode === 'human' ? t("Click to return control to the agent") : panel ? t("Click to open the workspace panel") : t("Click to take over");
|
|
62
64
|
await Promise.all([
|
|
63
|
-
chrome.action.setBadgeText({ tabId, text }),
|
|
65
|
+
chrome.action.setBadgeText({ tabId, text: t(text) }),
|
|
64
66
|
chrome.action.setBadgeBackgroundColor({ tabId, color }),
|
|
65
|
-
chrome.action.setTitle({ tabId, title: (record.agentName || 'Agent') + ' · ' + (step || status) + ' · ' + hint }),
|
|
67
|
+
chrome.action.setTitle({ tabId, title: (record.agentName || 'Agent') + ' · ' + (step || t(status)) + ' · ' + hint }),
|
|
66
68
|
chrome.action.setPopup({ tabId, popup: panel ? defaultPopup : '' }),
|
|
67
69
|
]);
|
|
68
70
|
}
|
|
@@ -104,7 +106,11 @@ chrome.tabs.onRemoved.addListener(tabId => {
|
|
|
104
106
|
|
|
105
107
|
async function openWorkspacePanel(tabId, delivery = false) {
|
|
106
108
|
const url = chrome.runtime.getURL(defaultPopup) + (Number.isInteger(tabId) ? '#tab-' + tabId + (delivery ? '-delivery' : '') : '');
|
|
107
|
-
|
|
109
|
+
const size = {width:380, height:510};
|
|
110
|
+
const panel = await chrome.windows.create({ url, type: 'popup', ...size, focused: true });
|
|
111
|
+
// Chromium can apply its startup window size to a newly created popup.
|
|
112
|
+
if (panel.width !== size.width || panel.height !== size.height)
|
|
113
|
+
await chrome.windows.update(panel.id, size);
|
|
108
114
|
}
|
|
109
115
|
|
|
110
116
|
const toggling = new Set();
|
|
@@ -131,7 +137,7 @@ async function clickTabAction(tab) {
|
|
|
131
137
|
|
|
132
138
|
chrome.action.onClicked.addListener(clickTabAction);
|
|
133
139
|
chrome.runtime.onInstalled.addListener(() => {
|
|
134
|
-
chrome.contextMenus.create({ id: 'workspace-panel', title:
|
|
140
|
+
chrome.contextMenus.create({ id: 'workspace-panel', title: t("Workspace panel"), contexts: ['action'] });
|
|
135
141
|
});
|
|
136
142
|
chrome.contextMenus.onClicked.addListener((info, tab) => {
|
|
137
143
|
if (info.menuItemId === 'workspace-panel') void openWorkspacePanel(tab?.id);
|
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
importScripts('messages.js', 'i18n.js');
|
|
4
|
+
const { t } = globalThis.openBrowserI18n;
|
|
3
5
|
importScripts('workspace-title.js', 'tab-action.js');
|
|
4
|
-
globalThis.
|
|
6
|
+
globalThis.openBrowserSetLocale = async settings => {
|
|
7
|
+
await localeReady;
|
|
8
|
+
const changed = globalThis.openBrowserI18n.locale !== settings.locale;
|
|
9
|
+
globalThis.openBrowserI18n.setLocale(settings.locale);
|
|
10
|
+
await chrome.storage.session.set({ interfaceLanguage: settings });
|
|
11
|
+
await chrome.action.setTitle({ title: t('Open Browser Workspace') });
|
|
12
|
+
await chrome.contextMenus.update('workspace-panel', { title: t('Workspace panel') }).catch(() => {});
|
|
13
|
+
if (changed) {
|
|
14
|
+
markFrontTabChanged();
|
|
15
|
+
const slots = await chrome.storage.session.get(null);
|
|
16
|
+
await Promise.all(Object.entries(slots).filter(([key]) => key.startsWith('tab:')).map(([key, previous]) =>
|
|
17
|
+
forWorkspace(previous.workspaceId, async () => {
|
|
18
|
+
const current = (await chrome.storage.session.get(key))[key];
|
|
19
|
+
if (current) await writeAction(current.tabId, current);
|
|
20
|
+
}).catch(() => {})));
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const localeReady = chrome.storage.session.get('interfaceLanguage').then(({interfaceLanguage}) => {
|
|
24
|
+
if (interfaceLanguage) globalThis.openBrowserI18n.setLocale(interfaceLanguage.locale);
|
|
25
|
+
});
|
|
26
|
+
globalThis.openBrowserGroupVersion = 16;
|
|
5
27
|
|
|
6
28
|
const groupsInProgress = new Map();
|
|
7
29
|
|
|
@@ -111,7 +133,7 @@ globalThis.openBrowserInputHint = async function (pageId) {
|
|
|
111
133
|
const record = tab && (await chrome.storage.session.get(tabKey(tab.id)))[tabKey(tab.id)];
|
|
112
134
|
if (record?.pageId === pageId && record.mode === 'agent') {
|
|
113
135
|
showRunning(tab.id, false);
|
|
114
|
-
await chrome.action.setBadgeText({tabId:tab.id, text:
|
|
136
|
+
await chrome.action.setBadgeText({tabId:tab.id, text:t("Take")}).catch(() => {});
|
|
115
137
|
}
|
|
116
138
|
setTimeout(async () => {
|
|
117
139
|
if (hint === inputHint) inputHint = null;
|
|
@@ -185,8 +207,8 @@ globalThis.openBrowserShow = async function () {
|
|
|
185
207
|
return (await chrome.windows.create({ focused: true })).id;
|
|
186
208
|
};
|
|
187
209
|
|
|
188
|
-
const newtabMethods = new Set(['listWorkspaces', 'listAgentHistory', 'listEvents']);
|
|
189
|
-
const methods = new Set(['offerCurrentTab','listUploads','grantUpload','revokeUpload','respondDialog','listDownloads','cancelDownload','keepDownload','visualStatus','listOperations','listEvents', 'listWorkspaces', 'getWorkspace', 'takeControl', 'returnToAgent', 'grantOrigin', 'resolveCredential', 'finishWorkspace']);
|
|
210
|
+
const newtabMethods = new Set(['listWorkspaces', 'listAgentHistory', 'listEvents', 'setInterfaceLanguage']);
|
|
211
|
+
const methods = new Set(['offerCurrentTab','listUploads','grantUpload','revokeUpload','respondDialog','listDownloads','cancelDownload','keepDownload','visualStatus','setPagePixelPermission','listOperations','listEvents', 'listWorkspaces', 'getWorkspace', 'takeControl', 'returnToAgent', 'grantOrigin', 'resolveCredential', 'finishWorkspace']);
|
|
190
212
|
const pending = new Map();
|
|
191
213
|
const queued = [];
|
|
192
214
|
let waiting;
|
|
@@ -194,11 +216,11 @@ let waiting;
|
|
|
194
216
|
function hostFailure(request) {
|
|
195
217
|
if (request?.dispatchedAt) return {
|
|
196
218
|
code: 'host_timeout',
|
|
197
|
-
message:
|
|
219
|
+
message: t("The extension received the request but the local service timed out. Check the service and try again."),
|
|
198
220
|
};
|
|
199
221
|
return {
|
|
200
222
|
code: 'host_unavailable',
|
|
201
|
-
message:
|
|
223
|
+
message: t("The extension is disconnected from the local service. Start Open Browser and try again."),
|
|
202
224
|
};
|
|
203
225
|
}
|
|
204
226
|
|
|
@@ -217,6 +239,8 @@ chrome.runtime.onMessage.addListener((message, sender, respond) => {
|
|
|
217
239
|
return false;
|
|
218
240
|
}
|
|
219
241
|
const dispatch = async () => {
|
|
242
|
+
if (message.method === 'setInterfaceLanguage')
|
|
243
|
+
return forWorkspace('interfaceLanguage', () => hostRequest(message.method, {preference:message.params.preference}));
|
|
220
244
|
if (message.method !== 'offerCurrentTab') return hostRequest(message.method, message.params);
|
|
221
245
|
const {tabId, targetId, origin, workspaceId, accountAlias} = message.params;
|
|
222
246
|
const [active] = await chrome.tabs.query({active:true,lastFocusedWindow:true});
|
|
@@ -224,7 +248,7 @@ chrome.runtime.onMessage.addListener((message, sender, respond) => {
|
|
|
224
248
|
const target = (await chrome.debugger.getTargets()).find(t => t.type === 'page' && t.tabId === tabId);
|
|
225
249
|
if (!target || target.id !== targetId || new URL(target.url).origin !== origin)
|
|
226
250
|
throw Error('adoption_page_changed');
|
|
227
|
-
return hostRequest('offerCurrentTab', {workspaceId, targetId, origin, accountAlias});
|
|
251
|
+
return hostRequest('offerCurrentTab', {workspaceId, targetId, origin, accountAlias, resumeOnRestart:message.params.resumeOnRestart === true, bindOnApproval:message.params.bindOnApproval === true});
|
|
228
252
|
};
|
|
229
253
|
dispatch().then(result => respond({ result }), error => respond({ error: error.message }));
|
|
230
254
|
return true;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
function workspaceTitle({ agentName, name, mode }) {
|
|
4
4
|
const agent = agentName || 'Agent';
|
|
5
|
-
const task = typeof name === 'string' && name.trim() ? name.trim() :
|
|
5
|
+
const task = typeof name === 'string' && name.trim() ? name.trim() : globalThis.openBrowserI18n.t("Untitled task");
|
|
6
6
|
const title = agent + ' · ' + task;
|
|
7
|
-
return mode === 'human' ?
|
|
7
|
+
return mode === 'human' ? globalThis.openBrowserI18n.t("Human · {0}", title) : title;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
function workspaceNeedsName({ name }) {
|