livedesk 0.1.646 → 0.1.647
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/hub/package.json +1 -1
- package/hub/src/live-desk-update.js +28 -6
- package/hub/src/remote-hub.js +20 -14
- package/package.json +1 -1
- package/web/dist/app.html +3 -3
- package/web/dist/app.webmanifest +1 -1
- package/web/dist/assets/{AgentSettingsTab-DGDnW-ln.js → AgentSettingsTab-B1bvLJ9e.js} +1 -1
- package/web/dist/assets/{AgentsPage-BPgmpG6R.js → AgentsPage-CL6TsMAN.js} +1 -1
- package/web/dist/assets/{App-CtHSDQcJ.js → App-CWoSKFT8.js} +3 -3
- package/web/dist/assets/{CaptureGallery-Dp2QfcVu.js → CaptureGallery-Bi-MwMXp.js} +1 -1
- package/web/dist/assets/{DesktopUpdatePanel-Dm7k8niQ.js → DesktopUpdatePanel-CXnMexHh.js} +1 -1
- package/web/dist/assets/{LiveDeskApp-B9I_8eE4.js → LiveDeskApp-oy2vBKdt.js} +1 -1
- package/web/dist/assets/{SettingsPage-CLqpY5SX.js → SettingsPage-CQFGyhVp.js} +1 -1
- package/web/dist/assets/{SettingsTabs-DpfSwa_J.js → SettingsTabs-Y9F71NI9.js} +1 -1
- package/web/dist/assets/{ShareFilesPage-Cv0ABwTM.js → ShareFilesPage-DmuK6o2s.js} +1 -1
- package/web/dist/assets/{SupportPage-PPnRLw4w.js → SupportPage-CggTgNNZ.js} +1 -1
- package/web/dist/assets/{app-L4nDGXID.js → app-CcsIHPoF.js} +1 -1
- package/web/dist/assets/{main-RbKAYlHv.js → main-Don8EM7A.js} +2 -2
- package/web/dist/assets/{styles-DwVFS3e_.js → styles-CcZi_0ll.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/livedesk-build-evidence.json +40 -40
- package/web/dist/sw.js +1 -1
package/hub/package.json
CHANGED
|
@@ -71,6 +71,22 @@ function isDedicatedBootstrapFailure(value) {
|
|
|
71
71
|
return /^Update worker exited before terminal proof\b/i.test(failure)
|
|
72
72
|
|| failure === 'invalid-update-host-environment-entry';
|
|
73
73
|
}
|
|
74
|
+
|
|
75
|
+
function describeCommandResultEvidence(result) {
|
|
76
|
+
const data = result?.data;
|
|
77
|
+
if (!data || typeof data !== 'object') return '';
|
|
78
|
+
const evidence = [];
|
|
79
|
+
const shell = String(data.shell || '').trim().toLowerCase();
|
|
80
|
+
if (/^[a-z0-9._-]{1,32}$/.test(shell)) evidence.push(`shell=${shell}`);
|
|
81
|
+
const exitCode = Number(data.exitCode);
|
|
82
|
+
if (Number.isInteger(exitCode) && Math.abs(exitCode) <= 0x7fffffff) evidence.push(`exit=${exitCode}`);
|
|
83
|
+
if (typeof data.timedOut === 'boolean') evidence.push(`timedOut=${data.timedOut}`);
|
|
84
|
+
const durationMs = Number(data.durationMs);
|
|
85
|
+
if (Number.isFinite(durationMs) && durationMs >= 0 && durationMs <= 24 * 60 * 60_000) {
|
|
86
|
+
evidence.push(`durationMs=${Math.round(durationMs)}`);
|
|
87
|
+
}
|
|
88
|
+
return evidence.length > 0 ? ` [${evidence.join(' ')}]` : '';
|
|
89
|
+
}
|
|
74
90
|
|
|
75
91
|
function encodePowerShell(value) {
|
|
76
92
|
return Buffer.from(String(value || ''), 'utf16le').toString('base64');
|
|
@@ -799,12 +815,18 @@ export function createLiveDeskUpdateManager({
|
|
|
799
815
|
if (!target
|
|
800
816
|
|| target.state !== 'waiting'
|
|
801
817
|
|| !['dedicated', 'legacy-command-run'].includes(target.method)) return;
|
|
802
|
-
const result = event?.result;
|
|
803
|
-
if (event?.error || result?.ok === false || result?.status === 'failed' || result?.status === 'rejected') {
|
|
804
|
-
const
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
818
|
+
const result = event?.result;
|
|
819
|
+
if (event?.error || result?.ok === false || result?.status === 'failed' || result?.status === 'rejected') {
|
|
820
|
+
const failureReason = String(
|
|
821
|
+
event.error || result?.error || result?.message || 'client-update-command-failed'
|
|
822
|
+
).slice(0, 500);
|
|
823
|
+
const failure = (
|
|
824
|
+
failureReason
|
|
825
|
+
+ describeCommandResultEvidence(result)
|
|
826
|
+
).slice(0, 500);
|
|
827
|
+
if (target.method === 'dedicated'
|
|
828
|
+
&& target.bootstrapRetryCount === 0
|
|
829
|
+
&& isDedicatedBootstrapFailure(failureReason)) {
|
|
808
830
|
const retryDevice = connectedClientDevices()
|
|
809
831
|
.find(device => String(device.deviceId || '') === target.deviceId);
|
|
810
832
|
const remainingMs = Date.parse(target.deadlineAt || '') - now();
|
package/hub/src/remote-hub.js
CHANGED
|
@@ -9784,25 +9784,31 @@ export function createRemoteHub(options = {}) {
|
|
|
9784
9784
|
return { ok: false, error: 'device-not-connected' };
|
|
9785
9785
|
}
|
|
9786
9786
|
|
|
9787
|
-
const command = safeString(options.command, 20000);
|
|
9788
|
-
if (!command) return { ok: false, error: 'client-update-command-missing' };
|
|
9789
|
-
const commandId = safeString(options.commandId, 128) || crypto.randomUUID();
|
|
9790
|
-
const timeoutMs = clampNumber(options.timeoutMs, 1000, 120000, 30000);
|
|
9791
|
-
const
|
|
9787
|
+
const command = safeString(options.command, 20000);
|
|
9788
|
+
if (!command) return { ok: false, error: 'client-update-command-missing' };
|
|
9789
|
+
const commandId = safeString(options.commandId, 128) || crypto.randomUUID();
|
|
9790
|
+
const timeoutMs = clampNumber(options.timeoutMs, 1000, 120000, 30000);
|
|
9791
|
+
const legacyCommandShell = ['win32', 'windows']
|
|
9792
|
+
.includes(safeString(device.platform, 32).toLowerCase())
|
|
9793
|
+
? 'cmd'
|
|
9794
|
+
: 'auto';
|
|
9795
|
+
const sent = writeJsonLine(device.socket, {
|
|
9792
9796
|
type: 'command',
|
|
9793
9797
|
commandId,
|
|
9794
|
-
command: 'command.run',
|
|
9795
|
-
payload: {
|
|
9796
|
-
command,
|
|
9797
|
-
|
|
9798
|
-
|
|
9798
|
+
command: 'command.run',
|
|
9799
|
+
payload: {
|
|
9800
|
+
command,
|
|
9801
|
+
shell: legacyCommandShell,
|
|
9802
|
+
timeoutMs,
|
|
9803
|
+
permissionMode: 'full-access',
|
|
9799
9804
|
// RemoteFast releases before 0.1.170 read command.run inputs
|
|
9800
9805
|
// from toolArguments, while Node and current Agents accept the
|
|
9801
9806
|
// direct payload fields. Carry both during the update bridge.
|
|
9802
|
-
toolArguments: {
|
|
9803
|
-
command,
|
|
9804
|
-
|
|
9805
|
-
|
|
9807
|
+
toolArguments: {
|
|
9808
|
+
command,
|
|
9809
|
+
shell: legacyCommandShell,
|
|
9810
|
+
timeoutMs
|
|
9811
|
+
}
|
|
9806
9812
|
},
|
|
9807
9813
|
issuedAt: new Date().toISOString()
|
|
9808
9814
|
});
|
package/package.json
CHANGED
package/web/dist/app.html
CHANGED
|
@@ -52,13 +52,13 @@
|
|
|
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-CcsIHPoF.js" data-vuvodesk-entry></script>
|
|
56
56
|
<link rel="modulepreload" crossorigin href="/assets/icons-CacEbnZu.js">
|
|
57
57
|
<link rel="modulepreload" crossorigin href="/assets/react-Cfedt3N5.js">
|
|
58
|
-
<link rel="modulepreload" crossorigin href="/assets/styles-
|
|
58
|
+
<link rel="modulepreload" crossorigin href="/assets/styles-CcZi_0ll.js">
|
|
59
59
|
<link rel="modulepreload" crossorigin href="/assets/supabase-C7qjtLN3.js">
|
|
60
60
|
<link rel="modulepreload" crossorigin href="/assets/frame-lifecycle-esOdP-EY.js">
|
|
61
|
-
<link rel="modulepreload" crossorigin href="/assets/App-
|
|
61
|
+
<link rel="modulepreload" crossorigin href="/assets/App-CWoSKFT8.js">
|
|
62
62
|
<link rel="stylesheet" crossorigin href="/assets/styles-BbMJwyw_.css">
|
|
63
63
|
<link rel="stylesheet" crossorigin href="/assets/App-DFLBNvIi.css">
|
|
64
64
|
</head>
|
package/web/dist/app.webmanifest
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as x,j as t}from"./styles-
|
|
1
|
+
import{h as x,j as t}from"./styles-CcZi_0ll.js";import{a as c,a5 as A,k as q,a6 as I,a7 as z}from"./icons-CacEbnZu.js";import"./react-Cfedt3N5.js";const E={enabled:!0};function w(a){return{enabled:a?.enabled===!0}}async function L(a,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===a)return;try{await x("/api/settings",{method:"PATCH",signal:f,body:JSON.stringify({revision:g.revision,agent:{enabled:a}})},p);return}catch(i){if(l=i,s!==0||!String(i instanceof Error?i.message:i).startsWith("409 "))throw i}}throw l}function F({hubUrl:a,showToast:p}){const[f,l]=c.useState(E),[s,g]=c.useState(null),[i,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},a).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)}},[a]);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,a,e.controller.signal),!r(e))return;const n=await x("/api/settings/agent",{signal:e.controller.signal},a);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("")}}},D=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({})},a);if(!r(e))return;const h=await x("/api/settings/agent",{signal:e.controller.signal},a);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("")}}},T=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||i!==""}),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 ${T?"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:()=>{D()},disabled:i!=="",type:"button",children:[t.jsx(I,{size:15})," ",i==="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||i!=="",type:"button",children:[t.jsx(z,{size:15})," ",i==="save"?"Saving":"Save Agent settings"]})})]})}export{F as AgentSettingsTab};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,e as ht,h as F}from"./styles-
|
|
1
|
+
import{j as t,e as ht,h as F}from"./styles-CcZi_0ll.js";import{a as d,m as yt,n as Ce,o as vt,l as ee,X as xe,p as wt,q as kt,s as Je,B as bt,t as Ct,u as Se,S as H,v as xt,w as St,x as _e,b as jt,y as At,k as Ze,z as Rt,N as Nt,F as Pt,H as It,I as Tt,J as Et,U as ue,c as Xe}from"./icons-CacEbnZu.js";import"./react-Cfedt3N5.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(yt,{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(vt,{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 zt=64*1024,ze="[Earlier log output hidden by PWA display limit.]",Qe=new TextEncoder,Mt=new TextDecoder("utf-8",{fatal:!0}),Me=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)",Ut=/\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 qt(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=Mt.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(Ut,"[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 Ue(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
|
`),zt);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(`
|