@vibelord/lanes 1.7.4 → 1.7.5
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/package.json +1 -1
- package/payload/lanes/VERSION +1 -1
- package/payload/lanes/bin/lanes +31 -7
- package/payload/lanes/bin-rs/BINARIES.json +1 -1
- package/payload/lanes/container/lane-mcp +17 -14
- package/payload/lanes/container/lane_core.py +13 -7
- package/payload/lanes/docs/ARCHITECTURE.md +29 -7
- package/payload/lanes/docs/RUNBOOK.md +165 -29
- package/payload/lanes/docs/USERGUIDE.md +71 -3
- package/payload/lanes/install/host-install.sh +21 -1
- package/payload/lanes/libexec/adopt.py +49 -10
- package/payload/lanes/libexec/attach.py +35 -5
- package/payload/lanes/libexec/doctor_lanes2.py +113 -42
- package/payload/lanes/libexec/gc_unregistered.py +407 -0
- package/payload/lanes/libexec/lanes_lib.py +13 -4
- package/payload/lanes/libexec/native_bin.py +12 -10
- package/payload/lanes/libexec/session_actions.py +85 -7
- package/payload/lanes/libexec/update.py +34 -7
- package/payload/lanes/systemd/lanes-gc.service +1 -1
- package/payload/lanes/systemd/lanes-gc.timer +14 -3
- package/payload/lanes/web/Caddyfile +11 -0
- package/payload/lanes/web/README.md +123 -2
- package/payload/lanes/web/inbox.js +1140 -0
- package/payload/lanes/web/mobile.js +20 -26
- package/payload/manifest.json +3 -3
|
@@ -13,13 +13,12 @@ if (typeof module === 'object') module.exports = {laneShellMode};
|
|
|
13
13
|
const LANES_ANSI = {dark: ['#8792a0', '#ff7b6e', '#5fdc8a', '#ffc233', '#6fb6ff', '#c58bff', '#3fd9cf', '#a6b1be', '#97a3b1', '#ff9a8e', '#86f0ad', '#ffd866', '#98cbff', '#dcb2ff', '#7deee6', '#f2f5f8'], light: ['#2f3b34', '#c41c1c', '#0d7338', '#a04d00', '#1a56c4', '#8228c4', '#006f73', '#4a5661', '#55625b', '#d0221a', '#0e7a3a', '#a85200', '#1f5fd8', '#9133d0', '#00797c', '#111a14']};
|
|
14
14
|
// END lanes tokens
|
|
15
15
|
root.dataset.lanesShell = mode;
|
|
16
|
-
const add = (tag, props) => document.head.append(Object.assign(document.createElement(tag), props));
|
|
17
|
-
if (mode !== 'phone') {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
let d; const dir = () => !d && /^#lane(s$|=)/.test(globalThis.location?.hash) && add('script', {src: '/lanes-assets/directory.js'}, d = 1);
|
|
16
|
+
const add = (tag, props) => document.head.append(Object.assign(document.createElement(tag), props)), js = src => add('script', {src});
|
|
17
|
+
if (mode !== 'phone') add('link', {rel: 'stylesheet', href: '/lanes-assets/browser.css'}), js('/lanes-assets/browser.js');
|
|
18
|
+
let d; const dir = () => !d && /^#lane(s$|=)/.test(globalThis.location?.hash) && js('/lanes-assets/directory.js', d = 1);
|
|
19
|
+
let o; const ops = () => !o && /^#(inbox|schedule|results)(=|$)/.test(globalThis.location?.hash) && js('/lanes-assets/inbox.js', o = 1);
|
|
22
20
|
globalThis.addEventListener?.('hashchange', dir); dir();
|
|
21
|
+
globalThis.addEventListener?.('hashchange', ops); ops();
|
|
23
22
|
if (mode === 'desktop') return;
|
|
24
23
|
root.classList.add('lanes-mobile');
|
|
25
24
|
if (mode === 'tablet') {
|
|
@@ -75,10 +74,10 @@ if (typeof module === 'object') module.exports = {laneShellMode};
|
|
|
75
74
|
if (stored >= 14 && stored <= 24) fontSize = stored;
|
|
76
75
|
} catch {}
|
|
77
76
|
const state = () => api?.getState();
|
|
78
|
-
const data = () => state()?.data;
|
|
77
|
+
const data = () => state()?.data, paneAt = pos => data()?.panes.find(p => p.tab_position === pos && !p.is_plugin);
|
|
79
78
|
const nativeClick = selector => document.querySelector(selector)?.click();
|
|
80
79
|
const resize = () => window.dispatchEvent(new Event('zellij:rendering-resize'));
|
|
81
|
-
const kbd = () => window.__zjSoftKbdCapture, aria = (el, label) => el.setAttribute('aria-label', label);
|
|
80
|
+
const kbd = () => window.__zjSoftKbdCapture, aria = (el, label) => el.setAttribute('aria-label', label), keep = ev => ev.preventDefault();
|
|
82
81
|
const finder = (placeholder, label) => {
|
|
83
82
|
const el = Object.assign(make('input'), {type: 'search', placeholder, autocomplete: 'off', spellcheck: false});
|
|
84
83
|
aria(el, label);
|
|
@@ -117,8 +116,7 @@ if (typeof module === 'object') module.exports = {laneShellMode};
|
|
|
117
116
|
aria(capture, 'Type in terminal');
|
|
118
117
|
for (const a of ['type text', 'autocomplete off', 'autocapitalize none']) capture.setAttribute(...a.split(' '));
|
|
119
118
|
capture.tabIndex = 0;
|
|
120
|
-
capture.style.cssText = fill + 'box-sizing:border-box;font-size:16px;border:0;border-radius:12px;padding:0;margin:0;'
|
|
121
|
-
'background:transparent;color:transparent;caret-color:transparent;outline:none;user-select:text;-webkit-user-select:text;';
|
|
119
|
+
capture.style.cssText = fill + 'box-sizing:border-box;font-size:16px;border:0;border-radius:12px;padding:0;margin:0;background:transparent;color:transparent;caret-color:transparent;outline:none;user-select:text;-webkit-user-select:text;';
|
|
122
120
|
field.append(label, host);
|
|
123
121
|
capture.addEventListener('beforeinput', ev => {
|
|
124
122
|
const t = ev.data ?? ev.dataTransfer?.getData('text'), r = ev.getTargetRanges?.()[0];
|
|
@@ -131,14 +129,12 @@ if (typeof module === 'object') module.exports = {laneShellMode};
|
|
|
131
129
|
return field;
|
|
132
130
|
}
|
|
133
131
|
function focusTab(tab) {
|
|
134
|
-
const pane =
|
|
132
|
+
const pane = paneAt(tab?.position);
|
|
135
133
|
if (!pane) return;
|
|
136
134
|
window.__zjSendControl?.({type: 'FocusPane', pane_id: pane.pane_id, is_plugin: false});
|
|
137
135
|
closeSheet();
|
|
138
136
|
}
|
|
139
|
-
|
|
140
|
-
return data()?.tabs.find(t => t.position === data()?.active_pane?.tab_position);
|
|
141
|
-
}
|
|
137
|
+
const currentTab = () => data()?.tabs.find(t => t.position === data()?.active_pane?.tab_position);
|
|
142
138
|
const GLYPHS = '◆◇▸✓', TONES = ['urgent', 'attention', 'working', 'done'];
|
|
143
139
|
function parseCounts(title) {
|
|
144
140
|
const c = {approval: 0, input: 0, working: 0, done: 0}, keys = Object.keys(c);
|
|
@@ -151,7 +147,7 @@ if (typeof module === 'object') module.exports = {laneShellMode};
|
|
|
151
147
|
const pickerTab = name => data()?.tabs.find(t => t.name === `${name} ☰`);
|
|
152
148
|
function pickerTitle(name) {
|
|
153
149
|
const picker = pickerTab(name);
|
|
154
|
-
return picker ?
|
|
150
|
+
return picker ? paneAt(picker.position)?.title || '' : '';
|
|
155
151
|
}
|
|
156
152
|
function workspaces() {
|
|
157
153
|
const tabs = data()?.tabs || [];
|
|
@@ -229,7 +225,7 @@ if (typeof module === 'object') module.exports = {laneShellMode};
|
|
|
229
225
|
const copyKey = button('Copy screen', 'copy', () => clip(c => c.writeText(screen()), () => hint('Copied')));
|
|
230
226
|
pasteKey = button('Paste', 'paste', () => clip(c => c.readText(), t => paste(t) && hint('Pasted')));
|
|
231
227
|
for (const b of [copyKey, pasteKey, more]) b.classList.add('lanes-more');
|
|
232
|
-
for (const b of [copyKey, pasteKey]) b.addEventListener('mousedown',
|
|
228
|
+
for (const b of [copyKey, pasteKey]) b.addEventListener('mousedown', keep);
|
|
233
229
|
header.append(brand, context, copyKey, pasteKey, more);
|
|
234
230
|
dock = make('nav', 'lanes-dock'); aria(dock, 'Workspace controls');
|
|
235
231
|
const spaces = button('Workspaces', 'workspaces', openSheet);
|
|
@@ -273,7 +269,7 @@ if (typeof module === 'object') module.exports = {laneShellMode};
|
|
|
273
269
|
root.classList.add('lanes-ready');
|
|
274
270
|
for (const key of document.querySelectorAll('.zj-mobile-modbar button')) {
|
|
275
271
|
key.addEventListener('pointerdown', ev => ev.stopImmediatePropagation(), true);
|
|
276
|
-
key.addEventListener('mousedown',
|
|
272
|
+
key.addEventListener('mousedown', keep);
|
|
277
273
|
}
|
|
278
274
|
installFontControls();
|
|
279
275
|
resize();
|
|
@@ -320,7 +316,7 @@ if (typeof module === 'object') module.exports = {laneShellMode};
|
|
|
320
316
|
const b = make('button', hold ? 'is-destructive' : '', label);
|
|
321
317
|
let down = -1;
|
|
322
318
|
if (name) aria(b, name);
|
|
323
|
-
b.addEventListener('mousedown',
|
|
319
|
+
b.addEventListener('mousedown', keep);
|
|
324
320
|
b.addEventListener('pointerdown', ev => down = ev.timeStamp);
|
|
325
321
|
for (const t of ['pointercancel', 'pointerleave']) b.addEventListener(t, () => down = -1);
|
|
326
322
|
b.addEventListener('pointerup', ev => {
|
|
@@ -385,13 +381,10 @@ if (typeof module === 'object') module.exports = {laneShellMode};
|
|
|
385
381
|
}
|
|
386
382
|
function installFontControls() {
|
|
387
383
|
const row = menuRow('Text size');
|
|
388
|
-
const
|
|
389
|
-
|
|
390
|
-
aria(larger, 'Larger terminal text');
|
|
384
|
+
const step = (t, name, by) => { const b = make('button', '', t); aria(b, name + ' terminal text');
|
|
385
|
+
b.addEventListener('click', () => {fontSize = Math.min(24, Math.max(14, fontSize + by)); applyFont();}); return b; };
|
|
391
386
|
const value = make('output', '', `${fontSize} px`); value.id = 'lanes-font-value';
|
|
392
|
-
|
|
393
|
-
larger.addEventListener('click', () => {fontSize = Math.min(24, fontSize + 1); applyFont();});
|
|
394
|
-
row.append(smaller, value, larger);
|
|
387
|
+
row.append(step('A−', 'Smaller', -1), value, step('A+', 'Larger', 1));
|
|
395
388
|
Object.assign(menuRow('Docs', 'a', ' lanes-session-link'), {href: '/lanes-docs/', target: '_blank'});
|
|
396
389
|
fetch('/enrol/site', {credentials: 'same-origin'}).then(r => r.json())
|
|
397
390
|
.then(({version: v}) => /^\d[\w.+-]{0,31}$/.test(v) && menuRow(`Lanes v${v}`)).catch(() => {});
|
|
@@ -445,8 +438,9 @@ if (typeof module === 'object') module.exports = {laneShellMode};
|
|
|
445
438
|
if (!token || token.dataset.lanes) return;
|
|
446
439
|
token.dataset.lanes = 'true';
|
|
447
440
|
token.autocomplete = 'current-password'; aria(token, 'Login token');
|
|
448
|
-
token.closest('.security-modal-content')
|
|
449
|
-
|
|
441
|
+
const box = token.closest('.security-modal-content');
|
|
442
|
+
box.querySelector('h3').textContent = 'Connect to Lanes';
|
|
443
|
+
box.querySelector('.submit-btn').textContent = 'Connect';
|
|
450
444
|
}
|
|
451
445
|
viewport();
|
|
452
446
|
window.addEventListener('resize', viewport);
|
package/payload/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibelord/lanes",
|
|
3
|
-
"version": "1.7.
|
|
4
|
-
"commit": "
|
|
5
|
-
"digest": "sha256:
|
|
3
|
+
"version": "1.7.5",
|
|
4
|
+
"commit": "83f0e951ea5541f71d8ef9c639c1e258dd0471b2",
|
|
5
|
+
"digest": "sha256:4655f7c1429814a2933ded82facbbce458e1ced5b8f5ab5ab650b76d38e4d1ff",
|
|
6
6
|
"executables": [
|
|
7
7
|
"bin/lanes",
|
|
8
8
|
"bin/lanes-site-serve",
|