conformtools 0.6.10 → 0.6.11

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.
Files changed (69) hide show
  1. package/README.md +53 -22
  2. package/dist/{account-GFIQC77T.js → account-IUWNSDG5.js} +1 -1
  3. package/dist/{analysis-engine-4K5K6L53.js → analysis-engine-M7W32RRC.js} +1 -1
  4. package/dist/bridge-SV7PCLQY.js +3 -0
  5. package/dist/browser/timeline_core_bg.wasm +0 -0
  6. package/dist/{chunk-56EEBHP2.js → chunk-2CY2OOOJ.js} +1 -1
  7. package/dist/chunk-2QT5MMBP.js +499 -0
  8. package/dist/chunk-2WBGXD27.js +8 -0
  9. package/dist/chunk-5YULBQJX.js +3 -0
  10. package/dist/chunk-5YWO2LBG.js +3 -0
  11. package/dist/chunk-64X5DLH5.js +6 -0
  12. package/dist/{chunk-XJNWAQON.js → chunk-6NLB5TZ2.js} +1 -1
  13. package/dist/chunk-6VP6G7CY.js +10 -0
  14. package/dist/chunk-G3SZDPDS.js +3 -0
  15. package/dist/chunk-IK6RKNS5.js +3 -0
  16. package/dist/chunk-IN6XVTUS.js +3 -0
  17. package/dist/{chunk-NQNS4Y2B.js → chunk-LVGGCRDW.js} +1 -1
  18. package/dist/chunk-N34DQ6MH.js +14 -0
  19. package/dist/chunk-NSQP6CTA.js +20 -0
  20. package/dist/chunk-QTFFVLVJ.js +8 -0
  21. package/dist/chunk-RKIRHMON.js +5 -0
  22. package/dist/chunk-ROPKSAFP.js +6 -0
  23. package/dist/{chunk-GM262EDM.js → chunk-S6KP52OG.js} +1 -1
  24. package/dist/chunk-THVX57I3.js +4 -0
  25. package/dist/chunk-VE423Z2L.js +132 -0
  26. package/dist/chunk-XF3YMBI7.js +3 -0
  27. package/dist/{chunk-E5ENIKNR.js → chunk-XIAG7ACN.js} +2 -2
  28. package/dist/chunk-YU3SUSK3.js +3 -0
  29. package/dist/claude-setup-REU4AOKX.js +13 -0
  30. package/dist/cli.js +8 -8
  31. package/dist/emscripten-module-Q67P5WYC-HW3D2R5O.js +2161 -0
  32. package/dist/ffi-7KTOX2T4.js +3 -0
  33. package/dist/framing-ZTMYZR2S.js +3 -0
  34. package/dist/gfx-worker.js +1 -1
  35. package/dist/host-relink-FHNXXMHW.js +10 -0
  36. package/dist/hosted-BWAYLJXR.js +3 -0
  37. package/dist/hosts-Y6HGDRLM.js +3 -0
  38. package/dist/http.js +3 -3
  39. package/dist/{inspect-D3WEYL2W.js → inspect-RJFJQSHZ.js} +1 -1
  40. package/dist/mcp.js +7 -7
  41. package/dist/{media-3YMIZSSF.js → media-22VAJIVT.js} +1 -1
  42. package/dist/module-ES6BEMUI-L6VQ7K3J.js +3 -0
  43. package/dist/module-asyncify-2EFITU5U-Z4EEM6X7.js +3 -0
  44. package/dist/{probe-COWUTQGN.js → probe-72QZKMCC.js} +1 -1
  45. package/dist/{sequence-patch-JVEZW24V.js → sequence-patch-CN4VC5W3.js} +1 -1
  46. package/dist/{store-SZKXADGI.js → store-H676BOKI.js} +1 -1
  47. package/dist/timeline-5TGA5HBY.js +3 -0
  48. package/package.json +10 -1
  49. package/dist/bridge-73XMEZLH.js +0 -3
  50. package/dist/chunk-2MJAQROY.js +0 -5
  51. package/dist/chunk-7QUSVHO2.js +0 -10
  52. package/dist/chunk-CJYLQ3UM.js +0 -5
  53. package/dist/chunk-DFDXSIMI.js +0 -39
  54. package/dist/chunk-DNS4ZYIO.js +0 -3
  55. package/dist/chunk-JHTMYXJM.js +0 -20
  56. package/dist/chunk-QHXX5GDD.js +0 -440
  57. package/dist/chunk-TDIY4NRQ.js +0 -3
  58. package/dist/chunk-UGVGRL5M.js +0 -3
  59. package/dist/chunk-Y2QHZUGL.js +0 -5
  60. package/dist/chunk-YC7QDS5U.js +0 -19
  61. package/dist/chunk-ZVUKOFUX.js +0 -6
  62. package/dist/claude-setup-OKOPPDMB.js +0 -5
  63. package/dist/conformtools-analyze +0 -0
  64. package/dist/conformtools-decode +0 -0
  65. package/dist/framing-BKTUEUZO.js +0 -3
  66. package/dist/host-relink-PTV44KXF.js +0 -10
  67. package/dist/hosts-D3TR2QEV.js +0 -3
  68. package/dist/i2o-transfer +0 -0
  69. package/dist/timeline-PEUC3G7K.js +0 -3
package/README.md CHANGED
@@ -24,7 +24,7 @@ npx -y conformtools@latest whoami # shows the account and plan it found
24
24
  **Claude Code**
25
25
 
26
26
  ```sh
27
- claude mcp add -s user conformtools -- npx -y conformtools@latest mcp
27
+ claude mcp add -s user conformtools -- npx -y --prefer-online conformtools@latest mcp
28
28
  ```
29
29
 
30
30
  **Claude Desktop** — Settings → Developer → Edit Config, then add:
@@ -32,12 +32,17 @@ claude mcp add -s user conformtools -- npx -y conformtools@latest mcp
32
32
  ```json
33
33
  {
34
34
  "mcpServers": {
35
- "conformtools": { "command": "npx", "args": ["-y", "conformtools@latest", "mcp"] }
35
+ "conformtools": { "command": "npx", "args": ["-y", "--prefer-online", "conformtools@latest", "mcp"] }
36
36
  }
37
37
  }
38
38
  ```
39
39
 
40
- Cursor, Codex and other MCP clients take the same command: `npx -y conformtools@latest mcp`.
40
+ Cursor, Codex and other MCP clients take the same command: `npx -y --prefer-online conformtools@latest mcp`.
41
+
42
+ **Updates are automatic.** `--prefer-online` makes npx ask npm for the newest conformtools each time your app starts
43
+ the server, so every new session runs the latest release (offline, it runs the copy it has). A session already open
44
+ keeps its version until the app restarts it. Set it up earlier without `--prefer-online`? Run
45
+ `npx -y conformtools@latest setup claude` (or `setup codex`) once, and it switches your registration over.
41
46
 
42
47
  Then just ask:
43
48
 
@@ -113,28 +118,49 @@ writing timelines use conform.tools, exactly as the website does: the engine sen
113
118
  edit's structure and gets the finished timeline back. Tools that do this are marked
114
119
  "(on conform.tools)" in `conformtools --list`, and need an internet connection.
115
120
 
121
+ ## Scripts (`script_run`, `script_read`)
122
+
123
+ For a job of many steps (probe every file in a folder, QC every clip of a cut), the AI writes one
124
+ short TypeScript script that calls the tools as functions, `await ct.media_probe({ path })`, and
125
+ runs it with `script_run`. Only what the script returns goes back to the AI, not every step's
126
+ output: fewer round trips, fewer tokens. The script runs on this machine in a sandbox (QuickJS)
127
+ with no file, network or process access except through the conformtools tools themselves, so
128
+ every call goes through the same checks as a direct tool call. `save_as` keeps a script in the
129
+ project's `scripts/` folder; run it again with `path`, or from a terminal:
130
+
131
+ ```sh
132
+ conformtools script_run '{"path":"~/.conform-mcp/projects/local/scripts/check-audio.ts"}'
133
+ ```
134
+
135
+ `script_read` is the same, but its scripts can call only the tools that change nothing (probe,
136
+ inspect, QC). It is marked read-only, so apps that ask before a tool changes anything run it
137
+ without asking, and apps that never ask (Codex running unattended) run it at all.
138
+
116
139
  ## Feedback and privacy
117
140
 
118
- When you tell Claude (or any AI app) that a result is wrong, it can send us a report with the
119
- `report` tool (kind issue), and it tells you when it has, with a report id. A report contains:
141
+ When a tool fails, or you tell the AI a result was wrong, nothing needs filing: the outcome
142
+ telemetry below records it with the run (the error, with every name replaced, and which system
143
+ it ran on), so we see every failure, not only the ones someone reported.
120
144
 
121
- - the words the AI wrote: a one-line summary, what happened, what you expected, and the
122
- session, tool and job it was about
123
- - the conformtools version and whether timelines were read on this machine or on conform.tools
124
- - your OS and Node.js version, and the signed-in account
125
- - the last 20 lines of the engine's own log from this conversation and for that session or job
126
- (which tool ran, in what order, how long it took, whether it failed and the error), with every
127
- folder path cut down to the file name:
128
- `/Volumes/CLIENT/secret/A001.mov` is sent as `A001.mov`
145
+ When you or the AI want to tell us a lesson or a suggestion (nothing broke), the `report` tool
146
+ sends it and gives you a report id. A note contains the words the AI wrote, the conformtools
147
+ version, whether timelines were read on this machine or on conform.tools, your OS and Node.js
148
+ version, and the signed-in account. Folder paths are cut to the file name:
149
+ `/Volumes/CLIENT/secret/A001.mov` is sent as `A001.mov`.
129
150
 
130
- When the AI does a post-production task with something other than conformtools (ffprobe, a
131
- script, steps it asks you to do in your editing app), or finds that conformtools can't do it,
132
- it sends a short `report` (kind gap) saying what the task was, what it used instead and why, so we
133
- know which tool to build next. File names at most, never folder paths.
151
+ When no conformtools tool fits what you asked, the AI looks one up first (`find_verb`). When
152
+ nothing fits, that lookup is how we learn which tool to build next: it is recorded with the
153
+ outcome telemetry below, as a one-line summary with every name replaced.
134
154
 
135
- Neither report ever sends media, file contents or timeline files. A copy of each report,
155
+ No note ever sends media, file contents or timeline files. A copy of each one,
136
156
  exactly as sent, is kept in `~/.conform-mcp/reports/`.
137
157
 
158
+ **Conversions are checked.** Reading and writing timelines run on conform.tools (the same engine as the
159
+ website). The timeline's structure goes there to be converted, and the converted file comes back. The original
160
+ timeline file (the `.prproj`, `.drt`, `.aaf`…, never media) is kept with that conversion the same way a website
161
+ conversion keeps it, so our checks can compare what we wrote against it with each host's own rules. It is kept as
162
+ long as your plan keeps conversions, and `conformtools telemetry off` stops it along with the telemetry below.
163
+
138
164
  **Outcome telemetry is on unless you turn it off.** It is how we find where the tools fail
139
165
  an AI and fix them, and it never carries your material.
140
166
 
@@ -142,14 +168,19 @@ an AI and fix them, and it never carries your material.
142
168
  conformtools telemetry off # or on, or status
143
169
  ```
144
170
 
145
- It records, for each tool run: the tool's name, whether it worked (or the error code), how
171
+ It records, for each tool run: the tool's name, whether it worked (or the error code and, for
172
+ a failure, the error message with every name and path replaced by a placeholder), how
146
173
  long it took, the conformtools version, local or conform.tools, counts such as the number of
147
174
  clips, files, or matched and unmatched references (numbers only), the names of the arguments
148
175
  the AI gave (never their values), and the call's place in the conversation (a random id and a
149
- number, so we can see that a call was retried or followed by the wrong tool). For a call
176
+ number, so we can see that a call was retried or followed by the wrong tool), and the system
177
+ it ran on: OS and version, chip (Apple silicon, Intel), Node.js version, memory and CPU count. For a call
150
178
  the AI got wrong (missing or invalid arguments) it records the tool's name and the names of
151
- the arguments, never their values. It never records paths, file or clip names, timeline
152
- contents, project notes, prompts or media. Events are sent in batches at most every 15 minutes, a failed send never
179
+ the arguments, never their values. For each request you make, it also records the AI's own
180
+ one-line summary of it with every show, person, clip, reel, scene and path written as a
181
+ placeholder ("relink {reel} to the camera originals"), scrubbed again on your machine and on
182
+ arrival, and whether the AI found the request before solved. It never records paths, file or
183
+ clip names, timeline contents, project notes, your own words or media. Events are sent in batches at most every 15 minutes, a failed send never
153
184
  slows a tool down, and turning it off deletes anything not yet sent. `CONFORM_TELEMETRY=off`
154
185
  forces it off on a machine.
155
186
 
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"./chunk-XJNWAQON.js";import"./chunk-CJYLQ3UM.js";import"./chunk-PHAMF4JF.js";import"./chunk-DNS4ZYIO.js";import"./chunk-PSANHDZM.js";export{b as NET_TIMEOUT_MS,c as _forgetOffline,d as accessToken,e as accountStatus,a as config,g as includesOf,l as login,m as logout,k as requireApp,i as requireEntitled,j as requireMcp,h as setAccountGate,f as statusText};
3
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"./chunk-6NLB5TZ2.js";import"./chunk-64X5DLH5.js";import"./chunk-PHAMF4JF.js";import"./chunk-G3SZDPDS.js";import"./chunk-PSANHDZM.js";export{b as NET_TIMEOUT_MS,c as _forgetOffline,d as accessToken,e as accountStatus,a as config,g as includesOf,l as login,m as logout,k as requireApp,i as requireEntitled,j as requireMcp,h as setAccountGate,f as statusText};
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{a,b,c,d}from"./chunk-CJYLQ3UM.js";import"./chunk-PHAMF4JF.js";import"./chunk-DNS4ZYIO.js";import"./chunk-PSANHDZM.js";export{a as analysisEnginePath,c as analysisOp,d as startAnalysisEngine,b as startAnalysisJob};
3
+ import{a,b,c,d}from"./chunk-64X5DLH5.js";import"./chunk-PHAMF4JF.js";import"./chunk-G3SZDPDS.js";import"./chunk-PSANHDZM.js";export{a as analysisEnginePath,c as analysisOp,d as startAnalysisEngine,b as startAnalysisJob};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
+ import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i}from"./chunk-NSQP6CTA.js";import"./chunk-IK6RKNS5.js";import"./chunk-G3SZDPDS.js";import"./chunk-PSANHDZM.js";export{c as BridgeError,g as HostBridge,e as PANEL_PREFIX,b as PORTS,a as PROTOCOL,h as hostBridge,d as pairingPath,f as panelOrigins,i as resetHostBridge};
Binary file
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
- import{C as A,D as R,E as q,H as F,I as N,L as f,Z as r,b as _,g as m,i as L,l as x,p as T,q as U,r as $,s as P,t as E,v as k,w as V,y as O}from"./chunk-DNS4ZYIO.js";var H="7145B29C33684D8AA1C7E5126F9B405D",w="conform.tools.dvcp.bundle",J="https://raw.githubusercontent.com/tbdpost/conformtools-public/main/plugin/manifest.json";function z(t=m()){return t==="win32"?{system:`${_("PROGRAMDATA")??"C:\\ProgramData"}\\Blackmagic Design\\DaVinci Resolve\\Support\\IOPlugins`,user:`${_("APPDATA")??""}\\Blackmagic Design\\DaVinci Resolve\\Support\\IOPlugins`}:t==="linux"?{system:"/opt/resolve/IOPlugins",user:r(x(),".local/share/DaVinciResolve/IOPlugins")}:{system:"/Library/Application Support/Blackmagic Design/DaVinci Resolve/IOPlugins",user:r(x(),"Library/Application Support/Blackmagic Design/DaVinci Resolve/IOPlugins")}}function W(t=m()){return t==="win32"?`${_("APPDATA")??""}\\Blackmagic Design\\DaVinci Resolve\\Support\\logs\\ResolveDebug.txt`:t==="linux"?r(x(),".local/share/DaVinciResolve/logs/ResolveDebug.txt"):r(x(),"Library/Application Support/Blackmagic Design/DaVinci Resolve/logs/ResolveDebug.txt")}function j(t=m(),e=L()){return t==="darwin"?{key:"darwin-universal",binary:"Contents/MacOS/conform.tools.dvcp"}:t==="linux"&&/x86_64|x64/.test(e)?{key:"linux-x86_64",binary:"Contents/Linux-x86-64/conform.tools.dvcp"}:t==="win32"?{key:"windows-x86_64",binary:"Contents/Win64/conform.tools.dvcp"}:null}async function M(t){let e=r(t,"Contents/Resources/VERSION");if(await P(e))return(await k(e)).trim()||null;let n=r(t,"Contents/Info.plist");return await P(n)?/<key>CFBundleShortVersionString<\/key>\s*<string>([^<]+)</.exec(await k(n))?.[1]??null:null}function K(t,e){let n=t.split(`
3
+ import{$ as r,A as O,E as A,F as R,G as q,J as F,K as N,N as f,b as _,g as m,i as L,n as x,r as T,s as U,t as $,u as P,v as E,x as k,y as V}from"./chunk-G3SZDPDS.js";var H="7145B29C33684D8AA1C7E5126F9B405D",w="conform.tools.dvcp.bundle",J="https://raw.githubusercontent.com/tbdpost/conformtools-public/main/plugin/manifest.json";function z(t=m()){return t==="win32"?{system:`${_("PROGRAMDATA")??"C:\\ProgramData"}\\Blackmagic Design\\DaVinci Resolve\\Support\\IOPlugins`,user:`${_("APPDATA")??""}\\Blackmagic Design\\DaVinci Resolve\\Support\\IOPlugins`}:t==="linux"?{system:"/opt/resolve/IOPlugins",user:r(x(),".local/share/DaVinciResolve/IOPlugins")}:{system:"/Library/Application Support/Blackmagic Design/DaVinci Resolve/IOPlugins",user:r(x(),"Library/Application Support/Blackmagic Design/DaVinci Resolve/IOPlugins")}}function W(t=m()){return t==="win32"?`${_("APPDATA")??""}\\Blackmagic Design\\DaVinci Resolve\\Support\\logs\\ResolveDebug.txt`:t==="linux"?r(x(),".local/share/DaVinciResolve/logs/ResolveDebug.txt"):r(x(),"Library/Application Support/Blackmagic Design/DaVinci Resolve/logs/ResolveDebug.txt")}function j(t=m(),e=L()){return t==="darwin"?{key:"darwin-universal",binary:"Contents/MacOS/conform.tools.dvcp"}:t==="linux"&&/x86_64|x64/.test(e)?{key:"linux-x86_64",binary:"Contents/Linux-x86-64/conform.tools.dvcp"}:t==="win32"?{key:"windows-x86_64",binary:"Contents/Win64/conform.tools.dvcp"}:null}async function M(t){let e=r(t,"Contents/Resources/VERSION");if(await P(e))return(await k(e)).trim()||null;let n=r(t,"Contents/Info.plist");return await P(n)?/<key>CFBundleShortVersionString<\/key>\s*<string>([^<]+)</.exec(await k(n))?.[1]??null:null}function K(t,e){let n=t.split(`
4
4
  `),s=n.find(l=>l.includes("Running DaVinci Resolve"));if(!s)return null;let i=/(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2}),(\d{3})/.exec(s);if(!i)return null;let u=new Date(`${i[1]}T${i[2]}.${i[3]}`),a=n.some(l=>/plugin repository/i.test(l)&&l.toUpperCase().includes(`LOADED PLUGIN [${H}]`));return{launched_at:u.toISOString(),loaded:a,installed_after_launch:e!==void 0&&e>u.getTime()}}async function tt(t=m()){let e=j(t),n=z(t),s=r(n.system,w),i=e?await E(s)&&await $(r(s,e.binary)):!1,u=i?await M(s):null,a=r(n.user,w),l=await E(a)?{path:a,version:await M(a)}:void 0,c=null;try{let D=i&&e?(await U(r(s,e.binary))).mtimeMs:void 0;c=K(await k(W(t)),D)}catch{}let p=e?i?c?c.loaded&&!c.installed_after_launch?"ready":"needs-restart":"unknown":"plugin-missing":"unsupported-platform",g={ready:"The plugin is installed and loaded.","plugin-missing":l?`Only a per-user copy exists (${a}); Resolve loads I/O plugins only from ${n.system}. Install it with host_setup action=install_renderplugin.`:"Install it with host_setup action=install_renderplugin, then restart Resolve.","needs-restart":"Restart Resolve: it loads I/O plugins only at launch.","unsupported-platform":"There is no build of the plugin for this platform.",unknown:"Start Resolve once so its log says whether it loaded the plugin."}[p];return{platform:e?.key??null,installed:i,path:s,version:u,...l?{shadowed:l}:{},resolve:c,readiness:p,next:g}}async function et(){for(let t of["./presets/conform.tools.xml","./resolve-presets/conform.tools.xml"]){let e=T(new URL(t,import.meta.url));if(await P(e))return e}throw new Error("resolve: the conform.tools render preset is missing from this install")}async function X(t){let e=new Uint8Array(await crypto.subtle.digest("SHA-256",t));return Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}async function G(t,e=3){for await(let n of N(t)){if(!n.isDirectory)continue;let s=r(t,n.name);if(n.name===w)return s;if(e>0&&!n.name.startsWith("__MACOSX")){let i=await G(s,e-1);if(i)return i}}return null}var Q=async t=>{let e=await fetch(t,{signal:AbortSignal.timeout(12e4)});if(!e.ok)throw new Error(`download failed: ${t} answered ${e.status}`);return new Uint8Array(await e.arrayBuffer())};async function nt(t={}){let e=t.os??m(),n=j(e);if(!n)throw new Error("there is no build of the plugin for this platform");let s=t.fetcher??Q,i=JSON.parse(new TextDecoder().decode(await s(t.manifest_url??J))),u=i.platforms?.[n.key]??(e==="darwin"&&i.bundle_url?{bundle_url:i.bundle_url,sha256:i.sha256??""}:void 0);if(!u)throw new Error(`plugin ${i.version} has no ${n.key} build`);let a=await s(u.bundle_url),l=await X(a);if(l!==u.sha256.toLowerCase())throw new Error(`the downloaded plugin failed its checksum (got ${l}, the manifest says ${u.sha256}); nothing was installed`);let c=await F("conform-plugin-"),p=r(c,"plugin.zip");await V(p,a);let g=r(c,"x");await O(g);let D=e==="darwin"?await f("ditto",["-x","-k",p,g]):e==="win32"?await f("powershell",["-NoProfile","-Command",`Expand-Archive -LiteralPath '${p}' -DestinationPath '${g}' -Force`]):await f("unzip",["-q",p,"-d",g]);if(!D.success)throw new Error(`could not unpack the plugin: ${D.stderr.trim()}`);let b=await G(g);if(!b||!await $(r(b,n.binary)))throw new Error(`the ${n.key} download does not contain ${n.binary}`);let h=t.targetDir??z(e).system,d=r(h,w),I=r(h,`.${w}.staging`),y=r(h,`.${w}.previous`),C=[],S=!1;try{await O(h),await R(I),await q(b,I),await R(y),await $(d)&&await A(d,y);try{await A(I,d)}catch(v){throw await $(y)&&await A(y,d),v}await R(y)}catch(v){let B=v.code;if(B!=="EACCES"&&B!=="EPERM")throw v;S=!0,await Y(e,b,h)}return e==="darwin"&&((await f(S?"osascript":"xattr",S?["-e",`do shell script "xattr -dr com.apple.quarantine ${o(d)}" with administrator privileges`]:["-dr","com.apple.quarantine",d])).success||C.push("could not clear the quarantine flag; if Resolve refuses the plugin, run: xattr -dr com.apple.quarantine "+d)),await R(c),{version:i.version,path:d,elevated:S,restart_required:!0,notes:C}}var o=t=>`'${t.replace(/'/g,"'\\''")}'`;async function Y(t,e,n,s=w){let i=r(n,s),u=r(n,`.${s}.staging`),a=r(n,`.${s}.previous`),l=[`mkdir -p ${o(n)}`,`rm -rf ${o(u)} ${o(a)}`,`cp -R ${o(e)} ${o(u)}`,`if [ -e ${o(i)} ]; then mv ${o(i)} ${o(a)}; fi`,`mv ${o(u)} ${o(i)} || { [ -e ${o(a)} ] && mv ${o(a)} ${o(i)}; exit 1; }`,`rm -rf ${o(a)}`].join(" && "),c=t==="darwin"?await f("osascript",["-e",`do shell script ${JSON.stringify(l)} with administrator privileges`]):t==="linux"?await f("pkexec",["sh","-c",l]):{success:!1,stderr:"run this from an administrator prompt",stdout:"",code:1};if(!c.success)throw new Error(`installing into ${n} needs an administrator, and that was refused or failed: ${c.stderr.trim()}`)}export{tt as a,et as b,nt as c,Y as d};