glimmervoid 0.44.0 → 0.44.2
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/README.md +1 -1
- package/dist/bin/glimmervoid.js +8 -8
- package/dist/chunks/{adapters-CSRTLFiZ.js → adapters-7AfJ6yb3.js} +2 -2
- package/dist/chunks/{adapters-DjDtNufj.js → adapters-B_ss_kZh.js} +1 -1
- package/dist/chunks/{agent-api-cli-ep_5T7Hx.js → agent-api-cli-prUJ5ZGN.js} +1 -1
- package/dist/chunks/{agent-api-cli-CVgij_62.js → agent-api-cli-zwuWZlwk.js} +1 -1
- package/dist/chunks/{agent-api-core-DmPT6Hc_.js → agent-api-core-DQwd2ClI.js} +1 -1
- package/dist/chunks/{config-CGRYpcBQ.js → config-DlKkg6IX.js} +16 -1
- package/dist/chunks/{config-store-B1u3WA5t.js → config-store-DIrwF5iQ.js} +51 -7
- package/dist/chunks/config-store-LYSRHNQs.js +1 -0
- package/dist/chunks/{contracts-Fup4hhP9.js → contracts-lxJ0sQEl.js} +48 -15
- package/dist/chunks/{main-DPtmg7Bn.js → main-BCbulgNv.js} +352 -45
- package/dist/chunks/{pair-cli-BwOTWShx.js → pair-cli-B3VRcrHm.js} +2 -2
- package/dist/chunks/{remote-config-DWWnz5dP.js → remote-config-C91HwjWq.js} +1 -1
- package/dist/chunks/{settings-cli-C_owm3rw.js → settings-cli-C9eCc60b.js} +4 -4
- package/dist/chunks/{settings-readout-core-C_JzSeF7.js → settings-readout-core-DK1m5TUq.js} +1 -1
- package/dist/chunks/{ssh-sign-cli-CDjUtDKa.js → ssh-sign-cli-DCnHgHqo.js} +1 -1
- package/dist/client/assets/action-status-DXcC95xv.js +1 -0
- package/dist/client/assets/action-status-DXcC95xv.js.br +0 -0
- package/dist/client/assets/benchmark-panel-Cssmnd3z.js +1 -0
- package/dist/client/assets/benchmark-panel-Cssmnd3z.js.br +0 -0
- package/dist/client/assets/dom-helpers-CcEFPh-F.js +4 -0
- package/dist/client/assets/dom-helpers-CcEFPh-F.js.br +0 -0
- package/dist/client/assets/hooks-panel-Cli8EeBB.js +1 -0
- package/dist/client/assets/hooks-panel-Cli8EeBB.js.br +0 -0
- package/dist/client/assets/index-C3nOrTwM.css +2 -0
- package/dist/client/assets/index-C3nOrTwM.css.br +0 -0
- package/dist/client/assets/index-C8u3ZjM3.js +173 -0
- package/dist/client/assets/index-C8u3ZjM3.js.br +0 -0
- package/dist/client/assets/issues-panel-Bev1wadi.js +1 -0
- package/dist/client/assets/issues-panel-Bev1wadi.js.br +0 -0
- package/dist/client/assets/modal-CvDX5-_2.js +1 -0
- package/dist/client/assets/modal-CvDX5-_2.js.br +0 -0
- package/dist/client/assets/poll-ago-Dj148faJ.js +1 -0
- package/dist/client/assets/poll-ago-Dj148faJ.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-Jleg5z3W.js +1 -0
- package/dist/client/assets/pr-queue-columns-Jleg5z3W.js.br +0 -0
- package/dist/client/assets/radar-panel-Dtp4ZzT3.js +1 -0
- package/dist/client/assets/radar-panel-Dtp4ZzT3.js.br +0 -0
- package/dist/client/assets/review-queue-panel-BQvU_-xl.js +2 -0
- package/dist/client/assets/review-queue-panel-BQvU_-xl.js.br +0 -0
- package/dist/client/assets/settings-panel-DegKCsoZ.js +3 -0
- package/dist/client/assets/settings-panel-DegKCsoZ.js.br +0 -0
- package/dist/client/assets/sprite-bee-DwCVghaj.png +0 -0
- package/dist/client/assets/sprite-cat-DRx9MYM3.png +0 -0
- package/dist/client/assets/sprite-cow-BX3Phf6B.png +0 -0
- package/dist/client/assets/sprite-deer-DwQYMzDV.png +0 -0
- package/dist/client/assets/sprite-dragon-CTIHOQJ3.png +0 -0
- package/dist/client/assets/sprite-fox-BI43RV3z.png +0 -0
- package/dist/client/assets/sprite-frog-CwGTpt-c.png +0 -0
- package/dist/client/assets/sprite-giraffe-DwM3MmKG.png +0 -0
- package/dist/client/assets/sprite-hamster-WN4q03Wr.png +0 -0
- package/dist/client/assets/sprite-hedgehog-CM9XZtPS.png +0 -0
- package/dist/client/assets/sprite-horse-B5CMO0Ue.png +0 -0
- package/dist/client/assets/sprite-owl-BybpXmvP.png +0 -0
- package/dist/client/assets/sprite-panda-DxAHDNb3.png +0 -0
- package/dist/client/assets/sprite-penguin-Du588fg8.png +0 -0
- package/dist/client/assets/sprite-pig-BTuwvuhq.png +0 -0
- package/dist/client/assets/sprite-red-panda-5y9J8xSy.png +0 -0
- package/dist/client/assets/sprite-sheep-vHUTjc5U.png +0 -0
- package/dist/client/assets/sprite-unicorn-CJ3g8Zet.png +0 -0
- package/dist/client/assets/sprite-whale-C3Galw4z.png +0 -0
- package/dist/client/assets/trace-panel-DFqImX92.js +1 -0
- package/dist/client/assets/trace-panel-DFqImX92.js.br +0 -0
- package/dist/client/assets/trail-acacia-5Fr79eBl.png +0 -0
- package/dist/client/assets/trail-acacia-frame2-D83GtoaY.png +0 -0
- package/dist/client/assets/trail-acacia-frame3-BBXTo5I-.png +0 -0
- package/dist/client/assets/trail-acacia-frame4-Xv9ZEsyD.png +0 -0
- package/dist/client/assets/trail-acorns-BOCEZemb.png +0 -0
- package/dist/client/assets/trail-acorns-frame2-BhHnaBud.png +0 -0
- package/dist/client/assets/trail-acorns-frame3-DKXXievy.png +0 -0
- package/dist/client/assets/trail-acorns-frame4-Ch2VXeMA.png +0 -0
- package/dist/client/assets/trail-bamboo-GqKJxCTV.png +0 -0
- package/dist/client/assets/trail-bamboo-frame2-bHacG8f_.png +0 -0
- package/dist/client/assets/trail-bamboo-frame3-CaoctCwJ.png +0 -0
- package/dist/client/assets/trail-bamboo-frame4-CqBfq3ff.png +0 -0
- package/dist/client/assets/trail-bubbles-frame2-eNpysXFZ.png +0 -0
- package/dist/client/assets/trail-bubbles-frame3-CWwqOJLM.png +0 -0
- package/dist/client/assets/trail-bubbles-frame4-Dj9TUXsV.png +0 -0
- package/dist/client/assets/trail-bubbles-pZ5FzCq7.png +0 -0
- package/dist/client/assets/trail-clouds-D18nQlSc.png +0 -0
- package/dist/client/assets/trail-clouds-frame2-W-_5l_i2.png +0 -0
- package/dist/client/assets/trail-clouds-frame3-CGQnOEBI.png +0 -0
- package/dist/client/assets/trail-clouds-frame4-CvlkFN6d.png +0 -0
- package/dist/client/assets/trail-clover-Ci7hUdO0.png +0 -0
- package/dist/client/assets/trail-clover-frame2-Z6NRhQ3U.png +0 -0
- package/dist/client/assets/trail-clover-frame3-0srIKU22.png +0 -0
- package/dist/client/assets/trail-clover-frame4-BO9UjM_-.png +0 -0
- package/dist/client/assets/trail-daisies-DVEPmnHq.png +0 -0
- package/dist/client/assets/trail-daisies-frame2-C_3-bnO5.png +0 -0
- package/dist/client/assets/trail-daisies-frame3-CR7GzXzm.png +0 -0
- package/dist/client/assets/trail-daisies-frame4-CKQDb8cR.png +0 -0
- package/dist/client/assets/trail-dust-Cf48D_ja.png +0 -0
- package/dist/client/assets/trail-dust-frame2-DAisulyH.png +0 -0
- package/dist/client/assets/trail-dust-frame3-BLi-DUzo.png +0 -0
- package/dist/client/assets/trail-dust-frame4-DGXo_Q2f.png +0 -0
- package/dist/client/assets/trail-embers-c-vlGDDo.png +0 -0
- package/dist/client/assets/trail-embers-frame2-wCK1DXpW.png +0 -0
- package/dist/client/assets/trail-embers-frame3-C5QS1ZRt.png +0 -0
- package/dist/client/assets/trail-embers-frame4-DA-O9bwZ.png +0 -0
- package/dist/client/assets/trail-hearts-DQwkXjr0.png +0 -0
- package/dist/client/assets/trail-hearts-frame2-DbyTUdl2.png +0 -0
- package/dist/client/assets/trail-hearts-frame3-XHaluU_W.png +0 -0
- package/dist/client/assets/trail-hearts-frame4-BA0W9inL.png +0 -0
- package/dist/client/assets/trail-honey-BC7CvXOJ.png +0 -0
- package/dist/client/assets/trail-honey-frame2-C4tRQx2J.png +0 -0
- package/dist/client/assets/trail-honey-frame3-V4pdDsZr.png +0 -0
- package/dist/client/assets/trail-honey-frame4-BqfUOIZk.png +0 -0
- package/dist/client/assets/trail-leaves-Di39skyY.png +0 -0
- package/dist/client/assets/trail-leaves-frame2-Dibep-05.png +0 -0
- package/dist/client/assets/trail-leaves-frame3-ByxojOFR.png +0 -0
- package/dist/client/assets/trail-leaves-frame4-CQGuAWJE.png +0 -0
- package/dist/client/assets/trail-logomarks-eIe8WIQx.png +0 -0
- package/dist/client/assets/trail-logomarks-frame2-Dw7X4i4F.png +0 -0
- package/dist/client/assets/trail-logomarks-frame3-CwoFgR8k.png +0 -0
- package/dist/client/assets/trail-logomarks-frame4-B7tFxRZO.png +0 -0
- package/dist/client/assets/trail-paws-C4cgGpTt.png +0 -0
- package/dist/client/assets/trail-paws-frame2-D8gNCPFb.png +0 -0
- package/dist/client/assets/trail-paws-frame3-BiEhbm80.png +0 -0
- package/dist/client/assets/trail-paws-frame4-BLLXXSyZ.png +0 -0
- package/dist/client/assets/trail-rainbow-BavE03WZ.png +0 -0
- package/dist/client/assets/trail-rainbow-frame2-BGZ7ZuQD.png +0 -0
- package/dist/client/assets/trail-rainbow-frame3-CY3FOgWe.png +0 -0
- package/dist/client/assets/trail-rainbow-frame4-DPWH6W3T.png +0 -0
- package/dist/client/assets/trail-seeds-BVCYzFRY.png +0 -0
- package/dist/client/assets/trail-seeds-frame2-CgopUUJh.png +0 -0
- package/dist/client/assets/trail-seeds-frame3-D2rIJzox.png +0 -0
- package/dist/client/assets/trail-seeds-frame4-WbnqCHlJ.png +0 -0
- package/dist/client/assets/trail-snow-BmXmGNtx.png +0 -0
- package/dist/client/assets/trail-snow-frame2-BQC5GITf.png +0 -0
- package/dist/client/assets/trail-snow-frame3-1GIpb4hr.png +0 -0
- package/dist/client/assets/trail-snow-frame4-BB4B66p3.png +0 -0
- package/dist/client/assets/trail-sparkles-D3Ivb6ob.png +0 -0
- package/dist/client/assets/trail-sparkles-frame2-DR03q4T0.png +0 -0
- package/dist/client/assets/trail-sparkles-frame3-DtdWWuVM.png +0 -0
- package/dist/client/assets/trail-sparkles-frame4-ea8pBjiu.png +0 -0
- package/dist/client/assets/trail-stars-EgySiFbH.png +0 -0
- package/dist/client/assets/trail-stars-frame2-BOXk5jcm.png +0 -0
- package/dist/client/assets/trail-stars-frame3-DJ2AW0RA.png +0 -0
- package/dist/client/assets/trail-stars-frame4-BcSJ1AVu.png +0 -0
- package/dist/client/assets/ui-prefs-CavQQH-s.js +1 -0
- package/dist/client/assets/ui-prefs-CavQQH-s.js.br +0 -0
- package/dist/client/assets/usage-panel-CEJqXYIA.js +1 -0
- package/dist/client/assets/usage-panel-CEJqXYIA.js.br +0 -0
- package/dist/client/assets/visions-panel-Dm3iKlhv.js +1 -0
- package/dist/client/assets/visions-panel-Dm3iKlhv.js.br +0 -0
- package/dist/client/assets/xterm-BdQ2Kshh.js +79 -0
- package/dist/client/assets/xterm-BdQ2Kshh.js.br +0 -0
- package/dist/client/assets/zod-BRLv4KqJ.js.br +0 -0
- package/dist/client/fonts/CommitMono-OFL.txt.br +0 -0
- package/dist/client/fonts/commit-mono-400-regular-core.woff2 +0 -0
- package/dist/client/fonts/commit-mono-700-regular-core.woff2 +0 -0
- package/dist/client/index.html +10 -5
- package/dist/client/index.html.br +0 -0
- package/dist/client/octicons-LICENSE.txt.br +3 -0
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/config-store-D4vUBcUX.js +0 -1
- package/dist/client/assets/index-BedqDfKJ.js +0 -177
- package/dist/client/assets/index-o9J4_Orv.css +0 -2
- package/dist/client/assets/xterm-kR64YvZ-.js +0 -79
- package/dist/client/fonts/commit-mono-400-italic.woff2 +0 -0
- package/dist/client/fonts/commit-mono-700-italic.woff2 +0 -0
|
@@ -4,9 +4,9 @@ import { a as sanitizeWorktreeName, i as safePathSegment, n as equalsIgnoringCas
|
|
|
4
4
|
import { c as resolvePackageBin, i as clientDir, n as bundled, o as packageRoot, r as cliPath, s as relayPath, t as assetRoot } from "./runtime-paths-ghcH9CeW.js";
|
|
5
5
|
import { $ as MyPrMergeWhenReadyRequest, $t as RESTARTABLE_STATES, A as SESSION_NAME_RULE_TEXT, At as TeamReviewStateEntry, Bt as HEX_SHA_RE, C as ConversationQuestion, Ct as ReviewResult, D as SESSION_DOC_BODY_CAP_BYTES, Et as TeamReviewActionRequest, Ft as canApproveAfterComment, G as MyPrCheckContextsResponse, Gt as repoParts, H as MyPr, Ht as GH_SEGMENT, It as decisionAsIfApprovalRequired, J as MyPrLaneEntry, K as MyPrKeepMergeableRequest, L as SshSignRequest, M as SSH_SIGN_BODY_CAP_BYTES, Mt as TeamReviewThreadCommentsResponse, Nt as TeamReviewThreadResult, Ot as TeamReviewCompareFiles, Pt as TeamReviewThreadsRepository, Q as MyPrMergeStateResponse, Qt as MERGEABLE_LIVE_STATES, Rt as hasStandingViewerApproval, St as ReviewFinding, Tt as ReviewVerdict, U as MyPrAutoRebase, Ut as NODE_ID_RE, V as LinkedPr, Vt as shortSha, W as MyPrCheckContext, Wt as REPO_SLUG_RE, X as MyPrMergeRequest, Xt as BADGE_LABELS, Y as MyPrMergeMethod, Zt as KILLABLE_STATES, _ as CONVERSATION_PERMISSION_HOOK_EVENT, _t as PrDetail, at as MyPrsState, bt as ReviewComment, dt as DECIDING_REVIEW_STATES, en as STATES, ft as EarlierReview, g as CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS, gt as PostingPlan, h as COHERENCE_HOOKS_INACTIVE, ht as GithubReviewState, it as MyPrsSnapshot, j as SIGN_URL_ENV, jt as TeamReviewStatus, k as SESSION_NAME_PATTERN, kt as TeamReviewResolveResponse, n as AGENT_URL_ENV, nt as MyPrThreadNode, pt as FindingSeverity, r as ASK_USER_QUESTION_TOOL_NAME, rt as MyPrThreadsResponse, ut as CommitSha, v as CONVERSATION_TOOL_RESULT_HOOK_EVENT, vt as QueuedReview, wt as ReviewThreadId, xt as ReviewDraft, z as TaskTitle } from "./session-CUc6d7aS.js";
|
|
6
6
|
import { n as execFileAsync, o as spawn, r as execFileSync, t as execFile } from "./child-process-safe-D4hyVIXj.js";
|
|
7
|
-
import { A as
|
|
7
|
+
import { A as BenchmarkId, At as parseExitPlanModeHookPayload, B as GithubPrKey, Ct as PLAN_BODY_CAP_BYTES, D as pullRequestKeyFromReference, Dt as PLAN_TOOL_NAME, Et as PLAN_RESULT_HOOK_EVENT, F as CommitComparison, Ft as IssueUpdate, G as WorkflowLabelName, H as GithubPrsFrame, I as MergedPrListing, It as IssuesSearchResponse, K as WorkflowsSettings, L as MinedPrReviewData, Lt as IssuesState, M as BenchmarkRun, Mt as GithubIssuePullRequestsRepository, N as BenchmarkStatus, Nt as GithubIssueResponse, O as BenchmarkActionRequest, Ot as PlanDecision, P as BenchmarkSuite, Pt as IssueKey, Q as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, R as PrCheckoutCaseInput, Rt as IssuesStatus, St as changeMapFactId, Tt as PLAN_HOOK_OUTPUT_MAX_CHARS, U as comparablePrKey, V as GithubPrLightSearchNode, W as WorkflowCommentBody, _t as MAX_RAW_LINE_CHARS, a as ConfigUpdate, b as ClientMessage, bt as CoherenceJournalOutput, g as CHANGES_POLL_INTERVAL_MS, gt as SessionSetup, ht as UpdateJournal, j as BenchmarkJudgement, jt as planTitle, k as BenchmarkCase, kt as PlanRevision, l as configIssueMessage, m as USAGE_VENDOR_KEYS, p as USAGE_COST_MODES, q as WorkflowsState, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, ut as USAGE_INTEGER_RANGES, v as CLIENT_LOG_TEXT_MAX_CHARS, vt as TraceCheckpoint, wt as PLAN_HOOK_EVENT, xt as ChangeMap, y as CONTROL_FRAME_MAX_BYTES, yt as TraceRecord, z as GithubPrDetailNode, zt as issuePullRequestStateFromGithub } from "./config-DlKkg6IX.js";
|
|
8
8
|
import { a as permitsHelpCommand, r as describeSessionLimits } from "./session-routes--hrsvv7a.js";
|
|
9
|
-
import { A as seedTaskTitleSources, B as listRepoWorktreePaths, C as extractPromptTaskTitle, D as parseRefinedTaskTitle, E as parseRefinedSessionName, F as resumePromptFor, I as shouldAdoptReportedResumeId, L as claudeProjectsDir, M as RESUME_ID_RE, N as pickAutoResume, O as resolveRefocusTaskTitle, P as resolveResumeTarget, R as encodeProjectDir, S as extractOscTaskTitle, T as isSubstantivePrompt, V as isAutoNameOf, _ as buildTaskTitleRefinementPrompt, a as decideSpawnAllowance, b as decideTaskTitleRefinement, c as describeKeptChildAttention, d as describeUnpushedCloseRefusal, g as buildPersistedTaskTitle, h as projectReviews, i as decideAgentRequest, j as AUTO_CONTINUE_PROMPT, k as resolveTaskTitle, l as describePushLanding, m as projectMyPrs, n as REFUSAL_REASON, o as deriveChildSessionName, p as parseAgentVerb, s as describeChildEndNote, u as describeRoleRefusal, v as chooseRefinedSessionName, w as isSelfWakePrompt, x as extractAiTitle, y as cleanTaskPrompt, z as listRepoConversations } from "./agent-api-core-
|
|
9
|
+
import { A as seedTaskTitleSources, B as listRepoWorktreePaths, C as extractPromptTaskTitle, D as parseRefinedTaskTitle, E as parseRefinedSessionName, F as resumePromptFor, I as shouldAdoptReportedResumeId, L as claudeProjectsDir, M as RESUME_ID_RE, N as pickAutoResume, O as resolveRefocusTaskTitle, P as resolveResumeTarget, R as encodeProjectDir, S as extractOscTaskTitle, T as isSubstantivePrompt, V as isAutoNameOf, _ as buildTaskTitleRefinementPrompt, a as decideSpawnAllowance, b as decideTaskTitleRefinement, c as describeKeptChildAttention, d as describeUnpushedCloseRefusal, g as buildPersistedTaskTitle, h as projectReviews, i as decideAgentRequest, j as AUTO_CONTINUE_PROMPT, k as resolveTaskTitle, l as describePushLanding, m as projectMyPrs, n as REFUSAL_REASON, o as deriveChildSessionName, p as parseAgentVerb, s as describeChildEndNote, u as describeRoleRefusal, v as chooseRefinedSessionName, w as isSelfWakePrompt, x as extractAiTitle, y as cleanTaskPrompt, z as listRepoConversations } from "./agent-api-core-DQwd2ClI.js";
|
|
10
10
|
import { a as positiveIntOr, c as textOr, i as numberOr, n as isRecord, o as positiveNumberOr, r as nonNegativeIntOr, s as rawTextOr, t as coercedNumberOr } from "./coerce-NSst8oRP.js";
|
|
11
11
|
import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-DFt-TemS.js";
|
|
12
12
|
import { i as parseCommandLine, n as warnWhenGitIsTooOld } from "./git-version-C3lznLS_.js";
|
|
@@ -21,13 +21,13 @@ import { n as DEFAULT_MAX_MS, r as nextBackoffMs, t as DEFAULT_BASE_MS } from ".
|
|
|
21
21
|
import { n as unrefTimer, t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.js";
|
|
22
22
|
import { n as shellQuote } from "./hook-command-core-qTNK-xMF.js";
|
|
23
23
|
import { C as parseCgroupBytes, S as memoryReserveBytes, T as parseMemAvailableBytes, _ as createSpawnGate, a as jsonStateLoadError, b as cgroupLimitBytes, c as loadedJsonValue, d as writeJsonAtomicSync, f as writeTextAtomic, g as createSerialQueue, h as createMemoryAdmission, i as createJsonStateWriter, m as createKeyedSerialQueue, n as appendJsonLines, o as loadJsonStateFile, p as writeTextAtomicSync, r as createJsonStateStore, s as loadJsonStateFileSync, t as appendJsonLine, u as writeJsonAtomic, v as isQueueAdmissionTimeout, w as parseCgroupV2Path, x as headroomFromReadings, y as cgroupAncestorPaths } from "./json-file-DFCTvPjj.js";
|
|
24
|
-
import {
|
|
25
|
-
import { a as parseDataClientMessage, c as PendingCrashReport, d as TelemetryState, i as
|
|
26
|
-
import { A as dedupeCodexFiles, B as shouldPersistWarehouse, C as shortSha$1, D as codexSessionIdFromPath, E as codexRootCandidates, F as passOutcome, H as claudeCode, I as projectDirCandidates, L as resolveProjectsDirs, M as grokHomes, N as grokRootCandidates, O as continuationDelayMs, P as isUsageFile, R as scopedClaudeRoots, S as parseResolvedSha, T as codexHomes, V as splitLines$1, _ as isCheckFresh, a as describeAgentResolvability, b as parseRegistryDeprecation, c as isKnownAgentId, d as resolveAdapter, f as setCustomAgents, g as decideUpdateStatus, h as decideInstallFlavor, i as customAgentFingerprint, j as expandTilde, k as decideFileRead, l as listAgentIds, m as readHostCodexVersion, n as cachedAgentResolvability, o as getAdapter, p as codex, r as commandFor, s as hookProfileOf, t as DEFAULT_AGENT_ID, u as resetCommandCache, v as normalizeSha, w as codexFallbackRoots, x as parseRegistryLatest, y as normalizeUpdateChannel, z as shouldEvaluateDespiteIoFailures } from "./adapters-
|
|
24
|
+
import { B as buildExceptionProperties, F as TELEMETRY_BATCH_URL, G as decideIsDevInstall, H as classifySessionExit, I as TELEMETRY_FLAGS_URL, J as exceptionFingerprint, K as decideRemoteTelemetryState, L as adapterBucket, P as FIRST_RUN_NOTICE, R as buildAiGenerationEvents, U as claudeAccountUuidOf, V as buildPersonProperties, W as codexUserIdOf, X as parsePosthogReleaseId, Y as nodeMajorVersion, Z as resolveProjectToken, a as generateProjectId, at as planWorktreeGc, b as validateSettingsBlock, ct as worktreeIntegrationTips, d as assetForPlatform, dt as isSameDirectoryPath, et as stableConfigKey, f as decideRtkInstall, g as verifyDigest, h as isRtkBinaryName, i as ensureProjectIds, it as planBranchGc, lt as canonicalizePath, m as installTargetPath, n as DEFAULT_CONFIG, nt as DEFAULT_BRANCH_GC_PREFIXES, o as glimmervoidHomeDir$1, ot as sessionIdFromBranch, p as findEscapingArchiveMember, q as decideTelemetryConsent, r as createConfigStore, rt as matchedPrefix, st as usablePrefixes, t as ABORT_CONFIG_SAVE, ut as comparableDirectoryPath, v as mergeSettingsBlock, y as settingsBlockSpecFor, z as buildBrowserExceptionProperties } from "./config-store-DIrwF5iQ.js";
|
|
25
|
+
import { a as parseDataClientMessage, c as PendingCrashReport, d as TelemetryState, i as parseDataAttach, l as TELEMETRY_EVENT_SCHEMAS, n as HookEnvelope, o as DashboardTelemetryReport, r as DEEP_HISTORY_SCROLLBACK_LINES, t as HTTP_URL_RE } from "./contracts-lxJ0sQEl.js";
|
|
26
|
+
import { A as dedupeCodexFiles, B as shouldPersistWarehouse, C as shortSha$1, D as codexSessionIdFromPath, E as codexRootCandidates, F as passOutcome, H as claudeCode, I as projectDirCandidates, L as resolveProjectsDirs, M as grokHomes, N as grokRootCandidates, O as continuationDelayMs, P as isUsageFile, R as scopedClaudeRoots, S as parseResolvedSha, T as codexHomes, V as splitLines$1, _ as isCheckFresh, a as describeAgentResolvability, b as parseRegistryDeprecation, c as isKnownAgentId, d as resolveAdapter, f as setCustomAgents, g as decideUpdateStatus, h as decideInstallFlavor, i as customAgentFingerprint, j as expandTilde, k as decideFileRead, l as listAgentIds, m as readHostCodexVersion, n as cachedAgentResolvability, o as getAdapter, p as codex, r as commandFor, s as hookProfileOf, t as DEFAULT_AGENT_ID, u as resetCommandCache, v as normalizeSha, w as codexFallbackRoots, x as parseRegistryLatest, y as normalizeUpdateChannel, z as shouldEvaluateDespiteIoFailures } from "./adapters-7AfJ6yb3.js";
|
|
27
27
|
import { t as HOOK_TOOLS } from "./hook-tools-Dl7-r2Eb.js";
|
|
28
28
|
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";
|
|
29
|
-
import { a as configSiblingPath, c as defaultPairingsPath, d as decideDeviceAuth, f as deviceNameFromUserAgent, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, p as hashSecret, r as validateRemoteConfig, s as createSeenStore, t as decideBindHost, u as DEFAULT_DEVICE_MAX_AGE_MS } from "./remote-config-
|
|
30
|
-
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-
|
|
29
|
+
import { a as configSiblingPath, c as defaultPairingsPath, d as decideDeviceAuth, f as deviceNameFromUserAgent, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, p as hashSecret, r as validateRemoteConfig, s as createSeenStore, t as decideBindHost, u as DEFAULT_DEVICE_MAX_AGE_MS } from "./remote-config-C91HwjWq.js";
|
|
30
|
+
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-DK1m5TUq.js";
|
|
31
31
|
import { _ as escapeMarkup, g as createLaneLog, n as createVisionsSetup } from "./visions-setup-VMMyqOpl.js";
|
|
32
32
|
import { t as getRtkPath } from "./rtk-resolver-BDHi6RMv.js";
|
|
33
33
|
import { createRequire } from "node:module";
|
|
@@ -2153,11 +2153,71 @@ function createBackendHttpApp(dependencies) {
|
|
|
2153
2153
|
mountCustomSoundRoutes(app, { soundsDir: customSoundsDir });
|
|
2154
2154
|
if (staticDir === "auto") {
|
|
2155
2155
|
if (!fs.existsSync(path.join(clientDir, "index.html"))) throw Object.assign(/* @__PURE__ */ new Error("Dashboard build not found (dist/client). Run `npm run build` first, or use `npm run dev`."), { glimmervoidBoot: true });
|
|
2156
|
-
app
|
|
2156
|
+
serveClientDir(app, clientDir);
|
|
2157
2157
|
}
|
|
2158
|
-
if (staticDir !== "auto" && typeof staticDir === "string") app
|
|
2158
|
+
if (staticDir !== "auto" && typeof staticDir === "string") serveClientDir(app, staticDir);
|
|
2159
2159
|
return app;
|
|
2160
2160
|
}
|
|
2161
|
+
var HASHED_ASSET_PREFIX = "/assets/";
|
|
2162
|
+
var ONE_YEAR_MS = 31536e6;
|
|
2163
|
+
function isHashedAssetPath(requestPath) {
|
|
2164
|
+
return requestPath.startsWith(HASHED_ASSET_PREFIX);
|
|
2165
|
+
}
|
|
2166
|
+
function acceptsBrotli(acceptEncoding) {
|
|
2167
|
+
return (Array.isArray(acceptEncoding) ? acceptEncoding.join(",") : acceptEncoding ?? "").split(",").some((entry) => {
|
|
2168
|
+
const [coding = "", ...parameters] = entry.trim().toLowerCase().split(";");
|
|
2169
|
+
if (coding.trim() !== "br") return false;
|
|
2170
|
+
const quality = parameters.map((parameter) => parameter.trim()).find((parameter) => parameter.startsWith("q="));
|
|
2171
|
+
return quality === void 0 || Number(quality.slice(2)) > 0;
|
|
2172
|
+
});
|
|
2173
|
+
}
|
|
2174
|
+
function resolveClientFile(rootDir, requestPath) {
|
|
2175
|
+
let decodedPath;
|
|
2176
|
+
try {
|
|
2177
|
+
decodedPath = decodeURIComponent(requestPath);
|
|
2178
|
+
} catch {
|
|
2179
|
+
return null;
|
|
2180
|
+
}
|
|
2181
|
+
if (decodedPath.includes("\0")) return null;
|
|
2182
|
+
const relativePath = decodedPath.endsWith("/") ? `${decodedPath}index.html` : decodedPath;
|
|
2183
|
+
const filePath = path.resolve(rootDir, `.${relativePath}`);
|
|
2184
|
+
if (!filePath.startsWith(path.resolve(rootDir) + path.sep)) return null;
|
|
2185
|
+
return filePath;
|
|
2186
|
+
}
|
|
2187
|
+
function createPrecompressedStatic(rootDir) {
|
|
2188
|
+
return (req, res, next) => {
|
|
2189
|
+
if (req.method !== "GET" && req.method !== "HEAD") return next();
|
|
2190
|
+
const filePath = resolveClientFile(rootDir, req.path);
|
|
2191
|
+
if (!filePath) return next();
|
|
2192
|
+
const compressedPath = `${filePath}.br`;
|
|
2193
|
+
fs$1.stat(compressedPath).then((compressedStat) => {
|
|
2194
|
+
if (!compressedStat.isFile()) return next();
|
|
2195
|
+
res.setHeader("Vary", "Accept-Encoding");
|
|
2196
|
+
if (!acceptsBrotli(req.headers["accept-encoding"])) return next();
|
|
2197
|
+
res.type(path.extname(filePath));
|
|
2198
|
+
res.setHeader("Content-Encoding", "br");
|
|
2199
|
+
const cacheOptions = isHashedAssetPath(req.path) ? {
|
|
2200
|
+
maxAge: ONE_YEAR_MS,
|
|
2201
|
+
immutable: true
|
|
2202
|
+
} : {};
|
|
2203
|
+
res.sendFile(path.relative(rootDir, compressedPath), {
|
|
2204
|
+
root: rootDir,
|
|
2205
|
+
...cacheOptions
|
|
2206
|
+
}, (error) => {
|
|
2207
|
+
if (!error || res.headersSent) return;
|
|
2208
|
+
res.removeHeader("Content-Encoding");
|
|
2209
|
+
next();
|
|
2210
|
+
});
|
|
2211
|
+
}).catch(() => next());
|
|
2212
|
+
};
|
|
2213
|
+
}
|
|
2214
|
+
function serveClientDir(app, rootDir) {
|
|
2215
|
+
app.use(createPrecompressedStatic(rootDir));
|
|
2216
|
+
app.use(express.static(rootDir, { setHeaders: (res, filePath) => {
|
|
2217
|
+
if (!filePath.startsWith(path.join(path.resolve(rootDir), "assets") + path.sep)) return;
|
|
2218
|
+
res.setHeader("Cache-Control", `public, max-age=${ONE_YEAR_MS / 1e3}, immutable`);
|
|
2219
|
+
} }));
|
|
2220
|
+
}
|
|
2161
2221
|
//#endregion
|
|
2162
2222
|
//#region server/host-url-opener.ts
|
|
2163
2223
|
var OPENER_EXIT_WINDOW_MS = 2e3;
|
|
@@ -5019,7 +5079,10 @@ function createWsSender(ws, opts = {}) {
|
|
|
5019
5079
|
let sentOffset = initialOffset;
|
|
5020
5080
|
let desynced = false;
|
|
5021
5081
|
let refusedOutOfBand = null;
|
|
5022
|
-
let isOutputPaused =
|
|
5082
|
+
let isOutputPaused = opts.isStartedPaused === true;
|
|
5083
|
+
let isScreenSnapshotOwed = opts.isStartedPaused === true;
|
|
5084
|
+
let heldAttachSnapshot = opts.heldAttachSnapshot ?? null;
|
|
5085
|
+
const onPausedData = opts.onPausedData ?? (() => {});
|
|
5023
5086
|
const bufferedAmount = () => ws.bufferedAmount || 0;
|
|
5024
5087
|
const isOpen = () => ws.readyState === OPEN;
|
|
5025
5088
|
const overHighWater = () => bufferedAmount() > cfg.highWaterMark;
|
|
@@ -5084,7 +5147,11 @@ function createWsSender(ws, opts = {}) {
|
|
|
5084
5147
|
scheduleImmediate(flushSend);
|
|
5085
5148
|
}
|
|
5086
5149
|
function onData(data) {
|
|
5087
|
-
if (destroyed ||
|
|
5150
|
+
if (destroyed || !isOpen()) return;
|
|
5151
|
+
if (isOutputPaused) {
|
|
5152
|
+
onPausedData();
|
|
5153
|
+
return;
|
|
5154
|
+
}
|
|
5088
5155
|
if (desynced && !overHighWater()) {
|
|
5089
5156
|
maybeBackfill();
|
|
5090
5157
|
return;
|
|
@@ -5131,6 +5198,12 @@ function createWsSender(ws, opts = {}) {
|
|
|
5131
5198
|
ws.send(payload);
|
|
5132
5199
|
return true;
|
|
5133
5200
|
}
|
|
5201
|
+
function sendDroppable(payload) {
|
|
5202
|
+
if (destroyed || !isOpen()) return false;
|
|
5203
|
+
if (refusedOutOfBand !== null || desynced || sendBuffer.length > 0 || overHighWater()) return false;
|
|
5204
|
+
ws.send(payload);
|
|
5205
|
+
return true;
|
|
5206
|
+
}
|
|
5134
5207
|
function pauseOutput() {
|
|
5135
5208
|
if (destroyed || isOutputPaused) return;
|
|
5136
5209
|
flushSend();
|
|
@@ -5153,6 +5226,20 @@ function createWsSender(ws, opts = {}) {
|
|
|
5153
5226
|
if (destroyed || !isOutputPaused) return;
|
|
5154
5227
|
isOutputPaused = false;
|
|
5155
5228
|
if (!source || !isOpen()) return;
|
|
5229
|
+
if (isScreenSnapshotOwed) {
|
|
5230
|
+
isScreenSnapshotOwed = false;
|
|
5231
|
+
const attachSnapshot = heldAttachSnapshot;
|
|
5232
|
+
heldAttachSnapshot = null;
|
|
5233
|
+
if (!(attachSnapshot !== null && !hasResizedWhilePaused && outputOffset - attachSnapshot.offset <= cfg.maxSendBuffer)) {
|
|
5234
|
+
resetToScreenSnapshot(readScreenSnapshot());
|
|
5235
|
+
return;
|
|
5236
|
+
}
|
|
5237
|
+
resetToScreenSnapshot(attachSnapshot);
|
|
5238
|
+
if (outputOffset <= sentOffset) return;
|
|
5239
|
+
desynced = true;
|
|
5240
|
+
maybeBackfill();
|
|
5241
|
+
return;
|
|
5242
|
+
}
|
|
5156
5243
|
const missedByteCount = outputOffset - sentOffset;
|
|
5157
5244
|
if (missedByteCount <= 0 && !desynced) return;
|
|
5158
5245
|
if (!hasResizedWhilePaused && missedByteCount <= cfg.maxSendBuffer) {
|
|
@@ -5166,6 +5253,7 @@ function createWsSender(ws, opts = {}) {
|
|
|
5166
5253
|
destroyed = true;
|
|
5167
5254
|
clearStall();
|
|
5168
5255
|
refusedOutOfBand = null;
|
|
5256
|
+
heldAttachSnapshot = null;
|
|
5169
5257
|
sendBuffer = "";
|
|
5170
5258
|
sendScheduled = false;
|
|
5171
5259
|
flushNextData = false;
|
|
@@ -5177,6 +5265,7 @@ function createWsSender(ws, opts = {}) {
|
|
|
5177
5265
|
markInputFlush,
|
|
5178
5266
|
sendImmediate,
|
|
5179
5267
|
sendOutOfBand,
|
|
5268
|
+
sendDroppable,
|
|
5180
5269
|
destroy
|
|
5181
5270
|
};
|
|
5182
5271
|
}
|
|
@@ -5207,6 +5296,7 @@ function sendPtySizeFrame(sender, size) {
|
|
|
5207
5296
|
};
|
|
5208
5297
|
sender.sendOutOfBand(Buffer.from(JSON.stringify(frame), "utf8"));
|
|
5209
5298
|
}
|
|
5299
|
+
var OUTPUT_BEAT_FRAME = Buffer.from(JSON.stringify({ type: "output-beat" }), "utf8");
|
|
5210
5300
|
function frameType(stamped) {
|
|
5211
5301
|
return typeof stamped.type === "string" ? stamped.type : "";
|
|
5212
5302
|
}
|
|
@@ -5214,11 +5304,13 @@ function createBackendWebSockets(dependencies) {
|
|
|
5214
5304
|
const { remote, remoteAuth, remoteListenerPort, allowedHosts, listenerPortsFor, tokenMatches, getSession, getVisionsLane, recordOutcome = () => {}, logger } = dependencies;
|
|
5215
5305
|
const controlWss = new WebSocketServer({
|
|
5216
5306
|
noServer: true,
|
|
5217
|
-
maxPayload: CONTROL_FRAME_MAX_BYTES
|
|
5307
|
+
maxPayload: CONTROL_FRAME_MAX_BYTES,
|
|
5308
|
+
perMessageDeflate: true
|
|
5218
5309
|
});
|
|
5219
5310
|
const dataWss = new WebSocketServer({
|
|
5220
5311
|
noServer: true,
|
|
5221
|
-
maxPayload: 2097152
|
|
5312
|
+
maxPayload: 2097152,
|
|
5313
|
+
perMessageDeflate: true
|
|
5222
5314
|
});
|
|
5223
5315
|
controlWss.on("connection", (socket) => {
|
|
5224
5316
|
recordOutcome("controlWsOpened");
|
|
@@ -5264,8 +5356,12 @@ function createBackendWebSockets(dependencies) {
|
|
|
5264
5356
|
return;
|
|
5265
5357
|
}
|
|
5266
5358
|
socket.on("error", (error) => reportDataSocketError(session, error));
|
|
5267
|
-
|
|
5268
|
-
|
|
5359
|
+
const attach = parseDataAttach(request.url);
|
|
5360
|
+
if (attach.history === "screen") {
|
|
5361
|
+
wireDataSocket(socket, session, sessionId, session.getScreenSnapshot(), {
|
|
5362
|
+
isAttachedPaused: attach.isOutputPaused,
|
|
5363
|
+
isDeepAttach: false
|
|
5364
|
+
});
|
|
5269
5365
|
return;
|
|
5270
5366
|
}
|
|
5271
5367
|
const messagesBeforeWiring = [];
|
|
@@ -5280,7 +5376,10 @@ function createBackendWebSockets(dependencies) {
|
|
|
5280
5376
|
socket.close(1008, "Session not found");
|
|
5281
5377
|
return;
|
|
5282
5378
|
}
|
|
5283
|
-
wireDataSocket(socket, session, sessionId, snapshot
|
|
5379
|
+
wireDataSocket(socket, session, sessionId, snapshot, {
|
|
5380
|
+
isAttachedPaused: attach.isOutputPaused,
|
|
5381
|
+
isDeepAttach: true
|
|
5382
|
+
});
|
|
5284
5383
|
for (const raw of messagesBeforeWiring) socket.emit("message", raw, false);
|
|
5285
5384
|
}, (error) => {
|
|
5286
5385
|
logger.warn(`[data-ws] Deep history failed for ${session.name}: ${String(error)}`);
|
|
@@ -5299,7 +5398,7 @@ function createBackendWebSockets(dependencies) {
|
|
|
5299
5398
|
timestamp: Date.now()
|
|
5300
5399
|
});
|
|
5301
5400
|
}
|
|
5302
|
-
function wireDataSocket(socket, session, sessionId, snapshot) {
|
|
5401
|
+
function wireDataSocket(socket, session, sessionId, snapshot, { isAttachedPaused, isDeepAttach }) {
|
|
5303
5402
|
let viewerSizes = sessionDataClients.get(sessionId);
|
|
5304
5403
|
if (!viewerSizes) {
|
|
5305
5404
|
viewerSizes = /* @__PURE__ */ new Map();
|
|
@@ -5323,17 +5422,27 @@ function createBackendWebSockets(dependencies) {
|
|
|
5323
5422
|
if (sessionDataClients.get(activeSessionId) !== viewerSizeMap) return;
|
|
5324
5423
|
applyResolvedSize(true);
|
|
5325
5424
|
};
|
|
5425
|
+
let lastOutputBeatAt = 0;
|
|
5426
|
+
const sendOutputBeat = () => {
|
|
5427
|
+
const now = Date.now();
|
|
5428
|
+
if (now - lastOutputBeatAt < 320) return;
|
|
5429
|
+
lastOutputBeatAt = now;
|
|
5430
|
+
sender.sendDroppable(OUTPUT_BEAT_FRAME);
|
|
5431
|
+
};
|
|
5326
5432
|
const sender = createWsSender(socket, {
|
|
5327
5433
|
source: { getBufferSince: (offset) => session.getBufferSince(offset) },
|
|
5328
|
-
startOffset: snapshot.offset
|
|
5434
|
+
startOffset: snapshot.offset,
|
|
5435
|
+
isStartedPaused: isAttachedPaused,
|
|
5436
|
+
heldAttachSnapshot: isAttachedPaused && isDeepAttach ? snapshot : null,
|
|
5437
|
+
onPausedData: sendOutputBeat
|
|
5329
5438
|
});
|
|
5330
5439
|
sendPtySizeFrame(sender, session.ptySize());
|
|
5331
|
-
if (snapshot.data) sender.sendImmediate(snapshot.data, 0);
|
|
5440
|
+
if (snapshot.data && !isAttachedPaused) sender.sendImmediate(snapshot.data, 0);
|
|
5332
5441
|
const dataListener = (data) => sender.onData(data);
|
|
5333
5442
|
session.on("data", dataListener);
|
|
5334
5443
|
const resizeListener = (size) => sendPtySizeFrame(sender, size);
|
|
5335
5444
|
session.on("resize", resizeListener);
|
|
5336
|
-
let resizeSeqAtPause = null;
|
|
5445
|
+
let resizeSeqAtPause = isAttachedPaused ? session.ptySize().seq : null;
|
|
5337
5446
|
socket.on("message", (raw) => {
|
|
5338
5447
|
const message = parseDataClientMessage(String(raw));
|
|
5339
5448
|
if (!message) return;
|
|
@@ -12998,7 +13107,7 @@ async function runCommandSafely(command, args, { env, timeoutMs, signal }) {
|
|
|
12998
13107
|
};
|
|
12999
13108
|
}
|
|
13000
13109
|
}
|
|
13001
|
-
async function readTextFileOrNull$
|
|
13110
|
+
async function readTextFileOrNull$2(filePath) {
|
|
13002
13111
|
return fs$1.readFile(filePath, "utf8").catch(() => null);
|
|
13003
13112
|
}
|
|
13004
13113
|
function sleepUnlessAborted(durationMs, signal) {
|
|
@@ -13022,7 +13131,7 @@ function loginEnvironment(env, connectedConfigDir) {
|
|
|
13022
13131
|
if (connectedConfigDir) operatorEnv.CLAUDE_CONFIG_DIR = connectedConfigDir;
|
|
13023
13132
|
return operatorEnv;
|
|
13024
13133
|
}
|
|
13025
|
-
function createClaudeCredentials({ platform = process.platform, homeDir = os.homedir(), connectedConfigDir = null, env = process.env, now = () => Date.now(), claudeCommand, runCommand = runCommandSafely, readTextFile = readTextFileOrNull$
|
|
13134
|
+
function createClaudeCredentials({ platform = process.platform, homeDir = os.homedir(), connectedConfigDir = null, env = process.env, now = () => Date.now(), claudeCommand, runCommand = runCommandSafely, readTextFile = readTextFileOrNull$2, sleep = sleepUnlessAborted }) {
|
|
13026
13135
|
const overrideToken = env["GLIMMERVOID_CLAUDE_OAUTH_TOKEN"] || null;
|
|
13027
13136
|
delete env[OVERRIDE_TOKEN_ENV];
|
|
13028
13137
|
async function readLoginTokenIn(configDir) {
|
|
@@ -50997,6 +51106,81 @@ function createChangeMapService({ sessions, runGit = runGitAsync, nowFn = Date.n
|
|
|
50997
51106
|
return { build };
|
|
50998
51107
|
}
|
|
50999
51108
|
//#endregion
|
|
51109
|
+
//#region server/core/changes-watch-core.ts
|
|
51110
|
+
function decideWatchRequest(current, request) {
|
|
51111
|
+
if (request.sessionId === null) return {
|
|
51112
|
+
next: current !== null && current.holder === request.holder ? null : current,
|
|
51113
|
+
shouldCheckNow: false
|
|
51114
|
+
};
|
|
51115
|
+
const isRenewal = current !== null && current.holder === request.holder && current.sessionId === request.sessionId;
|
|
51116
|
+
return {
|
|
51117
|
+
next: {
|
|
51118
|
+
holder: request.holder,
|
|
51119
|
+
sessionId: request.sessionId,
|
|
51120
|
+
renewedAtMs: request.nowMs
|
|
51121
|
+
},
|
|
51122
|
+
shouldCheckNow: !isRenewal
|
|
51123
|
+
};
|
|
51124
|
+
}
|
|
51125
|
+
function decidePollTick(current, tick) {
|
|
51126
|
+
if (current === null) return {
|
|
51127
|
+
next: null,
|
|
51128
|
+
sessionIdToCheck: null
|
|
51129
|
+
};
|
|
51130
|
+
if (tick.nowMs - current.renewedAtMs > 1e4 || !tick.isHolderOpen) return {
|
|
51131
|
+
next: null,
|
|
51132
|
+
sessionIdToCheck: null
|
|
51133
|
+
};
|
|
51134
|
+
return {
|
|
51135
|
+
next: current,
|
|
51136
|
+
sessionIdToCheck: current.sessionId
|
|
51137
|
+
};
|
|
51138
|
+
}
|
|
51139
|
+
//#endregion
|
|
51140
|
+
//#region server/changes-watch.ts
|
|
51141
|
+
function createChangesWatch({ findSession, isHolderOpen, setIntervalFn = DEFAULT_TIMER_FNS.setIntervalFn, clearIntervalFn = DEFAULT_TIMER_FNS.clearIntervalFn, nowFn = Date.now }) {
|
|
51142
|
+
let watch = null;
|
|
51143
|
+
let pollTimer = null;
|
|
51144
|
+
function syncPollTimer() {
|
|
51145
|
+
if (watch === null && pollTimer !== null) {
|
|
51146
|
+
clearIntervalFn(pollTimer);
|
|
51147
|
+
pollTimer = null;
|
|
51148
|
+
return;
|
|
51149
|
+
}
|
|
51150
|
+
if (watch === null || pollTimer !== null) return;
|
|
51151
|
+
pollTimer = unrefTimer(setIntervalFn(pollWatchedSession, CHANGES_POLL_INTERVAL_MS));
|
|
51152
|
+
}
|
|
51153
|
+
function checkSession(sessionId) {
|
|
51154
|
+
const session = findSession(sessionId);
|
|
51155
|
+
if (session) {
|
|
51156
|
+
session.worktreeLifecycle.scheduleCheck();
|
|
51157
|
+
return;
|
|
51158
|
+
}
|
|
51159
|
+
watch = null;
|
|
51160
|
+
}
|
|
51161
|
+
function pollWatchedSession() {
|
|
51162
|
+
const holderIsOpen = watch !== null && isHolderOpen(watch.holder);
|
|
51163
|
+
const tick = decidePollTick(watch, {
|
|
51164
|
+
nowMs: nowFn(),
|
|
51165
|
+
isHolderOpen: holderIsOpen
|
|
51166
|
+
});
|
|
51167
|
+
watch = tick.next;
|
|
51168
|
+
if (tick.sessionIdToCheck !== null) checkSession(tick.sessionIdToCheck);
|
|
51169
|
+
syncPollTimer();
|
|
51170
|
+
}
|
|
51171
|
+
function request(holder, sessionId) {
|
|
51172
|
+
const decision = decideWatchRequest(watch, {
|
|
51173
|
+
holder,
|
|
51174
|
+
sessionId,
|
|
51175
|
+
nowMs: nowFn()
|
|
51176
|
+
});
|
|
51177
|
+
watch = decision.next;
|
|
51178
|
+
if (decision.shouldCheckNow && watch !== null) checkSession(watch.sessionId);
|
|
51179
|
+
syncPollTimer();
|
|
51180
|
+
}
|
|
51181
|
+
return { request };
|
|
51182
|
+
}
|
|
51183
|
+
//#endregion
|
|
51000
51184
|
//#region server/control-handlers.ts
|
|
51001
51185
|
function isInsideGitCheckout(folderPath) {
|
|
51002
51186
|
const resolvedFolder = path.resolve(folderPath);
|
|
@@ -51363,6 +51547,10 @@ function registerControlHandlers(controlWss, deps) {
|
|
|
51363
51547
|
}
|
|
51364
51548
|
}), issueProjectRepos = null, serverBuild = () => null, getUsageSessions = null, getUsageReport = null, requestUsageReport = null, getPlanLimits = null, controlReplayLog = null, getRtkInstallStatus = () => null, telegramDelivery = null, resolveRtkPath = () => getRtkPath(), conversationFs = fs, conversationGit = runGitForConversationHistory, conversationProjectsDir = claudeProjectsDir(process.env, os.homedir()), readTracePage = null, readPlanRevision = null, decidePlanReview = null, sessionDocs = null, coherenceFeed = null, coderEnv = null, remoteRepoGit = null, agentConnect = null, remoteSetup = null } = deps;
|
|
51365
51549
|
const changeMaps = createChangeMapService({ sessions });
|
|
51550
|
+
const changesWatch = createChangesWatch({
|
|
51551
|
+
findSession: (id) => sessions.get(id) ?? agentSessions.get(id) ?? null,
|
|
51552
|
+
isHolderOpen: (ws) => ws.readyState === 1
|
|
51553
|
+
});
|
|
51366
51554
|
function buildSettingsPayload$1() {
|
|
51367
51555
|
return buildSettingsPayload({
|
|
51368
51556
|
configStore,
|
|
@@ -52967,6 +53155,7 @@ function registerControlHandlers(controlWss, deps) {
|
|
|
52967
53155
|
}));
|
|
52968
53156
|
}
|
|
52969
53157
|
},
|
|
53158
|
+
"watch-session-changes": (msg, ws) => changesWatch.request(ws, msg.id),
|
|
52970
53159
|
"request-change-map": async (msg, ws) => {
|
|
52971
53160
|
const s = findSession(msg);
|
|
52972
53161
|
if (!s) return;
|
|
@@ -53291,7 +53480,18 @@ function registerControlHandlers(controlWss, deps) {
|
|
|
53291
53480
|
stack: msg.stack
|
|
53292
53481
|
});
|
|
53293
53482
|
},
|
|
53483
|
+
"client-log": (msg) => {
|
|
53484
|
+
console.warn(`[dashboard] ${sanitizeOneLine(msg.scope, 64)}: ${sanitizeOneLine(msg.text, CLIENT_LOG_TEXT_MAX_CHARS)}`);
|
|
53485
|
+
},
|
|
53294
53486
|
"dashboard-telemetry": captureDashboardTelemetry,
|
|
53487
|
+
"request-telemetry-deletion": async (msg, ws) => {
|
|
53488
|
+
const ok = await deps.telemetry?.requestDataDeletion?.() ?? false;
|
|
53489
|
+
ws.send(JSON.stringify({
|
|
53490
|
+
type: "telemetry-deletion-result",
|
|
53491
|
+
requestId: msg.requestId || null,
|
|
53492
|
+
ok
|
|
53493
|
+
}));
|
|
53494
|
+
},
|
|
53295
53495
|
"request-health-snapshot": (_msg, ws) => {
|
|
53296
53496
|
if (!buildHealthSnapshot) return;
|
|
53297
53497
|
ws.send(JSON.stringify({
|
|
@@ -55208,6 +55408,10 @@ function parseCodexAuth(text) {
|
|
|
55208
55408
|
expiresAtMs: accessTokenExpiryMs(accessToken)
|
|
55209
55409
|
};
|
|
55210
55410
|
}
|
|
55411
|
+
function codexHomeDir(env, homeDir) {
|
|
55412
|
+
const override = env.CODEX_HOME?.trim();
|
|
55413
|
+
return override ? path.resolve(override) : path.join(homeDir, ".codex");
|
|
55414
|
+
}
|
|
55211
55415
|
function decideCodexLogin({ login, nowMs, hasRefreshed }) {
|
|
55212
55416
|
if (!login) return {
|
|
55213
55417
|
kind: "unavailable",
|
|
@@ -55244,13 +55448,9 @@ function chatgptAuthTokensRefreshResult(login) {
|
|
|
55244
55448
|
//#endregion
|
|
55245
55449
|
//#region server/codex-credentials.ts
|
|
55246
55450
|
var HOST_REFRESH_TIMEOUT_MS = 6e4;
|
|
55247
|
-
async function readTextFileOrNull(filePath) {
|
|
55451
|
+
async function readTextFileOrNull$1(filePath) {
|
|
55248
55452
|
return fs$1.readFile(filePath, "utf8").catch(() => null);
|
|
55249
55453
|
}
|
|
55250
|
-
function codexHomeDir(env, homeDir) {
|
|
55251
|
-
const override = env.CODEX_HOME?.trim();
|
|
55252
|
-
return override ? path.resolve(override) : path.join(homeDir, ".codex");
|
|
55253
|
-
}
|
|
55254
55454
|
function refreshHostLoginOverAppServer(command, env) {
|
|
55255
55455
|
return new Promise((resolve) => {
|
|
55256
55456
|
let child;
|
|
@@ -55327,7 +55527,7 @@ function refreshHostLoginOverAppServer(command, env) {
|
|
|
55327
55527
|
});
|
|
55328
55528
|
});
|
|
55329
55529
|
}
|
|
55330
|
-
function createCodexCredentials({ homeDir = os.homedir(), connectedCodexHome = null, env = process.env, now = () => Date.now(), codexCommand, refreshHostLogin = refreshHostLoginOverAppServer, readTextFile = readTextFileOrNull }) {
|
|
55530
|
+
function createCodexCredentials({ homeDir = os.homedir(), connectedCodexHome = null, env = process.env, now = () => Date.now(), codexCommand, refreshHostLogin = refreshHostLoginOverAppServer, readTextFile = readTextFileOrNull$1 }) {
|
|
55331
55531
|
let inFlightRefresh = null;
|
|
55332
55532
|
async function readLoginIn(codexHome) {
|
|
55333
55533
|
const stored = await readTextFile(path.join(codexHome, "auth.json"));
|
|
@@ -56321,6 +56521,11 @@ var STOP_SEND_TIMEOUT_MS = 2500;
|
|
|
56321
56521
|
var ACTIVE_HEARTBEAT_INTERVAL_MS = 864e5;
|
|
56322
56522
|
var REMOTE_SWITCH_CHECK_INTERVAL_MS = 864e5;
|
|
56323
56523
|
var CRASH_MONITOR_EVENT = "uncaughtExceptionMonitor";
|
|
56524
|
+
var PERSON_PROPERTY_EVENTS = /* @__PURE__ */ new Set(["app_started", "app_active"]);
|
|
56525
|
+
var NO_ACCOUNT_IDS = Object.freeze({
|
|
56526
|
+
claudeAccountUuid: null,
|
|
56527
|
+
codexUserId: null
|
|
56528
|
+
});
|
|
56324
56529
|
function createTelemetry(options) {
|
|
56325
56530
|
const fetchFn = options.fetchFn ?? globalThis.fetch;
|
|
56326
56531
|
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
@@ -56336,8 +56541,12 @@ function createTelemetry(options) {
|
|
|
56336
56541
|
is_bundled: options.isBundled,
|
|
56337
56542
|
is_dev_install: options.isDevInstall,
|
|
56338
56543
|
...options.releaseId ? { $release_id: options.releaseId } : {},
|
|
56339
|
-
$lib: "glimmervoid"
|
|
56340
|
-
|
|
56544
|
+
$lib: "glimmervoid"
|
|
56545
|
+
};
|
|
56546
|
+
const firstSeen = {
|
|
56547
|
+
appVersion: options.version,
|
|
56548
|
+
osPlatform: baseProperties.os_platform,
|
|
56549
|
+
installFlavor: options.installFlavor
|
|
56341
56550
|
};
|
|
56342
56551
|
let queue = [];
|
|
56343
56552
|
let state = null;
|
|
@@ -56425,6 +56634,26 @@ function createTelemetry(options) {
|
|
|
56425
56634
|
}
|
|
56426
56635
|
enqueue(event, parsed.data);
|
|
56427
56636
|
}
|
|
56637
|
+
async function readAccountIdsOrNone() {
|
|
56638
|
+
if (!options.readAccountIds) return NO_ACCOUNT_IDS;
|
|
56639
|
+
try {
|
|
56640
|
+
return await options.readAccountIds();
|
|
56641
|
+
} catch (error) {
|
|
56642
|
+
log.warnOnce("account-ids-failed", "could not read account ids", { error: errorKind(error) });
|
|
56643
|
+
return NO_ACCOUNT_IDS;
|
|
56644
|
+
}
|
|
56645
|
+
}
|
|
56646
|
+
async function withPersonProperties(batch) {
|
|
56647
|
+
if (!batch.some((queued) => PERSON_PROPERTY_EVENTS.has(queued.event))) return batch;
|
|
56648
|
+
const personProperties = buildPersonProperties(await readAccountIdsOrNone(), firstSeen);
|
|
56649
|
+
return batch.map((queued) => PERSON_PROPERTY_EVENTS.has(queued.event) ? {
|
|
56650
|
+
...queued,
|
|
56651
|
+
properties: {
|
|
56652
|
+
...queued.properties,
|
|
56653
|
+
...personProperties
|
|
56654
|
+
}
|
|
56655
|
+
} : queued);
|
|
56656
|
+
}
|
|
56428
56657
|
function captureExceptionOnce(properties) {
|
|
56429
56658
|
if (!isEnabled()) return;
|
|
56430
56659
|
const fingerprint = exceptionFingerprint(properties);
|
|
@@ -56510,14 +56739,23 @@ function createTelemetry(options) {
|
|
|
56510
56739
|
}
|
|
56511
56740
|
async function send(batch, timeoutMs) {
|
|
56512
56741
|
try {
|
|
56742
|
+
const outgoing = await withPersonProperties(batch);
|
|
56513
56743
|
const { installId } = await ensureInstallState();
|
|
56514
56744
|
if (!isCaptureAllowed()) return false;
|
|
56745
|
+
return await post(outgoing, installId, timeoutMs);
|
|
56746
|
+
} catch (error) {
|
|
56747
|
+
log.warnOnce("send-failed", "send failed", { error: error instanceof Error ? error.name : String(error) });
|
|
56748
|
+
return false;
|
|
56749
|
+
}
|
|
56750
|
+
}
|
|
56751
|
+
async function post(outgoing, installId, timeoutMs) {
|
|
56752
|
+
try {
|
|
56515
56753
|
const response = await fetchFn(TELEMETRY_BATCH_URL, {
|
|
56516
56754
|
method: "POST",
|
|
56517
56755
|
headers: { "Content-Type": "application/json" },
|
|
56518
56756
|
body: JSON.stringify({
|
|
56519
56757
|
api_key: resolveProjectToken(options.env),
|
|
56520
|
-
batch:
|
|
56758
|
+
batch: outgoing.map((queued) => ({
|
|
56521
56759
|
event: queued.event,
|
|
56522
56760
|
distinct_id: installId,
|
|
56523
56761
|
timestamp: queued.timestamp,
|
|
@@ -56623,11 +56861,52 @@ function createTelemetry(options) {
|
|
|
56623
56861
|
});
|
|
56624
56862
|
return true;
|
|
56625
56863
|
}
|
|
56864
|
+
function currentInstallId() {
|
|
56865
|
+
if (!isEnabled()) return null;
|
|
56866
|
+
return state?.installId ?? null;
|
|
56867
|
+
}
|
|
56868
|
+
async function writeStateDurably(nextState) {
|
|
56869
|
+
state = nextState;
|
|
56870
|
+
try {
|
|
56871
|
+
if (options.stateFilePath) await writeJsonAtomic(options.stateFilePath, nextState, { mkdir: true });
|
|
56872
|
+
} catch (error) {
|
|
56873
|
+
log.warnOnce("deletion-state-write-failed", "could not record the new install id", { error: errorKind(error) });
|
|
56874
|
+
return false;
|
|
56875
|
+
}
|
|
56876
|
+
await persistState(nextState);
|
|
56877
|
+
return true;
|
|
56878
|
+
}
|
|
56879
|
+
async function requestDataDeletion() {
|
|
56880
|
+
await stateStore.load();
|
|
56881
|
+
while (inFlightFlush) await inFlightFlush;
|
|
56882
|
+
const deletedState = state;
|
|
56883
|
+
if (!deletedState) return true;
|
|
56884
|
+
if (remoteTelemetryState === "disabled") return false;
|
|
56885
|
+
queue = [];
|
|
56886
|
+
clearFlushTimer();
|
|
56887
|
+
if (!await writeStateDurably({
|
|
56888
|
+
...deletedState,
|
|
56889
|
+
installId: randomUUID()
|
|
56890
|
+
})) {
|
|
56891
|
+
state = deletedState;
|
|
56892
|
+
return false;
|
|
56893
|
+
}
|
|
56894
|
+
if (await post([{
|
|
56895
|
+
event: "data_deletion_requested",
|
|
56896
|
+
timestamp: now().toISOString(),
|
|
56897
|
+
properties: {}
|
|
56898
|
+
}], deletedState.installId, SEND_TIMEOUT_MS)) {
|
|
56899
|
+
options.onInstallIdChange?.();
|
|
56900
|
+
return true;
|
|
56901
|
+
}
|
|
56902
|
+
await writeStateDurably(deletedState);
|
|
56903
|
+
return false;
|
|
56904
|
+
}
|
|
56626
56905
|
function applyConfig() {
|
|
56627
56906
|
const isLocalConsentNowGiven = isLocalConsentGiven();
|
|
56628
56907
|
const isLocalConsentTurnedOn = isLocalConsentNowGiven && !wasLocalConsentGiven;
|
|
56629
56908
|
wasLocalConsentGiven = isLocalConsentNowGiven;
|
|
56630
|
-
if (isLocalConsentTurnedOn) checkRemoteSwitch();
|
|
56909
|
+
if (isLocalConsentTurnedOn) checkRemoteSwitch().then(ensureInstallState).then(() => options.onInstallIdChange?.());
|
|
56631
56910
|
if (isCaptureAllowed()) return;
|
|
56632
56911
|
queue = [];
|
|
56633
56912
|
clearFlushTimer();
|
|
@@ -56646,7 +56925,25 @@ function createTelemetry(options) {
|
|
|
56646
56925
|
stop,
|
|
56647
56926
|
consumeFirstRunNotice,
|
|
56648
56927
|
applyConfig,
|
|
56649
|
-
isEnabled
|
|
56928
|
+
isEnabled,
|
|
56929
|
+
currentInstallId,
|
|
56930
|
+
requestDataDeletion
|
|
56931
|
+
};
|
|
56932
|
+
}
|
|
56933
|
+
function readTextFileOrNull(filePath) {
|
|
56934
|
+
return fs.promises.readFile(filePath, "utf8").catch(() => null);
|
|
56935
|
+
}
|
|
56936
|
+
function createAccountIdReader({ env, homeDir, readTextFile = readTextFileOrNull }) {
|
|
56937
|
+
async function readClaudeConfigText() {
|
|
56938
|
+
const [legacyConfigPath, currentConfigPath] = listClaudeGlobalConfigPathCandidates(env, homeDir);
|
|
56939
|
+
return await readTextFile(legacyConfigPath) ?? await readTextFile(currentConfigPath);
|
|
56940
|
+
}
|
|
56941
|
+
return async () => {
|
|
56942
|
+
const [claudeConfigText, codexAuthText] = await Promise.all([readClaudeConfigText(), readTextFile(path.join(codexHomeDir(env, homeDir), "auth.json"))]);
|
|
56943
|
+
return {
|
|
56944
|
+
claudeAccountUuid: claudeConfigText === null ? null : claudeAccountUuidOf(claudeConfigText),
|
|
56945
|
+
codexUserId: codexAuthText === null ? null : codexUserIdOf(codexAuthText)
|
|
56946
|
+
};
|
|
56650
56947
|
};
|
|
56651
56948
|
}
|
|
56652
56949
|
//#endregion
|
|
@@ -57097,7 +57394,10 @@ var AGENT_INGRESS_HOST = "127.0.0.1";
|
|
|
57097
57394
|
function createBackend(httpServer, options = {}) {
|
|
57098
57395
|
const { staticDir = "auto", settingsDefaults } = options;
|
|
57099
57396
|
const packageJson = JSON.parse(fs.readFileSync(path.join(packageRoot, "package.json"), "utf8"));
|
|
57100
|
-
const configStore = createConfigStore({
|
|
57397
|
+
const configStore = createConfigStore({
|
|
57398
|
+
settingsDefaults,
|
|
57399
|
+
readTelemetryInstallId: () => telemetry.currentInstallId()
|
|
57400
|
+
});
|
|
57101
57401
|
const { config } = configStore;
|
|
57102
57402
|
applyCustomAgents(config);
|
|
57103
57403
|
const port = process.env.GLIMMERVOID_PORT ? Number.parseInt(process.env.GLIMMERVOID_PORT, 10) : config.port || 3e3;
|
|
@@ -57109,6 +57409,7 @@ function createBackend(httpServer, options = {}) {
|
|
|
57109
57409
|
});
|
|
57110
57410
|
const serverBuild = `${packageJson.version}+${crypto.randomBytes(4).toString("hex")}`;
|
|
57111
57411
|
const installFlavor = detectInstallFlavor(packageRoot).flavor;
|
|
57412
|
+
let broadcastSettings = null;
|
|
57112
57413
|
const telemetry = createTelemetry({
|
|
57113
57414
|
config,
|
|
57114
57415
|
env: process.env,
|
|
@@ -57125,7 +57426,12 @@ function createBackend(httpServer, options = {}) {
|
|
|
57125
57426
|
defaultHomeDir: glimmervoidHomeDir(os.homedir(), {})
|
|
57126
57427
|
}),
|
|
57127
57428
|
releaseId: parsePosthogReleaseId(packageJson.glimmervoid?.posthogReleaseId),
|
|
57128
|
-
getActiveSessionCount: () => sessions.size + agentSessions.size
|
|
57429
|
+
getActiveSessionCount: () => sessions.size + agentSessions.size,
|
|
57430
|
+
readAccountIds: createAccountIdReader({
|
|
57431
|
+
env: process.env,
|
|
57432
|
+
homeDir: os.homedir()
|
|
57433
|
+
}),
|
|
57434
|
+
onInstallIdChange: () => broadcastSettings?.()
|
|
57129
57435
|
});
|
|
57130
57436
|
telemetry.watchForCrashes();
|
|
57131
57437
|
telemetry.startRemoteSwitchChecks();
|
|
@@ -57540,17 +57846,18 @@ function createBackend(httpServer, options = {}) {
|
|
|
57540
57846
|
httpServer.on("upgrade", handleUpgrade);
|
|
57541
57847
|
updateApply.startAfterListening(httpServer);
|
|
57542
57848
|
httpServer.once("listening", startPostTurnLeftoverCleanup);
|
|
57849
|
+
broadcastSettings = () => broadcastControl?.({
|
|
57850
|
+
type: "settings-updated",
|
|
57851
|
+
settings: buildSettingsPayload({
|
|
57852
|
+
configStore,
|
|
57853
|
+
rtkInstallStatus: rtkInstall.getStatus(),
|
|
57854
|
+
coderEnvironments: laneAssembly.coderEnv.availableEnvironments(),
|
|
57855
|
+
agentLogins: agentConnect.logins()
|
|
57856
|
+
})
|
|
57857
|
+
});
|
|
57543
57858
|
stopConfigWatch = configStore.watchForChanges((newConfig) => {
|
|
57544
57859
|
applyConfigReload(newConfig);
|
|
57545
|
-
|
|
57546
|
-
type: "settings-updated",
|
|
57547
|
-
settings: buildSettingsPayload({
|
|
57548
|
-
configStore,
|
|
57549
|
-
rtkInstallStatus: rtkInstall.getStatus(),
|
|
57550
|
-
coderEnvironments: laneAssembly.coderEnv.availableEnvironments(),
|
|
57551
|
-
agentLogins: agentConnect.logins()
|
|
57552
|
-
})
|
|
57553
|
-
});
|
|
57860
|
+
broadcastSettings?.();
|
|
57554
57861
|
});
|
|
57555
57862
|
updateCheck.start();
|
|
57556
57863
|
return {
|
|
@@ -57668,7 +57975,7 @@ server.listen(port, bind.host, () => {
|
|
|
57668
57975
|
sweepOrphanedHostScratch().catch((error) => {
|
|
57669
57976
|
console.warn(`Leftover scratch sweep failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
57670
57977
|
});
|
|
57671
|
-
telemetry.capture("app_started", {});
|
|
57978
|
+
telemetry.capture("app_started", { is_first_start: isFirstStart });
|
|
57672
57979
|
writeTerminalTitle(buildTitleSequence(`glimmervoid :${boundPort}`));
|
|
57673
57980
|
if (bind.reason === "insecure-bind") console.warn(`WARNING: bound ${bind.host} with GLIMMERVOID_INSECURE_BIND=1 - this listener has NO authentication.`);
|
|
57674
57981
|
});
|