@davidbalzan/groundwork-console 0.1.15 → 0.1.17
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/dist/bus.js +28 -5
- package/dist/mcp.js +1 -1
- package/dist/server.js +16 -2
- package/package.json +1 -1
- package/public/assets/{abnfDiagram-N423BO3Z-BazEjqqO.js → abnfDiagram-N423BO3Z-4d2uv_Bq.js} +1 -1
- package/public/assets/{arc-B7L9Wm_N.js → arc-CsO5oHRF.js} +1 -1
- package/public/assets/architecture-TIHT7OUA-ChM--lpn.js +1 -0
- package/public/assets/{architectureDiagram-T3A2C74G-MLhuSxpt.js → architectureDiagram-T3A2C74G-DMmZHzpW.js} +1 -1
- package/public/assets/{blockDiagram-VBNYF7ZC-BQPonMeH.js → blockDiagram-VBNYF7ZC-BypTIZaz.js} +1 -1
- package/public/assets/{c4Diagram-5PPSVZJV-Cz9rjAfz.js → c4Diagram-5PPSVZJV-DvCrTZm6.js} +1 -1
- package/public/assets/channel-CTT-B1Jd.js +1 -0
- package/public/assets/{chunk-2GRJ4B5K-DX-wb55s.js → chunk-2GRJ4B5K-iIMSEuYT.js} +1 -1
- package/public/assets/{chunk-4I5QYGJK-GtAn9Uuq.js → chunk-4I5QYGJK-DE7yI8Ek.js} +1 -1
- package/public/assets/{chunk-5RXB4S5H-CdlTe7Kd.js → chunk-5RXB4S5H-GX_WxHPA.js} +1 -1
- package/public/assets/{chunk-6Q2QTUOP-DpEP78Fx.js → chunk-6Q2QTUOP-CY62du0c.js} +1 -1
- package/public/assets/{chunk-7Z6QIM7H-D70dHZIb.js → chunk-7Z6QIM7H--U6-3mMF.js} +1 -1
- package/public/assets/{chunk-GF5L2VYU-Bj5gzsOF.js → chunk-GF5L2VYU-CYC_rSaq.js} +1 -1
- package/public/assets/{chunk-I66GZJ75-DYvsApTB.js → chunk-I66GZJ75-Czc6RDTX.js} +1 -1
- package/public/assets/{chunk-JQJVKLGR-sPaAWMcl.js → chunk-JQJVKLGR-CcM1wERy.js} +1 -1
- package/public/assets/{chunk-KBJHAD2P-sIJR9nWn.js → chunk-KBJHAD2P-Bc86tmO-.js} +1 -1
- package/public/assets/{chunk-NSK5VX7P-BBXDYhCk.js → chunk-NSK5VX7P-9_tkKeKf.js} +1 -1
- package/public/assets/{chunk-QR6OTTB3-0D3J_ldz.js → chunk-QR6OTTB3-B9-c0tqf.js} +1 -1
- package/public/assets/{chunk-RYQCIY6F-ByFYkZW5.js → chunk-RYQCIY6F-CyxQKlO3.js} +1 -1
- package/public/assets/{chunk-UBXNYLIW-vH5z2CFq.js → chunk-UBXNYLIW-DsDjYE1H.js} +1 -1
- package/public/assets/{chunk-W5SLKNZC-DXOAlDYx.js → chunk-W5SLKNZC-DBT8eyiL.js} +1 -1
- package/public/assets/{chunk-WRU74C26-BDeea6GT.js → chunk-WRU74C26-BkBE-ufW.js} +1 -1
- package/public/assets/{chunk-XXDRQBXY-CyNmLpLK.js → chunk-XXDRQBXY-C-4dWLfF.js} +1 -1
- package/public/assets/classDiagram-JCYQIIEL-hiXee6Eo.js +1 -0
- package/public/assets/classDiagram-v2-OCEON4UE-hiXee6Eo.js +1 -0
- package/public/assets/{cose-bilkent-JH36ORCC-DyR57pP4.js → cose-bilkent-JH36ORCC-D43fgxak.js} +1 -1
- package/public/assets/{cynefin-VYW2F7L2-BfcydoVY.js → cynefin-VYW2F7L2-C11FHLih.js} +1 -1
- package/public/assets/{cynefinDiagram-MW4NZA55-D4C7d9xF.js → cynefinDiagram-MW4NZA55-CT3s9Cvn.js} +1 -1
- package/public/assets/{dagre-VZM6K2ZE-Bb3QdyiU.js → dagre-VZM6K2ZE-LvZVEXM6.js} +1 -1
- package/public/assets/{diagram-7IWD3JNH-75Re1gEQ.js → diagram-7IWD3JNH-Cw0TOqRI.js} +1 -1
- package/public/assets/{diagram-B4RE2ZJO-DBZrEAjD.js → diagram-B4RE2ZJO-B8CLj1IC.js} +1 -1
- package/public/assets/{diagram-LBJQPF4R-DP03ppoa.js → diagram-LBJQPF4R-C9jjsjqA.js} +1 -1
- package/public/assets/{diagram-Q27KOJAE-Baaak7ET.js → diagram-Q27KOJAE-zmK9KaIF.js} +1 -1
- package/public/assets/{diagram-UB23O5K3-DRtw-cVM.js → diagram-UB23O5K3-D9FLjjFN.js} +1 -1
- package/public/assets/{dist-oRJzdzK9.js → dist-D4PgRFT8.js} +1 -1
- package/public/assets/{ebnfDiagram-BXEA7PRR-DSIhRAUP.js → ebnfDiagram-BXEA7PRR-gsjjs_XZ.js} +1 -1
- package/public/assets/{erDiagram-JOGREHBK-tfCb8QEk.js → erDiagram-JOGREHBK-CTT6y-7Y.js} +1 -1
- package/public/assets/eventmodeling-45OFAUF4-se4AzYWu.js +1 -0
- package/public/assets/flowDiagram-UKHOOZJN-CykShUMb.js +1 -0
- package/public/assets/{ganttDiagram-PKOTCBZU-BYZrkk6r.js → ganttDiagram-PKOTCBZU-Co40RJeV.js} +1 -1
- package/public/assets/{gitGraph-TEB2WS4Q-BtIPzVXt.js → gitGraph-TEB2WS4Q-K4j3kGfP.js} +1 -1
- package/public/assets/{gitGraphDiagram-DS77QQ5N-B319uA7z.js → gitGraphDiagram-DS77QQ5N-C7egTGgK.js} +1 -1
- package/public/assets/{index-Dl33_YDJ.js → index-DKFIHr9f.js} +7 -7
- package/public/assets/{info-DKCQHKI2-CTIPSIKZ.js → info-DKCQHKI2-B12S9dur.js} +1 -1
- package/public/assets/{infoDiagram-6WML65LV-D-foqSEg.js → infoDiagram-6WML65LV-Cr2CrVeL.js} +1 -1
- package/public/assets/{ishikawaDiagram-WSZJBQD7-CsSDhWgz.js → ishikawaDiagram-WSZJBQD7-DYFpwuke.js} +1 -1
- package/public/assets/{journeyDiagram-NVQOT4AX-D4kgOJAw.js → journeyDiagram-NVQOT4AX-CiANQSH5.js} +1 -1
- package/public/assets/{kanban-definition-27J2QSJJ-B3kNYdeo.js → kanban-definition-27J2QSJJ-BPEtkdf6.js} +1 -1
- package/public/assets/{line-DI4sM6NI.js → line-Dlv0QupC.js} +1 -1
- package/public/assets/{linear-CR-Nr7tu.js → linear-DP-JyCeQ.js} +1 -1
- package/public/assets/{mermaid-parser.core-Jx7mG9S9.js → mermaid-parser.core-m5Z6GHDK.js} +3 -3
- package/public/assets/{mermaid.core-Dad-8IqK.js → mermaid.core-BhJBKv0J.js} +4 -4
- package/public/assets/{mindmap-definition-FAOFIHXS-DNeiGiTc.js → mindmap-definition-FAOFIHXS-DpwEU_bQ.js} +1 -1
- package/public/assets/{packet-7NZHBO7P-DDW1h-3U.js → packet-7NZHBO7P-ElpZJWUo.js} +1 -1
- package/public/assets/{pegDiagram-VL7TDLO6-BhFSf_Qi.js → pegDiagram-VL7TDLO6-B4UAE4d-.js} +1 -1
- package/public/assets/{pie-RZYD4A2V-DlcS3vnT.js → pie-RZYD4A2V-CXsn8HRS.js} +1 -1
- package/public/assets/{pieDiagram-7S7Q4E2Y-bIpfrRof.js → pieDiagram-7S7Q4E2Y-Cg9oK3mU.js} +1 -1
- package/public/assets/{quadrantDiagram-CIZ2JOQS-BOsxmZiJ.js → quadrantDiagram-CIZ2JOQS-jq_OdvvR.js} +1 -1
- package/public/assets/{radar-I7S5WNFK-y6e8oiKJ.js → radar-I7S5WNFK-BkzfZxFa.js} +1 -1
- package/public/assets/{railroad-3IZDKUUU-DSMAGu-t.js → railroad-3IZDKUUU-B3THFlyo.js} +1 -1
- package/public/assets/railroad-abnf-AHOZXSZD-h1yNvons.js +1 -0
- package/public/assets/railroad-ebnf-EBAXGLYW-D_YJ8F3o.js +1 -0
- package/public/assets/railroad-peg-LSFZ7HO6-5Fq3k5T9.js +1 -0
- package/public/assets/{railroadDiagram-AXF67PYL-BRtEa2OT.js → railroadDiagram-AXF67PYL-YLfOS1Ub.js} +1 -1
- package/public/assets/{requirementDiagram-LRYGKXZP-Dikys7Ub.js → requirementDiagram-LRYGKXZP-Bdu77Te0.js} +1 -1
- package/public/assets/{sankeyDiagram-W5VNT64P-BiYgVWtA.js → sankeyDiagram-W5VNT64P-7HO0TSNW.js} +1 -1
- package/public/assets/{sequenceDiagram-SI44F4Z6-BUtXadia.js → sequenceDiagram-SI44F4Z6-CQcwlLyD.js} +1 -1
- package/public/assets/{src-BtDe6ofe.js → src-_jO5__EL.js} +1 -1
- package/public/assets/{stateDiagram-OKZ733FA-5fho-t3_.js → stateDiagram-OKZ733FA-C64YdGh1.js} +1 -1
- package/public/assets/stateDiagram-v2-UEYNNEHI-BQX29486.js +1 -0
- package/public/assets/{swimlanes-SLNWSIFB-BpmWJ8es.js → swimlanes-SLNWSIFB-MD924CgH.js} +1 -1
- package/public/assets/swimlanesDiagram-ULZ7WXOC-Bc9cfxpb.js +8 -0
- package/public/assets/{timeline-definition-Z64GVDOM-_w3lytrY.js → timeline-definition-Z64GVDOM-BwmMNgBf.js} +1 -1
- package/public/assets/{treeView-QDETBFTQ-D_l_9pyQ.js → treeView-QDETBFTQ-Di_P_CHe.js} +1 -1
- package/public/assets/{treemap-6X3UGDF4-DvWVuWhL.js → treemap-6X3UGDF4-BI4XvsgT.js} +1 -1
- package/public/assets/{vennDiagram-T6HMQDX7-ClZPTfxU.js → vennDiagram-T6HMQDX7-D_BFpD2j.js} +1 -1
- package/public/assets/{wardley-OPB4EBWU-CgyA0GRV.js → wardley-OPB4EBWU-CSCluGr0.js} +1 -1
- package/public/assets/{wardleyDiagram-T6FBY63Y-DNhv1Bla.js → wardleyDiagram-T6FBY63Y-IUT_hnBA.js} +1 -1
- package/public/assets/{xychartDiagram-ELKLHX3M-CNeebJO2.js → xychartDiagram-ELKLHX3M-CPlrFIYm.js} +1 -1
- package/public/index.html +1 -1
- package/public/assets/architecture-TIHT7OUA-CssFxMhM.js +0 -1
- package/public/assets/channel-CEZ4Oy1C.js +0 -1
- package/public/assets/classDiagram-JCYQIIEL-BTuFAVSb.js +0 -1
- package/public/assets/classDiagram-v2-OCEON4UE-BTuFAVSb.js +0 -1
- package/public/assets/eventmodeling-45OFAUF4-Br197Gcb.js +0 -1
- package/public/assets/flowDiagram-UKHOOZJN-BDKCF_Nj.js +0 -1
- package/public/assets/railroad-abnf-AHOZXSZD-cMf5ZHgo.js +0 -1
- package/public/assets/railroad-ebnf-EBAXGLYW-C4ZEbGk2.js +0 -1
- package/public/assets/railroad-peg-LSFZ7HO6-KGZPMRIB.js +0 -1
- package/public/assets/stateDiagram-v2-UEYNNEHI-DFmJr5_x.js +0 -1
- package/public/assets/swimlanesDiagram-ULZ7WXOC-0uIZxCfL.js +0 -8
package/dist/bus.js
CHANGED
|
@@ -102,20 +102,43 @@ export function agentsSync(root, scanLines = SCAN_LINES) {
|
|
|
102
102
|
return { ...a, transport: t?.transport ?? t?.kind ?? (t ? "tmux-push" : null), pane: t?.tmuxTarget ?? null, reachability: reachOf(age), heartbeatAgeMs: Number.isFinite(age) ? age : null, lastSeen: lastSeen || null, progress: progressOf(output.get(a.agentId), now, scanLines) };
|
|
103
103
|
}).sort((a, b) => (b.lastSeen ?? 0) - (a.lastSeen ?? 0));
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
/* Map `list_subscriptions` onto the console's shape. The bus owns the verdict; this only counts.
|
|
106
|
+
An unrecognised level is folded into `unknown` rather than dropped or guessed — a level this
|
|
107
|
+
console has not been taught is precisely the case where it must not assert. */
|
|
108
|
+
export function subscriptionHealth(res) {
|
|
109
|
+
const r = res;
|
|
110
|
+
const rows = r?.subscriptions;
|
|
111
|
+
if (!Array.isArray(rows))
|
|
112
|
+
return { total: 0, visible: 0, byLevel: { ok: 0, error: 0, unknown: 0 }, unreachable: true, agents: [] };
|
|
113
|
+
const agents = rows.map((x) => {
|
|
114
|
+
const l = x.health?.level;
|
|
115
|
+
/* An unrecognised level folds to `unknown` rather than being dropped or guessed — a level this
|
|
116
|
+
console has not been taught is exactly the case where it must not assert. */
|
|
117
|
+
return { agentId: String(x.agentId ?? "?"), level: (l === "ok" || l === "error" ? l : "unknown") };
|
|
118
|
+
});
|
|
119
|
+
return {
|
|
120
|
+
/* `total` is the bus's own population, and it is usually LARGER than what we can see:
|
|
121
|
+
list_subscriptions is AGENT-SCOPED, so this console is returned only its own rows. Measured:
|
|
122
|
+
listed 0 of total 2 — both belong to groundwork-kit-aide. Keeping the two numbers apart is
|
|
123
|
+
the whole point; collapsing them is how "0 visible" would become "0 exist". */
|
|
124
|
+
total: r?.population?.total ?? agents.length,
|
|
125
|
+
visible: r?.population?.listed ?? agents.length,
|
|
126
|
+
byLevel: { ok: agents.filter((a) => a.level === "ok").length, error: agents.filter((a) => a.level === "error").length, unknown: agents.filter((a) => a.level === "unknown").length },
|
|
127
|
+
unreachable: false,
|
|
128
|
+
agents,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export function busConditions(root, subs) {
|
|
106
132
|
const halt = readJson(path.join(root, "halt.json"), null);
|
|
107
133
|
const away = readJson(path.join(root, "coord-away.json"), null);
|
|
108
|
-
const subs = readJson(path.join(root, "subscriptions.json"), {});
|
|
109
134
|
const stallFile = path.join(root, "stall-check.json");
|
|
110
135
|
const stallRaw = existsSync(stallFile) ? readJson(stallFile, {}) : null;
|
|
111
136
|
const runs = (stallRaw?.history ?? []).filter((r) => typeof r?.at === "number").sort((a, b) => a.at - b.at);
|
|
112
137
|
const last = runs.length ? runs[runs.length - 1] : null;
|
|
113
|
-
const list = subs.subscriptions ?? [];
|
|
114
|
-
const never = list.filter((x) => x.lastEvaluatedAt === null || x.lastEvaluatedAt === undefined);
|
|
115
138
|
return {
|
|
116
139
|
halt: halt ? { active: true, ...halt } : { active: false },
|
|
117
140
|
away: away ? { active: true, ...away } : { active: false },
|
|
118
|
-
subscriptions: { total:
|
|
141
|
+
subscriptions: subs ?? { total: 0, visible: 0, byLevel: { ok: 0, error: 0, unknown: 0 }, unreachable: true, agents: [] },
|
|
119
142
|
stallClock: { inUse: stallRaw !== null, runs: runs.slice(-12), last, ageMs: last ? Date.now() - last.at : null },
|
|
120
143
|
};
|
|
121
144
|
}
|
package/dist/mcp.js
CHANGED
|
@@ -13,7 +13,7 @@ const IDENTITIES = {
|
|
|
13
13
|
david: { agentId: "david", project: "groundwork-console", role: { roleId: "human", displayName: "David" } },
|
|
14
14
|
};
|
|
15
15
|
export const AGENT_ID = "groundwork-console";
|
|
16
|
-
export const READ_ONLY_TOOLS = new Set(["doctor", "list_agents", "list_rooms", "list_scopes", "status", "ping", "read_messages", "retrieve_room_history", "retrieve_message", "list_work"]);
|
|
16
|
+
export const READ_ONLY_TOOLS = new Set(["doctor", "list_agents", "list_rooms", "list_scopes", "status", "ping", "read_messages", "retrieve_room_history", "retrieve_message", "list_work", "list_subscriptions"]);
|
|
17
17
|
export const WRITE_TOOLS_GATED = new Set(["send_message", "send_command", "post_status", "prune", "force_unregister", "unregister", "join_room", "leave_room", "delete_room", "set_room_topic", "set_room_motd", "import_work", "export_work"]);
|
|
18
18
|
const SWITCH_FILE = path.join(homedir(), ".groundwork-console", "switches.json");
|
|
19
19
|
function loadSwitches() {
|
package/dist/server.js
CHANGED
|
@@ -12,7 +12,7 @@ import { hostname as osHostname } from "node:os";
|
|
|
12
12
|
import { loadConfig, saveProjects, validateProjectPath, CONFIG_FILE } from "./config.js";
|
|
13
13
|
import { boardOf, docOf, docsIndex, phaseTasksOf } from "./seam.js";
|
|
14
14
|
import { DocWriteError, sha256, writeDoc } from "./docwrite.js";
|
|
15
|
-
import { agents, agentsAsync, rooms, roomMessages, roomMessageCount, statusStream, scopes, prefixOfMessage, busConditions } from "./bus.js";
|
|
15
|
+
import { agents, agentsAsync, rooms, roomMessages, roomMessageCount, statusStream, scopes, prefixOfMessage, busConditions, subscriptionHealth } from "./bus.js";
|
|
16
16
|
import { capturePane } from "./tmux.js";
|
|
17
17
|
import { spawnAgent, suggestId, fleetStatus, FLEET_TEMPLATES, HARNESS_CMD, ROLE_SKILL } from "./provision.js";
|
|
18
18
|
import { doctor, status, list, playbookList } from "./groundwork.js";
|
|
@@ -1063,7 +1063,21 @@ app.get("/bus/rooms/:room/messages", (c) => {
|
|
|
1063
1063
|
});
|
|
1064
1064
|
app.get("/bus/status", (c) => c.json(statusStream(cfg.coordDir, Number(c.req.query("limit") ?? 50))));
|
|
1065
1065
|
app.get("/bus/scopes", (c) => c.json(scopes(cfg.coordDir)));
|
|
1066
|
-
|
|
1066
|
+
/* Subscription health comes from the BUS, not from a field read here — `health` is computed at
|
|
1067
|
+
read time by `list_subscriptions` and is not persisted, so there is nothing on disk to consult.
|
|
1068
|
+
If the call fails the console reports `unreachable` rather than falling back to a local guess:
|
|
1069
|
+
the whole defect was a second copy of a verdict, and a fallback copy is the same defect with a
|
|
1070
|
+
longer fuse. */
|
|
1071
|
+
app.get("/bus/conditions", async (c) => {
|
|
1072
|
+
let subs;
|
|
1073
|
+
try {
|
|
1074
|
+
subs = subscriptionHealth(await bus.call("list_subscriptions", {}));
|
|
1075
|
+
}
|
|
1076
|
+
catch {
|
|
1077
|
+
subs = undefined;
|
|
1078
|
+
}
|
|
1079
|
+
return c.json(busConditions(cfg.coordDir, subs));
|
|
1080
|
+
});
|
|
1067
1081
|
app.get("/bus/card-loads", (c) => c.json(cardLoads()));
|
|
1068
1082
|
events.start(15_000);
|
|
1069
1083
|
notifier.start(15_000);
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e,t}from"./mermaid-parser.core-
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-m5Z6GHDK.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-_jO5__EL.js";import"./chunk-I66GZJ75-Czc6RDTX.js";import{n as i,r as a,t as o}from"./chunk-6Q2QTUOP-CY62du0c.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-BhJBKv0J.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./path-fybaL0A-.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-
|
|
1
|
+
import{n as e,t}from"./path-fybaL0A-.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-D4PgRFT8.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i){if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-KEIR6QF5-BICK3FdT.js";import{M as e}from"./mermaid-parser.core-m5Z6GHDK.js";export{e as createArchitectureServices};
|