glimmervoid 0.46.2-next.190 → 0.46.2-next.192

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 (102) hide show
  1. package/dist/bin/glimmervoid.js +9 -9
  2. package/dist/chunks/{adapters-DTv96Upu.js → adapters-B1qCBKDo.js} +4 -4
  3. package/dist/chunks/{adapters-BS0WLJDe.js → adapters-B8de1_Qj.js} +1 -1
  4. package/dist/chunks/{agent-setup-cli-O13kzelz.js → agent-setup-cli-CwjtzaC0.js} +1 -1
  5. package/dist/chunks/{config-store-krPtyCYJ.js → config-store-BOHOik5x.js} +4 -0
  6. package/dist/chunks/config-store-CCNIW85X.js +1 -0
  7. package/dist/chunks/{grok-DGTxQFMm.js → grok-z6bXbyuG.js} +1 -1
  8. package/dist/chunks/kimi-BHd_DgQx.js +1 -0
  9. package/dist/chunks/{kimi-D3mnxP5o.js → kimi-DYcsNY69.js} +3 -3
  10. package/dist/chunks/kimi-home-DEuu2e0l.js +1 -0
  11. package/dist/chunks/{kimi-home-C1rWg4dD.js → kimi-home-WZ9E4f-u.js} +1 -1
  12. package/dist/chunks/{main-BsfGt13Q.js → main-BJF6Pe8q.js} +25 -17
  13. package/dist/chunks/{pair-cli-BhRwHCWQ.js → pair-cli-B6yHimlP.js} +2 -2
  14. package/dist/chunks/{remote-config-wVwmfoOx.js → remote-config-BxpKWWaG.js} +1 -1
  15. package/dist/chunks/{sane-yolo-KmcTONAe.js → sane-yolo-DSyFqbVE.js} +1 -1
  16. package/dist/chunks/{settings-cli-BkMo9Zzd.js → settings-cli-ELnNp2fC.js} +2 -2
  17. package/dist/chunks/{settings-readout-core-Dr1LDgE5.js → settings-readout-core-nTAWBSEk.js} +1 -1
  18. package/dist/chunks/{spawn-env-SjY2UxQI.js → spawn-env-C-PfRa2d.js} +1 -1
  19. package/dist/client/assets/{alert-sound-CPBIqRXa.js → alert-sound-CEoydvYU.js} +1 -1
  20. package/dist/client/assets/alert-sound-CEoydvYU.js.br +0 -0
  21. package/dist/client/assets/{benchmark-panel-6GYGn4fe.js → benchmark-panel-eCrjVVie.js} +1 -1
  22. package/dist/client/assets/benchmark-panel-eCrjVVie.js.br +0 -0
  23. package/dist/client/assets/{celebration-player-Cx9nzoBq.js → celebration-player-g5YQDx88.js} +1 -1
  24. package/dist/client/assets/celebration-player-g5YQDx88.js.br +0 -0
  25. package/dist/client/assets/{dialogs-C7TV_TBf.js → dialogs-COFMGqE5.js} +1 -1
  26. package/dist/client/assets/dialogs-COFMGqE5.js.br +0 -0
  27. package/dist/client/assets/{doc-editor-ui-G5t_vru5.js → doc-editor-ui-CGt1b_bZ.js} +1 -1
  28. package/dist/client/assets/doc-editor-ui-CGt1b_bZ.js.br +0 -0
  29. package/dist/client/assets/{feature-hint-BYbKO_kK.js → feature-hint-ChLUBhd8.js} +1 -1
  30. package/dist/client/assets/feature-hint-ChLUBhd8.js.br +0 -0
  31. package/dist/client/assets/feature-hint-Dl3XDeG1.css +1 -0
  32. package/dist/client/assets/feature-hint-Dl3XDeG1.css.br +0 -0
  33. package/dist/client/assets/{first-run-checklist-BAGTH-Ig.js → first-run-checklist-DkSFzwVM.js} +1 -1
  34. package/dist/client/assets/first-run-checklist-DkSFzwVM.js.br +0 -0
  35. package/dist/client/assets/{hooks-panel-BnSLTqQv.js → hooks-panel-CbRf7zBN.js} +1 -1
  36. package/dist/client/assets/hooks-panel-CbRf7zBN.js.br +0 -0
  37. package/dist/client/assets/{index-cexoNCUv.js → index-Doflbkag.js} +5 -5
  38. package/dist/client/assets/index-Doflbkag.js.br +0 -0
  39. package/dist/client/assets/{issues-panel-qHOwJZ7B.js → issues-panel-1TNoECwg.js} +1 -1
  40. package/dist/client/assets/issues-panel-1TNoECwg.js.br +0 -0
  41. package/dist/client/assets/{nyan-cat-Djf30gYM.js → nyan-cat-t-7IT87U.js} +1 -1
  42. package/dist/client/assets/nyan-cat-t-7IT87U.js.br +0 -0
  43. package/dist/client/assets/{phone-shell-Ddx3dllH.js → phone-shell-CmM2XYas.js} +1 -1
  44. package/dist/client/assets/phone-shell-CmM2XYas.js.br +0 -0
  45. package/dist/client/assets/{plan-face-9z5-tvjW.js → plan-face-Dwsk_Ao1.js} +1 -1
  46. package/dist/client/assets/plan-face-Dwsk_Ao1.js.br +0 -0
  47. package/dist/client/assets/{plan-render-BDZIJnEx.js → plan-render-BJP9FY5A.js} +1 -1
  48. package/dist/client/assets/plan-render-BJP9FY5A.js.br +0 -0
  49. package/dist/client/assets/{pr-queue-columns-BXKnquWh.js → pr-queue-columns--98Rafbz.js} +1 -1
  50. package/dist/client/assets/pr-queue-columns--98Rafbz.js.br +0 -0
  51. package/dist/client/assets/{radar-panel-Blo3htww.js → radar-panel-r3QPSs9b.js} +1 -1
  52. package/dist/client/assets/radar-panel-r3QPSs9b.js.br +0 -0
  53. package/dist/client/assets/{repo-roots-adder-BFB-ft7M.js → repo-roots-adder-Byh1iIoR.js} +1 -1
  54. package/dist/client/assets/repo-roots-adder-Byh1iIoR.js.br +0 -0
  55. package/dist/client/assets/{resume-dialog-CcZELnyI.js → resume-dialog-DN0u7A6G.js} +1 -1
  56. package/dist/client/assets/resume-dialog-DN0u7A6G.js.br +0 -0
  57. package/dist/client/assets/{review-queue-panel-BXAfutmq.js → review-queue-panel--ZNNWcNw.js} +1 -1
  58. package/dist/client/assets/review-queue-panel--ZNNWcNw.js.br +0 -0
  59. package/dist/client/assets/{settings-panel-Kv-OwccX.js → settings-panel-DOWGK_Vl.js} +2 -2
  60. package/dist/client/assets/settings-panel-DOWGK_Vl.js.br +0 -0
  61. package/dist/client/assets/{shown-lightbox-BUuov_ZE.js → shown-lightbox-lWubQz7l.js} +1 -1
  62. package/dist/client/assets/shown-lightbox-lWubQz7l.js.br +0 -0
  63. package/dist/client/assets/{trace-panel-DdSZulPb.js → trace-panel-CFv5lZ87.js} +1 -1
  64. package/dist/client/assets/trace-panel-CFv5lZ87.js.br +0 -0
  65. package/dist/client/assets/{usage-panel-DJ5M5Qzw.js → usage-panel-BvBYmd8G.js} +1 -1
  66. package/dist/client/assets/usage-panel-BvBYmd8G.js.br +0 -0
  67. package/dist/client/assets/{visions-panel-PnOVasnO.js → visions-panel-CEVdi5kf.js} +1 -1
  68. package/dist/client/assets/visions-panel-CEVdi5kf.js.br +0 -0
  69. package/dist/client/index.html +1 -1
  70. package/dist/client/index.html.br +0 -0
  71. package/dist/server/index.js +1 -1
  72. package/dist/session/hook-tool-relay.js +1 -1
  73. package/package.json +1 -1
  74. package/dist/chunks/config-store-DYxKXpsA.js +0 -1
  75. package/dist/chunks/kimi-3tGlF3OJ.js +0 -1
  76. package/dist/chunks/kimi-home-Dmdeb54_.js +0 -1
  77. package/dist/client/assets/alert-sound-CPBIqRXa.js.br +0 -0
  78. package/dist/client/assets/benchmark-panel-6GYGn4fe.js.br +0 -0
  79. package/dist/client/assets/celebration-player-Cx9nzoBq.js.br +0 -0
  80. package/dist/client/assets/dialogs-C7TV_TBf.js.br +0 -0
  81. package/dist/client/assets/doc-editor-ui-G5t_vru5.js.br +0 -0
  82. package/dist/client/assets/feature-hint-B1s17OLH.css +0 -1
  83. package/dist/client/assets/feature-hint-B1s17OLH.css.br +0 -0
  84. package/dist/client/assets/feature-hint-BYbKO_kK.js.br +0 -0
  85. package/dist/client/assets/first-run-checklist-BAGTH-Ig.js.br +0 -0
  86. package/dist/client/assets/hooks-panel-BnSLTqQv.js.br +0 -0
  87. package/dist/client/assets/index-cexoNCUv.js.br +0 -0
  88. package/dist/client/assets/issues-panel-qHOwJZ7B.js.br +0 -0
  89. package/dist/client/assets/nyan-cat-Djf30gYM.js.br +0 -0
  90. package/dist/client/assets/phone-shell-Ddx3dllH.js.br +0 -0
  91. package/dist/client/assets/plan-face-9z5-tvjW.js.br +0 -0
  92. package/dist/client/assets/plan-render-BDZIJnEx.js.br +0 -0
  93. package/dist/client/assets/pr-queue-columns-BXKnquWh.js.br +0 -0
  94. package/dist/client/assets/radar-panel-Blo3htww.js.br +0 -0
  95. package/dist/client/assets/repo-roots-adder-BFB-ft7M.js.br +0 -0
  96. package/dist/client/assets/resume-dialog-CcZELnyI.js.br +0 -0
  97. package/dist/client/assets/review-queue-panel-BXAfutmq.js.br +0 -0
  98. package/dist/client/assets/settings-panel-Kv-OwccX.js.br +0 -0
  99. package/dist/client/assets/shown-lightbox-BUuov_ZE.js.br +0 -0
  100. package/dist/client/assets/trace-panel-DdSZulPb.js.br +0 -0
  101. package/dist/client/assets/usage-panel-DJ5M5Qzw.js.br +0 -0
  102. package/dist/client/assets/visions-panel-PnOVasnO.js.br +0 -0
@@ -65,15 +65,15 @@ var OWN_SUBCOMMAND_RUNNERS = [
65
65
  return 0;
66
66
  }],
67
67
  ["pair", async (subcommandArgs) => {
68
- const { runPairCli } = await import("../chunks/pair-cli-BhRwHCWQ.js");
68
+ const { runPairCli } = await import("../chunks/pair-cli-B6yHimlP.js");
69
69
  return runPairCli(subcommandArgs);
70
70
  }],
71
71
  ["agent", async (subcommandArgs) => {
72
- const { runAgentSetupCli } = await import("../chunks/agent-setup-cli-O13kzelz.js");
72
+ const { runAgentSetupCli } = await import("../chunks/agent-setup-cli-CwjtzaC0.js");
73
73
  return runAgentSetupCli(subcommandArgs);
74
74
  }],
75
75
  ["settings", async (subcommandArgs) => {
76
- const { runSettingsCli } = await import("../chunks/settings-cli-BkMo9Zzd.js");
76
+ const { runSettingsCli } = await import("../chunks/settings-cli-ELnNp2fC.js");
77
77
  return runSettingsCli(subcommandArgs);
78
78
  }],
79
79
  ["visions", async (subcommandArgs) => {
@@ -158,7 +158,7 @@ async function readDeclaredCustomAgents() {
158
158
  declared: [],
159
159
  error: null
160
160
  };
161
- const { loadConfigFile } = await import("../chunks/config-store-DYxKXpsA.js");
161
+ const { loadConfigFile } = await import("../chunks/config-store-CCNIW85X.js");
162
162
  try {
163
163
  const loaded = loadConfigFile(decided.path, { exitOnError: false });
164
164
  if (!loaded.config) return {
@@ -234,7 +234,7 @@ async function runDoctor() {
234
234
  }
235
235
  switchSection("Agents");
236
236
  try {
237
- const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-BS0WLJDe.js");
237
+ const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-B8de1_Qj.js");
238
238
  const declaredCustomAgents = await readDeclaredCustomAgents();
239
239
  if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
240
240
  setCustomAgents(declaredCustomAgents.declared);
@@ -242,11 +242,11 @@ async function runDoctor() {
242
242
  const { label, path: resolvedPath } = describeAgentResolvability(id);
243
243
  line(`${id} (${label})`, resolvedPath ?? missingAgentText(id));
244
244
  }
245
- const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-O13kzelz.js");
245
+ const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-CwjtzaC0.js");
246
246
  const grokSetup = inspectGrokAgentSetup();
247
247
  line("grok hook setup", `${grokSetup.classification}: ${grokSetup.filePath}`);
248
- const { default: kimi } = await import("../chunks/kimi-3tGlF3OJ.js");
249
- const { describeKimiHome } = await import("../chunks/kimi-home-Dmdeb54_.js");
248
+ const { default: kimi } = await import("../chunks/kimi-BHd_DgQx.js");
249
+ const { describeKimiHome } = await import("../chunks/kimi-home-DEuu2e0l.js");
250
250
  line("kimi home", describeKimiHome(kimi.expectedHooksBlock()));
251
251
  } catch (err) {
252
252
  line("agents", `probe failed: ${firstLine(errorText(err))}`);
@@ -255,7 +255,7 @@ async function runDoctor() {
255
255
  try {
256
256
  const { resolvePackageBin } = await import("../chunks/runtime-paths-Cc0_ZR6V.js");
257
257
  const { execFileSync } = await import("../chunks/child-process-safe-CjVtRjDD.js");
258
- const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-O13kzelz.js");
258
+ const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-CwjtzaC0.js");
259
259
  const binPath = resolvePackageBin("cc-safety-net", "cc-safety-net");
260
260
  line("Sane YOLO", binPath || "not installed");
261
261
  if (binPath) line("cc-safety-net version", execFileSync(process.execPath, [binPath, "--version"], {
@@ -6,13 +6,13 @@ import { o as supervisionLine } from "./session-routes-Cr9S--Nf.js";
6
6
  import { c as textOr, i as numberOr, s as rawTextOr } from "./coerce-NSst8oRP.js";
7
7
  import { n as resolveAgentCommand, t as buildAgentSpawnCommand } from "./spawn-command-Cc40FiZI.js";
8
8
  import { n as parseJsonRecord } from "./json-core-dfa_7Fak.js";
9
- import { n as SANE_YOLO_PATH_ENV, r as saneYoloEnv } from "./sane-yolo-KmcTONAe.js";
9
+ import { n as SANE_YOLO_PATH_ENV, r as saneYoloEnv } from "./sane-yolo-DSyFqbVE.js";
10
10
  import { r as nextBackoffMs } from "./backoff-DjVpfHk7.js";
11
- import { t as buildAgentEnv } from "./spawn-env-SjY2UxQI.js";
11
+ import { t as buildAgentEnv } from "./spawn-env-C-PfRa2d.js";
12
12
  import { t as buildHookCommand } from "./hook-command-core-qTNK-xMF.js";
13
- import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-DGTxQFMm.js";
13
+ import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-z6bXbyuG.js";
14
14
  import { n as isExperimentalBuild, t as compareReleaseVersions } from "./build-channel-Ud_whc0P.js";
15
- import { t as kimi } from "./kimi-D3mnxP5o.js";
15
+ import { t as kimi } from "./kimi-DYcsNY69.js";
16
16
  import fs from "node:fs";
17
17
  import path from "node:path";
18
18
  //#region session/adapters/claude-code.ts
@@ -1 +1 @@
1
- export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-DTv96Upu.js";
1
+ export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-B1qCBKDo.js";
@@ -1,5 +1,5 @@
1
1
  import { a as isMissingFileError, r as errorMessage } from "./text-DoirglWV.js";
2
- import { a as classifyGrokHooksFile, o as renderGrokHooksFile, t as grok } from "./grok-DGTxQFMm.js";
2
+ import { a as classifyGrokHooksFile, o as renderGrokHooksFile, t as grok } from "./grok-z6bXbyuG.js";
3
3
  import { p as writeTextAtomicSync } from "./json-file-BjFK_eSH.js";
4
4
  import fs from "node:fs";
5
5
  import path from "node:path";
@@ -2083,6 +2083,10 @@ var SECTIONS = Object.freeze([
2083
2083
  control: "number",
2084
2084
  integer: true,
2085
2085
  range: POSTHOG_PROJECT_ID_RANGE,
2086
+ unit: {
2087
+ label: "project id",
2088
+ storedPerDisplay: 1
2089
+ },
2086
2090
  keywords: ["project id", "warehouse"],
2087
2091
  defaultValue: 2,
2088
2092
  ...MACHINE_NOW
@@ -0,0 +1 @@
1
+ export { c as loadConfigFile } from "./config-store-BOHOik5x.js";
@@ -1,7 +1,7 @@
1
1
  import { r as errorMessage } from "./text-DoirglWV.js";
2
2
  import { s as relayPath } from "./runtime-paths-ghcH9CeW.js";
3
3
  import { n as isRecord } from "./coerce-NSst8oRP.js";
4
- import { t as buildAgentEnv } from "./spawn-env-SjY2UxQI.js";
4
+ import { t as buildAgentEnv } from "./spawn-env-C-PfRa2d.js";
5
5
  import { t as buildHookCommand } from "./hook-command-core-qTNK-xMF.js";
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
@@ -0,0 +1 @@
1
+ export { t as default } from "./kimi-DYcsNY69.js";
@@ -2,9 +2,9 @@ import { s as relayPath } from "./runtime-paths-ghcH9CeW.js";
2
2
  import { r as ASK_USER_QUESTION_TOOL_NAME } from "./session-B2Wieg0a.js";
3
3
  import { r as execFileSync } from "./child-process-safe-D4hyVIXj.js";
4
4
  import { n as resolveAgentCommand, t as buildAgentSpawnCommand } from "./spawn-command-Cc40FiZI.js";
5
- import { t as KIMI_SANE_YOLO_FLAVOR } from "./sane-yolo-KmcTONAe.js";
6
- import { t as buildAgentEnv } from "./spawn-env-SjY2UxQI.js";
7
- import { a as kimiHomeLinkRefusal, c as releaseKimiHome, h as renderKimiHooksBlock, n as generatedKimiHomePath, o as prepareKimiHome, r as holdKimiHome, s as realKimiHome } from "./kimi-home-C1rWg4dD.js";
5
+ import { t as KIMI_SANE_YOLO_FLAVOR } from "./sane-yolo-DSyFqbVE.js";
6
+ import { t as buildAgentEnv } from "./spawn-env-C-PfRa2d.js";
7
+ import { a as prepareKimiHome, i as kimiHomeLinkRefusal, n as generatedKimiHomePath, o as realKimiHome, p as renderKimiHooksBlock, r as holdKimiHome, s as releaseKimiHome } from "./kimi-home-WZ9E4f-u.js";
8
8
  import fs from "node:fs";
9
9
  import path from "node:path";
10
10
  import { createHash } from "node:crypto";
@@ -0,0 +1 @@
1
+ export { t as describeKimiHome } from "./kimi-home-WZ9E4f-u.js";
@@ -870,4 +870,4 @@ function releaseUnheldKimiHomeSecrets(generatedHome) {
870
870
  releaseSecretsUnlessHeldElsewhere(generatedHome, { whenLocksMissing: "keep" });
871
871
  }
872
872
  //#endregion
873
- export { kimiHomeLinkRefusal as a, releaseKimiHome as c, createHeldSessionTempFolder as d, releaseSessionLock as f, renderKimiHooksBlock as h, inspectKimiHome as i, releaseKimiHomeSecrets as l, trashSessionTempFolderOnceUnheld as m, generatedKimiHomePath as n, prepareKimiHome as o, sessionIdOfLockFile as p, holdKimiHome as r, realKimiHome as s, describeKimiHome as t, releaseUnheldKimiHomeSecrets as u };
873
+ export { prepareKimiHome as a, releaseUnheldKimiHomeSecrets as c, sessionIdOfLockFile as d, trashSessionTempFolderOnceUnheld as f, kimiHomeLinkRefusal as i, createHeldSessionTempFolder as l, generatedKimiHomePath as n, realKimiHome as o, renderKimiHooksBlock as p, holdKimiHome as r, releaseKimiHome as s, describeKimiHome as t, releaseSessionLock as u };
@@ -15,21 +15,21 @@ import { t as HOOK_URL_ENV } from "./hook-relay-core-DA_bz2KA.js";
15
15
  import { t as HOOK_VIA_GUARDRAILS_PROXY_ENV } from "./guardrails-proxy-core-BI3rdY-m.js";
16
16
  import { n as refocusReplyFor } from "./refocus-core-CwP_KIcU.js";
17
17
  import { n as parseJsonRecord, t as parseJsonOrNull } from "./json-core-dfa_7Fak.js";
18
- import { i as saneYoloFiles } from "./sane-yolo-KmcTONAe.js";
18
+ import { i as saneYoloFiles } from "./sane-yolo-DSyFqbVE.js";
19
19
  import { _ as lineStartOffsets, a as projectForUri, b as replacedSpanOfWholeTextChange, c as visionsLaneReloadSignature, d as applyDidOpen, f as createDocStore, g as lineOfOffset, h as getDoc, i as isUriInProjects, l as applyDidChange, m as formatRange, n as applyEditorNotification, o as resolveVisionsScopeProjects, p as detectBlankLineBoundary, r as createEditorState, s as scopePathsOf, t as ACTIVITY_METHOD, u as applyDidClose, v as listDocs, x as uriOfParams, y as offsetOfPosition } from "./ingest-editor-core-B2tycW_m.js";
20
20
  import { n as DEFAULT_MAX_MS, r as nextBackoffMs, t as DEFAULT_BASE_MS } from "./backoff-DjVpfHk7.js";
21
21
  import { n as unrefTimer, t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.js";
22
22
  import { a as readPageTitle, i as filesAfterRetention, n as decideShownKind, o as shownMimeForFilename, r as describeOverCap, t as SHOWN_SNIFF_BYTES } from "./shown-files-core-C7ER2sw2.js";
23
23
  import { n as shellQuote } from "./hook-command-core-qTNK-xMF.js";
24
24
  import { C as parseCgroupBytes, S as memoryReserveBytes, T as parseMemAvailableBytes, _ as createSpawnGate, a as jsonStateLoadError, b as cgroupLimitBytes, c as loadedJsonValue, d as writeJsonAtomicSync, f as writeTextAtomic, g as createSerialQueue, h as createMemoryAdmission, i as createJsonStateWriter, m as createKeyedSerialQueue, n as appendJsonLines, o as loadJsonStateFile, p as writeTextAtomicSync, r as createJsonStateStore, s as loadJsonStateFileSync, t as appendJsonLine, u as writeJsonAtomic, v as isQueueAdmissionTimeout, w as parseCgroupV2Path, x as headroomFromReadings, y as cgroupAncestorPaths } from "./json-file-BjFK_eSH.js";
25
- import { $ as matchedPrefix, A as FIRST_RUN_NOTICE, B as codexUserIdOf, F as buildBrowserExceptionProperties, G as nodeMajorVersion, H as decideRemoteTelemetryState, I as buildExceptionProperties, K as parsePosthogReleaseId, L as buildPersonProperties, M as TELEMETRY_FLAGS_URL, N as adapterBucket, P as buildAiGenerationEvents, Q as DEFAULT_BRANCH_GC_PREFIXES, R as classifySessionExit, U as decideTelemetryConsent, V as decideIsDevInstall, W as exceptionFingerprint, X as stableConfigKey, a as ensureProjectIds, at as canonicalizePath, et as planBranchGc, g as validateSettingsBlock, h as settingsBlockSpecFor, i as createConfigStore, it as worktreeIntegrationTips, j as TELEMETRY_BATCH_URL, m as mergeSettingsBlock, n as DEFAULT_CONFIG, nt as sessionIdFromBranch, o as generateProjectId, ot as comparableDirectoryPath, q as resolveProjectToken, rt as usablePrefixes, s as glimmervoidHomeDir$1, st as isSameDirectoryPath, t as ABORT_CONFIG_SAVE, tt as planWorktreeGc, z as claudeAccountUuidOf } from "./config-store-krPtyCYJ.js";
25
+ import { $ as matchedPrefix, A as FIRST_RUN_NOTICE, B as codexUserIdOf, F as buildBrowserExceptionProperties, G as nodeMajorVersion, H as decideRemoteTelemetryState, I as buildExceptionProperties, K as parsePosthogReleaseId, L as buildPersonProperties, M as TELEMETRY_FLAGS_URL, N as adapterBucket, P as buildAiGenerationEvents, Q as DEFAULT_BRANCH_GC_PREFIXES, R as classifySessionExit, U as decideTelemetryConsent, V as decideIsDevInstall, W as exceptionFingerprint, X as stableConfigKey, a as ensureProjectIds, at as canonicalizePath, et as planBranchGc, g as validateSettingsBlock, h as settingsBlockSpecFor, i as createConfigStore, it as worktreeIntegrationTips, j as TELEMETRY_BATCH_URL, m as mergeSettingsBlock, n as DEFAULT_CONFIG, nt as sessionIdFromBranch, o as generateProjectId, ot as comparableDirectoryPath, q as resolveProjectToken, rt as usablePrefixes, s as glimmervoidHomeDir$1, st as isSameDirectoryPath, t as ABORT_CONFIG_SAVE, tt as planWorktreeGc, z as claudeAccountUuidOf } from "./config-store-BOHOik5x.js";
26
26
  import { _ as TelemetryState, a as DEEP_HISTORY_SCROLLBACK_LINES, c as describeDataAttach, d as DashboardTelemetryReport, h as TELEMETRY_EVENT_SCHEMAS, i as HookEnvelope, l as parseDataAttach, m as PendingCrashReport, r as HTTP_URL_RE, s as LOGGED_FAST_CLOSE_COUNTS, u as parseDataClientMessage } from "./build-channel-Ud_whc0P.js";
27
- import { $ as identityFromRelPath, A as decideFileRead, B as sessionsRootCandidates, C as pickNewestPublished, D as codexRootCandidates, E as codexHomes, F as kimiHomes, G as kimiSessionIdFromPath, H as shouldPersistWarehouse, I as passOutcome, J as dedupKeys, K as parseKimiUsageLine, L as projectDirCandidates, M as expandTilde, N as grokHomes, O as codexSessionIdFromPath, P as isUsageFile, Q as foldReplacementIntoGenerationRollup, R as resolveProjectsDirs, S as parseResolvedSha, T as codexFallbackRoots, U as splitLines$1, V as shouldEvaluateDespiteIoFailures, W as kimiDedupIdentity, X as expandAdvisorIterations, Y as emptyTotals, Z as foldEntryIntoGenerationRollup, _ as isCheckFresh, a as describeAgentResolvability, at as totalTokensOf$1, b as parseRegistryDeprecation, c as isKnownAgentId, ct as claudeCode, d as resolveAdapter, et as isWithinGenerationRecencyWindow, f as setCustomAgents, g as decideUpdateStatus, h as decideInstallFlavor, i as customAgentFingerprint, it as shouldReplace, j as dedupeCodexFiles, k as continuationDelayMs, l as listAgentIds, m as readHostCodexVersion, n as cachedAgentResolvability, nt as parseJsonLine, o as getAdapter, ot as vendorUsageEntry, p as codex, q as addEntryToTotals, r as commandFor, rt as parseUsageLine, s as hookProfileOf, st as HOOK_TOOLS, t as DEFAULT_AGENT_ID, tt as mergeGenerationRollups, u as resetCommandCache, v as normalizeSha, w as shortSha$1, x as parseRegistryLatest, y as normalizeUpdateChannel, z as scopedClaudeRoots } from "./adapters-DTv96Upu.js";
28
- import { a as kimiHomeLinkRefusal, d as createHeldSessionTempFolder, f as releaseSessionLock, m as trashSessionTempFolderOnceUnheld, n as generatedKimiHomePath, p as sessionIdOfLockFile, s as realKimiHome, u as releaseUnheldKimiHomeSecrets } from "./kimi-home-C1rWg4dD.js";
29
- import { t as kimi } from "./kimi-D3mnxP5o.js";
27
+ import { $ as identityFromRelPath, A as decideFileRead, B as sessionsRootCandidates, C as pickNewestPublished, D as codexRootCandidates, E as codexHomes, F as kimiHomes, G as kimiSessionIdFromPath, H as shouldPersistWarehouse, I as passOutcome, J as dedupKeys, K as parseKimiUsageLine, L as projectDirCandidates, M as expandTilde, N as grokHomes, O as codexSessionIdFromPath, P as isUsageFile, Q as foldReplacementIntoGenerationRollup, R as resolveProjectsDirs, S as parseResolvedSha, T as codexFallbackRoots, U as splitLines$1, V as shouldEvaluateDespiteIoFailures, W as kimiDedupIdentity, X as expandAdvisorIterations, Y as emptyTotals, Z as foldEntryIntoGenerationRollup, _ as isCheckFresh, a as describeAgentResolvability, at as totalTokensOf$1, b as parseRegistryDeprecation, c as isKnownAgentId, ct as claudeCode, d as resolveAdapter, et as isWithinGenerationRecencyWindow, f as setCustomAgents, g as decideUpdateStatus, h as decideInstallFlavor, i as customAgentFingerprint, it as shouldReplace, j as dedupeCodexFiles, k as continuationDelayMs, l as listAgentIds, m as readHostCodexVersion, n as cachedAgentResolvability, nt as parseJsonLine, o as getAdapter, ot as vendorUsageEntry, p as codex, q as addEntryToTotals, r as commandFor, rt as parseUsageLine, s as hookProfileOf, st as HOOK_TOOLS, t as DEFAULT_AGENT_ID, tt as mergeGenerationRollups, u as resetCommandCache, v as normalizeSha, w as shortSha$1, x as parseRegistryLatest, y as normalizeUpdateChannel, z as scopedClaudeRoots } from "./adapters-B1qCBKDo.js";
28
+ import { c as releaseUnheldKimiHomeSecrets, d as sessionIdOfLockFile, f as trashSessionTempFolderOnceUnheld, i as kimiHomeLinkRefusal, l as createHeldSessionTempFolder, n as generatedKimiHomePath, o as realKimiHome, u as releaseSessionLock } from "./kimi-home-WZ9E4f-u.js";
29
+ import { t as kimi } from "./kimi-DYcsNY69.js";
30
30
  import { a as formatSshPublicKey, c as orderAgentSockets, i as commitSigningShimText, l as parseSshPublicKey, n as NO_AGENT_HOLDS_KEY, o as isForwardedAgentDirName, r as agentListsKey, s as isSignableGitObject, t as COMMIT_SIGNING_SHIM_NAME } from "./ssh-signing-core-CRhVVWNW.js";
31
- import { a as configSiblingPath, c as defaultPairingsPath, d as decideDeviceAuth, f as deviceNameFromUserAgent, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, p as hashSecret, r as validateRemoteConfig, s as createSeenStore, t as decideBindHost, u as DEFAULT_DEVICE_MAX_AGE_MS } from "./remote-config-wVwmfoOx.js";
32
- import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-Dr1LDgE5.js";
31
+ import { a as configSiblingPath, c as defaultPairingsPath, d as decideDeviceAuth, f as deviceNameFromUserAgent, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, p as hashSecret, r as validateRemoteConfig, s as createSeenStore, t as decideBindHost, u as DEFAULT_DEVICE_MAX_AGE_MS } from "./remote-config-BxpKWWaG.js";
32
+ import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-nTAWBSEk.js";
33
33
  import { _ as escapeMarkup, g as createLaneLog, n as createVisionsSetup } from "./visions-setup-VMMyqOpl.js";
34
34
  import { createRequire } from "node:module";
35
35
  import fs, { readFileSync, readlinkSync } from "node:fs";
@@ -3198,6 +3198,7 @@ var AGENT_LOGINS_SIBLING_ENTRY = "agent-logins";
3198
3198
  var GLIMMERVOID_CONFIG_SIBLING_ENTRIES = Object.freeze([
3199
3199
  AGENT_LOGINS_SIBLING_ENTRY,
3200
3200
  "bin",
3201
+ "feature-hints.json",
3201
3202
  "owned-paths.json",
3202
3203
  "pairings.json",
3203
3204
  "pairings-seen.json",
@@ -43369,8 +43370,12 @@ async function readTextOrNull$1(fsPromises, filePath) {
43369
43370
  return null;
43370
43371
  }
43371
43372
  }
43372
- function createKimiPlanLimitsReader({ env = process.env, homeDir = os.homedir(), fsPromises = fs$1, fetchFn = fetch, timeoutMs = KIMI_USAGES_TIMEOUT_MS, nowFn = Date.now } = {}) {
43373
- async function readPlanLimits() {
43373
+ function createKimiPlanLimitsReader({ env = process.env, homeDir = os.homedir(), fsPromises = fs$1, fetchFn = fetch, timeoutMs = KIMI_USAGES_TIMEOUT_MS, nowFn = Date.now, logger = console } = {}) {
43374
+ const laneLog = createLaneLog({
43375
+ prefix: "[usage]",
43376
+ logger
43377
+ });
43378
+ async function pollUsages() {
43374
43379
  const kimiHome = realKimiHome(env, homeDir);
43375
43380
  const source = kimiUsagesSource(await readTextOrNull$1(fsPromises, path.join(kimiHome, "config.toml")), env);
43376
43381
  if (!source) return {
@@ -43415,6 +43420,12 @@ function createKimiPlanLimitsReader({ env = process.env, homeDir = os.homedir(),
43415
43420
  };
43416
43421
  }
43417
43422
  }
43423
+ async function readPlanLimits() {
43424
+ const poll = await pollUsages();
43425
+ if (poll.kind === "limits") return poll.snapshot;
43426
+ laneLog.warnOnce(`kimi-plan-limits:${poll.reason}`, "kimi plan limits unavailable", { reason: poll.reason });
43427
+ return null;
43428
+ }
43418
43429
  return { readPlanLimits };
43419
43430
  }
43420
43431
  var claude_pricing_default = {
@@ -45085,12 +45096,13 @@ function formatBudgetUsd(value) {
45085
45096
  function budgetAlertText({ scope, threshold, spentUsd, budgetUsd }) {
45086
45097
  return `Usage budget: ${scope === "monthly" ? "monthly" : "daily"} spend ${formatBudgetUsd(spentUsd)} reached ${threshold}% of ${formatBudgetUsd(budgetUsd)}`;
45087
45098
  }
45088
- function createUsageWiring({ config, sessions = /* @__PURE__ */ new Map(), broadcast = () => {}, controlClientCount = () => 0, warehousePath = null, budgetStatePath = null, laneMap = null, telemetry = null, sendTelegram = sendTelegramMessage, telegramTimeoutMs = TELEGRAM_TIMEOUT_MS, fsPromises = fs$1, createScanner = createUsageScanner, loadPricingFn = loadPricing, readKimiPlanLimits = createKimiPlanLimitsReader().readPlanLimits, scannerDeps = {}, nowFn = Date.now, partialContinueMs = PARTIAL_CONTINUE_MS, setIntervalFn = DEFAULT_TIMER_FNS.setIntervalFn, clearIntervalFn = DEFAULT_TIMER_FNS.clearIntervalFn, setTimeoutFn = DEFAULT_TIMER_FNS.setTimeoutFn, clearTimeoutFn = DEFAULT_TIMER_FNS.clearTimeoutFn, logger = console, debug = false }) {
45099
+ function createUsageWiring({ config, sessions = /* @__PURE__ */ new Map(), broadcast = () => {}, controlClientCount = () => 0, warehousePath = null, budgetStatePath = null, laneMap = null, telemetry = null, sendTelegram = sendTelegramMessage, telegramTimeoutMs = TELEGRAM_TIMEOUT_MS, fsPromises = fs$1, createScanner = createUsageScanner, loadPricingFn = loadPricing, readKimiPlanLimits, scannerDeps = {}, nowFn = Date.now, partialContinueMs = PARTIAL_CONTINUE_MS, setIntervalFn = DEFAULT_TIMER_FNS.setIntervalFn, clearIntervalFn = DEFAULT_TIMER_FNS.clearIntervalFn, setTimeoutFn = DEFAULT_TIMER_FNS.setTimeoutFn, clearTimeoutFn = DEFAULT_TIMER_FNS.clearTimeoutFn, logger = console, debug = false }) {
45089
45100
  const laneLog = createLaneLog({
45090
45101
  prefix: "[usage]",
45091
45102
  logger,
45092
45103
  debugFlag: debug
45093
45104
  });
45105
+ const readKimiLimits = readKimiPlanLimits ?? createKimiPlanLimitsReader({ logger }).readPlanLimits;
45094
45106
  let cfg = resolveUsageConfig(config.usage);
45095
45107
  let lastKey = usageCfgKey(config);
45096
45108
  let scanner = null;
@@ -45379,13 +45391,9 @@ function createUsageWiring({ config, sessions = /* @__PURE__ */ new Map(), broad
45379
45391
  }
45380
45392
  async function runKimiPoll() {
45381
45393
  lastKimiPollMs = nowFn();
45382
- const poll = await readKimiPlanLimits();
45383
- if (stopped) return;
45384
- if (poll.kind === "unavailable") {
45385
- laneLog.warnOnce(`kimi-plan-limits:${poll.reason}`, "kimi plan limits unavailable", { reason: poll.reason });
45386
- return;
45387
- }
45388
- adoptPlanLimits("kimi", poll.snapshot, { isFreshPoll: true });
45394
+ const snapshot = await readKimiLimits();
45395
+ if (stopped || snapshot === null) return;
45396
+ adoptPlanLimits("kimi", snapshot, { isFreshPoll: true });
45389
45397
  }
45390
45398
  function pollKimiPlanLimits(minIntervalMs) {
45391
45399
  if (kimiPollInFlight) return kimiPollInFlight;
@@ -1,6 +1,6 @@
1
1
  import { r as errorMessage } from "./text-DoirglWV.js";
2
- import { l as resolveConfigPath } from "./config-store-krPtyCYJ.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-wVwmfoOx.js";
2
+ import { l as resolveConfigPath } from "./config-store-BOHOik5x.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-BxpKWWaG.js";
4
4
  import fs from "node:fs";
5
5
  //#region server/text-format.ts
6
6
  function trimIso(iso) {
@@ -3,7 +3,7 @@ import { n as equalsIgnoringCaseOnWindows } from "./paths-Bu4eH1Yd.js";
3
3
  import { n as isRecord } from "./coerce-NSst8oRP.js";
4
4
  import { n as unrefTimer, t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.js";
5
5
  import { a as jsonStateLoadError, d as writeJsonAtomicSync, l as sleepSync, s as loadJsonStateFileSync, u as writeJsonAtomic } from "./json-file-BjFK_eSH.js";
6
- import { at as canonicalizePath, s as glimmervoidHomeDir } from "./config-store-krPtyCYJ.js";
6
+ import { at as canonicalizePath, s as glimmervoidHomeDir } from "./config-store-BOHOik5x.js";
7
7
  import fs from "node:fs";
8
8
  import path from "node:path";
9
9
  import crypto from "node:crypto";
@@ -25,7 +25,7 @@ var SANE_YOLO_RULES = {
25
25
  version: 1,
26
26
  rules: ["infra"],
27
27
  overrides: {},
28
- transparent_wrappers: ["npx"]
28
+ transparent_wrappers: ["rtk", "npx"]
29
29
  };
30
30
  var INFRA_REASON = "Sane YOLO blocks infrastructure teardown; run this command by hand.";
31
31
  var TERRAFORM_DESTROY_FLAGS = [
@@ -4,8 +4,8 @@ import { f as AgentSettingsReply } from "./session-B2Wieg0a.js";
4
4
  import { r as BrowserConfig } from "./config-Di0J-FBW.js";
5
5
  import { n as isRecord } from "./coerce-NSst8oRP.js";
6
6
  import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
7
- import { C as scoreSettingsSearch, D as valueAtPath, J as ENV_SECRET_BINDINGS, S as parsePosthogProjectSelection, Y as readEnvSecrets, Z as withEnvSecrets, c as loadConfigFile, d as validateConfig, f as isSettingAvailable, k as SETTINGS_REGISTRY, r as IS_EXPERIMENTAL_BUILD, u as saveConfigFileOnce, v as cloneValue, w as setValueAtPath, y as deleteValueAtPath } from "./config-store-krPtyCYJ.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-Dr1LDgE5.js";
7
+ import { C as scoreSettingsSearch, D as valueAtPath, J as ENV_SECRET_BINDINGS, S as parsePosthogProjectSelection, Y as readEnvSecrets, Z as withEnvSecrets, c as loadConfigFile, d as validateConfig, f as isSettingAvailable, k as SETTINGS_REGISTRY, r as IS_EXPERIMENTAL_BUILD, u as saveConfigFileOnce, v as cloneValue, w as setValueAtPath, y as deleteValueAtPath } from "./config-store-BOHOik5x.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-nTAWBSEk.js";
9
9
  import fs from "node:fs";
10
10
  import os from "node:os";
11
11
  import { parseArgs } from "node:util";
@@ -1,6 +1,6 @@
1
1
  import { p as AgentSettingsRequest } from "./session-B2Wieg0a.js";
2
2
  import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
3
- import { D as valueAtPath, E as settingsOf, O as FILE_ONLY_GROUPS, T as settingsGroupOf, Y as readEnvSecrets, _ as SETTINGS_INDEX, b as displayText, f as isSettingAvailable, k as SETTINGS_REGISTRY, v as cloneValue, x as hasScaledUnit } from "./config-store-krPtyCYJ.js";
3
+ import { D as valueAtPath, E as settingsOf, O as FILE_ONLY_GROUPS, T as settingsGroupOf, Y as readEnvSecrets, _ as SETTINGS_INDEX, b as displayText, f as isSettingAvailable, k as SETTINGS_REGISTRY, v as cloneValue, x as hasScaledUnit } from "./config-store-BOHOik5x.js";
4
4
  import { parseArgs } from "node:util";
5
5
  //#region server/core/settings-readout-core.ts
6
6
  var VALUE_COLUMN_WIDTH = 40;
@@ -1,6 +1,6 @@
1
1
  import { O as SIGN_URL_ENV, n as AGENT_URL_ENV } from "./session-B2Wieg0a.js";
2
2
  import { t as HOOK_URL_ENV } from "./hook-relay-core-DA_bz2KA.js";
3
- import { n as SANE_YOLO_PATH_ENV, r as saneYoloEnv } from "./sane-yolo-KmcTONAe.js";
3
+ import { n as SANE_YOLO_PATH_ENV, r as saneYoloEnv } from "./sane-yolo-DSyFqbVE.js";
4
4
  import path from "node:path";
5
5
  //#region session/core/spawn-env.ts
6
6
  var GLIMMERVOID_SCRUB_KEYS = [
@@ -1 +1 @@
1
- import{$i as e,Qi as t,Xi as n,Yi as r,Zi as i,ea as a,na as o,ta as s}from"./index-cexoNCUv.js";var c=.3,l=null;function u(){return o(l)}function d(e){return s(e,l)}async function f(){try{let e=await fetch(r,{credentials:`same-origin`,cache:`no-store`});e.ok&&(l=a(await e.json()))}catch{}}function p(){let e=new AudioContext;return e.state===`suspended`&&e.resume(),e}function m(e,t){setTimeout(()=>e.close().catch(()=>{}),(t+.1)*1e3)}function h(e){g(i[e]??i.chime)}function g(e){let t=p(),n=t.createGain();n.gain.value=e.peakGain,n.connect(t.destination);let r=t.currentTime,i=0;for(let a of e.tones){let e=r+a.startSeconds,o=e+a.durationSeconds,s=t.createOscillator(),c=t.createGain();s.type=a.waveform,s.frequency.setValueAtTime(a.frequency,e),a.endFrequency&&s.frequency.exponentialRampToValueAtTime(a.endFrequency,o),c.gain.setValueAtTime(.001,e),c.gain.exponentialRampToValueAtTime(a.gain??1,e+.01),c.gain.exponentialRampToValueAtTime(.001,o),s.connect(c),c.connect(n),s.start(e),s.stop(o),i=Math.max(i,a.startSeconds+a.durationSeconds)}m(t,i)}async function _(t){try{let n=await fetch(e(t),{credentials:`same-origin`});return n.ok?await n.arrayBuffer():null}catch{return null}}async function v(e){let t=await _(e);if(!t)return!1;let n=p();try{let e=await n.decodeAudioData(t),r=n.createGain();r.gain.value=c,r.connect(n.destination);let i=n.createBufferSource();return i.buffer=e,i.connect(r),i.start(),m(n,e.duration),!0}catch{return n.close().catch(()=>{}),!1}}var y=[659.25,830.61,987.77,1108.73,987.77,830.61,739.99,659.25,739.99,830.61,987.77,1108.73,987.77,830.61];function b(){try{let e=new AudioContext;if(e.state===`suspended`&&e.resume(),e.state===`suspended`)return;let t=e.createGain();t.gain.value=.05,t.connect(e.destination);let n=.125,r=e.currentTime;for(let i=0;i<y.length;i++){let a=r+i*n,o=e.createOscillator(),s=e.createGain();o.type=`square`,o.frequency.value=y[i],s.gain.setValueAtTime(.001,a),s.gain.exponentialRampToValueAtTime(1,a+.01),s.gain.exponentialRampToValueAtTime(.001,a+n*.9),o.connect(s),s.connect(t),o.start(a),o.stop(a+n)}let i=r+y.length*n;t.gain.setValueAtTime(.05,i-.05),t.gain.exponentialRampToValueAtTime(.001,i),setTimeout(()=>e.close().catch(()=>{}),(i-r+.1)*1e3)}catch{}}function x(){try{h(n)}catch{}}function S(e){try{let n=d(e),r=t(n);if(!r){h(n);return}v(r).then(e=>{e||x()})}catch{}}export{f as loadCustomSounds,S as playAlertSound,b as playNyanJingle,g as playToneSequence,d as resolveSoundId,u as soundOptions};
1
+ import{$i as e,Qi as t,Xi as n,Yi as r,Zi as i,ea as a,na as o,ta as s}from"./index-Doflbkag.js";var c=.3,l=null;function u(){return o(l)}function d(e){return s(e,l)}async function f(){try{let e=await fetch(r,{credentials:`same-origin`,cache:`no-store`});e.ok&&(l=a(await e.json()))}catch{}}function p(){let e=new AudioContext;return e.state===`suspended`&&e.resume(),e}function m(e,t){setTimeout(()=>e.close().catch(()=>{}),(t+.1)*1e3)}function h(e){g(i[e]??i.chime)}function g(e){let t=p(),n=t.createGain();n.gain.value=e.peakGain,n.connect(t.destination);let r=t.currentTime,i=0;for(let a of e.tones){let e=r+a.startSeconds,o=e+a.durationSeconds,s=t.createOscillator(),c=t.createGain();s.type=a.waveform,s.frequency.setValueAtTime(a.frequency,e),a.endFrequency&&s.frequency.exponentialRampToValueAtTime(a.endFrequency,o),c.gain.setValueAtTime(.001,e),c.gain.exponentialRampToValueAtTime(a.gain??1,e+.01),c.gain.exponentialRampToValueAtTime(.001,o),s.connect(c),c.connect(n),s.start(e),s.stop(o),i=Math.max(i,a.startSeconds+a.durationSeconds)}m(t,i)}async function _(t){try{let n=await fetch(e(t),{credentials:`same-origin`});return n.ok?await n.arrayBuffer():null}catch{return null}}async function v(e){let t=await _(e);if(!t)return!1;let n=p();try{let e=await n.decodeAudioData(t),r=n.createGain();r.gain.value=c,r.connect(n.destination);let i=n.createBufferSource();return i.buffer=e,i.connect(r),i.start(),m(n,e.duration),!0}catch{return n.close().catch(()=>{}),!1}}var y=[659.25,830.61,987.77,1108.73,987.77,830.61,739.99,659.25,739.99,830.61,987.77,1108.73,987.77,830.61];function b(){try{let e=new AudioContext;if(e.state===`suspended`&&e.resume(),e.state===`suspended`)return;let t=e.createGain();t.gain.value=.05,t.connect(e.destination);let n=.125,r=e.currentTime;for(let i=0;i<y.length;i++){let a=r+i*n,o=e.createOscillator(),s=e.createGain();o.type=`square`,o.frequency.value=y[i],s.gain.setValueAtTime(.001,a),s.gain.exponentialRampToValueAtTime(1,a+.01),s.gain.exponentialRampToValueAtTime(.001,a+n*.9),o.connect(s),s.connect(t),o.start(a),o.stop(a+n)}let i=r+y.length*n;t.gain.setValueAtTime(.05,i-.05),t.gain.exponentialRampToValueAtTime(.001,i),setTimeout(()=>e.close().catch(()=>{}),(i-r+.1)*1e3)}catch{}}function x(){try{h(n)}catch{}}function S(e){try{let n=d(e),r=t(n);if(!r){h(n);return}v(r).then(e=>{e||x()})}catch{}}export{f as loadCustomSounds,S as playAlertSound,b as playNyanJingle,g as playToneSequence,d as resolveSoundId,u as soundOptions};
@@ -1 +1 @@
1
- import"./updates-view-core-BMRZ5Sfz.js";import{n as e,o as t,r as n}from"./dom-helpers-ScgOMqDW.js";import{J as r,Y as i,q as a}from"./index-cexoNCUv.js";var o={mine:`Mine`,run:`Run`,cancel:`Cancel`},s=null;function c(e){return e===null?`n/a`:`${Math.round(e*100)}%`}function l(e){if(e===null)return`n/a`;let t=Math.round(e*100);return t>0?`+${t}`:String(t)}function u(e,n,i){let a=t(`button`,`bench-action-button`,o[n]);return a.type=`button`,a.disabled=i,a.addEventListener(`click`,()=>r(e.id,n)),a}function d(e,t){let n=e.inFlight;if(!n||n.suiteId!==t.id)return``;let r=n.caseId?`case ${n.caseId}, `:``;return`Cell ${n.cellIndex+1} of ${n.cellCount}: ${r}arm ${n.armId}, trial ${n.trial}, ${n.phase}.`}function f(e){let n=t(`td`,`bench-score`,c(e?.recall??null));return e&&e.invalid>0&&(n.title=`${e.invalid} invalid or failed cell(s)`),e&&e.degraded>0&&(n.dataset.degraded=`true`),n}function p(e){let n=e.armIds.filter(t=>t!==e.baselineArm),r=t(`table`,`bench-table`),i=t(`tr`);i.append(t(`th`,null,`Case`),...e.armIds.map(n=>t(`th`,null,n===e.baselineArm?`${n} (baseline)`:n))),i.append(...n.map(e=>t(`th`,null,`${e} vs baseline`))),r.append(i);for(let i of e.rows){let a=t(`tr`);a.append(t(`td`,`bench-case`,i.caseId),...e.armIds.map(e=>f(i.arms[e]))),a.append(...n.map(e=>t(`td`,`bench-delta`,l(i.deltaVsBaseline[e]??null)))),r.append(a)}let a=[...new Set(e.armIds.flatMap(t=>Object.keys(e.totals[t]?.recallByTag??{})))].sort(),o=t(`tr`,`bench-total`);o.append(t(`td`,`bench-case`,`Paired recall`),...e.armIds.map(t=>f(e.totals[t]))),r.append(o);for(let n of a){let i=t(`tr`,`bench-total`);i.append(t(`td`,`bench-case`,`Recall, ${n}`),...e.armIds.map(r=>t(`td`,`bench-score`,c(e.totals[r]?.recallByTag[n]??null)))),r.append(i)}return r}function m(e,r){let{isServerConnected:i,pendingActionBySuite:o,outcomeBySuite:s}=a(),c=t(`div`,`bench-suite`),l=e.inFlight?.suiteId===r.id,f=!!e.inFlight&&!l,m=o.has(r.id)||!i,h=t(`div`,`bench-summary`);h.append(t(`span`,`bench-suite-title`,r.title),n(`bench`,r.caseCount===1?`case`:`cases`,String(r.caseCount)),n(`bench`,r.candidateCount===1?`candidate`:`candidates`,String(r.candidateCount)),n(`bench`,`arms`,String(r.armIds.length))),c.append(h);let g=t(`div`,`bench-controls`),_=e.configured===!0&&r.error===null;g.append(u(r,`mine`,!_||m||l),u(r,`run`,!_||m||l||f||r.caseCount===0),u(r,`cancel`,m||!l));let v=t(`span`,`bench-status`,(i?``:`Not connected to the server. Reconnecting.`)||d(e,r)||s.get(r.id)||``);if(v.setAttribute(`role`,`status`),g.append(v),c.append(g),r.error)return c.append(t(`p`,`bench-error`,r.error)),c;let y=r.latestReport;return y?(c.append(t(`p`,`bench-run-line`,`Latest run ${y.runId}: ${y.status}. Only cases every arm scored count toward paired recall.`)),y.rows.length>0&&c.append(p(y)),c):(c.append(t(`p`,`bench-empty`,r.caseCount===0?`Move approved candidates into the cases folder, then choose Run.`:`No run yet.`)),c)}function h(){if(!s)return;s.textContent=``;let{status:n}=a(),r=e(`bench`,`Benchmarks`,`Suites from the benchmarks folder of the Glimmervoid home, one run at a time.`);if(s.append(r),!n)s.append(t(`p`,`bench-empty`,`Waiting for the server.`));else if(!n.configured)s.append(t(`p`,`bench-empty`,n.reason||`Benchmarks are off.`));else if(n.suites.length===0)s.append(t(`p`,`bench-empty`,`No suites yet. Create a folder holding suite.json under benchmarks in the Glimmervoid home.`));else for(let e of n.suites)s.append(m(n,e))}function g(e){s||(s=t(`div`,`bench-content`),e.append(s),i(h),h())}var _={mount:g};export{_ as view};
1
+ import"./updates-view-core-BMRZ5Sfz.js";import{n as e,o as t,r as n}from"./dom-helpers-ScgOMqDW.js";import{J as r,Y as i,q as a}from"./index-Doflbkag.js";var o={mine:`Mine`,run:`Run`,cancel:`Cancel`},s=null;function c(e){return e===null?`n/a`:`${Math.round(e*100)}%`}function l(e){if(e===null)return`n/a`;let t=Math.round(e*100);return t>0?`+${t}`:String(t)}function u(e,n,i){let a=t(`button`,`bench-action-button`,o[n]);return a.type=`button`,a.disabled=i,a.addEventListener(`click`,()=>r(e.id,n)),a}function d(e,t){let n=e.inFlight;if(!n||n.suiteId!==t.id)return``;let r=n.caseId?`case ${n.caseId}, `:``;return`Cell ${n.cellIndex+1} of ${n.cellCount}: ${r}arm ${n.armId}, trial ${n.trial}, ${n.phase}.`}function f(e){let n=t(`td`,`bench-score`,c(e?.recall??null));return e&&e.invalid>0&&(n.title=`${e.invalid} invalid or failed cell(s)`),e&&e.degraded>0&&(n.dataset.degraded=`true`),n}function p(e){let n=e.armIds.filter(t=>t!==e.baselineArm),r=t(`table`,`bench-table`),i=t(`tr`);i.append(t(`th`,null,`Case`),...e.armIds.map(n=>t(`th`,null,n===e.baselineArm?`${n} (baseline)`:n))),i.append(...n.map(e=>t(`th`,null,`${e} vs baseline`))),r.append(i);for(let i of e.rows){let a=t(`tr`);a.append(t(`td`,`bench-case`,i.caseId),...e.armIds.map(e=>f(i.arms[e]))),a.append(...n.map(e=>t(`td`,`bench-delta`,l(i.deltaVsBaseline[e]??null)))),r.append(a)}let a=[...new Set(e.armIds.flatMap(t=>Object.keys(e.totals[t]?.recallByTag??{})))].sort(),o=t(`tr`,`bench-total`);o.append(t(`td`,`bench-case`,`Paired recall`),...e.armIds.map(t=>f(e.totals[t]))),r.append(o);for(let n of a){let i=t(`tr`,`bench-total`);i.append(t(`td`,`bench-case`,`Recall, ${n}`),...e.armIds.map(r=>t(`td`,`bench-score`,c(e.totals[r]?.recallByTag[n]??null)))),r.append(i)}return r}function m(e,r){let{isServerConnected:i,pendingActionBySuite:o,outcomeBySuite:s}=a(),c=t(`div`,`bench-suite`),l=e.inFlight?.suiteId===r.id,f=!!e.inFlight&&!l,m=o.has(r.id)||!i,h=t(`div`,`bench-summary`);h.append(t(`span`,`bench-suite-title`,r.title),n(`bench`,r.caseCount===1?`case`:`cases`,String(r.caseCount)),n(`bench`,r.candidateCount===1?`candidate`:`candidates`,String(r.candidateCount)),n(`bench`,`arms`,String(r.armIds.length))),c.append(h);let g=t(`div`,`bench-controls`),_=e.configured===!0&&r.error===null;g.append(u(r,`mine`,!_||m||l),u(r,`run`,!_||m||l||f||r.caseCount===0),u(r,`cancel`,m||!l));let v=t(`span`,`bench-status`,(i?``:`Not connected to the server. Reconnecting.`)||d(e,r)||s.get(r.id)||``);if(v.setAttribute(`role`,`status`),g.append(v),c.append(g),r.error)return c.append(t(`p`,`bench-error`,r.error)),c;let y=r.latestReport;return y?(c.append(t(`p`,`bench-run-line`,`Latest run ${y.runId}: ${y.status}. Only cases every arm scored count toward paired recall.`)),y.rows.length>0&&c.append(p(y)),c):(c.append(t(`p`,`bench-empty`,r.caseCount===0?`Move approved candidates into the cases folder, then choose Run.`:`No run yet.`)),c)}function h(){if(!s)return;s.textContent=``;let{status:n}=a(),r=e(`bench`,`Benchmarks`,`Suites from the benchmarks folder of the Glimmervoid home, one run at a time.`);if(s.append(r),!n)s.append(t(`p`,`bench-empty`,`Waiting for the server.`));else if(!n.configured)s.append(t(`p`,`bench-empty`,n.reason||`Benchmarks are off.`));else if(n.suites.length===0)s.append(t(`p`,`bench-empty`,`No suites yet. Create a folder holding suite.json under benchmarks in the Glimmervoid home.`));else for(let e of n.suites)s.append(m(n,e))}function g(e){s||(s=t(`div`,`bench-content`),e.append(s),i(h),h())}var _={mount:g};export{_ as view};
@@ -1 +1 @@
1
- import{_ as e,o as t,s as n}from"./dom-helpers-ScgOMqDW.js";import{Ei as r,ca as i}from"./index-cexoNCUv.js";import{playToneSequence as a}from"./alert-sound-CPBIqRXa.js";var o=1.2,s=1.55,c=.12,l=523.25,u=2,d=8,f=(e,t,n)=>({semitone:e,startBeat:t,beats:n}),p={melody:[f(7,4,.5),f(11,4.5,.5),f(12,5,3)],bass:[f(-5,4,1),f(-12,5,3)]},m=[{melody:[f(0,0,1),f(4,1,1),f(7,2,1),f(9,3,1)],bass:[f(-12,0,2),f(-8,2,2)]},{melody:[f(7,0,.67),f(7,.67,.67),f(7,1.33,.67),f(9,2,1),f(5,3,1)],bass:[f(-12,0,2),f(-7,2,2)]},{melody:[f(5,0,1),f(9,1,1),f(7,2,1),f(4,3,1)],bass:[f(-7,0,2),f(-12,2,2)]},{melody:[f(12,0,.5),f(7,.5,.5),f(12,1,.5),f(16,1.5,.5),f(16,2,1),f(14,3,1)],bass:[f(-12,0,2),f(-3,2,2)]},{melody:[f(4,0,1),f(7,1,1),f(4,2,.5),f(5,2.5,.5),f(7,3,.5),f(4,3.5,.5)],bass:[f(-8,0,2),f(-12,2,2)]}].map(e=>({melody:[...e.melody,...p.melody],bass:[...e.bass,...p.bass]}));function h(e,t){return l*2**((e+t)/12)}function g(e,t){let n=(e,n,r)=>e.map(e=>({frequency:h(e.semitone,t),startSeconds:s+e.startBeat*c,durationSeconds:e.beats*c,waveform:n,gain:r}));return[...n(e.melody,`square`,.2),...n(e.melody,`triangle`,.5),...n(e.bass,`triangle`,.6)]}var ee=[{frequency:220,endFrequency:880,startSeconds:0,durationSeconds:.32,waveform:`triangle`,gain:.25},{frequency:160,endFrequency:45,startSeconds:o,durationSeconds:.28,waveform:`sine`,gain:1},{frequency:1400,endFrequency:380,startSeconds:o,durationSeconds:.06,waveform:`square`,gain:.12}];function te(e){let t=m[e%m.length],n=Math.min(e*u,d);return{peakGain:.1,tones:[...ee,...g(t,n)]}}function _(e){return Math.round(Math.sqrt(2*e/780)*1e3)}function v(e,t,n=Math.random){return Math.round(e+n()*(t-e))}function y(e,t=Math.random){let n=[...e];for(let e=n.length-1;e>0;--e){let r=Math.floor(t()*(e+1));[n[e],n[r]]=[n[r],n[e]]}return n}var ne=.6,re=.25,ie=1.6;function ae(e){return Math.min(ne+e*re,ie)}var b=[`var(--accent)`,`var(--state-running)`,`var(--state-idle)`,`var(--state-waiting)`,`var(--state-failed)`];function oe(e,t=Math.random){let n=v(320,520,t),r=v(1800,2800,t);return[[`--confetti-start-x`,`${v(4,96,t)}%`],[`--confetti-x`,`${v(-140,140,t)}px`],[`--confetti-rise`,`${-v(20,55,t)}px`],[`--confetti-fall`,`${v(45,70,t)}vh`],[`--confetti-rise-ms`,`${n}ms`],[`--confetti-fall-ms`,`${r}ms`],[`--confetti-flight-ms`,`${n+r}ms`],[`--confetti-tilt`,`${v(0,180,t)}deg`],[`--confetti-spin`,`${v(-360,360,t)}deg`],[`--confetti-flutter-ms`,`${v(160,340,t)}ms`],[`--confetti-delay`,`${v(0,160,t)}ms`],[`--confetti-color`,b[e%b.length]]]}var se=`<svg viewBox="0 0 36 36" aria-hidden="true"><circle class="merge-bullseye-ring-light" cx="18" cy="18" r="17"/><circle class="merge-bullseye-ring-red" cx="18" cy="18" r="13"/><circle class="merge-bullseye-ring-light" cx="18" cy="18" r="9"/><circle class="merge-bullseye-ring-red" cx="18" cy="18" r="5"/></svg>`,ce=`<svg viewBox="0 0 26 8" aria-hidden="true"><path class="merge-bullseye-dart-flight" d="M0 0L7 3V5L0 8L2 4Z"/><rect class="merge-bullseye-dart-shaft" x="6" y="3.3" width="8" height="1.4"/><rect class="merge-bullseye-dart-barrel" x="13" y="2.5" width="7" height="3" rx="1"/><path class="merge-bullseye-dart-tip" d="M20 3L26 4L20 5Z"/></svg>`;function le(){let e=n(`div`,`merge-bullseye-target`,se);return e.append(t(`span`,`merge-bullseye-ripple`)),e}function ue(){let e=t(`div`,`merge-bullseye-dart-drift`),r=t(`div`,`merge-bullseye-dart-arc`),i=t(`div`,`merge-bullseye-dart-aim`);return i.append(n(`div`,`merge-bullseye-dart`,ce)),r.append(i),e.append(r),e}function de(){let e=t(`div`,`merge-bullseye-range`),n=t(`div`,`merge-bullseye-track`);return n.append(ue()),e.append(le(),n),e}var fe={title:`BULLSEYE!`,buildScene:de},pe=6,x=30,S=-14,C=16;function w(e=Math.random){return[[`--crosshair-start-left`,`${v(pe,x,e)}%`],[`--crosshair-start-offset-y`,`${v(S,C,e)}px`]]}var T=`<svg viewBox="0 0 26 40" aria-hidden="true"><path class="merge-headshot-target-body" d="M9 13H17L18 16Q25 18 25 24V40H1V24Q1 18 8 16Z"/><circle class="merge-headshot-target-head" cx="13" cy="7" r="6"/><circle class="merge-headshot-target-ring" cx="13" cy="7" r="3"/><circle class="merge-headshot-target-ring" cx="13" cy="27" r="6"/><circle class="merge-headshot-target-ring" cx="13" cy="27" r="2.5"/></svg>`,E=`<svg viewBox="0 0 22 22" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="M11 0V5M11 17V22M0 11H5M17 11H22"/><circle class="merge-headshot-crosshair-dot" cx="11" cy="11" r="1"/></svg>`,D=`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 3L8 8M21 3L16 8M3 21L8 16M21 21L16 16"/></svg>`;function O(){let r=t(`div`,`merge-headshot-sweep`);e(r,w());let i=t(`div`,`merge-headshot-aim`);i.append(n(`div`,`merge-headshot-crosshair`,E));let a=t(`div`,`merge-headshot-bob`);return a.append(i,n(`div`,`merge-headshot-hitmarker`,D)),r.append(a),r}function k(){let e=t(`div`,`merge-headshot-range`),r=t(`div`,`merge-headshot-track`);return r.append(O()),e.append(n(`div`,`merge-headshot-target`,T),r),e}var A={title:`HEADSHOT!`,buildScene:k},j=[`10`,`J`,`Q`,`K`,`A`],M=160,N=19,P=5,F=9,I=780,L=70,R=70,z=35;function B(e){let t=j.length-1,n=e-t/2;return{offsetPx:n*N,titleSpreadFraction:n/t,tiltDegrees:n*P,bottomPx:F-n**2,dealLeadMs:I-e*L,flipLeadMs:M+(t-e)*R,waveDelayMs:e*z}}function me(e){return[[`--card-offset`,`${e.offsetPx}px`],[`--card-title-spread`,String(e.titleSpreadFraction)],[`--card-tilt`,`${e.tiltDegrees}deg`],[`--card-bottom`,`${e.bottomPx}px`],[`--card-deal-lead-ms`,`${e.dealLeadMs}ms`],[`--card-flip-lead-ms`,`${e.flipLeadMs}ms`],[`--card-wave-delay-ms`,`${e.waveDelayMs}ms`]]}function he(){return[[`--card-flip-ms`,`${M}ms`]]}var ge=`<svg viewBox="0 0 10 9" aria-hidden="true"><path d="M5 8.5C5 8.5 0 5.3 0 2.6C0 1.1 1.2 0 2.6 0C3.6 0 4.5 .6 5 1.4C5.5 .6 6.4 0 7.4 0C8.8 0 10 1.1 10 2.6C10 5.3 5 8.5 5 8.5Z"/></svg>`;function _e(n,r){let i=t(`div`,`merge-flush-deal`);e(i,me(B(r)));let a=t(`div`,`merge-flush-hop`),o=t(`div`,`merge-flush-card`),s=t(`div`,`merge-flush-face`);return s.append(t(`span`,`merge-flush-rank`,n)),s.insertAdjacentHTML(`beforeend`,ge),o.append(t(`div`,`merge-flush-back`),s),a.append(o),i.append(a),i}function ve(){let n=t(`div`,`merge-flush-table`);return e(n,he()),n.append(...j.map(_e)),n}var ye={title:`ROYAL FLUSH!`,buildScene:ve},be=[1,2,3,4],xe=14,Se=3,Ce=3,V=10,we=20,Te=2,H=28,U=18,Ee=.01,De=1.5,Oe=2200,ke=1,W=120,G=.35,Ae=15,je=105,Me=4,Ne=65,Pe=145;function Fe(e){return Math.round(e/(Math.PI*U)*360)}function K(e){return we-e*Te}function q(e){return e.rowIndex*xe+e.depthIndex*Se}function J(e,t,n){return Array.from({length:n},(r,i)=>e+(t-e)*i/(n-1))}function Y(){return be.flatMap((e,t)=>Array.from({length:e},(n,r)=>({rowIndex:t,depthIndex:e-1-r})))}function Ie(e,t){let n=y(J(Ae,je,e),t),r=y(J(Ne,Pe,e),t);return n.map((e,n)=>({angleDegrees:e+v(-4,Me,t),depthScalePercent:Math.round(r[n])}))}function Le(e,t,n){let r=v(240,380,n),i=t.angleDegrees*Math.PI/180,a=r*Math.cos(i),o=(r*Math.sin(i))**2/1560,s=v(15,45,n),c=_(o),l=_(o+s),u=c+l,d=v(540,1080,n),f=a>=0?1:-1,p=q(e);return{depthIndex:e.depthIndex,launchAngleDegrees:t.angleDegrees,distanceFromHeadPinPx:p,layer:K(e.depthIndex),flyXPx:Math.round(a*u/1e3),peakRisePx:Math.round(o),landingDropPx:s,riseMs:c,fallMs:l,flightMs:u,spinDegrees:Math.round(f*d*u/1e3),glintMs:Math.round(180/d*1e3),depthScalePercent:t.depthScalePercent,delayMs:Math.round(p/G)}}function Re(e=Math.random){let t=Y(),n=Ie(t.length,e);return t.map((t,r)=>Le(t,n[r],e))}function ze(e){return[[`--pin-left`,`${e.distanceFromHeadPinPx}px`],[`--pin-raise`,`${e.depthIndex*Ce}px`],[`--pin-shade`,`${100-e.depthIndex*12}%`],[`--pin-fly-x`,`${e.flyXPx}px`],[`--pin-peak-y`,`${-e.peakRisePx}px`],[`--pin-land-y`,`${e.landingDropPx}px`],[`--pin-rise-ms`,`${e.riseMs}ms`],[`--pin-fall-ms`,`${e.fallMs}ms`],[`--pin-flight-ms`,`${e.flightMs}ms`],[`--pin-spin`,`${e.spinDegrees}deg`],[`--pin-glint-ms`,`${e.glintMs}ms`],[`--pin-depth-scale`,`${e.depthScalePercent}%`],[`--pin-depth-shade`,`${e.depthScalePercent-10}%`],[`--pin-delay`,`${e.delayMs}ms`],[`--pin-layer`,String(e.layer)]]}function Be(){return K(De)}function Ve(){return Math.max(...Y().map(q))+V}function He(){let e=Ve(),t=H+e+U-ke;return[[`--ball-follow-px`,`${W}px`],[`--ball-follow-ms`,`${Math.round(W/G)}ms`],[`--ball-follow-spin`,`${Fe(W)}deg`],[`--ball-size`,`${U}px`],[`--ball-approach-spin`,`${Oe}deg`],[`--ball-impact-inset`,`${t}px`],[`--ball-layer`,String(Be())],[`--rack-right`,`${H}px`],[`--rack-width`,`${e}px`],[`--pin-width`,`${V}px`]]}function Ue(e=Math.random){return e()>=Ee?null:i[Math.floor(e()*i.length)].sprite}var We=`<svg viewBox="0 0 10 24" aria-hidden="true"><path class="merge-strike-pin-body" d="M5 0C7 0 7.6 2 7.2 4C6.9 5.6 6.3 6.6 6.4 8C6.6 10 9.6 12 9.6 16C9.6 19.5 8.4 22 7.6 24H2.4C1.6 22 .4 19.5 .4 16C.4 12 3.4 10 3.6 8C3.7 6.6 3.1 5.6 2.8 4C2.4 2 3 0 5 0Z"/><path class="merge-strike-pin-stripe" d="M3.1 5.2H6.9V6.2H3.1ZM3.4 7H6.6V8H3.4Z"/></svg>`;function Ge(r){let i=t(`span`,`merge-strike-pin`);return i.append(n(`span`,`merge-strike-pin-arc`,We)),e(i,ze(r)),i}function Ke(){let e=Ue();if(!e)return t(`span`,`merge-strike-ball`);let n=t(`span`,`merge-strike-ball is-animal`);return n.append(t(`span`,`nyan-sprite ${e}`)),n}function qe(){let n=t(`div`,`merge-strike-lane`);e(n,He());let r=t(`div`,`merge-strike-rack`);r.append(...Re().map(Ge));let i=t(`div`,`merge-strike-track`);return i.append(Ke()),n.append(r,i),n}var Je={title:`STRIKE!`,buildScene:qe},Ye=20,Xe=92,Ze=23,Qe=7,$e=-40;function et(){let e=_(72),t=_(69),n=780*t/1e3;return{launchHeightPx:Ye,peakHeightPx:Xe,heightThroughRimPx:Ze,heightLeavingNetPx:Qe,heightOutOfCardPx:$e,riseMs:e,fallToRimMs:t,speedThroughRimPxPerSecond:n,netCatchMs:Math.round(32/n*1e3),dropMs:_(47)}}function tt(e=et()){return[[`--ball-launch-y`,`${-e.launchHeightPx}px`],[`--ball-peak-y`,`${-e.peakHeightPx}px`],[`--ball-rim-y`,`${-e.heightThroughRimPx}px`],[`--ball-net-exit-y`,`${-e.heightLeavingNetPx}px`],[`--ball-drop-out-y`,`${-e.heightOutOfCardPx}px`],[`--ball-rise-ms`,`${e.riseMs}ms`],[`--ball-fall-to-rim-ms`,`${e.fallToRimMs}ms`],[`--ball-to-rim-ms`,`${e.riseMs+e.fallToRimMs}ms`],[`--ball-net-catch-ms`,`${e.netCatchMs}ms`],[`--ball-drop-ms`,`${e.dropMs}ms`]]}var nt=`<svg viewBox="0 0 40 48" aria-hidden="true"><rect class="merge-swish-pole" x="36" y="28" width="2" height="20"/><rect class="merge-swish-backboard" x="35" y="2" width="3" height="26" rx="1"/><path class="merge-swish-rim" d="M31 18H35M7 18A12 2.5 0 0 1 31 18"/></svg>`,rt=`<svg viewBox="0 0 40 48" aria-hidden="true"><g class="merge-swish-net"><path d="M8 18L12 32M13.5 18L15.5 32M19 18V32M24.5 18L22.5 32M30 18L26 32M9.5 23Q19 25 28.5 23M11 28Q19 29.5 27 28"/></g><path class="merge-swish-rim" d="M7 18A12 2.5 0 0 0 31 18"/></svg>`;function it(){let e=t(`div`,`merge-swish-ball-drift`),n=t(`div`,`merge-swish-ball-arc`);return n.append(t(`span`,`merge-swish-ball`)),e.append(n),e}function X(){let r=t(`div`,`merge-swish-court`);e(r,tt());let i=t(`div`,`merge-swish-track`);return i.append(it()),r.append(n(`div`,`merge-swish-hoop-back`,nt),i,n(`div`,`merge-swish-hoop-front`,rt)),r}var Z=[Je,{title:`SWISH!`,buildScene:X},fe,A,ye],at=48,Q=5600,$=null;function ot(n){let r=t(`span`,`merge-confetti-piece`),i=t(`span`,`merge-confetti-arc`);return i.append(t(`span`,`merge-confetti-paper`)),r.append(i),e(r,oe(n)),r}function st(e){let n=t(`p`,`merge-celebration-title`);return n.setAttribute(`aria-hidden`,`true`),Array.from(e).forEach((e,r)=>{let i=t(`span`,`merge-celebration-letter`,e);i.style.setProperty(`--letter-delay`,`${r*45}ms`),n.append(i)}),n}function ct(e,t,n){let r=t.firstElementChild,i=t.lastElementChild;r instanceof HTMLElement&&i instanceof HTMLElement&&(e.style.setProperty(`--celebration-title-width`,`${i.offsetLeft+i.offsetWidth-r.offsetLeft}px`),e.style.setProperty(`--celebration-title-center-y`,`${t.offsetTop+t.offsetHeight/2-n.offsetTop}px`))}function lt(e){let n=t(`div`,`merge-celebration-scene`);return n.setAttribute(`aria-hidden`,`true`),n.append(e.buildScene()),n}function ut(){return Z[Math.floor(Math.random()*Z.length)]}function dt(e){if(r())try{a(te(e))}catch{}}function ft(e){let n=t(`ul`,`merge-celebration-details`);for(let r of e)n.append(t(`li`,`merge-celebration-detail`,r));return n}function pt(e,n){let r=ut();$?.remove(),dt(n);let i=t(`div`,`merge-celebration`);i.setAttribute(`role`,`status`);let a=t(`div`,`merge-celebration-card`),o=t(`div`,`merge-celebration-stage`),s=st(r.title),c=lt(r);o.append(s,t(`p`,`merge-celebration-message`,e.message),ft(e.detailLines),c);let l=t(`div`,`merge-confetti`);l.style.setProperty(`--confetti-scale`,String(ae(n)));for(let e=0;e<at;e+=1)l.append(ot(e));a.append(l,o),i.append(a),document.body.append(i),ct(o,s,c),$=i,window.setTimeout(()=>{i.remove(),$===i&&($=null)},Q)}export{Q as CELEBRATION_DURATION_MS,pt as playCelebration};
1
+ import{_ as e,o as t,s as n}from"./dom-helpers-ScgOMqDW.js";import{Ei as r,ca as i}from"./index-Doflbkag.js";import{playToneSequence as a}from"./alert-sound-CEoydvYU.js";var o=1.2,s=1.55,c=.12,l=523.25,u=2,d=8,f=(e,t,n)=>({semitone:e,startBeat:t,beats:n}),p={melody:[f(7,4,.5),f(11,4.5,.5),f(12,5,3)],bass:[f(-5,4,1),f(-12,5,3)]},m=[{melody:[f(0,0,1),f(4,1,1),f(7,2,1),f(9,3,1)],bass:[f(-12,0,2),f(-8,2,2)]},{melody:[f(7,0,.67),f(7,.67,.67),f(7,1.33,.67),f(9,2,1),f(5,3,1)],bass:[f(-12,0,2),f(-7,2,2)]},{melody:[f(5,0,1),f(9,1,1),f(7,2,1),f(4,3,1)],bass:[f(-7,0,2),f(-12,2,2)]},{melody:[f(12,0,.5),f(7,.5,.5),f(12,1,.5),f(16,1.5,.5),f(16,2,1),f(14,3,1)],bass:[f(-12,0,2),f(-3,2,2)]},{melody:[f(4,0,1),f(7,1,1),f(4,2,.5),f(5,2.5,.5),f(7,3,.5),f(4,3.5,.5)],bass:[f(-8,0,2),f(-12,2,2)]}].map(e=>({melody:[...e.melody,...p.melody],bass:[...e.bass,...p.bass]}));function h(e,t){return l*2**((e+t)/12)}function g(e,t){let n=(e,n,r)=>e.map(e=>({frequency:h(e.semitone,t),startSeconds:s+e.startBeat*c,durationSeconds:e.beats*c,waveform:n,gain:r}));return[...n(e.melody,`square`,.2),...n(e.melody,`triangle`,.5),...n(e.bass,`triangle`,.6)]}var ee=[{frequency:220,endFrequency:880,startSeconds:0,durationSeconds:.32,waveform:`triangle`,gain:.25},{frequency:160,endFrequency:45,startSeconds:o,durationSeconds:.28,waveform:`sine`,gain:1},{frequency:1400,endFrequency:380,startSeconds:o,durationSeconds:.06,waveform:`square`,gain:.12}];function te(e){let t=m[e%m.length],n=Math.min(e*u,d);return{peakGain:.1,tones:[...ee,...g(t,n)]}}function _(e){return Math.round(Math.sqrt(2*e/780)*1e3)}function v(e,t,n=Math.random){return Math.round(e+n()*(t-e))}function y(e,t=Math.random){let n=[...e];for(let e=n.length-1;e>0;--e){let r=Math.floor(t()*(e+1));[n[e],n[r]]=[n[r],n[e]]}return n}var ne=.6,re=.25,ie=1.6;function ae(e){return Math.min(ne+e*re,ie)}var b=[`var(--accent)`,`var(--state-running)`,`var(--state-idle)`,`var(--state-waiting)`,`var(--state-failed)`];function oe(e,t=Math.random){let n=v(320,520,t),r=v(1800,2800,t);return[[`--confetti-start-x`,`${v(4,96,t)}%`],[`--confetti-x`,`${v(-140,140,t)}px`],[`--confetti-rise`,`${-v(20,55,t)}px`],[`--confetti-fall`,`${v(45,70,t)}vh`],[`--confetti-rise-ms`,`${n}ms`],[`--confetti-fall-ms`,`${r}ms`],[`--confetti-flight-ms`,`${n+r}ms`],[`--confetti-tilt`,`${v(0,180,t)}deg`],[`--confetti-spin`,`${v(-360,360,t)}deg`],[`--confetti-flutter-ms`,`${v(160,340,t)}ms`],[`--confetti-delay`,`${v(0,160,t)}ms`],[`--confetti-color`,b[e%b.length]]]}var se=`<svg viewBox="0 0 36 36" aria-hidden="true"><circle class="merge-bullseye-ring-light" cx="18" cy="18" r="17"/><circle class="merge-bullseye-ring-red" cx="18" cy="18" r="13"/><circle class="merge-bullseye-ring-light" cx="18" cy="18" r="9"/><circle class="merge-bullseye-ring-red" cx="18" cy="18" r="5"/></svg>`,ce=`<svg viewBox="0 0 26 8" aria-hidden="true"><path class="merge-bullseye-dart-flight" d="M0 0L7 3V5L0 8L2 4Z"/><rect class="merge-bullseye-dart-shaft" x="6" y="3.3" width="8" height="1.4"/><rect class="merge-bullseye-dart-barrel" x="13" y="2.5" width="7" height="3" rx="1"/><path class="merge-bullseye-dart-tip" d="M20 3L26 4L20 5Z"/></svg>`;function le(){let e=n(`div`,`merge-bullseye-target`,se);return e.append(t(`span`,`merge-bullseye-ripple`)),e}function ue(){let e=t(`div`,`merge-bullseye-dart-drift`),r=t(`div`,`merge-bullseye-dart-arc`),i=t(`div`,`merge-bullseye-dart-aim`);return i.append(n(`div`,`merge-bullseye-dart`,ce)),r.append(i),e.append(r),e}function de(){let e=t(`div`,`merge-bullseye-range`),n=t(`div`,`merge-bullseye-track`);return n.append(ue()),e.append(le(),n),e}var fe={title:`BULLSEYE!`,buildScene:de},pe=6,x=30,S=-14,C=16;function w(e=Math.random){return[[`--crosshair-start-left`,`${v(pe,x,e)}%`],[`--crosshair-start-offset-y`,`${v(S,C,e)}px`]]}var T=`<svg viewBox="0 0 26 40" aria-hidden="true"><path class="merge-headshot-target-body" d="M9 13H17L18 16Q25 18 25 24V40H1V24Q1 18 8 16Z"/><circle class="merge-headshot-target-head" cx="13" cy="7" r="6"/><circle class="merge-headshot-target-ring" cx="13" cy="7" r="3"/><circle class="merge-headshot-target-ring" cx="13" cy="27" r="6"/><circle class="merge-headshot-target-ring" cx="13" cy="27" r="2.5"/></svg>`,E=`<svg viewBox="0 0 22 22" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="M11 0V5M11 17V22M0 11H5M17 11H22"/><circle class="merge-headshot-crosshair-dot" cx="11" cy="11" r="1"/></svg>`,D=`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 3L8 8M21 3L16 8M3 21L8 16M21 21L16 16"/></svg>`;function O(){let r=t(`div`,`merge-headshot-sweep`);e(r,w());let i=t(`div`,`merge-headshot-aim`);i.append(n(`div`,`merge-headshot-crosshair`,E));let a=t(`div`,`merge-headshot-bob`);return a.append(i,n(`div`,`merge-headshot-hitmarker`,D)),r.append(a),r}function k(){let e=t(`div`,`merge-headshot-range`),r=t(`div`,`merge-headshot-track`);return r.append(O()),e.append(n(`div`,`merge-headshot-target`,T),r),e}var A={title:`HEADSHOT!`,buildScene:k},j=[`10`,`J`,`Q`,`K`,`A`],M=160,N=19,P=5,F=9,I=780,L=70,R=70,z=35;function B(e){let t=j.length-1,n=e-t/2;return{offsetPx:n*N,titleSpreadFraction:n/t,tiltDegrees:n*P,bottomPx:F-n**2,dealLeadMs:I-e*L,flipLeadMs:M+(t-e)*R,waveDelayMs:e*z}}function me(e){return[[`--card-offset`,`${e.offsetPx}px`],[`--card-title-spread`,String(e.titleSpreadFraction)],[`--card-tilt`,`${e.tiltDegrees}deg`],[`--card-bottom`,`${e.bottomPx}px`],[`--card-deal-lead-ms`,`${e.dealLeadMs}ms`],[`--card-flip-lead-ms`,`${e.flipLeadMs}ms`],[`--card-wave-delay-ms`,`${e.waveDelayMs}ms`]]}function he(){return[[`--card-flip-ms`,`${M}ms`]]}var ge=`<svg viewBox="0 0 10 9" aria-hidden="true"><path d="M5 8.5C5 8.5 0 5.3 0 2.6C0 1.1 1.2 0 2.6 0C3.6 0 4.5 .6 5 1.4C5.5 .6 6.4 0 7.4 0C8.8 0 10 1.1 10 2.6C10 5.3 5 8.5 5 8.5Z"/></svg>`;function _e(n,r){let i=t(`div`,`merge-flush-deal`);e(i,me(B(r)));let a=t(`div`,`merge-flush-hop`),o=t(`div`,`merge-flush-card`),s=t(`div`,`merge-flush-face`);return s.append(t(`span`,`merge-flush-rank`,n)),s.insertAdjacentHTML(`beforeend`,ge),o.append(t(`div`,`merge-flush-back`),s),a.append(o),i.append(a),i}function ve(){let n=t(`div`,`merge-flush-table`);return e(n,he()),n.append(...j.map(_e)),n}var ye={title:`ROYAL FLUSH!`,buildScene:ve},be=[1,2,3,4],xe=14,Se=3,Ce=3,V=10,we=20,Te=2,H=28,U=18,Ee=.01,De=1.5,Oe=2200,ke=1,W=120,G=.35,Ae=15,je=105,Me=4,Ne=65,Pe=145;function Fe(e){return Math.round(e/(Math.PI*U)*360)}function K(e){return we-e*Te}function q(e){return e.rowIndex*xe+e.depthIndex*Se}function J(e,t,n){return Array.from({length:n},(r,i)=>e+(t-e)*i/(n-1))}function Y(){return be.flatMap((e,t)=>Array.from({length:e},(n,r)=>({rowIndex:t,depthIndex:e-1-r})))}function Ie(e,t){let n=y(J(Ae,je,e),t),r=y(J(Ne,Pe,e),t);return n.map((e,n)=>({angleDegrees:e+v(-4,Me,t),depthScalePercent:Math.round(r[n])}))}function Le(e,t,n){let r=v(240,380,n),i=t.angleDegrees*Math.PI/180,a=r*Math.cos(i),o=(r*Math.sin(i))**2/1560,s=v(15,45,n),c=_(o),l=_(o+s),u=c+l,d=v(540,1080,n),f=a>=0?1:-1,p=q(e);return{depthIndex:e.depthIndex,launchAngleDegrees:t.angleDegrees,distanceFromHeadPinPx:p,layer:K(e.depthIndex),flyXPx:Math.round(a*u/1e3),peakRisePx:Math.round(o),landingDropPx:s,riseMs:c,fallMs:l,flightMs:u,spinDegrees:Math.round(f*d*u/1e3),glintMs:Math.round(180/d*1e3),depthScalePercent:t.depthScalePercent,delayMs:Math.round(p/G)}}function Re(e=Math.random){let t=Y(),n=Ie(t.length,e);return t.map((t,r)=>Le(t,n[r],e))}function ze(e){return[[`--pin-left`,`${e.distanceFromHeadPinPx}px`],[`--pin-raise`,`${e.depthIndex*Ce}px`],[`--pin-shade`,`${100-e.depthIndex*12}%`],[`--pin-fly-x`,`${e.flyXPx}px`],[`--pin-peak-y`,`${-e.peakRisePx}px`],[`--pin-land-y`,`${e.landingDropPx}px`],[`--pin-rise-ms`,`${e.riseMs}ms`],[`--pin-fall-ms`,`${e.fallMs}ms`],[`--pin-flight-ms`,`${e.flightMs}ms`],[`--pin-spin`,`${e.spinDegrees}deg`],[`--pin-glint-ms`,`${e.glintMs}ms`],[`--pin-depth-scale`,`${e.depthScalePercent}%`],[`--pin-depth-shade`,`${e.depthScalePercent-10}%`],[`--pin-delay`,`${e.delayMs}ms`],[`--pin-layer`,String(e.layer)]]}function Be(){return K(De)}function Ve(){return Math.max(...Y().map(q))+V}function He(){let e=Ve(),t=H+e+U-ke;return[[`--ball-follow-px`,`${W}px`],[`--ball-follow-ms`,`${Math.round(W/G)}ms`],[`--ball-follow-spin`,`${Fe(W)}deg`],[`--ball-size`,`${U}px`],[`--ball-approach-spin`,`${Oe}deg`],[`--ball-impact-inset`,`${t}px`],[`--ball-layer`,String(Be())],[`--rack-right`,`${H}px`],[`--rack-width`,`${e}px`],[`--pin-width`,`${V}px`]]}function Ue(e=Math.random){return e()>=Ee?null:i[Math.floor(e()*i.length)].sprite}var We=`<svg viewBox="0 0 10 24" aria-hidden="true"><path class="merge-strike-pin-body" d="M5 0C7 0 7.6 2 7.2 4C6.9 5.6 6.3 6.6 6.4 8C6.6 10 9.6 12 9.6 16C9.6 19.5 8.4 22 7.6 24H2.4C1.6 22 .4 19.5 .4 16C.4 12 3.4 10 3.6 8C3.7 6.6 3.1 5.6 2.8 4C2.4 2 3 0 5 0Z"/><path class="merge-strike-pin-stripe" d="M3.1 5.2H6.9V6.2H3.1ZM3.4 7H6.6V8H3.4Z"/></svg>`;function Ge(r){let i=t(`span`,`merge-strike-pin`);return i.append(n(`span`,`merge-strike-pin-arc`,We)),e(i,ze(r)),i}function Ke(){let e=Ue();if(!e)return t(`span`,`merge-strike-ball`);let n=t(`span`,`merge-strike-ball is-animal`);return n.append(t(`span`,`nyan-sprite ${e}`)),n}function qe(){let n=t(`div`,`merge-strike-lane`);e(n,He());let r=t(`div`,`merge-strike-rack`);r.append(...Re().map(Ge));let i=t(`div`,`merge-strike-track`);return i.append(Ke()),n.append(r,i),n}var Je={title:`STRIKE!`,buildScene:qe},Ye=20,Xe=92,Ze=23,Qe=7,$e=-40;function et(){let e=_(72),t=_(69),n=780*t/1e3;return{launchHeightPx:Ye,peakHeightPx:Xe,heightThroughRimPx:Ze,heightLeavingNetPx:Qe,heightOutOfCardPx:$e,riseMs:e,fallToRimMs:t,speedThroughRimPxPerSecond:n,netCatchMs:Math.round(32/n*1e3),dropMs:_(47)}}function tt(e=et()){return[[`--ball-launch-y`,`${-e.launchHeightPx}px`],[`--ball-peak-y`,`${-e.peakHeightPx}px`],[`--ball-rim-y`,`${-e.heightThroughRimPx}px`],[`--ball-net-exit-y`,`${-e.heightLeavingNetPx}px`],[`--ball-drop-out-y`,`${-e.heightOutOfCardPx}px`],[`--ball-rise-ms`,`${e.riseMs}ms`],[`--ball-fall-to-rim-ms`,`${e.fallToRimMs}ms`],[`--ball-to-rim-ms`,`${e.riseMs+e.fallToRimMs}ms`],[`--ball-net-catch-ms`,`${e.netCatchMs}ms`],[`--ball-drop-ms`,`${e.dropMs}ms`]]}var nt=`<svg viewBox="0 0 40 48" aria-hidden="true"><rect class="merge-swish-pole" x="36" y="28" width="2" height="20"/><rect class="merge-swish-backboard" x="35" y="2" width="3" height="26" rx="1"/><path class="merge-swish-rim" d="M31 18H35M7 18A12 2.5 0 0 1 31 18"/></svg>`,rt=`<svg viewBox="0 0 40 48" aria-hidden="true"><g class="merge-swish-net"><path d="M8 18L12 32M13.5 18L15.5 32M19 18V32M24.5 18L22.5 32M30 18L26 32M9.5 23Q19 25 28.5 23M11 28Q19 29.5 27 28"/></g><path class="merge-swish-rim" d="M7 18A12 2.5 0 0 0 31 18"/></svg>`;function it(){let e=t(`div`,`merge-swish-ball-drift`),n=t(`div`,`merge-swish-ball-arc`);return n.append(t(`span`,`merge-swish-ball`)),e.append(n),e}function X(){let r=t(`div`,`merge-swish-court`);e(r,tt());let i=t(`div`,`merge-swish-track`);return i.append(it()),r.append(n(`div`,`merge-swish-hoop-back`,nt),i,n(`div`,`merge-swish-hoop-front`,rt)),r}var Z=[Je,{title:`SWISH!`,buildScene:X},fe,A,ye],at=48,Q=5600,$=null;function ot(n){let r=t(`span`,`merge-confetti-piece`),i=t(`span`,`merge-confetti-arc`);return i.append(t(`span`,`merge-confetti-paper`)),r.append(i),e(r,oe(n)),r}function st(e){let n=t(`p`,`merge-celebration-title`);return n.setAttribute(`aria-hidden`,`true`),Array.from(e).forEach((e,r)=>{let i=t(`span`,`merge-celebration-letter`,e);i.style.setProperty(`--letter-delay`,`${r*45}ms`),n.append(i)}),n}function ct(e,t,n){let r=t.firstElementChild,i=t.lastElementChild;r instanceof HTMLElement&&i instanceof HTMLElement&&(e.style.setProperty(`--celebration-title-width`,`${i.offsetLeft+i.offsetWidth-r.offsetLeft}px`),e.style.setProperty(`--celebration-title-center-y`,`${t.offsetTop+t.offsetHeight/2-n.offsetTop}px`))}function lt(e){let n=t(`div`,`merge-celebration-scene`);return n.setAttribute(`aria-hidden`,`true`),n.append(e.buildScene()),n}function ut(){return Z[Math.floor(Math.random()*Z.length)]}function dt(e){if(r())try{a(te(e))}catch{}}function ft(e){let n=t(`ul`,`merge-celebration-details`);for(let r of e)n.append(t(`li`,`merge-celebration-detail`,r));return n}function pt(e,n){let r=ut();$?.remove(),dt(n);let i=t(`div`,`merge-celebration`);i.setAttribute(`role`,`status`);let a=t(`div`,`merge-celebration-card`),o=t(`div`,`merge-celebration-stage`),s=st(r.title),c=lt(r);o.append(s,t(`p`,`merge-celebration-message`,e.message),ft(e.detailLines),c);let l=t(`div`,`merge-confetti`);l.style.setProperty(`--confetti-scale`,String(ae(n)));for(let e=0;e<at;e+=1)l.append(ot(e));a.append(l,o),i.append(a),document.body.append(i),ct(o,s,c),$=i,window.setTimeout(()=>{i.remove(),$===i&&($=null)},Q)}export{Q as CELEBRATION_DURATION_MS,pt as playCelebration};
@@ -1,4 +1,4 @@
1
- import{G as e,U as t,W as n,dt as r,ft as i,x as a}from"./updates-view-core-BMRZ5Sfz.js";import{h as o,m as s,o as c}from"./dom-helpers-ScgOMqDW.js";import{d as l}from"./control-ws-CwTd7ewd.js";import{n as u,r as d,t as f}from"./modal-KRdHzhQs.js";import{n as p}from"./session-tick-DNmBRagH.js";import{Cr as m,Dn as h,Er as g,Gr as _,Sr as v,Tr as y,Wr as b,di as x,fr as S,li as C,m as w,qr as T,ui as E,wr as D,xr as ee}from"./index-cexoNCUv.js";import{t as te}from"./repo-roots-adder-BFB-ft7M.js";import{t as ne}from"./sandboxed-frame-DT7MIpqw.js";var re=`<h2 class="dialog-title" id="add-session-title">Add Session</h2>
1
+ import{G as e,U as t,W as n,dt as r,ft as i,x as a}from"./updates-view-core-BMRZ5Sfz.js";import{h as o,m as s,o as c}from"./dom-helpers-ScgOMqDW.js";import{d as l}from"./control-ws-CwTd7ewd.js";import{n as u,r as d,t as f}from"./modal-KRdHzhQs.js";import{n as p}from"./session-tick-DNmBRagH.js";import{Cr as m,Dn as h,Er as g,Gr as _,Sr as v,Tr as y,Wr as b,di as x,fr as S,li as C,m as w,qr as T,ui as E,wr as D,xr as ee}from"./index-Doflbkag.js";import{t as te}from"./repo-roots-adder-Byh1iIoR.js";import{t as ne}from"./sandboxed-frame-DT7MIpqw.js";var re=`<h2 class="dialog-title" id="add-session-title">Add Session</h2>
2
2
  <fieldset class="dialog-mode-controls add-session-agent-only" aria-label="Session kind">
3
3
  <button type="button" class="dialog-mode-button" id="add-session-single-mode" aria-pressed="true">Single repo</button>
4
4
  <button type="button" class="dialog-mode-button" id="add-session-workspace-mode" aria-pressed="false">Workspace</button>
@@ -1 +1 @@
1
- import{o as e}from"./dom-helpers-ScgOMqDW.js";import{d as t}from"./control-ws-CwTd7ewd.js";import{a as n,r,t as i}from"./modal-KRdHzhQs.js";import{Wr as a,hn as o,qr as s,si as c}from"./index-cexoNCUv.js";import{i as l,t as u}from"./plan-render-BDZIJnEx.js";var d=null;function f(t){let n=c(t.sessionId);t.select.replaceChildren(...n.map(n=>{let r=e(`option`,null,n.name);return r.value=n.path,r.selected=n.path===t.docPath,r})),t.select.hidden=n.length<2,t.title.textContent=n.find(e=>e.path===t.docPath)?.name??t.title.textContent}function p(e){let t=c(e.sessionId).some(t=>t.path===e.docPath);e.btnEdit.setAttribute(`aria-pressed`,String(e.mode===`edit`)),e.btnPreview.setAttribute(`aria-pressed`,String(e.mode===`preview`)),e.textarea.hidden=e.mode!==`edit`,e.preview.hidden=e.mode!==`preview`,e.select.disabled=e.isBusy,e.btnReload.disabled=e.isBusy||!t,e.btnSave.disabled=e.isBusy||!t||e.baseHash===null||!e.hasUnsavedChanges}function m(e,t,n=`quiet`){e.status.textContent=t,e.status.dataset.tone=n}function h(e){e.preview.replaceChildren(u(l(e.textarea.value)))}function g(e,t){n({title:e,message:`Your unsaved edits will be lost.`,confirmLabel:`Discard`,danger:!0,onConfirm:t})}function _(e,t,n){e.hasUnsavedChanges?g(t,n):n()}async function v(e,n){try{return{reply:await t(e,n,{timeoutMs:a}),failureText:null}}catch(e){return{reply:null,failureText:s(e,a)}}}async function y(e,t){e.docPath=t,e.isBusy=!0,e.baseHash=null,e.textarea.readOnly=!0,f(e),m(e,`Loading`),p(e);let{reply:n,failureText:r}=await v(`session-doc-read`,{id:e.sessionId,path:t});if(d!==e||e.docPath!==t)return;e.isBusy=!1,e.textarea.readOnly=!1;let i=n?.type===`session-doc-response`?n:null;!i?.ok||i.text===void 0||i.hash===void 0?(m(e,i?.error||r||`Could not open this doc`,`warn`),p(e)):(e.textarea.value=i.text,e.baseHash=i.hash,e.hasUnsavedChanges=!1,e.mode===`preview`&&h(e),m(e,``),p(e))}async function b(e){if(e.btnSave.disabled||e.baseHash===null)return;e.isBusy=!0,m(e,`Saving`),p(e);let t=e.docPath,n=e.textarea.value,{reply:r,failureText:i}=await v(`session-doc-save`,{id:e.sessionId,path:t,text:n,baseHash:e.baseHash});if(d!==e||e.docPath!==t)return;e.isBusy=!1;let a=r?.type===`session-doc-save-result`?r:null;!a?.ok||a.hash===void 0?(m(e,a?.conflict?`The agent changed this file since you opened it. Reload to see its version.`:a?.error||i||`Save failed`,`warn`),p(e)):(e.baseHash=a.hash,e.hasUnsavedChanges=e.textarea.value!==n,m(e,e.hasUnsavedChanges?`Unsaved changes`:`Saved`),p(e))}function x(e,t){e.mode=t,t===`preview`&&h(e),p(e),t===`edit`&&e.textarea.focus()}function S(t,n){let r=e(`button`,`plan-control ${n}`,t);return r.type=`button`,r}function C(t){let n=c(t)[0];if(!n||d)return;let a=()=>_(M,`Close this doc?`,()=>M.close()),s=r({dialogClass:`doc-editor`,closeOnBackdrop:!1,onEscape:a}),l=`doc-editor-title-${t}`,u=e(`h3`,`doc-editor-title`,n.name);u.id=l;let f=e(`select`,`plan-control doc-editor-picker`);f.setAttribute(`aria-label`,`Doc`);let h=e(`span`,`doc-editor-status`);h.setAttribute(`role`,`status`);let g=S(`Edit`,`doc-editor-mode`),v=S(`Preview`,`doc-editor-mode`),C=S(`Reload`,`doc-editor-reload`),w=S(`Save`,`doc-editor-save`),T=S(`Close`,`doc-editor-close`),E=e(`div`,`doc-editor-modes`);E.append(g,v);let D=e(`div`,`doc-editor-actions`);D.append(h,C,w,T);let O=e(`div`,`doc-editor-header`);O.append(u,f,E,D);let k=e(`textarea`,`plan-editor doc-editor-text`);k.spellcheck=!0,k.setAttribute(`aria-labelledby`,l);let A=e(`div`,`doc-editor-preview`),j=e(`div`,`doc-editor-body`);j.append(k,A),s.dialog.append(O,j),i(s.dialog,l);let M={sessionId:t,docPath:n.path,baseHash:null,hasUnsavedChanges:!1,isBusy:!1,mode:o()?`preview`:`edit`,title:u,select:f,textarea:k,preview:A,status:h,btnEdit:g,btnPreview:v,btnReload:C,btnSave:w,close:()=>{d=null,s.close()}};d=M,k.addEventListener(`input`,()=>{M.hasUnsavedChanges||(M.hasUnsavedChanges=!0,m(M,`Unsaved changes`),p(M))}),k.addEventListener(`keydown`,e=>{(e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),b(M))}),f.addEventListener(`change`,()=>{let e=f.value;f.value=M.docPath,_(M,`Open another doc?`,()=>{y(M,e)})}),g.addEventListener(`click`,()=>x(M,`edit`)),v.addEventListener(`click`,()=>x(M,`preview`)),C.addEventListener(`click`,()=>{_(M,`Reload this doc?`,()=>{y(M,M.docPath)})}),w.addEventListener(`click`,()=>{b(M)}),T.addEventListener(`click`,a),y(M,n.path),M.mode===`edit`&&k.focus()}function w(e){d&&d.sessionId===e&&(f(d),p(d),!c(e).some(e=>e.path===d?.docPath)&&m(d,`This doc is no longer surfaced, so it cannot be saved.`,`warn`))}export{w as applyDocsToOpenEditor,C as openDocEditor};
1
+ import{o as e}from"./dom-helpers-ScgOMqDW.js";import{d as t}from"./control-ws-CwTd7ewd.js";import{a as n,r,t as i}from"./modal-KRdHzhQs.js";import{Wr as a,hn as o,qr as s,si as c}from"./index-Doflbkag.js";import{i as l,t as u}from"./plan-render-BJP9FY5A.js";var d=null;function f(t){let n=c(t.sessionId);t.select.replaceChildren(...n.map(n=>{let r=e(`option`,null,n.name);return r.value=n.path,r.selected=n.path===t.docPath,r})),t.select.hidden=n.length<2,t.title.textContent=n.find(e=>e.path===t.docPath)?.name??t.title.textContent}function p(e){let t=c(e.sessionId).some(t=>t.path===e.docPath);e.btnEdit.setAttribute(`aria-pressed`,String(e.mode===`edit`)),e.btnPreview.setAttribute(`aria-pressed`,String(e.mode===`preview`)),e.textarea.hidden=e.mode!==`edit`,e.preview.hidden=e.mode!==`preview`,e.select.disabled=e.isBusy,e.btnReload.disabled=e.isBusy||!t,e.btnSave.disabled=e.isBusy||!t||e.baseHash===null||!e.hasUnsavedChanges}function m(e,t,n=`quiet`){e.status.textContent=t,e.status.dataset.tone=n}function h(e){e.preview.replaceChildren(u(l(e.textarea.value)))}function g(e,t){n({title:e,message:`Your unsaved edits will be lost.`,confirmLabel:`Discard`,danger:!0,onConfirm:t})}function _(e,t,n){e.hasUnsavedChanges?g(t,n):n()}async function v(e,n){try{return{reply:await t(e,n,{timeoutMs:a}),failureText:null}}catch(e){return{reply:null,failureText:s(e,a)}}}async function y(e,t){e.docPath=t,e.isBusy=!0,e.baseHash=null,e.textarea.readOnly=!0,f(e),m(e,`Loading`),p(e);let{reply:n,failureText:r}=await v(`session-doc-read`,{id:e.sessionId,path:t});if(d!==e||e.docPath!==t)return;e.isBusy=!1,e.textarea.readOnly=!1;let i=n?.type===`session-doc-response`?n:null;!i?.ok||i.text===void 0||i.hash===void 0?(m(e,i?.error||r||`Could not open this doc`,`warn`),p(e)):(e.textarea.value=i.text,e.baseHash=i.hash,e.hasUnsavedChanges=!1,e.mode===`preview`&&h(e),m(e,``),p(e))}async function b(e){if(e.btnSave.disabled||e.baseHash===null)return;e.isBusy=!0,m(e,`Saving`),p(e);let t=e.docPath,n=e.textarea.value,{reply:r,failureText:i}=await v(`session-doc-save`,{id:e.sessionId,path:t,text:n,baseHash:e.baseHash});if(d!==e||e.docPath!==t)return;e.isBusy=!1;let a=r?.type===`session-doc-save-result`?r:null;!a?.ok||a.hash===void 0?(m(e,a?.conflict?`The agent changed this file since you opened it. Reload to see its version.`:a?.error||i||`Save failed`,`warn`),p(e)):(e.baseHash=a.hash,e.hasUnsavedChanges=e.textarea.value!==n,m(e,e.hasUnsavedChanges?`Unsaved changes`:`Saved`),p(e))}function x(e,t){e.mode=t,t===`preview`&&h(e),p(e),t===`edit`&&e.textarea.focus()}function S(t,n){let r=e(`button`,`plan-control ${n}`,t);return r.type=`button`,r}function C(t){let n=c(t)[0];if(!n||d)return;let a=()=>_(M,`Close this doc?`,()=>M.close()),s=r({dialogClass:`doc-editor`,closeOnBackdrop:!1,onEscape:a}),l=`doc-editor-title-${t}`,u=e(`h3`,`doc-editor-title`,n.name);u.id=l;let f=e(`select`,`plan-control doc-editor-picker`);f.setAttribute(`aria-label`,`Doc`);let h=e(`span`,`doc-editor-status`);h.setAttribute(`role`,`status`);let g=S(`Edit`,`doc-editor-mode`),v=S(`Preview`,`doc-editor-mode`),C=S(`Reload`,`doc-editor-reload`),w=S(`Save`,`doc-editor-save`),T=S(`Close`,`doc-editor-close`),E=e(`div`,`doc-editor-modes`);E.append(g,v);let D=e(`div`,`doc-editor-actions`);D.append(h,C,w,T);let O=e(`div`,`doc-editor-header`);O.append(u,f,E,D);let k=e(`textarea`,`plan-editor doc-editor-text`);k.spellcheck=!0,k.setAttribute(`aria-labelledby`,l);let A=e(`div`,`doc-editor-preview`),j=e(`div`,`doc-editor-body`);j.append(k,A),s.dialog.append(O,j),i(s.dialog,l);let M={sessionId:t,docPath:n.path,baseHash:null,hasUnsavedChanges:!1,isBusy:!1,mode:o()?`preview`:`edit`,title:u,select:f,textarea:k,preview:A,status:h,btnEdit:g,btnPreview:v,btnReload:C,btnSave:w,close:()=>{d=null,s.close()}};d=M,k.addEventListener(`input`,()=>{M.hasUnsavedChanges||(M.hasUnsavedChanges=!0,m(M,`Unsaved changes`),p(M))}),k.addEventListener(`keydown`,e=>{(e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),b(M))}),f.addEventListener(`change`,()=>{let e=f.value;f.value=M.docPath,_(M,`Open another doc?`,()=>{y(M,e)})}),g.addEventListener(`click`,()=>x(M,`edit`)),v.addEventListener(`click`,()=>x(M,`preview`)),C.addEventListener(`click`,()=>{_(M,`Reload this doc?`,()=>{y(M,M.docPath)})}),w.addEventListener(`click`,()=>{b(M)}),T.addEventListener(`click`,a),y(M,n.path),M.mode===`edit`&&k.focus()}function w(e){d&&d.sessionId===e&&(f(d),p(d),!c(e).some(e=>e.path===d?.docPath)&&m(d,`This doc is no longer surfaced, so it cannot be saved.`,`warn`))}export{w as applyDocsToOpenEditor,C as openDocEditor};
@@ -1 +1 @@
1
- import{gt as e}from"./updates-view-core-BMRZ5Sfz.js";import{o as t}from"./dom-helpers-ScgOMqDW.js";import{u as n}from"./control-ws-CwTd7ewd.js";import{En as r,Tn as i,ca as a,fi as o,i as s,pi as c}from"./index-cexoNCUv.js";var l={teamReview:e=>`${e} pull requests reviewed this week, and Reviews has not been open lately? It lines up every PR waiting on you.`,issues:e=>`${e} issues touched this week. The Issues tab keeps them in one list and starts a session on any of them.`,usage:()=>`Keeping an eye on tokens? The Usage tab tracks spend per session and warns before a limit hits.`,posthog:()=>`Hunting errors again? Radar watches PostHog error tracking and can investigate an issue for you.`,visions:()=>`Pointing agents at files in your editor? Visions reads your open editor and comments right on the code.`,benchmarks:()=>`Comparing agents by hand? Bench runs the same review cases across agent setups side by side.`},u=` It is off right now, so Show me takes you to its switch in Settings.`;function d(e,t){let n=l[e.feature](e.distinctTargetCount);return t?n:`${n}${u}`}function f(e){let t=s.find(t=>t.rule===e);return t?{sectionId:t.sectionId,settingId:t.settingId}:null}var p=null;function m(e,t){n({type:`dashboard-telemetry`,event:`operator_action`,properties:{surface:`hints`,action:t,feature:e}})}function h(e){try{return r(localStorage,i(`feature-hint`,`${e.feature}-${e.raisedAt}`),Date.now())}catch{return!0}}function g(t,n){if(n.isFeatureEnabled(t)){n.openView(e[t]);return}let r=f(t);r&&n.openSetting(r.sectionId,r.settingId)}function _(e,n){if(p?.isConnected||!h(e))return;let r=t(`aside`,`feature-hint`);r.setAttribute(`aria-live`,`polite`),r.setAttribute(`aria-label`,`Feature tip`);let i=t(`div`,`feature-hint-bubble`),s=t(`button`,`btn-dialog btn-dialog-confirm`,`Show me`),l=t(`button`,`btn-dialog btn-dialog-cancel`,`Nah`);s.type=`button`,l.type=`button`;let u=t(`div`,`feature-hint-actions`);u.append(l,s),i.append(t(`p`,`feature-hint-text`,d(e,n.isFeatureEnabled(e.feature))),u);let f=c()??a[0];r.append(i,o(f,`feature-hint-animal`));function _(t){m(e.feature,t),r.remove(),p=null}s.addEventListener(`click`,()=>{_(`open`),g(e.feature,n)}),l.addEventListener(`click`,()=>_(`dismiss`)),document.body.append(r),p=r,m(e.feature,`shown`)}export{_ as showFeatureHint};
1
+ import{gt as e}from"./updates-view-core-BMRZ5Sfz.js";import{o as t}from"./dom-helpers-ScgOMqDW.js";import{u as n}from"./control-ws-CwTd7ewd.js";import{En as r,Tn as i,ca as a,fi as o,i as s,pi as c}from"./index-Doflbkag.js";var l={teamReview:e=>`${e} pull requests reviewed this week, and Reviews has not been open lately? It lines up every PR waiting on you.`,issues:e=>`${e} issues touched this week. The Issues tab keeps them in one list and starts a session on any of them.`,usage:()=>`Keeping an eye on tokens? The Usage tab tracks spend per session and warns before a limit hits.`,posthog:()=>`Hunting errors again? Radar watches PostHog error tracking and can investigate an issue for you.`,visions:()=>`Pointing agents at files in your editor? Visions reads your open editor and comments right on the code.`,benchmarks:()=>`Comparing agents by hand? Bench runs the same review cases across agent setups side by side.`},u=` It is off right now, so Show me takes you to its switch in Settings.`;function d(e,t){let n=l[e.feature](e.distinctTargetCount);return t?n:`${n}${u}`}function f(e){let t=s.find(t=>t.rule===e);return t?{sectionId:t.sectionId,settingId:t.settingId}:null}var p=null;function m(e,t){n({type:`dashboard-telemetry`,event:`operator_action`,properties:{surface:`hints`,action:t,feature:e}})}function h(e){try{return r(localStorage,i(`feature-hint`,`${e.feature}-${e.raisedAt}`),Date.now())}catch{return!0}}function g(t,n){if(n.isFeatureEnabled(t)){n.openView(e[t]);return}let r=f(t);r&&n.openSetting(r.sectionId,r.settingId)}function _(e,n){if(p?.isConnected||!h(e))return;let r=t(`aside`,`feature-hint`);r.setAttribute(`aria-live`,`polite`),r.setAttribute(`aria-label`,`Feature tip`);let i=t(`div`,`feature-hint-bubble`),s=t(`button`,`btn-dialog btn-dialog-confirm`,`Show me`),l=t(`button`,`btn-dialog btn-dialog-cancel`,`Nah`);s.type=`button`,l.type=`button`;let u=t(`div`,`feature-hint-actions`);u.append(l,s),i.append(t(`p`,`feature-hint-text`,d(e,n.isFeatureEnabled(e.feature))),u);let f=c()??a[0];r.append(i,o(f,`feature-hint-animal`));function _(t){m(e.feature,t),r.remove(),p=null}s.addEventListener(`click`,()=>{_(`open`),g(e.feature,n)}),l.addEventListener(`click`,()=>_(`dismiss`)),document.body.append(r),p=r,m(e.feature,`shown`)}export{_ as showFeatureHint};
@@ -0,0 +1 @@
1
+ .feature-hint{z-index:120;flex-direction:column;align-items:flex-end;gap:6px;max-width:min(340px,100vw - 32px);animation:1.1s cubic-bezier(.22,1,.36,1) both feature-hint-fly-in;display:flex;position:fixed;bottom:44px;right:16px}.feature-hint-bubble{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-surface);color:var(--text);padding:12px 14px;animation:.3s ease-out .9s both feature-hint-bubble-in;position:relative;box-shadow:0 8px 24px #00000059}.feature-hint-bubble:after{content:"";border-right:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--bg-surface);width:12px;height:12px;position:absolute;bottom:-7px;right:40px;transform:rotate(45deg)}.feature-hint-text{margin:0 0 10px;font-size:14px;line-height:1.5}.feature-hint-actions{justify-content:flex-end;gap:8px;display:flex}.flying-animal-preview.feature-hint-animal{width:120px;height:56px}.feature-hint-animal .flying-animal-preview-stage{top:8px;left:calc(60% - var(--nyan-width) / 2)}.feature-hint-animal .nyan-trail{width:48px}html[data-layout=phone] .feature-hint{bottom:calc(72px + env(safe-area-inset-bottom,0px))}@keyframes feature-hint-fly-in{0%{transform:translate(-110vw,-40vh)}to{transform:translate(0)}}@keyframes feature-hint-bubble-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes feature-hint-fade-in{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.feature-hint{animation:.3s ease-out both feature-hint-fade-in}.feature-hint-bubble{animation:none}}
@@ -1 +1 @@
1
- import{o as e,y as t}from"./dom-helpers-ScgOMqDW.js";import{d as n,u as r}from"./control-ws-CwTd7ewd.js";import{Gr as i,Sn as a,Wr as o,hr as s,mr as c,qr as l,ur as u}from"./index-cexoNCUv.js";import{a as d,c as f,i as p,l as m,n as h,o as g,r as _,s as v,t as y}from"./repo-roots-adder-BFB-ft7M.js";var b=`npm install -g @anthropic-ai/claude-code`,x={done:`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="Done"><circle cx="12" cy="12" r="10"></circle><path d="M7.5 12.5l3 3 6-6.5"></path></svg>`,current:`<svg width="18" height="18" viewBox="0 0 24 24" role="img" aria-label="Needed"><path d="M12 3l9 9-9 9-9-9z" fill="currentColor"></path></svg>`,upcoming:`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" role="img" aria-label="Not started"><circle cx="12" cy="12" r="10"></circle></svg>`},S=null,C=null,w=null,T=null,E={steps:_,agentSummary:``,repoRoots:[],isShellAvailable:!1},D=0,O=!1,k=!1,A=new Set,j=i(`first-run-load-status`),M=a();function N(e){r({type:`dashboard-telemetry`,event:`operator_action`,properties:{surface:`onboarding`,action:e}})}function P(e){for(let t of v(A,e))r({type:`dashboard-telemetry`,event:`onboarding_step`,properties:t})&&A.add(f(t))}function F({title:t,state:n,summary:r,badge:i,body:a}){let o=e(`li`,`first-run-step`);o.dataset.state=n,n===`current`&&o.setAttribute(`aria-current`,`step`);let s=e(`div`,`first-run-step-head`),c=e(`span`,`first-run-step-icon`);if(c.innerHTML=x[n],s.append(c,e(`span`,`first-run-step-title`,t)),n===`done`&&r&&s.append(e(`span`,`first-run-step-summary`,r)),n===`current`&&i&&s.append(e(`span`,`first-run-step-badge`,i)),o.append(s),n!==`current`)return o;let l=e(`div`,`first-run-step-body`);return l.append(...a()),o.append(l),o}function I(){return u()?`No supported agent is on PATH of the machine running Glimmervoid. Install Claude Code, Codex or Grok there, then rescan.`:`No supported agent is on PATH. Install Claude Code, Codex or Grok, then rescan.`}function L(){let n=e(`div`,`first-run-command-row`);if(n.append(e(`code`,`first-run-command`,b)),!navigator.clipboard?.writeText)return n;let r=e(`button`,`btn-dialog btn-dialog-cancel`,`Copy`);r.type=`button`;let i=e(`span`,`first-run-copy-status`);return i.setAttribute(`role`,`status`),r.addEventListener(`click`,async()=>{let e=t(b);i.textContent=e?await e.then(()=>`Copied`,()=>`Copy failed`):`Copy failed`}),n.append(r,i),n}function R(){let t=e(`button`,`btn-dialog btn-dialog-cancel`,`Open shell`);return t.type=`button`,t.addEventListener(`click`,()=>{N(`open-shell`),s()}),t}function z(){let t=e(`div`,`first-run-step-actions`);w=e(`button`,`btn-dialog btn-dialog-cancel`,`Rescan`),w.type=`button`,w.addEventListener(`click`,()=>{N(`rescan`),U({rescanAgents:!0})}),t.append(w),E.isShellAvailable&&t.append(R());let n=[e(`p`,`first-run-step-text`,I()),L(),t];return O?[...n,e(`p`,`first-run-step-hint`,`Still missing after a rescan? Restart Glimmervoid from a terminal where the command runs. Other terminal agents go under customAgents.`)]:n}function B(){let t=T??y({onAdded:e=>{N(e===`typed`?`add-root-typed`:`add-root-suggested`),U({rescanAgents:!1})}});return T=t,[e(`p`,`first-run-step-text`,`The folder that holds your git checkouts. Each subfolder becomes a project you can start a session in.`),t.element]}function V(){let t=e(`div`,`first-run-step-actions`),n=e(`button`,`btn-dialog btn-dialog-confirm`,`+ Session`);return n.type=`button`,n.addEventListener(`click`,()=>{N(`add-session`),c()}),t.append(n),[e(`p`,`first-run-step-text`,`Pick a project and an agent. The session runs in its own git worktree, so your checkout is never touched.`),t]}function H(){if(!C)return;let{steps:e,agentSummary:t,repoRoots:n}=E;C.replaceChildren(F({title:`1. Agent CLI`,state:e.agent,summary:t,badge:`MISSING`,body:z}),F({title:`2. Repository roots`,state:e.repoRoots,summary:n.join(`, `),badge:`NEEDED`,body:B}),F({title:`3. First session`,state:e.firstSession,summary:``,badge:``,body:V}))}async function U({rescanAgents:e}){D+=1;let t=D;w&&(w.disabled=!0);try{let[r,i]=await Promise.all([n(`list-agents`,e?{rescan:!0}:{},{timeoutMs:o}),n(`scan-repo-roots`,{includeSuggestions:!0},{timeoutMs:o})]);if(t!==D)return;let a=i.type===`repo-roots-scanned`,s=a?i.directories.map(e=>e.root):[],c=a?i.suggestions??[]:[],l=m(s,c);if(l.length>0&&!k){k=!0;let e=await h(l).catch(e=>String(e));if(t!==D)return;if(!e){U({rescanAgents:!1});return}}let u=g({agentListing:r,repoRoots:s});e&&(O=u.agent===`current`),E={steps:u,agentSummary:p(r),repoRoots:s,isShellAvailable:d(r)},j.clear(),H(),P(E.steps),T?.setSuggestions(c)}catch(e){if(w&&(w.disabled=!1),t!==D)return;j.show(`error`,`The checklist could not load: ${l(e,o)} It loads again once the server answers. If it stays like this, check the terminal running Glimmervoid, or run glimmervoid doctor.`)}}function W(){if(S)return S;let t=e(`section`,`first-run-checklist`);t.setAttribute(`aria-labelledby`,`first-run-title`);let n=e(`h2`,`first-run-title`,`Get to your first session`);n.id=`first-run-title`,C=e(`ol`,`first-run-steps`);let r=e(`div`,`first-run-optional`);return r.append(e(`span`,`first-run-eyebrow`,`OPTIONAL`),M.element),t.append(e(`span`,`first-run-eyebrow`,`FIRST RUN`),n,C,j.element,r),S=t,H(),t}function G(e,t){if(!t){S?.parentElement===e&&!S.hidden&&(S.hidden=!0);return}let n=W(),r=!n.hidden&&n.parentElement===e;n.parentElement!==e&&e.append(n),n.hidden=!1,M.refresh(),r||U({rescanAgents:!1})}function K(){S&&!S.hidden&&S.isConnected&&U({rescanAgents:!1})}export{K as refreshFirstRunChecklist,G as showFirstRunChecklist};
1
+ import{o as e,y as t}from"./dom-helpers-ScgOMqDW.js";import{d as n,u as r}from"./control-ws-CwTd7ewd.js";import{Gr as i,Sn as a,Wr as o,hr as s,mr as c,qr as l,ur as u}from"./index-Doflbkag.js";import{a as d,c as f,i as p,l as m,n as h,o as g,r as _,s as v,t as y}from"./repo-roots-adder-Byh1iIoR.js";var b=`npm install -g @anthropic-ai/claude-code`,x={done:`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="Done"><circle cx="12" cy="12" r="10"></circle><path d="M7.5 12.5l3 3 6-6.5"></path></svg>`,current:`<svg width="18" height="18" viewBox="0 0 24 24" role="img" aria-label="Needed"><path d="M12 3l9 9-9 9-9-9z" fill="currentColor"></path></svg>`,upcoming:`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" role="img" aria-label="Not started"><circle cx="12" cy="12" r="10"></circle></svg>`},S=null,C=null,w=null,T=null,E={steps:_,agentSummary:``,repoRoots:[],isShellAvailable:!1},D=0,O=!1,k=!1,A=new Set,j=i(`first-run-load-status`),M=a();function N(e){r({type:`dashboard-telemetry`,event:`operator_action`,properties:{surface:`onboarding`,action:e}})}function P(e){for(let t of v(A,e))r({type:`dashboard-telemetry`,event:`onboarding_step`,properties:t})&&A.add(f(t))}function F({title:t,state:n,summary:r,badge:i,body:a}){let o=e(`li`,`first-run-step`);o.dataset.state=n,n===`current`&&o.setAttribute(`aria-current`,`step`);let s=e(`div`,`first-run-step-head`),c=e(`span`,`first-run-step-icon`);if(c.innerHTML=x[n],s.append(c,e(`span`,`first-run-step-title`,t)),n===`done`&&r&&s.append(e(`span`,`first-run-step-summary`,r)),n===`current`&&i&&s.append(e(`span`,`first-run-step-badge`,i)),o.append(s),n!==`current`)return o;let l=e(`div`,`first-run-step-body`);return l.append(...a()),o.append(l),o}function I(){return u()?`No supported agent is on PATH of the machine running Glimmervoid. Install Claude Code, Codex or Grok there, then rescan.`:`No supported agent is on PATH. Install Claude Code, Codex or Grok, then rescan.`}function L(){let n=e(`div`,`first-run-command-row`);if(n.append(e(`code`,`first-run-command`,b)),!navigator.clipboard?.writeText)return n;let r=e(`button`,`btn-dialog btn-dialog-cancel`,`Copy`);r.type=`button`;let i=e(`span`,`first-run-copy-status`);return i.setAttribute(`role`,`status`),r.addEventListener(`click`,async()=>{let e=t(b);i.textContent=e?await e.then(()=>`Copied`,()=>`Copy failed`):`Copy failed`}),n.append(r,i),n}function R(){let t=e(`button`,`btn-dialog btn-dialog-cancel`,`Open shell`);return t.type=`button`,t.addEventListener(`click`,()=>{N(`open-shell`),s()}),t}function z(){let t=e(`div`,`first-run-step-actions`);w=e(`button`,`btn-dialog btn-dialog-cancel`,`Rescan`),w.type=`button`,w.addEventListener(`click`,()=>{N(`rescan`),U({rescanAgents:!0})}),t.append(w),E.isShellAvailable&&t.append(R());let n=[e(`p`,`first-run-step-text`,I()),L(),t];return O?[...n,e(`p`,`first-run-step-hint`,`Still missing after a rescan? Restart Glimmervoid from a terminal where the command runs. Other terminal agents go under customAgents.`)]:n}function B(){let t=T??y({onAdded:e=>{N(e===`typed`?`add-root-typed`:`add-root-suggested`),U({rescanAgents:!1})}});return T=t,[e(`p`,`first-run-step-text`,`The folder that holds your git checkouts. Each subfolder becomes a project you can start a session in.`),t.element]}function V(){let t=e(`div`,`first-run-step-actions`),n=e(`button`,`btn-dialog btn-dialog-confirm`,`+ Session`);return n.type=`button`,n.addEventListener(`click`,()=>{N(`add-session`),c()}),t.append(n),[e(`p`,`first-run-step-text`,`Pick a project and an agent. The session runs in its own git worktree, so your checkout is never touched.`),t]}function H(){if(!C)return;let{steps:e,agentSummary:t,repoRoots:n}=E;C.replaceChildren(F({title:`1. Agent CLI`,state:e.agent,summary:t,badge:`MISSING`,body:z}),F({title:`2. Repository roots`,state:e.repoRoots,summary:n.join(`, `),badge:`NEEDED`,body:B}),F({title:`3. First session`,state:e.firstSession,summary:``,badge:``,body:V}))}async function U({rescanAgents:e}){D+=1;let t=D;w&&(w.disabled=!0);try{let[r,i]=await Promise.all([n(`list-agents`,e?{rescan:!0}:{},{timeoutMs:o}),n(`scan-repo-roots`,{includeSuggestions:!0},{timeoutMs:o})]);if(t!==D)return;let a=i.type===`repo-roots-scanned`,s=a?i.directories.map(e=>e.root):[],c=a?i.suggestions??[]:[],l=m(s,c);if(l.length>0&&!k){k=!0;let e=await h(l).catch(e=>String(e));if(t!==D)return;if(!e){U({rescanAgents:!1});return}}let u=g({agentListing:r,repoRoots:s});e&&(O=u.agent===`current`),E={steps:u,agentSummary:p(r),repoRoots:s,isShellAvailable:d(r)},j.clear(),H(),P(E.steps),T?.setSuggestions(c)}catch(e){if(w&&(w.disabled=!1),t!==D)return;j.show(`error`,`The checklist could not load: ${l(e,o)} It loads again once the server answers. If it stays like this, check the terminal running Glimmervoid, or run glimmervoid doctor.`)}}function W(){if(S)return S;let t=e(`section`,`first-run-checklist`);t.setAttribute(`aria-labelledby`,`first-run-title`);let n=e(`h2`,`first-run-title`,`Get to your first session`);n.id=`first-run-title`,C=e(`ol`,`first-run-steps`);let r=e(`div`,`first-run-optional`);return r.append(e(`span`,`first-run-eyebrow`,`OPTIONAL`),M.element),t.append(e(`span`,`first-run-eyebrow`,`FIRST RUN`),n,C,j.element,r),S=t,H(),t}function G(e,t){if(!t){S?.parentElement===e&&!S.hidden&&(S.hidden=!0);return}let n=W(),r=!n.hidden&&n.parentElement===e;n.parentElement!==e&&e.append(n),n.hidden=!1,M.refresh(),r||U({rescanAgents:!1})}function K(){S&&!S.hidden&&S.isConnected&&U({rescanAgents:!1})}export{K as refreshFirstRunChecklist,G as showFirstRunChecklist};