glimmervoid 0.52.2-next.719 → 0.52.2-next.721

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 (150) hide show
  1. package/dist/bin/glimmervoid.js +16 -16
  2. package/dist/chunks/{adapters-QeHAvLKT.js → adapters-C4VBHYHo.js} +6 -6
  3. package/dist/chunks/{adapters-Dvb7KXnO.js → adapters-C7CEI0fq.js} +1 -1
  4. package/dist/chunks/{agent-api-cli-CZPOzaRb.js → agent-api-cli-B571XTNc.js} +3 -3
  5. package/dist/chunks/agent-api-cli-DdnM_H4H.js +1 -0
  6. package/dist/chunks/{agent-api-core-B3qq8oek.js → agent-api-core-CvNwRgNZ.js} +3 -9
  7. package/dist/chunks/{agent-setup-cli-Dbwb7jtf.js → agent-setup-cli-DxlHDthm.js} +1 -1
  8. package/dist/chunks/{config-BdItI6F3.js → config-ClF7i8C6.js} +2 -2
  9. package/dist/chunks/{config-store-CHFS_vNw.js → config-store-201cn0A1.js} +4 -4
  10. package/dist/chunks/config-store-BrDX0ssT.js +1 -0
  11. package/dist/chunks/{grok-B_9N78_d.js → grok-kT9nCRev.js} +1 -1
  12. package/dist/chunks/kimi-CSCbrloe.js +1 -0
  13. package/dist/chunks/{kimi-YAqn6G1W.js → kimi-DJOALMiY.js} +2 -2
  14. package/dist/chunks/{main-BHMjdBfS.js → main-HIBk_nyb.js} +52 -30
  15. package/dist/chunks/pack-agent-BkxnZGft.js +432 -0
  16. package/dist/chunks/{pack-bridge-BgB2p-Hg.js → pack-bridge-CMzPKvPZ.js} +1 -1
  17. package/dist/chunks/{pack-agent-BY3gEwjx.js → pack-files-CKm6gcGR.js} +110 -573
  18. package/dist/chunks/{packs-cli-CjAfzj-I.js → packs-cli-ByiipDas.js} +6 -5
  19. package/dist/chunks/{pair-cli-BG4FUb5y.js → pair-cli-CDhWmGKV.js} +2 -2
  20. package/dist/chunks/{pr-flows-cli-D8Njf3EF.js → pr-flows-cli-QUMg7_Oz.js} +63 -37
  21. package/dist/chunks/{pr-flows-external-CaziHHty.js → pr-flows-external-QJdRYWnW.js} +10 -21
  22. package/dist/chunks/{remote-config-Dm7-_lHb.js → remote-config-eN6GelcO.js} +1 -1
  23. package/dist/chunks/{session-DC6dGYjf.js → session-C_EdlPyW.js} +35 -22
  24. package/dist/chunks/{settings-cli-C39NaAB1.js → settings-cli-D9dmhoSG.js} +5 -5
  25. package/dist/chunks/{settings-readout-core-CtligFID.js → settings-readout-core-87Ajew__.js} +2 -2
  26. package/dist/chunks/{spawn-env-aigWM-7F.js → spawn-env-_fjRJ34f.js} +3 -2
  27. package/dist/chunks/{ssh-sign-cli-DmT55jSe.js → ssh-sign-cli-Lh9uTM9h.js} +2 -2
  28. package/dist/chunks/{whiteboard-svg-core-tSYpbhy7.js → whiteboard-svg-core-D6_Clunv.js} +1 -1
  29. package/dist/client/assets/{action-status-CsphqLIp.js → action-status-57cP9fbP.js} +1 -1
  30. package/dist/client/assets/action-status-57cP9fbP.js.br +0 -0
  31. package/dist/client/assets/{arena-panel-Dwp8y2NZ.js → arena-panel-DBK3FOgW.js} +2 -2
  32. package/dist/client/assets/arena-panel-DBK3FOgW.js.br +0 -0
  33. package/dist/client/assets/{benchmark-panel-CYRs6njt.js → benchmark-panel-DzF5soM-.js} +1 -1
  34. package/dist/client/assets/benchmark-panel-DzF5soM-.js.br +0 -0
  35. package/dist/client/assets/{boards-view-BNqEed2T.js → boards-view-BD_SWx3l.js} +1 -1
  36. package/dist/client/assets/boards-view-BD_SWx3l.js.br +0 -0
  37. package/dist/client/assets/button-CVmKU9qL.js +1 -0
  38. package/dist/client/assets/button-CVmKU9qL.js.br +0 -0
  39. package/dist/client/assets/{card-actions-BF783lHX.js → card-actions-BNX4cQ22.js} +1 -1
  40. package/dist/client/assets/{card-registry-D_kyKNFR.js → card-registry-B2RFZmB2.js} +1 -1
  41. package/dist/client/assets/card-registry-B2RFZmB2.js.br +0 -0
  42. package/dist/client/assets/{community-panel-DS3UkApo.js → community-panel-BvMkWjmy.js} +1 -1
  43. package/dist/client/assets/community-panel-BvMkWjmy.js.br +0 -0
  44. package/dist/client/assets/{control-ws-BFTcI_Sk.js → control-ws-BpCKssAD.js} +1 -1
  45. package/dist/client/assets/control-ws-BpCKssAD.js.br +0 -0
  46. package/dist/client/assets/{dialogs-Cx0QONjF.js → dialogs-BA9rPYGx.js} +1 -1
  47. package/dist/client/assets/dialogs-BA9rPYGx.js.br +0 -0
  48. package/dist/client/assets/{doc-editor-ui-CQ-SsVYm.js → doc-editor-ui-njV-48Mt.js} +1 -1
  49. package/dist/client/assets/doc-editor-ui-njV-48Mt.js.br +0 -0
  50. package/dist/client/assets/{feature-hint-Bo_OZ6CQ.js → feature-hint-DT1NDTe-.js} +1 -1
  51. package/dist/client/assets/feature-hint-DT1NDTe-.js.br +0 -0
  52. package/dist/client/assets/{first-run-checklist-CZMpSceK.js → first-run-checklist-Dt8GFysX.js} +1 -1
  53. package/dist/client/assets/first-run-checklist-Dt8GFysX.js.br +0 -0
  54. package/dist/client/assets/{hooks-panel-D_WWcD6R.js → hooks-panel-B1SRjYyy.js} +1 -1
  55. package/dist/client/assets/hooks-panel-B1SRjYyy.js.br +0 -0
  56. package/dist/client/assets/{index-DuWDE9I2.js → index-D4HOaloI.js} +5 -5
  57. package/dist/client/assets/index-D4HOaloI.js.br +0 -0
  58. package/dist/client/assets/{issues-panel-D1qL_x0F.js → issues-panel-Cgckhdt0.js} +1 -1
  59. package/dist/client/assets/issues-panel-Cgckhdt0.js.br +0 -0
  60. package/dist/client/assets/{lane-read-token-step-bzSufW14.js → lane-read-token-step-DuSAEY-V.js} +1 -1
  61. package/dist/client/assets/lane-read-token-step-DuSAEY-V.js.br +0 -0
  62. package/dist/client/assets/{menu-YgFIqpxB.js → menu-CgH4aQPE.js} +1 -1
  63. package/dist/client/assets/menu-CgH4aQPE.js.br +0 -0
  64. package/dist/client/assets/{modal-CmB-mwt3.js → modal-DKFrxnH8.js} +1 -1
  65. package/dist/client/assets/modal-DKFrxnH8.js.br +0 -0
  66. package/dist/client/assets/{my-prs-panel-C_GmBrXA.js → my-prs-panel-D98hfuOw.js} +1 -1
  67. package/dist/client/assets/my-prs-panel-D98hfuOw.js.br +0 -0
  68. package/dist/client/assets/{nyan-cat-nQzxNUPN.js → nyan-cat-C1hMNKIf.js} +1 -1
  69. package/dist/client/assets/nyan-cat-C1hMNKIf.js.br +0 -0
  70. package/dist/client/assets/{phone-shell-qUdIewhB.js → phone-shell-DSKoMk_-.js} +1 -1
  71. package/dist/client/assets/phone-shell-DSKoMk_-.js.br +0 -0
  72. package/dist/client/assets/{plan-face-BD13Z8Nm.js → plan-face-DaeKVB_n.js} +1 -1
  73. package/dist/client/assets/plan-face-DaeKVB_n.js.br +0 -0
  74. package/dist/client/assets/{plan-render-BrxIi33z.js → plan-render-7BMe1GQQ.js} +1 -1
  75. package/dist/client/assets/plan-render-7BMe1GQQ.js.br +0 -0
  76. package/dist/client/assets/{pr-queue-columns-B5uPcvV4.js → pr-queue-columns-B9V9mLXw.js} +1 -1
  77. package/dist/client/assets/pr-queue-columns-B9V9mLXw.js.br +0 -0
  78. package/dist/client/assets/{pr-status-icon-C-44DKID.js → pr-status-icon-Bx6wInOj.js} +1 -1
  79. package/dist/client/assets/pr-status-icon-Bx6wInOj.js.br +0 -0
  80. package/dist/client/assets/{radar-panel-BWqCzwjR.js → radar-panel-F_mlKslB.js} +1 -1
  81. package/dist/client/assets/radar-panel-F_mlKslB.js.br +0 -0
  82. package/dist/client/assets/{repo-roots-adder-ByJ8XDCb.js → repo-roots-adder-DQQmm200.js} +1 -1
  83. package/dist/client/assets/repo-roots-adder-DQQmm200.js.br +0 -0
  84. package/dist/client/assets/{resume-dialog-q81xS4Fg.js → resume-dialog-CF4AwHD4.js} +1 -1
  85. package/dist/client/assets/resume-dialog-CF4AwHD4.js.br +0 -0
  86. package/dist/client/assets/{review-queue-panel-BBIesmKx.js → review-queue-panel-D-vbTvIc.js} +1 -1
  87. package/dist/client/assets/review-queue-panel-D-vbTvIc.js.br +0 -0
  88. package/dist/client/assets/{session-actions-D-XfZCX_.js → session-actions-Oqr5gh-y.js} +2 -2
  89. package/dist/client/assets/session-actions-Oqr5gh-y.js.br +0 -0
  90. package/dist/client/assets/{session-row-MJx4kfgA.js → session-row-BNMG0b7h.js} +1 -1
  91. package/dist/client/assets/session-row-BNMG0b7h.js.br +0 -0
  92. package/dist/client/assets/{session-tick-Cu958tSf.js → session-tick-CHJ0mY2-.js} +1 -1
  93. package/dist/client/assets/session-tick-CHJ0mY2-.js.br +0 -0
  94. package/dist/client/assets/{settings-panel-DVDMeuHO.js → settings-panel-BG7RfpWI.js} +2 -2
  95. package/dist/client/assets/settings-panel-BG7RfpWI.js.br +0 -0
  96. package/dist/client/assets/{setup-step-qMoYS0vS.js → setup-step-B8uQtgL-.js} +1 -1
  97. package/dist/client/assets/setup-step-B8uQtgL-.js.br +0 -0
  98. package/dist/client/assets/{trace-panel-CPRamHl5.js → trace-panel-DXuMaFQf.js} +1 -1
  99. package/dist/client/assets/trace-panel-DXuMaFQf.js.br +0 -0
  100. package/dist/client/assets/{usage-panel-DBHS_Yxm.js → usage-panel-DTeMQgAs.js} +1 -1
  101. package/dist/client/assets/usage-panel-DTeMQgAs.js.br +0 -0
  102. package/dist/client/assets/{your-day-tip-BRzwTD3I.js → your-day-tip-npG2dZYF.js} +1 -1
  103. package/dist/client/assets/your-day-tip-npG2dZYF.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 +23 -11
  107. package/dist/server/index.js +1 -1
  108. package/package.json +1 -1
  109. package/dist/chunks/agent-api-cli-CqfBqnBN.js +0 -1
  110. package/dist/chunks/config-store-CoLRNzto.js +0 -1
  111. package/dist/chunks/kimi-_j4Imdso.js +0 -1
  112. package/dist/chunks/packs-cli-DE8O3Xt5.js +0 -1
  113. package/dist/client/assets/action-status-CsphqLIp.js.br +0 -0
  114. package/dist/client/assets/arena-panel-Dwp8y2NZ.js.br +0 -0
  115. package/dist/client/assets/benchmark-panel-CYRs6njt.js.br +0 -0
  116. package/dist/client/assets/boards-view-BNqEed2T.js.br +0 -0
  117. package/dist/client/assets/button-oL7ZznmQ.js +0 -1
  118. package/dist/client/assets/button-oL7ZznmQ.js.br +0 -0
  119. package/dist/client/assets/card-registry-D_kyKNFR.js.br +0 -0
  120. package/dist/client/assets/community-panel-DS3UkApo.js.br +0 -0
  121. package/dist/client/assets/control-ws-BFTcI_Sk.js.br +0 -0
  122. package/dist/client/assets/dialogs-Cx0QONjF.js.br +0 -0
  123. package/dist/client/assets/doc-editor-ui-CQ-SsVYm.js.br +0 -0
  124. package/dist/client/assets/feature-hint-Bo_OZ6CQ.js.br +0 -0
  125. package/dist/client/assets/first-run-checklist-CZMpSceK.js.br +0 -0
  126. package/dist/client/assets/hooks-panel-D_WWcD6R.js.br +0 -0
  127. package/dist/client/assets/index-DuWDE9I2.js.br +0 -0
  128. package/dist/client/assets/issues-panel-D1qL_x0F.js.br +0 -0
  129. package/dist/client/assets/lane-read-token-step-bzSufW14.js.br +0 -0
  130. package/dist/client/assets/menu-YgFIqpxB.js.br +0 -0
  131. package/dist/client/assets/modal-CmB-mwt3.js.br +0 -0
  132. package/dist/client/assets/my-prs-panel-C_GmBrXA.js.br +0 -0
  133. package/dist/client/assets/nyan-cat-nQzxNUPN.js.br +0 -0
  134. package/dist/client/assets/phone-shell-qUdIewhB.js.br +0 -0
  135. package/dist/client/assets/plan-face-BD13Z8Nm.js.br +0 -0
  136. package/dist/client/assets/plan-render-BrxIi33z.js.br +0 -0
  137. package/dist/client/assets/pr-queue-columns-B5uPcvV4.js.br +0 -4
  138. package/dist/client/assets/pr-status-icon-C-44DKID.js.br +0 -0
  139. package/dist/client/assets/radar-panel-BWqCzwjR.js.br +0 -0
  140. package/dist/client/assets/repo-roots-adder-ByJ8XDCb.js.br +0 -0
  141. package/dist/client/assets/resume-dialog-q81xS4Fg.js.br +0 -0
  142. package/dist/client/assets/review-queue-panel-BBIesmKx.js.br +0 -0
  143. package/dist/client/assets/session-actions-D-XfZCX_.js.br +0 -0
  144. package/dist/client/assets/session-row-MJx4kfgA.js.br +0 -0
  145. package/dist/client/assets/session-tick-Cu958tSf.js.br +0 -0
  146. package/dist/client/assets/settings-panel-DVDMeuHO.js.br +0 -0
  147. package/dist/client/assets/setup-step-qMoYS0vS.js.br +0 -0
  148. package/dist/client/assets/trace-panel-CPRamHl5.js.br +0 -0
  149. package/dist/client/assets/usage-panel-DBHS_Yxm.js.br +0 -0
  150. package/dist/client/assets/your-day-tip-BRzwTD3I.js.br +0 -0
@@ -1,9 +1,10 @@
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 { $n as STATES, Ln as prFlowsOutputJsonSchemaText, n as AGENT_REPLY_SCHEMAS } from "./session-DC6dGYjf.js";
5
- import { n as packBridgeJsonSchemaText, r as THEME_STATE_NAMES, t as PackBridgeTopic } from "./pack-bridge-BgB2p-Hg.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-BY3gEwjx.js";
4
+ import { Rn as prFlowsOutputJsonSchemaText, er as STATES, n as AGENT_REPLY_SCHEMAS } from "./session-C_EdlPyW.js";
5
+ import { n as packBridgeJsonSchemaText, r as THEME_STATE_NAMES, t as PackBridgeTopic } from "./pack-bridge-CMzPKvPZ.js";
6
+ import { a as packReportText, c as packFileHeaders, d as decideHostAllowed, i as packCheckHasProblem, r as checkPack, t as packGuideText } from "./pack-agent-BkxnZGft.js";
7
+ import { a as readApprovedPackFingerprints, o as readPackDir, u as packJsonSchemaText } from "./pack-files-CKm6gcGR.js";
7
8
  import path from "node:path";
8
9
  import os from "node:os";
9
10
  import http from "node:http";
@@ -398,7 +399,7 @@ async function runList() {
398
399
  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
400
  return 1;
400
401
  }
401
- const { askAgentApi } = await import("./agent-api-cli-CqfBqnBN.js");
402
+ const { askAgentApi } = await import("./agent-api-cli-DdnM_H4H.js");
402
403
  const reply = AGENT_REPLY_SCHEMAS.packs.safeParse(await askAgentApi("packs", { command: "list" }));
403
404
  if (!reply.success) {
404
405
  process.stderr.write("glimmervoid packs list: Glimmervoid did not answer with a pack list\n");
@@ -516,4 +517,4 @@ async function runPacksCli(parsed) {
516
517
  return runPreview(packDir, typeof parsed.values.port === "string" ? parsed.values.port : null, env, homeDir);
517
518
  }
518
519
  //#endregion
519
- export { runPacksCli as n, runPackCheckCli as t };
520
+ export { runPacksCli };
@@ -1,6 +1,6 @@
1
1
  import { r as errorMessage } from "./text-DoirglWV.js";
2
- import { c as resolveConfigPath } from "./config-store-CHFS_vNw.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-Dm7-_lHb.js";
2
+ import { c as resolveConfigPath } from "./config-store-201cn0A1.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-eN6GelcO.js";
4
4
  import fs from "node:fs";
5
5
  //#region server/text-format.ts
6
6
  function trimIso(iso) {
@@ -1,11 +1,10 @@
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 { dn as PR_ACTION_TOKEN_ENV, fn as PR_FLOW_PLACEHOLDERS_BY_KIND, g as AgentSettingsReply, kn as PrFlowsState, pn as PrActionReportBody, un as PR_ACTION_REPORT_URL_ENV } from "./session-DC6dGYjf.js";
3
+ import { An as PrFlowsState, dn as PR_ACTION_TOKEN_ENV, fn as PR_FLOW_PLACEHOLDERS_BY_KIND, g as AgentSettingsReply, mn as PrActionReportBody, un as PR_ACTION_REPORT_URL_ENV } from "./session-C_EdlPyW.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-BY3gEwjx.js";
7
- import { t as createPrFlowsExternal } from "./pr-flows-external-CaziHHty.js";
8
- import { t as runPackCheckCli } from "./packs-cli-CjAfzj-I.js";
6
+ import { E as prFlowsConfig, F as unknownPlaceholderMessage, T as prFlowSetup, a as readApprovedPackFingerprints, b as packPathsOf, k as scopedToRepo, m as expandPlaceholders, o as readPackDir, p as commandFingerprint, r as packDirsUnder } from "./pack-files-CKm6gcGR.js";
7
+ import { t as createPrFlowsExternal } from "./pr-flows-external-QJdRYWnW.js";
9
8
  import fs from "node:fs";
10
9
  import path from "node:path";
11
10
  import os from "node:os";
@@ -14,11 +13,13 @@ var PR_URL_PATTERN = /^https:\/\/github\.com\/([^/\s]+\/[^/\s]+)\/pull\/(\d+)\/?
14
13
  var GH_TIMEOUT_MS = 3e4;
15
14
  var GH_OUTPUT_MAX_BYTES = 65536;
16
15
  var REPORT_TIMEOUT_MS = 15e3;
17
- var PR_FLOWS_SETTING_KEYS = [
18
- "sources",
19
- "actions",
20
- "rules",
21
- "repoRules"
16
+ var SERVER_SETTING_PATHS = [
17
+ "prFlows.sources",
18
+ "prFlows.actions",
19
+ "prFlows.prActions",
20
+ "prFlows.rules",
21
+ "prFlows.repoRules",
22
+ "packs"
22
23
  ];
23
24
  function placeholderSample(names, pr) {
24
25
  const prValues = pr ? {
@@ -30,8 +31,7 @@ function placeholderSample(names, pr) {
30
31
  return Object.fromEntries(names.map((name) => [name, prValues[name] ?? `{${name}}`]));
31
32
  }
32
33
  function entryCheck(kind, command, approvedFingerprints, pr) {
33
- const names = PR_FLOW_PLACEHOLDERS_BY_KIND[kind];
34
- const expanded = expandPlaceholders(command.command, placeholderSample(names, pr));
34
+ const expanded = expandPlaceholders(command.command, placeholderSample(PR_FLOW_PLACEHOLDERS_BY_KIND[kind], pr));
35
35
  const isApproved = approvedFingerprints.has(commandFingerprint(kind, command));
36
36
  if (!expanded.ok) return {
37
37
  kind,
@@ -39,25 +39,43 @@ function entryCheck(kind, command, approvedFingerprints, pr) {
39
39
  label: command.label,
40
40
  isApproved,
41
41
  argv: null,
42
- error: `{${expanded.unknown}} is not a placeholder; use ${names.map((name) => `{${name}}`).join(", ")}`
42
+ error: unknownPlaceholderMessage(kind, expanded.unknown)
43
43
  };
44
44
  return {
45
45
  kind,
46
46
  id: command.id,
47
47
  label: command.label,
48
48
  isApproved,
49
- argv: kind === "action" ? expanded.argv : null,
49
+ argv: kind === "source" ? null : expanded.argv,
50
50
  error: null
51
51
  };
52
52
  }
53
53
  function approvedFingerprints(homeDir) {
54
54
  const statePath = path.join(homeDir, "pr-flows-state.json");
55
- if (!fs.existsSync(statePath)) return /* @__PURE__ */ new Set();
56
- return new Set(PrFlowsState.safeParse(parseJsonOrNull(fs.readFileSync(statePath, "utf8"))).data?.approvedFingerprints ?? []);
55
+ if (!fs.existsSync(statePath)) return [];
56
+ return PrFlowsState.safeParse(parseJsonOrNull(fs.readFileSync(statePath, "utf8"))).data?.approvedFingerprints ?? [];
57
57
  }
58
- function ruleWarnings(configFile, actionIds) {
59
- const { rules, warnings: parseWarnings } = prFlowRules(configFile);
60
- return [.../* @__PURE__ */ new Set([...parseWarnings, ...unknownActionWarnings(rules, actionIds)])];
58
+ async function installedPacks(homeDir, listedPaths, env) {
59
+ const found = await packDirsUnder(homeDir);
60
+ const packDirs = [.../* @__PURE__ */ new Set([...found.packDirs, ...listedPaths.map((listedPath) => path.resolve(homeDir, listedPath))])];
61
+ const packs = [];
62
+ const warnings = found.warning === null ? [] : [found.warning];
63
+ for (const packDir of packDirs) {
64
+ const read = await readPackDir(packDir, env);
65
+ if (!read.ok) {
66
+ warnings.push(`The pack at ${packDir} was skipped: ${read.errors[0] ?? "unreadable"}`);
67
+ continue;
68
+ }
69
+ if (packs.some((pack) => pack.header.name === read.pack.header.name)) {
70
+ warnings.push(`The pack at ${packDir} was skipped: another pack is already named '${read.pack.header.name}'`);
71
+ continue;
72
+ }
73
+ packs.push(read.pack);
74
+ }
75
+ return {
76
+ packs,
77
+ warnings
78
+ };
61
79
  }
62
80
  async function resolvePr(prUrl, runCommand, homeDir, env) {
63
81
  const match = PR_URL_PATTERN.exec(prUrl);
@@ -86,21 +104,24 @@ async function resolvePr(prUrl, runCommand, homeDir, env) {
86
104
  };
87
105
  }
88
106
  async function readServerConfig(askSetting) {
89
- const prFlows = {};
90
- for (const key of PR_FLOWS_SETTING_KEYS) {
91
- const reply = AgentSettingsReply.safeParse(await askSetting(`prFlows.${key}`));
107
+ const valuesByPath = /* @__PURE__ */ new Map();
108
+ for (const settingPath of SERVER_SETTING_PATHS) {
109
+ const reply = AgentSettingsReply.safeParse(await askSetting(settingPath));
92
110
  if (!reply.success) throw new Error("Glimmervoid sent a settings reply this command cannot read");
93
111
  if (!reply.data.ok) throw new Error(reply.data.error);
94
112
  const readout = reply.data.readout;
95
- if (readout !== null && typeof readout === "object" && "value" in readout) prFlows[key] = readout.value;
113
+ if (readout !== null && typeof readout === "object" && "value" in readout) valuesByPath.set(settingPath, readout.value);
96
114
  }
97
115
  return {
98
116
  configPath: "the config.json this Glimmervoid runs",
99
- configFile: { prFlows }
117
+ configFile: {
118
+ prFlows: Object.fromEntries([...valuesByPath].flatMap(([settingPath, value]) => settingPath.startsWith("prFlows.") ? [[settingPath.slice(8), value]] : [])),
119
+ packs: valuesByPath.get("packs")
120
+ }
100
121
  };
101
122
  }
102
123
  async function readConfigFromServer() {
103
- const { askAgentApi } = await import("./agent-api-cli-CqfBqnBN.js");
124
+ const { askAgentApi } = await import("./agent-api-cli-DdnM_H4H.js");
104
125
  return readServerConfig((settingPath) => askAgentApi("settings", {
105
126
  command: "get",
106
127
  path: settingPath
@@ -123,11 +144,22 @@ async function readConfigFile(env, homeDir) {
123
144
  async function checkPrFlows({ prUrl, env, homeDir, runCommand, readConfig }) {
124
145
  if (!fs.existsSync(homeDir)) throw new Error(`the Glimmervoid home ${homeDir} does not exist; start Glimmervoid once or set GLIMMERVOID_HOME`);
125
146
  const { configPath, configFile } = await readConfig();
126
- const commands = prFlowCommands(configFile);
147
+ const config = prFlowsConfig(configFile);
148
+ const packLoad = await installedPacks(homeDir, packPathsOf(configFile), env);
149
+ const approvedPackFingerprints = readApprovedPackFingerprints(homeDir);
150
+ const setup = prFlowSetup(config, packLoad, approvedFingerprints(homeDir));
151
+ const { approved } = prFlowSetup(config, {
152
+ packs: packLoad.packs.filter((pack) => approvedPackFingerprints.has(pack.fingerprint)),
153
+ warnings: []
154
+ }, approvedFingerprints(homeDir));
155
+ const { commands } = setup;
127
156
  const pr = prUrl === null ? null : await resolvePr(prUrl, runCommand, homeDir, env);
128
- const approved = approvedFingerprints(homeDir);
129
- const entries = [...commands.sources.map((source) => entryCheck("source", source, approved, pr)), ...commands.actions.map((action) => entryCheck("action", action, approved, pr))];
130
- const warnings = [...commands.warnings, ...ruleWarnings(configFile, new Set(commands.actions.map((action) => action.id)))];
157
+ const entries = [
158
+ ...commands.sources.map((source) => entryCheck("source", source, approved, pr)),
159
+ ...commands.actions.map((action) => entryCheck("action", action, approved, pr)),
160
+ ...commands.prActions.map((prAction) => entryCheck("pr-action", prAction, approved, pr))
161
+ ];
162
+ const warnings = [.../* @__PURE__ */ new Set([...commands.warnings, ...setup.ruleWarnings])];
131
163
  if (!pr) return {
132
164
  configPath,
133
165
  warnings,
@@ -166,7 +198,7 @@ async function checkPrFlows({ prUrl, env, homeDir, runCommand, readConfig }) {
166
198
  };
167
199
  }
168
200
  function entryLine(entry) {
169
- const approval = entry.isApproved ? "approved" : "waits for approval in My PRs";
201
+ const approval = entry.isApproved ? "approved" : "waits for approval in My PRs, or for a pack in Settings, Packs";
170
202
  const heading = `${entry.kind} ${entry.id} (${entry.label}): `;
171
203
  if (entry.error !== null) return `${heading}invalid, ${entry.error}`;
172
204
  return `${heading}valid, ${approval}${entry.argv === null ? "" : `\n would run ${JSON.stringify(entry.argv)}`}`;
@@ -178,7 +210,7 @@ function sourceRunLines(run) {
178
210
  }
179
211
  function reportText(report) {
180
212
  const lines = [`Checked ${report.configPath}`];
181
- if (report.entries.length === 0) lines.push("No prFlows.sources or prFlows.actions are configured.");
213
+ if (report.entries.length === 0) lines.push("No prFlows.sources, prFlows.actions or prFlows.prActions are configured, in config.json or a pack.");
182
214
  lines.push(...report.entries.map(entryLine));
183
215
  lines.push(...report.warnings.map((warning) => `warning: ${warning}`));
184
216
  if (report.pr) lines.push(`Ran the approved sources against ${report.pr.url} at ${report.pr.headRefOid.slice(0, 12)}; a source waiting for approval in My PRs does not run:`, ...report.sourceRuns.flatMap(sourceRunLines), ...report.outOfScopeSources.map((source) => `source ${source.id} skipped: limited to ${source.repos.join(", ")}`));
@@ -205,12 +237,6 @@ async function runPrFlowsCheckCli(parsed) {
205
237
  writeOutput: (text) => process.stdout.write(text),
206
238
  writeError: (text) => process.stderr.write(text)
207
239
  };
208
- if (typeof parsed.values.pack === "string") return runPackCheckCli({
209
- packDir: parsed.values.pack,
210
- isJson: parsed.values.json === true,
211
- env,
212
- homeDir
213
- });
214
240
  const readConfig = env["GLIMMERVOID_AGENT_URL"] ? readConfigFromServer : () => readConfigFile(env, homeDir);
215
241
  return runPrFlowsCheck({
216
242
  prUrl: typeof parsed.values.pr === "string" ? parsed.values.pr : null,
@@ -241,7 +267,7 @@ async function runPrActionReport({ outcome, message, env }, io) {
241
267
  io.writeError("--outcome must be started, done, failed or refused, and --message at most 500 characters\n");
242
268
  return 1;
243
269
  }
244
- const { postToAgentIngress } = await import("./agent-api-cli-CqfBqnBN.js");
270
+ const { postToAgentIngress } = await import("./agent-api-cli-DdnM_H4H.js");
245
271
  const reply = await postToAgentIngress({
246
272
  endpoint: new URL(reportUrl),
247
273
  token,
@@ -1,8 +1,8 @@
1
- import { Dn as PrFlowSourceOutput, Pn as ReportedPrFlowActionOutcome } from "./session-DC6dGYjf.js";
1
+ import { Fn as ReportedPrFlowActionOutcome, On as PrFlowSourceOutput } from "./session-C_EdlPyW.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-aigWM-7F.js";
5
- import { S as expandPlaceholders, k as prActionPlaceholderValues } from "./pack-agent-BY3gEwjx.js";
4
+ import { r as withoutGlimmervoidSecrets } from "./spawn-env-_fjRJ34f.js";
5
+ import { C as prActionPlaceholderValues, F as unknownPlaceholderMessage, M as sourcePlaceholderValues, m as expandPlaceholders } from "./pack-files-CKm6gcGR.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;
@@ -24,18 +24,7 @@ function reportedActionOutcome(stdout) {
24
24
  message: firstCharacters(reported.message ?? "")
25
25
  };
26
26
  }
27
- function unknownPlaceholderError(name, knownNames) {
28
- return firstCharacters(`The command names {${name}}, which is not a placeholder; use ${knownNames}.`);
29
- }
30
27
  function createPrFlowsExternal({ homeDir, baseEnv = () => process.env, runCommand = runCommandSafely }) {
31
- function placeholderValues(pr) {
32
- return {
33
- prUrl: pr.url,
34
- repo: pr.repo,
35
- number: String(pr.number),
36
- head: pr.headRefOid
37
- };
38
- }
39
28
  function commandEnv(pr) {
40
29
  return {
41
30
  ...withoutGlimmervoidSecrets(baseEnv()),
@@ -46,10 +35,10 @@ function createPrFlowsExternal({ homeDir, baseEnv = () => process.env, runComman
46
35
  };
47
36
  }
48
37
  async function runSource(source, pr) {
49
- const expanded = expandPlaceholders(source.command, placeholderValues(pr));
38
+ const expanded = expandPlaceholders(source.command, sourcePlaceholderValues(pr));
50
39
  if (!expanded.ok) return {
51
40
  ok: false,
52
- error: unknownPlaceholderError(expanded.unknown, "{prUrl}, {repo}, {number} or {head}")
41
+ error: firstCharacters(unknownPlaceholderMessage("source", expanded.unknown))
53
42
  };
54
43
  const [program, ...args] = expanded.argv;
55
44
  if (program === void 0) return {
@@ -79,11 +68,11 @@ function createPrFlowsExternal({ homeDir, baseEnv = () => process.env, runComman
79
68
  function itemInvocation(pr, item) {
80
69
  return {
81
70
  values: {
82
- ...placeholderValues(pr),
71
+ ...sourcePlaceholderValues(pr),
83
72
  itemPath: item.path,
84
73
  itemLine: item.lineStart === null ? "" : String(item.lineStart)
85
74
  },
86
- knownNames: "{prUrl}, {repo}, {number}, {head}, {itemPath} or {itemLine}",
75
+ kind: "action",
87
76
  env: {
88
77
  ...commandEnv(pr),
89
78
  GLIMMERVOID_ITEM_JSON: JSON.stringify(item)
@@ -93,7 +82,7 @@ function createPrFlowsExternal({ homeDir, baseEnv = () => process.env, runComman
93
82
  function prInvocation(pr, extraEnv) {
94
83
  return {
95
84
  values: prActionPlaceholderValues(pr),
96
- knownNames: "{prUrl}, {repo}, {number}, {head}, {headRef} or {baseRef}",
85
+ kind: "pr-action",
97
86
  env: {
98
87
  ...commandEnv(pr),
99
88
  GLIMMERVOID_PR_HEAD_REF: pr.headRefName,
@@ -104,11 +93,11 @@ function createPrFlowsExternal({ homeDir, baseEnv = () => process.env, runComman
104
93
  };
105
94
  }
106
95
  async function runAction(action, pr, item, extraEnv = {}) {
107
- const { values, knownNames, env } = item === void 0 ? prInvocation(pr, extraEnv) : itemInvocation(pr, item);
96
+ const { values, kind, env } = item === void 0 ? prInvocation(pr, extraEnv) : itemInvocation(pr, item);
108
97
  const expanded = expandPlaceholders(action.command, values);
109
98
  if (!expanded.ok) return {
110
99
  outcome: "failed",
111
- message: unknownPlaceholderError(expanded.unknown, knownNames)
100
+ message: firstCharacters(unknownPlaceholderMessage(kind, expanded.unknown))
112
101
  };
113
102
  const [program, ...args] = expanded.argv;
114
103
  if (program === void 0) return {
@@ -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-CHFS_vNw.js";
5
+ import { b as DEFAULT_TIMER_FNS, o as glimmervoidHomeDir, x as unrefTimer, xt as canonicalizePath } from "./config-store-201cn0A1.js";
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
8
8
  import crypto from "node:crypto";
@@ -124,37 +124,50 @@ var PR_FLOW_ID = /^[a-z0-9][a-z0-9-]{0,63}$/;
124
124
  var PR_FLOW_QUALIFIED_ID = /^(?:[a-z0-9][a-z0-9-]{0,39}\/)?[a-z0-9][a-z0-9-]{0,63}$/;
125
125
  var ONE_PRINTABLE_LINE = /^[^\u0000-\u001f\u007f-\u009f]+$/;
126
126
  var PrFlowRunActionRef = z.templateLiteral(["run:", z.string().regex(PR_FLOW_QUALIFIED_ID)]);
127
+ var PackPrFlowRunActionRef = z.templateLiteral(["run:", z.string().regex(PR_FLOW_ID)]);
127
128
  var PrFlowDisposition = z.union([z.enum(["dismiss", "fix-local"]), PrFlowRunActionRef]);
128
129
  var PrFlowActionRef = z.union([z.enum([
129
130
  "ask",
130
131
  "fix-local",
131
132
  "dismiss"
132
133
  ]), PrFlowRunActionRef], { error: "a pr flows rule action must be ask, fix-local, dismiss or run:<action id>" });
134
+ var PackPrFlowActionRef = z.union([z.enum([
135
+ "ask",
136
+ "fix-local",
137
+ "dismiss"
138
+ ]), PackPrFlowRunActionRef], { error: "a pack rule action must be ask, fix-local, dismiss or run:<id> of an action of this pack" });
133
139
  var RepositoryName = z.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/, { error: "a repository is owner/name" });
134
140
  var RepoScope = z.array(RepositoryName).min(1).optional().describe("The owner/name repositories this applies to; every repository when absent");
135
- var PrFlowRule = z.strictObject({
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" }),
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"),
141
- scope: z.enum([
142
- "mine",
143
- "team",
144
- "both"
145
- ]).default("mine").describe("Rules act only on your own pull requests today, so mine and both act there and team never acts yet"),
146
- repos: RepoScope,
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")
149
- }).refine((rule) => rule.action !== "dismiss" || rule.reason !== void 0, {
150
- message: "a dismiss rule needs a reason",
151
- path: ["reason"]
152
- });
141
+ var RULE_ACTION_TEXT = "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";
142
+ var RULE_SOURCES_TEXT = "An item merged from several sources matches only when every one of them is listed here or under authors; any source when both are absent";
143
+ function ruleSchema(sources, action) {
144
+ return z.strictObject({
145
+ 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" }),
146
+ sources,
147
+ authors: z.array(z.string().trim().min(1)).min(1).optional().describe(`The GitHub logins of review comment authors this rule acts on, compared case-insensitively. ${RULE_SOURCES_TEXT}`),
148
+ priority: z.array(PrFlowPriority).min(1).optional().describe("The finding priorities this rule acts on; any priority when absent"),
149
+ 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"),
150
+ text: z.string().min(1).optional().describe("Text the finding must contain, compared case-insensitively"),
151
+ scope: z.enum([
152
+ "mine",
153
+ "team",
154
+ "both"
155
+ ]).default("mine").describe("Rules act only on your own pull requests today, so mine and both act there and team never acts yet"),
156
+ repos: RepoScope,
157
+ action,
158
+ reason: z.string().trim().min(1).max(2e3).optional().describe("The reply posted when the rule dismisses an item")
159
+ }).refine((rule) => rule.action !== "dismiss" || rule.reason !== void 0, {
160
+ message: "a dismiss rule needs a reason",
161
+ path: ["reason"]
162
+ });
163
+ }
164
+ var PrFlowRule = ruleSchema(z.array(z.string().regex(PR_FLOW_QUALIFIED_ID, { error: "a rule source is the id of a source in prFlows.sources, or <pack>/<id> for a pack source" })).min(1).optional().describe(`The ids of the sources this rule acts on: a prFlows.sources id, or <pack>/<id> for a pack source. ${RULE_SOURCES_TEXT}`), PrFlowActionRef.describe(`${RULE_ACTION_TEXT}; a pack action is run:<pack>/<id>`));
165
+ var PackPrFlowRule = ruleSchema(z.array(z.string().regex(PR_FLOW_ID, { error: "inside a pack a rule source is the bare id of one of its sources, with no slash" })).min(1).optional().describe(`The bare ids of this pack's sources the rule acts on. ${RULE_SOURCES_TEXT}`), PackPrFlowActionRef.describe(`${RULE_ACTION_TEXT}; run:<id> names an action of this pack by its bare id`));
153
166
  function prFlowRulesJsonSchema(rulesSchema) {
154
167
  return z.toJSONSchema(rulesSchema, {
155
168
  io: "input",
156
169
  override: ({ zodSchema, jsonSchema }) => {
157
- if (zodSchema !== PrFlowRule) return;
170
+ if (zodSchema !== PrFlowRule && zodSchema !== PackPrFlowRule) return;
158
171
  Object.assign(jsonSchema, Object.fromEntries([["if", {
159
172
  properties: { action: { const: "dismiss" } },
160
173
  required: ["action"]
@@ -186,7 +199,7 @@ function commandDescription(kind, runsWith) {
186
199
  }
187
200
  var PrFlowCommand = z.strictObject({
188
201
  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"),
202
+ label: z.string().trim().min(1).max(24).describe("The name shown to the operator; rules never match on it"),
190
203
  command: z.array(z.string().min(1)).min(1, { error: "a command needs at least the program to run" }),
191
204
  timeoutSeconds: z.number().int().positive().max(3600).default(120).describe("Seconds before the command is stopped")
192
205
  });
@@ -195,7 +208,7 @@ var ACTION_OUTCOME = "Exit 0 means done and any other exit failed, unless stdout
195
208
  var PrFlowSourceCommand = PrFlowCommand.extend({
196
209
  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`)),
197
210
  repos: RepoScope
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>" }) });
211
+ });
199
212
  var PrFlowItemAction = PrFlowCommand.extend({ command: PrFlowCommand.shape.command.describe(commandDescription("action", `${COMMAND_ENV}, and the review item as GLIMMERVOID_ITEM_JSON. ${ACTION_OUTCOME}`)) });
200
213
  var PrFlowPrAction = PrFlowCommand.extend({
201
214
  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}`)),
@@ -1932,4 +1945,4 @@ var AGENT_REPLY_SCHEMAS = Object.freeze({
1932
1945
  answer: z.union([AgentOkReply, AgentRefusal])
1933
1946
  });
1934
1947
  //#endregion
1935
- export { Op as $, STATES as $n, TeamReviewStateEntry as $t, SESSION_NAME_PATTERN as A, PrFlowsStatus as An, SessionPrLinks as At, TASK_TITLE_CONTROL_CHARACTERS as B, shortSha as Bn, PostingPlan as Bt, CONVERSATION_TOOL_RESULT_HOOK_EVENT as C, PrFlowPrAction as Cn, MyPrMergeWhenReadyResult as Ct, SESSION_COMMANDS as D, PrFlowSourceOutput as Dn, MyPrsSnapshot as Dt, RefinedTaskTitle as E, PrFlowSourceCommand as En, MyPrThreadsResponse as Et, SessionDoc as F, prActionReportPath as Fn, EarlierReview as Ft, Board as G, GithubPollingRefreshRequest as Gn, ReviewFinding as Gt, UnseenOutcome as H, NODE_ID_RE as Hn, ReviewChecksState as Ht, SessionSnapshot as I, prFlowRulesJsonSchema as In, FindingSeverity as It, BoardSummary as J, githubPollingShape as Jn, ReviewVerdict as Jt, BoardRecord as K, GithubPollingRefreshResult as Kn, ReviewResult as Kt, SessionState as L, prFlowsOutputJsonSchemaText as Ln, GithubReviewDecision as Lt, SHOWN_FILE_CAP_BYTES as M, PrThreadUnresolveResponse as Mn, repositoryName as Mt, SIGN_URL_ENV as N, RepoScope as Nn, CommitSha as Nt, SESSION_DOC_BODY_CAP_BYTES as O, PrFlowsSettings as On, MyPrsState as Ot, SSH_SIGN_BODY_CAP_BYTES as P, ReportedPrFlowActionOutcome as Pn, DECIDING_REVIEW_STATES as Pt, Note as Q, RESTARTABLE_STATES as Qn, TeamReviewResolveResponse as Qt, SshSignReply as R, FULL_SHA_RE as Rn, GithubReviewState as Rt, CONVERSATION_PERMISSION_HOOK_EVENT as S, PrFlowPendingApproval as Sn, MyPrMergeWhenReadyRequest as St, ConversationQuestion as T, PrFlowSaveRuleRequest as Tn, MyPrThreadNode as Tt, BOARD_MEDIA_MAX_EDGE_PX as U, REPO_SLUG_RE as Un, ReviewComment as Ut, TaskTitle as V, GH_SEGMENT as Vn, PrDetail as Vt, BOX_CHANGES as W, repoParts as Wn, ReviewDraft as Wt, Element as X, KILLABLE_STATES as Xn, TeamReviewActionResult as Xt, Box as Y, BADGE_LABELS as Yn, TeamReviewActionRequest as Yt, Frame as Z, MERGEABLE_LIVE_STATES as Zn, TeamReviewCompareFiles as Zt, AgentSettingsRequest as _, PrFlowDisposeRequest as _n, MyPrLaneEntry as _t, AgentAnswerRequest as a, decisionAsIfApprovalRequired as an, WhiteboardAgentReply as at, COHERENCE_HOOKS_INACTIVE as b, PrFlowItemRequest as bn, MyPrMergeResult as bt, AgentCloseRequest as c, PR_ACTION_REPORT_BODY_CAP_BYTES as cn, sparseBoardRecord as ct, AgentPacksRequest as d, PR_ACTION_TOKEN_ENV as dn, MyPr as dt, TeamReviewStatus as en, Panel as et, AgentPullRequestRequest as f, PR_FLOW_PLACEHOLDERS_BY_KIND as fn, MyPrAutoRebase as ft, AgentSettingsReply as g, PrFlowCommand as gn, MyPrKeepMergeableResult as gt, AgentSendRequest as h, PrFlowApproveRequest as hn, MyPrKeepMergeableRequest as ht, ASK_USER_QUESTION_TOOL_NAME as i, canApproveAfterComment as in, WHITEBOARD_LIMITS as it, SESSION_NAME_RULE_TEXT as j, PrThreadReplyResponse as jn, pullRequestKeyFormat as jt, SESSION_DOC_PATH_MAX_CHARS as k, PrFlowsState as kn, MyPrsStatus as kt, AgentEditRequest as l, PR_ACTION_REPORT_ROUTE as ln, sparseBoardReply as lt, AgentReviewsRequest as m, PrActionRunRequest as mn, MyPrCheckContextsResponse as mt, AGENT_REPLY_SCHEMAS as n, TeamReviewThreadResult as nn, Unit as nt, AgentAttentionRequest as o, hasRequiredActionHead as on, WhiteboardAgentRequest as ot, AgentReadRequest as p, PrActionReportBody as pn, MyPrCheckContext as pt, BoardReview as q, GithubPrsFreshness as qn, ReviewThreadId as qt, AGENT_URL_ENV as r, TeamReviewThreadsRepository as rn, WHITEBOARD_ASSET_ROUTE as rt, AgentCheckoutRequest as s, hasStandingViewerApproval as sn, Wire as st, AGENT_API_VERBS as t, TeamReviewThreadCommentsResponse as tn, UNIT_STATUSES as tt, AgentLimitsReply as u, PR_ACTION_REPORT_URL_ENV as un, LinkedPr as ut, AgentSpawnRequest as v, PrFlowDisposeResult as vn, MyPrMergeMethod as vt, CoherenceHooksState as w, PrFlowRule as wn, MyPrSearchNode as wt, CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS as x, PrFlowPackRequires as xn, MyPrMergeStateResponse as xt, AgentWhyRequest as y, PrFlowItemAction as yn, MyPrMergeRequest as yt, SshSignRequest as z, HEX_SHA_RE as zn, PostedReviewEvent as zt };
1948
+ export { Op as $, RESTARTABLE_STATES as $n, TeamReviewStateEntry as $t, SESSION_NAME_PATTERN as A, PrFlowsState as An, SessionPrLinks as At, TASK_TITLE_CONTROL_CHARACTERS as B, HEX_SHA_RE as Bn, PostingPlan as Bt, CONVERSATION_TOOL_RESULT_HOOK_EVENT as C, PrFlowPendingApproval as Cn, MyPrMergeWhenReadyResult as Ct, SESSION_COMMANDS as D, PrFlowSourceCommand as Dn, MyPrsSnapshot as Dt, RefinedTaskTitle as E, PrFlowSaveRuleRequest as En, MyPrThreadsResponse as Et, SessionDoc as F, ReportedPrFlowActionOutcome as Fn, EarlierReview as Ft, Board as G, repoParts as Gn, ReviewFinding as Gt, UnseenOutcome as H, GH_SEGMENT as Hn, ReviewChecksState as Ht, SessionSnapshot as I, prActionReportPath as In, FindingSeverity as It, BoardSummary as J, GithubPrsFreshness as Jn, ReviewVerdict as Jt, BoardRecord as K, GithubPollingRefreshRequest as Kn, ReviewResult as Kt, SessionState as L, prFlowRulesJsonSchema as Ln, GithubReviewDecision as Lt, SHOWN_FILE_CAP_BYTES as M, PrThreadReplyResponse as Mn, repositoryName as Mt, SIGN_URL_ENV as N, PrThreadUnresolveResponse as Nn, CommitSha as Nt, SESSION_DOC_BODY_CAP_BYTES as O, PrFlowSourceOutput as On, MyPrsState as Ot, SSH_SIGN_BODY_CAP_BYTES as P, RepoScope as Pn, DECIDING_REVIEW_STATES as Pt, Note as Q, MERGEABLE_LIVE_STATES as Qn, TeamReviewResolveResponse as Qt, SshSignReply as R, prFlowsOutputJsonSchemaText as Rn, GithubReviewState as Rt, CONVERSATION_PERMISSION_HOOK_EVENT as S, PrFlowPackRequires as Sn, MyPrMergeWhenReadyRequest as St, ConversationQuestion as T, PrFlowRule as Tn, MyPrThreadNode as Tt, BOARD_MEDIA_MAX_EDGE_PX as U, NODE_ID_RE as Un, ReviewComment as Ut, TaskTitle as V, shortSha as Vn, PrDetail as Vt, BOX_CHANGES as W, REPO_SLUG_RE as Wn, ReviewDraft as Wt, Element as X, BADGE_LABELS as Xn, TeamReviewActionResult as Xt, Box as Y, githubPollingShape as Yn, TeamReviewActionRequest as Yt, Frame as Z, KILLABLE_STATES as Zn, TeamReviewCompareFiles as Zt, AgentSettingsRequest as _, PrFlowCommand as _n, MyPrLaneEntry as _t, AgentAnswerRequest as a, decisionAsIfApprovalRequired as an, WhiteboardAgentReply as at, COHERENCE_HOOKS_INACTIVE as b, PrFlowItemAction as bn, MyPrMergeResult as bt, AgentCloseRequest as c, PR_ACTION_REPORT_BODY_CAP_BYTES as cn, sparseBoardRecord as ct, AgentPacksRequest as d, PR_ACTION_TOKEN_ENV as dn, MyPr as dt, TeamReviewStatus as en, STATES as er, Panel as et, AgentPullRequestRequest as f, PR_FLOW_PLACEHOLDERS_BY_KIND as fn, MyPrAutoRebase as ft, AgentSettingsReply as g, PrFlowApproveRequest as gn, MyPrKeepMergeableResult as gt, AgentSendRequest as h, PrActionRunRequest as hn, MyPrKeepMergeableRequest as ht, ASK_USER_QUESTION_TOOL_NAME as i, canApproveAfterComment as in, WHITEBOARD_LIMITS as it, SESSION_NAME_RULE_TEXT as j, PrFlowsStatus as jn, pullRequestKeyFormat as jt, SESSION_DOC_PATH_MAX_CHARS as k, PrFlowsSettings as kn, MyPrsStatus as kt, AgentEditRequest as l, PR_ACTION_REPORT_ROUTE as ln, sparseBoardReply as lt, AgentReviewsRequest as m, PrActionReportBody as mn, MyPrCheckContextsResponse as mt, AGENT_REPLY_SCHEMAS as n, TeamReviewThreadResult as nn, Unit as nt, AgentAttentionRequest as o, hasRequiredActionHead as on, WhiteboardAgentRequest as ot, AgentReadRequest as p, PackPrFlowRule as pn, MyPrCheckContext as pt, BoardReview as q, GithubPollingRefreshResult as qn, ReviewThreadId as qt, AGENT_URL_ENV as r, TeamReviewThreadsRepository as rn, WHITEBOARD_ASSET_ROUTE as rt, AgentCheckoutRequest as s, hasStandingViewerApproval as sn, Wire as st, AGENT_API_VERBS as t, TeamReviewThreadCommentsResponse as tn, UNIT_STATUSES as tt, AgentLimitsReply as u, PR_ACTION_REPORT_URL_ENV as un, LinkedPr as ut, AgentSpawnRequest as v, PrFlowDisposeRequest as vn, MyPrMergeMethod as vt, CoherenceHooksState as w, PrFlowPrAction as wn, MyPrSearchNode as wt, CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS as x, PrFlowItemRequest as xn, MyPrMergeStateResponse as xt, AgentWhyRequest as y, PrFlowDisposeResult as yn, MyPrMergeRequest as yt, SshSignRequest as z, FULL_SHA_RE as zn, PostedReviewEvent 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-DC6dGYjf.js";
4
- import { r as BrowserConfig } from "./config-BdItI6F3.js";
3
+ import { g as AgentSettingsReply } from "./session-C_EdlPyW.js";
4
+ import { r as BrowserConfig } from "./config-ClF7i8C6.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-CHFS_vNw.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-CtligFID.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-201cn0A1.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-87Ajew__.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-CqfBqnBN.js");
323
+ const { askAgentApi } = await import("./agent-api-cli-DdnM_H4H.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-DC6dGYjf.js";
1
+ import { _ as AgentSettingsRequest } from "./session-C_EdlPyW.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-CHFS_vNw.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-201cn0A1.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-DC6dGYjf.js";
1
+ import { N as SIGN_URL_ENV, r as AGENT_URL_ENV } from "./session-C_EdlPyW.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";
@@ -22,6 +22,7 @@ var GLIMMERVOID_SCRUB_KEYS = [
22
22
  var SANE_YOLO_GUARD_KEYS = [SANE_YOLO_PATH_ENV, ...Object.keys(saneYoloEnv(""))];
23
23
  var SAFETY_NET_ENV_PREFIXES = ["CC_SAFETY_NET_", "SAFETY_NET_"];
24
24
  var LAUNCHING_TERMINAL_IDENTITY_KEYS = ["TERM_PROGRAM", "TERM_PROGRAM_VERSION"];
25
+ var DETACHED_DESKTOP_BUS_ADDRESS = "disabled:";
25
26
  function normalizePathEntry(entry) {
26
27
  return entry.replace(/\\/g, "/").toLowerCase();
27
28
  }
@@ -85,4 +86,4 @@ function withoutGlimmervoidSecrets(env) {
85
86
  return scrubbed;
86
87
  }
87
88
  //#endregion
88
- export { withoutGlimmervoidSecrets as n, buildAgentEnv as t };
89
+ export { buildAgentEnv as n, withoutGlimmervoidSecrets as r, DETACHED_DESKTOP_BUS_ADDRESS as t };
@@ -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-DC6dGYjf.js";
2
+ import { N as SIGN_URL_ENV, R as SshSignReply } from "./session-C_EdlPyW.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-CZPOzaRb.js";
5
+ import { n as postToAgentIngress } from "./agent-api-cli-B571XTNc.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, it as WHITEBOARD_LIMITS, tt as UNIT_STATUSES } from "./session-DC6dGYjf.js";
1
+ import { W as BOX_CHANGES, it as WHITEBOARD_LIMITS, tt as UNIT_STATUSES } from "./session-C_EdlPyW.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-BFTcI_Sk.js";import{A as r,M as i,k as a,vt as o,xt as s}from"./button-oL7ZznmQ.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-BpCKssAD.js";import{A as r,M as i,k as a,vt as o,xt as s}from"./button-CVmKU9qL.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};