glimmervoid 0.47.1-next.243 → 0.47.1-next.244
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 +3 -3
- package/dist/chunks/{adapters-BGDeF1ky.js → adapters-CCDF7Syx.js} +1 -1
- package/dist/chunks/{adapters-But0dkwF.js → adapters-DWwTuF0s.js} +1 -1
- package/dist/chunks/{kimi-CyIJoMgO.js → kimi-B35I7Rlu.js} +1 -1
- package/dist/chunks/kimi-BhmoA__R.js +1 -0
- package/dist/chunks/{kimi-home-D7RE58XY.js → kimi-home-4-aMoqJC.js} +1 -1
- package/dist/chunks/kimi-home-Czh-wcQ_.js +1 -0
- package/dist/chunks/{main-DVFtwIRS.js → main-CFJRfoa4.js} +112 -21
- package/dist/client/assets/{alert-sound-CT_6F7Xp.js → alert-sound-BsooAPwA.js} +1 -1
- package/dist/client/assets/alert-sound-BsooAPwA.js.br +0 -0
- package/dist/client/assets/{benchmark-panel-RJucS21L.js → benchmark-panel-ByXk6p7l.js} +1 -1
- package/dist/client/assets/benchmark-panel-ByXk6p7l.js.br +0 -0
- package/dist/client/assets/{celebration-player-CagLMZKS.js → celebration-player-Bs7gFFtp.js} +1 -1
- package/dist/client/assets/celebration-player-Bs7gFFtp.js.br +0 -0
- package/dist/client/assets/{community-panel-CL_ZMtN5.js → community-panel-39A78I3s.js} +1 -1
- package/dist/client/assets/community-panel-39A78I3s.js.br +0 -0
- package/dist/client/assets/{dialogs-Tvkk8IR0.js → dialogs-D7Ik8557.js} +1 -1
- package/dist/client/assets/dialogs-D7Ik8557.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-Dm4QJQdw.js → doc-editor-ui-BMlW3hMQ.js} +1 -1
- package/dist/client/assets/doc-editor-ui-BMlW3hMQ.js.br +0 -0
- package/dist/client/assets/{feature-hint-B0iEDIAh.js → feature-hint-7oF2VoGV.js} +1 -1
- package/dist/client/assets/feature-hint-7oF2VoGV.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-D39N7iLA.js → first-run-checklist-T3bgDD_Y.js} +1 -1
- package/dist/client/assets/first-run-checklist-T3bgDD_Y.js.br +0 -0
- package/dist/client/assets/{hooks-panel-CQbqanHf.js → hooks-panel-dkxe7M5s.js} +1 -1
- package/dist/client/assets/hooks-panel-dkxe7M5s.js.br +0 -0
- package/dist/client/assets/{index-BYYC8NYG.js → index-CRgdx1Xc.js} +5 -5
- package/dist/client/assets/index-CRgdx1Xc.js.br +0 -0
- package/dist/client/assets/{issues-panel-Dkf42TO2.js → issues-panel-C7LCc9pn.js} +1 -1
- package/dist/client/assets/issues-panel-C7LCc9pn.js.br +0 -0
- package/dist/client/assets/{my-prs-panel-ClmwYbH3.js → my-prs-panel-xDGZSKms.js} +1 -1
- package/dist/client/assets/my-prs-panel-xDGZSKms.js.br +0 -0
- package/dist/client/assets/{nyan-cat-DgzvWbPy.js → nyan-cat-D2sqNEGz.js} +1 -1
- package/dist/client/assets/nyan-cat-D2sqNEGz.js.br +0 -0
- package/dist/client/assets/{phone-shell-BbfuHsGM.js → phone-shell-BXG-nu2t.js} +1 -1
- package/dist/client/assets/phone-shell-BXG-nu2t.js.br +0 -0
- package/dist/client/assets/{plan-face-DD5HjZco.js → plan-face-C0SQSmm1.js} +1 -1
- package/dist/client/assets/plan-face-C0SQSmm1.js.br +0 -0
- package/dist/client/assets/{plan-render-CCy8EqIk.js → plan-render-CTnwBprZ.js} +1 -1
- package/dist/client/assets/plan-render-CTnwBprZ.js.br +0 -0
- package/dist/client/assets/{pr-queue-columns-DQYZZC4n.js → pr-queue-columns-pCxhZs75.js} +1 -1
- package/dist/client/assets/pr-queue-columns-pCxhZs75.js.br +0 -0
- package/dist/client/assets/{radar-panel-BYZGDZKT.js → radar-panel-BnOAGnLf.js} +1 -1
- package/dist/client/assets/radar-panel-BnOAGnLf.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-BdbnyXjf.js → repo-roots-adder-6Xw2eJJL.js} +1 -1
- package/dist/client/assets/repo-roots-adder-6Xw2eJJL.js.br +0 -0
- package/dist/client/assets/{resume-dialog-8aoolC0Q.js → resume-dialog-BlBMmw7T.js} +1 -1
- package/dist/client/assets/resume-dialog-BlBMmw7T.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-Cdmjz2q6.js → review-queue-panel-DkZ-z-xU.js} +1 -1
- package/dist/client/assets/review-queue-panel-DkZ-z-xU.js.br +0 -0
- package/dist/client/assets/{settings-panel-D3sRBRiD.js → settings-panel-Dv3yDW9j.js} +2 -2
- package/dist/client/assets/settings-panel-Dv3yDW9j.js.br +0 -0
- package/dist/client/assets/{shown-lightbox-Ba7I2Xqy.js → shown-lightbox-Cs0B9BVC.js} +1 -1
- package/dist/client/assets/shown-lightbox-Cs0B9BVC.js.br +0 -0
- package/dist/client/assets/{team-review-panel-BqTBK6fj.js → team-review-panel-DlZsSf4v.js} +1 -1
- package/dist/client/assets/team-review-panel-DlZsSf4v.js.br +0 -0
- package/dist/client/assets/{trace-panel-CKPNRMrd.js → trace-panel-BwgE6R62.js} +1 -1
- package/dist/client/assets/trace-panel-BwgE6R62.js.br +0 -0
- package/dist/client/assets/{usage-panel-BpgQwvn6.js → usage-panel-BqOrJHYS.js} +1 -1
- package/dist/client/assets/usage-panel-BqOrJHYS.js.br +0 -0
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.br +0 -0
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/kimi-CnRiVzTi.js +0 -1
- package/dist/chunks/kimi-home-BvT2PKvb.js +0 -1
- package/dist/client/assets/alert-sound-CT_6F7Xp.js.br +0 -0
- package/dist/client/assets/benchmark-panel-RJucS21L.js.br +0 -0
- package/dist/client/assets/celebration-player-CagLMZKS.js.br +0 -0
- package/dist/client/assets/community-panel-CL_ZMtN5.js.br +0 -0
- package/dist/client/assets/dialogs-Tvkk8IR0.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-Dm4QJQdw.js.br +0 -0
- package/dist/client/assets/feature-hint-B0iEDIAh.js.br +0 -0
- package/dist/client/assets/first-run-checklist-D39N7iLA.js.br +0 -0
- package/dist/client/assets/hooks-panel-CQbqanHf.js.br +0 -0
- package/dist/client/assets/index-BYYC8NYG.js.br +0 -0
- package/dist/client/assets/issues-panel-Dkf42TO2.js.br +0 -0
- package/dist/client/assets/my-prs-panel-ClmwYbH3.js.br +0 -0
- package/dist/client/assets/nyan-cat-DgzvWbPy.js.br +0 -0
- package/dist/client/assets/phone-shell-BbfuHsGM.js.br +0 -0
- package/dist/client/assets/plan-face-DD5HjZco.js.br +0 -0
- package/dist/client/assets/plan-render-CCy8EqIk.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-DQYZZC4n.js.br +0 -0
- package/dist/client/assets/radar-panel-BYZGDZKT.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-BdbnyXjf.js.br +0 -0
- package/dist/client/assets/resume-dialog-8aoolC0Q.js.br +0 -0
- package/dist/client/assets/review-queue-panel-Cdmjz2q6.js.br +0 -0
- package/dist/client/assets/settings-panel-D3sRBRiD.js.br +0 -0
- package/dist/client/assets/shown-lightbox-Ba7I2Xqy.js.br +0 -0
- package/dist/client/assets/team-review-panel-BqTBK6fj.js.br +0 -0
- package/dist/client/assets/trace-panel-CKPNRMrd.js.br +0 -0
- package/dist/client/assets/usage-panel-BpgQwvn6.js.br +0 -0
package/dist/bin/glimmervoid.js
CHANGED
|
@@ -223,7 +223,7 @@ async function runDoctor() {
|
|
|
223
223
|
}
|
|
224
224
|
switchSection("Agents");
|
|
225
225
|
try {
|
|
226
|
-
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-
|
|
226
|
+
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-DWwTuF0s.js");
|
|
227
227
|
const declaredCustomAgents = await readDeclaredCustomAgents();
|
|
228
228
|
if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
|
|
229
229
|
setCustomAgents(declaredCustomAgents.declared);
|
|
@@ -234,8 +234,8 @@ async function runDoctor() {
|
|
|
234
234
|
const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-BvHppwtG.js");
|
|
235
235
|
const grokSetup = inspectGrokAgentSetup();
|
|
236
236
|
line("grok hook setup", `${grokSetup.classification}: ${grokSetup.filePath}`);
|
|
237
|
-
const { default: kimi } = await import("../chunks/kimi-
|
|
238
|
-
const { describeKimiHome } = await import("../chunks/kimi-home-
|
|
237
|
+
const { default: kimi } = await import("../chunks/kimi-BhmoA__R.js");
|
|
238
|
+
const { describeKimiHome } = await import("../chunks/kimi-home-Czh-wcQ_.js");
|
|
239
239
|
line("kimi home", describeKimiHome(kimi.expectedHooksBlock()));
|
|
240
240
|
} catch (err) {
|
|
241
241
|
line("agents", `probe failed: ${firstLine(errorText(err))}`);
|
|
@@ -13,7 +13,7 @@ import { t as buildHookCommand } from "./hook-command-core-qTNK-xMF.js";
|
|
|
13
13
|
import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-Co0r53k-.js";
|
|
14
14
|
import { O as nextBackoffMs } from "./json-file-AKRVPqG1.js";
|
|
15
15
|
import { n as isExperimentalBuild, t as compareReleaseVersions } from "./build-channel-CUO-Zbyn.js";
|
|
16
|
-
import { t as kimi } from "./kimi-
|
|
16
|
+
import { t as kimi } from "./kimi-B35I7Rlu.js";
|
|
17
17
|
import fs from "node:fs";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { z } from "zod";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-
|
|
1
|
+
export { a as describeAgentResolvability, l as listAgentIds, f as setCustomAgents } from "./adapters-CCDF7Syx.js";
|
|
@@ -4,7 +4,7 @@ import { i as execFileSync } from "./child-process-safe-BCOoKfxG.js";
|
|
|
4
4
|
import { n as resolveAgentCommand, t as buildAgentSpawnCommand } from "./spawn-command-CQECOvjC.js";
|
|
5
5
|
import { t as KIMI_SANE_YOLO_FLAVOR } from "./sane-yolo-DSyFqbVE.js";
|
|
6
6
|
import { t as buildAgentEnv } from "./spawn-env-Dh1MZR4M.js";
|
|
7
|
-
import { a as prepareKimiHome, i as kimiHomeLinkRefusal,
|
|
7
|
+
import { a as prepareKimiHome, i as kimiHomeLinkRefusal, m as renderKimiHooksBlock, n as generatedKimiHomePath, o as realKimiHome, r as holdKimiHome, s as releaseKimiHome } from "./kimi-home-4-aMoqJC.js";
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as default } from "./kimi-B35I7Rlu.js";
|
|
@@ -870,4 +870,4 @@ function releaseUnheldKimiHomeSecrets(generatedHome) {
|
|
|
870
870
|
releaseSecretsUnlessHeldElsewhere(generatedHome, { whenLocksMissing: "keep" });
|
|
871
871
|
}
|
|
872
872
|
//#endregion
|
|
873
|
-
export { prepareKimiHome as a, releaseUnheldKimiHomeSecrets as c, sessionIdOfLockFile as d, trashSessionTempFolderOnceUnheld as f, kimiHomeLinkRefusal as i, createHeldSessionTempFolder as l, generatedKimiHomePath as n, realKimiHome as o,
|
|
873
|
+
export { prepareKimiHome as a, releaseUnheldKimiHomeSecrets as c, sessionIdOfLockFile as d, trashSessionTempFolderOnceUnheld as f, kimiHomeLinkRefusal as i, createHeldSessionTempFolder as l, renderKimiHooksBlock as m, generatedKimiHomePath as n, realKimiHome as o, definesHooksOutsideArrayTables as p, holdKimiHome as r, releaseKimiHome as s, describeKimiHome as t, releaseSessionLock as u };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as describeKimiHome } from "./kimi-home-4-aMoqJC.js";
|
|
@@ -22,9 +22,9 @@ import { n as shellQuote } from "./hook-command-core-qTNK-xMF.js";
|
|
|
22
22
|
import { C as parseCgroupBytes, D as DEFAULT_MAX_MS, E as DEFAULT_BASE_MS, O as nextBackoffMs, S as memoryReserveBytes, T as parseMemAvailableBytes, _ as createSpawnGate, a as jsonStateLoadError, b as cgroupLimitBytes, c as loadedJsonValue, d as writeJsonAtomicSync, 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-AKRVPqG1.js";
|
|
23
23
|
import { $ as stableConfigKey, B as buildPersonProperties, F as TELEMETRY_FLAGS_URL, G as decideRemoteTelemetryState, H as claudeAccountUuidOf, I as adapterBucket, J as nodeMajorVersion, K as decideTelemetryConsent, L as buildAiGenerationEvents, M as isExperimentalSetting, N as FIRST_RUN_NOTICE, P as TELEMETRY_BATCH_URL, R as buildBrowserExceptionProperties, U as codexUserIdOf, V as classifySessionExit, W as decideIsDevInstall, X as resolveProjectToken, Y as parsePosthogReleaseId, _ as settingsBlockSpecFor, a as ensureProjectIds, at as sessionIdFromBranch, ct as canonicalizePath, f as DEFAULT_TIMER_FNS, g as mergeSettingsBlock, i as createConfigStore, it as planWorktreeGc, lt as comparableDirectoryPath, n as DEFAULT_CONFIG, nt as matchedPrefix, o as generateProjectId, ot as usablePrefixes, p as unrefTimer, q as exceptionFingerprint, rt as planBranchGc, s as glimmervoidHomeDir$1, st as worktreeIntegrationTips, t as ABORT_CONFIG_SAVE, tt as DEFAULT_BRANCH_GC_PREFIXES, ut as isSameDirectoryPath, v as validateSettingsBlock, y as SETTINGS_INDEX, z as buildExceptionProperties } from "./config-store-DjEQZsHV.js";
|
|
24
24
|
import { _ as TelemetryState, a as DEEP_HISTORY_SCROLLBACK_LINES, c as describeDataAttach, d as DashboardTelemetryReport, h as TELEMETRY_EVENT_SCHEMAS, i as HookEnvelope, l as parseDataAttach, m as PendingCrashReport, r as HTTP_URL_RE, s as LOGGED_FAST_CLOSE_COUNTS, u as parseDataClientMessage } from "./build-channel-CUO-Zbyn.js";
|
|
25
|
-
import { $ as kimiHomes, A as framePathPaste, B as planContiguousRead, C as pickNewestPublished, Ct as vendorUsageEntry, D as buildUploadFilename, E as MAX_UPLOAD_BYTES, F as TRACE_TAIL_SCAN_BYTES, G as codexRootCandidates, H as withCommittedOffset, I as committedOffsetFromTraceTailOrNull, J as decideFileRead, K as codexSessionIdFromPath, L as completeLineBytes, M as isSafePathSegment, N as planUploadRetention, O as decideUploadType, P as MAX_TRANSCRIPT_READ_BYTES, Q as isUsageFile, R as containmentRefusalReason, S as parseResolvedSha, St as totalTokensOf$1, T as openContainedFile, Tt as claudeCode, U as codexFallbackRoots, V as resumeOffsetFrom, W as codexHomes, X as expandTilde, Y as dedupeCodexFiles, Z as grokHomes, _ as isCheckFresh, _t as isWithinGenerationRecencyWindow, a as describeAgentResolvability, at as shouldEvaluateDespiteIoFailures, b as parseRegistryDeprecation, bt as parseUsageLine, c as isKnownAgentId, ct as kimiDedupIdentity, d as resolveAdapter, dt as dedupKeys, et as passOutcome, f as setCustomAgents, ft as emptyTotals, g as decideUpdateStatus, gt as identityFromRelPath, h as decideInstallFlavor, ht as foldReplacementIntoGenerationRollup, i as customAgentFingerprint, it as sessionsRootCandidates, j as imageMimeForUploadFilename, k as exceedsUploadCap, l as listAgentIds, lt as parseKimiUsageLine, m as readHostCodexVersion, mt as foldEntryIntoGenerationRollup, n as cachedAgentResolvability, nt as resolveProjectsDirs, o as getAdapter, ot as shouldPersistWarehouse, p as codex, pt as expandAdvisorIterations, q as continuationDelayMs, r as commandFor, rt as scopedClaudeRoots, s as hookProfileOf, st as splitLines, t as DEFAULT_AGENT_ID, tt as projectDirCandidates, u as resetCommandCache, ut as addEntryToTotals, v as normalizeSha, vt as mergeGenerationRollups, w as shortSha$1, wt as HOOK_TOOLS, x as parseRegistryLatest, xt as shouldReplace, y as normalizeUpdateChannel, yt as parseJsonLine, z as isOversizedPartialLine } from "./adapters-
|
|
26
|
-
import { c as releaseUnheldKimiHomeSecrets, d as sessionIdOfLockFile, f as trashSessionTempFolderOnceUnheld, i as kimiHomeLinkRefusal, l as createHeldSessionTempFolder, n as generatedKimiHomePath, o as realKimiHome, u as releaseSessionLock } from "./kimi-home-
|
|
27
|
-
import { t as kimi } from "./kimi-
|
|
25
|
+
import { $ as kimiHomes, A as framePathPaste, B as planContiguousRead, C as pickNewestPublished, Ct as vendorUsageEntry, D as buildUploadFilename, E as MAX_UPLOAD_BYTES, F as TRACE_TAIL_SCAN_BYTES, G as codexRootCandidates, H as withCommittedOffset, I as committedOffsetFromTraceTailOrNull, J as decideFileRead, K as codexSessionIdFromPath, L as completeLineBytes, M as isSafePathSegment, N as planUploadRetention, O as decideUploadType, P as MAX_TRANSCRIPT_READ_BYTES, Q as isUsageFile, R as containmentRefusalReason, S as parseResolvedSha, St as totalTokensOf$1, T as openContainedFile, Tt as claudeCode, U as codexFallbackRoots, V as resumeOffsetFrom, W as codexHomes, X as expandTilde, Y as dedupeCodexFiles, Z as grokHomes, _ as isCheckFresh, _t as isWithinGenerationRecencyWindow, a as describeAgentResolvability, at as shouldEvaluateDespiteIoFailures, b as parseRegistryDeprecation, bt as parseUsageLine, c as isKnownAgentId, ct as kimiDedupIdentity, d as resolveAdapter, dt as dedupKeys, et as passOutcome, f as setCustomAgents, ft as emptyTotals, g as decideUpdateStatus, gt as identityFromRelPath, h as decideInstallFlavor, ht as foldReplacementIntoGenerationRollup, i as customAgentFingerprint, it as sessionsRootCandidates, j as imageMimeForUploadFilename, k as exceedsUploadCap, l as listAgentIds, lt as parseKimiUsageLine, m as readHostCodexVersion, mt as foldEntryIntoGenerationRollup, n as cachedAgentResolvability, nt as resolveProjectsDirs, o as getAdapter, ot as shouldPersistWarehouse, p as codex, pt as expandAdvisorIterations, q as continuationDelayMs, r as commandFor, rt as scopedClaudeRoots, s as hookProfileOf, st as splitLines, t as DEFAULT_AGENT_ID$1, tt as projectDirCandidates, u as resetCommandCache, ut as addEntryToTotals, v as normalizeSha, vt as mergeGenerationRollups, w as shortSha$1, wt as HOOK_TOOLS, x as parseRegistryLatest, xt as shouldReplace, y as normalizeUpdateChannel, yt as parseJsonLine, z as isOversizedPartialLine } from "./adapters-CCDF7Syx.js";
|
|
26
|
+
import { c as releaseUnheldKimiHomeSecrets, d as sessionIdOfLockFile, f as trashSessionTempFolderOnceUnheld, i as kimiHomeLinkRefusal, l as createHeldSessionTempFolder, n as generatedKimiHomePath, o as realKimiHome, p as definesHooksOutsideArrayTables, u as releaseSessionLock } from "./kimi-home-4-aMoqJC.js";
|
|
27
|
+
import { t as kimi } from "./kimi-B35I7Rlu.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
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-Bx7gnshJ.js";
|
|
30
30
|
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-_JfFhnxs.js";
|
|
@@ -3261,9 +3261,10 @@ function launchPrivateFolders(role, host) {
|
|
|
3261
3261
|
function launchHomeLinkCandidates(role, host) {
|
|
3262
3262
|
return vendorsWithLaunchHome(role).flatMap((vendor) => {
|
|
3263
3263
|
const { configEntries, loginFiles } = VENDOR_PROFILES[vendor];
|
|
3264
|
+
const laneFileByEntry = role.launchHomeFiles?.[vendor] ?? {};
|
|
3264
3265
|
const linkFor = (entry, isLogin) => ({
|
|
3265
3266
|
linkPath: path.join(launchHomeOf(host, vendor), entry),
|
|
3266
|
-
targetPath: path.join(host.vendorLocations[vendor].stateFolder, entry),
|
|
3267
|
+
targetPath: laneFileByEntry[entry] ?? path.join(host.vendorLocations[vendor].stateFolder, entry),
|
|
3267
3268
|
isLogin
|
|
3268
3269
|
});
|
|
3269
3270
|
return [...configEntries.map((entry) => linkFor(entry, false)), ...loginFiles.map((entry) => linkFor(entry, true))];
|
|
@@ -9413,6 +9414,7 @@ var POSTHOG_MCP_HOST = "mcp.posthog.com";
|
|
|
9413
9414
|
var POSTHOG_OAUTH_HOST = "oauth.posthog.com";
|
|
9414
9415
|
var MCP_SERVER_NAME_RE = /^[A-Za-z][A-Za-z0-9_-]{0,63}$/;
|
|
9415
9416
|
var CODEX_MCP_SERVER_NAME_RE = /^[A-Za-z0-9_-]+$/;
|
|
9417
|
+
var KIMI_QUALIFIED_TOOL_NAME_MAX_LENGTH = 64;
|
|
9416
9418
|
var STRICT_MCP_CONFIG_ARG = "--strict-mcp-config";
|
|
9417
9419
|
var HOOK_COMMAND_SAFE_PATH_RE = /^[A-Za-z0-9_.:/\\ -]+$/;
|
|
9418
9420
|
function urlHostname(value) {
|
|
@@ -9463,7 +9465,8 @@ function laneMcpPosture({ server, mcpConfigPath, gatePath, interpreterPath, lane
|
|
|
9463
9465
|
allowRules: [`mcp__${server.name}__exec`],
|
|
9464
9466
|
hookTool,
|
|
9465
9467
|
networkDomains: [POSTHOG_MCP_HOST, POSTHOG_OAUTH_HOST],
|
|
9466
|
-
bypassHookTrust: false
|
|
9468
|
+
bypassHookTrust: false,
|
|
9469
|
+
launchHomeFiles: {}
|
|
9467
9470
|
};
|
|
9468
9471
|
}
|
|
9469
9472
|
function codexLaneMcpPosture({ server, otherServerNames, gatePath, interpreterPath }) {
|
|
@@ -9483,7 +9486,41 @@ function codexLaneMcpPosture({ server, otherServerNames, gatePath, interpreterPa
|
|
|
9483
9486
|
allowRules: [],
|
|
9484
9487
|
hookTool,
|
|
9485
9488
|
networkDomains: [POSTHOG_MCP_HOST, POSTHOG_OAUTH_HOST],
|
|
9486
|
-
bypassHookTrust: true
|
|
9489
|
+
bypassHookTrust: true,
|
|
9490
|
+
launchHomeFiles: {}
|
|
9491
|
+
};
|
|
9492
|
+
}
|
|
9493
|
+
function kimiLaneMcpConfig(server) {
|
|
9494
|
+
return { mcpServers: { [server.name]: {
|
|
9495
|
+
...server.entry,
|
|
9496
|
+
enabledTools: ["exec"]
|
|
9497
|
+
} } };
|
|
9498
|
+
}
|
|
9499
|
+
function kimiLaneConfigText(operatorConfigText, gateHook) {
|
|
9500
|
+
if (definesHooksOutsideArrayTables(operatorConfigText) || /['\r\n]/.test(gateHook.command)) return null;
|
|
9501
|
+
return `${operatorConfigText}${operatorConfigText === "" || operatorConfigText.endsWith("\n") ? "" : "\n"}\n[[hooks]]\nevent = "PreToolUse"\nmatcher = '${gateHook.matcher}'\ncommand = '${gateHook.command}'\n`;
|
|
9502
|
+
}
|
|
9503
|
+
function keepsKimiToolName(serverName) {
|
|
9504
|
+
return !serverName.includes("__") && `mcp__${serverName}__exec`.length <= KIMI_QUALIFIED_TOOL_NAME_MAX_LENGTH;
|
|
9505
|
+
}
|
|
9506
|
+
function kimiLaneMcpPosture({ server, mcpConfigPath, configPath, gatePath, interpreterPath }) {
|
|
9507
|
+
if (!keepsKimiToolName(server.name)) return null;
|
|
9508
|
+
const hookTool = gatedPosthogTool({
|
|
9509
|
+
server,
|
|
9510
|
+
gatePath,
|
|
9511
|
+
interpreterPath
|
|
9512
|
+
});
|
|
9513
|
+
if (!hookTool) return null;
|
|
9514
|
+
return {
|
|
9515
|
+
args: [],
|
|
9516
|
+
allowRules: [],
|
|
9517
|
+
hookTool,
|
|
9518
|
+
networkDomains: [POSTHOG_MCP_HOST, POSTHOG_OAUTH_HOST],
|
|
9519
|
+
bypassHookTrust: false,
|
|
9520
|
+
launchHomeFiles: { kimi: {
|
|
9521
|
+
"mcp.json": mcpConfigPath,
|
|
9522
|
+
"config.toml": configPath
|
|
9523
|
+
} }
|
|
9487
9524
|
};
|
|
9488
9525
|
}
|
|
9489
9526
|
function withNetworkDomains(role, domains) {
|
|
@@ -9496,6 +9533,16 @@ function withNetworkDomains(role, domains) {
|
|
|
9496
9533
|
}
|
|
9497
9534
|
};
|
|
9498
9535
|
}
|
|
9536
|
+
function withLaneMcp(role, posture) {
|
|
9537
|
+
if (!posture) return role;
|
|
9538
|
+
return {
|
|
9539
|
+
...withNetworkDomains(role, posture.networkDomains),
|
|
9540
|
+
launchHomeFiles: {
|
|
9541
|
+
...role.launchHomeFiles,
|
|
9542
|
+
...posture.launchHomeFiles
|
|
9543
|
+
}
|
|
9544
|
+
};
|
|
9545
|
+
}
|
|
9499
9546
|
function withAllowRules(permissions, allowRules) {
|
|
9500
9547
|
if (allowRules.length === 0) return permissions;
|
|
9501
9548
|
const existingAllowRules = Array.isArray(permissions.allow) ? permissions.allow : [];
|
|
@@ -14442,7 +14489,7 @@ function createSessionObservability({ agentId, getRecorder }) {
|
|
|
14442
14489
|
auditLog.splice(0, auditLog.length - AUDIT_LOG_MAX);
|
|
14443
14490
|
}
|
|
14444
14491
|
function recordDecision(entry) {
|
|
14445
|
-
const stamped = agentId === DEFAULT_AGENT_ID ? entry : {
|
|
14492
|
+
const stamped = agentId === DEFAULT_AGENT_ID$1 ? entry : {
|
|
14446
14493
|
...entry,
|
|
14447
14494
|
agent: agentId
|
|
14448
14495
|
};
|
|
@@ -17835,7 +17882,7 @@ var Session = class extends EventEmitter {
|
|
|
17835
17882
|
_resizeSeq;
|
|
17836
17883
|
_titleSource;
|
|
17837
17884
|
_statusSource;
|
|
17838
|
-
constructor({ customTitle, id, name, path: projectPath, dangerouslySkipPermissions = false, replayBufferKB = 512, hookRouter = null, getHookPort = null, hooksBaseDir = void 0, titleStabilizationMs = 1500, statusConflictMs = void 0, statusDedupMs = void 0, detectBackgroundAgents = true, agentTtlMs = DEFAULT_AGENT_TTL_MS, shellTaskTtlMs = DEFAULT_SHELL_TASK_TTL_MS, teammateTaskTtlMs = DEFAULT_TEAMMATE_TASK_TTL_MS, gateReleaseSettleMs = DEFAULT_GATE_RELEASE_SETTLE_MS, detectScheduledWakeups = true, observeToolCalls = false, agent = DEFAULT_AGENT_ID, adapter = null, bypassHookTrust = false, isMarkedUnguarded = false, isGuardrailsReleased = false, holdsQuestionsForParent = false, startCodexBridge = startCodexAppServerBridge, titleQuietFallbackMs = 3e4, spawnCommand = null, initialPrompt = null, extraClaudeArgs = [], ephemeral = false, resumeSessionId = null, taskTitleState = void 0, prLinks = void 0, settingsPermissions = null, settingsGuardrails = null, prepareGuardrails = null, getRemoteLaunch = null, spawnEnv = null, prependPathDirs = [], enableProjectMcp = false, hookTools = [], planReviewPort = null, planLimits = false, getUserHooks = null, extraUserHooks = [], prepareCoherence = null, ptySpawn = null, requireWorktree = false, screenKeeperFactory = null, killProc = null, signalProc = null, platform = process.platform, gitWorkspace = null, integrationBranch = null, autoRebase = true, syncOnStart = true, liveWorktreeReview = true, worktreeRoot = null, worktreeShare = null, workspaceRepos = void 0, agentDepth = 0, ownerId = null, commitSigningProgram = null }) {
|
|
17885
|
+
constructor({ customTitle, id, name, path: projectPath, dangerouslySkipPermissions = false, replayBufferKB = 512, hookRouter = null, getHookPort = null, hooksBaseDir = void 0, titleStabilizationMs = 1500, statusConflictMs = void 0, statusDedupMs = void 0, detectBackgroundAgents = true, agentTtlMs = DEFAULT_AGENT_TTL_MS, shellTaskTtlMs = DEFAULT_SHELL_TASK_TTL_MS, teammateTaskTtlMs = DEFAULT_TEAMMATE_TASK_TTL_MS, gateReleaseSettleMs = DEFAULT_GATE_RELEASE_SETTLE_MS, detectScheduledWakeups = true, observeToolCalls = false, agent = DEFAULT_AGENT_ID$1, adapter = null, bypassHookTrust = false, isMarkedUnguarded = false, isGuardrailsReleased = false, holdsQuestionsForParent = false, startCodexBridge = startCodexAppServerBridge, titleQuietFallbackMs = 3e4, spawnCommand = null, initialPrompt = null, extraClaudeArgs = [], ephemeral = false, resumeSessionId = null, taskTitleState = void 0, prLinks = void 0, settingsPermissions = null, settingsGuardrails = null, prepareGuardrails = null, getRemoteLaunch = null, spawnEnv = null, prependPathDirs = [], enableProjectMcp = false, hookTools = [], planReviewPort = null, planLimits = false, getUserHooks = null, extraUserHooks = [], prepareCoherence = null, ptySpawn = null, requireWorktree = false, screenKeeperFactory = null, killProc = null, signalProc = null, platform = process.platform, gitWorkspace = null, integrationBranch = null, autoRebase = true, syncOnStart = true, liveWorktreeReview = true, worktreeRoot = null, worktreeShare = null, workspaceRepos = void 0, agentDepth = 0, ownerId = null, commitSigningProgram = null }) {
|
|
17839
17886
|
super();
|
|
17840
17887
|
this.id = id;
|
|
17841
17888
|
this.ownerId = ownerId;
|
|
@@ -18855,7 +18902,7 @@ var Session = class extends EventEmitter {
|
|
|
18855
18902
|
this.emit("rebaseline");
|
|
18856
18903
|
this._resetDetectionSources({ quiet: false });
|
|
18857
18904
|
const remoteLaunch = this._getRemoteLaunch();
|
|
18858
|
-
if (remoteLaunch !== null && this.agentId !== DEFAULT_AGENT_ID && this.agentId !== "codex") {
|
|
18905
|
+
if (remoteLaunch !== null && this.agentId !== DEFAULT_AGENT_ID$1 && this.agentId !== "codex") {
|
|
18859
18906
|
this._abandonSpawn(/* @__PURE__ */ new Error("A Coder workspace session runs Claude Code or Codex only"));
|
|
18860
18907
|
return;
|
|
18861
18908
|
}
|
|
@@ -20148,6 +20195,8 @@ var LANE_MCP_DIR_PREFIX = "glimmervoid-lane-settings-";
|
|
|
20148
20195
|
var GATE_SELF_TEST_TIMEOUT_MS = 5e3;
|
|
20149
20196
|
var CODEX_MCP_LIST_TIMEOUT_MS = 1e4;
|
|
20150
20197
|
var CODEX_AGENT_ID = "codex";
|
|
20198
|
+
var KIMI_AGENT_ID$2 = "kimi";
|
|
20199
|
+
var DEFAULT_AGENT_ID = "claude";
|
|
20151
20200
|
var HOOK_SHELL = "/bin/sh";
|
|
20152
20201
|
var BLOCKING_EXIT_CODE = 2;
|
|
20153
20202
|
async function readOperatorClaudeConfig() {
|
|
@@ -20201,8 +20250,51 @@ async function prepareCodexLaneMcp(listCodexServers, gatePath) {
|
|
|
20201
20250
|
cleanup: async () => {}
|
|
20202
20251
|
};
|
|
20203
20252
|
}
|
|
20204
|
-
async function
|
|
20253
|
+
async function readOptionalText(filePath) {
|
|
20254
|
+
return fs$1.readFile(filePath, "utf8").catch((error) => error.code === "ENOENT" ? "" : null);
|
|
20255
|
+
}
|
|
20256
|
+
async function prepareKimiLaneMcp(kimiHome, gatePath) {
|
|
20257
|
+
const kimiMcpConfig = await fs$1.readFile(path.join(kimiHome, "mcp.json"), "utf8").then(JSON.parse, () => null);
|
|
20258
|
+
const server = findPosthogServer(isRecord(kimiMcpConfig) ? kimiMcpConfig.mcpServers : null);
|
|
20259
|
+
const operatorConfigText = await readOptionalText(path.join(kimiHome, "config.toml"));
|
|
20260
|
+
if (!server || operatorConfigText === null) return null;
|
|
20261
|
+
const configDirectory = await makeHostScratchDirectory(LANE_MCP_DIR_PREFIX);
|
|
20262
|
+
const removeConfigDirectory = () => fs$1.rm(configDirectory, {
|
|
20263
|
+
recursive: true,
|
|
20264
|
+
force: true
|
|
20265
|
+
}).catch(() => {});
|
|
20266
|
+
const mcpConfigPath = path.join(configDirectory, "mcp.json");
|
|
20267
|
+
const configPath = path.join(configDirectory, "config.toml");
|
|
20268
|
+
const posture = kimiLaneMcpPosture({
|
|
20269
|
+
server,
|
|
20270
|
+
mcpConfigPath,
|
|
20271
|
+
configPath,
|
|
20272
|
+
gatePath,
|
|
20273
|
+
interpreterPath: process.execPath
|
|
20274
|
+
});
|
|
20275
|
+
const gateHook = posture ? HOOK_TOOLS.posthogReadGate.claudeEntry(posture.hookTool, "") : null;
|
|
20276
|
+
const configText = gateHook ? kimiLaneConfigText(operatorConfigText, {
|
|
20277
|
+
matcher: gateHook.matcher,
|
|
20278
|
+
command: gateHook.hooks[0]?.command ?? ""
|
|
20279
|
+
}) : null;
|
|
20280
|
+
try {
|
|
20281
|
+
if (!posture || configText === null || !await gateDeniesKnownWrite(posture.hookTool)) throw new Error("no gated PostHog for this lane");
|
|
20282
|
+
await writeJsonAtomic(mcpConfigPath, kimiLaneMcpConfig(server), { mode: 384 });
|
|
20283
|
+
await fs$1.writeFile(configPath, configText, { mode: 384 });
|
|
20284
|
+
return {
|
|
20285
|
+
posture,
|
|
20286
|
+
readablePaths: [configDirectory, process.execPath],
|
|
20287
|
+
cleanup: removeConfigDirectory
|
|
20288
|
+
};
|
|
20289
|
+
} catch {
|
|
20290
|
+
await removeConfigDirectory();
|
|
20291
|
+
return null;
|
|
20292
|
+
}
|
|
20293
|
+
}
|
|
20294
|
+
async function prepareLaneMcp({ laneArgs, agent }, { readClaudeConfig = readOperatorClaudeConfig, listCodexServers = listOperatorCodexServers, kimiHome = realKimiHome(), gatePath = relayPath("posthog-read-gate") } = {}) {
|
|
20205
20295
|
if (agent === CODEX_AGENT_ID) return prepareCodexLaneMcp(listCodexServers, gatePath);
|
|
20296
|
+
if (agent === KIMI_AGENT_ID$2) return prepareKimiLaneMcp(kimiHome, gatePath);
|
|
20297
|
+
if (agent !== void 0 && agent !== DEFAULT_AGENT_ID) return null;
|
|
20206
20298
|
const claudeConfig = await readClaudeConfig().catch(() => null);
|
|
20207
20299
|
const server = findPosthogServer(isRecord(claudeConfig) ? claudeConfig.mcpServers : null);
|
|
20208
20300
|
if (!server) return null;
|
|
@@ -20299,7 +20391,7 @@ function laneAgentArgs({ isClaude, isWrapped, isCodex, extraArgs, model, posture
|
|
|
20299
20391
|
return [...extraArgs];
|
|
20300
20392
|
}
|
|
20301
20393
|
function createLaneSpawn({ sessions = /* @__PURE__ */ new Map(), closeSessionDataClients = () => {}, hookRouter = null, getHookPort = null, spawnGate = null, replayBufferKB = void 0, recordLane = null, laneName, allowTools = [], createSession = (options) => new Session(options), settingsPermissions, spawnEnv = null, prepareGuardrails = prepareGuardrailsLaunch, guardrailsRefusal = allowGuardedSpawn, prepareMcp = prepareLaneMcp, platform = process.platform }) {
|
|
20302
|
-
return async function spawnLaneSession({ id, name, prompt, cwd, agent = DEFAULT_AGENT_ID, extraArgs = [], model = null, signal = null, onOutput, readablePaths = [] }) {
|
|
20394
|
+
return async function spawnLaneSession({ id, name, prompt, cwd, agent = DEFAULT_AGENT_ID$1, extraArgs = [], model = null, signal = null, onOutput, readablePaths = [] }) {
|
|
20303
20395
|
const isCodex = agent === "codex";
|
|
20304
20396
|
const isKimi = agent === KIMI_AGENT_ID$1;
|
|
20305
20397
|
const isClaude = !isCodex && !isKimi;
|
|
@@ -20317,7 +20409,7 @@ function createLaneSpawn({ sessions = /* @__PURE__ */ new Map(), closeSessionDat
|
|
|
20317
20409
|
allowTools
|
|
20318
20410
|
}) : null;
|
|
20319
20411
|
const basePermissions = settingsPermissions ?? posture?.permissions ?? null;
|
|
20320
|
-
const laneMcp =
|
|
20412
|
+
const laneMcp = hookRouter ? await prepareMcp({
|
|
20321
20413
|
laneArgs: posture?.args ?? [],
|
|
20322
20414
|
agent
|
|
20323
20415
|
}) : null;
|
|
@@ -20356,7 +20448,7 @@ function createLaneSpawn({ sessions = /* @__PURE__ */ new Map(), closeSessionDat
|
|
|
20356
20448
|
hookRouter,
|
|
20357
20449
|
getHookPort,
|
|
20358
20450
|
prepareGuardrails: isWrapped ? (facts) => prepareGuardrails({
|
|
20359
|
-
role:
|
|
20451
|
+
role: withLaneMcp(judgeRole({
|
|
20360
20452
|
vendor: laneVendor(agent),
|
|
20361
20453
|
cwd: facts.cwd,
|
|
20362
20454
|
hookPort: facts.hookPort,
|
|
@@ -20366,7 +20458,7 @@ function createLaneSpawn({ sessions = /* @__PURE__ */ new Map(), closeSessionDat
|
|
|
20366
20458
|
...readablePaths,
|
|
20367
20459
|
...laneMcp?.readablePaths ?? []
|
|
20368
20460
|
]
|
|
20369
|
-
}), laneMcp?.posture
|
|
20461
|
+
}), laneMcp?.posture),
|
|
20370
20462
|
launchId: facts.launchId
|
|
20371
20463
|
}) : null
|
|
20372
20464
|
};
|
|
@@ -27086,10 +27178,9 @@ function createTeamReviewSpawn({ reviewSessions, closeSessionDataClients, hookRo
|
|
|
27086
27178
|
return async function spawnTeamReviewSession({ id, name, cwd, spawnEnv, extraClaudeArgs, settingsPermissions, settingsGuardrails, guardrailsRole, signal, onToolStep, onSessionId, resumeSessionId, initialPrompt, agent, extraUserHooks, prependPathDirs }) {
|
|
27087
27179
|
if (guardrailsRole !== void 0 && platform === SANDBOX_RUNTIME_UNSUPPORTED_PLATFORM) throw new Error(`${laneName} lane needs the sandbox runtime, which does not run on ${platform}`);
|
|
27088
27180
|
const skipPermissions = settingsPermissions.defaultMode === "bypassPermissions";
|
|
27089
|
-
const
|
|
27090
|
-
const laneMcp = hookRouter && (laneAgent === DEFAULT_AGENT_ID || laneAgent === "codex") ? await prepareMcp({
|
|
27181
|
+
const laneMcp = hookRouter ? await prepareMcp({
|
|
27091
27182
|
laneArgs: extraClaudeArgs,
|
|
27092
|
-
agent:
|
|
27183
|
+
agent: agent ?? DEFAULT_AGENT_ID$1
|
|
27093
27184
|
}) : null;
|
|
27094
27185
|
const sharedHookTools = hookToolConfig ? resolveHookTools$2({ saneYolo: hookToolConfig.saneYolo }, { skipPermissions }) : [];
|
|
27095
27186
|
const sess = makeSession({
|
|
@@ -27111,10 +27202,10 @@ function createTeamReviewSpawn({ reviewSessions, closeSessionDataClients, hookRo
|
|
|
27111
27202
|
settingsPermissions: laneMcp ? withAllowRules(settingsPermissions, laneMcp.posture.allowRules) : settingsPermissions,
|
|
27112
27203
|
settingsGuardrails: settingsGuardrails ?? null,
|
|
27113
27204
|
prepareGuardrails: guardrailsRole === void 0 ? null : (facts) => prepareGuardrails({
|
|
27114
|
-
role:
|
|
27205
|
+
role: withLaneMcp(guardrailsRole({
|
|
27115
27206
|
...facts,
|
|
27116
27207
|
readablePaths: [...facts.readablePaths, ...laneMcp?.readablePaths ?? []]
|
|
27117
|
-
}), laneMcp?.posture
|
|
27208
|
+
}), laneMcp?.posture),
|
|
27118
27209
|
launchId: facts.launchId
|
|
27119
27210
|
}),
|
|
27120
27211
|
replayBufferKB,
|
|
@@ -46573,7 +46664,7 @@ function registerControlHandlers(controlWss, deps) {
|
|
|
46573
46664
|
name,
|
|
46574
46665
|
path: projectPath,
|
|
46575
46666
|
repos,
|
|
46576
|
-
agent: requestedAgent && requestedAgent !== DEFAULT_AGENT_ID ? requestedAgent : void 0,
|
|
46667
|
+
agent: requestedAgent && requestedAgent !== DEFAULT_AGENT_ID$1 ? requestedAgent : void 0,
|
|
46577
46668
|
dangerouslySkipPermissions: skipPerms,
|
|
46578
46669
|
saneYolo: skipPerms && msg.saneYolo === true,
|
|
46579
46670
|
unguarded: msg.unguarded === true,
|
|
@@ -48027,7 +48118,7 @@ function registerControlHandlers(controlWss, deps) {
|
|
|
48027
48118
|
return (config.projects || []).filter((project) => typeof project?.id === "string" && typeof project?.name === "string").map((project) => ({
|
|
48028
48119
|
id: project.id,
|
|
48029
48120
|
name: project.name,
|
|
48030
|
-
agent: typeof project.agent === "string" ? project.agent : DEFAULT_AGENT_ID
|
|
48121
|
+
agent: typeof project.agent === "string" ? project.agent : DEFAULT_AGENT_ID$1
|
|
48031
48122
|
}));
|
|
48032
48123
|
}
|
|
48033
48124
|
function handleRequestHooksReport(msg, ws) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Gi as e,Hi as t,Ji as n,Ki as r,Ui as i,Wi as a,Yi as o,qi as s}from"./index-
|
|
1
|
+
import{Gi as e,Hi as t,Ji as n,Ki as r,Ui as i,Wi as a,Yi as o,qi as s}from"./index-CRgdx1Xc.js";var c=.3,l=null;function u(){return o(l)}function d(e){return n(e,l)}async function f(){try{let e=await fetch(t,{credentials:`same-origin`,cache:`no-store`});e.ok&&(l=s(await e.json()))}catch{}}function p(){let e=new AudioContext;return e.state===`suspended`&&e.resume(),e}function m(e,t){setTimeout(()=>e.close().catch(()=>{}),(t+.1)*1e3)}function h(e){g(a[e]??a.chime)}function g(e){let t=p(),n=t.createGain();n.gain.value=e.peakGain,n.connect(t.destination);let r=t.currentTime,i=0;for(let a of e.tones){let e=r+a.startSeconds,o=e+a.durationSeconds,s=t.createOscillator(),c=t.createGain();s.type=a.waveform,s.frequency.setValueAtTime(a.frequency,e),a.endFrequency&&s.frequency.exponentialRampToValueAtTime(a.endFrequency,o),c.gain.setValueAtTime(.001,e),c.gain.exponentialRampToValueAtTime(a.gain??1,e+.01),c.gain.exponentialRampToValueAtTime(.001,o),s.connect(c),c.connect(n),s.start(e),s.stop(o),i=Math.max(i,a.startSeconds+a.durationSeconds)}m(t,i)}async function _(e){try{let t=await fetch(r(e),{credentials:`same-origin`});return t.ok?await t.arrayBuffer():null}catch{return null}}async function v(e){let t=await _(e);if(!t)return!1;let n=p();try{let e=await n.decodeAudioData(t),r=n.createGain();r.gain.value=c,r.connect(n.destination);let i=n.createBufferSource();return i.buffer=e,i.connect(r),i.start(),m(n,e.duration),!0}catch{return n.close().catch(()=>{}),!1}}var y=[659.25,830.61,987.77,1108.73,987.77,830.61,739.99,659.25,739.99,830.61,987.77,1108.73,987.77,830.61];function b(){try{let e=new AudioContext;if(e.state===`suspended`&&e.resume(),e.state===`suspended`)return;let t=e.createGain();t.gain.value=.05,t.connect(e.destination);let n=.125,r=e.currentTime;for(let i=0;i<y.length;i++){let a=r+i*n,o=e.createOscillator(),s=e.createGain();o.type=`square`,o.frequency.value=y[i],s.gain.setValueAtTime(.001,a),s.gain.exponentialRampToValueAtTime(1,a+.01),s.gain.exponentialRampToValueAtTime(.001,a+n*.9),o.connect(s),s.connect(t),o.start(a),o.stop(a+n)}let i=r+y.length*n;t.gain.setValueAtTime(.05,i-.05),t.gain.exponentialRampToValueAtTime(.001,i),setTimeout(()=>e.close().catch(()=>{}),(i-r+.1)*1e3)}catch{}}function x(){try{h(i)}catch{}}function S(t){try{let n=d(t),r=e(n);if(!r){h(n);return}v(r).then(e=>{e||x()})}catch{}}export{f as loadCustomSounds,S as playAlertSound,b as playNyanJingle,g as playToneSequence,d as resolveSoundId,u as soundOptions};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./updates-view-core-B_ik1cqt.js";import{n as e,o as t,r as n}from"./dom-helpers-I_SDCPvs.js";import{J as r,Y as i,q as a}from"./index-
|
|
1
|
+
import"./updates-view-core-B_ik1cqt.js";import{n as e,o as t,r as n}from"./dom-helpers-I_SDCPvs.js";import{J as r,Y as i,q as a}from"./index-CRgdx1Xc.js";var o={mine:`Mine`,run:`Run`,cancel:`Cancel`},s=null;function c(e){return e===null?`n/a`:`${Math.round(e*100)}%`}function l(e){if(e===null)return`n/a`;let t=Math.round(e*100);return t>0?`+${t}`:String(t)}function u(e,n,i){let a=t(`button`,`bench-action-button`,o[n]);return a.type=`button`,a.disabled=i,a.addEventListener(`click`,()=>r(e.id,n)),a}function d(e,t){let n=e.inFlight;if(!n||n.suiteId!==t.id)return``;let r=n.caseId?`case ${n.caseId}, `:``;return`Cell ${n.cellIndex+1} of ${n.cellCount}: ${r}arm ${n.armId}, trial ${n.trial}, ${n.phase}.`}function f(e){let n=t(`td`,`bench-score`,c(e?.recall??null));return e&&e.invalid>0&&(n.title=`${e.invalid} invalid or failed cell(s)`),e&&e.degraded>0&&(n.dataset.degraded=`true`),n}function p(e){let n=e.armIds.filter(t=>t!==e.baselineArm),r=t(`table`,`bench-table`),i=t(`tr`);i.append(t(`th`,null,`Case`),...e.armIds.map(n=>t(`th`,null,n===e.baselineArm?`${n} (baseline)`:n))),i.append(...n.map(e=>t(`th`,null,`${e} vs baseline`))),r.append(i);for(let i of e.rows){let a=t(`tr`);a.append(t(`td`,`bench-case`,i.caseId),...e.armIds.map(e=>f(i.arms[e]))),a.append(...n.map(e=>t(`td`,`bench-delta`,l(i.deltaVsBaseline[e]??null)))),r.append(a)}let a=[...new Set(e.armIds.flatMap(t=>Object.keys(e.totals[t]?.recallByTag??{})))].sort(),o=t(`tr`,`bench-total`);o.append(t(`td`,`bench-case`,`Paired recall`),...e.armIds.map(t=>f(e.totals[t]))),r.append(o);for(let n of a){let i=t(`tr`,`bench-total`);i.append(t(`td`,`bench-case`,`Recall, ${n}`),...e.armIds.map(r=>t(`td`,`bench-score`,c(e.totals[r]?.recallByTag[n]??null)))),r.append(i)}return r}function m(e,r){let{isServerConnected:i,pendingActionBySuite:o,outcomeBySuite:s}=a(),c=t(`div`,`bench-suite`),l=e.inFlight?.suiteId===r.id,f=!!e.inFlight&&!l,m=o.has(r.id)||!i,h=t(`div`,`bench-summary`);h.append(t(`span`,`bench-suite-title`,r.title),n(`bench`,r.caseCount===1?`case`:`cases`,String(r.caseCount)),n(`bench`,r.candidateCount===1?`candidate`:`candidates`,String(r.candidateCount)),n(`bench`,`arms`,String(r.armIds.length))),c.append(h);let g=t(`div`,`bench-controls`),_=e.configured===!0&&r.error===null;g.append(u(r,`mine`,!_||m||l),u(r,`run`,!_||m||l||f||r.caseCount===0),u(r,`cancel`,m||!l));let v=t(`span`,`bench-status`,(i?``:`Not connected to the server. Reconnecting.`)||d(e,r)||s.get(r.id)||``);if(v.setAttribute(`role`,`status`),g.append(v),c.append(g),r.error)return c.append(t(`p`,`bench-error`,r.error)),c;let y=r.latestReport;return y?(c.append(t(`p`,`bench-run-line`,`Latest run ${y.runId}: ${y.status}. Only cases every arm scored count toward paired recall.`)),y.rows.length>0&&c.append(p(y)),c):(c.append(t(`p`,`bench-empty`,r.caseCount===0?`Move approved candidates into the cases folder, then choose Run.`:`No run yet.`)),c)}function h(){if(!s)return;s.textContent=``;let{status:n}=a(),r=e(`bench`,`Benchmarks`,`Suites from the benchmarks folder of the Glimmervoid home, one run at a time.`);if(s.append(r),!n)s.append(t(`p`,`bench-empty`,`Waiting for the server.`));else if(!n.configured)s.append(t(`p`,`bench-empty`,n.reason||`Benchmarks are off.`));else if(n.suites.length===0)s.append(t(`p`,`bench-empty`,`No suites yet. Create a folder holding suite.json under benchmarks in the Glimmervoid home.`));else for(let e of n.suites)s.append(m(n,e))}function g(e){s||(s=t(`div`,`bench-content`),e.append(s),i(h),h())}var _={mount:g};export{_ as view};
|
|
Binary file
|
package/dist/client/assets/{celebration-player-CagLMZKS.js → celebration-player-Bs7gFFtp.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,o as t,s as n}from"./dom-helpers-I_SDCPvs.js";import{ta as r,yi as i}from"./index-BYYC8NYG.js";import{playToneSequence as a}from"./alert-sound-CT_6F7Xp.js";var o=1.2,s=1.55,c=.12,l=523.25,u=2,d=8,f=(e,t,n)=>({semitone:e,startBeat:t,beats:n}),p={melody:[f(7,4,.5),f(11,4.5,.5),f(12,5,3)],bass:[f(-5,4,1),f(-12,5,3)]},m=[{melody:[f(0,0,1),f(4,1,1),f(7,2,1),f(9,3,1)],bass:[f(-12,0,2),f(-8,2,2)]},{melody:[f(7,0,.67),f(7,.67,.67),f(7,1.33,.67),f(9,2,1),f(5,3,1)],bass:[f(-12,0,2),f(-7,2,2)]},{melody:[f(5,0,1),f(9,1,1),f(7,2,1),f(4,3,1)],bass:[f(-7,0,2),f(-12,2,2)]},{melody:[f(12,0,.5),f(7,.5,.5),f(12,1,.5),f(16,1.5,.5),f(16,2,1),f(14,3,1)],bass:[f(-12,0,2),f(-3,2,2)]},{melody:[f(4,0,1),f(7,1,1),f(4,2,.5),f(5,2.5,.5),f(7,3,.5),f(4,3.5,.5)],bass:[f(-8,0,2),f(-12,2,2)]}].map(e=>({melody:[...e.melody,...p.melody],bass:[...e.bass,...p.bass]}));function h(e,t){return l*2**((e+t)/12)}function g(e,t){let n=(e,n,r)=>e.map(e=>({frequency:h(e.semitone,t),startSeconds:s+e.startBeat*c,durationSeconds:e.beats*c,waveform:n,gain:r}));return[...n(e.melody,`square`,.2),...n(e.melody,`triangle`,.5),...n(e.bass,`triangle`,.6)]}var ee=[{frequency:220,endFrequency:880,startSeconds:0,durationSeconds:.32,waveform:`triangle`,gain:.25},{frequency:160,endFrequency:45,startSeconds:o,durationSeconds:.28,waveform:`sine`,gain:1},{frequency:1400,endFrequency:380,startSeconds:o,durationSeconds:.06,waveform:`square`,gain:.12}];function te(e){let t=m[e%m.length],n=Math.min(e*u,d);return{peakGain:.1,tones:[...ee,...g(t,n)]}}function _(e){return Math.round(Math.sqrt(2*e/780)*1e3)}function v(e,t,n=Math.random){return Math.round(e+n()*(t-e))}function y(e,t=Math.random){let n=[...e];for(let e=n.length-1;e>0;--e){let r=Math.floor(t()*(e+1));[n[e],n[r]]=[n[r],n[e]]}return n}var ne=.6,re=.25,ie=1.6;function ae(e){return Math.min(ne+e*re,ie)}var b=[`var(--accent)`,`var(--state-running)`,`var(--state-idle)`,`var(--state-waiting)`,`var(--state-failed)`];function oe(e,t=Math.random){let n=v(320,520,t),r=v(1800,2800,t);return[[`--confetti-start-x`,`${v(4,96,t)}%`],[`--confetti-x`,`${v(-140,140,t)}px`],[`--confetti-rise`,`${-v(20,55,t)}px`],[`--confetti-fall`,`${v(45,70,t)}vh`],[`--confetti-rise-ms`,`${n}ms`],[`--confetti-fall-ms`,`${r}ms`],[`--confetti-flight-ms`,`${n+r}ms`],[`--confetti-tilt`,`${v(0,180,t)}deg`],[`--confetti-spin`,`${v(-360,360,t)}deg`],[`--confetti-flutter-ms`,`${v(160,340,t)}ms`],[`--confetti-delay`,`${v(0,160,t)}ms`],[`--confetti-color`,b[e%b.length]]]}var se=`<svg viewBox="0 0 36 36" aria-hidden="true"><circle class="merge-bullseye-ring-light" cx="18" cy="18" r="17"/><circle class="merge-bullseye-ring-red" cx="18" cy="18" r="13"/><circle class="merge-bullseye-ring-light" cx="18" cy="18" r="9"/><circle class="merge-bullseye-ring-red" cx="18" cy="18" r="5"/></svg>`,ce=`<svg viewBox="0 0 26 8" aria-hidden="true"><path class="merge-bullseye-dart-flight" d="M0 0L7 3V5L0 8L2 4Z"/><rect class="merge-bullseye-dart-shaft" x="6" y="3.3" width="8" height="1.4"/><rect class="merge-bullseye-dart-barrel" x="13" y="2.5" width="7" height="3" rx="1"/><path class="merge-bullseye-dart-tip" d="M20 3L26 4L20 5Z"/></svg>`;function le(){let e=n(`div`,`merge-bullseye-target`,se);return e.append(t(`span`,`merge-bullseye-ripple`)),e}function ue(){let e=t(`div`,`merge-bullseye-dart-drift`),r=t(`div`,`merge-bullseye-dart-arc`),i=t(`div`,`merge-bullseye-dart-aim`);return i.append(n(`div`,`merge-bullseye-dart`,ce)),r.append(i),e.append(r),e}function de(){let e=t(`div`,`merge-bullseye-range`),n=t(`div`,`merge-bullseye-track`);return n.append(ue()),e.append(le(),n),e}var fe={title:`BULLSEYE!`,buildScene:de},pe=6,x=30,S=-14,C=16;function w(e=Math.random){return[[`--crosshair-start-left`,`${v(pe,x,e)}%`],[`--crosshair-start-offset-y`,`${v(S,C,e)}px`]]}var T=`<svg viewBox="0 0 26 40" aria-hidden="true"><path class="merge-headshot-target-body" d="M9 13H17L18 16Q25 18 25 24V40H1V24Q1 18 8 16Z"/><circle class="merge-headshot-target-head" cx="13" cy="7" r="6"/><circle class="merge-headshot-target-ring" cx="13" cy="7" r="3"/><circle class="merge-headshot-target-ring" cx="13" cy="27" r="6"/><circle class="merge-headshot-target-ring" cx="13" cy="27" r="2.5"/></svg>`,E=`<svg viewBox="0 0 22 22" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="M11 0V5M11 17V22M0 11H5M17 11H22"/><circle class="merge-headshot-crosshair-dot" cx="11" cy="11" r="1"/></svg>`,D=`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 3L8 8M21 3L16 8M3 21L8 16M21 21L16 16"/></svg>`;function O(){let r=t(`div`,`merge-headshot-sweep`);e(r,w());let i=t(`div`,`merge-headshot-aim`);i.append(n(`div`,`merge-headshot-crosshair`,E));let a=t(`div`,`merge-headshot-bob`);return a.append(i,n(`div`,`merge-headshot-hitmarker`,D)),r.append(a),r}function k(){let e=t(`div`,`merge-headshot-range`),r=t(`div`,`merge-headshot-track`);return r.append(O()),e.append(n(`div`,`merge-headshot-target`,T),r),e}var A={title:`HEADSHOT!`,buildScene:k},j=[`10`,`J`,`Q`,`K`,`A`],M=160,N=19,P=5,F=9,I=780,L=70,R=70,z=35;function B(e){let t=j.length-1,n=e-t/2;return{offsetPx:n*N,titleSpreadFraction:n/t,tiltDegrees:n*P,bottomPx:F-n**2,dealLeadMs:I-e*L,flipLeadMs:M+(t-e)*R,waveDelayMs:e*z}}function me(e){return[[`--card-offset`,`${e.offsetPx}px`],[`--card-title-spread`,String(e.titleSpreadFraction)],[`--card-tilt`,`${e.tiltDegrees}deg`],[`--card-bottom`,`${e.bottomPx}px`],[`--card-deal-lead-ms`,`${e.dealLeadMs}ms`],[`--card-flip-lead-ms`,`${e.flipLeadMs}ms`],[`--card-wave-delay-ms`,`${e.waveDelayMs}ms`]]}function he(){return[[`--card-flip-ms`,`${M}ms`]]}var ge=`<svg viewBox="0 0 10 9" aria-hidden="true"><path d="M5 8.5C5 8.5 0 5.3 0 2.6C0 1.1 1.2 0 2.6 0C3.6 0 4.5 .6 5 1.4C5.5 .6 6.4 0 7.4 0C8.8 0 10 1.1 10 2.6C10 5.3 5 8.5 5 8.5Z"/></svg>`;function _e(n,r){let i=t(`div`,`merge-flush-deal`);e(i,me(B(r)));let a=t(`div`,`merge-flush-hop`),o=t(`div`,`merge-flush-card`),s=t(`div`,`merge-flush-face`);return s.append(t(`span`,`merge-flush-rank`,n)),s.insertAdjacentHTML(`beforeend`,ge),o.append(t(`div`,`merge-flush-back`),s),a.append(o),i.append(a),i}function ve(){let n=t(`div`,`merge-flush-table`);return e(n,he()),n.append(...j.map(_e)),n}var ye={title:`ROYAL FLUSH!`,buildScene:ve},be=[1,2,3,4],xe=14,Se=3,Ce=3,V=10,we=20,Te=2,H=28,U=18,Ee=.01,De=1.5,Oe=2200,ke=1,W=120,G=.35,Ae=15,je=105,Me=4,Ne=65,Pe=145;function Fe(e){return Math.round(e/(Math.PI*U)*360)}function K(e){return we-e*Te}function q(e){return e.rowIndex*xe+e.depthIndex*Se}function J(e,t,n){return Array.from({length:n},(r,i)=>e+(t-e)*i/(n-1))}function Y(){return be.flatMap((e,t)=>Array.from({length:e},(n,r)=>({rowIndex:t,depthIndex:e-1-r})))}function Ie(e,t){let n=y(J(Ae,je,e),t),r=y(J(Ne,Pe,e),t);return n.map((e,n)=>({angleDegrees:e+v(-4,Me,t),depthScalePercent:Math.round(r[n])}))}function Le(e,t,n){let r=v(240,380,n),i=t.angleDegrees*Math.PI/180,a=r*Math.cos(i),o=(r*Math.sin(i))**2/1560,s=v(15,45,n),c=_(o),l=_(o+s),u=c+l,d=v(540,1080,n),f=a>=0?1:-1,p=q(e);return{depthIndex:e.depthIndex,launchAngleDegrees:t.angleDegrees,distanceFromHeadPinPx:p,layer:K(e.depthIndex),flyXPx:Math.round(a*u/1e3),peakRisePx:Math.round(o),landingDropPx:s,riseMs:c,fallMs:l,flightMs:u,spinDegrees:Math.round(f*d*u/1e3),glintMs:Math.round(180/d*1e3),depthScalePercent:t.depthScalePercent,delayMs:Math.round(p/G)}}function Re(e=Math.random){let t=Y(),n=Ie(t.length,e);return t.map((t,r)=>Le(t,n[r],e))}function ze(e){return[[`--pin-left`,`${e.distanceFromHeadPinPx}px`],[`--pin-raise`,`${e.depthIndex*Ce}px`],[`--pin-shade`,`${100-e.depthIndex*12}%`],[`--pin-fly-x`,`${e.flyXPx}px`],[`--pin-peak-y`,`${-e.peakRisePx}px`],[`--pin-land-y`,`${e.landingDropPx}px`],[`--pin-rise-ms`,`${e.riseMs}ms`],[`--pin-fall-ms`,`${e.fallMs}ms`],[`--pin-flight-ms`,`${e.flightMs}ms`],[`--pin-spin`,`${e.spinDegrees}deg`],[`--pin-glint-ms`,`${e.glintMs}ms`],[`--pin-depth-scale`,`${e.depthScalePercent}%`],[`--pin-depth-shade`,`${e.depthScalePercent-10}%`],[`--pin-delay`,`${e.delayMs}ms`],[`--pin-layer`,String(e.layer)]]}function Be(){return K(De)}function Ve(){return Math.max(...Y().map(q))+V}function He(){let e=Ve(),t=H+e+U-ke;return[[`--ball-follow-px`,`${W}px`],[`--ball-follow-ms`,`${Math.round(W/G)}ms`],[`--ball-follow-spin`,`${Fe(W)}deg`],[`--ball-size`,`${U}px`],[`--ball-approach-spin`,`${Oe}deg`],[`--ball-impact-inset`,`${t}px`],[`--ball-layer`,String(Be())],[`--rack-right`,`${H}px`],[`--rack-width`,`${e}px`],[`--pin-width`,`${V}px`]]}function Ue(e=Math.random){return e()>=Ee?null:r[Math.floor(e()*r.length)].sprite}var We=`<svg viewBox="0 0 10 24" aria-hidden="true"><path class="merge-strike-pin-body" d="M5 0C7 0 7.6 2 7.2 4C6.9 5.6 6.3 6.6 6.4 8C6.6 10 9.6 12 9.6 16C9.6 19.5 8.4 22 7.6 24H2.4C1.6 22 .4 19.5 .4 16C.4 12 3.4 10 3.6 8C3.7 6.6 3.1 5.6 2.8 4C2.4 2 3 0 5 0Z"/><path class="merge-strike-pin-stripe" d="M3.1 5.2H6.9V6.2H3.1ZM3.4 7H6.6V8H3.4Z"/></svg>`;function Ge(r){let i=t(`span`,`merge-strike-pin`);return i.append(n(`span`,`merge-strike-pin-arc`,We)),e(i,ze(r)),i}function Ke(){let e=Ue();if(!e)return t(`span`,`merge-strike-ball`);let n=t(`span`,`merge-strike-ball is-animal`);return n.append(t(`span`,`nyan-sprite ${e}`)),n}function qe(){let n=t(`div`,`merge-strike-lane`);e(n,He());let r=t(`div`,`merge-strike-rack`);r.append(...Re().map(Ge));let i=t(`div`,`merge-strike-track`);return i.append(Ke()),n.append(r,i),n}var Je={title:`STRIKE!`,buildScene:qe},Ye=20,Xe=92,Ze=23,Qe=7,$e=-40;function et(){let e=_(72),t=_(69),n=780*t/1e3;return{launchHeightPx:Ye,peakHeightPx:Xe,heightThroughRimPx:Ze,heightLeavingNetPx:Qe,heightOutOfCardPx:$e,riseMs:e,fallToRimMs:t,speedThroughRimPxPerSecond:n,netCatchMs:Math.round(32/n*1e3),dropMs:_(47)}}function tt(e=et()){return[[`--ball-launch-y`,`${-e.launchHeightPx}px`],[`--ball-peak-y`,`${-e.peakHeightPx}px`],[`--ball-rim-y`,`${-e.heightThroughRimPx}px`],[`--ball-net-exit-y`,`${-e.heightLeavingNetPx}px`],[`--ball-drop-out-y`,`${-e.heightOutOfCardPx}px`],[`--ball-rise-ms`,`${e.riseMs}ms`],[`--ball-fall-to-rim-ms`,`${e.fallToRimMs}ms`],[`--ball-to-rim-ms`,`${e.riseMs+e.fallToRimMs}ms`],[`--ball-net-catch-ms`,`${e.netCatchMs}ms`],[`--ball-drop-ms`,`${e.dropMs}ms`]]}var nt=`<svg viewBox="0 0 40 48" aria-hidden="true"><rect class="merge-swish-pole" x="36" y="28" width="2" height="20"/><rect class="merge-swish-backboard" x="35" y="2" width="3" height="26" rx="1"/><path class="merge-swish-rim" d="M31 18H35M7 18A12 2.5 0 0 1 31 18"/></svg>`,rt=`<svg viewBox="0 0 40 48" aria-hidden="true"><g class="merge-swish-net"><path d="M8 18L12 32M13.5 18L15.5 32M19 18V32M24.5 18L22.5 32M30 18L26 32M9.5 23Q19 25 28.5 23M11 28Q19 29.5 27 28"/></g><path class="merge-swish-rim" d="M7 18A12 2.5 0 0 0 31 18"/></svg>`;function it(){let e=t(`div`,`merge-swish-ball-drift`),n=t(`div`,`merge-swish-ball-arc`);return n.append(t(`span`,`merge-swish-ball`)),e.append(n),e}function X(){let r=t(`div`,`merge-swish-court`);e(r,tt());let i=t(`div`,`merge-swish-track`);return i.append(it()),r.append(n(`div`,`merge-swish-hoop-back`,nt),i,n(`div`,`merge-swish-hoop-front`,rt)),r}var Z=[Je,{title:`SWISH!`,buildScene:X},fe,A,ye],at=48,Q=5600,$=null;function ot(n){let r=t(`span`,`merge-confetti-piece`),i=t(`span`,`merge-confetti-arc`);return i.append(t(`span`,`merge-confetti-paper`)),r.append(i),e(r,oe(n)),r}function st(e){let n=t(`p`,`merge-celebration-title`);return n.setAttribute(`aria-hidden`,`true`),Array.from(e).forEach((e,r)=>{let i=t(`span`,`merge-celebration-letter`,e);i.style.setProperty(`--letter-delay`,`${r*45}ms`),n.append(i)}),n}function ct(e,t,n){let r=t.firstElementChild,i=t.lastElementChild;r instanceof HTMLElement&&i instanceof HTMLElement&&(e.style.setProperty(`--celebration-title-width`,`${i.offsetLeft+i.offsetWidth-r.offsetLeft}px`),e.style.setProperty(`--celebration-title-center-y`,`${t.offsetTop+t.offsetHeight/2-n.offsetTop}px`))}function lt(e){let n=t(`div`,`merge-celebration-scene`);return n.setAttribute(`aria-hidden`,`true`),n.append(e.buildScene()),n}function ut(){return Z[Math.floor(Math.random()*Z.length)]}function dt(e){if(i())try{a(te(e))}catch{}}function ft(e){let n=t(`ul`,`merge-celebration-details`);for(let r of e)n.append(t(`li`,`merge-celebration-detail`,r));return n}function pt(e,n){let r=ut();$?.remove(),dt(n);let i=t(`div`,`merge-celebration`);i.setAttribute(`role`,`status`);let a=t(`div`,`merge-celebration-card`),o=t(`div`,`merge-celebration-stage`),s=st(r.title),c=lt(r);o.append(s,t(`p`,`merge-celebration-message`,e.message),ft(e.detailLines),c);let l=t(`div`,`merge-confetti`);l.style.setProperty(`--confetti-scale`,String(ae(n)));for(let e=0;e<at;e+=1)l.append(ot(e));a.append(l,o),i.append(a),document.body.append(i),ct(o,s,c),$=i,window.setTimeout(()=>{i.remove(),$===i&&($=null)},Q)}export{Q as CELEBRATION_DURATION_MS,pt as playCelebration};
|
|
1
|
+
import{_ as e,o as t,s as n}from"./dom-helpers-I_SDCPvs.js";import{ta as r,yi as i}from"./index-CRgdx1Xc.js";import{playToneSequence as a}from"./alert-sound-BsooAPwA.js";var o=1.2,s=1.55,c=.12,l=523.25,u=2,d=8,f=(e,t,n)=>({semitone:e,startBeat:t,beats:n}),p={melody:[f(7,4,.5),f(11,4.5,.5),f(12,5,3)],bass:[f(-5,4,1),f(-12,5,3)]},m=[{melody:[f(0,0,1),f(4,1,1),f(7,2,1),f(9,3,1)],bass:[f(-12,0,2),f(-8,2,2)]},{melody:[f(7,0,.67),f(7,.67,.67),f(7,1.33,.67),f(9,2,1),f(5,3,1)],bass:[f(-12,0,2),f(-7,2,2)]},{melody:[f(5,0,1),f(9,1,1),f(7,2,1),f(4,3,1)],bass:[f(-7,0,2),f(-12,2,2)]},{melody:[f(12,0,.5),f(7,.5,.5),f(12,1,.5),f(16,1.5,.5),f(16,2,1),f(14,3,1)],bass:[f(-12,0,2),f(-3,2,2)]},{melody:[f(4,0,1),f(7,1,1),f(4,2,.5),f(5,2.5,.5),f(7,3,.5),f(4,3.5,.5)],bass:[f(-8,0,2),f(-12,2,2)]}].map(e=>({melody:[...e.melody,...p.melody],bass:[...e.bass,...p.bass]}));function h(e,t){return l*2**((e+t)/12)}function g(e,t){let n=(e,n,r)=>e.map(e=>({frequency:h(e.semitone,t),startSeconds:s+e.startBeat*c,durationSeconds:e.beats*c,waveform:n,gain:r}));return[...n(e.melody,`square`,.2),...n(e.melody,`triangle`,.5),...n(e.bass,`triangle`,.6)]}var ee=[{frequency:220,endFrequency:880,startSeconds:0,durationSeconds:.32,waveform:`triangle`,gain:.25},{frequency:160,endFrequency:45,startSeconds:o,durationSeconds:.28,waveform:`sine`,gain:1},{frequency:1400,endFrequency:380,startSeconds:o,durationSeconds:.06,waveform:`square`,gain:.12}];function te(e){let t=m[e%m.length],n=Math.min(e*u,d);return{peakGain:.1,tones:[...ee,...g(t,n)]}}function _(e){return Math.round(Math.sqrt(2*e/780)*1e3)}function v(e,t,n=Math.random){return Math.round(e+n()*(t-e))}function y(e,t=Math.random){let n=[...e];for(let e=n.length-1;e>0;--e){let r=Math.floor(t()*(e+1));[n[e],n[r]]=[n[r],n[e]]}return n}var ne=.6,re=.25,ie=1.6;function ae(e){return Math.min(ne+e*re,ie)}var b=[`var(--accent)`,`var(--state-running)`,`var(--state-idle)`,`var(--state-waiting)`,`var(--state-failed)`];function oe(e,t=Math.random){let n=v(320,520,t),r=v(1800,2800,t);return[[`--confetti-start-x`,`${v(4,96,t)}%`],[`--confetti-x`,`${v(-140,140,t)}px`],[`--confetti-rise`,`${-v(20,55,t)}px`],[`--confetti-fall`,`${v(45,70,t)}vh`],[`--confetti-rise-ms`,`${n}ms`],[`--confetti-fall-ms`,`${r}ms`],[`--confetti-flight-ms`,`${n+r}ms`],[`--confetti-tilt`,`${v(0,180,t)}deg`],[`--confetti-spin`,`${v(-360,360,t)}deg`],[`--confetti-flutter-ms`,`${v(160,340,t)}ms`],[`--confetti-delay`,`${v(0,160,t)}ms`],[`--confetti-color`,b[e%b.length]]]}var se=`<svg viewBox="0 0 36 36" aria-hidden="true"><circle class="merge-bullseye-ring-light" cx="18" cy="18" r="17"/><circle class="merge-bullseye-ring-red" cx="18" cy="18" r="13"/><circle class="merge-bullseye-ring-light" cx="18" cy="18" r="9"/><circle class="merge-bullseye-ring-red" cx="18" cy="18" r="5"/></svg>`,ce=`<svg viewBox="0 0 26 8" aria-hidden="true"><path class="merge-bullseye-dart-flight" d="M0 0L7 3V5L0 8L2 4Z"/><rect class="merge-bullseye-dart-shaft" x="6" y="3.3" width="8" height="1.4"/><rect class="merge-bullseye-dart-barrel" x="13" y="2.5" width="7" height="3" rx="1"/><path class="merge-bullseye-dart-tip" d="M20 3L26 4L20 5Z"/></svg>`;function le(){let e=n(`div`,`merge-bullseye-target`,se);return e.append(t(`span`,`merge-bullseye-ripple`)),e}function ue(){let e=t(`div`,`merge-bullseye-dart-drift`),r=t(`div`,`merge-bullseye-dart-arc`),i=t(`div`,`merge-bullseye-dart-aim`);return i.append(n(`div`,`merge-bullseye-dart`,ce)),r.append(i),e.append(r),e}function de(){let e=t(`div`,`merge-bullseye-range`),n=t(`div`,`merge-bullseye-track`);return n.append(ue()),e.append(le(),n),e}var fe={title:`BULLSEYE!`,buildScene:de},pe=6,x=30,S=-14,C=16;function w(e=Math.random){return[[`--crosshair-start-left`,`${v(pe,x,e)}%`],[`--crosshair-start-offset-y`,`${v(S,C,e)}px`]]}var T=`<svg viewBox="0 0 26 40" aria-hidden="true"><path class="merge-headshot-target-body" d="M9 13H17L18 16Q25 18 25 24V40H1V24Q1 18 8 16Z"/><circle class="merge-headshot-target-head" cx="13" cy="7" r="6"/><circle class="merge-headshot-target-ring" cx="13" cy="7" r="3"/><circle class="merge-headshot-target-ring" cx="13" cy="27" r="6"/><circle class="merge-headshot-target-ring" cx="13" cy="27" r="2.5"/></svg>`,E=`<svg viewBox="0 0 22 22" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="M11 0V5M11 17V22M0 11H5M17 11H22"/><circle class="merge-headshot-crosshair-dot" cx="11" cy="11" r="1"/></svg>`,D=`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 3L8 8M21 3L16 8M3 21L8 16M21 21L16 16"/></svg>`;function O(){let r=t(`div`,`merge-headshot-sweep`);e(r,w());let i=t(`div`,`merge-headshot-aim`);i.append(n(`div`,`merge-headshot-crosshair`,E));let a=t(`div`,`merge-headshot-bob`);return a.append(i,n(`div`,`merge-headshot-hitmarker`,D)),r.append(a),r}function k(){let e=t(`div`,`merge-headshot-range`),r=t(`div`,`merge-headshot-track`);return r.append(O()),e.append(n(`div`,`merge-headshot-target`,T),r),e}var A={title:`HEADSHOT!`,buildScene:k},j=[`10`,`J`,`Q`,`K`,`A`],M=160,N=19,P=5,F=9,I=780,L=70,R=70,z=35;function B(e){let t=j.length-1,n=e-t/2;return{offsetPx:n*N,titleSpreadFraction:n/t,tiltDegrees:n*P,bottomPx:F-n**2,dealLeadMs:I-e*L,flipLeadMs:M+(t-e)*R,waveDelayMs:e*z}}function me(e){return[[`--card-offset`,`${e.offsetPx}px`],[`--card-title-spread`,String(e.titleSpreadFraction)],[`--card-tilt`,`${e.tiltDegrees}deg`],[`--card-bottom`,`${e.bottomPx}px`],[`--card-deal-lead-ms`,`${e.dealLeadMs}ms`],[`--card-flip-lead-ms`,`${e.flipLeadMs}ms`],[`--card-wave-delay-ms`,`${e.waveDelayMs}ms`]]}function he(){return[[`--card-flip-ms`,`${M}ms`]]}var ge=`<svg viewBox="0 0 10 9" aria-hidden="true"><path d="M5 8.5C5 8.5 0 5.3 0 2.6C0 1.1 1.2 0 2.6 0C3.6 0 4.5 .6 5 1.4C5.5 .6 6.4 0 7.4 0C8.8 0 10 1.1 10 2.6C10 5.3 5 8.5 5 8.5Z"/></svg>`;function _e(n,r){let i=t(`div`,`merge-flush-deal`);e(i,me(B(r)));let a=t(`div`,`merge-flush-hop`),o=t(`div`,`merge-flush-card`),s=t(`div`,`merge-flush-face`);return s.append(t(`span`,`merge-flush-rank`,n)),s.insertAdjacentHTML(`beforeend`,ge),o.append(t(`div`,`merge-flush-back`),s),a.append(o),i.append(a),i}function ve(){let n=t(`div`,`merge-flush-table`);return e(n,he()),n.append(...j.map(_e)),n}var ye={title:`ROYAL FLUSH!`,buildScene:ve},be=[1,2,3,4],xe=14,Se=3,Ce=3,V=10,we=20,Te=2,H=28,U=18,Ee=.01,De=1.5,Oe=2200,ke=1,W=120,G=.35,Ae=15,je=105,Me=4,Ne=65,Pe=145;function Fe(e){return Math.round(e/(Math.PI*U)*360)}function K(e){return we-e*Te}function q(e){return e.rowIndex*xe+e.depthIndex*Se}function J(e,t,n){return Array.from({length:n},(r,i)=>e+(t-e)*i/(n-1))}function Y(){return be.flatMap((e,t)=>Array.from({length:e},(n,r)=>({rowIndex:t,depthIndex:e-1-r})))}function Ie(e,t){let n=y(J(Ae,je,e),t),r=y(J(Ne,Pe,e),t);return n.map((e,n)=>({angleDegrees:e+v(-4,Me,t),depthScalePercent:Math.round(r[n])}))}function Le(e,t,n){let r=v(240,380,n),i=t.angleDegrees*Math.PI/180,a=r*Math.cos(i),o=(r*Math.sin(i))**2/1560,s=v(15,45,n),c=_(o),l=_(o+s),u=c+l,d=v(540,1080,n),f=a>=0?1:-1,p=q(e);return{depthIndex:e.depthIndex,launchAngleDegrees:t.angleDegrees,distanceFromHeadPinPx:p,layer:K(e.depthIndex),flyXPx:Math.round(a*u/1e3),peakRisePx:Math.round(o),landingDropPx:s,riseMs:c,fallMs:l,flightMs:u,spinDegrees:Math.round(f*d*u/1e3),glintMs:Math.round(180/d*1e3),depthScalePercent:t.depthScalePercent,delayMs:Math.round(p/G)}}function Re(e=Math.random){let t=Y(),n=Ie(t.length,e);return t.map((t,r)=>Le(t,n[r],e))}function ze(e){return[[`--pin-left`,`${e.distanceFromHeadPinPx}px`],[`--pin-raise`,`${e.depthIndex*Ce}px`],[`--pin-shade`,`${100-e.depthIndex*12}%`],[`--pin-fly-x`,`${e.flyXPx}px`],[`--pin-peak-y`,`${-e.peakRisePx}px`],[`--pin-land-y`,`${e.landingDropPx}px`],[`--pin-rise-ms`,`${e.riseMs}ms`],[`--pin-fall-ms`,`${e.fallMs}ms`],[`--pin-flight-ms`,`${e.flightMs}ms`],[`--pin-spin`,`${e.spinDegrees}deg`],[`--pin-glint-ms`,`${e.glintMs}ms`],[`--pin-depth-scale`,`${e.depthScalePercent}%`],[`--pin-depth-shade`,`${e.depthScalePercent-10}%`],[`--pin-delay`,`${e.delayMs}ms`],[`--pin-layer`,String(e.layer)]]}function Be(){return K(De)}function Ve(){return Math.max(...Y().map(q))+V}function He(){let e=Ve(),t=H+e+U-ke;return[[`--ball-follow-px`,`${W}px`],[`--ball-follow-ms`,`${Math.round(W/G)}ms`],[`--ball-follow-spin`,`${Fe(W)}deg`],[`--ball-size`,`${U}px`],[`--ball-approach-spin`,`${Oe}deg`],[`--ball-impact-inset`,`${t}px`],[`--ball-layer`,String(Be())],[`--rack-right`,`${H}px`],[`--rack-width`,`${e}px`],[`--pin-width`,`${V}px`]]}function Ue(e=Math.random){return e()>=Ee?null:r[Math.floor(e()*r.length)].sprite}var We=`<svg viewBox="0 0 10 24" aria-hidden="true"><path class="merge-strike-pin-body" d="M5 0C7 0 7.6 2 7.2 4C6.9 5.6 6.3 6.6 6.4 8C6.6 10 9.6 12 9.6 16C9.6 19.5 8.4 22 7.6 24H2.4C1.6 22 .4 19.5 .4 16C.4 12 3.4 10 3.6 8C3.7 6.6 3.1 5.6 2.8 4C2.4 2 3 0 5 0Z"/><path class="merge-strike-pin-stripe" d="M3.1 5.2H6.9V6.2H3.1ZM3.4 7H6.6V8H3.4Z"/></svg>`;function Ge(r){let i=t(`span`,`merge-strike-pin`);return i.append(n(`span`,`merge-strike-pin-arc`,We)),e(i,ze(r)),i}function Ke(){let e=Ue();if(!e)return t(`span`,`merge-strike-ball`);let n=t(`span`,`merge-strike-ball is-animal`);return n.append(t(`span`,`nyan-sprite ${e}`)),n}function qe(){let n=t(`div`,`merge-strike-lane`);e(n,He());let r=t(`div`,`merge-strike-rack`);r.append(...Re().map(Ge));let i=t(`div`,`merge-strike-track`);return i.append(Ke()),n.append(r,i),n}var Je={title:`STRIKE!`,buildScene:qe},Ye=20,Xe=92,Ze=23,Qe=7,$e=-40;function et(){let e=_(72),t=_(69),n=780*t/1e3;return{launchHeightPx:Ye,peakHeightPx:Xe,heightThroughRimPx:Ze,heightLeavingNetPx:Qe,heightOutOfCardPx:$e,riseMs:e,fallToRimMs:t,speedThroughRimPxPerSecond:n,netCatchMs:Math.round(32/n*1e3),dropMs:_(47)}}function tt(e=et()){return[[`--ball-launch-y`,`${-e.launchHeightPx}px`],[`--ball-peak-y`,`${-e.peakHeightPx}px`],[`--ball-rim-y`,`${-e.heightThroughRimPx}px`],[`--ball-net-exit-y`,`${-e.heightLeavingNetPx}px`],[`--ball-drop-out-y`,`${-e.heightOutOfCardPx}px`],[`--ball-rise-ms`,`${e.riseMs}ms`],[`--ball-fall-to-rim-ms`,`${e.fallToRimMs}ms`],[`--ball-to-rim-ms`,`${e.riseMs+e.fallToRimMs}ms`],[`--ball-net-catch-ms`,`${e.netCatchMs}ms`],[`--ball-drop-ms`,`${e.dropMs}ms`]]}var nt=`<svg viewBox="0 0 40 48" aria-hidden="true"><rect class="merge-swish-pole" x="36" y="28" width="2" height="20"/><rect class="merge-swish-backboard" x="35" y="2" width="3" height="26" rx="1"/><path class="merge-swish-rim" d="M31 18H35M7 18A12 2.5 0 0 1 31 18"/></svg>`,rt=`<svg viewBox="0 0 40 48" aria-hidden="true"><g class="merge-swish-net"><path d="M8 18L12 32M13.5 18L15.5 32M19 18V32M24.5 18L22.5 32M30 18L26 32M9.5 23Q19 25 28.5 23M11 28Q19 29.5 27 28"/></g><path class="merge-swish-rim" d="M7 18A12 2.5 0 0 0 31 18"/></svg>`;function it(){let e=t(`div`,`merge-swish-ball-drift`),n=t(`div`,`merge-swish-ball-arc`);return n.append(t(`span`,`merge-swish-ball`)),e.append(n),e}function X(){let r=t(`div`,`merge-swish-court`);e(r,tt());let i=t(`div`,`merge-swish-track`);return i.append(it()),r.append(n(`div`,`merge-swish-hoop-back`,nt),i,n(`div`,`merge-swish-hoop-front`,rt)),r}var Z=[Je,{title:`SWISH!`,buildScene:X},fe,A,ye],at=48,Q=5600,$=null;function ot(n){let r=t(`span`,`merge-confetti-piece`),i=t(`span`,`merge-confetti-arc`);return i.append(t(`span`,`merge-confetti-paper`)),r.append(i),e(r,oe(n)),r}function st(e){let n=t(`p`,`merge-celebration-title`);return n.setAttribute(`aria-hidden`,`true`),Array.from(e).forEach((e,r)=>{let i=t(`span`,`merge-celebration-letter`,e);i.style.setProperty(`--letter-delay`,`${r*45}ms`),n.append(i)}),n}function ct(e,t,n){let r=t.firstElementChild,i=t.lastElementChild;r instanceof HTMLElement&&i instanceof HTMLElement&&(e.style.setProperty(`--celebration-title-width`,`${i.offsetLeft+i.offsetWidth-r.offsetLeft}px`),e.style.setProperty(`--celebration-title-center-y`,`${t.offsetTop+t.offsetHeight/2-n.offsetTop}px`))}function lt(e){let n=t(`div`,`merge-celebration-scene`);return n.setAttribute(`aria-hidden`,`true`),n.append(e.buildScene()),n}function ut(){return Z[Math.floor(Math.random()*Z.length)]}function dt(e){if(i())try{a(te(e))}catch{}}function ft(e){let n=t(`ul`,`merge-celebration-details`);for(let r of e)n.append(t(`li`,`merge-celebration-detail`,r));return n}function pt(e,n){let r=ut();$?.remove(),dt(n);let i=t(`div`,`merge-celebration`);i.setAttribute(`role`,`status`);let a=t(`div`,`merge-celebration-card`),o=t(`div`,`merge-celebration-stage`),s=st(r.title),c=lt(r);o.append(s,t(`p`,`merge-celebration-message`,e.message),ft(e.detailLines),c);let l=t(`div`,`merge-confetti`);l.style.setProperty(`--confetti-scale`,String(ae(n)));for(let e=0;e<at;e+=1)l.append(ot(e));a.append(l,o),i.append(a),document.body.append(i),ct(o,s,c),$=i,window.setTimeout(()=>{i.remove(),$===i&&($=null)},Q)}export{Q as CELEBRATION_DURATION_MS,pt as playCelebration};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,o as t,u as n,y as r}from"./dom-helpers-I_SDCPvs.js";import{o as i}from"./card-registry-BaXSbxe1.js";import{i as a}from"./modal-BRwbyxA2.js";import{c as o,i as ee}from"./action-status-CH3lGsDi.js";import{Et as te,Ft as s,It as c,Mt as l,Nt as u,Ot as d,St as f,Xr as p,Yr as m,_t as h,gt as ne,ht as g,it as _,kt as v,m as re,mt as ie,on as ae,pt as y,sn as b,vt as x,yt as S}from"./index-
|
|
1
|
+
import{d as e,o as t,u as n,y as r}from"./dom-helpers-I_SDCPvs.js";import{o as i}from"./card-registry-BaXSbxe1.js";import{i as a}from"./modal-BRwbyxA2.js";import{c as o,i as ee}from"./action-status-CH3lGsDi.js";import{Et as te,Ft as s,It as c,Mt as l,Nt as u,Ot as d,St as f,Xr as p,Yr as m,_t as h,gt as ne,ht as g,it as _,kt as v,m as re,mt as ie,on as ae,pt as y,sn as b,vt as x,yt as S}from"./index-CRgdx1Xc.js";import{t as C}from"./team-review-panel-DlZsSf4v.js";import{t as w}from"./pr-queue-columns-pCxhZs75.js";var oe={HIGH:`High confidence`,MEDIUM:`Medium confidence`,LOW:`Low confidence`},se={HIGH:`ok`,MEDIUM:`warn`,LOW:`muted`},T={queued:`Waiting to be researched`,running:`Researching`,error:`Research failed`,aside:`Set aside`},ce={forum:`Forum`,discord:`Discord`};function E(e){return e.status===`ready`&&e.verdict?{text:oe[e.verdict],tone:se[e.verdict]}:e.status===`ready`?{text:`Researched`,tone:`muted`}:e.status===`error`?{text:T.error,tone:`danger`}:{text:T[e.status],tone:`muted`}}function D(e){let t=ce[e.item.source];return e.item.channel?`${t} #${e.item.channel}`:t}function O(e){return e.entry.item.title||`Untitled question`}function le(e){return e.status!==`running`&&e.status!==`queued`}function k(e){return e.status!==`aside`}function A(e){let t=e.find(e=>e.id===`working`)?.items.length??0;return t===0?`No community question needs you right now.`:`No community question needs you right now. ${t} ${t===1?`question is`:`questions are`} being researched.`}function j(e){return e?e.configured===!1?e.reason??`The community lane is not set up yet.`:`No community questions yet. New ones asked after you turned this on show up here.`:`Waiting for the community lane to report.`}function M(e){return e.filter(e=>!e.isWorkspace&&!e.isEphemeral).map(({id:e,name:t})=>({id:e,name:t})).toSorted((e,t)=>e.name.localeCompare(t.name))}var N=null,P=null,F=null,I=null,L=[],R=null,z=!1,B=null,V=null,H=``,U=new Map;function W(){return M([...i].map(([e,t])=>({id:e,name:t.nameEl.textContent??e,isWorkspace:t.card.dataset.workspace!==void 0,isEphemeral:t.card.dataset.ephemeral!==void 0})))}function G(e,n){let r=t(`button`,`pr-action pr-action-ghost`,e);return r.type=`button`,r.disabled=!p(n),r.addEventListener(`click`,()=>m(n)),r}function K(e,n,r){let i=t(`button`,`pr-action`,e);return i.type=`button`,i.disabled=!n,i.addEventListener(`click`,r),i}function q(e,n,r){let i=t(`ul`,e);i.setAttribute(`aria-label`,n);for(let e of r)i.append(t(`li`,null,e));return i}function ue(e){let n=t(`div`,`pr-detail-heading`),r=t(`div`,`pr-detail-title`);r.append(t(`h2`,null,e.item.title||`Untitled question`));let i=t(`div`,`pr-detail-meta`),a=Date.parse(e.item.createdAt);return i.append(t(`span`,null,e.item.author),t(`span`,null,D(e))),Number.isNaN(a)||i.append(t(`span`,null,`Asked ${re(a)}`)),n.append(r,i),n}function de(e){let n=t(`section`,`community-question`);return n.setAttribute(`aria-label`,`Question as asked`),n.append(t(`h3`,`pr-section-heading`,`Question as asked`),t(`p`,`community-question-body`,e.item.body)),n}function fe(e){let n=t(`section`,`pr-verdict-box`);n.setAttribute(`aria-label`,`Research`);let r=E(e),i=t(`div`,`pr-verdict-line`),a=t(`strong`,`community-badge`,r.text);if(a.dataset.tone=r.tone,i.append(a),n.append(i),e.error&&n.append(t(`p`,`pr-attention-detail`,e.error)),e.summary&&n.append(t(`p`,`pr-verdict-summary`,e.summary)),e.goal&&n.append(t(`p`,`community-goal`,`Goal: ${e.goal}`)),e.gaps.length>0&&n.append(q(`pr-verdict-gaps`,`Not covered`,e.gaps)),e.checked.length===0)return n;let o=t(`details`,`pr-verdict-checked`);return o.append(t(`summary`,null,`What it checked (${e.checked.length})`),q(`community-checked`,`What it checked`,e.checked)),n.append(o),n}function pe(e){if(!e.draft)return null;let n=t(`section`,`community-draft`);n.setAttribute(`aria-label`,`Draft reply`),n.append(t(`h3`,`pr-section-heading`,`Draft reply`),t(`p`,`community-draft-body`,e.draft.body));let r=e.draft.publicLinks.filter(p);if(r.length===0)return n;let i=t(`ul`,`community-links`);for(let e of r){let n=t(`li`);n.append(G(e,e)),i.append(n)}return n.append(i),n}function me(e,t){let n=e.draft?r(e.draft.body):null;n?n.then(()=>t.show(`ok`,`Draft copied. Post it yourself where the question was asked.`),()=>t.show(`error`,`Copying failed. Select the draft text instead.`)):t.show(`error`,`This browser does not allow copying here. Select the draft text instead.`)}async function he(e,t){if(!H){t.show(`error`,`Pick a session to start from first.`);return}let n=await o(`open-community-session`,{key:e.item.key,projectId:H},t,{busyText:`Starting a session with the research.`});n?.type===`open-community-session-result`&&(n.ok?(t.show(`ok`,`Started ${n.sessionName??`a session`}.`),n.sessionId&&_()?.openTerminal(n.sessionId)):t.show(`error`,n.error??`The session did not start.`))}async function J(e,t,n){let r=t===`rerun`?`Queuing the research again.`:`Setting the question aside.`,i=await o(`community-action`,{key:e.item.key,action:t},n,{busyText:r});i?.type===`community-action-result`&&(i.ok||n.show(`error`,i.error??`The change did not apply.`))}function ge(){let e=t(`select`,`community-session-picker`);e.setAttribute(`aria-label`,`Session to start from`);let n=W();n.some(e=>e.id===H)||(H=n[0]?.id??``);for(let r of n){let n=t(`option`,null,r.name);n.value=r.id,n.selected=r.id===H,e.append(n)}return e.disabled=n.length===0,e.addEventListener(`change`,()=>{H=e.value}),e}function _e(e){let n=t(`div`,`community-actions`),r=ee(`pr-action-status`),i=t(`div`,`community-action-buttons`);return i.append(K(`Copy draft`,e.draft!==null,()=>me(e,r)),G(`Open thread`,e.item.url),ge(),K(`Start session`,!0,()=>void he(e,r)),K(`Re-run`,le(e),()=>void J(e,`rerun`,r)),K(`Set aside`,k(e),()=>void J(e,`set-aside`,r))),n.append(i,r.element),n}function ve(e){let n=t(`article`,`pr-detail community-detail`),r=pe(e);return n.append(ue(e),_e(e),...r?[r]:[],fe(e),de(e)),n}function Y(){if(!F)return;let e=l(L,R),n=e?JSON.stringify(e.entry):`empty:${c(L).length}`;if(n===V)return;if(V=n,e){F.replaceChildren(ve(e.entry));return}let r=L.some(e=>e.items.length>0);F.replaceChildren(r?C({title:`All caught up`,detail:A(L)}):t(`p`,`pr-empty`,j(g())))}function ye(e,t){x(d(e))&&t.querySelector(`.pr-queue-unseen`)?.remove()}function X(){if(!I)return;let e=v(L,O);b(I,f(e),e.filter(e=>e.id!==R))}function Z(e){R=e;for(let[t,n]of U)n.setAttribute(`aria-current`,String(t===e));let t=l(L,e),n=U.get(e);t&&n&&ye(t,n),Y(),X(),N&&(N.dataset.detailOpen=`true`)}function be(){N&&(N.dataset.detailOpen=`false`),R&&U.get(R)?.focus({preventScroll:!0})}function Q(e){let t=l(L,e);if(!t)return;L.find(e=>e.items.includes(t))?.id===`aside`&&(z=!0),R=e,$(),Z(e);let n=U.get(e);n?.focus({preventScroll:!0}),n?.scrollIntoView({block:`nearest`})}function xe(t){if(t.repeat||t.defaultPrevented||!N||n(N)||a()||e(t)||document.activeElement?.classList.contains(`xterm-helper-textarea`))return;let r=u(t);if(r!==`next-row`&&r!==`previous-row`)return;let i=s([...U.keys()],R,r===`next-row`?1:-1);i&&(t.preventDefault(),i!==R&&Q(i))}function Se(e,n){let r=t(`button`,`pr-queue-row pr-queue-row-quiet`);r.type=`button`,r.dataset.queueKey=e.key,r.setAttribute(`aria-current`,String(e.key===R));let i=E(e.entry),a=t(`span`,`review-queue-action community-badge`,i.text);a.dataset.tone=i.tone;let o=t(`span`,`pr-queue-top`);if(o.append(a,t(`span`,`pr-queue-title`,O(e))),r.append(o,t(`span`,`pr-queue-elapsed`,D(e.entry))),r.title=O(e),n&&h(d(e))){let e=t(`span`,`tab-activity active pr-queue-unseen`);e.setAttribute(`aria-hidden`,`true`),r.append(e)}return r.addEventListener(`click`,()=>Z(e.key)),U.set(e.key,r),r}function Ce(e){let n=t(`h3`,`pr-section-heading review-group-heading`),r=t(`span`,`review-group-count`,String(e.items.length));if(e.id!==`aside`)return n.append(t(`span`,null,e.title),r),n;let i=t(`button`,`review-group-toggle`),a=t(`span`,`review-group-chevron`,`▸`);return a.setAttribute(`aria-hidden`,`true`),i.append(a,e.title),i.type=`button`,i.setAttribute(`aria-expanded`,String(z)),i.addEventListener(`click`,()=>{z=!z,B=null,$()}),n.append(i,r),n}function we(e){let n=t(`section`,`pr-queue-section`);if(n.dataset.group=e.id,n.append(Ce(e)),e.id===`aside`&&!z)return n;for(let t of e.items)n.append(Se(t,e.id===`turn`));return n}function $(){if(!P)return;L=ie(),R=te(L.filter(e=>e.id!==`aside`||z),R),X();let e=JSON.stringify([L,R,z,ne(),g()?.error??null]);if(e!==B){B=e,U.clear();let n=g()?.error,r=n?[t(`p`,`my-pr-note`,n)]:[],i=L.filter(e=>e.items.length>0).map(we);P.replaceChildren(...r,...i.length>0?i:[t(`p`,`pr-empty`,j(g()))])}Y()}function Te(e){if(N)return;N=t(`div`,`pr-content review-queue community-queue`),e.append(N);let r=w({queueLabel:`Community questions`,scopeTabs:null,resizerLabel:`Resize community queue`});P=r.queue,F=t(`div`,`review-queue-detail`);let i=t(`div`,`review-queue-phone-bar`),a=t(`button`,`pr-action pr-action-ghost review-queue-back`,`Back to queue`);a.type=`button`,a.addEventListener(`click`,be),i.append(a),r.detail.append(i,F),I=ae({onJump:()=>{let e=v(L,O).find(e=>e.id!==R)?.id;e&&Q(e)},rowFor:e=>U.get(e)}),I.classList.add(`review-queue-banner`),r.queue.before(I),N.append(r.columns),N.dataset.detailOpen=`false`,y(()=>!n(N)),S(e=>{e.kind===`status`&&$()}),document.addEventListener(`keydown`,xe),$()}var Ee={mount:Te,refresh:()=>{V=null,$()}};export{Ee as view};
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{G as e,U as t,W as n,dt as r,ft as i,x as a}from"./updates-view-core-B_ik1cqt.js";import{h as o,m as s,o as c}from"./dom-helpers-I_SDCPvs.js";import{d as l}from"./control-ws-Bmre21J2.js";import{n as u,r as d,t as f}from"./modal-BRwbyxA2.js";import{i as p,s as m,t as h}from"./action-status-CH3lGsDi.js";import{n as g}from"./session-tick-Nt4UwW2U.js";import{Ar as _,Dr as v,Er as y,Or as b,Tr as x,gr as S,ii as C,jn as w,kr as T,m as E,ni as D,ri as O}from"./index-
|
|
1
|
+
import{G as e,U as t,W as n,dt as r,ft as i,x as a}from"./updates-view-core-B_ik1cqt.js";import{h as o,m as s,o as c}from"./dom-helpers-I_SDCPvs.js";import{d as l}from"./control-ws-Bmre21J2.js";import{n as u,r as d,t as f}from"./modal-BRwbyxA2.js";import{i as p,s as m,t as h}from"./action-status-CH3lGsDi.js";import{n as g}from"./session-tick-Nt4UwW2U.js";import{Ar as _,Dr as v,Er as y,Or as b,Tr as x,gr as S,ii as C,jn as w,kr as T,m as E,ni as D,ri as O}from"./index-CRgdx1Xc.js";import{t as ee}from"./repo-roots-adder-6Xw2eJJL.js";import{t as te}from"./sandboxed-frame-qKHbOuc_.js";var ne=`<h2 class="dialog-title" id="add-session-title">Add Session</h2>
|
|
2
2
|
<fieldset class="dialog-mode-controls add-session-agent-only" aria-label="Session kind">
|
|
3
3
|
<button type="button" class="dialog-mode-button" id="add-session-single-mode" aria-pressed="true">Single repo</button>
|
|
4
4
|
<button type="button" class="dialog-mode-button" id="add-session-workspace-mode" aria-pressed="false">Workspace</button>
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./dom-helpers-I_SDCPvs.js";import{d as t}from"./control-ws-Bmre21J2.js";import{a as n,r,t as i}from"./modal-BRwbyxA2.js";import{s as a,t as o}from"./action-status-CH3lGsDi.js";import{ei as s,yn as c}from"./index-
|
|
1
|
+
import{o as e}from"./dom-helpers-I_SDCPvs.js";import{d as t}from"./control-ws-Bmre21J2.js";import{a as n,r,t as i}from"./modal-BRwbyxA2.js";import{s as a,t as o}from"./action-status-CH3lGsDi.js";import{ei as s,yn as c}from"./index-CRgdx1Xc.js";import{i as l,t as u}from"./plan-render-CTnwBprZ.js";var d=null;function f(t){let n=s(t.sessionId);t.select.replaceChildren(...n.map(n=>{let r=e(`option`,null,n.name);return r.value=n.path,r.selected=n.path===t.docPath,r})),t.select.hidden=n.length<2,t.title.textContent=n.find(e=>e.path===t.docPath)?.name??t.title.textContent}function p(e){let t=s(e.sessionId).some(t=>t.path===e.docPath);e.btnEdit.setAttribute(`aria-pressed`,String(e.mode===`edit`)),e.btnPreview.setAttribute(`aria-pressed`,String(e.mode===`preview`)),e.textarea.hidden=e.mode!==`edit`,e.preview.hidden=e.mode!==`preview`,e.select.disabled=e.isBusy,e.btnReload.disabled=e.isBusy||!t,e.btnSave.disabled=e.isBusy||!t||e.baseHash===null||!e.hasUnsavedChanges}function m(e,t,n=`quiet`){e.status.textContent=t,e.status.dataset.tone=n}function h(e){e.preview.replaceChildren(u(l(e.textarea.value)))}function g(e,t){n({title:e,message:`Your unsaved edits will be lost.`,confirmLabel:`Discard`,danger:!0,onConfirm:t})}function _(e,t,n){e.hasUnsavedChanges?g(t,n):n()}async function v(e,n){try{return{reply:await t(e,n,{timeoutMs:o}),failureText:null}}catch(e){return{reply:null,failureText:a(e,o)}}}async function y(e,t){e.docPath=t,e.isBusy=!0,e.baseHash=null,e.textarea.readOnly=!0,f(e),m(e,`Loading`),p(e);let{reply:n,failureText:r}=await v(`session-doc-read`,{id:e.sessionId,path:t});if(d!==e||e.docPath!==t)return;e.isBusy=!1,e.textarea.readOnly=!1;let i=n?.type===`session-doc-response`?n:null;!i?.ok||i.text===void 0||i.hash===void 0?(m(e,i?.error||r||`Could not open this doc`,`warn`),p(e)):(e.textarea.value=i.text,e.baseHash=i.hash,e.hasUnsavedChanges=!1,e.mode===`preview`&&h(e),m(e,``),p(e))}async function b(e){if(e.btnSave.disabled||e.baseHash===null)return;e.isBusy=!0,m(e,`Saving`),p(e);let t=e.docPath,n=e.textarea.value,{reply:r,failureText:i}=await v(`session-doc-save`,{id:e.sessionId,path:t,text:n,baseHash:e.baseHash});if(d!==e||e.docPath!==t)return;e.isBusy=!1;let a=r?.type===`session-doc-save-result`?r:null;!a?.ok||a.hash===void 0?(m(e,a?.conflict?`The agent changed this file since you opened it. Reload to see its version.`:a?.error||i||`Save failed`,`warn`),p(e)):(e.baseHash=a.hash,e.hasUnsavedChanges=e.textarea.value!==n,m(e,e.hasUnsavedChanges?`Unsaved changes`:`Saved`),p(e))}function x(e,t){e.mode=t,t===`preview`&&h(e),p(e),t===`edit`&&e.textarea.focus()}function S(t,n){let r=e(`button`,`plan-control ${n}`,t);return r.type=`button`,r}function C(t){let n=s(t)[0];if(!n||d)return;let a=()=>_(M,`Close this doc?`,()=>M.close()),o=r({dialogClass:`doc-editor`,closeOnBackdrop:!1,onEscape:a}),l=`doc-editor-title-${t}`,u=e(`h3`,`doc-editor-title`,n.name);u.id=l;let f=e(`select`,`plan-control doc-editor-picker`);f.setAttribute(`aria-label`,`Doc`);let h=e(`span`,`doc-editor-status`);h.setAttribute(`role`,`status`);let g=S(`Edit`,`doc-editor-mode`),v=S(`Preview`,`doc-editor-mode`),C=S(`Reload`,`doc-editor-reload`),w=S(`Save`,`doc-editor-save`),T=S(`Close`,`doc-editor-close`),E=e(`div`,`doc-editor-modes`);E.append(g,v);let D=e(`div`,`doc-editor-actions`);D.append(h,C,w,T);let O=e(`div`,`doc-editor-header`);O.append(u,f,E,D);let k=e(`textarea`,`plan-editor doc-editor-text`);k.spellcheck=!0,k.setAttribute(`aria-labelledby`,l);let A=e(`div`,`doc-editor-preview`),j=e(`div`,`doc-editor-body`);j.append(k,A),o.dialog.append(O,j),i(o.dialog,l);let M={sessionId:t,docPath:n.path,baseHash:null,hasUnsavedChanges:!1,isBusy:!1,mode:c()?`preview`:`edit`,title:u,select:f,textarea:k,preview:A,status:h,btnEdit:g,btnPreview:v,btnReload:C,btnSave:w,close:()=>{d=null,o.close()}};d=M,k.addEventListener(`input`,()=>{M.hasUnsavedChanges||(M.hasUnsavedChanges=!0,m(M,`Unsaved changes`),p(M))}),k.addEventListener(`keydown`,e=>{(e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),b(M))}),f.addEventListener(`change`,()=>{let e=f.value;f.value=M.docPath,_(M,`Open another doc?`,()=>{y(M,e)})}),g.addEventListener(`click`,()=>x(M,`edit`)),v.addEventListener(`click`,()=>x(M,`preview`)),C.addEventListener(`click`,()=>{_(M,`Reload this doc?`,()=>{y(M,M.docPath)})}),w.addEventListener(`click`,()=>{b(M)}),T.addEventListener(`click`,a),y(M,n.path),M.mode===`edit`&&k.focus()}function w(e){d&&d.sessionId===e&&(f(d),p(d),!s(e).some(e=>e.path===d?.docPath)&&m(d,`This doc is no longer surfaced, so it cannot be saved.`,`warn`))}export{w as applyDocsToOpenEditor,C as openDocEditor};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{gt as e}from"./updates-view-core-B_ik1cqt.js";import{o as t}from"./dom-helpers-I_SDCPvs.js";import{u as n}from"./control-ws-Bmre21J2.js";import{An as r,ai as i,i as a,kn as o,oi as s,ta as c}from"./index-
|
|
1
|
+
import{gt as e}from"./updates-view-core-B_ik1cqt.js";import{o as t}from"./dom-helpers-I_SDCPvs.js";import{u as n}from"./control-ws-Bmre21J2.js";import{An as r,ai as i,i as a,kn as o,oi as s,ta as c}from"./index-CRgdx1Xc.js";var l={teamReview:e=>`${e} pull requests reviewed this week, and Reviews has not been open lately? It lines up every PR waiting on you.`,issues:e=>`${e} issues touched this week. The Issues tab keeps them in one list and starts a session on any of them.`,usage:()=>`Keeping an eye on tokens? The Usage tab tracks spend per session and warns before a limit hits.`,posthog:()=>`Hunting errors again? Radar watches PostHog error tracking and can investigate an issue for you.`,benchmarks:()=>`Comparing agents by hand? Bench runs the same review cases across agent setups side by side.`},u=` It is off right now, so Show me takes you to its switch in Settings.`;function d(e,t){let n=l[e.feature](e.distinctTargetCount);return t?n:`${n}${u}`}function f(e){let t=a.find(t=>t.rule===e);return t?{sectionId:t.sectionId,settingId:t.settingId}:null}var p=null;function m(e,t){n({type:`dashboard-telemetry`,event:`operator_action`,properties:{surface:`hints`,action:t,feature:e}})}function h(e){try{return r(localStorage,o(`feature-hint`,`${e.feature}-${e.raisedAt}`),Date.now())}catch{return!0}}function g(t,n){if(n.isFeatureEnabled(t)){n.openView(e[t]);return}let r=f(t);r&&n.openSetting(r.sectionId,r.settingId)}function _(e,n){if(p?.isConnected||!h(e))return;let r=t(`aside`,`feature-hint`);r.setAttribute(`aria-live`,`polite`),r.setAttribute(`aria-label`,`Feature tip`);let a=t(`div`,`feature-hint-bubble`),o=t(`button`,`btn-dialog btn-dialog-confirm`,`Show me`),l=t(`button`,`btn-dialog btn-dialog-cancel`,`Nah`);o.type=`button`,l.type=`button`;let u=t(`div`,`feature-hint-actions`);u.append(l,o),a.append(t(`p`,`feature-hint-text`,d(e,n.isFeatureEnabled(e.feature))),u);let f=s()??c[0];r.append(a,i(f,`feature-hint-animal`));function _(t){m(e.feature,t),r.remove(),p=null}o.addEventListener(`click`,()=>{_(`open`),g(e.feature,n)}),l.addEventListener(`click`,()=>_(`dismiss`)),document.body.append(r),p=r,m(e.feature,`shown`)}export{_ as showFeatureHint};
|
|
Binary file
|
package/dist/client/assets/{first-run-checklist-D39N7iLA.js → first-run-checklist-T3bgDD_Y.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,y as t}from"./dom-helpers-I_SDCPvs.js";import{d as n,u as r}from"./control-ws-Bmre21J2.js";import{i,s as a,t as o}from"./action-status-CH3lGsDi.js";import{En as s,mr as c,vr as l,yr as u}from"./index-
|
|
1
|
+
import{o as e,y as t}from"./dom-helpers-I_SDCPvs.js";import{d as n,u as r}from"./control-ws-Bmre21J2.js";import{i,s as a,t as o}from"./action-status-CH3lGsDi.js";import{En as s,mr as c,vr as l,yr as u}from"./index-CRgdx1Xc.js";import{a as d,c as f,i as p,l as m,n as h,o as g,r as _,s as v,t as y}from"./repo-roots-adder-6Xw2eJJL.js";var b=`npm install -g @anthropic-ai/claude-code`,x={done:`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" role="img" aria-label="Done"><circle cx="12" cy="12" r="10"></circle><path d="M7.5 12.5l3 3 6-6.5"></path></svg>`,current:`<svg width="18" height="18" viewBox="0 0 24 24" role="img" aria-label="Needed"><path d="M12 3l9 9-9 9-9-9z" fill="currentColor"></path></svg>`,upcoming:`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" role="img" aria-label="Not started"><circle cx="12" cy="12" r="10"></circle></svg>`},S=null,C=null,w=null,T=null,E={steps:_,agentSummary:``,repoRoots:[],isShellAvailable:!1},D=0,O=!1,k=!1,A=new Set,j=i(`first-run-load-status`),M=s();function N(e){r({type:`dashboard-telemetry`,event:`operator_action`,properties:{surface:`onboarding`,action:e}})}function P(e){for(let t of v(A,e))r({type:`dashboard-telemetry`,event:`onboarding_step`,properties:t})&&A.add(f(t))}function F({title:t,state:n,summary:r,badge:i,body:a}){let o=e(`li`,`first-run-step`);o.dataset.state=n,n===`current`&&o.setAttribute(`aria-current`,`step`);let s=e(`div`,`first-run-step-head`),c=e(`span`,`first-run-step-icon`);if(c.innerHTML=x[n],s.append(c,e(`span`,`first-run-step-title`,t)),n===`done`&&r&&s.append(e(`span`,`first-run-step-summary`,r)),n===`current`&&i&&s.append(e(`span`,`first-run-step-badge`,i)),o.append(s),n!==`current`)return o;let l=e(`div`,`first-run-step-body`);return l.append(...a()),o.append(l),o}function I(){return c()?`No supported agent is on PATH of the machine running Glimmervoid. Install Claude Code, Codex or Grok there, then rescan.`:`No supported agent is on PATH. Install Claude Code, Codex or Grok, then rescan.`}function L(){let n=e(`div`,`first-run-command-row`);if(n.append(e(`code`,`first-run-command`,b)),!navigator.clipboard?.writeText)return n;let r=e(`button`,`btn-dialog btn-dialog-cancel`,`Copy`);r.type=`button`;let i=e(`span`,`first-run-copy-status`);return i.setAttribute(`role`,`status`),r.addEventListener(`click`,async()=>{let e=t(b);i.textContent=e?await e.then(()=>`Copied`,()=>`Copy failed`):`Copy failed`}),n.append(r,i),n}function R(){let t=e(`button`,`btn-dialog btn-dialog-cancel`,`Open shell`);return t.type=`button`,t.addEventListener(`click`,()=>{N(`open-shell`),u()}),t}function z(){let t=e(`div`,`first-run-step-actions`);w=e(`button`,`btn-dialog btn-dialog-cancel`,`Rescan`),w.type=`button`,w.addEventListener(`click`,()=>{N(`rescan`),U({rescanAgents:!0})}),t.append(w),E.isShellAvailable&&t.append(R());let n=[e(`p`,`first-run-step-text`,I()),L(),t];return O?[...n,e(`p`,`first-run-step-hint`,`Still missing after a rescan? Restart Glimmervoid from a terminal where the command runs. Other terminal agents go under customAgents.`)]:n}function B(){let t=T??y({onAdded:e=>{N(e===`typed`?`add-root-typed`:`add-root-suggested`),U({rescanAgents:!1})}});return T=t,[e(`p`,`first-run-step-text`,`The folder that holds your git checkouts. Each subfolder becomes a project you can start a session in.`),t.element]}function V(){let t=e(`div`,`first-run-step-actions`),n=e(`button`,`btn-dialog btn-dialog-confirm`,`+ Session`);return n.type=`button`,n.addEventListener(`click`,()=>{N(`add-session`),l()}),t.append(n),[e(`p`,`first-run-step-text`,`Pick a project and an agent. The session runs in its own git worktree, so your checkout is never touched.`),t]}function H(){if(!C)return;let{steps:e,agentSummary:t,repoRoots:n}=E;C.replaceChildren(F({title:`1. Agent CLI`,state:e.agent,summary:t,badge:`MISSING`,body:z}),F({title:`2. Repository roots`,state:e.repoRoots,summary:n.join(`, `),badge:`NEEDED`,body:B}),F({title:`3. First session`,state:e.firstSession,summary:``,badge:``,body:V}))}async function U({rescanAgents:e}){D+=1;let t=D;w&&(w.disabled=!0);try{let[r,i]=await Promise.all([n(`list-agents`,e?{rescan:!0}:{},{timeoutMs:o}),n(`scan-repo-roots`,{includeSuggestions:!0},{timeoutMs:o})]);if(t!==D)return;let a=i.type===`repo-roots-scanned`,s=a?i.directories.map(e=>e.root):[],c=a?i.suggestions??[]:[],l=m(s,c);if(l.length>0&&!k){k=!0;let e=await h(l).catch(e=>String(e));if(t!==D)return;if(!e){U({rescanAgents:!1});return}}let u=g({agentListing:r,repoRoots:s});e&&(O=u.agent===`current`),E={steps:u,agentSummary:p(r),repoRoots:s,isShellAvailable:d(r)},j.clear(),H(),P(E.steps),T?.setSuggestions(c)}catch(e){if(w&&(w.disabled=!1),t!==D)return;j.show(`error`,`The checklist could not load: ${a(e,o)} It loads again once the server answers. If it stays like this, check the terminal running Glimmervoid, or run glimmervoid doctor.`)}}function W(){if(S)return S;let t=e(`section`,`first-run-checklist`);t.setAttribute(`aria-labelledby`,`first-run-title`);let n=e(`h2`,`first-run-title`,`Get to your first session`);n.id=`first-run-title`,C=e(`ol`,`first-run-steps`);let r=e(`div`,`first-run-optional`);return r.append(e(`span`,`first-run-eyebrow`,`OPTIONAL`),M.element),t.append(e(`span`,`first-run-eyebrow`,`FIRST RUN`),n,C,j.element,r),S=t,H(),t}function G(e,t){if(!t){S?.parentElement===e&&!S.hidden&&(S.hidden=!0);return}let n=W(),r=!n.hidden&&n.parentElement===e;n.parentElement!==e&&e.append(n),n.hidden=!1,M.refresh(),r||U({rescanAgents:!1})}function K(){S&&!S.hidden&&S.isConnected&&U({rescanAgents:!1})}export{K as refreshFirstRunChecklist,G as showFirstRunChecklist};
|
|
Binary file
|