glimmervoid 0.49.1-next.522 → 0.49.1-next.524

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 (99) hide show
  1. package/dist/bin/glimmervoid.js +7 -7
  2. package/dist/chunks/{adapters-G5T7FKTx.js → adapters-DafVW4QO.js} +6 -6
  3. package/dist/chunks/{adapters-CPsxcbs1.js → adapters-PaP74ZJ0.js} +1 -1
  4. package/dist/chunks/agent-home-B3ELUBLU.js +1 -0
  5. package/dist/chunks/{agent-home-Bq9uFynU.js → agent-home-DGjtaaCS.js} +1 -1
  6. package/dist/chunks/{agent-home-core-CIw3YqAH.js → agent-home-core-8U0YNRUx.js} +1 -1
  7. package/dist/chunks/agent-home-core-C7GFm7jA.js +1 -0
  8. package/dist/chunks/{agent-setup-cli-CsmzaPAu.js → agent-setup-cli-CVGIGZ1l.js} +1 -1
  9. package/dist/chunks/{grok-ChYjLvrR.js → grok-CQ_zwSfe.js} +2 -2
  10. package/dist/chunks/{hook-command-core-CG5D9iou.js → hook-command-core-5G0De2KV.js} +3 -1
  11. package/dist/chunks/kimi-2suyHcpQ.js +1 -0
  12. package/dist/chunks/{kimi-CpTtb7L3.js → kimi-Cwlx6TDQ.js} +4 -4
  13. package/dist/chunks/{main-C3gOhuNK.js → main-BaMTv7BL.js} +181 -82
  14. package/dist/chunks/{spawn-env-xtzWf6ru.js → spawn-env-xHvxWyus.js} +1 -1
  15. package/dist/client/assets/{benchmark-panel-D2uu2WIW.js → benchmark-panel-CxCAc1E1.js} +1 -1
  16. package/dist/client/assets/benchmark-panel-CxCAc1E1.js.br +0 -0
  17. package/dist/client/assets/{boards-view-CeTwQRRs.js → boards-view-NnxZnP8Z.js} +1 -1
  18. package/dist/client/assets/boards-view-NnxZnP8Z.js.br +0 -0
  19. package/dist/client/assets/{community-panel-BO370oHm.js → community-panel-X9Gb8Z6-.js} +1 -1
  20. package/dist/client/assets/community-panel-X9Gb8Z6-.js.br +0 -0
  21. package/dist/client/assets/{dialogs-yiFhSbqP.js → dialogs-ldasvJOW.js} +1 -1
  22. package/dist/client/assets/dialogs-ldasvJOW.js.br +0 -0
  23. package/dist/client/assets/{doc-editor-ui-C4vdenZu.js → doc-editor-ui-H-VGsDuj.js} +1 -1
  24. package/dist/client/assets/doc-editor-ui-H-VGsDuj.js.br +0 -0
  25. package/dist/client/assets/{feature-hint-DZOCtjBo.js → feature-hint-BYyaR-zP.js} +1 -1
  26. package/dist/client/assets/feature-hint-BYyaR-zP.js.br +0 -0
  27. package/dist/client/assets/{first-run-checklist-CX63O_Kv.js → first-run-checklist-A6C6spLQ.js} +1 -1
  28. package/dist/client/assets/first-run-checklist-A6C6spLQ.js.br +0 -0
  29. package/dist/client/assets/{hooks-panel-DdECESLF.js → hooks-panel-CIQA8I1P.js} +1 -1
  30. package/dist/client/assets/hooks-panel-CIQA8I1P.js.br +0 -0
  31. package/dist/client/assets/{index-Dc3WfwfD.js → index-D0-5ZoRG.js} +5 -5
  32. package/dist/client/assets/index-D0-5ZoRG.js.br +0 -0
  33. package/dist/client/assets/{issues-panel-DaBYwQUo.js → issues-panel-BI8ltbSp.js} +1 -1
  34. package/dist/client/assets/issues-panel-BI8ltbSp.js.br +0 -0
  35. package/dist/client/assets/{my-prs-panel-Chwxm0mx.js → my-prs-panel-IXFOzKtD.js} +1 -1
  36. package/dist/client/assets/my-prs-panel-IXFOzKtD.js.br +0 -0
  37. package/dist/client/assets/{nyan-cat-Dk9nHl9L.js → nyan-cat-C7yjtd6B.js} +1 -1
  38. package/dist/client/assets/nyan-cat-C7yjtd6B.js.br +0 -0
  39. package/dist/client/assets/{phone-shell-B25rMhne.js → phone-shell-BKgCyVYW.js} +1 -1
  40. package/dist/client/assets/phone-shell-BKgCyVYW.js.br +0 -0
  41. package/dist/client/assets/{plan-face-Bhzns1KA.js → plan-face-B7rNw8jp.js} +1 -1
  42. package/dist/client/assets/plan-face-B7rNw8jp.js.br +0 -0
  43. package/dist/client/assets/{plan-render-DyByOSfV.js → plan-render-1yGN646h.js} +1 -1
  44. package/dist/client/assets/plan-render-1yGN646h.js.br +0 -0
  45. package/dist/client/assets/{pr-queue-columns-DqJ-T-TQ.js → pr-queue-columns-C095FH1n.js} +1 -1
  46. package/dist/client/assets/pr-queue-columns-C095FH1n.js.br +4 -0
  47. package/dist/client/assets/{radar-panel-CGHUf3d1.js → radar-panel-0aKewE7D.js} +1 -1
  48. package/dist/client/assets/radar-panel-0aKewE7D.js.br +0 -0
  49. package/dist/client/assets/{repo-roots-adder-D8HPnohx.js → repo-roots-adder-CuideeHN.js} +1 -1
  50. package/dist/client/assets/repo-roots-adder-CuideeHN.js.br +0 -0
  51. package/dist/client/assets/{resume-dialog-zZ77a4cj.js → resume-dialog-DnoRx0tM.js} +1 -1
  52. package/dist/client/assets/resume-dialog-DnoRx0tM.js.br +0 -0
  53. package/dist/client/assets/{review-queue-panel-CgWS0Xhg.js → review-queue-panel-CJvgEpmr.js} +1 -1
  54. package/dist/client/assets/review-queue-panel-CJvgEpmr.js.br +0 -0
  55. package/dist/client/assets/{settings-panel-BcH2miJx.js → settings-panel-DjB6LQqd.js} +2 -2
  56. package/dist/client/assets/settings-panel-DjB6LQqd.js.br +0 -0
  57. package/dist/client/assets/{shown-face-DvlE3QdN.js → shown-face-CoHYsqSm.js} +1 -1
  58. package/dist/client/assets/shown-face-CoHYsqSm.js.br +0 -0
  59. package/dist/client/assets/{team-review-panel-DGyXEVPR.js → team-review-panel-CSdj8sXP.js} +1 -1
  60. package/dist/client/assets/team-review-panel-CSdj8sXP.js.br +0 -0
  61. package/dist/client/assets/{trace-panel-Cn1WFmCz.js → trace-panel-VGhL-Fmu.js} +1 -1
  62. package/dist/client/assets/trace-panel-VGhL-Fmu.js.br +0 -0
  63. package/dist/client/assets/{usage-panel-BKDH5fEa.js → usage-panel-B5TtwMBV.js} +1 -1
  64. package/dist/client/assets/usage-panel-B5TtwMBV.js.br +0 -0
  65. package/dist/client/assets/{your-day-tip-D25N6MAZ.js → your-day-tip-waEb2g7F.js} +1 -1
  66. package/dist/client/assets/your-day-tip-waEb2g7F.js.br +0 -0
  67. package/dist/client/index.html +1 -1
  68. package/dist/client/index.html.br +0 -0
  69. package/dist/server/index.js +1 -1
  70. package/package.json +1 -1
  71. package/dist/chunks/agent-home-core-e4wxswLi.js +0 -1
  72. package/dist/chunks/agent-home-zydcIQ-p.js +0 -1
  73. package/dist/chunks/kimi-gSvn6U6i.js +0 -1
  74. package/dist/client/assets/benchmark-panel-D2uu2WIW.js.br +0 -0
  75. package/dist/client/assets/boards-view-CeTwQRRs.js.br +0 -0
  76. package/dist/client/assets/community-panel-BO370oHm.js.br +0 -0
  77. package/dist/client/assets/dialogs-yiFhSbqP.js.br +0 -0
  78. package/dist/client/assets/doc-editor-ui-C4vdenZu.js.br +0 -0
  79. package/dist/client/assets/feature-hint-DZOCtjBo.js.br +0 -0
  80. package/dist/client/assets/first-run-checklist-CX63O_Kv.js.br +0 -0
  81. package/dist/client/assets/hooks-panel-DdECESLF.js.br +0 -0
  82. package/dist/client/assets/index-Dc3WfwfD.js.br +0 -0
  83. package/dist/client/assets/issues-panel-DaBYwQUo.js.br +0 -0
  84. package/dist/client/assets/my-prs-panel-Chwxm0mx.js.br +0 -0
  85. package/dist/client/assets/nyan-cat-Dk9nHl9L.js.br +0 -0
  86. package/dist/client/assets/phone-shell-B25rMhne.js.br +0 -0
  87. package/dist/client/assets/plan-face-Bhzns1KA.js.br +0 -0
  88. package/dist/client/assets/plan-render-DyByOSfV.js.br +0 -0
  89. package/dist/client/assets/pr-queue-columns-DqJ-T-TQ.js.br +0 -0
  90. package/dist/client/assets/radar-panel-CGHUf3d1.js.br +0 -0
  91. package/dist/client/assets/repo-roots-adder-D8HPnohx.js.br +0 -0
  92. package/dist/client/assets/resume-dialog-zZ77a4cj.js.br +0 -0
  93. package/dist/client/assets/review-queue-panel-CgWS0Xhg.js.br +0 -0
  94. package/dist/client/assets/settings-panel-BcH2miJx.js.br +0 -0
  95. package/dist/client/assets/shown-face-DvlE3QdN.js.br +0 -0
  96. package/dist/client/assets/team-review-panel-DGyXEVPR.js.br +0 -0
  97. package/dist/client/assets/trace-panel-Cn1WFmCz.js.br +0 -0
  98. package/dist/client/assets/usage-panel-BKDH5fEa.js.br +0 -0
  99. package/dist/client/assets/your-day-tip-D25N6MAZ.js.br +0 -0
@@ -71,7 +71,7 @@ var OWNED_COMMAND_RUNNERS = {
71
71
  });
72
72
  },
73
73
  agent: async () => {
74
- const { runAgentSetupCli } = await import("../chunks/agent-setup-cli-CsmzaPAu.js");
74
+ const { runAgentSetupCli } = await import("../chunks/agent-setup-cli-CVGIGZ1l.js");
75
75
  return runAgentSetupCli();
76
76
  },
77
77
  settings: async (parsed) => {
@@ -252,7 +252,7 @@ async function runDoctor() {
252
252
  }
253
253
  switchSection("Agents");
254
254
  try {
255
- const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-CPsxcbs1.js");
255
+ const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-PaP74ZJ0.js");
256
256
  const declaredCustomAgents = await readDeclaredCustomAgents();
257
257
  if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
258
258
  setCustomAgents(declaredCustomAgents.declared);
@@ -260,12 +260,12 @@ async function runDoctor() {
260
260
  const { label, path: resolvedPath } = describeAgentResolvability(id);
261
261
  line(`${id} (${label})`, resolvedPath ?? missingAgentText(id));
262
262
  }
263
- const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-CsmzaPAu.js");
263
+ const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-CVGIGZ1l.js");
264
264
  const grokSetup = inspectGrokAgentSetup();
265
265
  line("grok hook setup", `${grokSetup.classification}: ${grokSetup.filePath}`);
266
- const { default: kimi } = await import("../chunks/kimi-gSvn6U6i.js");
267
- const { describeAgentHome } = await import("../chunks/agent-home-zydcIQ-p.js");
268
- const { KIMI_HOME_PROFILE } = await import("../chunks/agent-home-core-e4wxswLi.js");
266
+ const { default: kimi } = await import("../chunks/kimi-2suyHcpQ.js");
267
+ const { describeAgentHome } = await import("../chunks/agent-home-B3ELUBLU.js");
268
+ const { KIMI_HOME_PROFILE } = await import("../chunks/agent-home-core-C7GFm7jA.js");
269
269
  line("kimi home", describeAgentHome(KIMI_HOME_PROFILE, kimi.expectedHooksBlock()));
270
270
  } catch (err) {
271
271
  line("agents", `probe failed: ${firstLine(errorText(err))}`);
@@ -274,7 +274,7 @@ async function runDoctor() {
274
274
  try {
275
275
  const { resolvePackageBin } = await import("../chunks/runtime-paths-CKqE4LXP.js");
276
276
  const { execFileSync } = await import("../chunks/child-process-safe-BKjzSEYd.js");
277
- const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-CsmzaPAu.js");
277
+ const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-CVGIGZ1l.js");
278
278
  const binPath = resolvePackageBin("cc-safety-net", "cc-safety-net");
279
279
  line("Sane YOLO", binPath || "not installed");
280
280
  if (binPath) line("cc-safety-net version", execFileSync(process.execPath, [binPath, "--version"], {
@@ -6,14 +6,14 @@ import { Ht as PLAN_TOOL_NAME, S as InstallFlavor, Vt as PLAN_RESULT_HOOK_EVENT,
6
6
  import { a as rawTextOr, n as isRecord, o as textOr, r as numberOr } from "./coerce-oz_Z_6E7.js";
7
7
  import { n as parseJsonRecord } from "./json-core-If8h-Qgy.js";
8
8
  import { i as saneYoloEnv, r as SANE_YOLO_PATH_ENV, t as CODEX_SANE_YOLO_FLAVOR } from "./sane-yolo-BjUkqIoH.js";
9
- import { n as shellQuote, t as buildHookCommand } from "./hook-command-core-CG5D9iou.js";
10
- import { t as buildAgentEnv } from "./spawn-env-xtzWf6ru.js";
11
- import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-ChYjLvrR.js";
9
+ import { n as shellQuote, t as buildHookCommand } from "./hook-command-core-5G0De2KV.js";
10
+ import { t as buildAgentEnv } from "./spawn-env-xHvxWyus.js";
11
+ import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-CQ_zwSfe.js";
12
12
  import { O as nextBackoffMs, c as loadedJsonValue, d as writeJsonAtomicSync, s as loadJsonStateFileSync, t as appendJsonLine } from "./json-file-AKRVPqG1.js";
13
13
  import { h as isExperimentalBuild, m as compareReleaseVersions, s as glimmervoidHomeDir } from "./config-store-DdRVlBmt.js";
14
- import { n as buildAgentSpawnCommand, r as resolveAgentCommand, t as kimi } from "./kimi-CpTtb7L3.js";
15
- import { c as CODEX_HOME_PROFILE, f as renderCodexHookTables, n as AGENT_HOME_CONFIG_NAME, p as renderCodexHooksBlock } from "./agent-home-core-CIw3YqAH.js";
16
- import { c as releaseAgentHome, i as holdPreparedAgentHome, n as generatedAgentHomePath, s as realAgentHome } from "./agent-home-Bq9uFynU.js";
14
+ import { n as buildAgentSpawnCommand, r as resolveAgentCommand, t as kimi } from "./kimi-Cwlx6TDQ.js";
15
+ import { c as CODEX_HOME_PROFILE, f as renderCodexHookTables, n as AGENT_HOME_CONFIG_NAME, p as renderCodexHooksBlock } from "./agent-home-core-8U0YNRUx.js";
16
+ import { c as releaseAgentHome, i as holdPreparedAgentHome, n as generatedAgentHomePath, s as realAgentHome } from "./agent-home-DGjtaaCS.js";
17
17
  import fs from "node:fs";
18
18
  import path from "node:path";
19
19
  import os from "node:os";
@@ -1 +1 @@
1
- export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-G5T7FKTx.js";
1
+ export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-DafVW4QO.js";
@@ -0,0 +1 @@
1
+ export { t as describeAgentHome } from "./agent-home-DGjtaaCS.js";
@@ -1,7 +1,7 @@
1
1
  import { a as isMissingFileError, r as errorMessage } from "./text-DoirglWV.js";
2
2
  import { n as glimmervoidHomeDir } from "./config-path-core-DUWk0Lui.js";
3
3
  import { p as writeTextAtomicSync } from "./json-file-AKRVPqG1.js";
4
- import { a as AGENT_HOME_SOURCES_NAME, d as planAgentHome, i as AGENT_HOME_IN_USE_LOCK_NAME, n as AGENT_HOME_CONFIG_NAME, r as AGENT_HOME_CONFLICTS_NAME, t as AGENT_HOME_BASE_NAME, u as fileStampKey } from "./agent-home-core-CIw3YqAH.js";
4
+ import { a as AGENT_HOME_SOURCES_NAME, d as planAgentHome, i as AGENT_HOME_IN_USE_LOCK_NAME, n as AGENT_HOME_CONFIG_NAME, r as AGENT_HOME_CONFLICTS_NAME, t as AGENT_HOME_BASE_NAME, u as fileStampKey } from "./agent-home-core-8U0YNRUx.js";
5
5
  import { createRequire } from "node:module";
6
6
  import fs, { closeSync, mkdirSync, openSync, readdirSync, renameSync, rmSync, unlinkSync } from "node:fs";
7
7
  import path from "node:path";
@@ -1,4 +1,4 @@
1
- import { i as KIMI_MCP_CONFIG_NAME, r as KIMI_MCP_BASE_NAME, t as buildHookCommand } from "./hook-command-core-CG5D9iou.js";
1
+ import { i as KIMI_MCP_CONFIG_NAME, r as KIMI_MCP_BASE_NAME, t as buildHookCommand } from "./hook-command-core-5G0De2KV.js";
2
2
  import path from "node:path";
3
3
  //#region session/core/agent-home-core.ts
4
4
  var BLOCK_START = "# >>> glimmervoid hooks (managed, inert outside Glimmervoid) >>>";
@@ -0,0 +1 @@
1
+ export { l as KIMI_HOME_PROFILE } from "./agent-home-core-8U0YNRUx.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-ChYjLvrR.js";
2
+ import { a as classifyGrokHooksFile, o as renderGrokHooksFile, t as grok } from "./grok-CQ_zwSfe.js";
3
3
  import { p as writeTextAtomicSync } from "./json-file-AKRVPqG1.js";
4
4
  import fs from "node:fs";
5
5
  import path from "node:path";
@@ -1,8 +1,8 @@
1
1
  import { r as errorMessage } from "./text-DoirglWV.js";
2
2
  import { o as relayPath } from "./runtime-paths-CYwF658V.js";
3
3
  import { n as isRecord } from "./coerce-oz_Z_6E7.js";
4
- import { t as buildHookCommand } from "./hook-command-core-CG5D9iou.js";
5
- import { t as buildAgentEnv } from "./spawn-env-xtzWf6ru.js";
4
+ import { t as buildHookCommand } from "./hook-command-core-5G0De2KV.js";
5
+ import { t as buildAgentEnv } from "./spawn-env-xHvxWyus.js";
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
8
8
  import os from "node:os";
@@ -19,6 +19,7 @@ function parsePresentedCredential(authorizationHeader) {
19
19
  var MCP_CREDENTIAL_ENV = "GLIMMERVOID_MCP_TOKEN";
20
20
  var MCP_SERVER_NAME = "glimmervoid";
21
21
  var MCP_TOOL_TIMEOUT_SECONDS = 600;
22
+ var CODEX_TOOL_INPUT_SCHEMA_MAX_BYTES = 16384;
22
23
  var KIMI_MCP_CONFIG_NAME = "mcp.json";
23
24
  var KIMI_MCP_BASE_NAME = ".glimmervoid-mcp-base.json";
24
25
  var NO_MCP_LAUNCH = Object.freeze({
@@ -45,7 +46,8 @@ function codexMcpArgs(url) {
45
46
  `url=${JSON.stringify(url)}`,
46
47
  `bearer_token_env_var=${JSON.stringify(MCP_CREDENTIAL_ENV)}`,
47
48
  "default_tools_approval_mode=\"approve\"",
48
- `tool_timeout_sec=${MCP_TOOL_TIMEOUT_SECONDS}`
49
+ `tool_timeout_sec=${MCP_TOOL_TIMEOUT_SECONDS}`,
50
+ `tool_input_schema_max_bytes=${CODEX_TOOL_INPUT_SCHEMA_MAX_BYTES}`
49
51
  ].flatMap((setting) => ["-c", `mcp_servers.${MCP_SERVER_NAME}.${setting}`]);
50
52
  }
51
53
  function credentialOnly() {
@@ -0,0 +1 @@
1
+ export { t as default } from "./kimi-Cwlx6TDQ.js";
@@ -2,10 +2,10 @@ import { o as relayPath } from "./runtime-paths-CYwF658V.js";
2
2
  import { i as ASK_USER_QUESTION_TOOL_NAME } from "./session-DUFWokKF.js";
3
3
  import { i as execFileSync } from "./child-process-safe-BCOoKfxG.js";
4
4
  import { n as KIMI_SANE_YOLO_FLAVOR } from "./sane-yolo-BjUkqIoH.js";
5
- import { i as KIMI_MCP_CONFIG_NAME, o as kimiMcpFiles, r as KIMI_MCP_BASE_NAME } from "./hook-command-core-CG5D9iou.js";
6
- import { t as buildAgentEnv } from "./spawn-env-xtzWf6ru.js";
7
- import { l as KIMI_HOME_PROFILE, m as renderKimiHooksBlock } from "./agent-home-core-CIw3YqAH.js";
8
- import { c as releaseAgentHome, i as holdPreparedAgentHome, n as generatedAgentHomePath, o as prepareScratchAgentHome, s as realAgentHome } from "./agent-home-Bq9uFynU.js";
5
+ import { i as KIMI_MCP_CONFIG_NAME, o as kimiMcpFiles, r as KIMI_MCP_BASE_NAME } from "./hook-command-core-5G0De2KV.js";
6
+ import { t as buildAgentEnv } from "./spawn-env-xHvxWyus.js";
7
+ import { l as KIMI_HOME_PROFILE, m as renderKimiHooksBlock } from "./agent-home-core-8U0YNRUx.js";
8
+ import { c as releaseAgentHome, i as holdPreparedAgentHome, n as generatedAgentHomePath, o as prepareScratchAgentHome, s as realAgentHome } from "./agent-home-DGjtaaCS.js";
9
9
  import fs from "node:fs";
10
10
  import path from "node:path";
11
11
  //#region session/core/spawn-command.ts
@@ -15,13 +15,13 @@ import { n as parseJsonRecord, t as parseJsonOrNull } from "./json-core-If8h-Qgy
15
15
  import { a as saneYoloFiles } from "./sane-yolo-BjUkqIoH.js";
16
16
  import { r as knownWriteHookInput } from "./posthog-read-gate-core-CeSY56AB.js";
17
17
  import { _ as findDependencyCycle, a as filesAfterRetention, c as readPageTitle, d as thumbnailOwnerIdOf, f as thumbnailRecipeFor, g as cappedWarnings, h as layoutBoard, i as describeOverCap, l as shownMimeForFilename, m as escapeMarkup, n as SHOWN_SNIFF_BYTES, o as isShownPageMime, p as boardSvgDocument, r as decideShownKind, s as leavesVisibleRawTextOpen, t as SHOWN_PAGE_ZOOM_BRIDGE, u as thumbnailFilenameOf, v as planSteps$1, y as unitsOf } from "./shown-files-core-Dbzn7Pyl.js";
18
- import { c as parsePresentedCredential, n as shellQuote, s as mcpLaunchFor } from "./hook-command-core-CG5D9iou.js";
18
+ import { c as parsePresentedCredential, n as shellQuote, s as mcpLaunchFor } from "./hook-command-core-5G0De2KV.js";
19
19
  import { C as parseCgroupBytes, D as DEFAULT_MAX_MS, E as DEFAULT_BASE_MS, O as nextBackoffMs, S as memoryReserveBytes, T as parseMemAvailableBytes, _ as createSpawnGate, a as jsonStateLoadError, b as cgroupLimitBytes, c as loadedJsonValue, d as writeJsonAtomicSync, 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-AKRVPqG1.js";
20
20
  import { $ as decideRemoteTelemetryState, B as parseDataClientMessage, F as DEEP_HISTORY_SCROLLBACK_LINES, G as buildAiGenerationEvents, H as TELEMETRY_BATCH_URL, J as buildPersonProperties, K as buildBrowserExceptionProperties, L as LOGGED_FAST_CLOSE_COUNTS, P as isExperimentalSetting, Q as decideIsDevInstall, R as describeDataAttach, St as isSameDirectoryPath, U as TELEMETRY_FLAGS_URL, V as FIRST_RUN_NOTICE, W as adapterBucket, X as claudeAccountUuidOf, Y as classifySessionExit, Z as codexUserIdOf, _t as sessionIdFromBranch, a as ensureProjectIds, at as DashboardTelemetryReport, b as validateSettingsBlock, bt as canonicalizePath, ct as TelemetryState, dt as stableConfigKey, et as decideTelemetryConsent, f as DEFAULT_TIMER_FNS, gt as planWorktreeGc, ht as planBranchGc, i as createConfigStore, it as resolveProjectToken, j as valueAtPath, mt as matchedPrefix, n as DEFAULT_CONFIG, nt as nodeMajorVersion, o as generateProjectId, ot as PendingCrashReport, p as unrefTimer, pt as DEFAULT_BRANCH_GC_PREFIXES, q as buildExceptionProperties, rt as parsePosthogReleaseId, s as glimmervoidHomeDir$1, st as TELEMETRY_EVENT_SCHEMAS, t as ABORT_CONFIG_SAVE, tt as exceptionFingerprint, v as mergeSettingsBlock, vt as usablePrefixes, x as SETTINGS_INDEX, xt as comparableDirectoryPath, y as settingsBlockSpecFor, yt as worktreeIntegrationTips, z as parseDataAttach } from "./config-store-DdRVlBmt.js";
21
- import { i as resolveArgvCommandMatches } from "./kimi-CpTtb7L3.js";
22
- import { $ as grokHomes, A as decideUploadType, At as generateToken, B as containmentRefusalReason, Bt as readStoredHooks, C as parseRegistryLatest, Ct as shouldReplace, D as openContainedFile, Dt as HOOK_EVENTS, E as shortSha$1, Et as claudeCode, F as planUploadRetention, Ft as agentHookGroupOf, G as codexFallbackRoots, Gt as sweepOrphanedHostScratch, H as planContiguousRead, Ht as upsertHook, I as MAX_TRANSCRIPT_READ_BYTES, It as appendUserHooks, J as codexSessionIdFromPath, Jt as recordSweptPath, K as codexHomes, Kt as appendRemovalRecord, L as TRACE_TAIL_SCAN_BYTES, Lt as hooksForProject, M as framePathPaste, Mt as writeSessionSettings, N as imageMimeForUploadFilename, Nt as HOOK_EVENT_CATALOG, O as MAX_UPLOAD_BYTES, Ot as PLAN_HOLD_RELEASE_MS, P as isSafePathSegment, Pt as ID_RE, Q as expandTilde, R as committedOffsetFromTraceTailOrNull, Rt as normalizeHook, S as parseRegistryDeprecation, St as parseUsageLine, T as pickNewestPublished, Tt as vendorUsageEntry, U as resumeOffsetFrom, Ut as HOOK_TOOLS, V as isOversizedPartialLine, Vt as removeHook, W as withCommittedOffset, Wt as makeHostScratchDirectory, X as decideFileRead, Y as continuationDelayMs, Yt as removalsJournalPath, Z as dedupeCodexFiles, _ as decideInstallFlavor, _t as foldReplacementIntoGenerationRollup, a as describeAgentResolvability, at as scopedClaudeRoots, b as normalizeSha, bt as mergeGenerationRollups, c as isKnownAgentId, ct as shouldPersistWarehouse, d as resolveAdapter, dt as parseKimiUsageLine, et as isUsageFile, f as setCustomAgents, ft as addEntryToTotals, g as NODE_PTY_INSTALL_SCRIPT_FLAG, gt as foldEntryIntoGenerationRollup, h as requestCodexAppServer, ht as expandAdvisorIterations, i as customAgentFingerprint, it as resolveProjectsDirs, j as exceedsUploadCap, jt as sweepOrphans, k as buildUploadFilename, kt as buildHookSettings, l as listAgentIds, lt as splitLines, m as readHostCodexVersion, mt as emptyTotals, n as cachedAgentResolvability, nt as passOutcome, o as getAdapter, ot as sessionsRootCandidates, p as codex, pt as dedupKeys, q as codexRootCandidates, qt as appendRemovalRecordSync, r as commandFor, rt as projectDirCandidates, s as hookProfileOf, st as shouldEvaluateDespiteIoFailures, t as DEFAULT_AGENT_ID$1, tt as kimiHomes, u as resetCommandCache, ut as kimiDedupIdentity, v as decideUpdateStatus, vt as identityFromRelPath, w as parseResolvedSha, wt as totalTokensOf$1, x as normalizeUpdateChannel, xt as parseJsonLine, y as isCheckFresh, yt as isWithinGenerationRecencyWindow, z as completeLineBytes, zt as rawStoredHooks } from "./adapters-G5T7FKTx.js";
23
- import { c as CODEX_HOME_PROFILE, l as KIMI_HOME_PROFILE } from "./agent-home-core-CIw3YqAH.js";
24
- import { d as releaseSessionLock, f as sessionIdOfLockFile, l as releaseUnheldAgentHomeSecrets, n as generatedAgentHomePath, p as trashSessionTempFolderOnceUnheld, s as realAgentHome, u as createHeldSessionTempFolder } from "./agent-home-Bq9uFynU.js";
21
+ import { i as resolveArgvCommandMatches } from "./kimi-Cwlx6TDQ.js";
22
+ import { $ as grokHomes, A as decideUploadType, At as generateToken, B as containmentRefusalReason, Bt as readStoredHooks, C as parseRegistryLatest, Ct as shouldReplace, D as openContainedFile, Dt as HOOK_EVENTS, E as shortSha$1, Et as claudeCode, F as planUploadRetention, Ft as agentHookGroupOf, G as codexFallbackRoots, Gt as sweepOrphanedHostScratch, H as planContiguousRead, Ht as upsertHook, I as MAX_TRANSCRIPT_READ_BYTES, It as appendUserHooks, J as codexSessionIdFromPath, Jt as recordSweptPath, K as codexHomes, Kt as appendRemovalRecord, L as TRACE_TAIL_SCAN_BYTES, Lt as hooksForProject, M as framePathPaste, Mt as writeSessionSettings, N as imageMimeForUploadFilename, Nt as HOOK_EVENT_CATALOG, O as MAX_UPLOAD_BYTES, Ot as PLAN_HOLD_RELEASE_MS, P as isSafePathSegment, Pt as ID_RE, Q as expandTilde, R as committedOffsetFromTraceTailOrNull, Rt as normalizeHook, S as parseRegistryDeprecation, St as parseUsageLine, T as pickNewestPublished, Tt as vendorUsageEntry, U as resumeOffsetFrom, Ut as HOOK_TOOLS, V as isOversizedPartialLine, Vt as removeHook, W as withCommittedOffset, Wt as makeHostScratchDirectory, X as decideFileRead, Y as continuationDelayMs, Yt as removalsJournalPath, Z as dedupeCodexFiles, _ as decideInstallFlavor, _t as foldReplacementIntoGenerationRollup, a as describeAgentResolvability, at as scopedClaudeRoots, b as normalizeSha, bt as mergeGenerationRollups, c as isKnownAgentId, ct as shouldPersistWarehouse, d as resolveAdapter, dt as parseKimiUsageLine, et as isUsageFile, f as setCustomAgents, ft as addEntryToTotals, g as NODE_PTY_INSTALL_SCRIPT_FLAG, gt as foldEntryIntoGenerationRollup, h as requestCodexAppServer, ht as expandAdvisorIterations, i as customAgentFingerprint, it as resolveProjectsDirs, j as exceedsUploadCap, jt as sweepOrphans, k as buildUploadFilename, kt as buildHookSettings, l as listAgentIds, lt as splitLines, m as readHostCodexVersion, mt as emptyTotals, n as cachedAgentResolvability, nt as passOutcome, o as getAdapter, ot as sessionsRootCandidates, p as codex, pt as dedupKeys, q as codexRootCandidates, qt as appendRemovalRecordSync, r as commandFor, rt as projectDirCandidates, s as hookProfileOf, st as shouldEvaluateDespiteIoFailures, t as DEFAULT_AGENT_ID$1, tt as kimiHomes, u as resetCommandCache, ut as kimiDedupIdentity, v as decideUpdateStatus, vt as identityFromRelPath, w as parseResolvedSha, wt as totalTokensOf$1, x as normalizeUpdateChannel, xt as parseJsonLine, y as isCheckFresh, yt as isWithinGenerationRecencyWindow, z as completeLineBytes, zt as rawStoredHooks } from "./adapters-DafVW4QO.js";
23
+ import { c as CODEX_HOME_PROFILE, l as KIMI_HOME_PROFILE } from "./agent-home-core-8U0YNRUx.js";
24
+ import { d as releaseSessionLock, f as sessionIdOfLockFile, l as releaseUnheldAgentHomeSecrets, n as generatedAgentHomePath, p as trashSessionTempFolderOnceUnheld, s as realAgentHome, u as createHeldSessionTempFolder } from "./agent-home-DGjtaaCS.js";
25
25
  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";
26
26
  import { a as defaultPairingsPath, c as decideDeviceAuth, i as createSeenStore, l as deviceNameFromUserAgent, n as configSiblingPath, o as defaultSeenPath, r as createPairingsStore, s as DEFAULT_DEVICE_MAX_AGE_MS, u as hashSecret } from "./pairings-store-OtnvMpSP.js";
27
27
  import { g as runGit, h as runGh, i as createCommitSessions, m as runCommand, p as gitCommandFailure, t as COMMIT_SESSIONS_FOLDER_NAME } from "./commit-sessions-DpOoG4ys.js";
@@ -793,9 +793,37 @@ var BoardField = z.string().min(1).max(200).describe("The board, by id or title"
793
793
  function definedEntries(source, keys) {
794
794
  return Object.fromEntries(keys.filter((key) => source[key] !== void 0).map((key) => [key, source[key]]));
795
795
  }
796
- function routeTo(verb, keys = []) {
796
+ var READS = {
797
+ readOnly: true,
798
+ destructive: false,
799
+ idempotent: true,
800
+ openWorld: false
801
+ };
802
+ var WRITES = {
803
+ readOnly: false,
804
+ destructive: false,
805
+ idempotent: false,
806
+ openWorld: false
807
+ };
808
+ var REWRITES = {
809
+ readOnly: false,
810
+ destructive: false,
811
+ idempotent: true,
812
+ openWorld: false
813
+ };
814
+ var DESTROYS = {
815
+ readOnly: false,
816
+ destructive: true,
817
+ idempotent: false,
818
+ openWorld: false
819
+ };
820
+ function routeTo(verb, keys, { required = [], hints, presenter }) {
797
821
  return {
798
822
  verb,
823
+ presenter,
824
+ required,
825
+ accepts: keys,
826
+ hints,
799
827
  toPayload: (toolArguments) => definedEntries(toolArguments, keys)
800
828
  };
801
829
  }
@@ -812,10 +840,13 @@ function editPayload(toolArguments, context) {
812
840
  if (typeof toolArguments.path !== "string") return {};
813
841
  return { path: context.resolveSessionPath(toolArguments.path) };
814
842
  }
815
- function whiteboardRoute(sub, keys, presenter = "agent-reply") {
843
+ function whiteboardRoute(sub, keys, { required = [], hints, presenter = "agent-reply" }) {
816
844
  return {
817
845
  verb: "whiteboard",
818
846
  presenter,
847
+ required,
848
+ accepts: keys,
849
+ hints,
819
850
  toPayload: (toolArguments) => ({
820
851
  sub,
821
852
  ...definedEntries(toolArguments, keys)
@@ -826,6 +857,9 @@ function boardPictureRoute() {
826
857
  return {
827
858
  verb: "whiteboard",
828
859
  presenter: "board-picture",
860
+ required: ["board"],
861
+ accepts: ["board"],
862
+ hints: READS,
829
863
  toPayload: (toolArguments) => ({
830
864
  sub: "get",
831
865
  peek: true,
@@ -837,11 +871,6 @@ var SESSION_TOOL = {
837
871
  name: "session",
838
872
  title: "Glimmervoid sessions",
839
873
  description: "Spawn, message and manage Glimmervoid sessions. spawn starts a new supervised session with its own dashboard card and worktree for work that edits files or runs long; prefer it to an in-process subagent, which stays fine for a quick read-only lookup. send and read talk with a spawned child (or, from a child, its parent); answer replies to a question a child asked; close ends a child; board lists every live session; edit opens a file for the operator to write or correct, such as a plan or a prompt; limits reports what this session may do.",
840
- annotations: {
841
- readOnlyHint: false,
842
- destructiveHint: true,
843
- openWorldHint: false
844
- },
845
874
  loadsUpfront: true,
846
875
  fields: {
847
876
  prompt: AgentSpawnRequest.shape.prompt.optional().describe("spawn: the task for the new session"),
@@ -855,41 +884,53 @@ var SESSION_TOOL = {
855
884
  path: AgentEditRequest.shape.path.optional().describe("edit: the file, absolute or relative to this session's directory")
856
885
  },
857
886
  actions: {
858
- spawn: {
859
- ...routeTo("spawn", [
860
- "prompt",
861
- "name",
862
- "agent"
863
- ]),
887
+ spawn: routeTo("spawn", [
888
+ "prompt",
889
+ "name",
890
+ "agent"
891
+ ], {
892
+ required: ["prompt"],
893
+ hints: WRITES,
864
894
  presenter: "spawn-reply"
865
- },
895
+ }),
866
896
  send: {
867
897
  verb: "send",
898
+ required: ["text"],
899
+ accepts: ["child", "text"],
900
+ hints: WRITES,
868
901
  toPayload: sendPayload
869
902
  },
870
- read: routeTo("read", ["child"]),
871
- close: routeTo("close", ["child", "discard"]),
903
+ read: routeTo("read", ["child"], { hints: WRITES }),
904
+ close: routeTo("close", ["child", "discard"], {
905
+ required: ["child"],
906
+ hints: DESTROYS
907
+ }),
872
908
  answer: {
873
909
  verb: "answer",
910
+ required: ["child"],
911
+ accepts: [
912
+ "child",
913
+ "answers",
914
+ "toOperator"
915
+ ],
916
+ hints: WRITES,
874
917
  toPayload: answerPayload
875
918
  },
876
- board: routeTo("board"),
919
+ board: routeTo("board", [], { hints: READS }),
877
920
  edit: {
878
921
  verb: "edit",
922
+ required: ["path"],
923
+ accepts: ["path"],
924
+ hints: WRITES,
879
925
  toPayload: editPayload
880
926
  },
881
- limits: routeTo("limits")
927
+ limits: routeTo("limits", [], { hints: READS })
882
928
  }
883
929
  };
884
930
  var WHITEBOARD_TOOL = {
885
931
  name: "whiteboard",
886
932
  title: "Glimmervoid whiteboards",
887
933
  description: "Draw diagrams, architecture maps and plans on a shared whiteboard the operator sees and edits on the dashboard; prefer it to a diagram in chat. new creates a board, list names them, get reads one with what changed since this session last read it, view returns a picture of it as the operator sees it, put applies element ops (add, set, remove; a unit element is a plan step); get and put also return the plan steps in build order and any layout warnings to fix, connect and disconnect follow a board's changes, resolve closes a note, delete removes a board this session created.",
888
- annotations: {
889
- readOnlyHint: false,
890
- destructiveHint: true,
891
- openWorldHint: false
892
- },
893
934
  loadsUpfront: true,
894
935
  fields: {
895
936
  board: BoardField.optional(),
@@ -900,103 +941,131 @@ var WHITEBOARD_TOOL = {
900
941
  review: z.boolean().optional().describe("get: include the plan review against the code session")
901
942
  },
902
943
  actions: {
903
- list: whiteboardRoute("list", []),
904
- new: whiteboardRoute("new", ["title"], "board-without-command-guide"),
944
+ list: whiteboardRoute("list", [], { hints: READS }),
945
+ new: whiteboardRoute("new", ["title"], {
946
+ required: ["title"],
947
+ hints: WRITES,
948
+ presenter: "board-without-command-guide"
949
+ }),
905
950
  get: whiteboardRoute("get", [
906
951
  "board",
907
952
  "peek",
908
953
  "review"
909
- ], "board-with-reading"),
954
+ ], {
955
+ required: ["board"],
956
+ hints: REWRITES,
957
+ presenter: "board-with-reading"
958
+ }),
910
959
  view: boardPictureRoute(),
911
- put: whiteboardRoute("put", ["board", "ops"], "board-with-reading"),
912
- connect: whiteboardRoute("connect", ["board"], "board-without-command-guide"),
913
- disconnect: whiteboardRoute("disconnect", ["board"]),
914
- resolve: whiteboardRoute("resolve", ["board", "note"]),
915
- delete: whiteboardRoute("delete", ["board"])
960
+ put: whiteboardRoute("put", ["board", "ops"], {
961
+ required: ["board", "ops"],
962
+ hints: DESTROYS,
963
+ presenter: "board-with-reading"
964
+ }),
965
+ connect: whiteboardRoute("connect", ["board"], {
966
+ required: ["board"],
967
+ hints: REWRITES,
968
+ presenter: "board-without-command-guide"
969
+ }),
970
+ disconnect: whiteboardRoute("disconnect", ["board"], {
971
+ required: ["board"],
972
+ hints: REWRITES
973
+ }),
974
+ resolve: whiteboardRoute("resolve", ["board", "note"], {
975
+ required: ["board", "note"],
976
+ hints: REWRITES
977
+ }),
978
+ delete: whiteboardRoute("delete", ["board"], {
979
+ required: ["board"],
980
+ hints: {
981
+ ...DESTROYS,
982
+ idempotent: true
983
+ }
984
+ })
916
985
  }
917
986
  };
918
987
  var REVIEW_TOOL = {
919
988
  name: "review",
920
989
  title: "Glimmervoid pull request reviews",
921
990
  description: "Team pull request reviews. review queues a review of a pull request whose draft waits in the Reviews tab for the operator to post; reviews lists queued and finished reviews, or one review's detail; prs lists the operator's own open pull requests; link-pr links a pull request to this session's card.",
922
- annotations: {
923
- readOnlyHint: false,
924
- destructiveHint: false,
925
- openWorldHint: true
926
- },
927
991
  loadsUpfront: false,
928
992
  fields: { pr: AgentPullRequestRequest.shape.pr.optional().describe("A GitHub pull request url or owner/repo#number") },
929
993
  actions: {
930
- review: routeTo("review", ["pr"]),
931
- reviews: routeTo("reviews", ["pr"]),
932
- prs: routeTo("prs"),
933
- "link-pr": routeTo("link-pr", ["pr"])
994
+ review: routeTo("review", ["pr"], {
995
+ required: ["pr"],
996
+ hints: {
997
+ ...WRITES,
998
+ openWorld: true
999
+ }
1000
+ }),
1001
+ reviews: routeTo("reviews", ["pr"], { hints: READS }),
1002
+ prs: routeTo("prs", [], { hints: {
1003
+ ...READS,
1004
+ openWorld: true
1005
+ } }),
1006
+ "link-pr": routeTo("link-pr", ["pr"], {
1007
+ required: ["pr"],
1008
+ hints: REWRITES
1009
+ })
934
1010
  }
935
1011
  };
936
1012
  var PUSH_TOOL = {
937
1013
  name: "push",
938
1014
  title: "Glimmervoid push",
939
1015
  description: "Land this session's commits on the integration branch and push it. Use it instead of git push when a plain push is refused.",
940
- annotations: {
941
- readOnlyHint: false,
942
- destructiveHint: false,
943
- openWorldHint: true
944
- },
945
1016
  loadsUpfront: false,
946
1017
  fields: {},
947
- actions: { push: routeTo("push") }
1018
+ actions: { push: routeTo("push", [], { hints: {
1019
+ ...DESTROYS,
1020
+ openWorld: true
1021
+ } }) }
948
1022
  };
949
1023
  var ATTENTION_TOOL = {
950
1024
  name: "attention",
951
1025
  title: "Glimmervoid attention",
952
1026
  description: "Ask the operator for attention with a short note shown on the dashboard and in notifications, when this session needs a decision but is not stopping.",
953
- annotations: {
954
- readOnlyHint: false,
955
- destructiveHint: false,
956
- openWorldHint: false
957
- },
958
1027
  loadsUpfront: false,
959
1028
  fields: { note: AgentAttentionRequest.shape.note.optional().describe("What the operator should look at") },
960
- actions: { attention: routeTo("attention", ["note"]) }
1029
+ actions: { attention: routeTo("attention", ["note"], { hints: {
1030
+ ...WRITES,
1031
+ openWorld: true
1032
+ } }) }
961
1033
  };
962
1034
  var SHOW_TOOL = {
963
1035
  name: "show",
964
1036
  title: "Glimmervoid show",
965
1037
  description: "Put an image, video, PDF or HTML page on this session's dashboard card so the operator can see it, such as a screenshot, a rendered chart or a report. Glimmervoid reads the file by its path, so it must be on this machine and under 200 MB.",
966
- annotations: {
967
- readOnlyHint: false,
968
- destructiveHint: false,
969
- openWorldHint: false
970
- },
971
1038
  loadsUpfront: false,
972
1039
  fields: {
973
1040
  path: z.string().min(1).max(4096).describe("The file, absolute or relative to this session's directory"),
974
1041
  caption: z.string().min(1).max(500).optional().describe("A short line shown with the file")
975
1042
  },
976
- actions: { show: {
977
- ...routeTo("show", ["path", "caption"]),
1043
+ actions: { show: routeTo("show", ["path", "caption"], {
1044
+ required: ["path"],
1045
+ hints: WRITES,
978
1046
  presenter: "show-by-path"
979
- } }
1047
+ }) }
980
1048
  };
981
1049
  var SETTINGS_TOOL = {
982
1050
  name: "settings",
983
1051
  title: "Glimmervoid settings",
984
1052
  description: "Read Glimmervoid's own settings without opening config.json. list names every setting; get reads one by its dotted path.",
985
- annotations: {
986
- readOnlyHint: true,
987
- destructiveHint: false,
988
- openWorldHint: false
989
- },
990
1053
  loadsUpfront: false,
991
1054
  fields: { path: AgentSettingsRequest.shape.path.describe("get: the dotted setting path") },
992
1055
  actions: {
993
1056
  list: {
994
1057
  verb: "settings",
995
1058
  presenter: "settings-list",
1059
+ required: [],
1060
+ accepts: [],
1061
+ hints: READS,
996
1062
  toPayload: () => ({ command: "list" })
997
1063
  },
998
1064
  get: {
999
1065
  verb: "settings",
1066
+ required: ["path"],
1067
+ accepts: ["path"],
1068
+ hints: READS,
1000
1069
  toPayload: (toolArguments) => ({
1001
1070
  command: "get",
1002
1071
  ...definedEntries(toolArguments, ["path"])
@@ -1024,17 +1093,40 @@ function inputSchemaFor(tool, actionNames) {
1024
1093
  ...tool.fields
1025
1094
  });
1026
1095
  }
1096
+ function combinedAnnotations(tool, actionNames) {
1097
+ const hints = actionNames.flatMap((actionName) => tool.actions[actionName]?.hints ?? []);
1098
+ return {
1099
+ readOnlyHint: hints.every((hint) => hint.readOnly),
1100
+ destructiveHint: hints.some((hint) => hint.destructive),
1101
+ idempotentHint: hints.every((hint) => hint.idempotent),
1102
+ openWorldHint: hints.some((hint) => hint.openWorld)
1103
+ };
1104
+ }
1105
+ function namedList(names) {
1106
+ if (names.length <= 1) return names.join("");
1107
+ return `${names.slice(0, -1).join(", ")} and ${names.at(-1)}`;
1108
+ }
1109
+ var CHILD_TARGETING_ACTIONS = /* @__PURE__ */ new Set(["send", "read"]);
1110
+ function argumentProblem(callName, route, toolArguments, context) {
1111
+ if (!context.ownsSpawnedSessions && CHILD_TARGETING_ACTIONS.has(route.verb) && toolArguments.child !== void 0) return "this session has no spawned sessions: send and read reach its parent, so drop child";
1112
+ const strayKeys = Object.keys(toolArguments).filter((key) => key !== "action" && toolArguments[key] !== void 0).filter((key) => !route.accepts.includes(key));
1113
+ if (strayKeys.length > 0) return `${callName} ${route.accepts.length === 0 ? "takes no other fields" : `takes ${namedList(route.accepts)}`}, so drop ${namedList(strayKeys)}`;
1114
+ const missingKeys = (route.verb === "send" && context.ownsSpawnedSessions ? ["child", ...route.required] : route.required).filter((key) => toolArguments[key] === void 0);
1115
+ if (missingKeys.length > 0) return `${callName} needs ${namedList(missingKeys)}`;
1116
+ return null;
1117
+ }
1027
1118
  function routeToolCall(tool, toolArguments, context) {
1028
1119
  const actionNames = Object.keys(tool.actions);
1029
1120
  const requestedAction = actionNames.length === 1 ? actionNames[0] : toolArguments.action;
1030
- if (typeof requestedAction !== "string" || !Object.hasOwn(tool.actions, requestedAction)) return {
1121
+ const route = typeof requestedAction === "string" && Object.hasOwn(tool.actions, requestedAction) ? tool.actions[requestedAction] : void 0;
1122
+ if (route === void 0 || typeof requestedAction !== "string") return {
1031
1123
  ok: false,
1032
- error: `${tool.name} takes action ${actionNames.join(", ")}`
1124
+ error: `${tool.name} takes action ${namedList(actionNames)}`
1033
1125
  };
1034
- const route = tool.actions[requestedAction];
1035
- if (route === void 0) return {
1126
+ const problem = argumentProblem(actionNames.length === 1 ? tool.name : `${tool.name} ${requestedAction}`, route, toolArguments, context);
1127
+ if (problem !== null) return {
1036
1128
  ok: false,
1037
- error: `${tool.name} takes action ${actionNames.join(", ")}`
1129
+ error: problem
1038
1130
  };
1039
1131
  return {
1040
1132
  ok: true,
@@ -1055,8 +1147,11 @@ function refuse$1(res) {
1055
1147
  error: REFUSAL_REASON
1056
1148
  });
1057
1149
  }
1058
- function callContextFor(session) {
1059
- return { resolveSessionPath: (requestedPath) => path.resolve(session.effectiveCwd(), requestedPath) };
1150
+ function callContextFor(session, agentApi) {
1151
+ return {
1152
+ resolveSessionPath: (requestedPath) => path.resolve(session.effectiveCwd(), requestedPath),
1153
+ ownsSpawnedSessions: agentApi.refuseRole(session, "close") === null
1154
+ };
1060
1155
  }
1061
1156
  function reshapedReply(reshape) {
1062
1157
  return async ({ session, agentApi }, verb, payload) => {
@@ -1092,10 +1187,10 @@ function registerGroupedTool(server, tool, session, agentApi, getShownFiles) {
1092
1187
  title: tool.title,
1093
1188
  description: tool.description,
1094
1189
  inputSchema: inputSchemaFor(tool, actionNames),
1095
- annotations: tool.annotations,
1190
+ annotations: combinedAnnotations(tool, actionNames),
1096
1191
  _meta: { [LOADS_UPFRONT_META_KEY]: tool.loadsUpfront }
1097
1192
  }, async (toolArguments) => {
1098
- const route = routeToolCall(tool, toolArguments, callContextFor(session));
1193
+ const route = routeToolCall(tool, toolArguments, callContextFor(session, agentApi));
1099
1194
  if (!route.ok) return toolErrorResult(route.error);
1100
1195
  return toolResultOf(await PRESENTERS[route.presenter]({
1101
1196
  session,
@@ -1108,7 +1203,10 @@ function buildSessionServer(session, agentApi, getShownFiles) {
1108
1203
  const server = new McpServer({
1109
1204
  name: SERVER_NAME,
1110
1205
  version: TOOL_SURFACE_VERSION
1111
- }, { instructions: SERVER_INSTRUCTIONS });
1206
+ }, {
1207
+ instructions: SERVER_INSTRUCTIONS,
1208
+ capabilities: { tools: { listChanged: false } }
1209
+ });
1112
1210
  for (const tool of GROUPED_TOOLS) registerGroupedTool(server, tool, session, agentApi, getShownFiles);
1113
1211
  return server;
1114
1212
  }
@@ -1131,7 +1229,7 @@ function mountAgentMcp(app, dependencies) {
1131
1229
  }, { onerror: (error) => dependencies.logger.warn(`[mcp] ${error.message}`) });
1132
1230
  const nodeHandler = toNodeHandler(handler, { onerror: (error) => dependencies.logger.warn(`[mcp] ${error.message}`) });
1133
1231
  const answer = (req, res) => {
1134
- const session = authenticatedSession(req, dependencies);
1232
+ const session = dependencies.isOriginAllowed(req) ? authenticatedSession(req, dependencies) : null;
1135
1233
  if (!session || !dependencies.getAgentApi()) {
1136
1234
  req.resume();
1137
1235
  refuse$1(res);
@@ -2132,7 +2230,8 @@ function mountAgentIngressRoutes(app, dependencies) {
2132
2230
  getAgentApi,
2133
2231
  getShownFiles,
2134
2232
  isLoopback: isLoopbackRequest,
2135
- logger
2233
+ logger,
2234
+ isOriginAllowed: (req) => decideOriginAllowed(req.headers.origin, [], { listenerPorts: req.socket.localPort ?? [] })
2136
2235
  });
2137
2236
  app.post("/agent/:glimmervoidId/show", (req, res) => {
2138
2237
  const agentApi = getAgentApi();
@@ -1,7 +1,7 @@
1
1
  import { A as SIGN_URL_ENV, r as AGENT_URL_ENV } from "./session-DUFWokKF.js";
2
2
  import { t as HOOK_URL_ENV } from "./hook-relay-core-DA_bz2KA.js";
3
3
  import { i as saneYoloEnv, r as SANE_YOLO_PATH_ENV } from "./sane-yolo-BjUkqIoH.js";
4
- import { a as MCP_CREDENTIAL_ENV } from "./hook-command-core-CG5D9iou.js";
4
+ import { a as MCP_CREDENTIAL_ENV } from "./hook-command-core-5G0De2KV.js";
5
5
  import path from "node:path";
6
6
  //#region session/core/spawn-env.ts
7
7
  var GLIMMERVOID_SCRUB_KEYS = [
@@ -1 +1 @@
1
- import"./updates-view-core-C1nXfl7Z.js";import{n as e,r as t,s as n}from"./dom-helpers-qjWTsLGI.js";import{Mi as r,Ni as i,Pi as a}from"./index-Dc3WfwfD.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,t,r){let a=n(`button`,`bench-action-button`,o[t]);return a.type=`button`,a.disabled=r,a.addEventListener(`click`,()=>i(e.id,t)),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 t=n(`td`,`bench-score`,c(e?.recall??null));return e&&e.invalid>0&&(t.title=`${e.invalid} invalid or failed cell(s)`),e&&e.degraded>0&&(t.dataset.degraded=`true`),t}function p(e){let t=e.armIds.filter(t=>t!==e.baselineArm),r=n(`table`,`bench-table`),i=n(`tr`);i.append(n(`th`,null,`Case`),...e.armIds.map(t=>n(`th`,null,t===e.baselineArm?`${t} (baseline)`:t))),i.append(...t.map(e=>n(`th`,null,`${e} vs baseline`))),r.append(i);for(let i of e.rows){let a=n(`tr`);a.append(n(`td`,`bench-case`,i.caseId),...e.armIds.map(e=>f(i.arms[e]))),a.append(...t.map(e=>n(`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=n(`tr`,`bench-total`);o.append(n(`td`,`bench-case`,`Paired recall`),...e.armIds.map(t=>f(e.totals[t]))),r.append(o);for(let t of a){let i=n(`tr`,`bench-total`);i.append(n(`td`,`bench-case`,`Recall, ${t}`),...e.armIds.map(r=>n(`td`,`bench-score`,c(e.totals[r]?.recallByTag[t]??null)))),r.append(i)}return r}function m(e,i){let{isServerConnected:a,pendingActionBySuite:o,outcomeBySuite:s}=r(),c=n(`div`,`bench-suite`),l=e.inFlight?.suiteId===i.id,f=!!e.inFlight&&!l,m=o.has(i.id)||!a,h=n(`div`,`bench-summary`);h.append(n(`span`,`bench-suite-title`,i.title),t(`bench`,i.caseCount===1?`case`:`cases`,String(i.caseCount)),t(`bench`,i.candidateCount===1?`candidate`:`candidates`,String(i.candidateCount)),t(`bench`,`arms`,String(i.armIds.length))),c.append(h);let g=n(`div`,`bench-controls`),_=e.configured===!0&&i.error===null;g.append(u(i,`mine`,!_||m||l),u(i,`run`,!_||m||l||f||i.caseCount===0),u(i,`cancel`,m||!l));let v=n(`span`,`bench-status`,(a?``:`Not connected to the server. Reconnecting.`)||d(e,i)||s.get(i.id)||``);if(v.setAttribute(`role`,`status`),g.append(v),c.append(g),i.error)return c.append(n(`p`,`bench-error`,i.error)),c;let y=i.latestReport;return y?(c.append(n(`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(n(`p`,`bench-empty`,i.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:t}=r(),i=e(`bench`,`Benchmarks`,`Suites from the benchmarks folder of the Glimmervoid home, one run at a time.`);if(s.append(i),!t)s.append(n(`p`,`bench-empty`,`Waiting for the server.`));else if(!t.configured)s.append(n(`p`,`bench-empty`,t.reason||`Benchmarks are off.`));else if(t.suites.length===0)s.append(n(`p`,`bench-empty`,`No suites yet. Create a folder holding suite.json under benchmarks in the Glimmervoid home.`));else for(let e of t.suites)s.append(m(t,e))}function g(e){s||(s=n(`div`,`bench-content`),e.append(s),a(h),h())}var _={mount:g};export{_ as view};
1
+ import"./updates-view-core-C1nXfl7Z.js";import{n as e,r as t,s as n}from"./dom-helpers-qjWTsLGI.js";import{Mi as r,Ni as i,Pi as a}from"./index-D0-5ZoRG.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,t,r){let a=n(`button`,`bench-action-button`,o[t]);return a.type=`button`,a.disabled=r,a.addEventListener(`click`,()=>i(e.id,t)),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 t=n(`td`,`bench-score`,c(e?.recall??null));return e&&e.invalid>0&&(t.title=`${e.invalid} invalid or failed cell(s)`),e&&e.degraded>0&&(t.dataset.degraded=`true`),t}function p(e){let t=e.armIds.filter(t=>t!==e.baselineArm),r=n(`table`,`bench-table`),i=n(`tr`);i.append(n(`th`,null,`Case`),...e.armIds.map(t=>n(`th`,null,t===e.baselineArm?`${t} (baseline)`:t))),i.append(...t.map(e=>n(`th`,null,`${e} vs baseline`))),r.append(i);for(let i of e.rows){let a=n(`tr`);a.append(n(`td`,`bench-case`,i.caseId),...e.armIds.map(e=>f(i.arms[e]))),a.append(...t.map(e=>n(`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=n(`tr`,`bench-total`);o.append(n(`td`,`bench-case`,`Paired recall`),...e.armIds.map(t=>f(e.totals[t]))),r.append(o);for(let t of a){let i=n(`tr`,`bench-total`);i.append(n(`td`,`bench-case`,`Recall, ${t}`),...e.armIds.map(r=>n(`td`,`bench-score`,c(e.totals[r]?.recallByTag[t]??null)))),r.append(i)}return r}function m(e,i){let{isServerConnected:a,pendingActionBySuite:o,outcomeBySuite:s}=r(),c=n(`div`,`bench-suite`),l=e.inFlight?.suiteId===i.id,f=!!e.inFlight&&!l,m=o.has(i.id)||!a,h=n(`div`,`bench-summary`);h.append(n(`span`,`bench-suite-title`,i.title),t(`bench`,i.caseCount===1?`case`:`cases`,String(i.caseCount)),t(`bench`,i.candidateCount===1?`candidate`:`candidates`,String(i.candidateCount)),t(`bench`,`arms`,String(i.armIds.length))),c.append(h);let g=n(`div`,`bench-controls`),_=e.configured===!0&&i.error===null;g.append(u(i,`mine`,!_||m||l),u(i,`run`,!_||m||l||f||i.caseCount===0),u(i,`cancel`,m||!l));let v=n(`span`,`bench-status`,(a?``:`Not connected to the server. Reconnecting.`)||d(e,i)||s.get(i.id)||``);if(v.setAttribute(`role`,`status`),g.append(v),c.append(g),i.error)return c.append(n(`p`,`bench-error`,i.error)),c;let y=i.latestReport;return y?(c.append(n(`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(n(`p`,`bench-empty`,i.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:t}=r(),i=e(`bench`,`Benchmarks`,`Suites from the benchmarks folder of the Glimmervoid home, one run at a time.`);if(s.append(i),!t)s.append(n(`p`,`bench-empty`,`Waiting for the server.`));else if(!t.configured)s.append(n(`p`,`bench-empty`,t.reason||`Benchmarks are off.`));else if(t.suites.length===0)s.append(n(`p`,`bench-empty`,`No suites yet. Create a folder holding suite.json under benchmarks in the Glimmervoid home.`));else for(let e of t.suites)s.append(m(t,e))}function g(e){s||(s=n(`div`,`bench-content`),e.append(s),a(h),h())}var _={mount:g};export{_ as view};