webhelm 1.0.34 → 1.0.36

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/README.md CHANGED
@@ -9,6 +9,8 @@
9
9
  | [`lalalic/webhelm`](https://github.com/lalalic/webhelm) | npm Runtime/CLI (including the Daemon-managed Chrome Extension), Skill (`skills/webhelm`), tests | npm `webhelm@latest`; Skill source separately |
10
10
  | [`lalalic/webhelm-actions`](https://github.com/lalalic/webhelm-actions) | Site manifests, ChatGPT/Z.ai/DeepSeek/XHS/etc. Actions | Git checkout at `~/.local/webhelm` |
11
11
 
12
+ The npm Runtime and bundled Chrome Extension use the **same semantic version**. The GitHub npm publishing workflow stamps the Extension manifest from the final npm version, including publish retries, and refuses mismatched packages. The Chrome toolbar popup displays the installed Extension version in its header. Use `node scripts/sync-extension-version.mjs --check` to verify the checkout before publishing.
13
+
12
14
  The npm package **does not include** the Skill or site Actions. The Skill's executable uses `npm exec --yes --package=webhelm@latest -- webhelm` to avoid inherited npm lifecycle variable conflicts; its contents may update without a Runtime release.
13
15
 
14
16
  The agent-facing `webhelm` CLI uses only the `WebHelm` Workspace. It intentionally does not accept `--workspace` or expose Workspace management helpers in `session exec`. `session stop --all` only stops WebHelm Sessions. Application services such as Relay provision their own named Workspaces through daemon IPC `workspace-create`, `workspace-resize`, `workspace-configure`, and `workspace-delete`; they may start Sessions via the daemon `start` operation for those pre-provisioned names. To hide a group from the extension toolbar menu without removing its Chrome tab group or Sessions, send `{ "op": "workspace-configure", "name": "WeChat", "show_in_menu": false }`. On creation, `workspace-create` also accepts optional `show_in_menu: false`. The setting is persisted in the Chrome profile; omitted values preserve existing visibility, and the default is visible. `workspace.list` and `workspace.status` still expose hidden groups and their `showInMenu` property; only `workspace.control.status().workspaces` filters hidden groups for the menu. Leasing a missing Workspace fails rather than creating it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webhelm",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "Agent browser automation in a visible managed Chrome with persistent JavaScript sessions",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "WebHelm",
4
- "version": "0.4.14",
4
+ "version": "1.0.36",
5
5
  "description": "Own named Chrome tab-group workspaces and lazy reusable tab pools for browser agents.",
6
6
  "permissions": [
7
7
  "storage",
@@ -8,7 +8,8 @@
8
8
  :root { color-scheme: light dark; --ink:#182234; --muted:#5f6d81; --border:#e1e7f0; --accent:#345fd5; --accent-light:#edf2ff; --warning:#ae3849; }
9
9
  * { box-sizing: border-box; }
10
10
  body { width:320px; margin:0; padding:12px 14px; background:light-dark(#fff,#172131); color:light-dark(var(--ink),#edf2f9); font:12px/1.4 system-ui,sans-serif; }
11
- .panel-heading { display:flex; align-items:center; justify-content:flex-end; margin-bottom:3px; }
11
+ .panel-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:3px; }
12
+ .extension-version { font-size:11px; font-variant-numeric:tabular-nums; color:light-dark(var(--muted),#acb8c9); }
12
13
  .daemon-state { font-size:11px; color:light-dark(var(--muted),#acb8c9); white-space:nowrap; }
13
14
  .daemon-state::before { content:""; display:inline-block; vertical-align:middle; width:6px; height:6px; border-radius:50%; background:#8893a1; margin-right:5px; }
14
15
  .daemon-state.online::before { background:#23915c; }
@@ -41,20 +42,18 @@
41
42
  .keepalive-row .keepalive-name.is-logged-in { color:#23915c; }
42
43
  .keepalive-row .keepalive-remove { flex:0 0 19px; width:19px; padding:1px; border:0; background:transparent; color:light-dark(var(--muted),#acb8c9); font-size:16px; font-weight:400; line-height:18px; }
43
44
  .session-row button.site-enabled { color:#23915c; }
44
- #queue-list { border-top:1px solid light-dark(var(--border),#334155); padding-top:6px; margin-top:2px; max-height:240px; }
45
- #queue-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:8px; }
46
- #queue-heading strong { font-size:12px; }
47
- #queue-count { color:light-dark(var(--muted),#acb8c9); font-size:11px; font-weight:400; }
48
- #queue-toggle { width:auto; flex-shrink:0; padding:3px 6px; font-size:11px; }
49
- #queue-note { color:light-dark(var(--muted),#acb8c9); font-size:11px; padding:5px 0; }
50
- .queue-platform { padding:5px 0; }
45
+ #queue-list { border-top:1px solid light-dark(var(--border),#334155); margin-top:6px; padding-top:4px; max-height:240px; }
46
+ .queue-platform { padding:3px 0; }
51
47
  .queue-platform + .queue-platform { border-top:1px solid light-dark(var(--border),#334155); }
52
- .queue-platform-title { font-size:12px; }
53
- .queue-row { display:flex; align-items:center; gap:8px; padding:5px 0; }
48
+ .queue-platform-header { display:flex; align-items:center; justify-content:space-between; gap:6px; }
49
+ .queue-platform-title { font-size:11px; }
50
+ #queue-toggle { width:auto; padding:2px 5px; font-size:9px; }
51
+ .queue-row { display:flex; align-items:center; gap:6px; padding:3px 0; }
54
52
  .queue-info { min-width:0; flex:1; overflow-wrap:anywhere; }
55
- .queue-info span { display:block; color:light-dark(var(--muted),#acb8c9); font-size:11px; }
56
- .queue-row button { width:auto; padding:5px 9px; font-size:11px; }
53
+ .queue-info span { display:block; color:light-dark(var(--muted),#acb8c9); font-size:9px; line-height:1.3; }
54
+ .queue-row button.queue-remove { flex:0 0 20px; width:20px; height:20px; padding:0; border:0; background:transparent; color:light-dark(var(--muted),#acb8c9); font-size:16px; font-weight:400; line-height:18px; }
57
55
  button.tab-title, button.queue-title { flex:1; min-width:0; width:100%; padding:0; border:0; border-radius:2px; background:transparent; color:inherit; text-align:left; font-size:12px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
56
+ button.queue-title { font-size:10px; }
58
57
  button.tab-title:hover, button.queue-title:hover { text-decoration:underline; }
59
58
  button.tab-title:disabled, button.queue-title:disabled { cursor:default; text-decoration:none; }
60
59
  .session-info, .queue-info { overflow:hidden; }
@@ -68,14 +67,13 @@
68
67
  </head>
69
68
  <body>
70
69
  <header class="panel-heading">
70
+ <span id="extension-version" class="extension-version" aria-label="WebHelm version"></span>
71
71
  <span id="daemon-status" class="daemon-state" role="status">Connecting…</span>
72
72
  </header>
73
73
  <strong>Keep Alive Sites</strong>
74
74
  <div id="keepalive-list" aria-label="Keep Alive Sites">Loading…</div>
75
75
  <div id="workspace-list" class="session-list" aria-label="Workspaces" aria-live="polite">Connecting…</div>
76
- <div id="queue-heading"><strong>Queue <span id="queue-count"></span></strong><button id="queue-toggle" type="button" aria-controls="queue-list" aria-expanded="false" hidden>Show all</button></div>
77
- <div id="queue-note" role="status" hidden></div>
78
- <div id="queue-list" class="session-list" aria-label="Queue" aria-live="polite">No queue entries</div>
76
+ <div id="queue-list" class="session-list" aria-label="Queued submissions" aria-live="polite" hidden></div>
79
77
  <section id="confirmation" hidden aria-label="Confirm clear sessions">
80
78
  <p id="confirm-text">Stop the selected WebHelm session(s)? Tasks in progress may be interrupted. Queued jobs remain and may create new sessions.</p>
81
79
  <div class="buttons">
@@ -1,5 +1,6 @@
1
1
  import {readKeptSites, setStoredSite, compactQueue, readMenuWorkspaces} from './popup-data.mjs';
2
2
  const el = id => document.getElementById(id);
3
+ el('extension-version').textContent = `v${chrome.runtime.getManifest().version}`;
3
4
  let confirming = false;
4
5
  let chosen = null;
5
6
  let lastSignature = '';
@@ -149,6 +150,14 @@ function renderWorkspaces(workspaces, busy, connected) {
149
150
  }
150
151
  }
151
152
 
153
+ const queueToggle=actionButton('Show all',false,()=>{
154
+ queueExpanded=!queueExpanded;
155
+ lastQueueSignature='';
156
+ renderQueue(currentQueue,queueBusy,queueConnected);
157
+ });
158
+ queueToggle.id='queue-toggle';
159
+ queueToggle.setAttribute('aria-controls','queue-list');
160
+
152
161
  function renderQueue(items, busy, connected) {
153
162
  if(!items.length)queueExpanded=false;
154
163
  const view=compactQueue(items,{expanded:queueExpanded,maxHeads:8});
@@ -158,20 +167,11 @@ function renderQueue(items, busy, connected) {
158
167
  behind:[...view.behind],busy,connected,queueExpanded});
159
168
  if (signature===lastQueueSignature) return;
160
169
  lastQueueSignature=signature;
161
- const count=el('queue-count');
162
- count.textContent=view.total ? `${view.total} pending · ${view.threads} thread${view.threads===1?'':'s'}` : 'Empty';
163
- const toggle=el('queue-toggle');
164
- toggle.hidden=!(queueExpanded || view.hidden>0);
165
- toggle.textContent=queueExpanded?'Show less':`Show all ${view.total}`;
166
- toggle.setAttribute('aria-expanded',String(queueExpanded));
167
- const note=el('queue-note');
168
- note.hidden=!view.uncertain && !view.blocked;
169
- if(!note.hidden) note.textContent=[
170
- view.uncertain ? `${view.uncertain} uncertain` : '',
171
- view.blocked ? `${view.blocked} blocked` : '',
172
- ].filter(Boolean).join(' · ') + ' — verify before retrying; later turns in the same thread may be waiting.';
173
-
174
170
  const target=el('queue-list');
171
+ target.hidden=!items.length;
172
+ queueToggle.hidden=!(queueExpanded || view.hidden>0);
173
+ queueToggle.textContent=queueExpanded?'Show less':'Show all '+view.total;
174
+ queueToggle.setAttribute('aria-expanded',String(queueExpanded));
175
175
  const grouped=new Map();
176
176
  for (const item of shown) {
177
177
  const platform=String(item.platform||'Queue');
@@ -188,20 +188,20 @@ function renderQueue(items, busy, connected) {
188
188
  }
189
189
  if(!items.length) {
190
190
  target.replaceChildren();queueGroups.clear();queueRows.clear();
191
- const empty=document.createElement('div');empty.className='empty-queue';empty.textContent='No queue entries';
192
- target.append(empty);
193
191
  return;
194
192
  }
195
- target.querySelector('.empty-queue')?.remove();
196
193
  for (const [platform,entries] of grouped) {
197
194
  let group=queueGroups.get(platform);
198
195
  if(!group) {
199
196
  group=document.createElement('section');group.className='queue-platform';
197
+ const header=document.createElement('div');header.className='queue-platform-header';
200
198
  const heading=document.createElement('strong');heading.className='queue-platform-title';
201
199
  heading.textContent=platform==='Queue'?'Queue':`${platform} Queue`;
202
200
  const rows=document.createElement('div');rows.className='queue-platform-rows';
203
- group.append(heading,rows);queueGroups.set(platform,group);target.append(group);
201
+ header.append(heading);
202
+ group.append(header,rows);queueGroups.set(platform,group);target.append(group);
204
203
  }
204
+ if(platform===grouped.keys().next().value)group.querySelector('.queue-platform-header').append(queueToggle);
205
205
  for (const item of entries) {
206
206
  const key=`${platform}:${item.id}`;
207
207
  let row=queueRows.get(key);
@@ -213,11 +213,11 @@ function renderQueue(items, busy, connected) {
213
213
  catch(error){el('message').textContent=error.message;}
214
214
  },'queue-title');
215
215
  const detail=document.createElement('span');detail.className='queue-detail';
216
- const remove=actionButton('Remove',false,async()=>{
216
+ const remove=actionButton('×',false,async()=>{
217
217
  try {const result=await rpc('workspace.control.queueCancel',{queueId:item.id});if(!result.id)throw Error('Missing queue request ID');el('message').textContent='Waiting for WebHelm daemon…';}
218
218
  catch(error){el('message').textContent=error.message;}
219
219
  refresh();
220
- });
220
+ },'queue-remove');
221
221
  row.append(info,remove);info.append(title,detail);queueRows.set(key,row);
222
222
  }
223
223
  const title=row.querySelector('.queue-title');
@@ -231,7 +231,10 @@ function renderQueue(items, busy, connected) {
231
231
  const remove=row.querySelector('button:last-child');
232
232
  const safe=['QUEUED','WAITING','BLOCKED','UNCERTAIN'].includes(item.state);
233
233
  remove.disabled=!safe||busy||!connected;
234
- remove.title=safe?'':'Cannot remove a running or completed submission';
234
+ remove.title=safe?'Remove '+title.textContent+' from queue':'Cannot remove a running or completed submission';
235
+ remove.setAttribute('aria-label',remove.title);
236
+ row.querySelector('.queue-detail').title=['UNCERTAIN','BLOCKED'].includes(item.state)
237
+ ? 'Verify the submission before retrying; later turns in the thread may be waiting.' : '';
235
238
  const rows=group.querySelector('.queue-platform-rows');
236
239
  if(row.parentElement!==rows)rows.append(row);
237
240
  }
@@ -272,12 +275,6 @@ async function refresh() {
272
275
  }
273
276
  }
274
277
 
275
- el('queue-toggle').addEventListener('click',()=>{
276
- queueExpanded=!queueExpanded;
277
- lastQueueSignature='';
278
- renderQueue(currentQueue,queueBusy,queueConnected);
279
- });
280
-
281
278
  el('cancel').addEventListener('click', () => {
282
279
  confirming = false;
283
280
  el('confirmation').hidden = true;
@@ -7,6 +7,7 @@ import {LOCAL_ROOT} from './config-paths.mjs';
7
7
 
8
8
  export const EXTENSION_ID='kkkpgmhpoeceojalkpfdidffdfnlgdog';
9
9
  const SOURCE=fileURLToPath(new URL('./extension/',import.meta.url));
10
+ const RUNTIME_VERSION=JSON.parse(fs.readFileSync(new URL('../package.json',import.meta.url),'utf8')).version;
10
11
  const SOURCE_MODE=process.env.WEBHELM_SOURCE_MODE==='1';
11
12
  export const EXTENSION_HOME=path.resolve(process.env.WEBHELM_EXTENSION_HOME ||
12
13
  (SOURCE_MODE ? SOURCE : path.join(LOCAL_ROOT,'extension')));
@@ -25,6 +26,8 @@ function manifest(dir){
25
26
  return data;
26
27
  }
27
28
  export const extensionVersion=manifest(SOURCE).version;
29
+ if(extensionVersion!==RUNTIME_VERSION)
30
+ throw Error(`Bundled WebHelm version mismatch: Runtime ${RUNTIME_VERSION}, Extension ${extensionVersion}`);
28
31
  function canonicalPath(value) {
29
32
  try { return fs.realpathSync(value || ''); }
30
33
  catch { return path.resolve(value || ''); }