@dendelion/paper-camp 0.41.0 → 0.43.0

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.
@@ -21,7 +21,7 @@ function Ve(e) {
21
21
  const n = t.match(fn);
22
22
  return n ? { key: n[1], value: hn(n[2]) } : null;
23
23
  }
24
- function Wa(e) {
24
+ function Ja(e) {
25
25
  const t = [];
26
26
  for (const n of e.split(`
27
27
  `)) {
@@ -30,7 +30,7 @@ function Wa(e) {
30
30
  }
31
31
  return t;
32
32
  }
33
- function Ka(e, t) {
33
+ function Va(e, t) {
34
34
  const n = new Map(t.map((a) => [a.key, a.value])), s = e.length > 0 ? e.split(`
35
35
  `) : [], r = [];
36
36
  for (const a of s) {
@@ -106,10 +106,10 @@ function En(e = []) {
106
106
  kind: t.kind
107
107
  }));
108
108
  }
109
- function za(e, t, n) {
109
+ function Xa(e, t, n) {
110
110
  return [...(e ?? []).filter((s) => !t.includes(s.kind)), ...n];
111
111
  }
112
- function Ja(e, t, n, s) {
112
+ function Qa(e, t, n, s) {
113
113
  return e.map((r, a) => {
114
114
  if (a !== t) return r;
115
115
  const i = s ? `${r.text}
@@ -120,7 +120,7 @@ ${s}` : r.text;
120
120
  return { ...c, kind: n, text: i };
121
121
  });
122
122
  }
123
- function Va(e = []) {
123
+ function Za(e = []) {
124
124
  const t = e.reduce((n, s, r) => s.kind === "log" ? r : n, -1);
125
125
  return e.slice(t + 1).filter((n) => n.kind === "chat");
126
126
  }
@@ -171,7 +171,7 @@ function kn(e) {
171
171
  };
172
172
  }
173
173
  const Sn = /^[0-9a-f]{4,40}$/i, $n = /^Merge pull request #\d+ from \S+\/([a-z]+-\d+)-/i;
174
- function S(e, t) {
174
+ function k(e, t) {
175
175
  return new Promise((n) => {
176
176
  var a;
177
177
  const s = v("git", t, { cwd: e, stdio: ["ignore", "pipe", "ignore"] });
@@ -183,7 +183,7 @@ function S(e, t) {
183
183
  }
184
184
  async function et(e) {
185
185
  var n;
186
- return ((n = (await S(e, ["symbolic-ref", "refs/remotes/origin/HEAD"])).trim().match(/refs\/remotes\/origin\/(.+)/)) == null ? void 0 : n[1]) ?? "main";
186
+ return ((n = (await k(e, ["symbolic-ref", "refs/remotes/origin/HEAD"])).trim().match(/refs\/remotes\/origin\/(.+)/)) == null ? void 0 : n[1]) ?? "main";
187
187
  }
188
188
  function ie(e) {
189
189
  const t = e.match(/^Refs:\s*([A-Za-z]+-\d+)\s*$/m);
@@ -198,7 +198,7 @@ function In(e) {
198
198
  return e.length > 0 && e.every((t) => t.startsWith("papercamp/"));
199
199
  }
200
200
  async function tt(e) {
201
- const t = await et(e), n = await S(e, ["log", "--format=%x02%B%x00", "--name-only", t]), s = /* @__PURE__ */ new Set();
201
+ const t = await et(e), n = await k(e, ["log", "--format=%x02%B%x00", "--name-only", t]), s = /* @__PURE__ */ new Set();
202
202
  for (const r of n.split("")) {
203
203
  if (!r) continue;
204
204
  const [a, i = ""] = r.split("\0"), o = i.split(`
@@ -243,10 +243,42 @@ function Nn(e, t, n) {
243
243
  });
244
244
  }
245
245
  async function Cn(e) {
246
- return (await S(e, ["rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"])).trim() || null;
246
+ return (await k(e, ["rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"])).trim() || null;
247
+ }
248
+ const xn = [
249
+ "%(refname:short)",
250
+ "%(HEAD)",
251
+ "%(upstream:short)",
252
+ "%(upstream:track,nobracket)",
253
+ "%(committerdate:iso-strict)"
254
+ ].join("%09"), Dn = /(?:^|\/)(idea|ticket)-(\d+)(?:-|$)/i;
255
+ function On(e) {
256
+ var d, l;
257
+ const [t, n, s, r, a] = e.split(" ");
258
+ if (!t) return null;
259
+ const i = Number(((d = r == null ? void 0 : r.match(/ahead (\d+)/)) == null ? void 0 : d[1]) ?? 0), o = Number(((l = r == null ? void 0 : r.match(/behind (\d+)/)) == null ? void 0 : l[1]) ?? 0), c = t.match(Dn);
260
+ return {
261
+ name: t,
262
+ current: n === "*",
263
+ upstream: s || null,
264
+ ahead: i,
265
+ behind: o,
266
+ gone: r === "gone",
267
+ date: a ?? "",
268
+ ideaId: c ? `${c[1].toUpperCase()}-${c[2]}` : null
269
+ };
247
270
  }
248
- async function Xa(e, t, n = 30) {
249
- const s = await Cn(e), r = await S(e, [
271
+ async function ei(e) {
272
+ return (await k(e, [
273
+ "for-each-ref",
274
+ "refs/heads",
275
+ "--sort=-committerdate",
276
+ `--format=${xn}`
277
+ ])).split(`
278
+ `).map(On).filter((n) => n !== null);
279
+ }
280
+ async function ti(e, t, n = 30) {
281
+ const s = await Cn(e), r = await k(e, [
250
282
  "log",
251
283
  "--first-parent",
252
284
  `--max-count=${n + 1}`,
@@ -254,7 +286,7 @@ async function Xa(e, t, n = 30) {
254
286
  `--format=${An}`
255
287
  ]), a = /* @__PURE__ */ new Set();
256
288
  if (s) {
257
- const c = await S(e, ["rev-list", `${s}..HEAD`]);
289
+ const c = await k(e, ["rev-list", `${s}..HEAD`]);
258
290
  for (const d of c.split(`
259
291
  `)) {
260
292
  const l = d.trim();
@@ -264,8 +296,8 @@ async function Xa(e, t, n = 30) {
264
296
  const i = Nn(r, s, a), o = i.length > n;
265
297
  return { commits: i.slice(0, n), upstream: s, hasMore: o };
266
298
  }
267
- const k = /* @__PURE__ */ new Map(), xn = 5 * 60 * 1e3, pe = (e) => f(e, "papercamp", "pr-map.json");
268
- async function Dn(e, t, n) {
299
+ const S = /* @__PURE__ */ new Map(), Ln = 5 * 60 * 1e3, pe = (e) => f(e, "papercamp", "pr-map.json");
300
+ async function jn(e, t, n) {
269
301
  const s = pe(e);
270
302
  try {
271
303
  const r = { fetchedAt: n, prs: Object.fromEntries(t) };
@@ -283,13 +315,13 @@ async function st(e) {
283
315
  return;
284
316
  }
285
317
  }
286
- const On = {
318
+ const Mn = {
287
319
  APPROVED: "approved",
288
320
  CHANGES_REQUESTED: "changes-requested",
289
321
  REVIEW_REQUIRED: "review-required"
290
322
  };
291
- function Ln(e) {
292
- const t = e.state === "MERGED" ? "merged" : e.state === "CLOSED" ? "closed" : e.isDraft ? "draft" : "open", n = On[e.reviewDecision];
323
+ function Fn(e) {
324
+ const t = e.state === "MERGED" ? "merged" : e.state === "CLOSED" ? "closed" : e.isDraft ? "draft" : "open", n = Mn[e.reviewDecision];
293
325
  return {
294
326
  number: e.number,
295
327
  url: e.url,
@@ -306,7 +338,7 @@ function rt(e, t) {
306
338
  const s = t == null ? void 0 : t.match(/^[a-z]+\/([a-z]+-\d+)-/);
307
339
  return s ? s[1].toUpperCase() : null;
308
340
  }
309
- const jn = `
341
+ const Hn = `
310
342
  query($owner: String!, $repo: String!, $number: Int!) {
311
343
  repository(owner: $owner, name: $repo) {
312
344
  pullRequest(number: $number) {
@@ -317,7 +349,7 @@ query($owner: String!, $repo: String!, $number: Int!) {
317
349
  }
318
350
  }
319
351
  }`;
320
- function Mn(e, t) {
352
+ function Bn(e, t) {
321
353
  return `Paper Scout · ${e} · ${t.slice(0, 7)}`;
322
354
  }
323
355
  function F(e) {
@@ -326,7 +358,7 @@ function F(e) {
326
358
  const [, n, s, r] = t;
327
359
  return { owner: n, repo: s, number: r };
328
360
  }
329
- const Fn = 15e3;
361
+ const Gn = 15e3;
330
362
  function at(e, t) {
331
363
  return new Promise((n) => {
332
364
  var c, d;
@@ -336,7 +368,7 @@ function at(e, t) {
336
368
  r || (r = !0, clearTimeout(i), l());
337
369
  }, i = setTimeout(() => {
338
370
  s.kill(), a(() => n(void 0));
339
- }, Fn);
371
+ }, Gn);
340
372
  let o = "";
341
373
  (c = s.stdout) == null || c.on("data", (l) => {
342
374
  o += l.toString();
@@ -377,16 +409,16 @@ function ot(e, t, n) {
377
409
  function ct(e, t) {
378
410
  return at(e, ["api", "graphql", ...t]);
379
411
  }
380
- async function Hn(e, t) {
412
+ async function qn(e, t) {
381
413
  var l, p, h, m, b;
382
414
  const n = F(t);
383
415
  if (!n) return;
384
- const s = await it(e, jn, n.owner, n.repo, n.number), r = (p = (l = s == null ? void 0 : s.data) == null ? void 0 : l.repository) == null ? void 0 : p.pullRequest;
416
+ const s = await it(e, Hn, n.owner, n.repo, n.number), r = (p = (l = s == null ? void 0 : s.data) == null ? void 0 : l.repository) == null ? void 0 : p.pullRequest;
385
417
  if (!r) return;
386
418
  const a = r.reviewThreads.nodes.filter((y) => !y.isResolved).length, i = (h = r.commits.nodes[0]) == null ? void 0 : h.commit.committedDate, o = [(m = r.comments.nodes[0]) == null ? void 0 : m.createdAt, (b = r.reviews.nodes.at(-1)) == null ? void 0 : b.createdAt].filter((y) => !!y).sort().at(-1), c = !!(i && o && o > i), d = r.reviews.nodes.map((y) => y.body);
387
419
  return { unresolvedThreadCount: a, hasNewCommentsSincePush: c, reviewBodies: d };
388
420
  }
389
- const Bn = `
421
+ const Un = `
390
422
  query($owner: String!, $repo: String!, $number: Int!) {
391
423
  repository(owner: $owner, name: $repo) {
392
424
  pullRequest(number: $number) {
@@ -400,11 +432,11 @@ query($owner: String!, $repo: String!, $number: Int!) {
400
432
  }
401
433
  }
402
434
  }`;
403
- async function Qa(e, t) {
435
+ async function ni(e, t) {
404
436
  var a, i, o;
405
437
  const n = F(t);
406
438
  if (!n) return [];
407
- const s = await it(e, Bn, n.owner, n.repo, n.number);
439
+ const s = await it(e, Un, n.owner, n.repo, n.number);
408
440
  return (((o = (i = (a = s == null ? void 0 : s.data) == null ? void 0 : a.repository) == null ? void 0 : i.pullRequest) == null ? void 0 : o.reviewThreads.nodes) ?? []).filter((c) => !c.isResolved).map((c) => ({ id: c.id, comment: c.comments.nodes[0] })).filter((c) => !!c.comment).map(({ id: c, comment: d }) => {
409
441
  var l;
410
442
  return {
@@ -416,25 +448,25 @@ async function Qa(e, t) {
416
448
  };
417
449
  });
418
450
  }
419
- const Gn = `
451
+ const Yn = `
420
452
  mutation($threadId: ID!) {
421
453
  resolveReviewThread(input: { threadId: $threadId }) {
422
454
  thread { id isResolved }
423
455
  }
424
- }`, qn = `
456
+ }`, Wn = `
425
457
  mutation($threadId: ID!, $body: String!) {
426
458
  addPullRequestReviewThreadReply(input: { pullRequestReviewThreadId: $threadId, body: $body }) {
427
459
  comment { id }
428
460
  }
429
461
  }`;
430
- async function Za(e, t) {
462
+ async function si(e, t) {
431
463
  var s, r, a;
432
- const n = await ot(e, Gn, { threadId: t });
464
+ const n = await ot(e, Yn, { threadId: t });
433
465
  return !!((a = (r = (s = n == null ? void 0 : n.data) == null ? void 0 : s.resolveReviewThread) == null ? void 0 : r.thread) != null && a.isResolved);
434
466
  }
435
- async function ei(e, t, n) {
467
+ async function ri(e, t, n) {
436
468
  var r, a, i;
437
- const s = await ot(e, qn, { threadId: t, body: n });
469
+ const s = await ot(e, Wn, { threadId: t, body: n });
438
470
  return !!((i = (a = (r = s == null ? void 0 : s.data) == null ? void 0 : r.addPullRequestReviewThreadReply) == null ? void 0 : a.comment) != null && i.id);
439
471
  }
440
472
  function dt(e, t, n) {
@@ -454,7 +486,7 @@ function dt(e, t, n) {
454
486
  }), (c = r.stdin) == null || c.end(JSON.stringify(n));
455
487
  });
456
488
  }
457
- async function ti(e, t, n) {
489
+ async function ai(e, t, n) {
458
490
  const s = F(t);
459
491
  return s ? dt(
460
492
  e,
@@ -462,25 +494,25 @@ async function ti(e, t, n) {
462
494
  n
463
495
  ) : { delivered: !1 };
464
496
  }
465
- async function ni(e, t, n) {
497
+ async function ii(e, t, n) {
466
498
  const s = F(t);
467
499
  return s ? dt(e, `repos/${s.owner}/${s.repo}/dispatches`, {
468
500
  event_type: "paper-camp-review",
469
501
  client_payload: { review: { number: Number(s.number), ...n } }
470
502
  }) : { delivered: !1 };
471
503
  }
472
- async function Un(e, t) {
504
+ async function Kn(e, t) {
473
505
  const n = [...t.entries()].filter(
474
506
  ([, r]) => r.state === "open" || r.state === "draft"
475
- ), s = await Promise.all(n.map(([, r]) => Hn(e, r.url)));
507
+ ), s = await Promise.all(n.map(([, r]) => qn(e, r.url)));
476
508
  n.forEach(([r, a], i) => {
477
509
  const o = s[i];
478
510
  if (!o) return;
479
- const { reviewBodies: c, ...d } = o, l = !!a.headSha && c.some((p) => p.includes(Mn(r, a.headSha)));
511
+ const { reviewBodies: c, ...d } = o, l = !!a.headSha && c.some((p) => p.includes(Bn(r, a.headSha)));
480
512
  t.set(r, { ...a, ...d, ...l && { scoutReviewObserved: l } });
481
513
  });
482
514
  }
483
- async function Yn(e) {
515
+ async function zn(e) {
484
516
  const t = await at(e, [
485
517
  "pr",
486
518
  "list",
@@ -496,31 +528,31 @@ async function Yn(e) {
496
528
  for (const s of t) {
497
529
  const r = rt(s.body, s.headRefName);
498
530
  if (!r) continue;
499
- const a = Ln(s), i = n.get(r);
531
+ const a = Fn(s), i = n.get(r);
500
532
  (!i || Ce[a.state] > Ce[i.state]) && n.set(r, a);
501
533
  }
502
- return await Un(e, n), n;
534
+ return await Kn(e, n), n;
503
535
  }
504
- async function ut(e, t = xn) {
505
- let n = k.get(e);
536
+ async function ut(e, t = Ln) {
537
+ let n = S.get(e);
506
538
  if (!n) {
507
539
  const r = await st(e);
508
- r && (k.set(e, r), n = r);
540
+ r && (S.set(e, r), n = r);
509
541
  }
510
542
  if (n && Date.now() - n.fetchedAt < t) return n.prs;
511
543
  if (!Number.isFinite(t)) return n == null ? void 0 : n.prs;
512
- const s = await Yn(e);
544
+ const s = await zn(e);
513
545
  if (s !== void 0) {
514
546
  const r = Date.now();
515
- return k.set(e, { prs: s, fetchedAt: r }), await Dn(e, s, r), s;
547
+ return S.set(e, { prs: s, fetchedAt: r }), await jn(e, s, r), s;
516
548
  }
517
549
  return n == null ? void 0 : n.prs;
518
550
  }
519
- function si(e) {
551
+ function oi(e) {
520
552
  var t;
521
- return (t = k.get(e)) == null ? void 0 : t.prs;
553
+ return (t = S.get(e)) == null ? void 0 : t.prs;
522
554
  }
523
- function ri(e, t) {
555
+ function ci(e, t) {
524
556
  const n = (r) => `${r.number}:${r.headSha ?? "unknown"}`, s = [];
525
557
  for (const [r, a] of t) {
526
558
  if (a.reviewDecision !== "changes-requested") continue;
@@ -529,21 +561,21 @@ function ri(e, t) {
529
561
  }
530
562
  return s;
531
563
  }
532
- async function ai(e) {
533
- let t = k.get(e);
564
+ async function di(e) {
565
+ let t = S.get(e);
534
566
  if (!t) {
535
567
  const n = await st(e);
536
- n && (k.set(e, n), t = n);
568
+ n && (S.set(e, n), t = n);
537
569
  }
538
570
  return (t == null ? void 0 : t.fetchedAt) ?? null;
539
571
  }
540
- async function ii(e) {
572
+ async function ui(e) {
541
573
  if (e === void 0) {
542
- k.clear();
574
+ S.clear();
543
575
  return;
544
576
  }
545
- const t = k.get(e);
546
- t && k.set(e, { ...t, fetchedAt: 0 });
577
+ const t = S.get(e);
578
+ t && S.set(e, { ...t, fetchedAt: 0 });
547
579
  const n = pe(e);
548
580
  try {
549
581
  const s = await w(n, "utf-8"), r = JSON.parse(s);
@@ -552,7 +584,7 @@ async function ii(e) {
552
584
  } catch {
553
585
  }
554
586
  }
555
- const fe = /^#{2,3}\s+/, q = /^[-*]\s+\[([ xX])\]\s+(.*)$/, Wn = /^\[(review|manual|issue)\]\s+(.*)$/, Kn = /^run:\s*(.+)$/, xe = /^-\s+(\d{4}-\d{2}-\d{2}):\s*(.*)$/, zn = /^\[(?:phase:(\d+)|body)\]\s+(?:\[(decision|question)\]\s+)?(.*)$/, lt = /^-\s+\[([ xX])\]\s+(?:(\d{4}-\d{2}-\d{2})\s+)?\[(log|clarification|review|note|decision|question|chat)\]\s+(\[agent\]\s+)?(?:\[\[([A-Za-z]+-\d+)\]\]\s+)?(.*)$/, Jn = ["note", "decision", "question"], Vn = /^option:\s*(.*)$/i, Xn = /^context:\s*(.*)$/i;
587
+ const fe = /^#{2,3}\s+/, q = /^[-*]\s+\[([ xX])\]\s+(.*)$/, Jn = /^\[(review|manual|issue)\]\s+(.*)$/, Vn = /^run:\s*(.+)$/, xe = /^-\s+(\d{4}-\d{2}-\d{2}):\s*(.*)$/, Xn = /^\[(?:phase:(\d+)|body)\]\s+(?:\[(decision|question)\]\s+)?(.*)$/, lt = /^-\s+\[([ xX])\]\s+(?:(\d{4}-\d{2}-\d{2})\s+)?\[(log|clarification|review|note|decision|question|chat)\]\s+(\[agent\]\s+)?(?:\[\[([A-Za-z]+-\d+)\]\]\s+)?(.*)$/, Qn = ["note", "decision", "question"], Zn = /^option:\s*(.*)$/i, es = /^context:\s*(.*)$/i;
556
588
  function pt(e, t, n, s) {
557
589
  const r = [];
558
590
  let a = t;
@@ -574,13 +606,13 @@ function ft(e, t, n) {
574
606
  for (; r < n; ) {
575
607
  const a = e[r].match(q);
576
608
  if (a) {
577
- const i = a[1].toLowerCase() === "x", o = a[2].trim(), c = o.match(Wn), d = c ? c[2].trim() : o, l = c ? c[1] : void 0, p = [];
609
+ const i = a[1].toLowerCase() === "x", o = a[2].trim(), c = o.match(Jn), d = c ? c[2].trim() : o, l = c ? c[1] : void 0, p = [];
578
610
  let h;
579
611
  for (r++; r < n; ) {
580
612
  const m = e[r];
581
613
  if (m.trim() === "" || q.test(m) || fe.test(m)) break;
582
614
  if (/^\s/.test(m)) {
583
- const b = m.trimStart(), y = b.match(Kn), g = y ? dn(y[1]) : void 0;
615
+ const b = m.trimStart(), y = b.match(Vn), g = y ? dn(y[1]) : void 0;
584
616
  g ? h = g : p.push(b), r++;
585
617
  } else
586
618
  break;
@@ -626,14 +658,14 @@ function ht(e, t) {
626
658
  function ge(e, t) {
627
659
  return [e, ...t.map((n) => `- ${n.date}: ${n.text}`)];
628
660
  }
629
- function Qn(e) {
661
+ function ts(e) {
630
662
  return e.kind === "phase" ? `[phase:${e.index}]` : "[body]";
631
663
  }
632
- function Zn(e, t, n) {
664
+ function ns(e, t, n) {
633
665
  const s = [];
634
666
  let r = t;
635
667
  for (; r < n; ) {
636
- const a = e[r].match(q), i = a ? a[2].trim().match(zn) : null;
668
+ const a = e[r].match(q), i = a ? a[2].trim().match(Xn) : null;
637
669
  if (!a || !i) {
638
670
  r++;
639
671
  continue;
@@ -648,12 +680,12 @@ function Zn(e, t, n) {
648
680
  }
649
681
  return s;
650
682
  }
651
- function es(e) {
683
+ function ss(e) {
652
684
  const t = ["### Notes"];
653
685
  for (const n of e) {
654
686
  const s = n.kind && n.kind !== "note" ? `[${n.kind}] ` : "";
655
687
  t.push(
656
- `- [${n.state === "resolved" ? "x" : " "}] ${Qn(n.anchor)} ${s}${n.prose}`
688
+ `- [${n.state === "resolved" ? "x" : " "}] ${ts(n.anchor)} ${s}${n.prose}`
657
689
  );
658
690
  }
659
691
  return t;
@@ -676,14 +708,14 @@ const te = {
676
708
  formatLines: (e) => ge("### Clarifications", e)
677
709
  }, we = {
678
710
  headingRe: /^#{2,3}\s+Notes\s*$/i,
679
- parseEntries: Zn,
680
- formatLines: es
681
- }, ts = {
711
+ parseEntries: ns,
712
+ formatLines: ss
713
+ }, rs = {
682
714
  headingRe: /^#{2,3}\s+Review\s*$/i,
683
715
  parseEntries: me,
684
716
  formatLines: (e) => ge("### Review", e)
685
717
  };
686
- function ns(e, t, n) {
718
+ function as(e, t, n) {
687
719
  const s = [], r = [];
688
720
  let a, i = t;
689
721
  for (; i < n; ) {
@@ -691,7 +723,7 @@ function ns(e, t, n) {
691
723
  if (o.trim() === "" || !/^\s/.test(o)) break;
692
724
  const c = o.trimStart();
693
725
  if (lt.test(c) || fe.test(c)) break;
694
- const d = c.match(Vn), l = c.match(Xn);
726
+ const d = c.match(Zn), l = c.match(es);
695
727
  if (d) {
696
728
  const [p, h] = d[1].split("—").map((m) => m.trim());
697
729
  r.push({ label: p || d[1].trim(), consequence: h ?? "" });
@@ -700,7 +732,7 @@ function ns(e, t, n) {
700
732
  }
701
733
  return { text: s.join(" "), options: r, context: a, next: i };
702
734
  }
703
- function ss(e, t, n) {
735
+ function is(e, t, n) {
704
736
  const s = [];
705
737
  let r = t;
706
738
  for (; r < n; ) {
@@ -709,12 +741,12 @@ function ss(e, t, n) {
709
741
  r++;
710
742
  continue;
711
743
  }
712
- const i = a[3], o = ns(e, r + 1, n), c = { kind: i, text: he(a[6], o.text) };
713
- a[2] && (c.date = a[2]), a[4] && (c.from = "agent"), a[5] && (c.entityId = a[5]), o.options.length > 0 && (c.options = o.options), o.context !== void 0 && (c.context = o.context), Jn.includes(i) && (c.state = a[1].toLowerCase() === "x" ? "resolved" : "open"), s.push(c), r = o.next;
744
+ const i = a[3], o = as(e, r + 1, n), c = { kind: i, text: he(a[6], o.text) };
745
+ a[2] && (c.date = a[2]), a[4] && (c.from = "agent"), a[5] && (c.entityId = a[5]), o.options.length > 0 && (c.options = o.options), o.context !== void 0 && (c.context = o.context), Qn.includes(i) && (c.state = a[1].toLowerCase() === "x" ? "resolved" : "open"), s.push(c), r = o.next;
714
746
  }
715
747
  return s;
716
748
  }
717
- function rs(e) {
749
+ function os(e) {
718
750
  const t = ["### Thread"];
719
751
  for (const n of e) {
720
752
  const s = n.state ? n.state === "resolved" : !0, r = n.date ? `${n.date} ` : "", a = n.from === "agent" ? "[agent] " : "", i = n.entityId ? `[[${n.entityId}]] ` : "";
@@ -727,8 +759,8 @@ function rs(e) {
727
759
  }
728
760
  const gt = {
729
761
  headingRe: /^#{2,3}\s+Thread\s*$/i,
730
- parseEntries: ss,
731
- formatLines: rs
762
+ parseEntries: is,
763
+ formatLines: os
732
764
  }, $ = u.preprocess(
733
765
  (e) => typeof e == "string" ? { agent: e } : e,
734
766
  u.object({
@@ -736,7 +768,7 @@ const gt = {
736
768
  model: u.string().optional(),
737
769
  effort: u.string().optional()
738
770
  })
739
- ), A = u.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD"), as = u.object({
771
+ ), A = u.string().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD"), cs = u.object({
740
772
  status: u.enum(["idea", "planned", "in-progress", "review", "done", "dropped"]),
741
773
  kind: u.enum(["feat", "fix", "chore", "docs", "refactor"]).optional(),
742
774
  id: u.string().optional(),
@@ -745,7 +777,7 @@ const gt = {
745
777
  created: A,
746
778
  updated: A.optional(),
747
779
  tags: u.string().optional()
748
- }), is = u.object({
780
+ }), ds = u.object({
749
781
  id: u.string().describe("Permanent plan ID, e.g. FEAT-24"),
750
782
  title: u.string().describe('Human-readable plan name, e.g. "Plan storage architecture"'),
751
783
  kind: u.enum(["feat", "fix", "chore", "docs", "refactor"]).describe("Plan kind matching Conventional Commits types"),
@@ -757,7 +789,7 @@ const gt = {
757
789
  audited: A.optional().describe("Date of last successful convergence audit (YYYY-MM-DD)"),
758
790
  "audited-hash": u.string().optional().describe("Content hash of the plan at last audit, used to detect edits regardless of mtime"),
759
791
  tags: u.array(u.string()).optional().describe("Tagging categories")
760
- }).passthrough(), os = u.object({
792
+ }).passthrough(), us = u.object({
761
793
  id: u.string().describe("Permanent idea ID, e.g. IDEA-20"),
762
794
  title: u.string().describe("Short idea headline (3-6 words)"),
763
795
  kind: u.enum(["idea", "note"]).optional().describe('"note" for ideas that never need a plan; omitted means a plan-bearing idea'),
@@ -797,7 +829,7 @@ const gt = {
797
829
  issueSource: u.string().optional().describe(
798
830
  "sourceKind:sourceKey of the Issue (IDEA-192) this entity was promoted from, if any"
799
831
  )
800
- }).passthrough(), cs = new Set(
832
+ }).passthrough(), ls = new Set(
801
833
  Object.keys(yt.shape)
802
834
  ), wt = yt.refine(
803
835
  (e) => e.kind !== "note" || e.status === void 0 || ["open", "done", "dropped"].includes(e.status),
@@ -814,57 +846,57 @@ const gt = {
814
846
  }).refine((e) => e.kind !== "ticket" || e.idea !== void 0, {
815
847
  message: "a kind: ticket entity requires an idea: link to its board",
816
848
  path: ["idea"]
817
- }), ds = u.object({
849
+ }), ps = u.object({
818
850
  name: u.string(),
819
851
  cmd: u.string(),
820
852
  port: u.number().int().positive().optional(),
821
853
  healthcheck: u.string().optional()
822
- }), us = u.object({
854
+ }), fs = u.object({
823
855
  name: u.string(),
824
856
  cmd: u.string(),
825
857
  fixCmd: u.string().optional()
826
- }), ls = u.object({
858
+ }), hs = u.object({
827
859
  repo: u.string(),
828
860
  branch: u.string().optional(),
829
861
  releasePlease: u.boolean().optional(),
830
862
  draftPr: u.boolean().optional()
831
- }), ps = u.object({
832
- services: u.array(ds).optional(),
833
- checks: u.array(us).optional(),
834
- ci: ls.optional()
835
- }), fs = u.object({
863
+ }), ms = u.object({
864
+ services: u.array(ps).optional(),
865
+ checks: u.array(fs).optional(),
866
+ ci: hs.optional()
867
+ }), gs = u.object({
836
868
  from: u.string(),
837
869
  to: u.string()
838
- }), hs = u.object({
870
+ }), ys = u.object({
839
871
  name: u.string(),
840
872
  prompt: u.string()
841
- }), ms = u.object({
873
+ }), ws = u.object({
842
874
  ceiling: u.number().optional(),
843
875
  floor: u.number().optional(),
844
- window: fs.optional(),
876
+ window: gs.optional(),
845
877
  roots: u.array(u.string()).optional(),
846
878
  maxChunks: u.number().int().positive().optional(),
847
879
  threshold: u.number().min(0).max(100).optional(),
848
880
  checks: u.record(u.enum(sn), u.boolean()).optional(),
849
- customChecks: u.array(hs).optional(),
881
+ customChecks: u.array(ys).optional(),
850
882
  maxTurns: u.number().int().positive().optional(),
851
883
  maxCostUsd: u.number().positive().optional()
852
- }), gs = u.object({
884
+ }), bs = u.object({
853
885
  kinds: u.record(u.enum(rn), u.boolean()).optional()
854
- }), ys = u.object({
886
+ }), vs = u.object({
855
887
  endpoint: u.string(),
856
888
  keys: u.object({ p256dh: u.string(), auth: u.string() })
857
- }), oi = u.discriminatedUnion("transport", [
889
+ }), li = u.discriminatedUnion("transport", [
858
890
  u.object({
859
891
  transport: u.literal("webpush"),
860
892
  name: u.string(),
861
- subscription: ys
893
+ subscription: vs
862
894
  }),
863
895
  u.object({ transport: u.literal("expo"), name: u.string(), token: u.string() })
864
- ]), ci = u.discriminatedUnion("transport", [
896
+ ]), pi = u.discriminatedUnion("transport", [
865
897
  u.object({ transport: u.literal("webpush"), endpoint: u.string() }),
866
898
  u.object({ transport: u.literal("expo"), token: u.string() })
867
- ]), ws = u.object({
899
+ ]), Es = u.object({
868
900
  version: u.number().int().describe("Corpus format version (see CORPUS_FORMAT_VERSION), not the package version"),
869
901
  projectName: u.string(),
870
902
  initializedAt: u.string(),
@@ -890,10 +922,10 @@ const gt = {
890
922
  deskDiscovery: $,
891
923
  nightShift: $
892
924
  }).optional(),
893
- desk: ps.optional(),
894
- night: ms.optional(),
895
- notifications: gs.optional()
896
- }), bs = u.object({
925
+ desk: ms.optional(),
926
+ night: ws.optional(),
927
+ notifications: bs.optional()
928
+ }), ks = u.object({
897
929
  id: u.string(),
898
930
  kind: u.enum([
899
931
  "completed",
@@ -910,14 +942,14 @@ const gt = {
910
942
  read: u.boolean(),
911
943
  outcome: u.enum(["done", "error"]).optional(),
912
944
  push: u.boolean().optional().default(!0)
913
- }), De = /^##\s+(.+?)\s*$/, vs = /^\*\*([A-Za-z][A-Za-z-]*):\*\*\s*(.*)$/, Es = /^#{2,3}\s+/;
945
+ }), De = /^##\s+(.+?)\s*$/, Ss = /^\*\*([A-Za-z][A-Za-z-]*):\*\*\s*(.*)$/, $s = /^#{2,3}\s+/;
914
946
  function U(e, t) {
915
947
  const n = e.split(`
916
948
  `), s = n.findIndex((o) => t.headingRe.test(o));
917
949
  if (s === -1) return { body: e, entries: [] };
918
950
  let r = n.length;
919
951
  for (let o = s + 1; o < n.length; o++)
920
- if (Es.test(n[o])) {
952
+ if ($s.test(n[o])) {
921
953
  r = o;
922
954
  break;
923
955
  }
@@ -930,7 +962,7 @@ const Oe = {
930
962
  log: H,
931
963
  clarifications: ye,
932
964
  notes: we,
933
- review: ts
965
+ review: rs
934
966
  };
935
967
  function be(e) {
936
968
  const t = {
@@ -947,7 +979,7 @@ function be(e) {
947
979
  }
948
980
  return { body: n, ...t };
949
981
  }
950
- function ks(e) {
982
+ function Is(e) {
951
983
  const t = e.split(`
952
984
  `), n = [];
953
985
  for (let r = 0; r < t.length; r++)
@@ -959,7 +991,7 @@ function ks(e) {
959
991
  for (; d < c.length && c[d].trim() === ""; ) d++;
960
992
  const l = {};
961
993
  for (; d < c.length; ) {
962
- const B = c[d].match(vs);
994
+ const B = c[d].match(Ss);
963
995
  if (!B) break;
964
996
  l[B[1].toLowerCase()] = B[2].trim(), d++;
965
997
  }
@@ -970,10 +1002,10 @@ function ks(e) {
970
1002
  }
971
1003
  return s;
972
1004
  }
973
- function di(e) {
1005
+ function fi(e) {
974
1006
  const t = [], n = [];
975
- for (const s of ks(e)) {
976
- const r = as.safeParse(s.fields);
1007
+ for (const s of Is(e)) {
1008
+ const r = cs.safeParse(s.fields);
977
1009
  if (!r.success) {
978
1010
  n.push({
979
1011
  title: s.title,
@@ -1003,9 +1035,9 @@ function di(e) {
1003
1035
  }
1004
1036
  return { entries: t, warnings: n };
1005
1037
  }
1006
- const Ss = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n)?/;
1038
+ const As = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n)?/;
1007
1039
  function ve(e, t) {
1008
- const n = [], s = e.match(Ss);
1040
+ const n = [], s = e.match(As);
1009
1041
  if (!s)
1010
1042
  return { data: null, body: e.trim(), warnings: n };
1011
1043
  const r = s[1], a = e.slice(s[0].length).trim();
@@ -1033,7 +1065,7 @@ function ve(e, t) {
1033
1065
  }
1034
1066
  return { data: o.data, body: a, warnings: n };
1035
1067
  }
1036
- function $s(e, t) {
1068
+ function Rs(e, t) {
1037
1069
  const n = Object.fromEntries(
1038
1070
  Object.entries(e).filter(([s]) => !t.has(s))
1039
1071
  );
@@ -1059,7 +1091,7 @@ function bt(e) {
1059
1091
  title: n.title,
1060
1092
  message: "note entities must not carry a Phases section — kept, but fix the file"
1061
1093
  });
1062
- const g = $s(n, cs);
1094
+ const g = Rs(n, ls);
1063
1095
  return { entries: [{
1064
1096
  id: n.id,
1065
1097
  title: n.title,
@@ -1085,12 +1117,12 @@ function bt(e) {
1085
1117
  ...g && { unknownFrontmatter: g }
1086
1118
  }], warnings: t };
1087
1119
  }
1088
- function ui(e) {
1120
+ function hi(e) {
1089
1121
  const t = [], {
1090
1122
  data: n,
1091
1123
  body: s,
1092
1124
  warnings: r
1093
- } = ve(e, is);
1125
+ } = ve(e, ds);
1094
1126
  if (t.push(...r), !n)
1095
1127
  return { entries: [], warnings: t };
1096
1128
  const { body: a, phases: i, log: o, clarifications: c, notes: d, review: l } = be(s);
@@ -1115,12 +1147,12 @@ function ui(e) {
1115
1147
  review: l
1116
1148
  }], warnings: t };
1117
1149
  }
1118
- function li(e) {
1150
+ function mi(e) {
1119
1151
  const {
1120
1152
  data: t,
1121
1153
  body: n,
1122
1154
  warnings: s
1123
- } = ve(e, os);
1155
+ } = ve(e, us);
1124
1156
  if (!t)
1125
1157
  return { entries: [], warnings: s };
1126
1158
  const { body: r, entries: a } = U(n, H);
@@ -1133,17 +1165,17 @@ function li(e) {
1133
1165
  ...a.length > 0 && { log: a }
1134
1166
  }], warnings: s };
1135
1167
  }
1136
- const Is = /^(IDEA-\d+):\s*/, As = /\n---+\n/;
1137
- function pi(e) {
1138
- return e.split(As).filter(Boolean).map((n) => {
1168
+ const _s = /^(IDEA-\d+):\s*/, Ps = /\n---+\n/;
1169
+ function gi(e) {
1170
+ return e.split(Ps).filter(Boolean).map((n) => {
1139
1171
  var c;
1140
1172
  const s = n.match(/^#{1,3}\s+(.+)/m), r = s ? s[1].trim() : ((c = n.trim().split(`
1141
- `)[0]) == null ? void 0 : c.trim()) ?? "Untitled", a = r.match(Is), i = (a == null ? void 0 : a[1]) ?? null, o = i ? r.slice(a[0].length) : r;
1173
+ `)[0]) == null ? void 0 : c.trim()) ?? "Untitled", a = r.match(_s), i = (a == null ? void 0 : a[1]) ?? null, o = i ? r.slice(a[0].length) : r;
1142
1174
  return { id: i, title: o, body: n.trim() };
1143
1175
  });
1144
1176
  }
1145
1177
  const Le = 40;
1146
- function Rs(e, t = []) {
1178
+ function Ts(e, t = []) {
1147
1179
  const n = [];
1148
1180
  for (const s of e)
1149
1181
  if (!s.archived && (t.length > 0 && s.subject && !t.includes(s.subject) && n.push({
@@ -1164,7 +1196,7 @@ function Rs(e, t = []) {
1164
1196
  }
1165
1197
  return n;
1166
1198
  }
1167
- function _s(e) {
1199
+ function Ns(e) {
1168
1200
  const t = /* @__PURE__ */ new Map(), n = [];
1169
1201
  for (const s of e.split(`
1170
1202
  `)) {
@@ -1181,14 +1213,14 @@ function _s(e) {
1181
1213
  }
1182
1214
  return n.map((s) => t.get(s));
1183
1215
  }
1184
- function fi(e) {
1216
+ function yi(e) {
1185
1217
  const t = [];
1186
1218
  for (const n of e.split(`
1187
1219
  `)) {
1188
1220
  const s = n.trim();
1189
1221
  if (s)
1190
1222
  try {
1191
- const r = bs.safeParse(JSON.parse(s));
1223
+ const r = ks.safeParse(JSON.parse(s));
1192
1224
  r.success && t.push(r.data);
1193
1225
  } catch {
1194
1226
  }
@@ -1196,7 +1228,7 @@ function fi(e) {
1196
1228
  return t;
1197
1229
  }
1198
1230
  const vt = /^-\s+(\d{4}-\d{2}-\d{2}):\s+(.+?)\s+—\s+(.*)$/;
1199
- function hi(e) {
1231
+ function wi(e) {
1200
1232
  const t = [];
1201
1233
  for (const n of e.split(`
1202
1234
  `)) {
@@ -1206,7 +1238,7 @@ function hi(e) {
1206
1238
  return t;
1207
1239
  }
1208
1240
  const oe = " — ";
1209
- function Ps(e) {
1241
+ function Cs(e) {
1210
1242
  return e.split(`
1211
1243
  `).map((t) => t.trim()).filter((t) => t.length > 0).map((t) => {
1212
1244
  const n = t.indexOf(oe);
@@ -1216,12 +1248,12 @@ function Ps(e) {
1216
1248
  };
1217
1249
  });
1218
1250
  }
1219
- function mi(e) {
1251
+ function bi(e) {
1220
1252
  return e.length === 0 ? "" : `${e.map((t) => `${t.id}${oe}${t.title}`).join(`
1221
1253
  `)}
1222
1254
  `;
1223
1255
  }
1224
- async function Ts(e) {
1256
+ async function xs(e) {
1225
1257
  try {
1226
1258
  return await V(e);
1227
1259
  } catch {
@@ -1235,16 +1267,16 @@ async function Et(e) {
1235
1267
  return "";
1236
1268
  }
1237
1269
  }
1238
- async function Ns(e) {
1270
+ async function Ds(e) {
1239
1271
  const t = await Et(f(e, "..", "run-order.md"));
1240
- return new Map(Ps(t).map((n, s) => [n.id, s + 1]));
1272
+ return new Map(Cs(t).map((n, s) => [n.id, s + 1]));
1241
1273
  }
1242
1274
  async function D(e) {
1243
1275
  const t = [], n = [];
1244
1276
  let s = 0;
1245
- const r = await Ns(e);
1277
+ const r = await Ds(e);
1246
1278
  for (const a of [e, f(e, "archive")]) {
1247
- const i = a !== e, o = (await Ts(a)).filter((d) => d.endsWith(".md") && d !== "index.md");
1279
+ const i = a !== e, o = (await xs(a)).filter((d) => d.endsWith(".md") && d !== "index.md");
1248
1280
  s += o.length;
1249
1281
  const c = await Promise.all(
1250
1282
  o.map(async (d) => {
@@ -1271,7 +1303,7 @@ async function Ee(e, t) {
1271
1303
  ]);
1272
1304
  return { entries: n, warnings: s, prs: a, resolved: a !== void 0, mainActivityIds: i };
1273
1305
  }
1274
- async function Cs(e) {
1306
+ async function Os(e) {
1275
1307
  const { entries: t, warnings: n, prs: s, resolved: r, mainActivityIds: a } = await Ee(e), i = t.map((c) => ({
1276
1308
  ...c,
1277
1309
  status: ee(c, s == null ? void 0 : s.get(c.id), r, a.has(c.id))
@@ -1282,7 +1314,7 @@ async function Cs(e) {
1282
1314
  return { ...c, status: Xe(d) };
1283
1315
  }), warnings: n };
1284
1316
  }
1285
- async function gi(e, t) {
1317
+ async function vi(e, t) {
1286
1318
  const { entries: n, warnings: s, prs: r, resolved: a, mainActivityIds: i } = await Ee(
1287
1319
  e,
1288
1320
  t
@@ -1294,7 +1326,7 @@ async function gi(e, t) {
1294
1326
  return { ...d, status: Xe(l) };
1295
1327
  }), warnings: s, resolved: a };
1296
1328
  }
1297
- async function yi(e) {
1329
+ async function Ei(e) {
1298
1330
  const { entries: t, prs: n, resolved: s } = await Ee(e);
1299
1331
  return {
1300
1332
  entries: t.flatMap((r) => {
@@ -1304,14 +1336,14 @@ async function yi(e) {
1304
1336
  resolved: s
1305
1337
  };
1306
1338
  }
1307
- async function wi(e) {
1339
+ async function ki(e) {
1308
1340
  const { entries: t, warnings: n } = await D(e);
1309
1341
  return {
1310
1342
  entries: t.filter((s) => s.kind === "note").map(kn),
1311
1343
  warnings: n
1312
1344
  };
1313
1345
  }
1314
- const xs = [
1346
+ const Ls = [
1315
1347
  {
1316
1348
  id: "frontmatter-schema",
1317
1349
  category: "metadata",
@@ -1402,11 +1434,11 @@ const xs = [
1402
1434
  severity: "warning",
1403
1435
  summary: "desk.ci.draftPr is on but the workflow or PR template file has no paper-camp template header, so it looks hand-written — paper-camp will not overwrite it."
1404
1436
  }
1405
- ], Ds = Object.fromEntries(
1406
- xs.map((e) => [e.id, e])
1437
+ ], js = Object.fromEntries(
1438
+ Ls.map((e) => [e.id, e])
1407
1439
  );
1408
1440
  function Y(e) {
1409
- return Ds[e.rule].severity;
1441
+ return js[e.rule].severity;
1410
1442
  }
1411
1443
  const je = { error: 0, warning: 1 };
1412
1444
  function kt(e) {
@@ -1414,7 +1446,7 @@ function kt(e) {
1414
1446
  (t, n) => t.file.localeCompare(n.file) || t.line - n.line || je[Y(t)] - je[Y(n)] || t.rule.localeCompare(n.rule)
1415
1447
  );
1416
1448
  }
1417
- function bi(e) {
1449
+ function Si(e) {
1418
1450
  const t = kt(e).map((n) => ({
1419
1451
  ...n,
1420
1452
  severity: Y(n)
@@ -1425,7 +1457,7 @@ function bi(e) {
1425
1457
  warningCount: t.filter((n) => n.severity === "warning").length
1426
1458
  };
1427
1459
  }
1428
- function vi(e) {
1460
+ function $i(e) {
1429
1461
  const t = kt(e);
1430
1462
  let n = 0, s = 0;
1431
1463
  const r = t.map((i) => {
@@ -1440,7 +1472,7 @@ function vi(e) {
1440
1472
  };
1441
1473
  }
1442
1474
  const R = 1;
1443
- class Os extends Error {
1475
+ class Ms extends Error {
1444
1476
  constructor(t) {
1445
1477
  super(
1446
1478
  `This corpus is in format version ${t}, newer than the format version ${R} this paper-camp understands. Writes are refused so a field this version doesn’t recognise is never dropped — upgrade paper-camp to edit this corpus.`
@@ -1465,19 +1497,19 @@ function $t(e) {
1465
1497
  const t = e == null ? void 0 : e.version;
1466
1498
  return typeof t == "number" ? t : null;
1467
1499
  }
1468
- async function Ei(e) {
1500
+ async function Ii(e) {
1469
1501
  const t = $t(await St(e));
1470
1502
  if (t !== null && t > R)
1471
- throw new Os(t);
1503
+ throw new Ms(t);
1472
1504
  }
1473
- async function ki(e) {
1505
+ async function Ai(e) {
1474
1506
  const t = await St(e);
1475
1507
  if (!t) return null;
1476
1508
  const n = $t(t);
1477
1509
  return n !== null && n >= R ? null : (t.version = R, await E(e, `${JSON.stringify(t, null, 2)}
1478
1510
  `, "utf-8"), { from: n, to: R });
1479
1511
  }
1480
- const It = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n)?/, Ls = 2;
1512
+ const It = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n)?/, Fs = 2;
1481
1513
  function ke(e) {
1482
1514
  const t = e.content.match(It);
1483
1515
  if (!t) return null;
@@ -1492,7 +1524,7 @@ function ke(e) {
1492
1524
  function At(e, t) {
1493
1525
  const n = new RegExp(`^\\s*${t}:`), s = e.split(`
1494
1526
  `).findIndex((r) => n.test(r));
1495
- return s === -1 ? 1 : Ls + s;
1527
+ return s === -1 ? 1 : Fs + s;
1496
1528
  }
1497
1529
  function Se(e) {
1498
1530
  const t = ke(e);
@@ -1506,7 +1538,7 @@ function Rt(e) {
1506
1538
  function _(e, t, n, s) {
1507
1539
  return { file: e.path, line: t, rule: n, message: s };
1508
1540
  }
1509
- const js = ({ files: e }) => e.flatMap((t) => {
1541
+ const Hs = ({ files: e }) => e.flatMap((t) => {
1510
1542
  const n = t.content.match(It);
1511
1543
  if (!n)
1512
1544
  return [_(t, 1, "frontmatter-schema", "missing YAML frontmatter block")];
@@ -1523,7 +1555,7 @@ const js = ({ files: e }) => e.flatMap((t) => {
1523
1555
  const i = String(a.path[0] ?? ""), o = a.path.length > 0 ? `${a.path.join(".")}: ${a.message}` : a.message;
1524
1556
  return _(t, i ? At(n[1], i) : 1, "frontmatter-schema", o);
1525
1557
  });
1526
- }), Ms = ({ files: e }) => e.flatMap((t) => {
1558
+ }), Bs = ({ files: e }) => e.flatMap((t) => {
1527
1559
  var s, r;
1528
1560
  const n = (r = (s = ke(t)) == null ? void 0 : s.data) == null ? void 0 : r.id;
1529
1561
  return typeof n != "string" || n === t.id ? [] : [
@@ -1534,7 +1566,7 @@ const js = ({ files: e }) => e.flatMap((t) => {
1534
1566
  `frontmatter id "${n}" does not match file name ${t.id}.md`
1535
1567
  )
1536
1568
  ];
1537
- }), Fs = ({ files: e }) => {
1569
+ }), Gs = ({ files: e }) => {
1538
1570
  const t = /* @__PURE__ */ new Map();
1539
1571
  for (const s of e) {
1540
1572
  const r = Rt(s), a = t.get(r);
@@ -1555,7 +1587,7 @@ const js = ({ files: e }) => e.flatMap((t) => {
1555
1587
  );
1556
1588
  }
1557
1589
  return n;
1558
- }, Hs = ({ files: e, config: t }) => {
1590
+ }, qs = ({ files: e, config: t }) => {
1559
1591
  var s;
1560
1592
  const n = (s = t == null ? void 0 : t.nextId) == null ? void 0 : s.idea;
1561
1593
  return n == null ? [] : e.flatMap((r) => {
@@ -1569,7 +1601,7 @@ const js = ({ files: e }) => e.flatMap((t) => {
1569
1601
  )
1570
1602
  ] : [];
1571
1603
  });
1572
- }, Bs = ({ config: e }) => {
1604
+ }, Us = ({ config: e }) => {
1573
1605
  const t = e == null ? void 0 : e.version;
1574
1606
  return typeof t != "number" || t <= R ? [] : [
1575
1607
  {
@@ -1579,15 +1611,15 @@ const js = ({ files: e }) => e.flatMap((t) => {
1579
1611
  message: `config.version ${t} is newer than the format version ${R} this paper-camp understands; writes are refused until it's upgraded`
1580
1612
  }
1581
1613
  ];
1582
- }, Gs = [
1583
- js,
1584
- Ms,
1585
- Fs,
1614
+ }, Ys = [
1586
1615
  Hs,
1587
- Bs
1588
- ], qs = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n)?/, _t = /^#{1,6}\s+(.+?)\s*$/, Pt = /^[-*]\s+\[[ xX]\]\s+(.*)$/, Us = /^(phases|fixes)$/i, Tt = /^#{1,6}\s+Phases\s*$/i, Ys = /^(?:\d{4}-\d{2}-\d{2}\s+)?\[(?:log|clarification|review|note|decision|question|chat)\]/, Ws = /^\[(?:phase:\d+|body)\]/, Ks = /\[\[\s*((?:IDEA|TICKET)-\d+)(?:\s*\|[^\]]*)?\s*\]\]/g, zs = /* @__PURE__ */ new Set(["idea", "planned", "in-progress", "review", "open"]), Js = /* @__PURE__ */ new Set(["done", "dropped"]), Vs = /* @__PURE__ */ new Set(["planned", "in-progress", "review"]), Xs = /^\[manual\]\s+/;
1616
+ Bs,
1617
+ Gs,
1618
+ qs,
1619
+ Us
1620
+ ], Ws = /^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n)?/, _t = /^#{1,6}\s+(.+?)\s*$/, Pt = /^[-*]\s+\[[ xX]\]\s+(.*)$/, Ks = /^(phases|fixes)$/i, Tt = /^#{1,6}\s+Phases\s*$/i, zs = /^(?:\d{4}-\d{2}-\d{2}\s+)?\[(?:log|clarification|review|note|decision|question|chat)\]/, Js = /^\[(?:phase:\d+|body)\]/, Vs = /\[\[\s*((?:IDEA|TICKET)-\d+)(?:\s*\|[^\]]*)?\s*\]\]/g, Xs = /* @__PURE__ */ new Set(["idea", "planned", "in-progress", "review", "open"]), Qs = /* @__PURE__ */ new Set(["done", "dropped"]), Zs = /* @__PURE__ */ new Set(["planned", "in-progress", "review"]), er = /^\[manual\]\s+/;
1589
1621
  function ne(e) {
1590
- const t = e.match(qs);
1622
+ const t = e.match(Ws);
1591
1623
  if (!t) return null;
1592
1624
  try {
1593
1625
  const n = X(t[1]);
@@ -1605,21 +1637,21 @@ function Nt(e, t) {
1605
1637
  function T(e, t, n, s) {
1606
1638
  return { file: e.path, line: t, rule: n, message: s };
1607
1639
  }
1608
- const Qs = ({ files: e }) => e.flatMap((t) => {
1640
+ const tr = ({ files: e }) => e.flatMap((t) => {
1609
1641
  const n = t.content.split(`
1610
1642
  `), s = [];
1611
1643
  let r = !1;
1612
1644
  for (let a = 0; a < n.length; a++) {
1613
1645
  const i = n[a].match(_t);
1614
1646
  if (i) {
1615
- r = Us.test(i[1].trim());
1647
+ r = Ks.test(i[1].trim());
1616
1648
  continue;
1617
1649
  }
1618
1650
  if (r) continue;
1619
1651
  const o = n[a].match(Pt);
1620
1652
  if (!o) continue;
1621
1653
  const c = o[1].trim();
1622
- Ys.test(c) || Ws.test(c) || s.push(
1654
+ zs.test(c) || Js.test(c) || s.push(
1623
1655
  T(
1624
1656
  t,
1625
1657
  a + 1,
@@ -1629,13 +1661,13 @@ const Qs = ({ files: e }) => e.flatMap((t) => {
1629
1661
  );
1630
1662
  }
1631
1663
  return s;
1632
- }), Zs = ({ files: e }) => e.flatMap((t) => {
1664
+ }), nr = ({ files: e }) => e.flatMap((t) => {
1633
1665
  var r;
1634
1666
  if (((r = ne(t.content)) == null ? void 0 : r.kind) !== "note") return [];
1635
1667
  const s = t.content.split(`
1636
1668
  `).findIndex((a) => Tt.test(a));
1637
1669
  return s === -1 ? [] : [T(t, s + 1, "note-has-phases", "a kind: note entity carries a Phases section")];
1638
- }), er = ({ files: e }) => e.flatMap((t) => t.content.split(`
1670
+ }), sr = ({ files: e }) => e.flatMap((t) => t.content.split(`
1639
1671
  `).flatMap((r, a) => Tt.test(r) ? [a] : []).slice(1).map(
1640
1672
  (r) => T(
1641
1673
  t,
@@ -1643,11 +1675,11 @@ const Qs = ({ files: e }) => e.flatMap((t) => {
1643
1675
  "duplicate-phases-section",
1644
1676
  "a second Phases heading exists — a redraft must replace the existing list in place, not append a new one"
1645
1677
  )
1646
- )), tr = ({ files: e }) => e.flatMap((t) => {
1678
+ )), rr = ({ files: e }) => e.flatMap((t) => {
1647
1679
  const n = ne(t.content), s = typeof (n == null ? void 0 : n.kind) == "string" ? n.kind : void 0;
1648
1680
  if (s === "note" || s === "board") return [];
1649
1681
  const r = typeof (n == null ? void 0 : n.status) == "string" ? n.status : void 0;
1650
- if (!r || !Vs.has(r)) return [];
1682
+ if (!r || !Zs.has(r)) return [];
1651
1683
  const a = t.content.split(`
1652
1684
  `);
1653
1685
  let i = !1, o = -1, c = !1;
@@ -1659,7 +1691,7 @@ const Qs = ({ files: e }) => e.flatMap((t) => {
1659
1691
  }
1660
1692
  if (!i) continue;
1661
1693
  const h = a[l].match(Pt);
1662
- h && (Xs.test(h[1].trim()) || (c = !0));
1694
+ h && (er.test(h[1].trim()) || (c = !0));
1663
1695
  }
1664
1696
  if (c) return [];
1665
1697
  const d = o === -1 ? Nt(t.content, /^status:/) : o + 1;
@@ -1671,19 +1703,19 @@ const Qs = ({ files: e }) => e.flatMap((t) => {
1671
1703
  `status "${r}" but no agent-runnable phase — only manual phases (or none at all), which reads as a note wearing an idea's clothes`
1672
1704
  )
1673
1705
  ];
1674
- }), nr = ({ files: e }) => e.flatMap((t) => {
1706
+ }), ar = ({ files: e }) => e.flatMap((t) => {
1675
1707
  var r;
1676
1708
  const n = (r = ne(t.content)) == null ? void 0 : r.status;
1677
1709
  if (typeof n != "string") return [];
1678
1710
  const s = Nt(t.content, /^status:/);
1679
- return t.archived && zs.has(n) ? [
1711
+ return t.archived && Xs.has(n) ? [
1680
1712
  T(
1681
1713
  t,
1682
1714
  s,
1683
1715
  "archive-placement",
1684
1716
  `status "${n}" is active but the file is under ideas/archive/`
1685
1717
  )
1686
- ] : !t.archived && Js.has(n) ? [
1718
+ ] : !t.archived && Qs.has(n) ? [
1687
1719
  T(
1688
1720
  t,
1689
1721
  s,
@@ -1691,7 +1723,7 @@ const Qs = ({ files: e }) => e.flatMap((t) => {
1691
1723
  `status "${n}" is closed but the file is still under ideas/ — it should be archived`
1692
1724
  )
1693
1725
  ] : [];
1694
- }), sr = ({ files: e }) => {
1726
+ }), ir = ({ files: e }) => {
1695
1727
  var n;
1696
1728
  const t = /* @__PURE__ */ new Set();
1697
1729
  for (const s of e) {
@@ -1703,7 +1735,7 @@ const Qs = ({ files: e }) => e.flatMap((t) => {
1703
1735
  const r = s.content.split(`
1704
1736
  `), a = [];
1705
1737
  for (let i = 0; i < r.length; i++)
1706
- for (const o of r[i].matchAll(Ks))
1738
+ for (const o of r[i].matchAll(Vs))
1707
1739
  t.has(o[1]) || a.push(
1708
1740
  T(
1709
1741
  s,
@@ -1714,25 +1746,25 @@ const Qs = ({ files: e }) => e.flatMap((t) => {
1714
1746
  );
1715
1747
  return a;
1716
1748
  });
1717
- }, rr = [
1718
- Qs,
1719
- Zs,
1720
- er,
1749
+ }, or = [
1721
1750
  tr,
1722
1751
  nr,
1723
- sr
1724
- ], ar = [
1752
+ sr,
1753
+ rr,
1754
+ ar,
1755
+ ir
1756
+ ], cr = [
1725
1757
  ["pnpm-lock.yaml", "pnpm"],
1726
1758
  ["yarn.lock", "yarn"],
1727
1759
  ["bun.lockb", "bun"],
1728
1760
  ["package-lock.json", "npm"]
1729
1761
  ];
1730
1762
  function Ct(e) {
1731
- for (const [t, n] of ar)
1763
+ for (const [t, n] of cr)
1732
1764
  if (ue(f(e, t))) return n;
1733
1765
  return "npm";
1734
1766
  }
1735
- function ir(e) {
1767
+ function dr(e) {
1736
1768
  const t = f(e, "package.json");
1737
1769
  if (ue(t))
1738
1770
  try {
@@ -1742,26 +1774,26 @@ function ir(e) {
1742
1774
  }
1743
1775
  }
1744
1776
  const Me = "@dendelion/paper-camp";
1745
- function or(e) {
1746
- const t = ir(e);
1777
+ function ur(e) {
1778
+ const t = dr(e);
1747
1779
  if (!t) return !1;
1748
1780
  const n = t.dependencies, s = t.devDependencies;
1749
1781
  return !!(n != null && n[Me] || s != null && s[Me]);
1750
1782
  }
1751
- const cr = ["*.json", "*.ts", "*.tsx", "*.md", "*.config.*"], dr = ["src/**", "app/**", "scripts/**", "papercamp/**"], ur = ["git status*", "git diff*", "git log*"], lr = ["ls*", "cat*", "wc*"], pr = ["run *", "test*", "install*", "view *", "pack*", "ls*"], fr = ["npx tsc*", "npx biome check*", "npx vitest*", "npx jest*", "npx expo *"];
1783
+ const lr = ["*.json", "*.ts", "*.tsx", "*.md", "*.config.*"], pr = ["src/**", "app/**", "scripts/**", "papercamp/**"], fr = ["git status*", "git diff*", "git log*"], hr = ["ls*", "cat*", "wc*"], mr = ["run *", "test*", "install*", "view *", "pack*", "ls*"], gr = ["npx tsc*", "npx biome check*", "npx vitest*", "npx jest*", "npx expo *"];
1752
1784
  function xt(e) {
1753
- const t = dr.flatMap((r) => [`Edit(${r})`, `Write(${r})`]), n = cr.flatMap((r) => [`Edit(${r})`, `Write(${r})`]), s = [
1754
- ...ur,
1755
- ...lr,
1756
- ...pr.map((r) => `${e} ${r}`),
1757
- ...fr
1785
+ const t = pr.flatMap((r) => [`Edit(${r})`, `Write(${r})`]), n = lr.flatMap((r) => [`Edit(${r})`, `Write(${r})`]), s = [
1786
+ ...fr,
1787
+ ...hr,
1788
+ ...mr.map((r) => `${e} ${r}`),
1789
+ ...gr
1758
1790
  ].map((r) => `Bash(${r})`);
1759
1791
  return [...t, ...n, ...s];
1760
1792
  }
1761
- function hr(e) {
1762
- return e ? `"${wr}" session-focus` : "paper-camp session-focus";
1793
+ function yr(e) {
1794
+ return e ? `"${Er}" session-focus` : "paper-camp session-focus";
1763
1795
  }
1764
- function mr(e, t) {
1796
+ function wr(e, t) {
1765
1797
  let n;
1766
1798
  try {
1767
1799
  n = JSON.parse(e);
@@ -1772,8 +1804,8 @@ function mr(e, t) {
1772
1804
  return i.length === 0 && n.permissions !== void 0 ? e : (n.permissions = { ...r, allow: [...a, ...i] }, `${JSON.stringify(n, null, 2)}
1773
1805
  `);
1774
1806
  }
1775
- function gr(e) {
1776
- const t = Ct(e), n = hr(or(e));
1807
+ function br(e) {
1808
+ const t = Ct(e), n = yr(ur(e));
1777
1809
  return `${JSON.stringify(
1778
1810
  {
1779
1811
  permissions: {
@@ -1793,7 +1825,7 @@ function gr(e) {
1793
1825
  )}
1794
1826
  `;
1795
1827
  }
1796
- const yr = `---
1828
+ const vr = `---
1797
1829
  name: paper-camp
1798
1830
  description: Work inside a project that has a papercamp/ folder — its unified idea entities (each holding its plan as a section), with decisions and open questions logged as notes on the idea they bind. Use this whenever the working directory contains papercamp/ (papercamp/ideas/), and especially before starting, continuing, or completing any plan phase, drafting an idea, logging a decision, or answering "what are we working on / what's next".
1799
1831
  ---
@@ -1862,10 +1894,10 @@ session start from live plan data, not hand-maintained here. It does
1862
1894
  not define the file formats in full; treat the existing files under
1863
1895
  \`papercamp/\` as the grammar reference (mirror their structure exactly rather
1864
1896
  than inventing a new shape).
1865
- `, wr = "$CLAUDE_PROJECT_DIR/node_modules/.bin/paper-camp", W = 1, Dt = `# paper-camp draft-pr template v${W}`, Ot = `<!-- paper-camp draft-pr template v${W} -->`, br = /paper-camp draft-pr template v(\d+)/;
1866
- function vr(e) {
1897
+ `, Er = "$CLAUDE_PROJECT_DIR/node_modules/.bin/paper-camp", W = 1, Dt = `# paper-camp draft-pr template v${W}`, Ot = `<!-- paper-camp draft-pr template v${W} -->`, kr = /paper-camp draft-pr template v(\d+)/;
1898
+ function Sr(e) {
1867
1899
  const t = e.split(`
1868
- `, 1)[0].match(br);
1900
+ `, 1)[0].match(kr);
1869
1901
  return t ? Number(t[1]) : null;
1870
1902
  }
1871
1903
  const Lt = `${Dt}
@@ -1980,14 +2012,14 @@ _One or two lines on what this idea changes, for whoever reviews it._
1980
2012
  - [ ] Owner has walked the affected components through the live showcase
1981
2013
 
1982
2014
  See [CONTRIBUTING.md](../blob/main/CONTRIBUTING.md) for the full flow.
1983
- `, Er = ".claude/settings.json", kr = ".github/workflows/draft-pr.yml", Sr = ".github/pull_request_template.md", $r = ({ hasPermissionsAllow: e }) => e === !1 ? [
2015
+ `, $r = ".claude/settings.json", Ir = ".github/workflows/draft-pr.yml", Ar = ".github/pull_request_template.md", Rr = ({ hasPermissionsAllow: e }) => e === !1 ? [
1984
2016
  {
1985
- file: Er,
2017
+ file: $r,
1986
2018
  line: 1,
1987
2019
  rule: "missing-permissions-allow",
1988
2020
  message: "no permissions.allow list — headless runs deny every edit and shell command outside the defaults; run `paper-camp init --settings` to add it."
1989
2021
  }
1990
- ] : [], Ir = ({ config: e }) => e && !e.defaultAgents ? [
2022
+ ] : [], _r = ({ config: e }) => e && !e.defaultAgents ? [
1991
2023
  {
1992
2024
  file: "papercamp/config.json",
1993
2025
  line: 1,
@@ -2006,7 +2038,7 @@ function Fe(e, t) {
2006
2038
  message: "missing — run `paper-camp doctor --fix` to write it, or re-save the Draft PR setting."
2007
2039
  }
2008
2040
  ];
2009
- const n = vr(t);
2041
+ const n = Sr(t);
2010
2042
  return n === null ? [
2011
2043
  {
2012
2044
  file: e,
@@ -2023,29 +2055,29 @@ function Fe(e, t) {
2023
2055
  }
2024
2056
  ] : [];
2025
2057
  }
2026
- const Ar = ({
2058
+ const Pr = ({
2027
2059
  config: e,
2028
2060
  draftPrWorkflowContent: t,
2029
2061
  pullRequestTemplateContent: n
2030
2062
  }) => {
2031
2063
  var s, r;
2032
2064
  return (r = (s = e == null ? void 0 : e.desk) == null ? void 0 : s.ci) != null && r.draftPr ? [
2033
- ...Fe(kr, t),
2034
- ...Fe(Sr, n)
2065
+ ...Fe(Ir, t),
2066
+ ...Fe(Ar, n)
2035
2067
  ] : [];
2036
- }, Rr = [
2037
- $r,
2038
- Ir,
2039
- Ar
2040
- ], _r = [
2041
- ...Gs,
2042
- ...rr,
2043
- ...Rr
2068
+ }, Tr = [
2069
+ Rr,
2070
+ _r,
2071
+ Pr
2072
+ ], Nr = [
2073
+ ...Ys,
2074
+ ...or,
2075
+ ...Tr
2044
2076
  ];
2045
2077
  function se(e) {
2046
2078
  return (e == null ? void 0 : e.code) === "ENOENT";
2047
2079
  }
2048
- async function Pr(e) {
2080
+ async function Cr(e) {
2049
2081
  try {
2050
2082
  return await V(e);
2051
2083
  } catch (t) {
@@ -2053,7 +2085,7 @@ async function Pr(e) {
2053
2085
  throw t;
2054
2086
  }
2055
2087
  }
2056
- async function Tr(e) {
2088
+ async function xr(e) {
2057
2089
  let t;
2058
2090
  try {
2059
2091
  t = await w(e, "utf-8");
@@ -2067,7 +2099,7 @@ async function Tr(e) {
2067
2099
  return null;
2068
2100
  }
2069
2101
  }
2070
- async function Nr(e) {
2102
+ async function Dr(e) {
2071
2103
  var n;
2072
2104
  let t;
2073
2105
  try {
@@ -2091,13 +2123,13 @@ async function He(e) {
2091
2123
  throw t;
2092
2124
  }
2093
2125
  }
2094
- async function Cr(e) {
2126
+ async function Or(e) {
2095
2127
  const t = f(e, "ideas"), n = [], s = [
2096
2128
  { dir: t, archived: !1, names: await V(t) },
2097
2129
  {
2098
2130
  dir: f(t, "archive"),
2099
2131
  archived: !0,
2100
- names: await Pr(f(t, "archive"))
2132
+ names: await Cr(f(t, "archive"))
2101
2133
  }
2102
2134
  ];
2103
2135
  for (const { dir: a, archived: i, names: o } of s) {
@@ -2113,8 +2145,8 @@ async function Cr(e) {
2113
2145
  const r = C(e);
2114
2146
  return {
2115
2147
  files: n,
2116
- config: await Tr(f(e, "config.json")),
2117
- hasPermissionsAllow: await Nr(r),
2148
+ config: await xr(f(e, "config.json")),
2149
+ hasPermissionsAllow: await Dr(r),
2118
2150
  draftPrWorkflowContent: await He(
2119
2151
  f(r, ".github", "workflows", "draft-pr.yml")
2120
2152
  ),
@@ -2123,35 +2155,35 @@ async function Cr(e) {
2123
2155
  )
2124
2156
  };
2125
2157
  }
2126
- function xr(e) {
2127
- return _r.flatMap((t) => t(e));
2158
+ function Lr(e) {
2159
+ return Nr.flatMap((t) => t(e));
2128
2160
  }
2129
- async function Si(e) {
2130
- return xr(await Cr(e));
2161
+ async function Ri(e) {
2162
+ return Lr(await Or(e));
2131
2163
  }
2132
- const Dr = {
2164
+ const jr = {
2133
2165
  rule: "archive-placement",
2134
2166
  fix: (e, t) => t ? {
2135
2167
  kind: "move",
2136
2168
  from: t.path,
2137
2169
  to: t.archived ? t.path.replace("/archive/", "/") : t.path.replace(/\/(?=[^/]+$)/, "/archive/")
2138
2170
  } : null
2139
- }, Or = {
2171
+ }, Mr = {
2140
2172
  ".github/workflows/draft-pr.yml": Lt,
2141
2173
  ".github/pull_request_template.md": jt
2142
- }, Lr = {
2174
+ }, Fr = {
2143
2175
  rule: "draft-pr-template-outdated",
2144
2176
  fix: (e) => {
2145
- const t = Or[e.file];
2177
+ const t = Mr[e.file];
2146
2178
  return t ? { kind: "rewrite", path: e.file, content: t } : null;
2147
2179
  }
2148
- }, jr = [Dr, Lr], Mr = new Map(
2149
- jr.map((e) => [e.rule, e])
2180
+ }, Hr = [jr, Fr], Br = new Map(
2181
+ Hr.map((e) => [e.rule, e])
2150
2182
  );
2151
- function $i(e, t) {
2183
+ function _i(e, t) {
2152
2184
  const n = new Map(e.files.map((o) => [o.path, o])), s = [], r = [], a = [], i = [];
2153
2185
  for (const o of t) {
2154
- const c = Mr.get(o.rule), d = n.get(o.file), l = c ? c.fix(o, d) : null;
2186
+ const c = Br.get(o.rule), d = n.get(o.file), l = c ? c.fix(o, d) : null;
2155
2187
  if (!l) {
2156
2188
  a.push(o);
2157
2189
  continue;
@@ -2176,22 +2208,22 @@ function Mt(e, t) {
2176
2208
  return (n = e.split(`
2177
2209
  `).find((s) => s.includes(`(${t})`))) == null ? void 0 : n.trim();
2178
2210
  }
2179
- const Fr = /^## \[.+?\]\(.*\/compare\/(.+?)\.\.\.(.+?)\)/;
2180
- function Hr(e) {
2211
+ const Gr = /^## \[.+?\]\(.*\/compare\/(.+?)\.\.\.(.+?)\)/;
2212
+ function qr(e) {
2181
2213
  return e.split(`
2182
- `).map((t) => Fr.exec(t)).filter((t) => t !== null).map((t) => ({ version: t[2], range: `${t[1]}..${t[2]}` }));
2214
+ `).map((t) => Gr.exec(t)).filter((t) => t !== null).map((t) => ({ version: t[2], range: `${t[1]}..${t[2]}` }));
2183
2215
  }
2184
- function Br(e, t) {
2216
+ function Ur(e, t) {
2185
2217
  return e.split(`
2186
2218
  `).find((n) => {
2187
2219
  const s = n.match(/\/commit\/([0-9a-f]+)\)/i);
2188
2220
  return s ? s[1].startsWith(t) || t.startsWith(s[1]) : !1;
2189
2221
  });
2190
2222
  }
2191
- const Gr = /^[a-z]+\/([a-z]+-\d+)-/;
2192
- async function qr(e, t) {
2223
+ const Yr = /^[a-z]+\/([a-z]+-\d+)-/;
2224
+ async function Wr(e, t) {
2193
2225
  var r;
2194
- const n = await S(e, [
2226
+ const n = await k(e, [
2195
2227
  "for-each-ref",
2196
2228
  "--format=%(refname)",
2197
2229
  "refs/heads",
@@ -2200,26 +2232,26 @@ async function qr(e, t) {
2200
2232
  for (const a of n.split(`
2201
2233
  `)) {
2202
2234
  const i = a.replace(/^refs\/heads\//, "").replace(/^refs\/remotes\/[^/]+\//, "");
2203
- if (((r = Gr.exec(i)) == null ? void 0 : r[1]) === s) return i;
2235
+ if (((r = Yr.exec(i)) == null ? void 0 : r[1]) === s) return i;
2204
2236
  }
2205
2237
  }
2206
- async function Ur(e, t) {
2207
- const n = await qr(e, t);
2238
+ async function Kr(e, t) {
2239
+ const n = await Wr(e, t);
2208
2240
  if (!n) return [];
2209
2241
  const s = await et(e);
2210
- return (await S(e, ["log", "--format=%s", `${s}..${n}`])).split(`
2242
+ return (await k(e, ["log", "--format=%s", `${s}..${n}`])).split(`
2211
2243
  `).map((a) => a.trim()).filter(Boolean);
2212
2244
  }
2213
- async function Yr(e, t) {
2245
+ async function zr(e, t) {
2214
2246
  if (!Sn.test(t)) return null;
2215
- const n = await S(e, ["log", "-1", "--format=%B", t]), s = n ? ie(n) : null;
2247
+ const n = await k(e, ["log", "-1", "--format=%B", t]), s = n ? ie(n) : null;
2216
2248
  if (s) return s;
2217
- const r = await K(f(e, "CHANGELOG.md")), a = Br(r, t);
2249
+ const r = await K(f(e, "CHANGELOG.md")), a = Ur(r, t);
2218
2250
  return a ? ie(a) : null;
2219
2251
  }
2220
- async function Wr(e, t) {
2221
- const s = (await S(e, ["log", "--format=%H", "--reverse", t])).split(`
2222
- `).map((i) => i.trim()).filter(Boolean), r = await Promise.all(s.map((i) => Yr(e, i))), a = /* @__PURE__ */ new Map();
2252
+ async function Jr(e, t) {
2253
+ const s = (await k(e, ["log", "--format=%H", "--reverse", t])).split(`
2254
+ `).map((i) => i.trim()).filter(Boolean), r = await Promise.all(s.map((i) => zr(e, i))), a = /* @__PURE__ */ new Map();
2223
2255
  return s.forEach((i, o) => {
2224
2256
  const c = r[o];
2225
2257
  if (!c) return;
@@ -2227,15 +2259,15 @@ async function Wr(e, t) {
2227
2259
  d ? d.push(i) : a.set(c, [i]);
2228
2260
  }), a;
2229
2261
  }
2230
- async function Ii(e, t) {
2262
+ async function Pi(e, t) {
2231
2263
  const [{ entries: n }, s, r, a, i, o] = await Promise.all([
2232
2264
  D(f(e, "papercamp", "ideas")),
2233
2265
  ut(e),
2234
2266
  K(f(e, "papercamp", "tasks.log")),
2235
2267
  K(f(e, "CHANGELOG.md")),
2236
- Ur(e, t),
2268
+ Kr(e, t),
2237
2269
  tt(e)
2238
- ]), c = n.find((h) => h.id === t), d = s == null ? void 0 : s.get(t), l = _s(r).filter((h) => h.planId === t), p = Mt(a, t);
2270
+ ]), c = n.find((h) => h.id === t), d = s == null ? void 0 : s.get(t), l = Ns(r).filter((h) => h.planId === t), p = Mt(a, t);
2239
2271
  return {
2240
2272
  id: t,
2241
2273
  idea: c ? {
@@ -2253,7 +2285,7 @@ async function Ii(e, t) {
2253
2285
  releaseLine: p ? { reached: !0, data: p } : { reached: !1 }
2254
2286
  };
2255
2287
  }
2256
- const G = /^##\s+/, Kr = /^##\s+The goal\s*$/i, Ft = /^##\s+(Horizon\s+\d+\s*[—-].*)\r?$/i, zr = /^##\s+Standing concerns\s*$/i, x = /^-\s+\*\*(.+?)\*\*\s+[—-]\s+(.*)\r?$/, Jr = /^\s+-\s+→\s+(.+?)\r?$/, Vr = /^([A-Z]+-\d+)/, Ht = /^\s+-\s+✓\s+shipped\s+(.+?)\r?$/, $e = /^\s+-\s+(.+?)\r?$/, Ie = /^\s+\S/;
2288
+ const G = /^##\s+/, Vr = /^##\s+The goal\s*$/i, Ft = /^##\s+(Horizon\s+\d+\s*[—-].*)\r?$/i, Xr = /^##\s+Standing concerns\s*$/i, x = /^-\s+\*\*(.+?)\*\*\s+[—-]\s+(.*)\r?$/, Qr = /^\s+-\s+→\s+(.+?)\r?$/, Zr = /^([A-Z]+-\d+)/, Ht = /^\s+-\s+✓\s+shipped\s+(.+?)\r?$/, $e = /^\s+-\s+(.+?)\r?$/, Ie = /^\s+\S/;
2257
2289
  function Be(e, t, n) {
2258
2290
  var a;
2259
2291
  const s = [];
@@ -2267,10 +2299,10 @@ function Be(e, t, n) {
2267
2299
  const o = [i[2].trim()], c = [], d = [];
2268
2300
  let l;
2269
2301
  for (r++; r < n && !x.test(e[r]); ) {
2270
- const p = e[r].match(Jr);
2302
+ const p = e[r].match(Qr);
2271
2303
  if (p) {
2272
2304
  const b = p[1].trim();
2273
- d.push(((a = b.match(Vr)) == null ? void 0 : a[1]) ?? b), r++;
2305
+ d.push(((a = b.match(Zr)) == null ? void 0 : a[1]) ?? b), r++;
2274
2306
  continue;
2275
2307
  }
2276
2308
  const h = e[r].match(Ht);
@@ -2296,14 +2328,14 @@ function Be(e, t, n) {
2296
2328
  }
2297
2329
  return s;
2298
2330
  }
2299
- function Xr(e) {
2331
+ function ea(e) {
2300
2332
  const t = e.split(`
2301
2333
  `);
2302
2334
  let n = "";
2303
2335
  const s = [];
2304
2336
  let r = [];
2305
2337
  for (let a = 0; a < t.length; a++) {
2306
- if (Kr.test(t[a])) {
2338
+ if (Vr.test(t[a])) {
2307
2339
  let o = a + 1;
2308
2340
  for (; o < t.length && !G.test(t[o]); ) o++;
2309
2341
  n = t.slice(a + 1, o).join(`
@@ -2325,7 +2357,7 @@ function Xr(e) {
2325
2357
  }), a = o - 1;
2326
2358
  continue;
2327
2359
  }
2328
- if (zr.test(t[a])) {
2360
+ if (Xr.test(t[a])) {
2329
2361
  let o = a + 1;
2330
2362
  for (; o < t.length && !G.test(t[o]); ) o++;
2331
2363
  r = Be(t, a + 1, o), a = o - 1;
@@ -2354,7 +2386,7 @@ function O(e, t, n) {
2354
2386
  return { start: r, end: i };
2355
2387
  }
2356
2388
  }
2357
- function Ai(e, t, n, s) {
2389
+ function Ti(e, t, n, s) {
2358
2390
  const r = e.split(`
2359
2391
  `), a = O(r, t, n);
2360
2392
  if (!a) return e;
@@ -2369,7 +2401,7 @@ function Ai(e, t, n, s) {
2369
2401
  }
2370
2402
  return e;
2371
2403
  }
2372
- function Ri(e, t, n, s) {
2404
+ function Ni(e, t, n, s) {
2373
2405
  var d, l;
2374
2406
  const r = e.split(`
2375
2407
  `), a = O(r, t, n);
@@ -2383,7 +2415,7 @@ function Ri(e, t, n, s) {
2383
2415
  return r.join(`
2384
2416
  `);
2385
2417
  }
2386
- function _i(e, t, n, s) {
2418
+ function Ci(e, t, n, s) {
2387
2419
  if (t === s) return e;
2388
2420
  const r = e.split(`
2389
2421
  `), a = O(r, t, n);
@@ -2395,7 +2427,7 @@ function _i(e, t, n, s) {
2395
2427
  return r.splice(c, 0, ...i), r.join(`
2396
2428
  `);
2397
2429
  }
2398
- function Pi(e, t, n, s) {
2430
+ function xi(e, t, n, s) {
2399
2431
  const r = e.split(`
2400
2432
  `), a = O(r, t, n);
2401
2433
  if (!a) return e;
@@ -2408,7 +2440,7 @@ function Pi(e, t, n, s) {
2408
2440
  return s !== void 0 && r.splice(i, 0, ` - ✓ shipped ${s}`), r.join(`
2409
2441
  `);
2410
2442
  }
2411
- function Ti(e, t, n, s) {
2443
+ function Di(e, t, n, s) {
2412
2444
  const r = e.split(`
2413
2445
  `), a = z(r, t);
2414
2446
  if (!a) return e;
@@ -2417,13 +2449,13 @@ function Ti(e, t, n, s) {
2417
2449
  return r.splice(i, 0, `- **${n}** — ${s}`), r.join(`
2418
2450
  `);
2419
2451
  }
2420
- function Ni(e, t, n, s) {
2452
+ function Oi(e, t, n, s) {
2421
2453
  const r = e.split(`
2422
2454
  `), a = O(r, t, n);
2423
2455
  return a ? (r.splice(a.end, 0, ` - ${s}`), r.join(`
2424
2456
  `)) : e;
2425
2457
  }
2426
- function Ci(e, t, n, s) {
2458
+ function Li(e, t, n, s) {
2427
2459
  const r = e.split(`
2428
2460
  `), a = O(r, t, n);
2429
2461
  return a ? (r.splice(a.end, 0, ` - → ${s}`), r.join(`
@@ -2435,7 +2467,7 @@ function Bt(e) {
2435
2467
  ...e.standingConcerns.map((t) => t.name)
2436
2468
  ];
2437
2469
  }
2438
- function Qr(e, t, n, s) {
2470
+ function ta(e, t, n, s) {
2439
2471
  const r = /* @__PURE__ */ new Map();
2440
2472
  for (const a of t.get(e.name) ?? [])
2441
2473
  a.id && r.set(a.id, a);
@@ -2453,18 +2485,18 @@ function Qr(e, t, n, s) {
2453
2485
  phases: i.phases
2454
2486
  }));
2455
2487
  }
2456
- function Zr(e) {
2488
+ function na(e) {
2457
2489
  const t = e.filter((s) => s.status !== "dropped"), n = t.filter((s) => s.status === "done").length;
2458
2490
  return { total: t.length, done: n, open: t.length - n };
2459
2491
  }
2460
- function ea(e, t) {
2492
+ function sa(e, t) {
2461
2493
  return e.shippedOn !== void 0 ? { state: "shipped", readyToShip: !1 } : t.total === 0 ? { state: "not-started", readyToShip: !1 } : { state: "in-progress", readyToShip: t.done === t.total };
2462
2494
  }
2463
2495
  function Ge(e, t, n, s) {
2464
- const r = Qr(e, t, n, s), a = Zr(r), { state: i, readyToShip: o } = ea(e, a);
2496
+ const r = ta(e, t, n, s), a = na(r), { state: i, readyToShip: o } = sa(e, a);
2465
2497
  return { ...e, ideas: r, rollup: a, state: i, readyToShip: o };
2466
2498
  }
2467
- function xi(e, t, n = "") {
2499
+ function ji(e, t, n = "") {
2468
2500
  const s = new Map(t.filter((d) => d.id).map((d) => [d.id, d])), r = /* @__PURE__ */ new Map();
2469
2501
  for (const d of t) {
2470
2502
  if (!d.subject) continue;
@@ -2490,7 +2522,7 @@ function xi(e, t, n = "") {
2490
2522
  );
2491
2523
  return { goal: e.goal, horizons: a, standingConcerns: i, unfiled: c };
2492
2524
  }
2493
- function ta(e) {
2525
+ function ra(e) {
2494
2526
  const t = JSON.stringify({
2495
2527
  body: e.body,
2496
2528
  phases: e.phases.map((n) => ({
@@ -2522,7 +2554,7 @@ const Ae = /* @__PURE__ */ new Set([
2522
2554
  "release",
2523
2555
  "main"
2524
2556
  ]);
2525
- function na(e, t) {
2557
+ function aa(e, t) {
2526
2558
  return (e == null ? void 0 : e.find((n) => Ae.has(n))) ?? t;
2527
2559
  }
2528
2560
  function Gt(e, t) {
@@ -2553,8 +2585,8 @@ function Gt(e, t) {
2553
2585
  }), s.on("error", () => n(void 0));
2554
2586
  });
2555
2587
  }
2556
- const sa = 6e4;
2557
- function Di(e, t, n = sa) {
2588
+ const ia = 6e4;
2589
+ function Mi(e, t, n = ia) {
2558
2590
  return new Promise((s) => {
2559
2591
  var i, o;
2560
2592
  const r = v("gh", ["pr", "diff", t], { cwd: e, stdio: ["ignore", "pipe", "pipe"] });
@@ -2574,7 +2606,7 @@ function Di(e, t, n = sa) {
2574
2606
  }), r.on("error", () => s(void 0));
2575
2607
  });
2576
2608
  }
2577
- async function ra(e, t) {
2609
+ async function oa(e, t) {
2578
2610
  for (const n of ["ideas", f("ideas", "archive")]) {
2579
2611
  const s = f(e, "papercamp", n, `${t}.md`);
2580
2612
  try {
@@ -2587,20 +2619,20 @@ async function ra(e, t) {
2587
2619
  async function N(e, t) {
2588
2620
  const n = await Gt(e, t), s = rt(n == null ? void 0 : n.body, (n == null ? void 0 : n.headRefName) ?? t);
2589
2621
  if (!s) return;
2590
- const r = await ra(e, s);
2622
+ const r = await oa(e, s);
2591
2623
  if (!r) return;
2592
2624
  const { entries: a } = bt(await w(r, "utf-8")), i = a[0];
2593
2625
  if (i)
2594
2626
  return { id: s, view: n, entry: i };
2595
2627
  }
2596
- async function Oi(e, t) {
2628
+ async function Fi(e, t) {
2597
2629
  const n = await N(e, t);
2598
2630
  if (!n) return;
2599
2631
  const { id: s, entry: r } = n;
2600
2632
  return { id: s, kind: r.type, tags: r.tags, phases: r.phases };
2601
2633
  }
2602
2634
  const qt = "<!-- papercamp:phases:start -->", Ut = "<!-- papercamp:phases:end -->", qe = new RegExp(`${qt}[\\s\\S]*?${Ut}`);
2603
- function aa(e, t) {
2635
+ function ca(e, t) {
2604
2636
  const n = t.map((a) => `- [${a.done ? "x" : " "}] ${a.text}`).join(`
2605
2637
  `), s = `${qt}
2606
2638
  ### Phases
@@ -2612,7 +2644,7 @@ ${Ut}`;
2612
2644
 
2613
2645
  ${s}` : s;
2614
2646
  }
2615
- function ia(e, t, n) {
2647
+ function da(e, t, n) {
2616
2648
  return new Promise((s) => {
2617
2649
  var a, i;
2618
2650
  const r = v("gh", ["pr", "edit", t, "--body-file", "-"], {
@@ -2623,20 +2655,20 @@ function ia(e, t, n) {
2623
2655
  }), r.on("close", (o) => s(o === 0)), r.on("error", () => s(!1)), (i = r.stdin) == null || i.end(n);
2624
2656
  });
2625
2657
  }
2626
- async function Li(e, t) {
2658
+ async function Hi(e, t) {
2627
2659
  const n = await N(e, t);
2628
2660
  if (!(n != null && n.view)) return "unresolved";
2629
- const { view: s, entry: r } = n, a = aa(s.body, r.phases);
2630
- return a === s.body ? "unchanged" : await ia(e, t, a) ? "updated" : "unresolved";
2661
+ const { view: s, entry: r } = n, a = ca(s.body, r.phases);
2662
+ return a === s.body ? "unchanged" : await da(e, t, a) ? "updated" : "unresolved";
2631
2663
  }
2632
- function oa(e) {
2664
+ function ua(e) {
2633
2665
  const t = /* @__PURE__ */ new Set();
2634
2666
  e.kind && t.add(e.kind);
2635
2667
  for (const n of e.tags)
2636
2668
  Ae.has(n) && t.add(n);
2637
2669
  return [...t];
2638
2670
  }
2639
- function ca(e) {
2671
+ function la(e) {
2640
2672
  return new Promise((t) => {
2641
2673
  var r, a;
2642
2674
  const n = v("gh", ["label", "list", "--limit", "200", "--json", "name"], {
@@ -2661,7 +2693,7 @@ function ca(e) {
2661
2693
  }), n.on("error", () => t(void 0));
2662
2694
  });
2663
2695
  }
2664
- function da(e, t) {
2696
+ function pa(e, t) {
2665
2697
  return new Promise((n) => {
2666
2698
  var r;
2667
2699
  const s = v("gh", ["label", "create", t, "--color", "ededed"], {
@@ -2672,7 +2704,7 @@ function da(e, t) {
2672
2704
  }), s.on("close", (a) => n(a === 0)), s.on("error", () => n(!1));
2673
2705
  });
2674
2706
  }
2675
- function ua(e, t, n) {
2707
+ function fa(e, t, n) {
2676
2708
  return new Promise((s) => {
2677
2709
  var a;
2678
2710
  const r = v("gh", ["pr", "edit", t, "--add-label", n.join(",")], {
@@ -2683,29 +2715,29 @@ function ua(e, t, n) {
2683
2715
  }), r.on("close", (i) => s(i === 0)), r.on("error", () => s(!1));
2684
2716
  });
2685
2717
  }
2686
- async function ji(e, t) {
2718
+ async function Bi(e, t) {
2687
2719
  const n = await N(e, t);
2688
2720
  if (!(n != null && n.view)) return "unresolved";
2689
- const { view: s, entry: r } = n, a = oa({ kind: r.type, tags: r.tags }), i = new Set((s.labels ?? []).map((l) => l.name)), o = a.filter((l) => !i.has(l));
2721
+ const { view: s, entry: r } = n, a = ua({ kind: r.type, tags: r.tags }), i = new Set((s.labels ?? []).map((l) => l.name)), o = a.filter((l) => !i.has(l));
2690
2722
  if (o.length === 0) return "unchanged";
2691
- const c = await ca(e);
2723
+ const c = await la(e);
2692
2724
  if (c) {
2693
2725
  const l = o.filter((p) => !c.has(p));
2694
2726
  for (const p of l)
2695
- await da(e, p);
2727
+ await pa(e, p);
2696
2728
  }
2697
- return await ua(e, t, o) ? "updated" : "unresolved";
2729
+ return await fa(e, t, o) ? "updated" : "unresolved";
2698
2730
  }
2699
2731
  function Yt(e, t) {
2700
- const n = t.type ?? "feat", s = na(t.tags, "repo");
2732
+ const n = t.type ?? "feat", s = aa(t.tags, "repo");
2701
2733
  return `${n}(${s}): ${t.title} (${e})`;
2702
2734
  }
2703
- const la = new RegExp(`^(${an.join("|")})\\(([a-z-]+)\\): .+$`);
2704
- function pa(e) {
2705
- const t = e.match(la);
2735
+ const ha = new RegExp(`^(${an.join("|")})\\(([a-z-]+)\\): .+$`);
2736
+ function ma(e) {
2737
+ const t = e.match(ha);
2706
2738
  return !!t && Ae.has(t[2]);
2707
2739
  }
2708
- function fa(e, t, n) {
2740
+ function ga(e, t, n) {
2709
2741
  return new Promise((s) => {
2710
2742
  var a;
2711
2743
  const r = v("gh", ["pr", "edit", t, "--title", n], {
@@ -2716,19 +2748,19 @@ function fa(e, t, n) {
2716
2748
  }), r.on("close", (i) => s(i === 0)), r.on("error", () => s(!1));
2717
2749
  });
2718
2750
  }
2719
- async function Mi(e, t) {
2751
+ async function Gi(e, t) {
2720
2752
  const n = await N(e, t);
2721
2753
  if (!(n != null && n.view)) return "unresolved";
2722
2754
  const { id: s, view: r, entry: a } = n, i = Yt(s, a);
2723
- return r.title === i ? "unchanged" : await fa(e, t, i) ? "updated" : "unresolved";
2755
+ return r.title === i ? "unchanged" : await ga(e, t, i) ? "updated" : "unresolved";
2724
2756
  }
2725
- async function Fi(e, t) {
2757
+ async function qi(e, t) {
2726
2758
  const n = await Gt(e, t);
2727
2759
  if (!n) return "no-pr";
2728
2760
  const s = await N(e, t);
2729
- return s ? n.title === Yt(s.id, s.entry) ? "valid" : "invalid" : pa(n.title) ? "valid" : "invalid";
2761
+ return s ? n.title === Yt(s.id, s.entry) ? "valid" : "invalid" : ma(n.title) ? "valid" : "invalid";
2730
2762
  }
2731
- function Hi(e, t) {
2763
+ function Ui(e, t) {
2732
2764
  return new Promise((n) => {
2733
2765
  var a;
2734
2766
  const s = v("gh", ["pr", "merge", t, "--squash"], {
@@ -2746,7 +2778,7 @@ function Hi(e, t) {
2746
2778
  }), s.on("error", (i) => n({ ok: !1, message: i.message }));
2747
2779
  });
2748
2780
  }
2749
- function ha(e, t) {
2781
+ function ya(e, t) {
2750
2782
  return new Promise((n) => {
2751
2783
  var r;
2752
2784
  const s = v("gh", ["pr", "ready", t], {
@@ -2757,7 +2789,7 @@ function ha(e, t) {
2757
2789
  }), s.on("close", (a) => n(a === 0)), s.on("error", () => n(!1));
2758
2790
  });
2759
2791
  }
2760
- function ma(e, t) {
2792
+ function wa(e, t) {
2761
2793
  return new Promise((n) => {
2762
2794
  var r;
2763
2795
  const s = v("gh", ["pr", "close", t], {
@@ -2768,14 +2800,14 @@ function ma(e, t) {
2768
2800
  }), s.on("close", (a) => n(a === 0)), s.on("error", () => n(!1));
2769
2801
  });
2770
2802
  }
2771
- async function Bi(e, t) {
2803
+ async function Yi(e, t) {
2772
2804
  const n = await N(e, t);
2773
2805
  if (!(n != null && n.view)) return "unresolved";
2774
2806
  const { view: s, entry: r } = n;
2775
- return r.status === "dropped" ? s.state !== "OPEN" ? "unchanged" : await ma(e, t) ? "closed" : "unresolved" : !(r.phases.length > 0 && r.phases.every((o) => o.done)) || !s.isDraft ? "unchanged" : await ha(e, t) ? "ready" : "unresolved";
2807
+ return r.status === "dropped" ? s.state !== "OPEN" ? "unchanged" : await wa(e, t) ? "closed" : "unresolved" : !(r.phases.length > 0 && r.phases.every((o) => o.done)) || !s.isDraft ? "unchanged" : await ya(e, t) ? "ready" : "unresolved";
2776
2808
  }
2777
- const Wt = "<!-- papercamp:consistency:start -->", ga = "<!-- papercamp:consistency:end -->";
2778
- function ya(e, t) {
2809
+ const Wt = "<!-- papercamp:consistency:start -->", ba = "<!-- papercamp:consistency:end -->";
2810
+ function va(e, t) {
2779
2811
  const n = ["### Paper Camp checks", ""];
2780
2812
  if (e.length === 0)
2781
2813
  n.push("No consistency issues found.");
@@ -2787,9 +2819,9 @@ function ya(e, t) {
2787
2819
  )), `${Wt}
2788
2820
  ${n.join(`
2789
2821
  `)}
2790
- ${ga}`;
2822
+ ${ba}`;
2791
2823
  }
2792
- function wa(e, t, n) {
2824
+ function Ea(e, t, n) {
2793
2825
  return new Promise((s) => {
2794
2826
  var a, i;
2795
2827
  const r = v("gh", ["pr", "comment", t, "--body-file", "-"], {
@@ -2800,7 +2832,7 @@ function wa(e, t, n) {
2800
2832
  }), r.on("close", (o) => s(o === 0)), r.on("error", () => s(!1)), (i = r.stdin) == null || i.end(n);
2801
2833
  });
2802
2834
  }
2803
- function ba(e, t, n, s, r) {
2835
+ function ka(e, t, n, s, r) {
2804
2836
  return new Promise((a) => {
2805
2837
  var o, c;
2806
2838
  const i = v(
@@ -2819,25 +2851,25 @@ function ba(e, t, n, s, r) {
2819
2851
  }), i.on("close", (d) => a(d === 0)), i.on("error", () => a(!1)), (c = i.stdin) == null || c.end(r);
2820
2852
  });
2821
2853
  }
2822
- async function Gi(e, t) {
2854
+ async function Wi(e, t) {
2823
2855
  var b, y;
2824
2856
  const n = await N(e, t);
2825
2857
  if (!((b = n == null ? void 0 : n.view) != null && b.url)) return "unresolved";
2826
2858
  const { view: s, entry: r } = n, [{ entries: a }, i] = await Promise.all([
2827
2859
  D(f(e, "papercamp", "ideas")),
2828
2860
  w(f(e, "ROADMAP.md"), "utf-8").catch(() => "")
2829
- ]), o = a.filter((g) => g.kind !== "note").map((g) => Ze(g)), c = i ? Bt(Xr(i)) : [], d = Rs(o, c), l = r.audited && r.auditedHash ? {
2861
+ ]), o = a.filter((g) => g.kind !== "note").map((g) => Ze(g)), c = i ? Bt(ea(i)) : [], d = Ts(o, c), l = r.audited && r.auditedHash ? {
2830
2862
  audited: r.audited,
2831
- stale: ta(r) !== r.auditedHash
2832
- } : void 0, p = ya(d, l), h = (s.comments ?? []).find((g) => g.body.includes(Wt));
2863
+ stale: ra(r) !== r.auditedHash
2864
+ } : void 0, p = va(d, l), h = (s.comments ?? []).find((g) => g.body.includes(Wt));
2833
2865
  if (h) {
2834
2866
  if (h.body === p) return "unchanged";
2835
2867
  const g = F(s.url), L = (y = h.url.match(/issuecomment-(\d+)/)) == null ? void 0 : y[1];
2836
- return !g || !L ? "unresolved" : await ba(e, g.owner, g.repo, L, p) ? "updated" : "unresolved";
2868
+ return !g || !L ? "unresolved" : await ka(e, g.owner, g.repo, L, p) ? "updated" : "unresolved";
2837
2869
  }
2838
- return await wa(e, t, p) ? "created" : "unresolved";
2870
+ return await Ea(e, t, p) ? "created" : "unresolved";
2839
2871
  }
2840
- function qi(e, t, n) {
2872
+ function Ki(e, t, n) {
2841
2873
  if (!e) return;
2842
2874
  const s = (t ?? "feat").toLowerCase(), r = n.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, ""), a = r.length <= 40 ? r : r[40] === "-" ? r.slice(0, 40) : r.slice(0, 40).replace(/-[^-]*$/, "");
2843
2875
  return `${s}/${e.toLowerCase()}-${a}`;
@@ -2850,7 +2882,7 @@ function re(e, t) {
2850
2882
  function Kt() {
2851
2883
  return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
2852
2884
  }
2853
- function Ui(e, t = "log", n, s) {
2885
+ function zi(e, t = "log", n, s) {
2854
2886
  return {
2855
2887
  kind: t,
2856
2888
  date: Kt(),
@@ -2862,7 +2894,7 @@ function Ui(e, t = "log", n, s) {
2862
2894
  ...s != null && s.context ? { context: s.context } : {}
2863
2895
  };
2864
2896
  }
2865
- function Yi(e) {
2897
+ function Ji(e) {
2866
2898
  const t = [`## ${e.title}`, "", `**Status:** ${e.status}`];
2867
2899
  e.kind && t.push(`**Kind:** ${e.kind}`), e.id && t.push(`**Id:** ${e.id}`), e.idea && t.push(`**Idea:** ${e.idea}`), e.agent && t.push(`**Agent:** ${e.agent}`), t.push(`**Created:** ${e.created}`), e.updated && t.push(`**Updated:** ${e.updated}`), e.tags && e.tags.length > 0 && t.push(`**Tags:** ${e.tags.join(", ")}`);
2868
2900
  const n = [t.join(`
@@ -2881,7 +2913,7 @@ function Re(e) {
2881
2913
  ${nn(e).trimEnd()}
2882
2914
  ---`;
2883
2915
  }
2884
- function Wi(e) {
2916
+ function Vi(e) {
2885
2917
  const t = {
2886
2918
  id: e.id,
2887
2919
  title: e.title,
@@ -2900,7 +2932,7 @@ function Wi(e) {
2900
2932
 
2901
2933
  `).trimEnd();
2902
2934
  }
2903
- function va(e) {
2935
+ function Sa(e) {
2904
2936
  const t = {
2905
2937
  id: e.id,
2906
2938
  title: e.title
@@ -2917,7 +2949,7 @@ function va(e) {
2917
2949
 
2918
2950
  `).trimEnd();
2919
2951
  }
2920
- function Ki(e) {
2952
+ function Xi(e) {
2921
2953
  const t = {
2922
2954
  id: e.id,
2923
2955
  title: e.title
@@ -2930,7 +2962,7 @@ ${e.body}` : s), re(n, [{ entries: e.log, section: H }]), n.join(`
2930
2962
 
2931
2963
  `).trimEnd();
2932
2964
  }
2933
- function zi(e, t) {
2965
+ function Qi(e, t) {
2934
2966
  let n = !1;
2935
2967
  const s = e.split(`
2936
2968
  `).filter((r) => {
@@ -2945,7 +2977,7 @@ function zi(e, t) {
2945
2977
  `) : e;
2946
2978
  }
2947
2979
  let J = Promise.resolve();
2948
- async function Ea(e, t) {
2980
+ async function $a(e, t) {
2949
2981
  const n = new RegExp(`^${t.toUpperCase()}-(\\d+)\\.md$`), s = [
2950
2982
  f(e, "ideas"),
2951
2983
  f(e, "ideas", "archive"),
@@ -2976,20 +3008,20 @@ async function zt(e, t) {
2976
3008
  return;
2977
3009
  }
2978
3010
  if (!(s != null && s.nextId)) return;
2979
- const r = s.nextId[t] ?? 1, a = await Ea(C(e), t), i = Math.max(r, a + 1), o = `${t.toUpperCase()}-${i}`;
3011
+ const r = s.nextId[t] ?? 1, a = await $a(C(e), t), i = Math.max(r, a + 1), o = `${t.toUpperCase()}-${i}`;
2980
3012
  return s.nextId[t] = i + 1, await E(e, `${JSON.stringify(s, null, 2)}
2981
3013
  `), o;
2982
3014
  });
2983
3015
  return J = n.catch(() => {
2984
3016
  }), n;
2985
3017
  }
2986
- async function Ji(e) {
3018
+ async function Zi(e) {
2987
3019
  return zt(e, "idea");
2988
3020
  }
2989
- async function Vi(e) {
3021
+ async function eo(e) {
2990
3022
  return zt(e, "ticket");
2991
3023
  }
2992
- async function Xi(e, t) {
3024
+ async function to(e, t) {
2993
3025
  const n = J.then(async () => {
2994
3026
  let s = null;
2995
3027
  try {
@@ -3004,7 +3036,7 @@ async function Xi(e, t) {
3004
3036
  return J = n.catch(() => {
3005
3037
  }), n;
3006
3038
  }
3007
- async function Qi(e, t) {
3039
+ async function no(e, t) {
3008
3040
  const n = f(e, "papercamp", "ideas"), s = f(n, "archive"), r = f(n, `${t}.md`), a = f(s, `${t}.md`);
3009
3041
  await I(s, { recursive: !0 });
3010
3042
  try {
@@ -3014,7 +3046,7 @@ async function Qi(e, t) {
3014
3046
  throw i;
3015
3047
  }
3016
3048
  }
3017
- async function Zi(e, t) {
3049
+ async function so(e, t) {
3018
3050
  const n = f(e, "papercamp", "ideas"), s = f(n, "archive", `${t}.md`), r = f(n, `${t}.md`);
3019
3051
  try {
3020
3052
  return await ze(s, r), !0;
@@ -3023,11 +3055,11 @@ async function Zi(e, t) {
3023
3055
  throw a;
3024
3056
  }
3025
3057
  }
3026
- const ka = 5;
3027
- function Sa() {
3058
+ const Ia = 5;
3059
+ function Aa() {
3028
3060
  try {
3029
3061
  let e = C(cn(import.meta.url));
3030
- for (let t = 0; t < ka; t++) {
3062
+ for (let t = 0; t < Ia; t++) {
3031
3063
  const n = f(e, "package.json");
3032
3064
  if (ue(n))
3033
3065
  return JSON.parse(Je(n, "utf-8")).version ?? "0.0.0";
@@ -3038,8 +3070,8 @@ function Sa() {
3038
3070
  return "0.0.0";
3039
3071
  }
3040
3072
  }
3041
- const eo = Sa();
3042
- class $a extends Error {
3073
+ const ro = Aa();
3074
+ class Ra extends Error {
3043
3075
  constructor(t) {
3044
3076
  super(`Paper Camp is already initialized in ${t} (papercamp/config.json exists).`);
3045
3077
  }
@@ -3051,25 +3083,25 @@ async function P(e) {
3051
3083
  return !1;
3052
3084
  }
3053
3085
  }
3054
- const Ia = ["suggestions.md"];
3055
- async function to(e, t) {
3086
+ const _a = ["suggestions.md"];
3087
+ async function ao(e, t) {
3056
3088
  const n = f(e, "papercamp"), s = f(n, "config.json");
3057
3089
  if (await P(s))
3058
- throw new $a(e);
3090
+ throw new Ra(e);
3059
3091
  const r = {
3060
3092
  version: R,
3061
3093
  projectName: t.projectName,
3062
3094
  initializedAt: (/* @__PURE__ */ new Date()).toISOString(),
3063
3095
  nextId: { idea: 2 }
3064
3096
  };
3065
- ws.parse(r), await I(n, { recursive: !0 });
3097
+ Es.parse(r), await I(n, { recursive: !0 });
3066
3098
  const a = f(n, "ideas");
3067
3099
  await I(a, { recursive: !0 });
3068
3100
  const i = f(a, "archive");
3069
3101
  await I(i, { recursive: !0 });
3070
3102
  const o = f(a, "IDEA-1.md");
3071
3103
  if (!await P(o)) {
3072
- const c = va({
3104
+ const c = Sa({
3073
3105
  id: "IDEA-1",
3074
3106
  title: "Capture your first idea",
3075
3107
  status: "idea",
@@ -3081,18 +3113,18 @@ Use the New idea button to capture what you're building next, or ask an agent fo
3081
3113
  await E(o, `${c}
3082
3114
  `, "utf-8");
3083
3115
  }
3084
- for (const c of Ia) {
3116
+ for (const c of _a) {
3085
3117
  const d = f(n, c);
3086
3118
  await P(d) || await E(d, "", "utf-8");
3087
3119
  }
3088
3120
  await E(s, `${JSON.stringify(r, null, 2)}
3089
- `, "utf-8"), await _a(e), await Pa(e), await Aa(e, t.projectName);
3121
+ `, "utf-8"), await Na(e), await Ca(e), await Pa(e, t.projectName);
3090
3122
  }
3091
- async function Aa(e, t) {
3123
+ async function Pa(e, t) {
3092
3124
  const n = Q(), s = await Z(n), { registry: r, created: a } = ln(s, e, t);
3093
3125
  a && await pn(n, r);
3094
3126
  }
3095
- const Ra = [
3127
+ const Ta = [
3096
3128
  "papercamp/.pairing.json",
3097
3129
  "papercamp/.task-logs/",
3098
3130
  "papercamp/tasks.log",
@@ -3102,9 +3134,9 @@ const Ra = [
3102
3134
  "papercamp/night.json",
3103
3135
  "papercamp/run-order.md"
3104
3136
  ];
3105
- async function _a(e) {
3137
+ async function Na(e) {
3106
3138
  const t = f(e, ".gitignore"), n = await P(t) ? await w(t, "utf-8") : "", s = n.length > 0 ? n.split(`
3107
- `) : [], r = new Set(s.map((o) => o.trim())), a = Ra.filter((o) => !r.has(o));
3139
+ `) : [], r = new Set(s.map((o) => o.trim())), a = Ta.filter((o) => !r.has(o));
3108
3140
  if (a.length === 0) return;
3109
3141
  const i = s.reduce(
3110
3142
  (o, c, d) => c.startsWith("papercamp/") ? d : o,
@@ -3122,19 +3154,19 @@ async function _a(e) {
3122
3154
  s.splice(i + 1, 0, ...a), await E(t, s.join(`
3123
3155
  `), "utf-8");
3124
3156
  }
3125
- async function Pa(e) {
3157
+ async function Ca(e) {
3126
3158
  const t = f(e, ".claude", "skills", "paper-camp");
3127
3159
  await I(t, { recursive: !0 });
3128
3160
  const n = f(t, "SKILL.md");
3129
- await P(n) || await E(n, yr, "utf-8");
3161
+ await P(n) || await E(n, vr, "utf-8");
3130
3162
  const s = f(e, ".claude");
3131
3163
  await I(s, { recursive: !0 });
3132
3164
  const r = f(s, "settings.json");
3133
3165
  if (await P(r)) {
3134
- const a = await w(r, "utf-8"), i = mr(a, e);
3166
+ const a = await w(r, "utf-8"), i = wr(a, e);
3135
3167
  i !== a && await E(r, i, "utf-8");
3136
3168
  } else
3137
- await E(r, gr(e), "utf-8");
3169
+ await E(r, br(e), "utf-8");
3138
3170
  }
3139
3171
  async function Ue(e, t, n) {
3140
3172
  if (await P(e)) {
@@ -3143,7 +3175,7 @@ async function Ue(e, t, n) {
3143
3175
  }
3144
3176
  await I(C(e), { recursive: !0 }), await E(e, t, "utf-8");
3145
3177
  }
3146
- async function no(e) {
3178
+ async function io(e) {
3147
3179
  await Ue(
3148
3180
  f(e, ".github", "workflows", "draft-pr.yml"),
3149
3181
  Lt,
@@ -3160,13 +3192,13 @@ const Jt = {
3160
3192
  refactor: "Code Refactoring",
3161
3193
  docs: "Documentation",
3162
3194
  chore: "Miscellaneous"
3163
- }, Ta = Array.from(new Set(Object.values(Jt)));
3164
- async function so(e, t) {
3165
- const n = await K(f(e, "CHANGELOG.md")), s = Hr(n).find((o) => o.version === t);
3195
+ }, xa = Array.from(new Set(Object.values(Jt)));
3196
+ async function oo(e, t) {
3197
+ const n = await K(f(e, "CHANGELOG.md")), s = qr(n).find((o) => o.version === t);
3166
3198
  if (!s) return null;
3167
3199
  const [{ entries: r }, a] = await Promise.all([
3168
3200
  D(f(e, "papercamp", "ideas")),
3169
- Wr(e, s.range)
3201
+ Jr(e, s.range)
3170
3202
  ]), i = /* @__PURE__ */ new Map();
3171
3203
  for (const o of a.keys()) {
3172
3204
  const c = r.find((p) => p.id === o);
@@ -3174,12 +3206,12 @@ async function so(e, t) {
3174
3206
  const d = Jt[c.type ?? "chore"], l = i.get(d) ?? [];
3175
3207
  l.push({ id: c.id, title: c.title }), i.set(d, l);
3176
3208
  }
3177
- return Ta.filter((o) => i.has(o)).map((o) => ({
3209
+ return xa.filter((o) => i.has(o)).map((o) => ({
3178
3210
  label: o,
3179
3211
  ideas: i.get(o)
3180
3212
  }));
3181
3213
  }
3182
- function ro(e, t) {
3214
+ function co(e, t) {
3183
3215
  const n = [`## ${e}`];
3184
3216
  for (const s of t) {
3185
3217
  n.push("", `### ${s.label}`, "");
@@ -3190,33 +3222,33 @@ function ro(e, t) {
3190
3222
  `);
3191
3223
  }
3192
3224
  const Ye = "needs a decision: ";
3193
- function Na(e) {
3225
+ function Da(e) {
3194
3226
  const t = e.lastIndexOf(Ye);
3195
3227
  return t === -1 ? { question: e } : {
3196
3228
  phaseLine: e.slice(0, t).replace(/[—-]\s*$/, "").trim() || void 0,
3197
3229
  question: e.slice(t + Ye.length).trim()
3198
3230
  };
3199
3231
  }
3200
- function Ca(e) {
3232
+ function Oa(e) {
3201
3233
  return Math.floor((Date.now() - Date.parse(e)) / 864e5);
3202
3234
  }
3203
3235
  const Vt = (e, t) => e === "question" && (t ?? "open") === "open", Xt = (e) => !!e.archived || e.status === "done" || e.status === "dropped";
3204
- function xa(e) {
3236
+ function La(e) {
3205
3237
  return e.filter((t) => !Xt(t)).flatMap(
3206
3238
  (t) => (t.thread ?? []).filter((n) => Vt(n.kind, n.state)).map((n) => ({
3207
3239
  entityId: t.id,
3208
3240
  entityTitle: t.title,
3209
- text: Na(n.text).question,
3241
+ text: Da(n.text).question,
3210
3242
  date: n.date,
3211
- ageDays: n.date ? Ca(n.date) : Number.POSITIVE_INFINITY
3243
+ ageDays: n.date ? Oa(n.date) : Number.POSITIVE_INFINITY
3212
3244
  }))
3213
3245
  ).sort((t, n) => n.ageDays - t.ageDays);
3214
3246
  }
3215
- async function ao(e) {
3247
+ async function uo(e) {
3216
3248
  const { entries: t } = await D(e);
3217
- return xa(t);
3249
+ return La(t);
3218
3250
  }
3219
- function io(e, t) {
3251
+ function lo(e, t) {
3220
3252
  const n = new Set(t.filter(Xt).map((s) => s.id));
3221
3253
  return e.map((s) => Vt(s.kind, s.state) && s.entityId && n.has(s.entityId) ? { ...s, state: "resolved" } : s);
3222
3254
  }
@@ -3234,7 +3266,7 @@ function Ke(e, ...t) {
3234
3266
  if (typeof (e == null ? void 0 : e[n]) == "string") return e[n];
3235
3267
  return "";
3236
3268
  }
3237
- function oo(e, t) {
3269
+ function po(e, t) {
3238
3270
  const n = e.toLowerCase();
3239
3271
  if (n === "bash")
3240
3272
  return (typeof (t == null ? void 0 : t.command) == "string" ? t.command : "").includes("check-types") ? "verify" : null;
@@ -3244,29 +3276,29 @@ function oo(e, t) {
3244
3276
  }
3245
3277
  return null;
3246
3278
  }
3247
- function co(e, t) {
3279
+ function fo(e, t) {
3248
3280
  return e ? We[t] > We[e] ? t : e : t;
3249
3281
  }
3250
- function uo(e, t) {
3282
+ function ho(e, t) {
3251
3283
  return e === void 0 ? !1 : t - e >= Qt;
3252
3284
  }
3253
- function Da(e) {
3285
+ function ja(e) {
3254
3286
  const t = [...e].sort((s, r) => s - r), n = Math.floor(t.length / 2);
3255
3287
  return t.length % 2 === 0 ? (t[n - 1] + t[n]) / 2 : t[n];
3256
3288
  }
3257
- function lo(e) {
3289
+ function mo(e) {
3258
3290
  const t = e.filter((r) => r.taskKind === "phase" && r.outcome === "done").map(
3259
3291
  (r) => (r.endedAt ? Date.parse(r.endedAt) : Number.NaN) - Date.parse(r.startedAt)
3260
3292
  ).filter((r) => Number.isFinite(r) && r > 0);
3261
3293
  if (t.length === 0) return {};
3262
- const n = Da(t), s = {};
3294
+ const n = ja(t), s = {};
3263
3295
  for (const r of ["implement", "verify"]) {
3264
3296
  const a = de[r].to - de[r].from;
3265
3297
  s[r] = n * a / ce;
3266
3298
  }
3267
3299
  return s;
3268
3300
  }
3269
- function po({
3301
+ function go({
3270
3302
  anchor: e,
3271
3303
  anchorEnteredAt: t,
3272
3304
  lastStreamAt: n,
@@ -3283,10 +3315,10 @@ function po({
3283
3315
  function _e(e) {
3284
3316
  return e.found && !e.done;
3285
3317
  }
3286
- function fo(e) {
3318
+ function yo(e) {
3287
3319
  return (e ?? []).some(_e);
3288
3320
  }
3289
- function Oa(e) {
3321
+ function Ma(e) {
3290
3322
  const t = e.indexOf("/");
3291
3323
  return t === -1 ? { raw: e, id: e } : { raw: e, projectSlug: e.slice(0, t), id: e.slice(t + 1) };
3292
3324
  }
@@ -3296,14 +3328,14 @@ async function Pe(e, t, n) {
3296
3328
  async function a(o) {
3297
3329
  const c = r.get(o);
3298
3330
  if (c) return c;
3299
- const { entries: d } = await Cs(
3331
+ const { entries: d } = await Os(
3300
3332
  f(o, "papercamp", "ideas")
3301
3333
  ), l = new Map(d.map((p) => [p.id, p]));
3302
3334
  return r.set(o, l), l;
3303
3335
  }
3304
3336
  const i = [];
3305
3337
  for (const o of t) {
3306
- const c = Oa(o), d = c.projectSlug ? s.projects.find((p) => p.slug === c.projectSlug) : void 0;
3338
+ const c = Ma(o), d = c.projectSlug ? s.projects.find((p) => p.slug === c.projectSlug) : void 0;
3307
3339
  if (c.projectSlug && !d) {
3308
3340
  i.push({ raw: o, id: c.id, projectSlug: c.projectSlug, found: !1 });
3309
3341
  continue;
@@ -3325,14 +3357,14 @@ async function Pe(e, t, n) {
3325
3357
  }
3326
3358
  return i;
3327
3359
  }
3328
- async function ho(e, t) {
3360
+ async function wo(e, t) {
3329
3361
  if (t.every((s) => s.needs.length === 0)) return t;
3330
3362
  const n = await Z(Q());
3331
3363
  return Promise.all(
3332
3364
  t.map(async (s) => s.needs.length === 0 ? s : { ...s, resolvedNeeds: await Pe(e, s.needs, n) })
3333
3365
  );
3334
3366
  }
3335
- async function mo(e, t) {
3367
+ async function bo(e, t) {
3336
3368
  const n = t.filter((a) => a.needs.length > 0);
3337
3369
  if (n.length === 0) return /* @__PURE__ */ new Set();
3338
3370
  const s = await Z(Q()), r = /* @__PURE__ */ new Set();
@@ -3340,157 +3372,158 @@ async function mo(e, t) {
3340
3372
  (await Pe(e, a.needs, s)).some(_e) && r.add(a.id);
3341
3373
  return r;
3342
3374
  }
3343
- async function go(e, t) {
3375
+ async function vo(e, t) {
3344
3376
  if (t.length === 0) return null;
3345
3377
  const n = (await Pe(e, t)).find(_e);
3346
3378
  return n ? `waits for ${n.projectName ? `${n.projectName} ` : ""}${n.id}` : null;
3347
3379
  }
3348
3380
  export {
3349
- vr as $,
3350
- $a as A,
3381
+ Sr as $,
3382
+ Ra as A,
3351
3383
  xt as B,
3352
3384
  Ae as C,
3353
- Ra as D,
3354
- hr as E,
3355
- go as F,
3356
- oo as G,
3357
- ii as H,
3358
- Cr as I,
3359
- xa as J,
3360
- mo as K,
3361
- ta as L,
3385
+ Ta as D,
3386
+ yr as E,
3387
+ vo as F,
3388
+ po as G,
3389
+ ui as H,
3390
+ Or as I,
3391
+ La as J,
3392
+ bo as K,
3393
+ ra as L,
3362
3394
  Le as M,
3363
3395
  Yt as N,
3364
- ti as O,
3365
- eo as P,
3396
+ ai as O,
3397
+ ro as P,
3366
3398
  A as Q,
3367
- oa as R,
3368
- yr as S,
3399
+ ua as R,
3400
+ vr as S,
3369
3401
  Bt as T,
3370
- bi as U,
3371
- us as V,
3372
- ls as W,
3373
- ps as X,
3374
- ds as Y,
3402
+ Si as U,
3403
+ fs as V,
3404
+ hs as W,
3405
+ ms as X,
3406
+ ps as Y,
3375
3407
  Ct as Z,
3376
- ni as _,
3408
+ ii as _,
3377
3409
  Sn as a,
3378
- aa as a$,
3379
- Xi as a0,
3380
- ri as a1,
3381
- cs as a2,
3410
+ ca as a$,
3411
+ to as a0,
3412
+ ci as a1,
3413
+ ls as a2,
3382
3414
  wt as a3,
3383
3415
  kn as a4,
3384
3416
  Ze as a5,
3385
- Di as a6,
3386
- Qa as a7,
3387
- yi as a8,
3388
- Rs as a9,
3417
+ Mi as a6,
3418
+ ni as a7,
3419
+ Ei as a8,
3420
+ Ts as a9,
3389
3421
  ve as aA,
3390
- li as aB,
3391
- pi as aC,
3392
- Oa as aD,
3393
- fi as aE,
3394
- ui as aF,
3395
- di as aG,
3396
- ks as aH,
3397
- Xr as aI,
3398
- hi as aJ,
3399
- si as aK,
3400
- po as aL,
3401
- $i as aM,
3402
- as as aN,
3403
- is as aO,
3404
- oi as aP,
3405
- ci as aQ,
3422
+ mi as aB,
3423
+ gi as aC,
3424
+ Ma as aD,
3425
+ yi as aE,
3426
+ hi as aF,
3427
+ fi as aG,
3428
+ Is as aH,
3429
+ ea as aI,
3430
+ wi as aJ,
3431
+ oi as aK,
3432
+ go as aL,
3433
+ _i as aM,
3434
+ cs as aN,
3435
+ ds as aO,
3436
+ li as aP,
3437
+ pi as aQ,
3406
3438
  D as aR,
3407
- Cs as aS,
3439
+ Os as aS,
3408
3440
  K as aT,
3409
- wi as aU,
3410
- ao as aV,
3411
- _s as aW,
3412
- gi as aX,
3413
- Ai as aY,
3414
- zi as aZ,
3415
- ya as a_,
3441
+ ki as aU,
3442
+ uo as aV,
3443
+ Ns as aW,
3444
+ vi as aX,
3445
+ Ti as aY,
3446
+ Qi as aZ,
3447
+ va as a_,
3416
3448
  Mt as aa,
3417
3449
  Y as ab,
3418
- va as ac,
3419
- Ki as ad,
3420
- Yi as ae,
3421
- Wi as af,
3422
- ro as ag,
3423
- ai as ah,
3424
- fo as ai,
3425
- or as aj,
3426
- os as ak,
3427
- to as al,
3450
+ Sa as ac,
3451
+ Xi as ad,
3452
+ Ji as ae,
3453
+ Vi as af,
3454
+ co as ag,
3455
+ di as ah,
3456
+ yo as ai,
3457
+ ur as aj,
3458
+ us as ak,
3459
+ ao as al,
3428
3460
  _e as am,
3429
- pa as an,
3430
- uo as ao,
3431
- Ci as ap,
3432
- lo as aq,
3433
- mr as ar,
3434
- _i as as,
3435
- ms as at,
3436
- hs as au,
3437
- fs as av,
3438
- gs as aw,
3439
- ws as ax,
3461
+ ma as an,
3462
+ ho as ao,
3463
+ Li as ap,
3464
+ mo as aq,
3465
+ wr as ar,
3466
+ Ci as as,
3467
+ ws as at,
3468
+ ys as au,
3469
+ gs as av,
3470
+ bs as aw,
3471
+ Es as ax,
3440
3472
  bt as ay,
3441
- Wa as az,
3442
- _r as b,
3443
- ei as b0,
3444
- vi as b1,
3445
- io as b2,
3446
- Yr as b3,
3447
- Ii as b4,
3473
+ Ja as az,
3474
+ Nr as b,
3475
+ ri as b0,
3476
+ $i as b1,
3477
+ lo as b2,
3478
+ zr as b3,
3479
+ Pi as b4,
3448
3480
  ie as b5,
3449
- Wr as b6,
3481
+ Jr as b6,
3450
3482
  Pe as b7,
3451
- Oi as b8,
3452
- na as b9,
3453
- Ei as bA,
3454
- Ps as bB,
3455
- mi as bC,
3483
+ Fi as b8,
3484
+ aa as b9,
3485
+ Ii as bA,
3486
+ Cs as bB,
3487
+ bi as bC,
3456
3488
  mn as bD,
3457
- Ja as bE,
3489
+ Qa as bE,
3458
3490
  Qe as bF,
3459
- S as bG,
3460
- Va as bH,
3461
- za as bI,
3462
- Xa as bJ,
3463
- wn as bK,
3464
- ki as bL,
3491
+ k as bG,
3492
+ Za as bH,
3493
+ Xa as bI,
3494
+ ei as bJ,
3495
+ ti as bK,
3496
+ wn as bL,
3497
+ Ai as bM,
3465
3498
  ut as ba,
3466
- so as bb,
3467
- Hr as bc,
3468
- Za as bd,
3469
- xi as be,
3470
- Si as bf,
3471
- xr as bg,
3472
- Pa as bh,
3473
- no as bi,
3474
- Mn as bj,
3499
+ oo as bb,
3500
+ qr as bc,
3501
+ si as bd,
3502
+ ji as be,
3503
+ Ri as bf,
3504
+ Lr as bg,
3505
+ Ca as bh,
3506
+ io as bi,
3507
+ Bn as bj,
3475
3508
  Re as bk,
3476
- Pi as bl,
3509
+ xi as bl,
3477
3510
  kt as bm,
3478
- Hi as bn,
3479
- bs as bo,
3480
- Gi as bp,
3481
- Li as bq,
3482
- ji as br,
3483
- Bi as bs,
3484
- Mi as bt,
3511
+ Ui as bn,
3512
+ ks as bo,
3513
+ Wi as bp,
3514
+ Hi as bq,
3515
+ Bi as br,
3516
+ Yi as bs,
3517
+ Gi as bt,
3485
3518
  Kt as bu,
3486
- Zi as bv,
3487
- Ri as bw,
3488
- Fi as bx,
3489
- ys as by,
3519
+ so as bv,
3520
+ Ni as bw,
3521
+ qi as bx,
3522
+ vs as by,
3490
3523
  gt as bz,
3491
- jr as c,
3492
- xs as d,
3493
- Ds as e,
3524
+ Hr as c,
3525
+ Ls as d,
3526
+ js as e,
3494
3527
  W as f,
3495
3528
  Lt as g,
3496
3529
  Dt as h,
@@ -3499,18 +3532,18 @@ export {
3499
3532
  jt as k,
3500
3533
  Ot as l,
3501
3534
  vt as m,
3502
- Ni as n,
3503
- Ti as o,
3504
- co as p,
3535
+ Oi as n,
3536
+ Di as o,
3537
+ fo as p,
3505
3538
  $ as q,
3506
- Ui as r,
3507
- Ka as s,
3508
- Qi as t,
3509
- Ji as u,
3539
+ zi as r,
3540
+ Va as s,
3541
+ no as t,
3542
+ Zi as u,
3510
3543
  zt as v,
3511
- Vi as w,
3512
- ho as x,
3513
- qi as y,
3514
- gr as z
3544
+ eo as w,
3545
+ wo as x,
3546
+ Ki as y,
3547
+ br as z
3515
3548
  };
3516
- //# sourceMappingURL=needs.CUNwDixH.js.map
3549
+ //# sourceMappingURL=needs.BL7yYaO7.js.map