@maycombhq/atticus 2.0.0-beta.7 → 2.0.0-beta.9

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 (184) hide show
  1. package/dist/bin.js +3 -3
  2. package/dist/{chunk-CUQD6YIH.js → chunk-25FOM66O.js} +16 -16
  3. package/dist/{chunk-UZPGPZ2E.js → chunk-2DXV6EYW.js} +3 -1
  4. package/dist/{chunk-SLXYSJBY.js → chunk-2FIYIVEU.js} +7 -7
  5. package/dist/{chunk-MVHMTX3Y.js → chunk-2FW3NFJS.js} +5 -5
  6. package/dist/{chunk-5JKONBEE.js → chunk-2NI6HTDR.js} +3 -3
  7. package/dist/{chunk-7ZTH2ZX6.js → chunk-2UC7EF22.js} +1 -1
  8. package/dist/{chunk-OOYCDW2S.js → chunk-2Y4AJL5O.js} +9 -9
  9. package/dist/{chunk-4BWFIO3X.js → chunk-2ZQAXHMM.js} +11 -11
  10. package/dist/{chunk-TP7RFO7O.js → chunk-33IG5SLO.js} +11 -11
  11. package/dist/{chunk-OBXXBQ27.js → chunk-33LVFGH2.js} +2 -2
  12. package/dist/{chunk-S7JOQIPW.js → chunk-3DFGYSJH.js} +2 -2
  13. package/dist/{chunk-V3DKMMPF.js → chunk-3LQF7SC7.js} +4 -4
  14. package/dist/{chunk-5RPQEA3H.js → chunk-3MTRTRPI.js} +1 -1
  15. package/dist/{chunk-77R5H674.js → chunk-3Q367RO6.js} +1 -1
  16. package/dist/{chunk-QMMD33KH.js → chunk-3SAZ7DP2.js} +11 -11
  17. package/dist/{chunk-B5GBUH5S.js → chunk-3TM2NPI6.js} +17 -17
  18. package/dist/{chunk-GFLFEENA.js → chunk-44HUGURP.js} +17 -17
  19. package/dist/{chunk-IJYUGMEO.js → chunk-455WEVXH.js} +16 -16
  20. package/dist/{chunk-DTFK7W2H.js → chunk-47THF3QO.js} +11 -11
  21. package/dist/{chunk-Q4PGUJTE.js → chunk-4LU6AOHI.js} +3 -3
  22. package/dist/{chunk-2YSCLJVT.js → chunk-4VPVWWTA.js} +1 -1
  23. package/dist/{chunk-256D4JIK.js → chunk-53HIKAKC.js} +10 -10
  24. package/dist/{chunk-PNFRGWYZ.js → chunk-5F7XORZS.js} +5 -5
  25. package/dist/{chunk-G5WPINKZ.js → chunk-5KR62X5T.js} +5 -5
  26. package/dist/{chunk-PRVG3JM2.js → chunk-5QJZUP6T.js} +15 -15
  27. package/dist/{chunk-BR6S4HRM.js → chunk-5Y2KTXMB.js} +24 -24
  28. package/dist/{chunk-7EOQ5HX3.js → chunk-644GQIBT.js} +11 -11
  29. package/dist/{chunk-7WDS6G3U.js → chunk-6ALOSYV3.js} +3 -3
  30. package/dist/{chunk-2LJGSAM6.js → chunk-7J77ZZOA.js} +14 -14
  31. package/dist/{chunk-7S535NXG.js → chunk-7QBVHAYM.js} +85 -85
  32. package/dist/{chunk-U5F3RUKA.js → chunk-7TEVGJA7.js} +16 -16
  33. package/dist/{chunk-PU5U4F7V.js → chunk-AAF2OQ3W.js} +11 -11
  34. package/dist/{chunk-UFASWOPG.js → chunk-ABLU5WJX.js} +24 -24
  35. package/dist/{chunk-JOXXJX22.js → chunk-AEPBXF5C.js} +2 -2
  36. package/dist/{chunk-6DAIRNPG.js → chunk-ALKAXEVE.js} +14 -14
  37. package/dist/{chunk-ZU2YDUMN.js → chunk-AM2CRQ36.js} +15 -15
  38. package/dist/{chunk-3ARQ3OAJ.js → chunk-AN75SC6R.js} +3 -3
  39. package/dist/{chunk-PGEDF2V2.js → chunk-AYLF7ZD2.js} +2 -2
  40. package/dist/chunk-B2EWKHAR.js +45 -0
  41. package/dist/{chunk-BHD6DCDO.js → chunk-BCGQEWCS.js} +3 -3
  42. package/dist/{chunk-ZDXKIZAZ.js → chunk-BYZWDMNZ.js} +8 -8
  43. package/dist/{chunk-SZXAM7QG.js → chunk-C44UZO37.js} +16 -11
  44. package/dist/{chunk-TWCQ5VBY.js → chunk-CDDTQU56.js} +21 -21
  45. package/dist/chunk-CDS2RL6R.js +37 -0
  46. package/dist/{chunk-765PMKAY.js → chunk-CEHI5D6G.js} +5 -5
  47. package/dist/{chunk-3OWZJJSD.js → chunk-CKWPXTP7.js} +4 -4
  48. package/dist/{chunk-JHTPBW4B.js → chunk-CNWA6A4C.js} +1 -1
  49. package/dist/{chunk-EMWS6US5.js → chunk-CUSIKXVR.js} +3 -3
  50. package/dist/{chunk-UQDHSPMY.js → chunk-DJ7LXVJL.js} +21 -21
  51. package/dist/{chunk-6QX6M5RV.js → chunk-DROEYEZ6.js} +6 -6
  52. package/dist/{chunk-WCHDQSHV.js → chunk-DS4XPV53.js} +14 -14
  53. package/dist/{chunk-B65W7WGB.js → chunk-DVPJNCKL.js} +7 -7
  54. package/dist/{chunk-R4AJ2NYS.js → chunk-EB6GMUPT.js} +8 -8
  55. package/dist/{chunk-7KM5KRJF.js → chunk-EPA6GKSP.js} +1 -1
  56. package/dist/{chunk-ZS3PBI7L.js → chunk-EQF4QJUP.js} +2 -2
  57. package/dist/{chunk-NWZXJRUQ.js → chunk-ESKRNFYM.js} +1 -1
  58. package/dist/{chunk-GLB4EOMV.js → chunk-F2PWD63I.js} +85 -85
  59. package/dist/{chunk-YRPRGBPQ.js → chunk-F5P3RP32.js} +20 -20
  60. package/dist/{chunk-NILL42WU.js → chunk-FEBT6HVN.js} +4 -4
  61. package/dist/{chunk-KHHPKEJZ.js → chunk-FFRMTEDC.js} +46 -8
  62. package/dist/{chunk-VC4JL565.js → chunk-FGZTRVNR.js} +13 -13
  63. package/dist/{chunk-UJNRNIMS.js → chunk-FNXEPRHA.js} +24 -24
  64. package/dist/{chunk-TCQHK57I.js → chunk-FV76NYPP.js} +1 -1
  65. package/dist/{chunk-WSRKB4VC.js → chunk-FYUAQE6F.js} +6 -6
  66. package/dist/{chunk-TTB7GSKB.js → chunk-G3VJ2BM4.js} +13 -13
  67. package/dist/{chunk-YMV74OOC.js → chunk-GSM6Z7KE.js} +6 -6
  68. package/dist/{chunk-T2JUQAMG.js → chunk-GXB4HN3J.js} +6 -6
  69. package/dist/{chunk-N2EFQHEO.js → chunk-HGLZL5SA.js} +7 -7
  70. package/dist/{chunk-3DX2QYZO.js → chunk-HHPIKZ6X.js} +14 -14
  71. package/dist/{chunk-I3OC4UBC.js → chunk-HJMXTPSV.js} +69 -15
  72. package/dist/{chunk-RKYAJBAJ.js → chunk-I5LHKCXU.js} +4 -4
  73. package/dist/{chunk-IOYZ4JHX.js → chunk-IUNQ7OXP.js} +14 -14
  74. package/dist/{chunk-P5FZHY65.js → chunk-JCXEZSWY.js} +6 -6
  75. package/dist/{chunk-JM2BZRRY.js → chunk-JNHMXZ4Z.js} +16 -16
  76. package/dist/{chunk-P5MTKAHZ.js → chunk-JRKF7E2J.js} +5 -5
  77. package/dist/{chunk-HOZMVIGS.js → chunk-JRNS2NN5.js} +22 -22
  78. package/dist/{chunk-OZGEITWS.js → chunk-JVQWDKJM.js} +4 -4
  79. package/dist/{chunk-JWJ5TX7W.js → chunk-JVX6JTNP.js} +2 -2
  80. package/dist/{chunk-5DZ6IUWI.js → chunk-K22BN7GM.js} +6 -6
  81. package/dist/{chunk-YPAOWDFJ.js → chunk-K4IBA42E.js} +1 -1
  82. package/dist/{chunk-2VIQYU2Z.js → chunk-K7YFQJAU.js} +11 -11
  83. package/dist/{chunk-MAQ7JNAZ.js → chunk-KC4PNWIF.js} +4 -4
  84. package/dist/chunk-KGJP72AT.js +48 -0
  85. package/dist/{chunk-YYLQKUIY.js → chunk-KR5CFHIC.js} +18 -11
  86. package/dist/{chunk-EJVTEI2E.js → chunk-KVUM23UL.js} +7 -7
  87. package/dist/{chunk-V4NH66KR.js → chunk-LD6QLDPZ.js} +1 -1
  88. package/dist/{chunk-O7SR6HKG.js → chunk-LJCMMTS6.js} +7 -7
  89. package/dist/chunk-LVEZ5WKY.js +33 -0
  90. package/dist/{chunk-KMPCLICZ.js → chunk-M5YXMKEN.js} +19 -19
  91. package/dist/{chunk-YBSH5LCL.js → chunk-MFF6GQJ7.js} +4 -4
  92. package/dist/chunk-MNXEZV5I.js +38 -0
  93. package/dist/{chunk-AWNBJVIU.js → chunk-MPBGU2DD.js} +3 -3
  94. package/dist/{chunk-CUCNREMQ.js → chunk-NAIPCFGV.js} +13 -13
  95. package/dist/{chunk-R7S6FEP4.js → chunk-NCIL6M6W.js} +2 -2
  96. package/dist/{chunk-6LD4SF4Y.js → chunk-NFFGP6WO.js} +23 -23
  97. package/dist/{chunk-QFQGHNRE.js → chunk-NGKLCTVU.js} +3 -3
  98. package/dist/{chunk-XIBGI6SJ.js → chunk-NJUO6I3I.js} +1 -1
  99. package/dist/{chunk-ENPHBLWC.js → chunk-NRUJ65G3.js} +23 -23
  100. package/dist/{chunk-JHUTJK3D.js → chunk-OB5ALZWI.js} +11 -11
  101. package/dist/{chunk-WDOUOM3O.js → chunk-OC46TXHV.js} +17 -17
  102. package/dist/{chunk-X337SS2L.js → chunk-OXYAZDGY.js} +2 -2
  103. package/dist/{chunk-SXV3N3RW.js → chunk-PAQ2PCOE.js} +20 -6
  104. package/dist/{chunk-4SWWHQKN.js → chunk-PE5MU2JW.js} +16 -16
  105. package/dist/chunk-PF754DWK.js +43 -0
  106. package/dist/{chunk-XQPPEMXH.js → chunk-PFCNR4AX.js} +4 -4
  107. package/dist/{chunk-I4HMT7AC.js → chunk-PJMU3MH7.js} +24 -24
  108. package/dist/{chunk-EM65D4YF.js → chunk-PJPCX537.js} +1 -1
  109. package/dist/{chunk-ECZMXB7F.js → chunk-PPRR25DF.js} +6 -6
  110. package/dist/{chunk-NO6S7QBM.js → chunk-QESA46US.js} +22 -22
  111. package/dist/{chunk-HPJ4FEQ2.js → chunk-QEZBYPSF.js} +4 -4
  112. package/dist/{chunk-ZGG7REF2.js → chunk-QFKUH75V.js} +22 -22
  113. package/dist/{chunk-KAGYCHKW.js → chunk-QH6N3UHV.js} +2 -2
  114. package/dist/{chunk-T6WMJFNV.js → chunk-QNIN6FGA.js} +22 -22
  115. package/dist/{chunk-A6YHZWPX.js → chunk-QWTY7G6X.js} +47 -6
  116. package/dist/{chunk-ZWNDXE5M.js → chunk-R344W54C.js} +5 -5
  117. package/dist/chunk-R6D3JCAZ.js +54 -0
  118. package/dist/{chunk-CVEASZNV.js → chunk-RCBFAHJQ.js} +18 -18
  119. package/dist/{chunk-5GXHRJC2.js → chunk-RFP5RNFX.js} +3 -3
  120. package/dist/{chunk-SG7TMES2.js → chunk-RH55M4TU.js} +17 -17
  121. package/dist/chunk-RJQZPZYC.js +45 -0
  122. package/dist/{chunk-WE4MJ25J.js → chunk-RYHAL5RR.js} +4 -4
  123. package/dist/{chunk-EFTELC62.js → chunk-S4FNRJVT.js} +9 -9
  124. package/dist/{chunk-IL5JOA2M.js → chunk-S6ERLCQP.js} +1 -1
  125. package/dist/{chunk-BP3GNL3G.js → chunk-SIGZJJIC.js} +3 -3
  126. package/dist/{chunk-74R76MWD.js → chunk-SMIIPAHL.js} +6 -6
  127. package/dist/{chunk-AUHFRTPY.js → chunk-SOQ36H6B.js} +5 -5
  128. package/dist/{chunk-DZVUSKXH.js → chunk-SUDNBMOS.js} +9 -9
  129. package/dist/{chunk-FVZULE4X.js → chunk-SW7HV5DH.js} +10 -10
  130. package/dist/chunk-T2XWY7MK.js +41 -0
  131. package/dist/{chunk-APF456VC.js → chunk-T75VS53Q.js} +2 -2
  132. package/dist/chunk-TBP6DH34.js +41 -0
  133. package/dist/chunk-TF3FHVND.js +34 -0
  134. package/dist/{chunk-KOTBHJAZ.js → chunk-THXYJHUU.js} +1 -1
  135. package/dist/{chunk-EAY4RXCE.js → chunk-TOX3NBBS.js} +4 -4
  136. package/dist/{chunk-NTFJVY5Q.js → chunk-TTCPIBZL.js} +18 -18
  137. package/dist/{chunk-5I2QH6RN.js → chunk-U3WW5NRL.js} +16 -10
  138. package/dist/{chunk-SRK5YF4X.js → chunk-U5QXNDHC.js} +3 -3
  139. package/dist/{chunk-ORKWD7SI.js → chunk-UJZDI3QZ.js} +19 -19
  140. package/dist/{chunk-6FEGENNF.js → chunk-UOU54I2Y.js} +2 -2
  141. package/dist/{chunk-7XMKDKQF.js → chunk-VGB5U7LU.js} +4 -4
  142. package/dist/{chunk-X4NS5HBV.js → chunk-VIQSODNY.js} +4 -4
  143. package/dist/{chunk-QWKFVDUQ.js → chunk-VMXZB7ZY.js} +1 -1
  144. package/dist/{chunk-6CDMZTN4.js → chunk-VONZ7IFF.js} +10 -10
  145. package/dist/{chunk-JXJLDZVD.js → chunk-VT2T6NRA.js} +10 -10
  146. package/dist/{chunk-KE4XM7TS.js → chunk-VWSGZ3VC.js} +17 -17
  147. package/dist/{chunk-MAHMJDZK.js → chunk-VZNUF2PU.js} +9 -9
  148. package/dist/{chunk-O45DSIIE.js → chunk-WBM4YIQE.js} +4 -4
  149. package/dist/{chunk-RAGLUQD7.js → chunk-WBUYVEYV.js} +3 -3
  150. package/dist/{chunk-NANAN23E.js → chunk-WCL6NMZV.js} +4 -4
  151. package/dist/{chunk-EEIKGPBL.js → chunk-WGFMVTBX.js} +11 -11
  152. package/dist/{chunk-RCNDCBIS.js → chunk-WIPYG632.js} +4 -4
  153. package/dist/{chunk-G56MZVHZ.js → chunk-WKOQNQY2.js} +1 -1
  154. package/dist/{chunk-Y55IIE2N.js → chunk-WMJBEZZC.js} +11 -11
  155. package/dist/{chunk-IMESNTKN.js → chunk-WYGPMDCF.js} +2 -2
  156. package/dist/{chunk-LXFUUYKF.js → chunk-X6FIH32P.js} +1 -1
  157. package/dist/{chunk-JKVSX3XR.js → chunk-XDVLDIDQ.js} +4 -4
  158. package/dist/{chunk-AFLCILWY.js → chunk-XQQMN6XQ.js} +1 -1
  159. package/dist/{chunk-PYX3HW2G.js → chunk-YA5NMD3Y.js} +12 -12
  160. package/dist/{chunk-RR2O7RCN.js → chunk-YBLFYZOS.js} +23 -23
  161. package/dist/{chunk-EE2YQU6U.js → chunk-YFXNN25U.js} +2 -2
  162. package/dist/{chunk-PA3KHTES.js → chunk-YJ2ILYTN.js} +15 -15
  163. package/dist/{chunk-62I2L2LR.js → chunk-YLJAMNVB.js} +3 -3
  164. package/dist/{chunk-H526QUAH.js → chunk-YVT25FZH.js} +15 -15
  165. package/dist/{chunk-LP5MR43C.js → chunk-Z5E6THXC.js} +4 -4
  166. package/dist/{chunk-2YP3WMBA.js → chunk-ZE4I4KKQ.js} +23 -23
  167. package/dist/{chunk-IUJEVFWA.js → chunk-ZGEFHJBA.js} +2 -2
  168. package/dist/{chunk-WGFKB43S.js → chunk-ZPY3IOEW.js} +3 -3
  169. package/dist/{chunk-OFQEF3XT.js → chunk-ZVNPAOSA.js} +4 -4
  170. package/dist/{chunk-VTQ7M2ZY.js → chunk-ZXYQCUAD.js} +22 -22
  171. package/dist/files.json +362 -362
  172. package/dist/packages/sdk/npm/index.js +11 -4
  173. package/package.json +5 -5
  174. package/dist/chunk-3BID5QQE.js +0 -41
  175. package/dist/chunk-4PHLJW45.js +0 -37
  176. package/dist/chunk-CPDBPATZ.js +0 -34
  177. package/dist/chunk-HSKVGRV2.js +0 -43
  178. package/dist/chunk-J22Q2T7I.js +0 -33
  179. package/dist/chunk-K7VZDCON.js +0 -48
  180. package/dist/chunk-MJLXJUQS.js +0 -38
  181. package/dist/chunk-N2GGZ533.js +0 -45
  182. package/dist/chunk-PXUFE2O3.js +0 -41
  183. package/dist/chunk-Y7BUISBE.js +0 -54
  184. package/dist/chunk-ZGUFBTTO.js +0 -45
@@ -5,7 +5,10 @@ var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
5
5
  var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
6
6
  import {
7
7
  readReviewed
8
- } from "./chunk-YBSH5LCL.js";
8
+ } from "./chunk-MFF6GQJ7.js";
9
+ import {
10
+ lineRangeOf
11
+ } from "./chunk-QWTY7G6X.js";
9
12
  import {
10
13
  citedFiles,
11
14
  external_exports,
@@ -13,7 +16,7 @@ import {
13
16
  factsRelOf,
14
17
  parseFacts,
15
18
  require_dist
16
- } from "./chunk-I3OC4UBC.js";
19
+ } from "./chunk-HJMXTPSV.js";
17
20
  import {
18
21
  writeFileAtomic
19
22
  } from "./chunk-D3PO4DOZ.js";
@@ -44,6 +47,9 @@ var ReadPlanFile = external_exports.strictObject({
44
47
  var readPlanRelOf = (root, repo) => `${factsRelOf(root)}/${repo}.read-plan.yaml`;
45
48
  var readPlanPath = (root, repo) => join(factsDirOf(root), `${repo}.read-plan.yaml`);
46
49
  function unitOf(glob) {
50
+ const range = lineRangeOf(glob);
51
+ if (range)
52
+ return { glob, dir: range.file.replace(/\/?[^/]*$/, ""), deep: false, range };
47
53
  if (glob === "**")
48
54
  return { glob, dir: "", deep: true };
49
55
  if (glob.endsWith("/**"))
@@ -91,28 +97,60 @@ async function loadReadPlan(root, repo) {
91
97
  return void 0;
92
98
  }
93
99
  }
94
- async function coveredPaths(root, repo) {
100
+ function citedLines(x, out = []) {
101
+ if (Array.isArray(x))
102
+ for (const v of x)
103
+ citedLines(v, out);
104
+ else if (x && typeof x === "object") {
105
+ const o = x;
106
+ if (typeof o.file === "string" && typeof o.line === "number")
107
+ out.push({ file: o.file, line: o.line });
108
+ for (const v of Object.values(o))
109
+ if (v && typeof v === "object")
110
+ citedLines(v, out);
111
+ }
112
+ return out;
113
+ }
114
+ async function coveredOf(root, repo) {
95
115
  const out = /* @__PURE__ */ new Set();
116
+ const reviewed = /* @__PURE__ */ new Set();
117
+ const lines = [];
118
+ const ranges = /* @__PURE__ */ new Set();
96
119
  const text = await readFile(join(factsDirOf(root), `${repo}.jsonl`), "utf8").catch(() => void 0);
97
120
  if (text !== void 0) {
98
121
  const parsed = parseFacts(text);
99
122
  const facts = parsed.ok ? parsed.facts : [];
100
- for (const f of facts)
123
+ for (const f of facts) {
101
124
  for (const p of citedFiles(f))
102
125
  out.add(p);
126
+ citedLines(f, lines);
127
+ }
103
128
  }
104
129
  for (const e of (await readReviewed(root, repo)).entries)
105
- out.add(e.path);
106
- return [...out];
130
+ if (lineRangeOf(e.path))
131
+ ranges.add(e.path);
132
+ else {
133
+ out.add(e.path);
134
+ reviewed.add(e.path);
135
+ }
136
+ return { paths: [...out], reviewed, lines, ranges };
107
137
  }
108
138
  async function readPlanProgress(root, repo, o = {}) {
109
139
  const plan = await loadReadPlan(root, repo);
110
140
  if (!plan)
111
141
  return void 0;
112
- const covered = (await coveredPaths(root, repo)).map(folderOf);
142
+ const of = await coveredOf(root, repo);
143
+ const covered = of.paths.map(folderOf);
113
144
  const parts = plan.parts.map((p) => {
114
145
  const units = p.paths.map(unitOf);
115
- const hit = (u) => covered.some((c) => u.deep ? under(c.dir, u.dir) : c.dir === u.dir || c.deep && under(u.dir, c.dir));
146
+ const hit = (u) => {
147
+ if (u.range) {
148
+ const r = u.range;
149
+ return of.ranges.has(u.glob) || of.lines.some((l) => l.file === r.file && l.line >= r.from && l.line <= r.to) || // The whole file reviewed, or a folder glob reviewed over it.
150
+ of.reviewed.has(r.file) || [...of.reviewed].some((c) => folderOf(c).deep && under(u.dir, folderOf(c).dir));
151
+ }
152
+ return covered.some((c) => u.deep ? under(c.dir, u.dir) : c.dir === u.dir || c.deep && under(u.dir, c.dir));
153
+ };
116
154
  const yes = units.filter(hit).map((u) => u.glob);
117
155
  const no = units.filter((u) => !hit(u)).map((u) => u.glob);
118
156
  return {
@@ -9,20 +9,20 @@ import {
9
9
  questionsCommand,
10
10
  sourcesAdd,
11
11
  sourcesSync
12
- } from "./chunk-5DZ6IUWI.js";
13
- import "./chunk-BHD6DCDO.js";
14
- import "./chunk-V4NH66KR.js";
12
+ } from "./chunk-K22BN7GM.js";
13
+ import "./chunk-BCGQEWCS.js";
14
+ import "./chunk-LD6QLDPZ.js";
15
15
  import "./chunk-VOGCSYOI.js";
16
- import "./chunk-YYLQKUIY.js";
17
- import "./chunk-OFQEF3XT.js";
18
- import "./chunk-A6YHZWPX.js";
19
- import "./chunk-OZGEITWS.js";
20
- import "./chunk-6FEGENNF.js";
21
- import "./chunk-APF456VC.js";
22
- import "./chunk-NWZXJRUQ.js";
23
- import "./chunk-KOTBHJAZ.js";
24
- import "./chunk-QWKFVDUQ.js";
25
- import "./chunk-I3OC4UBC.js";
16
+ import "./chunk-KR5CFHIC.js";
17
+ import "./chunk-ZVNPAOSA.js";
18
+ import "./chunk-QWTY7G6X.js";
19
+ import "./chunk-JVQWDKJM.js";
20
+ import "./chunk-UOU54I2Y.js";
21
+ import "./chunk-T75VS53Q.js";
22
+ import "./chunk-ESKRNFYM.js";
23
+ import "./chunk-THXYJHUU.js";
24
+ import "./chunk-VMXZB7ZY.js";
25
+ import "./chunk-HJMXTPSV.js";
26
26
  import "./chunk-D3PO4DOZ.js";
27
27
  import "./chunk-TV45EUGM.js";
28
28
  export {
@@ -6,39 +6,39 @@ var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
6
6
  import {
7
7
  changeSteps,
8
8
  readNextState
9
- } from "./chunk-256D4JIK.js";
10
- import "./chunk-KHHPKEJZ.js";
11
- import "./chunk-EAY4RXCE.js";
12
- import "./chunk-YBSH5LCL.js";
13
- import "./chunk-JWJ5TX7W.js";
9
+ } from "./chunk-53HIKAKC.js";
10
+ import "./chunk-FFRMTEDC.js";
11
+ import "./chunk-TOX3NBBS.js";
12
+ import "./chunk-MFF6GQJ7.js";
13
+ import "./chunk-JVX6JTNP.js";
14
14
  import "./chunk-3G4YI4ZU.js";
15
- import "./chunk-R4AJ2NYS.js";
16
- import "./chunk-RAGLUQD7.js";
17
- import "./chunk-TTB7GSKB.js";
18
- import "./chunk-LXFUUYKF.js";
19
- import "./chunk-NILL42WU.js";
15
+ import "./chunk-EB6GMUPT.js";
16
+ import "./chunk-WBUYVEYV.js";
17
+ import "./chunk-G3VJ2BM4.js";
18
+ import "./chunk-X6FIH32P.js";
19
+ import "./chunk-FEBT6HVN.js";
20
20
  import {
21
21
  changeReport
22
- } from "./chunk-G5WPINKZ.js";
23
- import "./chunk-JHTPBW4B.js";
24
- import "./chunk-2YSCLJVT.js";
25
- import "./chunk-YYLQKUIY.js";
26
- import "./chunk-OFQEF3XT.js";
27
- import "./chunk-A6YHZWPX.js";
28
- import "./chunk-OZGEITWS.js";
29
- import "./chunk-6FEGENNF.js";
30
- import "./chunk-APF456VC.js";
31
- import "./chunk-MVHMTX3Y.js";
22
+ } from "./chunk-5KR62X5T.js";
23
+ import "./chunk-CNWA6A4C.js";
24
+ import "./chunk-4VPVWWTA.js";
25
+ import "./chunk-KR5CFHIC.js";
26
+ import "./chunk-ZVNPAOSA.js";
27
+ import "./chunk-QWTY7G6X.js";
28
+ import "./chunk-JVQWDKJM.js";
29
+ import "./chunk-UOU54I2Y.js";
30
+ import "./chunk-T75VS53Q.js";
31
+ import "./chunk-2FW3NFJS.js";
32
32
  import {
33
33
  readChangeRepos
34
- } from "./chunk-NWZXJRUQ.js";
35
- import "./chunk-KOTBHJAZ.js";
36
- import "./chunk-QWKFVDUQ.js";
34
+ } from "./chunk-ESKRNFYM.js";
35
+ import "./chunk-THXYJHUU.js";
36
+ import "./chunk-VMXZB7ZY.js";
37
37
  import {
38
38
  changesDirOf,
39
39
  listQuestions,
40
40
  require_dist
41
- } from "./chunk-I3OC4UBC.js";
41
+ } from "./chunk-HJMXTPSV.js";
42
42
  import "./chunk-D3PO4DOZ.js";
43
43
  import {
44
44
  __toESM
@@ -10,7 +10,7 @@ function draftCheckTool(root, request) {
10
10
  if (!request.selfCheck || !/^(feature|architecture|stories|small)-answer\.yaml$/.test(request.outputPath))
11
11
  return void 0;
12
12
  let box;
13
- const planner = () => box ??= import("./chunk-SG7TMES2.js").then((p) => p.draftCheckBox(root, request));
13
+ const planner = () => box ??= import("./chunk-RH55M4TU.js").then((p) => p.draftCheckBox(root, request));
14
14
  return {
15
15
  definitions: [
16
16
  {
@@ -8,13 +8,13 @@ import {
8
8
  } from "./chunk-VOGCSYOI.js";
9
9
  import {
10
10
  storeSpecLookup
11
- } from "./chunk-G5WPINKZ.js";
11
+ } from "./chunk-5KR62X5T.js";
12
12
  import {
13
13
  createAdapters
14
- } from "./chunk-2YSCLJVT.js";
14
+ } from "./chunk-4VPVWWTA.js";
15
15
  import {
16
16
  readCatalog
17
- } from "./chunk-YYLQKUIY.js";
17
+ } from "./chunk-KR5CFHIC.js";
18
18
  import {
19
19
  FeatureError,
20
20
  FlowGraph,
@@ -33,10 +33,10 @@ import {
33
33
  suggestFeatureLinks,
34
34
  workItemsFromTracker,
35
35
  writeNameProposals
36
- } from "./chunk-OFQEF3XT.js";
36
+ } from "./chunk-ZVNPAOSA.js";
37
37
  import {
38
38
  readWorkItemExports
39
- } from "./chunk-OZGEITWS.js";
39
+ } from "./chunk-JVQWDKJM.js";
40
40
  import {
41
41
  applyCurated,
42
42
  loadOrgPack,
@@ -44,7 +44,7 @@ import {
44
44
  orgPackDirOf,
45
45
  recordPath,
46
46
  serializeRecord
47
- } from "./chunk-I3OC4UBC.js";
47
+ } from "./chunk-HJMXTPSV.js";
48
48
  import {
49
49
  SCHEMA_VERSION
50
50
  } from "./chunk-D3PO4DOZ.js";
@@ -16,7 +16,7 @@ import {
16
16
  parseNewFile,
17
17
  rerunOf,
18
18
  usesOf
19
- } from "./chunk-LXFUUYKF.js";
19
+ } from "./chunk-X6FIH32P.js";
20
20
  import {
21
21
  CriticError,
22
22
  MERGED_FLOWS,
@@ -47,7 +47,7 @@ import {
47
47
  triggerReason,
48
48
  waitingLenses,
49
49
  writeQuarantineItems
50
- } from "./chunk-NILL42WU.js";
50
+ } from "./chunk-FEBT6HVN.js";
51
51
  import {
52
52
  changeFolder,
53
53
  changeFootprint,
@@ -63,20 +63,20 @@ import {
63
63
  scoreRisk,
64
64
  stageCommand,
65
65
  testPlanFor
66
- } from "./chunk-G5WPINKZ.js";
66
+ } from "./chunk-5KR62X5T.js";
67
67
  import {
68
68
  ARTIFACT_STAGE,
69
69
  artifactsOfStage,
70
70
  createOpenSpec
71
- } from "./chunk-JHTPBW4B.js";
71
+ } from "./chunk-CNWA6A4C.js";
72
72
  import {
73
73
  AdapterError,
74
74
  createAdapters,
75
75
  fileStepStore
76
- } from "./chunk-2YSCLJVT.js";
76
+ } from "./chunk-4VPVWWTA.js";
77
77
  import {
78
78
  readCatalog
79
- } from "./chunk-YYLQKUIY.js";
79
+ } from "./chunk-KR5CFHIC.js";
80
80
  import {
81
81
  CONFLICT_STEP,
82
82
  checkQuote,
@@ -95,17 +95,17 @@ import {
95
95
  snapshotPages,
96
96
  syncSources,
97
97
  workingDays
98
- } from "./chunk-OFQEF3XT.js";
98
+ } from "./chunk-ZVNPAOSA.js";
99
99
  import {
100
100
  changeInputSources,
101
101
  citedParts,
102
102
  heldOutInputs,
103
103
  readServiceRequestExports,
104
104
  readWorkItemExports
105
- } from "./chunk-OZGEITWS.js";
105
+ } from "./chunk-JVQWDKJM.js";
106
106
  import {
107
107
  readDocument
108
- } from "./chunk-6FEGENNF.js";
108
+ } from "./chunk-UOU54I2Y.js";
109
109
  import {
110
110
  GAP_STEP,
111
111
  candidateRef,
@@ -116,7 +116,7 @@ import {
116
116
  namesInCode,
117
117
  nodesById,
118
118
  openIndex
119
- } from "./chunk-MVHMTX3Y.js";
119
+ } from "./chunk-2FW3NFJS.js";
120
120
  import {
121
121
  APPLIES_SPEC,
122
122
  ASKS_CHECK_SPEC,
@@ -137,7 +137,7 @@ import {
137
137
  toRunSummary,
138
138
  verdictOf,
139
139
  wrapData
140
- } from "./chunk-QWKFVDUQ.js";
140
+ } from "./chunk-VMXZB7ZY.js";
141
141
  import {
142
142
  AgentDefinition,
143
143
  KNOWLEDGE_KINDS,
@@ -191,7 +191,7 @@ import {
191
191
  taskBranch,
192
192
  toCanonicalYaml,
193
193
  writeQuestion
194
- } from "./chunk-I3OC4UBC.js";
194
+ } from "./chunk-HJMXTPSV.js";
195
195
  import {
196
196
  writeFileAtomic
197
197
  } from "./chunk-D3PO4DOZ.js";
@@ -4634,7 +4634,7 @@ async function gapsOf(root, change, unknown) {
4634
4634
  return out;
4635
4635
  }
4636
4636
  async function codeReaders() {
4637
- const x = await import("./chunk-Q4PGUJTE.js");
4637
+ const x = await import("./chunk-4LU6AOHI.js");
4638
4638
  return {
4639
4639
  outline: (path, text2) => x.declarationOutline(path, text2),
4640
4640
  outlines: (path) => x.syntaxLanguageOf(path) !== void 0
@@ -42,12 +42,12 @@ import {
42
42
  sortItems,
43
43
  specEndpointIds,
44
44
  vendorImpact
45
- } from "./chunk-OZGEITWS.js";
46
- import "./chunk-6FEGENNF.js";
47
- import "./chunk-APF456VC.js";
48
- import "./chunk-KOTBHJAZ.js";
49
- import "./chunk-QWKFVDUQ.js";
50
- import "./chunk-I3OC4UBC.js";
45
+ } from "./chunk-JVQWDKJM.js";
46
+ import "./chunk-UOU54I2Y.js";
47
+ import "./chunk-T75VS53Q.js";
48
+ import "./chunk-THXYJHUU.js";
49
+ import "./chunk-VMXZB7ZY.js";
50
+ import "./chunk-HJMXTPSV.js";
51
51
  import "./chunk-D3PO4DOZ.js";
52
52
  import "./chunk-TV45EUGM.js";
53
53
  export {
@@ -5,16 +5,16 @@ var __atticusUrl = (p) => new URL("./" + p, import.meta.url).href;
5
5
  var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
6
6
  import {
7
7
  catalogRecords
8
- } from "./chunk-3ARQ3OAJ.js";
8
+ } from "./chunk-AN75SC6R.js";
9
9
  import {
10
10
  readRound,
11
11
  reviewedGates,
12
12
  roundsOf
13
- } from "./chunk-NILL42WU.js";
13
+ } from "./chunk-FEBT6HVN.js";
14
14
  import {
15
15
  changeFolder,
16
16
  changeStore
17
- } from "./chunk-G5WPINKZ.js";
17
+ } from "./chunk-5KR62X5T.js";
18
18
  import {
19
19
  QueryError,
20
20
  askLookup,
@@ -22,12 +22,12 @@ import {
22
22
  impact,
23
23
  openIndex,
24
24
  translate
25
- } from "./chunk-MVHMTX3Y.js";
25
+ } from "./chunk-2FW3NFJS.js";
26
26
  import {
27
27
  baseClonePath,
28
28
  gitUser,
29
29
  loadRepos
30
- } from "./chunk-NWZXJRUQ.js";
30
+ } from "./chunk-ESKRNFYM.js";
31
31
  import {
32
32
  API_VERSION,
33
33
  DEFAULT_PORT,
@@ -54,7 +54,7 @@ import {
54
54
  specRepos,
55
55
  specsDirOf,
56
56
  withSignal
57
- } from "./chunk-I3OC4UBC.js";
57
+ } from "./chunk-HJMXTPSV.js";
58
58
  import {
59
59
  SCHEMA_VERSION
60
60
  } from "./chunk-D3PO4DOZ.js";
@@ -7,16 +7,16 @@ import {
7
7
  acceptStandardChecks,
8
8
  draftStandardChecks,
9
9
  estimateScan
10
- } from "./chunk-OFQEF3XT.js";
11
- import "./chunk-OZGEITWS.js";
12
- import "./chunk-6FEGENNF.js";
13
- import "./chunk-APF456VC.js";
14
- import "./chunk-KOTBHJAZ.js";
15
- import "./chunk-QWKFVDUQ.js";
10
+ } from "./chunk-ZVNPAOSA.js";
11
+ import "./chunk-JVQWDKJM.js";
12
+ import "./chunk-UOU54I2Y.js";
13
+ import "./chunk-T75VS53Q.js";
14
+ import "./chunk-THXYJHUU.js";
15
+ import "./chunk-VMXZB7ZY.js";
16
16
  import {
17
17
  loadOrgPack,
18
18
  orgPackDirOf
19
- } from "./chunk-I3OC4UBC.js";
19
+ } from "./chunk-HJMXTPSV.js";
20
20
  import "./chunk-D3PO4DOZ.js";
21
21
  import "./chunk-TV45EUGM.js";
22
22
 
@@ -16,21 +16,21 @@ import {
16
16
  featureSuggestLinks,
17
17
  featureSuggestNames,
18
18
  featureTag
19
- } from "./chunk-WSRKB4VC.js";
19
+ } from "./chunk-FYUAQE6F.js";
20
20
  import "./chunk-VOGCSYOI.js";
21
- import "./chunk-G5WPINKZ.js";
22
- import "./chunk-JHTPBW4B.js";
23
- import "./chunk-2YSCLJVT.js";
24
- import "./chunk-YYLQKUIY.js";
25
- import "./chunk-OFQEF3XT.js";
26
- import "./chunk-A6YHZWPX.js";
27
- import "./chunk-OZGEITWS.js";
28
- import "./chunk-6FEGENNF.js";
29
- import "./chunk-APF456VC.js";
30
- import "./chunk-NWZXJRUQ.js";
31
- import "./chunk-KOTBHJAZ.js";
32
- import "./chunk-QWKFVDUQ.js";
33
- import "./chunk-I3OC4UBC.js";
21
+ import "./chunk-5KR62X5T.js";
22
+ import "./chunk-CNWA6A4C.js";
23
+ import "./chunk-4VPVWWTA.js";
24
+ import "./chunk-KR5CFHIC.js";
25
+ import "./chunk-ZVNPAOSA.js";
26
+ import "./chunk-QWTY7G6X.js";
27
+ import "./chunk-JVQWDKJM.js";
28
+ import "./chunk-UOU54I2Y.js";
29
+ import "./chunk-T75VS53Q.js";
30
+ import "./chunk-ESKRNFYM.js";
31
+ import "./chunk-THXYJHUU.js";
32
+ import "./chunk-VMXZB7ZY.js";
33
+ import "./chunk-HJMXTPSV.js";
34
34
  import "./chunk-D3PO4DOZ.js";
35
35
  import "./chunk-TV45EUGM.js";
36
36
  export {
@@ -30820,11 +30820,12 @@ function changesDirOf(root) {
30820
30820
  }
30821
30821
 
30822
30822
  // packages/core/dist/schema/workspace.js
30823
- var WORKSPACE_SCHEMA_VERSION = 2;
30824
- var SUPPORTED_WORKSPACE_SCHEMA_VERSIONS = [1, 2];
30825
- var WorkspaceSchemaVersion = external_exports.union([external_exports.literal(1), external_exports.literal(2)], {
30826
- error: "schemaVersion must be 1 or 2 (version-1 files are read as version 2; ADR 0009, 0128)"
30823
+ var WORKSPACE_SCHEMA_VERSION = 3;
30824
+ var SUPPORTED_WORKSPACE_SCHEMA_VERSIONS = [1, 2, 3];
30825
+ var WorkspaceSchemaVersion = external_exports.union([external_exports.literal(1), external_exports.literal(2), external_exports.literal(3)], {
30826
+ error: "schemaVersion must be 1, 2 or 3 (older files are read as version 3; ADR 0009, 0128, 0134)"
30827
30827
  }).overwrite(() => WORKSPACE_SCHEMA_VERSION);
30828
+ var BasePath = external_exports.string().max(200).regex(/^(\/[A-Za-z0-9._~%{}-]+)+$/, "a path after the host: /segment/segment, starting with / and not ending in one");
30828
30829
  var BranchSegment = RecordId;
30829
30830
  var GitRef = external_exports.string().min(1).max(200).refine((s) => !/[\s~^:?*[\\]/.test(s) && !s.includes("..") && !s.startsWith("/") && !s.endsWith("/") && !s.endsWith(".lock") && !s.includes("@{"), "not a valid Git branch name");
30830
30831
  var RelativePosixPath = external_exports.string().min(1).refine((p2) => !p2.startsWith("/") && !/^[A-Za-z]:/.test(p2) && !p2.includes("\\") && !p2.split("/").includes(".."), "a relative path inside the repo, written with forward slashes");
@@ -30903,6 +30904,11 @@ var ManifestRepo = external_exports.strictObject({
30903
30904
  * and only calls to them go through the gateway.
30904
30905
  */
30905
30906
  hosts: external_exports.array(HostPattern).default([]),
30907
+ /**
30908
+ * The path this repo's routes sit under on its hosts (ADR 0134), when the host is one several
30909
+ * repos share: a call on the host whose path starts with it goes to this repo.
30910
+ */
30911
+ basePath: BasePath.optional(),
30906
30912
  /**
30907
30913
  * Modules that build their own component (ADR 0057): a folder, its component and the hosts
30908
30914
  * it answers on. When none are listed, a repo with two or more Spring Boot apps gets one per
@@ -30911,7 +30917,8 @@ var ManifestRepo = external_exports.strictObject({
30911
30917
  modules: external_exports.array(external_exports.strictObject({
30912
30918
  path: RelativePosixPath,
30913
30919
  component: RecordId,
30914
- hosts: external_exports.array(HostPattern).default([])
30920
+ hosts: external_exports.array(HostPattern).default([]),
30921
+ basePath: BasePath.optional()
30915
30922
  })).default([])
30916
30923
  });
30917
30924
  var RepoManifest = external_exports.strictObject({
@@ -31150,6 +31157,18 @@ function gatewayCycleQuestion(f, component, gateway) {
31150
31157
  return `Where does ${what}, which ${component} calls, end? Its gateway routes lead back into ${gateway}, which it has already been through, so the facts can't say.`;
31151
31158
  }
31152
31159
  var SECRETISH = /^(env:|vault:|secret:|ref:|\$\{|\{\{)/i;
31160
+ function pathSegments(p2) {
31161
+ if (!p2)
31162
+ return void 0;
31163
+ const segs = p2.split(/[?#]/)[0].split("/").filter(Boolean).map((x) => /^\{[^}]*\}$/.test(x) ? "{}" : x.toLowerCase());
31164
+ return segs.length ? segs : void 0;
31165
+ }
31166
+ var sameSegment = (a, b) => a === "{}" || b === "{}" || a === b;
31167
+ function urlPathOf(s) {
31168
+ const m = s ? /^[a-z][a-z0-9+.-]*:\/\/[^/?#]+(\/[^?#]*)/i.exec(s.trim()) : null;
31169
+ return m && m[1] !== "/" ? m[1] : void 0;
31170
+ }
31171
+ var joinPaths = (base, path) => base ? `${base.replace(/\/+$/, "")}/${(path ?? "").replace(/^\/+/, "")}` : path;
31153
31172
  function hostIn(s) {
31154
31173
  if (!s || SECRETISH.test(s.trim()))
31155
31174
  return void 0;
@@ -31185,10 +31204,42 @@ function joinFacts(input2) {
31185
31204
  components.add(factIdPart(r.component ?? r.repo));
31186
31205
  const repoIds = new Map(repos.map((r) => [factIdPart(r.repo), r.repo]));
31187
31206
  const declared = repos.flatMap((r) => [
31188
- ...(r.modules ?? []).flatMap((m) => m.hosts.map((h) => ({ pattern: h, repo: r.repo, component: factIdPart(m.component) }))),
31189
- ...(r.hosts ?? []).map((h) => ({ pattern: h, repo: r.repo, component: void 0 }))
31207
+ ...(r.modules ?? []).flatMap((m) => m.hosts.map((h) => ({
31208
+ pattern: h,
31209
+ repo: r.repo,
31210
+ component: factIdPart(m.component),
31211
+ basePath: pathSegments(m.basePath)
31212
+ }))),
31213
+ ...(r.hosts ?? []).map((h) => ({
31214
+ pattern: h,
31215
+ repo: r.repo,
31216
+ component: void 0,
31217
+ basePath: pathSegments(r.basePath)
31218
+ }))
31190
31219
  ]);
31191
- const claimed = (h) => declared.find((d) => hostHasPort(d.pattern) && hostMatches(d.pattern, h.host, h.port)) ?? declared.find((d) => !hostHasPort(d.pattern) && hostMatches(d.pattern, h.host, h.port));
31220
+ const claimed = (h, path) => {
31221
+ const ported = declared.filter((d) => hostHasPort(d.pattern) && hostMatches(d.pattern, h.host, h.port));
31222
+ const listed = ported.length ? ported : declared.filter((d) => !hostHasPort(d.pattern) && hostMatches(d.pattern, h.host, h.port));
31223
+ if (!listed.length)
31224
+ return void 0;
31225
+ const segs = pathSegments(path) ?? [];
31226
+ const starts = listed.filter((d) => d.basePath && d.basePath.length <= segs.length && d.basePath.every((x, i) => sameSegment(x, segs[i])));
31227
+ const longest = Math.max(0, ...starts.map((d) => d.basePath.length));
31228
+ const all2 = starts.length ? starts.filter((d) => d.basePath.length === longest) : listed.filter((d) => !d.basePath);
31229
+ if (!all2.length)
31230
+ return {
31231
+ scope: () => false,
31232
+ target: `${h.host} (no repo's base path starts ${path ?? "the call's path"})`,
31233
+ key: `none|${h.host}`
31234
+ };
31235
+ const owns = (d) => (e) => d.component ? e.component === d.component : e.repo === d.repo;
31236
+ const targets = [...new Set(all2.map((d) => d.component ?? d.repo))].sort();
31237
+ return {
31238
+ scope: (e) => all2.some((d) => owns(d)(e)),
31239
+ target: targets.join(", "),
31240
+ key: targets.join("|")
31241
+ };
31242
+ };
31192
31243
  const outside = new Set((input2.outside ?? []).map(factIdPart));
31193
31244
  const joins = [];
31194
31245
  const asks = [];
@@ -31234,6 +31285,7 @@ function joinFacts(input2) {
31234
31285
  const tieNode = configs[0];
31235
31286
  const tie = tieNode ? { tie: end(tieNode) } : {};
31236
31287
  const host = hostIn(f.host) ?? (tieNode ? hostIn(tieNode.fact.value) : void 0) ?? hostIn(f.base);
31288
+ const fullPath = joinPaths(urlPathOf(f.host) ?? (tieNode ? urlPathOf(tieNode.fact.value) : void 0) ?? urlPathOf(f.base), f.path);
31237
31289
  const answer = input2.targets?.[call.repo]?.[f.id];
31238
31290
  const named = (name) => {
31239
31291
  const slug = factIdPart(name);
@@ -31247,9 +31299,9 @@ function joinFacts(input2) {
31247
31299
  if (!answer && !hostIn(f.host) && !(f.to && named(f.to)) && configs.length > 1) {
31248
31300
  const owners = /* @__PURE__ */ new Map();
31249
31301
  for (const n of configs) {
31250
- const d = claimed(hostIn(n.fact.value));
31302
+ const d = claimed(hostIn(n.fact.value), joinPaths(urlPathOf(n.fact.value), f.path));
31251
31303
  if (d)
31252
- owners.set(d.component ? `c:${d.component}` : `r:${d.repo}`, d.component ? (e) => e.component === d.component : (e) => e.repo === d.repo);
31304
+ owners.set(d.key, d.scope);
31253
31305
  }
31254
31306
  if (owners.size > 1) {
31255
31307
  asks.push({
@@ -31272,9 +31324,9 @@ function joinFacts(input2) {
31272
31324
  const n = named(f.to);
31273
31325
  scope = n;
31274
31326
  how = n.repo ? "repo" : "named";
31275
- } else if (host && claimed(host)) {
31276
- const d = claimed(host);
31277
- scope = d.component ? { scope: (e) => e.component === d.component, target: d.component } : { scope: (e) => e.repo === d.repo, target: d.repo };
31327
+ } else if (host && claimed(host, fullPath)) {
31328
+ const d = claimed(host, fullPath);
31329
+ scope = { scope: d.scope, target: d.target };
31278
31330
  how = "host";
31279
31331
  } else if (host && components.has(factIdPart(host.host.split(".")[0]))) {
31280
31332
  const comp = factIdPart(host.host.split(".")[0]);
@@ -40650,6 +40702,7 @@ async function addManifestRepo(root, platform, entry) {
40650
40702
  return file2;
40651
40703
  }
40652
40704
  async function migrateManifests(root, o = {}) {
40705
+ const to = o.to ?? WORKSPACE_SCHEMA_VERSION;
40653
40706
  const out = [];
40654
40707
  for (const file2 of await manifestFiles(root)) {
40655
40708
  const text3 = await readFile7(file2.path, "utf8").catch(() => void 0);
@@ -40657,12 +40710,12 @@ async function migrateManifests(root, o = {}) {
40657
40710
  continue;
40658
40711
  const doc = (0, import_yaml12.parseDocument)(text3);
40659
40712
  const have = doc.get("schemaVersion");
40660
- if (typeof have !== "number" || have >= WORKSPACE_SCHEMA_VERSION)
40713
+ if (typeof have !== "number" || have >= to)
40661
40714
  continue;
40662
40715
  if (!RepoManifest.safeParse(doc.toJS()).success)
40663
40716
  continue;
40664
40717
  if (!o.dryRun) {
40665
- doc.set("schemaVersion", WORKSPACE_SCHEMA_VERSION);
40718
+ doc.set("schemaVersion", to);
40666
40719
  await save(file2.path, doc);
40667
40720
  }
40668
40721
  out.push(file2.rel);
@@ -41141,6 +41194,7 @@ export {
41141
41194
  WORKSPACE_SCHEMA_VERSION,
41142
41195
  SUPPORTED_WORKSPACE_SCHEMA_VERSIONS,
41143
41196
  WorkspaceSchemaVersion,
41197
+ BasePath,
41144
41198
  GitRef,
41145
41199
  urlHostPort,
41146
41200
  hostMatches,
@@ -6,12 +6,12 @@ var __atticusPath = (p) => __atticusFileURLToPath(__atticusUrl(p));
6
6
  import {
7
7
  openIndex,
8
8
  searchIndex
9
- } from "./chunk-MVHMTX3Y.js";
10
- import "./chunk-QWKFVDUQ.js";
9
+ } from "./chunk-2FW3NFJS.js";
10
+ import "./chunk-VMXZB7ZY.js";
11
11
  import {
12
12
  changesDirOf,
13
13
  require_dist
14
- } from "./chunk-I3OC4UBC.js";
14
+ } from "./chunk-HJMXTPSV.js";
15
15
  import "./chunk-D3PO4DOZ.js";
16
16
  import {
17
17
  __toESM
@@ -118,7 +118,7 @@ async function pastChangeMarkdown(root, folder) {
118
118
  `;
119
119
  }
120
120
  async function attachPastChange(root, change, folder, by, now = /* @__PURE__ */ new Date()) {
121
- const { attachFiles } = await import("./chunk-TWCQ5VBY.js");
121
+ const { attachFiles } = await import("./chunk-CDDTQU56.js");
122
122
  const name = `like-${folder.replace(DATED, "$2")}.md`;
123
123
  await attachFiles(root, change, [{ name, bytes: new TextEncoder().encode(await pastChangeMarkdown(root, folder)) }], by, now);
124
124
  return name;