glimmervoid 0.49.1-next.504 → 0.49.1-next.506
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.
- package/dist/bin/glimmervoid.js +5 -5
- package/dist/chunks/{adapters-BCzX13NB.js → adapters-D-SMUfJi.js} +3 -3
- package/dist/chunks/{adapters--mFzBNAs.js → adapters-cjLKUasU.js} +1 -1
- package/dist/chunks/{agent-setup-cli-UjxzgUCz.js → agent-setup-cli-BvMppMtM.js} +1 -1
- package/dist/chunks/{grok-BeRuWXFn.js → grok-DrF9dLgS.js} +1 -1
- package/dist/chunks/{kimi-CSByGhDL.js → kimi-B8Yf_DIB.js} +1 -1
- package/dist/chunks/kimi-BhfVJaz7.js +1 -0
- package/dist/chunks/{main-CNGBjHoZ.js → main-ugWOUmwy.js} +354 -4
- package/dist/chunks/{spawn-env-POxyFuJA.js → spawn-env-CDazYoWp.js} +54 -1
- package/dist/client/assets/{benchmark-panel-CZA9bVAy.js → benchmark-panel-C3wT6WO5.js} +1 -1
- package/dist/client/assets/benchmark-panel-C3wT6WO5.js.br +0 -0
- package/dist/client/assets/{boards-view-IHWbw7On.js → boards-view-DY8Oayxv.js} +1 -1
- package/dist/client/assets/boards-view-DY8Oayxv.js.br +0 -0
- package/dist/client/assets/{community-panel-D3cF0N9D.js → community-panel-BSLOCCdp.js} +1 -1
- package/dist/client/assets/community-panel-BSLOCCdp.js.br +0 -0
- package/dist/client/assets/{dialogs-CruMbo-L.js → dialogs-BEADTkSG.js} +1 -1
- package/dist/client/assets/dialogs-BEADTkSG.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-DxXk5_OW.js → doc-editor-ui-DogQ7rXN.js} +1 -1
- package/dist/client/assets/doc-editor-ui-DogQ7rXN.js.br +0 -0
- package/dist/client/assets/{feature-hint-C9OsodpO.js → feature-hint-YkBCeuG3.js} +1 -1
- package/dist/client/assets/feature-hint-YkBCeuG3.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-ZuNQB3cI.js → first-run-checklist-DkvL3KRa.js} +1 -1
- package/dist/client/assets/first-run-checklist-DkvL3KRa.js.br +0 -0
- package/dist/client/assets/{hooks-panel-DTwytDEm.js → hooks-panel-CZOdupH_.js} +1 -1
- package/dist/client/assets/hooks-panel-CZOdupH_.js.br +0 -0
- package/dist/client/assets/{index-dsf9cQsn.js → index-DAfljtgZ.js} +5 -5
- package/dist/client/assets/index-DAfljtgZ.js.br +0 -0
- package/dist/client/assets/{issues-panel-iiDa-yu6.js → issues-panel-CQ6yLu_n.js} +1 -1
- package/dist/client/assets/issues-panel-CQ6yLu_n.js.br +0 -0
- package/dist/client/assets/{my-prs-panel-fKSAadty.js → my-prs-panel-BJdbXG43.js} +1 -1
- package/dist/client/assets/my-prs-panel-BJdbXG43.js.br +0 -0
- package/dist/client/assets/{nyan-cat-40EpIYdF.js → nyan-cat-BA2VaJxU.js} +1 -1
- package/dist/client/assets/nyan-cat-BA2VaJxU.js.br +0 -0
- package/dist/client/assets/{phone-shell-dpLIvcsz.js → phone-shell-kU5d9CT6.js} +1 -1
- package/dist/client/assets/phone-shell-kU5d9CT6.js.br +0 -0
- package/dist/client/assets/{plan-face-h6Y0Tb26.js → plan-face-Dl9i1NDr.js} +1 -1
- package/dist/client/assets/plan-face-Dl9i1NDr.js.br +0 -0
- package/dist/client/assets/{plan-render-Dx2mUuxK.js → plan-render-DEUBu_u3.js} +1 -1
- package/dist/client/assets/plan-render-DEUBu_u3.js.br +0 -0
- package/dist/client/assets/{pr-queue-columns-V81vbb3h.js → pr-queue-columns-DXv241gL.js} +1 -1
- package/dist/client/assets/pr-queue-columns-DXv241gL.js.br +0 -0
- package/dist/client/assets/{radar-panel-ByuU26KF.js → radar-panel-CDhIHjOp.js} +1 -1
- package/dist/client/assets/radar-panel-CDhIHjOp.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-hHJRjYCg.js → repo-roots-adder-BJaY8Pj6.js} +1 -1
- package/dist/client/assets/repo-roots-adder-BJaY8Pj6.js.br +0 -0
- package/dist/client/assets/{resume-dialog-Cc5WGm3r.js → resume-dialog-B6YSyjuM.js} +1 -1
- package/dist/client/assets/resume-dialog-B6YSyjuM.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-BX-A7v4Q.js → review-queue-panel-2uh0WdwV.js} +1 -1
- package/dist/client/assets/review-queue-panel-2uh0WdwV.js.br +0 -0
- package/dist/client/assets/{settings-panel-DQTMuSuk.js → settings-panel-OfV-rVzG.js} +2 -2
- package/dist/client/assets/settings-panel-OfV-rVzG.js.br +0 -0
- package/dist/client/assets/{shown-face-Bg9nvVsj.js → shown-face-Bx-vVzXo.js} +1 -1
- package/dist/client/assets/shown-face-Bx-vVzXo.js.br +0 -0
- package/dist/client/assets/{team-review-panel-OJfrP57g.js → team-review-panel-C4qu2_aJ.js} +1 -1
- package/dist/client/assets/team-review-panel-C4qu2_aJ.js.br +0 -0
- package/dist/client/assets/{trace-panel-D9VOLGHS.js → trace-panel-Cjzp2VyW.js} +1 -1
- package/dist/client/assets/trace-panel-Cjzp2VyW.js.br +0 -0
- package/dist/client/assets/{usage-panel-BtVQ_Iti.js → usage-panel-BBni6vzp.js} +1 -1
- package/dist/client/assets/usage-panel-BBni6vzp.js.br +0 -0
- package/dist/client/assets/{your-day-tip-CJXY8R4U.js → your-day-tip-B3fHIPYh.js} +1 -1
- package/dist/client/assets/your-day-tip-B3fHIPYh.js.br +0 -0
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.br +0 -0
- package/dist/server/index.js +1 -1
- package/package.json +3 -1
- package/dist/chunks/kimi-D1kokaLt.js +0 -1
- package/dist/client/assets/benchmark-panel-CZA9bVAy.js.br +0 -0
- package/dist/client/assets/boards-view-IHWbw7On.js.br +0 -0
- package/dist/client/assets/community-panel-D3cF0N9D.js.br +0 -0
- package/dist/client/assets/dialogs-CruMbo-L.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-DxXk5_OW.js.br +0 -0
- package/dist/client/assets/feature-hint-C9OsodpO.js.br +0 -0
- package/dist/client/assets/first-run-checklist-ZuNQB3cI.js.br +0 -0
- package/dist/client/assets/hooks-panel-DTwytDEm.js.br +0 -0
- package/dist/client/assets/index-dsf9cQsn.js.br +0 -0
- package/dist/client/assets/issues-panel-iiDa-yu6.js.br +0 -0
- package/dist/client/assets/my-prs-panel-fKSAadty.js.br +0 -0
- package/dist/client/assets/nyan-cat-40EpIYdF.js.br +0 -0
- package/dist/client/assets/phone-shell-dpLIvcsz.js.br +0 -0
- package/dist/client/assets/plan-face-h6Y0Tb26.js.br +0 -0
- package/dist/client/assets/plan-render-Dx2mUuxK.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-V81vbb3h.js.br +0 -0
- package/dist/client/assets/radar-panel-ByuU26KF.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-hHJRjYCg.js.br +0 -0
- package/dist/client/assets/resume-dialog-Cc5WGm3r.js.br +0 -0
- package/dist/client/assets/review-queue-panel-BX-A7v4Q.js.br +0 -0
- package/dist/client/assets/settings-panel-DQTMuSuk.js.br +0 -0
- package/dist/client/assets/shown-face-Bg9nvVsj.js.br +0 -0
- package/dist/client/assets/team-review-panel-OJfrP57g.js.br +0 -0
- package/dist/client/assets/trace-panel-D9VOLGHS.js.br +0 -0
- package/dist/client/assets/usage-panel-BtVQ_Iti.js.br +0 -0
- package/dist/client/assets/your-day-tip-CJXY8R4U.js.br +0 -0
package/dist/bin/glimmervoid.js
CHANGED
|
@@ -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-
|
|
74
|
+
const { runAgentSetupCli } = await import("../chunks/agent-setup-cli-BvMppMtM.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
|
|
255
|
+
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-cjLKUasU.js");
|
|
256
256
|
const declaredCustomAgents = await readDeclaredCustomAgents();
|
|
257
257
|
if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
|
|
258
258
|
setCustomAgents(declaredCustomAgents.declared);
|
|
@@ -260,10 +260,10 @@ 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-
|
|
263
|
+
const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-BvMppMtM.js");
|
|
264
264
|
const grokSetup = inspectGrokAgentSetup();
|
|
265
265
|
line("grok hook setup", `${grokSetup.classification}: ${grokSetup.filePath}`);
|
|
266
|
-
const { default: kimi } = await import("../chunks/kimi-
|
|
266
|
+
const { default: kimi } = await import("../chunks/kimi-BhfVJaz7.js");
|
|
267
267
|
const { describeAgentHome } = await import("../chunks/agent-home-DHteh_iQ.js");
|
|
268
268
|
const { KIMI_HOME_PROFILE } = await import("../chunks/agent-home-core-DO3oucw-.js");
|
|
269
269
|
line("kimi home", describeAgentHome(KIMI_HOME_PROFILE, kimi.expectedHooksBlock()));
|
|
@@ -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-
|
|
277
|
+
const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-BvMppMtM.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,12 +6,12 @@ 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 { t as buildAgentEnv } from "./spawn-env-
|
|
9
|
+
import { t as buildAgentEnv } from "./spawn-env-CDazYoWp.js";
|
|
10
10
|
import { n as shellQuote, t as buildHookCommand } from "./hook-command-core-qTNK-xMF.js";
|
|
11
|
-
import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-
|
|
11
|
+
import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-DrF9dLgS.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-
|
|
14
|
+
import { n as buildAgentSpawnCommand, r as resolveAgentCommand, t as kimi } from "./kimi-B8Yf_DIB.js";
|
|
15
15
|
import { c as CODEX_HOME_PROFILE, f as renderCodexHookTables, n as AGENT_HOME_CONFIG_NAME, p as renderCodexHooksBlock } from "./agent-home-core-gp8KlW8i.js";
|
|
16
16
|
import { c as releaseAgentHome, i as holdPreparedAgentHome, n as generatedAgentHomePath, s as realAgentHome } from "./agent-home-BHtmhtJA.js";
|
|
17
17
|
import fs from "node:fs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-
|
|
1
|
+
export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-D-SMUfJi.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-
|
|
2
|
+
import { a as classifyGrokHooksFile, o as renderGrokHooksFile, t as grok } from "./grok-DrF9dLgS.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,7 +1,7 @@
|
|
|
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 buildAgentEnv } from "./spawn-env-
|
|
4
|
+
import { t as buildAgentEnv } from "./spawn-env-CDazYoWp.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";
|
|
@@ -2,7 +2,7 @@ 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 { t as buildAgentEnv } from "./spawn-env-
|
|
5
|
+
import { t as buildAgentEnv } from "./spawn-env-CDazYoWp.js";
|
|
6
6
|
import { l as KIMI_HOME_PROFILE, m as renderKimiHooksBlock } from "./agent-home-core-gp8KlW8i.js";
|
|
7
7
|
import { c as releaseAgentHome, i as holdPreparedAgentHome, o as prepareScratchAgentHome, s as realAgentHome } from "./agent-home-BHtmhtJA.js";
|
|
8
8
|
import fs from "node:fs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as default } from "./kimi-B8Yf_DIB.js";
|
|
@@ -3,7 +3,7 @@ import { n as sanitizeOneLine, r as showHomeAsTilde, t as firstLine$1 } from "./
|
|
|
3
3
|
import { a as isMissingFileError, r as errorMessage, t as errorCode } from "./text-DoirglWV.js";
|
|
4
4
|
import { a as packageRoot, c as resolvePackageBin, d as isPathInside, f as safePathSegment, i as clientDir, l as caseFoldedPathKey, n as bundled, o as relayPath, p as sanitizeWorktreeName, r as cliPath, s as resolveFfmpegPath, t as assetRoot, u as equalsIgnoringCaseOnWindows } from "./runtime-paths-CYwF658V.js";
|
|
5
5
|
import { n as glimmervoidHomeDir, r as isOperatorHomeUnderTest, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
|
|
6
|
-
import { $ as WHITEBOARD_LIMITS, A as SIGN_URL_ENV, Bt as ReviewThreadId, D as SESSION_NAME_PATTERN, Dt as DECIDING_REVIEW_STATES, Et as CommitSha, F as ShownFile, Gt as TeamReviewResolveResponse, Ht as TeamReviewActionRequest, It as ReviewComment, J as Note, Jt as TeamReviewThreadCommentsResponse, K as Box, Kt as TeamReviewStateEntry, L as SshSignRequest, Lt as ReviewDraft, Mt as PostedReviewEvent, Nt as PostingPlan, O as SESSION_NAME_RULE_TEXT, Ot as EarlierReview, Pt as PrDetail, Q as Unit, Qt as decisionAsIfApprovalRequired, Rt as ReviewFinding, S as ConversationQuestion, T as SESSION_DOC_BODY_CAP_BYTES, U as BoardRecord, Vt as ReviewVerdict, Wt as TeamReviewCompareFiles, X as Panel, Xt as TeamReviewThreadsRepository, Yt as TeamReviewThreadResult, Zt as canApproveAfterComment, _ as COHERENCE_HOOKS_INACTIVE, an as NODE_ID_RE, at as MyPrAutoRebase, b as CONVERSATION_TOOL_RESULT_HOOK_EVENT, bt as MyPrsSnapshot, ct as MyPrKeepMergeableRequest, dt as MyPrMergeMethod, en as hasStandingViewerApproval, fn as BADGE_LABELS, ft as MyPrMergeRequest, gn as STATES, hn as RESTARTABLE_STATES, ht as MyPrMergeWhenReadyRequest, i as ASK_USER_QUESTION_TOOL_NAME, in as GH_SEGMENT, it as MyPr, j as SSH_SIGN_BODY_CAP_BYTES, jt as GithubReviewState, k as SHOWN_FILE_CAP_BYTES, kt as FindingSeverity, mn as MERGEABLE_LIVE_STATES, mt as MyPrMergeStateResponse, nn as HEX_SHA_RE, nt as Wire, on as REPO_SLUG_RE, ot as MyPrCheckContext, pn as KILLABLE_STATES, q as Frame, qt as TeamReviewStatus, r as AGENT_URL_ENV, rn as shortSha, rt as LinkedPr, sn as repoParts, st as MyPrCheckContextsResponse, ut as MyPrLaneEntry, v as CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS, vt as MyPrThreadNode, xt as MyPrsState, y as CONVERSATION_PERMISSION_HOOK_EVENT, yt as MyPrThreadsResponse, z as TaskTitle, zt as ReviewResult } from "./session-DUFWokKF.js";
|
|
6
|
+
import { $ as WHITEBOARD_LIMITS, A as SIGN_URL_ENV, Bt as ReviewThreadId, D as SESSION_NAME_PATTERN, Dt as DECIDING_REVIEW_STATES, Et as CommitSha, F as ShownFile, Gt as TeamReviewResolveResponse, Ht as TeamReviewActionRequest, It as ReviewComment, J as Note, Jt as TeamReviewThreadCommentsResponse, K as Box, Kt as TeamReviewStateEntry, L as SshSignRequest, Lt as ReviewDraft, Mt as PostedReviewEvent, Nt as PostingPlan, O as SESSION_NAME_RULE_TEXT, Ot as EarlierReview, Pt as PrDetail, Q as Unit, Qt as decisionAsIfApprovalRequired, Rt as ReviewFinding, S as ConversationQuestion, T as SESSION_DOC_BODY_CAP_BYTES, U as BoardRecord, Vt as ReviewVerdict, Wt as TeamReviewCompareFiles, X as Panel, Xt as TeamReviewThreadsRepository, Y as Op, Yt as TeamReviewThreadResult, Zt as canApproveAfterComment, _ as COHERENCE_HOOKS_INACTIVE, an as NODE_ID_RE, at as MyPrAutoRebase, b as CONVERSATION_TOOL_RESULT_HOOK_EVENT, bt as MyPrsSnapshot, c as AgentEditRequest, ct as MyPrKeepMergeableRequest, dt as MyPrMergeMethod, en as hasStandingViewerApproval, fn as BADGE_LABELS, ft as MyPrMergeRequest, g as AgentSpawnRequest, gn as STATES, h as AgentSettingsRequest, hn as RESTARTABLE_STATES, ht as MyPrMergeWhenReadyRequest, i as ASK_USER_QUESTION_TOOL_NAME, in as GH_SEGMENT, it as MyPr, j as SSH_SIGN_BODY_CAP_BYTES, jt as GithubReviewState, k as SHOWN_FILE_CAP_BYTES, kt as FindingSeverity, mn as MERGEABLE_LIVE_STATES, mt as MyPrMergeStateResponse, nn as HEX_SHA_RE, nt as Wire, o as AgentAttentionRequest, on as REPO_SLUG_RE, ot as MyPrCheckContext, pn as KILLABLE_STATES, q as Frame, qt as TeamReviewStatus, r as AGENT_URL_ENV, rn as shortSha, rt as LinkedPr, s as AgentCloseRequest, sn as repoParts, st as MyPrCheckContextsResponse, u as AgentPullRequestRequest, ut as MyPrLaneEntry, v as CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS, vt as MyPrThreadNode, xt as MyPrsState, y as CONVERSATION_PERMISSION_HOOK_EVENT, yt as MyPrThreadsResponse, z as TaskTitle, zt as ReviewResult } from "./session-DUFWokKF.js";
|
|
7
7
|
import { c as spawn, i as execFileSync, n as execFile, r as execFileAsync, s as refuseLaunchesOf, t as assertLaunchable } from "./child-process-safe-BCOoKfxG.js";
|
|
8
8
|
import { $t as IssuesSearchResponse, A as HINT_VIEW_BY_FEATURE, At as UpdateJournal, B as MergedPrListing, Bt as PLAN_HOOK_OUTPUT_MAX_CHARS, Ct as CommunityItem, D as pullRequestKeyFromReference, Dt as SKILL_NAME_RE, Et as DISCORD_CHANNEL_NAME_RE, F as BenchmarkJudgement, Ft as CoherenceJournalOutput, G as GithubPrLightSearchNode, Gt as parseExitPlanModeHookPayload, H as PrCheckoutCaseInput, Ht as PLAN_TOOL_NAME, I as BenchmarkRun, It as ChangeMap, J as WorkflowCommentBody, Jt as HookEnvelope, K as GithubPrsFrame, Kt as planTitle, L as BenchmarkStatus, Lt as changeMapFactId, M as BenchmarkActionRequest, Mt as MAX_RAW_LINE_CHARS, N as BenchmarkCase, Nt as TraceCheckpoint, O as FeatureHintState, P as BenchmarkId, Pt as TraceRecord, Qt as IssueUpdate, R as BenchmarkSuite, Rt as PLAN_BODY_CAP_BYTES, St as CommunityDraft, Tt as CommunityVerdict, U as GithubPrDetailNode, Ut as PlanDecision, V as MinedPrReviewData, Vt as PLAN_RESULT_HOOK_EVENT, W as GithubPrKey, Wt as PlanRevision, X as WorkflowsSettings, Xt as GithubIssueResponse, Y as WorkflowLabelName, Yt as GithubIssuePullRequestsRepository, Z as WorkflowsState, Zt as IssueKey, _ as CLIENT_LOG_TEXT_MAX_CHARS, a as ConfigUpdate, c as SHELL_AGENT_ID, en as IssuesState, f as USAGE_COST_MODES, gt as USAGE_INTEGER_RANGES, h as CHANGES_POLL_INTERVAL_MS, jt as SessionSetup, k as HINT_FEATURES, nn as issuePullRequestStateFromGithub, p as USAGE_VENDOR_KEYS, q as comparablePrKey, r as BrowserConfig, rt as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, s as RUNTIME_CONFIG_SCALAR_KEYS, tn as IssuesStatus, u as configIssueMessage, v as CONTROL_FRAME_MAX_BYTES, wt as CommunityState, x as GithubTeam, xt as CommunityActionRequest, y as ClientMessage, z as CommitComparison, zt as PLAN_HOOK_EVENT } from "./config-Cq5ButJ9.js";
|
|
9
9
|
import { $ as supervisionLine, A as parseRefinedSessionName, B as resumePromptFor, C as decideTaskTitleRefinement, D as extractPromptTaskTitle, E as extractOscTaskTitle, F as AUTO_CONTINUE_PROMPT, G as isAutoNameOf, H as claudeProjectsDir, I as RESUME_ID_RE, K as nextSuggestedName, L as isConversationReplacedAtStartup, M as resolveRefocusTaskTitle, N as resolveTaskTitle, O as isSelfWakePrompt, P as seedTaskTitleSources, Q as routeAgentNotes, R as pickAutoResume, S as cleanTaskPrompt, T as extractHookTaskTitle, U as listRepoConversations, V as shouldAdoptReportedResumeId, W as listRepoWorktreePaths, X as permitsHelpCommand, Y as hintFor, Z as promptHintFor, _ as projectReviewDetail, a as checkAgentReply, b as buildTaskTitleRefinementPrompt, c as deriveChildSessionName, d as describePushLanding, et as toolHookFactsOf, f as describeRoleRefusal, g as projectMyPrs, h as parseAgentVerb, j as parseRefinedTaskTitle, k as isSubstantivePrompt, l as describeChildEndNote, n as REFUSAL_REASON, o as decideAgentRequest, p as describeUnpushedCloseRefusal, q as describeSessionLimits, s as decideSpawnAllowance, u as describeKeptChildAttention, v as projectReviews, w as extractAiTitle, x as chooseRefinedSessionName, y as buildPersistedTaskTitle, z as resolveResumeTarget } from "./agent-api-core-BCRpZ3sc.js";
|
|
@@ -15,11 +15,12 @@ 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 { a as filesAfterRetention, c as readPageTitle, d as thumbnailOwnerIdOf, f as thumbnailRecipeFor, g as findDependencyCycle, h as cappedWarnings, i as describeOverCap, l as shownMimeForFilename, m as layoutBoard, n as SHOWN_SNIFF_BYTES, o as isShownPageMime, p as escapeMarkup, r as decideShownKind, s as leavesVisibleRawTextOpen, t as SHOWN_PAGE_ZOOM_BRIDGE, u as thumbnailFilenameOf, v as unitsOf } from "./shown-files-core-CiEXUXvy.js";
|
|
18
|
+
import { n as mcpLaunchFor, r as parsePresentedCredential } from "./spawn-env-CDazYoWp.js";
|
|
18
19
|
import { n as shellQuote } from "./hook-command-core-qTNK-xMF.js";
|
|
19
20
|
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
21
|
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-
|
|
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-
|
|
22
|
+
import { i as resolveArgvCommandMatches } from "./kimi-B8Yf_DIB.js";
|
|
23
|
+
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-D-SMUfJi.js";
|
|
23
24
|
import { c as CODEX_HOME_PROFILE, l as KIMI_HOME_PROFILE } from "./agent-home-core-gp8KlW8i.js";
|
|
24
25
|
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-BHtmhtJA.js";
|
|
25
26
|
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";
|
|
@@ -38,6 +39,8 @@ import { pipeline } from "node:stream";
|
|
|
38
39
|
import net, { isIPv6 } from "node:net";
|
|
39
40
|
import fs$1, { chmod, copyFile, lstat, mkdir, mkdtemp, open, readFile, readdir, readlink, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
40
41
|
import express from "express";
|
|
42
|
+
import { toNodeHandler } from "@modelcontextprotocol/node";
|
|
43
|
+
import { McpServer, createMcpHandler } from "@modelcontextprotocol/server";
|
|
41
44
|
import WebSocket$1, { WebSocket, WebSocketServer } from "ws";
|
|
42
45
|
import { EventEmitter } from "node:events";
|
|
43
46
|
import pty from "node-pty";
|
|
@@ -534,6 +537,337 @@ function createLifecycle({ shutdown, httpServer, extraServers = [], onRestart =
|
|
|
534
537
|
};
|
|
535
538
|
}
|
|
536
539
|
//#endregion
|
|
540
|
+
//#region mcp/core/instructions.ts
|
|
541
|
+
var SERVER_INSTRUCTIONS = [
|
|
542
|
+
"Glimmervoid supervises this session and shows it to the operator on a dashboard.",
|
|
543
|
+
"Use the session tool to spawn work that edits files or runs long: the spawned session gets its own dashboard card the operator can watch, where an in-process subagent stays fine only for a quick read-only lookup.",
|
|
544
|
+
"Use the whiteboard tool to draw a diagram, architecture map or plan the operator can see and edit, rather than drawing one in chat.",
|
|
545
|
+
"Use push to land this session's commits when a plain git push is refused, attention to ask the operator for a decision, review for team pull request reviews, and settings to read Glimmervoid's settings.",
|
|
546
|
+
"session limits reports what this session may do."
|
|
547
|
+
].join(" ");
|
|
548
|
+
//#endregion
|
|
549
|
+
//#region mcp/core/tool-result.ts
|
|
550
|
+
function errorTextOf(body) {
|
|
551
|
+
return typeof body.error === "string" && body.error ? body.error : "Glimmervoid refused the request";
|
|
552
|
+
}
|
|
553
|
+
function toolResultFromReply(reply) {
|
|
554
|
+
if (reply.body.ok !== true) return {
|
|
555
|
+
content: [{
|
|
556
|
+
type: "text",
|
|
557
|
+
text: errorTextOf(reply.body)
|
|
558
|
+
}],
|
|
559
|
+
isError: true
|
|
560
|
+
};
|
|
561
|
+
return {
|
|
562
|
+
content: [{
|
|
563
|
+
type: "text",
|
|
564
|
+
text: JSON.stringify(reply.body)
|
|
565
|
+
}],
|
|
566
|
+
structuredContent: reply.body
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
function toolErrorResult(message) {
|
|
570
|
+
return {
|
|
571
|
+
content: [{
|
|
572
|
+
type: "text",
|
|
573
|
+
text: message
|
|
574
|
+
}],
|
|
575
|
+
isError: true
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
//#endregion
|
|
579
|
+
//#region mcp/core/tools.ts
|
|
580
|
+
var ChildField = z.string().min(1).max(300).describe("The spawned session, by the id or name spawn returned");
|
|
581
|
+
var BoardField = z.string().min(1).max(200).describe("The board, by id or title");
|
|
582
|
+
function definedEntries(source, keys) {
|
|
583
|
+
return Object.fromEntries(keys.filter((key) => source[key] !== void 0).map((key) => [key, source[key]]));
|
|
584
|
+
}
|
|
585
|
+
function routeTo(verb, keys = []) {
|
|
586
|
+
return {
|
|
587
|
+
verb,
|
|
588
|
+
toPayload: (toolArguments) => definedEntries(toolArguments, keys)
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
function sendPayload(toolArguments) {
|
|
592
|
+
const text = typeof toolArguments.text === "string" ? toolArguments.text : "";
|
|
593
|
+
const child = typeof toolArguments.child === "string" ? toolArguments.child : null;
|
|
594
|
+
return { words: child === null ? [text] : [child, text] };
|
|
595
|
+
}
|
|
596
|
+
function answerPayload(toolArguments) {
|
|
597
|
+
if (toolArguments.toOperator === true) return definedEntries(toolArguments, ["child", "toOperator"]);
|
|
598
|
+
return definedEntries(toolArguments, ["child", "answers"]);
|
|
599
|
+
}
|
|
600
|
+
function editPayload(toolArguments, context) {
|
|
601
|
+
if (typeof toolArguments.path !== "string") return {};
|
|
602
|
+
return { path: context.resolveSessionPath(toolArguments.path) };
|
|
603
|
+
}
|
|
604
|
+
function whiteboardRoute(sub, keys) {
|
|
605
|
+
return {
|
|
606
|
+
verb: "whiteboard",
|
|
607
|
+
toPayload: (toolArguments) => ({
|
|
608
|
+
sub,
|
|
609
|
+
...definedEntries(toolArguments, keys)
|
|
610
|
+
})
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
var SESSION_TOOL = {
|
|
614
|
+
name: "session",
|
|
615
|
+
title: "Glimmervoid sessions",
|
|
616
|
+
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.",
|
|
617
|
+
annotations: {
|
|
618
|
+
readOnlyHint: false,
|
|
619
|
+
destructiveHint: true,
|
|
620
|
+
openWorldHint: false
|
|
621
|
+
},
|
|
622
|
+
loadsUpfront: true,
|
|
623
|
+
fields: {
|
|
624
|
+
prompt: AgentSpawnRequest.shape.prompt.optional().describe("spawn: the task for the new session"),
|
|
625
|
+
name: AgentSpawnRequest.shape.name.describe("spawn: a display name for the new session"),
|
|
626
|
+
agent: AgentSpawnRequest.shape.agent.describe("spawn: the agent CLI to run, such as claude, codex or kimi; defaults to this session's"),
|
|
627
|
+
child: ChildField.optional(),
|
|
628
|
+
text: z.string().min(1).max(2e4).optional().describe("send: the message"),
|
|
629
|
+
discard: AgentCloseRequest.shape.discard.describe("close: drop the child's unpushed work instead of refusing"),
|
|
630
|
+
answers: z.record(z.string(), z.string().min(1)).optional().describe("answer: each question text mapped to the chosen answer"),
|
|
631
|
+
toOperator: z.literal(true).optional().describe("answer: pass the child's question to the operator instead"),
|
|
632
|
+
path: AgentEditRequest.shape.path.optional().describe("edit: the file, absolute or relative to this session's directory")
|
|
633
|
+
},
|
|
634
|
+
actions: {
|
|
635
|
+
spawn: routeTo("spawn", [
|
|
636
|
+
"prompt",
|
|
637
|
+
"name",
|
|
638
|
+
"agent"
|
|
639
|
+
]),
|
|
640
|
+
send: {
|
|
641
|
+
verb: "send",
|
|
642
|
+
toPayload: sendPayload
|
|
643
|
+
},
|
|
644
|
+
read: routeTo("read", ["child"]),
|
|
645
|
+
close: routeTo("close", ["child", "discard"]),
|
|
646
|
+
answer: {
|
|
647
|
+
verb: "answer",
|
|
648
|
+
toPayload: answerPayload
|
|
649
|
+
},
|
|
650
|
+
board: routeTo("board"),
|
|
651
|
+
edit: {
|
|
652
|
+
verb: "edit",
|
|
653
|
+
toPayload: editPayload
|
|
654
|
+
},
|
|
655
|
+
limits: routeTo("limits")
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
var WHITEBOARD_TOOL = {
|
|
659
|
+
name: "whiteboard",
|
|
660
|
+
title: "Glimmervoid whiteboards",
|
|
661
|
+
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, put applies element ops (add, set, remove; a unit element is a plan step), connect and disconnect follow a board's changes, resolve closes a note, delete removes a board this session created.",
|
|
662
|
+
annotations: {
|
|
663
|
+
readOnlyHint: false,
|
|
664
|
+
destructiveHint: true,
|
|
665
|
+
openWorldHint: false
|
|
666
|
+
},
|
|
667
|
+
loadsUpfront: true,
|
|
668
|
+
fields: {
|
|
669
|
+
board: BoardField.optional(),
|
|
670
|
+
title: z.string().min(1).max(200).optional().describe("new: the board title"),
|
|
671
|
+
ops: z.array(Op).min(1).optional().describe("put: the element ops to apply"),
|
|
672
|
+
note: z.string().min(1).max(200).optional().describe("resolve: the note element id"),
|
|
673
|
+
peek: z.boolean().optional().describe("get: read without marking changes as seen"),
|
|
674
|
+
review: z.boolean().optional().describe("get: include the plan review against the code session")
|
|
675
|
+
},
|
|
676
|
+
actions: {
|
|
677
|
+
list: whiteboardRoute("list", []),
|
|
678
|
+
new: whiteboardRoute("new", ["title"]),
|
|
679
|
+
get: whiteboardRoute("get", [
|
|
680
|
+
"board",
|
|
681
|
+
"peek",
|
|
682
|
+
"review"
|
|
683
|
+
]),
|
|
684
|
+
put: whiteboardRoute("put", ["board", "ops"]),
|
|
685
|
+
connect: whiteboardRoute("connect", ["board"]),
|
|
686
|
+
disconnect: whiteboardRoute("disconnect", ["board"]),
|
|
687
|
+
resolve: whiteboardRoute("resolve", ["board", "note"]),
|
|
688
|
+
delete: whiteboardRoute("delete", ["board"])
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
var REVIEW_TOOL = {
|
|
692
|
+
name: "review",
|
|
693
|
+
title: "Glimmervoid pull request reviews",
|
|
694
|
+
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.",
|
|
695
|
+
annotations: {
|
|
696
|
+
readOnlyHint: false,
|
|
697
|
+
destructiveHint: false,
|
|
698
|
+
openWorldHint: true
|
|
699
|
+
},
|
|
700
|
+
loadsUpfront: false,
|
|
701
|
+
fields: { pr: AgentPullRequestRequest.shape.pr.optional().describe("A GitHub pull request url or owner/repo#number") },
|
|
702
|
+
actions: {
|
|
703
|
+
review: routeTo("review", ["pr"]),
|
|
704
|
+
reviews: routeTo("reviews", ["pr"]),
|
|
705
|
+
prs: routeTo("prs"),
|
|
706
|
+
"link-pr": routeTo("link-pr", ["pr"])
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
var PUSH_TOOL = {
|
|
710
|
+
name: "push",
|
|
711
|
+
title: "Glimmervoid push",
|
|
712
|
+
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.",
|
|
713
|
+
annotations: {
|
|
714
|
+
readOnlyHint: false,
|
|
715
|
+
destructiveHint: false,
|
|
716
|
+
openWorldHint: true
|
|
717
|
+
},
|
|
718
|
+
loadsUpfront: false,
|
|
719
|
+
fields: {},
|
|
720
|
+
actions: { push: routeTo("push") }
|
|
721
|
+
};
|
|
722
|
+
var ATTENTION_TOOL = {
|
|
723
|
+
name: "attention",
|
|
724
|
+
title: "Glimmervoid attention",
|
|
725
|
+
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.",
|
|
726
|
+
annotations: {
|
|
727
|
+
readOnlyHint: false,
|
|
728
|
+
destructiveHint: false,
|
|
729
|
+
openWorldHint: false
|
|
730
|
+
},
|
|
731
|
+
loadsUpfront: false,
|
|
732
|
+
fields: { note: AgentAttentionRequest.shape.note.optional().describe("What the operator should look at") },
|
|
733
|
+
actions: { attention: routeTo("attention", ["note"]) }
|
|
734
|
+
};
|
|
735
|
+
var SETTINGS_TOOL = {
|
|
736
|
+
name: "settings",
|
|
737
|
+
title: "Glimmervoid settings",
|
|
738
|
+
description: "Read Glimmervoid's own settings without opening config.json. list names every setting; get reads one by its dotted path.",
|
|
739
|
+
annotations: {
|
|
740
|
+
readOnlyHint: true,
|
|
741
|
+
destructiveHint: false,
|
|
742
|
+
openWorldHint: false
|
|
743
|
+
},
|
|
744
|
+
loadsUpfront: false,
|
|
745
|
+
fields: { path: AgentSettingsRequest.shape.path.describe("get: the dotted setting path") },
|
|
746
|
+
actions: {
|
|
747
|
+
list: {
|
|
748
|
+
verb: "settings",
|
|
749
|
+
toPayload: () => ({ command: "list" })
|
|
750
|
+
},
|
|
751
|
+
get: {
|
|
752
|
+
verb: "settings",
|
|
753
|
+
toPayload: (toolArguments) => ({
|
|
754
|
+
command: "get",
|
|
755
|
+
...definedEntries(toolArguments, ["path"])
|
|
756
|
+
})
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
var GROUPED_TOOLS = Object.freeze([
|
|
761
|
+
SESSION_TOOL,
|
|
762
|
+
WHITEBOARD_TOOL,
|
|
763
|
+
REVIEW_TOOL,
|
|
764
|
+
PUSH_TOOL,
|
|
765
|
+
ATTENTION_TOOL,
|
|
766
|
+
SETTINGS_TOOL
|
|
767
|
+
]);
|
|
768
|
+
function allowedActionNames(tool, isVerbAllowed) {
|
|
769
|
+
return Object.entries(tool.actions).filter(([, route]) => isVerbAllowed(route.verb)).map(([actionName]) => actionName);
|
|
770
|
+
}
|
|
771
|
+
function inputSchemaFor(tool, actionNames) {
|
|
772
|
+
const [firstAction, ...otherActions] = actionNames;
|
|
773
|
+
if (firstAction === void 0) return z.object(tool.fields);
|
|
774
|
+
return z.object({
|
|
775
|
+
action: z.enum([firstAction, ...otherActions]).describe("What to do"),
|
|
776
|
+
...tool.fields
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
function routeToolCall(tool, toolArguments, context) {
|
|
780
|
+
const actionNames = Object.keys(tool.actions);
|
|
781
|
+
const requestedAction = actionNames.length === 1 ? actionNames[0] : toolArguments.action;
|
|
782
|
+
if (typeof requestedAction !== "string" || !Object.hasOwn(tool.actions, requestedAction)) return {
|
|
783
|
+
ok: false,
|
|
784
|
+
error: `${tool.name} takes action ${actionNames.join(", ")}`
|
|
785
|
+
};
|
|
786
|
+
const route = tool.actions[requestedAction];
|
|
787
|
+
if (route === void 0) return {
|
|
788
|
+
ok: false,
|
|
789
|
+
error: `${tool.name} takes action ${actionNames.join(", ")}`
|
|
790
|
+
};
|
|
791
|
+
return {
|
|
792
|
+
ok: true,
|
|
793
|
+
verb: route.verb,
|
|
794
|
+
payload: route.toPayload(toolArguments, context)
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
//#endregion
|
|
798
|
+
//#region mcp/server.ts
|
|
799
|
+
var MCP_ROUTE = "/mcp";
|
|
800
|
+
var SERVER_NAME = "glimmervoid";
|
|
801
|
+
var TOOL_SURFACE_VERSION = "1";
|
|
802
|
+
var LOADS_UPFRONT_META_KEY = "anthropic/alwaysLoad";
|
|
803
|
+
function refuse$1(res) {
|
|
804
|
+
res.status(404).json({
|
|
805
|
+
ok: false,
|
|
806
|
+
error: REFUSAL_REASON
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
function callContextFor(session) {
|
|
810
|
+
return { resolveSessionPath: (requestedPath) => path.resolve(session.effectiveCwd(), requestedPath) };
|
|
811
|
+
}
|
|
812
|
+
function registerGroupedTool(server, tool, session, agentApi) {
|
|
813
|
+
const actionNames = allowedActionNames(tool, (verb) => agentApi.refuseRole(session, verb) === null);
|
|
814
|
+
if (actionNames.length === 0) return;
|
|
815
|
+
server.registerTool(tool.name, {
|
|
816
|
+
title: tool.title,
|
|
817
|
+
description: tool.description,
|
|
818
|
+
inputSchema: inputSchemaFor(tool, actionNames),
|
|
819
|
+
annotations: tool.annotations,
|
|
820
|
+
_meta: { [LOADS_UPFRONT_META_KEY]: tool.loadsUpfront }
|
|
821
|
+
}, async (toolArguments) => {
|
|
822
|
+
const route = routeToolCall(tool, toolArguments, callContextFor(session));
|
|
823
|
+
if (!route.ok) return toolErrorResult(route.error);
|
|
824
|
+
return toolResultFromReply(await agentApi.handle(session, route.verb, route.payload));
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
function buildSessionServer(session, agentApi) {
|
|
828
|
+
const server = new McpServer({
|
|
829
|
+
name: SERVER_NAME,
|
|
830
|
+
version: TOOL_SURFACE_VERSION
|
|
831
|
+
}, { instructions: SERVER_INSTRUCTIONS });
|
|
832
|
+
for (const tool of GROUPED_TOOLS) registerGroupedTool(server, tool, session, agentApi);
|
|
833
|
+
return server;
|
|
834
|
+
}
|
|
835
|
+
function authenticatedSession(req, dependencies) {
|
|
836
|
+
const credential = parsePresentedCredential(req.headers.authorization);
|
|
837
|
+
const session = credential ? dependencies.getSession(credential.sessionId) : null;
|
|
838
|
+
return decideAgentRequest({
|
|
839
|
+
sessionId: credential?.sessionId ?? null,
|
|
840
|
+
presentedToken: credential?.secret ?? null,
|
|
841
|
+
expectedToken: session?.agentToken ?? null,
|
|
842
|
+
isLoopback: dependencies.isLoopback(req)
|
|
843
|
+
}).ok ? session : null;
|
|
844
|
+
}
|
|
845
|
+
function mountAgentMcp(app, dependencies) {
|
|
846
|
+
const handler = createMcpHandler(({ authInfo }) => {
|
|
847
|
+
const session = authInfo ? dependencies.getSession(authInfo.clientId) : null;
|
|
848
|
+
const agentApi = dependencies.getAgentApi();
|
|
849
|
+
if (!session || !agentApi) throw new Error("the MCP request lost its session");
|
|
850
|
+
return buildSessionServer(session, agentApi);
|
|
851
|
+
}, { onerror: (error) => dependencies.logger.warn(`[mcp] ${error.message}`) });
|
|
852
|
+
const nodeHandler = toNodeHandler(handler, { onerror: (error) => dependencies.logger.warn(`[mcp] ${error.message}`) });
|
|
853
|
+
const answer = (req, res) => {
|
|
854
|
+
const session = authenticatedSession(req, dependencies);
|
|
855
|
+
if (!session || !dependencies.getAgentApi()) {
|
|
856
|
+
req.resume();
|
|
857
|
+
refuse$1(res);
|
|
858
|
+
return;
|
|
859
|
+
}
|
|
860
|
+
req.auth = {
|
|
861
|
+
token: session.id,
|
|
862
|
+
clientId: session.id,
|
|
863
|
+
scopes: []
|
|
864
|
+
};
|
|
865
|
+
nodeHandler(req, res);
|
|
866
|
+
};
|
|
867
|
+
app.post(MCP_ROUTE, answer);
|
|
868
|
+
app.get(MCP_ROUTE, answer);
|
|
869
|
+
}
|
|
870
|
+
//#endregion
|
|
537
871
|
//#region server/core/host-policy.ts
|
|
538
872
|
var LOOPBACK_HOST_RE = /^(?:localhost|127(?:\.\d{1,3}){3}|\[::1\]|\[::ffff:127(?:\.\d{1,3}){3}\])$/;
|
|
539
873
|
function hostOnly(value) {
|
|
@@ -1513,6 +1847,12 @@ function mountAgentIngressRoutes(app, dependencies) {
|
|
|
1513
1847
|
});
|
|
1514
1848
|
});
|
|
1515
1849
|
});
|
|
1850
|
+
mountAgentMcp(app, {
|
|
1851
|
+
getSession,
|
|
1852
|
+
getAgentApi,
|
|
1853
|
+
isLoopback: isLoopbackRequest,
|
|
1854
|
+
logger
|
|
1855
|
+
});
|
|
1516
1856
|
app.post("/agent/:glimmervoidId/show", (req, res) => {
|
|
1517
1857
|
const agentApi = getAgentApi();
|
|
1518
1858
|
const shownFiles = getShownFiles();
|
|
@@ -20145,13 +20485,23 @@ var Session = class extends EventEmitter {
|
|
|
20145
20485
|
return;
|
|
20146
20486
|
}
|
|
20147
20487
|
this._isSaneYoloActive = remoteLaunch === null && hookInjection.isSaneYoloActive;
|
|
20148
|
-
const
|
|
20488
|
+
const mcpLaunch = remoteLaunch === null ? mcpLaunchFor({
|
|
20489
|
+
agentId: this.agentId,
|
|
20490
|
+
listenerPort: this._hooks.listenerPort(),
|
|
20491
|
+
sessionId: this.id,
|
|
20492
|
+
agentToken: this._agentToken
|
|
20493
|
+
}) : {
|
|
20494
|
+
args: [],
|
|
20495
|
+
env: {}
|
|
20496
|
+
};
|
|
20497
|
+
const settingsArgs = [...hookInjection.args, ...mcpLaunch.args];
|
|
20149
20498
|
this._titleQuiet = this._adapter.titleProfile.quietUntilFirstPrompt === true && this._hooks.hasInjection() && !isRemoteCodex;
|
|
20150
20499
|
this._armTitleQuietFallback();
|
|
20151
20500
|
this._titleSource.setContext({ cwdBasename: path.basename(this.effectiveCwd()) });
|
|
20152
20501
|
const injectedEnv = {
|
|
20153
20502
|
...hookInjection.env,
|
|
20154
20503
|
...this._agentApiEnv(),
|
|
20504
|
+
...mcpLaunch.env,
|
|
20155
20505
|
...this._commitSigningEnv()
|
|
20156
20506
|
};
|
|
20157
20507
|
const spawnExtraEnv = Object.keys(injectedEnv).length > 0 ? {
|
|
@@ -2,12 +2,65 @@ 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
4
|
import path from "node:path";
|
|
5
|
+
//#region mcp/core/credentials.ts
|
|
6
|
+
var CREDENTIAL_SEPARATOR = ".";
|
|
7
|
+
var BEARER_PREFIX = /^Bearer\s+/i;
|
|
8
|
+
function mcpCredentialFor(sessionId, secret) {
|
|
9
|
+
return `${sessionId}${CREDENTIAL_SEPARATOR}${secret}`;
|
|
10
|
+
}
|
|
11
|
+
function parsePresentedCredential(authorizationHeader) {
|
|
12
|
+
if (!authorizationHeader || !BEARER_PREFIX.test(authorizationHeader)) return null;
|
|
13
|
+
const credential = authorizationHeader.replace(BEARER_PREFIX, "").trim();
|
|
14
|
+
const separatorIndex = credential.indexOf(CREDENTIAL_SEPARATOR);
|
|
15
|
+
if (separatorIndex <= 0 || separatorIndex === credential.length - 1) return null;
|
|
16
|
+
return {
|
|
17
|
+
sessionId: credential.slice(0, separatorIndex),
|
|
18
|
+
secret: credential.slice(separatorIndex + 1)
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region mcp/core/agent-config.ts
|
|
23
|
+
var MCP_CREDENTIAL_ENV = "GLIMMERVOID_MCP_TOKEN";
|
|
24
|
+
var MCP_SERVER_NAME = "glimmervoid";
|
|
25
|
+
var NO_MCP_LAUNCH = Object.freeze({
|
|
26
|
+
args: [],
|
|
27
|
+
env: {}
|
|
28
|
+
});
|
|
29
|
+
function mcpUrl(listenerPort) {
|
|
30
|
+
return `http://127.0.0.1:${listenerPort}/mcp`;
|
|
31
|
+
}
|
|
32
|
+
function claudeMcpArgs(url) {
|
|
33
|
+
return [
|
|
34
|
+
"--mcp-config",
|
|
35
|
+
JSON.stringify({ mcpServers: { [MCP_SERVER_NAME]: {
|
|
36
|
+
type: "http",
|
|
37
|
+
url,
|
|
38
|
+
headers: { Authorization: `Bearer \${${MCP_CREDENTIAL_ENV}}` }
|
|
39
|
+
} } }),
|
|
40
|
+
"--allowedTools",
|
|
41
|
+
`mcp__${MCP_SERVER_NAME}`
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
var ARGS_BY_AGENT = Object.freeze({ "claude-code": claudeMcpArgs });
|
|
45
|
+
function isBuiltinWithMcpArgs(agentId) {
|
|
46
|
+
return Object.hasOwn(ARGS_BY_AGENT, agentId);
|
|
47
|
+
}
|
|
48
|
+
function mcpLaunchFor({ agentId, listenerPort, sessionId, agentToken }) {
|
|
49
|
+
const buildArgs = isBuiltinWithMcpArgs(agentId) ? ARGS_BY_AGENT[agentId] : void 0;
|
|
50
|
+
if (!buildArgs || !listenerPort || !agentToken) return NO_MCP_LAUNCH;
|
|
51
|
+
return {
|
|
52
|
+
args: buildArgs(mcpUrl(listenerPort)),
|
|
53
|
+
env: { [MCP_CREDENTIAL_ENV]: mcpCredentialFor(sessionId, agentToken) }
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
5
57
|
//#region session/core/spawn-env.ts
|
|
6
58
|
var GLIMMERVOID_SCRUB_KEYS = [
|
|
7
59
|
"GLIMMERVOID_PORT",
|
|
8
60
|
"GLIMMERVOID_CONFIG",
|
|
9
61
|
HOOK_URL_ENV,
|
|
10
62
|
AGENT_URL_ENV,
|
|
63
|
+
MCP_CREDENTIAL_ENV,
|
|
11
64
|
SIGN_URL_ENV,
|
|
12
65
|
SANE_YOLO_PATH_ENV,
|
|
13
66
|
...[
|
|
@@ -77,4 +130,4 @@ function buildAgentEnv(baseEnv, extraEnv, profile, { prependPathDirs = [] } = {}
|
|
|
77
130
|
return env;
|
|
78
131
|
}
|
|
79
132
|
//#endregion
|
|
80
|
-
export { buildAgentEnv as t };
|
|
133
|
+
export { mcpLaunchFor as n, parsePresentedCredential as r, buildAgentEnv as t };
|
|
@@ -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-
|
|
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-DAfljtgZ.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};
|
|
Binary file
|