Lines 1-14javascript
1import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2import{b,c as ge,d as ct,f as ve,g as he}from"./chunk-FYOCF7DY.js";import{a as at,e as N,f as J,g as dt,h as te,i as U,j as ut}from"./chunk-RGEAEAZB.js";import{a as oe}from"./chunk-BC7UVJJB.js";import{a as K,b as W,d as st}from"./chunk-NFOBDHZK.js";import{d as ft}from"./chunk-KHDUQ33H.js";import{a as T,b as S}from"./chunk-L5LI2JF4.js";import{a as O}from"./chunk-D5T4ARTB.js";import{b as ie}from"./chunk-AE6SS34N.js";import{a as pt}from"./chunk-GIRXJOJI.js";import{e as re,g as ne}from"./chunk-B2PZAB7J.js";import{d as R,e as H,f as lt}from"./chunk-IACKIGPX.js";import{a as ot}from"./chunk-KGP7NSXH. ...
3`),await se.rename(o,i)}async function er(e){try{let t=await vt(e);return t&&Array.isArray(t.executions)?t.executions:[]}catch{return[]}}async function tr(e,t,r=process.cwd()){let n=await ve(e,r);if(!n){let o=`evidence: no pack found for "${e}"`;return t.json?console.log(JSON.stringify({valid:!1,error:"not_found",target:e})):console.error(o),2}let i=await K(n,t.profile??"L1");return t.json?console.log(JSON.stringify({valid:i.valid,status:i.status,diagnostics:i.diagnostics})):console.log(`evidence: ${i.valid?"valid":"INVALID"} (${t.profile??"L1"}, status ${i.status})`),i.valid?0:1}function Te(e ...
4`;cr(wt(e,"diagnostics.ndjson"),o)}catch{}}import{promises as $}from"fs";import{join as G}from"path";async function ar(e){try{let t=G(e,"tests"),r=await $.readdir(t).catch(()=>[]);for(
5`)){let s=/^@import\s+(\S+)\s*$/.exec(a.trim());if(!s)continue;let u=Ft(s[1])?s[1]:Lt($t(i),s[1]);ze(u)&&U(Z(u,"utf8"))?.id&&n(u)}t.push({path:i})};return n(e),t}function At(e,t){let r=e.resolve(t),n=r?e.tipOf(r.cid):null;return!!(r&&n&&!e.superseded.has(n)&&e.nodeLabel.get(n)==="ac")}function Vr(e,t,r,n,i,o){let a=t.getNode(r);if(!a)return{oracleTier:!1,error:"tip unreadable"};let s=ut(n),u=String(a.content.test_md_blob??""),c=/^#\s+(.+?)\s*$/m.exec(s)?.[1]??String(a.content.title??""),d={...a.content,test_md_blob:s,definitionId:i,title:c},p=lt("test",d);if(p.length>0)return{oracleTier:!1,err ...
HighChild Process
Package source references child process execution.
dist/chunk-WGG5XURS.jsView on unpkg · L3 6`),n=!1;for(let i of r){if(/^##\s/.test(i)){n=/\bassert\b/i.test(i);let o=Br.exec(i);o&&t.push(`v:${o[1].trim()}`);continue}n&&
7`)}function Dt(e,t,r,n){try{let i=t.split(`
8`),o=-1;if(i[0]?.trim()==="---"){for(let u=1;u<i.length;u++)if(i[u].trim()==="---"){o=u;break}}if(o<0)return;let a=!1;for(let
9`)),Nr(s,e)}catch(i){n.push(`sync: pin refresh failed for ${e} (${i instanceof Error?i.message:String(i)}) \u2014 next run self-heals`)}}var Wr={passed:"passed",failed:"failed",broken:"blocked",skipped:"not-run"},jt=(e,t)=>{try
10`)),i=d=>(n(`error: ${d}`),2);if(t.env!=="prod"&&t.env!=="stage")return i(`invalid --env: ${String(t.env)} (expected prod or stage)`);if(t.port!==void 0&&(!Number.isInteger(t.port)||t.port<1||t.port>65535))return i("invalid --port: expected an integer 1-65535");let o;try{o=Q(t.env,t.viewerUrl),new URL(o)}catch{return i(`invalid --viewer-url: ${t.viewerUrl}`)}if(e.length===0)return i("no pack paths given");let a=new Map;for(let d of e){let p=ln(d),l;try{l=sn(p)}catch{return i(`${d}: not found`)}if(l.isDirectory())return i(`${d}: is a directory \u2014 packs must be sealed .evidence files (run th ...
11`)),u;try{u=await Ke({packs:a,allowedOrigins:[new URL(o).origin],port:t.port,log:s})}catch(d){return i(`could not bind 127.0.0.1${t.port?`:${t.port}`:""} \u2014 ${d.message}`)}n(`serving ${a.size} pack${a.size===1?"":"s"} on http://127.0.0.1:${u.port}`);for(let d of a.keys()){let p=u.urlFor(d);n(d),n(` pack ${p}`),n(` viewer ${We(p,o)}`)}return n("press Ctrl-C to stop"),await(r.hold??fn)(),await u.close(),0}function fn(){return new Promise(e=>{let t=process.listeners("SIGINT");process.removeAllListeners("SIGINT"),process.once("SIGINT",()=>{for(let r of t)process.on("SIGINT",r);e()})})}im ...
12`)),o=n.err??(l=>process.stderr.write(l+`
13`)),a=l=>(o(`evidence merge: ${l}`),2);if(!t.runId)return a("--run-id is required (merged identity is the caller's fact)");if(t.rules&&t.onCollision)return a("--rules and --on-collision are mutually exclusive");let s="error";if(t.onCollision!==void 0&&(s=Vt(t.onCollision),!s))return a(`invalid --on-collision: ${t.onCollision} (expected error | prefer-first | prefer-latest | discard)`);let u=[];for(let l of e){let v=await wn(l,r);if(!v)return a(`no pack found for "${l}"`);u.push(v)}let c=t.out?Ze(r,t.out):b(t.runId,r),d=null,p;t.rules?p=Ze(r,t.rules):(d=await de.mkdtemp(Ut(vn(),"kane-merge-rule ...
Long lines were clipped for display.