@huynle/hub 0.8.3 → 0.8.4
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/CHANGELOG.md +38 -0
- package/package.json +1 -1
- package/packages/claude-code/package.json +1 -1
- package/packages/cli/dist/hub-cli.js +6 -6
- package/packages/cli/package.json +1 -1
- package/packages/codex/package.json +1 -1
- package/packages/node/package.json +1 -1
- package/packages/preset/package.json +1 -1
- package/packages/protocol/package.json +1 -1
- package/packages/protocol/src/index.ts +7 -2
- package/packages/runtime-openshell/package.json +1 -1
- package/packages/runtime-sdk/package.json +1 -1
- package/packages/sdk/package.json +1 -1
- package/packages/spoke-sdk/package.json +1 -1
- package/src/central/registry.ts +93 -22
- package/src/index.ts +28 -0
- package/src/spoke/spoke.ts +150 -10
- package/src/status.ts +70 -14
- package/web/dist/assets/{ArtifactPage-CSotAWob.js → ArtifactPage-Cb1DcrQf.js} +1 -1
- package/web/dist/assets/{ArtifactPane-DPHjiWce.js → ArtifactPane-XTnwXl-Y.js} +1 -1
- package/web/dist/assets/{ArtifactWorkbench-CkmWnP6L.js → ArtifactWorkbench-C37tZZ3e.js} +1 -1
- package/web/dist/assets/{Library-DTLEyekn.js → Library-CZSSHvOJ.js} +2 -2
- package/web/dist/assets/{ProfilesDestination-GriuOpiZ.js → ProfilesDestination-dZa3vioh.js} +1 -1
- package/web/dist/assets/{TeamsPage-C-5lYeeM.js → TeamsPage-DJt-Kk84.js} +1 -1
- package/web/dist/assets/{Watchtower-DOlPsiIy.js → Watchtower-BXaUaXO1.js} +2 -2
- package/web/dist/assets/{index-C5OmwA1y.css → index-DVSkeAvn.css} +1 -1
- package/web/dist/assets/{index-6mdQ7eUY.js → index-DifgVuKS.js} +22 -22
- package/web/dist/assets/{live-CDWcyavI.js → live-D-RZbeUi.js} +1 -1
- package/web/dist/assets/{renderer2d-CNFdTDTr.js → renderer2d-DILxLFEq.js} +1 -1
- package/web/dist/assets/{renderer3d-C45jPvYX.js → renderer3d-PvN9Qbt2.js} +1 -1
- package/web/dist/assets/{safe-area-sA9a8vYJ.js → safe-area-BS6ii3M7.js} +1 -1
- package/web/dist/index.html +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e}from"./live-
|
|
1
|
+
import{E as e}from"./live-D-RZbeUi.js";var t=`watchtower.layout`,n=1e3,r=[`--accent`,`--blue`,`--violet`,`--orange`,`--ok`,`--warn`];function i(e,t=0){let n=110+26*Math.sqrt(Math.max(1,e))+7*Math.sqrt(Math.max(0,t)),r=Math.PI*(3-Math.sqrt(5));return Array.from({length:e},(t,i)=>{let a=e===1?0:1-i/(e-1)*2,o=Math.sqrt(1-a*a),s=i*r;return[l(Math.cos(s)*o*n),l(a*n*.55),l(Math.sin(s)*o*n)]})}function a(t){let n=new Set(t.nodes.map(e=>e.id)),a=i(t.groups.length,t.groups.reduce((e,t)=>e+t.sections.reduce((e,t)=>e+t.members.length,0),0));return t.groups.map((t,i)=>{let o=[];n.has(t.id)&&o.push(t.id);for(let e of t.sections)e.id!==void 0&&n.has(e.id)&&o.push(e.id),o.push(...e.members);let s=t.machine===void 0?r[i%r.length]:e[t.machine%e.length];return{id:t.id,label:t.label,color:s,center:a[i],members:o}})}function o(e){let t=new Map;for(let n of e.links)n.kind!==`structure`&&n.kind!==`policy`&&(t.set(n.source,(t.get(n.source)??0)+n.count),t.set(n.target,(t.get(n.target)??0)+n.count));return t}function s(e,t){let n=new Set,r=new Set(e.groups.map(e=>e.id));for(let t of e.nodes)(t.kind===`hub`||t.kind===`user`||t.kind===`app`||t.kind===`role`||r.has(t.id)||t.match)&&n.add(t.id);let i=o(e),a=e.nodes.filter(e=>!n.has(e.id)&&e.kind!==`role`);a.sort((e,t)=>(i.get(t.id)??0)-(i.get(e.id)??0)||(e.id<t.id?-1:+(e.id>t.id)));for(let e of a.slice(0,Math.max(0,t.max)))n.add(e.id);for(let e of t.extra??[])n.add(e);return n}var c=e=>e.kind===`role`&&e.vacant?`${e.label} · vacant`:e.label,l=e=>Math.round(e*10)/10,u=e=>typeof e==`number`&&Number.isFinite(e);function d(e){let t=new Map;if(!e)return t;let n;try{n=JSON.parse(e)}catch{return t}if(typeof n!=`object`||!n||Array.isArray(n))return t;let{v:r,p:i}=n;if(r!==1||typeof i!=`object`||!i||Array.isArray(i))return t;for(let[e,n]of Object.entries(i)){if(t.size>=1e3)break;if(!Array.isArray(n)||n.length!==3)continue;let[r,i,a]=n;u(r)&&u(i)&&u(a)&&t.set(e,[r,i,a])}return t}function f(e,t,r=n){let i={},a=0;for(let n of[e,t])for(let[e,t]of n){if(a>=r)break;e in i||!t.every(u)||(i[e]=[l(t[0]),l(t[1]),l(t[2])],a++)}return JSON.stringify({v:1,p:i})}function p(e,t){let n=2166136261;for(let t=0;t<e.length;t++)n=Math.imul(n^e.charCodeAt(t),16777619);let r=(n>>>0)%1e3/1e3,i=(Math.imul(n,2654435761)>>>0)%1e3/1e3,a=r*Math.PI*2,o=i*2-1,s=Math.sqrt(1-o*o),c=t*(.6+.4*r);return[Math.cos(a)*s*c,o*c,Math.sin(a)*s*c]}function m(e,t){let n=new Map,r=new Set,i=new Map;for(let t of a(e))for(let e of t.members)i.set(e,t);let o=new Map,s=new Map;for(let t of e.links)t.kind===`structure`&&(o.get(t.target)??o.set(t.target,[]).get(t.target)).push(t.source),(s.get(t.target)??s.set(t.target,[]).get(t.target)).push(t.source),(s.get(t.source)??s.set(t.source,[]).get(t.source)).push(t.target);n.set(`hub`,[0,0,0]);for(let r of e.nodes){if(r.id===`hub`)continue;let e=t.get(r.id);e&&n.set(r.id,e)}let c=new Set(e.groups.map(e=>e.id)),u=[...e.nodes.filter(e=>c.has(e.id)),...e.nodes.filter(e=>!c.has(e.id))];for(let e of u){if(n.has(e.id))continue;r.add(e.id);let t=[...o.get(e.id)??[],...s.get(e.id)??[]].find(e=>e!==`hub`&&n.has(e)),a=i.get(e.id),c=t===void 0?a?.center:n.get(t),u=p(e.id,t===void 0?a?24:40:14),d=c??[0,0,0];n.set(e.id,[l(d[0]+u[0]),l(d[1]+u[1]),l(d[2]+u[2])])}return{positions:n,fresh:r}}function h(e,t){let n=new Map,r=[],i=e=>r.some(t=>e.x<t.x+t.w&&t.x<e.x+e.w&&e.y<t.y+t.h&&t.y<e.y+e.h),a=[...e.filter(e=>e.pinned),...e.filter(e=>!e.pinned)];for(let e of a)for(let a of e.texts){let o=t(a,e),s={x:e.x-o/2,y:e.y,w:o,h:e.h};if(e.pinned||!i(s)){r.push(s),n.set(e.id,{text:a,box:s});break}}return n}var g=8,_=900;function v(e){let t={top:0,right:0,bottom:0,left:0},n=e.closest(`.wt-stage`);if(!n)return t;let r=e.getBoundingClientRect();if(!r.height)return t;let i=n.querySelector(`.wt-dock`)?.getBoundingClientRect(),a=n.querySelector(`.wt-chips`)?.getBoundingClientRect(),o=r.width>=_?n.querySelector(`.wt-pop-legend`)?.getBoundingClientRect():void 0,s=o&&o.width?Math.max(0,o.right-r.left+g):0,c=i&&i.height?Math.max(0,r.bottom-i.top+g):0,l=a&&a.height?Math.max(0,a.bottom-r.top+g):0;return{top:Math.min(l,r.height/3),right:0,bottom:Math.min(c,r.height/3),left:Math.min(s,r.width/3)}}export{c as a,a as c,s as i,m as l,t as n,d as o,o as r,h as s,v as t,f as u};
|
package/web/dist/index.html
CHANGED
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
|
|
18
18
|
<link rel="icon" href="/icon-192.png" type="image/png" sizes="192x192" />
|
|
19
19
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
20
|
-
<script type="module" crossorigin src="/assets/index-
|
|
20
|
+
<script type="module" crossorigin src="/assets/index-DifgVuKS.js"></script>
|
|
21
21
|
<link rel="modulepreload" crossorigin href="/assets/ui-Qo2Pd9-O.js">
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/pane-layout-Csk-vPNe.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/plural-Bspvoqfq.js">
|
|
24
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
24
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DVSkeAvn.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
|
27
27
|
<div id="root"></div>
|