austere-axi 0.16.0 → 0.17.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/README.md +1 -1
- package/dist/austere.js +2 -2
- package/dist/catalog.json +1 -1
- package/dist/cli.mjs +100 -92
- package/dist/packs/shadcn/catalog.json +2 -2
- package/dist/packs/shadcn/pack.js +1 -1
- package/package.json +1 -1
- package/skills/austere/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ Repeat until it is right. When you are done, press **Done** (or **Send & finish*
|
|
|
50
50
|
|
|
51
51
|
## What else it does
|
|
52
52
|
|
|
53
|
-
- **Bring in a teammate.** Ask your agent to publish the page and invite someone by name (turn cloud features on
|
|
53
|
+
- **Bring in a teammate.** Ask your agent to publish the page and invite someone by name (first turn cloud features on and sign in once: `austere-axi cloud on`, then `austere-axi cloud login`). Each person gets their own link, and their notes appear under their name. You see their notes first and decide which ones go to the agent. [More on sharing](docs/hosted-pages.md). On your own network, the hub's **Settings** makes a named link, lets people ask for access, and shows who has it ([Team review](docs/team-review.md), [Settings](docs/hub.md#settings)).
|
|
54
54
|
- **Review from your phone.** The review page has a phone layout. This needs [Tailscale](https://tailscale.com) on your computer and phone. [How it works](docs/how-it-works.md#the-review-loop).
|
|
55
55
|
- **Send someone a copy.** "Download standalone HTML" in the page's ⋯ menu saves the page as one file that opens in any browser, offline.
|
|
56
56
|
- **Nothing gets lost.** Every note is saved the moment you send it. If the agent is busy or your computer restarts, the notes are waiting when the agent comes back.
|
package/dist/austere.js
CHANGED
|
@@ -1759,12 +1759,12 @@ dataLane = Group("DATA STORES WITH A HEADING LONGER THAN THE COLUMN IS WIDE", [c
|
|
|
1759
1759
|
<button type="button" data-act="queue" class="primary">Add to queue</button>
|
|
1760
1760
|
</span>
|
|
1761
1761
|
</div>
|
|
1762
|
-
</div>`,document.body.appendChild(o);let r=o.querySelector(".austere-hover"),n=o.querySelector(".austere-hover-label"),i=o.querySelector(".austere-selbtn"),s=o.querySelector(".austere-pop"),l=o.querySelector(".austere-pop-path"),u=o.querySelector(".austere-pop-quote"),d=o.querySelector("textarea"),p=o.querySelector('[data-act="history"]'),f={},m=!1;function x(){let K=v&&f[v.targetId]||0;p.hidden=K<2,p.textContent=`History (${K})`}d.addEventListener("focus",()=>e({type:"writing",on:!0})),d.addEventListener("blur",()=>e({type:"writing",on:!1}));let v=null,w=null,b=0,k=null,S=K=>K instanceof Element&&!!K.closest(`[${xv}]`),I=K=>K instanceof Element&&K.closest("[data-oui-id]")||null;function C(K,ue,me=4){K.style.left=`${ue.left-me}px`,K.style.top=`${ue.top-me}px`,K.style.width=`${ue.width+me*2}px`,K.style.height=`${ue.height+me*2}px`}let M=null,A=null,D=null;function z(K,ue){let me=ue?Re(ue):MX(K);r.style.visibility=me?"":"hidden",me&&C(r,me)}function T(K,ue=null,me=K&&ue?TEt(K,ue):null,Ce=NEt(ue)){if(M=K,A=ue,D=me,!K){r.hidden=!0;return}z(K,ue),n.textContent=`${K.getAttribute("data-oui-id")} \xB7 ${K.getAttribute("data-oui-c")}${Ce}`,r.hidden=!1}function O(K){a!=="annotate"||!s.hidden||(k=K.target,!b&&(b=requestAnimationFrame(()=>{b=0;let ue=k;if(!(ue instanceof Element)||S(ue))return;let me=I(ue);T(me,me&&AEt(me,ue))})))}function B(){let K=window.getSelection();return!!K&&!K.isCollapsed&&K.toString().trim().length>0}function P(K){if(a!=="annotate"||S(K.target))return;if(!s.hidden){K.preventDefault(),K.stopPropagation();return}if(B())return;let ue=K.target;if(!(ue instanceof Element)||!K.altKey&&ue.closest(hOa))return;let me=I(ue);me&&(K.preventDefault(),K.stopPropagation(),te({target:me,el:ue,point:{x:K.clientX,y:K.clientY}}))}function H(){if(a!=="annotate"||!s.hidden)return;let K=window.getSelection();if(!K||K.isCollapsed||!K.rangeCount){i.hidden=!0,w=null;return}let ue=K.toString().trim(),me=K.getRangeAt(0),Ce=me.commonAncestorContainer,we=Ce instanceof Element?Ce:Ce.parentElement,Y=I(we);if(!ue||!we||!Y||S(we)){i.hidden=!0,w=null;return}let se=me.getBoundingClientRect();w={target:Y,el:we,selection:eh(ue,600),point:{x:se.left,y:se.bottom}},i.hidden=!1;let xe=i.offsetWidth||140;i.style.left=`${Math.max(8,Math.min(window.innerWidth-xe-8,se.left+se.width/2-xe/2))}px`,i.style.top=`${Math.max(8,Math.min(window.innerHeight-40,se.bottom+8))}px`}let V=0;function W(){clearTimeout(V),V=window.setTimeout(H,120)}i.addEventListener("mousedown",K=>K.preventDefault()),i.addEventListener("click",K=>{K.preventDefault(),K.stopPropagation(),w&&te(w),i.hidden=!0});function Z(){let K=v;K&&(l.textContent="",K.path.forEach((ue,me)=>{let Ce=document.createElement("button");if(Ce.type="button",Ce.className="austere-chip"+(ue.id===K.targetId?" active":""),Ce.textContent=ue.id,Ce.title=ue.component,Ce.addEventListener("click",()=>{K.targetId=ue.id,K.component=ue.component,x();let we=me===K.path.length-1;if(!K.target.isConnected){let se=K.path[K.path.length-1].id;K.target=document.querySelector(`[data-oui-id="${CSS.escape(se)}"]`)??K.target}let Y=`[data-oui-id="${CSS.escape(ue.id)}"]`;T(K.target.closest(Y)??document.querySelector(Y),we?K.piece:null,we?K.relocate:null,we?K.pieceLabel:""),st(),Z(),d.focus()}),l.appendChild(Ce),me<K.path.length-1){let we=document.createElement("span");we.className="austere-chip-sep",we.textContent="\u203A",l.appendChild(we)}}))}function te({target:K,el:ue,selection:me,point:Ce}){let we=gOa(K),Y=yOa(K,ue),se=_X(K,ue),xe=AEt(K,ue),le;if(!me){let Lt=se||ue;le=eh((Lt instanceof HTMLElement?Lt.innerText:void 0)||Lt.textContent,200)||void 0,se&&le===Y?.part&&(le=void 0)}let rt=REt(K);e({type:"focus",id:rt.id}),v={target:K,piece:xe,relocate:xe&&TEt(K,xe),pieceLabel:NEt(xe),targetId:rt.id,component:rt.component,path:we,selection:me||void 0,excerpt:le,detail:Y},Z(),x();let Ze=me||le||Y?.part||"";u.textContent=eh(Ze,220),u.hidden=!Ze,d.value="",r.hidden=!0,i.hidden=!0,T(K,xe,v.relocate,v.pieceLabel),r.classList.add("locked"),s.hidden=!1,ae(Ce),d.focus()}function ae(K){if(window.innerWidth<640){s.classList.add("sheet"),s.style.left=s.style.top="";return}s.classList.remove("sheet");let ue=s.offsetWidth||360,me=s.offsetHeight||200,Ce=K.x+12,we=K.y+12;Ce+ue>window.innerWidth-8&&(Ce=Math.max(8,K.x-ue-12)),we+me>window.innerHeight-8&&(we=Math.max(8,K.y-me-12)),s.style.left=`${Ce}px`,s.style.top=`${we}px`}function q(){document.activeElement===d&&d.blur(),s.hidden=!0,r.classList.remove("locked"),r.hidden=!0,v=null}function ne(){let K=d.value.trim();if(!v)return;if(!K&&!v.selection){d.focus(),d.classList.add("shake"),setTimeout(()=>d.classList.remove("shake"),400);return}let ue={kind:"annotation",target:v.targetId,component:v.component,path:v.path.map(we=>we.id),note:K};v.selection&&(ue.selection=v.selection),v.excerpt&&!v.selection&&(ue.excerpt=v.excerpt),v.detail&&v.targetId===v.path[v.path.length-1].id&&(ue.detail=v.detail),e({type:"annotate",item:ue});let me=v.targetId,Ce=ue.detail?A:null;q(),window.getSelection()?.removeAllRanges(),Ce?.isConnected?Ve(Ce,"queued"):Ee([me],"queued")}s.addEventListener("click",K=>{let ue=K.target instanceof Element?K.target.closest("[data-act]")?.getAttribute("data-act"):void 0;ue==="cancel"&&q(),ue==="queue"&&ne(),ue==="history"&&v&&e({type:"history",id:v.targetId})}),d.addEventListener("keydown",K=>{K.key==="Enter"&&!K.shiftKey&&!K.isComposing?(K.preventDefault(),ne()):K.key==="Escape"&&(K.preventDefault(),d.value.trim()||q())}),document.addEventListener("mousemove",O,{passive:!0}),document.addEventListener("click",P,!0),document.addEventListener("mouseup",W),document.addEventListener("keyup",K=>{(K.shiftKey||K.key.startsWith("Arrow"))&&W()}),document.addEventListener("selectionchange",()=>{"ontouchstart"in window&&W()}),document.addEventListener("keydown",K=>{(K.metaKey||K.ctrlKey)&&(K.key==="i"||K.key==="I")?(K.preventDefault(),e({type:"toggle-mode"})):m&&(K.metaKey||K.ctrlKey)&&!K.altKey&&(K.key==="k"||K.key==="K")&&(K.preventDefault(),e({type:"quick-switch"}))}),window.addEventListener("scroll",()=>{if(!s.hidden)return Pe();r.hidden=!0,i.hidden=!0},{passive:!0}),document.addEventListener("mouseleave",()=>{s.hidden&&(r.hidden=!0)});function fe(K,ue,me,Ce=new Set){if(Ce.has(K))return[];Ce.add(K);let we=document.querySelectorAll(`[data-oui-id="${CSS.escape(K)}"]`);return we.length?Array.from(we):!ue||!me?[]:me(ue,K).flatMap(Y=>fe(Y,ue,me,Ce))}function U(K,ue,me){let Ce=new Set;for(let we of K)for(let Y of fe(we,ue,me))Ce.add(Y);return Array.from(Ce).filter(we=>!Array.from(Ce).some(Y=>Y!==we&&Y.contains(we)))}function Be(K,ue){let me=document.createElement("div");return me.setAttribute(xv,""),me.className=ue,me.style.left=`${K.left+window.scrollX-4}px`,me.style.top=`${K.top+window.scrollY-4}px`,me.style.width=`${K.width+8}px`,me.style.height=`${K.height+8}px`,me}function We(K){if(getComputedStyle(K).display!=="contents")return CX(K);let[ue,me,Ce,we]=[1/0,1/0,-1/0,-1/0],Y=xe=>{!xe.width&&!xe.height||([ue,me,Ce,we]=[Math.min(ue,xe.left),Math.min(me,xe.top),Math.max(Ce,xe.right),Math.max(we,xe.bottom)])},se=xe=>{for(let le of xe.childNodes)if(le instanceof Element)getComputedStyle(le).display==="contents"?se(le):Y(CX(le));else if(le.nodeType===Node.TEXT_NODE&&le.textContent?.trim()){let rt=document.createRange();rt.selectNodeContents(le),Y(rt.getBoundingClientRect())}};return se(K),{left:ue,top:me,right:Ce,bottom:we}}function Oe(K){for(let ue=K.closest("[hidden='until-found']");ue?.parentElement;ue=K.closest("[hidden='until-found']"))K=ue.parentElement;return K}function Re(K){let ue=Oe(K),{left:me,top:Ce,right:we,bottom:Y}=We(ue),se=we===me,xe=Y===Ce;if(se&&xe)return null;for(let Ze=ue.parentElement;Ze&&Ze!==document.body;Ze=Ze.parentElement){let Lt=getComputedStyle(Ze),Ut=Lt.overflowX!=="visible",Ga=Lt.overflowY!=="visible";if(!Ut&&!Ga||Lt.display==="contents")continue;let Na=Ze.getBoundingClientRect();Ut&&([me,we]=[Math.max(me,Na.left),Math.min(we,Na.right)]),Ga&&([Ce,Y]=[Math.max(Ce,Na.top),Math.min(Y,Na.bottom)])}let le=se?we>=me:we>me,rt=xe?Y>=Ce:Y>Ce;return le&&rt?{left:me,top:Ce,width:we-me,height:Y-Ce}:null}function Ve(K,ue){let me=Re(K);if(!me)return;let Ce=Be(me,`austere-flash ${ue}`);document.body.appendChild(Ce),setTimeout(()=>Ce.remove(),2400)}function Ee(K,ue="changed",me,Ce){let we=U(K,me,Ce);for(let Y of we)Ve(Y,ue);return we}function re(K,ue,me){let Ce=fe(K,ue,me);if(!Ce.length)return!1;for(let se=Ce[0].closest("[hidden='until-found']");se;se=Ce[0].closest("[hidden='until-found']"))se.removeAttribute("hidden"),se.dispatchEvent(new Event("beforematch"));let we=MX(Ce[0]),Y=we.top+window.scrollY-Math.max(24,(window.innerHeight-we.height)/3);return window.scrollTo({top:Math.max(0,Y),behavior:"smooth"}),setTimeout(()=>Ee([K],"changed",ue,me),350),!0}let J=document.createElement("div");J.setAttribute(xv,""),o.appendChild(J);let ie=null,ge=0,Ae=document.createElement("div");Ae.setAttribute(xv,""),o.appendChild(Ae);let Me=[];function ct(){let[K,ue]=ie&&t?t():[],me=[],Ce=[];for(let we of ie?U(ie,K,ue):[]){let Y=Re(we);Y&&(me.push(we),Ce.push(Y))}return J.replaceChildren(...Ce.map(we=>Be(we,"austere-mark"))),me}function st(){if(!(r.hidden||!M)){if(!M.isConnected){let K=M.getAttribute("data-oui-id");M=document.querySelector(`[data-oui-id="${CSS.escape(K)}"]`)}M&&A&&!A.isConnected&&(A=D?.(M)??A),M?z(M,A):r.hidden=!0}}function Pe(){ge||!ie&&r.hidden&&!Me.length||(ge=requestAnimationFrame(()=>{ge=0,ie&&ct(),Me.length&&St(),st()}))}window.addEventListener("resize",Pe,{passive:!0}),new ResizeObserver(Pe).observe(document.body),new MutationObserver(K=>{K.some(ue=>!S(ue.target.nodeType===1?ue.target:ue.target.parentElement))&&Pe()}).observe(document.body,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["class","style","hidden","open","x","y","width","height","d","transform","viewBox"]}),document.addEventListener("scroll",K=>{K.target!==document&&Pe()},{capture:!0,passive:!0});function Ft(K,ue=!1){ie=K.length?K:null;let me=ct();if(ue&&me.length){let Ce=me.map(we=>MX(Oe(we)));if(!Ce.some(we=>we.bottom>0&&we.top<window.innerHeight)){let we=Ce[0],Y=we.top+window.scrollY-Math.max(24,(window.innerHeight-we.height)/3);window.scrollTo({top:Math.max(0,Y),behavior:"smooth"})}}return me.length}function St(){let[K,ue]=Me.length&&t?t():[],me=new Map;for(let we of Me)me.set(we.statement,[...me.get(we.statement)??[],we]);let Ce=[];for(let[we,Y]of me){let se=!1;for(let xe of U([we],K,ue)){let le=Re(xe);if(!le)continue;let rt=Be(le,"austere-focus");if(rt.style.setProperty("--austere-viewer",Y[0].colour),!se){se=!0;let Ze=document.createElement("div");Ze.className="austere-focus-names";for(let Lt of Y){let Ut=document.createElement("span");Ut.textContent=Lt.name,Ut.style.background=Lt.colour,Ze.appendChild(Ut)}rt.appendChild(Ze)}Ce.push(rt)}}Ae.replaceChildren(...Ce)}function qt(K){Me=K,St()}return{setQuickSwitch(K){m=K},setHistory(K){f=K,v&&x()},setMode(K){a=K==="annotate"?"annotate":"explore",document.documentElement.classList.toggle("austere-annotating",a==="annotate"),a!=="annotate"&&(q(),i.hidden=!0,r.hidden=!0)},flash:Ee,reveal:re,highlight:Ft,focus:qt}}var DEt={shadcn:{name:"@austere-axi/pack-shadcn",version:"0.16.0",components:["Progress","Avatar","AvatarGroup","Tooltip","HoverCard","Breadcrumb","BreadcrumbItem","Kbd","Skeleton","Calendar","Timeline","TimelineItem"]}};function xOa(e){let t=e.lastIndexOf("@");return t<=0?{name:e,version:""}:{name:e.slice(0,t),version:e.slice(t+1)}}var vOa=/^(@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,bOa=/^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/;function OEt(e){let t=[];for(let a of String(e||"").split(",")){let[o,r]=a.trim().split(/\s+/);if(!o)continue;let{name:n,version:i}=xOa(o);!vOa.test(n)||!bOa.test(i)||t.some(s=>s.name===n)||t.push(r&&/^sha(256|384|512)-[A-Za-z0-9+/=]+$/.test(r)?{name:n,version:i,integrity:r}:{name:n,version:i})}return t}var PEt="https://cdn.jsdelivr.net/npm";function BEt(e=document){let t=e.querySelector('meta[name="austere-packs"]');return t?OEt(t.getAttribute("content")||""):[]}function FEt(e,t){let a=[...t];for(let[o,r]of Object.entries(DEt))a.some(n=>n.name===r.name)||r.components.some(n=>new RegExp(`\\b${n}\\s*\\(`).test(e))&&a.push({name:r.name,version:r.version,bundled:o});return a}function AX(){return/\/__austere\/$/.test(w2)}function kOa(e){if(e.bundled)return{src:F4(`packs/${e.bundled}/pack.js`)||`${PEt}/austere-axi@${e.version}/dist/packs/${e.bundled}/pack.js`};if(AX()){let t=e.integrity?`?integrity=${encodeURIComponent(e.integrity)}`:"";return{src:`${w2}installed-packs/${encodeURIComponent(`${e.name}@${e.version}`)}/pack.js${t}`}}return{src:`${PEt}/${e.name}@${e.version}/dist/pack.js`,integrity:e.integrity}}function wOa(e,t){return new Promise((a,o)=>{let r=document.createElement("script");r.src=e,r.async=!0,t&&(r.integrity=t,r.crossOrigin="anonymous"),r.onload=()=>a(),r.onerror=()=>o(new Error(`could not load ${e}`)),document.head.appendChild(r)})}async function qEt(e,{onError:t}={}){let a=e.filter(o=>!hl().some(r=>r.name===o.name));return await Promise.all(a.map(o=>{let{src:r,integrity:n}=kOa(o);return wOa(r,n).then(()=>{hl().some(i=>i.name===o.name)||t?.(o,new Error(`${r} loaded but did not register pack ${o.name}`))},i=>t?.(o,i))})),hl()}function HEt(e){for(let t of e){if(!t.css)continue;let a=`austere-pack-css-${t.name.replace(/[^a-z0-9]/gi,"-")}`;if(document.getElementById(a))continue;let o=document.createElement("style");o.id=a,o.textContent=t.css,document.head.appendChild(o)}}var SOa=/[A-Za-z_$]/;function LOa(e){let t=[],a=String(e??""),o=0,r=1,n=a.length;for(;o<n;){let i=a[o];if(i===`
|
|
1762
|
+
</div>`,document.body.appendChild(o);let r=o.querySelector(".austere-hover"),n=o.querySelector(".austere-hover-label"),i=o.querySelector(".austere-selbtn"),s=o.querySelector(".austere-pop"),l=o.querySelector(".austere-pop-path"),u=o.querySelector(".austere-pop-quote"),d=o.querySelector("textarea"),p=o.querySelector('[data-act="history"]'),f={},m=!1;function x(){let K=v&&f[v.targetId]||0;p.hidden=K<2,p.textContent=`History (${K})`}d.addEventListener("focus",()=>e({type:"writing",on:!0})),d.addEventListener("blur",()=>e({type:"writing",on:!1}));let v=null,w=null,b=0,k=null,S=K=>K instanceof Element&&!!K.closest(`[${xv}]`),I=K=>K instanceof Element&&K.closest("[data-oui-id]")||null;function C(K,ue,me=4){K.style.left=`${ue.left-me}px`,K.style.top=`${ue.top-me}px`,K.style.width=`${ue.width+me*2}px`,K.style.height=`${ue.height+me*2}px`}let M=null,A=null,D=null;function z(K,ue){let me=ue?Re(ue):MX(K);r.style.visibility=me?"":"hidden",me&&C(r,me)}function T(K,ue=null,me=K&&ue?TEt(K,ue):null,Ce=NEt(ue)){if(M=K,A=ue,D=me,!K){r.hidden=!0;return}z(K,ue),n.textContent=`${K.getAttribute("data-oui-id")} \xB7 ${K.getAttribute("data-oui-c")}${Ce}`,r.hidden=!1}function O(K){a!=="annotate"||!s.hidden||(k=K.target,!b&&(b=requestAnimationFrame(()=>{b=0;let ue=k;if(!(ue instanceof Element)||S(ue))return;let me=I(ue);T(me,me&&AEt(me,ue))})))}function B(){let K=window.getSelection();return!!K&&!K.isCollapsed&&K.toString().trim().length>0}function P(K){if(a!=="annotate"||S(K.target))return;if(!s.hidden){K.preventDefault(),K.stopPropagation();return}if(B())return;let ue=K.target;if(!(ue instanceof Element)||!K.altKey&&ue.closest(hOa))return;let me=I(ue);me&&(K.preventDefault(),K.stopPropagation(),te({target:me,el:ue,point:{x:K.clientX,y:K.clientY}}))}function H(){if(a!=="annotate"||!s.hidden)return;let K=window.getSelection();if(!K||K.isCollapsed||!K.rangeCount){i.hidden=!0,w=null;return}let ue=K.toString().trim(),me=K.getRangeAt(0),Ce=me.commonAncestorContainer,we=Ce instanceof Element?Ce:Ce.parentElement,Y=I(we);if(!ue||!we||!Y||S(we)){i.hidden=!0,w=null;return}let se=me.getBoundingClientRect();w={target:Y,el:we,selection:eh(ue,600),point:{x:se.left,y:se.bottom}},i.hidden=!1;let xe=i.offsetWidth||140;i.style.left=`${Math.max(8,Math.min(window.innerWidth-xe-8,se.left+se.width/2-xe/2))}px`,i.style.top=`${Math.max(8,Math.min(window.innerHeight-40,se.bottom+8))}px`}let V=0;function W(){clearTimeout(V),V=window.setTimeout(H,120)}i.addEventListener("mousedown",K=>K.preventDefault()),i.addEventListener("click",K=>{K.preventDefault(),K.stopPropagation(),w&&te(w),i.hidden=!0});function Z(){let K=v;K&&(l.textContent="",K.path.forEach((ue,me)=>{let Ce=document.createElement("button");if(Ce.type="button",Ce.className="austere-chip"+(ue.id===K.targetId?" active":""),Ce.textContent=ue.id,Ce.title=ue.component,Ce.addEventListener("click",()=>{K.targetId=ue.id,K.component=ue.component,x();let we=me===K.path.length-1;if(!K.target.isConnected){let se=K.path[K.path.length-1].id;K.target=document.querySelector(`[data-oui-id="${CSS.escape(se)}"]`)??K.target}let Y=`[data-oui-id="${CSS.escape(ue.id)}"]`;T(K.target.closest(Y)??document.querySelector(Y),we?K.piece:null,we?K.relocate:null,we?K.pieceLabel:""),st(),Z(),d.focus()}),l.appendChild(Ce),me<K.path.length-1){let we=document.createElement("span");we.className="austere-chip-sep",we.textContent="\u203A",l.appendChild(we)}}))}function te({target:K,el:ue,selection:me,point:Ce}){let we=gOa(K),Y=yOa(K,ue),se=_X(K,ue),xe=AEt(K,ue),le;if(!me){let Lt=se||ue;le=eh((Lt instanceof HTMLElement?Lt.innerText:void 0)||Lt.textContent,200)||void 0,se&&le===Y?.part&&(le=void 0)}let rt=REt(K);e({type:"focus",id:rt.id}),v={target:K,piece:xe,relocate:xe&&TEt(K,xe),pieceLabel:NEt(xe),targetId:rt.id,component:rt.component,path:we,selection:me||void 0,excerpt:le,detail:Y},Z(),x();let Ze=me||le||Y?.part||"";u.textContent=eh(Ze,220),u.hidden=!Ze,d.value="",r.hidden=!0,i.hidden=!0,T(K,xe,v.relocate,v.pieceLabel),r.classList.add("locked"),s.hidden=!1,ae(Ce),d.focus()}function ae(K){if(window.innerWidth<640){s.classList.add("sheet"),s.style.left=s.style.top="";return}s.classList.remove("sheet");let ue=s.offsetWidth||360,me=s.offsetHeight||200,Ce=K.x+12,we=K.y+12;Ce+ue>window.innerWidth-8&&(Ce=Math.max(8,K.x-ue-12)),we+me>window.innerHeight-8&&(we=Math.max(8,K.y-me-12)),s.style.left=`${Ce}px`,s.style.top=`${we}px`}function q(){document.activeElement===d&&d.blur(),s.hidden=!0,r.classList.remove("locked"),r.hidden=!0,v=null}function ne(){let K=d.value.trim();if(!v)return;if(!K&&!v.selection){d.focus(),d.classList.add("shake"),setTimeout(()=>d.classList.remove("shake"),400);return}let ue={kind:"annotation",target:v.targetId,component:v.component,path:v.path.map(we=>we.id),note:K};v.selection&&(ue.selection=v.selection),v.excerpt&&!v.selection&&(ue.excerpt=v.excerpt),v.detail&&v.targetId===v.path[v.path.length-1].id&&(ue.detail=v.detail),e({type:"annotate",item:ue});let me=v.targetId,Ce=ue.detail?A:null;q(),window.getSelection()?.removeAllRanges(),Ce?.isConnected?Ve(Ce,"queued"):Ee([me],"queued")}s.addEventListener("click",K=>{let ue=K.target instanceof Element?K.target.closest("[data-act]")?.getAttribute("data-act"):void 0;ue==="cancel"&&q(),ue==="queue"&&ne(),ue==="history"&&v&&e({type:"history",id:v.targetId})}),d.addEventListener("keydown",K=>{K.key==="Enter"&&!K.shiftKey&&!K.isComposing?(K.preventDefault(),ne()):K.key==="Escape"&&(K.preventDefault(),d.value.trim()||q())}),document.addEventListener("mousemove",O,{passive:!0}),document.addEventListener("click",P,!0),document.addEventListener("mouseup",W),document.addEventListener("keyup",K=>{(K.shiftKey||K.key.startsWith("Arrow"))&&W()}),document.addEventListener("selectionchange",()=>{"ontouchstart"in window&&W()}),document.addEventListener("keydown",K=>{(K.metaKey||K.ctrlKey)&&(K.key==="i"||K.key==="I")?(K.preventDefault(),e({type:"toggle-mode"})):m&&(K.metaKey||K.ctrlKey)&&!K.altKey&&(K.key==="k"||K.key==="K")&&(K.preventDefault(),e({type:"quick-switch"}))}),window.addEventListener("scroll",()=>{if(!s.hidden)return Pe();r.hidden=!0,i.hidden=!0},{passive:!0}),document.addEventListener("mouseleave",()=>{s.hidden&&(r.hidden=!0)});function fe(K,ue,me,Ce=new Set){if(Ce.has(K))return[];Ce.add(K);let we=document.querySelectorAll(`[data-oui-id="${CSS.escape(K)}"]`);return we.length?Array.from(we):!ue||!me?[]:me(ue,K).flatMap(Y=>fe(Y,ue,me,Ce))}function U(K,ue,me){let Ce=new Set;for(let we of K)for(let Y of fe(we,ue,me))Ce.add(Y);return Array.from(Ce).filter(we=>!Array.from(Ce).some(Y=>Y!==we&&Y.contains(we)))}function Be(K,ue){let me=document.createElement("div");return me.setAttribute(xv,""),me.className=ue,me.style.left=`${K.left+window.scrollX-4}px`,me.style.top=`${K.top+window.scrollY-4}px`,me.style.width=`${K.width+8}px`,me.style.height=`${K.height+8}px`,me}function We(K){if(getComputedStyle(K).display!=="contents")return CX(K);let[ue,me,Ce,we]=[1/0,1/0,-1/0,-1/0],Y=xe=>{!xe.width&&!xe.height||([ue,me,Ce,we]=[Math.min(ue,xe.left),Math.min(me,xe.top),Math.max(Ce,xe.right),Math.max(we,xe.bottom)])},se=xe=>{for(let le of xe.childNodes)if(le instanceof Element)getComputedStyle(le).display==="contents"?se(le):Y(CX(le));else if(le.nodeType===Node.TEXT_NODE&&le.textContent?.trim()){let rt=document.createRange();rt.selectNodeContents(le),Y(rt.getBoundingClientRect())}};return se(K),{left:ue,top:me,right:Ce,bottom:we}}function Oe(K){for(let ue=K.closest("[hidden='until-found']");ue?.parentElement;ue=K.closest("[hidden='until-found']"))K=ue.parentElement;return K}function Re(K){let ue=Oe(K),{left:me,top:Ce,right:we,bottom:Y}=We(ue),se=we===me,xe=Y===Ce;if(se&&xe)return null;for(let Ze=ue.parentElement;Ze&&Ze!==document.body;Ze=Ze.parentElement){let Lt=getComputedStyle(Ze),Ut=Lt.overflowX!=="visible",Ga=Lt.overflowY!=="visible";if(!Ut&&!Ga||Lt.display==="contents")continue;let Na=Ze.getBoundingClientRect();Ut&&([me,we]=[Math.max(me,Na.left),Math.min(we,Na.right)]),Ga&&([Ce,Y]=[Math.max(Ce,Na.top),Math.min(Y,Na.bottom)])}let le=se?we>=me:we>me,rt=xe?Y>=Ce:Y>Ce;return le&&rt?{left:me,top:Ce,width:we-me,height:Y-Ce}:null}function Ve(K,ue){let me=Re(K);if(!me)return;let Ce=Be(me,`austere-flash ${ue}`);document.body.appendChild(Ce),setTimeout(()=>Ce.remove(),2400)}function Ee(K,ue="changed",me,Ce){let we=U(K,me,Ce);for(let Y of we)Ve(Y,ue);return we}function re(K,ue,me){let Ce=fe(K,ue,me);if(!Ce.length)return!1;for(let se=Ce[0].closest("[hidden='until-found']");se;se=Ce[0].closest("[hidden='until-found']"))se.removeAttribute("hidden"),se.dispatchEvent(new Event("beforematch"));let we=MX(Ce[0]),Y=we.top+window.scrollY-Math.max(24,(window.innerHeight-we.height)/3);return window.scrollTo({top:Math.max(0,Y),behavior:"smooth"}),setTimeout(()=>Ee([K],"changed",ue,me),350),!0}let J=document.createElement("div");J.setAttribute(xv,""),o.appendChild(J);let ie=null,ge=0,Ae=document.createElement("div");Ae.setAttribute(xv,""),o.appendChild(Ae);let Me=[];function ct(){let[K,ue]=ie&&t?t():[],me=[],Ce=[];for(let we of ie?U(ie,K,ue):[]){let Y=Re(we);Y&&(me.push(we),Ce.push(Y))}return J.replaceChildren(...Ce.map(we=>Be(we,"austere-mark"))),me}function st(){if(!(r.hidden||!M)){if(!M.isConnected){let K=M.getAttribute("data-oui-id");M=document.querySelector(`[data-oui-id="${CSS.escape(K)}"]`)}M&&A&&!A.isConnected&&(A=D?.(M)??A),M?z(M,A):r.hidden=!0}}function Pe(){ge||!ie&&r.hidden&&!Me.length||(ge=requestAnimationFrame(()=>{ge=0,ie&&ct(),Me.length&&St(),st()}))}window.addEventListener("resize",Pe,{passive:!0}),new ResizeObserver(Pe).observe(document.body),new MutationObserver(K=>{K.some(ue=>!S(ue.target.nodeType===1?ue.target:ue.target.parentElement))&&Pe()}).observe(document.body,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["class","style","hidden","open","x","y","width","height","d","transform","viewBox"]}),document.addEventListener("scroll",K=>{K.target!==document&&Pe()},{capture:!0,passive:!0});function Ft(K,ue=!1){ie=K.length?K:null;let me=ct();if(ue&&me.length){let Ce=me.map(we=>MX(Oe(we)));if(!Ce.some(we=>we.bottom>0&&we.top<window.innerHeight)){let we=Ce[0],Y=we.top+window.scrollY-Math.max(24,(window.innerHeight-we.height)/3);window.scrollTo({top:Math.max(0,Y),behavior:"smooth"})}}return me.length}function St(){let[K,ue]=Me.length&&t?t():[],me=new Map;for(let we of Me)me.set(we.statement,[...me.get(we.statement)??[],we]);let Ce=[];for(let[we,Y]of me){let se=!1;for(let xe of U([we],K,ue)){let le=Re(xe);if(!le)continue;let rt=Be(le,"austere-focus");if(rt.style.setProperty("--austere-viewer",Y[0].colour),!se){se=!0;let Ze=document.createElement("div");Ze.className="austere-focus-names";for(let Lt of Y){let Ut=document.createElement("span");Ut.textContent=Lt.name,Ut.style.background=Lt.colour,Ze.appendChild(Ut)}rt.appendChild(Ze)}Ce.push(rt)}}Ae.replaceChildren(...Ce)}function qt(K){Me=K,St()}return{setQuickSwitch(K){m=K},setHistory(K){f=K,v&&x()},setMode(K){a=K==="annotate"?"annotate":"explore",document.documentElement.classList.toggle("austere-annotating",a==="annotate"),a!=="annotate"&&(q(),i.hidden=!0,r.hidden=!0)},flash:Ee,reveal:re,highlight:Ft,focus:qt}}var DEt={shadcn:{name:"@austere-axi/pack-shadcn",version:"0.17.0",components:["Progress","Avatar","AvatarGroup","Tooltip","HoverCard","Breadcrumb","BreadcrumbItem","Kbd","Skeleton","Calendar","Timeline","TimelineItem"]}};function xOa(e){let t=e.lastIndexOf("@");return t<=0?{name:e,version:""}:{name:e.slice(0,t),version:e.slice(t+1)}}var vOa=/^(@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,bOa=/^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/;function OEt(e){let t=[];for(let a of String(e||"").split(",")){let[o,r]=a.trim().split(/\s+/);if(!o)continue;let{name:n,version:i}=xOa(o);!vOa.test(n)||!bOa.test(i)||t.some(s=>s.name===n)||t.push(r&&/^sha(256|384|512)-[A-Za-z0-9+/=]+$/.test(r)?{name:n,version:i,integrity:r}:{name:n,version:i})}return t}var PEt="https://cdn.jsdelivr.net/npm";function BEt(e=document){let t=e.querySelector('meta[name="austere-packs"]');return t?OEt(t.getAttribute("content")||""):[]}function FEt(e,t){let a=[...t];for(let[o,r]of Object.entries(DEt))a.some(n=>n.name===r.name)||r.components.some(n=>new RegExp(`\\b${n}\\s*\\(`).test(e))&&a.push({name:r.name,version:r.version,bundled:o});return a}function AX(){return/\/__austere\/$/.test(w2)}function kOa(e){if(e.bundled)return{src:F4(`packs/${e.bundled}/pack.js`)||`${PEt}/austere-axi@${e.version}/dist/packs/${e.bundled}/pack.js`};if(AX()){let t=e.integrity?`?integrity=${encodeURIComponent(e.integrity)}`:"";return{src:`${w2}installed-packs/${encodeURIComponent(`${e.name}@${e.version}`)}/pack.js${t}`}}return{src:`${PEt}/${e.name}@${e.version}/dist/pack.js`,integrity:e.integrity}}function wOa(e,t){return new Promise((a,o)=>{let r=document.createElement("script");r.src=e,r.async=!0,t&&(r.integrity=t,r.crossOrigin="anonymous"),r.onload=()=>a(),r.onerror=()=>o(new Error(`could not load ${e}`)),document.head.appendChild(r)})}async function qEt(e,{onError:t}={}){let a=e.filter(o=>!hl().some(r=>r.name===o.name));return await Promise.all(a.map(o=>{let{src:r,integrity:n}=kOa(o);return wOa(r,n).then(()=>{hl().some(i=>i.name===o.name)||t?.(o,new Error(`${r} loaded but did not register pack ${o.name}`))},i=>t?.(o,i))})),hl()}function HEt(e){for(let t of e){if(!t.css)continue;let a=`austere-pack-css-${t.name.replace(/[^a-z0-9]/gi,"-")}`;if(document.getElementById(a))continue;let o=document.createElement("style");o.id=a,o.textContent=t.css,document.head.appendChild(o)}}var SOa=/[A-Za-z_$]/;function LOa(e){let t=[],a=String(e??""),o=0,r=1,n=a.length;for(;o<n;){let i=a[o];if(i===`
|
|
1763
1763
|
`){r++,o++;continue}if(i===" "||i===" "||i==="\r"){o++;continue}if(i==="#"||i==="/"&&a[o+1]==="/"){for(;o<n&&a[o]!==`
|
|
1764
1764
|
`;)o++;continue}let s=o,l=r,u=0,d=null,p=!1;for(;o<n;){let x=a[o];if(d){p?p=!1:x==="\\"?p=!0:x===d&&(d=null),x===`
|
|
1765
1765
|
`&&r++,o++;continue}if(x==='"'||x==="'"){d=x,o++;continue}if(x==="#"||x==="/"&&a[o+1]==="/"){for(;o<n&&a[o]!==`
|
|
1766
1766
|
`;)o++;continue}if(x==="("||x==="["||x==="{")u++;else if(x===")"||x==="]"||x==="}")u=Math.max(0,u-1);else if(x===`
|
|
1767
|
-
`){if(u===0&&!IOa(a,o+1))break;r++}o++}let f=a.slice(s,o).replace(/\s+$/,""),m=/^\s*([A-Za-z_$][\w$]*)\s*=/.exec(f);m&&SOa.test(m[1][0])&&t.push({id:m[1],text:f,line:l,endLine:r})}return t}function IOa(e,t){let a=t;for(;a<e.length&&(e[a]===" "||e[a]===" ");)a++;return e[a]==="?"||e[a]===":"}function th(e){let t=new Map;for(let a of LOa(e))t.set(a.id,a);return t}function VEt(e,t){let a=th(e),o=th(t),r=[];for(let[n,i]of o){let s=a.get(n);(!s||jEt(s.text)!==jEt(i.text))&&r.push(n)}return r}function I9(e,t){let a=new RegExp(`(^|[^\\w$])${COa(t)}(?![\\w$])`),o=[];for(let[r,n]of e){if(r===t)continue;let i=n.text.slice(n.text.indexOf("=")+1);a.test(MOa(i))&&o.push(r)}return o}function MOa(e){return e.replace(/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/gs,'""')}function jEt(e){return e.replace(/\s+/g," ").trim()}function COa(e){return e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&")}var bv=oe(mt(),1),RX="0.
|
|
1767
|
+
`){if(u===0&&!IOa(a,o+1))break;r++}o++}let f=a.slice(s,o).replace(/\s+$/,""),m=/^\s*([A-Za-z_$][\w$]*)\s*=/.exec(f);m&&SOa.test(m[1][0])&&t.push({id:m[1],text:f,line:l,endLine:r})}return t}function IOa(e,t){let a=t;for(;a<e.length&&(e[a]===" "||e[a]===" ");)a++;return e[a]==="?"||e[a]===":"}function th(e){let t=new Map;for(let a of LOa(e))t.set(a.id,a);return t}function VEt(e,t){let a=th(e),o=th(t),r=[];for(let[n,i]of o){let s=a.get(n);(!s||jEt(s.text)!==jEt(i.text))&&r.push(n)}return r}function I9(e,t){let a=new RegExp(`(^|[^\\w$])${COa(t)}(?![\\w$])`),o=[];for(let[r,n]of e){if(r===t)continue;let i=n.text.slice(n.text.indexOf("=")+1);a.test(MOa(i))&&o.push(r)}return o}function MOa(e){return e.replace(/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/gs,'""')}function jEt(e){return e.replace(/\s+/g," ").trim()}function COa(e){return e.replace(/[$()*+.?[\\\]^{|}]/g,"\\$&")}var bv=oe(mt(),1),RX="0.17.0",_Oa='script[type="text/openui"], script[type="text/openui-lang"]';function AOa(){if(document.getElementById("austere-styles"))return;let e=document.createElement("style");if(e.id="austere-styles",e.textContent=[Sre,bre,kre,wre].join(`
|
|
1768
1768
|
`),document.head.appendChild(e),!document.querySelector('meta[name="viewport"]')){let t=document.createElement("meta");t.name="viewport",t.content="width=device-width, initial-scale=1",document.head.appendChild(t)}document.documentElement.classList.add("austere"),document.documentElement.style.colorScheme="dark"}function WEt(e){if(!e||typeof e!="object")return;let t={},a=Object.entries(e);for(let[o,r]of a)if(!o.startsWith("$"))if(r&&typeof r=="object"&&!Array.isArray(r))if("value"in r&&Object.keys(r).length<=3)t[o]=r.value;else{let n=WEt(r);n&&Object.keys(n).length&&(t[o]=n)}else t[o]=r;return Object.keys(t).length?t:void 0}function NOa(e){return!!e&&typeof e=="object"&&"austere"in e&&e.austere===1&&"type"in e&&typeof e.type=="string"}function TOa(){let e=window.parent&&window.parent!==window,t=new Map,a=o=>{e&&window.parent.postMessage({austere:1,...o},"*")};return window.addEventListener("message",o=>{if(o.source!==window.parent)return;let r=o.data;NOa(r)&&t.get(r.type)?.forEach(n=>n(r))}),{framed:e,connected:!1,send:a,on(o,r){let n=r,i=t.get(o)??new Set;return t.set(o,i),i.add(n),()=>{i.delete(n)}}}}function ZEt(e,t){e.framed?e.send({type:"open-url",url:t}):window.open(t,"_blank","noopener")}function NX(e){let t=document.createElement("div");t.className="austere-toast",t.setAttribute("data-austere-ui",""),t.textContent=e,document.body.appendChild(t),setTimeout(()=>t.classList.add("out"),2600),setTimeout(()=>t.remove(),3100)}function ROa(e){let t=[e.message];return e.form&&t.push(`form: ${JSON.stringify(e.form)}`),e.context!==void 0&&t.push(`context: ${JSON.stringify(e.context)}`),t.join(`
|
|
1769
1769
|
`)}var TX=null,XEt=new Set,vv=yv,UEt="";function EOa(e,t){XEt.add(e.name);let a=!e.bundled&&AX()?" (`austere-axi check <file>` says why)":"";Ec({source:"pack",component:e.name,message:`pack ${e.name}@${e.version}: ${t.message}${a}`})}function zOa(){let e=hl(),t=e.map(a=>`${a.name}@${a.version}`).join(",");if(t===UEt)return vv;UEt=t,HEt(e);try{vv=e.length?IX(e.flatMap(a=>a.components),{onSkip:(a,o)=>Ec({source:"pack",component:a.name,message:o})}):yv}catch(a){Ec({source:"pack",message:`packs could not be added (${a.message}); rendering without them`}),vv=yv}return window.__austere.library=vv,vv}async function YEt(e){TX||(TX=BEt());let t=FEt(e,TX).filter(a=>!XEt.has(a.name));return t.some(a=>!hl().some(o=>o.name===a.name))&&await qEt(t,{onError:EOa}),zOa()}function DOa({programRef:e,initialLibrary:t,bridge:a,annotator:o,initialState:r}){let[n,i]=(0,Di.useState)({program:e.current,library:t}),s=n.program,l=(0,Di.useRef)(null);(0,Di.useEffect)(()=>a.on("source",async({program:f})=>{if(typeof f!="string"||f===e.current)return;let m=VEt(e.current,f);e.current=f,o?.highlight([]);let x=await YEt(f);e.current===f&&(l.current=m,i({program:f,library:x}))}),[a]),(0,Di.useEffect)(()=>a.on("reveal",({id:f})=>{o?.reveal(f,th(e.current),I9)}),[a,o]),(0,Di.useEffect)(()=>{let f=l.current;if(!f)return;l.current=null;let m=setTimeout(()=>{let x=th(e.current),v=f.filter(w=>w!=="root");o?.flash(v,"changed",x,I9),a.send({type:"changes",ids:v})},120);return()=>clearTimeout(m)},[s,o,a]);let u=(0,Di.useCallback)(f=>{if(f.type==="open_url"){let v=f.params?.url;typeof v=="string"&&/^(https?:|mailto:)/i.test(v)&&ZEt(a,v);return}if(f.type!=="continue_conversation")return;let m={kind:"action",message:f.humanFriendlyMessage||"(button)"},x=WEt(f.formState);if(x&&(m.form=x),f.params?.context!==void 0&&(m.context=f.params.context),a.connected)a.send({type:"action",item:m}),NX("Queued for the agent \u2014 press Send when ready");else{let v=ROa(m);navigator.clipboard?.writeText(v).then(()=>NX("Copied \u2014 paste it to your agent"),()=>NX(v))}},[a]),d=(0,Di.useCallback)(f=>{a.send({type:"errors",errors:(f||[]).map(m=>({source:m.source,code:m.code,statementId:m.statementId,message:m.message,hint:m.hint}))})},[a]),p=(0,Di.useCallback)(f=>a.send({type:"state",state:f}),[a]);return(0,bv.jsx)(vre,{mode:"dark",children:(0,bv.jsx)("main",{className:"austere-page",children:(0,bv.jsx)(b2,{response:s,library:n.library,isStreaming:!1,onAction:u,onError:d,onStateUpdate:p,initialState:r})})})}function $Et(){AOa();let t=document.querySelector(_Oa)?.textContent??"",a=document.createElement("div");a.id="austere-root",document.body.appendChild(a);let o=TOa(),r={current:t},n=null,i=null,s=YEt(t),l=f=>i||(i=s.then(m=>(0,GEt.createRoot)(a).render((0,bv.jsx)(DOa,{programRef:r,initialLibrary:m,bridge:o,annotator:n,initialState:f}))));if(!o.framed){l(void 0);return}let u={program:null,map:new Map},p=zEt({post:f=>o.send(f),lookup:()=>(u.program!==r.current&&(u={program:r.current,map:th(r.current)}),[u.map,I9])});n=p,o.on("highlight",({ids:f,scroll:m})=>{p.highlight(Array.isArray(f)?f.filter(x=>typeof x=="string"):[],!!m)}),o.on("history-counts",({counts:f})=>{let m={};if(f&&typeof f=="object")for(let[x,v]of Object.entries(f).slice(0,2e3))typeof v=="number"&&Number.isInteger(v)&&v>0&&(m[x]=v);p.setHistory(m)}),o.on("presence",({marks:f})=>{let m=x=>{let v=x;return!!v&&typeof v.statement=="string"&&typeof v.name=="string"&&typeof v.colour=="string"&&/^#[0-9a-f]{6}$/i.test(v.colour)};p.focus(Array.isArray(f)?f.filter(m).slice(0,50):[])}),document.addEventListener("click",f=>{if(f.defaultPrevented||f.button!==0)return;let m=f.target instanceof Element?f.target.closest("a[href]"):null;if(!(m instanceof HTMLAnchorElement)||!/^(https?|mailto):/i.test(m.href)||m.protocol===location.protocol&&m.host===location.host)return;let x=(m.getAttribute("target")||"").toLowerCase();!x||x==="_self"||(f.preventDefault(),ZEt(o,m.href))}),JQ(f=>o.send({type:"runtime-error",error:f})),o.on("init",async f=>{if(o.connected=!0,p.setMode(f.mode),p.setQuickSwitch(f.quickSwitch===!0),await l(f.state||void 0),f.scrollY>0){let m=0,x=()=>{window.scrollTo(0,f.scrollY),Math.abs(window.scrollY-f.scrollY)>2&&++m<20&&setTimeout(x,50)};setTimeout(x,30)}o.send({type:"ready",title:document.title,version:RX})}),o.on("mode",f=>p.setMode(f.mode)),window.addEventListener("scroll",()=>o.send({type:"scroll",y:window.scrollY}),{passive:!0}),o.send({type:"hello",title:document.title,version:RX}),setTimeout(()=>l(void 0),600)}window.__austere={version:RX,library:yv,packs:hl};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",$Et,{once:!0}):setTimeout($Et,0);})();
|
|
1770
1770
|
}
|
package/dist/catalog.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"format":1,"pack":"core","version":"0.16.0","groups":[{"name":"Layout","notes":["- A page is root = Stack([...sections], \"column\", \"l\"). Each section is a Card([CardHeader(title, subtitle), ...content]).","- Side by side: Stack([a, b], \"row\", \"m\", \"stretch\", \"start\", true). Cards in a row share the width.","- Tabs for alternative views, Accordion for detail the reader may skip, Steps for ordered procedures. Several blocks in one Card: label each with InlineHeader.","- Card children must match its list; anything else (Accordion, Tag, a Callout row) can sit in a Stack inside the Card, or directly in root's Stack."]},{"name":"Content","notes":["- MarkDownRenderer for prose, bullet lists and inline code; one statement per paragraph group so each is annotatable.","- Callout for the one thing the reader must not miss: a risk, a decision needed, a caveat.","- CodeBlock for a whole snippet. Image src may be a path relative to the artifact file.","- Architecture for systems: services, stores, queues, trust boundaries. Name every Node, Edge and Group. Over ~15 nodes, use lanes or split the diagram.","- lanes: for systems split by owner, repo or tier. Groups are the columns, left to right as listed; put every node in one, in reading order (plain groups for a heading without a frame). About 4 columns fit a laptop; wider ones scroll (check warns). Phones get the lanes stacked as bands. Pin row only to put boxes side by side or line them up.","- Diff for code changes: show the hunks that matter, not whole files. Hunk counts are recomputed, so only start lines matter."]},{"name":"Data","notes":["- Table is COLUMN-oriented: Table([Col(\"Option\", names), Col(\"Effort\", efforts), Col(\"Risk\", risks)]). Col data may mix strings and components, e.g. [\"n/a\", Tag(\"high\", null, \"sm\", \"danger\")]. Cells are plain text (no markdown) and wrap; Col type \"number\" for figures.","- EntityList for key/value facts; OverviewCardBlock + OverviewCardItem + MetricIndicatorInline for a KPI row.","- EditableTable when the reviewer should correct or fill in values; edits arrive with the next @ToAssistant from its Form.","- Icon names are lucide kebab-case (circle-check, triangle-alert, git-branch)."]},{"name":"Charts","notes":["- Charts take column arrays: BarChart(labels, [Series(\"p50\", [..]), Series(\"p99\", [..])], \"grouped\", \"Week\", \"ms\").","- PieChart(labels, values) with plain number arrays."]},{"name":"Forms","notes":["- Form(name, buttons, fields). Define each FormControl as its own statement. Never nest a Form in a Form.","- To ask the reviewer to decide: OptionCards or RadioGroup inside a Form whose button is Button(\"Send decision\", @ToAssistant(\"Decision: rollout strategy\"), \"primary\"). The values arrive with that message as form: {<formName>: {<fieldName>: value}}; no context needed. Reviewers can always annotate and message, so add a notes field only when it belongs with the decision.","- OptionCards(\"pick\", \"single\", [OptionCard(\"a\", \"Option A\", \"why\", Icon(\"zap\")), OptionCard(\"b\", \"Option B\")], {required: true}, \"a\") — the last argument pre-selects.","- rules: {required: true, minLength: 10, ...}; the renderer shows the messages."]},{"name":"Buttons","notes":["- @ToAssistant(message, context?) queues a message to the agent; @OpenUrl(url) opens a link. A Button with no action sends its label.","- Use buttons for follow-ups the reviewer can pick in one click: \"Go with option B\", \"Split this into two PRs\"."]}],"components":[{"name":"Card","group":"Layout","signature":"Card(children: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Tabs | Stack | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[], variant?: \"card\" | \"sunk\" | \"clear\", direction?: \"row\" | \"column\", gap?: \"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"2xl\", align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\", justify?: \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\", wrap?: boolean)","description":"Styled container. variant: \"card\" (default, elevated) | \"sunk\" (recessed) | \"clear\" (transparent). Always full width. Accepts all Stack flex params (default: direction \"column\"). Cards flex to share space in row/wrap layouts.","tier":"core","pack":"core","examples":[]},{"name":"CardHeader","group":"Layout","signature":"CardHeader(title?: string, subtitle?: string)","description":"Header with optional title and subtitle","tier":"core","pack":"core","examples":[]},{"name":"TextContent","group":"Content","signature":"TextContent(text: string, size?: \"small\" | \"default\" | \"large\" | \"small-heavy\" | \"large-heavy\")","description":"Text block. Supports markdown. Optional size: \"small\" | \"default\" | \"large\" | \"small-heavy\" | \"large-heavy\".","tier":"core","pack":"core","examples":[]},{"name":"MarkDownRenderer","group":"Content","signature":"MarkDownRenderer(textMarkdown: string, variant?: \"clear\" | \"card\" | \"sunk\")","description":"Renders markdown text with optional container variant","tier":"core","pack":"core","examples":[]},{"name":"Callout","group":"Content","signature":"Callout(variant: \"info\" | \"warning\" | \"error\" | \"success\" | \"neutral\", title: string, description: string, visible?: $binding<boolean>)","description":"Callout banner. Optional visible is a reactive $boolean — auto-dismisses after 3s by setting $visible to false.","tier":"core","pack":"core","examples":[]},{"name":"Image","group":"Content","signature":"Image(alt: string, src?: string)","description":"Image with alt text and optional URL","tier":"core","pack":"core","examples":[]},{"name":"CodeBlock","group":"Content","signature":"CodeBlock(language: string, codeString: string)","description":"Syntax-highlighted code block","tier":"core","pack":"core","examples":[]},{"name":"InlineHeader","group":"Layout","signature":"InlineHeader(heading: string, description?: string)","description":"Compact section heading with an optional one-line description, for use inside cards.","tier":"core","pack":"core","examples":[]},{"name":"Table","group":"Data","signature":"Table(columns: Col[])","description":"Data table — column-oriented. Each Col holds its own data array.","tier":"core","pack":"core","examples":[]},{"name":"Col","group":"Data","signature":"Col(label: string, data: any, type?: \"string\" | \"number\" | \"action\")","description":"Column definition — holds label + data array","tier":"core","pack":"core","examples":[]},{"name":"EditableTable","group":"Data","signature":"EditableTable(name?: string, columns?: {type: \"text\" | \"number\" | \"date-single\" | \"select\" | \"url\", key?: string, header?: string, width?: number, options?: {value: string, label: string}[]}[], data?: {id: string, values: (string | number)[]}[])","description":"Spreadsheet-like table whose cells the user can edit inline (text, number, url, date, select columns); edits are saved back as a form field","tier":"extended","pack":"core","examples":[]},{"name":"BarChart","group":"Charts","signature":"BarChart(labels: string[], series: Series[], variant?: \"grouped\" | \"stacked\", xLabel?: string, yLabel?: string, height?: number)","description":"Vertical bars; use for comparing values across categories with one or more series","tier":"core","pack":"core","examples":[]},{"name":"LineChart","group":"Charts","signature":"LineChart(labels: string[], series: Series[], variant?: \"linear\" | \"natural\" | \"step\", xLabel?: string, yLabel?: string, height?: number)","description":"Lines over categories; use for trends and continuous data over time","tier":"core","pack":"core","examples":[]},{"name":"AreaChart","group":"Charts","signature":"AreaChart(labels: string[], series: Series[], variant?: \"linear\" | \"natural\" | \"step\", xLabel?: string, yLabel?: string, height?: number)","description":"Filled area under lines; use for cumulative totals or volume trends over time","tier":"extended","pack":"core","examples":[]},{"name":"HorizontalBarChart","group":"Charts","signature":"HorizontalBarChart(labels: string[], series: Series[], variant?: \"grouped\" | \"stacked\", xLabel?: string, yLabel?: string)","description":"Horizontal bars; prefer when category labels are long or for ranked lists","tier":"extended","pack":"core","examples":[]},{"name":"Series","group":"Charts","signature":"Series(category: string, values: number[])","description":"One data series","tier":"core","pack":"core","examples":[]},{"name":"PieChart","group":"Charts","signature":"PieChart(labels: string[], values: number[], variant?: \"pie\" | \"donut\", appearance?: \"circular\" | \"semiCircular\")","description":"Circular slices; use plucked arrays: PieChart(data.categories, data.values)","tier":"core","pack":"core","examples":[]},{"name":"ScatterChart","group":"Charts","signature":"ScatterChart(datasets: ScatterSeries[], xLabel?: string, yLabel?: string)","description":"X/Y scatter plot; use for correlations, distributions, and clustering","tier":"extended","pack":"core","examples":[]},{"name":"ScatterSeries","group":"Charts","signature":"ScatterSeries(name: string, points: Point[])","description":"Named dataset","tier":"extended","pack":"core","examples":[]},{"name":"Point","group":"Charts","signature":"Point(x: number, y: number, z?: number)","description":"Data point with numeric coordinates","tier":"extended","pack":"core","examples":[]},{"name":"Form","group":"Forms","signature":"Form(name: string, buttons: Buttons, fields?: FormControl[])","description":"Form container with fields and explicit action buttons","tier":"core","pack":"core","examples":[]},{"name":"FormControl","group":"Forms","signature":"FormControl(label: string, input: Input | TextArea | Select | Slider | CheckBoxGroup | RadioGroup | Chips | OptionCards, hint?: string)","description":"Field with label, input component, and optional hint text","tier":"core","pack":"core","examples":[]},{"name":"Label","group":"Forms","signature":"Label(text: string)","description":"Text label","tier":"extended","pack":"core","examples":[]},{"name":"Input","group":"Forms","signature":"Input(name: string, placeholder?: string, type?: \"text\" | \"email\" | \"password\" | \"number\" | \"url\", rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"TextArea","group":"Forms","signature":"TextArea(name: string, placeholder?: string, rows?: number, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"Select","group":"Forms","signature":"Select(name: string, items: SelectItem[], placeholder?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>, size?: \"small\" | \"medium\" | \"large\")","description":"","tier":"core","pack":"core","examples":[]},{"name":"SelectItem","group":"Forms","signature":"SelectItem(value: string, label: string)","description":"Option for Select","tier":"core","pack":"core","examples":[]},{"name":"Slider","group":"Forms","signature":"Slider(name: string, variant: \"continuous\" | \"discrete\", min: number, max: number, step?: number, defaultValue?: number[], label?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<number[]>)","description":"Numeric slider input; supports continuous and discrete (stepped) variants","tier":"extended","pack":"core","examples":[]},{"name":"CheckBoxGroup","group":"Forms","signature":"CheckBoxGroup(name: string, items: CheckBoxItem[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<Record<string, boolean>>)","description":"","tier":"extended","pack":"core","examples":[]},{"name":"CheckBoxItem","group":"Forms","signature":"CheckBoxItem(label: string, description: string, name: string, defaultChecked?: boolean)","description":"","tier":"extended","pack":"core","examples":[]},{"name":"RadioGroup","group":"Forms","signature":"RadioGroup(name: string, items: RadioItem[], defaultValue?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"RadioItem","group":"Forms","signature":"RadioItem(label: string, description: string, value: string)","description":"","tier":"core","pack":"core","examples":[]},{"name":"SwitchGroup","group":"Forms","signature":"SwitchGroup(name: string, items: SwitchItem[], variant?: \"clear\" | \"card\" | \"sunk\", value?: $binding<Record<string, boolean>>)","description":"Group of switch toggles","tier":"extended","pack":"core","examples":[]},{"name":"SwitchItem","group":"Forms","signature":"SwitchItem(label?: string, description?: string, name: string, defaultChecked?: boolean)","description":"Individual switch toggle","tier":"extended","pack":"core","examples":[]},{"name":"ChipItem","group":"Forms","signature":"ChipItem(value: string, label: string, icon?: Icon, disabled?: boolean)","description":"A single selectable chip inside a Chips group, with a value, label and optional icon.","tier":"extended","pack":"core","examples":[]},{"name":"Chips","group":"Forms","signature":"Chips(name: string, type?: \"single\" | \"multiple\", items?: ChipItem[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, defaultValue?: string | string[])","description":"A form field of compact selectable chips for choosing one or many short options; the selection is stored under `name`.","tier":"extended","pack":"core","examples":[]},{"name":"OptionCard","group":"Forms","signature":"OptionCard(value: string, title: string, subtitle?: string, topContent?: Icon | Image, disabled?: boolean)","description":"A single selectable card inside an OptionCards group, with a value, title, optional subtitle and an optional Icon or Image on top.","tier":"core","pack":"core","examples":[]},{"name":"OptionCards","group":"Forms","signature":"OptionCards(name: string, type?: \"single\" | \"multiple\", items?: OptionCard[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, defaultValue?: string | string[])","description":"A form field of selectable cards (title, optional subtitle, optional icon or image) laid out in a responsive grid for choosing one or many options; the selection is stored under `name`.","tier":"core","pack":"core","examples":[]},{"name":"Button","group":"Buttons","signature":"Button(label: string, action?: ActionExpression, variant?: \"primary\" | \"secondary\" | \"tertiary\", type?: \"normal\" | \"destructive\", size?: \"extra-small\" | \"small\" | \"medium\" | \"large\")","description":"Clickable button","tier":"core","pack":"core","examples":[]},{"name":"Buttons","group":"Buttons","signature":"Buttons(buttons: Button[], direction?: \"row\" | \"column\")","description":"Group of Button components. direction: \"row\" (default) | \"column\".","tier":"core","pack":"core","examples":[]},{"name":"Stack","group":"Layout","signature":"Stack(children: any[], direction?: \"row\" | \"column\", gap?: \"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"2xl\", align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\", justify?: \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\", wrap?: boolean)","description":"Flex container. direction: \"row\"|\"column\" (default \"column\"). gap: \"none\"|\"xs\"|\"s\"|\"m\"|\"l\"|\"xl\"|\"2xl\" (default \"m\"). align: \"start\"|\"center\"|\"end\"|\"stretch\"|\"baseline\". justify: \"start\"|\"center\"|\"end\"|\"between\"|\"around\"|\"evenly\".","tier":"core","pack":"core","examples":[]},{"name":"Tabs","group":"Layout","signature":"Tabs(items: TabItem[])","description":"Tabbed container","tier":"core","pack":"core","examples":[]},{"name":"TabItem","group":"Layout","signature":"TabItem(value: string, trigger: string, content: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[])","description":"value is unique id, trigger is tab label, content is array of components","tier":"core","pack":"core","examples":[]},{"name":"Accordion","group":"Layout","signature":"Accordion(items: AccordionItem[])","description":"Collapsible sections","tier":"core","pack":"core","examples":[]},{"name":"AccordionItem","group":"Layout","signature":"AccordionItem(value: string, trigger: string, content: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[])","description":"value is unique id, trigger is section title","tier":"core","pack":"core","examples":[]},{"name":"Steps","group":"Layout","signature":"Steps(items: StepsItem[])","description":"Step-by-step guide","tier":"core","pack":"core","examples":[]},{"name":"StepsItem","group":"Layout","signature":"StepsItem(title: string, details: string)","description":"title and details text for one step","tier":"core","pack":"core","examples":[]},{"name":"Separator","group":"Layout","signature":"Separator(orientation?: \"horizontal\" | \"vertical\", decorative?: boolean)","description":"Visual divider between content sections","tier":"core","pack":"core","examples":[]},{"name":"TagBlock","group":"Data","signature":"TagBlock(tags: string[], size?: \"sm\" | \"md\" | \"lg\")","description":"tags is an array of strings; optional size sm | md | lg","tier":"extended","pack":"core","examples":[]},{"name":"Tag","group":"Data","signature":"Tag(text: string, icon?: Icon, size?: \"sm\" | \"md\" | \"lg\", variant?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\")","description":"Styled tag/badge with optional Icon and variant","tier":"core","pack":"core","examples":[]},{"name":"Icon","group":"Data","signature":"Icon(name: string, category?: string)","description":"A lucide icon by kebab-case name (e.g. 'circle-check'). Optional category picks a topical fallback when the name doesn't resolve.","tier":"core","pack":"core","examples":[]},{"name":"EntityList","group":"Data","signature":"EntityList(rows?: {left: string, right: string, rightVariant?: \"text\" | \"number\"}[], size?: \"small\" | \"default\", header?: {left: string, right: string, rightVariant?: \"text\" | \"number\"}, footer?: {left: string, right: string, rightVariant?: \"text\" | \"number\"})","description":"Two-column key/value rows (left label, right value). size 'default' supports optional header and footer rows; rightVariant 'number' uses tabular numbers.","tier":"core","pack":"core","examples":[]},{"name":"Text","group":"Data","signature":"Text(variant?: \"text\" | \"number\", value: string, subtext?: string, subtextVariant?: \"text\" | \"number\" | \"metric\", size?: \"xs\" | \"sm\" | \"md\" | \"lg\")","description":"Plain text line with optional subtext. variant 'number' uses tabular number styling; subtextVariant 'metric' colors a leading +/- subtext green/red.","tier":"core","pack":"core","examples":[]},{"name":"BoldText","group":"Data","signature":"BoldText(variant?: \"text\" | \"number\", value: string, subtext?: string, subtextVariant?: \"text\" | \"number\" | \"metric\", size?: \"xs\" | \"sm\" | \"md\" | \"lg\")","description":"Emphasized (bold) text line with optional subtext. variant 'number' uses tabular number styling; subtextVariant 'metric' colors a leading +/- subtext green/red.","tier":"extended","pack":"core","examples":[]},{"name":"IconText","group":"Data","signature":"IconText(icon: Icon, iconVariant?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"inverted\" | \"filled\" | \"soft\", iconSize?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"sm\" | \"md\" | \"lg\", title: string, subtitle?: string, bold?: boolean, layout?: \"horizontal\" | \"vertical\")","description":"An icon badge with a title and optional subtitle, laid out horizontally or vertically. iconVariant sets the badge color.","tier":"extended","pack":"core","examples":[]},{"name":"MetricIndicatorInline","group":"Data","signature":"MetricIndicatorInline(value: string, subtext?: string, trend?: {direction: \"up\" | \"down\", value: number})","description":"Headline metric value with an optional +/- percentage trend and subtext, all on one line.","tier":"core","pack":"core","examples":[]},{"name":"OverviewCardItem","group":"Data","signature":"OverviewCardItem(id?: string, top: IconText | Text, bottom?: MetricIndicatorInline)","description":"One overview card: a heading slot at the top (IconText, ImageText or Text) and an optional MetricIndicatorInline at the bottom.","tier":"core","pack":"core","examples":[]},{"name":"OverviewCardBlock","group":"Data","signature":"OverviewCardBlock(items: OverviewCardItem[], layout?: \"grid\" | \"carousel\", responsive?: boolean, action?: ActionExpression, gap?: number | string)","description":"A grid or horizontal carousel of compact overview cards, each with a heading (icon/image/text) on top and an inline metric below; optionally clickable with a shared action.","tier":"core","pack":"core","examples":[]},{"name":"Architecture","group":"Content","signature":"Architecture(nodes: Node[], edges: Edge[], groups?: Group[], direction?: \"auto\" | \"right\" | \"down\" | \"lanes\")","description":"System diagram laid out automatically: write no coordinates. Every Node, Edge and Group is its own statement and click target. direction auto (default) runs right when that fits the page legibly, else down; lanes makes each top-level Group a column.","tier":"core","pack":"core","examples":["platformMap = Architecture([browser, edge, api, sessions, cache], [toEdge, toApi, readSessions, readCache], [vpc])\nbrowser = Node(\"Browser\", \"external\")\nedge = Node(\"Edge worker\", \"cloud\", \"Cloudflare\")\napi = Node(\"API\", \"backend\", \"Node :8080\")\nsessions = Node(\"Sessions\", \"database\", \"Postgres\", \"new\")\ncache = Node(\"Redis\", \"database\", \"read-through\")\ntoEdge = Edge(browser, edge, \"HTTPS\", \"emphasis\")\ntoApi = Edge(edge, api)\nreadSessions = Edge(api, sessions, \"SQL\")\nreadCache = Edge(api, cache, \"cache\", \"dashed\")\nvpc = Group(\"Platform VPC\", [api, sessions, cache])","ownership = Architecture([web, ordersApi, ledger, ordersDb, billingJob], [placeOrder, writeOrder, readOrders, postLedger], [clients, ordersRepo, billingRepo], \"lanes\")\nweb = Node(\"Web app\", \"frontend\")\nordersApi = Node(\"Orders API\", \"backend\", \"Node :8080\")\nordersDb = Node(\"orders table\", \"database\", \"Postgres\", null, \"success\")\nbillingJob = Node(\"Nightly billing\", \"backend\", \"cron 02:00\")\nledger = Node(\"Ledger\", \"database\", \"append-only\", null, \"info\")\nplaceOrder = Edge(web, ordersApi, \"POST /orders\")\nwriteOrder = Edge(ordersApi, ordersDb, \"insert\")\nreadOrders = Edge(billingJob, ordersDb, \"read unbilled\", null, \"danger\")\npostLedger = Edge(billingJob, ledger, \"post\")\nclients = Group(\"CLIENTS\", [web], \"plain\")\nordersRepo = Group(\"orders-service\", [ordersApi, ordersDb])\nbillingRepo = Group(\"billing\", [billingJob, ledger])"]},{"name":"Node","group":"Content","signature":"Node(label: string, kind?: \"frontend\" | \"backend\" | \"database\" | \"messagebus\" | \"cloud\" | \"security\" | \"external\", detail?: string, tag?: string, tone?: \"info\" | \"success\" | \"warning\" | \"danger\" | \"strong\", row?: number)","description":"A box in an Architecture. kind sets icon and color (default backend); detail is monospace, up to 2 lines (\\n breaks); tag is a small chip such as \"new\"; tone tints it (danger = risk, strong = where it ends); row pins it to a row (1, 2, ...) in lanes.","tier":"core","pack":"core","examples":[]},{"name":"Edge","group":"Content","signature":"Edge(from: Node, to: Node, label?: string, style?: \"solid\" | \"dashed\" | \"emphasis\" | \"security\", tone?: \"info\" | \"success\" | \"warning\" | \"danger\")","description":"An arrow between two Node statements (pass their names, not strings). style: dashed for async, emphasis for the main path, security for auth or trust flows. tone colors it, e.g. danger for a risky write, success for a read.","tier":"core","pack":"core","examples":[]},{"name":"Group","group":"Content","signature":"Group(label: string, members: Node[], kind?: \"region\" | \"security\" | \"plain\")","description":"A boundary around Node statements (a VPC, a cluster, a trust zone); members still sit where their edges put them. A group whose members are a subset of another's is drawn inside it; kind security draws it red, plain draws only its name.","tier":"core","pack":"core","examples":[]},{"name":"Diff","group":"Content","signature":"Diff(patch: string, title?: string)","description":"Unified diff (git diff output, one or more files) with line numbers. patch is a raw multi-line string. Clicked lines reach the agent as file:+line.","tier":"core","pack":"core","examples":["retryPatch = Diff(\"diff --git a/src/retry.ts b/src/retry.ts\n--- a/src/retry.ts\n+++ b/src/retry.ts\n@@ -10,2 +10,3 @@\n- for (let i = 0; i < 3; i++) {\n+ for (let i = 0; i < MAX_ATTEMPTS; i++) {\n+ if (i > 0) await sleep(backoff(i));\")"]},{"name":"FileTree","group":"Data","signature":"FileTree(entries: string[])","description":"File tree, one path per entry, optionally prefixed with a git status code (A new, M modified, D deleted, R old -> new) and suffixed with \" # note\". Folders are inferred. Clicked files and folders reach the agent by path.","tier":"core","pack":"core","examples":["changedFiles = FileTree([\"M src/session/store.ts # read-through to Postgres\", \"A src/session/pg-store.ts\", \"A migrations/0042_sessions.sql # table + expiry index\", \"R src/session/redis.ts -> src/session/redis-cache.ts\", \"D src/session/legacy.ts\", \"M src/config.ts # SESSIONS_PG flag\"])"]},{"name":"Progress","group":"Data","signature":"Progress(value: number, label?: string, max?: number)","description":"Progress bar. value counts toward max (default 100); label names what is progressing. Shows a percentage.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["migration = Progress(64, \"Rows migrated\")"]},{"name":"Avatar","group":"Data","signature":"Avatar(name: string, src?: string, size?: \"md\" | \"lg\")","description":"Round avatar for a person. Shows the initials of name; src is an optional https image URL.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["owner = Avatar(\"Ada Lovelace\")"]},{"name":"AvatarGroup","group":"Data","signature":"AvatarGroup(avatars: Avatar[], max?: number)","description":"Overlapping Avatars, for reviewers or owners. max (default 4) shows the rest as +N.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["team = AvatarGroup([ada, grace, linus], 2)\nada = Avatar(\"Ada Lovelace\")\ngrace = Avatar(\"Grace Hopper\")\nlinus = Avatar(\"Linus Torvalds\")"]},{"name":"Tooltip","group":"Content","signature":"Tooltip(text: string, tip: string)","description":"Inline text with a short hint on hover or focus (a term and its definition). Keep tip to one line.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["term = Tooltip(\"idempotent\", \"Safe to run twice with the same result.\")"]},{"name":"HoverCard","group":"Content","signature":"HoverCard(text: string, title: string, body?: string)","description":"Inline text that shows a small card (title and a line or two of body) on hover or focus, e.g. a person or a service.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["svc = HoverCard(\"billing-api\", \"billing-api\", \"Owns invoices and refunds. On call: payments team.\")"]},{"name":"Breadcrumb","group":"Content","signature":"Breadcrumb(items: BreadcrumbItem[])","description":"Path trail such as Repo / Package / File, from BreadcrumbItems. Each item is a click target.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["trail = Breadcrumb([repo, pkg, file])\nrepo = BreadcrumbItem(\"austere-axi\")\npkg = BreadcrumbItem(\"packs\")\nfile = BreadcrumbItem(\"shadcn\")"]},{"name":"BreadcrumbItem","group":"Content","signature":"BreadcrumbItem(label: string, href?: string)","description":"One step of a Breadcrumb. href is optional; the last item is the current page.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":[]},{"name":"Kbd","group":"Content","signature":"Kbd(keys: string)","description":"Keyboard shortcut. keys joins keys with \"+\", e.g. \"Ctrl+K\"; each key is drawn as a key cap.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["shortcut = Kbd(\"Ctrl+Shift+P\")"]},{"name":"Skeleton","group":"Content","signature":"Skeleton(lines?: number, shape?: \"lines\" | \"avatar\")","description":"Grey placeholder block for content not yet written or loaded (default 3 lines). shape avatar adds a round head.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["pending = Skeleton(3, \"avatar\")"]},{"name":"Calendar","group":"Data","signature":"Calendar(month: string, highlights?: string[])","description":"Read-only month grid (not a date picker). month is \"YYYY-MM\"; highlights lists \"YYYY-MM-DD\" or \"YYYY-MM-DD label\" entries to mark, e.g. a freeze or a release. Marked days are click targets.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["window = Calendar(\"2026-11\", [\"2026-11-04 Code freeze\", \"2026-11-12 Release\", \"2026-11-13\"])"]},{"name":"Timeline","group":"Content","signature":"Timeline(items: TimelineItem[])","description":"Vertical history or schedule of TimelineItems, oldest first. Each item is a click target.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["history = Timeline([found, fixed, rollout])\nfound = TimelineItem(\"Bug found\", \"Oct 28\", \"Retries double-charge on timeout.\")\nfixed = TimelineItem(\"Fix merged\", \"Oct 29\", \"Idempotency key added.\", \"current\")\nrollout = TimelineItem(\"Rollout\", \"Nov 3\", \"\", \"upcoming\")"]},{"name":"TimelineItem","group":"Content","signature":"TimelineItem(title: string, date?: string, detail?: string, state?: \"done\" | \"current\" | \"upcoming\")","description":"One event in a Timeline. state: done (default), current or upcoming.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":[]}]}
|
|
1
|
+
{"format":1,"pack":"core","version":"0.17.0","groups":[{"name":"Layout","notes":["- A page is root = Stack([...sections], \"column\", \"l\"). Each section is a Card([CardHeader(title, subtitle), ...content]).","- Side by side: Stack([a, b], \"row\", \"m\", \"stretch\", \"start\", true). Cards in a row share the width.","- Tabs for alternative views, Accordion for detail the reader may skip, Steps for ordered procedures. Several blocks in one Card: label each with InlineHeader.","- Card children must match its list; anything else (Accordion, Tag, a Callout row) can sit in a Stack inside the Card, or directly in root's Stack."]},{"name":"Content","notes":["- MarkDownRenderer for prose, bullet lists and inline code; one statement per paragraph group so each is annotatable.","- Callout for the one thing the reader must not miss: a risk, a decision needed, a caveat.","- CodeBlock for a whole snippet. Image src may be a path relative to the artifact file.","- Architecture for systems: services, stores, queues, trust boundaries. Name every Node, Edge and Group. Over ~15 nodes, use lanes or split the diagram.","- lanes: for systems split by owner, repo or tier. Groups are the columns, left to right as listed; put every node in one, in reading order (plain groups for a heading without a frame). About 4 columns fit a laptop; wider ones scroll (check warns). Phones get the lanes stacked as bands. Pin row only to put boxes side by side or line them up.","- Diff for code changes: show the hunks that matter, not whole files. Hunk counts are recomputed, so only start lines matter."]},{"name":"Data","notes":["- Table is COLUMN-oriented: Table([Col(\"Option\", names), Col(\"Effort\", efforts), Col(\"Risk\", risks)]). Col data may mix strings and components, e.g. [\"n/a\", Tag(\"high\", null, \"sm\", \"danger\")]. Cells are plain text (no markdown) and wrap; Col type \"number\" for figures.","- EntityList for key/value facts; OverviewCardBlock + OverviewCardItem + MetricIndicatorInline for a KPI row.","- EditableTable when the reviewer should correct or fill in values; edits arrive with the next @ToAssistant from its Form.","- Icon names are lucide kebab-case (circle-check, triangle-alert, git-branch)."]},{"name":"Charts","notes":["- Charts take column arrays: BarChart(labels, [Series(\"p50\", [..]), Series(\"p99\", [..])], \"grouped\", \"Week\", \"ms\").","- PieChart(labels, values) with plain number arrays."]},{"name":"Forms","notes":["- Form(name, buttons, fields). Define each FormControl as its own statement. Never nest a Form in a Form.","- To ask the reviewer to decide: OptionCards or RadioGroup inside a Form whose button is Button(\"Send decision\", @ToAssistant(\"Decision: rollout strategy\"), \"primary\"). The values arrive with that message as form: {<formName>: {<fieldName>: value}}; no context needed. Reviewers can always annotate and message, so add a notes field only when it belongs with the decision.","- OptionCards(\"pick\", \"single\", [OptionCard(\"a\", \"Option A\", \"why\", Icon(\"zap\")), OptionCard(\"b\", \"Option B\")], {required: true}, \"a\") — the last argument pre-selects.","- rules: {required: true, minLength: 10, ...}; the renderer shows the messages."]},{"name":"Buttons","notes":["- @ToAssistant(message, context?) queues a message to the agent; @OpenUrl(url) opens a link. A Button with no action sends its label.","- Use buttons for follow-ups the reviewer can pick in one click: \"Go with option B\", \"Split this into two PRs\"."]}],"components":[{"name":"Card","group":"Layout","signature":"Card(children: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Tabs | Stack | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[], variant?: \"card\" | \"sunk\" | \"clear\", direction?: \"row\" | \"column\", gap?: \"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"2xl\", align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\", justify?: \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\", wrap?: boolean)","description":"Styled container. variant: \"card\" (default, elevated) | \"sunk\" (recessed) | \"clear\" (transparent). Always full width. Accepts all Stack flex params (default: direction \"column\"). Cards flex to share space in row/wrap layouts.","tier":"core","pack":"core","examples":[]},{"name":"CardHeader","group":"Layout","signature":"CardHeader(title?: string, subtitle?: string)","description":"Header with optional title and subtitle","tier":"core","pack":"core","examples":[]},{"name":"TextContent","group":"Content","signature":"TextContent(text: string, size?: \"small\" | \"default\" | \"large\" | \"small-heavy\" | \"large-heavy\")","description":"Text block. Supports markdown. Optional size: \"small\" | \"default\" | \"large\" | \"small-heavy\" | \"large-heavy\".","tier":"core","pack":"core","examples":[]},{"name":"MarkDownRenderer","group":"Content","signature":"MarkDownRenderer(textMarkdown: string, variant?: \"clear\" | \"card\" | \"sunk\")","description":"Renders markdown text with optional container variant","tier":"core","pack":"core","examples":[]},{"name":"Callout","group":"Content","signature":"Callout(variant: \"info\" | \"warning\" | \"error\" | \"success\" | \"neutral\", title: string, description: string, visible?: $binding<boolean>)","description":"Callout banner. Optional visible is a reactive $boolean — auto-dismisses after 3s by setting $visible to false.","tier":"core","pack":"core","examples":[]},{"name":"Image","group":"Content","signature":"Image(alt: string, src?: string)","description":"Image with alt text and optional URL","tier":"core","pack":"core","examples":[]},{"name":"CodeBlock","group":"Content","signature":"CodeBlock(language: string, codeString: string)","description":"Syntax-highlighted code block","tier":"core","pack":"core","examples":[]},{"name":"InlineHeader","group":"Layout","signature":"InlineHeader(heading: string, description?: string)","description":"Compact section heading with an optional one-line description, for use inside cards.","tier":"core","pack":"core","examples":[]},{"name":"Table","group":"Data","signature":"Table(columns: Col[])","description":"Data table — column-oriented. Each Col holds its own data array.","tier":"core","pack":"core","examples":[]},{"name":"Col","group":"Data","signature":"Col(label: string, data: any, type?: \"string\" | \"number\" | \"action\")","description":"Column definition — holds label + data array","tier":"core","pack":"core","examples":[]},{"name":"EditableTable","group":"Data","signature":"EditableTable(name?: string, columns?: {type: \"text\" | \"number\" | \"date-single\" | \"select\" | \"url\", key?: string, header?: string, width?: number, options?: {value: string, label: string}[]}[], data?: {id: string, values: (string | number)[]}[])","description":"Spreadsheet-like table whose cells the user can edit inline (text, number, url, date, select columns); edits are saved back as a form field","tier":"extended","pack":"core","examples":[]},{"name":"BarChart","group":"Charts","signature":"BarChart(labels: string[], series: Series[], variant?: \"grouped\" | \"stacked\", xLabel?: string, yLabel?: string, height?: number)","description":"Vertical bars; use for comparing values across categories with one or more series","tier":"core","pack":"core","examples":[]},{"name":"LineChart","group":"Charts","signature":"LineChart(labels: string[], series: Series[], variant?: \"linear\" | \"natural\" | \"step\", xLabel?: string, yLabel?: string, height?: number)","description":"Lines over categories; use for trends and continuous data over time","tier":"core","pack":"core","examples":[]},{"name":"AreaChart","group":"Charts","signature":"AreaChart(labels: string[], series: Series[], variant?: \"linear\" | \"natural\" | \"step\", xLabel?: string, yLabel?: string, height?: number)","description":"Filled area under lines; use for cumulative totals or volume trends over time","tier":"extended","pack":"core","examples":[]},{"name":"HorizontalBarChart","group":"Charts","signature":"HorizontalBarChart(labels: string[], series: Series[], variant?: \"grouped\" | \"stacked\", xLabel?: string, yLabel?: string)","description":"Horizontal bars; prefer when category labels are long or for ranked lists","tier":"extended","pack":"core","examples":[]},{"name":"Series","group":"Charts","signature":"Series(category: string, values: number[])","description":"One data series","tier":"core","pack":"core","examples":[]},{"name":"PieChart","group":"Charts","signature":"PieChart(labels: string[], values: number[], variant?: \"pie\" | \"donut\", appearance?: \"circular\" | \"semiCircular\")","description":"Circular slices; use plucked arrays: PieChart(data.categories, data.values)","tier":"core","pack":"core","examples":[]},{"name":"ScatterChart","group":"Charts","signature":"ScatterChart(datasets: ScatterSeries[], xLabel?: string, yLabel?: string)","description":"X/Y scatter plot; use for correlations, distributions, and clustering","tier":"extended","pack":"core","examples":[]},{"name":"ScatterSeries","group":"Charts","signature":"ScatterSeries(name: string, points: Point[])","description":"Named dataset","tier":"extended","pack":"core","examples":[]},{"name":"Point","group":"Charts","signature":"Point(x: number, y: number, z?: number)","description":"Data point with numeric coordinates","tier":"extended","pack":"core","examples":[]},{"name":"Form","group":"Forms","signature":"Form(name: string, buttons: Buttons, fields?: FormControl[])","description":"Form container with fields and explicit action buttons","tier":"core","pack":"core","examples":[]},{"name":"FormControl","group":"Forms","signature":"FormControl(label: string, input: Input | TextArea | Select | Slider | CheckBoxGroup | RadioGroup | Chips | OptionCards, hint?: string)","description":"Field with label, input component, and optional hint text","tier":"core","pack":"core","examples":[]},{"name":"Label","group":"Forms","signature":"Label(text: string)","description":"Text label","tier":"extended","pack":"core","examples":[]},{"name":"Input","group":"Forms","signature":"Input(name: string, placeholder?: string, type?: \"text\" | \"email\" | \"password\" | \"number\" | \"url\", rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"TextArea","group":"Forms","signature":"TextArea(name: string, placeholder?: string, rows?: number, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"Select","group":"Forms","signature":"Select(name: string, items: SelectItem[], placeholder?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>, size?: \"small\" | \"medium\" | \"large\")","description":"","tier":"core","pack":"core","examples":[]},{"name":"SelectItem","group":"Forms","signature":"SelectItem(value: string, label: string)","description":"Option for Select","tier":"core","pack":"core","examples":[]},{"name":"Slider","group":"Forms","signature":"Slider(name: string, variant: \"continuous\" | \"discrete\", min: number, max: number, step?: number, defaultValue?: number[], label?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<number[]>)","description":"Numeric slider input; supports continuous and discrete (stepped) variants","tier":"extended","pack":"core","examples":[]},{"name":"CheckBoxGroup","group":"Forms","signature":"CheckBoxGroup(name: string, items: CheckBoxItem[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<Record<string, boolean>>)","description":"","tier":"extended","pack":"core","examples":[]},{"name":"CheckBoxItem","group":"Forms","signature":"CheckBoxItem(label: string, description: string, name: string, defaultChecked?: boolean)","description":"","tier":"extended","pack":"core","examples":[]},{"name":"RadioGroup","group":"Forms","signature":"RadioGroup(name: string, items: RadioItem[], defaultValue?: string, rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, value?: $binding<string>)","description":"","tier":"core","pack":"core","examples":[]},{"name":"RadioItem","group":"Forms","signature":"RadioItem(label: string, description: string, value: string)","description":"","tier":"core","pack":"core","examples":[]},{"name":"SwitchGroup","group":"Forms","signature":"SwitchGroup(name: string, items: SwitchItem[], variant?: \"clear\" | \"card\" | \"sunk\", value?: $binding<Record<string, boolean>>)","description":"Group of switch toggles","tier":"extended","pack":"core","examples":[]},{"name":"SwitchItem","group":"Forms","signature":"SwitchItem(label?: string, description?: string, name: string, defaultChecked?: boolean)","description":"Individual switch toggle","tier":"extended","pack":"core","examples":[]},{"name":"ChipItem","group":"Forms","signature":"ChipItem(value: string, label: string, icon?: Icon, disabled?: boolean)","description":"A single selectable chip inside a Chips group, with a value, label and optional icon.","tier":"extended","pack":"core","examples":[]},{"name":"Chips","group":"Forms","signature":"Chips(name: string, type?: \"single\" | \"multiple\", items?: ChipItem[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, defaultValue?: string | string[])","description":"A form field of compact selectable chips for choosing one or many short options; the selection is stored under `name`.","tier":"extended","pack":"core","examples":[]},{"name":"OptionCard","group":"Forms","signature":"OptionCard(value: string, title: string, subtitle?: string, topContent?: Icon | Image, disabled?: boolean)","description":"A single selectable card inside an OptionCards group, with a value, title, optional subtitle and an optional Icon or Image on top.","tier":"core","pack":"core","examples":[]},{"name":"OptionCards","group":"Forms","signature":"OptionCards(name: string, type?: \"single\" | \"multiple\", items?: OptionCard[], rules?: {required?: boolean, email?: boolean, url?: boolean, numeric?: boolean, min?: number, max?: number, minLength?: number, maxLength?: number, pattern?: string}, defaultValue?: string | string[])","description":"A form field of selectable cards (title, optional subtitle, optional icon or image) laid out in a responsive grid for choosing one or many options; the selection is stored under `name`.","tier":"core","pack":"core","examples":[]},{"name":"Button","group":"Buttons","signature":"Button(label: string, action?: ActionExpression, variant?: \"primary\" | \"secondary\" | \"tertiary\", type?: \"normal\" | \"destructive\", size?: \"extra-small\" | \"small\" | \"medium\" | \"large\")","description":"Clickable button","tier":"core","pack":"core","examples":[]},{"name":"Buttons","group":"Buttons","signature":"Buttons(buttons: Button[], direction?: \"row\" | \"column\")","description":"Group of Button components. direction: \"row\" (default) | \"column\".","tier":"core","pack":"core","examples":[]},{"name":"Stack","group":"Layout","signature":"Stack(children: any[], direction?: \"row\" | \"column\", gap?: \"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"2xl\", align?: \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\", justify?: \"start\" | \"center\" | \"end\" | \"between\" | \"around\" | \"evenly\", wrap?: boolean)","description":"Flex container. direction: \"row\"|\"column\" (default \"column\"). gap: \"none\"|\"xs\"|\"s\"|\"m\"|\"l\"|\"xl\"|\"2xl\" (default \"m\"). align: \"start\"|\"center\"|\"end\"|\"stretch\"|\"baseline\". justify: \"start\"|\"center\"|\"end\"|\"between\"|\"around\"|\"evenly\".","tier":"core","pack":"core","examples":[]},{"name":"Tabs","group":"Layout","signature":"Tabs(items: TabItem[])","description":"Tabbed container","tier":"core","pack":"core","examples":[]},{"name":"TabItem","group":"Layout","signature":"TabItem(value: string, trigger: string, content: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[])","description":"value is unique id, trigger is tab label, content is array of components","tier":"core","pack":"core","examples":[]},{"name":"Accordion","group":"Layout","signature":"Accordion(items: AccordionItem[])","description":"Collapsible sections","tier":"core","pack":"core","examples":[]},{"name":"AccordionItem","group":"Layout","signature":"AccordionItem(value: string, trigger: string, content: (TextContent | MarkDownRenderer | CardHeader | Callout | CodeBlock | Image | Separator | HorizontalBarChart | PieChart | ScatterChart | AreaChart | BarChart | LineChart | Table | TagBlock | Form | Buttons | Steps | InlineHeader | EntityList | EditableTable | OverviewCardBlock | Architecture | Diff | FileTree | Progress | Avatar | AvatarGroup | Tooltip | HoverCard | Breadcrumb | Kbd | Skeleton | Calendar | Timeline)[])","description":"value is unique id, trigger is section title","tier":"core","pack":"core","examples":[]},{"name":"Steps","group":"Layout","signature":"Steps(items: StepsItem[])","description":"Step-by-step guide","tier":"core","pack":"core","examples":[]},{"name":"StepsItem","group":"Layout","signature":"StepsItem(title: string, details: string)","description":"title and details text for one step","tier":"core","pack":"core","examples":[]},{"name":"Separator","group":"Layout","signature":"Separator(orientation?: \"horizontal\" | \"vertical\", decorative?: boolean)","description":"Visual divider between content sections","tier":"core","pack":"core","examples":[]},{"name":"TagBlock","group":"Data","signature":"TagBlock(tags: string[], size?: \"sm\" | \"md\" | \"lg\")","description":"tags is an array of strings; optional size sm | md | lg","tier":"extended","pack":"core","examples":[]},{"name":"Tag","group":"Data","signature":"Tag(text: string, icon?: Icon, size?: \"sm\" | \"md\" | \"lg\", variant?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\")","description":"Styled tag/badge with optional Icon and variant","tier":"core","pack":"core","examples":[]},{"name":"Icon","group":"Data","signature":"Icon(name: string, category?: string)","description":"A lucide icon by kebab-case name (e.g. 'circle-check'). Optional category picks a topical fallback when the name doesn't resolve.","tier":"core","pack":"core","examples":[]},{"name":"EntityList","group":"Data","signature":"EntityList(rows?: {left: string, right: string, rightVariant?: \"text\" | \"number\"}[], size?: \"small\" | \"default\", header?: {left: string, right: string, rightVariant?: \"text\" | \"number\"}, footer?: {left: string, right: string, rightVariant?: \"text\" | \"number\"})","description":"Two-column key/value rows (left label, right value). size 'default' supports optional header and footer rows; rightVariant 'number' uses tabular numbers.","tier":"core","pack":"core","examples":[]},{"name":"Text","group":"Data","signature":"Text(variant?: \"text\" | \"number\", value: string, subtext?: string, subtextVariant?: \"text\" | \"number\" | \"metric\", size?: \"xs\" | \"sm\" | \"md\" | \"lg\")","description":"Plain text line with optional subtext. variant 'number' uses tabular number styling; subtextVariant 'metric' colors a leading +/- subtext green/red.","tier":"core","pack":"core","examples":[]},{"name":"BoldText","group":"Data","signature":"BoldText(variant?: \"text\" | \"number\", value: string, subtext?: string, subtextVariant?: \"text\" | \"number\" | \"metric\", size?: \"xs\" | \"sm\" | \"md\" | \"lg\")","description":"Emphasized (bold) text line with optional subtext. variant 'number' uses tabular number styling; subtextVariant 'metric' colors a leading +/- subtext green/red.","tier":"extended","pack":"core","examples":[]},{"name":"IconText","group":"Data","signature":"IconText(icon: Icon, iconVariant?: \"neutral\" | \"info\" | \"success\" | \"warning\" | \"danger\" | \"inverted\" | \"filled\" | \"soft\", iconSize?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"sm\" | \"md\" | \"lg\", title: string, subtitle?: string, bold?: boolean, layout?: \"horizontal\" | \"vertical\")","description":"An icon badge with a title and optional subtitle, laid out horizontally or vertically. iconVariant sets the badge color.","tier":"extended","pack":"core","examples":[]},{"name":"MetricIndicatorInline","group":"Data","signature":"MetricIndicatorInline(value: string, subtext?: string, trend?: {direction: \"up\" | \"down\", value: number})","description":"Headline metric value with an optional +/- percentage trend and subtext, all on one line.","tier":"core","pack":"core","examples":[]},{"name":"OverviewCardItem","group":"Data","signature":"OverviewCardItem(id?: string, top: IconText | Text, bottom?: MetricIndicatorInline)","description":"One overview card: a heading slot at the top (IconText, ImageText or Text) and an optional MetricIndicatorInline at the bottom.","tier":"core","pack":"core","examples":[]},{"name":"OverviewCardBlock","group":"Data","signature":"OverviewCardBlock(items: OverviewCardItem[], layout?: \"grid\" | \"carousel\", responsive?: boolean, action?: ActionExpression, gap?: number | string)","description":"A grid or horizontal carousel of compact overview cards, each with a heading (icon/image/text) on top and an inline metric below; optionally clickable with a shared action.","tier":"core","pack":"core","examples":[]},{"name":"Architecture","group":"Content","signature":"Architecture(nodes: Node[], edges: Edge[], groups?: Group[], direction?: \"auto\" | \"right\" | \"down\" | \"lanes\")","description":"System diagram laid out automatically: write no coordinates. Every Node, Edge and Group is its own statement and click target. direction auto (default) runs right when that fits the page legibly, else down; lanes makes each top-level Group a column.","tier":"core","pack":"core","examples":["platformMap = Architecture([browser, edge, api, sessions, cache], [toEdge, toApi, readSessions, readCache], [vpc])\nbrowser = Node(\"Browser\", \"external\")\nedge = Node(\"Edge worker\", \"cloud\", \"Cloudflare\")\napi = Node(\"API\", \"backend\", \"Node :8080\")\nsessions = Node(\"Sessions\", \"database\", \"Postgres\", \"new\")\ncache = Node(\"Redis\", \"database\", \"read-through\")\ntoEdge = Edge(browser, edge, \"HTTPS\", \"emphasis\")\ntoApi = Edge(edge, api)\nreadSessions = Edge(api, sessions, \"SQL\")\nreadCache = Edge(api, cache, \"cache\", \"dashed\")\nvpc = Group(\"Platform VPC\", [api, sessions, cache])","ownership = Architecture([web, ordersApi, ledger, ordersDb, billingJob], [placeOrder, writeOrder, readOrders, postLedger], [clients, ordersRepo, billingRepo], \"lanes\")\nweb = Node(\"Web app\", \"frontend\")\nordersApi = Node(\"Orders API\", \"backend\", \"Node :8080\")\nordersDb = Node(\"orders table\", \"database\", \"Postgres\", null, \"success\")\nbillingJob = Node(\"Nightly billing\", \"backend\", \"cron 02:00\")\nledger = Node(\"Ledger\", \"database\", \"append-only\", null, \"info\")\nplaceOrder = Edge(web, ordersApi, \"POST /orders\")\nwriteOrder = Edge(ordersApi, ordersDb, \"insert\")\nreadOrders = Edge(billingJob, ordersDb, \"read unbilled\", null, \"danger\")\npostLedger = Edge(billingJob, ledger, \"post\")\nclients = Group(\"CLIENTS\", [web], \"plain\")\nordersRepo = Group(\"orders-service\", [ordersApi, ordersDb])\nbillingRepo = Group(\"billing\", [billingJob, ledger])"]},{"name":"Node","group":"Content","signature":"Node(label: string, kind?: \"frontend\" | \"backend\" | \"database\" | \"messagebus\" | \"cloud\" | \"security\" | \"external\", detail?: string, tag?: string, tone?: \"info\" | \"success\" | \"warning\" | \"danger\" | \"strong\", row?: number)","description":"A box in an Architecture. kind sets icon and color (default backend); detail is monospace, up to 2 lines (\\n breaks); tag is a small chip such as \"new\"; tone tints it (danger = risk, strong = where it ends); row pins it to a row (1, 2, ...) in lanes.","tier":"core","pack":"core","examples":[]},{"name":"Edge","group":"Content","signature":"Edge(from: Node, to: Node, label?: string, style?: \"solid\" | \"dashed\" | \"emphasis\" | \"security\", tone?: \"info\" | \"success\" | \"warning\" | \"danger\")","description":"An arrow between two Node statements (pass their names, not strings). style: dashed for async, emphasis for the main path, security for auth or trust flows. tone colors it, e.g. danger for a risky write, success for a read.","tier":"core","pack":"core","examples":[]},{"name":"Group","group":"Content","signature":"Group(label: string, members: Node[], kind?: \"region\" | \"security\" | \"plain\")","description":"A boundary around Node statements (a VPC, a cluster, a trust zone); members still sit where their edges put them. A group whose members are a subset of another's is drawn inside it; kind security draws it red, plain draws only its name.","tier":"core","pack":"core","examples":[]},{"name":"Diff","group":"Content","signature":"Diff(patch: string, title?: string)","description":"Unified diff (git diff output, one or more files) with line numbers. patch is a raw multi-line string. Clicked lines reach the agent as file:+line.","tier":"core","pack":"core","examples":["retryPatch = Diff(\"diff --git a/src/retry.ts b/src/retry.ts\n--- a/src/retry.ts\n+++ b/src/retry.ts\n@@ -10,2 +10,3 @@\n- for (let i = 0; i < 3; i++) {\n+ for (let i = 0; i < MAX_ATTEMPTS; i++) {\n+ if (i > 0) await sleep(backoff(i));\")"]},{"name":"FileTree","group":"Data","signature":"FileTree(entries: string[])","description":"File tree, one path per entry, optionally prefixed with a git status code (A new, M modified, D deleted, R old -> new) and suffixed with \" # note\". Folders are inferred. Clicked files and folders reach the agent by path.","tier":"core","pack":"core","examples":["changedFiles = FileTree([\"M src/session/store.ts # read-through to Postgres\", \"A src/session/pg-store.ts\", \"A migrations/0042_sessions.sql # table + expiry index\", \"R src/session/redis.ts -> src/session/redis-cache.ts\", \"D src/session/legacy.ts\", \"M src/config.ts # SESSIONS_PG flag\"])"]},{"name":"Progress","group":"Data","signature":"Progress(value: number, label?: string, max?: number)","description":"Progress bar. value counts toward max (default 100); label names what is progressing. Shows a percentage.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["migration = Progress(64, \"Rows migrated\")"]},{"name":"Avatar","group":"Data","signature":"Avatar(name: string, src?: string, size?: \"md\" | \"lg\")","description":"Round avatar for a person. Shows the initials of name; src is an optional https image URL.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["owner = Avatar(\"Ada Lovelace\")"]},{"name":"AvatarGroup","group":"Data","signature":"AvatarGroup(avatars: Avatar[], max?: number)","description":"Overlapping Avatars, for reviewers or owners. max (default 4) shows the rest as +N.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["team = AvatarGroup([ada, grace, linus], 2)\nada = Avatar(\"Ada Lovelace\")\ngrace = Avatar(\"Grace Hopper\")\nlinus = Avatar(\"Linus Torvalds\")"]},{"name":"Tooltip","group":"Content","signature":"Tooltip(text: string, tip: string)","description":"Inline text with a short hint on hover or focus (a term and its definition). Keep tip to one line.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["term = Tooltip(\"idempotent\", \"Safe to run twice with the same result.\")"]},{"name":"HoverCard","group":"Content","signature":"HoverCard(text: string, title: string, body?: string)","description":"Inline text that shows a small card (title and a line or two of body) on hover or focus, e.g. a person or a service.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["svc = HoverCard(\"billing-api\", \"billing-api\", \"Owns invoices and refunds. On call: payments team.\")"]},{"name":"Breadcrumb","group":"Content","signature":"Breadcrumb(items: BreadcrumbItem[])","description":"Path trail such as Repo / Package / File, from BreadcrumbItems. Each item is a click target.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["trail = Breadcrumb([repo, pkg, file])\nrepo = BreadcrumbItem(\"austere-axi\")\npkg = BreadcrumbItem(\"packs\")\nfile = BreadcrumbItem(\"shadcn\")"]},{"name":"BreadcrumbItem","group":"Content","signature":"BreadcrumbItem(label: string, href?: string)","description":"One step of a Breadcrumb. href is optional; the last item is the current page.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":[]},{"name":"Kbd","group":"Content","signature":"Kbd(keys: string)","description":"Keyboard shortcut. keys joins keys with \"+\", e.g. \"Ctrl+K\"; each key is drawn as a key cap.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["shortcut = Kbd(\"Ctrl+Shift+P\")"]},{"name":"Skeleton","group":"Content","signature":"Skeleton(lines?: number, shape?: \"lines\" | \"avatar\")","description":"Grey placeholder block for content not yet written or loaded (default 3 lines). shape avatar adds a round head.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["pending = Skeleton(3, \"avatar\")"]},{"name":"Calendar","group":"Data","signature":"Calendar(month: string, highlights?: string[])","description":"Read-only month grid (not a date picker). month is \"YYYY-MM\"; highlights lists \"YYYY-MM-DD\" or \"YYYY-MM-DD label\" entries to mark, e.g. a freeze or a release. Marked days are click targets.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["window = Calendar(\"2026-11\", [\"2026-11-04 Code freeze\", \"2026-11-12 Release\", \"2026-11-13\"])"]},{"name":"Timeline","group":"Content","signature":"Timeline(items: TimelineItem[])","description":"Vertical history or schedule of TimelineItems, oldest first. Each item is a click target.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":["history = Timeline([found, fixed, rollout])\nfound = TimelineItem(\"Bug found\", \"Oct 28\", \"Retries double-charge on timeout.\")\nfixed = TimelineItem(\"Fix merged\", \"Oct 29\", \"Idempotency key added.\", \"current\")\nrollout = TimelineItem(\"Rollout\", \"Nov 3\", \"\", \"upcoming\")"]},{"name":"TimelineItem","group":"Content","signature":"TimelineItem(title: string, date?: string, detail?: string, state?: \"done\" | \"current\" | \"upcoming\")","description":"One event in a Timeline. state: done (default), current or upcoming.","tier":"extended","pack":"@austere-axi/pack-shadcn","examples":[]}]}
|
package/dist/cli.mjs
CHANGED
|
@@ -23605,7 +23605,7 @@ var init_paths = __esm({
|
|
|
23605
23605
|
HERE = path.dirname(fileURLToPath(import.meta.url));
|
|
23606
23606
|
BUNDLED = true;
|
|
23607
23607
|
ASSET_DIR = BUNDLED ? HERE : path.resolve(HERE, "../../dist");
|
|
23608
|
-
VERSION = true ? "0.
|
|
23608
|
+
VERSION = true ? "0.17.0" : packageVersion();
|
|
23609
23609
|
CLI_ENTRY = BUNDLED ? fileURLToPath(import.meta.url) : path.resolve(HERE, "main.ts");
|
|
23610
23610
|
REAL_PORT = 4388;
|
|
23611
23611
|
securedDir = null;
|
|
@@ -36273,10 +36273,10 @@ function cloudFile() {
|
|
|
36273
36273
|
}
|
|
36274
36274
|
function accountOf(raw) {
|
|
36275
36275
|
if (!raw || typeof raw !== "object" || !("user" in raw) || !raw.user || typeof raw.user !== "object") return null;
|
|
36276
|
-
const [clientId, apiBase,
|
|
36276
|
+
const [clientId, apiBase, accessToken, refreshToken] = ["clientId", "apiBase", "accessToken", "refreshToken"].map((k) => str2(raw, k));
|
|
36277
36277
|
const [id, email3, name2] = ["id", "email", "name"].map((k) => str2(raw.user, k));
|
|
36278
|
-
if (!clientId || !apiBase || !
|
|
36279
|
-
return { clientId, apiBase, accessToken
|
|
36278
|
+
if (!clientId || !apiBase || !accessToken || !refreshToken || !id || !email3) return null;
|
|
36279
|
+
return { clientId, apiBase, accessToken, refreshToken, user: { id, email: email3, name: name2 ?? "" } };
|
|
36280
36280
|
}
|
|
36281
36281
|
function readCloud() {
|
|
36282
36282
|
let raw;
|
|
@@ -36284,11 +36284,13 @@ function readCloud() {
|
|
|
36284
36284
|
raw = JSON.parse(fs20.readFileSync(cloudFile(), "utf8"));
|
|
36285
36285
|
} catch {
|
|
36286
36286
|
}
|
|
36287
|
-
const state = { url: "",
|
|
36287
|
+
const state = { url: "", owner: "", account: null, pages: {} };
|
|
36288
36288
|
if (!raw || typeof raw !== "object") return state;
|
|
36289
36289
|
if ("url" in raw && typeof raw.url === "string") state.url = raw.url;
|
|
36290
|
-
if ("token" in raw && typeof raw.token === "string") state.token = raw.token;
|
|
36291
36290
|
if ("account" in raw) state.account = accountOf(raw.account);
|
|
36291
|
+
if ("owner" in raw && typeof raw.owner === "string") state.owner = raw.owner;
|
|
36292
|
+
else if (state.account) state.owner = state.account.user.id;
|
|
36293
|
+
else if ("token" in raw && typeof raw.token === "string" && raw.token) state.owner = ANONYMOUS;
|
|
36292
36294
|
const pages = "pages" in raw && raw.pages && typeof raw.pages === "object" ? raw.pages : {};
|
|
36293
36295
|
for (const [file3, e] of Object.entries(pages)) {
|
|
36294
36296
|
if (!e || typeof e !== "object" || !("id" in e) || typeof e.id !== "string") continue;
|
|
@@ -36316,7 +36318,8 @@ function writeFile(state) {
|
|
|
36316
36318
|
fs20.renameSync(tmp, file3);
|
|
36317
36319
|
}
|
|
36318
36320
|
function writeCloud(state) {
|
|
36319
|
-
|
|
36321
|
+
const cur = readCloud();
|
|
36322
|
+
writeFile({ ...state, account: cur.account, owner: cur.owner });
|
|
36320
36323
|
}
|
|
36321
36324
|
async function withCloudLock(fn2) {
|
|
36322
36325
|
const dir = `${cloudFile()}.lock`;
|
|
@@ -36339,10 +36342,9 @@ async function withCloudLock(fn2) {
|
|
|
36339
36342
|
fs20.rmSync(dir, { recursive: true, force: true });
|
|
36340
36343
|
}
|
|
36341
36344
|
}
|
|
36342
|
-
function saveAccount(account
|
|
36345
|
+
function saveAccount(account) {
|
|
36343
36346
|
const cur = readCloud();
|
|
36344
36347
|
cur.account = account;
|
|
36345
|
-
if (url2) cur.url = url2;
|
|
36346
36348
|
writeFile(cur);
|
|
36347
36349
|
}
|
|
36348
36350
|
function settingsFile() {
|
|
@@ -36368,14 +36370,19 @@ function requireCloud() {
|
|
|
36368
36370
|
function stateFor(url2) {
|
|
36369
36371
|
requireCloud();
|
|
36370
36372
|
const state = readCloud();
|
|
36371
|
-
if (
|
|
36373
|
+
if (state.account && state.url && state.url !== url2) {
|
|
36372
36374
|
throw new CloudError(
|
|
36373
|
-
`${cloudFile()} holds
|
|
36375
|
+
`${cloudFile()} holds an account for ${state.url}, not ${url2}. Set AUSTERE_AXI_CLOUD_URL=${state.url}, use another AUSTERE_AXI_STATE_DIR for ${url2}, or, if ${state.url} is gone, move ${cloudFile()} aside to start over on ${url2}.`
|
|
36374
36376
|
);
|
|
36375
36377
|
}
|
|
36376
36378
|
state.url = url2;
|
|
36377
36379
|
return state;
|
|
36378
36380
|
}
|
|
36381
|
+
function ownerState(url2) {
|
|
36382
|
+
const state = stateFor(url2);
|
|
36383
|
+
if (!state.account) throw new CloudError(NOT_SIGNED_IN, void 0, LOGIN_REQUIRED);
|
|
36384
|
+
return state;
|
|
36385
|
+
}
|
|
36379
36386
|
function sha256Hex(text) {
|
|
36380
36387
|
return crypto10.createHash("sha256").update(text, "utf8").digest("hex");
|
|
36381
36388
|
}
|
|
@@ -36445,19 +36452,8 @@ async function call(base, method, route, opts = {}) {
|
|
|
36445
36452
|
if (opts.text) return text;
|
|
36446
36453
|
return text ? JSON.parse(text) : null;
|
|
36447
36454
|
}
|
|
36448
|
-
|
|
36449
|
-
|
|
36450
|
-
const data = await call(state.url, "POST", "/api/owners");
|
|
36451
|
-
if (!data || typeof data.token !== "string") throw new CloudError(`${state.url} did not return an owner token`);
|
|
36452
|
-
state.token = data.token;
|
|
36453
|
-
writeCloud(state);
|
|
36454
|
-
return state.token;
|
|
36455
|
-
}
|
|
36456
|
-
function credential(state) {
|
|
36457
|
-
return state.account ? accessToken(state) : ensureToken(state);
|
|
36458
|
-
}
|
|
36459
|
-
function hasOwner(state) {
|
|
36460
|
-
return !!(state.token || state.account);
|
|
36455
|
+
function signedIn(state) {
|
|
36456
|
+
return state.account !== null;
|
|
36461
36457
|
}
|
|
36462
36458
|
function tokenExp(jwt2) {
|
|
36463
36459
|
try {
|
|
@@ -36496,11 +36492,11 @@ function accountFrom(clientId, apiBase, data) {
|
|
|
36496
36492
|
if (!account) throw new CloudError(`${apiBase} answered without tokens or a user`);
|
|
36497
36493
|
return account;
|
|
36498
36494
|
}
|
|
36499
|
-
async function
|
|
36495
|
+
async function credential(state) {
|
|
36500
36496
|
if (state.account && fresh(state.account)) return state.account.accessToken;
|
|
36501
36497
|
return withCloudLock(async () => {
|
|
36502
36498
|
const cur = readCloud().account;
|
|
36503
|
-
if (!cur) throw new CloudError(
|
|
36499
|
+
if (!cur) throw new CloudError(NOT_SIGNED_IN, void 0, LOGIN_REQUIRED);
|
|
36504
36500
|
state.account = cur;
|
|
36505
36501
|
if (fresh(cur)) return cur.accessToken;
|
|
36506
36502
|
const r = await workos(cur.apiBase, "/user_management/authenticate", { grant_type: "refresh_token", refresh_token: cur.refreshToken, client_id: cur.clientId });
|
|
@@ -36520,7 +36516,7 @@ async function accessToken(state) {
|
|
|
36520
36516
|
}
|
|
36521
36517
|
async function login(prompt) {
|
|
36522
36518
|
const base = cloudUrl();
|
|
36523
|
-
|
|
36519
|
+
stateFor(base);
|
|
36524
36520
|
const config2 = await call(base, "GET", "/auth/config");
|
|
36525
36521
|
const clientId = typeof config2?.clientId === "string" ? config2.clientId : "";
|
|
36526
36522
|
const apiBase = typeof config2?.apiBase === "string" && /^https?:\/\//.test(config2.apiBase) ? config2.apiBase.replace(/\/+$/, "") : "";
|
|
@@ -36552,20 +36548,16 @@ async function login(prompt) {
|
|
|
36552
36548
|
else if (r.data.error === "expired_token") throw new CloudError("the sign-in code expired before it was approved: run austere-axi cloud login again");
|
|
36553
36549
|
else throw new CloudError(`${apiBase} refused the sign-in (${r.status}${typeof r.data.error === "string" ? `: ${r.data.error}` : ""})`);
|
|
36554
36550
|
}
|
|
36555
|
-
|
|
36556
|
-
|
|
36557
|
-
|
|
36558
|
-
|
|
36559
|
-
|
|
36560
|
-
|
|
36561
|
-
const c = await call(base, "POST", "/api/owners/claim", { token: account.accessToken, json: { token: state.token } });
|
|
36562
|
-
claimed = typeof c?.pages === "number" ? c.pages : 0;
|
|
36563
|
-
} catch (err) {
|
|
36564
|
-
if (!(err instanceof CloudError)) throw err;
|
|
36565
|
-
claimError = err.message;
|
|
36551
|
+
let forgotten = 0;
|
|
36552
|
+
await withCloudLock(async () => {
|
|
36553
|
+
const cur = readCloud();
|
|
36554
|
+
if (cur.owner && cur.owner !== account.user.id) {
|
|
36555
|
+
forgotten = Object.keys(cur.pages).length;
|
|
36556
|
+
cur.pages = {};
|
|
36566
36557
|
}
|
|
36567
|
-
|
|
36568
|
-
|
|
36558
|
+
writeFile({ ...cur, url: base, owner: account.user.id, account });
|
|
36559
|
+
});
|
|
36560
|
+
return { email: account.user.email, name: account.user.name, forgotten };
|
|
36569
36561
|
}
|
|
36570
36562
|
async function logout() {
|
|
36571
36563
|
return withCloudLock(async () => {
|
|
@@ -36585,10 +36577,8 @@ async function whoami() {
|
|
|
36585
36577
|
function ownerSocket(base, credential2, id) {
|
|
36586
36578
|
requireCloud();
|
|
36587
36579
|
const url2 = `${base.replace(/^http/, "ws")}/api/pages/${encodeURIComponent(id)}/sync?cli=${encodeURIComponent(VERSION)}`;
|
|
36588
|
-
const
|
|
36589
|
-
|
|
36590
|
-
if (jwt2) headers.authorization = `Bearer ${credential2}`;
|
|
36591
|
-
return new wrapper_default(url2, syncProtocols(jwt2 ? {} : { owner: credential2 }), { headers, followRedirects: false });
|
|
36580
|
+
const headers = { "user-agent": `austere-axi/${VERSION}`, authorization: `Bearer ${credential2}` };
|
|
36581
|
+
return new wrapper_default(url2, syncProtocols({}), { headers, followRedirects: false });
|
|
36592
36582
|
}
|
|
36593
36583
|
function onRefusal(ws, base, done) {
|
|
36594
36584
|
ws.on("unexpected-response", (_req, res) => {
|
|
@@ -36712,7 +36702,7 @@ async function publish(abs, opts = {}) {
|
|
|
36712
36702
|
const names = [...new Set((opts.invite ?? []).map(inviteName))];
|
|
36713
36703
|
if (opts.expiresAt !== void 0 && !names.length) throw new CloudError("--expires applies to the invites of this publish: add --invite <name>");
|
|
36714
36704
|
const base = cloudUrl();
|
|
36715
|
-
const state =
|
|
36705
|
+
const state = ownerState(base);
|
|
36716
36706
|
const bundle = bundlePage(abs, fs20.readFileSync(abs, "utf8"));
|
|
36717
36707
|
const token = await credential(state);
|
|
36718
36708
|
await call(base, "PUT", `/api/objects/${bundle.sha256}`, { token, body: { type: "text/html; charset=utf-8", data: bundle.html } });
|
|
@@ -36775,12 +36765,11 @@ async function publish(abs, opts = {}) {
|
|
|
36775
36765
|
function entryOf(state, abs) {
|
|
36776
36766
|
const entry = state.pages[abs];
|
|
36777
36767
|
if (!entry) throw new CloudError(`${abs} has not been published from this machine (see austere-axi publish list)`);
|
|
36778
|
-
if (!hasOwner(state)) throw new CloudError("nothing has been published from this machine");
|
|
36779
36768
|
return entry;
|
|
36780
36769
|
}
|
|
36781
36770
|
async function listInvites(abs) {
|
|
36782
36771
|
const base = cloudUrl();
|
|
36783
|
-
const state =
|
|
36772
|
+
const state = ownerState(base);
|
|
36784
36773
|
const entry = entryOf(state, abs);
|
|
36785
36774
|
const rows = latest((await ownerSession(base, await credential(state), entry.id, [], { pull: true })).rows);
|
|
36786
36775
|
const page = rows.find((r) => r.type === "page");
|
|
@@ -36797,7 +36786,7 @@ async function listInvites(abs) {
|
|
|
36797
36786
|
}
|
|
36798
36787
|
async function revokeInvite(abs, name2) {
|
|
36799
36788
|
const base = cloudUrl();
|
|
36800
|
-
const state =
|
|
36789
|
+
const state = ownerState(base);
|
|
36801
36790
|
const entry = entryOf(state, abs);
|
|
36802
36791
|
const n = inviteName(name2);
|
|
36803
36792
|
await ownerSession(base, await credential(state), entry.id, [{ name: "revoke", args: { name: n } }]);
|
|
@@ -36807,7 +36796,7 @@ async function revokeInvite(abs, name2) {
|
|
|
36807
36796
|
}
|
|
36808
36797
|
async function ownerLogin(abs) {
|
|
36809
36798
|
const base = cloudUrl();
|
|
36810
|
-
const state =
|
|
36799
|
+
const state = ownerState(base);
|
|
36811
36800
|
const entry = entryOf(state, abs);
|
|
36812
36801
|
const data = await call(base, "POST", `/api/pages/${encodeURIComponent(entry.id)}/login`, { token: await credential(state) });
|
|
36813
36802
|
if (!data || typeof data.code !== "string" || !/^[A-Za-z0-9_-]+$/.test(data.code) || typeof data.ttlMs !== "number") {
|
|
@@ -36817,20 +36806,18 @@ async function ownerLogin(abs) {
|
|
|
36817
36806
|
}
|
|
36818
36807
|
async function listPages() {
|
|
36819
36808
|
const base = cloudUrl();
|
|
36820
|
-
const state =
|
|
36821
|
-
if (!hasOwner(state)) return [];
|
|
36809
|
+
const state = ownerState(base);
|
|
36822
36810
|
const data = await call(base, "GET", "/api/pages", { token: await credential(state) });
|
|
36823
36811
|
const fileOf = new Map(Object.entries(state.pages).map(([file3, e]) => [e.id, file3]));
|
|
36824
36812
|
return (data?.pages || []).map((p) => ({ ...p, file: fileOf.get(p.id) }));
|
|
36825
36813
|
}
|
|
36826
36814
|
async function removePage(key2) {
|
|
36827
36815
|
const base = cloudUrl();
|
|
36828
|
-
const state =
|
|
36816
|
+
const state = ownerState(base);
|
|
36829
36817
|
let file3 = state.pages[key2] ? key2 : void 0;
|
|
36830
36818
|
const id = file3 ? state.pages[key2].id : key2;
|
|
36831
36819
|
if (!file3) file3 = Object.keys(state.pages).find((f) => state.pages[f].id === id);
|
|
36832
36820
|
if (!file3 && !PAGE_ID_RE.test(id)) throw new CloudError(`${key2} is not a published file or a page id (see austere-axi publish list)`);
|
|
36833
|
-
if (!hasOwner(state)) throw new CloudError("nothing has been published from this machine");
|
|
36834
36821
|
let gone = false;
|
|
36835
36822
|
try {
|
|
36836
36823
|
await ownerSession(base, await credential(state), id, [{ name: "delete", args: {} }]);
|
|
@@ -36851,8 +36838,7 @@ function localCopy(html) {
|
|
|
36851
36838
|
async function clonePage(id, abs) {
|
|
36852
36839
|
if (!PAGE_ID_RE.test(id)) throw new CloudError(`${id} is not a page id (see austere-axi clone)`);
|
|
36853
36840
|
const base = cloudUrl();
|
|
36854
|
-
const state =
|
|
36855
|
-
if (!hasOwner(state)) throw new CloudError("no owner credential on this machine: run austere-axi cloud login first");
|
|
36841
|
+
const state = ownerState(base);
|
|
36856
36842
|
const other = Object.keys(state.pages).find((f) => state.pages[f].id === id);
|
|
36857
36843
|
if (other) throw new CloudError(`page ${id} is already attached to ${other}`);
|
|
36858
36844
|
if (fs20.existsSync(abs)) throw new CloudError(`${abs} exists already: clone writes a new file`);
|
|
@@ -36867,7 +36853,7 @@ async function clonePage(id, abs) {
|
|
|
36867
36853
|
writeCloud(state);
|
|
36868
36854
|
return { id, file: abs, url: `${base}/p/${id}`, title: page?.title ?? readArtifact(html).title };
|
|
36869
36855
|
}
|
|
36870
|
-
var DEFAULT_CLOUD_URL, PAGE_ID_RE, SOCKET_TIMEOUT_MS, MAX_INVITE_NAME, INVITE_TOKEN_RE, str2, sleep3, CloudError, CLOUD_OFF, REFRESH_MARGIN_S, fresh, HOSTED_PACK_TAG_RE;
|
|
36856
|
+
var DEFAULT_CLOUD_URL, PAGE_ID_RE, SOCKET_TIMEOUT_MS, MAX_INVITE_NAME, INVITE_TOKEN_RE, ANONYMOUS, str2, sleep3, CloudError, CLOUD_OFF, LOGIN_REQUIRED, NOT_SIGNED_IN, REFRESH_MARGIN_S, fresh, HOSTED_PACK_TAG_RE;
|
|
36871
36857
|
var init_cloud = __esm({
|
|
36872
36858
|
"src/cli/cloud.ts"() {
|
|
36873
36859
|
"use strict";
|
|
@@ -36882,6 +36868,7 @@ var init_cloud = __esm({
|
|
|
36882
36868
|
SOCKET_TIMEOUT_MS = 3e4;
|
|
36883
36869
|
MAX_INVITE_NAME = LIMITS.nameChars;
|
|
36884
36870
|
INVITE_TOKEN_RE = /^[A-Za-z0-9_-]{43}$/;
|
|
36871
|
+
ANONYMOUS = "(anonymous)";
|
|
36885
36872
|
str2 = (o, k) => k in o && typeof o[k] === "string" ? o[k] : null;
|
|
36886
36873
|
sleep3 = (ms2) => new Promise((r) => setTimeout(r, ms2));
|
|
36887
36874
|
CloudError = class extends Error {
|
|
@@ -36896,6 +36883,8 @@ var init_cloud = __esm({
|
|
|
36896
36883
|
}
|
|
36897
36884
|
};
|
|
36898
36885
|
CLOUD_OFF = "cloud_off";
|
|
36886
|
+
LOGIN_REQUIRED = "login_required";
|
|
36887
|
+
NOT_SIGNED_IN = "not signed in to the hosted service: run `austere-axi cloud login` first (once per machine), then try again";
|
|
36899
36888
|
REFRESH_MARGIN_S = 60;
|
|
36900
36889
|
fresh = (a) => tokenExp(a.accessToken) - REFRESH_MARGIN_S > Date.now() / 1e3;
|
|
36901
36890
|
HOSTED_PACK_TAG_RE = /<script\b[^>]*\bsrc\s*=\s*["'](?:\/rt\/[^/"']+\/packs\/[a-z0-9-]+\.js|\/pk\/[0-9a-f]{64}\.js)["'][^>]*>\s*<\/script\s*>\n?/gi;
|
|
@@ -39637,7 +39626,7 @@ var init_peer = __esm({
|
|
|
39637
39626
|
start() {
|
|
39638
39627
|
if (!cloudEnabled()) return;
|
|
39639
39628
|
const state = readCloud();
|
|
39640
|
-
if (!
|
|
39629
|
+
if (!signedIn(state)) return;
|
|
39641
39630
|
for (const [file3, e] of Object.entries(state.pages)) this.kick(this.link(e.id, file3), { pull: true });
|
|
39642
39631
|
for (const q2 of this.queued()) this.kick(this.link(q2.page_id, q2.file));
|
|
39643
39632
|
}
|
|
@@ -39766,7 +39755,7 @@ var init_peer = __esm({
|
|
|
39766
39755
|
linkFor(file3) {
|
|
39767
39756
|
if (!cloudEnabled()) return null;
|
|
39768
39757
|
const state = readCloud();
|
|
39769
|
-
const e =
|
|
39758
|
+
const e = signedIn(state) ? state.pages[file3] : void 0;
|
|
39770
39759
|
return e ? this.link(e.id, file3) : null;
|
|
39771
39760
|
}
|
|
39772
39761
|
link(page, file3) {
|
|
@@ -39812,7 +39801,7 @@ var init_peer = __esm({
|
|
|
39812
39801
|
/** Reads the credential (refreshing an account's access token when due), then opens the socket. */
|
|
39813
39802
|
connect(link) {
|
|
39814
39803
|
const state = readCloud();
|
|
39815
|
-
if (!
|
|
39804
|
+
if (!signedIn(state)) return this.stop(link, "not signed in to the hosted service: run austere-axi cloud login");
|
|
39816
39805
|
if (link.connecting) return;
|
|
39817
39806
|
const base = state.url || cloudUrl();
|
|
39818
39807
|
link.connecting = true;
|
|
@@ -39824,7 +39813,7 @@ var init_peer = __esm({
|
|
|
39824
39813
|
(err) => {
|
|
39825
39814
|
link.connecting = false;
|
|
39826
39815
|
link.lastError = err.message;
|
|
39827
|
-
if (err.code === "invalid_grant") this.stop(link, err.message);
|
|
39816
|
+
if (err.code === "invalid_grant" || err.code === LOGIN_REQUIRED) this.stop(link, err.message);
|
|
39828
39817
|
else this.down(link);
|
|
39829
39818
|
}
|
|
39830
39819
|
);
|
|
@@ -42305,7 +42294,7 @@ ${message}`;
|
|
|
42305
42294
|
}
|
|
42306
42295
|
if (sub === "/agent-prompt" && req.method === "GET") {
|
|
42307
42296
|
const state = readCloud();
|
|
42308
|
-
const entry = cloudEnabled() &&
|
|
42297
|
+
const entry = cloudEnabled() && signedIn(state) ? state.pages[s.file] : void 0;
|
|
42309
42298
|
const hosted = entry ? { url: `${state.url || cloudUrl()}/p/${entry.id}`, auto: peer.liveAuto(entry.id, entry.auto) } : void 0;
|
|
42310
42299
|
const p = projectOfPage(s);
|
|
42311
42300
|
const shared = p ? projectPolls.get(p.id) : void 0;
|
|
@@ -43979,7 +43968,8 @@ function messageOf(err) {
|
|
|
43979
43968
|
return e.message;
|
|
43980
43969
|
}
|
|
43981
43970
|
var BIN5 = "austere-axi";
|
|
43982
|
-
|
|
43971
|
+
function help() {
|
|
43972
|
+
return `${BIN5} ${VERSION} \u2014 review artifacts written in OpenUI Lang. You write a short
|
|
43983
43973
|
program instead of a whole HTML page; the reviewer annotates it in the browser;
|
|
43984
43974
|
their feedback comes back to you addressed by statement name.
|
|
43985
43975
|
|
|
@@ -44035,12 +44025,25 @@ COMMANDS
|
|
|
44035
44025
|
${BIN5} login [file] single-use sign-in link for a browser the CLI did not open
|
|
44036
44026
|
${BIN5} components search <words> | show <Name...> components spec leaves out, and packs on npm
|
|
44037
44027
|
${BIN5} attach status [file] is an agent attached to the page (the user turns it on); run list, sessions list
|
|
44038
|
-
|
|
44028
|
+
${shareLine()}
|
|
44039
44029
|
${BIN5} <command> --help one command's flags and an example
|
|
44040
44030
|
${BIN5} help all every command (owner-only ones too), notes and environment
|
|
44041
44031
|
`;
|
|
44032
|
+
}
|
|
44033
|
+
var ACCOUNT_COMMANDS = { publish: true, clone: true };
|
|
44034
|
+
function canShare() {
|
|
44035
|
+
return cloudEnabled() && signedIn(readCloud());
|
|
44036
|
+
}
|
|
44037
|
+
function shareLine() {
|
|
44038
|
+
if (canShare()) return ` ${BIN5} publish <file> hosted share link, only when the user asks`;
|
|
44039
|
+
return ` ${BIN5} cloud login sign in to share pages, only when the user asks`;
|
|
44040
|
+
}
|
|
44041
|
+
function shownCommands() {
|
|
44042
|
+
const share = canShare();
|
|
44043
|
+
return Object.entries(COMMANDS).filter(([name2]) => share || !Object.hasOwn(ACCOUNT_COMMANDS, name2));
|
|
44044
|
+
}
|
|
44042
44045
|
function helpAll() {
|
|
44043
|
-
const rows =
|
|
44046
|
+
const rows = shownCommands().map(([, c]) => ` ${BIN5} ${c.usage}
|
|
44044
44047
|
${c.summary}`);
|
|
44045
44048
|
return `
|
|
44046
44049
|
ALL COMMANDS
|
|
@@ -44322,7 +44325,7 @@ var COMMANDS = {
|
|
|
44322
44325
|
},
|
|
44323
44326
|
cloud: {
|
|
44324
44327
|
usage: "cloud on | cloud off | cloud status | cloud login | cloud logout | cloud whoami",
|
|
44325
|
-
summary: "cloud features: publish, clone, cloud login|whoami and the sync of hosted pages. Off by default: only local features work and nothing reaches the hosted service. `cloud on` and `cloud off` flip the switch (Settings \u2192 Cloud does the same), `cloud status` prints it. Your account on the hosted service (WorkOS sign-in: email code, Google, GitHub, passkey): `cloud login` prints a code and opens the browser
|
|
44328
|
+
summary: "cloud features: publish, clone, cloud login|whoami and the sync of hosted pages. Off by default: only local features work and nothing reaches the hosted service. `cloud on` and `cloud off` flip the switch (Settings \u2192 Cloud does the same), `cloud status` prints it. Your account on the hosted service (WorkOS sign-in: email code, Google, GitHub, passkey): `cloud login` prints a sign-in link with its code on stderr and opens the browser at it (not with AUSTERE_AXI_NO_OPEN=1); approve it there or on any other device, once per machine. publish, clone and the sync of hosted pages need it: until then they refuse before any request, and help leaves publish and clone out. You are then the owner of all your hosted pages, from every machine you log in on and in the browser with the same account; signing in as another account forgets this machine's published files. `cloud whoami` prints the account, `cloud logout` forgets it here. Only for hosted pages: the local server needs no account",
|
|
44326
44329
|
flags: {},
|
|
44327
44330
|
example: "cloud on | cloud login"
|
|
44328
44331
|
},
|
|
@@ -44415,6 +44418,9 @@ function commandHelp(cmd) {
|
|
|
44415
44418
|
const width = Math.max(...flags.map(([k]) => k.length + (VALUE_FLAGS.has(k) ? 6 : 0)));
|
|
44416
44419
|
for (const [k, text] of flags) lines2.push(` ${(`--${k}` + (VALUE_FLAGS.has(k) ? " <val>" : "")).padEnd(width + 4)}${text}`);
|
|
44417
44420
|
}
|
|
44421
|
+
if (Object.hasOwn(ACCOUNT_COMMANDS, cmd) && !canShare()) {
|
|
44422
|
+
lines2.push("", "NOT SIGNED IN", ` ${cmd} needs the hosted service's account on this machine: ${cloudEnabled() ? "" : `${BIN5} cloud on, then `}${BIN5} cloud login (only when the user asks to share a page)`);
|
|
44423
|
+
}
|
|
44418
44424
|
lines2.push("", "EXAMPLE", ` ${BIN5} ${spec.example}`, "", `Full workflow and file skeleton: ${BIN5} --help`);
|
|
44419
44425
|
process.stdout.write(lines2.join("\n") + "\n");
|
|
44420
44426
|
}
|
|
@@ -44476,7 +44482,7 @@ async function cmdHome() {
|
|
|
44476
44482
|
server: h ? `running on ${commandPort()} (v${h.version})` : "not running",
|
|
44477
44483
|
pages: shown.length ? shown : 0,
|
|
44478
44484
|
more: sessions.length > shown.length ? `${shown.length} of ${sessions.length} pages shown` : void 0,
|
|
44479
|
-
commands: Object.fromEntries(
|
|
44485
|
+
commands: Object.fromEntries(shownCommands().map(([name2, c]) => [name2 === "open" ? "<file>" : name2, c.summary])),
|
|
44480
44486
|
next: shown.length ? `${BIN5} poll waits for feedback on every page of this checkout (${BIN5} poll <file> for one page). ${BIN5} --help: workflow and file skeleton.` : `${BIN5} --help: workflow and file skeleton. ${BIN5} spec: component reference. ${BIN5} <command> --help: one command.`
|
|
44481
44487
|
});
|
|
44482
44488
|
}
|
|
@@ -46331,6 +46337,10 @@ async function shareRequests(args, flags) {
|
|
|
46331
46337
|
next: waiting.length ? `${BIN5} share approve <id> [--project <p> | --all] [--auto] [--as "<name>"], or deny / block <id>.` : r.data.switch.all || r.data.switch.projects.length ? `nobody is waiting; run ${BIN5} share requests again later.` : `${BIN5} share requests on [--project <p>] lets teammates ask.`
|
|
46332
46338
|
});
|
|
46333
46339
|
}
|
|
46340
|
+
function cloudFail(caught) {
|
|
46341
|
+
const err = caught;
|
|
46342
|
+
fail2(err.message, { http: err.status, code: err.code, next: err.code === LOGIN_REQUIRED ? `${BIN5} cloud login` : void 0 });
|
|
46343
|
+
}
|
|
46334
46344
|
async function cmdPublish(args, flags) {
|
|
46335
46345
|
const [sub, ...more] = args;
|
|
46336
46346
|
try {
|
|
@@ -46439,8 +46449,7 @@ async function cmdPublish(args, flags) {
|
|
|
46439
46449
|
next: `${again} again updates this link (earlier invites keep working); ${BIN5} publish invites ${quote(sub)} lists invites; ${BIN5} publish revoke ${quote(sub)} <name> revokes one; ${BIN5} publish rm ${quote(sub)} deletes the page.`
|
|
46440
46450
|
});
|
|
46441
46451
|
} catch (caught) {
|
|
46442
|
-
|
|
46443
|
-
fail2(err.message, { http: err.status, code: err.code });
|
|
46452
|
+
cloudFail(caught);
|
|
46444
46453
|
}
|
|
46445
46454
|
}
|
|
46446
46455
|
async function cmdCloud(sub, rest) {
|
|
@@ -46463,24 +46472,24 @@ async function cmdCloud(sub, rest) {
|
|
|
46463
46472
|
return print2({ status: "signed in", email: me2.email, name: me2.name || void 0, pages: me2.pages, service: cloudUrl() });
|
|
46464
46473
|
}
|
|
46465
46474
|
const r = await login(async (p) => {
|
|
46466
|
-
const
|
|
46467
|
-
|
|
46468
|
-
|
|
46469
|
-
|
|
46470
|
-
);
|
|
46475
|
+
const minutes = Math.round(p.expiresIn / 60);
|
|
46476
|
+
const lines2 = [`Sign in at ${p.verificationUriComplete} (code ${p.userCode}, works for ${minutes} minute${minutes === 1 ? "" : "s"}); any device works.`];
|
|
46477
|
+
if (p.verificationUriComplete !== p.verificationUri) lines2.push(`Or open ${p.verificationUri} and enter the code ${p.userCode}.`);
|
|
46478
|
+
const browser = browserDisabled() ? "AUSTERE_AXI_NO_OPEN is set: no browser was started." : openUrl(p.verificationUriComplete) ? "Opened your browser." : "Could not start a browser.";
|
|
46479
|
+
lines2.push(`${browser} Check that the page shows the code ${p.userCode}.`);
|
|
46480
|
+
process.stderr.write(lines2.map((l) => `[${BIN5}] ${l}
|
|
46481
|
+
`).join(""));
|
|
46471
46482
|
});
|
|
46472
46483
|
print2({
|
|
46473
46484
|
status: "signed in",
|
|
46474
46485
|
email: r.email,
|
|
46475
46486
|
name: r.name || void 0,
|
|
46476
|
-
|
|
46477
|
-
warning: r.claimError ? `This machine's earlier pages stay with its owner token: ${r.claimError}` : void 0,
|
|
46487
|
+
forgotten: r.forgotten ? `${r.forgotten} published file${r.forgotten === 1 ? "" : "s"} of another account (or of an anonymous owner token from before 0.17) no longer map to a hosted page here; publish makes new links` : void 0,
|
|
46478
46488
|
note: "You are the owner of all your hosted pages now, here and in the browser with the same account. Grant a page to someone by email on the service's dashboard.",
|
|
46479
|
-
next: `${BIN5}
|
|
46489
|
+
next: `${BIN5} publish <file> shares a page; ${BIN5} clone lists your pages`
|
|
46480
46490
|
});
|
|
46481
46491
|
} catch (caught) {
|
|
46482
|
-
|
|
46483
|
-
fail2(err.message, { http: err.status, code: err.code });
|
|
46492
|
+
cloudFail(caught);
|
|
46484
46493
|
}
|
|
46485
46494
|
}
|
|
46486
46495
|
async function cloudSwitch(sub) {
|
|
@@ -46495,8 +46504,8 @@ async function cloudSwitch(sub) {
|
|
|
46495
46504
|
service: c.on ? c.service : void 0,
|
|
46496
46505
|
account: c.account ?? void 0,
|
|
46497
46506
|
published: c.published || void 0,
|
|
46498
|
-
note: c.on ? "publish, clone and the sync of hosted pages talk to the service." : `Only local features work; nothing reaches the hosted service.${c.published ? " Published pages stay up there but do not sync, and publish rm needs cloud on." : ""}`,
|
|
46499
|
-
next: c.on ? void 0 : `${BIN5} cloud on`
|
|
46507
|
+
note: c.on ? c.account ? "publish, clone and the sync of hosted pages talk to the service." : "publish, clone and the sync of hosted pages need this machine signed in to the service." : `Only local features work; nothing reaches the hosted service.${c.published ? " Published pages stay up there but do not sync, and publish rm needs cloud on." : ""}`,
|
|
46508
|
+
next: c.on ? c.account ? void 0 : `${BIN5} cloud login` : `${BIN5} cloud on`
|
|
46500
46509
|
});
|
|
46501
46510
|
}
|
|
46502
46511
|
async function cmdClone(args) {
|
|
@@ -46505,7 +46514,7 @@ async function cmdClone(args) {
|
|
|
46505
46514
|
try {
|
|
46506
46515
|
if (!id) {
|
|
46507
46516
|
const pages = await listPages();
|
|
46508
|
-
if (!pages.length) return print2({ pages: "none", next: `${BIN5}
|
|
46517
|
+
if (!pages.length) return print2({ pages: "none", next: `${BIN5} publish <file>` });
|
|
46509
46518
|
return print2({
|
|
46510
46519
|
pages: pages.map((p) => ({ id: p.id, title: p.title, file: p.file, url: p.url, expires: shortDate2(p.expiresAt), notes: p.notes })),
|
|
46511
46520
|
next: `${BIN5} clone <id> [<file>] brings a page without a file here down to this machine.`
|
|
@@ -46522,8 +46531,7 @@ async function cmdClone(args) {
|
|
|
46522
46531
|
next: `${BIN5} ${quote(r.file)} opens it for review; ${BIN5} publish ${quote(r.file)} updates the hosted page.`
|
|
46523
46532
|
});
|
|
46524
46533
|
} catch (caught) {
|
|
46525
|
-
|
|
46526
|
-
fail2(err.message, { http: err.status, code: err.code });
|
|
46534
|
+
cloudFail(caught);
|
|
46527
46535
|
}
|
|
46528
46536
|
}
|
|
46529
46537
|
var STOP_WAIT_MS = 1e4;
|
|
@@ -46638,14 +46646,17 @@ async function main() {
|
|
|
46638
46646
|
if (cmd !== void 0 && Object.hasOwn(REMOVED_COMMANDS, cmd)) return removed(`${BIN5} ${cmd}`, REMOVED_COMMANDS[cmd]);
|
|
46639
46647
|
const gone = Object.keys(flags).find((k) => Object.hasOwn(REMOVED_FLAGS, k));
|
|
46640
46648
|
if (gone) return removed(`--${gone}`, REMOVED_FLAGS[gone]);
|
|
46649
|
+
const dev = applyDevDefaults();
|
|
46650
|
+
if (dev) process.stderr.write(`[${BIN5}] ${dev}
|
|
46651
|
+
`);
|
|
46641
46652
|
let name2 = null;
|
|
46642
46653
|
if (cmd !== void 0) {
|
|
46643
46654
|
if (Object.hasOwn(COMMANDS, cmd)) name2 = cmd;
|
|
46644
46655
|
else if (/\.html?$/i.test(cmd) || fs32.existsSync(cmd)) name2 = "open";
|
|
46645
|
-
else if (flags.help) return process.stdout.write(
|
|
46646
|
-
else return usage(`unknown command: ${cmd}. One of: ${
|
|
46656
|
+
else if (flags.help) return process.stdout.write(help());
|
|
46657
|
+
else return usage(`unknown command: ${cmd}. One of: ${shownCommands().map(([n]) => n).join(" ")}, or a page file`);
|
|
46647
46658
|
}
|
|
46648
|
-
if (flags.help) return name2 && name2 !== "help" ? commandHelp(name2) : process.stdout.write(
|
|
46659
|
+
if (flags.help) return name2 && name2 !== "help" ? commandHelp(name2) : process.stdout.write(help());
|
|
46649
46660
|
if (error62) return usage(error62, name2);
|
|
46650
46661
|
const allowed = name2 ? Object.keys(COMMANDS[name2].flags) : [];
|
|
46651
46662
|
const unknown2 = Object.keys(flags).filter((k) => !allowed.includes(k));
|
|
@@ -46661,9 +46672,6 @@ async function main() {
|
|
|
46661
46672
|
return usage(messageOf(err), name2);
|
|
46662
46673
|
}
|
|
46663
46674
|
}
|
|
46664
|
-
const dev = applyDevDefaults();
|
|
46665
|
-
if (dev) process.stderr.write(`[${BIN5}] ${dev}
|
|
46666
|
-
`);
|
|
46667
46675
|
stateDir();
|
|
46668
46676
|
switch (cmd) {
|
|
46669
46677
|
case void 0:
|
|
@@ -46740,9 +46748,9 @@ async function main() {
|
|
|
46740
46748
|
case "open":
|
|
46741
46749
|
return cmdOpen(rest[0], flags);
|
|
46742
46750
|
case "help":
|
|
46743
|
-
if (!rest[0]) return process.stdout.write(
|
|
46744
|
-
if (rest[0] === "all") return process.stdout.write(
|
|
46745
|
-
if (!Object.hasOwn(COMMANDS, rest[0])) return usage(`no command named ${rest[0]}. One of: all ${
|
|
46751
|
+
if (!rest[0]) return process.stdout.write(help());
|
|
46752
|
+
if (rest[0] === "all") return process.stdout.write(help() + helpAll());
|
|
46753
|
+
if (!Object.hasOwn(COMMANDS, rest[0])) return usage(`no command named ${rest[0]}. One of: all ${shownCommands().map(([n]) => n).join(" ")}`, "help");
|
|
46746
46754
|
return commandHelp(rest[0]);
|
|
46747
46755
|
default:
|
|
46748
46756
|
return cmdOpen(cmd, flags);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": 1,
|
|
3
3
|
"pack": "@austere-axi/pack-shadcn",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.17.0",
|
|
5
5
|
"groups": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Data",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
}
|
|
196
196
|
],
|
|
197
197
|
"api": 1,
|
|
198
|
-
"integrity": "sha384
|
|
198
|
+
"integrity": "sha384-/iCBjlm4XCBokfxekPAwM4cnefLSqi8qGncpzSkazxp5K3cecK5egdQ9U+0zABfE",
|
|
199
199
|
"size": 16495,
|
|
200
200
|
"css": true,
|
|
201
201
|
"defs": {
|
|
@@ -66,4 +66,4 @@ rollout = TimelineItem("Rollout", "Nov 3", "", "upcoming")`});var he=`.sh-muted
|
|
|
66
66
|
.sh-timeline-item.is-upcoming .sh-timeline-dot { background: transparent; border: 1px solid var(--austere-muted); }
|
|
67
67
|
.sh-timeline-body { min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
|
|
68
68
|
.sh-timeline-head { display: flex; flex-wrap: wrap; gap: 4px 12px; }
|
|
69
|
-
`;var y={components:[ee,M,te,ae,se,oe,H,ie,le,me,ue,K],css:he};var ge=t(l());(0,ge.registerPack)({name:"@austere-axi/pack-shadcn",version:"0.
|
|
69
|
+
`;var y={components:[ee,M,te,ae,se,oe,H,ie,le,me,ue,K],css:he};var ge=t(l());(0,ge.registerPack)({name:"@austere-axi/pack-shadcn",version:"0.17.0",api:1,components:[].concat(y&&y.components?y.components:y),css:y&&y.css});})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "austere-axi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Agent-authored review artifacts in OpenUI Lang: a few hundred tokens instead of a whole HTML page, with statement-level annotations fed back to the agent.",
|
|
5
5
|
"mcpName": "io.github.MandalorianBatman/austere-axi",
|
|
6
6
|
"type": "module",
|
package/skills/austere/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: austere
|
|
3
|
-
description:
|
|
3
|
+
description: "Use when the answer is a plan, a comparison of options, a recommendation or decision the user must make, a code review, a design or architecture proposal, a walkthrough of how a system works, or a status or research report: anything with several parts the user may want to comment on one by one. Also use when the user asks to review, compare, lay out, approve or see something as a page. Shows it as a browser page (austere-axi CLI) where the user annotates each part. Not for short answers, single facts, or plain code edits."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
argument-hint: <what the page should show>
|