conformtools 0.6.0 → 0.6.3

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 (66) hide show
  1. package/README.md +27 -17
  2. package/dist/browser/timeline_core_bg.wasm +0 -0
  3. package/dist/{chunk-PZFWQJCF.js → chunk-5K56Q5EX.js} +1 -1
  4. package/dist/chunk-6FVGUJ6L.js +3 -0
  5. package/dist/{chunk-N43NAG5E.js → chunk-BK62N3ID.js} +1 -1
  6. package/dist/{chunk-AHNDJFQR.js → chunk-BUEIRRNY.js} +1 -1
  7. package/dist/{chunk-XDHIIZ6A.js → chunk-CETBLAWM.js} +1 -1
  8. package/dist/{chunk-ZAHP3ES5.js → chunk-D2RXAX5C.js} +1 -1
  9. package/dist/chunk-D5DEQ467.js +3 -0
  10. package/dist/chunk-EV52G33S.js +354 -0
  11. package/dist/chunk-FMYTLXWN.js +3 -0
  12. package/dist/{chunk-R6WJ6JIQ.js → chunk-JBSH4AK3.js} +1 -1
  13. package/dist/{chunk-PSMXHDMX.js → chunk-LO4K2ZF3.js} +1 -1
  14. package/dist/{chunk-UUDNNFU7.js → chunk-R7P7WVNI.js} +1 -1
  15. package/dist/{chunk-7XTBFOUJ.js → chunk-WE4S4PEA.js} +1 -1
  16. package/dist/claude-setup-XSNTKEU7.js +5 -0
  17. package/dist/cli.js +10 -5
  18. package/dist/conformtools-decode +0 -0
  19. package/dist/{cr3-wasm-CWKEOCYH.js → cr3-wasm-HTRSUBJK.js} +1 -1
  20. package/dist/{dng-wasm-JNFS44V5.js → dng-wasm-2I7S2SN4.js} +1 -1
  21. package/dist/{dpx-wasm-VNJRFPYY.js → dpx-wasm-AHH7D56L.js} +1 -1
  22. package/dist/{exr-wasm-5D66YR7A.js → exr-wasm-3TAN64WQ.js} +1 -1
  23. package/dist/{h264-ZB5DJSNV.js → h264-2LU2X635.js} +1 -1
  24. package/dist/{h264-mxf-NVBLGU3V.js → h264-mxf-5HJUSZLL.js} +1 -1
  25. package/dist/http.js +1 -1
  26. package/dist/i2o-transfer +0 -0
  27. package/dist/{inspect-MGSZRRAF.js → inspect-NY36WVMH.js} +1 -1
  28. package/dist/isobmff-HSF7B3Y7.js +3 -0
  29. package/dist/mcp.js +8 -9
  30. package/dist/{media_core-AISE7FMT.js → media_core-R5PPN3AY.js} +2 -2
  31. package/dist/{media_core_bg-FGAR5KA5.js → media_core_bg-MEORQOCQ.js} +1 -1
  32. package/dist/mxf-IQBPP3JA.js +3 -0
  33. package/dist/{ops-BQDPU4M6.js → ops-PFEKOSET.js} +1 -1
  34. package/dist/{r3d-T6D3M2XJ.js → r3d-QLV4J6YF.js} +1 -1
  35. package/dist/{r3d-U4XTQJXQ.js → r3d-YZH6X2D7.js} +1 -1
  36. package/dist/resolve-bridge.py +465 -37
  37. package/dist/statusline-GMMCFMOA.js +4 -0
  38. package/dist/statusline.js +3 -0
  39. package/dist/still-LORP3E5C.js +3 -0
  40. package/dist/{tiff-wasm-2CEABW6L.js → tiff-wasm-6XFTTCL4.js} +1 -1
  41. package/dist/wasm/media_core_bg.wasm +0 -0
  42. package/dist/wasm/udf_bg.wasm +0 -0
  43. package/dist/wasm-threads/media_core_bg.wasm +0 -0
  44. package/dist/{wav-KNJZMOGX.js → wav-PMVKVYNP.js} +1 -1
  45. package/package.json +1 -1
  46. package/dist/chunk-E6YXZIJS.js +0 -230
  47. package/dist/chunk-JEMLKBH2.js +0 -3
  48. package/dist/chunk-RXHNBSER.js +0 -3
  49. package/dist/isobmff-7G55HKDG.js +0 -3
  50. package/dist/mxf-YH2A2XLW.js +0 -3
  51. package/dist/skills/auto-conform/SKILL.md +0 -87
  52. package/dist/skills/conform-artist/SKILL.md +0 -68
  53. package/dist/skills/conform-artist/references/avid.md +0 -19
  54. package/dist/skills/conform-artist/references/other-hosts.md +0 -23
  55. package/dist/skills/conform-artist/references/premiere.md +0 -18
  56. package/dist/skills/conform-artist/references/resolve.md +0 -19
  57. package/dist/skills/conform-artist/references/troubleshooting.md +0 -33
  58. package/dist/skills/conform-artist/references/turnover-checklist.md +0 -37
  59. package/dist/skills/delivery-qc/SKILL.md +0 -48
  60. package/dist/still-UFLOAEM4.js +0 -3
  61. /package/dist/{arriraw-3GKCR6K2.js → arriraw-GUQEZ7CH.js} +0 -0
  62. /package/dist/{chunk-WHY3DVXS.js → chunk-GIZIR52D.js} +0 -0
  63. /package/dist/{media_core_bg-YK63OUDM.js → media_core_bg-5QHIWEZB.js} +0 -0
  64. /package/dist/{prores-L4JZZWGH.js → prores-BR2YURFP.js} +0 -0
  65. /package/dist/{timeline_core_bg-2TYWZ35G.js → timeline_core_bg-DFKQ7XOU.js} +0 -0
  66. /package/dist/{udf_bg-A4WEMSAX.js → udf_bg-ZIB3GK52.js} +0 -0
package/README.md CHANGED
@@ -15,8 +15,8 @@ language, or from a terminal.
15
15
  ## 1. Sign in
16
16
 
17
17
  ```sh
18
- npx -y conformtools login # opens your browser: sign in with the Google account you use on conform.tools
19
- npx -y conformtools whoami # shows the account and plan it found
18
+ npx -y conformtools@latest login # opens your browser: sign in with the Google account you use on conform.tools
19
+ npx -y conformtools@latest whoami # shows the account and plan it found
20
20
  ```
21
21
 
22
22
  ## 2a. Use it from Claude
@@ -24,7 +24,7 @@ npx -y conformtools 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 mcp
27
+ claude mcp add -s user conformtools -- npx -y conformtools@latest mcp
28
28
  ```
29
29
 
30
30
  **Claude Desktop** — Settings → Developer → Edit Config, then add:
@@ -32,12 +32,12 @@ claude mcp add -s user conformtools -- npx -y conformtools mcp
32
32
  ```json
33
33
  {
34
34
  "mcpServers": {
35
- "conformtools": { "command": "npx", "args": ["-y", "conformtools", "mcp"] }
35
+ "conformtools": { "command": "npx", "args": ["-y", "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 mcp`.
40
+ Cursor, Codex and other MCP clients take the same command: `npx -y conformtools@latest mcp`.
41
41
 
42
42
  Then just ask:
43
43
 
@@ -55,19 +55,23 @@ Working with a running DaVinci Resolve Studio needs Preferences > System > Gener
55
55
  scripting using: **Local**. Imports always land as a new timeline in a conform.tools folder; renders
56
56
  run only their own job and put your Deliver settings, timeline and page back.
57
57
 
58
- **Skills come with it.** The server also ships Agent Skills (the MCP Skills
59
- Extension, `io.modelcontextprotocol/skills`), so the agent learns how a conform
60
- artist uses the tools, not just what they do:
58
+ **Playbooks come with your account.** Once you are signed in, the agent gets the
59
+ CONFORM.TOOLS playbooks, so it learns how a conform artist uses the tools, not just
60
+ what they do:
61
61
 
62
- - `skill://conform-artist/SKILL.md`: turnover checks, relink, write, judge and
63
- report losses, with notes per host (Resolve, Premiere, Avid, Flame, Final Cut,
64
- Baselight, Pro Tools).
65
- - `skill://delivery-qc/SKILL.md`: consolidate, package (folder or ISO) and QC a
66
- delivery before it leaves.
62
+ - **conform**: turnover checks, relink, write, check and report what did not carry,
63
+ with notes per host (Resolve, Premiere, Avid, Flame, Final Cut, Baselight, Pro Tools).
64
+ - **deliver**: consolidate, package (folder or ISO) and QC a delivery before it leaves. A
65
+ delivery is one `.iso` wherever it goes: on disk, in your org's own bucket
66
+ (`destination=bucket`, only bytes no earlier delivery there holds are uploaded), or straight to
67
+ one recipient peer to peer (`destination=p2p`, Iroh). `add_to` grows an earlier delivery with a
68
+ re-cut's new frames only. `delivery_fetch` opens any of them the same way: list it, take the
69
+ `.iso`, cut a folder of trims from it, or mount it live (macOS).
67
70
 
68
- Hosts that support the extension list and load them natively. Other hosts see the
69
- same files as ordinary MCP resources, and the server's instructions point the agent
70
- at them. Your host decides whether a skill is loaded.
71
+ The agent loads the playbook for its task with the `conform_learn` tool. Hosts that
72
+ support the MCP Skills Extension (`io.modelcontextprotocol/skills`) also see them as
73
+ `skill://conform-artist` and `skill://delivery-qc`. The playbooks come from
74
+ conform.tools, so they stay current without updating the package.
71
75
 
72
76
  ## 2b. Or use it from a terminal
73
77
 
@@ -75,9 +79,15 @@ at them. Your host decides whether a skill is loaded.
75
79
  npm i -g conformtools
76
80
  conformtools --list # every tool, with a one-line description
77
81
  conformtools timeline_read '{"path":"~/Desktop/cut.aaf"}'
78
- conformtools timeline_write '{"session_id":"…","target":"drt"}'
82
+ conformtools timeline_write '{"session_id":"…","target":"resolve"}' # .drt + XML for Resolve + README, in "DaVinci Resolve/"
83
+ conformtools timeline_write '{"session_id":"…","target":"drt"}' # just the .drt
79
84
  ```
80
85
 
86
+ A **destination** (`resolve`, `premiere`, `avid`, `flame`, `finalcut`, `baselight`, `protools`)
87
+ writes the host's native file and the fallback to use if the host refuses it, in one folder named
88
+ for the host, with a README saying which to open first and what each file could not carry.
89
+ `GET /v1/destinations` lists them.
90
+
81
91
  ## 2c. Or call it from your own code (local HTTP API)
82
92
 
83
93
  ```sh
Binary file
@@ -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{Ca as r,S as s,l as o}from"./chunk-R6WJ6JIQ.js";async function d(t){await r();let e=s(t);return e==="null"?null:JSON.parse(e)}async function l(t){await r();let e;try{e=o(t)}catch{return null}if(e.length<8)return null;let n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=n.getUint32(0,!0),i=n.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{d as a,l as b};
3
+ import{Ca as r,S as s,l as o}from"./chunk-JBSH4AK3.js";async function d(t){await r();let e=s(t);return e==="null"?null:JSON.parse(e)}async function l(t){await r();let e;try{e=o(t)}catch{return null}if(e.length<8)return null;let n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=n.getUint32(0,!0),i=n.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{d as a,l as b};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __conformRequire } from 'node:module'; const require = __conformRequire(import.meta.url);
3
+ var F=new Set(["png","jpg","jpeg","tif","tiff","psd","tga","bmp","gif","webp","avif","heic","heif","exr","dpx","pict","pct"]);function B(t){let n=t.split(/[/\\]/).pop()??"",e=n.lastIndexOf(".");return e>0?n.slice(e+1).toLowerCase():""}function k(t){return!!t&&F.has(B(t))}function N(t){return t.content_kind==="still"?!0:t.content_kind!=null?!1:k(t.source_filename)||k(t.target_url)}function Y(t){return{size:t.length,async read(n,e){let r=Math.max(0,Math.min(n,t.length)),u=Math.max(r,Math.min(r+e,t.length));return t.subarray(r,u)}}}function q(t){return{size:t.fileSize,read:(n,e)=>t.read(n,e)}}var U=class{constructor(n){this.r=n;this.buf=new Uint8Array(0);this.base=0}async at(n,e){if(n<0||e<=0)return new Uint8Array(0);let r=n-this.base;return r>=0&&r+e<=this.buf.length?this.buf.subarray(r,r+e):(this.buf=await this.r.read(n,Math.max(e,65536)),this.base=n,this.buf.subarray(0,Math.min(e,this.buf.length)))}},A=(t,n)=>t[n]<<8|t[n+1],b=(t,n)=>t[n]|t[n+1]<<8,W=(t,n)=>t[n]|t[n+1]<<8|t[n+2]<<16,m=(t,n)=>(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])>>>0,p=(t,n)=>(t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24)>>>0,P=(t,n)=>t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24,x=(t,n,e)=>String.fromCharCode(...t.subarray(n,n+e));function d(t,n){if(!Number.isFinite(t)||!Number.isFinite(n))return null;let e=Math.round(t),r=Math.round(n);return e<1||r<1||e>1e6||r>1e6?null:{width:e,height:r}}var v=t=>({width:t.height,height:t.width});async function z(t){let n=await t.at(0,24);return n.length<24||n[0]!==137||x(n,1,3)!=="PNG"||x(n,12,4)!=="IHDR"?null:d(m(n,16),m(n,20))}var L=new Set([192,193,194,195,197,198,199,201,202,203,205,206,207]);function O(t){if(t.length<8)return null;let n=t[0]===73&&t[1]===73,e=t[0]===77&&t[1]===77;if(!n&&!e)return null;let r=i=>n?b(t,i):A(t,i),u=i=>n?p(t,i):m(t,i);if(r(2)!==42)return null;let a=u(4);if(a+2>t.length)return null;let c=r(a);for(let i=0;i<c;i++){let s=a+2+i*12;if(s+12>t.length)break;if(r(s)===274)return r(s+8)}return null}async function _(t,n){let e=await t.at(0,2);if(e.length<2||e[0]!==255||e[1]!==216)return null;let r=1,u=null,a=2;for(;a+4<=n;){let c=await t.at(a,4);if(c.length<4)break;if(c[0]!==255){a++;continue}let i=c[1];if(i===255){a++;continue}if(i===1||i>=208&&i<=217){a+=2;continue}if(i===218)break;let s=A(c,2);if(s<2)break;if(L.has(i)){let o=await t.at(a+4,5);o.length>=5&&(u=d(A(o,3),A(o,1)));break}if(i===225){let o=await t.at(a+4,Math.min(s-2,65536));o.length>6&&x(o,0,4)==="Exif"&&(r=O(o.subarray(6))??1)}a+=2+s}return u?r>=5&&r<=8?v(u):u:null}async function E(t){let n=await t.at(0,10);return n.length<10||x(n,0,3)!=="GIF"?null:d(b(n,6),b(n,8))}async function j(t){let n=await t.at(0,26);return n.length<22||x(n,0,2)!=="BM"?null:p(n,14)===12?d(b(n,18),b(n,20)):n.length<26?null:d(P(n,18),Math.abs(P(n,22)))}async function C(t){let n=await t.at(0,30);if(n.length<16||x(n,0,4)!=="RIFF"||x(n,8,4)!=="WEBP")return null;let e=x(n,12,4);if(e==="VP8X")return n.length<30?null:d(W(n,24)+1,W(n,27)+1);if(e==="VP8 ")return n.length<30||n[23]!==157||n[24]!==1||n[25]!==42?null:d(b(n,26)&16383,b(n,28)&16383);if(e==="VP8L"){if(n.length<25||n[20]!==47)return null;let r=p(n,21);return d((r&16383)+1,(r>>>14&16383)+1)}return null}async function S(t,n){let e=[],r=0;async function u(i,s,o){let f=i;for(;f+8<=s&&o<8;){let g=await t.at(f,16);if(g.length<8)return;let l=m(g,0),h=x(g,4,4),y=8;if(l===1){if(g.length<16)return;l=m(g,8)*2**32+m(g,12),y=16}else l===0&&(l=s-f);if(l<y||f+l>s)return;if(h==="meta")await u(f+y+4,f+l,o+1);else if(h==="iprp"||h==="ipco")await u(f+y,f+l,o+1);else if(h==="ispe"){let w=await t.at(f+y+4,8);if(w.length===8){let R=d(m(w,0),m(w,4));R&&e.push(R)}}else if(h==="irot"){let w=await t.at(f+y,1);w.length===1&&(r=w[0]&3)}f+=l}}let a=await t.at(0,12);if(a.length<12||x(a,4,4)!=="ftyp"||(await u(0,n,0),e.length===0))return null;let c=e.reduce((i,s)=>i.width*i.height>=s.width*s.height?i:s);return r===1||r===3?v(c):c}async function I(t){let n=await t.at(0,22);return n.length<22||x(n,0,4)!=="8BPS"?null:d(m(n,18),m(n,14))}var T=new Set([0,1,2,3,9,10,11]);async function X(t){let n=await t.at(0,18);if(n.length<18||n[1]>1||!T.has(n[2]))return null;let e=n[16];return[8,15,16,24,32].includes(e)?d(b(n,12),b(n,14)):null}async function M(t){let n=await t.at(0,8);if(n.length<8)return null;let e=n[0]===73&&n[1]===73,r=n[0]===77&&n[1]===77;if(!e&&!r)return null;let u=(l,h)=>e?b(l,h):A(l,h),a=(l,h)=>e?p(l,h):m(l,h);if(u(n,2)!==42)return null;let c=a(n,4),i=await t.at(c,2);if(i.length<2)return null;let s=u(i,0);if(s<1||s>4096)return null;let o=await t.at(c+2,s*12),f=0,g=0;for(let l=0;l<s;l++){let h=l*12;if(h+12>o.length)break;let y=u(o,h),R=u(o,h+2)===3?u(o,h+8):a(o,h+8);y===256?f=R:y===257&&(g=R)}return d(f,g)}async function D(t,n){let e=await t.at(0,8);if(e.length<8||e[0]!==118||e[1]!==47||e[2]!==49||e[3]!==1)return null;let r=8,u=Math.min(n,1<<20);for(;r<u;){let a=await t.at(r,512);if(a.length===0)return null;let c=a.indexOf(0);if(c<=0)return null;let i=x(a,0,c),s=a.subarray(c+1).indexOf(0);if(s<0)return null;let o=c+1+s+1;if(o+4>a.length)return null;let f=p(a,o),g=r+o+4;if(i==="dataWindow"){if(f<16)return null;let l=await t.at(g,16);return l.length<16?null:d(P(l,8)-P(l,0)+1,P(l,12)-P(l,4)+1)}r=g+f}return null}async function G(t){let n=await t.at(0,4);if(n.length<4)return null;let e=x(n,0,4),r=e==="SDPX";if(!r&&e!=="XPDS")return null;let u=await t.at(772,8);return u.length<8?null:d(r?m(u,0):p(u,0),r?m(u,4):p(u,4))}var H={png:z,jpg:_,jpeg:_,gif:E,bmp:j,webp:C,avif:S,heic:S,heif:S,psd:I,tga:X,tif:M,tiff:M,exr:D,dpx:G};async function J(t,n){let e=H[(t??"").toLowerCase()];if(!e)return null;try{return await e(new U(n),n.size)}catch{return null}}export{B as a,k as b,N as c,Y as d,q as e,J as f};
@@ -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 u(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:u(e)}var d={mov:()=>import("./isobmff-7G55HKDG.js").then(e=>e.isobmffFormat),crm:()=>import("./isobmff-7G55HKDG.js").then(e=>e.isobmffFormat),braw:()=>import("./isobmff-7G55HKDG.js").then(e=>e.isobmffFormat),wav:()=>import("./wav-KNJZMOGX.js").then(e=>e.wavFormat),mxf:()=>import("./mxf-YH2A2XLW.js").then(e=>e.mxfFormat),r3d:()=>import("./r3d-T6D3M2XJ.js").then(e=>e.r3dFormat),still:()=>import("./still-UFLOAEM4.js").then(e=>e.stillFormat),avc1:()=>import("./h264-ZB5DJSNV.js").then(e=>e.h264Format),avc3:()=>import("./h264-ZB5DJSNV.js").then(e=>e.h264Format),h264:()=>import("./h264-ZB5DJSNV.js").then(e=>e.h264Format),hvc1:()=>import("./h264-ZB5DJSNV.js").then(e=>e.h264Format),hev1:()=>import("./h264-ZB5DJSNV.js").then(e=>e.h264Format),hevc:()=>import("./h264-ZB5DJSNV.js").then(e=>e.h264Format),h264_mxf:()=>import("./h264-mxf-NVBLGU3V.js").then(e=>e.h264MxfFormat)};async function c(e){let t=d[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,u as d,i as e,l as f,c as g,f as h,b as i};
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 u(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:u(e)}var d={mov:()=>import("./isobmff-HSF7B3Y7.js").then(e=>e.isobmffFormat),crm:()=>import("./isobmff-HSF7B3Y7.js").then(e=>e.isobmffFormat),braw:()=>import("./isobmff-HSF7B3Y7.js").then(e=>e.isobmffFormat),wav:()=>import("./wav-PMVKVYNP.js").then(e=>e.wavFormat),mxf:()=>import("./mxf-IQBPP3JA.js").then(e=>e.mxfFormat),r3d:()=>import("./r3d-QLV4J6YF.js").then(e=>e.r3dFormat),still:()=>import("./still-LORP3E5C.js").then(e=>e.stillFormat),avc1:()=>import("./h264-2LU2X635.js").then(e=>e.h264Format),avc3:()=>import("./h264-2LU2X635.js").then(e=>e.h264Format),h264:()=>import("./h264-2LU2X635.js").then(e=>e.h264Format),hvc1:()=>import("./h264-2LU2X635.js").then(e=>e.h264Format),hev1:()=>import("./h264-2LU2X635.js").then(e=>e.h264Format),hevc:()=>import("./h264-2LU2X635.js").then(e=>e.h264Format),h264_mxf:()=>import("./h264-mxf-5HJUSZLL.js").then(e=>e.h264MxfFormat)};async function c(e){let t=d[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,u as d,i as e,l as f,c as g,f as h,b 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 n=[{codec:"prores",label:"Apple ProRes",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"preview tier is DC-only 1/8 COLOR (2026-08-05 \u2014 was gray luma; Y+Cb+Cr DC walks, no AC/IDCT) \u2014 the realtime tier for BOTH playback and scrub: full 4K XQ decode is ~170ms/frame + a 35MB RGBA hand-off, which can hold neither 24fps nor a smooth scrub; the parked frame upgrades to full via the standard 160ms park timer (scrubPreview flipped true 2026-08-05 with the colour preview \u2014 the old 'full decode is scrub-fast' held for 2K 422, not 4K XQ). Both wrappers: .mov (sample table) and MXF OP1a (RDD 44, 2026-07-28 \u2014 is_prores_mxf routes the identical icpf bitstream through the walker via decode_prores_mxf; Suite ap4h fixture gated byte-exact vs ffmpeg 10-bit, rust tests/prores_mxf_gate.rs)"},{codec:"prores_raw",label:"Apple ProRes RAW",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"preview tier is a TRUE DC-only Bayer decode (2026-08-11 \u2014 was full entropy decode + subsample in develop): the DC-DPCM segment is a strict prefix of each tile component's bitstream, so the preview reads just those prefixes (no AC walk, no IDCT \u2014 real work reduction on single-threaded wasm), lands the exact closed-form flat value the full IDCT produces, and runs the SAME ACEScct develop on the 1/8 RGGB grid; Bayer-domain corr vs full block means 1.00000, developed-RGBA gate in tier_parity (aprh \u22650.99; aprn 0.93 floor \u2014 Jensen gap of the strongly-curved Panasonic linearisation, not a decode gap), ~50x native / ~70x serial-wasm-estimate vs Full. Bayer decode byte-exact vs ffmpeg 8.0; develop RE'd against Apple's own VideoToolbox decode \u2192 scene-linear Rec.2020 (decode_prores_raw_rec2020) / ACEScct. matrix=header cam\u2192XYZ; PER-SENSOR linearisation keyed on header fingerprint (Sony a7S III / Panasonic RE'd, joint fallback) fixes milky-black shadow toe \u2192 full-frame display vs Apple 13\u21923 codes (aprh) / 6\u21924 (aprn), oracle-gate 0.64%. Demosaic still bilinear (Apple adaptive; RE'd in oracle/media/prores_raw, deferred). Viewer tiers render ACEScct log (2026-07-26 \u2014 no baked Rec.709/sRGB; PRR has no vendor log curve, ACEScct is the transcode-grade log form)"},{codec:"h264",label:"H.264 / AVC",full:!0,preview:!0,luma:!1,scrubPreview:!0,backend:"webcodecs",notes:"scrub = nearest-keyframe snap (1 decode); exact frame on park"},{codec:"hevc",label:"HEVC / H.265",full:!0,preview:!0,luma:!1,scrubPreview:!0,backend:"webcodecs",notes:"scrub = nearest-keyframe snap (1 decode); exact frame on park"},{codec:"xavc",label:"Sony XAVC-Intra",full:!0,preview:!1,luma:!1,scrubPreview:!1,backend:"webcodecs",notes:"all-intra; already scrub-fast"},{codec:"h264_mxf",label:"H.264 long-GOP (MXF)",full:!0,preview:!0,luma:!1,scrubPreview:!0,backend:"webcodecs",notes:"Camera proxies (Sony CTAPA and kin): H.264 High long-GOP in MXF OP1a. SEPARATE from 'xavc' because XAVC-Intra is all-intra and this is not \u2014 measured on a 1224-frame CTAPA proxy: IBBP, I every 12, but a true RAP (index flag 0x80) only every 48; the intervening I-frames are open-GOP (flag 0x40) and are NOT legal entry points. Decoded by LongGopPlayer: walk the GOP from its RAP, first AU 'key' and the rest 'delta', outputs taken in EMISSION order (WebCodecs owns the B-frame reorder, so the index's temporal_offset is never interpreted). Whole GOP is cached, so any scrub inside those 2s is free. Until 2026-08-10 these files were misidentified as xavc and decoded one isolated AU at a time (submit + flush), so every P/B frame hit a decoder with no reference state, only the leading IDR ever decoded, and the viewer showed frame 0 forever. Gated by oracle/i2o/e2e/mxf-longgop-playback.spec.ts against ffmpeg"},{codec:"r3d",label:"RED R3D",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"Full + preview render NATIVE RWG/Log3G10 (2026-07-26 \u2014 IPP2 output LUT removed from decoders; display transforms are downstream)"},{codec:"arriraw",label:"ARRIRAW",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"EVERY STAGE BYTE-EXACT vs the ARRI SDK (2026-07-27): prep, the ADA-7 demosaic (0 of 15,690,240), the LuMaTaLu colour kernel (0 of 31,457,280 \u2014 closed by transcribing the SDK's own f32 op order: the LUT index is fmul-then-fadd not a fused mul_add, the B-spline weights are evaluated expanded with the sixth applied last, and the bicubic accumulates columns before rows), the 1:1 resample (identity) and AfaScaler+BufferScaler (0 of 43,739,136). The shipped master still omits AfaScaler's Rec.709 YCbCr detail and its Jenkins-hash grain \u2014 added looks, not native signal \u2014 so the end-to-end floor gate vs the SDK's DEFAULT output reads 0.16/255; colour is no part of that number. exact AWG4/LogC4 develop (2026-07-21, vs ARRI SDK); preview is colour via the same per-clip develop plan (tier gate corr \u22650.997). Pre-A35 12-bit ALEV-III (Mini/Mini LF) fully wired 2026-07-26: Gen2 develop to native AWG3/LogC3, SDK-gated MAE<0.8/255, probe inner_codec 'arriraw-alev3' \u2192 decode_arriraw12_mxf; other ALEV3 bodies decode flagged calib:parametric-alev3-family-unvalidated"},{codec:"dnxhr",label:"Avid DNxHR / DNxHD",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"DC-only 1/8 preview tier is COLOR (2026-08-05 \u2014 was gray luma) \u2014 playback + scrub ride it (4K/UHD DNxHR full decodes aren't scrub-fast); park upgrades to full"},{codec:"crm",label:"Canon Cinema RAW Light",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"preview LL tier develops through the SAME tone-exact Canon Log 2 path as Full (2026-07-26 \u2014 replaced the placeholder tone map that drifted -46/255)"},{codec:"braw",label:"Blackmagic RAW",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"per-clip WB develop (bmdf wkel/wtin \u2192 wb_grid tables; Pocket-6K-family sweep-validated); preview is COLOUR-accurate native Gen5 log (gate corr \u22650.996 vs downsampled full). ENTROPY-PROFILE GATED PER FRAME (rust braw::PROFILES): the frame-header ladder selects one of four separately-compiled SDK decoder families AND its dequant table, and it is per-frame rate-control output \u2014 NOT a per-clip constant (the old 'compression base' model was wrong; two encodes off the same PYXIS body carry different ladders). A frame whose exact ladder we have not captured tables for is refused with calib:unsupported-entropy-profile rather than decoded on a neighbouring quantiser. Captured profiles: (0,0,0,1) C013/C060 8\xD78 byte-exact; and the 12\xD712 family (SHIPPED 2026-07-26) \u2014 (1,2,3,4) URSA 12K, plus BOTH PYXIS encodes (0,1,2,4) and (0,0,1,2), which are the same camera at the same raster with quantisers half a step apart. That family is 12\xD712 luma / 12\xD76 chroma, 2 luma + Cb + Cr per unit off one threaded bit-reader; all four walks (full, multithreaded, DC preview, colour preview) are parametric over it. GRAIN + EDGE FILTER MODELLED 2026-07-26 \u2014 the decode is now essentially the SDK's literal output: the synthesized high-frequency PRNG grain is reproduced (scatter map verified 0 mismatches over 76,896 observations across two clips), its per-frame seed turns out to be carried IN the bitstream (16 BE bytes before the first tile) and re-seeded per tile as s1 ^= broadcast16(region<<5|vtile), and the post-IDCT block-edge filter (A*b + B*(a+c) >> 4) is applied. The filter's per-block STRENGTH byte is solved too (2026-07-26): it is transmitted, not derived - each unit ends with a [ctx+0x68]-bit field on its own reader (the skip the walk used to call 'hf_bias' and discard), packing four 2-bit weight selectors per block (bits 7:6/5:4 = the horizontal cut's two 6-px column spans, 3:2/1:0 = the vertical cut's two 6-px row spans); and the four weights are master[ladder[k]] with master[i] = (16-2i, i), so the header ladder IS the deblock strength ramp and no future profile needs a capture for it. BRAW IS BYTE-EXACT (2026-07-26). Frame-gated vs the SDK's own decoded.bin, through BOTH the oracle bitstream and the real .braw container path: all four captures \u2014 C060 (8x8), URSA 12K, and both PYXIS encodes \u2014 now differ from the SDK in ZERO samples, luma and chroma alike, across 208,099,712 luma samples; the gates assert max == 0 rather than a mean bound, because a tolerance cannot tell 'clean' from 'one wrong block in 400,000'. The last drift (11,248 URSA pixels off by one, ~0.014%) was never a modelling gap: the SDK computes an Arai-Agui-Nakajima SCALED DCT \u2014 coefficients premultiplied by s[u]*s[v] = c(k)/(2*cos(k*pi/2N)), then a unit-scale radix-3 x radix-4 butterfly \u2014 so a dense basis multiply is the same function through a DIFFERENT operation graph and rounds differently in f32, which is why f32, f32+FMA and f64 all missed. Both transforms (luma 12x12 @0x6e9c8, chroma 12x6 @0x6fc68) are now the SDK's literal dataflow, machine-transcribed by oracle/media/braw/t12_transcribe.py \u2014 a symbolic byte-slot emulator of the unrolled NEON \u2014 into the generated rust/media-core/src/codecs/braw_t12_idct.rs. The 8x8 family gains the same seed fix (whole-frame grain, no captured constant) AND the same edge filter: it was never a different algorithm, only a different compiled copy (@0x6b6a4) whose ladder (0,0,0,1) resolves to three identities plus one weak tap - C060 Y 1.76 -> 0.003. Also solved by censusing where the residual sat: the SDK runs horizontal before vertical; a vertical cut is governed by the block to its LEFT; the frame's final vertical cut is not filtered (the SDK handles cuts in pairs and drops the pair whose second cut leaves the frame); and the 8x8 byte is a nibble per block (7:6 h / 5:4 v for block 0, 3:2 h / 1:0 v for block 1). Both PYXIS profiles now carry captured grain quantisers (the PARIS original's were read once its volume was remounted). Also gated: the multithreaded walk is byte-identical to single-threaded, and both preview tiers are exact block means of the full decode (corr 1.0000). Still refused: Pocket 6K C040 (2,3,4,4) = a fourth algorithm. See oracle/media/braw/ENTROPY_PROFILE_RE.md"},{codec:"xocn",label:"Sony X-OCN",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"Full + preview render NATIVE S-Gamut3/S-Log3 (2026-07-26 \u2014 replaced the adaptive display transform); preview = LL-band-only decode (~1/8 per axis, ~90x faster), colour-consistent with Full by construction. Fitted sensors: Burano LT/8K (SBRg), Venice ST (SBRe), VENICE 2 8.6K (SBRf, 2026-07-26 \u2014 decodes via the same parametric geometry, own C0_VENICE2 matrix R\xB2\u22650.9994). X-OCN IS BYTE-EXACT ACROSS MODES (2026-07-27): LT 6K, Venice ST and Burano 8K all decode to ZERO differing samples vs libSonyRawDev's own decoder output \u2014 86,293,760 samples over the three, gated in tests/xocn_variant_gate.rs against hashes of the SDK's planes. Venice ST and 8K previously lost their top and bottom rows (28 and 12 rows; the interiors were already exact) because the band row ranges were formulas in the LL strip count n, read off the LT capture (y0=10, y1=8n-2 and friends) \u2014 those hold only when 8n == h + 12, which is an LT coincidence. The real rule (xocn::phase_chain): the standalone band carries the frame's h rows CENTRED in its 8n coded rows, and every coarser level is the even subset of the level below, so lo = a[k] and y14 = a[k] + n[k] fall out per level and reproduce LT's captured constants exactly. Settled by MEASURING the bitstream \u2014 strips are byte-aligned, so the row count of a strip is the count whose decode consumes its byte size (harness xocnstrip) \u2014 not by sweeping constants. The write-side dy row shift that used to paper over the phase is gone. SBRf/VENICE 2 decodes through the same path but is not yet re-gated byte-exact (fixture on PARIS)"}],o=new Map(n.map(r=>[r.codec,r]));function a(r){let e=(r??"").toLowerCase().trim();return e?e==="aprn"||e==="aprh"?"prores_raw":e==="prores_mxf"||e.startsWith("ap")?"prores":e==="arriraw-alev3"?"arriraw":e==="avc1"||e==="avc3"||e==="h264"?"h264":e.startsWith("hvc")||e.startsWith("hev")||e==="h265"?"hevc":e.startsWith("avd")||e==="dnxh"||e==="dnxhd"?"dnxhr":e==="redcode"?"r3d":o.has(e)?e:null:null}function s(r){let e=(r??"").toLowerCase().trim();if(!e)return null;if(e==="aprn"||e==="aprh"||a(e)==="prores_raw"||e==="ap4h"||e==="ap4x")return 12;if(e.startsWith("ap"))return 10;let t=a(e);return t==="r3d"?16:t==="arriraw"||t==="braw"?12:t==="xocn"?16:t==="crm"?12:/dnxhr.?(hqx|444)/.test(e)?10:null}function i(r,e){if(typeof e!="number")return null;let t=a(r);return t==="h264"?[66,77,88,100].includes(e)?8:e===110?10:null:t==="hevc"?e===1?8:e===2?10:null:null}export{a,s as b,i as c};
3
+ var n=[{codec:"prores",label:"Apple ProRes",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"preview tier is DC-only 1/8 COLOR (2026-08-05 \u2014 was gray luma; Y+Cb+Cr DC walks, no AC/IDCT) \u2014 the realtime tier for BOTH playback and scrub: full 4K XQ decode is ~170ms/frame + a 35MB RGBA hand-off, which can hold neither 24fps nor a smooth scrub; the parked frame upgrades to full via the standard 160ms park timer (scrubPreview flipped true 2026-08-05 with the colour preview \u2014 the old 'full decode is scrub-fast' held for 2K 422, not 4K XQ). Both wrappers: .mov (sample table) and MXF OP1a (RDD 44, 2026-07-28 \u2014 is_prores_mxf routes the identical icpf bitstream through the walker via decode_prores_mxf; Suite ap4h fixture gated byte-exact vs ffmpeg 10-bit, rust tests/prores_mxf_gate.rs)"},{codec:"prores_raw",label:"Apple ProRes RAW",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"preview tier is a TRUE DC-only Bayer decode (2026-08-11 \u2014 was full entropy decode + subsample in develop): the DC-DPCM segment is a strict prefix of each tile component's bitstream, so the preview reads just those prefixes (no AC walk, no IDCT \u2014 real work reduction on single-threaded wasm), lands the exact closed-form flat value the full IDCT produces, and runs the SAME ACEScct develop on the 1/8 RGGB grid; Bayer-domain corr vs full block means 1.00000, developed-RGBA gate in tier_parity (aprh \u22650.99; aprn 0.93 floor \u2014 Jensen gap of the strongly-curved Panasonic linearisation, not a decode gap), ~50x native / ~70x serial-wasm-estimate vs Full. Bayer decode byte-exact vs ffmpeg 8.0; develop RE'd against Apple's own VideoToolbox decode \u2192 scene-linear Rec.2020 (decode_prores_raw_rec2020) / ACEScct. matrix=header cam\u2192XYZ; PER-SENSOR linearisation keyed on header fingerprint (Sony a7S III / Panasonic RE'd, joint fallback) fixes milky-black shadow toe \u2192 full-frame display vs Apple 13\u21923 codes (aprh) / 6\u21924 (aprn), oracle-gate 0.64%. Demosaic still bilinear (Apple adaptive; RE'd in oracle/media/prores_raw, deferred). Viewer tiers render ACEScct log (2026-07-26 \u2014 no baked Rec.709/sRGB; PRR has no vendor log curve, ACEScct is the transcode-grade log form)"},{codec:"h264",label:"H.264 / AVC",full:!0,preview:!0,luma:!1,scrubPreview:!0,backend:"webcodecs",notes:"scrub = nearest-keyframe snap (1 decode); exact frame on park"},{codec:"hevc",label:"HEVC / H.265",full:!0,preview:!0,luma:!1,scrubPreview:!0,backend:"webcodecs",notes:"scrub = nearest-keyframe snap (1 decode); exact frame on park"},{codec:"xavc",label:"Sony XAVC-Intra",full:!0,preview:!1,luma:!1,scrubPreview:!1,backend:"webcodecs",notes:"all-intra; already scrub-fast"},{codec:"h264_mxf",label:"H.264 long-GOP (MXF)",full:!0,preview:!0,luma:!1,scrubPreview:!0,backend:"webcodecs",notes:"Camera proxies (Sony CTAPA and kin): H.264 High long-GOP in MXF OP1a. SEPARATE from 'xavc' because XAVC-Intra is all-intra and this is not \u2014 measured on a 1224-frame CTAPA proxy: IBBP, I every 12, but a true RAP (index flag 0x80) only every 48; the intervening I-frames are open-GOP (flag 0x40) and are NOT legal entry points. Decoded by LongGopPlayer: walk the GOP from its RAP, first AU 'key' and the rest 'delta', outputs taken in EMISSION order (WebCodecs owns the B-frame reorder, so the index's temporal_offset is never interpreted). Whole GOP is cached, so any scrub inside those 2s is free. Until 2026-08-10 these files were misidentified as xavc and decoded one isolated AU at a time (submit + flush), so every P/B frame hit a decoder with no reference state, only the leading IDR ever decoded, and the viewer showed frame 0 forever. Gated by oracle/i2o/e2e/mxf-longgop-playback.spec.ts against ffmpeg"},{codec:"r3d",label:"RED R3D",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"Full + preview render NATIVE RWG/Log3G10 (2026-07-26 \u2014 IPP2 output LUT removed from decoders; display transforms are downstream)"},{codec:"arriraw",label:"ARRIRAW",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"EVERY STAGE BYTE-EXACT vs the ARRI SDK (2026-07-27): prep, the ADA-7 demosaic (0 of 15,690,240), the LuMaTaLu colour kernel (0 of 31,457,280 \u2014 closed by transcribing the SDK's own f32 op order: the LUT index is fmul-then-fadd not a fused mul_add, the B-spline weights are evaluated expanded with the sixth applied last, and the bicubic accumulates columns before rows), the 1:1 resample (identity) and AfaScaler+BufferScaler (0 of 43,739,136). The shipped master still omits AfaScaler's Rec.709 YCbCr detail and its Jenkins-hash grain \u2014 added looks, not native signal \u2014 so the end-to-end floor gate vs the SDK's DEFAULT output reads 0.16/255; colour is no part of that number. exact AWG4/LogC4 develop (2026-07-21, vs ARRI SDK); preview is colour via the same per-clip develop plan (tier gate corr \u22650.997). Pre-A35 12-bit ALEV-III (Mini/Mini LF) fully wired 2026-07-26: Gen2 develop to native AWG3/LogC3, SDK-gated MAE<0.8/255, probe inner_codec 'arriraw-alev3' \u2192 decode_arriraw12_mxf; other ALEV3 bodies decode flagged calib:parametric-alev3-family-unvalidated"},{codec:"dnxhr",label:"Avid DNxHR / DNxHD",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"DC-only 1/8 preview tier is COLOR (2026-08-05 \u2014 was gray luma) \u2014 playback + scrub ride it (4K/UHD DNxHR full decodes aren't scrub-fast); park upgrades to full"},{codec:"crm",label:"Canon Cinema RAW Light",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"preview LL tier develops through the SAME tone-exact Canon Log 2 path as Full (2026-07-26 \u2014 replaced the placeholder tone map that drifted -46/255)"},{codec:"braw",label:"Blackmagic RAW",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"per-clip WB develop (bmdf wkel/wtin \u2192 wb_grid tables; Pocket-6K-family sweep-validated); preview is COLOUR-accurate native Gen5 log (gate corr \u22650.996 vs downsampled full). ENTROPY-PROFILE GATED PER FRAME (rust braw::PROFILES): the frame-header ladder selects one of four separately-compiled SDK decoder families AND its dequant table, and it is per-frame rate-control output \u2014 NOT a per-clip constant (the old 'compression base' model was wrong; two encodes off the same PYXIS body carry different ladders). A frame whose exact ladder we have not captured tables for is refused with calib:unsupported-entropy-profile rather than decoded on a neighbouring quantiser. Captured profiles: (0,0,0,1) C013/C060 8\xD78 byte-exact; and the 12\xD712 family (SHIPPED 2026-07-26) \u2014 (1,2,3,4) URSA 12K, plus BOTH PYXIS encodes (0,1,2,4) and (0,0,1,2), which are the same camera at the same raster with quantisers half a step apart. That family is 12\xD712 luma / 12\xD76 chroma, 2 luma + Cb + Cr per unit off one threaded bit-reader; all four walks (full, multithreaded, DC preview, colour preview) are parametric over it. GRAIN + EDGE FILTER MODELLED 2026-07-26 \u2014 the decode is now essentially the SDK's literal output: the synthesized high-frequency PRNG grain is reproduced (scatter map verified 0 mismatches over 76,896 observations across two clips), its per-frame seed turns out to be carried IN the bitstream (16 BE bytes before the first tile) and re-seeded per tile as s1 ^= broadcast16(region<<5|vtile), and the post-IDCT block-edge filter (A*b + B*(a+c) >> 4) is applied. The filter's per-block STRENGTH byte is solved too (2026-07-26): it is transmitted, not derived - each unit ends with a [ctx+0x68]-bit field on its own reader (the skip the walk used to call 'hf_bias' and discard), packing four 2-bit weight selectors per block (bits 7:6/5:4 = the horizontal cut's two 6-px column spans, 3:2/1:0 = the vertical cut's two 6-px row spans); and the four weights are master[ladder[k]] with master[i] = (16-2i, i), so the header ladder IS the deblock strength ramp and no future profile needs a capture for it. BRAW IS BYTE-EXACT (2026-07-26). Frame-gated vs the SDK's own decoded.bin, through BOTH the oracle bitstream and the real .braw container path: all four captures \u2014 C060 (8x8), URSA 12K, and both PYXIS encodes \u2014 now differ from the SDK in ZERO samples, luma and chroma alike, across 208,099,712 luma samples; the gates assert max == 0 rather than a mean bound, because a tolerance cannot tell 'clean' from 'one wrong block in 400,000'. The last drift (11,248 URSA pixels off by one, ~0.014%) was never a modelling gap: the SDK computes an Arai-Agui-Nakajima SCALED DCT \u2014 coefficients premultiplied by s[u]*s[v] = c(k)/(2*cos(k*pi/2N)), then a unit-scale radix-3 x radix-4 butterfly \u2014 so a dense basis multiply is the same function through a DIFFERENT operation graph and rounds differently in f32, which is why f32, f32+FMA and f64 all missed. Both transforms (luma 12x12 @0x6e9c8, chroma 12x6 @0x6fc68) are now the SDK's literal dataflow, machine-transcribed by oracle/media/braw/t12_transcribe.py \u2014 a symbolic byte-slot emulator of the unrolled NEON \u2014 into the generated rust/media-core/src/codecs/braw_t12_idct.rs. The 8x8 family gains the same seed fix (whole-frame grain, no captured constant) AND the same edge filter: it was never a different algorithm, only a different compiled copy (@0x6b6a4) whose ladder (0,0,0,1) resolves to three identities plus one weak tap - C060 Y 1.76 -> 0.003. Also solved by censusing where the residual sat: the SDK runs horizontal before vertical; a vertical cut is governed by the block to its LEFT; the frame's final vertical cut is not filtered (the SDK handles cuts in pairs and drops the pair whose second cut leaves the frame); and the 8x8 byte is a nibble per block (7:6 h / 5:4 v for block 0, 3:2 h / 1:0 v for block 1). Both PYXIS profiles now carry captured grain quantisers (the PARIS original's were read once its volume was remounted). Also gated: the multithreaded walk is byte-identical to single-threaded, and both preview tiers are exact block means of the full decode (corr 1.0000). Still refused: Pocket 6K C040 (2,3,4,4) = a fourth algorithm. See oracle/media/braw/ENTROPY_PROFILE_RE.md"},{codec:"xocn",label:"Sony X-OCN",full:!0,preview:!0,luma:!0,scrubPreview:!0,backend:"wasm",notes:"Full + preview render NATIVE S-Gamut3/S-Log3 (2026-07-26 \u2014 replaced the adaptive display transform); preview = LL-band-only decode (~1/8 per axis, ~90x faster), colour-consistent with Full by construction. Fitted sensors: Burano LT/8K (SBRg), Venice ST (SBRe), VENICE 2 8.6K (SBRf, 2026-07-26 \u2014 decodes via the same parametric geometry, own C0_VENICE2 matrix R\xB2\u22650.9994). X-OCN IS BYTE-EXACT ACROSS MODES (2026-07-27): LT 6K, Venice ST and Burano 8K all decode to ZERO differing samples vs libSonyRawDev's own decoder output \u2014 86,293,760 samples over the three, gated in tests/xocn_variant_gate.rs against hashes of the SDK's planes. Venice ST and 8K previously lost their top and bottom rows (28 and 12 rows; the interiors were already exact) because the band row ranges were formulas in the LL strip count n, read off the LT capture (y0=10, y1=8n-2 and friends) \u2014 those hold only when 8n == h + 12, which is an LT coincidence. The real rule (xocn::phase_chain): the standalone band carries the frame's h rows CENTRED in its 8n coded rows, and every coarser level is the even subset of the level below, so lo = a[k] and y14 = a[k] + n[k] fall out per level and reproduce LT's captured constants exactly. Settled by MEASURING the bitstream \u2014 strips are byte-aligned, so the row count of a strip is the count whose decode consumes its byte size (harness xocnstrip) \u2014 not by sweeping constants. The write-side dy row shift that used to paper over the phase is gone. SBRf/VENICE 2 decodes through the same path but is not yet re-gated byte-exact (fixture on PARIS)"}],o=new Map(n.map(t=>[t.codec,t]));function a(t){let e=(t??"").toLowerCase().trim();return e?e==="aprn"||e==="aprh"?"prores_raw":e==="prores_mxf"||e.startsWith("ap")?"prores":e==="arriraw-alev3"?"arriraw":e==="avc1"||e==="avc3"||e==="h264"?"h264":e.startsWith("hvc")||e.startsWith("hev")||e==="h265"?"hevc":e.startsWith("avd")||e==="dnxh"||e==="dnxhd"?"dnxhr":e==="redcode"?"r3d":o.has(e)?e:null:null}function s(t){let e=(t??"").toLowerCase().trim();if(!e)return null;if(e==="aprn"||e==="aprh"||a(e)==="prores_raw"||e==="ap4h"||e==="ap4x")return 12;if(e.startsWith("ap"))return 10;let r=a(e);return r==="r3d"?16:r==="arriraw"||r==="braw"?12:r==="xocn"?16:r==="crm"?12:/dnxhr.?(hqx|444)/.test(e)?10:null}function i(t,e){if(typeof e!="number")return null;let r=a(t);return r==="h264"?[66,77,88,100].includes(e)?8:e===110?10:null:r==="hevc"?e===1?8:e===2?10:null:null}function l(t){let e=(t??"").toLowerCase().trim();if(!e)return null;if(e==="ap4h"||e==="ap4x")return"4:4:4";let r=a(e);return r==="prores_raw"||r==="r3d"||r==="arriraw"||r==="braw"||r==="xocn"||r==="crm"?"bayer":r==="prores"?"4:2:2":/dnxhr.?444/.test(e)?"4:4:4":/dnxhr.?(hqx|hq|sq|lb)/.test(e)?"4:2:2":null}function d(t){let e=t.toLowerCase().replace(/[^0-9a-z]/g,"");return e==="bayer"||e==="raw"?"bayer":e.length>=3&&/^\d+$/.test(e)?e.split("").join(":"):e}export{a,s as b,i as c,l as d,d as e};
@@ -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 as m,b as l}from"./chunk-DKGGJM6Z.js";import{Aa as u,Ca as n,V as c,p as s}from"./chunk-R6WJ6JIQ.js";async function y(r){await n();let e=c(r);return e==="null"?null:JSON.parse(e)}async function d(r){await n();let e;try{e=s(r)}catch{return null}if(e.length<8)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),a=t.getUint32(0,!0),i=t.getUint32(4,!0),o=a*i*4;return e.length<8+o?null:{width:a,height:i,rgba:new Uint8ClampedArray(e.subarray(8,8+o))}}async function h(r,e=8){await n();let t=l(u,"decode_exr_preview");if(!t)return d(r);try{return m(t(r,e))}catch{return null}}export{y as a,d as b,h as c};
3
+ import{a as m,b as l}from"./chunk-DKGGJM6Z.js";import{Aa as u,Ca as n,V as c,p as s}from"./chunk-JBSH4AK3.js";async function g(r){await n();let e=c(r);return e==="null"?null:JSON.parse(e)}async function d(r){await n();let e;try{e=s(r)}catch{return null}if(e.length<8)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),a=t.getUint32(0,!0),i=t.getUint32(4,!0),o=a*i*4;return e.length<8+o?null:{width:a,height:i,rgba:new Uint8ClampedArray(e.subarray(8,8+o))}}async function y(r,e=8){await n();let t=l(u,"decode_exr_preview");if(!t)return d(r);try{return m(t(r,e))}catch{return null}}export{g as a,d as b,y as c};
@@ -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 as c,b as m}from"./chunk-DKGGJM6Z.js";import{Aa as u,Ca as t,T as s,n as d}from"./chunk-R6WJ6JIQ.js";async function h(r){await t();let e=s(r);return e==="null"?null:JSON.parse(e)}async function g(r){await t();let e;try{e=d(r)}catch{return null}if(e.length<8)return null;let n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=n.getUint32(0,!0),a=n.getUint32(4,!0),o=i*a*4;return e.length<8+o?null:{width:i,height:a,rgba:new Uint8ClampedArray(e.subarray(8,8+o))}}async function y(r,e=8){await t();let n=m(u,"decode_dng_preview");if(!n)return g(r);try{return c(n(r,e))}catch{return null}}export{h as a,g as b,y as c};
3
+ import{a as c,b as m}from"./chunk-DKGGJM6Z.js";import{Aa as u,Ca as t,T as s,n as d}from"./chunk-JBSH4AK3.js";async function h(r){await t();let e=s(r);return e==="null"?null:JSON.parse(e)}async function g(r){await t();let e;try{e=d(r)}catch{return null}if(e.length<8)return null;let n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=n.getUint32(0,!0),a=n.getUint32(4,!0),o=i*a*4;return e.length<8+o?null:{width:i,height:a,rgba:new Uint8ClampedArray(e.subarray(8,8+o))}}async function y(r,e=8){await t();let n=m(u,"decode_dng_preview");if(!n)return g(r);try{return c(n(r,e))}catch{return null}}export{h as a,g as b,y as c};
@@ -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{readFile as y,writeFile as v,appendFile as F,stat as f,readdir as k,mkdir as U,open as h,copyFile as D,mkdtemp as O,rm as P,chmod as T,rename as R,cp as M,statfs as S}from"node:fs/promises";import{execFile as W,spawn as A}from"node:child_process";import{createHash as $}from"node:crypto";import{createReadStream as E}from"node:fs";import{homedir as B,tmpdir as H,platform as N,release as C,arch as z,totalmem as L,availableParallelism as I}from"node:os";import{fileURLToPath as b}from"node:url";import _ from"node:http";import m from"node:process";import{Buffer as x}from"node:buffer";import{join as w,resolve as j}from"node:path";import{basename as ze,dirname as Le,extname as Ie,join as _e,relative as je,resolve as Ge}from"node:path";{let e=globalThis.fetch,t=typeof globalThis.Deno<"u";e&&!t&&(globalThis.fetch=(async(n,o)=>{let r=typeof n=="string"?n:n instanceof URL?n.href:n.url;if(r.startsWith("file:")){let i=await y(b(r)),s=r.endsWith(".wasm")?"application/wasm":"application/octet-stream";return new Response(i,{status:200,headers:{"content-type":s}})}return e(n,o)}))}var p=e=>m.env[e],re=()=>Number(p("CONFORM_MEMORY_GB")??0)*2**30||L(),ne=()=>I(),oe=()=>m.argv.slice(2),se=e=>m.exit(e),ie=()=>m.platform,ae=()=>m.arch;function ce(){let e=m.versions.deno;return{platform:`${N()} ${C()} ${z()}`,runtime:e?`deno ${e}`:`node ${m.version}`}}var le=()=>p("CONFORM_MCP_HOME")??w(g(),".conform-mcp"),g=()=>p("HOME")??B();function me(e){let t=e.trim();if(t.length>=2&&(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))&&(t=t.slice(1,-1)),/^file:\/\//i.test(t))try{t=b(t)}catch{}return t==="~"?t=g():(t.startsWith("~/")||t.startsWith("~\\"))&&(t=w(g(),t.slice(2))),t&&j(t)}var ue=e=>b(e);async function de(e){let t=await f(e);return{isFile:t.isFile(),isDirectory:t.isDirectory(),size:t.size,mtimeMs:t.mtimeMs}}async function fe(e){try{return await f(e),!0}catch{return!1}}async function pe(e){try{return(await f(e)).isFile()}catch{return!1}}async function ge(e){try{return(await f(e)).isDirectory()}catch{return!1}}async function ye(e){let t=await y(e);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}var he=e=>y(e,"utf8"),be=(e,t)=>v(e,t),we=(e,t,n)=>n?.append?F(e,t):v(e,t);async function xe(e){await U(e,{recursive:!0})}var ve=e=>P(e,{force:!0}),Pe=(e,t)=>T(e,t).catch(()=>{}),Re=(e,t)=>D(e,t),Ae=(e,t)=>R(e,t),Fe=e=>P(e,{recursive:!0,force:!0}),ke=(e,t)=>M(e,t,{recursive:!0,verbatimSymlinks:!0});async function Ue(e){try{let t=await S(e);return Number(t.bavail)*Number(t.bsize)}catch{return null}}var De=(e="conform-")=>O(w(H(),e));async function*Oe(e){for(let t of await k(e,{withFileTypes:!0}))yield{name:t.name,isFile:t.isFile(),isDirectory:t.isDirectory()}}async function Te(e){let t=await h(e,"r"),n=(await t.stat()).size;return{path:e,size:n,async readAt(o,r){let i=new Uint8Array(r),s=0;for(;s<r;){let{bytesRead:c}=await t.read(i,s,r-s,o+s);if(!c)break;s+=c}return s===r?i:i.subarray(0,s)},close:()=>t.close()}}async function Me(e){let t=await h(e,"w");return{async writeAt(n,o){let r=0;for(;r<o.length;){let{bytesWritten:i}=await t.write(o,r,o.length-r,n+r);r+=i}},truncate:n=>t.truncate(n),close:()=>t.close()}}function G(e,t,n={}){return new Promise(o=>{W(e,t,{maxBuffer:1<<30,env:n.env?{...m.env,...n.env}:void 0,timeout:n.timeoutMs},(r,i,s)=>{let c=r?.code??0;o({success:!r,code:c,stdout:String(i),stderr:String(s)})})})}function Se(e,t,n,o={}){return new Promise((r,i)=>{let s=A(e,t,{env:o.env?{...m.env,...o.env}:void 0,stdio:["ignore","pipe","pipe"]}),c="";s.stdout.on("data",a=>n(a)),s.stderr.on("data",a=>{c+=new TextDecoder().decode(a)}),s.on("error",i),s.on("close",a=>r({code:a,stderr:c})),o.signal?.addEventListener("abort",()=>s.kill(),{once:!0})})}function We(e,t,n,o){let r=A(e,t,{stdio:["pipe","pipe","pipe"]});r.stdout.on("data",a=>n(a)),r.stderr.on("data",a=>o?.(new TextDecoder().decode(a)));let i=new Promise(a=>{r.on("close",l=>a(l)),r.on("error",()=>a(null))}),s=[r,r.stdout,r.stderr,r.stdin],c=a=>{for(let l of s)(a?l.ref:l.unref)?.call(l)};return c(!1),{write:a=>new Promise((l,u)=>{r.stdin.write(a,d=>d?u(d):l())}),hold:c,close:()=>{try{r.stdin.end(),r.kill()}catch{}},exited:i}}async function $e(e){if(p("CONFORM_NO_BROWSER"))return!1;let[t,n]=m.platform==="darwin"?["open",[e]]:m.platform==="win32"?["cmd",["/c","start","",e.replace(/&/g,"^&")]]:["xdg-open",[e]];return(await G(t,n)).success}function Ee(e,t){let n=_.createServer(async(o,r)=>{try{let i=[];if(o.method!=="GET"&&o.method!=="HEAD")for await(let u of o)i.push(u);let s=i.length>0,c=new Headers;for(let[u,d]of Object.entries(o.headers))d!=null&&c.set(u,Array.isArray(d)?d.join(", "):d);let a=`http://${o.headers.host??`${e.hostname}:${e.port}`}${o.url??"/"}`,l=await t(new Request(a,{method:o.method,headers:c,body:s?x.concat(i):void 0}));r.statusCode=l.status,l.headers.forEach((u,d)=>r.setHeader(d,u)),r.end(x.from(await l.arrayBuffer()))}catch(i){r.statusCode=500,r.end(JSON.stringify({ok:!1,code:"internal",message:i instanceof Error?i.message:String(i)}))}});return n.listen(e.port,e.hostname,()=>{let o=n.address();e.onListen?.(typeof o=="object"&&o?o.port:e.port)}),{close:()=>n.close()}}async function Be(e){let t=$("sha256");for await(let n of E(e))t.update(n);return t.digest("hex")}async function He(e,t,n){let o=`${t}.part`;for(let r=0;;r++){let i=0;try{i=(await f(o)).size}catch{}try{let s=await fetch(e,{headers:i?{Range:`bytes=${i}-`}:{}});if(s.status===416)break;if(!s.ok||!s.body)throw new Error(`${e} answered ${s.status}`);i&&s.status!==206&&(i=0);let c=i+Number(s.headers.get("content-length")??0),a=await h(o,i?"a":"w");try{let l=i;for await(let u of s.body)await a.write(u),l+=u.length,n?.(l,c)}finally{await a.close()}break}catch(s){if(r>=4)throw s;await new Promise(c=>setTimeout(c,2e3*(r+1)))}}await R(o,t)}export{b as a,p as b,re as c,ne as d,oe as e,se as f,ie as g,ae as h,ce as i,le as j,g as k,me as l,ue as m,de as n,fe as o,pe as p,ge as q,ye as r,he as s,be as t,we as u,xe as v,ve as w,Pe as x,Re as y,Ae as z,Fe as A,ke as B,Ue as C,De as D,Oe as E,Te as F,Me as G,G as H,Se as I,We as J,$e as K,Ee as L,Be as M,He as N,ze as O,Le as P,Ie as Q,_e as R,je as S,Ge as T};