@magic-spells/constellation 0.2.0 → 0.2.2

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.
Files changed (106) hide show
  1. package/README.md +2 -0
  2. package/dist/cli/index.js +26 -0
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/core/code.d.ts +46 -0
  5. package/dist/core/code.js +169 -0
  6. package/dist/core/code.js.map +1 -0
  7. package/dist/core/git.d.ts +8 -0
  8. package/dist/core/git.js +36 -4
  9. package/dist/core/git.js.map +1 -1
  10. package/dist/core/sync.d.ts +1 -0
  11. package/dist/core/sync.js +18 -8
  12. package/dist/core/sync.js.map +1 -1
  13. package/dist/core/validate.js +13 -2
  14. package/dist/core/validate.js.map +1 -1
  15. package/dist/core/writer.d.ts +25 -0
  16. package/dist/core/writer.js +65 -1
  17. package/dist/core/writer.js.map +1 -1
  18. package/dist/mcp/server.js +478 -16
  19. package/dist/mcp/server.js.map +1 -1
  20. package/docs/001-file-format.md +22 -4
  21. package/docs/002-mcp.md +29 -1
  22. package/docs/003-mcp-upgrade-plan.md +138 -0
  23. package/examples/constellation/datatype/DATATYPE-TICKET.md +5 -0
  24. package/package.json +4 -2
  25. package/schemas/card.json +46 -2
  26. package/skill/SKILL.md +34 -7
  27. package/skill/methodology.md +5 -2
  28. package/viewer/dist/assets/{arc-CMMRgIq9.js → arc-YuzGWkw8.js} +1 -1
  29. package/viewer/dist/assets/architecture-7EHR7CIX-BAboPvK1.js +1 -0
  30. package/viewer/dist/assets/{architectureDiagram-3BPJPVTR-CB5p_qlN.js → architectureDiagram-3BPJPVTR-BgksqMlF.js} +1 -1
  31. package/viewer/dist/assets/{blockDiagram-GPEHLZMM-DpnMj_e6.js → blockDiagram-GPEHLZMM-Bc6JILFK.js} +1 -1
  32. package/viewer/dist/assets/{c4Diagram-AAUBKEIU-f91ngVN8.js → c4Diagram-AAUBKEIU-CRVt42df.js} +1 -1
  33. package/viewer/dist/assets/channel-D8YnBgqu.js +1 -0
  34. package/viewer/dist/assets/{chunk-2J33WTMH-y7Pz5tMO.js → chunk-2J33WTMH-CpuwKeX6.js} +1 -1
  35. package/viewer/dist/assets/{chunk-3OPIFGDE-Ir_ghIUQ.js → chunk-3OPIFGDE-BG_ijJhE.js} +1 -1
  36. package/viewer/dist/assets/{chunk-4BX2VUAB-BTPyM1ux.js → chunk-4BX2VUAB-Bgz1tnDP.js} +1 -1
  37. package/viewer/dist/assets/{chunk-55IACEB6-CtNd8e4Y.js → chunk-55IACEB6-NdWURd2K.js} +1 -1
  38. package/viewer/dist/assets/{chunk-5ZQYHXKU-Dd3yz721.js → chunk-5ZQYHXKU-wzW5x_7z.js} +1 -1
  39. package/viewer/dist/assets/{chunk-727SXJPM-CAM8mGbv.js → chunk-727SXJPM-BxKeJXYf.js} +1 -1
  40. package/viewer/dist/assets/{chunk-AQP2D5EJ-C3nW9Uve.js → chunk-AQP2D5EJ-gPm6xhPX.js} +1 -1
  41. package/viewer/dist/assets/{chunk-BSJP7CBP-r6MRPvAH.js → chunk-BSJP7CBP-C30ZXEUD.js} +1 -1
  42. package/viewer/dist/assets/{chunk-CSCIHK7Q-Cn-ZTxsS.js → chunk-CSCIHK7Q-C9h7yfl1.js} +1 -1
  43. package/viewer/dist/assets/{chunk-FMBD7UC4-5axXeZJa.js → chunk-FMBD7UC4-BcSnkYc3.js} +1 -1
  44. package/viewer/dist/assets/{chunk-KSCS5N6A-BwmNx0l0.js → chunk-KSCS5N6A-rxSD5-MD.js} +1 -1
  45. package/viewer/dist/assets/{chunk-L5ZTLDWV-C2YNkUjB.js → chunk-L5ZTLDWV-DGwFsVWy.js} +1 -1
  46. package/viewer/dist/assets/{chunk-LZXEDZCA-CznuDgQD.js → chunk-LZXEDZCA-BY3sTuvt.js} +2 -2
  47. package/viewer/dist/assets/{chunk-ND2GUHAM-CokDnghi.js → chunk-ND2GUHAM-PqmKwdzq.js} +1 -1
  48. package/viewer/dist/assets/{chunk-NZK2D7GU-aaU0v4QE.js → chunk-NZK2D7GU-BAZbzxhl.js} +1 -1
  49. package/viewer/dist/assets/{chunk-O5CBEL6O-ByfKhkZf.js → chunk-O5CBEL6O-SvZfZ-0j.js} +1 -1
  50. package/viewer/dist/assets/chunk-QZHKN3VN-ClYnv9g5.js +1 -0
  51. package/viewer/dist/assets/chunk-WU5MYG2G-CvL2Yleq.js +1 -0
  52. package/viewer/dist/assets/{chunk-XPW4576I-Amo3awtq.js → chunk-XPW4576I-1OXPbRQX.js} +1 -1
  53. package/viewer/dist/assets/classDiagram-4FO5ZUOK-B8YUd1jx.js +1 -0
  54. package/viewer/dist/assets/classDiagram-v2-Q7XG4LA2-B8YUd1jx.js +1 -0
  55. package/viewer/dist/assets/{cose-bilkent-S5V4N54A-CO8yESCW.js → cose-bilkent-S5V4N54A-DtCvLpah.js} +1 -1
  56. package/viewer/dist/assets/{dagre-BM42HDAG-BnmNVNI2.js → dagre-BM42HDAG-B55Ilz10.js} +1 -1
  57. package/viewer/dist/assets/{diagram-2AECGRRQ-lcGXcbei.js → diagram-2AECGRRQ-ClqSMarp.js} +1 -1
  58. package/viewer/dist/assets/{diagram-5GNKFQAL-Cj3-lPUt.js → diagram-5GNKFQAL-Dx74UdxY.js} +1 -1
  59. package/viewer/dist/assets/{diagram-KO2AKTUF-CtXdRI4M.js → diagram-KO2AKTUF-Vj0buH8e.js} +1 -1
  60. package/viewer/dist/assets/{diagram-LMA3HP47-CIyLAzX7.js → diagram-LMA3HP47-DpEm8RZd.js} +1 -1
  61. package/viewer/dist/assets/{diagram-OG6HWLK6-BwF4bQCv.js → diagram-OG6HWLK6-Crl3BdwC.js} +1 -1
  62. package/viewer/dist/assets/{dist-DzXuQd4N.js → dist-C2uHOEFB.js} +1 -1
  63. package/viewer/dist/assets/{erDiagram-TEJ5UH35-DjwFw9yq.js → erDiagram-TEJ5UH35-B-Mf-EHP.js} +1 -1
  64. package/viewer/dist/assets/eventmodeling-FCH6USID-CZ5gxAxG.js +1 -0
  65. package/viewer/dist/assets/{flowDiagram-I6XJVG4X-CzXbf7vQ.js → flowDiagram-I6XJVG4X-B9stChWN.js} +1 -1
  66. package/viewer/dist/assets/{ganttDiagram-6RSMTGT7-BYcIhfmm.js → ganttDiagram-6RSMTGT7-DzWlclwM.js} +1 -1
  67. package/viewer/dist/assets/{gitGraph-WXDBUCRP-H8XeJ9QB.js → gitGraph-WXDBUCRP-CdVI3GTp.js} +1 -1
  68. package/viewer/dist/assets/{gitGraphDiagram-PVQCEYII-DtAPXKFK.js → gitGraphDiagram-PVQCEYII-Dn9yRc1N.js} +1 -1
  69. package/viewer/dist/assets/{index-DLPCG_Or.js → index-BsGRgBOD.js} +4 -4
  70. package/viewer/dist/assets/{info-J43DQDTF-BQScorZ0.js → info-J43DQDTF-CXV3Mm9T.js} +1 -1
  71. package/viewer/dist/assets/{infoDiagram-5YYISTIA-Udl1omvH.js → infoDiagram-5YYISTIA-zIUka_J2.js} +1 -1
  72. package/viewer/dist/assets/{ishikawaDiagram-YF4QCWOH-VnfzT_hk.js → ishikawaDiagram-YF4QCWOH-DsZwNuE3.js} +1 -1
  73. package/viewer/dist/assets/{journeyDiagram-JHISSGLW-Btn4EVoD.js → journeyDiagram-JHISSGLW-BhSTSB2s.js} +1 -1
  74. package/viewer/dist/assets/{kanban-definition-UN3LZRKU-flOzWhPe.js → kanban-definition-UN3LZRKU-sCAldj86.js} +1 -1
  75. package/viewer/dist/assets/{line-DJJ9BLuY.js → line-D7b3fopb.js} +1 -1
  76. package/viewer/dist/assets/{linear-C2SUy5ns.js → linear-BWlvVc_d.js} +1 -1
  77. package/viewer/dist/assets/{mermaid-parser.core-xhSeYiZo.js → mermaid-parser.core-BdEYBvaj.js} +2 -2
  78. package/viewer/dist/assets/{mermaid.core-DmeSIitY.js → mermaid.core-C9bGWeJU.js} +3 -3
  79. package/viewer/dist/assets/{mindmap-definition-RKZ34NQL-CCJcMKx1.js → mindmap-definition-RKZ34NQL-DbTvvku-.js} +1 -1
  80. package/viewer/dist/assets/{packet-YPE3B663-DS8RscAk.js → packet-YPE3B663-DRfLruyq.js} +1 -1
  81. package/viewer/dist/assets/{pie-LRSECV5Y-I2ZQhrNJ.js → pie-LRSECV5Y-47xXMkK-.js} +1 -1
  82. package/viewer/dist/assets/{pieDiagram-4H26LBE5-BS5HMs4j.js → pieDiagram-4H26LBE5-Ckno9E1M.js} +1 -1
  83. package/viewer/dist/assets/{quadrantDiagram-W4KKPZXB-W4H8cw2_.js → quadrantDiagram-W4KKPZXB-XB5kJ_2c.js} +1 -1
  84. package/viewer/dist/assets/{radar-GUYGQ44K-kf6QvSne.js → radar-GUYGQ44K-CLwIH5Zr.js} +1 -1
  85. package/viewer/dist/assets/{requirementDiagram-4Y6WPE33-DSbuDQGQ.js → requirementDiagram-4Y6WPE33-D3fApL0X.js} +1 -1
  86. package/viewer/dist/assets/{sankeyDiagram-5OEKKPKP-CH8Qr2vL.js → sankeyDiagram-5OEKKPKP-6UdaRhuZ.js} +1 -1
  87. package/viewer/dist/assets/{sequenceDiagram-3UESZ5HK-EugVcdad.js → sequenceDiagram-3UESZ5HK-ClIrrs0w.js} +1 -1
  88. package/viewer/dist/assets/{src-CM_9kdrU.js → src-BPb55SrS.js} +1 -1
  89. package/viewer/dist/assets/{stateDiagram-AJRCARHV-DiFl94Qy.js → stateDiagram-AJRCARHV-CCsrcv5R.js} +1 -1
  90. package/viewer/dist/assets/stateDiagram-v2-BHNVJYJU-C1phrPNi.js +1 -0
  91. package/viewer/dist/assets/{timeline-definition-PNZ67QCA-B0KW9GUN.js → timeline-definition-PNZ67QCA-BkiWQlVI.js} +1 -1
  92. package/viewer/dist/assets/{treeView-BLDUP644-CAEY4mxq.js → treeView-BLDUP644-m1mGpAE8.js} +1 -1
  93. package/viewer/dist/assets/{treemap-LRROVOQU-VVaEaTlU.js → treemap-LRROVOQU-Bapvwi0Q.js} +1 -1
  94. package/viewer/dist/assets/{vennDiagram-CIIHVFJN-BSLGNfJd.js → vennDiagram-CIIHVFJN-BlH71Nmx.js} +1 -1
  95. package/viewer/dist/assets/{wardley-L42UT6IY-C-5cXbAU.js → wardley-L42UT6IY-CPRSoKgV.js} +1 -1
  96. package/viewer/dist/assets/{wardleyDiagram-YWT4CUSO-COk4TVnQ.js → wardleyDiagram-YWT4CUSO-C-ptFJ9t.js} +1 -1
  97. package/viewer/dist/assets/{xychartDiagram-2RQKCTM6-CClGJLJp.js → xychartDiagram-2RQKCTM6-C4rfeH4W.js} +1 -1
  98. package/viewer/dist/index.html +1 -1
  99. package/viewer/dist/assets/architecture-7EHR7CIX-Cbb-syEI.js +0 -1
  100. package/viewer/dist/assets/channel-C2bkEQHQ.js +0 -1
  101. package/viewer/dist/assets/chunk-QZHKN3VN-DJRjGeIo.js +0 -1
  102. package/viewer/dist/assets/chunk-WU5MYG2G-C63BVvr_.js +0 -1
  103. package/viewer/dist/assets/classDiagram-4FO5ZUOK-z_bO1V-j.js +0 -1
  104. package/viewer/dist/assets/classDiagram-v2-Q7XG4LA2-z_bO1V-j.js +0 -1
  105. package/viewer/dist/assets/eventmodeling-FCH6USID-BlKFmSzA.js +0 -1
  106. package/viewer/dist/assets/stateDiagram-v2-BHNVJYJU-BlJV8F13.js +0 -1
package/skill/SKILL.md CHANGED
@@ -10,6 +10,20 @@ typed piece of the plan, linked to other cards by **connections**. Filenames are
10
10
  identities, frontmatter is structure, the body is prose, and git is the
11
11
  change-tracking system.
12
12
 
13
+ ## Why it exists: durable cross-session memory
14
+
15
+ Constellation is the project's **durable, cross-session memory** for AI agents — memory you
16
+ share with every past and future agent, not docs you skim. Before changing code an area's
17
+ cards cover, read those cards: you're recovering prior agents' understanding, not starting
18
+ fresh. After changing that code, bring the cards back into line — that's part of "done,"
19
+ like updating tests. Understanding then **compounds** across sessions instead of being
20
+ re-derived each time — but only if the cards stay true, so **a card you can't trust is worse
21
+ than no card.** Put in cards what code can't say (intent, decisions, current state, gotchas,
22
+ cross-cutting rules); never duplicate DDL / signatures / code that lives in the repo — link
23
+ to it, because copies drift. `built`/`verified` is a claim, not a fact: mark it with
24
+ `set_verified` so a later agent can re-check whether the bound code moved (`stale_report` /
25
+ `check_sync`). Durability, not distrust.
26
+
13
27
  ## The one rule that matters most
14
28
 
15
29
  **The filename is the handle.** `constellation/api/API-TICKETS.md` defines the card
@@ -58,6 +72,12 @@ connections: # plain list of handles — no kinds, no dire
58
72
  - DB-TICKETS
59
73
  ```
60
74
 
75
+ Beyond the four reserved keys, a few **cross-type metadata fields** are valid on any card
76
+ (defined in `schemas/card.json`) but are tool-managed, not hand-authored: `code_refs` (extra
77
+ code this card is bound to — `path` or `path:symbol`), `verified_sha` / `verified_at` (set by
78
+ `set_verified` — the drift baseline), and `notes` (append-only typed memory, via
79
+ `append_note`). Reach for the tools rather than writing these by hand.
80
+
61
81
  ## Connections — how the graph gets wired
62
82
 
63
83
  Connections are undirected and come from four places; all count equally:
@@ -143,8 +163,9 @@ Constellation:
143
163
  `set_sync_point`.
144
164
 
145
165
  **In plan mode, read as much of the plan as you can.** The write tools are unavailable there
146
- by design (the read tools — `get_card`, `list_cards`, `search`, `traverse`, `describe_type`,
147
- `check_integrity`, `diff_plan`, `plan_log` — are marked read-only and stay available). Spend
166
+ by design (the read tools — `get_card`, `list_cards`, `search`, `traverse`, `assemble`,
167
+ `describe_type`, `check_integrity`, `diff_plan`, `plan_log`, `stale_report`, `check_sync`,
168
+ `list_connected_repos` — are marked read-only and stay available). Spend
148
169
  plan mode pulling the relevant plan into context — `traverse` from the entry points with
149
170
  `connected: "full"` — to build a strong model of the project fast, and fold the card edits
150
171
  you intend into the plan you present. Execute those Constellation writes first, before any
@@ -222,14 +243,20 @@ Cards never connect across repos; the relationship between repos lives in the
222
243
  1. Before creating a card, check it doesn't exist: the filename is deterministic,
223
244
  so look up `constellation/<folder>/<HANDLE>.md`; grep for the handle to find
224
245
  prose references.
225
- 2. Write or edit the card.
246
+ 2. Write or edit the card — prefer small, byte-cheap writes over rewriting a whole card:
247
+ `append_note` for a typed note (decision / gotcha / state / deviation / verified),
248
+ `edit_section` to replace a single `##` section in place.
226
249
  3. Verify: `npx constellation lint` (errors break the graph and must be fixed;
227
250
  warnings are quality signals).
228
- 4. Update `status` when reality changes: `planned → building → built`, and
229
- `verified` only after checking the card against the actual code.
251
+ 4. Update `status` when reality changes: `planned → building → built`, and mark
252
+ `verified` only after checking the card against the actual code — use `set_verified`,
253
+ which records the git sha you checked against so later drift is detectable
254
+ (`stale_report` / `check_sync`).
230
255
  5. Never bulk-rewrite `constellation/plan.md` — edit the relevant section.
231
256
  Decisions go in DOC cards (`kind: decision`), one file each, not in the plan.
232
257
 
233
258
  "What changed in the plan" is never tracked in cards — that's
234
- `git diff -- constellation/`. Don't add dirty flags, changelogs, or timestamps to
235
- frontmatter.
259
+ `git diff -- constellation/`. Don't add dirty flags or changelogs to frontmatter. The one
260
+ recorded baseline that's allowed is verification provenance — `verified_sha` / `verified_at`
261
+ (set by `set_verified`), the basis of a "verified" claim, not a change flag; the staleness
262
+ verdict itself is always recomputed live, never stored.
@@ -211,8 +211,11 @@ the smallest set of changes that most improves the plan — not the most cards.
211
211
  - When reverse-engineering shipped code, default new cards to `built`, then verify in a
212
212
  second pass — don't claim `verified` you haven't earned.
213
213
  - After reconciling the plan with code, commit the plan, then `set_sync_point` to mark the
214
- reconciliation. Change history is git (`diff_plan`, `plan_log`) — never stamp dirty
215
- flags, changelogs, or timestamps into cards.
214
+ reconciliation. Change history is git (`diff_plan`, `plan_log`) — never stamp dirty flags
215
+ or changelogs into cards. The one allowed baseline is verification provenance: mark a card
216
+ `verified` with `set_verified` (it records `verified_sha`, the sha you checked against), so
217
+ `stale_report` / `check_sync` can later flag the card if its bound code moved. The
218
+ staleness verdict stays live — recomputed from git, never stored.
216
219
  - The opposite direction — bringing **code** up to a changed **plan** ("sync the plan to
217
220
  the code") — is its own loop, documented in *Syncing the plan to code* in `SKILL.md`:
218
221
  `diff_plan` → `traverse` the blast radius → update code → verify → `set_sync_point`. For a
@@ -1 +1 @@
1
- import{n as e,t}from"./path-BWPyau1x.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-DzXuQd4N.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};
1
+ import{n as e,t}from"./path-BWPyau1x.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-C2uHOEFB.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-NNHCCRGN-DlpIbxXb.js";import{x as e}from"./mermaid-parser.core-BdEYBvaj.js";export{e as createArchitectureServices};