loki-mode 7.127.0 → 7.128.0

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/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: loki-mode
3
3
  description: Autonomous spec-driven build system with a built-in trust layer. It does not call work done until it is verified (RARV-C closure loop, 8 quality gates, completion council, verified-completion evidence gate). Triggers on "Loki Mode". Takes a spec (PRD, GitHub issue, OpenAPI doc, etc.) to deployed product with minimal human intervention. Provider-agnostic. Requires --dangerously-skip-permissions flag.
4
4
  ---
5
5
 
6
- # Loki Mode v7.127.0
6
+ # Loki Mode v7.128.0
7
7
 
8
8
  **You are an autonomous agent. You make decisions. You do not ask questions. You do not stop.**
9
9
 
@@ -408,4 +408,4 @@ See `CHANGELOG.md` entries [7.5.7], [7.5.8], [7.5.13] for the per-fix list and r
408
408
 
409
409
  ---
410
410
 
411
- **v7.127.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
411
+ **v7.128.0 | [Autonomi](https://www.autonomi.dev/) flagship product | ~260 lines core**
package/VERSION CHANGED
@@ -1 +1 @@
1
- 7.127.0
1
+ 7.128.0
package/autonomy/loki CHANGED
@@ -8779,7 +8779,7 @@ cmd_watch() {
8779
8779
  }
8780
8780
 
8781
8781
  #===============================================================================
8782
- # loki cockpit - Multi-repo live status as a terminal inline image (v7.127.0)
8782
+ # loki cockpit - Multi-repo live status as a terminal inline image (v7.128.0)
8783
8783
  #
8784
8784
  # Renders the Autonomi cockpit frame directly in supported terminals (iTerm2 /
8785
8785
  # WezTerm / ghostty via the iTerm2 protocol; Kitty via its graphics protocol).
@@ -8836,7 +8836,7 @@ cmd_cockpit() {
8836
8836
  while [[ $# -gt 0 ]]; do
8837
8837
  case "$1" in
8838
8838
  --help|-h)
8839
- echo -e "${BOLD}loki cockpit${NC} - Live multi-repo status as a terminal inline image (v7.127.0)"
8839
+ echo -e "${BOLD}loki cockpit${NC} - Live multi-repo status as a terminal inline image (v7.128.0)"
8840
8840
  echo ""
8841
8841
  echo "Usage: loki cockpit [options]"
8842
8842
  echo ""
@@ -10820,9 +10820,9 @@ except Exception:
10820
10820
  echo -e " ${GREEN}PASS${NC} Inline-image protocol: ${_ck_proto}"
10821
10821
  fi
10822
10822
  if [ "$_ck_resvg" = "yes" ]; then
10823
- echo -e " ${GREEN}PASS${NC} @resvg/resvg-js: installed (SVG can rasterize to PNG)"
10823
+ echo -e " ${GREEN}PASS${NC} SVG rasterizer: ready (bundled wasm; renders the frame to an image)"
10824
10824
  else
10825
- echo -e " ${DIM} -- ${NC} @resvg/resvg-js: not installed (optional; cockpit uses text+dashboard)"
10825
+ echo -e " ${DIM} -- ${NC} SVG rasterizer: unavailable (cockpit uses text+dashboard)"
10826
10826
  fi
10827
10827
  if [ "$_ck_path" = "image" ]; then
10828
10828
  echo -e " ${GREEN}PASS${NC} Render path: inline image ('loki cockpit' draws the frame in-terminal)"
@@ -7,7 +7,7 @@ Modules:
7
7
  control: Session control API (start/stop/pause/resume)
8
8
  """
9
9
 
10
- __version__ = "7.127.0"
10
+ __version__ = "7.128.0"
11
11
 
12
12
  # Expose the control app for easy import
13
13
  try:
@@ -2,7 +2,7 @@
2
2
 
3
3
  The flagship product of [Autonomi](https://www.autonomi.dev/). Loki Mode is a spec-driven autonomous builder with a built-in trust layer that takes any spec to a deployed product and verifies completion with evidence (quality gates plus a completion council), not just a "done" claim. Complete installation instructions for all platforms and use cases.
4
4
 
5
- **Version:** v7.127.0
5
+ **Version:** v7.128.0
6
6
 
7
7
  ---
8
8
 
@@ -396,7 +396,7 @@ provider works inside the container. Provide auth with your Anthropic API key:
396
396
  # Run Loki Mode in Docker (Claude provider, API-key auth)
397
397
  docker run --rm -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
398
398
  -v $(pwd):/workspace -w /workspace \
399
- asklokesh/loki-mode:7.127.0 start ./my-spec.md
399
+ asklokesh/loki-mode:7.128.0 start ./my-spec.md
400
400
  ```
401
401
 
402
402
  ##### docker compose + .env (no host install)
Binary file
@@ -1,19 +1,19 @@
1
1
  // @bun
2
- var B=import.meta.require;function j(D){return String(D??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function n(D,L,Q){let N=Q/512;return`<g transform="translate(${D},${L}) scale(${N})">
2
+ var YJ=Object.defineProperty;var zJ=(J)=>J;function EJ(J,Q){this[J]=zJ.bind(null,Q)}var TJ=(J,Q)=>{for(var X in Q)YJ(J,X,{get:Q[X],enumerable:!0,configurable:!0,set:EJ.bind(Q,X)})};var WJ=(J,Q)=>()=>(J&&(Q=J(J=0)),Q);var T=import.meta.require;var DJ={};TJ(DJ,{initWasm:()=>wJ,Resvg:()=>lJ});function C(J){if(_===z.length)z.push(z.length+1);let Q=_;return _=z[Q],z[Q]=J,Q}function U(J){return z[J]}function kJ(J){if(J<132)return;z[J]=_,_=J}function E(J){let Q=U(J);return kJ(J),Q}function y(){if(j===null||j.byteLength===0)j=new Uint8Array(K.memory.buffer);return j}function c(J,Q,X){if(X===void 0){let q=b.encode(J),P=Q(q.length,1)>>>0;return y().subarray(P,P+q.length).set(q),h=q.length,P}let Z=J.length,G=Q(Z,1)>>>0,$=y(),D=0;for(;D<Z;D++){let q=J.charCodeAt(D);if(q>127)break;$[G+D]=q}if(D!==Z){if(D!==0)J=J.slice(D);G=X(G,Z,Z=D+J.length*3,1)>>>0;let q=y().subarray(G+D,G+Z),P=MJ(J,q);D+=P.written,G=X(G,Z,D,1)>>>0}return h=D,G}function g(J){return J===void 0||J===null}function A(){if(x===null||x.byteLength===0)x=new Int32Array(K.memory.buffer);return x}function w(J,Q){return J=J>>>0,GJ.decode(y().subarray(J,J+Q))}function OJ(J,Q){if(!(J instanceof Q))throw Error(`expected instance of ${Q.name}`);return J.ptr}function jJ(J,Q){try{return J.apply(this,Q)}catch(X){K.__wbindgen_exn_store(C(X))}}async function fJ(J,Q){if(typeof Response==="function"&&J instanceof Response){if(typeof WebAssembly.instantiateStreaming==="function")try{return await WebAssembly.instantiateStreaming(J,Q)}catch(Z){if(J.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",Z);else throw Z}let X=await J.arrayBuffer();return await WebAssembly.instantiate(X,Q)}else{let X=await WebAssembly.instantiate(J,Q);if(X instanceof WebAssembly.Instance)return{instance:X,module:J};else return X}}function uJ(){let J={};return J.wbg={},J.wbg.__wbg_new_28c511d9baebfa89=function(Q,X){let Z=Error(w(Q,X));return C(Z)},J.wbg.__wbindgen_memory=function(){let Q=K.memory;return C(Q)},J.wbg.__wbg_buffer_12d079cc21e14bdb=function(Q){let X=U(Q).buffer;return C(X)},J.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb=function(Q,X,Z){let G=new Uint8Array(U(Q),X>>>0,Z>>>0);return C(G)},J.wbg.__wbindgen_object_drop_ref=function(Q){E(Q)},J.wbg.__wbg_new_63b92bc8671ed464=function(Q){let X=new Uint8Array(U(Q));return C(X)},J.wbg.__wbg_values_839f3396d5aac002=function(Q){let X=U(Q).values();return C(X)},J.wbg.__wbg_next_196c84450b364254=function(){return jJ(function(Q){let X=U(Q).next();return C(X)},arguments)},J.wbg.__wbg_done_298b57d23c0fc80c=function(Q){return U(Q).done},J.wbg.__wbg_value_d93c65011f51a456=function(Q){let X=U(Q).value;return C(X)},J.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6=function(Q){let X;try{X=U(Q)instanceof Uint8Array}catch(G){X=!1}return X},J.wbg.__wbindgen_string_get=function(Q,X){let Z=U(X),G=typeof Z==="string"?Z:void 0;var $=g(G)?0:c(G,K.__wbindgen_malloc,K.__wbindgen_realloc),D=h;A()[Q/4+1]=D,A()[Q/4+0]=$},J.wbg.__wbg_new_16b304a2cfa7ff4a=function(){return C([])},J.wbg.__wbindgen_string_new=function(Q,X){let Z=w(Q,X);return C(Z)},J.wbg.__wbg_push_a5b05aedc7234f9f=function(Q,X){return U(Q).push(U(X))},J.wbg.__wbg_length_c20a40f15020d68a=function(Q){return U(Q).length},J.wbg.__wbg_set_a47bac70306a19a7=function(Q,X,Z){U(Q).set(U(X),Z>>>0)},J.wbg.__wbindgen_throw=function(Q,X){throw Error(w(Q,X))},J}function vJ(J,Q){}function yJ(J,Q){return K=J.exports,KJ.__wbindgen_wasm_module=Q,x=null,j=null,K}async function KJ(J){if(K!==void 0)return K;if(typeof J>"u")J=new URL("index_bg.wasm",void 0);let Q=uJ();if(typeof J==="string"||typeof Request==="function"&&J instanceof Request||typeof URL==="function"&&J instanceof URL)J=fetch(J);vJ(Q);let{instance:X,module:Z}=await fJ(await J,Q);return yJ(X,Z)}function mJ(J){return Object.prototype.hasOwnProperty.call(J,"fontBuffers")}var K,z,_,h=0,j=null,b,MJ,x=null,GJ,ZJ,p=class J{static __wrap(Q){Q=Q>>>0;let X=Object.create(J.prototype);return X.__wbg_ptr=Q,ZJ.register(X,X.__wbg_ptr,X),X}__destroy_into_raw(){let Q=this.__wbg_ptr;return this.__wbg_ptr=0,ZJ.unregister(this),Q}free(){let Q=this.__destroy_into_raw();K.__wbg_bbox_free(Q)}get x(){return K.__wbg_get_bbox_x(this.__wbg_ptr)}set x(Q){K.__wbg_set_bbox_x(this.__wbg_ptr,Q)}get y(){return K.__wbg_get_bbox_y(this.__wbg_ptr)}set y(Q){K.__wbg_set_bbox_y(this.__wbg_ptr,Q)}get width(){return K.__wbg_get_bbox_width(this.__wbg_ptr)}set width(Q){K.__wbg_set_bbox_width(this.__wbg_ptr,Q)}get height(){return K.__wbg_get_bbox_height(this.__wbg_ptr)}set height(Q){K.__wbg_set_bbox_height(this.__wbg_ptr,Q)}},$J,xJ=class J{static __wrap(Q){Q=Q>>>0;let X=Object.create(J.prototype);return X.__wbg_ptr=Q,$J.register(X,X.__wbg_ptr,X),X}__destroy_into_raw(){let Q=this.__wbg_ptr;return this.__wbg_ptr=0,$J.unregister(this),Q}free(){let Q=this.__destroy_into_raw();K.__wbg_renderedimage_free(Q)}get width(){return K.renderedimage_width(this.__wbg_ptr)>>>0}get height(){return K.renderedimage_height(this.__wbg_ptr)>>>0}asPng(){try{let G=K.__wbindgen_add_to_stack_pointer(-16);K.renderedimage_asPng(G,this.__wbg_ptr);var Q=A()[G/4+0],X=A()[G/4+1],Z=A()[G/4+2];if(Z)throw E(X);return E(Q)}finally{K.__wbindgen_add_to_stack_pointer(16)}}get pixels(){let Q=K.renderedimage_pixels(this.__wbg_ptr);return E(Q)}},_J,hJ=class{__destroy_into_raw(){let J=this.__wbg_ptr;return this.__wbg_ptr=0,_J.unregister(this),J}free(){let J=this.__destroy_into_raw();K.__wbg_resvg_free(J)}constructor(J,Q,X){try{let P=K.__wbindgen_add_to_stack_pointer(-16);var Z=g(Q)?0:c(Q,K.__wbindgen_malloc,K.__wbindgen_realloc),G=h;K.resvg_new(P,C(J),Z,G,g(X)?0:C(X));var $=A()[P/4+0],D=A()[P/4+1],q=A()[P/4+2];if(q)throw E(D);return this.__wbg_ptr=$>>>0,this}finally{K.__wbindgen_add_to_stack_pointer(16)}}get width(){return K.resvg_width(this.__wbg_ptr)}get height(){return K.resvg_height(this.__wbg_ptr)}render(){try{let Z=K.__wbindgen_add_to_stack_pointer(-16);K.resvg_render(Z,this.__wbg_ptr);var J=A()[Z/4+0],Q=A()[Z/4+1],X=A()[Z/4+2];if(X)throw E(Q);return xJ.__wrap(J)}finally{K.__wbindgen_add_to_stack_pointer(16)}}toString(){let J,Q;try{let G=K.__wbindgen_add_to_stack_pointer(-16);K.resvg_toString(G,this.__wbg_ptr);var X=A()[G/4+0],Z=A()[G/4+1];return J=X,Q=Z,w(X,Z)}finally{K.__wbindgen_add_to_stack_pointer(16),K.__wbindgen_free(J,Q,1)}}innerBBox(){let J=K.resvg_innerBBox(this.__wbg_ptr);return J===0?void 0:p.__wrap(J)}getBBox(){let J=K.resvg_getBBox(this.__wbg_ptr);return J===0?void 0:p.__wrap(J)}cropByBBox(J){OJ(J,p),K.resvg_cropByBBox(this.__wbg_ptr,J.__wbg_ptr)}imagesToResolve(){try{let Z=K.__wbindgen_add_to_stack_pointer(-16);K.resvg_imagesToResolve(Z,this.__wbg_ptr);var J=A()[Z/4+0],Q=A()[Z/4+1],X=A()[Z/4+2];if(X)throw E(Q);return E(J)}finally{K.__wbindgen_add_to_stack_pointer(16)}}resolveImage(J,Q){try{let G=K.__wbindgen_add_to_stack_pointer(-16),$=c(J,K.__wbindgen_malloc,K.__wbindgen_realloc),D=h;K.resvg_resolveImage(G,this.__wbg_ptr,$,D,C(Q));var X=A()[G/4+0],Z=A()[G/4+1];if(Z)throw E(X)}finally{K.__wbindgen_add_to_stack_pointer(16)}}},bJ,i=!1,wJ=async(J)=>{if(i)throw Error("Already initialized. The `initWasm()` function can be used only once.");await bJ(await J),i=!0},lJ;var qJ=WJ(()=>{z=Array(128).fill(void 0);z.push(void 0,null,!0,!1);_=z.length;b=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},MJ=typeof b.encodeInto==="function"?function(J,Q){return b.encodeInto(J,Q)}:function(J,Q){let X=b.encode(J);return Q.set(X),{read:J.length,written:X.length}};GJ=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};if(typeof TextDecoder<"u")GJ.decode();ZJ=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((J)=>K.__wbg_bbox_free(J>>>0)),$J=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((J)=>K.__wbg_renderedimage_free(J>>>0)),_J=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((J)=>K.__wbg_resvg_free(J>>>0));bJ=KJ,lJ=class extends hJ{constructor(J,Q){if(!i)throw Error("Wasm has not been initialized. Call `initWasm()` function.");let X=Q?.font;if(!!X&&mJ(X)){let Z={...Q,font:{...X,fontBuffers:void 0}};super(J,JSON.stringify(Z),X.fontBuffers)}else super(J,JSON.stringify(Q))}}});function N(J){return String(J??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function FJ(J,Q,X){let Z=X/512;return`<g transform="translate(${J},${Q}) scale(${Z})">
3
3
  <rect x="0" y="0" width="512" height="512" rx="118" fill="#553de9"/>
4
4
  <path d="M152 405 L242 120" stroke="#FFFEFB" stroke-width="28" stroke-linecap="round" fill="none"/>
5
5
  <path d="M360 405 L270 120" stroke="#FFFEFB" stroke-width="28" stroke-linecap="round" fill="none"/>
6
6
  <path d="M242 120 Q256 86 270 120" stroke="#FFFEFB" stroke-width="28" stroke-linecap="round" fill="none"/>
7
7
  <circle cx="256" cy="295" r="20" fill="#1FC5A8"/>
8
- </g>`}function g(D){switch(D){case"verified":return"#1f8a52";case"failed":return"#b23a3a";case"working":case"pending":return"#9a6a12";default:return"#6b6675"}}function y(D){switch(D){case"pass":return"#1f8a52";case"fail":return"#b23a3a";case"pending":return"#9a6a12";default:return"#6b6675"}}function d(D){switch(D){case"approve":return"#1f8a52";case"reject":return"#b23a3a";case"concern":return"#9a6a12";default:return"#6b6675"}}function C(D,L,Q,N,J="#201515"){return`<text x="${D}" y="${L}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="12" fill="#6b6675" letter-spacing="0.5">${j(Q.toUpperCase())}</text>
9
- <text x="${D}" y="${L+24}" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="20" font-weight="600" fill="${J}">${j(N)}</text>`}var c=["Reason","Act","Reflect","Verify"];function r(D){let L=(D||"").toLowerCase();if(/verif|complet|done|ship|deploy/.test(L))return 3;if(/reflect|review|council|critique|assess/.test(L))return 2;if(/reason|plan|design|architect|spec|analy/.test(L))return 0;return 1}function h(D){let N=D.budgetLimitUsd&&D.budgetLimitUsd>0?`$${D.budgetUsd.toFixed(2)} / $${D.budgetLimitUsd.toFixed(2)}`:`$${D.budgetUsd.toFixed(2)}`,J="";J+=n(32,32,44),J+=`<text x="92" y="54" font-family="'Fraunces','Georgia',serif" font-size="24" font-weight="600" fill="#201515">Autonomi</text>`,J+=`<text x="92" y="74" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" fill="#6b6675">Loki Cockpit</text>`;let X=D.freshness?`updated ${D.freshness}`:"live";J+=`<text x="868" y="54" text-anchor="end" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="12" fill="#6b6675">${j(X)}</text>`,J+=`<text x="868" y="74" text-anchor="end" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="13" fill="${g(D.verdict)}" font-weight="600">${j(D.verdict.toUpperCase())}</text>`;let $=96,M=168;J+=`<rect x="32" y="${$}" width="836" height="${M}" rx="16" fill="#ffffff" stroke="#e2e0e8"/>`,J+=`<text x="56" y="${$+34}" font-family="'Fraunces','Georgia',serif" font-size="20" font-weight="600" fill="#201515">${j(D.run)}</text>`,J+=`<text x="56" y="${$+54}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" fill="#6b6675">phase ${j(D.phase)}</text>`;let E=$+96,P=(U)=>56+U*168;J+=C(P(0),E,"iteration",String(D.iteration)),J+=C(P(1),E,"tier",D.tier),J+=C(P(2),E,"provider",D.provider),J+=C(P(3),E,"budget",N);let H=$+M+40;J+=`<text x="32" y="${H}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" font-weight="600" fill="#6b6675" letter-spacing="0.5">RARV LOOP</text>`;let S=r(D.phase),F=H+14,R=200;c.forEach((U,G)=>{let Z=32+G*(R+12),q=G<S,V=G===S;J+=`<rect x="${Z}" y="${F}" width="${R}" height="40" rx="10" fill="${V?"#553de9":"#ffffff"}" fill-opacity="${V?"0.10":"1"}" stroke="${V?"#553de9":q?"#1f8a52":"#6b6675"}" stroke-width="${V?2:1}"/>`;let f=q?"check":V?"dot":"wait";if(f==="check")J+=`<path d="M${Z+16} ${F+20} l6 6 l10 -12" stroke="#1f8a52" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/>`;else if(f==="dot")J+=`<circle cx="${Z+22}" cy="${F+20}" r="5" fill="#553de9"/>`;else J+=`<circle cx="${Z+22}" cy="${F+20}" r="5" fill="none" stroke="#6b6675" stroke-width="1.5"/>`;J+=`<text x="${Z+40}" y="${F+25}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="14" font-weight="${V?600:500}" fill="${V?"#553de9":q?"#201515":"#6b6675"}">${U}</text>`});let Y=F+40+40;J+=`<text x="32" y="${Y}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" font-weight="600" fill="#6b6675" letter-spacing="0.5">QUALITY GATES</text>`;let x=D.gates.length?D.gates:[{name:"no gates yet",status:"pending"}],T=30,W=Y+12;J+=`<rect x="32" y="${W}" width="836" height="${x.slice(0,8).length*T+8}" rx="12" fill="#ffffff" stroke="#e2e0e8"/>`,W+=8;for(let U of x.slice(0,8)){let G=y(U.status),Z=W+T/2;if(J+=`<circle cx="50" cy="${Z}" r="4" fill="${G}"/>`,J+=`<text x="66" y="${Z+4}" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="12" fill="#201515">${j(U.name)}</text>`,U.runner)J+=`<text x="242" y="${Z+4}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="11" fill="#6b6675">${j(U.runner)}</text>`;if(U.evidence){let q=U.evidence.length>52?`${U.evidence.slice(0,49)}...`:U.evidence;J+=`<text x="332" y="${Z+4}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="11" fill="#6b6675">${j(q)}</text>`}J+=`<text x="852" y="${Z+4}" text-anchor="end" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="11" font-weight="700" fill="${G}">${j(U.status.toUpperCase())}</text>`,W+=T}let k=W+40;J+=`<text x="32" y="${k}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" font-weight="600" fill="#6b6675" letter-spacing="0.5">COMPLETION COUNCIL</text>`;let m=D.council.length?D.council:[{reviewer:"pending",vote:"pending"}],A=k+12;J+=`<rect x="32" y="${A}" width="836" height="${m.slice(0,6).length*T+8}" rx="12" fill="#ffffff" stroke="#e2e0e8"/>`,A+=8;for(let U of m.slice(0,6)){let G=d(U.vote),Z=A+T/2;if(J+=`<circle cx="50" cy="${Z}" r="4" fill="${G}"/>`,J+=`<text x="66" y="${Z+4}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="12.5" font-weight="500" fill="#201515">${j(U.reviewer)}</text>`,U.tier)J+=`<text x="292" y="${Z+4}" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="11" fill="#6b6675">${j(U.tier)}</text>`;J+=`<text x="852" y="${Z+4}" text-anchor="end" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="11" font-weight="700" fill="${G}">${j(U.vote.toUpperCase())}</text>`,A+=T}let w=A+46;J+=`<text x="32" y="${w}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" font-weight="600" fill="#6b6675" letter-spacing="0.5">FLEET (${D.fleet.length})</text>`;let K=w+20,_=D.fleet.slice(0,4);for(let U of _){let G=U.running?"#1f8a52":"#6b6675";J+=`<circle cx="38" cy="${K-4}" r="5" fill="${G}"/>`,J+=`<text x="52" y="${K}" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="13" fill="#201515">${j(U.name)}</text>`;let Z=`iter ${U.iteration??0} ${j(U.phase||U.status||"")}`;J+=`<text x="868" y="${K}" text-anchor="end" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="12" fill="#6b6675">${Z}</text>`,K+=26}if(D.fleet.length>_.length)J+=`<text x="52" y="${K}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="12" fill="#6b6675">+ ${D.fleet.length-_.length} more</text>`,K+=26;let z=Math.round(K+32);return`<svg xmlns="http://www.w3.org/2000/svg" width="900" height="${z}" viewBox="0 0 900 ${z}">
10
- <rect x="0" y="0" width="900" height="${z}" fill="#f1f2f6"/>
11
- ${J}
12
- </svg>`}var O;function u(){if(O!==void 0)return O;try{let D=globalThis.require??B;D.resolve("@resvg/resvg-js"),O=D("@resvg/resvg-js")}catch{O=null}return O}function b(){return u()!==null}function p(D,L=900){let Q=u();if(!Q||typeof Q.Resvg!=="function")return{png:null,available:!1,reason:"raster unavailable (@resvg/resvg-js not installed)"};try{let J=new Q.Resvg(D,{fitTo:{mode:"width",value:L}}).render().asPng();return{png:Uint8Array.from(J),available:!0}}catch(N){return{png:null,available:!1,reason:`raster failed: ${N.message}`}}}function l(D){return Buffer.from(D).toString("base64")}function a(D){let L=l(D);return`\x1B]1337;File=${`inline=1;size=${D.length};width=auto;height=auto;preserveAspectRatio=1`}:${L}\x07`}function s(D,L=4096){let Q=l(D);if(Q.length===0)return"\x1B_Ga=T,f=100,m=0;\x1B\\";let N=[];for(let X=0;X<Q.length;X+=L)N.push(Q.slice(X,X+L));let J="";for(let X=0;X<N.length;X++){let M=X===N.length-1?0:1,E=X===0?`a=T,f=100,m=${M}`:`m=${M}`;J+=`\x1B_G${E};${N[X]}\x1B\\`}return J}function i(D,L){return D==="kitty"?s(L):a(L)}var o=new Set(["iterm.app","wezterm","ghostty"]);function I(D=process.env){let L=(D.LOKI_COCKPIT_PROTOCOL||"").trim().toLowerCase();if(L==="iterm2"||L==="kitty"||L==="none")return L;let Q=(D.KITTY_WINDOW_ID||"").trim(),N=(D.TERM||"").trim().toLowerCase();if(Q.length>0||N==="xterm-kitty")return"kitty";let J=(D.TERM_PROGRAM||"").trim().toLowerCase();if(o.has(J))return"iterm2";return"none"}function v(D,L={}){let Q=h(D);if(L.forceText)return{kind:"fallback",protocol:"none",reason:"--no-image (text/browser fallback)",svg:Q};let N;if(L.protocol&&L.protocol!=="auto")N=L.protocol;else N=I(L.env);if(N==="none")return{kind:"fallback",protocol:N,reason:"no inline-image terminal detected",svg:Q};let J=p(Q);if(!J.available||!J.png)return{kind:"fallback",protocol:N,reason:J.reason||"rasterization unavailable",svg:Q};let X=i(N,J.png);return{kind:"image",protocol:N,data:X,svg:Q}}async function e(){let D=[];for await(let L of process.stdin)D.push(L);return Buffer.concat(D).toString("utf-8")}function t(D){let L="auto",Q=!1,N;for(let J=0;J<D.length;J++){let X=D[J];if(X==="--protocol"){let $=(D[++J]||"auto").toLowerCase();L=$==="iterm2"||$==="kitty"||$==="none"?$:"auto"}else if(X==="--no-image")Q=!0;else if(X==="--svg-out")N=D[++J]}return{protocol:L,noImage:Q,svgOut:N}}function DD(){let D=I(),L=b(),Q=D!=="none"&&L?"image":"text+dashboard";return process.stdout.write(`protocol=${D}
13
- `),process.stdout.write(`resvg=${L?"yes":"no"}
14
- `),process.stdout.write(`path=${Q}
15
- `),0}async function JD(D=process.argv.slice(2)){if(D.includes("--probe"))return DD();let{protocol:L,noImage:Q,svgOut:N}=t(D),J;try{let $=await e();J=JSON.parse($)}catch($){return process.stderr.write(`FALLBACK could not parse cockpit state: ${$.message}
16
- `),3}let X=v(J,{protocol:L,forceText:Q});if(N)try{let{writeFileSync:$}=await import("fs");$(N,X.svg)}catch{}if(X.kind==="image"&&X.data)return process.stdout.write(X.data),0;return process.stderr.write(`FALLBACK ${X.reason||"image unavailable"}
17
- `),3}if(import.meta.main)JD().then((D)=>process.exit(D));export{JD as main};
8
+ </g>`}function BJ(J){switch(J){case"verified":return"#1f8a52";case"failed":return"#b23a3a";case"working":case"pending":return"#9a6a12";default:return"#6b6675"}}function HJ(J){switch(J){case"pass":return"#1f8a52";case"fail":return"#b23a3a";case"pending":return"#9a6a12";default:return"#6b6675"}}function SJ(J){switch(J){case"approve":return"#1f8a52";case"reject":return"#b23a3a";case"concern":return"#9a6a12";default:return"#6b6675"}}function v(J,Q,X,Z,G="#201515"){return`<text x="${J}" y="${Q}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="12" fill="#6b6675" letter-spacing="0.5">${N(X.toUpperCase())}</text>
9
+ <text x="${J}" y="${Q+24}" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="20" font-weight="600" fill="${G}">${N(Z)}</text>`}var RJ=["Reason","Act","Reflect","Verify"];function IJ(J){let Q=(J||"").toLowerCase();if(/verif|complet|done|ship|deploy/.test(Q))return 3;if(/reflect|review|council|critique|assess/.test(Q))return 2;if(/reason|plan|design|architect|spec|analy/.test(Q))return 0;return 1}function XJ(J){let Z={run:J?.run||"cockpit",iteration:typeof J?.iteration==="number"?J.iteration:0,phase:J?.phase||"idle",tier:J?.tier||"",provider:J?.provider||"",verdict:J?.verdict||"unknown",budgetUsd:typeof J?.budgetUsd==="number"?J.budgetUsd:0,budgetLimitUsd:J?.budgetLimitUsd,freshness:J?.freshness,gates:Array.isArray(J?.gates)?J.gates:[],council:Array.isArray(J?.council)?J.council:[],fleet:Array.isArray(J?.fleet)?J.fleet:[]},G=Z.budgetLimitUsd&&Z.budgetLimitUsd>0?`$${Z.budgetUsd.toFixed(2)} / $${Z.budgetLimitUsd.toFixed(2)}`:`$${Z.budgetUsd.toFixed(2)}`,$="";$+=FJ(32,32,44),$+=`<text x="92" y="54" font-family="'Fraunces','Georgia',serif" font-size="24" font-weight="600" fill="#201515">Autonomi</text>`,$+=`<text x="92" y="74" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" fill="#6b6675">Loki Cockpit</text>`;let D=Z.freshness?`updated ${Z.freshness}`:"live";$+=`<text x="868" y="54" text-anchor="end" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="12" fill="#6b6675">${N(D)}</text>`,$+=`<text x="868" y="74" text-anchor="end" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="13" fill="${BJ(Z.verdict)}" font-weight="600">${N(Z.verdict.toUpperCase())}</text>`;let q=96,P=168;$+=`<rect x="32" y="${q}" width="836" height="${P}" rx="16" fill="#ffffff" stroke="#e2e0e8"/>`,$+=`<text x="56" y="${q+34}" font-family="'Fraunces','Georgia',serif" font-size="20" font-weight="600" fill="#201515">${N(Z.run)}</text>`,$+=`<text x="56" y="${q+54}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" fill="#6b6675">phase ${N(Z.phase)}</text>`;let S=q+96,W=(V)=>56+V*168;$+=v(W(0),S,"iteration",String(Z.iteration)),$+=v(W(1),S,"tier",Z.tier),$+=v(W(2),S,"provider",Z.provider),$+=v(W(3),S,"budget",G);let n=q+P+40;$+=`<text x="32" y="${n}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" font-weight="600" fill="#6b6675" letter-spacing="0.5">RARV LOOP</text>`;let s=IJ(Z.phase),R=n+14,o=200;RJ.forEach((V,Y)=>{let L=32+Y*(o+12),O=Y<s,B=Y===s;$+=`<rect x="${L}" y="${R}" width="${o}" height="40" rx="10" fill="${B?"#553de9":"#ffffff"}" fill-opacity="${B?"0.10":"1"}" stroke="${B?"#553de9":O?"#1f8a52":"#6b6675"}" stroke-width="${B?2:1}"/>`;let QJ=O?"check":B?"dot":"wait";if(QJ==="check")$+=`<path d="M${L+16} ${R+20} l6 6 l10 -12" stroke="#1f8a52" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/>`;else if(QJ==="dot")$+=`<circle cx="${L+22}" cy="${R+20}" r="5" fill="#553de9"/>`;else $+=`<circle cx="${L+22}" cy="${R+20}" r="5" fill="none" stroke="#6b6675" stroke-width="1.5"/>`;$+=`<text x="${L+40}" y="${R+25}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="14" font-weight="${B?600:500}" fill="${B?"#553de9":O?"#201515":"#6b6675"}">${V}</text>`});let a=R+40+40;$+=`<text x="32" y="${a}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" font-weight="600" fill="#6b6675" letter-spacing="0.5">QUALITY GATES</text>`;let r=Z.gates.length?Z.gates:[{name:"no gates yet",status:"pending"}],I=30,k=a+12;$+=`<rect x="32" y="${k}" width="836" height="${r.slice(0,8).length*I+8}" rx="12" fill="#ffffff" stroke="#e2e0e8"/>`,k+=8;for(let V of r.slice(0,8)){let Y=HJ(V.status),L=k+I/2;if($+=`<circle cx="50" cy="${L}" r="4" fill="${Y}"/>`,$+=`<text x="66" y="${L+4}" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="12" fill="#201515">${N(V.name)}</text>`,V.runner)$+=`<text x="242" y="${L+4}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="11" fill="#6b6675">${N(V.runner)}</text>`;if(V.evidence){let O=V.evidence.length>52?`${V.evidence.slice(0,49)}...`:V.evidence;$+=`<text x="332" y="${L+4}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="11" fill="#6b6675">${N(O)}</text>`}$+=`<text x="852" y="${L+4}" text-anchor="end" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="11" font-weight="700" fill="${Y}">${N(V.status.toUpperCase())}</text>`,k+=I}let t=k+40;$+=`<text x="32" y="${t}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" font-weight="600" fill="#6b6675" letter-spacing="0.5">COMPLETION COUNCIL</text>`;let e=Z.council.length?Z.council:[{reviewer:"pending",vote:"pending"}],M=t+12;$+=`<rect x="32" y="${M}" width="836" height="${e.slice(0,6).length*I+8}" rx="12" fill="#ffffff" stroke="#e2e0e8"/>`,M+=8;for(let V of e.slice(0,6)){let Y=SJ(V.vote),L=M+I/2;if($+=`<circle cx="50" cy="${L}" r="4" fill="${Y}"/>`,$+=`<text x="66" y="${L+4}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="12.5" font-weight="500" fill="#201515">${N(V.reviewer)}</text>`,V.tier)$+=`<text x="292" y="${L+4}" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="11" fill="#6b6675">${N(V.tier)}</text>`;$+=`<text x="852" y="${L+4}" text-anchor="end" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="11" font-weight="700" fill="${Y}">${N(V.vote.toUpperCase())}</text>`,M+=I}let JJ=M+46;$+=`<text x="32" y="${JJ}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="13" font-weight="600" fill="#6b6675" letter-spacing="0.5">FLEET (${Z.fleet.length})</text>`;let F=JJ+20,m=Z.fleet.slice(0,4);for(let V of m){let Y=V.running?"#1f8a52":"#6b6675";$+=`<circle cx="38" cy="${F-4}" r="5" fill="${Y}"/>`,$+=`<text x="52" y="${F}" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="13" fill="#201515">${N(V.name)}</text>`;let L=`iter ${V.iteration??0} ${N(V.phase||V.status||"")}`;$+=`<text x="868" y="${F}" text-anchor="end" font-family="'JetBrains Mono','SF Mono',ui-monospace,monospace" font-size="12" fill="#6b6675">${L}</text>`,F+=26}if(Z.fleet.length>m.length)$+=`<text x="52" y="${F}" font-family="'Inter','Helvetica Neue',Arial,sans-serif" font-size="12" fill="#6b6675">+ ${Z.fleet.length-m.length} more</text>`,F+=26;let d=Math.round(F+32);return`<svg xmlns="http://www.w3.org/2000/svg" width="900" height="${d}" viewBox="0 0 900 ${d}">
10
+ <rect x="0" y="0" width="900" height="${d}" fill="#f1f2f6"/>
11
+ ${$}
12
+ </svg>`}var f,u;function VJ(){if(f!==void 0)return f;try{let J=globalThis.require??T;J.resolve("@resvg/resvg-js"),f=J("@resvg/resvg-js")}catch{f=null}return f}async function PJ(){if(u!==void 0)return u;try{let J=await Promise.resolve().then(() => (qJ(),DJ)),Q=globalThis.require??T,{readFileSync:X,existsSync:Z}=await import("fs"),{resolve:G,dirname:$}=await import("path"),{fileURLToPath:D}=await import("url"),q=null;try{let P=$(D(import.meta.url));for(let S of["../data/resvg.wasm","../../data/resvg.wasm"]){let W=G(P,S);if(Z(W)){q=X(W);break}}}catch{}if(!q){let P=Q.resolve("@resvg/resvg-wasm/index_bg.wasm");q=X(P)}await J.initWasm(q),u={Resvg:J.Resvg}}catch{u=null}return u}async function LJ(){if(VJ()?.Resvg)return!0;return(await PJ())?.Resvg!=null}var H;async function dJ(){if(H!==void 0)return H;try{let{readFileSync:J,existsSync:Q}=await import("fs"),X=["/System/Library/Fonts/Supplemental/Arial.ttf","/System/Library/Fonts/Helvetica.ttc","/Library/Fonts/Arial.ttf","/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf","/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf","/usr/share/fonts/dejavu/DejaVuSans.ttf","/usr/share/fonts/TTF/DejaVuSans.ttf","C:\\Windows\\Fonts\\arial.ttf","C:\\Windows\\Fonts\\segoeui.ttf"];for(let Z of X)if(Q(Z))return H=new Uint8Array(J(Z)),H;H=null}catch{H=null}return H}async function AJ(J,Q=900){let X=VJ();if(X?.Resvg)try{let G=new X.Resvg(J,{fitTo:{mode:"width",value:Q}});return{png:Uint8Array.from(G.render().asPng()),available:!0}}catch{}let Z=await PJ();if(Z?.Resvg)try{let G=await dJ(),$={fitTo:{mode:"width",value:Q}};if(G)$.font={fontBuffers:[G],defaultFontFamily:"Arial",loadSystemFonts:!1};else $.font={loadSystemFonts:!0};let D=new Z.Resvg(J,$);return{png:Uint8Array.from(D.render().asPng()),available:!0}}catch(G){return{png:null,available:!1,reason:`raster failed: ${G.message}`}}return{png:null,available:!1,reason:"rasterizer unavailable (no resvg native or wasm)"}}function NJ(J){return Buffer.from(J).toString("base64")}function pJ(J){let Q=NJ(J);return`\x1B]1337;File=${`inline=1;size=${J.length};width=auto;height=auto;preserveAspectRatio=1`}:${Q}\x07`}function cJ(J,Q=4096){let X=NJ(J);if(X.length===0)return"\x1B_Ga=T,f=100,m=0;\x1B\\";let Z=[];for(let $=0;$<X.length;$+=Q)Z.push(X.slice($,$+Q));let G="";for(let $=0;$<Z.length;$++){let q=$===Z.length-1?0:1,P=$===0?`a=T,f=100,m=${q}`:`m=${q}`;G+=`\x1B_G${P};${Z[$]}\x1B\\`}return G}function UJ(J,Q){return J==="kitty"?cJ(Q):pJ(Q)}var gJ=new Set(["iterm.app","wezterm","ghostty"]);function l(J=process.env){let Q=(J.LOKI_COCKPIT_PROTOCOL||"").trim().toLowerCase();if(Q==="iterm2"||Q==="kitty"||Q==="none")return Q;let X=(J.KITTY_WINDOW_ID||"").trim(),Z=(J.TERM||"").trim().toLowerCase();if(X.length>0||Z==="xterm-kitty")return"kitty";let G=(J.TERM_PROGRAM||"").trim().toLowerCase();if(gJ.has(G))return"iterm2";return"none"}async function CJ(J,Q={}){let X=XJ(J);if(Q.forceText)return{kind:"fallback",protocol:"none",reason:"--no-image (text/browser fallback)",svg:X};let Z;if(Q.protocol&&Q.protocol!=="auto")Z=Q.protocol;else Z=l(Q.env);if(Z==="none")return{kind:"fallback",protocol:Z,reason:"no inline-image terminal detected",svg:X};let G=await AJ(X);if(!G.available||!G.png)return{kind:"fallback",protocol:Z,reason:G.reason||"rasterization unavailable",svg:X};let $=UJ(Z,G.png);return{kind:"image",protocol:Z,data:$,svg:X}}async function iJ(){let J=[];for await(let Q of process.stdin)J.push(Q);return Buffer.concat(J).toString("utf-8")}function nJ(J){let Q="auto",X=!1,Z;for(let G=0;G<J.length;G++){let $=J[G];if($==="--protocol"){let D=(J[++G]||"auto").toLowerCase();Q=D==="iterm2"||D==="kitty"||D==="none"?D:"auto"}else if($==="--no-image")X=!0;else if($==="--svg-out")Z=J[++G]}return{protocol:Q,noImage:X,svgOut:Z}}async function sJ(){let J=l(),Q=await LJ(),X=J!=="none"&&Q?"image":"text+dashboard";return process.stdout.write(`protocol=${J}
13
+ `),process.stdout.write(`resvg=${Q?"yes":"no"}
14
+ `),process.stdout.write(`path=${X}
15
+ `),0}async function oJ(J=process.argv.slice(2)){if(J.includes("--probe"))return await sJ();let{protocol:Q,noImage:X,svgOut:Z}=nJ(J),G;try{let D=await iJ();G=JSON.parse(D)}catch(D){return process.stderr.write(`FALLBACK could not parse cockpit state: ${D.message}
16
+ `),3}let $=await CJ(G,{protocol:Q,forceText:X});if(Z)try{let{writeFileSync:D}=await import("fs");D(Z,$.svg)}catch{}if($.kind==="image"&&$.data)return process.stdout.write($.data),0;return process.stderr.write(`FALLBACK ${$.reason||"image unavailable"}
17
+ `),3}if(import.meta.main)oJ().then((J)=>process.exit(J));export{oJ as main};
18
18
 
19
- //# debugId=43ABF0138FF2304964756E2164756E21
19
+ //# debugId=6198ED4B6B100AF964756E2164756E21
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var q8=Object.defineProperty;var J8=($)=>$;function V8($,Q){this[$]=J8.bind(null,Q)}var b=($,Q)=>{for(var Z in Q)q8($,Z,{get:Q[Z],enumerable:!0,configurable:!0,set:V8.bind(Q,Z)})};var P=($,Q)=>()=>($&&(Q=$($=0)),Q);var J$=import.meta.require;var m1={};b(m1,{lokiDir:()=>j,homeLokiDir:()=>T$,findRepoRootForVersion:()=>$1,REPO_ROOT:()=>h});import{resolve as t,dirname as e$}from"path";import{fileURLToPath as W8}from"url";import{existsSync as N$}from"fs";import{homedir as H8}from"os";function G8(){let $=v1;for(let Q=0;Q<6;Q++){if(N$(t($,"VERSION"))&&N$(t($,"autonomy/run.sh")))return $;let Z=e$($);if(Z===$)break;$=Z}return t(v1,"..","..","..")}function $1($){let Q=$;for(let Z=0;Z<6;Z++){if(N$(t(Q,"VERSION"))&&N$(t(Q,"autonomy/run.sh")))return Q;let z=e$(Q);if(z===Q)break;Q=z}return t($,"..","..","..")}function j(){return process.env.LOKI_DIR??t(process.cwd(),".loki")}function T$(){return t(H8(),".loki")}var v1,h;var C=P(()=>{v1=e$(W8(import.meta.url));h=G8()});import{readFileSync as U8}from"fs";import{resolve as Y8,dirname as B8}from"path";import{fileURLToPath as M8}from"url";function S$(){if(Q$!==null)return Q$;let $="7.127.0";if(typeof $==="string"&&$.length>0)return Q$=$,Q$;try{let Q=B8(M8(import.meta.url)),Z=$1(Q);Q$=U8(Y8(Z,"VERSION"),"utf-8").trim()}catch{Q$="unknown"}return Q$}var Q$=null;var Q1=P(()=>{C()});var p1={};b(p1,{runOrThrow:()=>S8,run:()=>R,readStreamCapped:()=>c1,commandVersion:()=>C8,commandExists:()=>u,ShellError:()=>Z1,MAX_STDOUT_BYTES:()=>u1});async function c1($,Q=u1){let Z=$.getReader(),z=new TextDecoder,X="",q=0;try{while(q<Q){let{done:K,value:W}=await Z.read();if(K)break;if(!W)continue;if(q+=W.byteLength,q>Q){let V=W.byteLength-(q-Q);X+=z.decode(W.subarray(0,V),{stream:!0});break}X+=z.decode(W,{stream:!0})}X+=z.decode()}finally{try{await Z.cancel()}catch{}Z.releaseLock()}return X}async function R($,Q={}){let Z=Bun.spawn({cmd:[...$],stdout:"pipe",stderr:"pipe",env:Q.env?{...process.env,...Q.env}:process.env,cwd:Q.cwd}),z,X;if(Q.timeoutMs&&Q.timeoutMs>0)z=setTimeout(()=>{try{Z.kill("SIGTERM")}catch{}X=setTimeout(()=>{try{Z.kill("SIGKILL")}catch{}},2000)},Q.timeoutMs);try{let[q,K,W]=await Promise.all([c1(Z.stdout),new Response(Z.stderr).text(),Z.exited]);return{stdout:q,stderr:K,exitCode:W}}finally{if(z)clearTimeout(z);if(X)clearTimeout(X)}}async function S8($,Q={}){let Z=await R($,Q);if(Z.exitCode!==0)throw new Z1(`command failed (${Z.exitCode}): ${$.join(" ")}`,Z.exitCode,Z.stdout,Z.stderr);return Z}async function u($){let Q=D8($),Z=await R(["sh","-c",`command -v ${Q}`],{timeoutMs:5000});if(Z.exitCode===0)return Z.stdout.trim()||null;return null}function D8($){if(!/^[A-Za-z0-9._/-]+$/.test($))throw Error(`refused to shell-escape suspect token: ${$}`);return $}async function C8($,Q="--version"){if(!await u($))return null;let z=await R([$,Q],{timeoutMs:5000});if(z.exitCode!==0)return null;return((z.stdout||z.stderr).split(/\r?\n/)[0]?.trim()??"")||null}var u1=16777216,Z1;var o=P(()=>{Z1=class Z1 extends Error{message;exitCode;stdout;stderr;constructor($,Q,Z,z){super($);this.message=$;this.exitCode=Q;this.stdout=Z;this.stderr=z;this.name="ShellError"}}});function r($){return b8?"":$}var b8,M,S,_,tZ,L,k,y,J;var p=P(()=>{b8=(process.env.NO_COLOR??"").length>0;M=r("\x1B[0;31m"),S=r("\x1B[0;32m"),_=r("\x1B[1;33m"),tZ=r("\x1B[0;34m"),L=r("\x1B[0;36m"),k=r("\x1B[1m"),y=r("\x1B[2m"),J=r("\x1B[0m")});import{existsSync as l8}from"fs";async function Z$(){if(A$!==void 0)return A$;let $="/opt/homebrew/bin/python3.12";if(l8($))return A$=$,$;let Q=await u("python3.12");if(Q)return A$=Q,Q;let Z=await u("python3");return A$=Z,Z}async function z$($,Q={}){let Z=await Z$();if(!Z)return{stdout:"",stderr:"python3 not found",exitCode:127};return R([Z,"-c",$],Q)}var A$;var V$=P(()=>{o()});var V0={};b(V0,{runStatus:()=>U3});import{existsSync as v,readFileSync as H$,readdirSync as $0,statSync as Q0}from"fs";import{resolve as D,basename as z3}from"path";import{homedir as X3}from"os";function Z0($){let Q=Math.trunc($);if(Q>=1e6)return`${(Math.trunc(Q/1e6*10)/10).toFixed(1)}M`;if(Q>=1000)return`${(Math.trunc(Q/1000*10)/10).toFixed(1)}K`;return String(Q)}function z0($,Q,Z){if(Q===0)return null;let z=Math.trunc($*100/Q),X=Math.trunc($*C$/Q);if(X>C$)X=C$;let q=C$-X,K=S;if(z>=80)K=M;else if(z>=50)K=_;let W="=".repeat(Math.max(0,X))+" ".repeat(Math.max(0,q)),V=Z0($),H=Z0(Q);return` ${k}${Z}${J} ${K}[${W}]${J} ${z}% (${V} / ${H})`}async function q3(){if(await u("jq"))return!0;return process.stdout.write(`${M}Error: jq is required but not installed.${J}
2
+ var q8=Object.defineProperty;var J8=($)=>$;function V8($,Q){this[$]=J8.bind(null,Q)}var b=($,Q)=>{for(var Z in Q)q8($,Z,{get:Q[Z],enumerable:!0,configurable:!0,set:V8.bind(Q,Z)})};var P=($,Q)=>()=>($&&(Q=$($=0)),Q);var J$=import.meta.require;var m1={};b(m1,{lokiDir:()=>j,homeLokiDir:()=>T$,findRepoRootForVersion:()=>$1,REPO_ROOT:()=>h});import{resolve as t,dirname as e$}from"path";import{fileURLToPath as W8}from"url";import{existsSync as N$}from"fs";import{homedir as H8}from"os";function G8(){let $=v1;for(let Q=0;Q<6;Q++){if(N$(t($,"VERSION"))&&N$(t($,"autonomy/run.sh")))return $;let Z=e$($);if(Z===$)break;$=Z}return t(v1,"..","..","..")}function $1($){let Q=$;for(let Z=0;Z<6;Z++){if(N$(t(Q,"VERSION"))&&N$(t(Q,"autonomy/run.sh")))return Q;let z=e$(Q);if(z===Q)break;Q=z}return t($,"..","..","..")}function j(){return process.env.LOKI_DIR??t(process.cwd(),".loki")}function T$(){return t(H8(),".loki")}var v1,h;var C=P(()=>{v1=e$(W8(import.meta.url));h=G8()});import{readFileSync as U8}from"fs";import{resolve as Y8,dirname as B8}from"path";import{fileURLToPath as M8}from"url";function S$(){if(Q$!==null)return Q$;let $="7.128.0";if(typeof $==="string"&&$.length>0)return Q$=$,Q$;try{let Q=B8(M8(import.meta.url)),Z=$1(Q);Q$=U8(Y8(Z,"VERSION"),"utf-8").trim()}catch{Q$="unknown"}return Q$}var Q$=null;var Q1=P(()=>{C()});var p1={};b(p1,{runOrThrow:()=>S8,run:()=>R,readStreamCapped:()=>c1,commandVersion:()=>C8,commandExists:()=>u,ShellError:()=>Z1,MAX_STDOUT_BYTES:()=>u1});async function c1($,Q=u1){let Z=$.getReader(),z=new TextDecoder,X="",q=0;try{while(q<Q){let{done:K,value:W}=await Z.read();if(K)break;if(!W)continue;if(q+=W.byteLength,q>Q){let V=W.byteLength-(q-Q);X+=z.decode(W.subarray(0,V),{stream:!0});break}X+=z.decode(W,{stream:!0})}X+=z.decode()}finally{try{await Z.cancel()}catch{}Z.releaseLock()}return X}async function R($,Q={}){let Z=Bun.spawn({cmd:[...$],stdout:"pipe",stderr:"pipe",env:Q.env?{...process.env,...Q.env}:process.env,cwd:Q.cwd}),z,X;if(Q.timeoutMs&&Q.timeoutMs>0)z=setTimeout(()=>{try{Z.kill("SIGTERM")}catch{}X=setTimeout(()=>{try{Z.kill("SIGKILL")}catch{}},2000)},Q.timeoutMs);try{let[q,K,W]=await Promise.all([c1(Z.stdout),new Response(Z.stderr).text(),Z.exited]);return{stdout:q,stderr:K,exitCode:W}}finally{if(z)clearTimeout(z);if(X)clearTimeout(X)}}async function S8($,Q={}){let Z=await R($,Q);if(Z.exitCode!==0)throw new Z1(`command failed (${Z.exitCode}): ${$.join(" ")}`,Z.exitCode,Z.stdout,Z.stderr);return Z}async function u($){let Q=D8($),Z=await R(["sh","-c",`command -v ${Q}`],{timeoutMs:5000});if(Z.exitCode===0)return Z.stdout.trim()||null;return null}function D8($){if(!/^[A-Za-z0-9._/-]+$/.test($))throw Error(`refused to shell-escape suspect token: ${$}`);return $}async function C8($,Q="--version"){if(!await u($))return null;let z=await R([$,Q],{timeoutMs:5000});if(z.exitCode!==0)return null;return((z.stdout||z.stderr).split(/\r?\n/)[0]?.trim()??"")||null}var u1=16777216,Z1;var o=P(()=>{Z1=class Z1 extends Error{message;exitCode;stdout;stderr;constructor($,Q,Z,z){super($);this.message=$;this.exitCode=Q;this.stdout=Z;this.stderr=z;this.name="ShellError"}}});function r($){return b8?"":$}var b8,M,S,_,tZ,L,k,y,J;var p=P(()=>{b8=(process.env.NO_COLOR??"").length>0;M=r("\x1B[0;31m"),S=r("\x1B[0;32m"),_=r("\x1B[1;33m"),tZ=r("\x1B[0;34m"),L=r("\x1B[0;36m"),k=r("\x1B[1m"),y=r("\x1B[2m"),J=r("\x1B[0m")});import{existsSync as l8}from"fs";async function Z$(){if(A$!==void 0)return A$;let $="/opt/homebrew/bin/python3.12";if(l8($))return A$=$,$;let Q=await u("python3.12");if(Q)return A$=Q,Q;let Z=await u("python3");return A$=Z,Z}async function z$($,Q={}){let Z=await Z$();if(!Z)return{stdout:"",stderr:"python3 not found",exitCode:127};return R([Z,"-c",$],Q)}var A$;var V$=P(()=>{o()});var V0={};b(V0,{runStatus:()=>U3});import{existsSync as v,readFileSync as H$,readdirSync as $0,statSync as Q0}from"fs";import{resolve as D,basename as z3}from"path";import{homedir as X3}from"os";function Z0($){let Q=Math.trunc($);if(Q>=1e6)return`${(Math.trunc(Q/1e6*10)/10).toFixed(1)}M`;if(Q>=1000)return`${(Math.trunc(Q/1000*10)/10).toFixed(1)}K`;return String(Q)}function z0($,Q,Z){if(Q===0)return null;let z=Math.trunc($*100/Q),X=Math.trunc($*C$/Q);if(X>C$)X=C$;let q=C$-X,K=S;if(z>=80)K=M;else if(z>=50)K=_;let W="=".repeat(Math.max(0,X))+" ".repeat(Math.max(0,q)),V=Z0($),H=Z0(Q);return` ${k}${Z}${J} ${K}[${W}]${J} ${z}% (${V} / ${H})`}async function q3(){if(await u("jq"))return!0;return process.stdout.write(`${M}Error: jq is required but not installed.${J}
3
3
  `),process.stdout.write(`Install with:
4
4
  `),process.stdout.write(` brew install jq (macOS)
5
5
  `),process.stdout.write(` apt install jq (Debian/Ubuntu)
@@ -814,4 +814,4 @@ Set LOKI_LEGACY_BASH=1 to force the bash CLI for every command.
814
814
  `),2}default:return process.stderr.write(`Unknown command: ${Q}
815
815
  `),process.stderr.write(K8),2}}e1();process.on("SIGINT",()=>process.exit(130));process.on("SIGTERM",()=>process.exit(143));var SZ=await NZ(Bun.argv.slice(2));process.exit(SZ);
816
816
 
817
- //# debugId=3F5CF6688FCD67CA64756E2164756E21
817
+ //# debugId=01C7E7999085D66D64756E2164756E21
@@ -19,5 +19,11 @@
19
19
  "devDependencies": {
20
20
  "@types/bun": "latest",
21
21
  "typescript": "^5.6.0"
22
+ },
23
+ "dependencies": {
24
+ "@resvg/resvg-wasm": "^2.6.2"
25
+ },
26
+ "optionalDependencies": {
27
+ "@resvg/resvg-js": "^2.6.2"
22
28
  }
23
29
  }
package/mcp/__init__.py CHANGED
@@ -57,4 +57,4 @@ try:
57
57
  except ImportError:
58
58
  __all__ = ['mcp']
59
59
 
60
- __version__ = '7.127.0'
60
+ __version__ = '7.128.0'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "loki-mode",
3
3
  "mcpName": "io.github.asklokesh/loki-mode",
4
- "version": "7.127.0",
4
+ "version": "7.128.0",
5
5
  "description": "Loki Mode by Autonomi. Autonomous spec-to-product system: takes a PRD, GitHub issue, OpenAPI/JSON/YAML, or one-line brief to a deployed app via the RARV-C closure loop with 8 quality gates. Provider-agnostic (Claude Code, OpenAI Codex, Cline, Aider).",
6
6
  "keywords": [
7
7
  "agent",
@@ -139,5 +139,8 @@
139
139
  "jest": "^29.7.0",
140
140
  "jsdom": "^24.0.0",
141
141
  "typescript": "^5.9.3"
142
+ },
143
+ "dependencies": {
144
+ "@resvg/resvg-wasm": "^2.6.2"
142
145
  }
143
- }
146
+ }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "loki-mode",
4
4
  "displayName": "Loki Mode",
5
- "version": "7.127.0",
5
+ "version": "7.128.0",
6
6
  "description": "Autonomous spec-to-product build system with a built-in trust layer (RARV-C closure loop, 8 quality gates, completion council). Ships Loki's spec-hardening, drift-detection, and deterministic PR verification commands plus the Loki MCP server.",
7
7
  "author": {
8
8
  "name": "Autonomi",