austere-axi 0.7.0 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "format": 1,
3
3
  "pack": "@austere-axi/pack-mermaid",
4
- "version": "0.7.0",
4
+ "version": "0.7.3",
5
5
  "groups": [
6
6
  {
7
7
  "name": "Content",
8
8
  "notes": [
9
- "- Mermaid for sequences, state machines, ER, gantt and quick flowcharts."
9
+ "- Mermaid for sequences, state machines, ER, gantt and quick flowcharts. flowchart LR fits ~4 steps before it scrolls; use TD for longer chains."
10
10
  ]
11
11
  }
12
12
  ],
@@ -29,8 +29,8 @@
29
29
  }
30
30
  ],
31
31
  "api": 1,
32
- "integrity": "sha384-c3XsGZ9+9IzZWNgBgwCk4vcJBPpQ4hhGTqFC2LO2os/Ms7jLl6Hy2Bz3n9Uuko9y",
33
- "size": 5866,
32
+ "integrity": "sha384-yUn9tlvHt3z5UJso9Zhj+8mxuCviT9a2XmWmJKClvywfG+NLYSGixqDLhnEHRsOD",
33
+ "size": 7270,
34
34
  "css": true,
35
35
  "defs": {
36
36
  "Mermaid": {
@@ -1,7 +1,7 @@
1
- (()=>{var F=Object.create;var M=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var p=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}};var U=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of W(r))!O.call(e,i)&&i!==t&&M(e,i,{get:()=>r[i],enumerable:!(a=I(r,i))||a.enumerable});return e};var l=(e,r,t)=>(t=e!=null?F(K(e)):{},U(r||!e||!e.__esModule?M(t,"default",{value:e,enumerable:!0}):t,e));var E=p((te,B)=>{var k=globalThis.__austereHost;if(!k)throw new Error("this austere-axi component pack needs the austere-axi runtime on the page");B.exports=k.React});var P=p((ae,A)=>{var T=globalThis.__austereHost;if(!T)throw new Error("this austere-axi component pack needs the austere-axi runtime on the page");A.exports=T.zod});var w=p((oe,R)=>{var q=globalThis.__austereHost;if(!q)throw new Error("this austere-axi component pack needs the austere-axi runtime on the page");R.exports=q.pack});var b=p((ie,L)=>{var S=globalThis.__austereHost;if(!S)throw new Error("this austere-axi component pack needs the austere-axi runtime on the page");L.exports=S.jsxRuntime});var c=l(E(),1),f=l(P(),1),m=l(w(),1),n=l(b(),1),_="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js",y=null,G=0;function v(e){return new Promise((r,t)=>{let a=document.createElement("script");a.src=e,a.async=!0,a.onload=()=>r(),a.onerror=()=>t(new Error(`failed to load ${e}`)),document.head.appendChild(a)})}function J(){if(window.mermaid)return Promise.resolve(z(window.mermaid));if(!y){let e=(0,m.assetUrl)("mermaid.min.js");y=(e?v(e).catch(()=>v(_)):v(_)).then(()=>z(window.mermaid))}return y}var j=!1;function z(e){return j||(j=!0,e.initialize({startOnLoad:!1,securityLevel:"strict",theme:"base",fontFamily:"Inter Variable, Inter, ui-sans-serif, system-ui, sans-serif",themeVariables:{darkMode:!0,background:"#121214",fontSize:"14px",primaryColor:"#202024",primaryTextColor:"#ececef",primaryBorderColor:"#4a4a52",secondaryColor:"#1a1a1e",secondaryTextColor:"#ececef",secondaryBorderColor:"#3a3a40",tertiaryColor:"#18181b",tertiaryTextColor:"#ececef",tertiaryBorderColor:"#3a3a40",lineColor:"#8b8b94",textColor:"#d4d4d8",mainBkg:"#202024",nodeBorder:"#4a4a52",clusterBkg:"#18181b",clusterBorder:"#34343a",edgeLabelBackground:"#121214",noteBkgColor:"#2a2614",noteTextColor:"#ececef",noteBorderColor:"#5c5326",actorBkg:"#202024",actorBorder:"#4a4a52",actorTextColor:"#ececef",signalColor:"#a1a1aa",signalTextColor:"#d4d4d8",labelBoxBkgColor:"#202024",labelBoxBorderColor:"#4a4a52",labelTextColor:"#ececef",loopTextColor:"#d4d4d8",activationBkgColor:"#2a2a30",activationBorderColor:"#5a5a64",sequenceNumberColor:"#121214"},flowchart:{htmlLabels:!1,curve:"basis",padding:12},gantt:{axisFormat:"%m-%d",fontSize:12,barHeight:22}})),e}function Q(e){let r=/^```(?:mermaid)?\s*\n([\s\S]*?)\n?```\s*$/.exec(e);return r?r[1]:e}function H(e){let r=e.querySelectorAll("tspan, div, span, p");return(r.length?Array.from(r,a=>a.children.length?"":a.textContent):[e.textContent]).join(" ").replace(/\s+/g," ").trim()}function X(e){let r=(t,a)=>{a&&t.setAttribute("data-austere-part",a.slice(0,80))};e.querySelectorAll("g.node, g.cluster, g.edgeLabel").forEach(t=>{let a=t.querySelector(".classTitle, .label-group, .er.entityLabel, .name");r(t,H(a||t))}),e.querySelectorAll("text.actor, text.messageText, text.noteText, text.taskText").forEach(t=>r(t,H(t)))}function Y(e){return typeof e=="object"&&e!==null&&"message"in e?e.message:void 0}function Z({props:e,statementId:r}){let t=(0,c.useRef)(null),[a,i]=(0,c.useState)(null),g=String(e.source??"").trim();return(0,c.useEffect)(()=>{let h=!1;if(!g)return;let C=`austere-mmd-${++G}`;return J().then(async d=>{let{svg:u,bindFunctions:$}=await d.render(C,Q(g));if(h||!t.current)return;t.current.innerHTML=u;let o=t.current.querySelector("svg");if(o){o.removeAttribute("height"),o.style.height="auto",o.style.maxWidth||(o.style.maxWidth="100%");let x=o.viewBox&&o.viewBox.baseVal?o.viewBox.baseVal.width:0;x>0&&(o.style.minWidth=`${Math.round(Math.min(x,x*.6))}px`)}X(t.current),$?.(t.current),i(null)}).catch(d=>{if(h)return;let u=String(Y(d)||d).split(`
2
- `).slice(0,4).join(" ").split(/\s*Expecting /)[0];i(u),(0,m.reportRuntimeError)({source:"mermaid",statementId:r,component:"Mermaid",message:u}),document.getElementById(`d${C}`)?.remove()}),()=>{h=!0}},[g,r]),(0,n.jsxs)("figure",{className:"austere-mermaid",children:[a?(0,n.jsxs)("div",{className:"austere-render-error",children:[(0,n.jsx)("strong",{children:"Diagram failed to render."})," ",a]}):null,(0,n.jsx)("div",{className:"austere-mermaid-svg",ref:t}),e.caption?(0,n.jsx)("figcaption",{children:e.caption}):null]})}var D=(0,m.austereComponent)({name:"Mermaid",group:"Content",props:f.z.object({source:f.z.string(),caption:f.z.string().optional()}),description:"Diagram from Mermaid source (flowchart, sequence, state, class, ER, gantt). source is a raw multi-line string. Keep node labels to a few words; clicked nodes reach the agent by label.",notes:["- Mermaid for sequences, state machines, ER, gantt and quick flowcharts."],renderer:Z,example:`requestPath = Mermaid("flowchart LR
1
+ (()=>{var O=Object.create;var E=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var h=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(t){throw r=0,t}};var Q=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of U(r))!J.call(e,n)&&n!==t&&E(e,n,{get:()=>r[n],enumerable:!(a=K(r,n))||a.enumerable});return e};var g=(e,r,t)=>(t=e!=null?O(G(e)):{},Q(r||!e||!e.__esModule?E(t,"default",{value:e,enumerable:!0}):t,e));var T=h((se,A)=>{var B=globalThis.__austereHost;if(!B)throw new Error("this austere-axi component pack needs the austere-axi runtime on the page");A.exports=B.React});var S=h((le,P)=>{var L=globalThis.__austereHost;if(!L)throw new Error("this austere-axi component pack needs the austere-axi runtime on the page");P.exports=L.zod});var b=h((ce,q)=>{var R=globalThis.__austereHost;if(!R)throw new Error("this austere-axi component pack needs the austere-axi runtime on the page");q.exports=R.pack});var w=h((me,_)=>{var z=globalThis.__austereHost;if(!z)throw new Error("this austere-axi component pack needs the austere-axi runtime on the page");_.exports=z.jsxRuntime});var c=g(T(),1),x=g(S(),1),p=g(b(),1),l=g(w(),1),j="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js",X=10/14,y=null,Y=0;function C(e){return new Promise((r,t)=>{let a=document.createElement("script");a.src=e,a.async=!0,a.onload=()=>r(),a.onerror=()=>t(new Error(`failed to load ${e}`)),document.head.appendChild(a)})}function Z(){if(window.mermaid)return Promise.resolve(N(window.mermaid));if(!y){let e=(0,p.assetUrl)("mermaid.min.js");y=(e?C(e).catch(()=>C(j)):C(j)).then(()=>N(window.mermaid))}return y}var H=!1;function N(e){return H||(H=!0,e.initialize({startOnLoad:!1,securityLevel:"strict",theme:"base",fontFamily:"Inter Variable, Inter, ui-sans-serif, system-ui, sans-serif",themeVariables:{darkMode:!0,background:"#121214",fontSize:"14px",primaryColor:"#202024",primaryTextColor:"#ececef",primaryBorderColor:"#4a4a52",secondaryColor:"#1a1a1e",secondaryTextColor:"#ececef",secondaryBorderColor:"#3a3a40",tertiaryColor:"#18181b",tertiaryTextColor:"#ececef",tertiaryBorderColor:"#3a3a40",lineColor:"#8b8b94",textColor:"#d4d4d8",mainBkg:"#202024",nodeBorder:"#4a4a52",clusterBkg:"#18181b",clusterBorder:"#34343a",edgeLabelBackground:"#121214",noteBkgColor:"#2a2614",noteTextColor:"#ececef",noteBorderColor:"#5c5326",actorBkg:"#202024",actorBorder:"#4a4a52",actorTextColor:"#ececef",signalColor:"#a1a1aa",signalTextColor:"#d4d4d8",labelBoxBkgColor:"#202024",labelBoxBorderColor:"#4a4a52",labelTextColor:"#ececef",loopTextColor:"#d4d4d8",activationBkgColor:"#2a2a30",activationBorderColor:"#5a5a64",sequenceNumberColor:"#121214"},flowchart:{htmlLabels:!1,curve:"basis",padding:12},gantt:{axisFormat:"%m-%d",fontSize:12,barHeight:22}})),e}function ee(e){let r=/^```(?:mermaid)?\s*\n([\s\S]*?)\n?```\s*$/.exec(e);return r?r[1]:e}function $(e){let r=e.querySelectorAll("tspan, div, span, p");return(r.length?Array.from(r,a=>a.children.length?"":a.textContent):[e.textContent]).join(" ").replace(/\s+/g," ").trim()}function re(e){let r=(t,a)=>{a&&t.setAttribute("data-austere-part",a.slice(0,80))};e.querySelectorAll("g.node, g.cluster, g.edgeLabel").forEach(t=>{let a=t.querySelector(".classTitle, .label-group, .er.entityLabel, .name");r(t,$(a||t))}),e.querySelectorAll("text.actor, text.messageText, text.noteText, text.taskText").forEach(t=>r(t,$(t)))}function te(e){let r=e.scrollWidth-e.clientWidth;if(r<=1)return"";let t=e.scrollLeft>1?"left":"",a=e.scrollLeft<r-1?"right":"";return`${t} ${a}`.trim()}function ae(e){return typeof e=="object"&&e!==null&&"message"in e?e.message:void 0}function oe({props:e,statementId:r}){let t=(0,c.useRef)(null),[a,n]=(0,c.useState)(null),[M,V]=(0,c.useState)(""),v=String(e.source??"").trim();return(0,c.useEffect)(()=>{let o=t.current;if(!o)return;let m=()=>V(te(o)),s=new ResizeObserver(m);s.observe(o);let d=new MutationObserver(()=>{let f=o.querySelector("svg");f&&s.observe(f),m()});return d.observe(o,{childList:!0}),o.addEventListener("scroll",m,{passive:!0}),()=>{s.disconnect(),d.disconnect(),o.removeEventListener("scroll",m)}},[]),(0,c.useEffect)(()=>{let o=!1;if(!v)return;let m=`austere-mmd-${++Y}`;return Z().then(async s=>{let{svg:d,bindFunctions:f}=await s.render(m,ee(v));if(o||!t.current)return;t.current.innerHTML=d;let i=t.current.querySelector("svg");if(i){i.removeAttribute("height"),i.style.height="auto",i.style.maxWidth||(i.style.maxWidth="100%");let k=i.viewBox&&i.viewBox.baseVal?i.viewBox.baseVal.width:0,F=i.getAttribute("aria-roledescription")==="gantt";k>0&&!F&&(i.style.minWidth=`${Math.round(k*X)}px`)}re(t.current),f?.(t.current),n(null)}).catch(s=>{if(o)return;let d=String(ae(s)||s).split(`
2
+ `).slice(0,4).join(" ").split(/\s*Expecting /)[0];n(d),(0,p.reportRuntimeError)({source:"mermaid",statementId:r,component:"Mermaid",message:d}),document.getElementById(`d${m}`)?.remove()}),()=>{o=!0}},[v,r]),(0,l.jsxs)("figure",{className:"austere-mermaid",children:[a?(0,l.jsxs)("div",{className:"austere-render-error",children:[(0,l.jsx)("strong",{children:"Diagram failed to render."})," ",a]}):null,(0,l.jsx)("div",{className:"austere-mermaid-svg",ref:t,"data-more":M||void 0}),M?(0,l.jsx)("div",{className:"austere-mermaid-more",children:"Scroll sideways to see the whole diagram."}):null,e.caption?(0,l.jsx)("figcaption",{children:e.caption}):null]})}var D=(0,p.austereComponent)({name:"Mermaid",group:"Content",props:x.z.object({source:x.z.string(),caption:x.z.string().optional()}),description:"Diagram from Mermaid source (flowchart, sequence, state, class, ER, gantt). source is a raw multi-line string. Keep node labels to a few words; clicked nodes reach the agent by label.",notes:["- Mermaid for sequences, state machines, ER, gantt and quick flowcharts. flowchart LR fits ~4 steps before it scrolls; use TD for longer chains."],renderer:oe,example:`requestPath = Mermaid("flowchart LR
3
3
  client[Client] --> api[API]
4
- api --> pg[(Postgres)]", "Request path")`});var N=`.austere-mermaid {
4
+ api --> pg[(Postgres)]", "Request path")`});var W=`.austere-mermaid {
5
5
  margin: 0;
6
6
  width: 100%;
7
7
  min-width: 0;
@@ -16,10 +16,26 @@
16
16
  max-width: 100%;
17
17
  height: auto;
18
18
  }
19
+ /* A diagram too wide to shrink legibly scrolls; fade the side(s) that hide more of it. */
20
+ .austere-mermaid-svg[data-more="right"] {
21
+ mask-image: linear-gradient(to right, #000 calc(100% - 64px), rgb(0 0 0 / 0.2));
22
+ }
23
+ .austere-mermaid-svg[data-more="left"] {
24
+ mask-image: linear-gradient(to left, #000 calc(100% - 64px), rgb(0 0 0 / 0.2));
25
+ }
26
+ .austere-mermaid-svg[data-more="left right"] {
27
+ mask-image: linear-gradient(to right, rgb(0 0 0 / 0.2), #000 64px, #000 calc(100% - 64px), rgb(0 0 0 / 0.2));
28
+ }
29
+ .austere-mermaid-more {
30
+ margin-top: 4px;
31
+ text-align: right;
32
+ font-size: 12px;
33
+ color: var(--austere-muted);
34
+ }
19
35
  .austere-mermaid figcaption {
20
36
  margin-top: 8px;
21
37
  text-align: center;
22
38
  font-size: 12.5px;
23
39
  color: var(--austere-muted);
24
40
  }
25
- `;var s={components:[D],css:N};var V=l(w());(0,V.registerPack)({name:"@austere-axi/pack-mermaid",version:"0.7.0",api:1,components:[].concat(s&&s.components?s.components:s),css:s&&s.css});})();
41
+ `;var u={components:[D],css:W};var I=g(b());(0,I.registerPack)({name:"@austere-axi/pack-mermaid",version:"0.7.3",api:1,components:[].concat(u&&u.components?u.components:u),css:u&&u.css});})();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": 1,
3
3
  "pack": "@austere-axi/pack-shadcn",
4
- "version": "0.7.0",
4
+ "version": "0.7.3",
5
5
  "groups": [
6
6
  {
7
7
  "name": "Data",
@@ -195,7 +195,7 @@
195
195
  }
196
196
  ],
197
197
  "api": 1,
198
- "integrity": "sha384-drXkQp3CbyvotiAW64ZuOtePJ3EVmHR03sCMtdaAejdgudYTsHL5Pe337TnaBUNd",
198
+ "integrity": "sha384-/wRs5msLNu/LIN64xphgvZcPMlB3pVzRSRxDrs/UtbRl3BEBWwFVKRgNZuZVgLaU",
199
199
  "size": 16494,
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.7.0",api:1,components:[].concat(y&&y.components?y.components:y),css:y&&y.css});})();
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.7.3",api:1,components:[].concat(y&&y.components?y.components:y),css:y&&y.css});})();
package/dist/prompt.md CHANGED
@@ -52,7 +52,7 @@ Mermaid(source: string, caption?: string) — Diagram from Mermaid source (flowc
52
52
  - Architecture for systems: services, stores, queues, trust boundaries. Name every Node, Edge and Group. Over ~15 nodes, use lanes or split the diagram.
53
53
  - 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.
54
54
  - Diff for code changes: show the hunks that matter, not whole files. Hunk counts are recomputed, so only start lines matter.
55
- - Mermaid for sequences, state machines, ER, gantt and quick flowcharts.
55
+ - Mermaid for sequences, state machines, ER, gantt and quick flowcharts. flowchart LR fits ~4 steps before it scrolls; use TD for longer chains.
56
56
  - Also in Content (`austere-axi components show <Name>` for the signature): Tooltip, HoverCard, Breadcrumb, BreadcrumbItem, Kbd, Skeleton, Timeline, TimelineItem.
57
57
 
58
58
  ### Data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "austere-axi",
3
- "version": "0.7.0",
3
+ "version": "0.7.3",
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",