@imagile-dev/toil-ui 0.1.0-alpha.3 → 0.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/NOTICE +12 -5
  2. package/README.md +341 -41
  3. package/dist/app/assets/Graph-CS6dQALI.js +7 -0
  4. package/dist/app/assets/PowershellMan-Ic3-jSrq.css +1 -0
  5. package/dist/app/assets/PowershellMan-rG0kojOi.js +1 -0
  6. package/dist/app/assets/basket-Cj-ZPWsU.svg +73 -0
  7. package/dist/app/assets/bitter-latin-400-normal-B_gsCfHZ.woff +0 -0
  8. package/dist/app/assets/bitter-latin-400-normal-Cl9vToDR.woff2 +0 -0
  9. package/dist/app/assets/bitter-latin-600-normal-B6efaj8C.woff2 +0 -0
  10. package/dist/app/assets/bitter-latin-600-normal-Bm9hnW4x.woff +0 -0
  11. package/dist/app/assets/boot-sheet-C9B_iXU-.webp +0 -0
  12. package/dist/app/assets/chakra-petch-latin-600-normal-DQKfcdKo.woff +0 -0
  13. package/dist/app/assets/chakra-petch-latin-600-normal-DVQm9bgb.woff2 +0 -0
  14. package/dist/app/assets/chakra-petch-latin-700-normal-CnDBPjkL.woff2 +0 -0
  15. package/dist/app/assets/chakra-petch-latin-700-normal-D1s_c2du.woff +0 -0
  16. package/dist/app/assets/chakra-petch-latin-ext-600-normal-CdGvbdDU.woff2 +0 -0
  17. package/dist/app/assets/chakra-petch-latin-ext-600-normal-nL80L4xU.woff +0 -0
  18. package/dist/app/assets/chakra-petch-latin-ext-700-normal-BeviJPUl.woff +0 -0
  19. package/dist/app/assets/chakra-petch-latin-ext-700-normal-DAkvJhej.woff2 +0 -0
  20. package/dist/app/assets/chakra-petch-thai-600-normal-BiM5MXH8.woff +0 -0
  21. package/dist/app/assets/chakra-petch-thai-600-normal-C620THcd.woff2 +0 -0
  22. package/dist/app/assets/chakra-petch-thai-700-normal-B7WL5pBr.woff2 +0 -0
  23. package/dist/app/assets/chakra-petch-thai-700-normal-vZLZ_5L8.woff +0 -0
  24. package/dist/app/assets/chakra-petch-vietnamese-600-normal-Pvj4qcw_.woff +0 -0
  25. package/dist/app/assets/chakra-petch-vietnamese-600-normal-YQPWIhHU.woff2 +0 -0
  26. package/dist/app/assets/chakra-petch-vietnamese-700-normal-ZDCXY9IA.woff2 +0 -0
  27. package/dist/app/assets/chakra-petch-vietnamese-700-normal-gQuUA8Wu.woff +0 -0
  28. package/dist/app/assets/crate-loading-B9H4D652.webp +0 -0
  29. package/dist/app/assets/crate-lost-Dk5CaIuV.webp +0 -0
  30. package/dist/app/assets/dead-drop-BHoO7uon.webp +0 -0
  31. package/dist/app/assets/depot-BjEccEGj.webp +0 -0
  32. package/dist/app/assets/door-open-CL1v6qnp.svg +4 -0
  33. package/dist/app/assets/dungeon-map-Beqcufkh.webp +0 -0
  34. package/dist/app/assets/dungeon-map-T2FZ-7n0.webp +0 -0
  35. package/dist/app/assets/empty-room-BvPyqrlb.webp +0 -0
  36. package/dist/app/assets/{favicon-D8c5IAlv.svg → favicon-pNvr4nr7.svg} +5 -11
  37. package/dist/app/assets/fira-code-cyrillic-600-normal-BD56RyRT.woff +0 -0
  38. package/dist/app/assets/fira-code-cyrillic-600-normal-CPRdbepc.woff2 +0 -0
  39. package/dist/app/assets/fira-code-cyrillic-ext-600-normal-B9wE0zmr.woff2 +0 -0
  40. package/dist/app/assets/fira-code-cyrillic-ext-600-normal-DldcyWhZ.woff +0 -0
  41. package/dist/app/assets/fira-code-greek-600-normal-D_h3X2X5.woff +0 -0
  42. package/dist/app/assets/fira-code-greek-600-normal-Dxp52_By.woff2 +0 -0
  43. package/dist/app/assets/fira-code-greek-ext-600-normal-C-cQDoOk.woff +0 -0
  44. package/dist/app/assets/fira-code-greek-ext-600-normal-DtBpFRLc.woff2 +0 -0
  45. package/dist/app/assets/fira-code-latin-600-normal-BmSSHshu.woff +0 -0
  46. package/dist/app/assets/fira-code-latin-600-normal-CvYZpPHg.woff2 +0 -0
  47. package/dist/app/assets/fira-code-latin-ext-600-normal-0PFQL1eg.woff +0 -0
  48. package/dist/app/assets/fira-code-latin-ext-600-normal-Cb7jxoAi.woff2 +0 -0
  49. package/dist/app/assets/fira-code-symbols2-600-normal-Bu3RnO39.woff2 +0 -0
  50. package/dist/app/assets/fira-code-symbols2-600-normal-Dvq6IQE5.woff +0 -0
  51. package/dist/app/assets/gate-DgvMBPi9.svg +109 -0
  52. package/dist/app/assets/gauge-sheet-ZMjQ7TPd.svg +1 -0
  53. package/dist/app/assets/index-B1I248Ba.js +66 -0
  54. package/dist/app/assets/index-DNYTmC1J.css +1 -0
  55. package/dist/app/assets/jack-in-Cs60f1qu.webp +0 -0
  56. package/dist/app/assets/locked-door-CdXyTY3n.svg +4 -0
  57. package/dist/app/assets/locomotive-CPPtBzL2.webp +0 -0
  58. package/dist/app/assets/overworld-W3adxmKX.webp +0 -0
  59. package/dist/app/assets/press-start-2p-latin-400-normal-KLytu4cr.woff +0 -0
  60. package/dist/app/assets/press-start-2p-latin-400-normal-_wFEWmAB.woff2 +0 -0
  61. package/dist/app/assets/rye-latin-400-normal-CPBiwIfN.woff +0 -0
  62. package/dist/app/assets/rye-latin-400-normal-CnIDrDaJ.woff2 +0 -0
  63. package/dist/app/assets/sage-cave-Bu8KEIPH.webp +0 -0
  64. package/dist/app/assets/sensor-sheet-Dn-dKnev.svg +1 -0
  65. package/dist/app/assets/shard-sheet-NpLu-BuT.svg +101 -0
  66. package/dist/app/assets/skyline-CZ4WZ55S.webp +0 -0
  67. package/dist/app/assets/splash-Dgll39Db.webp +0 -0
  68. package/dist/app/assets/splash-hOSg5Qrh.webp +0 -0
  69. package/dist/app/assets/sprites-BUKsxG6N.webp +0 -0
  70. package/dist/app/assets/sprout-sheet-BLjjvTMl.svg +143 -0
  71. package/dist/app/assets/stone-wall-DRNYiEy2.svg +4 -0
  72. package/dist/app/assets/story-CS6l92Yr.webp +0 -0
  73. package/dist/app/assets/sun-Cyqqe255.svg +72 -0
  74. package/dist/app/assets/survey-map-BI4XT_wf.webp +0 -0
  75. package/dist/app/assets/{theme-crXsh6Dv.css → theme-63MlXwuO.css} +1 -1
  76. package/dist/app/assets/theme-BJDDePbd.css +1 -0
  77. package/dist/app/assets/theme-BVugNGOi.css +1 -0
  78. package/dist/app/assets/theme-C_ukluUB.css +1 -0
  79. package/dist/app/assets/{theme-ZdVuuddo.css → theme-D3_AOEgB.css} +1 -1
  80. package/dist/app/assets/theme-DMjUjC0D.css +1 -0
  81. package/dist/app/assets/title-1MphWZoQ.webp +0 -0
  82. package/dist/app/assets/tray-BHNdSAiO.webp +0 -0
  83. package/dist/app/assets/wanted-poster-BnjUajnc.webp +0 -0
  84. package/dist/app/assets/warp-BNB4TdQ4.webp +0 -0
  85. package/dist/app/assets/wood-CrrZEj6Y.webp +0 -0
  86. package/dist/app/index.html +3 -3
  87. package/dist/server/toil-ui.js +1823 -210
  88. package/package.json +11 -5
  89. package/dist/app/assets/Graph-By9iJybf.js +0 -7
  90. package/dist/app/assets/candle-ledger-LHVvMHKk.webp +0 -0
  91. package/dist/app/assets/crate-loading-Dw5rbPVs.webp +0 -0
  92. package/dist/app/assets/crate-lost-CaqeM6QF.webp +0 -0
  93. package/dist/app/assets/index-DqhhMfsN.js +0 -61
  94. package/dist/app/assets/index-PfJo8IRH.css +0 -1
  95. package/dist/app/assets/pallets-rO-RsztZ.webp +0 -0
  96. package/dist/app/assets/racking-BI-9puyv.webp +0 -0
  97. package/dist/app/assets/theme-CpEaUF3v.css +0 -1
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // toil-ui-build {"version":"0.1.0-alpha.3","commit":"18c02b1a5d7e734dbf01449c08613a46c857ca01"}
2
+ // toil-ui-build {"version":"0.1.0-beta.2","commit":"2397d06a20dd35eec6d4e2a8f4686e5747ff79f7"}
3
3
  import { contractVersion, execute, mapOwi, registry, version } from "@imagile-dev/toil/api";
4
4
  import { fileURLToPath, pathToFileURL } from "node:url";
5
5
  import { chmodSync, closeSync, cpSync, existsSync, linkSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
@@ -19,7 +19,8 @@ var CONFIG_READS = [
19
19
  "dossiers show",
20
20
  "dossiers check",
21
21
  "audit stats",
22
- "audit list"
22
+ "audit list",
23
+ "theme list"
23
24
  ];
24
25
  /** The changes, each only to toil's own config or dossiers. */
25
26
  var CONFIG_CHANGES = [
@@ -35,7 +36,8 @@ var CONFIG_CHANGES = [
35
36
  "dossiers person",
36
37
  "dossiers wip-limit",
37
38
  "dossiers onboard",
38
- "dossiers describe"
39
+ "dossiers describe",
40
+ "theme set"
39
41
  ];
40
42
  /** Everything `/api/config` runs, and nothing else. */
41
43
  var CONFIG_COMMANDS = /* @__PURE__ */ new Set([...CONFIG_READS, ...CONFIG_CHANGES]);
@@ -475,6 +477,7 @@ var fileOf = (name) => `${USER_DIR}/${name}.json`;
475
477
  /** Each area's context inputs, as `dossiers show` resolves them: the ones the registry declares, nothing else. */
476
478
  var CONTEXT = {
477
479
  jira: ["project"],
480
+ "jira-cloud": ["project"],
478
481
  bitbucket: ["project", "repo"],
479
482
  "bitbucket-cloud": ["workspace", "repo"],
480
483
  jenkins: ["instance"],
@@ -1045,6 +1048,15 @@ var tally$1 = (items) => ({
1045
1048
  count: items.length,
1046
1049
  points: items.reduce((n, i) => n + points(i), 0)
1047
1050
  });
1051
+ /** Working days (Monday to Friday, UTC) of a sprint gone at `now`, and in total: what "day 7 of 10" reads. */
1052
+ function sprintDays(start, end, now) {
1053
+ const from = Date.parse(start);
1054
+ const to = Date.parse(end);
1055
+ return {
1056
+ gone: weekdays(from, Math.min(Date.parse(now), to)),
1057
+ total: weekdays(from, to)
1058
+ };
1059
+ }
1048
1060
  function weekdays(from, to) {
1049
1061
  let n = 0;
1050
1062
  for (let t = Math.floor(from / DAY$3) * DAY$3; t < to; t += DAY$3) {
@@ -1096,16 +1108,11 @@ function health(all, changes, now) {
1096
1108
  reasons
1097
1109
  });
1098
1110
  }
1099
- const start = Date.parse(sprint.start);
1100
- const end = Date.parse(sprint.end);
1101
1111
  return {
1102
1112
  sprint,
1103
1113
  items,
1104
1114
  entries,
1105
- days: {
1106
- gone: weekdays(start, Math.min(Date.parse(now), end)),
1107
- total: weekdays(start, end)
1108
- },
1115
+ days: sprintDays(sprint.start, sprint.end, now),
1109
1116
  planned: tally$1(kind("planned")),
1110
1117
  added: tally$1(kind("added")),
1111
1118
  carried: tally$1(kind("carried")),
@@ -1632,7 +1639,7 @@ function acceptance(item, area, body) {
1632
1639
  if (inBody) return row("acceptance", "pass", inBody === "heading" ? "A heading in the description lists them." : "The description has a checklist.", "description");
1633
1640
  return row("acceptance", "thin", `None found. ${field ? `${field} is empty, and the description has` : "The description has"} no acceptance criteria heading or checklist.`, field ? `field ${field}, description` : "description");
1634
1641
  }
1635
- function description$5(item, area, body) {
1642
+ function description$8(item, area, body) {
1636
1643
  const min = area?.minWords ?? 25;
1637
1644
  const all = wordCount(body);
1638
1645
  const real = wordCount(realText(body, area?.templateLines ?? []));
@@ -1690,7 +1697,7 @@ function readiness({ item, settings, byId, live }) {
1690
1697
  const body = item.body ? textOf$1(item.body.content, item.body.format) : "";
1691
1698
  const rows = [
1692
1699
  acceptance(item, area, body),
1693
- description$5(item, area, body),
1700
+ description$8(item, area, body),
1694
1701
  doneState(item, byId, live),
1695
1702
  blockers$1(item, byId),
1696
1703
  scope(item, settings)
@@ -2296,7 +2303,7 @@ function gap(change, field, reason) {
2296
2303
  });
2297
2304
  }
2298
2305
  /** An instant field, or a gap saying it couldn't be read. */
2299
- function at$2(change, field, value, from) {
2306
+ function at$3(change, field, value, from) {
2300
2307
  const t = typeof value === "number" && Number.isFinite(value) ? new Date(value).toISOString() : instant(value);
2301
2308
  if (t === void 0) {
2302
2309
  gap(change, field, `${from} holds ${JSON.stringify(value)}, which isn't a date-time`);
@@ -2568,8 +2575,8 @@ function adoChange(doc, pr, state) {
2568
2575
  };
2569
2576
  change.author = adoPerson(pr.createdBy);
2570
2577
  change.state = pr.status === "completed" ? "MERGED" : pr.status === "abandoned" ? "DECLINED" : pr.isDraft === true ? "DRAFT" : "OPEN";
2571
- change.created = at$2(change, "created", pr.creationDate, "creationDate");
2572
- const closed = change.state === "MERGED" || change.state === "DECLINED" ? at$2(change, "closedAt", pr.closedDate, "closedDate") : null;
2578
+ change.created = at$3(change, "created", pr.creationDate, "creationDate");
2579
+ const closed = change.state === "MERGED" || change.state === "DECLINED" ? at$3(change, "closedAt", pr.closedDate, "closedDate") : null;
2573
2580
  change.closedAt = closed;
2574
2581
  change.mergedAt = change.state === "MERGED" ? closed : null;
2575
2582
  gap(change, "updated", "Azure DevOps records no last-updated time on a pull request");
@@ -2600,7 +2607,7 @@ function adoChange(doc, pr, state) {
2600
2607
  if (prop(thread, "CodeReviewThreadType") === "VoteUpdate") {
2601
2608
  const result = Number(prop(thread, "CodeReviewVoteResult"));
2602
2609
  const by = adoPerson(comments[0]?.author);
2603
- const when = at$2(change, "reviews", thread.publishedDate ?? comments[0]?.publishedDate, "a vote thread's publishedDate");
2610
+ const when = at$3(change, "reviews", thread.publishedDate ?? comments[0]?.publishedDate, "a vote thread's publishedDate");
2604
2611
  if (by && when && Number.isFinite(result)) reviews.push({
2605
2612
  by,
2606
2613
  state: result >= 5 ? "APPROVED" : result <= -5 ? "CHANGES_REQUESTED" : "DISMISSED",
@@ -2611,7 +2618,7 @@ function adoChange(doc, pr, state) {
2611
2618
  const first = comments[0];
2612
2619
  if (!first || first.commentType === "system") continue;
2613
2620
  const by = adoPerson(first.author);
2614
- const when = at$2(change, "reviews", first.publishedDate, "a comment's publishedDate");
2621
+ const when = at$3(change, "reviews", first.publishedDate, "a comment's publishedDate");
2615
2622
  if (by && when && by.id.toLowerCase() !== author) reviews.push({
2616
2623
  by,
2617
2624
  state: "COMMENTED",
@@ -2635,7 +2642,7 @@ function adoChange(doc, pr, state) {
2635
2642
  rollUp(change, [...latest.entries()].map(([context, s]) => ({
2636
2643
  name: context,
2637
2644
  outcome: STATUS$1[String(s.state)] ?? "pending",
2638
- at: at$2(change, "checksAt", s.updatedDate ?? s.creationDate, "a status's creationDate")
2645
+ at: at$3(change, "checksAt", s.updatedDate ?? s.creationDate, "a status's creationDate")
2639
2646
  })));
2640
2647
  } else gap(change, "checks", notIncluded(doc, "checks"));
2641
2648
  if (lists.files) {
@@ -2706,9 +2713,9 @@ function bitbucketChange(doc, pr, state) {
2706
2713
  const author = isRecord(pr.author) ? pr.author.user : void 0;
2707
2714
  change.author = dcPerson(author);
2708
2715
  change.state = pr.state === "MERGED" ? "MERGED" : pr.state === "DECLINED" ? "DECLINED" : pr.draft === true ? "DRAFT" : "OPEN";
2709
- change.created = at$2(change, "created", pr.createdDate, "createdDate");
2710
- change.updated = at$2(change, "updated", pr.updatedDate, "updatedDate");
2711
- const closed = at$2(change, "closedAt", pr.closedDate, "closedDate");
2716
+ change.created = at$3(change, "created", pr.createdDate, "createdDate");
2717
+ change.updated = at$3(change, "updated", pr.updatedDate, "updatedDate");
2718
+ const closed = at$3(change, "closedAt", pr.closedDate, "closedDate");
2712
2719
  change.closedAt = change.state === "MERGED" || change.state === "DECLINED" ? closed : null;
2713
2720
  change.mergedAt = change.state === "MERGED" ? closed : null;
2714
2721
  const props = isRecord(pr.properties) ? pr.properties : {};
@@ -2729,7 +2736,7 @@ function bitbucketChange(doc, pr, state) {
2729
2736
  if (lists.reviews) reviewTimes(change, lists.reviews.filter(isRecord).flatMap((a) => {
2730
2737
  const by = dcPerson(a.user);
2731
2738
  const kind = DC_REVIEW[String(a.action)];
2732
- const when = at$2(change, "reviews", a.createdDate, "an activity's createdDate");
2739
+ const when = at$3(change, "reviews", a.createdDate, "an activity's createdDate");
2733
2740
  return by && kind && when ? [{
2734
2741
  by,
2735
2742
  state: kind,
@@ -2744,7 +2751,7 @@ function bitbucketChange(doc, pr, state) {
2744
2751
  if (lists.checks) rollUp(change, lists.checks.filter(isRecord).map((b) => ({
2745
2752
  name: str$1(b.name) ?? str$1(b.key) ?? "build",
2746
2753
  outcome: DC_CHECK[String(b.state)] ?? "pending",
2747
- at: at$2(change, "checksAt", b.dateAdded, "a build status's dateAdded")
2754
+ at: at$3(change, "checksAt", b.dateAdded, "a build status's dateAdded")
2748
2755
  })));
2749
2756
  else gap(change, "checks", notIncluded(doc, "checks"));
2750
2757
  if (lists.files) {
@@ -2785,8 +2792,8 @@ function bitbucketCloudChange(doc, pr, state) {
2785
2792
  };
2786
2793
  change.author = cloudPerson(pr.author);
2787
2794
  change.state = pr.state === "MERGED" ? "MERGED" : pr.state === "DECLINED" || pr.state === "SUPERSEDED" ? "DECLINED" : pr.draft === true ? "DRAFT" : "OPEN";
2788
- change.created = at$2(change, "created", pr.created_on, "created_on");
2789
- change.updated = at$2(change, "updated", pr.updated_on, "updated_on");
2795
+ change.created = at$3(change, "created", pr.created_on, "created_on");
2796
+ change.updated = at$3(change, "updated", pr.updated_on, "updated_on");
2790
2797
  if (change.state === "MERGED" || change.state === "DECLINED") {
2791
2798
  gap(change, "mergedAt", "Bitbucket Cloud's pull request records no merge or close time; updated is the nearest it has");
2792
2799
  gap(change, "closedAt", "Bitbucket Cloud's pull request records no merge or close time; updated is the nearest it has");
@@ -2824,7 +2831,7 @@ function bitbucketCloudChange(doc, pr, state) {
2824
2831
  } : null;
2825
2832
  if (!event) return [];
2826
2833
  const by = cloudPerson(event.e.user);
2827
- const when = at$2(change, "reviews", event.e.date, "an activity entry's date");
2834
+ const when = at$3(change, "reviews", event.e.date, "an activity entry's date");
2828
2835
  return by && when ? [{
2829
2836
  by,
2830
2837
  state: event.kind,
@@ -2839,7 +2846,7 @@ function bitbucketCloudChange(doc, pr, state) {
2839
2846
  if (lists.checks) rollUp(change, lists.checks.filter(isRecord).map((s) => ({
2840
2847
  name: str$1(s.name) ?? str$1(s.key) ?? "build",
2841
2848
  outcome: CLOUD_CHECK[String(s.state)] ?? "pending",
2842
- at: at$2(change, "checksAt", s.updated_on ?? s.created_on, "a status's updated_on")
2849
+ at: at$3(change, "checksAt", s.updated_on ?? s.created_on, "a status's updated_on")
2843
2850
  })));
2844
2851
  else gap(change, "checks", notIncluded(doc, "checks"));
2845
2852
  if (lists.files) {
@@ -3352,10 +3359,10 @@ function githubChange(doc, pr, state) {
3352
3359
  };
3353
3360
  change.author = ghPerson(pr.user);
3354
3361
  change.state = str$1(pr.merged_at) ? "MERGED" : pr.state === "closed" ? "DECLINED" : pr.draft === true ? "DRAFT" : "OPEN";
3355
- change.created = at$2(change, "created", pr.created_at, "created_at");
3356
- change.updated = at$2(change, "updated", pr.updated_at, "updated_at");
3357
- change.mergedAt = at$2(change, "mergedAt", pr.merged_at, "merged_at");
3358
- change.closedAt = at$2(change, "closedAt", pr.closed_at, "closed_at");
3362
+ change.created = at$3(change, "created", pr.created_at, "created_at");
3363
+ change.updated = at$3(change, "updated", pr.updated_at, "updated_at");
3364
+ change.mergedAt = at$3(change, "mergedAt", pr.merged_at, "merged_at");
3365
+ change.closedAt = at$3(change, "closedAt", pr.closed_at, "closed_at");
3359
3366
  change.mergeCommit = change.state === "MERGED" ? str$1(pr.merge_commit_sha) : null;
3360
3367
  const own = (text) => [...[...text.matchAll(HASH_NUMBER)].map((m) => idFor(doc.connection, `${repo}#${m[1]}`)), ...[...text.matchAll(/(?<![\w.-])([\w.-]+\/[\w.-]+)#(\d+)\b/g)].map((m) => idFor(doc.connection, `${m[1]}#${m[2]}`))];
3361
3368
  const fromBranch = branchNumber(change.branch.source);
@@ -3379,7 +3386,7 @@ function githubChange(doc, pr, state) {
3379
3386
  if (!isRecord(r)) continue;
3380
3387
  const by = ghPerson(r.user);
3381
3388
  const kind = REVIEW_STATES[String(r.state)];
3382
- const when = at$2(change, "reviews", r.submitted_at, "a review's submitted_at");
3389
+ const when = at$3(change, "reviews", r.submitted_at, "a review's submitted_at");
3383
3390
  if (!by || !kind || !when) continue;
3384
3391
  reviews.push({
3385
3392
  by,
@@ -3413,7 +3420,7 @@ function githubChange(doc, pr, state) {
3413
3420
  if (lists.checks) rollUp(change, lists.checks.filter(isRecord).map((run) => ({
3414
3421
  name: str$1(run.name) ?? "check",
3415
3422
  outcome: run.status !== "completed" ? "pending" : FAILING.has(String(run.conclusion)) ? "fail" : "pass",
3416
- at: at$2(change, "checksAt", run.completed_at ?? run.started_at, "a check run's completed_at")
3423
+ at: at$3(change, "checksAt", run.completed_at ?? run.started_at, "a check run's completed_at")
3417
3424
  })));
3418
3425
  else gap(change, "checks", notIncluded(doc, "checks"));
3419
3426
  if (typeof pr.mergeable === "boolean") change.mergeable = pr.mergeable;
@@ -4135,7 +4142,7 @@ function words$2(text) {
4135
4142
  /** Whether a word can be a term: two characters or more, not a common word, and not a one- or two-digit number (the 02 of 02:00). */
4136
4143
  var termWord = (word) => word.length >= 2 && !STOPWORDS.has(word) && !/^\d{1,2}$/.test(word);
4137
4144
  /** The terms in some text, stemmed, in order. Each keeps the word it came from. */
4138
- function terms$3(text) {
4145
+ function terms$6(text) {
4139
4146
  const out = [];
4140
4147
  for (const word of words$2(text)) if (termWord(word)) out.push({
4141
4148
  term: stem(word),
@@ -4299,7 +4306,7 @@ var SimilarityIndex = class {
4299
4306
  terms: /* @__PURE__ */ new Map(),
4300
4307
  trigrams: this.on.title ? trigrams(text) : /* @__PURE__ */ new Set()
4301
4308
  };
4302
- for (const { term, word } of terms$3(text)) if (!q.terms.has(term)) q.terms.set(term, word);
4309
+ for (const { term, word } of terms$6(text)) if (!q.terms.has(term)) q.terms.set(term, word);
4303
4310
  return this.rank(this.docs, (doc, explain) => this.scoreQuery(q, doc, explain), options);
4304
4311
  }
4305
4312
  /** Every other item ranked against the one with this id: highest score first, ties by id. Undefined when the id isn't in the index. */
@@ -4501,14 +4508,14 @@ var SimilarityIndex = class {
4501
4508
  if (was === void 0 || word.length < was.length || word.length === was.length && word < was) surface.set(term, word);
4502
4509
  };
4503
4510
  let titleLength = 0;
4504
- if (this.on.title) for (const { term, word } of terms$3(item.title)) {
4511
+ if (this.on.title) for (const { term, word } of terms$6(item.title)) {
4505
4512
  title.set(term, (title.get(term) ?? 0) + 1);
4506
4513
  note(term, word);
4507
4514
  titleLength++;
4508
4515
  }
4509
4516
  let bodyLength = 0;
4510
4517
  let bodyCut = false;
4511
- if (this.on.body) for (const { term, word } of terms$3(bodyText$2(item.body))) {
4518
+ if (this.on.body) for (const { term, word } of terms$6(bodyText$2(item.body))) {
4512
4519
  if (bodyLength === 5e3) {
4513
4520
  bodyCut = true;
4514
4521
  break;
@@ -4812,6 +4819,8 @@ var CALL_OPTIONS = {
4812
4819
  var JQL = (project) => `project = ${project} ORDER BY Rank ASC`;
4813
4820
  /** The areas that read Azure DevOps work items: Server and Services. */
4814
4821
  var ADO_AREAS = ["ado", "ado-cloud"];
4822
+ /** The areas that read Jira work items: Data Center and Cloud, which send the same issue shapes under the same command names. */
4823
+ var JIRA_AREAS = ["jira", "jira-cloud"];
4815
4824
  var WIQL = "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @project ORDER BY [System.Id]";
4816
4825
  var isRec$1 = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
4817
4826
  var recs$1 = (v) => Array.isArray(v) ? v.filter(isRec$1) : [];
@@ -4973,25 +4982,26 @@ async function loadDossier(execute, name, options = {}) {
4973
4982
  const base = { dossier: name };
4974
4983
  const work = {
4975
4984
  jira: [],
4985
+ "jira-cloud": [],
4976
4986
  ado: [],
4977
4987
  "ado-cloud": [],
4978
4988
  github: []
4979
4989
  };
4980
4990
  const tasks = [];
4981
- if (areas.jira?.inputs.project) tasks.push((async () => {
4982
- const search = await run("work", "jira issue search", {
4991
+ for (const jira of JIRA_AREAS.filter((a) => areas[a]?.inputs.project)) tasks.push((async () => {
4992
+ const search = await run("work", `${jira} issue search`, {
4983
4993
  ...base,
4984
- jql: JQL(areas.jira.inputs.project)
4994
+ jql: JQL(areas[jira].inputs.project)
4985
4995
  });
4986
4996
  if (!search) return;
4987
- work.jira.push(search);
4997
+ work[jira].push(search);
4988
4998
  const keys = recs$1(search.data.issues).map((i) => String(i.key));
4989
4999
  for (const key of keys) {
4990
- const history = await run("work", "jira issue history", {
5000
+ const history = await run("work", `${jira} issue history`, {
4991
5001
  ...base,
4992
5002
  key
4993
5003
  });
4994
- if (history) work.jira.push({
5004
+ if (history) work[jira].push({
4995
5005
  key,
4996
5006
  history
4997
5007
  });
@@ -7404,7 +7414,7 @@ var sprintEnvelopes = [
7404
7414
  var envs = sprintEnvelopes;
7405
7415
  var isWrapped = (e) => "history" in e;
7406
7416
  var dataOf = (command) => envs.find((e) => !isWrapped(e) && e.meta?.command === command).data;
7407
- var historyOf$1 = (command) => envs.filter(isWrapped).filter((e) => e.history.meta?.command === command);
7417
+ var historyOf$2 = (command) => envs.filter(isWrapped).filter((e) => e.history.meta?.command === command);
7408
7418
  var jiraIssues = dataOf("jira issue get").issues;
7409
7419
  /**
7410
7420
  * The acceptance criteria card-payments keeps in a custom field (its dossier
@@ -7457,7 +7467,7 @@ var jiraStatus = (id, at, from, to) => ({
7457
7467
  */
7458
7468
  var moreChangelogs = { "PAY-106": [jiraStatus(40501, "2026-10-06T09:30:00.000+0000", ["10000", "To Do"], ["3", "In Progress"]), jiraStatus(40502, "2026-10-07T12:00:00.000+0000", ["3", "In Progress"], ["10001", "Done"])] };
7459
7469
  /** Each issue's `jira issue history` data; an issue nothing changed on since it was created has an empty one. */
7460
- var JIRA_CHANGELOGS = Object.fromEntries(JIRA_KEYS.map((key) => [key, historyOf$1("jira issue history").find((h) => h.key === key)?.history.data ?? moreChangelogs[key] ?? []]));
7470
+ var JIRA_CHANGELOGS = Object.fromEntries(JIRA_KEYS.map((key) => [key, historyOf$2("jira issue history").find((h) => h.key === key)?.history.data ?? moreChangelogs[key] ?? []]));
7461
7471
  var ADO_ITERATIONS = dataOf("ado work-item iterations");
7462
7472
  var ADO_BATCH = dataOf("ado work-item get-many");
7463
7473
  var ADO_IDS = ADO_BATCH.value.map((w) => w.id);
@@ -7520,7 +7530,7 @@ var GITHUB_PROJECT_ITEMS = dataOf("github project items");
7520
7530
  var GITHUB_NUMBERS = GITHUB_PROJECT_ITEMS.map((i) => i.content.number);
7521
7531
  var GITHUB_ISSUES = dataOf("github issue get");
7522
7532
  /** Each issue's `github issue history` timeline; an issue with no events has an empty one. */
7523
- var GITHUB_EVENTS = Object.fromEntries(GITHUB_NUMBERS.map((n) => [n, historyOf$1("github issue history").find((h) => h.key === String(n))?.history.data ?? []]));
7533
+ var GITHUB_EVENTS = Object.fromEntries(GITHUB_NUMBERS.map((n) => [n, historyOf$2("github issue history").find((h) => h.key === String(n))?.history.data ?? []]));
7524
7534
  var jiraStatus2 = (name, id, key, category) => ({
7525
7535
  self: `https://jira.imagile.dev/rest/api/2/status/${id}`,
7526
7536
  name,
@@ -7630,7 +7640,7 @@ var VERSION$2 = "0.1.0-alpha.1";
7630
7640
  var card = "card-payments";
7631
7641
  var settle = "settlement";
7632
7642
  var checkout = "checkout-web";
7633
- var at$1 = (dossier, area, env) => ({
7643
+ var at$2 = (dossier, area, env) => ({
7634
7644
  dossier,
7635
7645
  area,
7636
7646
  ...env ? { env } : {}
@@ -7644,7 +7654,7 @@ var gets = (dossier, area, field, byNumber) => Object.entries(byNumber).map(([n,
7644
7654
  include: PR_INCLUDE
7645
7655
  },
7646
7656
  data,
7647
- ...at$1(dossier, area)
7657
+ ...at$2(dossier, area)
7648
7658
  }));
7649
7659
  var CANNED = [
7650
7660
  {
@@ -7664,7 +7674,7 @@ var CANNED = [
7664
7674
  jql: JQL("PAY")
7665
7675
  },
7666
7676
  data: JIRA_SEARCH,
7667
- ...at$1(card, "jira")
7677
+ ...at$2(card, "jira")
7668
7678
  },
7669
7679
  ...JIRA_KEYS.map((key) => ({
7670
7680
  command: "jira issue history",
@@ -7673,7 +7683,7 @@ var CANNED = [
7673
7683
  key
7674
7684
  },
7675
7685
  data: JIRA_CHANGELOGS[key],
7676
- ...at$1(card, "jira")
7686
+ ...at$2(card, "jira")
7677
7687
  })),
7678
7688
  ...Object.entries(JIRA_TRANSITIONS).map(([key, data]) => ({
7679
7689
  command: "jira issue transitions",
@@ -7682,7 +7692,7 @@ var CANNED = [
7682
7692
  key
7683
7693
  },
7684
7694
  data,
7685
- ...at$1(card, "jira")
7695
+ ...at$2(card, "jira")
7686
7696
  })),
7687
7697
  {
7688
7698
  command: "bitbucket pr list",
@@ -7691,7 +7701,7 @@ var CANNED = [
7691
7701
  state: "ALL"
7692
7702
  },
7693
7703
  data: BITBUCKET_PRS,
7694
- ...at$1(card, "bitbucket")
7704
+ ...at$2(card, "bitbucket")
7695
7705
  },
7696
7706
  ...gets(card, "bitbucket", "id", BITBUCKET_PR_GETS),
7697
7707
  ...Object.entries(JENKINS_RUNS).map(([pr, runs]) => ({
@@ -7702,7 +7712,7 @@ var CANNED = [
7702
7712
  limit: 5
7703
7713
  },
7704
7714
  data: runs,
7705
- ...at$1(card, "jenkins")
7715
+ ...at$2(card, "jenkins")
7706
7716
  })),
7707
7717
  {
7708
7718
  command: "openshift deployment list",
@@ -7712,7 +7722,7 @@ var CANNED = [
7712
7722
  namespace: "payments-dev"
7713
7723
  },
7714
7724
  data: OPENSHIFT["payments-dev"],
7715
- ...at$1(card, "openshift", "dev")
7725
+ ...at$2(card, "openshift", "dev")
7716
7726
  },
7717
7727
  {
7718
7728
  command: "openshift deployment list",
@@ -7722,13 +7732,13 @@ var CANNED = [
7722
7732
  namespace: "payments-prod"
7723
7733
  },
7724
7734
  data: OPENSHIFT["payments-prod"],
7725
- ...at$1(card, "openshift", "prod")
7735
+ ...at$2(card, "openshift", "prod")
7726
7736
  },
7727
7737
  {
7728
7738
  command: "ado work-item iterations",
7729
7739
  input: { dossier: settle },
7730
7740
  data: ADO_ITERATIONS,
7731
- ...at$1(settle, "ado")
7741
+ ...at$2(settle, "ado")
7732
7742
  },
7733
7743
  {
7734
7744
  command: "ado work-item search",
@@ -7737,7 +7747,7 @@ var CANNED = [
7737
7747
  wiql: WIQL
7738
7748
  },
7739
7749
  data: ADO_WIQL,
7740
- ...at$1(settle, "ado")
7750
+ ...at$2(settle, "ado")
7741
7751
  },
7742
7752
  {
7743
7753
  command: "ado work-item get-many",
@@ -7746,7 +7756,7 @@ var CANNED = [
7746
7756
  id: ADO_IDS
7747
7757
  },
7748
7758
  data: ADO_BATCH,
7749
- ...at$1(settle, "ado")
7759
+ ...at$2(settle, "ado")
7750
7760
  },
7751
7761
  ...ADO_IDS.map((id) => ({
7752
7762
  command: "ado work-item history",
@@ -7755,7 +7765,7 @@ var CANNED = [
7755
7765
  id
7756
7766
  },
7757
7767
  data: ADO_REVISIONS[id],
7758
- ...at$1(settle, "ado")
7768
+ ...at$2(settle, "ado")
7759
7769
  })),
7760
7770
  ...Object.entries(ADO_STATES).map(([type, data]) => ({
7761
7771
  command: "ado work-item states",
@@ -7764,7 +7774,7 @@ var CANNED = [
7764
7774
  type
7765
7775
  },
7766
7776
  data,
7767
- ...at$1(settle, "ado")
7777
+ ...at$2(settle, "ado")
7768
7778
  })),
7769
7779
  {
7770
7780
  command: "ado pr list",
@@ -7773,7 +7783,7 @@ var CANNED = [
7773
7783
  state: "all"
7774
7784
  },
7775
7785
  data: ADO_PRS,
7776
- ...at$1(settle, "ado")
7786
+ ...at$2(settle, "ado")
7777
7787
  },
7778
7788
  ...gets(settle, "ado", "id", ADO_PR_GETS),
7779
7789
  {
@@ -7784,7 +7794,7 @@ var CANNED = [
7784
7794
  top: 20
7785
7795
  },
7786
7796
  data: ADO_CI_RUNS,
7787
- ...at$1(settle, "ado")
7797
+ ...at$2(settle, "ado")
7788
7798
  },
7789
7799
  {
7790
7800
  command: "ado run list",
@@ -7794,7 +7804,7 @@ var CANNED = [
7794
7804
  top: 20
7795
7805
  },
7796
7806
  data: ADO_DEPLOY_RUNS,
7797
- ...at$1(settle, "ado")
7807
+ ...at$2(settle, "ado")
7798
7808
  },
7799
7809
  {
7800
7810
  command: "github project items",
@@ -7803,7 +7813,7 @@ var CANNED = [
7803
7813
  project: 7
7804
7814
  },
7805
7815
  data: GITHUB_PROJECT_ITEMS,
7806
- ...at$1(checkout, "github")
7816
+ ...at$2(checkout, "github")
7807
7817
  },
7808
7818
  {
7809
7819
  command: "github issue get",
@@ -7813,7 +7823,7 @@ var CANNED = [
7813
7823
  subIssues: true
7814
7824
  },
7815
7825
  data: GITHUB_ISSUES,
7816
- ...at$1(checkout, "github")
7826
+ ...at$2(checkout, "github")
7817
7827
  },
7818
7828
  ...GITHUB_NUMBERS.map((number) => ({
7819
7829
  command: "github issue history",
@@ -7822,7 +7832,7 @@ var CANNED = [
7822
7832
  number
7823
7833
  },
7824
7834
  data: GITHUB_EVENTS[number],
7825
- ...at$1(checkout, "github")
7835
+ ...at$2(checkout, "github")
7826
7836
  })),
7827
7837
  {
7828
7838
  command: "github pr list",
@@ -7831,7 +7841,7 @@ var CANNED = [
7831
7841
  state: "all"
7832
7842
  },
7833
7843
  data: GITHUB_PRS,
7834
- ...at$1(checkout, "github")
7844
+ ...at$2(checkout, "github")
7835
7845
  },
7836
7846
  ...gets(checkout, "github", "number", GITHUB_PR_GETS),
7837
7847
  {
@@ -7841,7 +7851,7 @@ var CANNED = [
7841
7851
  path: CODEOWNERS_PATHS[0]
7842
7852
  },
7843
7853
  data: GITHUB_CODEOWNERS,
7844
- ...at$1(checkout, "github")
7854
+ ...at$2(checkout, "github")
7845
7855
  },
7846
7856
  {
7847
7857
  command: "bitbucket-cloud pr list",
@@ -7850,7 +7860,7 @@ var CANNED = [
7850
7860
  state: "ALL"
7851
7861
  },
7852
7862
  data: BITBUCKET_CLOUD_PRS,
7853
- ...at$1(checkout, "bitbucket-cloud")
7863
+ ...at$2(checkout, "bitbucket-cloud")
7854
7864
  },
7855
7865
  ...gets(checkout, "bitbucket-cloud", "id", BITBUCKET_CLOUD_PR_GETS),
7856
7866
  {
@@ -7861,7 +7871,7 @@ var CANNED = [
7861
7871
  namespace: "checkout-staging"
7862
7872
  },
7863
7873
  data: OPENSHIFT["checkout-staging"],
7864
- ...at$1(checkout, "openshift", "staging")
7874
+ ...at$2(checkout, "openshift", "staging")
7865
7875
  },
7866
7876
  {
7867
7877
  command: "openshift deployment list",
@@ -7871,7 +7881,7 @@ var CANNED = [
7871
7881
  namespace: "checkout-prod"
7872
7882
  },
7873
7883
  data: OPENSHIFT["checkout-prod"],
7874
- ...at$1(checkout, "openshift", "prod")
7884
+ ...at$2(checkout, "openshift", "prod")
7875
7885
  }
7876
7886
  ];
7877
7887
  /** One string per command and input, whatever order the input's keys came in. */
@@ -7978,7 +7988,7 @@ var FIXES = {
7978
7988
  CANCELLED: "The call was cancelled by the person or the client; nothing to fix unless that was unintended.",
7979
7989
  DATABASE: "The database refused the statement. Run it again to read the database's own message.",
7980
7990
  CREDENTIAL_STORE: "Check the OS credential store is available, or set the secret's env var instead.",
7981
- UNSUPPORTED_NODE: "Install Node 24.14 or later.",
7991
+ UNSUPPORTED_NODE: "Install Node 24.22.1 or later on 24.x, or 26.12.1 or later (CVE-2026-111497).",
7982
7992
  GIT_NOT_FOUND: "Install git 2.24 or later and put it on PATH.",
7983
7993
  UNSUPPORTED: "The server's release doesn't have the API the command needs; check the area's supported versions.",
7984
7994
  INTERNAL: "This is a bug in toil. Report it with toil feedback bug, naming the command."
@@ -8515,6 +8525,27 @@ var ONBOARD_PLAN = {
8515
8525
  }]
8516
8526
  }
8517
8527
  };
8528
+ /** `toil theme list` with no theme set (#427). */
8529
+ var THEME_LIST = {
8530
+ current: "crate",
8531
+ source: "default",
8532
+ default: "crate",
8533
+ themes: [
8534
+ ["plain", "Plain"],
8535
+ ["crate", "Crate"],
8536
+ ["harvest", "Harvest"],
8537
+ ["starship", "Starship"],
8538
+ ["realm", "Realm"],
8539
+ ["sprawl", "Sprawl"],
8540
+ ["frontier", "Frontier"],
8541
+ ["overworld", "Overworld"]
8542
+ ].map(([name, label]) => ({
8543
+ name,
8544
+ label,
8545
+ current: name === "crate",
8546
+ default: name === "crate"
8547
+ }))
8548
+ };
8518
8549
  var CONFIG_CANNED = [
8519
8550
  {
8520
8551
  command: "connections list",
@@ -8559,6 +8590,11 @@ var CONFIG_CANNED = [
8559
8590
  command: "dossiers onboard",
8560
8591
  input: { plan: true },
8561
8592
  data: ONBOARD_PLAN
8593
+ },
8594
+ {
8595
+ command: "theme list",
8596
+ input: {},
8597
+ data: THEME_LIST
8562
8598
  }
8563
8599
  ];
8564
8600
  /** A plan with no pin asks nothing and changes nothing, so the preview answers it as it answers a read. */
@@ -8772,7 +8808,7 @@ function sampleAnswerUsage(chatId, turn, dossier, at = FIXTURE_NOW) {
8772
8808
  }
8773
8809
  //#endregion
8774
8810
  //#region src/fixtures/agent.ts
8775
- var J$1 = (n) => `[[corp-jira:PAY-${n}]]`;
8811
+ var J$2 = (n) => `[[corp-jira:PAY-${n}]]`;
8776
8812
  var A = (n) => `[[corp-ado:${n}]]`;
8777
8813
  var G = (n) => `[[github:imagile/payments-web#${n}]]`;
8778
8814
  /** A pull request, by its OWI change id. */
@@ -8792,13 +8828,13 @@ var SCRIPTS = {
8792
8828
  label: "What's at risk in this dossier?",
8793
8829
  parts: [
8794
8830
  `It is day 7 of 10 of Sprint 42: 3 of 21 points are done and 18 remain.`,
8795
- `${J$1(101)}'s pull request #311 fails its Jenkins build, and ${J$1(102)} and ${J$1(103)} are blocked behind it, holding 11 points back.`,
8796
- `${J$1(104)} came over from Sprint 41 and its pull request #305 is still open. ${J$1(107)} was added after the sprint started, with no estimate.`
8831
+ `${J$2(101)}'s pull request #311 fails its Jenkins build, and ${J$2(102)} and ${J$2(103)} are blocked behind it, holding 11 points back.`,
8832
+ `${J$2(104)} came over from Sprint 41 and its pull request #305 is still open. ${J$2(107)} was added after the sprint started, with no estimate.`
8797
8833
  ],
8798
8834
  proposals: [agentProposal({
8799
8835
  item: "corp-jira:PAY-107",
8800
8836
  title: "Estimate PAY-107 at 3 points",
8801
- reason: `${J$1(107)} was added mid-sprint with no estimate, so the sprint's points leave it out. It is a retry of one call, about the size of ${J$1(105)}.`,
8837
+ reason: `${J$2(107)} was added mid-sprint with no estimate, so the sprint's points leave it out. It is a retry of one call, about the size of ${J$2(105)}.`,
8802
8838
  command: "jira issue update",
8803
8839
  input: {
8804
8840
  dossier: "card-payments",
@@ -8811,32 +8847,32 @@ var SCRIPTS = {
8811
8847
  attention: {
8812
8848
  label: "What needs attention first?",
8813
8849
  parts: [
8814
- `${J$1(102)} is blocked by ${J$1(101)} and holds up ${J$1(103)}, and nothing has changed on it for 8 days.`,
8815
- `${J$1(104)} has been in progress for 13.9 days, longer than 85% of this dossier's finished items took (11 days). It came over from Sprint 41 and hasn't been updated for 5.9 days.`,
8816
- `${J$1(101)}'s latest build failed, and it blocks ${J$1(102)}: fixing that build unblocks the chain.`
8850
+ `${J$2(102)} is blocked by ${J$2(101)} and holds up ${J$2(103)}, and nothing has changed on it for 8 days.`,
8851
+ `${J$2(104)} has been in progress for 13.9 days, longer than 85% of this dossier's finished items took (11 days). It came over from Sprint 41 and hasn't been updated for 5.9 days.`,
8852
+ `${J$2(101)}'s latest build failed, and it blocks ${J$2(102)}: fixing that build unblocks the chain.`
8817
8853
  ]
8818
8854
  },
8819
8855
  deployed: {
8820
8856
  label: "Where is this work deployed?",
8821
8857
  parts: [
8822
- `The dev environment runs payments-core 1.14.0 (4e1d2a9), which includes ${J$1(105)} (pull request #298) and ${J$1(106)} (#296).`,
8858
+ `The dev environment runs payments-core 1.14.0 (4e1d2a9), which includes ${J$2(105)} (pull request #298) and ${J$2(106)} (#296).`,
8823
8859
  `The prod environment runs 1.13.2 (1a2b3c4), merged before the sprint, so none of Sprint 42's work is in prod yet.`,
8824
- `${J$1(101)} and ${J$1(104)} have pull requests still open, so neither is deployed anywhere.`
8860
+ `${J$2(101)} and ${J$2(104)} have pull requests still open, so neither is deployed anywhere.`
8825
8861
  ]
8826
8862
  },
8827
8863
  people: {
8828
8864
  label: "Who's overloaded or blocked?",
8829
8865
  parts: [
8830
- `Nobody is over the dossier's limit of 2 items in progress. J. Smith has ${J$1(101)} in progress for 6.9 days, and A. Chen has ${J$1(104)} in review for 5.9 days.`,
8831
- `A. Chen is blocked: ${J$1(102)} waits on ${J$1(101)}, still in progress with J. Smith, whose pull request ${BB(311)} now waits on J. Smith after A. Chen asked for changes.`,
8866
+ `Nobody is over the dossier's limit of 2 items in progress. J. Smith has ${J$2(101)} in progress for 6.9 days, and A. Chen has ${J$2(104)} in review for 5.9 days.`,
8867
+ `A. Chen is blocked: ${J$2(102)} waits on ${J$2(101)}, still in progress with J. Smith, whose pull request ${BB(311)} now waits on J. Smith after A. Chen asked for changes.`,
8832
8868
  `One review waits on J. Smith: ${BB(305)}, open 3.9 working days. A. Chen's Bitbucket account isn't mapped to her yet; the People view suggests it.`
8833
8869
  ]
8834
8870
  },
8835
8871
  review: {
8836
8872
  label: "What's stuck in review, and why?",
8837
8873
  parts: [
8838
- `${BB(305)} has waited 3.9 working days for a first review from J. Smith, and it now has a merge conflict. It carries ${J$1(104)}, which came over from Sprint 41.`,
8839
- `${BB(311)} waits on its author: A. Chen asked for changes 0.6 working days ago, and its Jenkins build fails. It carries ${J$1(101)}, which blocks ${J$1(102)}.`,
8874
+ `${BB(305)} has waited 3.9 working days for a first review from J. Smith, and it now has a merge conflict. It carries ${J$2(104)}, which came over from Sprint 41.`,
8875
+ `${BB(311)} waits on its author: A. Chen asked for changes 0.6 working days ago, and its Jenkins build fails. It carries ${J$2(101)}, which blocks ${J$2(102)}.`,
8840
8876
  `A first review here usually comes within 0.3 working days (the median of 4 pull requests), so 305 is well past it.`
8841
8877
  ]
8842
8878
  }
@@ -8954,23 +8990,38 @@ var VOICED = {
8954
8990
  "card-payments": {
8955
8991
  crate: [
8956
8992
  `Day 7 of 10 on Sprint 42. 3 of 21 points are on the truck, 18 still on the floor.`,
8957
- `${J$1(101)} is the pallet in the aisle: its pull request #311 fails the Jenkins build, and ${J$1(102)} and ${J$1(103)} wait behind it. That is 11 points not moving.`,
8958
- `${J$1(104)} came over from Sprint 41, and its pull request #305 is still open at the dock. ${J$1(107)} turned up after the sprint started, with no estimate on the label.`
8993
+ `${J$2(101)} is the pallet in the aisle: its pull request #311 fails the Jenkins build, and ${J$2(102)} and ${J$2(103)} wait behind it. That is 11 points not moving.`,
8994
+ `${J$2(104)} came over from Sprint 41, and its pull request #305 is still open at the dock. ${J$2(107)} turned up after the sprint started, with no estimate on the label.`
8959
8995
  ],
8960
8996
  harvest: [
8961
8997
  `We're on day 7 of 10 of Sprint 42. 3 of 21 points are in the barn, and 18 are still in the ground.`,
8962
- `${J$1(101)}'s pull request #311 keeps failing its Jenkins build, and ${J$1(102)} and ${J$1(103)} can't grow until it's mended. That's 11 points waiting on one fence.`,
8963
- `${J$1(104)} was carried over from Sprint 41, and its pull request #305 is still open. ${J$1(107)} was planted after the sprint started, with no estimate yet.`
8998
+ `${J$2(101)}'s pull request #311 keeps failing its Jenkins build, and ${J$2(102)} and ${J$2(103)} can't grow until it's mended. That's 11 points waiting on one fence.`,
8999
+ `${J$2(104)} was carried over from Sprint 41, and its pull request #305 is still open. ${J$2(107)} was planted after the sprint started, with no estimate yet.`
8964
9000
  ],
8965
9001
  starship: [
8966
9002
  `Ship's log, day 7 of 10 of Sprint 42. 3 of 21 points complete; 18 remain.`,
8967
- `Fault: ${J$1(101)}'s pull request #311 fails its Jenkins build. ${J$1(102)} and ${J$1(103)} are held behind it, 11 points in all.`,
8968
- `${J$1(104)} transferred from Sprint 41 with pull request #305 still open. ${J$1(107)} came aboard after the sprint started, with no estimate logged.`
9003
+ `Fault: ${J$2(101)}'s pull request #311 fails its Jenkins build. ${J$2(102)} and ${J$2(103)} are held behind it, 11 points in all.`,
9004
+ `${J$2(104)} transferred from Sprint 41 with pull request #305 still open. ${J$2(107)} came aboard after the sprint started, with no estimate logged.`
8969
9005
  ],
8970
9006
  realm: [
8971
- `Day 7 of 10 of Sprint 42. 3 of 21 points are taken; 18 are not.`,
8972
- `${J$1(101)}'s pull request #311 fails its Jenkins build. The road is broken there, and ${J$1(102)} and ${J$1(103)} wait behind it: 11 points held.`,
8973
- `${J$1(104)} was carried from Sprint 41, its pull request #305 still open. ${J$1(107)} entered the ledger after the sprint began, with no estimate.`
9007
+ `Candles gutter on day 7 of 10 of Sprint 42. 3 of 21 points are won as experience; 18 still stand as the sprint's hit points.`,
9008
+ `${J$2(101)}'s pull request #311 fails its Jenkins build: a critical fail on the saving throw. The road is broken there, and ${J$2(102)} and ${J$2(103)} wait behind it, 11 points held.`,
9009
+ `${J$2(104)} was carried from Sprint 41, its pull request #305 still open. ${J$2(107)} entered the ledger after the sprint began, with no estimate rolled.`
9010
+ ],
9011
+ sprawl: [
9012
+ `Day 7 of 10 on the run, Sprint 42. 3 of 21 points are clean, 18 still live.`,
9013
+ `${J$2(101)} hit black ICE: its pull request #311 fails the Jenkins build, and ${J$2(102)} and ${J$2(103)} are stuck behind it. 11 points going nowhere.`,
9014
+ `${J$2(104)} rolled over from Sprint 41, its pull request #305 still open, waiting on the fixer. ${J$2(107)} showed up after the sprint started, no estimate on it.`
9015
+ ],
9016
+ frontier: [
9017
+ `Day 7 of 10 on the drive for Sprint 42. 3 of 21 points are in the pen; 18 are still out on the range.`,
9018
+ `${J$2(101)} is the busted axle: its pull request #311 keeps failing the Jenkins boiler test, and ${J$2(102)} and ${J$2(103)} sit behind it. That's 11 points going nowhere.`,
9019
+ `${J$2(104)} rode over from Sprint 41, and its telegram, pull request #305, is still waiting on a signature. ${J$2(107)} joined after the drive set out, with no estimate on it.`
9020
+ ],
9021
+ overworld: [
9022
+ `Day 7 of 10 of the journey, Sprint 42. 3 of 21 points are carried home; 18 still lie along the road.`,
9023
+ `A locked door: ${J$2(101)}'s pull request #311 fails its Jenkins build, its dungeon trial. ${J$2(102)} and ${J$2(103)} wait behind that door, 11 points in all. Its key is in that build.`,
9024
+ `${J$2(104)} was carried over from Sprint 41, and its pull request #305 still waits at the shop. ${J$2(107)} joined the journey after it began, with no estimate yet.`
8974
9025
  ]
8975
9026
  },
8976
9027
  settlement: {
@@ -8993,10 +9044,28 @@ var VOICED = {
8993
9044
  `${A(2307)} was removed from the backlog, which OWI logs as done.`
8994
9045
  ],
8995
9046
  realm: [
8996
- `Day 7 of 9 of Sprint 42. 1 of 16 points is taken; 15 remain. ${A(2305)} is not reckoned in points: it is measured in hours.`,
8997
- `${A(2303)} cannot march until ${A(2302)} is done, and 2302's pull request #87 is still building.`,
8998
- `${A(2304)} was carried from Sprint 41, bound to nothing. ${A(2305)} and ${A(2306)} entered after the sprint began.`,
9047
+ `The dice fall on day 7 of 9 of Sprint 42. 1 of 16 points is won; 15 remain as hit points. ${A(2305)} is not reckoned in points: it is measured in hours.`,
9048
+ `${A(2303)} cannot march until ${A(2302)} is done, and 2302's pull request #87 is still rolling its saving throw.`,
9049
+ `${A(2304)} was carried from Sprint 41, bound to nothing. ${A(2305)} and ${A(2306)} joined the quest after the sprint began.`,
8999
9050
  `${A(2307)} was struck from the backlog, which OWI counts as done.`
9051
+ ],
9052
+ sprawl: [
9053
+ `Day 7 of 9 on the run, Sprint 42. 1 of 16 points is clean, 15 still live. ${A(2305)} isn't in that count: it's sized in hours, not points.`,
9054
+ `${A(2303)} can't move until ${A(2302)} is done, and 2302's pull request #87 is still in its ICE check.`,
9055
+ `${A(2304)} rolled over from Sprint 41 with nothing linked to it. ${A(2305)} and ${A(2306)} showed up after the sprint started.`,
9056
+ `${A(2307)} got pulled off the backlog, which OWI logs as done.`
9057
+ ],
9058
+ frontier: [
9059
+ `Day 7 of 9 on the drive for Sprint 42. 1 of 16 points is in the pen; 15 are still out. ${A(2305)} isn't in that count: it's tallied in hours, not points.`,
9060
+ `${A(2303)} can't move till ${A(2302)} is done, and 2302's pull request #87 is still in its boiler test.`,
9061
+ `${A(2304)} rode over from Sprint 41 with nothing hitched to it. ${A(2305)} and ${A(2306)} joined after the drive set out.`,
9062
+ `${A(2307)} was struck off the backlog, which OWI books as done.`
9063
+ ],
9064
+ overworld: [
9065
+ `Day 7 of 9 of the journey, Sprint 42. 1 of 16 points is carried home; 15 remain. ${A(2305)} is not counted in points: it is measured in hours.`,
9066
+ `${A(2303)} waits at a locked door; its key is ${A(2302)}, and 2302's pull request #87 is still in its dungeon trial.`,
9067
+ `${A(2304)} came over from Sprint 41 with nothing linked to it. ${A(2305)} and ${A(2306)} joined the journey after it began.`,
9068
+ `${A(2307)} was taken off the backlog, which OWI counts as done.`
9000
9069
  ]
9001
9070
  },
9002
9071
  "checkout-web": {
@@ -9016,9 +9085,24 @@ var VOICED = {
9016
9085
  `${G(45)} has been aboard since day one with no estimate logged.`
9017
9086
  ],
9018
9087
  realm: [
9019
- `Day 7 of 10 of Sprint 42. 1 of 11 points is taken; 10 remain.`,
9020
- `${G(43)} entered after the sprint began, and its draft pull request #53 fails the e2e-safari check.`,
9021
- `${G(45)} was taken up on day one. It still has no estimate.`
9088
+ `The torches burn low on day 7 of 10 of Sprint 42. 1 of 11 points is won; 10 remain as hit points.`,
9089
+ `${G(43)} joined the quest after the sprint began, and its draft pull request #53 fails the e2e-safari check: a critical fail.`,
9090
+ `${G(45)} was taken up on day one. No one has yet rolled its estimate.`
9091
+ ],
9092
+ sprawl: [
9093
+ `Day 7 of 10 on the run, Sprint 42. 1 of 11 points is clean, 10 still live.`,
9094
+ `${G(43)} showed up after the sprint started, and its draft pull request #53 fails the e2e-safari check.`,
9095
+ `${G(45)} has been live since day one with no estimate on it.`
9096
+ ],
9097
+ frontier: [
9098
+ `Day 7 of 10 on the drive for Sprint 42. 1 of 11 points is in the pen; 10 are still out on the range.`,
9099
+ `${G(43)} joined after the drive set out, and its draft telegram, pull request #53, fails the e2e-safari check.`,
9100
+ `${G(45)} has been out on the trail since day one with no estimate on it.`
9101
+ ],
9102
+ overworld: [
9103
+ `Day 7 of 10 of the journey, Sprint 42. 1 of 11 points is carried home; 10 remain.`,
9104
+ `${G(43)} joined the journey after it began, and its draft pull request #53 fails the e2e-safari check.`,
9105
+ `${G(45)} has been on the road since day one, and still has no estimate.`
9022
9106
  ]
9023
9107
  }
9024
9108
  };
@@ -9068,11 +9152,55 @@ var ANALYZE_PARTS = [
9068
9152
  "people",
9069
9153
  "review"
9070
9154
  ];
9155
+ /**
9156
+ * Analyze's top in the preview (#395): the recommendation and its issues,
9157
+ * written top-down as the prompt asks, before the evidence above. Each line
9158
+ * restates facts the evidence already holds, so it can't drift from the data.
9159
+ */
9160
+ var ANALYZE_TOP = {
9161
+ "card-payments": {
9162
+ recommendation: `Fix ${J$2(101)}'s failing build first: ${J$2(102)} and ${J$2(103)} are blocked behind it, holding 11 points back.`,
9163
+ issues: [
9164
+ `Build failing: ${J$2(101)}'s latest build failed, and it blocks ${J$2(102)}: fixing that build unblocks the chain.`,
9165
+ `Blocked chain: ${J$2(102)} is blocked by ${J$2(101)} and holds up ${J$2(103)}, and nothing has changed on it for 8 days.`,
9166
+ `Aging carry-over: ${J$2(104)} has been in progress for 13.9 days and came over from Sprint 41; its pull request ${BB(305)} has waited 3.9 working days for a first review.`
9167
+ ]
9168
+ },
9169
+ settlement: {
9170
+ recommendation: `Get ${A(2302)} done first: ${A(2303)} can't start until it is, and its pull request #87 is still building.`,
9171
+ issues: [
9172
+ `Blocked: ${A(2303)} is blocked by ${A(2302)}, and nothing has changed on it for 7.9 days.`,
9173
+ `Aging carry-over: ${A(2304)} has been in progress for 15 days, longer than 85% of this dossier's finished items took (8.3 days).`,
9174
+ `Review waiting on its author: ${AZ(87)} waits on D. Okafor: J. Park asked for changes 0.8 working days ago.`
9175
+ ]
9176
+ },
9177
+ "checkout-web": {
9178
+ recommendation: `Fix ${GH(51)}'s failing checks first: it has waited on them for 2 working days, with no reviewer asked.`,
9179
+ issues: [
9180
+ `Failing build: ${G(43)}'s latest build failed on e2e-safari, and nothing has changed on it for 6 days.`,
9181
+ `Reviews waiting: ${SDK(12)} and ${GH(52)} each wait 1.3 working days for review from Ada D.`,
9182
+ `No estimate: ${G(45)} has no estimate and hasn't been updated for 7.9 days.`
9183
+ ]
9184
+ }
9185
+ };
9186
+ /** The scripted Analyze answer's paragraphs, top-down: Recommendation, Issues, then Evidence. */
9187
+ function analyzeParts(dossier) {
9188
+ const script = SCRIPTS[dossier] ?? {};
9189
+ const top = ANALYZE_TOP[dossier];
9190
+ const evidence = ANALYZE_PARTS.flatMap((id) => script[id]?.parts ?? []);
9191
+ if (!top) return evidence;
9192
+ return [
9193
+ `Recommendation: ${top.recommendation}`,
9194
+ ["Issues:", ...top.issues.map((t, i) => `${i + 1}. ${t}`)].join("\n"),
9195
+ "Evidence:",
9196
+ ...evidence
9197
+ ];
9198
+ }
9071
9199
  function scriptedAgent({ delay = 0 } = {}) {
9072
9200
  const answer = (dossier, prompt, style, chat) => {
9073
9201
  const script = SCRIPTS[dossier] ?? {};
9074
9202
  if (prompt === "analyze" && SCRIPTS[dossier]) {
9075
- const parts = ANALYZE_PARTS.flatMap((id) => script[id]?.parts ?? []).map((text) => ({ text }));
9203
+ const parts = analyzeParts(dossier).map((text) => ({ text }));
9076
9204
  return {
9077
9205
  prompt: "Analyze",
9078
9206
  parts,
@@ -9261,6 +9389,8 @@ var SECTION_OF = {
9261
9389
  status: "work",
9262
9390
  sprint: "work",
9263
9391
  blocker: "work",
9392
+ "blocker-cleared": "work",
9393
+ "sprint-ended": "work",
9264
9394
  "pr-opened": "prs",
9265
9395
  "pr-review": "prs",
9266
9396
  "pr-merged": "prs",
@@ -9548,6 +9678,52 @@ function observedEvents(before, after, at, previousSync) {
9548
9678
  });
9549
9679
  }
9550
9680
  }
9681
+ const now = blockers(after.items);
9682
+ const areas = new Set(after.items.map((i) => i.source.area));
9683
+ for (const [blocked, was] of old) {
9684
+ const item = byId.get(blocked);
9685
+ if (!item || !unfinished(item)) continue;
9686
+ for (const by of [...was].sort()) {
9687
+ if (now.get(blocked)?.has(by)) continue;
9688
+ const blocker = byId.get(by) ?? before.items.find((i) => i.id === by);
9689
+ if (blocker && !areas.has(blocker.source.area)) continue;
9690
+ const refs = blocker ? { [by]: {
9691
+ label: keyOf(blocker),
9692
+ url: blocker.url
9693
+ } } : {};
9694
+ const e = itemEvent(item, "blocker-cleared", stamp, `no longer blocked by [[${by}]]`, null, by, refs);
9695
+ out.push({
9696
+ ...e,
9697
+ key: `blocker-cleared:${blocked}:${by}:${stamp}`,
9698
+ observed: { previousSync },
9699
+ who: item.assignee
9700
+ });
9701
+ }
9702
+ }
9703
+ if (previousSync) for (const sprint of sprints(after.items)) {
9704
+ const end = sprint.end ? Date.parse(sprint.end) : NaN;
9705
+ if (!(end > Date.parse(previousSync) && end <= Date.parse(at))) continue;
9706
+ const items = after.items.filter((i) => i.iteration?.name === sprint.name);
9707
+ const done = items.filter((i) => i.statusCategory === "DONE");
9708
+ const pts = (list) => list.reduce((n, i) => n + (i.estimate?.unit === "points" ? i.estimate.value : 0), 0);
9709
+ const figures = [`${done.length} of ${items.length} ${items.length === 1 ? "item" : "items"} done`, ...pts(items) ? [`${pts(done)} of ${pts(items)} points done`] : []];
9710
+ out.push({
9711
+ key: `sprint-ended:${sprint.name}:${isoOf(sprint.end)}`,
9712
+ kind: "sprint-ended",
9713
+ at: isoOf(sprint.end),
9714
+ subject: `sprint:${sprint.name}`,
9715
+ source: sprint.sources[0]?.connection ?? "",
9716
+ label: sprint.name,
9717
+ title: "",
9718
+ url: null,
9719
+ by: null,
9720
+ text: `ended: ${figures.join(", ")}`,
9721
+ cites: [],
9722
+ refs: {},
9723
+ observed: { previousSync },
9724
+ who: null
9725
+ });
9726
+ }
9551
9727
  const previous = new Map(before.deployments.map((d) => [d.id, d]));
9552
9728
  for (const d of after.deployments) {
9553
9729
  const was = previous.get(d.id);
@@ -9576,7 +9752,9 @@ function observedEvents(before, after, at, previousSync) {
9576
9752
  var ORDER = {
9577
9753
  status: 0,
9578
9754
  sprint: 1,
9755
+ "sprint-ended": 1.5,
9579
9756
  blocker: 2,
9757
+ "blocker-cleared": 2.5,
9580
9758
  "pr-opened": 3,
9581
9759
  "pr-review": 4,
9582
9760
  "pr-merged": 5,
@@ -10420,6 +10598,15 @@ function claudeRuntime(version) {
10420
10598
  const steps = /* @__PURE__ */ new Map();
10421
10599
  let apiKeySource;
10422
10600
  let lastStep = null;
10601
+ let streaming = null;
10602
+ const step = (s) => {
10603
+ if (!s) return;
10604
+ const seen = steps.get(s.id);
10605
+ const merged = seen ? higherFigures(seen, s) : s;
10606
+ steps.set(s.id, merged);
10607
+ lastStep = merged;
10608
+ r.usage.report([...steps.values()]);
10609
+ };
10423
10610
  const settle = (m) => {
10424
10611
  const per = m.modelUsage ?? {};
10425
10612
  const first = Object.values(per)[0];
@@ -10457,7 +10644,16 @@ function claudeRuntime(version) {
10457
10644
  if (m.parent_tool_use_id) continue;
10458
10645
  if (m.type === "stream_event") {
10459
10646
  const event = m.event;
10460
- if (event.type === "message_start") current = "";
10647
+ if (event.type === "message_start") {
10648
+ current = "";
10649
+ streaming = event.message ?? null;
10650
+ } else if (event.type === "message_delta" && event.usage && streaming) step(claudeStepUsage({
10651
+ ...streaming,
10652
+ usage: {
10653
+ ...streaming.usage,
10654
+ ...event.usage
10655
+ }
10656
+ }));
10461
10657
  else if (event.type === "content_block_delta" && event.delta?.type === "text_delta") {
10462
10658
  current += event.delta.text ?? "";
10463
10659
  r.onText(current);
@@ -10465,14 +10661,7 @@ function claudeRuntime(version) {
10465
10661
  } else if (m.type === "assistant") {
10466
10662
  const t = textOf(m.message?.content);
10467
10663
  if (t) last = t;
10468
- const step = claudeStepUsage(m.message);
10469
- if (step) {
10470
- const seen = steps.get(step.id);
10471
- const merged = seen ? higherFigures(seen, step) : step;
10472
- steps.set(step.id, merged);
10473
- lastStep = merged;
10474
- r.usage.report([...steps.values()]);
10475
- }
10664
+ step(claudeStepUsage(m.message));
10476
10665
  } else if (m.type === "result") {
10477
10666
  settle(m);
10478
10667
  if (m.subtype === "success" && m.is_error !== true && typeof m.result === "string") return m.result || last;
@@ -10925,14 +11114,22 @@ var ONE_ON_ONE = /^\s*prepare\s+(?:my\s+)?1:1\s+notes\s+for\s+(.+?)\s*[.?!]?\s*$
10925
11114
  /** The 1:1 notes question for one person: facts about the work, each citing its id, and nothing about the person. */
10926
11115
  var oneOnOnePrompt = (dossier, person) => `Prepare 1:1 notes for ${person} in the dossier "${dossier}". Use person_get for ${person} (people_list if the name doesn't match). Stick to facts about the work: what they have in progress and for how long, their open pull requests and what each waits on, reviews waiting on them, what blocks them, and what they finished or reviewed lately, then two or three questions to ask about blockers and support. Cite every item and pull request by its id. No opinion of the person, no score, and no comparison with anyone else.`;
10927
11116
  /**
10928
- * Analyze (#343): the pulse check one press asks, in five parts, every line
10929
- * citing its items. It isn't a starter chip; the button beside Ask sends its
10930
- * id. "Since the last Analyze" is found in the worklog, which records every
10931
- * question as an agent run.
11117
+ * Analyze (#343): the pulse check one press asks, every line citing its
11118
+ * items. It isn't a starter chip; the button beside Ask sends its id. "Since
11119
+ * the last Analyze" is found in the worklog, which records every question as
11120
+ * an agent run. It is written top-down (#395), in the Minto order: a
11121
+ * Recommendation line, then at most three Issues, then the Evidence in five
11122
+ * parts, each a label at the start of its line, which the page reads back
11123
+ * out (src/model/analysis.ts) and lays out with the evidence folded. The
11124
+ * labels are plain text, so rule 4's "no Markdown" and the voice's rules
11125
+ * still hold.
10932
11126
  */
10933
11127
  var ANALYZE_LABEL = "Analyze";
10934
11128
  var analyzePrompt = (d) => [
10935
- `Give a pulse check of the dossier "${d}": a high-level picture in five short parts, in this order, each a paragraph that starts with its name. Cite every item and pull request a line rests on; say plainly when a part has nothing.`,
11129
+ `Give a pulse check of the dossier "${d}", top-down: the answer first, then the reasons, then the evidence. Work the evidence out first, then write it in exactly this order, each label as plain text (not a Markdown heading) at the start of its own line:`,
11130
+ "Recommendation: one or two sentences: the one thing to do first, and why, citing the items it rests on.",
11131
+ "Issues: at most three, the ones that matter most, most important first, each on its own line numbered 1. to 3., as a short name, a colon and one sentence citing its items. Write \"Issues: none\" when nothing stands out.",
11132
+ "Evidence: then these five short parts, in this order, each a paragraph that starts with its name. Cite every item and pull request a line rests on; say plainly when a part has nothing.",
10936
11133
  `What changed: since the last Analyze, or the last sync if that is more recent. Read worklog_day for today, then each day before it, back to the first day with a finished agent run asked as "Analyze" (at most 7 days back; this Analyze is in the worklog too, as still running, and doesn't count), and say what moved, merged, failed or recovered.`,
10937
11134
  "Who is on what: people_list, for each person and agent with work in progress and how long it has been there. Describe load; never rank or score people.",
10938
11135
  "Blocked or stuck in review: owi_query for blocked items and what blocks them, and pr_query for pull requests waiting longest, on what and for how many working days.",
@@ -11082,6 +11279,16 @@ function serverStale(running, disk) {
11082
11279
  var DISCLAIMER = "Your report is sent to Imagile LLC to improve toil, and it becomes a public GitHub issue in imagile-dev/toil. Your email address stays private: it is used only to tell you about your issue. Before you send, remove company data: internal URLs and hostnames, ticket keys, repository and project names, people's names, other identifiers and credentials. You are responsible for what you send.";
11083
11280
  /** Where `toil feedback` sends a report: the function's terminal endpoint (functions/feedback/, `Report`). */
11084
11281
  var FEEDBACK_ENDPOINT = "https://func-toil-feedback.azurewebsites.net/api/report";
11282
+ /**
11283
+ * The form on the site, for anyone whose toil can't send (a build with no
11284
+ * commit, a network that blocks the endpoint). Every link to it reads this one
11285
+ * address: `toil feedback`, Toil UI's Feedback dialog, and the toil skill and
11286
+ * Toil UI's themes doc, which test/feedback-consent.test.ts holds to it. The
11287
+ * site's link check (site/scripts/check-links.mjs) fails the build when it
11288
+ * names no page there, or only an old address that forwards (#435). A form
11289
+ * that moves leaves a forwarding address; this one doesn't rely on it.
11290
+ */
11291
+ var FEEDBACK_FORM = "https://imagile-dev.github.io/toil/about/feedback/";
11085
11292
  var MAX_BODY$1 = 4e3;
11086
11293
  var MAX_EMAIL = 254;
11087
11294
  var CONTROL = /[\u0000-\u001f\u007f]+/g;
@@ -11108,8 +11315,22 @@ function buildReport(fields, version, commit) {
11108
11315
  }
11109
11316
  //#endregion
11110
11317
  //#region src/feedback.ts
11318
+ /**
11319
+ * The Feedback dialog's seam (#265): `toil feedback`, run through the local
11320
+ * server's `api/feedback` (ui/server/server.ts), never by Toil UI calling
11321
+ * anyone itself. A preview is the command run read-only, so it sends nothing
11322
+ * and returns exactly the report it would send and the disclaimer; sending is
11323
+ * the same command again with the person's yes to its `consent` question,
11324
+ * which the page gives only while its checkbox is ticked for that exact
11325
+ * report. The text the dialog shows is the command's own, from the toil the
11326
+ * server runs, so the page has no copy of the disclaimer to drift.
11327
+ *
11328
+ * The site preview passes a fixture (src/fixtures/feedback.ts) that builds the
11329
+ * same report with toil's own code and sends nothing, saying so. The comment
11330
+ * card goes in the box; the box is locked until you sign the card.
11331
+ */
11111
11332
  /** Why sample data sends nothing, said beside the Send button. */
11112
- var FEEDBACK_SAMPLE_DISABLED = "This is sample data, so it sends nothing. Toil UI on your own machine sends through toil feedback, or use the form at https://imagile-dev.github.io/toil/feedback/.";
11333
+ var FEEDBACK_SAMPLE_DISABLED = `This is sample data, so it sends nothing. Toil UI on your own machine sends through toil feedback, or use the form at ${FEEDBACK_FORM}.`;
11113
11334
  //#endregion
11114
11335
  //#region src/fixtures/feedback.ts
11115
11336
  /**
@@ -11184,26 +11405,12 @@ function fixtureFeedbackEnvelope(fields, send) {
11184
11405
  }
11185
11406
  }
11186
11407
  //#endregion
11187
- //#region server/store.ts
11408
+ //#region server/reads.ts
11188
11409
  /**
11189
- * The Store: where the server gets what a view shows (#206, Hosting-ready by
11190
- * design). The SPA reads through one seam, toil's own `execute()` signature
11191
- * (src/toil.ts), so a Store answers toil calls. Three ship beside each other
11192
- * and one is chosen at startup:
11193
- *
11194
- * - `sqliteStore`: the SQLite cache (#250), answering the views' calls from
11195
- * what a sync stored (server/sync.ts). `toil-ui` picks it.
11196
- * - `toilStore`: toil itself, in-process through `@imagile-dev/toil/api`, with
11197
- * the user's own connections and dossiers, every call live. Every call is
11198
- * `caller: 'toil-ui'` in the audit log.
11199
- * - `fixtureStore`: the preview's fixture `execute()` and its sample data, for
11200
- * `toil-ui --sample`, the site preview and the tests.
11201
- *
11202
- * The server, not the Store, decides what a call may do: a read
11203
- * from `READ_COMMANDS` always goes `readOnly`, a config change only for a
11204
- * command in the server's config allowlist (#253), and anything else is
11205
- * refused before a Store sees it. Two locks on one door, and both keys stay
11206
- * with the tenant.
11410
+ * The commands the views read: data only, kept apart from the Store that runs
11411
+ * them (ui/server/store.ts holds the read-only lock) so that adding a read is a
11412
+ * change to a list and nothing else. Triage may edit this file
11413
+ * (scripts/triage/changes.mjs); it may not edit the Store.
11207
11414
  */
11208
11415
  /**
11209
11416
  * The readiness gate's live reads (#307): an item's workflow, read on a
@@ -11226,6 +11433,8 @@ var READ_COMMANDS = /* @__PURE__ */ new Set([
11226
11433
  "dossiers show",
11227
11434
  "jira issue search",
11228
11435
  "jira issue history",
11436
+ "jira-cloud issue search",
11437
+ "jira-cloud issue history",
11229
11438
  "ado work-item iterations",
11230
11439
  "ado work-item search",
11231
11440
  "ado work-item get-many",
@@ -11254,6 +11463,28 @@ var READ_COMMANDS = /* @__PURE__ */ new Set([
11254
11463
  "openshift deployment list",
11255
11464
  ...WORKFLOW_READS
11256
11465
  ]);
11466
+ //#endregion
11467
+ //#region server/store.ts
11468
+ /**
11469
+ * The Store: where the server gets what a view shows (#206, Hosting-ready by
11470
+ * design). The SPA reads through one seam, toil's own `execute()` signature
11471
+ * (src/toil.ts), so a Store answers toil calls. Three ship beside each other
11472
+ * and one is chosen at startup:
11473
+ *
11474
+ * - `sqliteStore`: the SQLite cache (#250), answering the views' calls from
11475
+ * what a sync stored (server/sync.ts). `toil-ui` picks it.
11476
+ * - `toilStore`: toil itself, in-process through `@imagile-dev/toil/api`, with
11477
+ * the user's own connections and dossiers, every call live. Every call is
11478
+ * `caller: 'toil-ui'` in the audit log.
11479
+ * - `fixtureStore`: the preview's fixture `execute()` and its sample data, for
11480
+ * `toil-ui --sample`, the site preview and the tests.
11481
+ *
11482
+ * The server, not the Store, decides what a call may do: a read
11483
+ * from `READ_COMMANDS` always goes `readOnly`, a config change only for a
11484
+ * command in the server's config allowlist (#253), and anything else is
11485
+ * refused before a Store sees it. Two locks on one door, and both keys stay
11486
+ * with the tenant.
11487
+ */
11257
11488
  /** Every Toil UI call names itself, so the audit log says which lines were the UI's. */
11258
11489
  var CALLER = "toil-ui";
11259
11490
  /**
@@ -11458,7 +11689,7 @@ function categoryOf(e, items) {
11458
11689
  /** Who a fact belongs to: its `who`, or for a fact recorded before #345, who its line names. */
11459
11690
  function whoOf(e, items) {
11460
11691
  if (e.who !== void 0) return e.who;
11461
- if (e.kind === "blocker") return items.get(e.subject)?.assignee ?? null;
11692
+ if (e.kind === "blocker" || e.kind === "blocker-cleared") return items.get(e.subject)?.assignee ?? null;
11462
11693
  return e.by ? {
11463
11694
  id: e.by,
11464
11695
  name: e.by,
@@ -11537,6 +11768,9 @@ function buildStandup(input) {
11537
11768
  case "blocker":
11538
11769
  put(g.of(e.source, who), "blocked", fromEvent(e));
11539
11770
  break;
11771
+ case "blocker-cleared":
11772
+ put(g.of(e.source, who), "progress", fromEvent(e));
11773
+ break;
11540
11774
  case "pr-opened":
11541
11775
  case "pr-review":
11542
11776
  case "pr-merged":
@@ -11786,6 +12020,9 @@ var LIVE_COMMANDS = [
11786
12020
  "jira issue search",
11787
12021
  "jira issue get",
11788
12022
  "jira issue history",
12023
+ "jira-cloud issue search",
12024
+ "jira-cloud issue get",
12025
+ "jira-cloud issue history",
11789
12026
  "ado work-item search",
11790
12027
  "ado work-item get",
11791
12028
  "ado work-item get-many",
@@ -13426,8 +13663,8 @@ function packageUrl(specifier, from) {
13426
13663
  }
13427
13664
  //#endregion
13428
13665
  //#region server/agents/env.ts
13429
- /** What every CLI needs to run at all. */
13430
- var BASE = /^(PATH|PATHEXT|HOME|USERPROFILE|HOMEDRIVE|HOMEPATH|APPDATA|LOCALAPPDATA|TMP|TEMP|TMPDIR|SYSTEMROOT|WINDIR|COMSPEC|LANG|LC_[A-Z_]+|TZ|XDG_CONFIG_HOME|XDG_DATA_HOME|XDG_STATE_HOME|XDG_CACHE_HOME)$/i;
13666
+ /** OS identity includes USER: Claude needs it to find its macOS sign-in (#489). */
13667
+ var BASE = /^(PATH|PATHEXT|HOME|USER|USERPROFILE|HOMEDRIVE|HOMEPATH|APPDATA|LOCALAPPDATA|TMP|TEMP|TMPDIR|SYSTEMROOT|WINDIR|COMSPEC|LANG|LC_[A-Z_]+|TZ|XDG_CONFIG_HOME|XDG_DATA_HOME|XDG_STATE_HOME|XDG_CACHE_HOME)$/i;
13431
13668
  /** The proxy and the certificate authorities the machine names (principle 9). */
13432
13669
  var NETWORK = /^(HTTPS_PROXY|HTTP_PROXY|ALL_PROXY|NO_PROXY|NODE_EXTRA_CA_CERTS|SSL_CERT_FILE|SSL_CERT_DIR)$/i;
13433
13670
  /**
@@ -13874,23 +14111,23 @@ var THEME_VOICES = new Map([
13874
14111
  {
13875
14112
  name: "crate",
13876
14113
  label: "Crate",
13877
- description: "toil's own brand: the site's warm near-black and flame-to-amber accent in a warehouse of pallet racking that drifts as you scroll, dust in a light shaft, and the crate in its hard hat when there's nothing to show yet.",
14114
+ description: "The toil site's look: its near-black, the drafting grid and the blue glow, the blue accent gradient, dust drifting in the glow, and the crate in its hard hat when there's nothing to show yet.",
13878
14115
  schemes: { "dark": {
13879
- "bg": "#16130f",
13880
- "surface": "#1f1a15",
13881
- "raised": "#2a231c",
13882
- "ink": "#f6f1e9",
13883
- "muted": "#b4a998",
13884
- "line": "#4a423a",
13885
- "accent": "#ff6a3d",
13886
- "accentInk": "#160b05",
13887
- "link": "#ffb84d",
13888
- "focus": "#6fb2ff",
13889
- "ok": "#ffb84d",
13890
- "warn": "#ffb84d",
13891
- "danger": "#ff6a3d",
13892
- "bannerBg": "#2a231c",
13893
- "bannerInk": "#ffb84d"
14116
+ "bg": "#0f1115",
14117
+ "surface": "#171a21",
14118
+ "raised": "#1e222b",
14119
+ "ink": "#e8eaed",
14120
+ "muted": "#a7afba",
14121
+ "line": "#3a414d",
14122
+ "accent": "#8cc4ff",
14123
+ "accentInk": "#0b1220",
14124
+ "link": "#c2e0ff",
14125
+ "focus": "#8cc4ff",
14126
+ "ok": "#6fd394",
14127
+ "warn": "#f0b849",
14128
+ "danger": "#ff8a80",
14129
+ "bannerBg": "#1e222b",
14130
+ "bannerInk": "#c2e0ff"
13894
14131
  } },
13895
14132
  fonts: {
13896
14133
  "body": "'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif",
@@ -13905,8 +14142,95 @@ var THEME_VOICES = new Map([
13905
14142
  "emptyState": "assets/crate-lost.webp",
13906
14143
  "mark": "assets/mark.svg",
13907
14144
  "loading": "assets/crate-loading.webp",
13908
- "racking": "assets/racking.webp",
13909
- "pallets": "assets/pallets.webp"
14145
+ "momentSplash": "assets/moments/splash.webp",
14146
+ "momentTote": "assets/moments/tote.svg",
14147
+ "momentSigned": "assets/moments/signed.svg",
14148
+ "momentGauge": "assets/moments/gauge.svg",
14149
+ "momentSplit": "assets/moments/split.svg",
14150
+ "momentAisle": "assets/moments/aisle.svg",
14151
+ "momentMerge": "assets/moments/merge.svg",
14152
+ "momentManifest": "assets/moments/manifest.svg"
14153
+ },
14154
+ moments: {
14155
+ "splash": {
14156
+ "art": {
14157
+ "art": "momentSplash",
14158
+ "width": 360,
14159
+ "height": 327
14160
+ },
14161
+ "motif": "rise",
14162
+ "loop": "bob",
14163
+ "line": "Shift's starting. Pulling the manifests off the rack."
14164
+ },
14165
+ "loader": {
14166
+ "art": {
14167
+ "art": "loading",
14168
+ "width": 240,
14169
+ "height": 160
14170
+ },
14171
+ "loop": "roll",
14172
+ "track": {
14173
+ "art": "momentTote",
14174
+ "size": 18,
14175
+ "count": 4,
14176
+ "motif": "march"
14177
+ },
14178
+ "flavour": [
14179
+ "Checking the bills of lading.",
14180
+ "Counting the crates twice.",
14181
+ "Waiting on the forklift.",
14182
+ "Reading the stencil on the side.",
14183
+ "Signing for it in triplicate."
14184
+ ]
14185
+ },
14186
+ "tips": { "label": "Foreman's note" },
14187
+ "entrance": "rise",
14188
+ "tabs": "fade",
14189
+ "events": {
14190
+ "item-done": {
14191
+ "art": "momentSigned",
14192
+ "width": 64,
14193
+ "height": 64,
14194
+ "motif": "stamp",
14195
+ "label": "Signed off"
14196
+ },
14197
+ "build-passed": {
14198
+ "art": "momentGauge",
14199
+ "width": 64,
14200
+ "height": 64,
14201
+ "motif": "pop",
14202
+ "label": "Forklift check passed"
14203
+ },
14204
+ "build-failed": {
14205
+ "art": "momentSplit",
14206
+ "width": 64,
14207
+ "height": 64,
14208
+ "motif": "drop",
14209
+ "label": "Load split"
14210
+ },
14211
+ "blocker-cleared": {
14212
+ "art": "momentAisle",
14213
+ "width": 64,
14214
+ "height": 64,
14215
+ "motif": "slide",
14216
+ "label": "Aisle clear"
14217
+ },
14218
+ "pr-merged": {
14219
+ "art": "momentMerge",
14220
+ "width": 64,
14221
+ "height": 64,
14222
+ "motif": "sweep",
14223
+ "label": "Loaded on the truck"
14224
+ },
14225
+ "sprint-ended": {
14226
+ "art": "momentManifest",
14227
+ "width": 64,
14228
+ "height": 64,
14229
+ "motif": "rise",
14230
+ "label": "Shipment closed"
14231
+ }
14232
+ },
14233
+ "recap": { "label": "Shipment closed" }
13910
14234
  },
13911
14235
  lexicon: {
13912
14236
  "dossiers.lede": "Each dossier is one consignment of work: its repositories, its tracker, its pipelines and its environments, all on one manifest. Pick one to see its stories, pull requests, builds and deployments on the same dock.",
@@ -13983,7 +14307,97 @@ var THEME_VOICES = new Map([
13983
14307
  "emptyState": "assets/empty-field.svg",
13984
14308
  "loading": "assets/watering-can.svg",
13985
14309
  "mark": "assets/mark.svg",
13986
- "fields": "assets/fields.webp"
14310
+ "fields": "assets/fields.webp",
14311
+ "momentSplash": "assets/moments/splash.webp",
14312
+ "momentSprout": "assets/moments/sprout-sheet.svg",
14313
+ "momentBale": "assets/moments/bale.svg",
14314
+ "momentBasket": "assets/moments/basket.svg",
14315
+ "momentSun": "assets/moments/sun.svg",
14316
+ "momentStorm": "assets/moments/storm.svg",
14317
+ "momentGate": "assets/moments/gate.svg",
14318
+ "momentCart": "assets/moments/cart.svg",
14319
+ "momentMoon": "assets/moments/moon.svg"
14320
+ },
14321
+ moments: {
14322
+ "splash": {
14323
+ "art": {
14324
+ "art": "momentSplash",
14325
+ "width": 480,
14326
+ "height": 320
14327
+ },
14328
+ "motif": "fade",
14329
+ "line": "Morning on the farm. Walking out to the fields."
14330
+ },
14331
+ "loader": {
14332
+ "art": {
14333
+ "art": "momentSprout",
14334
+ "width": 128,
14335
+ "height": 128,
14336
+ "frames": 4
14337
+ },
14338
+ "loop": "frames",
14339
+ "track": {
14340
+ "art": "momentBale",
14341
+ "size": 24,
14342
+ "count": 5,
14343
+ "motif": "grow"
14344
+ },
14345
+ "flavour": [
14346
+ "Watering the rows.",
14347
+ "Checking under the leaves.",
14348
+ "Listening to the weather report.",
14349
+ "Counting the hay bales.",
14350
+ "Shooing the crows off the fence."
14351
+ ]
14352
+ },
14353
+ "tips": { "label": "From the almanac" },
14354
+ "entrance": "drop",
14355
+ "tabs": "slide",
14356
+ "events": {
14357
+ "item-done": {
14358
+ "art": "momentBasket",
14359
+ "width": 64,
14360
+ "height": 64,
14361
+ "motif": "pop",
14362
+ "label": "Harvested"
14363
+ },
14364
+ "build-passed": {
14365
+ "art": "momentSun",
14366
+ "width": 64,
14367
+ "height": 64,
14368
+ "motif": "rise",
14369
+ "label": "Fair weather"
14370
+ },
14371
+ "build-failed": {
14372
+ "art": "momentStorm",
14373
+ "width": 64,
14374
+ "height": 64,
14375
+ "motif": "drop",
14376
+ "label": "Storm over the field"
14377
+ },
14378
+ "blocker-cleared": {
14379
+ "art": "momentGate",
14380
+ "width": 64,
14381
+ "height": 64,
14382
+ "motif": "slide",
14383
+ "label": "Gate open"
14384
+ },
14385
+ "pr-merged": {
14386
+ "art": "momentCart",
14387
+ "width": 64,
14388
+ "height": 64,
14389
+ "motif": "sweep",
14390
+ "label": "Brought in"
14391
+ },
14392
+ "sprint-ended": {
14393
+ "art": "momentMoon",
14394
+ "width": 64,
14395
+ "height": 64,
14396
+ "motif": "rise",
14397
+ "label": "Season's end"
14398
+ }
14399
+ },
14400
+ "recap": { "label": "Harvest festival" }
13987
14401
  },
13988
14402
  terms: {
13989
14403
  "board": "Farm plot",
@@ -14062,7 +14476,98 @@ var THEME_VOICES = new Map([
14062
14476
  "loading": "assets/lightspeed.svg",
14063
14477
  "mark": "assets/mark.svg",
14064
14478
  "nebula": "assets/nebula.webp",
14065
- "emptyState": "assets/empty-sector.webp"
14479
+ "emptyState": "assets/empty-sector.webp",
14480
+ "momentWarp": "assets/moments/warp.webp",
14481
+ "momentSensor": "assets/moments/sensor-sheet.svg",
14482
+ "momentPip": "assets/moments/pip.svg",
14483
+ "momentObjective": "assets/moments/objective.svg",
14484
+ "momentNominal": "assets/moments/nominal.svg",
14485
+ "momentRedAlert": "assets/moments/red-alert.svg",
14486
+ "momentAllClear": "assets/moments/all-clear.svg",
14487
+ "momentDocking": "assets/moments/docking.svg",
14488
+ "momentMission": "assets/moments/mission.svg"
14489
+ },
14490
+ moments: {
14491
+ "splash": {
14492
+ "art": {
14493
+ "art": "momentWarp",
14494
+ "width": 480,
14495
+ "height": 320
14496
+ },
14497
+ "motif": "pop",
14498
+ "line": "Dropping out of warp. Bringing the dossiers on screen."
14499
+ },
14500
+ "loader": {
14501
+ "art": {
14502
+ "art": "momentSensor",
14503
+ "width": 128,
14504
+ "height": 128,
14505
+ "frames": 8
14506
+ },
14507
+ "loop": "frames",
14508
+ "track": {
14509
+ "art": "momentPip",
14510
+ "size": 16,
14511
+ "count": 6,
14512
+ "motif": "blink"
14513
+ },
14514
+ "flavour": [
14515
+ "Long-range sensors sweeping the sector.",
14516
+ "Aligning the navigation array.",
14517
+ "Requesting telemetry from the outer stations.",
14518
+ "Cross-checking the star charts.",
14519
+ "Holding position while the readings come in.",
14520
+ "Routing auxiliary power to the scanners."
14521
+ ]
14522
+ },
14523
+ "tips": { "label": "Standing orders" },
14524
+ "entrance": "sweep",
14525
+ "tabs": "fade",
14526
+ "events": {
14527
+ "item-done": {
14528
+ "art": "momentObjective",
14529
+ "width": 64,
14530
+ "height": 64,
14531
+ "motif": "pop",
14532
+ "label": "Objective complete"
14533
+ },
14534
+ "build-passed": {
14535
+ "art": "momentNominal",
14536
+ "width": 64,
14537
+ "height": 64,
14538
+ "motif": "rise",
14539
+ "label": "Systems nominal"
14540
+ },
14541
+ "build-failed": {
14542
+ "art": "momentRedAlert",
14543
+ "width": 64,
14544
+ "height": 64,
14545
+ "motif": "drop",
14546
+ "label": "Red alert"
14547
+ },
14548
+ "blocker-cleared": {
14549
+ "art": "momentAllClear",
14550
+ "width": 64,
14551
+ "height": 64,
14552
+ "motif": "slide",
14553
+ "label": "All clear"
14554
+ },
14555
+ "pr-merged": {
14556
+ "art": "momentDocking",
14557
+ "width": 64,
14558
+ "height": 64,
14559
+ "motif": "sweep",
14560
+ "label": "Docking complete"
14561
+ },
14562
+ "sprint-ended": {
14563
+ "art": "momentMission",
14564
+ "width": 64,
14565
+ "height": 64,
14566
+ "motif": "rise",
14567
+ "label": "Mission complete"
14568
+ }
14569
+ },
14570
+ "recap": { "label": "Mission debrief" }
14066
14571
  },
14067
14572
  terms: {
14068
14573
  "sprint": "Ship's status",
@@ -14107,7 +14612,7 @@ var THEME_VOICES = new Map([
14107
14612
  {
14108
14613
  name: "realm",
14109
14614
  label: "Realm",
14110
- description: "A grimdark house ledger: soot and iron around aged vellum, leather-bound folios with wax-sealed headings, the dependency graph as an engraved war-table map, epics as campaigns, and the agent as the house's steward.",
14615
+ description: "A grimdark house ledger kept as a tabletop campaign: soot and iron around aged vellum, leather-bound folios with wax-sealed headings, a dungeon map at the foot of every page, a d20 rolling while a view loads, the dependency graph as an engraved war-table map, an item's fields as a character sheet, and the agent as the dungeon master.",
14111
14616
  schemes: { "light": {
14112
14617
  "bg": "#cbbd9e",
14113
14618
  "surface": "#e2d7bf",
@@ -14144,48 +14649,688 @@ var THEME_VOICES = new Map([
14144
14649
  "blocked": "assets/broken-road.svg",
14145
14650
  "empty": "assets/ledger.svg",
14146
14651
  "mark": "assets/mark.svg",
14147
- "loading": "assets/candle-ledger.webp"
14652
+ "d20": "assets/d20.svg",
14653
+ "dungeon": "assets/dungeon-map.webp",
14654
+ "rest": "assets/rest.svg",
14655
+ "momentTray": "assets/moments/tray.webp",
14656
+ "momentCandle": "assets/moments/candle.svg",
14657
+ "momentScroll": "assets/moments/scroll.svg",
14658
+ "momentBlade": "assets/moments/broken-blade.svg",
14659
+ "momentRoad": "assets/moments/open-road.svg",
14660
+ "momentLedger": "assets/moments/ledger-quill.svg",
14661
+ "momentCampfire": "assets/moments/campfire.svg"
14662
+ },
14663
+ moments: {
14664
+ "splash": {
14665
+ "art": {
14666
+ "art": "d20",
14667
+ "width": 104,
14668
+ "height": 104
14669
+ },
14670
+ "motif": "stamp",
14671
+ "face": {
14672
+ "value": "sprint-day",
14673
+ "max": 20
14674
+ },
14675
+ "line": "The candles are lit and the party is gathered. The dungeon master rolls for the ledgers."
14676
+ },
14677
+ "loader": {
14678
+ "art": {
14679
+ "art": "d20",
14680
+ "width": 88,
14681
+ "height": 88
14682
+ },
14683
+ "loop": "tumble",
14684
+ "track": {
14685
+ "art": "momentCandle",
14686
+ "size": 26,
14687
+ "count": 5,
14688
+ "motif": "blink"
14689
+ },
14690
+ "flavour": [
14691
+ "The dungeon master consults the quest log.",
14692
+ "Rolling initiative for the party.",
14693
+ "Counting hit points against the ledger.",
14694
+ "Tallying the party's experience points.",
14695
+ "Making a saving throw against the tracker.",
14696
+ "The party takes a short rest while the riders return."
14697
+ ]
14698
+ },
14699
+ "tips": { "label": "From the rulebook" },
14700
+ "entrance": "drop",
14701
+ "tabs": "fade",
14702
+ "events": {
14703
+ "item-done": {
14704
+ "art": "momentScroll",
14705
+ "width": 64,
14706
+ "height": 64,
14707
+ "motif": "stamp",
14708
+ "label": "Quest complete"
14709
+ },
14710
+ "build-passed": {
14711
+ "art": "d20",
14712
+ "width": 64,
14713
+ "height": 64,
14714
+ "motif": "pop",
14715
+ "label": "Natural 20"
14716
+ },
14717
+ "build-failed": {
14718
+ "art": "momentBlade",
14719
+ "width": 64,
14720
+ "height": 64,
14721
+ "motif": "drop",
14722
+ "label": "Critical fail"
14723
+ },
14724
+ "blocker-cleared": {
14725
+ "art": "momentRoad",
14726
+ "width": 64,
14727
+ "height": 64,
14728
+ "motif": "slide",
14729
+ "label": "The road is open"
14730
+ },
14731
+ "pr-merged": {
14732
+ "art": "momentLedger",
14733
+ "width": 64,
14734
+ "height": 64,
14735
+ "motif": "sweep",
14736
+ "label": "Entered in the ledger"
14737
+ },
14738
+ "sprint-ended": {
14739
+ "art": "momentCampfire",
14740
+ "width": 64,
14741
+ "height": 64,
14742
+ "motif": "rise",
14743
+ "label": "Long rest"
14744
+ }
14745
+ },
14746
+ "recap": { "label": "Session recap" }
14148
14747
  },
14149
14748
  terms: {
14150
14749
  "epic": "Campaign",
14151
14750
  "sprint": "Ledger",
14152
- "agent": "Steward",
14751
+ "agent": "Dungeon master",
14153
14752
  "dependencies": "War table",
14154
- "blocked": "Broken road"
14753
+ "blocked": "Broken road",
14754
+ "people": "Party",
14755
+ "analyses": "Quest log",
14756
+ "priority": "Initiative",
14757
+ "builds": "Saving throws",
14758
+ "passed": "Natural 20",
14759
+ "failed": "Critical fail",
14760
+ "pointsDone": "Experience points",
14761
+ "pointsLeft": "Hit points"
14155
14762
  },
14156
14763
  lexicon: {
14157
- "dossiers.lede": "Each dossier is one ledger of the house's work: its repositories, its tracker, its pipelines and its environments. Choose one to read its stories, pull requests, builds and deployments on a single page.",
14158
- "dossier.eyebrow": "The ledger",
14159
- "settings.eyebrow": "The war council",
14160
- "attention.note": "Open items ranked by their insights, the gravest first. Each insight names the record it rests on.",
14764
+ "dossiers.lede": "Each dossier is one campaign in the house's ledger: its repositories, its tracker, its pipelines and its environments. Choose one to read its quests, pull requests, builds and deployments on a single page.",
14765
+ "dossier.eyebrow": "The campaign ledger",
14766
+ "settings.eyebrow": "The rules of the table",
14767
+ "attention.note": "Open items ranked by their insights, in initiative order, the gravest first. Each insight names the record it rests on.",
14161
14768
  "aging.note": "How long each item in progress has stood unfinished, from its history, oldest first.",
14162
- "trace.note": "Each work item with the pull requests that name it, their latest builds, and the environments where it now stands.",
14163
- "graph.note": "Arrows run the way each link reads, from the source's own links. Blocking chains run left to right across the war table.",
14164
- "ask.note": "Answers cite the items they rest on. The steward reads; it never changes a ticket. What it counsels comes back as a proposal, for you to seal.",
14165
- "empty.dossiers": "The ledgers are empty: toil sees no dossiers yet. A dossier is founded with toil dossiers init.",
14166
- "empty.sprint": "No sprint is entered in this dossier's work items.",
14167
- "empty.burnup": "No sprint is entered, so there is nothing to reckon.",
14769
+ "trace.note": "Each work item with the pull requests that name it, their latest builds, each one a saving throw, and the environments where it now stands.",
14770
+ "graph.note": "Arrows run the way each link reads, from the source's own links. Blocking chains run left to right across the war table, room to room as on a dungeon map.",
14771
+ "ask.note": "Answers cite the items they rest on. The dungeon master narrates; it never changes a ticket. What it counsels comes back as a proposal, for you to seal.",
14772
+ "empty.dossiers": "The ledgers are empty: toil sees no dossiers yet. A campaign begins with toil dossiers init.",
14773
+ "empty.sprint": "No sprint is entered in this dossier's work items, so there are no hit points to count.",
14774
+ "empty.burnup": "No sprint is entered, so there is no experience to reckon.",
14168
14775
  "empty.column": "None stand here.",
14169
- "empty.prs": "No pull requests have come before the council for this dossier.",
14170
- "empty.builds": "No builds are recorded for this dossier's pull requests.",
14776
+ "empty.prs": "No pull requests have come before the table for this dossier.",
14777
+ "empty.builds": "No builds are recorded for this dossier's pull requests: no saving throw has been rolled.",
14171
14778
  "empty.deployments": "This dossier names no environment, so no rider brings word of deployments.",
14172
- "empty.links": "No links between this dossier's items. The war table is bare.",
14173
- "empty.ask": "Pick a question, or ask your own. The steward cites every record an answer rests on.",
14174
- "loading.dossiers": "Opening the ledgers…",
14175
- "loading.dossier": "Opening the ledger of {name}…",
14176
- "loading.graph": "Laying out the war table…",
14177
- "loading.answer": "The steward is writing…",
14178
- "ask.placeholder": "Petition the steward about {name}",
14179
- "ask.placeholder.short": "Petition the steward",
14180
- "ask.welcome": "Petition the steward about {name}: the season's ledger, who holds which charge, which roads are broken. Every answer names the records it rests on.",
14779
+ "empty.links": "No links between this dossier's items. The dungeon map is bare.",
14780
+ "empty.ask": "Pick a question, or ask your own. The dungeon master cites every record an answer rests on.",
14781
+ "loading.dossiers": "Rolling for the ledgers…",
14782
+ "loading.dossier": "Rolling to open the ledger of {name}…",
14783
+ "loading.graph": "Rolling to map the war table…",
14784
+ "loading.answer": "The dungeon master rolls behind the screen…",
14785
+ "ask.placeholder": "Ask the dungeon master about {name}",
14786
+ "ask.placeholder.short": "Ask the dungeon master",
14787
+ "ask.welcome": "Ask the dungeon master about {name}: this season's ledger, the party and their charges, which roads are broken. Every answer names the records it rests on, and no roll changes them.",
14181
14788
  "status.cache": "Consulting the ledger",
14182
14789
  "status.live": "Sending a rider to the tracker",
14183
- "status.registry": "Reading the writ",
14184
- "status.writing": "Writing the reply",
14185
- "status.done": "Sealed in {seconds} s",
14790
+ "status.registry": "Reading the rulebook",
14791
+ "status.writing": "Narrating the reply",
14792
+ "status.done": "Resolved in {seconds} s",
14186
14793
  "status.stopped": "Withdrawn after {seconds} s"
14187
14794
  },
14188
- voice: "Speak as the steward of a great house reporting to its war council by candlelight: terse, formal and grave, in short, measured sentences, with no flourish and no cheer. Epics are campaigns, the sprint is this season's ledger, work items are its entries, a blocker is a broken road or a fortress that holds, a failing build is a breach in the wall, and a deployment is word sent to a far keep. Report the state of the ledger first, then the threats, then what you counsel. Ominous in tone, never mocking and never unkind to any person. The old words go around the facts, never instead of them."
14795
+ voice: "Speak as the dungeon master of a grim campaign, narrating to the party at the table by candlelight: dramatic but brief, in short, weighty sentences, never cheerful and never unkind to any person. Epics are campaigns, the sprint is this season's ledger, its points left are hit points and its points done experience, a blocker is a broken road, a build is a saving throw, passed a natural 20 and failed a critical fail, and the people are the party. Set the scene in one line, then report the ledger, then the threats, then what the party should do next. The rules are never bent: every figure, citation and fact stays exactly as the data gives it. The dice go around the facts, never instead of them.",
14796
+ alignments: {
14797
+ "label": "Rolled alignment",
14798
+ "values": [
14799
+ "Lawful good",
14800
+ "Neutral good",
14801
+ "Chaotic good",
14802
+ "Lawful neutral",
14803
+ "True neutral",
14804
+ "Chaotic neutral"
14805
+ ]
14806
+ }
14807
+ },
14808
+ {
14809
+ name: "sprawl",
14810
+ label: "Sprawl",
14811
+ description: "A terminal at heart in a rain-soaked megacity: monospace type and a block cursor, faint scanlines and a CRT edge glow, neon magenta and cyan on deep blue-black, the skyline at the foot of the page, rain on the glass, the dependency graph as a net map, and the agent as a netrunner.",
14812
+ schemes: { "dark": {
14813
+ "bg": "#07060f",
14814
+ "surface": "#0e0c1d",
14815
+ "raised": "#17142c",
14816
+ "ink": "#eaf6ff",
14817
+ "muted": "#a8a3cf",
14818
+ "line": "#3b2f6b",
14819
+ "accent": "#ff2e88",
14820
+ "accentInk": "#12020a",
14821
+ "link": "#3ff0ff",
14822
+ "focus": "#f2ff4a",
14823
+ "ok": "#39ff9c",
14824
+ "warn": "#ffd23f",
14825
+ "danger": "#ff6470",
14826
+ "bannerBg": "#0e0c1d",
14827
+ "bannerInk": "#3ff0ff"
14828
+ } },
14829
+ fonts: {
14830
+ "body": "'Fira Code', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace",
14831
+ "display": "'Chakra Petch', 'Fira Code', ui-monospace, monospace",
14832
+ "mono": "'Fira Code', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace"
14833
+ },
14834
+ radius: "0px",
14835
+ motion: "subtle",
14836
+ ambient: { "particles": "rain" },
14837
+ sounds: {},
14838
+ assets: {
14839
+ "skyline": "assets/skyline.webp",
14840
+ "netMap": "assets/net-map.svg",
14841
+ "netrunner": "assets/netrunner.svg",
14842
+ "blackIce": "assets/black-ice.svg",
14843
+ "loading": "assets/jack-in.webp",
14844
+ "emptyState": "assets/dead-drop.webp",
14845
+ "mark": "assets/mark.svg",
14846
+ "momentBoot": "assets/moments/boot-sheet.webp",
14847
+ "momentShard": "assets/moments/shard-sheet.svg",
14848
+ "momentCipher": "assets/moments/cipher-block.svg",
14849
+ "momentGig": "assets/moments/gig-closed.svg",
14850
+ "momentBreach": "assets/moments/ice-breached.svg",
14851
+ "momentTripped": "assets/moments/ice-tripped.svg",
14852
+ "momentCracked": "assets/moments/ice-cracked.svg",
14853
+ "momentPayload": "assets/moments/payload.svg",
14854
+ "momentRunOver": "assets/moments/run-over.svg"
14855
+ },
14856
+ moments: {
14857
+ "splash": {
14858
+ "art": {
14859
+ "art": "momentBoot",
14860
+ "width": 336,
14861
+ "height": 210,
14862
+ "frames": 2
14863
+ },
14864
+ "motif": "fade",
14865
+ "line": "Rain on the glass. Jacking in."
14866
+ },
14867
+ "loader": {
14868
+ "art": {
14869
+ "art": "momentShard",
14870
+ "width": 96,
14871
+ "height": 96,
14872
+ "frames": 4
14873
+ },
14874
+ "loop": "frames",
14875
+ "track": {
14876
+ "art": "momentCipher",
14877
+ "size": 14,
14878
+ "count": 6,
14879
+ "motif": "blink"
14880
+ },
14881
+ "flavour": [
14882
+ "Decrypting the data shard.",
14883
+ "Spoofing the handshake.",
14884
+ "Routing around the black ICE.",
14885
+ "Waiting on the fixer to pick up.",
14886
+ "Rain on the uplink. Retrying.",
14887
+ "Counting the hops to the tracker."
14888
+ ]
14889
+ },
14890
+ "tips": { "label": "Word on the street" },
14891
+ "entrance": "sweep",
14892
+ "tabs": "fade",
14893
+ "events": {
14894
+ "item-done": {
14895
+ "art": "momentGig",
14896
+ "width": 64,
14897
+ "height": 64,
14898
+ "motif": "stamp",
14899
+ "label": "Gig closed"
14900
+ },
14901
+ "build-passed": {
14902
+ "art": "momentBreach",
14903
+ "width": 64,
14904
+ "height": 64,
14905
+ "motif": "pop",
14906
+ "label": "ICE breached"
14907
+ },
14908
+ "build-failed": {
14909
+ "art": "momentTripped",
14910
+ "width": 64,
14911
+ "height": 64,
14912
+ "motif": "drop",
14913
+ "label": "Tripped the ICE"
14914
+ },
14915
+ "blocker-cleared": {
14916
+ "art": "momentCracked",
14917
+ "width": 64,
14918
+ "height": 64,
14919
+ "motif": "slide",
14920
+ "label": "Black ICE cracked"
14921
+ },
14922
+ "pr-merged": {
14923
+ "art": "momentPayload",
14924
+ "width": 64,
14925
+ "height": 64,
14926
+ "motif": "sweep",
14927
+ "label": "Payload delivered"
14928
+ },
14929
+ "sprint-ended": {
14930
+ "art": "momentRunOver",
14931
+ "width": 64,
14932
+ "height": 64,
14933
+ "motif": "rise",
14934
+ "label": "End of the run"
14935
+ }
14936
+ },
14937
+ "recap": { "label": "Run debrief" }
14938
+ },
14939
+ terms: {
14940
+ "epic": "Contract",
14941
+ "board": "Gig board",
14942
+ "sprint": "The run",
14943
+ "agent": "Netrunner",
14944
+ "dependencies": "Net map",
14945
+ "blocked": "Black ICE"
14946
+ },
14947
+ lexicon: {
14948
+ "dossiers.lede": "Each dossier is one job in the sprawl: its repositories, its tracker, its pipelines and its environments. Jack into one to pull its stories, pull requests, builds and deployments onto one screen.",
14949
+ "dossier.eyebrow": "Job file",
14950
+ "settings.eyebrow": "Rig config",
14951
+ "attention.note": "Open gigs ranked by their insights, hottest first. Each insight names the data it rests on. Trust the data, not the rumour.",
14952
+ "aging.note": "How long each gig in progress has been running, from its history, oldest first.",
14953
+ "trace.note": "Each work item with the pull requests that name it, their latest ICE checks, and the environments it has jacked into.",
14954
+ "graph.note": "Arrows run the way each link reads, from the source's own links. Blocking chains run left to right across the net.",
14955
+ "ask.note": "Answers cite the gigs they rest on. The netrunner reads; it never changes a ticket. What it suggests comes back as a proposal, for you to run.",
14956
+ "empty.dossiers": "No jobs on the wire: toil sees no dossiers yet. Cut one with toil dossiers init.",
14957
+ "empty.sprint": "No run is live in this dossier's work items. The street is quiet.",
14958
+ "empty.burnup": "No run is live, so there is nothing to burn up.",
14959
+ "empty.column": "Dead channel.",
14960
+ "empty.prs": "No payloads waiting on the fixer for this dossier.",
14961
+ "empty.builds": "No ICE checks logged for this dossier's pull requests.",
14962
+ "empty.deployments": "This dossier names no environment, so there is no prod to jack into.",
14963
+ "empty.links": "No links between this dossier's items. The net map is dark.",
14964
+ "empty.ask": "Pick a question, or ask your own. The netrunner cites every record it touched.",
14965
+ "loading.dossiers": "Pinging the dossiers…",
14966
+ "loading.dossier": "Jacking into {name}…",
14967
+ "loading.graph": "Tracing the net map…",
14968
+ "loading.answer": "Running the numbers…",
14969
+ "ask.placeholder": "Ping the netrunner about {name}",
14970
+ "ask.placeholder.short": "Ping the netrunner",
14971
+ "ask.welcome": "Ping the netrunner about {name}: the run, who is on which gig, where the black ICE sits. Every answer cites the records it rests on.",
14972
+ "status.cache": "Reading the local cache",
14973
+ "status.live": "Jacking in through toil",
14974
+ "status.registry": "Reading the command spec",
14975
+ "status.writing": "Typing",
14976
+ "status.done": "Clean exit in {seconds} s",
14977
+ "status.stopped": "Flatlined after {seconds} s"
14978
+ },
14979
+ voice: "Talk like a laconic street-level netrunner reporting from a rain-soaked megacity: clipped, slangy, a little paranoid, never cruel. Work items are gigs, the sprint is the run, a pull request is a payload waiting on the fixer, a build is an ICE check, a deployment is jacking in to prod, and a blocker is black ICE. Lead with what is burning and who it is stuck behind, then what clears it. Short lines, no hype, no exclamation marks, and nothing ever aimed at a person: the paranoia is about the systems. The slang goes around the facts, never instead of them."
14980
+ },
14981
+ {
14982
+ name: "frontier",
14983
+ label: "Frontier",
14984
+ description: "Steampunk on the wild west frontier: brass, copper and riveted iron over sun-bleached desert wood, panels framed in riveted brass plate, pressure gauges on the tallies, the dependency graph as a railroad survey map, dust and drifting steam, and the agent as a dry telegraph operator.",
14985
+ schemes: { "light": {
14986
+ "bg": "#d6c4a0",
14987
+ "surface": "#efe3c8",
14988
+ "raised": "#f6eedb",
14989
+ "ink": "#22170d",
14990
+ "muted": "#4b3925",
14991
+ "line": "#97794f",
14992
+ "accent": "#8a3812",
14993
+ "accentInk": "#fbf1de",
14994
+ "link": "#1f4859",
14995
+ "focus": "#1e4e85",
14996
+ "ok": "#2e5a1c",
14997
+ "warn": "#683f00",
14998
+ "danger": "#8c1c10",
14999
+ "bannerBg": "#1f1b17",
15000
+ "bannerInk": "#ecd9ad"
15001
+ } },
15002
+ fonts: {
15003
+ "body": "'Bitter', Georgia, 'Times New Roman', serif",
15004
+ "display": "'Rye', 'Bitter', Georgia, serif",
15005
+ "mono": "ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace"
15006
+ },
15007
+ radius: "3px",
15008
+ motion: "subtle",
15009
+ ambient: { "particles": "steam" },
15010
+ sounds: {},
15011
+ assets: {
15012
+ "wood": "assets/wood.webp",
15013
+ "frame": "assets/brass-plate.svg",
15014
+ "rail": "assets/rivet-rail.svg",
15015
+ "gauge": "assets/gauge.svg",
15016
+ "map": "assets/survey-map.webp",
15017
+ "blocked": "assets/busted-axle.svg",
15018
+ "operator": "assets/telegraph-key.svg",
15019
+ "emptyState": "assets/wanted-poster.webp",
15020
+ "mark": "assets/mark.svg",
15021
+ "loading": "assets/locomotive.webp",
15022
+ "momentDepot": "assets/moments/depot.webp",
15023
+ "momentGauge": "assets/moments/gauge-sheet.svg",
15024
+ "momentPuff": "assets/moments/puff.svg",
15025
+ "momentPaid": "assets/moments/paid.svg",
15026
+ "momentWhistle": "assets/moments/whistle.svg",
15027
+ "momentBlown": "assets/moments/blown.svg",
15028
+ "momentAxle": "assets/moments/axle.svg",
15029
+ "momentTelegram": "assets/moments/telegram.svg",
15030
+ "momentWatch": "assets/moments/watch.svg"
15031
+ },
15032
+ moments: {
15033
+ "splash": {
15034
+ "art": {
15035
+ "art": "momentDepot",
15036
+ "width": 480,
15037
+ "height": 320
15038
+ },
15039
+ "motif": "sweep",
15040
+ "line": "Train's pulling in. Unloading the dossiers at the depot."
15041
+ },
15042
+ "loader": {
15043
+ "art": {
15044
+ "art": "momentGauge",
15045
+ "width": 128,
15046
+ "height": 128,
15047
+ "frames": 8
15048
+ },
15049
+ "loop": "frames",
15050
+ "track": {
15051
+ "art": "momentPuff",
15052
+ "size": 24,
15053
+ "count": 5,
15054
+ "motif": "grow"
15055
+ },
15056
+ "flavour": [
15057
+ "Stoking the firebox.",
15058
+ "Tapping the pressure gauge.",
15059
+ "Waiting on the wire from the next station.",
15060
+ "Taking on water at the tank.",
15061
+ "Oiling the drive rods.",
15062
+ "Checking the timetable twice."
15063
+ ]
15064
+ },
15065
+ "tips": { "label": "Off the wire" },
15066
+ "entrance": "slide",
15067
+ "tabs": "fade",
15068
+ "events": {
15069
+ "item-done": {
15070
+ "art": "momentPaid",
15071
+ "width": 64,
15072
+ "height": 64,
15073
+ "motif": "stamp",
15074
+ "label": "Paid in full"
15075
+ },
15076
+ "build-passed": {
15077
+ "art": "momentWhistle",
15078
+ "width": 64,
15079
+ "height": 64,
15080
+ "motif": "rise",
15081
+ "label": "Full head of steam"
15082
+ },
15083
+ "build-failed": {
15084
+ "art": "momentBlown",
15085
+ "width": 64,
15086
+ "height": 64,
15087
+ "motif": "drop",
15088
+ "label": "Boiler's blown"
15089
+ },
15090
+ "blocker-cleared": {
15091
+ "art": "momentAxle",
15092
+ "width": 64,
15093
+ "height": 64,
15094
+ "motif": "slide",
15095
+ "label": "Axle mended"
15096
+ },
15097
+ "pr-merged": {
15098
+ "art": "momentTelegram",
15099
+ "width": 64,
15100
+ "height": 64,
15101
+ "motif": "sweep",
15102
+ "label": "Telegram signed"
15103
+ },
15104
+ "sprint-ended": {
15105
+ "art": "momentWatch",
15106
+ "width": 64,
15107
+ "height": 64,
15108
+ "motif": "rise",
15109
+ "label": "The drive's in"
15110
+ }
15111
+ },
15112
+ "recap": { "label": "Tally at the railhead" }
15113
+ },
15114
+ terms: {
15115
+ "epic": "Territory",
15116
+ "board": "Claims board",
15117
+ "sprint": "Cattle drive",
15118
+ "agent": "Operator",
15119
+ "dependencies": "Rail survey",
15120
+ "blocked": "Busted axle"
15121
+ },
15122
+ lexicon: {
15123
+ "dossiers.lede": "Each dossier is one stake on the frontier: its repositories, its tracker, its pipelines and its environments. Pick one to read its claims, pull requests, builds and deployments off a single wire.",
15124
+ "dossier.eyebrow": "Homestead claim",
15125
+ "settings.eyebrow": "Engine house",
15126
+ "attention.note": "Wanted: open claims ranked by their insights, the most wanted first. Each insight names the record it rests on.",
15127
+ "aging.note": "How long each claim in progress has been out on the trail, from its history, oldest first.",
15128
+ "trace.note": "Each work item with the pull requests that name it, their latest boiler tests, and the stations it has reached.",
15129
+ "graph.note": "Arrows run the way each link reads, from the source's own links. Blocking chains run left to right, like track laid west.",
15130
+ "ask.note": "Answers cite the claims they rest on. The operator reads the wire; it never changes a ticket. What it suggests comes back as a proposal, for you to sign.",
15131
+ "empty.dossiers": "Nothing staked yet: toil sees no dossiers. A claim is filed with toil dossiers init.",
15132
+ "empty.sprint": "No cattle drive is under way in this dossier's work items.",
15133
+ "empty.burnup": "No drive is under way, so there are no head to count.",
15134
+ "empty.column": "Nobody's staked a claim here.",
15135
+ "empty.prs": "No telegrams are waiting on the sheriff's signature for this dossier.",
15136
+ "empty.builds": "No boiler tests on record for this dossier's pull requests.",
15137
+ "empty.deployments": "This dossier names no station, so there is no 5:15 to watch for.",
15138
+ "empty.links": "No links between this dossier's claims. Open country, no track laid.",
15139
+ "empty.ask": "Pick a question, or wire your own. Every answer names the claims it rests on.",
15140
+ "loading.dossiers": "Getting up steam…",
15141
+ "loading.dossier": "Getting up steam for {name}…",
15142
+ "loading.graph": "Surveying the line…",
15143
+ "loading.answer": "Keying the reply…",
15144
+ "ask.placeholder": "Wire the operator about {name}",
15145
+ "ask.placeholder.short": "Wire the operator",
15146
+ "ask.welcome": "Wire the operator about {name}: how the cattle drive is going, who is working which claim, which axles are busted. Every answer names the claims it rests on.",
15147
+ "status.cache": "Reading the station log",
15148
+ "status.live": "Wiring the tracker",
15149
+ "status.registry": "Checking the timetable",
15150
+ "status.writing": "Keying the reply",
15151
+ "status.done": "Wired back in {seconds} s",
15152
+ "status.stopped": "Line cut after {seconds} s"
15153
+ },
15154
+ voice: "Speak like a dry frontier telegraph operator who also keeps the engine running: plain-spoken, unhurried and a little drawled, in short sentences, with the odd steam-age word for the machinery. Work items are claims, the sprint is the cattle drive, a pull request is a telegram waiting on the sheriff's signature, a build is the boiler test, a deployment is the 5:15 leaving the station, a blocker is a busted axle, and what needs attention is wanted. Say where the drive stands first, then what is busted and what it is holding up, then what would get it moving. Dry humour is fine, aimed at the machinery or the paperwork and never at a person. These words go around the facts, never instead of them."
15155
+ },
15156
+ {
15157
+ name: "overworld",
15158
+ label: "Overworld",
15159
+ description: "A top-down 16-bit adventure: an overworld map at the page's edges, panels as dungeon rooms walled in stone, a heart meter for the days left in the sprint and a gem counter for its points, chests that open as quests are done, and the agent as an old sage in a cave.",
15160
+ schemes: { "dark": {
15161
+ "bg": "#111c16",
15162
+ "surface": "#1a2620",
15163
+ "raised": "#223129",
15164
+ "ink": "#f3efdc",
15165
+ "muted": "#bcc7b4",
15166
+ "line": "#4d6355",
15167
+ "accent": "#5cc46e",
15168
+ "accentInk": "#0b120e",
15169
+ "link": "#f2c94c",
15170
+ "focus": "#ffd75e",
15171
+ "ok": "#7ed98f",
15172
+ "warn": "#f2b84b",
15173
+ "danger": "#ff8a7a",
15174
+ "bannerBg": "#0b120e",
15175
+ "bannerInk": "#f3efdc"
15176
+ } },
15177
+ fonts: {
15178
+ "body": "'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif",
15179
+ "display": "'Press Start 2P', 'IBM Plex Sans', system-ui, sans-serif",
15180
+ "mono": "ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace"
15181
+ },
15182
+ radius: "0px",
15183
+ motion: "subtle",
15184
+ ambient: { "particles": "fairies" },
15185
+ sounds: {},
15186
+ assets: {
15187
+ "overworld": "assets/overworld.webp",
15188
+ "map": "assets/dungeon-map.webp",
15189
+ "wall": "assets/stone-wall.svg",
15190
+ "heart": "assets/heart.svg",
15191
+ "heartEmpty": "assets/heart-empty.svg",
15192
+ "gem": "assets/gem.svg",
15193
+ "chest": "assets/chest.svg",
15194
+ "chestOpen": "assets/chest-open.svg",
15195
+ "key": "assets/key.svg",
15196
+ "blocked": "assets/locked-door.svg",
15197
+ "portrait": "assets/sage.webp",
15198
+ "emptyState": "assets/empty-room.webp",
15199
+ "loading": "assets/sage-cave.webp",
15200
+ "mark": "assets/mark.svg",
15201
+ "momentTitle": "assets/moments/title.webp",
15202
+ "momentMap": "assets/moments/map-sheet.webp",
15203
+ "momentStep": "assets/moments/step.svg",
15204
+ "momentChest": "assets/moments/chest-open.svg",
15205
+ "momentBrazier": "assets/moments/brazier-lit.svg",
15206
+ "momentSnuffed": "assets/moments/brazier-out.svg",
15207
+ "momentDoor": "assets/moments/door-open.svg",
15208
+ "momentKey": "assets/moments/key-raised.svg",
15209
+ "momentCampfire": "assets/moments/campfire.svg"
15210
+ },
15211
+ moments: {
15212
+ "splash": {
15213
+ "art": {
15214
+ "art": "momentTitle",
15215
+ "width": 336,
15216
+ "height": 210
15217
+ },
15218
+ "motif": "drop",
15219
+ "line": "The map unrolls. The road begins at your dossiers."
15220
+ },
15221
+ "loader": {
15222
+ "art": {
15223
+ "art": "momentMap",
15224
+ "width": 128,
15225
+ "height": 128,
15226
+ "frames": 8
15227
+ },
15228
+ "loop": "frames",
15229
+ "track": {
15230
+ "art": "momentStep",
15231
+ "size": 12,
15232
+ "count": 6,
15233
+ "motif": "march"
15234
+ },
15235
+ "flavour": [
15236
+ "Unrolling the map one square at a time.",
15237
+ "Following the old road east.",
15238
+ "Asking the fairies which way the tracker went.",
15239
+ "Lighting the next torch in the corridor.",
15240
+ "Reading the signpost at the crossroads.",
15241
+ "Waiting for the drawbridge to lower."
15242
+ ]
15243
+ },
15244
+ "tips": { "label": "The sage's counsel" },
15245
+ "entrance": "slide",
15246
+ "tabs": "fade",
15247
+ "events": {
15248
+ "item-done": {
15249
+ "art": "momentChest",
15250
+ "width": 64,
15251
+ "height": 64,
15252
+ "motif": "pop",
15253
+ "label": "Quest complete"
15254
+ },
15255
+ "build-passed": {
15256
+ "art": "momentBrazier",
15257
+ "width": 64,
15258
+ "height": 64,
15259
+ "motif": "grow",
15260
+ "label": "Trial cleared"
15261
+ },
15262
+ "build-failed": {
15263
+ "art": "momentSnuffed",
15264
+ "width": 64,
15265
+ "height": 64,
15266
+ "motif": "drop",
15267
+ "label": "Trial lost"
15268
+ },
15269
+ "blocker-cleared": {
15270
+ "art": "momentDoor",
15271
+ "width": 64,
15272
+ "height": 64,
15273
+ "motif": "slide",
15274
+ "label": "Door unlocked"
15275
+ },
15276
+ "pr-merged": {
15277
+ "art": "momentKey",
15278
+ "width": 64,
15279
+ "height": 64,
15280
+ "motif": "rise",
15281
+ "label": "Item obtained"
15282
+ },
15283
+ "sprint-ended": {
15284
+ "art": "momentCampfire",
15285
+ "width": 64,
15286
+ "height": 64,
15287
+ "motif": "fade",
15288
+ "label": "Journey's end"
15289
+ }
15290
+ },
15291
+ "recap": { "label": "Tales of the journey" }
15292
+ },
15293
+ terms: {
15294
+ "epic": "Grand quest",
15295
+ "board": "Quest log",
15296
+ "sprint": "Journey",
15297
+ "agent": "Sage",
15298
+ "dependencies": "Dungeon map",
15299
+ "blocked": "Locked door"
15300
+ },
15301
+ lexicon: {
15302
+ "dossiers.lede": "Each dossier is one land to explore: its repositories, its tracker, its pipelines and its environments. Pick one to walk its stories, pull requests, builds and deployments on a single map.",
15303
+ "dossier.eyebrow": "The overworld",
15304
+ "settings.eyebrow": "The sage's cave",
15305
+ "attention.note": "Open items ranked by their insights, the most perilous first. Each insight names the data it rests on.",
15306
+ "aging.note": "How long each quest in progress has been under way, from its history, oldest first.",
15307
+ "trace.note": "Each work item with the pull requests that name it, their latest builds, and the sealed doors it has opened.",
15308
+ "graph.note": "Arrows run the way each link reads, from the source's own links. Blocking chains run left to right: follow the key path.",
15309
+ "ask.note": "Answers cite the items they rest on. The sage reads; it never changes a ticket. What it advises comes back as a proposal for you to carry out.",
15310
+ "empty.dossiers": "The map is blank: toil sees no dossiers yet. A dossier is charted with toil dossiers init.",
15311
+ "empty.sprint": "No journey is under way in this dossier's work items.",
15312
+ "empty.burnup": "No journey is under way, so there is no trail to chart.",
15313
+ "empty.column": "An empty room.",
15314
+ "empty.prs": "No items wait to be appraised at the shop for this dossier.",
15315
+ "empty.builds": "No dungeon trials have run for this dossier's pull requests.",
15316
+ "empty.deployments": "This dossier names no environment, so there is no sealed door to open.",
15317
+ "empty.links": "No links between this dossier's items: every door stands open.",
15318
+ "empty.ask": "Pick a question, or ask your own. The sage names every item an answer rests on.",
15319
+ "loading.dossiers": "Unrolling the map…",
15320
+ "loading.dossier": "Walking the paths of {name}…",
15321
+ "loading.graph": "Drawing the dungeon map…",
15322
+ "loading.answer": "The sage is thinking…",
15323
+ "ask.placeholder": "Ask the sage about {name}",
15324
+ "ask.placeholder.short": "Ask the sage",
15325
+ "ask.welcome": "Ask the sage about {name}: how the journey goes, who carries which quest, which doors are locked. Every answer names the items it rests on.",
15326
+ "status.cache": "Reading the old scrolls",
15327
+ "status.live": "Sending a fairy to the tracker",
15328
+ "status.registry": "Reading the shop's price list",
15329
+ "status.writing": "Writing the advice",
15330
+ "status.done": "Answered in {seconds} s",
15331
+ "status.stopped": "Left the cave after {seconds} s"
15332
+ },
15333
+ voice: "Speak as an old sage in a cave at the edge of the overworld, advising a young hero before the road ahead: brief, warm and a little mysterious, in short sentences, with now and then one cryptic line that still points somewhere useful. Work items are quests, the sprint is the journey, the board is the quest log, a pull request is an item waiting to be appraised at the shop, a build is the dungeon trial, a deployment is opening a sealed door, a blocker is a locked door whose key lies elsewhere, and the critical chain of blockers is the key path. Say how the journey stands first, then which doors are locked and where their keys lie, then what to do next. Kind to every person. The riddles go around the facts, never instead of them: every figure, date and name stays plain."
14189
15334
  }
14190
15335
  ].map((t) => [t.name, t]));
14191
15336
  /** Thrown for a theme the server doesn't have; the server answers it as a 400. */
@@ -14565,6 +15710,7 @@ var AgentHost = class {
14565
15710
  return this.adapterOptions().options.map((a) => ({
14566
15711
  name: a.name,
14567
15712
  label: a.label,
15713
+ model: a.model,
14568
15714
  problem: a.problem,
14569
15715
  workspace: this.runtimes.find((r) => r.name === a.name)?.workspace === true
14570
15716
  }));
@@ -14840,6 +15986,190 @@ var AgentHost = class {
14840
15986
  return this.status();
14841
15987
  }
14842
15988
  };
15989
+ /** A label at the start of a line: alone, or followed by a colon or dash and its text; Markdown the model adds anyway (a #, bold) is let through. "Evidence shows" is prose, not a label. */
15990
+ var LABEL = /^[ \t]*(?:#{1,6}[ \t]*)?(?:\*\*|__)?(recommendation|issues|evidence)(?:(?:\*\*|__)?[ \t]*[:\-–—](?:\*\*|__)?[ \t]*(.*)|(?:\*\*|__)?[ \t]*)$/gim;
15991
+ var BULLET = /^[ \t]*(?:\d{1,2}[.)]|[-*•])[ \t]+/;
15992
+ var NONE = /^(?:none|nothing(?: stands out)?|no issues?)\.?$/i;
15993
+ /** "Build failing: [[id]] fails its build" → its short name and the sentence; a sentence with no short name keeps its whole text. */
15994
+ function issueOf(line) {
15995
+ const text = line.replace(BULLET, "").trim();
15996
+ const m = /^([^:[\]]{1,60}):\s+(.+)$/s.exec(text);
15997
+ return m ? {
15998
+ title: m[1].trim(),
15999
+ text: m[2].trim()
16000
+ } : {
16001
+ title: null,
16002
+ text
16003
+ };
16004
+ }
16005
+ var paragraphs = (text) => text.split(/\n\s*\n/).map((p) => p.trim()).filter(Boolean);
16006
+ /**
16007
+ * Reads the Recommendation, Issues and Evidence back out of an answer's
16008
+ * text. Null when it has no Recommendation label: that answer is shown as
16009
+ * it came. Text before the first label goes to the end of the evidence, so
16010
+ * nothing the agent wrote is lost.
16011
+ */
16012
+ function structureOf(text) {
16013
+ const marks = [...text.matchAll(LABEL)].map((m) => ({
16014
+ label: m[1].toLowerCase(),
16015
+ start: m.index,
16016
+ rest: m[2] ?? "",
16017
+ end: m.index + m[0].length
16018
+ }));
16019
+ const first = marks.find((m) => m.label === "recommendation");
16020
+ if (!first) return null;
16021
+ const used = marks.filter((m, i) => m.start >= first.start && marks.findIndex((n) => n.label === m.label && n.start >= first.start) === i);
16022
+ const section = (label) => {
16023
+ const at = used.findIndex((m) => m.label === label);
16024
+ if (at < 0) return null;
16025
+ const m = used[at];
16026
+ const next = used[at + 1]?.start ?? text.length;
16027
+ return `${m.rest}\n${text.slice(m.end, next)}`.trim();
16028
+ };
16029
+ const recommendation = (section("recommendation") ?? "").replace(/\s*\n\s*/g, " ").trim();
16030
+ if (!recommendation) return null;
16031
+ const lines = (section("issues") ?? "").split("\n").map((l) => l.trim()).filter(Boolean);
16032
+ const bulleted = lines.some((l) => BULLET.test(l));
16033
+ const raw = [];
16034
+ for (const line of lines) if (!bulleted || BULLET.test(line) || !raw.length) raw.push(line);
16035
+ else raw[raw.length - 1] += ` ${line}`;
16036
+ const issues = raw.filter((l) => !NONE.test(l.replace(BULLET, "").trim())).map(issueOf);
16037
+ const before = text.slice(0, first.start).trim();
16038
+ const evidence = [
16039
+ ...paragraphs(section("evidence") ?? ""),
16040
+ ...issues.slice(3).map((i) => i.title ? `${i.title}: ${i.text}` : i.text),
16041
+ ...paragraphs(before)
16042
+ ];
16043
+ return {
16044
+ recommendation,
16045
+ issues: issues.slice(0, 3),
16046
+ evidence,
16047
+ extraIssues: Math.max(0, issues.length - 3)
16048
+ };
16049
+ }
16050
+ /** The answer's text, its paragraphs joined back, for `structureOf`. */
16051
+ var textOfParts = (parts) => parts.map((p) => p.text).join("\n\n");
16052
+ var open = (i) => i.statusCategory !== "DONE";
16053
+ /** The snapshot of a dossier's items at a moment, by the same blocks rule the sprint panel uses. */
16054
+ function snapshotOf(items, now) {
16055
+ const byId = new Map(items.map((i) => [i.id, i]));
16056
+ const blocked = [];
16057
+ for (const item of items) {
16058
+ if (!open(item)) continue;
16059
+ const by = item.links.filter((l) => l.type === "blocks" && l.direction === "inward" && byId.has(l.target) && open(byId.get(l.target))).map((l) => l.target);
16060
+ if (by.length) blocked.push({
16061
+ id: item.id,
16062
+ by: [...new Set(by)].sort()
16063
+ });
16064
+ }
16065
+ const points = {};
16066
+ for (const item of items) if (item.estimate?.unit === "points") points[item.id] = item.estimate.value;
16067
+ const h = health([...items], [], now);
16068
+ return {
16069
+ blocked: blocked.sort((a, b) => a.id.localeCompare(b.id)),
16070
+ points,
16071
+ sprint: h ? {
16072
+ name: h.sprint.name,
16073
+ done: h.done.points,
16074
+ remaining: h.remaining.points
16075
+ } : null
16076
+ };
16077
+ }
16078
+ /** An Analyze answer, finished, as a record for the history. */
16079
+ function recordOf(answer, o) {
16080
+ const s = structureOf(textOfParts(answer.parts));
16081
+ return {
16082
+ id: o.id,
16083
+ dossier: o.dossier,
16084
+ startedAt: o.startedAt,
16085
+ at: o.at,
16086
+ adapter: answer.adapter ?? null,
16087
+ model: answer.model ?? null,
16088
+ by: answer.by,
16089
+ usage: answer.usage ?? null,
16090
+ recommendation: s?.recommendation ?? null,
16091
+ issues: s?.issues ?? [],
16092
+ parts: answer.parts,
16093
+ citations: answer.citations.length ? answer.citations : citationsOf(answer.parts),
16094
+ unverified: answer.unverified ?? [],
16095
+ warnings: answer.warnings ?? [],
16096
+ proposals: answer.proposals,
16097
+ snapshot: o.snapshot
16098
+ };
16099
+ }
16100
+ /** What changed from `before` to `after`; `before` null is the first analysis, which has nothing to compare with. */
16101
+ function changesBetween(before, after) {
16102
+ if (!before) return {
16103
+ previous: null,
16104
+ newlyBlocked: [],
16105
+ cleared: [],
16106
+ points: [],
16107
+ sprint: null,
16108
+ cited: [],
16109
+ dropped: [],
16110
+ recommendationChanged: false
16111
+ };
16112
+ const was = new Map(before.snapshot.blocked.map((b) => [b.id, new Set(b.by)]));
16113
+ const now = new Set(after.snapshot.blocked.map((b) => b.id));
16114
+ const newlyBlocked = after.snapshot.blocked.filter((b) => !was.has(b.id) || b.by.some((by) => !was.get(b.id).has(by)));
16115
+ const cleared = before.snapshot.blocked.filter((b) => !now.has(b.id)).map((b) => b.id);
16116
+ const points = [.../* @__PURE__ */ new Set([...Object.keys(before.snapshot.points), ...Object.keys(after.snapshot.points)])].sort().flatMap((id) => {
16117
+ const from = before.snapshot.points[id] ?? null;
16118
+ const to = after.snapshot.points[id] ?? null;
16119
+ return from === to ? [] : [{
16120
+ id,
16121
+ from,
16122
+ to
16123
+ }];
16124
+ });
16125
+ const a = before.snapshot.sprint;
16126
+ const b = after.snapshot.sprint;
16127
+ const sprintMoved = a?.name !== b?.name || a?.done !== b?.done || a?.remaining !== b?.remaining;
16128
+ const cited = after.citations.filter((id) => !before.citations.includes(id));
16129
+ const dropped = before.citations.filter((id) => !after.citations.includes(id));
16130
+ const recommendationChanged = (before.recommendation ?? "") !== (after.recommendation ?? "");
16131
+ return {
16132
+ previous: {
16133
+ id: before.id,
16134
+ at: before.at
16135
+ },
16136
+ newlyBlocked,
16137
+ cleared,
16138
+ points,
16139
+ sprint: sprintMoved ? {
16140
+ from: a,
16141
+ to: b
16142
+ } : null,
16143
+ cited,
16144
+ dropped,
16145
+ recommendationChanged
16146
+ };
16147
+ }
16148
+ /** The history, newest first, each with what changed since the one before. `records` may come in any order. */
16149
+ function historyOf$1(records) {
16150
+ const oldest = [...records].sort((a, b) => a.at.localeCompare(b.at) || a.id.localeCompare(b.id));
16151
+ return oldest.map((r, i) => ({
16152
+ id: r.id,
16153
+ at: r.at,
16154
+ adapter: r.adapter,
16155
+ model: r.model,
16156
+ by: r.by,
16157
+ recommendation: r.recommendation,
16158
+ issues: r.issues,
16159
+ citations: r.citations,
16160
+ unverified: r.unverified.length,
16161
+ changes: changesBetween(oldest[i - 1] ?? null, r)
16162
+ })).reverse();
16163
+ }
16164
+ /** One record opened, with what changed since the one before it. */
16165
+ function viewOf(records, id) {
16166
+ const oldest = [...records].sort((a, b) => a.at.localeCompare(b.at) || a.id.localeCompare(b.id));
16167
+ const i = oldest.findIndex((r) => r.id === id);
16168
+ return i < 0 ? null : {
16169
+ record: oldest[i],
16170
+ changes: changesBetween(oldest[i - 1] ?? null, oldest[i])
16171
+ };
16172
+ }
14843
16173
  //#endregion
14844
16174
  //#region server/sqlite.ts
14845
16175
  var loaded;
@@ -14888,6 +16218,10 @@ function loadSqlite() {
14888
16218
  * fact a sync recorded, each source's syncs, the agent's runs and the
14889
16219
  * lines a person added. A sync upserts its facts by key, so the same fact
14890
16220
  * is one row however often it's synced.
16221
+ * - **analyses**: every Analyze (#395), its answer and a snapshot of what
16222
+ * the dossier looked like when it was made (src/model/analysis.ts), kept
16223
+ * per dossier like the worklog: a sync never rewrites it, and the newest
16224
+ * 100 of a dossier stay until the retention period ends or a wipe.
14891
16225
  * - **usage**: the agent's model usage (#295), one row per report an SDK
14892
16226
  * made, apart from everything a sync writes. Forgetting a dossier or a
14893
16227
  * sync's cleanup never touches it, so a total never drops and a cap never
@@ -15051,6 +16385,20 @@ var MIGRATIONS = [
15051
16385
  note TEXT NOT NULL,
15052
16386
  PRIMARY KEY (dossier, id)
15053
16387
  );
16388
+ `
16389
+ },
16390
+ {
16391
+ version: 4,
16392
+ description: "every Analyze kept per dossier, with a snapshot of what it saw (#395)",
16393
+ sql: `
16394
+ CREATE TABLE analyses (
16395
+ dossier TEXT NOT NULL,
16396
+ id TEXT NOT NULL,
16397
+ at TEXT NOT NULL,
16398
+ record TEXT NOT NULL,
16399
+ PRIMARY KEY (dossier, id)
16400
+ );
16401
+ CREATE INDEX analyses_at ON analyses (dossier, at);
15054
16402
  `
15055
16403
  }
15056
16404
  ];
@@ -15077,6 +16425,10 @@ var WORKLOG_TABLES = [
15077
16425
  "agent_runs",
15078
16426
  "notes"
15079
16427
  ];
16428
+ /** How far before the last good sync a newly listed fact may be and still count as news: the clocks may disagree (#419). */
16429
+ var NEWS_SKEW_MS = 3e5;
16430
+ /** The tables kept per dossier that a sync never rewrites: the worklog's, and the analyses (#395). */
16431
+ var KEPT_TABLES = [...WORKLOG_TABLES, "analyses"];
15080
16432
  /** The one message every OS gives for a wipe while Toil UI runs. */
15081
16433
  var RUNNING_MESSAGE = "Toil UI is running; stop it, or use Wipe in the UI.";
15082
16434
  /** True while a process with this id exists (EPERM: it exists, under another account). */
@@ -15326,7 +16678,7 @@ var Cache = class Cache {
15326
16678
  "transitions",
15327
16679
  "change_refs",
15328
16680
  "sources",
15329
- ...WORKLOG_TABLES
16681
+ ...KEPT_TABLES
15330
16682
  ]) this.db.prepare(`DELETE FROM ${table} WHERE dossier = ?`).run(dossier);
15331
16683
  this.db.prepare("DELETE FROM dossiers WHERE name = ?").run(dossier);
15332
16684
  });
@@ -15351,7 +16703,7 @@ var Cache = class Cache {
15351
16703
  "transitions",
15352
16704
  "change_refs",
15353
16705
  "sources",
15354
- ...WORKLOG_TABLES
16706
+ ...KEPT_TABLES
15355
16707
  ]) this.db.prepare(`DELETE FROM ${table} WHERE dossier = ?`).run(to);
15356
16708
  this.db.prepare("DELETE FROM dossiers WHERE name = ?").run(to);
15357
16709
  const rows = this.db.prepare("SELECT command, input_key, envelope FROM responses WHERE dossier = ?").all(from);
@@ -15379,6 +16731,13 @@ var Cache = class Cache {
15379
16731
  dossier: to
15380
16732
  }), from, r.id).changes);
15381
16733
  }
16734
+ for (const r of this.db.prepare("SELECT id, record FROM analyses WHERE dossier = ?").all(from)) {
16735
+ const record = JSON.parse(r.record);
16736
+ moved += Number(this.db.prepare("UPDATE analyses SET dossier = ?, record = ? WHERE dossier = ? AND id = ?").run(to, JSON.stringify({
16737
+ ...record,
16738
+ dossier: to
16739
+ }), from, r.id).changes);
16740
+ }
15382
16741
  moved += Number(this.db.prepare("UPDATE dossiers SET name = ? WHERE name = ?").run(to, from).changes);
15383
16742
  });
15384
16743
  return moved;
@@ -15397,9 +16756,15 @@ var Cache = class Cache {
15397
16756
  * failed one keeps its last good copy. Items, transitions and change refs
15398
16757
  * are the dossier's whole picture as the sync saw it (the sync hands the
15399
16758
  * loader a failed source's last good copy, so a failure never blanks them).
16759
+ *
16760
+ * Returns the facts this sync recorded for the first time (#419), which the
16761
+ * theme moments play: none on a dossier's first sync, when everything in its
16762
+ * history would be new, and none from before the last good sync, so a fact
16763
+ * a source only now lists (an old build, a closed issue) isn't news.
15400
16764
  */
15401
16765
  saveDossier(save) {
15402
16766
  const at = save.finishedAt;
16767
+ let news = [];
15403
16768
  this.transaction(() => {
15404
16769
  const previous = this.db.prepare("SELECT name FROM dossiers WHERE name = ?").get(save.dossier);
15405
16770
  const lastGood = this.db.prepare("SELECT MAX(at) AS at FROM sync_runs WHERE dossier = ? AND ok = 1").get(save.dossier).at;
@@ -15417,6 +16782,9 @@ var Cache = class Cache {
15417
16782
  }, at, lastGood)];
15418
16783
  const fact = this.db.prepare(`INSERT INTO worklog_events (dossier, key, day, at, kind, event, synced_at) VALUES (?, ?, ?, ?, ?, ?, ?)
15419
16784
  ON CONFLICT (dossier, key) DO UPDATE SET day = excluded.day, at = excluded.at, kind = excluded.kind, event = excluded.event, synced_at = excluded.synced_at`);
16785
+ const known = new Set(this.db.prepare("SELECT key FROM worklog_events WHERE dossier = ?").all(save.dossier).map((r) => r.key));
16786
+ const since = lastGood ? Date.parse(lastGood) - NEWS_SKEW_MS : null;
16787
+ news = previous && since !== null ? facts.filter((e) => !known.has(e.key) && (e.observed !== null || Date.parse(e.at) >= since)) : [];
15420
16788
  for (const e of facts) fact.run(save.dossier, e.key, dayOf(e.at), e.at, e.kind, JSON.stringify(e), at);
15421
16789
  const run = this.db.prepare("INSERT OR REPLACE INTO sync_runs (dossier, area, at, ok, error) VALUES (?, ?, ?, ?, ?)");
15422
16790
  for (const s of save.sources) run.run(save.dossier, s.area, at, s.ok ? 1 : 0, s.error);
@@ -15454,6 +16822,7 @@ var Cache = class Cache {
15454
16822
  this.db.prepare("INSERT INTO dossiers (name, last_sync_at, status, error) VALUES (?, ?, ?, ?) ON CONFLICT (name) DO UPDATE SET last_sync_at = excluded.last_sync_at, status = excluded.status, error = excluded.error").run(save.dossier, at, status, error);
15455
16823
  });
15456
16824
  this.prune();
16825
+ return news;
15457
16826
  }
15458
16827
  /** The facts a sync recorded for a dossier: one day's, or every one the cache holds. */
15459
16828
  worklogEvents(dossier, day) {
@@ -15485,6 +16854,17 @@ var Cache = class Cache {
15485
16854
  notes(dossier, day) {
15486
16855
  return (day === void 0 ? this.db.prepare("SELECT note FROM notes WHERE dossier = ? ORDER BY at, id").all(dossier) : this.db.prepare("SELECT note FROM notes WHERE dossier = ? AND day = ? ORDER BY at, id").all(dossier, day)).map((r) => JSON.parse(r.note));
15487
16856
  }
16857
+ /** Keeps one Analyze, and only the newest MAX_ANALYSES of its dossier. */
16858
+ saveAnalysis(record) {
16859
+ this.transaction(() => {
16860
+ this.db.prepare("INSERT OR REPLACE INTO analyses (dossier, id, at, record) VALUES (?, ?, ?, ?)").run(record.dossier, record.id, record.at, JSON.stringify(record));
16861
+ this.db.prepare("DELETE FROM analyses WHERE dossier = ? AND id NOT IN (SELECT id FROM analyses WHERE dossier = ? ORDER BY at DESC, id DESC LIMIT ?)").run(record.dossier, record.dossier, 100);
16862
+ });
16863
+ }
16864
+ /** A dossier's analyses, oldest first. */
16865
+ analyses(dossier) {
16866
+ return this.db.prepare("SELECT record FROM analyses WHERE dossier = ? ORDER BY at, id").all(dossier).map((r) => JSON.parse(r.record));
16867
+ }
15488
16868
  /** Deletes every row last synced before the retention period. Returns how many went. */
15489
16869
  prune() {
15490
16870
  const cutoff = (/* @__PURE__ */ new Date(this.now().getTime() - this.retentionDays * DAY)).toISOString();
@@ -15503,6 +16883,7 @@ var Cache = class Cache {
15503
16883
  removed += Number(this.db.prepare("DELETE FROM sync_runs WHERE at < ?").run(cutoff).changes);
15504
16884
  removed += Number(this.db.prepare("DELETE FROM agent_runs WHERE started_at < ?").run(cutoff).changes);
15505
16885
  removed += Number(this.db.prepare("DELETE FROM notes WHERE at < ?").run(cutoff).changes);
16886
+ if (this.db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'analyses'").get()) removed += Number(this.db.prepare("DELETE FROM analyses WHERE at < ?").run(cutoff).changes);
15506
16887
  });
15507
16888
  return removed;
15508
16889
  }
@@ -15542,7 +16923,7 @@ var Cache = class Cache {
15542
16923
  "sources",
15543
16924
  "dossiers",
15544
16925
  "usage",
15545
- ...WORKLOG_TABLES
16926
+ ...KEPT_TABLES
15546
16927
  ]) out[table] = Number(this.db.prepare(`SELECT COUNT(*) AS n FROM ${table}`).get().n);
15547
16928
  return out;
15548
16929
  }
@@ -15638,6 +17019,81 @@ function settingsFrom(env) {
15638
17019
  } };
15639
17020
  }
15640
17021
  //#endregion
17022
+ //#region src/analyses.ts
17023
+ /** The history in memory: the preview's, and the App's when it is given none. `seed` is what it starts with. */
17024
+ function memoryAnalyses(seed = []) {
17025
+ const kept = [...seed];
17026
+ let n = 0;
17027
+ const of = (dossier) => kept.filter((r) => r.dossier === dossier);
17028
+ return {
17029
+ list: async (dossier) => historyOf$1(of(dossier)),
17030
+ get: async (dossier, id) => viewOf(of(dossier), id),
17031
+ record: async (dossier, answer, { startedAt, at, items, now }) => {
17032
+ const id = `analysis-${Date.parse(at).toString(36)}-${(n++).toString(36)}`;
17033
+ kept.push(recordOf(answer, {
17034
+ id,
17035
+ dossier,
17036
+ startedAt,
17037
+ at,
17038
+ snapshot: snapshotOf(items, now)
17039
+ }));
17040
+ const mine = of(dossier).sort((a, b) => a.at.localeCompare(b.at));
17041
+ for (const old of mine.slice(0, Math.max(0, mine.length - 100))) kept.splice(kept.indexOf(old), 1);
17042
+ return id;
17043
+ }
17044
+ };
17045
+ }
17046
+ //#endregion
17047
+ //#region server/analyses.ts
17048
+ /**
17049
+ * The history of analyses, server side (#395). Every Analyze the server
17050
+ * answers is kept here as its answer ends, finished and whole: a stopped or
17051
+ * failed one is not an analysis. The record holds when it was asked and
17052
+ * answered, the adapter and model, what it used, its recommendation and
17053
+ * issues, the whole answer, the ids it cited and the ones the citation check
17054
+ * flagged, and a snapshot of the dossier's items at that moment
17055
+ * (src/model/analysis.ts), so the list can say what changed from one to the
17056
+ * next by code. The cache keeps them (`analyses`, schema 4), so they survive
17057
+ * a restart and go with `toil-ui wipe`; the sample keeps them in memory. The
17058
+ * page only reads: nothing it sends can write a record. Minutes taken by
17059
+ * the clerk, never by the people being minuted.
17060
+ */
17061
+ /** An answer that is whole: not a partial still streaming, and with something in it. */
17062
+ var isWhole = (a) => !!a && !a.activity && a.parts.length > 0;
17063
+ /** The cache's history: what a real Toil UI keeps. `cache` is a getter, since a wipe swaps the file underneath. */
17064
+ function cacheAnalyses(cache, now = () => (/* @__PURE__ */ new Date()).toISOString()) {
17065
+ return {
17066
+ list: async (dossier) => historyOf$1(cache().analyses(dossier)),
17067
+ get: async (dossier, id) => viewOf(cache().analyses(dossier), id),
17068
+ record: async (dossier, answer, startedAt) => {
17069
+ const at = now();
17070
+ const id = randomUUID();
17071
+ cache().saveAnalysis(recordOf(answer, {
17072
+ id,
17073
+ dossier,
17074
+ startedAt,
17075
+ at,
17076
+ snapshot: snapshotOf(cache().items(dossier), at)
17077
+ }));
17078
+ return id;
17079
+ }
17080
+ };
17081
+ }
17082
+ /** The sample's history (`toil-ui --sample`): kept in memory for this run, from the sample's own items. */
17083
+ function sampleAnalyses(api, items, now) {
17084
+ const memory = api.record ? api : memoryAnalyses();
17085
+ return {
17086
+ list: (dossier) => memory.list(dossier),
17087
+ get: (dossier, id) => memory.get(dossier, id),
17088
+ record: async (dossier, answer, startedAt) => memory.record(dossier, answer, {
17089
+ startedAt,
17090
+ at: (/* @__PURE__ */ new Date()).toISOString(),
17091
+ items: await items(dossier),
17092
+ now: now()
17093
+ })
17094
+ };
17095
+ }
17096
+ //#endregion
15641
17097
  //#region server/agents/mcp.ts
15642
17098
  /**
15643
17099
  * A small MCP server over loopback HTTP, for the one SDK that takes tools
@@ -16061,7 +17517,7 @@ var SyncService = class {
16061
17517
  watermark: s.error === null ? (/* @__PURE__ */ new Date(Date.parse(run.startedAt) - SKEW_MS)).toISOString() : null,
16062
17518
  calls: s.calls
16063
17519
  }));
16064
- this.cache.saveDossier({
17520
+ const news = this.cache.saveDossier({
16065
17521
  dossier: name,
16066
17522
  startedAt: run.startedAt,
16067
17523
  finishedAt: this.now().toISOString(),
@@ -16071,6 +17527,10 @@ var SyncService = class {
16071
17527
  deployments: loaded.deployments,
16072
17528
  sources
16073
17529
  });
17530
+ if (news.length) (this.job.news ??= []).push({
17531
+ dossier: name,
17532
+ events: [...news].sort((a, b) => a.at < b.at ? -1 : a.at > b.at ? 1 : 0).slice(-50)
17533
+ });
16074
17534
  const failed = sources.filter((s) => !s.ok);
16075
17535
  this.say(`${name}: ${loaded.items.length} items, ${loaded.changes.length} changes, ${loaded.deployments.length} deployments${failed.length ? `; ${failed.map((s) => s.area).join(", ")} failed, showing the last good copy` : ""}`);
16076
17536
  }
@@ -16249,7 +17709,8 @@ function idle() {
16249
17709
  pages: 0,
16250
17710
  retries: 0,
16251
17711
  messages: [],
16252
- error: null
17712
+ error: null,
17713
+ news: []
16253
17714
  };
16254
17715
  }
16255
17716
  //#endregion
@@ -16627,7 +18088,7 @@ var AssignmentQueue = class {
16627
18088
  }
16628
18089
  get(id) {
16629
18090
  const r = this.records.get(id);
16630
- if (!r) throw new AssignError(`There is no assignment ${id}.`, "Open the Agents lane on the dossier to see its assignments.", 404);
18091
+ if (!r) throw new AssignError(`There is no assignment ${id}.`, "Open the Agents sidebar on the dossier to see its assignments.", 404);
16631
18092
  return {
16632
18093
  ...structuredClone(r),
16633
18094
  ranMs: runMs(r, this.o.now())
@@ -16906,7 +18367,7 @@ var AssignmentQueue = class {
16906
18367
  }
16907
18368
  mutable(id) {
16908
18369
  const r = this.records.get(id);
16909
- if (!r) throw new AssignError(`There is no assignment ${id}.`, "Open the Agents lane on the dossier to see its assignments.", 404);
18370
+ if (!r) throw new AssignError(`There is no assignment ${id}.`, "Open the Agents sidebar on the dossier to see its assignments.", 404);
16910
18371
  return r;
16911
18372
  }
16912
18373
  note(r, kind, title, detail) {
@@ -17203,6 +18664,9 @@ DIRECTIVES.filter((d) => !d.startsWith("frame-ancestors")).join("; ");
17203
18664
  * `worklog/rebuild`, `worklog/note` and `worklog/export`, each an explicit
17204
18665
  * press on the page: a note goes into the cache, and an export is a file
17205
18666
  * toil's file service writes in the folder the person named.
18667
+ * The history of analyses (#395) is `analyses` and `analyses/one`, read
18668
+ * only: the server keeps each Analyze itself as its answer ends whole, and
18669
+ * says which on the answer's last line, so nothing the page sends writes one.
17206
18670
  * The building has one door, one key and a guest book, and the guest book is
17207
18671
  * toil's audit log.
17208
18672
  */
@@ -17213,6 +18677,39 @@ var MAX_BODY = 262144;
17213
18677
  var CSRF_HEADER = "x-toil-ui-csrf";
17214
18678
  /** The longest question the agent takes, in characters. */
17215
18679
  var MAX_PROMPT = 8e3;
18680
+ /**
18681
+ * Keeps an Analyze in the history (#395) once its answer is whole, and only
18682
+ * then: a stopped, failed or empty answer is no analysis. A record that can't
18683
+ * be kept never fails the answer; the answer says so instead.
18684
+ */
18685
+ function kept(keeper, dossier, startedAt) {
18686
+ const one = async (answer) => {
18687
+ if (!isWhole(answer)) return answer;
18688
+ try {
18689
+ return {
18690
+ ...answer,
18691
+ analysis: await keeper.record(dossier, answer, startedAt)
18692
+ };
18693
+ } catch (e) {
18694
+ return {
18695
+ ...answer,
18696
+ warnings: [...answer.warnings ?? [], `Toil UI couldn't keep this analysis in its history: ${e instanceof Error ? e.message : String(e)}`]
18697
+ };
18698
+ }
18699
+ };
18700
+ async function* stream(answers, signal) {
18701
+ let last;
18702
+ for await (const a of answers) {
18703
+ last = a;
18704
+ yield a;
18705
+ }
18706
+ if (!signal.aborted && isWhole(last)) yield await one(last);
18707
+ }
18708
+ return {
18709
+ one,
18710
+ stream
18711
+ };
18712
+ }
17216
18713
  /** The session id the page got for the launch token, on every API call. Never a cookie. */
17217
18714
  var SESSION_HEADER = "x-toil-ui-session";
17218
18715
  var TYPES = {
@@ -17496,6 +18993,11 @@ function createUiServer(options) {
17496
18993
  if (typeof value !== "string" || !value) throw new HttpError(400, `Name the ${what}.`, shape);
17497
18994
  return value;
17498
18995
  };
18996
+ /** The history of analyses, or a 404 when this server keeps none. */
18997
+ const keeper = () => {
18998
+ if (!options.analyses) throw new HttpError(404, "This Toil UI keeps no history of analyses.", "Start toil-ui with its cache to keep every Analyze.");
18999
+ return options.analyses;
19000
+ };
17499
19001
  /** The usage view, or a 404 when this server keeps none. */
17500
19002
  const usage = () => {
17501
19003
  if (!options.usage) throw new HttpError(404, "This Toil UI keeps no record of model usage.", "Start toil-ui with its cache to record what the agent uses.");
@@ -17657,14 +19159,32 @@ function createUiServer(options) {
17657
19159
  const style = checkedStyle(body);
17658
19160
  const chat = chatOf(body.chat);
17659
19161
  const extra = extraOf(body);
17660
- if (body.stream === true && agent.stream) return streamAnswer(res, agent.stream(ctx, body.dossier, body.prompt, style, chat, extra));
19162
+ const keep = body.prompt === "analyze" && options.analyses ? kept(options.analyses, body.dossier, (/* @__PURE__ */ new Date()).toISOString()) : null;
19163
+ if (body.stream === true && agent.stream) {
19164
+ const answers = agent.stream(ctx, body.dossier, body.prompt, style, chat, extra);
19165
+ return streamAnswer(res, keep ? keep.stream(answers, ctx.signal) : answers);
19166
+ }
17661
19167
  try {
17662
- json(res, 200, await agent.ask(ctx, body.dossier, body.prompt, style, chat, extra));
19168
+ const answer = await agent.ask(ctx, body.dossier, body.prompt, style, chat, extra);
19169
+ json(res, 200, keep && !ctx.signal.aborted ? await keep.one(answer) : answer);
17663
19170
  } catch (e) {
17664
19171
  json(res, 502, { error: agentFailure(e) });
17665
19172
  }
17666
19173
  return;
17667
19174
  }
19175
+ case "GET analyses": {
19176
+ const dossier = named(url.searchParams.get("dossier"), "dossier", `Ask ${base}api/analyses?dossier=<name>.`);
19177
+ json(res, 200, await keeper().list(dossier));
19178
+ return;
19179
+ }
19180
+ case "GET analyses/one": {
19181
+ const shape = `Ask ${base}api/analyses/one?dossier=<name>&id=<analysis id>.`;
19182
+ const dossier = named(url.searchParams.get("dossier"), "dossier", shape);
19183
+ const view = await keeper().get(dossier, named(url.searchParams.get("id"), "analysis", shape));
19184
+ if (!view) throw new HttpError(404, `${dossier} has no analysis by that id: it may have passed the retention period, or the cache was wiped.`, "Open the Analyses tab for the ones kept now.");
19185
+ json(res, 200, view);
19186
+ return;
19187
+ }
17668
19188
  case "GET agent/session": {
17669
19189
  const chat = url.searchParams.get("chat") ?? "";
17670
19190
  if (!CHAT_ID.test(chat)) throw new HttpError(400, "Name the chat by its id.", `Ask ${base}api/agent/session?chat=<chat id>.`);
@@ -17819,7 +19339,7 @@ function createUiServer(options) {
17819
19339
  } : body.day !== void 0 ? { day: named(body.day, "day", shape) } : { month: named(body.month, "month", shape) };
17820
19340
  return worklogCall(res, () => worklog().exportTo(named(body.dossier, "dossier", shape), what, named(body.folder, "folder", shape)));
17821
19341
  }
17822
- default: throw new HttpError(404, `There is no ${key} in the API.`, `The API is under ${base}api/: session, execute, config, config/areas, config/settings, feedback, sync, cache/wipe, usage, usage/settings, worklog/month, worklog/day, worklog/standup, worklog/rebuild, worklog/note, worklog/export, fingerprint, agent/starters, agent/ask, agent/session, agent/renew, agent/prompt, agent/settings, agent/adapters, agent/install, agent/mcp and assignments.`);
19342
+ default: throw new HttpError(404, `There is no ${key} in the API.`, `The API is under ${base}api/: session, execute, config, config/areas, config/settings, feedback, sync, cache/wipe, usage, usage/settings, worklog/month, worklog/day, worklog/standup, worklog/rebuild, worklog/note, worklog/export, analyses, analyses/one, fingerprint, agent/starters, agent/ask, agent/session, agent/renew, agent/prompt, agent/settings, agent/adapters, agent/install, agent/mcp and assignments.`);
17823
19343
  }
17824
19344
  };
17825
19345
  const serveFile = async (res, route) => {
@@ -17915,7 +19435,7 @@ var USAGE = `Usage: toil-ui [options]
17915
19435
  toil-ui wipe [--data-dir <dir>]
17916
19436
 
17917
19437
  Starts Toil UI on this machine and prints the one URL that opens it.
17918
- Alpha, local only: it binds loopback and reads through toil, read-only.
19438
+ Beta, local only: it binds loopback and reads through toil, read-only.
17919
19439
  A sync stores what the dashboards show in a cache in the data folder.
17920
19440
 
17921
19441
  Commands:
@@ -18006,7 +19526,7 @@ function themesNotice(dataDir, exists = existsSync, path = nodePath) {
18006
19526
  return `Note: Toil UI no longer reads themes from ${dir}; only its built-in themes are offered. The folder is left as it is, and you can delete it. To ask for a new theme, send a feature request from the Feedback button or with toil feedback feature.`;
18007
19527
  }
18008
19528
  /** toil's dossier names: lowercase letters, digits and single hyphens, so each is a safe folder name. */
18009
- var DOSSIER = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
19529
+ var DOSSIER$1 = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
18010
19530
  var fwd = (p) => p.replace(/\\/g, "/");
18011
19531
  var WorklogService = class {
18012
19532
  o;
@@ -18030,7 +19550,7 @@ var WorklogService = class {
18030
19550
  return join(this.folder(dossier), monthOf(day), `${day}.md`);
18031
19551
  }
18032
19552
  checkDossier(dossier) {
18033
- if (typeof dossier !== "string" || !DOSSIER.test(dossier)) throw new WorklogRefusal("Name a dossier: lowercase letters, digits and single hyphens.", "Use a name toil dossiers list shows.");
19553
+ if (typeof dossier !== "string" || !DOSSIER$1.test(dossier)) throw new WorklogRefusal("Name a dossier: lowercase letters, digits and single hyphens.", "Use a name toil dossiers list shows.");
18034
19554
  if (!this.cache.states().some((s) => s.name === dossier) && !this.cache.worklogDays(dossier).length) throw new WorklogRefusal(`Toil UI hasn't synced ${dossier}, so it has no worklog yet.`, "Press Sync now in the Sync panel; each sync records the day it saw.", 404);
18035
19555
  return dossier;
18036
19556
  }
@@ -18166,7 +19686,7 @@ var WorklogService = class {
18166
19686
  return this.serial(() => this.fold(dossier));
18167
19687
  }
18168
19688
  async fold(dossier) {
18169
- if (!DOSSIER.test(dossier)) return [];
19689
+ if (!DOSSIER$1.test(dossier)) return [];
18170
19690
  const days = this.cache.worklogDays(dossier);
18171
19691
  const written = [];
18172
19692
  for (const page of await this.pages(dossier, days)) if (this.write(this.pagePath(dossier, page.day), markdownOf(page))) written.push(page.day);
@@ -18284,7 +19804,7 @@ var WorklogService = class {
18284
19804
  * agent host; assign-to-agent (#293) will send its assignments the same way.
18285
19805
  */
18286
19806
  async recordRun(run) {
18287
- if (!DOSSIER.test(run.dossier) || run.startedAt < this.cache.openedAt) return;
19807
+ if (!DOSSIER$1.test(run.dossier) || run.startedAt < this.cache.openedAt) return;
18288
19808
  this.cache.saveRun(run);
18289
19809
  this.write(join(this.folder(run.dossier), "runs", `${run.id}.md`), transcriptOf(run));
18290
19810
  this.serial(() => this.foldDay(run.dossier, dayOf(run.startedAt))).catch(() => void 0);
@@ -18373,6 +19893,98 @@ var WorklogService = class {
18373
19893
  }
18374
19894
  };
18375
19895
  //#endregion
19896
+ //#region src/fixtures/analyses.ts
19897
+ /**
19898
+ * The sample history of analyses (#395), for the site preview and `toil-ui
19899
+ * --sample`: card-payments has two earlier Analyze answers from the scripted
19900
+ * agent, so the Analyses tab, its what-changed view and the Overview's
19901
+ * recommendation have something to show, while settlement and checkout-web
19902
+ * have none, so the code's own recommendation shows there. The latest is
19903
+ * today's scripted answer on the sample as it is; the one before it is
19904
+ * scripted too, on a snapshot made a few days earlier by hand: PAY-103 not
19905
+ * yet blocked, PAY-104 then waiting on PAY-105, PAY-102 estimated at two
19906
+ * points fewer, and three fewer points done. Every record says it was the
19907
+ * scripted preview, not a model. The latest is from the sample's own
19908
+ * morning, so the Overview leads with it. Analyze pressed in the preview is kept
19909
+ * beside them, in memory, until the page reloads. Two meetings, minuted
19910
+ * before anyone arrived.
19911
+ */
19912
+ var DOSSIER = "card-payments";
19913
+ var HOUR = 36e5;
19914
+ var at$1 = (hoursBefore) => (/* @__PURE__ */ new Date(Date.parse(FIXTURE_NOW) - hoursBefore * HOUR)).toISOString();
19915
+ var J$1 = (n) => `corp-jira:PAY-${n}`;
19916
+ /** The snapshot a few days before the sample's day, made by hand from today's. */
19917
+ function earlier(now) {
19918
+ const blocked = now.blocked.filter((b) => b.id !== J$1(103));
19919
+ if (!blocked.some((b) => b.id === J$1(104))) blocked.push({
19920
+ id: J$1(104),
19921
+ by: [J$1(105)]
19922
+ });
19923
+ const points = { ...now.points };
19924
+ const was = points[J$1(102)];
19925
+ if (was !== void 0) points[J$1(102)] = Math.max(0, was - 2);
19926
+ const sprint = now.sprint ? {
19927
+ ...now.sprint,
19928
+ done: Math.max(0, now.sprint.done - 3),
19929
+ remaining: now.sprint.remaining + 3
19930
+ } : null;
19931
+ return {
19932
+ blocked: blocked.sort((a, b) => a.id.localeCompare(b.id)),
19933
+ points,
19934
+ sprint
19935
+ };
19936
+ }
19937
+ /** The earlier scripted answer: the same shape, about what the hand-made snapshot shows. */
19938
+ var EARLIER_PARTS = [
19939
+ `Recommendation: Unblock [[${J$1(104)}]] first: it waits on [[${J$1(105)}]], and it came over from Sprint 41.`,
19940
+ [
19941
+ "Issues:",
19942
+ `1. Blocked: [[${J$1(104)}]] is blocked by [[${J$1(105)}]].`,
19943
+ `2. Build failing: [[${J$1(101)}]]'s latest build failed, and it blocks [[${J$1(102)}]].`
19944
+ ].join("\n"),
19945
+ "Evidence:",
19946
+ `The scripted preview's earlier analysis, kept so the history has one to compare with. [[${J$1(102)}]] waited on [[${J$1(101)}]]; [[${J$1(103)}]] was not blocked yet.`
19947
+ ];
19948
+ /** The sample's records, worked out from the sample's own items. */
19949
+ async function sampleAnalysisRecords() {
19950
+ const now = snapshotOf((await loadDossier(fixtureExecute().execute, DOSSIER)).items, FIXTURE_NOW);
19951
+ const answer = (texts) => {
19952
+ const parts = texts.map((text) => ({ text }));
19953
+ return {
19954
+ prompt: "Analyze",
19955
+ parts,
19956
+ citations: citationsOf(parts),
19957
+ by: "scripted",
19958
+ adapter: "scripted",
19959
+ model: null,
19960
+ proposals: []
19961
+ };
19962
+ };
19963
+ return [recordOf(answer(EARLIER_PARTS), {
19964
+ id: "sample-analysis-1",
19965
+ dossier: DOSSIER,
19966
+ startedAt: at$1(90.5),
19967
+ at: at$1(90),
19968
+ snapshot: earlier(now)
19969
+ }), recordOf(answer(analyzeParts(DOSSIER)), {
19970
+ id: "sample-analysis-2",
19971
+ dossier: DOSSIER,
19972
+ startedAt: at$1(.6),
19973
+ at: at$1(.5),
19974
+ snapshot: now
19975
+ })];
19976
+ }
19977
+ /** The preview's history: the sample's records, then whatever Analyze adds in this page. */
19978
+ function fixtureAnalyses() {
19979
+ let ready;
19980
+ const api = () => ready ??= sampleAnalysisRecords().then((seed) => memoryAnalyses(seed));
19981
+ return {
19982
+ list: async (dossier) => (await api()).list(dossier),
19983
+ get: async (dossier, id) => (await api()).get(dossier, id),
19984
+ record: async (dossier, answer, when) => (await api()).record(dossier, answer, when)
19985
+ };
19986
+ }
19987
+ //#endregion
18376
19988
  //#region src/fixtures/worklog.ts
18377
19989
  /** How long the sample says its cache keeps things, as a real one does by default. */
18378
19990
  var RETENTION = 30;
@@ -18908,7 +20520,7 @@ function sampleRecords(cards) {
18908
20520
  stop: {
18909
20521
  reason: "time",
18910
20522
  message: "Stopped at the time limit of 20 minutes, before the agent finished.",
18911
- fix: "Raise the limit in the Agents lane, or assign a smaller piece of the item."
20523
+ fix: "Raise the limit in the Agents sidebar, or assign a smaller piece of the item."
18912
20524
  },
18913
20525
  startedOn: startedOn("corp-jira:PAY-101", "codex", minutes(179), [...READ_TOOLS, "codex sandbox"], SAMPLE_FINGERPRINT_BEFORE),
18914
20526
  transcript: [
@@ -19579,7 +21191,7 @@ function hostRunner(o) {
19579
21191
  toil: o.toilVersion,
19580
21192
  toilUi: o.version,
19581
21193
  adapter,
19582
- model: null,
21194
+ model: o.host.adapterChoices().find((c) => c.name === adapter)?.model ?? null,
19583
21195
  skills: [],
19584
21196
  tools: tools.map((t) => t.name),
19585
21197
  dossier: {
@@ -19953,7 +21565,7 @@ async function main() {
19953
21565
  return 0;
19954
21566
  }
19955
21567
  if (parsed.version) {
19956
- process.stdout.write(`0.1.0-alpha.3 (toil ${version})\n`);
21568
+ process.stdout.write(`0.1.0-beta.2 (toil ${version})\n`);
19957
21569
  return 0;
19958
21570
  }
19959
21571
  const { settings } = parsed;
@@ -20012,8 +21624,8 @@ async function main() {
20012
21624
  commit: typeof toilCommit === "string" ? toilCommit : null
20013
21625
  },
20014
21626
  toilUi: {
20015
- version: "0.1.0-alpha.3",
20016
- commit: "18c02b1a5d7e734dbf01449c08613a46c857ca01"
21627
+ version: "0.1.0-beta.2",
21628
+ commit: "2397d06a20dd35eec6d4e2a8f4686e5747ff79f7"
20017
21629
  }
20018
21630
  },
20019
21631
  toilBundle: toilBundle(),
@@ -20048,7 +21660,7 @@ async function main() {
20048
21660
  };
20049
21661
  const host = cache ? new AgentHost({
20050
21662
  dataDir: settings.dataDir,
20051
- version: "0.1.0-alpha.3",
21663
+ version: "0.1.0-beta.2",
20052
21664
  data: (dossier) => {
20053
21665
  const data = cacheData(cache, dossier);
20054
21666
  return data && worklog ? {
@@ -20083,7 +21695,7 @@ async function main() {
20083
21695
  execute,
20084
21696
  mapIds,
20085
21697
  data,
20086
- version: "0.1.0-alpha.3",
21698
+ version: "0.1.0-beta.2",
20087
21699
  toilVersion: version,
20088
21700
  ...fingerprints ? { fingerprints } : {}
20089
21701
  }),
@@ -20154,11 +21766,12 @@ async function main() {
20154
21766
  ...host ? { agentControl: host } : {},
20155
21767
  ...sync ? { sync } : {},
20156
21768
  worklog: worklog ?? fixtureWorklog(),
21769
+ analyses: cache ? cacheAnalyses(() => cache) : sampleAnalyses(fixtureAnalyses(), async (dossier) => (await loadDossier(fixtureExecute().execute, dossier)).items, () => FIXTURE_NOW),
20157
21770
  usage,
20158
21771
  assignments,
20159
21772
  ...fingerprints ? { serverStatus: () => fingerprints.server() } : {},
20160
21773
  appDir: fileURLToPath(new URL("../app/", import.meta.url)),
20161
- version: "0.1.0-alpha.3",
21774
+ version: "0.1.0-beta.2",
20162
21775
  toil,
20163
21776
  config: settings.sample ? {
20164
21777
  areas: FIXTURE_AREAS,
@@ -20179,7 +21792,7 @@ async function main() {
20179
21792
  return 1;
20180
21793
  }
20181
21794
  process.stdout.write([
20182
- `Toil UI 0.1.0-alpha.3 (alpha, local only), on toil ${version}`,
21795
+ `Toil UI 0.1.0-beta.2 (beta, local only), on toil ${version}`,
20183
21796
  settings.sample ? "Serving sample data and the scripted agent; nothing connects to a tracker." : "Syncing through toil, read-only, with your own connections and dossiers. Only its Settings pages, and a dossier's name and description edited in place, change anything: toil's own connections and dossiers, when you ask. The worklog keeps its pages and your notes in its data folder, and writes anywhere else only when you export one. Feedback goes to Imagile only when you send it.",
20184
21797
  ...cache ? [`The cache is ${cache.paths.db}, kept ${settings.retentionDays} days after each sync; toil-ui wipe deletes it.`] : [],
20185
21798
  "",