livedesk 0.1.662 → 0.1.663
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/electron/desktop-auto-start.mjs +51 -13
- package/electron/main.mjs +55 -24
- package/package.json +1 -1
- package/web/dist/app.html +1 -1
- package/web/dist/app.webmanifest +1 -1
- package/web/dist/assets/{AgentSettingsTab-dAr8uEiy.js → AgentSettingsTab-HLeP9AMn.js} +1 -1
- package/web/dist/assets/{AgentsPage-DWSdjpkA.js → AgentsPage-mrjnerYT.js} +1 -1
- package/web/dist/assets/{CaptureGallery-BUpcBs_C.js → CaptureGallery-C4OjNDVs.js} +1 -1
- package/web/dist/assets/DesktopUpdatePanel-DoQOkRTl.js +1 -0
- package/web/dist/assets/{HubApp-msJmPxHG.js → HubApp-DITFtDCD.js} +3 -3
- package/web/dist/assets/{MonitorStackIcon-B8LEEiyx.js → MonitorStackIcon-Cb2NPvYi.js} +1 -1
- package/web/dist/assets/{SettingsPage-B9Noftzj.js → SettingsPage-Bs1Zf0fn.js} +1 -1
- package/web/dist/assets/{ShareFilesPage-CSDVsaFu.js → ShareFilesPage-Brwu1mic.js} +1 -1
- package/web/dist/assets/{SupportPage-3aXzdowX.js → SupportPage-BsVd_AJ5.js} +1 -1
- package/web/dist/assets/{VuvoDeskApp-DnkWgIDO.js → VuvoDeskApp-CEZ-F4aQ.js} +1 -1
- package/web/dist/assets/{app-BwWdqEwF.js → app-BBoG-d8m.js} +2 -2
- package/web/dist/assets/{main-4aEqKX50.js → main-0yPM5chu.js} +2 -2
- package/web/dist/assets/styles-BjyLRq6m.css +1 -0
- package/web/dist/index.html +3 -3
- package/web/dist/sw.js +2 -2
- package/web/dist/vuvodesk-build-evidence.json +38 -38
- package/web/dist/assets/DesktopUpdatePanel-CxOs8iEk.js +0 -1
- package/web/dist/assets/styles-DDKP4MTD.css +0 -1
|
@@ -6,6 +6,7 @@ export const DESKTOP_AUTO_START_ARGUMENT = '--autostart';
|
|
|
6
6
|
export const DESKTOP_AUTO_START_ENTRY_NAME = 'LiveDesk Desktop';
|
|
7
7
|
const DESKTOP_AUTO_START_PREFERENCE_VERSION = 1;
|
|
8
8
|
const SUPPORTED_PLATFORMS = new Set(['win32', 'darwin', 'linux']);
|
|
9
|
+
const AUTO_START_LOG_ORIGINS = new Set(['startup', 'settings', 'tray']);
|
|
9
10
|
|
|
10
11
|
function readPreference(path) {
|
|
11
12
|
try {
|
|
@@ -81,6 +82,7 @@ export function createDesktopAutoStartOwner({
|
|
|
81
82
|
log = () => {}
|
|
82
83
|
}) {
|
|
83
84
|
const supported = isPackaged && SUPPORTED_PLATFORMS.has(platform);
|
|
85
|
+
const diagnosticPlatform = SUPPORTED_PLATFORMS.has(platform) ? platform : 'unsupported';
|
|
84
86
|
const preferencePath = join(stateRoot, 'desktop-auto-start.json');
|
|
85
87
|
const linuxConfigRoot = environment.XDG_CONFIG_HOME
|
|
86
88
|
? resolve(environment.XDG_CONFIG_HOME)
|
|
@@ -92,6 +94,24 @@ export function createDesktopAutoStartOwner({
|
|
|
92
94
|
args: [DESKTOP_AUTO_START_ARGUMENT]
|
|
93
95
|
};
|
|
94
96
|
|
|
97
|
+
function logOrigin(value) {
|
|
98
|
+
return AUTO_START_LOG_ORIGINS.has(value) ? value : 'unknown';
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function logResult(event, origin, result, requested = result.enabled) {
|
|
102
|
+
const errorCode = !result.error
|
|
103
|
+
? 'none'
|
|
104
|
+
: result.error === 'desktop-auto-start-unavailable'
|
|
105
|
+
? 'unavailable'
|
|
106
|
+
: result.error === 'desktop-auto-start-registration-mismatch'
|
|
107
|
+
? 'registration-mismatch'
|
|
108
|
+
: 'platform-error';
|
|
109
|
+
log(
|
|
110
|
+
`desktop-auto-start event=${event} origin=${logOrigin(origin)} platform=${diagnosticPlatform} requested=${Boolean(requested)} enabled=${Boolean(result.enabled)} registered=${Boolean(result.registered)} supported=${Boolean(result.supported)} ok=${result.ok === true} error=${errorCode}`,
|
|
111
|
+
{ source: 'desktop-auto-start', level: result.ok === true ? 'info' : 'warn' }
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
95
115
|
function desiredEnabled() {
|
|
96
116
|
return readPreference(preferencePath) ?? true;
|
|
97
117
|
}
|
|
@@ -154,37 +174,55 @@ export function createDesktopAutoStartOwner({
|
|
|
154
174
|
});
|
|
155
175
|
}
|
|
156
176
|
|
|
157
|
-
function reconcile() {
|
|
158
|
-
if (!supported)
|
|
177
|
+
function reconcile(origin = 'startup') {
|
|
178
|
+
if (!supported) {
|
|
179
|
+
const result = status({ ok: false, error: 'desktop-auto-start-unavailable' });
|
|
180
|
+
logResult('reconcile', origin, result);
|
|
181
|
+
return result;
|
|
182
|
+
}
|
|
159
183
|
const saved = readPreference(preferencePath);
|
|
160
184
|
const enabled = saved ?? true;
|
|
161
|
-
if (saved === null) writePreference(preferencePath, enabled);
|
|
162
185
|
try {
|
|
186
|
+
if (saved === null) writePreference(preferencePath, enabled);
|
|
163
187
|
apply(enabled);
|
|
164
188
|
const next = status();
|
|
165
189
|
const ok = next.registered === enabled;
|
|
166
|
-
|
|
167
|
-
|
|
190
|
+
const result = { ...next, ok, error: ok ? '' : 'desktop-auto-start-registration-mismatch' };
|
|
191
|
+
logResult('reconcile', origin, result, enabled);
|
|
192
|
+
return result;
|
|
168
193
|
} catch (error) {
|
|
169
194
|
const message = String(error?.message || error);
|
|
170
|
-
|
|
171
|
-
|
|
195
|
+
const result = status({ ok: false, error: message });
|
|
196
|
+
logResult('reconcile', origin, result, enabled);
|
|
197
|
+
return result;
|
|
172
198
|
}
|
|
173
199
|
}
|
|
174
200
|
|
|
175
|
-
function setEnabled(enabled) {
|
|
176
|
-
if (!supported) return status({ ok: false, error: 'desktop-auto-start-unavailable' });
|
|
201
|
+
function setEnabled(enabled, origin = 'unknown') {
|
|
177
202
|
const desired = Boolean(enabled);
|
|
178
|
-
|
|
203
|
+
if (!supported) {
|
|
204
|
+
const result = status({ ok: false, error: 'desktop-auto-start-unavailable' });
|
|
205
|
+
logResult('change-result', origin, result, desired);
|
|
206
|
+
return result;
|
|
207
|
+
}
|
|
208
|
+
const previous = status();
|
|
209
|
+
log(
|
|
210
|
+
`desktop-auto-start event=change-request origin=${logOrigin(origin)} platform=${diagnosticPlatform} requested=${desired} previousEnabled=${previous.enabled} previousRegistered=${previous.registered}`,
|
|
211
|
+
{ source: 'desktop-auto-start' }
|
|
212
|
+
);
|
|
179
213
|
try {
|
|
214
|
+
writePreference(preferencePath, desired);
|
|
180
215
|
apply(desired);
|
|
181
216
|
const next = status();
|
|
182
217
|
const ok = next.registered === desired;
|
|
183
|
-
|
|
218
|
+
const result = { ...next, ok, error: ok ? '' : 'desktop-auto-start-registration-mismatch' };
|
|
219
|
+
logResult('change-result', origin, result, desired);
|
|
220
|
+
return result;
|
|
184
221
|
} catch (error) {
|
|
185
222
|
const message = String(error?.message || error);
|
|
186
|
-
|
|
187
|
-
|
|
223
|
+
const result = status({ ok: false, error: message });
|
|
224
|
+
logResult('change-result', origin, result, desired);
|
|
225
|
+
return result;
|
|
188
226
|
}
|
|
189
227
|
}
|
|
190
228
|
|
package/electron/main.mjs
CHANGED
|
@@ -1398,10 +1398,13 @@ function registerIpc() {
|
|
|
1398
1398
|
return { ok: true, ignoredImplicitSignOut: true };
|
|
1399
1399
|
});
|
|
1400
1400
|
handle('app:quit', () => { app.quit(); return { ok: true }; });
|
|
1401
|
-
handle('app:get-auto-start', () =>
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1401
|
+
handle('app:get-auto-start', () => {
|
|
1402
|
+
const result = desktopAutoStartOwner?.getStatus()
|
|
1403
|
+
|| { supported: false, enabled: false, registered: false, platform: process.platform };
|
|
1404
|
+
log(`desktop-auto-start event=status-read origin=settings platform=${result.platform} enabled=${result.enabled} registered=${result.registered} supported=${result.supported}`, { source: 'desktop-auto-start' });
|
|
1405
|
+
return result;
|
|
1406
|
+
});
|
|
1407
|
+
handle('app:set-auto-start', enabled => setDesktopAutoStartPreference(Boolean(enabled), 'settings'));
|
|
1405
1408
|
handle('runtime:get-status', async () => {
|
|
1406
1409
|
try { return await fetch(`${LOCAL_RUNTIME_URL}api/runtime/status`).then(response => response.json()); }
|
|
1407
1410
|
catch (error) { return { ok: false, error: mask(error?.message || error) }; }
|
|
@@ -1453,31 +1456,55 @@ function registerIpc() {
|
|
|
1453
1456
|
handle('updates:install', () => productUpdates?.install() || Promise.resolve({ state: 'unavailable' }));
|
|
1454
1457
|
}
|
|
1455
1458
|
|
|
1456
|
-
function
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1459
|
+
function unavailableDesktopAutoStartStatus() {
|
|
1460
|
+
return {
|
|
1461
|
+
ok: false,
|
|
1462
|
+
supported: false,
|
|
1463
|
+
enabled: false,
|
|
1464
|
+
registered: false,
|
|
1465
|
+
platform: process.platform,
|
|
1466
|
+
error: 'desktop-auto-start-unavailable'
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
function buildTrayMenu() {
|
|
1471
|
+
return Menu.buildFromTemplate([
|
|
1472
|
+
{ label: 'Show VuvoDesk', click: showWindow },
|
|
1473
|
+
{ label: 'Restart runtime', click: () => requestRuntimeRestart('tray') },
|
|
1474
|
+
{ label: 'Check for updates', click: () => { void productUpdates?.check(); } },
|
|
1463
1475
|
{ label: 'About VuvoDesk', click: () => { void dialog.showMessageBox(mainWindow, { type: 'info', title: APP_NAME, message: APP_NAME, detail: `Version ${app.getVersion()}\nOne VuvoDesk runtime with Hub and Client roles.` }); } },
|
|
1464
1476
|
{ label: 'Open logs', click: () => { void shell.openPath(logDir); } },
|
|
1465
|
-
{ type: 'separator' },
|
|
1477
|
+
{ type: 'separator' },
|
|
1466
1478
|
{
|
|
1467
|
-
label: 'Start
|
|
1479
|
+
label: 'Start after restart or sign-in',
|
|
1468
1480
|
type: 'checkbox',
|
|
1469
1481
|
checked: desktopAutoStartOwner?.getStatus().enabled === true,
|
|
1470
1482
|
click: item => {
|
|
1471
|
-
|
|
1472
|
-
if (result && result.ok !== true) item.checked = !item.checked;
|
|
1483
|
+
setDesktopAutoStartPreference(item.checked, 'tray');
|
|
1473
1484
|
}
|
|
1474
1485
|
},
|
|
1475
|
-
{ label: 'Quit VuvoDesk', click: () => { app.quit(); } }
|
|
1476
|
-
]);
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1486
|
+
{ label: 'Quit VuvoDesk', click: () => { app.quit(); } }
|
|
1487
|
+
]);
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
function applyTrayMenu() {
|
|
1491
|
+
if (tray) tray.setContextMenu(buildTrayMenu());
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
function setDesktopAutoStartPreference(enabled, origin) {
|
|
1495
|
+
const result = desktopAutoStartOwner?.setEnabled(enabled, origin)
|
|
1496
|
+
|| unavailableDesktopAutoStartStatus();
|
|
1497
|
+
applyTrayMenu();
|
|
1498
|
+
return result;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
function createTray() {
|
|
1502
|
+
const iconPath = appResource('electron', process.platform === 'win32' ? 'tray.ico' : 'tray.png');
|
|
1503
|
+
tray = new Tray(existsSync(iconPath) ? iconPath : nativeImage.createFromDataURL(FALLBACK_ICON_DATA_URL));
|
|
1504
|
+
applyTrayMenu();
|
|
1505
|
+
tray.on('click', showWindow);
|
|
1506
|
+
updateTray('Starting');
|
|
1507
|
+
}
|
|
1481
1508
|
|
|
1482
1509
|
app.on('open-url', (event, url) => {
|
|
1483
1510
|
event.preventDefault();
|
|
@@ -1510,8 +1537,7 @@ if (!app.requestSingleInstanceLock()) {
|
|
|
1510
1537
|
isPackaged: app.isPackaged && DESKTOP_BUILD_FLAVOR !== 'e2e',
|
|
1511
1538
|
log
|
|
1512
1539
|
});
|
|
1513
|
-
|
|
1514
|
-
log(`desktop auto-start enabled=${autoStartStatus.enabled} registered=${autoStartStatus.registered} platform=${autoStartStatus.platform} ok=${autoStartStatus.ok === true}`);
|
|
1540
|
+
desktopAutoStartOwner.reconcile('startup');
|
|
1515
1541
|
let lastProductUpdateLogSignature = '';
|
|
1516
1542
|
productUpdates = createProductUpdateManager({
|
|
1517
1543
|
app,
|
|
@@ -1580,9 +1606,14 @@ if (!app.requestSingleInstanceLock()) {
|
|
|
1580
1606
|
log(`secure auth session runtime sync failed: ${error?.message || error}`);
|
|
1581
1607
|
}
|
|
1582
1608
|
}
|
|
1583
|
-
const
|
|
1609
|
+
const openedAutomatically = desktopAutoStartOwner.wasOpenedAutomatically();
|
|
1610
|
+
const showOnInitialLoad = !openedAutomatically
|
|
1584
1611
|
|| !startupSession
|
|
1585
1612
|
|| !startupRole?.role;
|
|
1613
|
+
log(
|
|
1614
|
+
`desktop-auto-start event=startup-window platform=${process.platform} automatic=${openedAutomatically} savedSession=${Boolean(startupSession)} savedRole=${Boolean(startupRole?.role)} showWindow=${showOnInitialLoad}`,
|
|
1615
|
+
{ source: 'desktop-auto-start' }
|
|
1616
|
+
);
|
|
1586
1617
|
createMainWindow({ showOnInitialLoad });
|
|
1587
1618
|
createTray();
|
|
1588
1619
|
if (DESKTOP_BUILD_FLAVOR !== 'e2e') recurringProductUpdates.start();
|
package/package.json
CHANGED
package/web/dist/app.html
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
.vuvodesk-static-boot [hidden] { display: none; }
|
|
53
53
|
@keyframes vuvodesk-static-boot-spin { to { transform: rotate(360deg); } }
|
|
54
54
|
</style>
|
|
55
|
-
<script type="module" crossorigin src="/assets/app-
|
|
55
|
+
<script type="module" crossorigin src="/assets/app-BBoG-d8m.js" data-vuvodesk-entry></script>
|
|
56
56
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-DD1OZmLC.js">
|
|
57
57
|
<link rel="modulepreload" crossorigin href="/assets/pwa-bootstrap-B_GxOS4l.js">
|
|
58
58
|
</head>
|
package/web/dist/app.webmanifest
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./pwa-startup-ByEwYN1c.js";import{r as c,d as A,S as q,T as I,e as z}from"./icons-CuXJn-Hz.js";import{h as x}from"./MonitorStackIcon-
|
|
1
|
+
import{j as t}from"./pwa-startup-ByEwYN1c.js";import{r as c,d as A,S as q,T as I,e as z}from"./icons-CuXJn-Hz.js";import{h as x}from"./MonitorStackIcon-Cb2NPvYi.js";import"./pwa-bootstrap-B_GxOS4l.js";const E={enabled:!0};function w(i){return{enabled:i?.enabled===!0}}async function L(i,p,f){let l=null;for(let s=0;s<2;s+=1){const g=await x("/api/settings",{signal:f},p);if(g.settings.agent?.enabled===i)return;try{await x("/api/settings",{method:"PATCH",signal:f,body:JSON.stringify({revision:g.revision,agent:{enabled:i}})},p);return}catch(a){if(l=a,s!==0||!String(a instanceof Error?a.message:a).startsWith("409 "))throw a}}throw l}function H({hubUrl:i,showToast:p}){const[f,l]=c.useState(E),[s,g]=c.useState(null),[a,m]=c.useState(""),[j,v]=c.useState(""),[y,d]=c.useState(""),b=c.useRef(0),u=c.useRef(null);c.useEffect(()=>{let e=!0;u.current?.abort();const n=new AbortController;u.current=n;const h=++b.current;return g(null),l(E),m(""),d(""),v(""),x("/api/settings/agent",{signal:n.signal},i).then(o=>{!e||n.signal.aborted||h!==b.current||(g(o.settings),l(w(o.settings)))}).catch(o=>{e&&!n.signal.aborted&&h===b.current&&d(o instanceof Error?o.message:String(o))}),()=>{e=!1,n.abort(),u.current===n&&(u.current=null)}},[i]);const k=(e,n)=>l(h=>({...h,[e]:n})),C=e=>{g(e),l(w(e))},S=()=>({generation:b.current,controller:u.current}),r=e=>e.generation===b.current&&e.controller!==null&&e.controller===u.current&&!e.controller.signal.aborted,R=async()=>{if(!s){d("Agent settings are not available yet.");return}const e=S();if(r(e)){m("save"),d(""),v("");try{if(await L(f.enabled,i,e.controller.signal),!r(e))return;const n=await x("/api/settings/agent",{signal:e.controller.signal},i);if(!r(e))return;C(n.settings),v("Codex Agent settings saved.")}catch(n){r(e)&&d(n instanceof Error?n.message:String(n))}finally{r(e)&&m("")}}},T=async()=>{const e=S();if(r(e)){m("test"),d(""),v("");try{const n=await x("/api/settings/agent/test",{method:"POST",signal:e.controller.signal,body:JSON.stringify({})},i);if(!r(e))return;const h=await x("/api/settings/agent",{signal:e.controller.signal},i);if(!r(e))return;C(h.settings);const o=Number.isFinite(n.connection?.latencyMs)?Math.max(0,Math.round(n.connection.latencyMs)):null;p(`Codex Agent connection verified${o!==null?` in ${o} ms.`:"."}`,"success")}catch(n){r(e)&&d(n instanceof Error?n.message:String(n))}finally{r(e)&&m("")}}},D=s?.codexInstallation==="installed"&&s.codexAuth==="signed-in",N=s!==null;return t.jsxs("div",{className:"settings-tab-content agent-settings-content",children:[t.jsxs("section",{className:"settings-section-card agent-enable-card",children:[t.jsxs("label",{className:"settings-toggle agent-enable-toggle",children:[t.jsx("input",{type:"checkbox",checked:f.enabled,onChange:e=>k("enabled",e.target.checked),disabled:!N||a!==""}),t.jsx("span",{children:"Enable Codex Agent"})]}),t.jsxs("p",{className:"settings-help",children:[t.jsx(A,{size:12})," Enabled by default. Agent commands use only the Codex account signed in on this Hub."]})]}),y&&t.jsx("div",{className:"agent-settings-alert error",role:"alert",children:y}),j&&t.jsx("div",{className:"agent-settings-alert success",role:"status",children:j}),t.jsxs("section",{className:"settings-section-card",children:[t.jsxs("div",{className:"settings-section-heading",children:[t.jsxs("div",{children:[t.jsx("span",{children:"Connection"}),t.jsx("h3",{children:"Codex SDK / CLI"})]}),t.jsx(q,{size:20})]}),t.jsxs("div",{className:"agent-connection-row",children:[t.jsx("span",{className:`agent-connection-dot ${D?"connected":s?.codexAuth==="not-signed-in"?"unavailable":""}`}),t.jsx("span",{children:s?.codexInstallation==="not-installed"?"Codex SDK not installed":s?.codexAuth==="signed-in"?"Codex CLI signed in":s?.codexAuth==="not-signed-in"?"Codex CLI sign-in required":"Codex status not tested"}),t.jsxs("button",{className:"settings-reset",onClick:()=>{T()},disabled:a!=="",type:"button",children:[t.jsx(I,{size:15})," ",a==="test"?"Testing":"Test connection"]})]}),t.jsxs("p",{className:"settings-help",children:[t.jsx(A,{size:12})," The Hub uses the installed Codex SDK / CLI to plan approved commands and run them through VuvoDesk Agent tools on selected computers. VuvoDesk never asks for separate credentials."]})]}),t.jsx("div",{className:"settings-action-row agent-settings-actions",children:t.jsxs("button",{className:"text-button primary",onClick:()=>{R()},disabled:!N||a!=="",type:"button",children:[t.jsx(z,{size:15})," ",a==="save"?"Saving":"Save Agent settings"]})})]})}export{H as AgentSettingsTab};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./pwa-startup-ByEwYN1c.js";import{r as d,ae as ht,af as Ce,z as yt,G as ee,X as xe,ag as vt,ah as wt,ai as Ze,aj as kt,ak as bt,al as Se,b as H,am as Ct,p as xt,an as _e,o as St,ao as jt,S as Je,ap as At,a9 as Rt,c as Nt,aq as Pt,ar as It,A as Tt,as as ue,M as Xe}from"./icons-CuXJn-Hz.js";import{r as Et,h as F}from"./MonitorStackIcon-
|
|
1
|
+
import{j as t}from"./pwa-startup-ByEwYN1c.js";import{r as d,ae as ht,af as Ce,z as yt,G as ee,X as xe,ag as vt,ah as wt,ai as Ze,aj as kt,ak as bt,al as Se,b as H,am as Ct,p as xt,an as _e,o as St,ao as jt,S as Je,ap as At,a9 as Rt,c as Nt,aq as Pt,ar as It,A as Tt,as as ue,M as Xe}from"./icons-CuXJn-Hz.js";import{r as Et,h as F}from"./MonitorStackIcon-Cb2NPvYi.js";import"./pwa-bootstrap-B_GxOS4l.js";const Ot=d.forwardRef(function({value:s,onChange:n,onSubmit:r,onOpenSuggestedTasks:i,suggestedOpen:f=!1,suggestedTaskCount:c,disabled:v=!1,placeholder:S="Ask VuvoDesk to work across your machines...",compact:g=!1},x){return t.jsxs("form",{className:"agents-composer",onSubmit:w=>{w.preventDefault(),r()},children:[t.jsx("button",{className:`agents-suggested-trigger ${f?"active":""}`,type:"button","aria-label":c===void 0?"Open Suggested tasks":`Open Suggested tasks (${c} available)`,"aria-expanded":f,onClick:i,disabled:v,children:t.jsx(ht,{size:17})}),t.jsx("textarea",{ref:x,value:s,onChange:w=>n(w.target.value.slice(0,4e3)),placeholder:S,"aria-label":"Ask VuvoDesk",rows:g?1:2,disabled:v}),t.jsxs("button",{className:"agents-run-button",type:"submit",disabled:v||!s.trim(),children:[v?t.jsx(Ce,{className:"spin",size:16}):t.jsx(yt,{size:16}),v?"Running":"Run"]})]})}),$t=["read","processControl","serviceControl","applicationControl","fileRead","fileWrite","fileDelete","shell","script","softwareInstall","network","systemPower","systemConfiguration","userAccount"];function de(e){return e.deviceName?.trim()||e.hostname?.trim()||e.deviceId}function pe(e){return e.connected!==!0?!1:e.synthetic===!0?!0:!e.channels||e.channels.control===!0}function Dt(e){return e==="running"||e==="completed"||e==="failed"||e==="cancelled"?e:"queued"}function _t(e){switch(e){case"process.list":return"Process list";case"system.health":return"System health";case"gpu.status":return"GPU status";case"disk.status":return"Disk status";case"service.status":return"Service status";case"diagnostics.collect":return"Diagnostics";case"process.control":return"Process control";case"service.control":return"Service control";case"application.launch":return"Launch application";case"application.close":return"Close application";case"file.read":return"Read file";case"file.write":return"Write file";case"file.delete":return"Delete file";case"file.list":return"List directory";case"command.run":return"Run command";case"script.run":return"Run script";case"software.install":return"Install software";case"network.status":return"Network status";case"system.power":return"Power action";case"system.configure":return"System configuration";case"logs.collect":return"Collect logs"}}const Mt=64*1024,Me="[Earlier log output hidden by PWA display limit.]",Qe=new TextEncoder,zt=new TextDecoder("utf-8",{fatal:!0}),ze=16*1024,Lt=200,Le="(?:access[_-]?(?:token|key)|refresh[_-]?token|id[_-]?token|pair[_-]?(?:token|key)|authorization|api[_-]?key|private[_-]?key|connection[_-]?string|credential|password|passwd|secret|cookie|set-cookie)",Ft="(?:access[_-]?(?:token|key)|refresh[_-]?token|id[_-]?token|pair[_-]?(?:token|key)|token|authorization|api[_-]?key|private[_-]?key|connection[_-]?string|credential|password|passwd|secret|cookie|set-cookie)",Bt="(?:access[_-]?(?:token|key)|refresh[_-]?token|id[_-]?token|pair[_-]?(?:token|key)|token|authorization|api[_-]?key|credential|password|secret|cookie)",qt=/\b(?:sk-(?:proj-|ant-)?[A-Za-z0-9_-]{8,}|gh[pousr]_[A-Za-z0-9]{8,}|github_pat_[A-Za-z0-9_]{8,}|(?:AKIA|ASIA)[A-Z0-9]{16}|AIza[A-Za-z0-9_-]{35}|npm_[A-Za-z0-9]{8,}|xox[a-z]-[A-Za-z0-9-]{8,}|(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{8,})\b/g;function Ut(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Fe(e){return Qe.encode(e).byteLength}function Be(e,s){const n=Qe.encode(e);if(n.byteLength<=s)return{value:e,truncated:!1};let r=n.byteLength-s;for(;r<n.byteLength&&(n[r]&192)===128;)r+=1;let i=zt.decode(n.subarray(r));const f=i.indexOf(`
|
|
2
2
|
`);return f>=0&&f<i.length-1&&(i=i.slice(f+1)),{value:i,truncated:!0}}function et(e){return e.replace(/-----BEGIN [^-\r\n]*PRIVATE KEY-----[\s\S]*?-----END [^-\r\n]*PRIVATE KEY-----/gi,"[REDACTED PRIVATE KEY]").replace(/\b(?:proxy-)?authorization\s*[:=]\s*[^\r\n]*|\b(?:set-)?cookie\s*[:=]\s*[^\r\n]*/gi,"credential-header=[REDACTED]").replace(/\bBearer\s+(?:"[^"]*"|'[^']*'|[^\s,;]+)/gi,"Bearer [REDACTED]").replace(new RegExp(`("${Le}"\\s*:\\s*")[^"\\r\\n]*(")`,"gi"),"$1[REDACTED]$2").replace(new RegExp(`('${Le}'\\s*:\\s*')[^'\\r\\n]*(')`,"gi"),"$1[REDACTED]$2").replace(new RegExp(`((?:[A-Za-z0-9.-]+[_-])?${Ft}\\s*[:=]\\s*)(?!\\[REDACTED\\])[^\\s,;&]+`,"gi"),"$1[REDACTED]").replace(new RegExp(`([?&]${Bt}=)[^&\\s]+`,"gi"),"$1[REDACTED]").replace(/\b(?:eyJ|[A-Za-z0-9_-]{8,}\.)[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g,"[REDACTED TOKEN]").replace(qt,"[REDACTED KEY]")}function Gt(e){return typeof e!="string"?"source unknown":et(e).replace(/[\u0000-\u001f\u007f]/g," ").trim().slice(0,64)||"source unknown"}function qe(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?Math.floor(e):null}function Vt(e){if(typeof e!="string"||e.length===0)return{output:"",displayTruncated:!1};const s=Be(e.replace(/\r\n?/g,`
|
|
3
3
|
`),Mt);let n=et(s.value).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g," ").trim(),r=s.truncated;const i=n?n.split(`
|
|
4
4
|
`):[];if(i.length>Lt-1&&(n=i.slice(-199).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./pwa-startup-ByEwYN1c.js";import{r as i,R as x,E as j,D as u,f as g,h as f}from"./icons-CuXJn-Hz.js";import{l as b,c as d,d as y}from"./HubApp-
|
|
1
|
+
import{j as e}from"./pwa-startup-ByEwYN1c.js";import{r as i,R as x,E as j,D as u,f as g,h as f}from"./icons-CuXJn-Hz.js";import{l as b,c as d,d as y}from"./HubApp-DITFtDCD.js";import"./pwa-bootstrap-B_GxOS4l.js";import"./preload-helper-DD1OZmLC.js";import"./MonitorStackIcon-Cb2NPvYi.js";import"./supabase-C7qjtLN3.js";import"./frame-lifecycle-esOdP-EY.js";function z({hubUrl:s,onToast:n}){const[o,m]=i.useState([]),[h,c]=i.useState(!0),r=i.useCallback(async()=>{c(!0);try{m((await b(s)).captures||[])}catch(t){n(t instanceof Error?t.message:String(t))}finally{c(!1)}},[s,n]);i.useEffect(()=>{r()},[r]);const p=async t=>{const a=d(t.id,s);if(navigator.share)try{await navigator.share({title:t.fileName,url:a});return}catch{}window.open(a,"_blank","noopener,noreferrer")};return e.jsxs("section",{className:"capture-gallery",children:[e.jsxs("header",{children:[e.jsxs("div",{children:[e.jsx("span",{className:"settings-eyebrow",children:"Capture Gallery"}),e.jsx("h2",{children:"Saved captures"})]}),e.jsxs("button",{className:"text-button",onClick:()=>{r()},type:"button",children:[e.jsx(x,{size:15})," Refresh"]})]}),h?e.jsx("p",{className:"settings-help",children:"Loading captures..."}):o.length===0?e.jsx("p",{className:"settings-help",children:"No captures saved yet."}):e.jsx("div",{className:"capture-gallery-grid",children:o.map(t=>{const a=d(t.id,s);return e.jsxs("article",{className:"capture-gallery-card",children:[t.mimeType.startsWith("image/")?e.jsx("img",{src:a,alt:t.target.label}):e.jsx("video",{src:a,controls:!0,preload:"metadata"}),e.jsxs("div",{className:"capture-gallery-card-body",children:[e.jsx("strong",{children:t.fileName}),e.jsxs("small",{children:[t.target.label," · ",new Date(t.createdAt).toLocaleString()," · ",Math.ceil(t.sizeBytes/1024)," KB"]}),e.jsxs("div",{children:[e.jsx("button",{className:"icon-button",title:"Open","aria-label":"Open",onClick:()=>window.open(a,"_blank","noopener,noreferrer"),type:"button",children:e.jsx(j,{size:15})}),e.jsx("a",{className:"icon-button",title:"Download","aria-label":"Download",href:`${a}?download=1`,download:t.fileName,children:e.jsx(u,{size:15})}),e.jsx("button",{className:"icon-button",title:"Share","aria-label":"Share",onClick:()=>{p(t)},type:"button",children:e.jsx(g,{size:15})}),e.jsx("button",{className:"icon-button danger",title:"Delete","aria-label":"Delete",onClick:()=>{window.confirm(`Delete ${t.fileName}?`)&&y(t.id,s).then(()=>r()).catch(l=>n(l instanceof Error?l.message:String(l)))},type:"button",children:e.jsx(f,{size:15})})]})]})]},t.id)})})]})}export{z as CaptureGallery};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./pwa-startup-ByEwYN1c.js";import{r as o,P as g,D as b,R as D}from"./icons-CuXJn-Hz.js";import"./pwa-bootstrap-B_GxOS4l.js";function V(t){if(!t)return"Reading the installed version...";const r=String(t.errorCode||t.error||"");switch(t.state){case"checking":return"Checking for a newer VuvoDesk version...";case"available":return`Version ${t.availableVersion||""} is available.`;case"downloading":return`Downloading version ${t.availableVersion||""} (${Math.round(t.progress||0)}%).`;case"downloaded":return`Version ${t.availableVersion||""} is ready. Restart to install it.`;case"installing":return"Closing VuvoDesk safely and starting the update...";case"current":return"This computer has the latest VuvoDesk version.";case"error":return/runtime-recovery-failed/i.test(r)?"The local VuvoDesk service could not restart. Quit VuvoDesk completely and reopen it.":/owner-cleanup-stuck|owner-reset-failed/i.test(r)?"The Windows update service could not reset. Quit VuvoDesk completely, reopen it, and check again.":/installer-launch-failed/i.test(r)?"The installer could not start. VuvoDesk restored its local service so you can retry.":/version-mismatch/i.test(r)?"The downloaded update did not match the expected version. VuvoDesk will retry safely.":/stalled|timed-out/i.test(r)?"The update connection stopped responding. VuvoDesk will retry automatically.":"The update server could not be reached. VuvoDesk will retry automatically.";case"development":return"Desktop updates are available in an installed VuvoDesk build.";case"unavailable":return"Updates are not available for this desktop build.";default:return"VuvoDesk checks once when the desktop app starts."}}function C(){const t=window.liveDesk?.updates,r=window.liveDesk?.app,[s,i]=o.useState(null),[m,u]=o.useState(!1),[n,p]=o.useState(null),[f,h]=o.useState(!1);if(o.useEffect(()=>{if(!t)return;let a=!0;t.getStatus?.().then(d=>{a&&i(d)});const c=t.onStatus?.(d=>{a&&i(d)});return()=>{a=!1,c?.()}},[t]),o.useEffect(()=>{if(!r?.getAutoStart)return;let a=!0;return r.getAutoStart().then(c=>{a&&p(c)}),()=>{a=!1}},[r]),!t&&!r?.getAutoStart)return null;const v=s?.state==="downloaded"||s?.downloaded===!0,k=!!s?.reopenRequired||/runtime-recovery-failed|owner-cleanup-stuck|owner-reset-failed/i.test(String(s?.errorCode||"")),l=m||s?.state==="checking"||s?.state==="downloading"||s?.state==="installing",x=s?.channel==="dev"?"Development":s?.channel==="stable"?"Stable":s?.channel||"Unknown",j=async()=>{if(t){u(!0);try{const a=v?await t.install?.():await t.check?.();a&&i(a)}finally{u(!1)}}},w=async a=>{if(r?.setAutoStart){h(!0);try{p(await r.setAutoStart(a))}finally{h(!1)}}},y=n?.enabled!==n?.registered;return e.jsxs(e.Fragment,{children:[n?.supported===!0&&e.jsxs("section",{className:"settings-section-card desktop-auto-start-card",children:[e.jsxs("div",{className:"settings-section-heading",children:[e.jsxs("div",{children:[e.jsx("span",{children:"Computer startup"}),e.jsx("h3",{children:"Start VuvoDesk after this computer restarts"})]}),e.jsx(g,{size:20})]}),e.jsx("p",{className:"settings-help",children:"VuvoDesk starts automatically when you sign in after Windows, macOS, or Linux restarts, then reconnects this computer quietly."}),e.jsxs("div",{className:"desktop-auto-start-setting",children:[e.jsxs("div",{className:"desktop-auto-start-copy",children:[e.jsx(g,{size:18}),e.jsxs("span",{children:[e.jsx("strong",{children:"Automatic startup"}),e.jsx("small",{children:"You can also change this from the VuvoDesk tray menu."})]})]}),e.jsxs("label",{className:"settings-toggle desktop-auto-start-toggle",children:[e.jsx("input",{"aria-label":"Start VuvoDesk after this computer restarts",type:"checkbox",checked:n.enabled,onChange:a=>{w(a.target.checked)},disabled:f}),e.jsx("span",{children:n.enabled?"On":"Off"})]}),(n.error||y)&&e.jsx("p",{className:"desktop-auto-start-error",role:"alert",children:"Automatic startup could not be registered. VuvoDesk saved your choice and will retry next time it opens."})]})]}),t&&e.jsxs("section",{className:"settings-section-card desktop-update-card",children:[e.jsxs("div",{className:"settings-section-heading",children:[e.jsxs("div",{children:[e.jsx("span",{children:"Desktop app"}),e.jsx("h3",{children:"VuvoDesk updates"})]}),e.jsx(b,{size:20})]}),e.jsx("p",{className:"settings-help","aria-live":"polite",children:V(s)}),e.jsxs("div",{className:"desktop-update-meta",children:[e.jsx("span",{children:"Installed"}),e.jsx("strong",{children:s?.currentVersion||"Unknown"}),e.jsx("span",{children:"Channel"}),e.jsx("strong",{children:x}),s?.availableVersion&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Available"}),e.jsx("strong",{children:s.availableVersion})]})]}),e.jsxs("button",{className:"settings-reset desktop-update-action",onClick:()=>{j()},disabled:l||k,type:"button",children:[e.jsx(D,{size:15,className:l?"desktop-update-spin":""}),k?"Reopen VuvoDesk":v?"Restart and update":l?"Updating...":"Check for updates"]})]})]})}export{C as DesktopUpdatePanel};
|