glimmervoid 0.44.0 → 0.44.1
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 +8 -8
- package/dist/chunks/{adapters-DjDtNufj.js → adapters-B2IgKmuZ.js} +1 -1
- package/dist/chunks/{adapters-CSRTLFiZ.js → adapters-BsoXEvlZ.js} +2 -2
- package/dist/chunks/{agent-api-cli-ep_5T7Hx.js → agent-api-cli-B-QxkZAQ.js} +1 -1
- package/dist/chunks/{agent-api-cli-CVgij_62.js → agent-api-cli-DIl92JjQ.js} +1 -1
- package/dist/chunks/{agent-api-core-DmPT6Hc_.js → agent-api-core-BCFplxXu.js} +1 -1
- package/dist/chunks/{config-CGRYpcBQ.js → config-Dh4e-Mkv.js} +6 -0
- package/dist/chunks/{config-store-B1u3WA5t.js → config-store-CEsetno2.js} +51 -7
- package/dist/chunks/config-store-DVwdcnub.js +1 -0
- package/dist/chunks/{contracts-Fup4hhP9.js → contracts-dj-GFptp.js} +30 -6
- package/dist/chunks/{main-DPtmg7Bn.js → main-CA3ONCUS.js} +147 -32
- package/dist/chunks/{pair-cli-BwOTWShx.js → pair-cli-CWHMbInF.js} +2 -2
- package/dist/chunks/{remote-config-DWWnz5dP.js → remote-config-CtcoO10O.js} +1 -1
- package/dist/chunks/{settings-cli-C_owm3rw.js → settings-cli-DGOkkmW-.js} +4 -4
- package/dist/chunks/{settings-readout-core-C_JzSeF7.js → settings-readout-core-BVb6tTLq.js} +1 -1
- package/dist/chunks/{ssh-sign-cli-CDjUtDKa.js → ssh-sign-cli-BdvvBKkj.js} +1 -1
- package/dist/client/assets/index-BR-wN5UF.js +177 -0
- package/dist/client/assets/{index-o9J4_Orv.css → index-QxVyoSUP.css} +1 -1
- package/dist/client/index.html +5 -4
- 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
|
@@ -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 BenchmarkStatus, At as GithubIssueResponse, B as comparablePrKey, Ct as PLAN_RESULT_HOOK_EVENT, D as BenchmarkId, Dt as parseExitPlanModeHookPayload, E as BenchmarkCase, Et as PlanRevision, F as PrCheckoutCaseInput, Ft as IssuesStatus, H as WorkflowLabelName, I as GithubPrDetailNode, It as issuePullRequestStateFromGithub, L as GithubPrKey, M as CommitComparison, Mt as IssueUpdate, N as MergedPrListing, Nt as IssuesSearchResponse, O as BenchmarkJudgement, Ot as planTitle, P as MinedPrReviewData, Pt as IssuesState, R as GithubPrLightSearchNode, St as PLAN_HOOK_OUTPUT_MAX_CHARS, T as BenchmarkActionRequest, Tt as PlanDecision, U as WorkflowsSettings, V as WorkflowCommentBody, W as WorkflowsState, Y as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, _ as ClientMessage, _t as CoherenceJournalOutput, a as ConfigUpdate, bt as PLAN_BODY_CAP_BYTES, ft as UpdateJournal, g as CONTROL_FRAME_MAX_BYTES, gt as TraceRecord, ht as TraceCheckpoint, j as BenchmarkSuite, jt as IssueKey, k as BenchmarkRun, kt as GithubIssuePullRequestsRepository, l as configIssueMessage, m as USAGE_VENDOR_KEYS, mt as MAX_RAW_LINE_CHARS, p as USAGE_COST_MODES, pt as SessionSetup, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, st as USAGE_INTEGER_RANGES, vt as ChangeMap, w as pullRequestKeyFromReference, wt as PLAN_TOOL_NAME, xt as PLAN_HOOK_EVENT, yt as changeMapFactId, z as GithubPrsFrame } from "./config-
|
|
7
|
+
import { A as BenchmarkStatus, At as GithubIssueResponse, B as comparablePrKey, Ct as PLAN_RESULT_HOOK_EVENT, D as BenchmarkId, Dt as parseExitPlanModeHookPayload, E as BenchmarkCase, Et as PlanRevision, F as PrCheckoutCaseInput, Ft as IssuesStatus, H as WorkflowLabelName, I as GithubPrDetailNode, It as issuePullRequestStateFromGithub, L as GithubPrKey, M as CommitComparison, Mt as IssueUpdate, N as MergedPrListing, Nt as IssuesSearchResponse, O as BenchmarkJudgement, Ot as planTitle, P as MinedPrReviewData, Pt as IssuesState, R as GithubPrLightSearchNode, St as PLAN_HOOK_OUTPUT_MAX_CHARS, T as BenchmarkActionRequest, Tt as PlanDecision, U as WorkflowsSettings, V as WorkflowCommentBody, W as WorkflowsState, Y as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, _ as ClientMessage, _t as CoherenceJournalOutput, a as ConfigUpdate, bt as PLAN_BODY_CAP_BYTES, ft as UpdateJournal, g as CONTROL_FRAME_MAX_BYTES, gt as TraceRecord, ht as TraceCheckpoint, j as BenchmarkSuite, jt as IssueKey, k as BenchmarkRun, kt as GithubIssuePullRequestsRepository, l as configIssueMessage, m as USAGE_VENDOR_KEYS, mt as MAX_RAW_LINE_CHARS, p as USAGE_COST_MODES, pt as SessionSetup, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, st as USAGE_INTEGER_RANGES, vt as ChangeMap, w as pullRequestKeyFromReference, wt as PLAN_TOOL_NAME, xt as PLAN_HOOK_EVENT, yt as changeMapFactId, z as GithubPrsFrame } from "./config-Dh4e-Mkv.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-BCFplxXu.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 parseDataAttachHistory, l as TELEMETRY_EVENT_SCHEMAS, n as HookEnvelope, o as DashboardTelemetryReport, r as DEEP_HISTORY_SCROLLBACK_LINES, t as HTTP_URL_RE } from "./contracts-
|
|
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-CEsetno2.js";
|
|
25
|
+
import { a as parseDataClientMessage, c as PendingCrashReport, d as TelemetryState, i as parseDataAttachHistory, l as TELEMETRY_EVENT_SCHEMAS, n as HookEnvelope, o as DashboardTelemetryReport, r as DEEP_HISTORY_SCROLLBACK_LINES, t as HTTP_URL_RE } from "./contracts-dj-GFptp.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-BsoXEvlZ.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-CtcoO10O.js";
|
|
30
|
+
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-BVb6tTLq.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";
|
|
@@ -12998,7 +12998,7 @@ async function runCommandSafely(command, args, { env, timeoutMs, signal }) {
|
|
|
12998
12998
|
};
|
|
12999
12999
|
}
|
|
13000
13000
|
}
|
|
13001
|
-
async function readTextFileOrNull$
|
|
13001
|
+
async function readTextFileOrNull$2(filePath) {
|
|
13002
13002
|
return fs$1.readFile(filePath, "utf8").catch(() => null);
|
|
13003
13003
|
}
|
|
13004
13004
|
function sleepUnlessAborted(durationMs, signal) {
|
|
@@ -13022,7 +13022,7 @@ function loginEnvironment(env, connectedConfigDir) {
|
|
|
13022
13022
|
if (connectedConfigDir) operatorEnv.CLAUDE_CONFIG_DIR = connectedConfigDir;
|
|
13023
13023
|
return operatorEnv;
|
|
13024
13024
|
}
|
|
13025
|
-
function createClaudeCredentials({ platform = process.platform, homeDir = os.homedir(), connectedConfigDir = null, env = process.env, now = () => Date.now(), claudeCommand, runCommand = runCommandSafely, readTextFile = readTextFileOrNull$
|
|
13025
|
+
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
13026
|
const overrideToken = env["GLIMMERVOID_CLAUDE_OAUTH_TOKEN"] || null;
|
|
13027
13027
|
delete env[OVERRIDE_TOKEN_ENV];
|
|
13028
13028
|
async function readLoginTokenIn(configDir) {
|
|
@@ -53292,6 +53292,14 @@ function registerControlHandlers(controlWss, deps) {
|
|
|
53292
53292
|
});
|
|
53293
53293
|
},
|
|
53294
53294
|
"dashboard-telemetry": captureDashboardTelemetry,
|
|
53295
|
+
"request-telemetry-deletion": async (msg, ws) => {
|
|
53296
|
+
const ok = await deps.telemetry?.requestDataDeletion?.() ?? false;
|
|
53297
|
+
ws.send(JSON.stringify({
|
|
53298
|
+
type: "telemetry-deletion-result",
|
|
53299
|
+
requestId: msg.requestId || null,
|
|
53300
|
+
ok
|
|
53301
|
+
}));
|
|
53302
|
+
},
|
|
53295
53303
|
"request-health-snapshot": (_msg, ws) => {
|
|
53296
53304
|
if (!buildHealthSnapshot) return;
|
|
53297
53305
|
ws.send(JSON.stringify({
|
|
@@ -55208,6 +55216,10 @@ function parseCodexAuth(text) {
|
|
|
55208
55216
|
expiresAtMs: accessTokenExpiryMs(accessToken)
|
|
55209
55217
|
};
|
|
55210
55218
|
}
|
|
55219
|
+
function codexHomeDir(env, homeDir) {
|
|
55220
|
+
const override = env.CODEX_HOME?.trim();
|
|
55221
|
+
return override ? path.resolve(override) : path.join(homeDir, ".codex");
|
|
55222
|
+
}
|
|
55211
55223
|
function decideCodexLogin({ login, nowMs, hasRefreshed }) {
|
|
55212
55224
|
if (!login) return {
|
|
55213
55225
|
kind: "unavailable",
|
|
@@ -55244,13 +55256,9 @@ function chatgptAuthTokensRefreshResult(login) {
|
|
|
55244
55256
|
//#endregion
|
|
55245
55257
|
//#region server/codex-credentials.ts
|
|
55246
55258
|
var HOST_REFRESH_TIMEOUT_MS = 6e4;
|
|
55247
|
-
async function readTextFileOrNull(filePath) {
|
|
55259
|
+
async function readTextFileOrNull$1(filePath) {
|
|
55248
55260
|
return fs$1.readFile(filePath, "utf8").catch(() => null);
|
|
55249
55261
|
}
|
|
55250
|
-
function codexHomeDir(env, homeDir) {
|
|
55251
|
-
const override = env.CODEX_HOME?.trim();
|
|
55252
|
-
return override ? path.resolve(override) : path.join(homeDir, ".codex");
|
|
55253
|
-
}
|
|
55254
55262
|
function refreshHostLoginOverAppServer(command, env) {
|
|
55255
55263
|
return new Promise((resolve) => {
|
|
55256
55264
|
let child;
|
|
@@ -55327,7 +55335,7 @@ function refreshHostLoginOverAppServer(command, env) {
|
|
|
55327
55335
|
});
|
|
55328
55336
|
});
|
|
55329
55337
|
}
|
|
55330
|
-
function createCodexCredentials({ homeDir = os.homedir(), connectedCodexHome = null, env = process.env, now = () => Date.now(), codexCommand, refreshHostLogin = refreshHostLoginOverAppServer, readTextFile = readTextFileOrNull }) {
|
|
55338
|
+
function createCodexCredentials({ homeDir = os.homedir(), connectedCodexHome = null, env = process.env, now = () => Date.now(), codexCommand, refreshHostLogin = refreshHostLoginOverAppServer, readTextFile = readTextFileOrNull$1 }) {
|
|
55331
55339
|
let inFlightRefresh = null;
|
|
55332
55340
|
async function readLoginIn(codexHome) {
|
|
55333
55341
|
const stored = await readTextFile(path.join(codexHome, "auth.json"));
|
|
@@ -56321,6 +56329,11 @@ var STOP_SEND_TIMEOUT_MS = 2500;
|
|
|
56321
56329
|
var ACTIVE_HEARTBEAT_INTERVAL_MS = 864e5;
|
|
56322
56330
|
var REMOTE_SWITCH_CHECK_INTERVAL_MS = 864e5;
|
|
56323
56331
|
var CRASH_MONITOR_EVENT = "uncaughtExceptionMonitor";
|
|
56332
|
+
var PERSON_PROPERTY_EVENTS = /* @__PURE__ */ new Set(["app_started", "app_active"]);
|
|
56333
|
+
var NO_ACCOUNT_IDS = Object.freeze({
|
|
56334
|
+
claudeAccountUuid: null,
|
|
56335
|
+
codexUserId: null
|
|
56336
|
+
});
|
|
56324
56337
|
function createTelemetry(options) {
|
|
56325
56338
|
const fetchFn = options.fetchFn ?? globalThis.fetch;
|
|
56326
56339
|
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
@@ -56336,8 +56349,12 @@ function createTelemetry(options) {
|
|
|
56336
56349
|
is_bundled: options.isBundled,
|
|
56337
56350
|
is_dev_install: options.isDevInstall,
|
|
56338
56351
|
...options.releaseId ? { $release_id: options.releaseId } : {},
|
|
56339
|
-
$lib: "glimmervoid"
|
|
56340
|
-
|
|
56352
|
+
$lib: "glimmervoid"
|
|
56353
|
+
};
|
|
56354
|
+
const firstSeen = {
|
|
56355
|
+
appVersion: options.version,
|
|
56356
|
+
osPlatform: baseProperties.os_platform,
|
|
56357
|
+
installFlavor: options.installFlavor
|
|
56341
56358
|
};
|
|
56342
56359
|
let queue = [];
|
|
56343
56360
|
let state = null;
|
|
@@ -56425,6 +56442,26 @@ function createTelemetry(options) {
|
|
|
56425
56442
|
}
|
|
56426
56443
|
enqueue(event, parsed.data);
|
|
56427
56444
|
}
|
|
56445
|
+
async function readAccountIdsOrNone() {
|
|
56446
|
+
if (!options.readAccountIds) return NO_ACCOUNT_IDS;
|
|
56447
|
+
try {
|
|
56448
|
+
return await options.readAccountIds();
|
|
56449
|
+
} catch (error) {
|
|
56450
|
+
log.warnOnce("account-ids-failed", "could not read account ids", { error: errorKind(error) });
|
|
56451
|
+
return NO_ACCOUNT_IDS;
|
|
56452
|
+
}
|
|
56453
|
+
}
|
|
56454
|
+
async function withPersonProperties(batch) {
|
|
56455
|
+
if (!batch.some((queued) => PERSON_PROPERTY_EVENTS.has(queued.event))) return batch;
|
|
56456
|
+
const personProperties = buildPersonProperties(await readAccountIdsOrNone(), firstSeen);
|
|
56457
|
+
return batch.map((queued) => PERSON_PROPERTY_EVENTS.has(queued.event) ? {
|
|
56458
|
+
...queued,
|
|
56459
|
+
properties: {
|
|
56460
|
+
...queued.properties,
|
|
56461
|
+
...personProperties
|
|
56462
|
+
}
|
|
56463
|
+
} : queued);
|
|
56464
|
+
}
|
|
56428
56465
|
function captureExceptionOnce(properties) {
|
|
56429
56466
|
if (!isEnabled()) return;
|
|
56430
56467
|
const fingerprint = exceptionFingerprint(properties);
|
|
@@ -56510,14 +56547,23 @@ function createTelemetry(options) {
|
|
|
56510
56547
|
}
|
|
56511
56548
|
async function send(batch, timeoutMs) {
|
|
56512
56549
|
try {
|
|
56550
|
+
const outgoing = await withPersonProperties(batch);
|
|
56513
56551
|
const { installId } = await ensureInstallState();
|
|
56514
56552
|
if (!isCaptureAllowed()) return false;
|
|
56553
|
+
return await post(outgoing, installId, timeoutMs);
|
|
56554
|
+
} catch (error) {
|
|
56555
|
+
log.warnOnce("send-failed", "send failed", { error: error instanceof Error ? error.name : String(error) });
|
|
56556
|
+
return false;
|
|
56557
|
+
}
|
|
56558
|
+
}
|
|
56559
|
+
async function post(outgoing, installId, timeoutMs) {
|
|
56560
|
+
try {
|
|
56515
56561
|
const response = await fetchFn(TELEMETRY_BATCH_URL, {
|
|
56516
56562
|
method: "POST",
|
|
56517
56563
|
headers: { "Content-Type": "application/json" },
|
|
56518
56564
|
body: JSON.stringify({
|
|
56519
56565
|
api_key: resolveProjectToken(options.env),
|
|
56520
|
-
batch:
|
|
56566
|
+
batch: outgoing.map((queued) => ({
|
|
56521
56567
|
event: queued.event,
|
|
56522
56568
|
distinct_id: installId,
|
|
56523
56569
|
timestamp: queued.timestamp,
|
|
@@ -56623,11 +56669,52 @@ function createTelemetry(options) {
|
|
|
56623
56669
|
});
|
|
56624
56670
|
return true;
|
|
56625
56671
|
}
|
|
56672
|
+
function currentInstallId() {
|
|
56673
|
+
if (!isEnabled()) return null;
|
|
56674
|
+
return state?.installId ?? null;
|
|
56675
|
+
}
|
|
56676
|
+
async function writeStateDurably(nextState) {
|
|
56677
|
+
state = nextState;
|
|
56678
|
+
try {
|
|
56679
|
+
if (options.stateFilePath) await writeJsonAtomic(options.stateFilePath, nextState, { mkdir: true });
|
|
56680
|
+
} catch (error) {
|
|
56681
|
+
log.warnOnce("deletion-state-write-failed", "could not record the new install id", { error: errorKind(error) });
|
|
56682
|
+
return false;
|
|
56683
|
+
}
|
|
56684
|
+
await persistState(nextState);
|
|
56685
|
+
return true;
|
|
56686
|
+
}
|
|
56687
|
+
async function requestDataDeletion() {
|
|
56688
|
+
await stateStore.load();
|
|
56689
|
+
while (inFlightFlush) await inFlightFlush;
|
|
56690
|
+
const deletedState = state;
|
|
56691
|
+
if (!deletedState) return true;
|
|
56692
|
+
if (remoteTelemetryState === "disabled") return false;
|
|
56693
|
+
queue = [];
|
|
56694
|
+
clearFlushTimer();
|
|
56695
|
+
if (!await writeStateDurably({
|
|
56696
|
+
...deletedState,
|
|
56697
|
+
installId: randomUUID()
|
|
56698
|
+
})) {
|
|
56699
|
+
state = deletedState;
|
|
56700
|
+
return false;
|
|
56701
|
+
}
|
|
56702
|
+
if (await post([{
|
|
56703
|
+
event: "data_deletion_requested",
|
|
56704
|
+
timestamp: now().toISOString(),
|
|
56705
|
+
properties: {}
|
|
56706
|
+
}], deletedState.installId, SEND_TIMEOUT_MS)) {
|
|
56707
|
+
options.onInstallIdChange?.();
|
|
56708
|
+
return true;
|
|
56709
|
+
}
|
|
56710
|
+
await writeStateDurably(deletedState);
|
|
56711
|
+
return false;
|
|
56712
|
+
}
|
|
56626
56713
|
function applyConfig() {
|
|
56627
56714
|
const isLocalConsentNowGiven = isLocalConsentGiven();
|
|
56628
56715
|
const isLocalConsentTurnedOn = isLocalConsentNowGiven && !wasLocalConsentGiven;
|
|
56629
56716
|
wasLocalConsentGiven = isLocalConsentNowGiven;
|
|
56630
|
-
if (isLocalConsentTurnedOn) checkRemoteSwitch();
|
|
56717
|
+
if (isLocalConsentTurnedOn) checkRemoteSwitch().then(ensureInstallState).then(() => options.onInstallIdChange?.());
|
|
56631
56718
|
if (isCaptureAllowed()) return;
|
|
56632
56719
|
queue = [];
|
|
56633
56720
|
clearFlushTimer();
|
|
@@ -56646,7 +56733,25 @@ function createTelemetry(options) {
|
|
|
56646
56733
|
stop,
|
|
56647
56734
|
consumeFirstRunNotice,
|
|
56648
56735
|
applyConfig,
|
|
56649
|
-
isEnabled
|
|
56736
|
+
isEnabled,
|
|
56737
|
+
currentInstallId,
|
|
56738
|
+
requestDataDeletion
|
|
56739
|
+
};
|
|
56740
|
+
}
|
|
56741
|
+
function readTextFileOrNull(filePath) {
|
|
56742
|
+
return fs.promises.readFile(filePath, "utf8").catch(() => null);
|
|
56743
|
+
}
|
|
56744
|
+
function createAccountIdReader({ env, homeDir, readTextFile = readTextFileOrNull }) {
|
|
56745
|
+
async function readClaudeConfigText() {
|
|
56746
|
+
const [legacyConfigPath, currentConfigPath] = listClaudeGlobalConfigPathCandidates(env, homeDir);
|
|
56747
|
+
return await readTextFile(legacyConfigPath) ?? await readTextFile(currentConfigPath);
|
|
56748
|
+
}
|
|
56749
|
+
return async () => {
|
|
56750
|
+
const [claudeConfigText, codexAuthText] = await Promise.all([readClaudeConfigText(), readTextFile(path.join(codexHomeDir(env, homeDir), "auth.json"))]);
|
|
56751
|
+
return {
|
|
56752
|
+
claudeAccountUuid: claudeConfigText === null ? null : claudeAccountUuidOf(claudeConfigText),
|
|
56753
|
+
codexUserId: codexAuthText === null ? null : codexUserIdOf(codexAuthText)
|
|
56754
|
+
};
|
|
56650
56755
|
};
|
|
56651
56756
|
}
|
|
56652
56757
|
//#endregion
|
|
@@ -57097,7 +57202,10 @@ var AGENT_INGRESS_HOST = "127.0.0.1";
|
|
|
57097
57202
|
function createBackend(httpServer, options = {}) {
|
|
57098
57203
|
const { staticDir = "auto", settingsDefaults } = options;
|
|
57099
57204
|
const packageJson = JSON.parse(fs.readFileSync(path.join(packageRoot, "package.json"), "utf8"));
|
|
57100
|
-
const configStore = createConfigStore({
|
|
57205
|
+
const configStore = createConfigStore({
|
|
57206
|
+
settingsDefaults,
|
|
57207
|
+
readTelemetryInstallId: () => telemetry.currentInstallId()
|
|
57208
|
+
});
|
|
57101
57209
|
const { config } = configStore;
|
|
57102
57210
|
applyCustomAgents(config);
|
|
57103
57211
|
const port = process.env.GLIMMERVOID_PORT ? Number.parseInt(process.env.GLIMMERVOID_PORT, 10) : config.port || 3e3;
|
|
@@ -57109,6 +57217,7 @@ function createBackend(httpServer, options = {}) {
|
|
|
57109
57217
|
});
|
|
57110
57218
|
const serverBuild = `${packageJson.version}+${crypto.randomBytes(4).toString("hex")}`;
|
|
57111
57219
|
const installFlavor = detectInstallFlavor(packageRoot).flavor;
|
|
57220
|
+
let broadcastSettings = null;
|
|
57112
57221
|
const telemetry = createTelemetry({
|
|
57113
57222
|
config,
|
|
57114
57223
|
env: process.env,
|
|
@@ -57125,7 +57234,12 @@ function createBackend(httpServer, options = {}) {
|
|
|
57125
57234
|
defaultHomeDir: glimmervoidHomeDir(os.homedir(), {})
|
|
57126
57235
|
}),
|
|
57127
57236
|
releaseId: parsePosthogReleaseId(packageJson.glimmervoid?.posthogReleaseId),
|
|
57128
|
-
getActiveSessionCount: () => sessions.size + agentSessions.size
|
|
57237
|
+
getActiveSessionCount: () => sessions.size + agentSessions.size,
|
|
57238
|
+
readAccountIds: createAccountIdReader({
|
|
57239
|
+
env: process.env,
|
|
57240
|
+
homeDir: os.homedir()
|
|
57241
|
+
}),
|
|
57242
|
+
onInstallIdChange: () => broadcastSettings?.()
|
|
57129
57243
|
});
|
|
57130
57244
|
telemetry.watchForCrashes();
|
|
57131
57245
|
telemetry.startRemoteSwitchChecks();
|
|
@@ -57540,17 +57654,18 @@ function createBackend(httpServer, options = {}) {
|
|
|
57540
57654
|
httpServer.on("upgrade", handleUpgrade);
|
|
57541
57655
|
updateApply.startAfterListening(httpServer);
|
|
57542
57656
|
httpServer.once("listening", startPostTurnLeftoverCleanup);
|
|
57657
|
+
broadcastSettings = () => broadcastControl?.({
|
|
57658
|
+
type: "settings-updated",
|
|
57659
|
+
settings: buildSettingsPayload({
|
|
57660
|
+
configStore,
|
|
57661
|
+
rtkInstallStatus: rtkInstall.getStatus(),
|
|
57662
|
+
coderEnvironments: laneAssembly.coderEnv.availableEnvironments(),
|
|
57663
|
+
agentLogins: agentConnect.logins()
|
|
57664
|
+
})
|
|
57665
|
+
});
|
|
57543
57666
|
stopConfigWatch = configStore.watchForChanges((newConfig) => {
|
|
57544
57667
|
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
|
-
});
|
|
57668
|
+
broadcastSettings?.();
|
|
57554
57669
|
});
|
|
57555
57670
|
updateCheck.start();
|
|
57556
57671
|
return {
|
|
@@ -57668,7 +57783,7 @@ server.listen(port, bind.host, () => {
|
|
|
57668
57783
|
sweepOrphanedHostScratch().catch((error) => {
|
|
57669
57784
|
console.warn(`Leftover scratch sweep failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
57670
57785
|
});
|
|
57671
|
-
telemetry.capture("app_started", {});
|
|
57786
|
+
telemetry.capture("app_started", { is_first_start: isFirstStart });
|
|
57672
57787
|
writeTerminalTitle(buildTitleSequence(`glimmervoid :${boundPort}`));
|
|
57673
57788
|
if (bind.reason === "insecure-bind") console.warn(`WARNING: bound ${bind.host} with GLIMMERVOID_INSECURE_BIND=1 - this listener has NO authentication.`);
|
|
57674
57789
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as errorMessage } from "./text-DoirglWV.js";
|
|
2
|
-
import { c as resolveConfigPath } from "./config-store-
|
|
3
|
-
import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-
|
|
2
|
+
import { c as resolveConfigPath } from "./config-store-CEsetno2.js";
|
|
3
|
+
import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-CtcoO10O.js";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
//#region server/text-format.ts
|
|
6
6
|
function trimIso(iso) {
|
|
@@ -3,7 +3,7 @@ import { n as equalsIgnoringCaseOnWindows } from "./paths-Bu4eH1Yd.js";
|
|
|
3
3
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
4
4
|
import { n as unrefTimer, t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.js";
|
|
5
5
|
import { a as jsonStateLoadError, d as writeJsonAtomicSync, l as sleepSync, s as loadJsonStateFileSync, u as writeJsonAtomic } from "./json-file-DFCTvPjj.js";
|
|
6
|
-
import {
|
|
6
|
+
import { lt as canonicalizePath, o as glimmervoidHomeDir } from "./config-store-CEsetno2.js";
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import crypto from "node:crypto";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as errorMessage, t as errorCode } from "./text-DoirglWV.js";
|
|
2
2
|
import { f as AgentSettingsReply } from "./session-CUc6d7aS.js";
|
|
3
|
-
import { r as BrowserConfig } from "./config-
|
|
3
|
+
import { r as BrowserConfig } from "./config-Dh4e-Mkv.js";
|
|
4
4
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
5
5
|
import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
|
|
6
6
|
import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-DFt-TemS.js";
|
|
7
|
-
import { C as deleteValueAtPath, D as scoreSettingsSearch, E as parsePosthogProjectSelection, N as SETTINGS_REGISTRY, O as setValueAtPath, Q as
|
|
8
|
-
import { a as fail, c as listSettings, d as renderSectionTables, f as requireConfigFileSetting, g as valueText, h as succeed, i as describeSetting, l as readSetting, m as settingsRequestForServer, n as configFileViewOf, o as fitColumn, p as sectionOf, r as defaultText, s as getSetting, t as ALL_SETTINGS } from "./settings-readout-core-
|
|
7
|
+
import { $ as readEnvSecrets, C as deleteValueAtPath, D as scoreSettingsSearch, E as parsePosthogProjectSelection, N as SETTINGS_REGISTRY, O as setValueAtPath, Q as ENV_SECRET_BINDINGS, S as cloneValue, j as valueAtPath, l as saveConfigFileOnce, s as loadConfigFile, tt as withEnvSecrets, u as validateConfig } from "./config-store-CEsetno2.js";
|
|
8
|
+
import { a as fail, c as listSettings, d as renderSectionTables, f as requireConfigFileSetting, g as valueText, h as succeed, i as describeSetting, l as readSetting, m as settingsRequestForServer, n as configFileViewOf, o as fitColumn, p as sectionOf, r as defaultText, s as getSetting, t as ALL_SETTINGS } from "./settings-readout-core-BVb6tTLq.js";
|
|
9
9
|
import fs from "node:fs";
|
|
10
10
|
import os from "node:os";
|
|
11
11
|
import { parseArgs } from "node:util";
|
|
@@ -329,7 +329,7 @@ function processIo() {
|
|
|
329
329
|
async function runSettingsCli(commandArguments, io = processIo()) {
|
|
330
330
|
const serverRequest = settingsRequestForServer(commandArguments, process.env);
|
|
331
331
|
if (!serverRequest) return runSettingsCommand(commandArguments, io);
|
|
332
|
-
const { askAgentApi } = await import("./agent-api-cli-
|
|
332
|
+
const { askAgentApi } = await import("./agent-api-cli-B-QxkZAQ.js");
|
|
333
333
|
const reply = AgentSettingsReply.safeParse(await askAgentApi("settings", serverRequest).catch((error) => ({
|
|
334
334
|
ok: false,
|
|
335
335
|
error: errorMessage(error)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as AgentSettingsRequest } from "./session-CUc6d7aS.js";
|
|
2
2
|
import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
|
|
3
|
-
import { A as settingsOf, M as FILE_ONLY_GROUPS, N as SETTINGS_REGISTRY, S as cloneValue, T as hasScaledUnit,
|
|
3
|
+
import { $ as readEnvSecrets, A as settingsOf, M as FILE_ONLY_GROUPS, N as SETTINGS_REGISTRY, S as cloneValue, T as hasScaledUnit, j as valueAtPath, k as settingsGroupOf, w as displayText, x as SETTINGS_INDEX } from "./config-store-CEsetno2.js";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
//#region server/core/settings-readout-core.ts
|
|
6
6
|
var VALUE_COLUMN_WIDTH = 40;
|
|
@@ -2,7 +2,7 @@ import { r as errorMessage } from "./text-DoirglWV.js";
|
|
|
2
2
|
import { I as SshSignReply, j as SIGN_URL_ENV } from "./session-CUc6d7aS.js";
|
|
3
3
|
import { n as execFileAsync, o as spawn } from "./child-process-safe-D4hyVIXj.js";
|
|
4
4
|
import { a as isLoopbackHostname } from "./hook-relay-core-DA_bz2KA.js";
|
|
5
|
-
import { n as postToAgentIngress } from "./agent-api-cli-
|
|
5
|
+
import { n as postToAgentIngress } from "./agent-api-cli-DIl92JjQ.js";
|
|
6
6
|
import { l as parseSshPublicKey } from "./ssh-signing-core-CRhVVWNW.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fs from "node:fs/promises";
|