glimmervoid 0.52.2-next.714 → 0.52.2-next.716

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 (149) hide show
  1. package/dist/bin/glimmervoid.js +16 -16
  2. package/dist/chunks/{adapters-BxpskOkA.js → adapters-BZIMzahV.js} +6 -6
  3. package/dist/chunks/{adapters-9LqeWvgp.js → adapters-DVLB89jS.js} +1 -1
  4. package/dist/chunks/{agent-api-cli-BVOkv4-2.js → agent-api-cli-9qUAra6H.js} +3 -3
  5. package/dist/chunks/agent-api-cli-Bp2Ybd-A.js +1 -0
  6. package/dist/chunks/{agent-api-core-BUmwsDmz.js → agent-api-core-D7uXAtaD.js} +2 -2
  7. package/dist/chunks/{agent-setup-cli-B_jNJOM5.js → agent-setup-cli-B5KkKpNs.js} +1 -1
  8. package/dist/chunks/{config-BjiC6jzw.js → config-B2OU2Iqi.js} +2 -2
  9. package/dist/chunks/{config-store-QV2o_a1w.js → config-store-D4DR9OEd.js} +3 -3
  10. package/dist/chunks/config-store-DQb3io8f.js +1 -0
  11. package/dist/chunks/{grok-Bm_l620N.js → grok-g9A0aspr.js} +1 -1
  12. package/dist/chunks/{kimi-Docy1xQH.js → kimi-CS5vzI0B.js} +2 -2
  13. package/dist/chunks/kimi-DxsUbHXk.js +1 -0
  14. package/dist/chunks/{main-rdLT8yhk.js → main-BnooYTEl.js} +15 -13
  15. package/dist/chunks/{pack-agent-BT3srmZK.js → pack-agent-DpnKPAtg.js} +133 -17
  16. package/dist/chunks/{pack-bridge-CZ617fLE.js → pack-bridge-WNNqDyiA.js} +1 -1
  17. package/dist/chunks/packs-cli-DHkPAEsl.js +1 -0
  18. package/dist/chunks/{packs-cli-TBgqXVlJ.js → packs-cli-DQxfJFtt.js} +4 -4
  19. package/dist/chunks/{pair-cli-QUr5kxs6.js → pair-cli-DNmRcl4X.js} +2 -2
  20. package/dist/chunks/{pr-flows-cli-CSTgWBsw.js → pr-flows-cli-Bxt46jB7.js} +6 -6
  21. package/dist/chunks/{pr-flows-external-C1552H5t.js → pr-flows-external-C5CFVtqo.js} +3 -3
  22. package/dist/chunks/{remote-config-BKrmIl1e.js → remote-config-BALm2K3q.js} +1 -1
  23. package/dist/chunks/{session-Cjdtb0jm.js → session-D5cMVNNw.js} +14 -13
  24. package/dist/chunks/{settings-cli-BowaotP4.js → settings-cli-DZfLJ_nm.js} +5 -5
  25. package/dist/chunks/{settings-readout-core-C259m22Z.js → settings-readout-core-DdYT2sH-.js} +2 -2
  26. package/dist/chunks/{spawn-env-exIHMDhs.js → spawn-env-CpyY0k2I.js} +1 -1
  27. package/dist/chunks/{ssh-sign-cli-ZR4qAwSu.js → ssh-sign-cli-DTNecZVM.js} +2 -2
  28. package/dist/chunks/{whiteboard-svg-core-nEP3Ksz-.js → whiteboard-svg-core-COyGvqjk.js} +1 -1
  29. package/dist/client/assets/{action-status-DQFqR8jN.js → action-status-BcxZNfpU.js} +1 -1
  30. package/dist/client/assets/action-status-BcxZNfpU.js.br +0 -0
  31. package/dist/client/assets/{arena-panel-DMJGea76.js → arena-panel-B-f2XJHl.js} +2 -2
  32. package/dist/client/assets/arena-panel-B-f2XJHl.js.br +0 -0
  33. package/dist/client/assets/{benchmark-panel-Mp2vJ4RL.js → benchmark-panel-KkMjTEPR.js} +1 -1
  34. package/dist/client/assets/benchmark-panel-KkMjTEPR.js.br +0 -0
  35. package/dist/client/assets/{boards-view-BpMoCYWQ.js → boards-view-D0Y1BKQH.js} +1 -1
  36. package/dist/client/assets/boards-view-D0Y1BKQH.js.br +0 -0
  37. package/dist/client/assets/button-DVUhX7ZS.js +1 -0
  38. package/dist/client/assets/button-DVUhX7ZS.js.br +0 -0
  39. package/dist/client/assets/{card-actions-DH8NFxxU.js → card-actions-DiKuCoZo.js} +1 -1
  40. package/dist/client/assets/{card-registry-BnkpQyzf.js → card-registry-B9qwnepu.js} +1 -1
  41. package/dist/client/assets/card-registry-B9qwnepu.js.br +0 -0
  42. package/dist/client/assets/{community-panel-C-v-WuLl.js → community-panel-DHpkHTzi.js} +1 -1
  43. package/dist/client/assets/community-panel-DHpkHTzi.js.br +0 -0
  44. package/dist/client/assets/{control-ws-DqfbKL5i.js → control-ws-B1wIrzsT.js} +1 -1
  45. package/dist/client/assets/control-ws-B1wIrzsT.js.br +0 -0
  46. package/dist/client/assets/{dialogs-BgUFwN5t.js → dialogs-BNY6zXjU.js} +1 -1
  47. package/dist/client/assets/dialogs-BNY6zXjU.js.br +0 -0
  48. package/dist/client/assets/{doc-editor-ui-m2bY7ta6.js → doc-editor-ui-Bh9Hg5Um.js} +1 -1
  49. package/dist/client/assets/doc-editor-ui-Bh9Hg5Um.js.br +0 -0
  50. package/dist/client/assets/{feature-hint-DkVBzo6C.js → feature-hint-Dv_4GUvR.js} +1 -1
  51. package/dist/client/assets/feature-hint-Dv_4GUvR.js.br +0 -0
  52. package/dist/client/assets/{first-run-checklist-CG2_QRz7.js → first-run-checklist-_8uKNci3.js} +1 -1
  53. package/dist/client/assets/first-run-checklist-_8uKNci3.js.br +0 -0
  54. package/dist/client/assets/{hooks-panel-BL-CTj9b.js → hooks-panel-CGEpWh0g.js} +1 -1
  55. package/dist/client/assets/hooks-panel-CGEpWh0g.js.br +0 -0
  56. package/dist/client/assets/{index-C3MaaLRo.js → index-Bo0uPCb0.js} +5 -5
  57. package/dist/client/assets/index-Bo0uPCb0.js.br +0 -0
  58. package/dist/client/assets/{issues-panel-CyDLx5ko.js → issues-panel-BXz685m4.js} +1 -1
  59. package/dist/client/assets/issues-panel-BXz685m4.js.br +0 -0
  60. package/dist/client/assets/{lane-read-token-step-BeS9I4SL.js → lane-read-token-step-BG67HPl9.js} +1 -1
  61. package/dist/client/assets/lane-read-token-step-BG67HPl9.js.br +0 -0
  62. package/dist/client/assets/{menu-D-wg0nAO.js → menu-D2qOvNcJ.js} +1 -1
  63. package/dist/client/assets/menu-D2qOvNcJ.js.br +0 -0
  64. package/dist/client/assets/{modal-CaYkOGc7.js → modal-Z_wy3vHz.js} +1 -1
  65. package/dist/client/assets/modal-Z_wy3vHz.js.br +0 -0
  66. package/dist/client/assets/{my-prs-panel-CyXp6T32.js → my-prs-panel-D-bnq4IB.js} +1 -1
  67. package/dist/client/assets/my-prs-panel-D-bnq4IB.js.br +0 -0
  68. package/dist/client/assets/{nyan-cat-c96fcVAe.js → nyan-cat-BPzLVtK8.js} +1 -1
  69. package/dist/client/assets/nyan-cat-BPzLVtK8.js.br +0 -0
  70. package/dist/client/assets/{phone-shell-DE_mxTQw.js → phone-shell-BBB0Sslf.js} +1 -1
  71. package/dist/client/assets/phone-shell-BBB0Sslf.js.br +0 -0
  72. package/dist/client/assets/{plan-face-ChTeqjaB.js → plan-face-L4CByAvM.js} +1 -1
  73. package/dist/client/assets/plan-face-L4CByAvM.js.br +0 -0
  74. package/dist/client/assets/{plan-render-BodoJFmJ.js → plan-render-Xr8LhQ14.js} +1 -1
  75. package/dist/client/assets/plan-render-Xr8LhQ14.js.br +0 -0
  76. package/dist/client/assets/{pr-queue-columns-BYmldL0b.js → pr-queue-columns-CX3ELyaH.js} +1 -1
  77. package/dist/client/assets/pr-queue-columns-CX3ELyaH.js.br +0 -0
  78. package/dist/client/assets/{pr-status-icon-21lNgewd.js → pr-status-icon-BFjgx4k6.js} +1 -1
  79. package/dist/client/assets/{pr-status-icon-21lNgewd.js.br → pr-status-icon-BFjgx4k6.js.br} +0 -0
  80. package/dist/client/assets/{radar-panel-CHLr9sPR.js → radar-panel-DHqzpSpk.js} +1 -1
  81. package/dist/client/assets/radar-panel-DHqzpSpk.js.br +0 -0
  82. package/dist/client/assets/{repo-roots-adder-Bsl35qZU.js → repo-roots-adder-BExQfMHj.js} +1 -1
  83. package/dist/client/assets/repo-roots-adder-BExQfMHj.js.br +0 -0
  84. package/dist/client/assets/{resume-dialog-DjxevPvZ.js → resume-dialog-C6-u3VZX.js} +1 -1
  85. package/dist/client/assets/resume-dialog-C6-u3VZX.js.br +0 -0
  86. package/dist/client/assets/{review-queue-panel-BOTJmzko.js → review-queue-panel-DLjL8BHX.js} +1 -1
  87. package/dist/client/assets/review-queue-panel-DLjL8BHX.js.br +0 -0
  88. package/dist/client/assets/{session-actions-JIJxTTXv.js → session-actions-Ca7LGVTP.js} +2 -2
  89. package/dist/client/assets/session-actions-Ca7LGVTP.js.br +0 -0
  90. package/dist/client/assets/{session-row-h4Z5UZXP.js → session-row-DenU60jB.js} +1 -1
  91. package/dist/client/assets/session-row-DenU60jB.js.br +0 -0
  92. package/dist/client/assets/{session-tick-ClcENCsX.js → session-tick-BFp2Hu24.js} +1 -1
  93. package/dist/client/assets/session-tick-BFp2Hu24.js.br +0 -0
  94. package/dist/client/assets/{settings-panel-DOvWcLB-.js → settings-panel-RtGxoPRg.js} +2 -2
  95. package/dist/client/assets/settings-panel-RtGxoPRg.js.br +0 -0
  96. package/dist/client/assets/{setup-step-8g7PtcDK.js → setup-step-6fxZpk2u.js} +1 -1
  97. package/dist/client/assets/setup-step-6fxZpk2u.js.br +0 -0
  98. package/dist/client/assets/{trace-panel-ChZgfrAd.js → trace-panel-BVY4GJsV.js} +1 -1
  99. package/dist/client/assets/trace-panel-BVY4GJsV.js.br +0 -0
  100. package/dist/client/assets/{usage-panel-B2e8ojE1.js → usage-panel-BBj7TBcK.js} +1 -1
  101. package/dist/client/assets/usage-panel-BBj7TBcK.js.br +0 -0
  102. package/dist/client/assets/{your-day-tip-BXTX2aRH.js → your-day-tip-BRN5fCkK.js} +1 -1
  103. package/dist/client/assets/your-day-tip-BRN5fCkK.js.br +0 -0
  104. package/dist/client/index.html +12 -12
  105. package/dist/client/index.html.br +0 -0
  106. package/dist/schema/pack.v1.json +30 -8
  107. package/dist/server/index.js +1 -1
  108. package/package.json +1 -1
  109. package/dist/chunks/agent-api-cli-BcRxYTRj.js +0 -1
  110. package/dist/chunks/config-store-DgjCZF1l.js +0 -1
  111. package/dist/chunks/kimi-CFmz5R41.js +0 -1
  112. package/dist/chunks/packs-cli-CoUHJF-O.js +0 -1
  113. package/dist/client/assets/action-status-DQFqR8jN.js.br +0 -0
  114. package/dist/client/assets/arena-panel-DMJGea76.js.br +0 -0
  115. package/dist/client/assets/benchmark-panel-Mp2vJ4RL.js.br +0 -0
  116. package/dist/client/assets/boards-view-BpMoCYWQ.js.br +0 -0
  117. package/dist/client/assets/button-CJs4ySg3.js +0 -1
  118. package/dist/client/assets/button-CJs4ySg3.js.br +0 -0
  119. package/dist/client/assets/card-registry-BnkpQyzf.js.br +0 -0
  120. package/dist/client/assets/community-panel-C-v-WuLl.js.br +0 -0
  121. package/dist/client/assets/control-ws-DqfbKL5i.js.br +0 -0
  122. package/dist/client/assets/dialogs-BgUFwN5t.js.br +0 -0
  123. package/dist/client/assets/doc-editor-ui-m2bY7ta6.js.br +0 -0
  124. package/dist/client/assets/feature-hint-DkVBzo6C.js.br +0 -0
  125. package/dist/client/assets/first-run-checklist-CG2_QRz7.js.br +0 -0
  126. package/dist/client/assets/hooks-panel-BL-CTj9b.js.br +0 -0
  127. package/dist/client/assets/index-C3MaaLRo.js.br +0 -0
  128. package/dist/client/assets/issues-panel-CyDLx5ko.js.br +0 -0
  129. package/dist/client/assets/lane-read-token-step-BeS9I4SL.js.br +0 -0
  130. package/dist/client/assets/menu-D-wg0nAO.js.br +0 -0
  131. package/dist/client/assets/modal-CaYkOGc7.js.br +0 -0
  132. package/dist/client/assets/my-prs-panel-CyXp6T32.js.br +0 -0
  133. package/dist/client/assets/nyan-cat-c96fcVAe.js.br +0 -0
  134. package/dist/client/assets/phone-shell-DE_mxTQw.js.br +0 -0
  135. package/dist/client/assets/plan-face-ChTeqjaB.js.br +0 -0
  136. package/dist/client/assets/plan-render-BodoJFmJ.js.br +0 -0
  137. package/dist/client/assets/pr-queue-columns-BYmldL0b.js.br +0 -0
  138. package/dist/client/assets/radar-panel-CHLr9sPR.js.br +0 -0
  139. package/dist/client/assets/repo-roots-adder-Bsl35qZU.js.br +0 -0
  140. package/dist/client/assets/resume-dialog-DjxevPvZ.js.br +0 -0
  141. package/dist/client/assets/review-queue-panel-BOTJmzko.js.br +0 -0
  142. package/dist/client/assets/session-actions-JIJxTTXv.js.br +0 -0
  143. package/dist/client/assets/session-row-h4Z5UZXP.js.br +0 -0
  144. package/dist/client/assets/session-tick-ClcENCsX.js.br +0 -0
  145. package/dist/client/assets/settings-panel-DOvWcLB-.js.br +0 -0
  146. package/dist/client/assets/setup-step-8g7PtcDK.js.br +0 -0
  147. package/dist/client/assets/trace-panel-ChZgfrAd.js.br +0 -0
  148. package/dist/client/assets/usage-panel-B2e8ojE1.js.br +0 -0
  149. package/dist/client/assets/your-day-tip-BXTX2aRH.js.br +0 -0
@@ -1,8 +1,8 @@
1
1
  import { r as errorMessage } from "./text-DoirglWV.js";
2
- import { Cn as PrFlowRule, Dn as PrFlowsSettings, Fn as prFlowRulesJsonSchema, Mn as RepoScope, Sn as PrFlowPrAction, Tn as PrFlowScopedCommand, bn as PrFlowPackRequires, dn as PR_FLOW_PLACEHOLDERS_BY_KIND, hn as PrFlowCommand, vn as PrFlowItemAction } from "./session-Cjdtb0jm.js";
3
- import { i as ThemePalette, n as packBridgeJsonSchemaText, t as PackBridgeTopic } from "./pack-bridge-CZ617fLE.js";
2
+ import { Cn as PrFlowRule, Dn as PrFlowsSettings, Fn as prFlowRulesJsonSchema, Mn as RepoScope, Sn as PrFlowPrAction, Tn as PrFlowSourceCommand, bn as PrFlowPackRequires, dn as PR_FLOW_PLACEHOLDERS_BY_KIND, hn as PrFlowCommand, vn as PrFlowItemAction } from "./session-D5cMVNNw.js";
3
+ import { i as ThemePalette, n as packBridgeJsonSchemaText, t as PackBridgeTopic } from "./pack-bridge-WNNqDyiA.js";
4
4
  import { t as parseJsonOrNull } from "./json-core-If8h-Qgy.js";
5
- import { n as withoutGlimmervoidSecrets } from "./spawn-env-exIHMDhs.js";
5
+ import { n as withoutGlimmervoidSecrets } from "./spawn-env-CpyY0k2I.js";
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
8
8
  import { z } from "zod";
@@ -300,7 +300,7 @@ function prFlowCommands(configFile) {
300
300
  };
301
301
  const warnings = [];
302
302
  return {
303
- sources: parsedCommandList(PrFlowScopedCommand, settings.sources ?? [], "prFlows.sources", warnings),
303
+ sources: parsedCommandList(PrFlowSourceCommand, settings.sources ?? [], "prFlows.sources", warnings),
304
304
  actions: parsedCommandList(PrFlowCommand, settings.actions ?? [], "prFlows.actions", warnings),
305
305
  prActions: parsedCommandList(PrFlowPrAction, settings.prActions ?? [], "prFlows.prActions", warnings),
306
306
  warnings
@@ -336,12 +336,22 @@ function withPackRepos(entry, packRepos) {
336
336
  repos
337
337
  };
338
338
  }
339
+ function packQualified(packName, id) {
340
+ return id.startsWith(`${packName}/`) ? id : `${packName}/${id}`;
341
+ }
342
+ function packSourceRef(ruleSource, packName, sources) {
343
+ return sources.some((source) => source.id === ruleSource) ? `${packName}/${ruleSource}` : ruleSource;
344
+ }
339
345
  function packRule(rule, { header, prFlows }) {
340
- const scopedRule = withPackRepos(rule, prFlows.repos);
346
+ const repoScopedRule = withPackRepos(rule, prFlows.repos);
347
+ const scopedRule = repoScopedRule.source === void 0 ? repoScopedRule : {
348
+ ...repoScopedRule,
349
+ source: packSourceRef(repoScopedRule.source, header.name, prFlows.sources)
350
+ };
341
351
  if (!scopedRule.action.startsWith("run:")) return scopedRule;
342
352
  return {
343
353
  ...scopedRule,
344
- action: `run:${header.name}/${scopedRule.action.slice(4)}`
354
+ action: `run:${packQualified(header.name, scopedRule.action.slice(4))}`
345
355
  };
346
356
  }
347
357
  function packRuleText(rule, prFlowsPack) {
@@ -592,7 +602,7 @@ function expandPlaceholders(argv, values) {
592
602
  argv: argv.map((element) => element.replace(PLACEHOLDER_PATTERN, (_match, name) => values[name] ?? ""))
593
603
  };
594
604
  }
595
- function sourceCandidates(label, findings) {
605
+ function sourceCandidates(label, findings, sourceId) {
596
606
  return findings.map((finding) => ({
597
607
  path: finding.path,
598
608
  lineStart: finding.lineStart,
@@ -601,6 +611,7 @@ function sourceCandidates(label, findings) {
601
611
  source: {
602
612
  kind: "configured",
603
613
  name: label,
614
+ ...sourceId === void 0 ? {} : { sourceId },
604
615
  url: finding.url
605
616
  },
606
617
  body: finding.body,
@@ -610,8 +621,12 @@ function sourceCandidates(label, findings) {
610
621
  function isPathCovered(path, rulePaths) {
611
622
  return rulePaths.some((rulePath) => path === rulePath || rulePath.endsWith("/") && path.startsWith(rulePath));
612
623
  }
624
+ function isNamedSource(ruleSource, source) {
625
+ if (ruleSource.includes("/")) return source.sourceId === ruleSource;
626
+ return source.name === ruleSource;
627
+ }
613
628
  function ruleMatchesSource(rule, source) {
614
- if (rule.source !== void 0 && source.name !== rule.source) return false;
629
+ if (rule.source !== void 0 && !isNamedSource(rule.source, source)) return false;
615
630
  if (rule.priority !== void 0 && !rule.priority.includes(source.priority ?? "unknown")) return false;
616
631
  const ruleText = rule.text?.toLowerCase();
617
632
  return ruleText === void 0 || source.excerpt.toLowerCase().includes(ruleText);
@@ -655,6 +670,92 @@ function unknownActionWarnings(rules, actionIds) {
655
670
  return [`Rule '${rule.name}' names ${rule.action}, which no entry in prFlows.actions defines, so its items wait for you.`];
656
671
  });
657
672
  }
673
+ function reposOutside(repos, allowed) {
674
+ const allowedLowercase = new Set(allowed.map((repo) => repo.toLowerCase()));
675
+ return repos.filter((repo) => !allowedLowercase.has(repo.toLowerCase()));
676
+ }
677
+ function widenedEntryNotes(section, packName) {
678
+ const packRepos = section.repos;
679
+ if (packRepos === void 0) return [];
680
+ return [
681
+ ...section.prActions.map((entry) => ({
682
+ title: `The prAction ${packName}/${entry.id}`,
683
+ repos: entry.repos
684
+ })),
685
+ ...section.sources.map((entry) => ({
686
+ title: `The source ${packName}/${entry.id}`,
687
+ repos: entry.repos
688
+ })),
689
+ ...section.rules.map((entry) => ({
690
+ title: `Rule '${entry.name}'`,
691
+ repos: entry.repos
692
+ }))
693
+ ].flatMap(({ title, repos }) => {
694
+ const outside = reposOutside(repos ?? [], packRepos);
695
+ if (outside.length === 0) return [];
696
+ return [`${title} reaches outside prFlows.repos to ${outside.join(", ")}, since an entry's own repos replace the pack default.`];
697
+ });
698
+ }
699
+ function unknownSourceProblems(ruleName, ruleSource, packName, elsewhere) {
700
+ if (ruleSource.startsWith(`${packName}/`)) return {
701
+ errors: [`Rule '${ruleName}' names the source '${ruleSource}', which no source of this pack defines, so it never acts.`],
702
+ notes: []
703
+ };
704
+ if (ruleSource.includes("/")) return {
705
+ errors: [],
706
+ notes: [`Rule '${ruleName}' names the source '${ruleSource}', which is no source of this pack, so it matches only the source with that id from another pack, and never acts while that pack is off.`]
707
+ };
708
+ return {
709
+ errors: [],
710
+ notes: [`Rule '${ruleName}' names the source '${ruleSource}', which is no source of this pack, so it matches only ${elsewhere}.`]
711
+ };
712
+ }
713
+ function ruleSourceProblems(rule, section, packName) {
714
+ if (rule.source === void 0) return {
715
+ errors: [],
716
+ notes: []
717
+ };
718
+ const elsewhere = "a source of that label from config.json or another pack, or review comments by a GitHub account of that name";
719
+ const labelledSources = section.sources.filter((candidate) => candidate.label === rule.source);
720
+ const namedSources = labelledSources.length > 0 ? labelledSources : section.sources.filter((candidate) => `${packName}/${candidate.id}` === rule.source);
721
+ if (namedSources.length === 0) return unknownSourceProblems(rule.name, rule.source, packName, elsewhere);
722
+ const sourceRepoLists = namedSources.map((source) => source.repos ?? section.repos);
723
+ if (rule.repos === void 0 || sourceRepoLists.some((repos) => repos === void 0)) return {
724
+ errors: [],
725
+ notes: []
726
+ };
727
+ const sourceRepos = [...new Set(sourceRepoLists.flatMap((repos) => repos ?? []))];
728
+ const reposWithoutSource = reposOutside(rule.repos, sourceRepos);
729
+ if (reposWithoutSource.length === 0) return {
730
+ errors: [],
731
+ notes: []
732
+ };
733
+ const mismatch = `Rule '${rule.name}' is limited to ${rule.repos.join(", ")}, but this pack's source '${rule.source}' runs only on ${sourceRepos.join(", ")}`;
734
+ const neverMeetsSource = new Set(reposWithoutSource.map((repo) => repo.toLowerCase())).size === new Set(rule.repos.map((repo) => repo.toLowerCase())).size;
735
+ if (labelledSources.length === 0 && neverMeetsSource) return {
736
+ errors: [`${mismatch}, so the rule never acts.`],
737
+ notes: []
738
+ };
739
+ if (labelledSources.length === 0) return {
740
+ errors: [],
741
+ notes: [`${mismatch}, so on ${reposWithoutSource.join(", ")} the rule never acts.`]
742
+ };
743
+ return {
744
+ errors: [],
745
+ notes: [`${mismatch}, so on ${reposWithoutSource.join(", ")} the rule matches only ${elsewhere}.`]
746
+ };
747
+ }
748
+ function packRuleChecks(section, packName) {
749
+ const resolvedRules = section.rules.map((rule) => packRule(rule, {
750
+ header: { name: packName },
751
+ prFlows: section
752
+ }));
753
+ const sourceProblems = resolvedRules.map((rule) => ruleSourceProblems(rule, section, packName));
754
+ return {
755
+ errors: [...unknownActionWarnings(resolvedRules, new Set(section.actions.map((action) => `${packName}/${action.id}`))), ...sourceProblems.flatMap((problems) => problems.errors)],
756
+ notes: [...widenedEntryNotes(section, packName), ...sourceProblems.flatMap((problems) => problems.notes)]
757
+ };
758
+ }
658
759
  function shouldTellBranchMoved(run, headNow, nowMs, windowMs) {
659
760
  if (headNow === run.headAtStart) return false;
660
761
  return run.finishedAt === null || nowMs - run.finishedAt <= windowMs;
@@ -937,11 +1038,11 @@ var PackHeader = z.strictObject({
937
1038
  ui: z.unknown().optional()
938
1039
  });
939
1040
  var PackPrFlows = z.strictObject({
940
- repos: RepoScope.describe("The default owner/name repositories for every prAction, source and rule of this pack that lists no repos of its own; every repository when absent"),
941
- prActions: z.array(PrFlowPrAction).default([]),
942
- sources: z.array(PrFlowScopedCommand).default([]),
943
- actions: z.array(PrFlowItemAction).default([]),
944
- rules: z.array(PrFlowRule).default([])
1041
+ repos: RepoScope.describe("The default owner/name repositories, matched case-insensitively, for every prAction, source and rule of this pack that lists no repos of its own; an entry's own repos replace this default rather than narrowing it; every repository when absent"),
1042
+ prActions: z.array(PrFlowPrAction).default([]).describe("Buttons on a pull request; the command prints {\"outcome\":\"done|started|refused|failed\",\"message\":\"...\"}, and one that prints started reports later with glimmervoid pr-action report"),
1043
+ sources: z.array(PrFlowSourceCommand).default([]).describe("Commands run on each pull request that print {\"findings\":[{\"path\",\"lineStart\",\"lineEnd\",\"priority\",\"body\",\"url\"}],\"status\":[{\"label\",\"state\"}]}, at most 200 findings and 4 status lines"),
1044
+ actions: z.array(PrFlowItemAction).default([]).describe("Commands rules run on one review item with run:<id>; they print {\"outcome\":\"done|started|refused|failed\",\"message\":\"...\"} and are limited to repositories only through the rules that name them"),
1045
+ rules: z.array(PrFlowRule).default([]).describe("Run after your own config.json rules; the first rule that matches an item decides it")
945
1046
  }).superRefine((section, context) => {
946
1047
  for (const kind of [
947
1048
  "prActions",
@@ -994,7 +1095,7 @@ var PackUi = z.strictObject({
994
1095
  });
995
1096
  var PacksState = z.strictObject({ approvedFingerprints: z.array(z.string().min(1)).default([]) });
996
1097
  var PackManifestForSchema = PackHeader.extend({
997
- prFlows: PackPrFlows.optional(),
1098
+ prFlows: PackPrFlows.optional().describe("PR flows this pack adds; one invalid entry skips the whole section"),
998
1099
  ui: PackUi.optional()
999
1100
  });
1000
1101
  function packJsonSchemaText() {
@@ -1245,6 +1346,7 @@ async function checkPack(packDir, env, isApprovedFingerprint) {
1245
1346
  name,
1246
1347
  isApproved: false,
1247
1348
  errors: [...read.errors, ...pageErrors(read.filesByPath ?? /* @__PURE__ */ new Map(), read.header)],
1349
+ notes: [],
1248
1350
  missingRequires: [],
1249
1351
  entries: [],
1250
1352
  rules: [],
@@ -1267,6 +1369,7 @@ async function checkPack(packDir, env, isApprovedFingerprint) {
1267
1369
  ...uiSectionErrors(pack),
1268
1370
  ...pageErrors(pack.filesByPath, pack.header)
1269
1371
  ],
1372
+ notes: [],
1270
1373
  missingRequires: pack.missingRequires,
1271
1374
  entries: [],
1272
1375
  rules: [],
@@ -1285,13 +1388,15 @@ async function checkPack(packDir, env, isApprovedFingerprint) {
1285
1388
  id: command.id,
1286
1389
  label: command.label,
1287
1390
  argv: command.command,
1391
+ repos: command.repos ?? null,
1288
1392
  error
1289
1393
  };
1290
1394
  });
1291
- const { section } = prFlowsPack;
1395
+ const ruleChecks = packRuleChecks(prFlowsPack.section, pack.header.name);
1292
1396
  return {
1293
1397
  ...report,
1294
- errors: [...report.errors, ...unknownActionWarnings(section.rules, new Set(section.actions.map((action) => action.id)))],
1398
+ errors: [...report.errors, ...ruleChecks.errors],
1399
+ notes: ruleChecks.notes,
1295
1400
  entries,
1296
1401
  rules: approval.pack?.rules ?? []
1297
1402
  };
@@ -1304,14 +1409,25 @@ function reportHeading(report) {
1304
1409
  if (packCheckHasProblem(report)) return `${checked}: fix the problems below, then check it again`;
1305
1410
  return `${checked}: no problems; ${report.isApproved ? "it is approved" : "once installed, it waits for the operator to approve it in Settings, Packs"}`;
1306
1411
  }
1412
+ function entryReach(entry) {
1413
+ if (entry.kind === "action") return ", on the repositories of the rules that name it";
1414
+ if (entry.repos === null) return ", on every repository";
1415
+ return `, limited to ${entry.repos.join(", ")}`;
1416
+ }
1417
+ function entryLine(entry) {
1418
+ const heading = `${entry.kind} ${entry.id} (${entry.label}): `;
1419
+ if (entry.error !== null) return `${heading}invalid, ${entry.error}`;
1420
+ return `${heading}valid${entryReach(entry)}\n would run ${JSON.stringify(entry.argv)}`;
1421
+ }
1307
1422
  function packReportText(report) {
1308
1423
  return [
1309
1424
  reportHeading(report),
1310
1425
  ...report.panels.map((panel) => `panel ${panel}`),
1311
1426
  ...report.themes.map((theme) => `theme ${theme}`),
1312
- ...report.entries.map((entry) => `${entry.kind} ${entry.id} (${entry.label}): ${entry.error === null ? `valid\n would run ${JSON.stringify(entry.argv)}` : `invalid, ${entry.error}`}`),
1427
+ ...report.entries.map(entryLine),
1313
1428
  ...report.rules.map((rule) => `rule ${rule}`),
1314
1429
  ...report.errors.map((error) => `error: ${error}`),
1430
+ ...report.notes.map((note) => `note: ${note}`),
1315
1431
  ...report.missingRequires.map((missing) => `missing on this machine: ${missing}, so the pack stays off here until it has it; not a problem in the pack`)
1316
1432
  ].join("\n");
1317
1433
  }
@@ -1,4 +1,4 @@
1
- import { Qn as STATES } from "./session-Cjdtb0jm.js";
1
+ import { Qn as STATES } from "./session-D5cMVNNw.js";
2
2
  import { z } from "zod";
3
3
  //#region shared/contracts/theme-palette.ts
4
4
  var HexColor = z.string().regex(/^#[0-9a-fA-F]{6}$/, { error: (issue) => issue.input === void 0 ? "missing; a theme sets every color as #rrggbb" : `a color is #rrggbb, not ${JSON.stringify(issue.input)}` });
@@ -0,0 +1 @@
1
+ export { n as runPacksCli } from "./packs-cli-DQxfJFtt.js";
@@ -1,9 +1,9 @@
1
1
  import { r as errorMessage } from "./text-DoirglWV.js";
2
2
  import { a as examplePacksDir } from "./runtime-paths-DfoHzN15.js";
3
3
  import { n as glimmervoidHomeDir } from "./config-path-core-DUWk0Lui.js";
4
- import { In as prFlowsOutputJsonSchemaText, Qn as STATES, n as AGENT_REPLY_SCHEMAS } from "./session-Cjdtb0jm.js";
5
- import { n as packBridgeJsonSchemaText, r as THEME_STATE_NAMES, t as PackBridgeTopic } from "./pack-bridge-CZ617fLE.js";
6
- import { J as decideHostAllowed, a as packReportText, g as packFileHeaders, i as packCheckHasProblem, l as readApprovedPackFingerprints, p as packJsonSchemaText, r as checkPack, t as packGuideText, u as readPackDir } from "./pack-agent-BT3srmZK.js";
4
+ import { In as prFlowsOutputJsonSchemaText, Qn as STATES, n as AGENT_REPLY_SCHEMAS } from "./session-D5cMVNNw.js";
5
+ import { n as packBridgeJsonSchemaText, r as THEME_STATE_NAMES, t as PackBridgeTopic } from "./pack-bridge-WNNqDyiA.js";
6
+ import { J as decideHostAllowed, a as packReportText, g as packFileHeaders, i as packCheckHasProblem, l as readApprovedPackFingerprints, p as packJsonSchemaText, r as checkPack, t as packGuideText, u as readPackDir } from "./pack-agent-DpnKPAtg.js";
7
7
  import path from "node:path";
8
8
  import os from "node:os";
9
9
  import http from "node:http";
@@ -398,7 +398,7 @@ async function runList() {
398
398
  process.stderr.write("glimmervoid packs list reads the running Glimmervoid, so it works inside a Glimmervoid session; the operator sees the same list in Settings, Packs\n");
399
399
  return 1;
400
400
  }
401
- const { askAgentApi } = await import("./agent-api-cli-BcRxYTRj.js");
401
+ const { askAgentApi } = await import("./agent-api-cli-Bp2Ybd-A.js");
402
402
  const reply = AGENT_REPLY_SCHEMAS.packs.safeParse(await askAgentApi("packs", { command: "list" }));
403
403
  if (!reply.success) {
404
404
  process.stderr.write("glimmervoid packs list: Glimmervoid did not answer with a pack list\n");
@@ -1,6 +1,6 @@
1
1
  import { r as errorMessage } from "./text-DoirglWV.js";
2
- import { c as resolveConfigPath } from "./config-store-QV2o_a1w.js";
3
- import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-BKrmIl1e.js";
2
+ import { c as resolveConfigPath } from "./config-store-D4DR9OEd.js";
3
+ import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-BALm2K3q.js";
4
4
  import fs from "node:fs";
5
5
  //#region server/text-format.ts
6
6
  function trimIso(iso) {
@@ -1,11 +1,11 @@
1
1
  import { r as errorMessage } from "./text-DoirglWV.js";
2
2
  import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
3
- import { On as PrFlowsState, dn as PR_FLOW_PLACEHOLDERS_BY_KIND, fn as PrActionReportBody, g as AgentSettingsReply, ln as PR_ACTION_REPORT_URL_ENV, un as PR_ACTION_TOKEN_ENV } from "./session-Cjdtb0jm.js";
3
+ import { On as PrFlowsState, dn as PR_FLOW_PLACEHOLDERS_BY_KIND, fn as PrActionReportBody, g as AgentSettingsReply, ln as PR_ACTION_REPORT_URL_ENV, un as PR_ACTION_TOKEN_ENV } from "./session-D5cMVNNw.js";
4
4
  import { c as runCommandSafely } from "./child-process-safe-BIh8yQ0I.js";
5
5
  import { t as parseJsonOrNull } from "./json-core-If8h-Qgy.js";
6
- import { B as unknownActionWarnings, F as scopedToRepo, M as prFlowRules, S as expandPlaceholders, j as prFlowCommands, x as commandFingerprint } from "./pack-agent-BT3srmZK.js";
7
- import { t as createPrFlowsExternal } from "./pr-flows-external-C1552H5t.js";
8
- import { t as runPackCheckCli } from "./packs-cli-TBgqXVlJ.js";
6
+ import { B as unknownActionWarnings, F as scopedToRepo, M as prFlowRules, S as expandPlaceholders, j as prFlowCommands, x as commandFingerprint } from "./pack-agent-DpnKPAtg.js";
7
+ import { t as createPrFlowsExternal } from "./pr-flows-external-C5CFVtqo.js";
8
+ import { t as runPackCheckCli } from "./packs-cli-DQxfJFtt.js";
9
9
  import fs from "node:fs";
10
10
  import path from "node:path";
11
11
  import os from "node:os";
@@ -100,7 +100,7 @@ async function readServerConfig(askSetting) {
100
100
  };
101
101
  }
102
102
  async function readConfigFromServer() {
103
- const { askAgentApi } = await import("./agent-api-cli-BcRxYTRj.js");
103
+ const { askAgentApi } = await import("./agent-api-cli-Bp2Ybd-A.js");
104
104
  return readServerConfig((settingPath) => askAgentApi("settings", {
105
105
  command: "get",
106
106
  path: settingPath
@@ -241,7 +241,7 @@ async function runPrActionReport({ outcome, message, env }, io) {
241
241
  io.writeError("--outcome must be started, done, failed or refused, and --message at most 500 characters\n");
242
242
  return 1;
243
243
  }
244
- const { postToAgentIngress } = await import("./agent-api-cli-BcRxYTRj.js");
244
+ const { postToAgentIngress } = await import("./agent-api-cli-Bp2Ybd-A.js");
245
245
  const reply = await postToAgentIngress({
246
246
  endpoint: new URL(reportUrl),
247
247
  token,
@@ -1,8 +1,8 @@
1
- import { En as PrFlowSourceOutput, Nn as ReportedPrFlowActionOutcome } from "./session-Cjdtb0jm.js";
1
+ import { En as PrFlowSourceOutput, Nn as ReportedPrFlowActionOutcome } from "./session-D5cMVNNw.js";
2
2
  import { c as runCommandSafely } from "./child-process-safe-BIh8yQ0I.js";
3
3
  import { t as parseJsonOrNull } from "./json-core-If8h-Qgy.js";
4
- import { n as withoutGlimmervoidSecrets } from "./spawn-env-exIHMDhs.js";
5
- import { S as expandPlaceholders, k as prActionPlaceholderValues } from "./pack-agent-BT3srmZK.js";
4
+ import { n as withoutGlimmervoidSecrets } from "./spawn-env-CpyY0k2I.js";
5
+ import { S as expandPlaceholders, k as prActionPlaceholderValues } from "./pack-agent-DpnKPAtg.js";
6
6
  //#region server/github/pr-flows-external.ts
7
7
  var OUTPUT_MAX_BYTES = 1048576;
8
8
  var ACTION_OUTPUT_MAX_BYTES = 67108864;
@@ -2,7 +2,7 @@ import { n as errorLabel, r as errorMessage } from "./text-DoirglWV.js";
2
2
  import { d as equalsIgnoringCaseOnWindows } from "./runtime-paths-DfoHzN15.js";
3
3
  import { n as isRecord } from "./coerce-oz_Z_6E7.js";
4
4
  import { a as jsonStateLoadError, d as writeJsonAtomicSync, l as sleepSync, s as loadJsonStateFileSync, u as writeJsonAtomic } from "./json-file-AKRVPqG1.js";
5
- import { b as DEFAULT_TIMER_FNS, o as glimmervoidHomeDir, x as unrefTimer, xt as canonicalizePath } from "./config-store-QV2o_a1w.js";
5
+ import { b as DEFAULT_TIMER_FNS, o as glimmervoidHomeDir, x as unrefTimer, xt as canonicalizePath } from "./config-store-D4DR9OEd.js";
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
8
8
  import crypto from "node:crypto";
@@ -103,6 +103,7 @@ var PrFlowSource = z.strictObject({
103
103
  "configured"
104
104
  ]),
105
105
  name: z.string().min(1),
106
+ sourceId: z.string().min(1).optional(),
106
107
  threadId: z.string().optional(),
107
108
  url: z.url().nullable(),
108
109
  priority: PrFlowPriority.optional(),
@@ -133,18 +134,18 @@ var RepositoryName = z.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/, { er
133
134
  var RepoScope = z.array(RepositoryName).min(1).optional().describe("The owner/name repositories this applies to; every repository when absent");
134
135
  var PrFlowRule = z.strictObject({
135
136
  name: z.string({ error: "a pr flows rule needs a name" }).trim().min(1, { error: "a pr flows rule needs a name" }).max(80, { error: "a pr flows rule name must be at most 80 characters" }).regex(/\S/, { error: "a pr flows rule needs a name" }),
136
- source: z.string().min(1).optional(),
137
- priority: z.array(PrFlowPriority).min(1).optional(),
138
- paths: z.array(z.string().min(1)).min(1).optional(),
139
- text: z.string().min(1).optional(),
137
+ source: z.string().min(1).optional().describe("A source label, a pack source id as <pack>/<id> (inside that pack its bare id too, which wins over a login), or the GitHub login of a review comment author; an item merged from several sources matches only when every one of them matches"),
138
+ priority: z.array(PrFlowPriority).min(1).optional().describe("The finding priorities this rule acts on; any priority when absent"),
139
+ paths: z.array(z.string().min(1)).min(1).optional().describe("Repository paths; an entry ending in / matches every path under it, any other matches that exact path"),
140
+ text: z.string().min(1).optional().describe("Text the finding must contain, compared case-insensitively"),
140
141
  scope: z.enum([
141
142
  "mine",
142
143
  "team",
143
144
  "both"
144
- ]).default("mine"),
145
+ ]).default("mine").describe("Rules act only on your own pull requests today, so mine and both act there and team never acts yet"),
145
146
  repos: RepoScope,
146
- action: PrFlowActionRef,
147
- reason: z.string().trim().min(1).max(2e3).optional()
147
+ action: PrFlowActionRef.describe("ask waits for you, fix-local hands the item to a local session, dismiss replies with reason and resolves it, run:<id> runs that action; inside a pack a bare id names the pack's own action"),
148
+ reason: z.string().trim().min(1).max(2e3).optional().describe("The reply posted when the rule dismisses an item")
148
149
  }).refine((rule) => rule.action !== "dismiss" || rule.reason !== void 0, {
149
150
  message: "a dismiss rule needs a reason",
150
151
  path: ["reason"]
@@ -184,17 +185,17 @@ function commandDescription(kind, runsWith) {
184
185
  return `The program and its arguments, run without a shell from the Glimmervoid home folder; an argument may hold ${PR_FLOW_PLACEHOLDERS_BY_KIND[kind].map((placeholderName) => `{${placeholderName}}`).join(", ")}, and in a pack also {packDir}, the pack's folder. ${runsWith}`;
185
186
  }
186
187
  var PrFlowCommand = z.strictObject({
187
- id: z.string().regex(PR_FLOW_ID, { error: "an id is lowercase letters, digits and dashes" }),
188
- label: z.string().trim().min(1).max(24),
188
+ id: z.string().regex(PR_FLOW_ID, { error: "an id is lowercase letters, digits and dashes" }).describe("Unique within its list; inside a pack it is shown as <pack>/<id>"),
189
+ label: z.string().trim().min(1).max(24).describe("The name shown to the operator; a source's label is also the name rules match"),
189
190
  command: z.array(z.string().min(1)).min(1, { error: "a command needs at least the program to run" }),
190
- timeoutSeconds: z.number().int().positive().max(3600).default(120)
191
+ timeoutSeconds: z.number().int().positive().max(3600).default(120).describe("Seconds before the command is stopped")
191
192
  });
192
193
  var COMMAND_ENV = "Its environment has GLIMMERVOID_PR_URL, GLIMMERVOID_PR_REPO, GLIMMERVOID_PR_NUMBER and GLIMMERVOID_PR_HEAD";
193
194
  var ACTION_OUTCOME = "Exit 0 means done and any other exit failed, unless stdout prints the action outcome JSON (glimmervoid packs guide --schema pr-flows)";
194
- var PrFlowScopedCommand = PrFlowCommand.extend({
195
+ var PrFlowSourceCommand = PrFlowCommand.extend({
195
196
  command: PrFlowCommand.shape.command.describe(commandDescription("source", `${COMMAND_ENV}. It must print the source output JSON (glimmervoid packs guide --schema pr-flows) on stdout; anything else shows as an error on the pull request`)),
196
197
  repos: RepoScope
197
- });
198
+ }).extend({ label: PrFlowCommand.shape.label.regex(/^[^/]*$/, { error: "a source label has no slash, since a rule source with a slash names a pack source by <pack>/<id>" }) });
198
199
  var PrFlowItemAction = PrFlowCommand.extend({ command: PrFlowCommand.shape.command.describe(commandDescription("action", `${COMMAND_ENV}, and the review item as GLIMMERVOID_ITEM_JSON. ${ACTION_OUTCOME}`)) });
199
200
  var PrFlowPrAction = PrFlowCommand.extend({
200
201
  command: PrFlowCommand.shape.command.describe(commandDescription("pr-action", `${COMMAND_ENV}, GLIMMERVOID_PR_HEAD_REF, GLIMMERVOID_PR_BASE_REF and the pull request as GLIMMERVOID_PR_JSON. ${ACTION_OUTCOME}`)),
@@ -1931,4 +1932,4 @@ var AGENT_REPLY_SCHEMAS = Object.freeze({
1931
1932
  answer: z.union([AgentOkReply, AgentRefusal])
1932
1933
  });
1933
1934
  //#endregion
1934
- export { Panel as $, TeamReviewStatus as $t, SESSION_NAME_PATTERN as A, PrThreadReplyResponse as An, pullRequestKeyFormat as At, TASK_TITLE_CONTROL_CHARACTERS as B, GH_SEGMENT as Bn, PrDetail as Bt, CONVERSATION_TOOL_RESULT_HOOK_EVENT as C, PrFlowRule as Cn, MyPrSearchNode as Ct, SESSION_COMMANDS as D, PrFlowsSettings as Dn, MyPrsState as Dt, RefinedTaskTitle as E, PrFlowSourceOutput as En, MyPrsSnapshot as Et, SessionDoc as F, prFlowRulesJsonSchema as Fn, FindingSeverity as Ft, Board as G, GithubPollingRefreshResult as Gn, ReviewResult as Gt, UnseenOutcome as H, REPO_SLUG_RE as Hn, ReviewComment as Ht, SessionSnapshot as I, prFlowsOutputJsonSchemaText as In, GithubReviewDecision as It, BoardSummary as J, BADGE_LABELS as Jn, TeamReviewActionRequest as Jt, BoardRecord as K, GithubPrsFreshness as Kn, ReviewThreadId as Kt, SessionState as L, FULL_SHA_RE as Ln, GithubReviewState as Lt, SHOWN_FILE_CAP_BYTES as M, RepoScope as Mn, CommitSha as Mt, SIGN_URL_ENV as N, ReportedPrFlowActionOutcome as Nn, DECIDING_REVIEW_STATES as Nt, SESSION_DOC_BODY_CAP_BYTES as O, PrFlowsState as On, MyPrsStatus as Ot, SSH_SIGN_BODY_CAP_BYTES as P, prActionReportPath as Pn, EarlierReview as Pt, Op as Q, STATES as Qn, TeamReviewStateEntry as Qt, SshSignReply as R, HEX_SHA_RE as Rn, PostedReviewEvent as Rt, CONVERSATION_PERMISSION_HOOK_EVENT as S, PrFlowPrAction as Sn, MyPrMergeWhenReadyResult as St, ConversationQuestion as T, PrFlowScopedCommand as Tn, MyPrThreadsResponse as Tt, BOARD_MEDIA_MAX_EDGE_PX as U, repoParts as Un, ReviewDraft as Ut, TaskTitle as V, NODE_ID_RE as Vn, ReviewChecksState as Vt, BOX_CHANGES as W, GithubPollingRefreshRequest as Wn, ReviewFinding as Wt, Frame as X, MERGEABLE_LIVE_STATES as Xn, TeamReviewCompareFiles as Xt, Box as Y, KILLABLE_STATES as Yn, TeamReviewActionResult as Yt, Note as Z, RESTARTABLE_STATES as Zn, TeamReviewResolveResponse as Zt, AgentSettingsRequest as _, PrFlowDisposeResult as _n, MyPrMergeMethod as _t, AgentAnswerRequest as a, hasRequiredActionHead as an, WhiteboardAgentRequest as at, COHERENCE_HOOKS_INACTIVE as b, PrFlowPackRequires as bn, MyPrMergeStateResponse as bt, AgentCloseRequest as c, PR_ACTION_REPORT_ROUTE as cn, sparseBoardReply as ct, AgentPacksRequest as d, PR_FLOW_PLACEHOLDERS_BY_KIND as dn, MyPrAutoRebase as dt, TeamReviewThreadCommentsResponse as en, UNIT_STATUSES as et, AgentPullRequestRequest as f, PrActionReportBody as fn, MyPrCheckContext as ft, AgentSettingsReply as g, PrFlowDisposeRequest as gn, MyPrLaneEntry as gt, AgentSendRequest as h, PrFlowCommand as hn, MyPrKeepMergeableResult as ht, ASK_USER_QUESTION_TOOL_NAME as i, decisionAsIfApprovalRequired as in, WhiteboardAgentReply as it, SESSION_NAME_RULE_TEXT as j, PrThreadUnresolveResponse as jn, repositoryName as jt, SESSION_DOC_PATH_MAX_CHARS as k, PrFlowsStatus as kn, SessionPrLinks as kt, AgentEditRequest as l, PR_ACTION_REPORT_URL_ENV as ln, LinkedPr as lt, AgentReviewsRequest as m, PrFlowApproveRequest as mn, MyPrKeepMergeableRequest as mt, AGENT_REPLY_SCHEMAS as n, TeamReviewThreadsRepository as nn, WHITEBOARD_ASSET_ROUTE as nt, AgentAttentionRequest as o, hasStandingViewerApproval as on, Wire as ot, AgentReadRequest as p, PrActionRunRequest as pn, MyPrCheckContextsResponse as pt, BoardReview as q, githubPollingShape as qn, ReviewVerdict as qt, AGENT_URL_ENV as r, canApproveAfterComment as rn, WHITEBOARD_LIMITS as rt, AgentCheckoutRequest as s, PR_ACTION_REPORT_BODY_CAP_BYTES as sn, sparseBoardRecord as st, AGENT_API_VERBS as t, TeamReviewThreadResult as tn, Unit as tt, AgentLimitsReply as u, PR_ACTION_TOKEN_ENV as un, MyPr as ut, AgentSpawnRequest as v, PrFlowItemAction as vn, MyPrMergeRequest as vt, CoherenceHooksState as w, PrFlowSaveRuleRequest as wn, MyPrThreadNode as wt, CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS as x, PrFlowPendingApproval as xn, MyPrMergeWhenReadyRequest as xt, AgentWhyRequest as y, PrFlowItemRequest as yn, MyPrMergeResult as yt, SshSignRequest as z, shortSha as zn, PostingPlan as zt };
1935
+ export { Panel as $, TeamReviewStatus as $t, SESSION_NAME_PATTERN as A, PrThreadReplyResponse as An, pullRequestKeyFormat as At, TASK_TITLE_CONTROL_CHARACTERS as B, GH_SEGMENT as Bn, PrDetail as Bt, CONVERSATION_TOOL_RESULT_HOOK_EVENT as C, PrFlowRule as Cn, MyPrSearchNode as Ct, SESSION_COMMANDS as D, PrFlowsSettings as Dn, MyPrsState as Dt, RefinedTaskTitle as E, PrFlowSourceOutput as En, MyPrsSnapshot as Et, SessionDoc as F, prFlowRulesJsonSchema as Fn, FindingSeverity as Ft, Board as G, GithubPollingRefreshResult as Gn, ReviewResult as Gt, UnseenOutcome as H, REPO_SLUG_RE as Hn, ReviewComment as Ht, SessionSnapshot as I, prFlowsOutputJsonSchemaText as In, GithubReviewDecision as It, BoardSummary as J, BADGE_LABELS as Jn, TeamReviewActionRequest as Jt, BoardRecord as K, GithubPrsFreshness as Kn, ReviewThreadId as Kt, SessionState as L, FULL_SHA_RE as Ln, GithubReviewState as Lt, SHOWN_FILE_CAP_BYTES as M, RepoScope as Mn, CommitSha as Mt, SIGN_URL_ENV as N, ReportedPrFlowActionOutcome as Nn, DECIDING_REVIEW_STATES as Nt, SESSION_DOC_BODY_CAP_BYTES as O, PrFlowsState as On, MyPrsStatus as Ot, SSH_SIGN_BODY_CAP_BYTES as P, prActionReportPath as Pn, EarlierReview as Pt, Op as Q, STATES as Qn, TeamReviewStateEntry as Qt, SshSignReply as R, HEX_SHA_RE as Rn, PostedReviewEvent as Rt, CONVERSATION_PERMISSION_HOOK_EVENT as S, PrFlowPrAction as Sn, MyPrMergeWhenReadyResult as St, ConversationQuestion as T, PrFlowSourceCommand as Tn, MyPrThreadsResponse as Tt, BOARD_MEDIA_MAX_EDGE_PX as U, repoParts as Un, ReviewDraft as Ut, TaskTitle as V, NODE_ID_RE as Vn, ReviewChecksState as Vt, BOX_CHANGES as W, GithubPollingRefreshRequest as Wn, ReviewFinding as Wt, Frame as X, MERGEABLE_LIVE_STATES as Xn, TeamReviewCompareFiles as Xt, Box as Y, KILLABLE_STATES as Yn, TeamReviewActionResult as Yt, Note as Z, RESTARTABLE_STATES as Zn, TeamReviewResolveResponse as Zt, AgentSettingsRequest as _, PrFlowDisposeResult as _n, MyPrMergeMethod as _t, AgentAnswerRequest as a, hasRequiredActionHead as an, WhiteboardAgentRequest as at, COHERENCE_HOOKS_INACTIVE as b, PrFlowPackRequires as bn, MyPrMergeStateResponse as bt, AgentCloseRequest as c, PR_ACTION_REPORT_ROUTE as cn, sparseBoardReply as ct, AgentPacksRequest as d, PR_FLOW_PLACEHOLDERS_BY_KIND as dn, MyPrAutoRebase as dt, TeamReviewThreadCommentsResponse as en, UNIT_STATUSES as et, AgentPullRequestRequest as f, PrActionReportBody as fn, MyPrCheckContext as ft, AgentSettingsReply as g, PrFlowDisposeRequest as gn, MyPrLaneEntry as gt, AgentSendRequest as h, PrFlowCommand as hn, MyPrKeepMergeableResult as ht, ASK_USER_QUESTION_TOOL_NAME as i, decisionAsIfApprovalRequired as in, WhiteboardAgentReply as it, SESSION_NAME_RULE_TEXT as j, PrThreadUnresolveResponse as jn, repositoryName as jt, SESSION_DOC_PATH_MAX_CHARS as k, PrFlowsStatus as kn, SessionPrLinks as kt, AgentEditRequest as l, PR_ACTION_REPORT_URL_ENV as ln, LinkedPr as lt, AgentReviewsRequest as m, PrFlowApproveRequest as mn, MyPrKeepMergeableRequest as mt, AGENT_REPLY_SCHEMAS as n, TeamReviewThreadsRepository as nn, WHITEBOARD_ASSET_ROUTE as nt, AgentAttentionRequest as o, hasStandingViewerApproval as on, Wire as ot, AgentReadRequest as p, PrActionRunRequest as pn, MyPrCheckContextsResponse as pt, BoardReview as q, githubPollingShape as qn, ReviewVerdict as qt, AGENT_URL_ENV as r, canApproveAfterComment as rn, WHITEBOARD_LIMITS as rt, AgentCheckoutRequest as s, PR_ACTION_REPORT_BODY_CAP_BYTES as sn, sparseBoardRecord as st, AGENT_API_VERBS as t, TeamReviewThreadResult as tn, Unit as tt, AgentLimitsReply as u, PR_ACTION_TOKEN_ENV as un, MyPr as ut, AgentSpawnRequest as v, PrFlowItemAction as vn, MyPrMergeRequest as vt, CoherenceHooksState as w, PrFlowSaveRuleRequest as wn, MyPrThreadNode as wt, CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS as x, PrFlowPendingApproval as xn, MyPrMergeWhenReadyRequest as xt, AgentWhyRequest as y, PrFlowItemRequest as yn, MyPrMergeResult as yt, SshSignRequest as z, shortSha as zn, PostingPlan as zt };
@@ -1,11 +1,11 @@
1
1
  import { r as errorMessage, t as errorCode } from "./text-DoirglWV.js";
2
2
  import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
3
- import { g as AgentSettingsReply } from "./session-Cjdtb0jm.js";
4
- import { r as BrowserConfig } from "./config-BjiC6jzw.js";
3
+ import { g as AgentSettingsReply } from "./session-D5cMVNNw.js";
4
+ import { r as BrowserConfig } from "./config-B2OU2Iqi.js";
5
5
  import { n as isRecord } from "./coerce-oz_Z_6E7.js";
6
6
  import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
7
- import { A as cloneValue, F as scoreSettingsSearch, I as setValueAtPath, P as parsePosthogProjectSelection, V as SETTINGS_REGISTRY, _t as ENV_SECRET_BINDINGS, bt as withEnvSecrets, j as deleteValueAtPath, l as saveConfigFileOnce, s as loadConfigFile, t as IS_EXPERIMENTAL_BUILD, u as validateConfig, vt as readEnvSecrets, w as isSettingAvailable, z as valueAtPath } from "./config-store-QV2o_a1w.js";
8
- import { a as fail, c as listSettings, d as renderSectionTables, f as requireConfigFileSetting, g as valueText, h as succeed, i as describeSetting, l as readSetting, m as settingsRequestForServer, n as configFileViewOf, o as fitColumn, p as sectionOf, r as defaultText, s as getSetting, t as availableSettings } from "./settings-readout-core-C259m22Z.js";
7
+ import { A as cloneValue, F as scoreSettingsSearch, I as setValueAtPath, P as parsePosthogProjectSelection, V as SETTINGS_REGISTRY, _t as ENV_SECRET_BINDINGS, bt as withEnvSecrets, j as deleteValueAtPath, l as saveConfigFileOnce, s as loadConfigFile, t as IS_EXPERIMENTAL_BUILD, u as validateConfig, vt as readEnvSecrets, w as isSettingAvailable, z as valueAtPath } from "./config-store-D4DR9OEd.js";
8
+ import { a as fail, c as listSettings, d as renderSectionTables, f as requireConfigFileSetting, g as valueText, h as succeed, i as describeSetting, l as readSetting, m as settingsRequestForServer, n as configFileViewOf, o as fitColumn, p as sectionOf, r as defaultText, s as getSetting, t as availableSettings } from "./settings-readout-core-DdYT2sH-.js";
9
9
  import fs from "node:fs";
10
10
  import os from "node:os";
11
11
  //#region server/settings-cli.ts
@@ -320,7 +320,7 @@ function runParsedSettingsCommand(parsed, io) {
320
320
  async function runParsedSettingsCli(parsed, io = processIo()) {
321
321
  const serverRequest = settingsRequestForServer(parsed, process.env);
322
322
  if (!serverRequest) return runParsedSettingsCommand(parsed, io);
323
- const { askAgentApi } = await import("./agent-api-cli-BcRxYTRj.js");
323
+ const { askAgentApi } = await import("./agent-api-cli-Bp2Ybd-A.js");
324
324
  const reply = AgentSettingsReply.safeParse(await askAgentApi("settings", serverRequest).catch((error) => ({
325
325
  ok: false,
326
326
  error: errorMessage(error)
@@ -1,6 +1,6 @@
1
- import { _ as AgentSettingsRequest } from "./session-Cjdtb0jm.js";
1
+ import { _ as AgentSettingsRequest } from "./session-D5cMVNNw.js";
2
2
  import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
3
- import { A as cloneValue, B as FILE_ONLY_GROUPS, L as settingsGroupOf, M as displayText, N as hasScaledUnit, R as settingsOf, V as SETTINGS_REGISTRY, k as SETTINGS_INDEX, vt as readEnvSecrets, w as isSettingAvailable, z as valueAtPath } from "./config-store-QV2o_a1w.js";
3
+ import { A as cloneValue, B as FILE_ONLY_GROUPS, L as settingsGroupOf, M as displayText, N as hasScaledUnit, R as settingsOf, V as SETTINGS_REGISTRY, k as SETTINGS_INDEX, vt as readEnvSecrets, w as isSettingAvailable, z as valueAtPath } from "./config-store-D4DR9OEd.js";
4
4
  //#region server/core/settings-readout-core.ts
5
5
  var VALUE_COLUMN_WIDTH = 40;
6
6
  var SECTION_BY_SETTING_ID = new Map([...SETTINGS_REGISTRY.sections.flatMap((section) => section.settings.map((setting) => [setting.id, {
@@ -1,4 +1,4 @@
1
- import { N as SIGN_URL_ENV, r as AGENT_URL_ENV } from "./session-Cjdtb0jm.js";
1
+ import { N as SIGN_URL_ENV, r as AGENT_URL_ENV } from "./session-D5cMVNNw.js";
2
2
  import { t as HOOK_URL_ENV } from "./hook-relay-core-DA_bz2KA.js";
3
3
  import { i as saneYoloEnv, r as SANE_YOLO_PATH_ENV } from "./sane-yolo-BjUkqIoH.js";
4
4
  import { r as MCP_CREDENTIAL_ENV } from "./agent-config-DDpOIcFv.js";
@@ -1,8 +1,8 @@
1
1
  import { r as errorMessage } from "./text-DoirglWV.js";
2
- import { N as SIGN_URL_ENV, R as SshSignReply } from "./session-Cjdtb0jm.js";
2
+ import { N as SIGN_URL_ENV, R as SshSignReply } from "./session-D5cMVNNw.js";
3
3
  import { l as spawn, r as execFileAsync } from "./child-process-safe-BIh8yQ0I.js";
4
4
  import { a as isLoopbackHostname } from "./hook-relay-core-DA_bz2KA.js";
5
- import { n as postToAgentIngress } from "./agent-api-cli-BVOkv4-2.js";
5
+ import { n as postToAgentIngress } from "./agent-api-cli-9qUAra6H.js";
6
6
  import { l as parseSshPublicKey } from "./ssh-signing-core-BbhBpAhR.js";
7
7
  import path from "node:path";
8
8
  import fs from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { W as BOX_CHANGES, et as UNIT_STATUSES, rt as WHITEBOARD_LIMITS } from "./session-Cjdtb0jm.js";
1
+ import { W as BOX_CHANGES, et as UNIT_STATUSES, rt as WHITEBOARD_LIMITS } from "./session-D5cMVNNw.js";
2
2
  //#region shared/whiteboard-plan-core.ts
3
3
  var LETTERS_IN_ALPHABET = 26;
4
4
  var FIRST_LETTER_CODE = 97;
@@ -1 +1 @@
1
- import{c as e,d as t,u as n}from"./control-ws-DqfbKL5i.js";import{A as r,M as i,k as a,vt as o,xt as s}from"./button-CJs4ySg3.js";import{S as c,s as l}from"./dom-helpers-Bs-xZEnd.js";var u=`cubic-bezier(0.22, 1, 0.36, 1)`,d=`cubic-bezier(0.4, 0, 0.2, 1)`,f=`cubic-bezier(0.1, 0.8, 0.3, 1)`,p=`cubic-bezier(0.2, 0.9, 0.3, 1)`,m=460,ee=`50% 87.5%`,h=90,g=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),_=new WeakMap,v=new WeakMap,y=new WeakMap;function b(e,t){let{class:n,...i}=t,o=a(16,16);return n!==void 0&&o.classList.add(n),o.append(r(e,i)),o}function x(e){return c[e].map(e=>b(e.tag,e.attributes))}function te(e){let t=document.createElement(`span`);return t.className=`status-icon`,t.dataset.icon=e,t.append(...x(e)),t}function S(e){return e!==void 0&&Object.hasOwn(c,e)}function C(e,t,n){return e?e.animate(t,{fill:`both`,easing:u,...n}).finished.catch(()=>void 0):Promise.resolve()}function w(e,t,n){return Promise.all(e.map(e=>C(e,t,n)))}function T(e,t,n,r){let i=e?.firstElementChild;return i instanceof SVGElement?(i.setAttribute(`pathLength`,`1`),C(i,[{strokeDasharray:`1 3`,strokeDashoffset:t},{strokeDasharray:`1 3`,strokeDashoffset:n}],r)):Promise.resolve()}var E=(e,t)=>e.find(e=>e.classList.contains(t)),D=(e,t)=>e.find(e=>e.firstElementChild?.tagName===t),O=(e,t)=>e.filter(e=>!e.classList.contains(t));function k(e){let t=getComputedStyle(e).transform;if(!t||t===`none`)return 0;let n=new DOMMatrixReadOnly(t);return Math.atan2(n.b,n.a)*(180/Math.PI)}var ne=(e,t)=>Promise.all([w(e,[{transform:`scale(1)`,opacity:1},{transform:`scale(0.6)`,opacity:0}],{duration:200,easing:`ease-in`}),w(t,[{transform:`scale(0.6)`,opacity:0},{transform:`scale(1)`,opacity:1}],{duration:280,delay:110})]),A=(e,t)=>C(e,[{transform:`scale(0.3)`,opacity:0},{transform:`scale(1.16)`,opacity:1,offset:.6},{transform:`scale(1)`,opacity:1}],{duration:350,delay:t}),j=e=>C(e,[{transform:`scale(1)`,opacity:1},{transform:`scale(0.2)`,opacity:0}],{duration:230,easing:`ease-in`});function re(e,t){let n=e[0]?k(e[0]):0,r=Math.round(n/h)*h,i=e=>+!e.classList.contains(`status-icon-spin-blur`);for(let e of t)e.style.opacity=`0`;return Promise.all(e.map(e=>C(e,[{transform:`rotate(${n}deg)`,opacity:getComputedStyle(e).opacity},{transform:`rotate(${r}deg)`,opacity:i(e)}],{duration:240,easing:f}))).then(()=>{for(let e of t)e.style.opacity=``;return Promise.all([...e.map(e=>C(e,[{transform:`rotate(${r}deg) scale(1)`,opacity:i(e)},{transform:`rotate(${r}deg) scale(0.55)`,opacity:0}],{duration:300,easing:d})),w(t,[{transform:`scale(0.7, 0.25)`,opacity:0},{transform:`scale(1, 1.06)`,opacity:1,offset:.7},{transform:`scale(1)`,opacity:1}],{duration:340,delay:40,easing:p})])})}var ie={"not-started>starting":(e,t)=>Promise.all([w(e,[{opacity:1},{opacity:0}],{duration:240,easing:`linear`}),w(O(t,`status-icon-spin-blur`),[{opacity:0},{opacity:1}],{duration:240,easing:`linear`})]),"not-started>idle":(e,t)=>Promise.all([w(e,[{transform:`scale(1)`,opacity:1},{transform:`scale(0.7)`,opacity:0}],{duration:340,easing:d}),w(t,[{transform:`scale(0.55)`,opacity:0},{transform:`scale(1)`,opacity:1}],{duration:340,delay:80,easing:d})]),"starting>idle":re,"starting>working":(e,t)=>Promise.all([...e.map(e=>{let t=k(e);return C(e,[{transform:`rotate(${t}deg) scale(1)`,opacity:getComputedStyle(e).opacity},{transform:`rotate(${t}deg) scale(0.55)`,opacity:0}],{duration:260,easing:`ease-in`})}),A(E(t,`status-icon-beat`),160)]),"working>complete":(e,t)=>Promise.all([j(E(e,`status-icon-beat`)),T(t[0],1,0,{duration:320,delay:160})]),"working>failed":(e,t)=>Promise.all([j(E(e,`status-icon-beat`)),T(t[0],1,0,{duration:300,delay:150})]),"working>needs-input":(e,t)=>Promise.all([C(E(e,`status-icon-beat`),[{transform:`none`,opacity:1},{transform:`translateY(37.5%) scale(0.34)`,opacity:1,offset:.9},{transform:`translateY(37.5%) scale(0.34)`,opacity:0}],{duration:320}),C(D(t,`circle`),[{opacity:0},{opacity:0,offset:.85},{opacity:1}],{duration:320,easing:`linear`}),T(D(t,`path`),1,0,{duration:300,delay:260})]),"needs-input>working":(e,t)=>{let n=D(e,`circle`);return n&&(n.style.transformOrigin=ee),Promise.all([T(D(e,`path`),0,1,{duration:200,easing:`ease-in`}),C(n,[{transform:`none`,opacity:1},{transform:`translateY(-37.5%) scale(2.95)`,opacity:1,offset:.95},{transform:`translateY(-37.5%) scale(2.95)`,opacity:0}],{duration:320,delay:140}),C(E(t,`status-icon-beat`),[{opacity:0},{opacity:0,offset:.9},{opacity:1}],{duration:470,easing:`linear`})])},"working>idle":(e,t)=>Promise.all([C(E(e,`status-icon-beat`),[{transform:`scale(1, 1)`,opacity:1},{transform:`scale(0.35, 1.15)`,opacity:0}],{duration:220,easing:`ease-in`}),w(t,[{transform:`scale(0.1, 0.8)`,opacity:0},{transform:`scale(1)`,opacity:1}],{duration:320,delay:120})]),"idle>working":(e,t)=>Promise.all([w(e,[{transform:`scale(1)`,opacity:1},{transform:`scale(0.1, 0.8)`,opacity:0}],{duration:220,easing:`ease-in`}),C(E(t,`status-icon-beat`),[{transform:`scale(0.35, 1.15)`,opacity:0},{transform:`scale(1.12, 1)`,opacity:1,offset:.6},{transform:`scale(1)`,opacity:1}],{duration:360,delay:120})]),"working>monitoring":(e,t)=>Promise.all([C(E(e,`status-icon-beat`),[{transform:`scale(1)`,opacity:1},{transform:`scale(1.3, 0.15)`,opacity:0}],{duration:220,easing:`ease-in`}),w(t,[{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:300,delay:160})]),"monitoring>working":(e,t)=>Promise.all([w(e,[{transform:`scaleY(1)`},{transform:`scaleY(0)`}],{duration:200,easing:`ease-in`}),A(E(t,`status-icon-beat`),170)]),"complete>exited":(e,t)=>Promise.all([T(e[0],0,-1,{duration:220,easing:`ease-in`}),T(t[0],1,0,{duration:380,delay:140})])};function ae(e,t){y.get(t)?.cancel();let n=_.get(e);if(!n)return;t.style.setProperty(`--status-icon-from`,n);let r=t.animate([{"--status-icon-blend":`0%`},{"--status-icon-blend":`100%`}],{duration:m,easing:d});y.set(t,r),r.finished.then(()=>t.style.removeProperty(`--status-icon-from`),()=>void 0)}function M(e){e.isConnected&&_.set(e,getComputedStyle(e).color)}function N(e){for(let t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation||t instanceof CSSTransition||t.cancel()}function P(e,t,n,r){v.get(t)?.();let i=[...t.children].filter(e=>e instanceof SVGSVGElement),a=x(r);for(let e of i)e.dataset.leaving=``;let o=E(i,`status-icon-ping`);o&&(N(o),o.style.opacity=`0`),t.dataset.icon=r,ae(e,t),t.append(...a);let s=!1,c=()=>{if(!s){s=!0;for(let e of i)e.remove();for(let e of a)N(e),e.style.opacity=``;v.delete(t),M(e)}};v.set(t,c),(ie[`${n}>${r}`]??ne)(i,a).then(c,c)}function F(e){return e.isConnected&&!document.hidden&&g?.matches!==!0&&typeof e.animate==`function`}function I(e,t){let n=e.dataset.icon;if(n===t)return;e.dataset.icon=t;let r=e.querySelector(`:scope > .status-icon`);!S(n)||!(r instanceof HTMLElement)||!F(e)?(r instanceof HTMLElement&&v.get(r)?.(),e.replaceChildren(te(t)),M(e)):P(e,r,n,t)}var L={busy:`text-text-muted`,ok:`text-state-done`,error:`text-state-failed`},R=15e3,z=`Something went wrong. Details are hidden in streamer mode.`;function B(e,t){return e!==`error`||t.startsWith(`Not connected to the server. Reconnecting.`)?t:document.documentElement.hasAttribute(`data-streamer`)?z:t}var V={busy:`working`,ok:`complete`,error:`failed`};function H(e){let t=e.querySelector(`:scope > .action-status-icon`),n=e.querySelector(`:scope > .action-status-text`);if(t&&n&&e.childNodes.length===2)return{iconElement:t,textElement:n};let r=l(`span`,`action-status-icon`);r.setAttribute(`aria-hidden`,`true`);let i=l(`span`,`action-status-text`);return e.replaceChildren(r,i),{iconElement:r,textElement:i}}function U(e){e.replaceChildren(),delete e.dataset.tone}function W(e,t,n){if(!n){U(e);return}if(!t){U(e),e.textContent=n;return}e.dataset.tone=t;let{iconElement:r,textElement:i}=H(e);I(r,V[t]),i.textContent=B(t,n)}function G(e=`action-status`){let t=l(`p`,e);return t.setAttribute(`role`,`status`),t.hidden=!0,{element:t,show:(n,r)=>{t.className=`${e} text-meta ${L[n]}`,W(t,n,r),t.hidden=!r},clear:()=>{t.hidden=!0,U(t)}}}function K(e,t){return n(e)?!0:(t.show(`error`,i),!1)}function q(e,t){let n=e instanceof Error?e.message:``;return n===`Request timed out`?`The server did not answer within ${Math.round(t/1e3)} s.`:n||`Not connected to the server. Reconnecting.`}async function oe(e,n,r,{busyText:i,timeoutMs:a=R}={}){i&&r.show(`busy`,i);try{let i=await t(e,n,{timeoutMs:a});return r.clear(),i}catch(e){return r.show(`error`,q(e,a)),null}}var J=null,se=3e4,Y=null;function X(){let e=document.getElementById(`header-status`),t=document.getElementById(`header-status-text`),n=document.getElementById(`header-status-age`),r=document.getElementById(`header-status-dismiss`);return!e||!t||!n||!r?null:(r.dataset.wired===void 0&&(r.dataset.wired=``,r.addEventListener(`click`,$)),{line:e,text:t,age:n})}function Z(){let e=X();if(!e||!J)return;let t=s(Date.now()-J.raisedAt,{...o,justNowBelowSeconds:60});e.age.textContent!==t&&(e.age.textContent=t)}function Q({source:t,sessionId:n,message:r,hidesInStreamerMode:i=!0}){e(t,r);let a=X();if(!a)return;let o=i?B(`error`,r):r,s=l(`strong`,`header-status-source`,t);a.text.replaceChildren(s,` ${o}`),J={source:t,sessionId:n??null,raisedAt:Date.now()},Z(),Y??=window.setInterval(Z,se),a.line.hidden=!1}function ce(e,t){J?.source===e&&(t===void 0||J.sessionId===t)&&$()}function le(e){J?.sessionId===e&&$()}function $(){J=null,Y!==null&&window.clearInterval(Y),Y=null;let e=X();e&&(e.line.hidden=!0,e.text.replaceChildren(),e.age.textContent=``)}export{W as a,oe as c,G as i,K as l,ce as n,Q as o,le as r,q as s,R as t,I as u};
1
+ import{c as e,d as t,u as n}from"./control-ws-B1wIrzsT.js";import{A as r,M as i,k as a,vt as o,xt as s}from"./button-DVUhX7ZS.js";import{S as c,s as l}from"./dom-helpers-Bs-xZEnd.js";var u=`cubic-bezier(0.22, 1, 0.36, 1)`,d=`cubic-bezier(0.4, 0, 0.2, 1)`,f=`cubic-bezier(0.1, 0.8, 0.3, 1)`,p=`cubic-bezier(0.2, 0.9, 0.3, 1)`,m=460,ee=`50% 87.5%`,h=90,g=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),_=new WeakMap,v=new WeakMap,y=new WeakMap;function b(e,t){let{class:n,...i}=t,o=a(16,16);return n!==void 0&&o.classList.add(n),o.append(r(e,i)),o}function x(e){return c[e].map(e=>b(e.tag,e.attributes))}function te(e){let t=document.createElement(`span`);return t.className=`status-icon`,t.dataset.icon=e,t.append(...x(e)),t}function S(e){return e!==void 0&&Object.hasOwn(c,e)}function C(e,t,n){return e?e.animate(t,{fill:`both`,easing:u,...n}).finished.catch(()=>void 0):Promise.resolve()}function w(e,t,n){return Promise.all(e.map(e=>C(e,t,n)))}function T(e,t,n,r){let i=e?.firstElementChild;return i instanceof SVGElement?(i.setAttribute(`pathLength`,`1`),C(i,[{strokeDasharray:`1 3`,strokeDashoffset:t},{strokeDasharray:`1 3`,strokeDashoffset:n}],r)):Promise.resolve()}var E=(e,t)=>e.find(e=>e.classList.contains(t)),D=(e,t)=>e.find(e=>e.firstElementChild?.tagName===t),O=(e,t)=>e.filter(e=>!e.classList.contains(t));function k(e){let t=getComputedStyle(e).transform;if(!t||t===`none`)return 0;let n=new DOMMatrixReadOnly(t);return Math.atan2(n.b,n.a)*(180/Math.PI)}var ne=(e,t)=>Promise.all([w(e,[{transform:`scale(1)`,opacity:1},{transform:`scale(0.6)`,opacity:0}],{duration:200,easing:`ease-in`}),w(t,[{transform:`scale(0.6)`,opacity:0},{transform:`scale(1)`,opacity:1}],{duration:280,delay:110})]),A=(e,t)=>C(e,[{transform:`scale(0.3)`,opacity:0},{transform:`scale(1.16)`,opacity:1,offset:.6},{transform:`scale(1)`,opacity:1}],{duration:350,delay:t}),j=e=>C(e,[{transform:`scale(1)`,opacity:1},{transform:`scale(0.2)`,opacity:0}],{duration:230,easing:`ease-in`});function re(e,t){let n=e[0]?k(e[0]):0,r=Math.round(n/h)*h,i=e=>+!e.classList.contains(`status-icon-spin-blur`);for(let e of t)e.style.opacity=`0`;return Promise.all(e.map(e=>C(e,[{transform:`rotate(${n}deg)`,opacity:getComputedStyle(e).opacity},{transform:`rotate(${r}deg)`,opacity:i(e)}],{duration:240,easing:f}))).then(()=>{for(let e of t)e.style.opacity=``;return Promise.all([...e.map(e=>C(e,[{transform:`rotate(${r}deg) scale(1)`,opacity:i(e)},{transform:`rotate(${r}deg) scale(0.55)`,opacity:0}],{duration:300,easing:d})),w(t,[{transform:`scale(0.7, 0.25)`,opacity:0},{transform:`scale(1, 1.06)`,opacity:1,offset:.7},{transform:`scale(1)`,opacity:1}],{duration:340,delay:40,easing:p})])})}var ie={"not-started>starting":(e,t)=>Promise.all([w(e,[{opacity:1},{opacity:0}],{duration:240,easing:`linear`}),w(O(t,`status-icon-spin-blur`),[{opacity:0},{opacity:1}],{duration:240,easing:`linear`})]),"not-started>idle":(e,t)=>Promise.all([w(e,[{transform:`scale(1)`,opacity:1},{transform:`scale(0.7)`,opacity:0}],{duration:340,easing:d}),w(t,[{transform:`scale(0.55)`,opacity:0},{transform:`scale(1)`,opacity:1}],{duration:340,delay:80,easing:d})]),"starting>idle":re,"starting>working":(e,t)=>Promise.all([...e.map(e=>{let t=k(e);return C(e,[{transform:`rotate(${t}deg) scale(1)`,opacity:getComputedStyle(e).opacity},{transform:`rotate(${t}deg) scale(0.55)`,opacity:0}],{duration:260,easing:`ease-in`})}),A(E(t,`status-icon-beat`),160)]),"working>complete":(e,t)=>Promise.all([j(E(e,`status-icon-beat`)),T(t[0],1,0,{duration:320,delay:160})]),"working>failed":(e,t)=>Promise.all([j(E(e,`status-icon-beat`)),T(t[0],1,0,{duration:300,delay:150})]),"working>needs-input":(e,t)=>Promise.all([C(E(e,`status-icon-beat`),[{transform:`none`,opacity:1},{transform:`translateY(37.5%) scale(0.34)`,opacity:1,offset:.9},{transform:`translateY(37.5%) scale(0.34)`,opacity:0}],{duration:320}),C(D(t,`circle`),[{opacity:0},{opacity:0,offset:.85},{opacity:1}],{duration:320,easing:`linear`}),T(D(t,`path`),1,0,{duration:300,delay:260})]),"needs-input>working":(e,t)=>{let n=D(e,`circle`);return n&&(n.style.transformOrigin=ee),Promise.all([T(D(e,`path`),0,1,{duration:200,easing:`ease-in`}),C(n,[{transform:`none`,opacity:1},{transform:`translateY(-37.5%) scale(2.95)`,opacity:1,offset:.95},{transform:`translateY(-37.5%) scale(2.95)`,opacity:0}],{duration:320,delay:140}),C(E(t,`status-icon-beat`),[{opacity:0},{opacity:0,offset:.9},{opacity:1}],{duration:470,easing:`linear`})])},"working>idle":(e,t)=>Promise.all([C(E(e,`status-icon-beat`),[{transform:`scale(1, 1)`,opacity:1},{transform:`scale(0.35, 1.15)`,opacity:0}],{duration:220,easing:`ease-in`}),w(t,[{transform:`scale(0.1, 0.8)`,opacity:0},{transform:`scale(1)`,opacity:1}],{duration:320,delay:120})]),"idle>working":(e,t)=>Promise.all([w(e,[{transform:`scale(1)`,opacity:1},{transform:`scale(0.1, 0.8)`,opacity:0}],{duration:220,easing:`ease-in`}),C(E(t,`status-icon-beat`),[{transform:`scale(0.35, 1.15)`,opacity:0},{transform:`scale(1.12, 1)`,opacity:1,offset:.6},{transform:`scale(1)`,opacity:1}],{duration:360,delay:120})]),"working>monitoring":(e,t)=>Promise.all([C(E(e,`status-icon-beat`),[{transform:`scale(1)`,opacity:1},{transform:`scale(1.3, 0.15)`,opacity:0}],{duration:220,easing:`ease-in`}),w(t,[{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:300,delay:160})]),"monitoring>working":(e,t)=>Promise.all([w(e,[{transform:`scaleY(1)`},{transform:`scaleY(0)`}],{duration:200,easing:`ease-in`}),A(E(t,`status-icon-beat`),170)]),"complete>exited":(e,t)=>Promise.all([T(e[0],0,-1,{duration:220,easing:`ease-in`}),T(t[0],1,0,{duration:380,delay:140})])};function ae(e,t){y.get(t)?.cancel();let n=_.get(e);if(!n)return;t.style.setProperty(`--status-icon-from`,n);let r=t.animate([{"--status-icon-blend":`0%`},{"--status-icon-blend":`100%`}],{duration:m,easing:d});y.set(t,r),r.finished.then(()=>t.style.removeProperty(`--status-icon-from`),()=>void 0)}function M(e){e.isConnected&&_.set(e,getComputedStyle(e).color)}function N(e){for(let t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation||t instanceof CSSTransition||t.cancel()}function P(e,t,n,r){v.get(t)?.();let i=[...t.children].filter(e=>e instanceof SVGSVGElement),a=x(r);for(let e of i)e.dataset.leaving=``;let o=E(i,`status-icon-ping`);o&&(N(o),o.style.opacity=`0`),t.dataset.icon=r,ae(e,t),t.append(...a);let s=!1,c=()=>{if(!s){s=!0;for(let e of i)e.remove();for(let e of a)N(e),e.style.opacity=``;v.delete(t),M(e)}};v.set(t,c),(ie[`${n}>${r}`]??ne)(i,a).then(c,c)}function F(e){return e.isConnected&&!document.hidden&&g?.matches!==!0&&typeof e.animate==`function`}function I(e,t){let n=e.dataset.icon;if(n===t)return;e.dataset.icon=t;let r=e.querySelector(`:scope > .status-icon`);!S(n)||!(r instanceof HTMLElement)||!F(e)?(r instanceof HTMLElement&&v.get(r)?.(),e.replaceChildren(te(t)),M(e)):P(e,r,n,t)}var L={busy:`text-text-muted`,ok:`text-state-done`,error:`text-state-failed`},R=15e3,z=`Something went wrong. Details are hidden in streamer mode.`;function B(e,t){return e!==`error`||t.startsWith(`Not connected to the server. Reconnecting.`)?t:document.documentElement.hasAttribute(`data-streamer`)?z:t}var V={busy:`working`,ok:`complete`,error:`failed`};function H(e){let t=e.querySelector(`:scope > .action-status-icon`),n=e.querySelector(`:scope > .action-status-text`);if(t&&n&&e.childNodes.length===2)return{iconElement:t,textElement:n};let r=l(`span`,`action-status-icon`);r.setAttribute(`aria-hidden`,`true`);let i=l(`span`,`action-status-text`);return e.replaceChildren(r,i),{iconElement:r,textElement:i}}function U(e){e.replaceChildren(),delete e.dataset.tone}function W(e,t,n){if(!n){U(e);return}if(!t){U(e),e.textContent=n;return}e.dataset.tone=t;let{iconElement:r,textElement:i}=H(e);I(r,V[t]),i.textContent=B(t,n)}function G(e=`action-status`){let t=l(`p`,e);return t.setAttribute(`role`,`status`),t.hidden=!0,{element:t,show:(n,r)=>{t.className=`${e} text-meta ${L[n]}`,W(t,n,r),t.hidden=!r},clear:()=>{t.hidden=!0,U(t)}}}function K(e,t){return n(e)?!0:(t.show(`error`,i),!1)}function q(e,t){let n=e instanceof Error?e.message:``;return n===`Request timed out`?`The server did not answer within ${Math.round(t/1e3)} s.`:n||`Not connected to the server. Reconnecting.`}async function oe(e,n,r,{busyText:i,timeoutMs:a=R}={}){i&&r.show(`busy`,i);try{let i=await t(e,n,{timeoutMs:a});return r.clear(),i}catch(e){return r.show(`error`,q(e,a)),null}}var J=null,se=3e4,Y=null;function X(){let e=document.getElementById(`header-status`),t=document.getElementById(`header-status-text`),n=document.getElementById(`header-status-age`),r=document.getElementById(`header-status-dismiss`);return!e||!t||!n||!r?null:(r.dataset.wired===void 0&&(r.dataset.wired=``,r.addEventListener(`click`,$)),{line:e,text:t,age:n})}function Z(){let e=X();if(!e||!J)return;let t=s(Date.now()-J.raisedAt,{...o,justNowBelowSeconds:60});e.age.textContent!==t&&(e.age.textContent=t)}function Q({source:t,sessionId:n,message:r,hidesInStreamerMode:i=!0}){e(t,r);let a=X();if(!a)return;let o=i?B(`error`,r):r,s=l(`strong`,`header-status-source`,t);a.text.replaceChildren(s,` ${o}`),J={source:t,sessionId:n??null,raisedAt:Date.now()},Z(),Y??=window.setInterval(Z,se),a.line.hidden=!1}function ce(e,t){J?.source===e&&(t===void 0||J.sessionId===t)&&$()}function le(e){J?.sessionId===e&&$()}function $(){J=null,Y!==null&&window.clearInterval(Y),Y=null;let e=X();e&&(e.line.hidden=!0,e.text.replaceChildren(),e.age.textContent=``)}export{W as a,oe as c,G as i,K as l,ce as n,Q as o,le as r,q as s,R as t,I as u};