conformtools 0.6.16 → 0.6.18
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 +1 -1
- package/dist/account-O3J732QJ.js +3 -0
- package/dist/{agent-hook-setup-JCIZG3Q3.js → agent-hook-setup-HBT2LTVR.js} +1 -1
- package/dist/{analysis-engine-DCHJHZ7W.js → analysis-engine-BZUEBW55.js} +1 -1
- package/dist/{arriraw-YIJ3BYNN.js → arriraw-PS6V532Y.js} +7 -7
- package/dist/bridge-25FGN67G.js +3 -0
- package/dist/browser/timeline_core_bg.wasm +0 -0
- package/dist/{chunk-XDI6CPPV.js → chunk-2DEUYEQD.js} +1 -1
- package/dist/chunk-2GRXBIJB.js +3 -0
- package/dist/{chunk-RJD44NQU.js → chunk-2V5PY4P5.js} +2 -2
- package/dist/{chunk-JL454FFL.js → chunk-34JO3JNC.js} +2 -2
- package/dist/chunk-3DYCTUSQ.js +3 -0
- package/dist/chunk-3PVQ5QP4.js +3 -0
- package/dist/chunk-567IWIX6.js +3 -0
- package/dist/{chunk-MGMDNGNX.js → chunk-6B3IELRW.js} +2 -2
- package/dist/{chunk-5W57ITT2.js → chunk-AAJRTGEP.js} +2 -2
- package/dist/{chunk-UAURERD3.js → chunk-ANQZKVDD.js} +1 -1
- package/dist/chunk-ATEWMIY5.js +3 -0
- package/dist/{chunk-QRZO5GOI.js → chunk-AYUKWSCR.js} +1 -1
- package/dist/{chunk-RGMTLNMF.js → chunk-BBCQMZQN.js} +1 -1
- package/dist/{chunk-XVZ7KJRI.js → chunk-DIW5X4GI.js} +1 -1
- package/dist/{chunk-WJ5EWXP2.js → chunk-EWW5KWAO.js} +1 -1
- package/dist/chunk-GTPTZRO6.js +3 -0
- package/dist/{chunk-LVGGCRDW.js → chunk-IDEKLW7C.js} +1 -1
- package/dist/{chunk-DPA26AOI.js → chunk-L2RTMZCN.js} +1 -1
- package/dist/chunk-LP2MR4ZH.js +516 -0
- package/dist/chunk-LUKA7UUJ.js +3 -0
- package/dist/{chunk-HOACOBAY.js → chunk-MHBNMYZP.js} +3 -3
- package/dist/{chunk-4RA57LTJ.js → chunk-ND2YUUUH.js} +1 -1
- package/dist/{chunk-VETHR2O7.js → chunk-NN444GPH.js} +1 -1
- package/dist/chunk-OSUIS4JU.js +3 -0
- package/dist/chunk-PIM3PV5N.js +3 -0
- package/dist/{chunk-VWFEMXYZ.js → chunk-QBQJDV2F.js} +103 -101
- package/dist/chunk-RXRBRR3E.js +10 -0
- package/dist/chunk-S5AOIOTT.js +3 -0
- package/dist/{chunk-FLLB6UZJ.js → chunk-T7S2UBNN.js} +1 -1
- package/dist/{chunk-UKXSKFL3.js → chunk-TD3ZHREE.js} +1 -1
- package/dist/chunk-UIX3TT72.js +7 -0
- package/dist/{chunk-6V4OEOOX.js → chunk-VFXMP7IF.js} +1 -1
- package/dist/{claude-setup-CM7G2YSG.js → claude-setup-W27DLJIO.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{cr3-wasm-NYCB34ND.js → cr3-wasm-DIWL7CPH.js} +1 -1
- package/dist/{demo-engine-CBFAAPPO.js → demo-engine-JAQPM4EV.js} +1 -1
- package/dist/dng-wasm-PE463PG2.js +3 -0
- package/dist/dpx-wasm-DKE3LJ6Z.js +3 -0
- package/dist/{engine-6YYXTF2Q.js → engine-ZGBF3SQN.js} +2 -2
- package/dist/exr-wasm-HAFH3YA5.js +3 -0
- package/dist/framing-PGFJZIBU.js +3 -0
- package/dist/gfx-worker.js +1 -1
- package/dist/{h264-MAUVJTR4.js → h264-YX5KP63E.js} +1 -1
- package/dist/{h264-mxf-2O4SAUTA.js → h264-mxf-VAHIJCA7.js} +1 -1
- package/dist/hook.js +2 -2
- package/dist/{host-relink-NVLUO73P.js → host-relink-M2VWUZW5.js} +1 -1
- package/dist/hosted-4CNQYNX5.js +3 -0
- package/dist/hosts-R4BHIZJS.js +3 -0
- package/dist/http.js +3 -3
- package/dist/{inspect-YIFLNOJW.js → inspect-7XEE32P5.js} +18 -18
- package/dist/isobmff-RHP3N5K2.js +3 -0
- package/dist/{mc-video-HRZC7HGH.js → mc-video-CHBOYPI5.js} +1 -1
- package/dist/mcp.js +8 -8
- package/dist/media-4VUWQJLQ.js +3 -0
- package/dist/{media_core_bg-FDL7GJZP.js → media_core_bg-ZMRCKALR.js} +1 -1
- package/dist/mxf-R2ONKSYU.js +3 -0
- package/dist/{ops-XIUVNJE2.js → ops-MKDFWWPG.js} +1 -1
- package/dist/{probe-GIAKRPFV.js → probe-YDOFGCGD.js} +1 -1
- package/dist/{r3d-I6EYEYX7.js → r3d-EKISZSKU.js} +5 -5
- package/dist/r3d-F4OWLQE2.js +3 -0
- package/dist/sequence-patch-2S7IPE52.js +3 -0
- package/dist/{source-QGWWLMME.js → source-L2JNTYS6.js} +1 -1
- package/dist/{still-4UR35GZH.js → still-IDLCMQRD.js} +1 -1
- package/dist/{still-wasm-RTPOMH7S.js → still-wasm-54HEDTRX.js} +1 -1
- package/dist/{store-MWNX47IK.js → store-A5AKWOSX.js} +1 -1
- package/dist/tiff-wasm-O7XUGXIO.js +3 -0
- package/dist/timeline-ZHDJXDZJ.js +3 -0
- package/dist/{wav-HSCUCY4U.js → wav-OLA3QYFJ.js} +1 -1
- package/package.json +5 -5
- package/dist/account-W7Z2MYZU.js +0 -3
- package/dist/bridge-UPSJ7F3S.js +0 -3
- package/dist/chunk-DKGGJM6Z.js +0 -3
- package/dist/chunk-DLF5AKXT.js +0 -10
- package/dist/chunk-EEDLRRKU.js +0 -3
- package/dist/chunk-IDJIOKXA.js +0 -3
- package/dist/chunk-ISKNIQVO.js +0 -3
- package/dist/chunk-JKOB3U54.js +0 -3
- package/dist/chunk-JM5LHKTU.js +0 -510
- package/dist/chunk-OWWXUNJF.js +0 -7
- package/dist/chunk-PFZVET7S.js +0 -3
- package/dist/chunk-QH5DTYSE.js +0 -3
- package/dist/chunk-RVZQ3Y6N.js +0 -3
- package/dist/chunk-X527E5VI.js +0 -3
- package/dist/chunk-YUO3UWPH.js +0 -3
- package/dist/dng-wasm-XCPPBXPZ.js +0 -3
- package/dist/dpx-wasm-XACWNFPB.js +0 -3
- package/dist/exr-wasm-FQBUR6QT.js +0 -3
- package/dist/framing-QYRCUEB5.js +0 -3
- package/dist/hosted-2XACQY7J.js +0 -3
- package/dist/hosts-GEXAZFB3.js +0 -3
- package/dist/isobmff-MTMGQKLK.js +0 -3
- package/dist/media-WC4ZVKIL.js +0 -3
- package/dist/mxf-J5QHA3VY.js +0 -3
- package/dist/r3d-2PCOFR2Z.js +0 -3
- package/dist/sequence-patch-DFGEAJGB.js +0 -3
- package/dist/tiff-wasm-N2S267IA.js +0 -3
- package/dist/timeline-Z3KD2CJX.js +0 -3
- /package/dist/{chunk-D6YDLKSA.js → chunk-LMRPCWHV.js} +0 -0
- /package/dist/{media_core_bg-XRBVKQZH.js → media_core_bg-57CDWER6.js} +0 -0
- /package/dist/{prores-RIG37OIH.js → prores-CFX64NME.js} +0 -0
- /package/dist/{timeline_core_bg-JW42YM3G.js → timeline_core_bg-5COJCLPG.js} +0 -0
- /package/dist/{udf_bg-B37GKRIH.js → udf_bg-HOHEKAVF.js} +0 -0
|
@@ -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{Ha as n,Z as s,r as o}from"./chunk-L2RTMZCN.js";async function p(t){await n();let e=s(t);return e==="null"?null:JSON.parse(e)}async function d(t){await n();let e;try{e=o(t)}catch{return null}if(e.length<8)return null;let r=new DataView(e.buffer,e.byteOffset,e.byteLength),a=r.getUint32(0,!0),i=r.getUint32(4,!0),u=a*i*4;return e.length<8+u?null:{width:a,height:i,rgba:new Uint8ClampedArray(e.subarray(8,8+u))}}export{p as a,d as b};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as L}from"./chunk-
|
|
3
|
+
import{a as L}from"./chunk-PIM3PV5N.js";import{A as O,B as R,D as W,E as I,ba as P,n as _,s as H,y as N}from"./chunk-GTPTZRO6.js";import X from"node:http";import{connect as Y}from"node:net";import{createHash as M,randomBytes as U}from"node:crypto";import{Buffer as d}from"node:buffer";var j="258EAFA5-E914-47DA-95CA-C5AB0DC85B11";function A(a,e,c=!1){let n=e.length,r=c?128:0,s=n<126?d.from([128|a,r|n]):n<65536?d.from([128|a,r|126,n>>8,n&255]):(()=>{let o=d.alloc(10);return o[0]=128|a,o[1]=r|127,o.writeBigUInt64BE(BigInt(n),2),o})();if(!c)return d.concat([s,d.from(e)]);let t=U(4),i=d.from(e);for(let o=0;o<i.length;o++)i[o]^=t[o&3];return d.concat([s,t,i])}function D(a,e,c,n=!1){let r=d.alloc(0),s=[],t=0,i=!1,o=[],p=[],u=()=>{i||(i=!0,p.forEach(l=>l()))},f=(l=1e3,m="")=>{if(i)return;let h=d.from(m),g=d.alloc(2+h.length);g.writeUInt16BE(l,0),h.copy(g,2);try{a.write(A(8,g,n))}catch{}a.end(),u()};return a.on("data",l=>{for(r=d.concat([r,l]);r.length>=2;){let m=(r[0]&128)!==0,h=r[0]&15,g=(r[1]&128)!==0,v=r[1]&127,w=2;if(v===126){if(r.length<4)return;v=r.readUInt16BE(2),w=4}else if(v===127){if(r.length<10)return;let b=r.readBigUInt64BE(2);if(b>BigInt(c))return f(1009,"too big");v=Number(b),w=10}if(g===n)return f(1002,n?"server frames must not be masked":"client frames must be masked");if(v>c||t+v>c)return f(1009,"message too big");let E=g?4:0;if(r.length<w+E+v)return;let S=d.from(r.subarray(w+E,w+E+v));if(g){let b=r.subarray(w,w+4);for(let x=0;x<S.length;x++)S[x]^=b[x&3]}if(r=r.subarray(w+E+v),h===8)return f(1e3);if(h===9){a.write(A(10,S,n));continue}if(h!==10){if(h===1||h===0){if(s.push(S),t+=S.length,m){let b=d.concat(s).toString("utf8");s=[],t=0,o.forEach(x=>x(b))}continue}return f(1003,"text frames only")}}}),a.on("close",u),a.on("error",u),{origin:e,send:l=>{i||a.write(A(1,d.from(l,"utf8"),n))},close:f,onMessage:l=>{o.push(l)},onClose:l=>{p.push(l)}}}function J(a,e){let c=new Set,n=X.createServer((r,s)=>{let t=n.address();a.onHttp?.(r,s,typeof t=="object"&&t?t.port:a.port)||(s.writeHead(426,{"content-type":"text/plain"}),s.end("websocket only"))});return n.on("upgrade",(r,s)=>{let t=r.headers["sec-websocket-key"];if(r.url?.split("?")[0]!==a.path||typeof t!="string"||String(r.headers.upgrade).toLowerCase()!=="websocket"){s.end(`HTTP/1.1 400 Bad Request\r
|
|
4
4
|
\r
|
|
5
5
|
`);return}let i=M("sha1").update(t+j).digest("base64");s.write(`HTTP/1.1 101 Switching Protocols\r
|
|
6
6
|
Upgrade: websocket\r
|
|
@@ -16,5 +16,5 @@ Sec-WebSocket-Version: 13\r
|
|
|
16
16
|
\r
|
|
17
17
|
`));let p=d.alloc(0),u=f=>{p=d.concat([p,f]);let l=p.indexOf(`\r
|
|
18
18
|
\r
|
|
19
|
-
`);if(l<0)return;i.off("data",u);let
|
|
20
|
-
`),h=
|
|
19
|
+
`);if(l<0)return;i.off("data",u);let m=p.subarray(0,l).toString("latin1").split(`\r
|
|
20
|
+
`),h=m.find(w=>/^sec-websocket-accept:/i.test(w))?.split(":")[1]?.trim();if(!/^HTTP\/1\.1 101/.test(m[0])||h!==r)return o(new Error(`${c.host} refused the WebSocket upgrade: ${m[0]}`));i.setTimeout(0),i.off("error",o);let g=p.subarray(l+4),v=D(i,null,e.maxBytes,!0);g.length&&i.emit("data",g),s(v)};i.on("data",u)})}import{existsSync as K,readFileSync as Q}from"node:fs";var k=1,Z=[48127,48128,48129,48130,48131,48132,48133,48134],q=5e3,F=4,ee=8*1024*1024,y=class extends Error{constructor(c,n){super(n);this.code=c}},T=()=>P(_(),"host-bridge","pairing.json"),B="/avid-panel/",te="/avid-panel/pairing",G="avid",z={"index.html":"text/html; charset=utf-8","panel.js":"text/javascript; charset=utf-8","panel.css":"text/css; charset=utf-8","icon.svg":"image/svg+xml"},ne="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'self' ws://localhost:{port} ws://127.0.0.1:{port} http://localhost:* http://127.0.0.1:* https://localhost:* https://127.0.0.1:*; base-uri 'none'; form-action 'none'; frame-ancestors 'none'",V=a=>[`http://localhost:${a}`,`http://127.0.0.1:${a}`];function re(){for(let a of["./avid/panel/web-dist/","./avid-panel/"]){let e=H(new URL(a,import.meta.url));if(K(P(e,"index.html")))return e}return null}function oe(){let a=new Uint8Array(32);return crypto.getRandomValues(a),Array.from(a,e=>e.toString(16).padStart(2,"0")).join("")}var C=class{constructor(){this.token=oe();this.port=0;this.live=new Map;this.waiters=[];this.seq=0;this.events=[]}async start(e=Z){let c;for(let n of e)try{this.server=await J({hostname:"127.0.0.1",port:n,path:"/host-bridge",maxBytes:ee,onHttp:(r,s,t)=>this.servePanel(r,s,t)},r=>this.accept(r)),this.port=this.server.port;break}catch(r){c=r}if(!this.server)throw new y("no_port",`every host-bridge port (${e.join(", ")}) is taken: ${c}`);await R(P(_(),"host-bridge")),await O(T(),JSON.stringify({protocol:k,url:`ws://127.0.0.1:${this.port}/host-bridge`,port:this.port,token:this.token})),await I(T(),384)}async stop(){for(let e of this.live.values())e.conn.close(1001,"engine stopping");this.live.clear(),await this.server?.close();try{JSON.parse(await N(T())).token===this.token&&await W(T())}catch{}}peers(){return[...this.live.values()].map(e=>e.peer)}peer(e){return this.live.get(e)?.peer}async waitFor(e,c){return this.live.has(e)?this.peer(e):(await Promise.race([new Promise(n=>this.waiters.push({host:e,resolve:n})),new Promise(n=>setTimeout(n,c))]),this.peer(e))}request(e,c,n={},r=3e4){let s=this.live.get(e);if(!s)return Promise.reject(new y("not_connected",`${e}: its panel is not connected`));let t=`r${++this.seq}`;return new Promise((i,o)=>{let p=setTimeout(()=>{s.pending.delete(t),o(new y("timeout",`${e}: no answer to ${c} within ${Math.round(r/1e3)} s`))},r);s.pending.set(t,{resolve:i,reject:o,timer:p}),s.conn.send(JSON.stringify({type:"request",id:t,method:c,params:n}))})}servePanel(e,c,n){let r=(e.url??"").split("?")[0];if(!r.startsWith(B)&&r!==B.slice(0,-1))return!1;let s=(f,l,m,h=!1)=>{let g=typeof m=="string"?new TextEncoder().encode(m):m;return c.writeHead(f,{"content-type":l,"content-length":String(g.length),"cache-control":"no-store","x-content-type-options":"nosniff","referrer-policy":"no-referrer","cross-origin-resource-policy":"same-origin","x-frame-options":"DENY","content-security-policy":ne.replaceAll("{port}",String(n))}),c.end(h?void 0:g),!0},t=(f,l)=>s(f,"text/plain; charset=utf-8",l),i=f=>{let l=e.headers[f];return typeof l=="string"?l:void 0},o=(i("host")??"").toLowerCase();if(o!==`localhost:${n}`&&o!==`127.0.0.1:${n}`)return t(421,"misdirected request");if(r===te)return e.method==="POST"&&V(n).includes(i("origin")??"")&&(i("sec-fetch-site")??"same-origin")==="same-origin"&&i("x-ct-panel")==="1"&&(i("content-length")??"0").trim()==="0"?s(200,"application/json",JSON.stringify({protocol:k,url:`ws://localhost:${n}/host-bridge`,port:n,token:this.token})):t(403,"forbidden");if(e.method!=="GET"&&e.method!=="HEAD")return t(405,"method not allowed");let p=r.slice(B.length)||"index.html",u=re();return!z[p]||!u?t(404,"not found"):s(200,z[p],Q(P(u,p)),e.method==="HEAD")}accept(e){let c=!!e.origin&&V(this.port).includes(e.origin);if(e.origin&&/^https?:/i.test(e.origin)&&!c){e.send(JSON.stringify({type:"error",code:"origin_refused",message:"web pages may not use the host bridge"})),e.close(1008,"origin");return}let n=null,r=setTimeout(()=>{n||(e.send(JSON.stringify({type:"error",code:"hello_timeout",message:"no hello"})),e.close(1008,"hello"))},q);e.onMessage(s=>{let t;try{t=JSON.parse(s)}catch{return}if(!n){let o=(l,m)=>{clearTimeout(r),e.send(JSON.stringify({type:"error",code:l,message:m})),e.close(1008,l)};if(t.type!=="hello")return o("hello_expected","the first frame must be hello");if(t.protocol!==k)return o("protocol_mismatch",`this engine speaks protocol ${k}`);if(t.token!==this.token)return o("bad_token","the pairing token does not match: re-read the pairing file");let p=t.host??{},u=String(p.id??"");if(!/^[a-z][a-z0-9_-]{1,31}$/.test(u))return o("bad_host","host.id is missing or malformed");if(c&&u!==G)return o("origin_mismatch",`a connection from the panel page may only be host ${G}`);if(!this.live.has(u)&&this.live.size>=F)return o("too_many_peers",`at most ${F} panels`);clearTimeout(r),this.live.get(u)?.conn.close(1e3,"replaced by a newer connection"),n=u;let f={id:u,name:String(p.name??u),version:String(p.version??""),platform:String(p.platform??""),capabilities:Array.isArray(t.capabilities)?t.capabilities.map(String):[],optional_verbs:Array.isArray(t.optional_verbs)?t.optional_verbs.map(String):[]};this.live.set(u,{peer:f,conn:e,pending:new Map}),e.send(JSON.stringify({type:"welcome",protocol:k,app:{name:"conformtools",version:L}})),this.waiters=this.waiters.filter(l=>l.host===u?(l.resolve(),!1):!0);return}let i=this.live.get(n);if(!(!i||i.conn!==e))if(t.type==="response"){let o=i.pending.get(String(t.id));if(!o)return;if(i.pending.delete(String(t.id)),clearTimeout(o.timer),t.ok)o.resolve(t.result??null);else{let p=t.error??{};o.reject(new y(p.code??"peer_error",`${n}: ${p.message??p.code??"error"}`))}}else t.type==="event"&&(this.events.push({host:n,name:String(t.name),data:t.data}),this.events.length>200&&this.events.shift())}),e.onClose(()=>{if(clearTimeout(r),!n)return;let s=this.live.get(n);if(s?.conn===e){for(let t of s.pending.values())clearTimeout(t.timer),t.reject(new y("disconnected",`${n}: the panel disconnected`));this.live.delete(n)}})}},$=null;function ge(){return $??=(async()=>{let a=new C;return await a.start(),a})(),$.catch(()=>{$=null}),$}export{le as a,k as b,Z as c,y as d,T as e,B as f,V as g,C as h,ge as i};
|
|
@@ -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
|
-
var s={scrub:{output:"rgba8",detail:"coarse"},thumbnail:{output:"rgba8",detail:"coarse"},park:{output:"rgba8",detail:"exact"},render:{output:"rgba8",detail:"exact"},transcode:{output:"rgb16",detail:"exact"}};function p(e){let t=new DataView(e.buffer,e.byteOffset,8),r=t.getUint32(0,!0),n=t.getUint32(4,!0),o=e.slice(8);return{width:r,height:n,rgb16:new Uint16Array(o.buffer,o.byteOffset,r*n*3)}}var a=class extends Error{constructor(r,n){super(`COVERAGE_MISS: frame ${r} not in linked media (${n} frames)`);this.index=r;this.frameCount=n;this.name="CoverageMissError"}},m=/(?:[A-Z0-9]+_)?COVERAGE_MISS\s+(\{[\s\S]*\})/;function d(e){let r=(e instanceof Error?e.message:String(e??"")).match(m);if(!r)return null;try{return JSON.parse(r[1])}catch{return{reason:"coverage_miss"}}}var i=class extends Error{constructor(r){super(`DELIVERY_COVERAGE_MISS: ${r.reason}`+(r.cut_in!=null?` cut [${r.cut_in}..${r.cut_out}] file_frames ${r.file_frames}`:""));this.detail=r;this.name="DeliveryCoverageMissError"}};function l(e){return e instanceof i?e.detail:d(e)}var u={mov:()=>import("./isobmff-
|
|
3
|
+
var s={scrub:{output:"rgba8",detail:"coarse"},thumbnail:{output:"rgba8",detail:"coarse"},park:{output:"rgba8",detail:"exact"},render:{output:"rgba8",detail:"exact"},transcode:{output:"rgb16",detail:"exact"}};function p(e){let t=new DataView(e.buffer,e.byteOffset,8),r=t.getUint32(0,!0),n=t.getUint32(4,!0),o=e.slice(8);return{width:r,height:n,rgb16:new Uint16Array(o.buffer,o.byteOffset,r*n*3)}}var a=class extends Error{constructor(r,n){super(`COVERAGE_MISS: frame ${r} not in linked media (${n} frames)`);this.index=r;this.frameCount=n;this.name="CoverageMissError"}},m=/(?:[A-Z0-9]+_)?COVERAGE_MISS\s+(\{[\s\S]*\})/;function d(e){let r=(e instanceof Error?e.message:String(e??"")).match(m);if(!r)return null;try{return JSON.parse(r[1])}catch{return{reason:"coverage_miss"}}}var i=class extends Error{constructor(r){super(`DELIVERY_COVERAGE_MISS: ${r.reason}`+(r.cut_in!=null?` cut [${r.cut_in}..${r.cut_out}] file_frames ${r.file_frames}`:""));this.detail=r;this.name="DeliveryCoverageMissError"}};function l(e){return e instanceof i?e.detail:d(e)}var u={mov:()=>import("./isobmff-RHP3N5K2.js").then(e=>e.isobmffFormat),crm:()=>import("./isobmff-RHP3N5K2.js").then(e=>e.isobmffFormat),braw:()=>import("./isobmff-RHP3N5K2.js").then(e=>e.isobmffFormat),wav:()=>import("./wav-OLA3QYFJ.js").then(e=>e.wavFormat),mxf:()=>import("./mxf-R2ONKSYU.js").then(e=>e.mxfFormat),r3d:()=>import("./r3d-F4OWLQE2.js").then(e=>e.r3dFormat),still:()=>import("./still-IDLCMQRD.js").then(e=>e.stillFormat),avc1:()=>import("./h264-YX5KP63E.js").then(e=>e.h264Format),avc3:()=>import("./h264-YX5KP63E.js").then(e=>e.h264Format),h264:()=>import("./h264-YX5KP63E.js").then(e=>e.h264Format),hvc1:()=>import("./h264-YX5KP63E.js").then(e=>e.h264Format),hev1:()=>import("./h264-YX5KP63E.js").then(e=>e.h264Format),hevc:()=>import("./h264-YX5KP63E.js").then(e=>e.h264Format),h264_mxf:()=>import("./h264-mxf-VAHIJCA7.js").then(e=>e.h264MxfFormat),mcvideo:()=>import("./mc-video-CHBOYPI5.js").then(e=>e.mcVideoFormat)};async function c(e){let t=u[e];return t?await t():null}async function f(e){let t=await c(e.format);if(!t)throw new Error(`extract: no handler for format '${e.format}'`);return t.extract(e)}async function b(e,t){let r=await c(e.format);if(!r){if(t.verb==="inspect")return null;throw new Error(`mediaOp: no handler for format '${e.format}' (verb ${t.verb})`)}switch(t.verb){case"inspect":{let n=await r.inspect(e);return n&&(n.source_facts_origin="probed"),n}case"sparsify":return r.sparsify(e,t.selection);case"trim":return r.trim(e,t.selection);case"decode":{let{output:n,detail:o}=s[t.intent];if(n==="rgb16"){if(!r.decode16)throw new Error(`mediaOp: format '${e.format}' has no 16-bit decoder (intent '${t.intent}')`);return r.decode16(e,t.index)}if(!r.decode)throw new Error(`mediaOp: format '${e.format}' has no decoder (no viewer)`);return r.decode(e,t.index,{detail:o})}}}export{s as a,p as b,a as c,d,i as e,l as f,c as g,f as h,b as i};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
-
import{a as E}from"./chunk-ROGMKTND.js";import{S as x,b as y,f as g,g as f,k as w,l as h,s as p,v as b}from"./chunk-
|
|
3
|
+
import{a as E}from"./chunk-ROGMKTND.js";import{S as x,b as y,f as g,g as f,k as w,l as h,s as p,v as b}from"./chunk-GTPTZRO6.js";async function k(){let e=f()==="win32"?"conformtools-analyze.exe":"conformtools-analyze",r=[y("CONFORM_ANALYZE"),w(e),p(new URL(`./${e}`,import.meta.url)),p(new URL(`../../rust/target/release/${e}`,import.meta.url))].filter(Boolean);for(let n of r)if(await b(n))return n;return null}var R=e=>e.code==="not_entitled"?new E("not_entitled",String(e.why)):void 0;async function A(e){let r=await P(),n=await r.ask({op:"job",reference:e.reference,clips:e.clips,lite:e.lite??!0,display:!!e.display});if(!n.ok)throw r.close(),R(n)??new Error(`analysis engine: ${n.why}`);return r}async function N(e,r,n){let i=await P(),t=()=>i.close();n?.addEventListener("abort",t);let s;try{s=await i.ask(e,r)}finally{n?.removeEventListener("abort",t),i.close()}if(n?.aborted)throw new Error("cancelled");if(!s.ok)throw R(s)??new Error(s.why??`the analysis engine could not run ${e.op}`);return s}async function P(){let e=await k();if(!e)throw new Error(h("the analysis engine (conformtools-analyze)"));let r="",n=null,i=[],t=x(e,["serve"],o=>{r+=new TextDecoder().decode(o);let a;for(;(a=r.indexOf(`
|
|
4
4
|
`))>=0;){let c=r.slice(0,a);r=r.slice(a+1);let l=JSON.parse(c);if(l.progress){n?.progress?.(l.progress[0],l.progress[1],l.phase??"");continue}let d=n;n=null,d?.done(l)}},o=>{console.error(o.trimEnd()),i=[...i,...o.split(`
|
|
5
5
|
`).filter(a=>a.trim())].slice(-3)}),s=null;t.exited.then(o=>{s={ok:!1,why:`the analysis engine exited${o==null?"":` (code ${o})`}${i.length?`: ${i.join(" | ").slice(0,400)}`:""}`},n?.done(s)});let m=Promise.resolve();return{ask:(o,a)=>{let c=m.then(async()=>{t.hold(!0);try{if(s)return s;let l=new Promise(v=>{n={done:v,progress:a}}),u=await t.write(new TextEncoder().encode(JSON.stringify(o)+`
|
|
6
6
|
`)).then(()=>!0,()=>!1)?await l:await Promise.race([l,t.exited.then(()=>s??{ok:!1,why:"the analysis engine exited"})]);return u.miss&&(console.error(`[mirror] MISS \u2014 ${u.miss} is not in the mirror. Replay never reads the source drive; record this case again with the drive mounted (CONFORM_MIRROR_MODE=record).`),g(75)),u}finally{t.hold(!1)}});return m=c.catch(()=>{}),c},close:()=>t.close()}}export{k as a,A as b,N as c,P as d};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
|
|
3
|
+
function a(e){if(e.length<8)return null;let n=new DataView(e.buffer,e.byteOffset,e.byteLength),t=n.getUint32(0,!0),r=n.getUint32(4,!0),u=t*r*4;return e.length<8+u?null:{width:t,height:r,rgba:new Uint8ClampedArray(e.subarray(8,8+u))}}export{a};
|
|
@@ -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 o}from"./chunk-GTPTZRO6.js";var i="0.6.18";function a(t,n){let r=t.split("-")[0].split(".").map(Number),s=n.split("-")[0].split(".").map(Number);for(let e=0;e<Math.max(r.length,s.length);e++){let l=(r[e]||0)-(s[e]||0);if(l)return l>0}return!1}var p=null;function u(){return o("CONFORM_UPDATE_CHECK")==="off"?Promise.resolve(null):p??=fetch("https://registry.npmjs.org/conformtools/latest",{signal:AbortSignal.timeout(2e3)}).then(t=>t.ok?t.json():null).then(t=>typeof t?.version=="string"?t.version:null).catch(()=>null)}var c="run npx -y conformtools@latest setup claude (or setup codex) once: it registers the server so every new session runs the newest version (npx --prefer-online), then restart the MCP client; if an old global install is shadowing it: npm rm -g conformtools";async function m(){let t=o("CONFORM_APP_VERSION");if(t)return`conform.tools app ${t}`;let n=await u();return`conformtools ${i}`+(n&&a(n,i)?` \u2014 update available: ${n} \u2192 ${c}`:"")}export{i as a,a as b,u as c,c as d,m as e};
|