@andares/pi-toolkits 1.2.5 → 1.3.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.
@@ -0,0 +1 @@
1
+ (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}var r=(e,t)=>e===t,i=Symbol(`solid-track`),a={equals:r},o=null,s=ae,c=1,l=2,u={owned:null,cleanups:null,context:null,owner:null},d=null,f=null,p=null,m=null,h=null,g=0;function _(e,t){let n=p,r=d,i=e.length===0,a=t===void 0?r:t,o=i?u:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(v(o));d=o,p=null;try{return M(s,!0)}finally{p=n,d=r}}function v(e){return()=>S(()=>F(e))}function y(e,t){t=t?Object.assign({},a,t):a;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[D.bind(n),e=>(typeof e==`function`&&(e=f&&f.running&&f.sources.has(n)?e(n.tValue):e(n.value)),re(n,e))]}function b(e,t,n){O(A(e,t,!1,c))}function ee(e,t,n){s=oe;let r=A(e,t,!1,c),i=E&&ne(E);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),h?h.push(r):O(r)}function x(e,t,n){n=n?Object.assign({},a,n):a;let r=A(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,O(r),D.bind(r)}function S(e){if(p===null)return e();let t=p;p=null;try{return e()}finally{p=t}}function te(e){ee(()=>S(e))}function C(e){return d===null||(d.cleanups===null?d.cleanups=[e]:d.cleanups.push(e)),e}var[w,T]=y(!1);function ne(e){let t;return d&&d.context&&(t=d.context[e.id])!==void 0?t:e.defaultValue}var E;function D(){let e=f&&f.running;if(this.sources&&(e?this.tState:this.state)){if((e?this.tState:this.state)===c)O(this);else{let e=m;m=null,M(()=>N(this),!1),m=e}}if(p){let e=this.observers;if(!e||e[e.length-1]!==p){let t=e?e.length:0;p.sources?(p.sources.push(this),p.sourceSlots.push(t)):(p.sources=[this],p.sourceSlots=[t]),e?(e.push(p),this.observerSlots.push(p.sources.length-1)):(this.observers=[p],this.observerSlots=[p.sources.length-1])}}return e&&f.sources.has(this)?this.tValue:this.value}function re(e,t,n){let r=f&&f.running&&f.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(f){let r=f.running;(r||!n&&f.sources.has(e))&&(f.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&M(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=f&&f.running;r&&f.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?m.push(n):h.push(n),n.observers&&P(n)),r?n.tState=c:n.state=c)}if(m.length>1e6)throw m=[],Error()},!1)}return t}function O(e){if(!e.fn)return;F(e);let t=g;k(e,f&&f.running&&f.sources.has(e)?e.tValue:e.value,t),f&&!f.running&&f.sources.has(e)&&queueMicrotask(()=>{M(()=>{f&&(f.running=!0),p=d=e,k(e,e.tValue,t),p=d=null},!1)})}function k(e,t,n){let r,i=d,a=p;p=d=e;try{r=e.fn(t)}catch(t){return e.pure&&(f&&f.running?(e.tState=c,e.tOwned&&e.tOwned.forEach(F),e.tOwned=void 0):(e.state=c,e.owned&&e.owned.forEach(F),e.owned=null)),e.updatedAt=n+1,R(t)}finally{p=a,d=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?re(e,r,!0):f&&f.running&&e.pure?(f.sources.has(e)||(e.value=r),f.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function A(e,t,n,r=c,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:d,context:d?d.context:null,pure:n};return f&&f.running&&(a.state=0,a.tState=r),d===null||d!==u&&(f&&f.running&&d.pure?d.tOwned?d.tOwned.push(a):d.tOwned=[a]:d.owned?d.owned.push(a):d.owned=[a]),a}function j(e){let t=f&&f.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===l)return N(e);if(e.suspense&&S(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<g);){if(t&&f.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(f.disposed.has(t))return}if((t?e.tState:e.state)===c)O(e);else if((t?e.tState:e.state)===l){let t=m;m=null,M(()=>N(e,n[0]),!1),m=t}}}function M(e,t){if(m)return e();let n=!1;t||(m=[]),h?n=!0:h=[],g++;try{let t=e();return ie(n),t}catch(e){n||(h=null),m=null,R(e)}}function ie(e){if(m&&=(ae(m),null),e)return;let t;if(f){if(!f.promises.size&&!f.queue.size){let e=f.sources,n=f.disposed;h.push.apply(h,f.effects),t=f.resolve;for(let e of h)`tState`in e&&(e.state=e.tState),delete e.tState;f=null,M(()=>{for(let e of n)F(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)F(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}T(!1)},!1)}else if(f.running){f.running=!1,f.effects.push.apply(f.effects,h),h=null,T(!0);return}}let n=h;h=null,n.length&&M(()=>s(n),!1),t&&t()}function ae(e){for(let t=0;t<e.length;t++)j(e[t])}function oe(t){let r,i=0;for(r=0;r<t.length;r++){let e=t[r];e.user?t[i++]=e:j(e)}if(e.context){if(e.count){e.effects||=[],e.effects.push(...t.slice(0,i));return}n()}for(e.effects&&(e.done||!e.count)&&(t=[...e.effects,...t],i+=e.effects.length,delete e.effects),r=0;r<i;r++)j(t[r])}function N(e,t){let n=f&&f.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===c?i!==t&&(!i.updatedAt||i.updatedAt<g)&&j(i):e===l&&N(i,t)}}}function P(e){let t=f&&f.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=l:r.state=l,r.pure?m.push(r):h.push(r),r.observers&&P(r))}}function F(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)F(e.tOwned[t]);delete e.tOwned}if(f&&f.running&&e.pure)I(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)F(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}f&&f.running?e.tState=0:e.state=0}function I(e,t){if(t||(e.tState=0,f.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)I(e.owned[t])}function se(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function L(e,t,n){try{for(let n of t)n(e)}catch(e){R(e,n&&n.owner||null)}}function R(e,t=d){let n=o&&t&&t.context&&t.context[o],r=se(e);if(!n)throw r;h?h.push({fn(){L(r,n,t)},state:c}):L(r,n,t)}var ce=Symbol(`fallback`);function le(e){for(let t=0;t<e.length;t++)e[t]()}function z(e,t,n={}){let r=[],a=[],o=[],s=0,c=t.length>1?[]:null;return C(()=>le(o)),()=>{let l=e()||[],u=l.length,d,f;return l[i],S(()=>{let e,t,i,m,h,g,v,y,b;if(u===0)s!==0&&(le(o),o=[],r=[],a=[],s=0,c&&=[]),n.fallback&&(r=[ce],a[0]=_(e=>(o[0]=e,n.fallback())),s=1);else if(s===0){for(a=Array(u),f=0;f<u;f++)r[f]=l[f],a[f]=_(p);s=u}else{for(i=Array(u),m=Array(u),c&&(h=Array(u)),g=0,v=Math.min(s,u);g<v&&r[g]===l[g];g++);for(v=s-1,y=u-1;v>=g&&y>=g&&r[v]===l[y];v--,y--)i[y]=a[v],m[y]=o[v],c&&(h[y]=c[v]);for(e=new Map,t=Array(y+1),f=y;f>=g;f--)b=l[f],d=e.get(b),t[f]=d===void 0?-1:d,e.set(b,f);for(d=g;d<=v;d++)b=r[d],f=e.get(b),f!==void 0&&f!==-1?(i[f]=a[d],m[f]=o[d],c&&(h[f]=c[d]),f=t[f],e.set(b,f)):o[d]();for(f=g;f<u;f++)f in i?(a[f]=i[f],o[f]=m[f],c&&(c[f]=h[f],c[f](f))):a[f]=_(p);a=a.slice(0,s=u),r=l.slice(0)}return a});function p(e){if(o[f]=e,c){let[e,n]=y(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}function B(e,t){return S(()=>e(t||{}))}var ue=e=>`Stale read from <${e}>.`;function V(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return x(z(()=>e.each,e.children,t||void 0))}function H(e){let t=e.keyed,n=x(()=>e.when,void 0,void 0),r=t?n:x(n,void 0,{equals:(e,t)=>!e==!t});return x(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?S(()=>a(t?i:()=>{if(!S(r))throw ue(`Show`);return n()})):a}return e.fallback},void 0,void 0)}var U=e=>x(()=>e());function W(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null){if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&(d=l.get(t[c]))!=null&&d===r+u;)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++}else t[o++].remove()}}}var de=`_$DX_DELEGATE`;function fe(e,t,n,r={}){let i;return _(r=>{i=r,t===document?e():K(t,e(),!n&&t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function G(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>S(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function pe(e,t=window.document){let n=t[de]||(t[de]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,ve))}}function me(e,t,n){_e(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function he(e,t){_e(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function ge(e,t,n){if(!t)return n?me(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function K(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return q(e,t,r,n);b(r=>q(e,t(),r,n),r)}function _e(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function ve(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,"target",{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0);try{if(t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}finally{t=n=null}}function q(e,t,n,r,i){let a=_e(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=X(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=X(e,n,r)}else if(o===`function`)return b(()=>{let i=t();for(;typeof i==`function`;)i=i();n=q(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(J(o,t,n,i))return b(()=>n=q(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=X(e,n,r),s)return n}else c?n.length===0?Y(e,o,r):W(e,n,o):(n&&X(e),Y(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=X(e,n,r,t);X(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function J(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(o!=null&&o!==!0&&o!==!1){if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=J(e,o,s)||i;else if(c===`function`){if(r){for(;typeof o==`function`;)o=o();i=J(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0}else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}}return i}function Y(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function X(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}var ye=new URLSearchParams(window.location.search).get(`t`)??``;async function Z(e,t={}){let n=await fetch(e,{...t,headers:{...t.body?{"content-type":`application/json`}:{},"x-plan-token":ye,...t.headers??{}}});if(!n.ok)throw Error(`${t.method??`GET`} ${e} → HTTP ${n.status}`);return await n.json()}function be(){return Z(`/api/state`)}async function Q(e,t){return(await Z(`/api/toggle`,{method:`POST`,body:JSON.stringify({item:e,checked:t})})).state}function $(e){return Z(`/api/report?id=${encodeURIComponent(e)}`)}function xe(e,t,n){let r=new EventSource(`/api/events?t=${encodeURIComponent(ye)}`);return r.addEventListener(`state`,()=>e()),r.onopen=()=>n?.(!0),r.onerror=()=>{n?.(!1),t(`connection lost — the page stops updating; reopen it from the extension`)},()=>r.close()}var Se=G(`<p class="banner error">`),Ce=G(`<p><strong></strong> new change record<!> waiting to be clustered — run <code>/ask-uat</code>.`),we=G(`<p><strong></strong> record<!> no behaviour line; clustering them means reading the files — <code>/ask-uat legacy</code> includes them.`),Te=G(`<div class="banner pending">`),Ee=G(`<p class=empty>Nothing to verify. Run <code>/ask-uat</code> after the next round of changes lands.`),De=G(`<button class=accepted><span class=accepted-left><svg viewBox="0 0 24 24"aria-hidden=true class="icon ok"><circle cx=12 cy=12 r=9></circle><path d="M8 12.5 11 15.5 16.5 9"></path></svg><strong> accepted</strong><span class=muted>— expand to undo a tick</span></span><svg viewBox="0 0 24 24"aria-hidden=true class=icon><path>`),Oe=G(`<ul class="items accepted-list">`),ke=G(`<p class=note>Nothing waiting — the queue is caught up.`),Ae=G(`<p class=note> new · <!> unlabeled. The next run clusters up to 12 items from 40 records.`),je=G(`<code>/ask-uat legacy`),Me=G(`<section class=card><span class=kicker>Recently accepted</span><ul class=recents>`),Ne=G(`<ul class=retired>`),Pe=G(`<section class=card><button class=card-toggle><span class=kicker>Retired · </span><svg viewBox="0 0 24 24"aria-hidden=true class=icon><path></path></svg></button><p class=note>No user-visible behaviour (<code>none:</code>) or retired by the agent. They stay on disk and never come back as pending.`),Fe=G(`<div class=page><div class="glow glow-a"></div><div class="glow glow-b"></div><div class="glow glow-c"></div><div class=shell><header class=head><div class=brand><div class=mark><svg viewBox="0 0 24 24"aria-hidden=true><path d="M5 12.5 10 17.5 19 7.5"></path></svg></div><span class=brand-label>Acceptance · UAT</span></div><div class=head-row><div><h1>Acceptance</h1><p class=meta><span class=mono></span><span class=dot></span><span> open</span><span class=dot></span><span class=meta-strong> accepted</span><span class=dot></span><span> waiting</span></p></div><button class=ghost><svg viewBox="0 0 24 24"aria-hidden=true class=icon><path d="M21 12a9 9 0 1 1-2.6-6.4M21 4v5h-5"></path></svg>refresh</button></div></header><section class=progress aria-label="Acceptance progress"><div class=score><span class=score-num></span><span class=score-label>of <!> verified</span></div><div class=track-wrap><div class=track><div class=track-fill></div></div><div class=legend><span class=legend-item><i class=legend-dot></i> still open</span><span class="legend-item legend-ok"><i class="legend-dot leaf"></i> accepted</span><span class=legend-item><i class="legend-dot amber"></i> not clustered</span></div></div><div class=live><span class=live-label>SSE</span><span><i></i></span></div></section><div class=layout><main class=board><div class=list-head><span class=kicker>Needs verification</span><span class=list-count> item</span></div><ul class=items></ul></main><aside class=rail><section class=card><span class=kicker>How this works</span><ul class=bullets><li>A tick writes the ledger immediately — there is no submit step.</li><li>Closing the page keeps every decision.</li><li>A ticked item can be unticked; the ledger just gets another event.</li></ul></section><section class="card wash"><span class=kicker>Queue</span><div class=commands><code>/ask-uat</code></div></section><p class="root mono">`),Ie=G(`<p class="banner error"> malformed ledger line(s) were skipped — check .agents/uat/ledger.jsonl.`),Le=G(`<span class="badge reopened">reopened`),Re=G(`<span class="badge area">`),ze=G(`<span class=kicker>Test plan`),Be=G(`<ol class=steps>`),Ve=G(`<span class=kicker>Edge cases`),He=G(`<ul class=edge>`),Ue=G(`<div class=skip><span class=kicker>Not under test</span><p>`),We=G(`<div class=skip><span class=kicker>Spec</span><p class=mono>`),Ge=G(`<button class="chip chip-more">`),Ke=G(`<div class=details><p class=kicker>Evidence</p><div class=chips>`),qe=G(`<li class=item><label class=check><input type=checkbox><span class=check-box></span></label><div class=body><div class=row><h2></h2><span class=badges><span class=badge> record</span><span class=badge></span></span></div><p class=summary></p><button class=more>`),Je=G(`<li>`),Ye=G(`<button class=chip>`),Xe=G(`<li class="item done"><label class=check><input type=checkbox><span class="check-box checked"><svg viewBox="0 0 24 24"aria-hidden=true><path d="M5 12.5 10 17.5 19 7.5"></path></svg></span></label><div class=body><h2></h2><p class=summary></p><p class=stamp>accepted `),Ze=G(`<section class=card><span class=kicker>This batch</span><span class="mono batch-id"></span><div class=rule></div><div class=kv><span>Items</span><strong></strong></div><div class=kv><span>Records linked</span><strong></strong></div><div class=kv><span>Clustered in</span><strong></strong></div><p class=note>Items stream in while the agent clusters; this page never needs a reload.`),Qe=G(`<li><svg viewBox="0 0 24 24"aria-hidden=true class="icon ok"><circle cx=12 cy=12 r=9></circle><path d="M8 12.5 11 15.5 16.5 9"></path></svg><span>`),$e=G(`<li><span class=mono></span><span class=retired-reason></span><span>`),et=G(`<div class=drawer><div class=drawer-inner><div class=drawer-head><span class="drawer-title mono"><svg viewBox="0 0 24 24"aria-hidden=true class=icon><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"></path><path d="M14 3v5h5"></path></svg>.md</span><button class=link>close</button></div><pre></pre><p class=drawer-note>Read-only evidence — ticking happens on the item above.`);function tt(){let[e,t]=y(),[n,r]=y(),[i,a]=y(!0),[o,s]=y(new Set),[c,l]=y(new Set),[u,d]=y(),[f,p]=y(),[m,h]=y(!1),[g,_]=y(!1);async function v(){try{t(await be()),r(void 0)}catch(e){r(e instanceof Error?e.message:String(e))}}te(()=>{v(),C(xe(()=>void v(),e=>r(e),e=>a(e)))});let ee=x(()=>e()?.open??[]),S=x(()=>e()?.checked??[]),w=x(()=>e()?.counts??{items:0,open:0,checked:0,pending:0,pendingNew:0,pendingLegacy:0,retired:0,totalRecords:0}),T=x(()=>w().open+w().checked),ne=x(()=>{let e=T();return e===0?0:Math.round(w().checked/e*100)}),E=x(()=>e()?.batches?.[0]),D=x(()=>{let t=E()?.id;return t?(e()?.items??[]).filter(e=>e.batch===t):[]}),re=x(()=>D().reduce((e,t)=>e+t.reports.length,0)),O=x(()=>{let e=E()?.at;if(!e)return;let t=D().map(e=>Date.parse(e.createdAt)).filter(e=>Number.isFinite(e)).reduce((e,t)=>Math.max(e,t),Date.parse(e)),n=Math.round((t-Date.parse(e))/6e4);return Number.isFinite(n)?Math.max(0,n):void 0}),k=x(()=>w().pendingNew+w().pendingLegacy),A=x(()=>{let t=e()?.root??``;return t.split(/[\\/]/).filter(Boolean).pop()??t});function j(e){let t=new Set(o());t.has(e)?t.delete(e):t.add(e),s(t)}function M(e){let t=new Set(c());t.has(e)?t.delete(e):t.add(e),l(t)}async function ie(e,n){p(e);try{let i=await Q(e,n);t(i),r(void 0)}catch(e){r(e instanceof Error?e.message:String(e))}finally{p(void 0)}}async function ae(e){try{d(await $(e))}catch(e){r(e instanceof Error?e.message:String(e))}}return(()=>{var t=Fe(),r=t.firstChild.nextSibling.nextSibling.nextSibling,a=r.firstChild,s=a.firstChild.nextSibling.firstChild,l=s.firstChild.nextSibling.firstChild,p=l.nextSibling.nextSibling,y=p.firstChild,x=p.nextSibling.nextSibling,te=x.firstChild,C=x.nextSibling.nextSibling,oe=C.firstChild,N=s.nextSibling,P=a.nextSibling,F=P.firstChild,I=F.firstChild,se=I.nextSibling,L=se.firstChild.nextSibling;L.nextSibling;var R=F.nextSibling,ce=R.firstChild,le=ce.firstChild,z=ce.nextSibling.firstChild,ue=z.firstChild.nextSibling,W=z.nextSibling,de=W.firstChild.nextSibling,fe=W.nextSibling,G=fe.firstChild.nextSibling,pe=R.nextSibling.firstChild.nextSibling,_e=pe.firstChild,ve=P.nextSibling,q=ve.firstChild,J=q.firstChild,Y=J.firstChild.nextSibling,X=Y.firstChild,ye=J.nextSibling,Z=q.nextSibling,be=Z.firstChild,Q=be.nextSibling,$=Q.firstChild.nextSibling;$.firstChild;var xe=Q.nextSibling;return K(l,A),K(p,()=>w().open,y),K(x,()=>w().checked,te),K(C,k,oe),N.$$click=()=>void v(),K(r,B(H,{get when(){return n()},get children(){var e=Se();return K(e,n),e}}),P),K(r,B(H,{get when(){return e()?.skipped},children:e=>(()=>{var t=Ie(),n=t.firstChild;return K(t,e,n),t})()}),P),K(I,()=>w().checked),K(se,T,L),K(z,()=>w().open,ue),K(W,()=>w().checked,de),K(fe,k,G),K(pe,()=>i()?`live`:`offline`,null),K(r,B(H,{get when(){return k()>0},get children(){var e=Te();return K(e,B(H,{get when(){return w().pendingNew>0},get children(){var e=Ce(),t=e.firstChild,n=t.nextSibling.nextSibling;return n.nextSibling,K(t,()=>w().pendingNew),K(e,()=>w().pendingNew===1?``:`s`,n),e}}),null),K(e,B(H,{get when(){return w().pendingLegacy>0},get children(){var e=we(),t=e.firstChild,n=t.nextSibling.nextSibling;return n.nextSibling,K(t,()=>w().pendingLegacy),K(e,()=>w().pendingLegacy===1?` has`:`s have`,n),e}}),null),e}}),ve),K(Y,()=>w().open,X),K(Y,()=>w().open===1?``:`s`,null),K(q,B(H,{get when(){return U(()=>!!e())()&&ee().length===0},get children(){return Ee()}}),ye),K(ye,B(V,{get each(){return ee()},children:e=>(()=>{var t=qe(),n=t.firstChild,r=n.firstChild,i=n.nextSibling,a=i.firstChild,s=a.firstChild,l=s.nextSibling,u=l.firstChild,d=u.firstChild,p=u.nextSibling,m=a.nextSibling,h=m.nextSibling;return r.addEventListener(`change`,()=>void ie(e.id,!0)),r.checked=!1,K(s,()=>e.title),K(l,B(H,{get when(){return e.reopened},get children(){return Le()}}),u),K(u,()=>e.reports.length,d),K(u,()=>e.reports.length===1?``:`s`,null),K(l,B(H,{get when(){return e.area},get children(){var t=Re();return K(t,()=>e.area),t}}),p),K(p,()=>nt(e.createdAt)),K(m,()=>e.summary),h.$$click=()=>j(e.id),K(h,()=>o().has(e.id)?`hide test plan`:`show test plan`,null),K(h,(()=>{var t=U(()=>!!o().has(e.id));return()=>t()?``:` · ${e.steps.length} steps`})(),null),K(i,B(H,{get when(){return o().has(e.id)},get children(){var t=Ke(),n=t.firstChild,r=n.nextSibling;return K(t,B(H,{get when(){return e.steps.length>0},get children(){return[ze(),(()=>{var t=Be();return K(t,B(V,{get each(){return e.steps},children:e=>(()=>{var t=Je();return K(t,e),t})()})),t})()]}}),n),K(t,B(H,{get when(){return e.edge.length>0},get children(){return[Ve(),(()=>{var t=He();return K(t,B(V,{get each(){return e.edge},children:e=>(()=>{var t=Je();return K(t,e),t})()})),t})()]}}),n),K(t,B(H,{get when(){return e.skip},get children(){var t=Ue(),n=t.firstChild.nextSibling;return K(n,()=>e.skip),t}}),n),K(t,B(H,{get when(){return e.spec},get children(){var t=We(),n=t.firstChild.nextSibling;return K(n,()=>e.spec),t}}),n),K(r,B(V,{get each(){return U(()=>!!c().has(e.id))()?e.reports:e.reports.slice(0,6)},children:e=>(()=>{var t=Ye();return t.$$click=()=>void ae(e),K(t,()=>it(e)),t})()}),null),K(r,B(H,{get when(){return e.reports.length>6},get children(){var t=Ge();return t.$$click=()=>M(e.id),K(t,(()=>{var t=U(()=>!!c().has(e.id));return()=>t()?`less`:`+${e.reports.length-6}`})()),t}}),null),t}}),null),b(()=>r.disabled=f()===e.id),t})()})),K(q,B(H,{get when(){return w().checked>0},get children(){return[(()=>{var e=De(),t=e.firstChild,n=t.firstChild.nextSibling,r=n.firstChild,i=t.nextSibling.firstChild;return e.$$click=()=>h(!m()),K(n,()=>w().checked,r),b(()=>me(i,`d`,m()?`M6 15l6-6 6 6`:`M6 9l6 6 6-6`)),e})(),B(H,{get when(){return m()},get children(){var e=Oe();return K(e,B(V,{get each(){return S()},children:e=>(()=>{var t=Xe(),n=t.firstChild,r=n.firstChild,i=n.nextSibling.firstChild,a=i.nextSibling,o=a.nextSibling;return o.firstChild,r.addEventListener(`change`,()=>void ie(e.id,!1)),r.checked=!0,K(i,()=>e.title),K(a,()=>e.summary),K(o,()=>rt(e.checkedAt??e.createdAt),null),b(()=>r.disabled=f()===e.id),t})()})),e}})]}}),null),K(Z,B(H,{get when(){return E()},children:e=>(()=>{var t=Ze(),n=t.firstChild.nextSibling,r=n.nextSibling.nextSibling,i=r.firstChild.nextSibling,a=r.nextSibling,o=a.firstChild.nextSibling,s=a.nextSibling.firstChild.nextSibling;return K(n,()=>e().id),K(i,()=>D().length),K(o,re),K(s,(()=>{var e=U(()=>O()===void 0);return()=>e()?`—`:`${O()} min`})()),t})()}),be),K(Q,B(H,{get when(){return k()===0},get children(){return ke()}}),$),K(Q,B(H,{get when(){return k()>0},get children(){var e=Ae(),t=e.firstChild,n=t.nextSibling;return n.nextSibling,K(e,()=>w().pendingNew,t),K(e,()=>w().pendingLegacy,n),e}}),$),K($,B(H,{get when(){return w().pendingLegacy>0},get children(){return je()}}),null),K(Z,B(H,{get when(){return w().checked>0},get children(){var e=Me(),t=e.firstChild.nextSibling;return K(t,B(V,{get each(){return S().slice(0,3)},children:e=>(()=>{var t=Qe(),n=t.firstChild.nextSibling;return K(n,()=>e.title),t})()})),e}}),xe),K(Z,B(H,{get when(){return w().retired>0},get children(){var t=Pe(),n=t.firstChild,r=n.firstChild;r.firstChild;var i=r.nextSibling.firstChild;return n.nextSibling,n.$$click=()=>_(!g()),K(r,()=>w().retired,null),K(t,B(H,{get when(){return g()},get children(){var t=Ne();return K(t,B(V,{get each(){return(e()?.retired??[]).slice(0,40)},children:e=>(()=>{var t=$e(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling;return K(n,()=>it(e.id)),K(r,()=>e.reason===`none`?`none:`:`dropped`),K(i,()=>e.title),t})()})),t}}),null),b(()=>me(i,`d`,g()?`M6 15l6-6 6 6`:`M6 9l6 6 6-6`)),t}}),xe),K(xe,()=>e()?.root),K(t,B(H,{get when(){return u()},children:e=>(()=>{var t=et(),n=t.firstChild.firstChild,r=n.firstChild,i=r.firstChild.nextSibling,a=r.nextSibling,o=n.nextSibling;return K(r,()=>e().id,i),a.$$click=()=>d(void 0),K(o,()=>e().text),t})()}),null),b(e=>{var t=`width:${ne()}%`,n=i()?`live-state`:`live-state down`,r=i()?`legend-dot leaf`:`legend-dot amber`;return e.e=ge(le,t,e.e),n!==e.t&&he(pe,e.t=n),r!==e.a&&he(_e,e.a=r),e},{e:void 0,t:void 0,a:void 0}),t})()}function nt(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleDateString(void 0,{month:`2-digit`,day:`2-digit`})}function rt(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function it(e){let t=/^(\d{4})-(\d{2})-(\d{2})_(\d{4})/.exec(e);return t?`${t[2]}-${t[3]}_${t[4]}`:e.length>22?`${e.slice(0,20)}…`:e}pe([`click`]);var at=document.getElementById(`root`);at&&fe(()=>B(tt,{}),at);
@@ -0,0 +1 @@
1
+ :root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--paper:#f4faf6;--paper-deep:#e8f3ec;--surface:#fffdfb;--line:#d8e7dd;--ink:#16281e;--muted:#5b7465;--leaf:#2e9b63;--leaf-deep:#1b7a4b;--leaf-soft:#dcf0e4;--warn:#a9741b;--danger:#c4483c;--shadow:0 10px 32px #163a2612;--font-display:"P052", "Palatino Linotype", Palatino, "Iowan Old Style", Georgia, "Noto Serif", "Songti SC", serif;--font-sans:"Ubuntu Sans", "Noto Sans", "Droid Sans Fallback", system-ui, sans-serif;--font-mono:"Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace}*{box-sizing:border-box}body{background:var(--paper);color:var(--ink);font:14px/1.6 var(--font-sans);-webkit-font-smoothing:antialiased;margin:0}code{background:var(--paper-deep);font:.92em var(--font-mono);color:var(--leaf-deep);border-radius:6px;padding:.05rem .35rem}button{font:inherit;color:inherit;cursor:pointer}.mono{font-family:var(--font-mono)}.page{background:linear-gradient(180deg, var(--paper), var(--paper-deep));min-height:100vh;position:relative;overflow-x:hidden}.glow{filter:blur(130px);pointer-events:none;border-radius:50%;position:absolute}.glow-a{opacity:.5;background:#bfe7cd;width:660px;height:660px;top:-220px;left:-200px}.glow-b{opacity:.45;background:#e4f6c6;width:580px;height:580px;top:200px;right:-260px}.glow-c{opacity:.24;background:#cdeaf0;width:540px;height:540px;top:860px;left:120px}.shell{max-width:1160px;margin:0 auto;padding:52px 24px 96px;position:relative}.brand{align-items:center;gap:12px;display:flex}.mark{background:linear-gradient(135deg, var(--leaf), #7bc96f);border-radius:10px;place-items:center;width:32px;height:32px;display:grid}.mark svg{fill:none;stroke:#fff;stroke-width:2.4px;stroke-linecap:round;stroke-linejoin:round;width:16px;height:16px}.brand-label{letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-size:12px;font-weight:700}.head-row{justify-content:space-between;align-items:flex-start;gap:24px;margin-top:6px;display:flex}h1{font:400 40px/1.1 var(--font-display);letter-spacing:-.01em;margin:0}.meta{color:var(--muted);flex-wrap:wrap;align-items:center;gap:10px;margin:8px 0 0;font-size:12px;display:flex}.meta .dot{background:#c3d6c9;border-radius:50%;width:4px;height:4px}.meta-strong{color:var(--leaf-deep);font-weight:700}.head{border-bottom:1px solid var(--line);padding-bottom:28px}.ghost{border:1px solid var(--line);background:var(--surface);height:36px;color:var(--ink);border-radius:10px;align-items:center;gap:7px;padding:0 14px;font-size:12px;transition:border-color .12s,background .12s;display:inline-flex}.ghost:hover{border-color:var(--leaf);background:var(--leaf-soft)}.icon{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;flex:none;width:14px;height:14px}.icon.ok{color:var(--leaf-deep)}.link{color:var(--muted);background:0 0;border:0;padding:0;font-size:12px}.link:hover{color:var(--leaf-deep)}.banner{border:1px solid var(--line);background:var(--surface);border-radius:12px;margin:20px 0 0;padding:14px 18px;font-size:13px}.banner.error{border-color:var(--danger);color:var(--danger)}.banner.pending{border-color:color-mix(in srgb, var(--warn) 45%, var(--line));border-left:3px solid var(--warn);color:var(--ink)}.banner.pending p{margin:0}.banner.pending p+p{color:var(--muted);margin-top:6px}.progress{border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow);border-radius:16px;align-items:center;gap:36px;margin-top:32px;padding:24px 28px;display:flex}.score{flex-direction:column;min-width:128px;display:flex}.score-num{font:400 40px/1 var(--font-display);color:var(--leaf-deep)}.score-label{color:var(--muted);margin-top:4px;font-size:12px}.track-wrap{flex:1;min-width:0}.track{background:var(--paper-deep);border-radius:999px;height:10px;overflow:hidden}.track-fill{background:var(--leaf);border-radius:999px;height:100%;transition:width .24s}.legend{color:var(--muted);flex-wrap:wrap;gap:20px;margin-top:12px;font-size:12px;display:flex}.legend-item{align-items:center;gap:6px;display:inline-flex}.legend-dot{background:var(--muted);border-radius:50%;flex:none;width:6px;height:6px}.legend-dot.leaf{background:var(--leaf)}.legend-dot.amber{background:var(--warn)}.legend-ok{color:var(--leaf-deep);font-weight:700}.live{text-align:right;min-width:92px}.live-label{letter-spacing:.12em;color:var(--muted);font-size:12px;font-weight:700;display:block}.live-state{color:var(--leaf-deep);align-items:center;gap:5px;margin-top:4px;font-size:12px;font-weight:700;display:inline-flex}.live-state.down{color:var(--warn)}.layout{grid-template-columns:minmax(0,1fr) 344px;align-items:start;gap:32px;margin-top:28px;display:grid}.board{min-width:0}.list-head{justify-content:space-between;align-items:center;margin:4px 0 14px;display:flex}.kicker{letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-size:12px;font-weight:700;display:block}.kicker.inline{letter-spacing:.08em;display:inline}.list-count{color:var(--muted);font-size:12px}.empty{border:1px dashed var(--line);background:color-mix(in srgb, var(--surface) 60%, transparent);color:var(--muted);text-align:center;border-radius:16px;margin:0;padding:32px}.items{flex-direction:column;gap:16px;margin:0;padding:0;list-style:none;display:flex}.item{border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow);border-radius:16px;align-items:flex-start;gap:14px;padding:18px 22px;display:flex}.item.done{background:color-mix(in srgb, var(--surface) 70%, var(--paper-deep));box-shadow:none}.check{cursor:pointer;flex:none;margin-top:2px;position:relative}.check input{opacity:0;cursor:pointer;position:absolute;inset:0}.check-box{border:1.5px solid var(--line);background:var(--surface);border-radius:8px;place-items:center;width:22px;height:22px;transition:border-color .12s,background .12s;display:grid}.check:hover .check-box{border-color:var(--leaf)}.check input:focus-visible+.check-box{outline:2px solid var(--leaf);outline-offset:2px}.check-box.checked{border-color:var(--leaf);background:var(--leaf)}.check-box svg{fill:none;stroke:#fff;stroke-width:2.4px;stroke-linecap:round;stroke-linejoin:round;width:14px;height:14px}.item .body{flex:1;min-width:0}.item h2{font:400 20px/1.4 var(--font-display);margin:0}.row{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.badges{flex-wrap:wrap;flex:none;justify-content:flex-end;gap:6px;padding-top:2px;display:flex}.badge{background:var(--paper-deep);color:var(--muted);white-space:nowrap;border-radius:999px;padding:3px 9px;font-size:12px}.badge.area{background:var(--leaf-soft);color:var(--leaf-deep)}.badge.reopened{background:color-mix(in srgb, var(--warn) 16%, var(--surface));color:var(--warn)}.summary{color:var(--muted);margin:8px 0 0;font-size:14px;line-height:1.6}.more{color:var(--leaf-deep);background:0 0;border:0;margin-top:10px;padding:0;font-size:12px;font-weight:700}.more:hover{text-decoration:underline}.details{border-top:1px solid var(--line);margin-top:14px;padding-top:14px}.details .kicker+*{margin-top:8px}.details>*+*{margin-top:14px}.steps{counter-reset:step;margin:0;padding:0;list-style:none}.steps li{color:var(--ink);padding-left:26px;font-size:14px;line-height:1.55;position:relative}.steps li+li{margin-top:6px}.steps li:before{counter-increment:step;content:counter(step);font:12px/1.6 var(--font-mono);color:var(--leaf-deep);position:absolute;top:1px;left:0}.edge{margin:0;padding:0;list-style:none}.edge li{color:var(--muted);padding-left:16px;font-size:14px;line-height:1.55;position:relative}.edge li+li{margin-top:6px}.edge li:before{content:"";background:#c3d6c9;border-radius:50%;width:4px;height:4px;position:absolute;top:10px;left:0}.skip p{color:var(--muted);margin:6px 0 0;font-size:14px;line-height:1.55}.chips{flex-wrap:wrap;gap:6px;display:flex}.chip{background:var(--paper-deep);font:12px/1.33 var(--font-mono);color:var(--muted);border:0;border-radius:8px;padding:5px 9px}.chip:hover,.chip-more{background:var(--leaf-soft);color:var(--leaf-deep)}.stamp{color:var(--muted);margin:8px 0 0;font-size:12px}.accepted{border:1px solid var(--line);background:var(--paper);text-align:left;border-radius:12px;justify-content:space-between;align-items:center;gap:12px;width:100%;height:56px;margin-top:16px;padding:0 20px;display:flex}.accepted-left{align-items:center;gap:10px;font-size:14px;display:flex}.accepted .muted{color:var(--muted);font-size:12px}.accepted-list{margin-top:12px}.rail{flex-direction:column;gap:18px;min-width:0;display:flex}.card{border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow);border-radius:16px;padding:20px}.card.wash{background:var(--paper);box-shadow:none}.batch-id{color:var(--ink);margin-top:8px;font-size:12px;display:block}.rule{background:var(--line);height:1px;margin:10px 0}.kv{color:var(--muted);justify-content:space-between;align-items:center;font-size:12px;display:flex}.kv+.kv{margin-top:8px}.kv strong{color:var(--ink)}.note{color:var(--muted);margin:10px 0 0;font-size:12px;line-height:1.5}.bullets{margin:10px 0 0;padding:0;list-style:none}.bullets li{color:var(--muted);padding-left:15px;font-size:12px;line-height:1.5;position:relative}.bullets li+li{margin-top:8px}.bullets li:before{content:"";background:var(--leaf);border-radius:50%;width:5px;height:5px;position:absolute;top:7px;left:0}.commands{flex-wrap:wrap;gap:6px;margin-top:12px;display:flex}.commands code{background:var(--leaf-soft);color:var(--leaf-deep);padding:5px 9px;font-size:12px}.recents,.retired{margin:10px 0 0;padding:0;list-style:none}.recents li{color:var(--muted);align-items:flex-start;gap:8px;font-size:12px;display:flex}.recents li+li{margin-top:8px}.retired li{color:var(--muted);flex-wrap:wrap;align-items:baseline;gap:8px;font-size:12px;display:flex}.retired li+li{margin-top:8px}.retired .mono{font-size:11px}.retired-reason{background:var(--paper-deep);color:var(--warn);border-radius:999px;padding:1px 6px;font-size:11px}.card-toggle{text-align:left;background:0 0;border:0;justify-content:space-between;align-items:center;width:100%;padding:0;display:flex}.card-toggle .kicker{margin:0}.root{color:var(--muted);word-break:break-all;margin:4px 0 0;font-size:12px}.drawer{z-index:20;background:var(--surface);border-top:1px solid var(--line);border-radius:20px 20px 0 0;flex-direction:column;max-height:min(70vh,420px);animation:.16s slide-up;display:flex;position:fixed;inset:auto 0 0;box-shadow:0 -18px 48px #163a261f}@keyframes slide-up{0%{opacity:0;transform:translateY(12px)}}.drawer-inner{width:100%;max-width:1160px;margin:0 auto;padding:24px 24px 20px;overflow:auto}.drawer-head{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:16px;padding-bottom:12px;display:flex}.drawer-title{color:var(--ink);align-items:center;gap:10px;font-size:12px;font-weight:700;display:inline-flex}.drawer pre{font:13px/1.65 var(--font-mono);color:var(--muted);white-space:pre-wrap;word-break:break-word;margin:16px 0 0}.drawer-note{color:var(--muted);margin:16px 0 0;font-size:12px}@media (max-width:1040px){.layout{grid-template-columns:minmax(0,1fr)}.rail{flex-flow:wrap}.rail>.card{flex:260px}}@media (max-width:680px){.shell{padding:32px 16px 80px}.head-row{flex-direction:column}.progress{flex-direction:column;align-items:flex-start;gap:18px}.live{text-align:left}.item{padding:16px}.row{flex-direction:column}.badges{justify-content:flex-start;padding-top:0}.rail{flex-direction:column}}
@@ -4,9 +4,9 @@
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <meta name="robots" content="noindex" />
7
- <title>ask-uat — acceptance</title>
8
- <script type="module" crossorigin src="/index-DCBQCsli.js"></script>
9
- <link rel="stylesheet" crossorigin href="/index-D-W9zj0w.css">
7
+ <title>Acceptance — ask-uat</title>
8
+ <script type="module" crossorigin src="/index-CPTHXggT.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/index-D9S_sCVr.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
@@ -123,6 +123,17 @@ function harness(): Harness {
123
123
  };
124
124
  }
125
125
 
126
+ async function recordChange(h: Harness, title: string, behavior: string): Promise<string> {
127
+ const result = await h.tools.get(RECORD_CHANGE_TOOL)!.execute(
128
+ "t",
129
+ { title, body: "body", behavior },
130
+ undefined,
131
+ undefined,
132
+ h.ctx,
133
+ );
134
+ return (result.details as { id: string }).id;
135
+ }
136
+
126
137
  /** POST JSON the way the page does. */
127
138
  async function post(url: string, path: string, body: unknown): Promise<{ status: number; body: any }> {
128
139
  const parsed = new URL(url);
@@ -202,8 +213,8 @@ describe("ask-uat command", () => {
202
213
  });
203
214
 
204
215
  it("opens the page and dispatches clustering only when records are pending", async () => {
205
- createRecord(root, { title: "alpha change", body: "body", now: new Date(2026, 10, 12, 9, 0) });
206
216
  const h = harness();
217
+ await recordChange(h, "alpha change", "The operator sees alpha.");
207
218
  await h.commands.get(UAT_COMMAND)!.handler("", h.ctx);
208
219
 
209
220
  expect(h.openBrowser).toHaveBeenCalledTimes(1);
@@ -222,7 +233,7 @@ describe("ask-uat command", () => {
222
233
  await h.commands.get(UAT_COMMAND)!.handler("", h.ctx);
223
234
  expect(h.openBrowser).toHaveBeenCalledTimes(1);
224
235
  expect(h.sendUserMessage).not.toHaveBeenCalled();
225
- expect(h.notify).toHaveBeenCalledWith(expect.stringContaining("0 pending"), "info");
236
+ expect(h.notify).toHaveBeenCalledWith(expect.stringContaining("0 new"), "info");
226
237
  await h.commands.get(UAT_COMMAND)!.handler("off", h.ctx);
227
238
  h.shutdown();
228
239
  });
@@ -240,13 +251,39 @@ describe("ask-uat command", () => {
240
251
  const h = harness();
241
252
  await h.commands.get(UAT_COMMAND)!.handler("", h.ctx);
242
253
  expect(h.sendUserMessage).not.toHaveBeenCalled();
243
- createRecord(root, { title: "later change", body: "body", now: new Date(2026, 10, 13, 20, 0) });
254
+ await recordChange(h, "later change", "The operator sees the later thing.");
244
255
  await h.commands.get(UAT_COMMAND)!.handler("", h.ctx);
245
256
  expect(h.sendUserMessage).toHaveBeenCalledWith(expect.stringContaining("later change"));
246
257
  await h.commands.get(UAT_COMMAND)!.handler("off", h.ctx);
247
258
  h.shutdown();
248
259
  });
249
260
 
261
+ it("leaves records without a behaviour line out of a default run and points at legacy", async () => {
262
+ const h = harness();
263
+ await recordChange(h, "new change", "The operator sees the new thing.");
264
+ createRecord(root, { title: "old file", body: "body", now: new Date(2026, 10, 1, 9, 0) });
265
+ await h.commands.get(UAT_COMMAND)!.handler("", h.ctx);
266
+ const kickoff = h.sendUserMessage.mock.calls[0][0] as string;
267
+ expect(kickoff).toContain("new change");
268
+ expect(kickoff).not.toContain("old file");
269
+ expect(kickoff).toContain("/ask-uat legacy");
270
+ await h.commands.get(UAT_COMMAND)!.handler("off", h.ctx);
271
+ h.shutdown();
272
+ });
273
+
274
+ it("/ask-uat legacy puts records without a behaviour line into the work order", async () => {
275
+ const h = harness();
276
+ createRecord(root, { title: "old file", body: "body", now: new Date(2026, 10, 1, 9, 0) });
277
+ await h.commands.get(UAT_COMMAND)!.handler("legacy", h.ctx);
278
+ expect(h.sendUserMessage).toHaveBeenCalledTimes(1);
279
+ const kickoff = h.sendUserMessage.mock.calls[0][0] as string;
280
+ expect(kickoff).toContain("old file");
281
+ expect(kickoff).toContain("read the record");
282
+ expect(kickoff).toContain("Open each file before you cluster it");
283
+ await h.commands.get(UAT_COMMAND)!.handler("off", h.ctx);
284
+ h.shutdown();
285
+ });
286
+
250
287
  it("removes phase tools on a session switch", async () => {
251
288
  const h = harness();
252
289
  await h.commands.get(UAT_COMMAND)!.handler("", h.ctx);
@@ -338,6 +375,62 @@ describe("record_change", () => {
338
375
  });
339
376
  });
340
377
 
378
+ describe("uat_item drop", () => {
379
+ it("retires records by id without creating an item", async () => {
380
+ const first = createRecord(root, { title: "docs only", body: "body", now: new Date(2026, 10, 12, 9, 0) });
381
+ const h = harness();
382
+ await h.commands.get(UAT_COMMAND)!.handler("", h.ctx);
383
+ const result = await h.tools.get(UAT_ITEM_TOOL)!.execute(
384
+ "t",
385
+ { op: "drop", reports: [first.entry.id], reason: "documentation only" },
386
+ undefined,
387
+ undefined,
388
+ h.ctx,
389
+ );
390
+ expect(result.isError).toBeFalsy();
391
+ expect(result.content[0].text).toContain("Retired 1 record");
392
+ const state = uatSummary(root);
393
+ expect(state.items).toEqual([]);
394
+ expect(state.pending).toEqual([]);
395
+ expect(state.counts.retired).toBe(1);
396
+ expect(state.retired[0]).toMatchObject({ id: first.entry.id, reason: "dropped" });
397
+ await h.commands.get(UAT_COMMAND)!.handler("off", h.ctx);
398
+ h.shutdown();
399
+ });
400
+
401
+ it("rejects a drop that names nothing", async () => {
402
+ const h = harness();
403
+ await h.commands.get(UAT_COMMAND)!.handler("", h.ctx);
404
+ const result = await h.tools.get(UAT_ITEM_TOOL)!.execute(
405
+ "t",
406
+ { op: "drop" },
407
+ undefined,
408
+ undefined,
409
+ h.ctx,
410
+ );
411
+ expect(result.isError).toBe(true);
412
+ expect(result.content[0].text).toContain("needs `item` or `reports`");
413
+ await h.commands.get(UAT_COMMAND)!.handler("off", h.ctx);
414
+ h.shutdown();
415
+ });
416
+
417
+ it("rejects a drop naming an unknown record", async () => {
418
+ const h = harness();
419
+ await h.commands.get(UAT_COMMAND)!.handler("", h.ctx);
420
+ const result = await h.tools.get(UAT_ITEM_TOOL)!.execute(
421
+ "t",
422
+ { op: "drop", reports: ["2099-01-01_0000_ghost"] },
423
+ undefined,
424
+ undefined,
425
+ h.ctx,
426
+ );
427
+ expect(result.isError).toBe(true);
428
+ expect(result.content[0].text).toContain("Unknown change record");
429
+ await h.commands.get(UAT_COMMAND)!.handler("off", h.ctx);
430
+ h.shutdown();
431
+ });
432
+ });
433
+
341
434
  describe("page round-trip", () => {
342
435
  it("clusters an item, then accepts it through the API", async () => {
343
436
  const first = createRecord(root, {
@@ -30,7 +30,14 @@ import {
30
30
  UAT_ITEM_TOOL,
31
31
  } from "./constants.js";
32
32
  import { registerUatItemTool } from "./item-tool.js";
33
- import { deriveState, ledgerPath, readEvents, appendEvent, newEventId } from "./ledger.js";
33
+ import {
34
+ deriveState,
35
+ ledgerPath,
36
+ readEvents,
37
+ appendEvent,
38
+ newEventId,
39
+ type PendingCandidate,
40
+ } from "./ledger.js";
34
41
  import { listRecords } from "./records.js";
35
42
  import { buildUatKickoff, describeCounts, UAT_MODE_BANNER } from "./prompt.js";
36
43
  import { registerRecordTool } from "./record-tool.js";
@@ -169,23 +176,43 @@ export function registerUat(pi: ExtensionAPI, options: UatOptions = {}): void {
169
176
  }
170
177
 
171
178
  /** Dispatch one clustering turn; the open page streams the resulting items. */
172
- function dispatchClustering(): void {
179
+ function planCandidates(
180
+ pending: readonly PendingCandidate[],
181
+ includeLegacy: boolean,
182
+ limit: number,
183
+ ): { picked: PendingCandidate[]; legacyRemaining: number } {
184
+ const fresh = pending.filter((entry) => entry.hasBehavior);
185
+ const historical = pending.filter((entry) => !entry.hasBehavior);
186
+ // New records first: they are cheap to cluster and carry the operator's
187
+ // actual behaviour sentence. Historical files only fill what is left.
188
+ const picked = fresh.slice(0, limit);
189
+ if (includeLegacy) {
190
+ picked.push(...historical.slice(0, Math.max(0, limit - picked.length)));
191
+ }
192
+ const included = picked.filter((entry) => !entry.hasBehavior).length;
193
+ return { picked, legacyRemaining: historical.length - included };
194
+ }
195
+
196
+ function dispatchClustering(includeLegacy = false): void {
173
197
  if (!root) return;
174
198
  const state = loadSnapshot(root).state;
175
- if (state.pending.length === 0) return;
176
- batch = openBatch(state.pending.length);
199
+ const planned = planCandidates(state.pending, includeLegacy, maxCandidates);
200
+ if (planned.picked.length === 0) return;
201
+ batch = openBatch(planned.picked.length);
177
202
  const fresh = loadSnapshot(root).state;
178
203
  pi.sendUserMessage(
179
204
  buildUatKickoff({
180
- pending: fresh.pending,
205
+ pending: planned.picked,
181
206
  openItems: fresh.open,
182
207
  maxCandidates,
183
208
  maxItems,
209
+ legacy: includeLegacy,
210
+ legacyRemaining: planned.legacyRemaining,
184
211
  }),
185
212
  );
186
213
  }
187
214
 
188
- async function start(ctx: ExtensionContext): Promise<void> {
215
+ async function start(ctx: ExtensionContext, includeLegacy = false): Promise<void> {
189
216
  const projectRoot = rootOf(ctx.cwd || process.cwd());
190
217
  if (!frameworkInstalled(projectRoot)) {
191
218
  const missing = frameworkMissing(projectRoot);
@@ -209,7 +236,7 @@ export function registerUat(pi: ExtensionAPI, options: UatOptions = {}): void {
209
236
  ctx.ui.notify(`ask-uat: page reopened — ${describeCounts(state)}.`, "info");
210
237
  // A second /ask-uat is the explicit "cluster what arrived since then"
211
238
  // action; merely reopening must not leave new records stuck forever.
212
- if (state.pending.length > 0 && ctx.isIdle()) dispatchClustering();
239
+ if (state.pending.length > 0 && ctx.isIdle()) dispatchClustering(includeLegacy);
213
240
  return;
214
241
  }
215
242
 
@@ -254,12 +281,12 @@ export function registerUat(pi: ExtensionAPI, options: UatOptions = {}): void {
254
281
  }
255
282
 
256
283
  if (pending.length === 0) return;
257
- dispatchClustering();
284
+ dispatchClustering(includeLegacy);
258
285
  }
259
286
 
260
287
  pi.registerCommand(UAT_COMMAND, {
261
288
  description:
262
- "Acceptance: cluster unaccepted change records into user-facing items, then open the page. `open` reopens it, `off` closes it.",
289
+ "Acceptance: cluster unaccepted change records into user-facing items, then open the page. `legacy` also includes records without a behaviour line, `open` reopens it, `off` closes it.",
263
290
  handler: async (args: string, ctx: ExtensionContext) => {
264
291
  const arg = args.trim();
265
292
  ctxRef = ctx;
@@ -280,11 +307,14 @@ export function registerUat(pi: ExtensionAPI, options: UatOptions = {}): void {
280
307
  ctx.ui.notify(`ask-uat: ${server.url}`, "info");
281
308
  return;
282
309
  }
283
- if (arg !== "") {
284
- ctx.ui.notify("ask-uat: usage — /ask-uat | /ask-uat open | /ask-uat off", "warning");
310
+ if (arg !== "" && arg !== "legacy") {
311
+ ctx.ui.notify(
312
+ "ask-uat: usage — /ask-uat | /ask-uat legacy | /ask-uat open | /ask-uat off",
313
+ "warning",
314
+ );
285
315
  return;
286
316
  }
287
- await start(ctx);
317
+ await start(ctx, arg === "legacy");
288
318
  },
289
319
  });
290
320
 
@@ -41,7 +41,8 @@ const PARAMS = Type.Object({
41
41
  ),
42
42
  item: Type.Optional(
43
43
  Type.String({
44
- description: "Target item id (link/amend/merge/drop). Omit for create — the id is generated.",
44
+ description:
45
+ "Target item id (link/amend/merge/drop). Omit for create — the id is generated. On drop it may be omitted when `reports` names the records to retire.",
45
46
  }),
46
47
  ),
47
48
  title: Type.Optional(Type.String({ description: "Short user-facing title (create/amend)." })),
@@ -69,7 +70,8 @@ const PARAMS = Type.Object({
69
70
  area: Type.Optional(Type.String({ description: "Short area label used for grouping." })),
70
71
  reports: Type.Optional(
71
72
  Type.Array(Type.String({ description: "Change-record id, e.g. 2026-11-13_2107_ask-uat." }), {
72
- description: "Change records that are evidence for this item (create/link).",
73
+ description:
74
+ "Change records that are evidence for this item (create/link). On drop, records to retire without creating an item.",
73
75
  }),
74
76
  ),
75
77
  sources: Type.Optional(
@@ -92,6 +94,7 @@ const GUIDELINES = [
92
94
  "Write `summary` in 2-3 sentences from the operator's point of view; never mention file names or functions there.",
93
95
  "Use op=\"link\" when the new evidence belongs to an already-open item; create a new item only for a distinct behaviour.",
94
96
  "Use op=\"drop\" with a reason for work that shipped but never became user-visible, or that was abandoned.",
97
+ "To retire records that should never be tested, pass op=\"drop\" with `reports` (and no item) instead of creating an item just to drop it.",
95
98
  ];
96
99
 
97
100
  function errorResult(text: string) {
@@ -210,7 +213,7 @@ export function registerUatItemTool(pi: ExtensionAPI, options: UatItemToolOption
210
213
  content: [
211
214
  {
212
215
  type: "text" as const,
213
- text: `Linked ${fresh.length} record${fresh.length === 1 ? "" : "s"} to ${summarize(item)}. If it was accepted, the page now shows it as reopened.`,
216
+ text: `Linked ${fresh.length} record${fresh.length === 1 ? "" : "s"} to ${summarize(item)}. The page updates immediately; only evidence newer than the last tick reopens an accepted item.`,
214
217
  },
215
218
  ],
216
219
  details: { item: item.id },
@@ -259,17 +262,42 @@ export function registerUatItemTool(pi: ExtensionAPI, options: UatItemToolOption
259
262
  };
260
263
  }
261
264
  case "drop": {
262
- const item = findItem((params.item ?? "").trim());
263
- if (!item) return errorResult("uat_item: `item` must be an existing open item id.");
265
+ const itemId = (params.item ?? "").trim();
266
+ const requested = (params.reports ?? []).map((value) => value.trim()).filter(Boolean);
267
+ if (itemId === "" && requested.length === 0) {
268
+ return errorResult("uat_item: drop needs `item` or `reports`.");
269
+ }
270
+ let reports: string[] = [];
271
+ if (requested.length > 0) {
272
+ const checked = checkReports(requested);
273
+ if (typeof checked === "string") return errorResult(`uat_item: ${checked}`);
274
+ reports = checked;
275
+ }
276
+ if (itemId !== "") {
277
+ const item = findItem(itemId);
278
+ if (!item) return errorResult("uat_item: `item` must be an existing open item id.");
279
+ }
264
280
  append({
265
281
  ...base,
266
282
  type: "drop",
267
- item: item.id,
283
+ ...(itemId !== "" ? { item: itemId } : {}),
284
+ ...(reports.length > 0 ? { reports } : {}),
268
285
  reason: params.reason?.trim() || undefined,
269
286
  });
287
+ const counts = [
288
+ itemId !== "" ? `item ${itemId}` : "",
289
+ reports.length > 0
290
+ ? `${reports.length} record${reports.length === 1 ? "" : "s"}`
291
+ : "",
292
+ ].filter(Boolean);
270
293
  return {
271
- content: [{ type: "text" as const, text: `Dropped ${item.id}.` }],
272
- details: { item: item.id },
294
+ content: [
295
+ {
296
+ type: "text" as const,
297
+ text: `Retired ${counts.join(" and ")}. Retired records leave the pending queue; nothing was deleted.`,
298
+ },
299
+ ],
300
+ details: { item: itemId !== "" ? itemId : undefined, reports },
273
301
  };
274
302
  }
275
303
  default: