glimmervoid 0.46.2-next.194 → 0.46.2-next.195
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/glimmervoid.js +8 -8
- package/dist/chunks/{adapters-B8de1_Qj.js → adapters-BKvBLGQ1.js} +1 -1
- package/dist/chunks/{adapters-B1qCBKDo.js → adapters-BzzWyvPY.js} +2 -2
- package/dist/chunks/{agent-api-cli-CxqBmPoc.js → agent-api-cli-CW7gY-wV.js} +1 -1
- package/dist/chunks/{agent-api-cli-BXbTievv.js → agent-api-cli-CdMbgJmy.js} +1 -1
- package/dist/chunks/{agent-api-core-BnJXcgiR.js → agent-api-core-C64Vyj05.js} +1 -1
- package/dist/chunks/{build-channel-Ud_whc0P.js → build-channel-DLgO095K.js} +1 -1
- package/dist/chunks/{config-Di0J-FBW.js → config-CjkEDUyb.js} +1 -0
- package/dist/chunks/config-store-CFF6KHIZ.js +1 -0
- package/dist/chunks/{config-store-BOHOik5x.js → config-store-DhOcBuLJ.js} +2 -2
- package/dist/chunks/{main-B2vAOP9l.js → main-my2ApEYI.js} +7 -7
- package/dist/chunks/{pair-cli-B6yHimlP.js → pair-cli-DxN6pXRR.js} +2 -2
- package/dist/chunks/{remote-config-BxpKWWaG.js → remote-config-aRDK4sp4.js} +1 -1
- package/dist/chunks/{settings-cli-ELnNp2fC.js → settings-cli-D5nyi8sy.js} +4 -4
- package/dist/chunks/{settings-readout-core-nTAWBSEk.js → settings-readout-core-C8sedZPU.js} +1 -1
- package/dist/chunks/{ssh-sign-cli-BmPWuPfz.js → ssh-sign-cli-CdbdFCZ-.js} +1 -1
- package/dist/client/assets/action-status-CaRwKdTD.js +1 -0
- package/dist/client/assets/action-status-CaRwKdTD.js.br +0 -0
- package/dist/client/assets/{alert-sound-B5bULCCQ.js → alert-sound-DN0V4O4m.js} +1 -1
- package/dist/client/assets/alert-sound-DN0V4O4m.js.br +0 -0
- package/dist/client/assets/{benchmark-panel-Cw4zIf4j.js → benchmark-panel-DRUPyZYT.js} +1 -1
- package/dist/client/assets/benchmark-panel-DRUPyZYT.js.br +0 -0
- package/dist/client/assets/{card-registry-C0SQkbse.js → card-registry-Dbt9rUrq.js} +1 -1
- package/dist/client/assets/card-registry-Dbt9rUrq.js.br +0 -0
- package/dist/client/assets/{celebration-player-DXfzgQWF.js → celebration-player-BbHjv2Dt.js} +1 -1
- package/dist/client/assets/celebration-player-BbHjv2Dt.js.br +0 -0
- package/dist/client/assets/community-panel-3yirKGM1.css +1 -0
- package/dist/client/assets/community-panel-Bblj-UgM.js +1 -0
- package/dist/client/assets/community-panel-Bblj-UgM.js.br +0 -0
- package/dist/client/assets/{control-ws-CwTd7ewd.js → control-ws-nj9Lq91R.js} +1 -1
- package/dist/client/assets/control-ws-nj9Lq91R.js.br +0 -0
- package/dist/client/assets/{dialogs-x-pOH1D2.js → dialogs-DexgcbkB.js} +2 -2
- package/dist/client/assets/dialogs-DexgcbkB.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-B-0u1AaK.js +1 -0
- package/dist/client/assets/doc-editor-ui-B-0u1AaK.js.br +0 -0
- package/dist/client/assets/{feature-hint-DL_OLvsl.js → feature-hint-B44cPmiW.js} +1 -1
- package/dist/client/assets/feature-hint-B44cPmiW.js.br +0 -0
- package/dist/client/assets/first-run-checklist-YmI2yFRT.js +1 -0
- package/dist/client/assets/first-run-checklist-YmI2yFRT.js.br +0 -0
- package/dist/client/assets/hooks-panel-DIu5cK-W.js +1 -0
- package/dist/client/assets/hooks-panel-DIu5cK-W.js.br +0 -0
- package/dist/client/assets/index-BZVLaRtw.js +78 -0
- package/dist/client/assets/index-BZVLaRtw.js.br +0 -0
- package/dist/client/assets/issues-panel-DtDX7B-J.js +1 -0
- package/dist/client/assets/issues-panel-DtDX7B-J.js.br +0 -0
- package/dist/client/assets/my-prs-panel-Yu40EHKe.js +1 -0
- package/dist/client/assets/my-prs-panel-Yu40EHKe.js.br +0 -0
- package/dist/client/assets/{nyan-cat-DrLU_0mS.js → nyan-cat-Bm3HJg22.js} +1 -1
- package/dist/client/assets/nyan-cat-Bm3HJg22.js.br +0 -0
- package/dist/client/assets/phone-shell-BqnRQbar.js +1 -0
- package/dist/client/assets/phone-shell-BqnRQbar.js.br +0 -0
- package/dist/client/assets/plan-face-eWoyH_X8.js +3 -0
- package/dist/client/assets/plan-face-eWoyH_X8.js.br +0 -0
- package/dist/client/assets/{plan-render-BpKdL1eo.js → plan-render-DabEE5it.js} +1 -1
- package/dist/client/assets/plan-render-DabEE5it.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-BBlYR9dj.js +1 -0
- package/dist/client/assets/pr-queue-columns-BBlYR9dj.js.br +0 -0
- package/dist/client/assets/radar-panel-B9_z2Ebw.js +1 -0
- package/dist/client/assets/radar-panel-B9_z2Ebw.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-bTdMHoZe.js → repo-roots-adder-pSq0rQgv.js} +1 -1
- package/dist/client/assets/repo-roots-adder-pSq0rQgv.js.br +0 -0
- package/dist/client/assets/resume-dialog-0hueKMwr.js +1 -0
- package/dist/client/assets/resume-dialog-0hueKMwr.js.br +0 -0
- package/dist/client/assets/review-queue-panel-iKZoIk9p.js +1 -0
- package/dist/client/assets/review-queue-panel-iKZoIk9p.js.br +0 -0
- package/dist/client/assets/{session-tick-DNmBRagH.js → session-tick-Bpw_34Bq.js} +1 -1
- package/dist/client/assets/session-tick-Bpw_34Bq.js.br +0 -0
- package/dist/client/assets/settings-panel-B8nyjOUs.js +4 -0
- package/dist/client/assets/settings-panel-B8nyjOUs.js.br +0 -0
- package/dist/client/assets/{shown-lightbox-CsPsLSoj.js → shown-lightbox-CsqdysQp.js} +1 -1
- package/dist/client/assets/shown-lightbox-CsqdysQp.js.br +0 -0
- package/dist/client/assets/status-paint-C4Usj32L.js +1 -0
- package/dist/client/assets/team-review-panel-sRFRf4MX.js +10 -0
- package/dist/client/assets/team-review-panel-sRFRf4MX.js.br +0 -0
- package/dist/client/assets/trace-panel-Doea6eiT.js +2 -0
- package/dist/client/assets/trace-panel-Doea6eiT.js.br +0 -0
- package/dist/client/assets/{updates-view-core-BMRZ5Sfz.js → updates-view-core-CqTQW6Ft.js} +1 -1
- package/dist/client/assets/updates-view-core-CqTQW6Ft.js.br +0 -0
- package/dist/client/assets/usage-panel-CwoMV922.js +1 -0
- package/dist/client/assets/usage-panel-CwoMV922.js.br +0 -0
- package/dist/client/assets/visions-panel-BRoJN4-r.js +1 -0
- package/dist/client/assets/visions-panel-BRoJN4-r.js.br +0 -0
- package/dist/client/index.html +7 -5
- package/dist/client/index.html.br +0 -0
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/config-store-CCNIW85X.js +0 -1
- package/dist/client/assets/alert-sound-B5bULCCQ.js.br +0 -0
- package/dist/client/assets/benchmark-panel-Cw4zIf4j.js.br +0 -0
- package/dist/client/assets/card-registry-C0SQkbse.js.br +0 -0
- package/dist/client/assets/celebration-player-DXfzgQWF.js.br +0 -0
- package/dist/client/assets/control-ws-CwTd7ewd.js.br +0 -0
- package/dist/client/assets/dialogs-x-pOH1D2.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-Beftf_my.js +0 -1
- package/dist/client/assets/doc-editor-ui-Beftf_my.js.br +0 -0
- package/dist/client/assets/feature-hint-DL_OLvsl.js.br +0 -0
- package/dist/client/assets/first-run-checklist-3mxGgqC7.js +0 -1
- package/dist/client/assets/first-run-checklist-3mxGgqC7.js.br +0 -0
- package/dist/client/assets/hooks-panel-mP4bTdjv.js +0 -1
- package/dist/client/assets/hooks-panel-mP4bTdjv.js.br +0 -0
- package/dist/client/assets/index-l1NRofbr.js +0 -78
- package/dist/client/assets/index-l1NRofbr.js.br +0 -0
- package/dist/client/assets/issues-panel-CqxoT_xq.js +0 -1
- package/dist/client/assets/issues-panel-CqxoT_xq.js.br +0 -0
- package/dist/client/assets/nyan-cat-DrLU_0mS.js.br +0 -0
- package/dist/client/assets/phone-shell-BIPZL1st.js +0 -1
- package/dist/client/assets/phone-shell-BIPZL1st.js.br +0 -0
- package/dist/client/assets/plan-face-ZxG1mdyS.js +0 -3
- package/dist/client/assets/plan-face-ZxG1mdyS.js.br +0 -0
- package/dist/client/assets/plan-render-BpKdL1eo.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-UfpdU3zc.js +0 -1
- package/dist/client/assets/pr-queue-columns-UfpdU3zc.js.br +0 -0
- package/dist/client/assets/radar-panel-BxGjEFUb.js +0 -1
- package/dist/client/assets/radar-panel-BxGjEFUb.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-bTdMHoZe.js.br +0 -0
- package/dist/client/assets/resume-dialog-C8ohGMwN.js +0 -1
- package/dist/client/assets/resume-dialog-C8ohGMwN.js.br +0 -0
- package/dist/client/assets/review-queue-panel-CoaTUg0F.js +0 -10
- package/dist/client/assets/review-queue-panel-CoaTUg0F.js.br +0 -0
- package/dist/client/assets/session-tick-DNmBRagH.js.br +0 -0
- package/dist/client/assets/settings-panel-BQUPSkNg.js +0 -4
- package/dist/client/assets/settings-panel-BQUPSkNg.js.br +0 -0
- package/dist/client/assets/shown-lightbox-CsPsLSoj.js.br +0 -0
- package/dist/client/assets/trace-panel-DAKMOF62.js +0 -2
- package/dist/client/assets/trace-panel-DAKMOF62.js.br +0 -0
- package/dist/client/assets/updates-view-core-BMRZ5Sfz.js.br +0 -0
- package/dist/client/assets/usage-panel-P9z6-nYA.js +0 -1
- package/dist/client/assets/usage-panel-P9z6-nYA.js.br +0 -0
- package/dist/client/assets/visions-panel-CQK6P23C.js +0 -1
- package/dist/client/assets/visions-panel-CQK6P23C.js.br +0 -0
- /package/dist/client/assets/{review-queue-panel-DFN9ehjD.css → team-review-panel-DFN9ehjD.css} +0 -0
- /package/dist/client/assets/{review-queue-panel-DFN9ehjD.css.br → team-review-panel-DFN9ehjD.css.br} +0 -0
package/dist/bin/glimmervoid.js
CHANGED
|
@@ -5,7 +5,7 @@ import { o as packageRoot } from "../chunks/runtime-paths-ghcH9CeW.js";
|
|
|
5
5
|
import { n as glimmervoidHomeDir, t as decideConfigPath } from "../chunks/config-path-core-DUWk0Lui.js";
|
|
6
6
|
import { t as AGENT_API_VERBS } from "../chunks/session-B2Wieg0a.js";
|
|
7
7
|
import { i as execSync } from "../chunks/child-process-safe-D4hyVIXj.js";
|
|
8
|
-
import { r as agentCommandHelpLines } from "../chunks/agent-api-core-
|
|
8
|
+
import { r as agentCommandHelpLines } from "../chunks/agent-api-core-C64Vyj05.js";
|
|
9
9
|
import { t as renderTable } from "../chunks/ascii-figure-core-pDAwtlKO.js";
|
|
10
10
|
import { i as parseCommandLine, r as gitDoctorRows, t as probeGitVersion } from "../chunks/git-version-WyrLHANY.js";
|
|
11
11
|
import { i as guardrailsDoctorRows, r as probeGuardrailsDependencies } from "../chunks/guardrails-deps-BjPzk1rE.js";
|
|
@@ -65,7 +65,7 @@ var OWN_SUBCOMMAND_RUNNERS = [
|
|
|
65
65
|
return 0;
|
|
66
66
|
}],
|
|
67
67
|
["pair", async (subcommandArgs) => {
|
|
68
|
-
const { runPairCli } = await import("../chunks/pair-cli-
|
|
68
|
+
const { runPairCli } = await import("../chunks/pair-cli-DxN6pXRR.js");
|
|
69
69
|
return runPairCli(subcommandArgs);
|
|
70
70
|
}],
|
|
71
71
|
["agent", async (subcommandArgs) => {
|
|
@@ -73,7 +73,7 @@ var OWN_SUBCOMMAND_RUNNERS = [
|
|
|
73
73
|
return runAgentSetupCli(subcommandArgs);
|
|
74
74
|
}],
|
|
75
75
|
["settings", async (subcommandArgs) => {
|
|
76
|
-
const { runSettingsCli } = await import("../chunks/settings-cli-
|
|
76
|
+
const { runSettingsCli } = await import("../chunks/settings-cli-D5nyi8sy.js");
|
|
77
77
|
return runSettingsCli(subcommandArgs);
|
|
78
78
|
}],
|
|
79
79
|
["visions", async (subcommandArgs) => {
|
|
@@ -81,13 +81,13 @@ var OWN_SUBCOMMAND_RUNNERS = [
|
|
|
81
81
|
return runVisionsCli(subcommandArgs);
|
|
82
82
|
}],
|
|
83
83
|
["ssh-sign", async (subcommandArgs) => {
|
|
84
|
-
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-
|
|
84
|
+
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-CdbdFCZ-.js");
|
|
85
85
|
return runSshSignCli(subcommandArgs);
|
|
86
86
|
}]
|
|
87
87
|
];
|
|
88
88
|
var ownSubcommandNames = new Set(OWN_SUBCOMMAND_RUNNERS.map(([name]) => name));
|
|
89
89
|
var SUBCOMMAND_RUNNERS = new Map([...OWN_SUBCOMMAND_RUNNERS, ...AGENT_API_VERBS.filter((verb) => !ownSubcommandNames.has(verb)).map((verb) => [verb, async (subcommandArgs, subcommandName) => {
|
|
90
|
-
const { runAgentApiCli } = await import("../chunks/agent-api-cli-
|
|
90
|
+
const { runAgentApiCli } = await import("../chunks/agent-api-cli-CW7gY-wV.js");
|
|
91
91
|
return runAgentApiCli([subcommandName, ...subcommandArgs]);
|
|
92
92
|
}])]);
|
|
93
93
|
var AGENT_INSTALL_COMMAND_BY_ID = {
|
|
@@ -101,7 +101,7 @@ function missingAgentText(agentId) {
|
|
|
101
101
|
}
|
|
102
102
|
async function printSessionLimits() {
|
|
103
103
|
if (!process.env["GLIMMERVOID_AGENT_URL"]) return;
|
|
104
|
-
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-
|
|
104
|
+
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-CW7gY-wV.js");
|
|
105
105
|
const limitsLines = await sessionLimitsHelpLines();
|
|
106
106
|
console.log(`\n${limitsLines.join("\n")}`);
|
|
107
107
|
}
|
|
@@ -158,7 +158,7 @@ async function readDeclaredCustomAgents() {
|
|
|
158
158
|
declared: [],
|
|
159
159
|
error: null
|
|
160
160
|
};
|
|
161
|
-
const { loadConfigFile } = await import("../chunks/config-store-
|
|
161
|
+
const { loadConfigFile } = await import("../chunks/config-store-CFF6KHIZ.js");
|
|
162
162
|
try {
|
|
163
163
|
const loaded = loadConfigFile(decided.path, { exitOnError: false });
|
|
164
164
|
if (!loaded.config) return {
|
|
@@ -234,7 +234,7 @@ async function runDoctor() {
|
|
|
234
234
|
}
|
|
235
235
|
switchSection("Agents");
|
|
236
236
|
try {
|
|
237
|
-
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-
|
|
237
|
+
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-BKvBLGQ1.js");
|
|
238
238
|
const declaredCustomAgents = await readDeclaredCustomAgents();
|
|
239
239
|
if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
|
|
240
240
|
setCustomAgents(declaredCustomAgents.declared);
|
|
@@ -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-BzzWyvPY.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as relayPath } from "./runtime-paths-ghcH9CeW.js";
|
|
2
2
|
import { Lt as FULL_SHA_RE, zt as shortSha$1 } from "./session-B2Wieg0a.js";
|
|
3
3
|
import { n as execFileAsync, r as execFileSync } from "./child-process-safe-D4hyVIXj.js";
|
|
4
|
-
import { Dt as UpdateChannel, S as InstallFlavor, c as SHELL_AGENT_ID } from "./config-
|
|
4
|
+
import { Dt as UpdateChannel, S as InstallFlavor, c as SHELL_AGENT_ID } from "./config-CjkEDUyb.js";
|
|
5
5
|
import { o as supervisionLine } from "./session-routes-Cr9S--Nf.js";
|
|
6
6
|
import { c as textOr, i as numberOr, s as rawTextOr } from "./coerce-NSst8oRP.js";
|
|
7
7
|
import { n as resolveAgentCommand, t as buildAgentSpawnCommand } from "./spawn-command-Cc40FiZI.js";
|
|
@@ -11,7 +11,7 @@ import { r as nextBackoffMs } from "./backoff-DjVpfHk7.js";
|
|
|
11
11
|
import { t as buildAgentEnv } from "./spawn-env-C-PfRa2d.js";
|
|
12
12
|
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-z6bXbyuG.js";
|
|
14
|
-
import { n as isExperimentalBuild, t as compareReleaseVersions } from "./build-channel-
|
|
14
|
+
import { n as isExperimentalBuild, t as compareReleaseVersions } from "./build-channel-DLgO095K.js";
|
|
15
15
|
import { t as kimi } from "./kimi-DYcsNY69.js";
|
|
16
16
|
import fs from "node:fs";
|
|
17
17
|
import path from "node:path";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as askAgentApi, r as runAgentApiCli, i as sessionLimitsHelpLines } from "./agent-api-cli-
|
|
1
|
+
export { t as askAgentApi, r as runAgentApiCli, i as sessionLimitsHelpLines } from "./agent-api-cli-CdMbgJmy.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as errorCode } from "./text-DoirglWV.js";
|
|
2
2
|
import { c as AgentLimitsReply, n as AGENT_URL_ENV } from "./session-B2Wieg0a.js";
|
|
3
3
|
import { i as formatSessionLimits } from "./session-routes-Cr9S--Nf.js";
|
|
4
|
-
import { f as isAgentApiVerb, t as AGENT_COMMAND_HELP } from "./agent-api-core-
|
|
4
|
+
import { f as isAgentApiVerb, t as AGENT_COMMAND_HELP } from "./agent-api-core-C64Vyj05.js";
|
|
5
5
|
import { i as resolveHookTarget } from "./hook-relay-core-DA_bz2KA.js";
|
|
6
6
|
import { n as decideGuardrailsProxy } from "./guardrails-proxy-core-BI3rdY-m.js";
|
|
7
7
|
import { t as parseJsonOrNull } from "./json-core-dfa_7Fak.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { I as TASK_TITLE_CONTROL_CHARACTERS, a as AgentAttentionRequest, d as AgentSendRequest, i as AgentAnswerRequest, l as AgentPullRequestRequest, m as AgentSpawnRequest, o as AgentCloseRequest, p as AgentSettingsRequest, s as AgentEditRequest, t as AGENT_API_VERBS, u as AgentReadRequest, x as RefinedTaskTitle } from "./session-B2Wieg0a.js";
|
|
2
|
-
import { D as pullRequestKeyFromReference, l as TASK_TITLE_SOURCE_PRIORITY, o as PersistedTaskTitle } from "./config-
|
|
2
|
+
import { D as pullRequestKeyFromReference, l as TASK_TITLE_SOURCE_PRIORITY, o as PersistedTaskTitle } from "./config-CjkEDUyb.js";
|
|
3
3
|
import { n as NO_OWN_WORKTREE_REASON, t as COMMAND_ROUTES } from "./session-routes-Cr9S--Nf.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import crypto from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./session-B2Wieg0a.js";
|
|
2
|
-
import { C as ONBOARDING_STEPS, E as OPERATOR_SURFACES, T as OPERATOR_ACTIONS_BY_SURFACE, j as HintFeature, n as BUILTIN_AGENT_IDS, w as ONBOARDING_STEP_STATES, x as DASHBOARD_VIEWS } from "./config-
|
|
2
|
+
import { C as ONBOARDING_STEPS, E as OPERATOR_SURFACES, T as OPERATOR_ACTIONS_BY_SURFACE, j as HintFeature, n as BUILTIN_AGENT_IDS, w as ONBOARDING_STEP_STATES, x as DASHBOARD_VIEWS } from "./config-CjkEDUyb.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region shared/contracts/telemetry.ts
|
|
5
5
|
var TELEMETRY_ADAPTERS = Object.freeze([...BUILTIN_AGENT_IDS, "custom"]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { c as loadConfigFile } from "./config-store-DhOcBuLJ.js";
|
|
@@ -2,11 +2,11 @@ import { n as errorLabel, r as errorMessage } from "./text-DoirglWV.js";
|
|
|
2
2
|
import { n as equalsIgnoringCaseOnWindows } from "./paths-Bu4eH1Yd.js";
|
|
3
3
|
import { o as packageRoot } from "./runtime-paths-ghcH9CeW.js";
|
|
4
4
|
import { n as glimmervoidHomeDir$1, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
|
|
5
|
-
import { $ as FLYING_ANIMALS_DEFAULTS, Et as UPDATE_CHANNELS, Q as COMMUNITY_INTERVAL_MINUTES_RANGE, _t as USAGE_RETAIN_DAYS_RANGE, at as NON_NEGATIVE_NUMBER_RANGE, bt as WORKFLOWS_MAX_CONCURRENT_SESSIONS_RANGE, ct as POSTHOG_FIX_TIMEOUT_RANGE, d as BranchGcFileSettings, dt as POSTHOG_TRAFFIC_MIN_USERS_RANGE, et as FLYING_ANIMALS_DURATION_RANGE, ft as POSTHOG_TRAFFIC_MULTIPLIER_RANGE, gt as USAGE_INTEGER_RANGES, h as normalizeLegacyConfigNumbers, ht as USAGE_BUDGET_RANGE, i as Config, it as MEMORY_RESERVE_MB_RANGE, lt as POSTHOG_PROJECT_ID_RANGE, mt as TASK_TITLE_TIMEOUT_RANGE, n as BUILTIN_AGENT_IDS, nt as FLYING_ANIMALS_SCALE_RANGE, ot as PORT_RANGE, p as USAGE_COST_MODES, pt as REPLAY_BUFFER_KB_RANGE, rt as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, s as RUNTIME_CONFIG_SCALAR_KEYS, st as POSITIVE_NUMBER_RANGE, t as AGENT_ID_SHAPE_MESSAGE, tt as FLYING_ANIMALS_GAP_RANGE, u as configIssueMessage, ut as POSTHOG_TRAFFIC_BASELINE_RANGE, vt as USAGE_SCAN_INTERVAL_RANGE, yt as WORKFLOWS_MAX_ACTIONS_PER_POLL_RANGE } from "./config-
|
|
5
|
+
import { $ as FLYING_ANIMALS_DEFAULTS, Et as UPDATE_CHANNELS, Q as COMMUNITY_INTERVAL_MINUTES_RANGE, _t as USAGE_RETAIN_DAYS_RANGE, at as NON_NEGATIVE_NUMBER_RANGE, bt as WORKFLOWS_MAX_CONCURRENT_SESSIONS_RANGE, ct as POSTHOG_FIX_TIMEOUT_RANGE, d as BranchGcFileSettings, dt as POSTHOG_TRAFFIC_MIN_USERS_RANGE, et as FLYING_ANIMALS_DURATION_RANGE, ft as POSTHOG_TRAFFIC_MULTIPLIER_RANGE, gt as USAGE_INTEGER_RANGES, h as normalizeLegacyConfigNumbers, ht as USAGE_BUDGET_RANGE, i as Config, it as MEMORY_RESERVE_MB_RANGE, lt as POSTHOG_PROJECT_ID_RANGE, mt as TASK_TITLE_TIMEOUT_RANGE, n as BUILTIN_AGENT_IDS, nt as FLYING_ANIMALS_SCALE_RANGE, ot as PORT_RANGE, p as USAGE_COST_MODES, pt as REPLAY_BUFFER_KB_RANGE, rt as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, s as RUNTIME_CONFIG_SCALAR_KEYS, st as POSITIVE_NUMBER_RANGE, t as AGENT_ID_SHAPE_MESSAGE, tt as FLYING_ANIMALS_GAP_RANGE, u as configIssueMessage, ut as POSTHOG_TRAFFIC_BASELINE_RANGE, vt as USAGE_SCAN_INTERVAL_RANGE, yt as WORKFLOWS_MAX_ACTIONS_PER_POLL_RANGE } from "./config-CjkEDUyb.js";
|
|
6
6
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
7
7
|
import { t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.js";
|
|
8
8
|
import { d as writeJsonAtomicSync, f as writeTextAtomic, p as writeTextAtomicSync } from "./json-file-BjFK_eSH.js";
|
|
9
|
-
import { f as FeatureFlagsResponse, g as TELEMETRY_KILL_SWITCH_FLAG, n as isExperimentalBuild, p as MAX_TEXT_LENGTH } from "./build-channel-
|
|
9
|
+
import { f as FeatureFlagsResponse, g as TELEMETRY_KILL_SWITCH_FLAG, n as isExperimentalBuild, p as MAX_TEXT_LENGTH } from "./build-channel-DLgO095K.js";
|
|
10
10
|
import fs from "node:fs";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import os from "node:os";
|
|
@@ -5,9 +5,9 @@ import { c as resolvePackageBin, i as clientDir, n as bundled, o as packageRoot,
|
|
|
5
5
|
import { n as glimmervoidHomeDir, r as isOperatorHomeUnderTest, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
|
|
6
6
|
import { At as TeamReviewThreadCommentsResponse, B as MyPr, Bt as GH_SEGMENT, C as SESSION_DOC_BODY_CAP_BYTES, Ct as ReviewVerdict, D as SHOWN_FILE_CAP_BYTES, Dt as TeamReviewResolveResponse, E as SESSION_NAME_RULE_TEXT, Et as TeamReviewCompareFiles, F as SshSignRequest, H as MyPrCheckContext, Ht as REPO_SLUG_RE, It as hasStandingViewerApproval, J as MyPrMergeRequest, Jt as BADGE_LABELS, K as MyPrLaneEntry, L as TaskTitle, Mt as TeamReviewThreadsRepository, N as ShownFile, Nt as canApproveAfterComment, O as SIGN_URL_ENV, Ot as TeamReviewStateEntry, Pt as decisionAsIfApprovalRequired, Qt as STATES, Rt as HEX_SHA_RE, St as ReviewThreadId, T as SESSION_NAME_PATTERN, U as MyPrCheckContextsResponse, Ut as repoParts, V as MyPrAutoRebase, Vt as NODE_ID_RE, W as MyPrKeepMergeableRequest, X as MyPrMergeStateResponse, Xt as MERGEABLE_LIVE_STATES, Yt as KILLABLE_STATES, Z as MyPrMergeWhenReadyRequest, Zt as RESTARTABLE_STATES, _ as CONVERSATION_PERMISSION_HOOK_EVENT, b as ConversationQuestion, bt as ReviewFinding, ct as CommitSha, dt as FindingSeverity, et as MyPrThreadNode, g as CONVERSATION_APPROVAL_SUMMARY_MAX_CHARS, gt as PrDetail, h as COHERENCE_HOOKS_INACTIVE, ht as PostingPlan, jt as TeamReviewThreadResult, k as SSH_SIGN_BODY_CAP_BYTES, kt as TeamReviewStatus, lt as DECIDING_REVIEW_STATES, mt as PostedReviewEvent, n as AGENT_URL_ENV, nt as MyPrsSnapshot, pt as GithubReviewState, q as MyPrMergeMethod, r as ASK_USER_QUESTION_TOOL_NAME, rt as MyPrsState, tt as MyPrThreadsResponse, ut as EarlierReview, v as CONVERSATION_TOOL_RESULT_HOOK_EVENT, vt as ReviewComment, wt as TeamReviewActionRequest, xt as ReviewResult, yt as ReviewDraft, z as LinkedPr, zt as shortSha } from "./session-B2Wieg0a.js";
|
|
7
7
|
import { n as execFileAsync, o as spawn, r as execFileSync, t as execFile } from "./child-process-safe-D4hyVIXj.js";
|
|
8
|
-
import { A as HINT_VIEW_BY_FEATURE, At as MAX_RAW_LINE_CHARS, B as MergedPrListing, Bt as PLAN_TOOL_NAME, Ct as CommunityItem, D as pullRequestKeyFromReference, F as BenchmarkJudgement, Ft as changeMapFactId, G as GithubPrLightSearchNode, Gt as GithubIssuePullRequestsRepository, H as PrCheckoutCaseInput, Ht as PlanRevision, I as BenchmarkRun, It as PLAN_BODY_CAP_BYTES, J as WorkflowCommentBody, Jt as IssueUpdate, K as GithubPrsFrame, Kt as GithubIssueResponse, L as BenchmarkStatus, Lt as PLAN_HOOK_EVENT, M as BenchmarkActionRequest, Mt as TraceRecord, N as BenchmarkCase, Nt as CoherenceJournalOutput, O as FeatureHintState, Ot as UpdateJournal, P as BenchmarkId, Pt as ChangeMap, Qt as issuePullRequestStateFromGithub, R as BenchmarkSuite, Rt as PLAN_HOOK_OUTPUT_MAX_CHARS, St as CommunityDraft, Tt as CommunityVerdict, U as GithubPrDetailNode, Ut as parseExitPlanModeHookPayload, V as MinedPrReviewData, Vt as PlanDecision, W as GithubPrKey, Wt as planTitle, X as WorkflowsSettings, Xt as IssuesState, Y as WorkflowLabelName, Yt as IssuesSearchResponse, Z as WorkflowsState, Zt as IssuesStatus, a as ConfigUpdate, b as ClientMessage, c as SHELL_AGENT_ID, f as ReviewAgentId, g as CHANGES_POLL_INTERVAL_MS, gt as USAGE_INTEGER_RANGES, jt as TraceCheckpoint, k as HINT_FEATURES, kt as SessionSetup, m as USAGE_VENDOR_KEYS, p as USAGE_COST_MODES, q as comparablePrKey, qt as IssueKey, r as BrowserConfig, rt as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, s as RUNTIME_CONFIG_SCALAR_KEYS, u as configIssueMessage, v as CLIENT_LOG_TEXT_MAX_CHARS, wt as CommunityState, xt as CommunityActionRequest, y as CONTROL_FRAME_MAX_BYTES, z as CommitComparison, zt as PLAN_RESULT_HOOK_EVENT } from "./config-
|
|
8
|
+
import { A as HINT_VIEW_BY_FEATURE, At as MAX_RAW_LINE_CHARS, B as MergedPrListing, Bt as PLAN_TOOL_NAME, Ct as CommunityItem, D as pullRequestKeyFromReference, F as BenchmarkJudgement, Ft as changeMapFactId, G as GithubPrLightSearchNode, Gt as GithubIssuePullRequestsRepository, H as PrCheckoutCaseInput, Ht as PlanRevision, I as BenchmarkRun, It as PLAN_BODY_CAP_BYTES, J as WorkflowCommentBody, Jt as IssueUpdate, K as GithubPrsFrame, Kt as GithubIssueResponse, L as BenchmarkStatus, Lt as PLAN_HOOK_EVENT, M as BenchmarkActionRequest, Mt as TraceRecord, N as BenchmarkCase, Nt as CoherenceJournalOutput, O as FeatureHintState, Ot as UpdateJournal, P as BenchmarkId, Pt as ChangeMap, Qt as issuePullRequestStateFromGithub, R as BenchmarkSuite, Rt as PLAN_HOOK_OUTPUT_MAX_CHARS, St as CommunityDraft, Tt as CommunityVerdict, U as GithubPrDetailNode, Ut as parseExitPlanModeHookPayload, V as MinedPrReviewData, Vt as PlanDecision, W as GithubPrKey, Wt as planTitle, X as WorkflowsSettings, Xt as IssuesState, Y as WorkflowLabelName, Yt as IssuesSearchResponse, Z as WorkflowsState, Zt as IssuesStatus, a as ConfigUpdate, b as ClientMessage, c as SHELL_AGENT_ID, f as ReviewAgentId, g as CHANGES_POLL_INTERVAL_MS, gt as USAGE_INTEGER_RANGES, jt as TraceCheckpoint, k as HINT_FEATURES, kt as SessionSetup, m as USAGE_VENDOR_KEYS, p as USAGE_COST_MODES, q as comparablePrKey, qt as IssueKey, r as BrowserConfig, rt as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, s as RUNTIME_CONFIG_SCALAR_KEYS, u as configIssueMessage, v as CLIENT_LOG_TEXT_MAX_CHARS, wt as CommunityState, xt as CommunityActionRequest, y as CONTROL_FRAME_MAX_BYTES, z as CommitComparison, zt as PLAN_RESULT_HOOK_EVENT } from "./config-CjkEDUyb.js";
|
|
9
9
|
import { a as permitsHelpCommand, o as supervisionLine, r as describeSessionLimits } from "./session-routes-Cr9S--Nf.js";
|
|
10
|
-
import { A as resolveTaskTitle, B as listRepoConversations, C as extractOscTaskTitle, D as parseRefinedSessionName, E as isSubstantivePrompt, F as resolveResumeTarget, H as isAutoNameOf, I as resumePromptFor, L as shouldAdoptReportedResumeId, M as AUTO_CONTINUE_PROMPT, N as RESUME_ID_RE, O as parseRefinedTaskTitle, P as pickAutoResume, R as claudeProjectsDir, S as extractHookTaskTitle, T as isSelfWakePrompt, U as nextSuggestedName, V as listRepoWorktreePaths, _ as buildTaskTitleRefinementPrompt, a as decideSpawnAllowance, b as decideTaskTitleRefinement, c as describeKeptChildAttention, d as describeUnpushedCloseRefusal, g as buildPersistedTaskTitle, h as projectReviews, i as decideAgentRequest, j as seedTaskTitleSources, k as resolveRefocusTaskTitle, l as describePushLanding, m as projectMyPrs, n as REFUSAL_REASON, o as deriveChildSessionName, p as parseAgentVerb, s as describeChildEndNote, u as describeRoleRefusal, v as chooseRefinedSessionName, w as extractPromptTaskTitle, x as extractAiTitle, y as cleanTaskPrompt, z as encodeProjectDir } from "./agent-api-core-
|
|
10
|
+
import { A as resolveTaskTitle, B as listRepoConversations, C as extractOscTaskTitle, D as parseRefinedSessionName, E as isSubstantivePrompt, F as resolveResumeTarget, H as isAutoNameOf, I as resumePromptFor, L as shouldAdoptReportedResumeId, M as AUTO_CONTINUE_PROMPT, N as RESUME_ID_RE, O as parseRefinedTaskTitle, P as pickAutoResume, R as claudeProjectsDir, S as extractHookTaskTitle, T as isSelfWakePrompt, U as nextSuggestedName, V as listRepoWorktreePaths, _ as buildTaskTitleRefinementPrompt, a as decideSpawnAllowance, b as decideTaskTitleRefinement, c as describeKeptChildAttention, d as describeUnpushedCloseRefusal, g as buildPersistedTaskTitle, h as projectReviews, i as decideAgentRequest, j as seedTaskTitleSources, k as resolveRefocusTaskTitle, l as describePushLanding, m as projectMyPrs, n as REFUSAL_REASON, o as deriveChildSessionName, p as parseAgentVerb, s as describeChildEndNote, u as describeRoleRefusal, v as chooseRefinedSessionName, w as extractPromptTaskTitle, x as extractAiTitle, y as cleanTaskPrompt, z as encodeProjectDir } from "./agent-api-core-C64Vyj05.js";
|
|
11
11
|
import { a as positiveIntOr, c as textOr, i as numberOr, n as isRecord, o as positiveNumberOr, r as nonNegativeIntOr, s as rawTextOr, t as coercedNumberOr } from "./coerce-NSst8oRP.js";
|
|
12
12
|
import { i as parseCommandLine, n as warnWhenGitIsTooOld } from "./git-version-WyrLHANY.js";
|
|
13
13
|
import { n as checkGuardrailsDependencies, t as allowGuardedSpawn } from "./guardrails-deps-BjPzk1rE.js";
|
|
@@ -22,14 +22,14 @@ import { n as unrefTimer, t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.j
|
|
|
22
22
|
import { a as readPageTitle, i as filesAfterRetention, n as decideShownKind, o as shownMimeForFilename, r as describeOverCap, t as SHOWN_SNIFF_BYTES } from "./shown-files-core-C7ER2sw2.js";
|
|
23
23
|
import { n as shellQuote } from "./hook-command-core-qTNK-xMF.js";
|
|
24
24
|
import { C as parseCgroupBytes, S as memoryReserveBytes, T as parseMemAvailableBytes, _ as createSpawnGate, a as jsonStateLoadError, b as cgroupLimitBytes, c as loadedJsonValue, d as writeJsonAtomicSync, f as writeTextAtomic, g as createSerialQueue, h as createMemoryAdmission, i as createJsonStateWriter, m as createKeyedSerialQueue, n as appendJsonLines, o as loadJsonStateFile, p as writeTextAtomicSync, r as createJsonStateStore, s as loadJsonStateFileSync, t as appendJsonLine, u as writeJsonAtomic, v as isQueueAdmissionTimeout, w as parseCgroupV2Path, x as headroomFromReadings, y as cgroupAncestorPaths } from "./json-file-BjFK_eSH.js";
|
|
25
|
-
import { $ as matchedPrefix, A as FIRST_RUN_NOTICE, B as codexUserIdOf, F as buildBrowserExceptionProperties, G as nodeMajorVersion, H as decideRemoteTelemetryState, I as buildExceptionProperties, K as parsePosthogReleaseId, L as buildPersonProperties, M as TELEMETRY_FLAGS_URL, N as adapterBucket, P as buildAiGenerationEvents, Q as DEFAULT_BRANCH_GC_PREFIXES, R as classifySessionExit, U as decideTelemetryConsent, V as decideIsDevInstall, W as exceptionFingerprint, X as stableConfigKey, a as ensureProjectIds, at as canonicalizePath, et as planBranchGc, g as validateSettingsBlock, h as settingsBlockSpecFor, i as createConfigStore, it as worktreeIntegrationTips, j as TELEMETRY_BATCH_URL, m as mergeSettingsBlock, n as DEFAULT_CONFIG, nt as sessionIdFromBranch, o as generateProjectId, ot as comparableDirectoryPath, q as resolveProjectToken, rt as usablePrefixes, s as glimmervoidHomeDir$1, st as isSameDirectoryPath, t as ABORT_CONFIG_SAVE, tt as planWorktreeGc, z as claudeAccountUuidOf } from "./config-store-
|
|
26
|
-
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-
|
|
27
|
-
import { $ as identityFromRelPath, A as decideFileRead, B as sessionsRootCandidates, C as pickNewestPublished, D as codexRootCandidates, E as codexHomes, F as kimiHomes, G as kimiSessionIdFromPath, H as shouldPersistWarehouse, I as passOutcome, J as dedupKeys, K as parseKimiUsageLine, L as projectDirCandidates, M as expandTilde, N as grokHomes, O as codexSessionIdFromPath, P as isUsageFile, Q as foldReplacementIntoGenerationRollup, R as resolveProjectsDirs, S as parseResolvedSha, T as codexFallbackRoots, U as splitLines$1, V as shouldEvaluateDespiteIoFailures, W as kimiDedupIdentity, X as expandAdvisorIterations, Y as emptyTotals, Z as foldEntryIntoGenerationRollup, _ as isCheckFresh, a as describeAgentResolvability, at as totalTokensOf$1, b as parseRegistryDeprecation, c as isKnownAgentId, ct as claudeCode, d as resolveAdapter, et as isWithinGenerationRecencyWindow, f as setCustomAgents, g as decideUpdateStatus, h as decideInstallFlavor, i as customAgentFingerprint, it as shouldReplace, j as dedupeCodexFiles, k as continuationDelayMs, l as listAgentIds, m as readHostCodexVersion, n as cachedAgentResolvability, nt as parseJsonLine, o as getAdapter, ot as vendorUsageEntry, p as codex, q as addEntryToTotals, r as commandFor, rt as parseUsageLine, s as hookProfileOf, st as HOOK_TOOLS, t as DEFAULT_AGENT_ID, tt as mergeGenerationRollups, u as resetCommandCache, v as normalizeSha, w as shortSha$1, x as parseRegistryLatest, y as normalizeUpdateChannel, z as scopedClaudeRoots } from "./adapters-
|
|
25
|
+
import { $ as matchedPrefix, A as FIRST_RUN_NOTICE, B as codexUserIdOf, F as buildBrowserExceptionProperties, G as nodeMajorVersion, H as decideRemoteTelemetryState, I as buildExceptionProperties, K as parsePosthogReleaseId, L as buildPersonProperties, M as TELEMETRY_FLAGS_URL, N as adapterBucket, P as buildAiGenerationEvents, Q as DEFAULT_BRANCH_GC_PREFIXES, R as classifySessionExit, U as decideTelemetryConsent, V as decideIsDevInstall, W as exceptionFingerprint, X as stableConfigKey, a as ensureProjectIds, at as canonicalizePath, et as planBranchGc, g as validateSettingsBlock, h as settingsBlockSpecFor, i as createConfigStore, it as worktreeIntegrationTips, j as TELEMETRY_BATCH_URL, m as mergeSettingsBlock, n as DEFAULT_CONFIG, nt as sessionIdFromBranch, o as generateProjectId, ot as comparableDirectoryPath, q as resolveProjectToken, rt as usablePrefixes, s as glimmervoidHomeDir$1, st as isSameDirectoryPath, t as ABORT_CONFIG_SAVE, tt as planWorktreeGc, z as claudeAccountUuidOf } from "./config-store-DhOcBuLJ.js";
|
|
26
|
+
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-DLgO095K.js";
|
|
27
|
+
import { $ as identityFromRelPath, A as decideFileRead, B as sessionsRootCandidates, C as pickNewestPublished, D as codexRootCandidates, E as codexHomes, F as kimiHomes, G as kimiSessionIdFromPath, H as shouldPersistWarehouse, I as passOutcome, J as dedupKeys, K as parseKimiUsageLine, L as projectDirCandidates, M as expandTilde, N as grokHomes, O as codexSessionIdFromPath, P as isUsageFile, Q as foldReplacementIntoGenerationRollup, R as resolveProjectsDirs, S as parseResolvedSha, T as codexFallbackRoots, U as splitLines$1, V as shouldEvaluateDespiteIoFailures, W as kimiDedupIdentity, X as expandAdvisorIterations, Y as emptyTotals, Z as foldEntryIntoGenerationRollup, _ as isCheckFresh, a as describeAgentResolvability, at as totalTokensOf$1, b as parseRegistryDeprecation, c as isKnownAgentId, ct as claudeCode, d as resolveAdapter, et as isWithinGenerationRecencyWindow, f as setCustomAgents, g as decideUpdateStatus, h as decideInstallFlavor, i as customAgentFingerprint, it as shouldReplace, j as dedupeCodexFiles, k as continuationDelayMs, l as listAgentIds, m as readHostCodexVersion, n as cachedAgentResolvability, nt as parseJsonLine, o as getAdapter, ot as vendorUsageEntry, p as codex, q as addEntryToTotals, r as commandFor, rt as parseUsageLine, s as hookProfileOf, st as HOOK_TOOLS, t as DEFAULT_AGENT_ID, tt as mergeGenerationRollups, u as resetCommandCache, v as normalizeSha, w as shortSha$1, x as parseRegistryLatest, y as normalizeUpdateChannel, z as scopedClaudeRoots } from "./adapters-BzzWyvPY.js";
|
|
28
28
|
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-WZ9E4f-u.js";
|
|
29
29
|
import { t as kimi } from "./kimi-DYcsNY69.js";
|
|
30
30
|
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";
|
|
31
|
-
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-
|
|
32
|
-
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-
|
|
31
|
+
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-aRDK4sp4.js";
|
|
32
|
+
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-C8sedZPU.js";
|
|
33
33
|
import { _ as escapeMarkup, g as createLaneLog, n as createVisionsSetup } from "./visions-setup-VMMyqOpl.js";
|
|
34
34
|
import { createRequire } from "node:module";
|
|
35
35
|
import fs, { readFileSync, readlinkSync } from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as errorMessage } from "./text-DoirglWV.js";
|
|
2
|
-
import { l as resolveConfigPath } from "./config-store-
|
|
3
|
-
import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-
|
|
2
|
+
import { l as resolveConfigPath } from "./config-store-DhOcBuLJ.js";
|
|
3
|
+
import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-aRDK4sp4.js";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
//#region server/text-format.ts
|
|
6
6
|
function trimIso(iso) {
|
|
@@ -3,7 +3,7 @@ import { n as equalsIgnoringCaseOnWindows } from "./paths-Bu4eH1Yd.js";
|
|
|
3
3
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
4
4
|
import { n as unrefTimer, t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.js";
|
|
5
5
|
import { a as jsonStateLoadError, d as writeJsonAtomicSync, l as sleepSync, s as loadJsonStateFileSync, u as writeJsonAtomic } from "./json-file-BjFK_eSH.js";
|
|
6
|
-
import { at as canonicalizePath, s as glimmervoidHomeDir } from "./config-store-
|
|
6
|
+
import { at as canonicalizePath, s as glimmervoidHomeDir } from "./config-store-DhOcBuLJ.js";
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import crypto from "node:crypto";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as errorMessage, t as errorCode } from "./text-DoirglWV.js";
|
|
2
2
|
import { n as glimmervoidHomeDir, t as decideConfigPath } from "./config-path-core-DUWk0Lui.js";
|
|
3
3
|
import { f as AgentSettingsReply } from "./session-B2Wieg0a.js";
|
|
4
|
-
import { r as BrowserConfig } from "./config-
|
|
4
|
+
import { r as BrowserConfig } from "./config-CjkEDUyb.js";
|
|
5
5
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
6
6
|
import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
|
|
7
|
-
import { C as scoreSettingsSearch, D as valueAtPath, J as ENV_SECRET_BINDINGS, S as parsePosthogProjectSelection, Y as readEnvSecrets, Z as withEnvSecrets, c as loadConfigFile, d as validateConfig, f as isSettingAvailable, k as SETTINGS_REGISTRY, r as IS_EXPERIMENTAL_BUILD, u as saveConfigFileOnce, v as cloneValue, w as setValueAtPath, y as deleteValueAtPath } from "./config-store-
|
|
8
|
-
import { a as fail, c as listSettings, d as renderSectionTables, f as requireConfigFileSetting, g as valueText, h as succeed, i as describeSetting, l as readSetting, m as settingsRequestForServer, n as configFileViewOf, o as fitColumn, p as sectionOf, r as defaultText, s as getSetting, t as availableSettings } from "./settings-readout-core-
|
|
7
|
+
import { C as scoreSettingsSearch, D as valueAtPath, J as ENV_SECRET_BINDINGS, S as parsePosthogProjectSelection, Y as readEnvSecrets, Z as withEnvSecrets, c as loadConfigFile, d as validateConfig, f as isSettingAvailable, k as SETTINGS_REGISTRY, r as IS_EXPERIMENTAL_BUILD, u as saveConfigFileOnce, v as cloneValue, w as setValueAtPath, y as deleteValueAtPath } from "./config-store-DhOcBuLJ.js";
|
|
8
|
+
import { a as fail, c as listSettings, d as renderSectionTables, f as requireConfigFileSetting, g as valueText, h as succeed, i as describeSetting, l as readSetting, m as settingsRequestForServer, n as configFileViewOf, o as fitColumn, p as sectionOf, r as defaultText, s as getSetting, t as availableSettings } from "./settings-readout-core-C8sedZPU.js";
|
|
9
9
|
import fs from "node:fs";
|
|
10
10
|
import os from "node:os";
|
|
11
11
|
import { parseArgs } from "node:util";
|
|
@@ -330,7 +330,7 @@ function processIo() {
|
|
|
330
330
|
async function runSettingsCli(commandArguments, io = processIo()) {
|
|
331
331
|
const serverRequest = settingsRequestForServer(commandArguments, process.env);
|
|
332
332
|
if (!serverRequest) return runSettingsCommand(commandArguments, io);
|
|
333
|
-
const { askAgentApi } = await import("./agent-api-cli-
|
|
333
|
+
const { askAgentApi } = await import("./agent-api-cli-CW7gY-wV.js");
|
|
334
334
|
const reply = AgentSettingsReply.safeParse(await askAgentApi("settings", serverRequest).catch((error) => ({
|
|
335
335
|
ok: false,
|
|
336
336
|
error: errorMessage(error)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as AgentSettingsRequest } from "./session-B2Wieg0a.js";
|
|
2
2
|
import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
|
|
3
|
-
import { D as valueAtPath, E as settingsOf, O as FILE_ONLY_GROUPS, T as settingsGroupOf, Y as readEnvSecrets, _ as SETTINGS_INDEX, b as displayText, f as isSettingAvailable, k as SETTINGS_REGISTRY, v as cloneValue, x as hasScaledUnit } from "./config-store-
|
|
3
|
+
import { D as valueAtPath, E as settingsOf, O as FILE_ONLY_GROUPS, T as settingsGroupOf, Y as readEnvSecrets, _ as SETTINGS_INDEX, b as displayText, f as isSettingAvailable, k as SETTINGS_REGISTRY, v as cloneValue, x as hasScaledUnit } from "./config-store-DhOcBuLJ.js";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
//#region server/core/settings-readout-core.ts
|
|
6
6
|
var VALUE_COLUMN_WIDTH = 40;
|
|
@@ -2,7 +2,7 @@ import { r as errorMessage } from "./text-DoirglWV.js";
|
|
|
2
2
|
import { O as SIGN_URL_ENV, P as SshSignReply } from "./session-B2Wieg0a.js";
|
|
3
3
|
import { n as execFileAsync, o as spawn } from "./child-process-safe-D4hyVIXj.js";
|
|
4
4
|
import { a as isLoopbackHostname } from "./hook-relay-core-DA_bz2KA.js";
|
|
5
|
-
import { n as postToAgentIngress } from "./agent-api-cli-
|
|
5
|
+
import { n as postToAgentIngress } from "./agent-api-cli-CdMbgJmy.js";
|
|
6
6
|
import { l as parseSshPublicKey } from "./ssh-signing-core-CRhVVWNW.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Q as e,Y as t,n}from"./updates-view-core-CqTQW6Ft.js";import{o as r,x as i}from"./dom-helpers-ScgOMqDW.js";import{c as a,d as o,u as s}from"./control-ws-nj9Lq91R.js";var c=`http://www.w3.org/2000/svg`;function l(e,t){let n=document.createElementNS(c,e);for(let[e,r]of Object.entries(t))n.setAttribute(e,r);return n}function u(e,t){let n=document.createElementNS(c,`svg`);return n.setAttribute(`width`,String(e)),n.setAttribute(`height`,String(t)),n.setAttribute(`viewBox`,`0 0 ${e} ${t}`),n.setAttribute(`aria-hidden`,`true`),n}var d=`M4 4L12 12M12 4L4 12`,f=`M10 3L5 8L10 13`,p=`M3 8h0.01M8 8h0.01M13 8h0.01`,m=`M8 2.5v6M5 5.5h6M5 12.5h6`,h=`M4.5 12.5h7a3 3 0 0 0 0.4-5.97a4 4 0 0 0-7.7 0.57a2.7 2.7 0 0 0 0.3 5.4z`,g=`M8 1.8l5.2 2v4c0 3.2-2.2 5.4-5.2 6.4c-3-1-5.2-3.2-5.2-6.4v-4z`,_=`${g}M2 2l12 12`,v=`M9.2 1.5L3.5 9h4.3l-1 5.5L12.5 7H8.2z`,y=`M8.7 4.2L5.6 8.6h2.5l-.6 3.2l3.1-4.4H8.1z`,b=`M3 13V9M8 13V3M13 13V6.5`;function x(e,t=`2`){let n=u(16,16);return n.classList.add(`line-icon`),n.append(l(`path`,{d:e,fill:`none`,stroke:`currentColor`,"stroke-width":t,"stroke-linecap":`round`,"stroke-linejoin":`round`})),n}function S(e,t){let{class:n,...r}=t,i=u(16,16);return n!==void 0&&i.classList.add(n),i.append(l(e,r)),i}function C(e){let t=document.createElement(`span`);t.className=`status-icon`,t.dataset.icon=e;for(let n of i[e])t.append(S(n.tag,n.attributes));return t}function w(e,t){e.dataset.icon!==t&&(e.dataset.icon=t,e.replaceChildren(C(t)))}var T={busy:`text-text-muted`,ok:`text-state-done`,error:`text-state-failed`},E=15e3,D=`Something went wrong. Details are hidden in streamer mode.`;function O(e,t){return e!==`error`||t.startsWith(`Not connected to the server. Reconnecting.`)?t:document.documentElement.hasAttribute(`data-streamer`)?D:t}var k={busy:`working`,ok:`complete`,error:`failed`};function A(e){let t=e.querySelector(`:scope > .action-status-icon`),n=e.querySelector(`:scope > .action-status-text`);if(t&&n&&e.childNodes.length===2)return{iconElement:t,textElement:n};let i=r(`span`,`action-status-icon`);i.setAttribute(`aria-hidden`,`true`);let a=r(`span`,`action-status-text`);return e.replaceChildren(i,a),{iconElement:i,textElement:a}}function j(e){e.replaceChildren(),delete e.dataset.tone}function M(e,t,n){if(!n){j(e);return}if(!t){j(e),e.textContent=n;return}e.dataset.tone=t;let{iconElement:r,textElement:i}=A(e);w(r,k[t]),i.textContent=O(t,n)}function N(e=`action-status`){let t=r(`p`,e);return t.setAttribute(`role`,`status`),t.hidden=!0,{element:t,show:(n,r)=>{t.className=`${e} text-xs ${T[n]}`,M(t,n,r),t.hidden=!r},clear:()=>{t.hidden=!0,j(t)}}}function P(e,t){return s(e)?!0:(t.show(`error`,n),!1)}function F(e,t){let n=e instanceof Error?e.message:``;return n===`Request timed out`?`The server did not answer within ${Math.round(t/1e3)} s.`:n||`Not connected to the server. Reconnecting.`}async function I(e,t,n,{busyText:r,timeoutMs:i=E}={}){r&&n.show(`busy`,r);try{let r=await o(e,t,{timeoutMs:i});return n.clear(),r}catch(e){return n.show(`error`,F(e,i)),null}}var L=null,R=3e4,z=null;function B(){let e=document.getElementById(`header-status`),t=document.getElementById(`header-status-text`),n=document.getElementById(`header-status-age`),r=document.getElementById(`header-status-dismiss`);return!e||!t||!n||!r?null:(r.dataset.wired===void 0&&(r.dataset.wired=``,r.addEventListener(`click`,G)),{line:e,text:t,age:n})}function V(){let n=B();if(!n||!L)return;let r=e(Date.now()-L.raisedAt,{...t,justNowBelowSeconds:60});n.age.textContent!==r&&(n.age.textContent=r)}function H({source:e,sessionId:t,message:n,hidesInStreamerMode:i=!0}){a(e,n);let o=B();if(!o)return;let s=i?O(`error`,n):n,c=r(`strong`,`header-status-source`,e);o.text.replaceChildren(c,` ${s}`),o.text.title=`${e}: ${s}`,L={source:e,sessionId:t??null,raisedAt:Date.now()},V(),z??=window.setInterval(V,R),o.line.hidden=!1}function U(e,t){L?.source===e&&(t===void 0||L.sessionId===t)&&G()}function W(e){L?.sessionId===e&&G()}function G(){L=null,z!==null&&window.clearInterval(z),z=null;let e=B();e&&(e.line.hidden=!0,e.text.replaceChildren(),e.text.title=``,e.age.textContent=``)}export{l as C,u as S,y as _,M as a,b,I as c,f as d,v as f,p as g,h,N as i,P as l,d as m,U as n,H as o,m as p,W as r,F as s,E as t,w as u,g as v,x,_ as y};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$i as e,Qi as t,
|
|
1
|
+
import{$i as e,Qi as t,Xi as n,Zi as r,ea as i,na as a,ra as o,ta as s}from"./index-BZVLaRtw.js";var c=.3,l=null;function u(){return o(l)}function d(e){return a(e,l)}async function f(){try{let e=await fetch(n,{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(t[e]??t.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(i(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(r)}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-
|
|
1
|
+
import"./updates-view-core-CqTQW6Ft.js";import{n as e,o as t,r as n}from"./dom-helpers-ScgOMqDW.js";import{J as r,Y as i,q as a}from"./index-BZVLaRtw.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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{St as e}from"./updates-view-core-CqTQW6Ft.js";import{E as t}from"./dom-helpers-ScgOMqDW.js";var n=new Map(Object.entries({WAITING:`now`,COMPLETE:`later`,FAILED:`resting`,IDLE:`resting`,RUNNING:`resting`,STARTING:`resting`,INITIALIZING:`resting`,DORMANT:`resting`,DONE:`resting`}));function r(e){return(typeof e.state==`string`?n.get(e.state):void 0)??`resting`}function i(e,n){return[...e].map(([e,r])=>{let i=r.currentState||t.DORMANT;return{id:e,ui:r,name:n(r),isDormant:i===t.DORMANT,state:i,unseenOutcome:r.unseenOutcome??null,ownerId:r.ownerId??null}})}function a(e){let t=new Set(e.map(({id:e})=>e)),n=e=>e.ownerId&&t.has(e.ownerId)?e.ownerId:null,r=new Map;for(let t of e){let e=n(t);e&&r.set(e,[...r.get(e)??[],t])}return e.flatMap(e=>n(e)?[]:[e,...r.get(e.id)??[]])}function o(e){return a([...e].sort((e,t)=>Number(e.isDormant===!0)-Number(t.isDormant===!0)))}function s({ownerName:e,ownedCount:t}){return e===null?t===1?`Owns 1 session`:t>1?`Owns ${t} sessions`:null:`Owned by ${e}`}function c(e,t,n){if(!e.length)return null;let r=n<0?-1:1,i=t==null?-1:e.indexOf(t);return e[((i===-1?r===1?-1:0:i)+r+e.length)%e.length]}function l({state:n,unseenOutcome:r}){if(n===t.WAITING)return`waiting`;let i=e.safeParse(r);return i.success?i.data:null}function u(e={}){return l(e)!==null}var d=new Map([[`failed`,0],[`waiting`,1],[`finished`,2]]);function f(e){let t=l(e);return t===null?void 0:d.get(t)}function p(e){return e.filter(e=>f(e)!==void 0).sort((e,t)=>(f(e)??0)-(f(t)??0)).map(({id:e})=>e)}function m(e,t){let n=new Map(e.map(e=>[e.id,e]));return p(e).flatMap(e=>{let r=n.get(e),i=r?l(r):null;return!r||i===null||e===t?[]:[{id:e,kind:i,name:r.name??``}]})}var h={headTile:32,tile:26,tileGap:4,overflowSlot:40};function g(e,t){if(t===0)return 0;let{headTile:n,tile:r,tileGap:i,overflowSlot:a}=h,o=r+i;if(n+(t-1)*o<=e)return t;let s=e-a-i-n,c=Math.floor(s/o);return Math.max(1,Math.min(t-1,1+c))}var _={waiting:`waitingCount`,failed:`failedCount`,finished:`finishedCount`};function v(e,t,n){let r=l(t||{});r!==null&&(e[_[r]]+=n)}function y(e){let t={waitingCount:0,finishedCount:0,failedCount:0};for(let n of e||[])v(t,n,1);return t}function b(){return{counts:{waitingCount:0,finishedCount:0,failedCount:0},ownedCountByOwnerId:new Map}}function x(e,t,n){if(v(e.counts,t,n),t.ownerId===null)return;let r=(e.ownedCountByOwnerId.get(t.ownerId)??0)+n;r>0?e.ownedCountByOwnerId.set(t.ownerId,r):e.ownedCountByOwnerId.delete(t.ownerId)}function S(e,t){x(e,t,1)}function C(e,t){x(e,t,-1)}function w({waitingCount:e,finishedCount:t,failedCount:n}){return e+n+t}function T({waitingCount:e,failedCount:t}){return e+t}function E({waitingCount:e,finishedCount:t,failedCount:n}){let r=[];return n>0&&r.push(`${n} FAILED`),e===1&&r.push(`1 NEEDS YOU`),e>1&&r.push(`${e} NEED YOU`),t>0&&r.push(`${t} FINISHED`),r.length===0?`ALL CLEAR`:r.join(`, `)}var D=new Map([[`hand`,2]]),O=1;function k(e){return e?typeof e==`string`&&D.get(e)||O:0}function A(e){let t=!1,n=0;for(let r of e||[]){let e=k(r);e<=n||(t=typeof r!=`string`||r,n=e)}return t}var j=new Map,M=b();function N(e){return e.card?.dataset.session||e.nameEl?.textContent||``}function P(e){return typeof e==`string`?e:String(e)}function F(e){return typeof e==`string`?j.get(e):void 0}var I=document.getElementById(`sessions-container`);export{T as S,c as _,N as a,S as b,E as c,s as d,g as f,o as g,m as h,P as i,i as l,u as m,I as n,j as o,w as p,F as r,h as s,M as t,y as u,A as v,C as x,r as y};
|
|
Binary file
|
package/dist/client/assets/{celebration-player-DXfzgQWF.js → celebration-player-BbHjv2Dt.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,o as t,s as n}from"./dom-helpers-ScgOMqDW.js";import{da as r,ki as i}from"./index-l1NRofbr.js";import{playToneSequence as a}from"./alert-sound-B5bULCCQ.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-ScgOMqDW.js";import{Di as r,la as i}from"./index-BZVLaRtw.js";import{playToneSequence as a}from"./alert-sound-DN0V4O4m.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:i[Math.floor(e()*i.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(r())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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.community-question-body,.community-draft-body{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.community-question,.community-draft{flex-direction:column;gap:6px;padding:12px 16px;display:flex}.community-question-body{color:var(--text-dim)}.community-actions{flex-direction:column;gap:6px;padding:8px 16px;display:flex}.community-action-buttons{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.community-session-picker{max-width:24ch}.community-links{flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none;display:flex}.community-goal{margin:0}.community-badge[data-tone=ok]{color:var(--state-complete)}.community-badge[data-tone=warn]{color:var(--state-waiting)}.community-badge[data-tone=danger]{color:var(--state-failed)}.community-badge[data-tone=muted]{color:var(--text-dim)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as e,o as t,u as n,y as r}from"./dom-helpers-ScgOMqDW.js";import{o as i}from"./card-registry-Dbt9rUrq.js";import{i as a}from"./modal-KRdHzhQs.js";import{c as o,i as ee}from"./action-status-CaRwKdTD.js";import{Et as te,Ft as s,It as c,Mt as l,Nt as u,Ot as d,St as f,_t as p,gt as m,hn as h,ht as g,ii as _,it as v,kt as y,m as ne,mn as re,mt as ie,pt as b,ri as x,vt as S,yt as C}from"./index-BZVLaRtw.js";import{t as w}from"./team-review-panel-sRFRf4MX.js";import{t as ae}from"./pr-queue-columns-BBlYR9dj.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=!_(n),r.addEventListener(`click`,()=>x(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 ${ne(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(_);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&&v()?.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?w({title:`All caught up`,detail:A(L)}):t(`p`,`pr-empty`,j(g())))}function ye(e,t){S(d(e))&&t.querySelector(`.pr-queue-unseen`)?.remove()}function X(){if(!I)return;let e=y(L,O);h(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&&p(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,m(),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=ae({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=re({onJump:()=>{let e=y(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`,b(()=>!n(N)),C(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{ct as e,n as t,pt as n,st as r}from"./updates-view-core-
|
|
1
|
+
import{ct as e,n as t,pt as n,st as r}from"./updates-view-core-CqTQW6Ft.js";var i=32,a=/^\s*at .+:\d+:\d+\)?$|^[^@\s]*@.+:\d+:\d+$/;function o(e){let t=e.stack??``,n=String(e);return(t.startsWith(n)?t.slice(n.length):t).split(`
|
|
2
2
|
`).filter(e=>a.test(e)).join(`
|
|
3
3
|
`)}function s(e){return e==null?null:e instanceof Error?{name:(e.name||`Error`).slice(0,128),stack:o(e).slice(0,r)}:{name:`NonError`,stack:``}}function c(e,t,n){let r=new Set,i=!1;return(a,o)=>{r.has(a)||(r.size>=t?(i||n?.(),i=!0):e(o)&&r.add(a))}}function ee(e){let t=c(e,i);return e=>{let n=s(e);n&&t(`${n.name}\n${n.stack}`,{type:`client-error`,...n})}}function l(e){if(!(e instanceof Error))return`${typeof e}: ${String(e)}`;let t=o(e).split(`
|
|
4
4
|
`)[0]?.trim()??``;return[`${e.name||`Error`}: ${e.message}`,t].filter(Boolean).join(` `)}function u(e){return e.slice(0,5).map(e=>`${e.path.map(String).join(`.`)||`(root)`}: ${e.message}`).join(`; `)}function te(e){return typeof e!=`object`||!e||!(`type`in e)?`(untyped)`:String(e.type)}function d(e){let t=[];return{sendOrHold(n){return e(n)||t.push(n),!0},flushUnsent(){for(;t.length>0;){let n=t[0];if(!n||!e(n))return;t.shift()}}}}function ne(t){let n=d(t),r=c(n.sendOrHold,i,()=>n.sendOrHold({type:`client-log`,scope:`client-log`,text:`More than ${i} distinct log lines on this page; later ones were not sent.`}));return{report(t,n){let i={scope:t.slice(0,64),text:n.slice(0,e)};r(`${i.scope}\n${i.text}`,{type:`client-log`,...i})},flushUnsent:n.flushUnsent}}function re(e){let t=d(e),n={source:`dashboard`,message:`More than ${i} distinct header errors on this page; later ones were not sent.`},r=c(t.sendOrHold,i,()=>t.sendOrHold({type:`dashboard-telemetry`,event:`header_error_shown`,properties:n}));return{report(e,t){let n={source:e.slice(0,512),message:t.slice(0,512)};r(`${n.source}\n${n.message}`,{type:`dashboard-telemetry`,event:`header_error_shown`,properties:n})},flushUnsent:t.flushUnsent}}var ie=6e4,ae=18e5,f=20;function p({attempt:e=1,baseMs:t=ie,maxMs:n=ae,retryAfterMs:r=null,random:i=Math.random,jitter:a=`full`}={}){if(typeof r==`number`&&Number.isFinite(r)&&r>0)return Math.min(r,n);let o=Math.max(0,Math.min(e,f)-1),s=Math.min(n,t*2**o);return a===`none`?s:Math.round(a===`half`?s*(.5+.5*i()):i()*s)}var m=500,h=3e4;function g(e,t=Math.random){return p({attempt:(typeof e==`number`&&Number.isFinite(e)&&e>0?Math.floor(e):0)+1,baseMs:m,maxMs:h,random:t,jitter:`half`})}function oe(e){return e===`https:`?`wss:`:`ws:`}function _(e,t){return`${oe(e?.protocol)}//${e.host}${t}`}var se=1500,ce=15e3,v=3e3,y=2e3,b=[{kind:`reconnect-shown-terminals`},{kind:`replace-control`}];function x(e){return e.isReplacing?{state:e,actions:[]}:{state:{...e,isReplacing:!0},actions:b}}function S(e,t,n){if(e.isProbing||e.isReplacing)return{state:e,actions:[]};let r={kind:`probe-control`,deadlineMs:t,isAnnounced:n},i=n?[{kind:`hold-input`},r]:[r];return{state:{...e,isProbing:!0},actions:i}}function C(e){return e.isVisible?[{kind:`schedule-heartbeat`,inMs:ce}]:[]}function w(e,t){switch(t.kind){case`shown`:{let n={...e,isVisible:!0};return t.hiddenForMs>1e4?x(n):S(n,se,!0)}case`hidden`:return{state:{...e,isVisible:!1},actions:[{kind:`cancel-heartbeat`}]};case`frozen`:return{state:{...e,isFrozen:!0,isProbing:!1,isReplacing:!1},actions:[{kind:`cancel-heartbeat`},{kind:`close-sockets`}]};case`resumed`:return e.isFrozen?{state:{...e,isFrozen:!1,isReplacing:!0},actions:b}:x(e);case`network-changed`:return e.isVisible?S(e,v,!1):{state:e,actions:[]};case`heartbeat-due`:return e.isVisible?t.lateByMs>5e3?x(e):S(e,v,!1):{state:e,actions:[]};case`pong`:return e.isFrozen?{state:{...e,isProbing:!1},actions:[{kind:`release-input`}]}:{state:{...e,isProbing:!1},actions:[{kind:`release-input`},...C(e)]};case`pong-missed`:{if(e.isFrozen)return{state:{...e,isProbing:!1},actions:[{kind:`release-input`}]};let t=x({...e,isProbing:!1});return{state:t.state,actions:[...t.actions,{kind:`release-input`}]}}case`handshake-overdue`:return{state:{...e,isReplacing:!0},actions:[{kind:`replace-control`}]};case`control-opened`:return{state:{...e,isReplacing:!1},actions:C(e)};case`control-closed`:return{state:{...e,isReplacing:!1},actions:[{kind:`cancel-heartbeat`}]}}}var T=``,E=null;function D(){return T}function O(){return T?Promise.resolve(T):E||(E=fetch(`/control-token`,{credentials:`same-origin`,cache:`no-store`,signal:AbortSignal.timeout(y)}).then(e=>e.ok?e.json():null).then(e=>{let t=e?.token;return T=typeof t==`string`?t:``,T}).catch(()=>``).finally(()=>{E=null}),E)}function k(){T=``}function A(e){return T?`${e}${e.includes(`?`)?`&`:`?`}token=${encodeURIComponent(T)}`:e}var j=null,M=null,N=0,P=new Map,F=!1,I=0,L=0,R=null,z=null,B=null;function V(e){z=e}function H(e){B=e}function U(e){R=e}function W(e){return j?.readyState===WebSocket.OPEN&&(j.send(JSON.stringify(e)),!0)}var G=ne(W),K=re(W);function q(e,t){console.warn(`[${e}] ${t}`),G.report(e,t)}function le(e,t){G.report(`header error`,`${e}: ${t}`),K.report(e,t)}function J(e){return L+=1,`${e}-${L}`}function Y(e,n,{timeoutMs:r=5e3}={}){let i=J(e);return new Promise((a,o)=>{let s=setTimeout(()=>{P.delete(i),o(Error(`Request timed out`))},r);P.set(i,{resolve:a,reject:o,timer:s}),j?.readyState===WebSocket.OPEN?j.send(JSON.stringify({type:e,requestId:i,...n})):(clearTimeout(s),P.delete(i),o(Error(t)))})}function ue(e){if(typeof e!=`object`||!e||!(`requestId`in e))return;let t=e.requestId;if(typeof t!=`string`)return;let n=P.get(t);n&&(clearTimeout(n.timer),P.delete(t),n.reject(Error(`The server sent a reply this dashboard could not read. Reload the page to pick up the current version.`)))}function X(e){for(let t of P.values())clearTimeout(t.timer),t.reject(Error(e));P.clear()}function Z(){M!==null&&clearTimeout(M),M=null}function Q(){let e=j;j=null,Z(),X(t),z&&z(`disconnected`,`Reconnecting`),e?.close()}function de(){Q(),N=0,$()}function fe(e,t){return t&&z&&z(`connecting`,`Connecting`),Y(`ping`,{},{timeoutMs:e}).then(()=>(t&&z&&z(`verified`,`Connected`),!0),()=>!1)}function $(){if(Z(),!D()&&!F){F=!0,O().finally(()=>{F=!1,$()});return}if(F)return;let e=I>0?`?since=${I}`:``,r=_(location,A(`/control${e}`)),i=new WebSocket(r);j=i,B?.(`connecting`);let a=!1;i.addEventListener(`open`,()=>{j===i&&(a=!0,N=0,z&&z(`connected`,`Connected`),G.flushUnsent(),K.flushUnsent(),B?.(`opened`))}),i.addEventListener(`message`,e=>{if(j!==i)return;let t;try{t=JSON.parse(e.data)}catch{q(`control`,`dropped a server message that is not JSON`);return}let r=n.safeParse(t);if(!r.success){q(`control`,`dropped ${te(t)}: ${u(r.error.issues)}`),ue(t);return}let a=r.data;if(a.type===`snapshot`&&typeof a.seq!=`number`&&(I=0),typeof a.seq==`number`){if(a.seq<=I)return;I=a.seq}let o=typeof a.requestId==`string`?a.requestId:``,s=o?P.get(o):void 0;s?(clearTimeout(s.timer),P.delete(o),s.resolve(a)):R&&R(a)}),i.addEventListener(`close`,()=>{if(j!==i)return;j=null,X(t),a||k(),z&&z(`disconnected`,`Reconnecting`),B?.(`closed`);let e=g(N);N+=1,M=setTimeout($,e)})}export{u as C,l as S,y as _,H as a,g as b,le as c,Y as d,V as f,A as g,D as h,U as i,q as l,O as m,$ as n,fe as o,k as p,J as r,de as s,Q as t,W as u,w as v,ee as x,_ as y};
|
|
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-
|
|
1
|
+
import{G as e,U as t,W as n,dt as r,ft as i,x as a}from"./updates-view-core-CqTQW6Ft.js";import{h as o,m as s,o as c}from"./dom-helpers-ScgOMqDW.js";import{d as l}from"./control-ws-nj9Lq91R.js";import{n as u,r as d,t as f}from"./modal-KRdHzhQs.js";import{i as p,s as m,t as h}from"./action-status-CaRwKdTD.js";import{n as g}from"./session-tick-Bpw_34Bq.js";import{Fr as _,Ir as v,Lr as y,Nr as b,Pr as x,Rr as S,di as C,fi as w,m as T,ui as E,wr as D,zn as ee}from"./index-BZVLaRtw.js";import{t as te}from"./repo-roots-adder-pSq0rQgv.js";import{t as ne}from"./sandboxed-frame-DT7MIpqw.js";var re=`<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>
|
|
@@ -82,4 +82,4 @@ import{G as e,U as t,W as n,dt as r,ft as i,x as a}from"./updates-view-core-BMRZ
|
|
|
82
82
|
<button type="button" class="btn-dialog btn-dialog-confirm" id="agent-connect-submit" hidden>Submit code</button>
|
|
83
83
|
<button type="button" class="btn-dialog btn-dialog-confirm" id="agent-connect-start">Start sign-in</button>
|
|
84
84
|
</div>
|
|
85
|
-
`;function k(e,{value:t,disabled:n=!1,selected:r=!1}={}){let i=c(`option`,null,e);return t!=null&&(i.value=t),n&&(i.disabled=!0),r&&(i.selected=!0),i}function ie(e){return typeof e!=`object`||!e?!1:`saneYoloAvailable`in e&&e.saneYoloAvailable===!0}function ae(e){if(typeof e!=`object`||!e||!(`coderEnvironments`in e))return[];let t=r.safeParse(e.coderEnvironments);return t.success&&t.data?t.data:[]}function oe(e){let t=Object.entries(e.parameters).map(([e,t])=>`${e}=${t}`).join(`, `);return[`Template ${e.template}.`,t?`Parameters: ${t}.`:``,e.hourlyCostUsd===null?``:`Costs $${e.hourlyCostUsd.toFixed(2)} an hour.`,`Stops after ${e.idleStopMinutes} idle minutes.`].filter(Boolean).join(` `)}var A=Object.freeze({"claude-code":`Claude Code`,codex:`Codex`});function se(e){let t=i.safeParse(e);return t.success?t.data:null}function j(e,t){let n=A[t];return e?e.state===`signed-in`&&e.source===`host`?`${n} uses the login already on this machine.`:e.state===`signed-in`?`${n} uses the login Glimmervoid connected.`:e.state===`connecting`?e.reason??`${n} sign-in is waiting for you.`:e.state===`failed`?e.reason??`${n} sign-in failed.`:`${n} has no login on this machine, so remote ${n} sessions cannot sign in.`:`Checking whether ${n} is signed in.`}function M(){l(`get-agent-logins`,{},{timeoutMs:D}).then(e=>{e.type===`agent-logins`&&E(e.logins)}).catch(()=>{})}function ce(e){let t=A[e],{dialog:n,close:r}=d();n.innerHTML=O,f(n,`agent-connect-title`),s(n,`#agent-connect-title`).textContent=`Connect ${t}`,s(n,`#agent-connect-intro`).textContent=`Glimmervoid signs ${t} in for its own remote sessions and keeps that login in its own folder, apart from any login you already have on this machine. The sign-in runs here and is never recorded.`;let i=s(n,`#agent-connect-state`),a=s(n,`#agent-connect-steps`),c=o(n,`#agent-connect-link`,`a`),u=s(n,`#agent-connect-code-row`),p=s(n,`#agent-connect-code`),m=s(n,`#agent-connect-paste-label`),h=o(n,`#agent-connect-paste`,`input`),g=s(n,`#agent-connect-error`),_=o(n,`#agent-connect-close`,`button`),v=o(n,`#agent-connect-stop`,`button`),y=o(n,`#agent-connect-submit`,`button`),S=o(n,`#agent-connect-start`,`button`);function C(){if(!n.isConnected){ee();return}let t=x(e),r=t?.state===`connecting`;i.textContent=j(t,e),S.hidden=r,v.hidden=!r;let o=r?t.verificationUrl:null;a.hidden=o===null,c.href=o??``,c.textContent=o??``,u.hidden=!t?.userCode,p.textContent=t?.userCode??``;let s=r&&t.needsPastedCode;m.hidden=!s,y.hidden=!s}async function w(t,n,r){r.disabled=!0,g.textContent=``;try{let r=await l(t,{agent:e,...n},{timeoutMs:D});if(r.type!==`agent-logins`)return;E(r.logins),r.error&&(g.textContent=r.error)}catch(e){g.textContent=`The server did not answer (${b(e,D)}).`}finally{r.disabled=!1}}S.addEventListener(`click`,()=>{w(`agent-connect`,{action:`start`},S)}),v.addEventListener(`click`,()=>{w(`agent-connect`,{action:`cancel`},v)}),y.addEventListener(`click`,()=>{let e=h.value;h.value=``,w(`agent-connect-code`,{code:e},y)}),h.addEventListener(`keydown`,e=>{e.key===`Enter`&&(e.preventDefault(),y.click())}),_.addEventListener(`click`,r);let ee=T(C);C(),M()}function le(){let{dialog:e,close:t,actions:n,btnCancel:r}=u({title:`Set up a remote host`}),a=c(`p`,`dialog-hint`,`The setup session runs outside the guardrails so it can use your ssh keys. It runs commands on the remote host over ssh and asks before each one. Glimmervoid deletes its working folder when the session ends.`),o=c(`p`,`dialog-label`,`Agent`),s=c(`div`,`hooks-type-row`);s.setAttribute(`role`,`radiogroup`);let d=_(),f=c(`button`,`btn-dialog btn-dialog-confirm`,`Start setup`);f.type=`button`,r.type=`button`,r.addEventListener(`click`,t),n.append(f),e.append(a,o,s,d.element,n);let p=null,m=!1;function h(){if(!e.isConnected){g();return}let t=i.options.filter(e=>x(e)?.state===`signed-in`);(p===null||!t.includes(p))&&(p=t[0]??null),s.replaceChildren(...t.map(e=>{let t=c(`label`,`settings-view-toggle hooks-choice`),n=c(`input`,`settings-view-checkbox`);return n.type=`radio`,n.name=`remote-setup-agent`,n.checked=e===p,n.addEventListener(`change`,()=>{p=e}),t.append(n,c(`span`,null,A[e])),t})),t.length===0&&s.append(c(`span`,``,`Sign in to Claude Code or Codex on this machine first.`)),f.disabled=m||p===null}f.addEventListener(`click`,async()=>{if(p!==null){m=!0,f.disabled=!0,d.show(`busy`,`Starting the setup session.`);try{let e=await l(`start-remote-setup`,{agent:p},{timeoutMs:D});if(e.type===`start-remote-setup-result`&&e.ok){t();return}d.show(`error`,e.type===`start-remote-setup-result`&&e.error?e.error:`The setup session did not start.`)}catch(e){d.show(`error`,`The server did not answer (${b(e,D)}).`)}finally{m=!1,h()}}});let g=T(h);h(),M()}function ue({preferredAgentId:e=g}={}){let{dialog:t,close:n}=d();t.innerHTML=re,f(t,`add-session-title`);let r=o(t,`#add-session-picker`,`select`),i=s(t,`#add-session-picker-label`),a=s(t,`#add-session-workspace-list`),u=o(t,`#add-session-single-mode`,`button`),p=o(t,`#add-session-workspace-mode`,`button`),w=s(t,`#add-session-agent-label`),E=o(t,`#add-session-agent`,`select`),ne=s(t,`#add-session-environment-label`),O=o(t,`#add-session-environment`,`select`),A=s(t,`#add-session-environment-hint`),le=s(t,`#add-session-agent-login`),ue=s(t,`#add-session-agent-login-text`),de=o(t,`#add-session-agent-connect`,`button`),N=s(t,`#add-session-repo-roots`),fe=s(t,`#add-session-repo-roots-title`),P=o(t,`#add-session-advanced-toggle`,`button`),F=s(t,`#add-session-advanced`),I=o(t,`#add-session-name`,`input`),L=o(t,`#add-session-path`,`input`),pe=s(t,`#add-session-path-label`),R=o(t,`#add-session-skip-perms`,`input`),z=o(t,`#add-session-unguarded`,`input`),me=o(t,`#add-session-sane-yolo-help`,`a`),he=s(t,`#add-session-sane-yolo-unavailable`),ge=o(t,`#add-session-safety-toggle`,`button`),_e=s(t,`#add-session-safety`),ve=s(t,`#add-session-safety-status`),B=s(t,`#add-session-error`),ye=s(t,`#add-session-shell-hint`),be=o(t,`#add-session-cancel`,`button`),V=o(t,`#add-session-confirm`,`button`),H=!1,xe=[],U=null;function W(e){H=e,u.setAttribute(`aria-pressed`,String(!e)),p.setAttribute(`aria-pressed`,String(e)),i.hidden=e,a.hidden=!e,P.hidden=e,P.setAttribute(`aria-expanded`,String(e)),F.hidden=!e,pe.hidden=e,e&&requestAnimationFrame(()=>I.focus())}u.addEventListener(`click`,()=>W(!1)),p.addEventListener(`click`,()=>W(!0)),P.setAttribute(`aria-expanded`,`false`),P.addEventListener(`click`,()=>{let e=F.hidden;F.hidden=!e,P.setAttribute(`aria-expanded`,String(e)),e&&requestAnimationFrame(()=>I.focus())}),me.addEventListener(`click`,()=>n()),ge.addEventListener(`click`,()=>{let e=_e.hidden;_e.hidden=!e,ge.setAttribute(`aria-expanded`,String(e))}),z.addEventListener(`change`,()=>{ve.textContent=z.checked?`guardrails off`:`guardrails on`});let Se=te({onAdded:q});N.append(Se.element);let G=_(`dialog-hint`),K=c(`button`,`btn-dialog btn-dialog-cancel`,`Scan again`);K.type=`button`,K.hidden=!0,K.addEventListener(`click`,()=>{q()});let Ce=c(`div`,`flex items-center gap-2`);Ce.append(G.element,K),N.before(Ce);function we(e){r.textContent=``,r.appendChild(k(`Scan failed`,{disabled:!0,selected:!0})),a.textContent=``,G.show(`error`,`The project scan failed: ${e}`),K.hidden=!1,K.disabled=!1}function Te(e){let t=e.type===`repo-roots-scanned`;fe.textContent=t&&e.directories.length>0?`No projects in your repository roots yet`:`No repository roots yet`,Se.setSuggestions(t?e.suggestions??[]:[]),N.hidden=!1}function q(){return K.disabled=!0,G.show(`busy`,`Scanning your repository roots`),l(`scan-repo-roots`,{includeSuggestions:!0},{timeoutMs:D}).then(e=>{if(e.type===`repo-roots-scanned`&&e.error){we(e.error);return}G.clear(),K.hidden=!0,r.textContent=``,a.textContent=``,N.hidden=!0,r.appendChild(k(`-- Select a project --`,{value:``,disabled:!0,selected:!0}));let t=!1,n=e.type===`repo-roots-scanned`?e.directories:[];for(let e of n){if(e.projects.length===0)continue;let n=c(`optgroup`);n.label=e.root;for(let r of e.projects){let e=ee(r.name),i=e>0?`${r.name} (${e} open)`:r.name;n.appendChild(k(i,{value:JSON.stringify({name:r.name,path:r.path})})),a.appendChild(m(r.name,r.path)),t=!0}r.appendChild(n)}t||(r.textContent=``,r.appendChild(k(`No projects yet`,{disabled:!0,selected:!0})),a.textContent=`No projects yet.`,Te(e))}).catch(e=>{we(b(e,D))})}q(),r.addEventListener(`change`,()=>{try{let e=JSON.parse(r.value);I.value=y(e.name),L.value=e.path}catch{}});let J=g,Y=!1;function X(e){let t=c(`p`,`dialog-hint dialog-hint-warning`,e);return t.setAttribute(`role`,`status`),B.before(t),t}function Ee(e){Y=!0,V.disabled=!0,X(e).id=`add-session-agent-guidance`}l(`list-agents`,{},{timeoutMs:D}).then(t=>{let n=v(t);n.canSpawn||Ee(n.guidance);let r=C(t.type===`agents-listed`?t.agents:[],{defaultId:e});if(J=r.selectedId,De(),r.show){E.textContent=``;for(let e of r.options)E.appendChild(k(e.label,{value:e.id,selected:e.id===r.selectedId}));w.hidden=!1}}).catch(e=>{X(`Could not load the agent list (${b(e,D)}), so the session uses the default agent.`)}),E.addEventListener(`change`,()=>{J=E.value,De(),Z()});function De(){let e=J===h;e&&H&&W(!1),e&&U&&(O.value=``,O.dispatchEvent(new Event(`change`))),t.classList.toggle(`add-session-shell`,e),ye.hidden=!e,F.hidden=!e&&P.getAttribute(`aria-expanded`)!==`true`,e&&(I.value.trim()||(I.value=h),requestAnimationFrame(()=>I.focus()))}function Z(){if(!t.isConnected){Oe();return}let e=se(J),n=e?x(e):null;le.hidden=U===null||e===null||n===null||n.state===`signed-in`,ue.textContent=e?j(n,e):``}de.addEventListener(`click`,()=>{let e=se(J);e&&ce(e)});let Oe=T(Z);M();let ke=!1,Ae=!1;R.addEventListener(`change`,()=>{ke=!0});function Q(){let e=Ae&&U===null;he.hidden=e,!ke&&(R.checked=e)}l(`get-settings`,{},{timeoutMs:D}).then(e=>{e.type===`settings-error`?(X(`Could not load your settings (${e.message}). Check Sane YOLO mode yourself.`),Q()):(je(ae(e.settings)),Ae=ie(e.settings),Q())}).catch(e=>{X(`Could not load your settings (${b(e,D)}). Check Sane YOLO mode yourself.`),Q()});function je(e){if(e.length!==0){xe=e,O.textContent=``,O.appendChild(k(`Local`,{value:``,selected:!0}));for(let t of e)O.appendChild(k(t.name,{value:t.name}));ne.hidden=!1}}O.addEventListener(`change`,()=>{U=xe.find(e=>e.name===O.value)??null,p.hidden=U!==null,A.hidden=U===null,A.textContent=U?oe(U):``,Z(),Q(),U!==null&&H&&W(!1)}),I.addEventListener(`input`,()=>{r.selectedIndex=0}),L.addEventListener(`input`,()=>{r.selectedIndex=0});function Me(){if(Y)return;let e=I.value.trim(),t=L.value.trim();if(J===`shell`){if(!e){B.textContent=`Enter a name.`;return}$({name:y(e),path:t,agent:h});return}if(H){let t=[...a.querySelectorAll(`input:checked`)].map(e=>e.value);if(!e||t.length<2){B.textContent=`Enter a name and select at least two repositories.`;return}let n={name:y(e),path:t[0],repos:t,dangerouslySkipPermissions:R.checked,saneYolo:R.checked,unguarded:z.checked};J&&J!==`claude-code`&&(n.agent=J),$(n);return}if(!e||!t){B.textContent=`Both fields are required. Select a project or use Advanced options.`;return}let n={name:y(e),path:t,dangerouslySkipPermissions:R.checked,saneYolo:R.checked,unguarded:z.checked};J&&J!==`claude-code`&&(n.agent=J),U&&(n.environment=U.name),$(n)}function $(e){V.disabled=!0,B.textContent=``,l(`add-session`,e,{timeoutMs:D}).then(e=>{e.type===`add-session-result`&&e.ok?n():B.textContent=S(e)}).catch(e=>{B.textContent=`The session was not added: ${b(e,D)}`}).finally(()=>{V.disabled=Y})}be.addEventListener(`click`,n),V.addEventListener(`click`,Me),I.addEventListener(`keydown`,e=>{e.key===`Enter`&&(H&&Me(),H||L.focus())}),L.addEventListener(`keydown`,e=>{e.key===`Enter`&&Me()}),requestAnimationFrame(()=>r.focus())}function de({issueId:e,issueTitle:t,format:n,content:r,message:i,error:a}){let{dialog:o,close:s,actions:l,btnCancel:d}=u({title:`Investigation report`,dialogClass:`dialog dialog-report`,cancelLabel:`Close`}),f=c(`div`,`dialog-report-meta`,t||e||``),p=null;n===`html`&&!a&&!i&&(p=ne({source:{kind:`srcdoc`,html:r||``},className:`dialog-report-frame`,title:`Investigation report`,allowsScripts:!1})),p||=c(`pre`,a?`dialog-report-body dialog-report-error`:`dialog-report-body`,a||i||r||``),o.append(f,p,l),d.addEventListener(`click`,s),requestAnimationFrame(()=>d.focus())}function N({issueTitle:r,projectLabel:i,onOpenReport:o}){let{dialog:s,close:l,actions:d,btnCancel:f}=u({title:`Investigation`,dialogClass:`dialog dialog-report`,cancelLabel:`Close`}),m=c(`div`,`dialog-report-meta`,i?`${i}: ${r}`:r),h=c(`p`,`dialog-trail-status`),g=c(`p`,`dialog-trail-summary`),_=c(`ol`,`dialog-trail-steps`),v=c(`p`,`dialog-trail-empty`,`No tool calls yet; the session is reading the issue.`),y=c(`button`,`btn-dialog btn-dialog-cancel`,`Open report`);y.type=`button`,y.hidden=!0,y.addEventListener(`click`,()=>{l(),o()}),d.prepend(y),s.append(m,h,g,_,v,d),f.addEventListener(`click`,l),requestAnimationFrame(()=>f.focus());let b=null,x=``;function S(n){let r=_.scrollHeight-_.scrollTop-_.clientHeight<24,i=t(n);if(x!==i){_.textContent=``;for(let t of e(n.steps)){let e=c(`li`,`dialog-trail-step dialog-trail-${t.kind}`),r=t.kind===`note`?t.text:`${t.stepCount} ${t.stepCount===1?`step`:`steps`}`;e.append(c(`span`,`dialog-trail-at`,a(n.startedAt,t.at)),c(`span`,`dialog-trail-detail`,r)),_.append(e)}x=i}v.hidden=n.steps.length>0||!n.inFlight,_.hidden=n.steps.length===0,r&&(_.scrollTop=_.scrollHeight)}function C(e){h.textContent=n(e,w(e.startedAt))}function T(){b&&(C(b),h.dataset.tone=b.inFlight?`live`:`done`,g.textContent=b.summaryLine,g.hidden=!b.summaryLine,y.hidden=b.inFlight||!b.verdict,S(b))}let E=p(()=>{s.isConnected?b?.inFlight&&C(b):E()});return{update(e){b=e,T()},isOpen:()=>s.isConnected,close:()=>{E(),l()}}}export{x as agentLoginOf,j as agentLoginSummary,ue as createAddSessionDialog,N as createInvestigationDialog,de as createRadarReportDialog,T as onAgentLoginsChanged,ce as openAgentConnectDialog,le as openRemoteSetupDialog};
|
|
85
|
+
`;function k(e,{value:t,disabled:n=!1,selected:r=!1}={}){let i=c(`option`,null,e);return t!=null&&(i.value=t),n&&(i.disabled=!0),r&&(i.selected=!0),i}function ie(e){return typeof e!=`object`||!e?!1:`saneYoloAvailable`in e&&e.saneYoloAvailable===!0}function ae(e){if(typeof e!=`object`||!e||!(`coderEnvironments`in e))return[];let t=r.safeParse(e.coderEnvironments);return t.success&&t.data?t.data:[]}function oe(e){let t=Object.entries(e.parameters).map(([e,t])=>`${e}=${t}`).join(`, `);return[`Template ${e.template}.`,t?`Parameters: ${t}.`:``,e.hourlyCostUsd===null?``:`Costs $${e.hourlyCostUsd.toFixed(2)} an hour.`,`Stops after ${e.idleStopMinutes} idle minutes.`].filter(Boolean).join(` `)}var A=Object.freeze({"claude-code":`Claude Code`,codex:`Codex`});function se(e){let t=i.safeParse(e);return t.success?t.data:null}function j(e,t){let n=A[t];return e?e.state===`signed-in`&&e.source===`host`?`${n} uses the login already on this machine.`:e.state===`signed-in`?`${n} uses the login Glimmervoid connected.`:e.state===`connecting`?e.reason??`${n} sign-in is waiting for you.`:e.state===`failed`?e.reason??`${n} sign-in failed.`:`${n} has no login on this machine, so remote ${n} sessions cannot sign in.`:`Checking whether ${n} is signed in.`}function M(){l(`get-agent-logins`,{},{timeoutMs:h}).then(e=>{e.type===`agent-logins`&&C(e.logins)}).catch(()=>{})}function ce(e){let t=A[e],{dialog:n,close:r}=d();n.innerHTML=O,f(n,`agent-connect-title`),s(n,`#agent-connect-title`).textContent=`Connect ${t}`,s(n,`#agent-connect-intro`).textContent=`Glimmervoid signs ${t} in for its own remote sessions and keeps that login in its own folder, apart from any login you already have on this machine. The sign-in runs here and is never recorded.`;let i=s(n,`#agent-connect-state`),a=s(n,`#agent-connect-steps`),c=o(n,`#agent-connect-link`,`a`),u=s(n,`#agent-connect-code-row`),p=s(n,`#agent-connect-code`),g=s(n,`#agent-connect-paste-label`),_=o(n,`#agent-connect-paste`,`input`),v=s(n,`#agent-connect-error`),y=o(n,`#agent-connect-close`,`button`),b=o(n,`#agent-connect-stop`,`button`),x=o(n,`#agent-connect-submit`,`button`),S=o(n,`#agent-connect-start`,`button`);function T(){if(!n.isConnected){ee();return}let t=E(e),r=t?.state===`connecting`;i.textContent=j(t,e),S.hidden=r,b.hidden=!r;let o=r?t.verificationUrl:null;a.hidden=o===null,c.href=o??``,c.textContent=o??``,u.hidden=!t?.userCode,p.textContent=t?.userCode??``;let s=r&&t.needsPastedCode;g.hidden=!s,x.hidden=!s}async function D(t,n,r){r.disabled=!0,v.textContent=``;try{let r=await l(t,{agent:e,...n},{timeoutMs:h});if(r.type!==`agent-logins`)return;C(r.logins),r.error&&(v.textContent=r.error)}catch(e){v.textContent=`The server did not answer (${m(e,h)}).`}finally{r.disabled=!1}}S.addEventListener(`click`,()=>{D(`agent-connect`,{action:`start`},S)}),b.addEventListener(`click`,()=>{D(`agent-connect`,{action:`cancel`},b)}),x.addEventListener(`click`,()=>{let e=_.value;_.value=``,D(`agent-connect-code`,{code:e},x)}),_.addEventListener(`keydown`,e=>{e.key===`Enter`&&(e.preventDefault(),x.click())}),y.addEventListener(`click`,r);let ee=w(T);T(),M()}function le(){let{dialog:e,close:t,actions:n,btnCancel:r}=u({title:`Set up a remote host`}),a=c(`p`,`dialog-hint`,`The setup session runs outside the guardrails so it can use your ssh keys. It runs commands on the remote host over ssh and asks before each one. Glimmervoid deletes its working folder when the session ends.`),o=c(`p`,`dialog-label`,`Agent`),s=c(`div`,`hooks-type-row`);s.setAttribute(`role`,`radiogroup`);let d=p(),f=c(`button`,`btn-dialog btn-dialog-confirm`,`Start setup`);f.type=`button`,r.type=`button`,r.addEventListener(`click`,t),n.append(f),e.append(a,o,s,d.element,n);let g=null,_=!1;function v(){if(!e.isConnected){y();return}let t=i.options.filter(e=>E(e)?.state===`signed-in`);(g===null||!t.includes(g))&&(g=t[0]??null),s.replaceChildren(...t.map(e=>{let t=c(`label`,`settings-view-toggle hooks-choice`),n=c(`input`,`settings-view-checkbox`);return n.type=`radio`,n.name=`remote-setup-agent`,n.checked=e===g,n.addEventListener(`change`,()=>{g=e}),t.append(n,c(`span`,null,A[e])),t})),t.length===0&&s.append(c(`span`,``,`Sign in to Claude Code or Codex on this machine first.`)),f.disabled=_||g===null}f.addEventListener(`click`,async()=>{if(g!==null){_=!0,f.disabled=!0,d.show(`busy`,`Starting the setup session.`);try{let e=await l(`start-remote-setup`,{agent:g},{timeoutMs:h});if(e.type===`start-remote-setup-result`&&e.ok){t();return}d.show(`error`,e.type===`start-remote-setup-result`&&e.error?e.error:`The setup session did not start.`)}catch(e){d.show(`error`,`The server did not answer (${m(e,h)}).`)}finally{_=!1,v()}}});let y=w(v);v(),M()}function ue({preferredAgentId:e=_}={}){let{dialog:t,close:n}=d();t.innerHTML=re,f(t,`add-session-title`);let r=o(t,`#add-session-picker`,`select`),i=s(t,`#add-session-picker-label`),a=s(t,`#add-session-workspace-list`),u=o(t,`#add-session-single-mode`,`button`),g=o(t,`#add-session-workspace-mode`,`button`),C=s(t,`#add-session-agent-label`),T=o(t,`#add-session-agent`,`select`),ne=s(t,`#add-session-environment-label`),O=o(t,`#add-session-environment`,`select`),A=s(t,`#add-session-environment-hint`),le=s(t,`#add-session-agent-login`),ue=s(t,`#add-session-agent-login-text`),de=o(t,`#add-session-agent-connect`,`button`),N=s(t,`#add-session-repo-roots`),fe=s(t,`#add-session-repo-roots-title`),P=o(t,`#add-session-advanced-toggle`,`button`),F=s(t,`#add-session-advanced`),I=o(t,`#add-session-name`,`input`),L=o(t,`#add-session-path`,`input`),pe=s(t,`#add-session-path-label`),R=o(t,`#add-session-skip-perms`,`input`),z=o(t,`#add-session-unguarded`,`input`),me=o(t,`#add-session-sane-yolo-help`,`a`),he=s(t,`#add-session-sane-yolo-unavailable`),ge=o(t,`#add-session-safety-toggle`,`button`),_e=s(t,`#add-session-safety`),ve=s(t,`#add-session-safety-status`),B=s(t,`#add-session-error`),ye=s(t,`#add-session-shell-hint`),be=o(t,`#add-session-cancel`,`button`),V=o(t,`#add-session-confirm`,`button`),H=!1,xe=[],U=null;function W(e){H=e,u.setAttribute(`aria-pressed`,String(!e)),g.setAttribute(`aria-pressed`,String(e)),i.hidden=e,a.hidden=!e,P.hidden=e,P.setAttribute(`aria-expanded`,String(e)),F.hidden=!e,pe.hidden=e,e&&requestAnimationFrame(()=>I.focus())}u.addEventListener(`click`,()=>W(!1)),g.addEventListener(`click`,()=>W(!0)),P.setAttribute(`aria-expanded`,`false`),P.addEventListener(`click`,()=>{let e=F.hidden;F.hidden=!e,P.setAttribute(`aria-expanded`,String(e)),e&&requestAnimationFrame(()=>I.focus())}),me.addEventListener(`click`,()=>n()),ge.addEventListener(`click`,()=>{let e=_e.hidden;_e.hidden=!e,ge.setAttribute(`aria-expanded`,String(e))}),z.addEventListener(`change`,()=>{ve.textContent=z.checked?`guardrails off`:`guardrails on`});let Se=te({onAdded:q});N.append(Se.element);let G=p(`dialog-hint`),K=c(`button`,`btn-dialog btn-dialog-cancel`,`Scan again`);K.type=`button`,K.hidden=!0,K.addEventListener(`click`,()=>{q()});let Ce=c(`div`,`flex items-center gap-2`);Ce.append(G.element,K),N.before(Ce);function we(e){r.textContent=``,r.appendChild(k(`Scan failed`,{disabled:!0,selected:!0})),a.textContent=``,G.show(`error`,`The project scan failed: ${e}`),K.hidden=!1,K.disabled=!1}function Te(e){let t=e.type===`repo-roots-scanned`;fe.textContent=t&&e.directories.length>0?`No projects in your repository roots yet`:`No repository roots yet`,Se.setSuggestions(t?e.suggestions??[]:[]),N.hidden=!1}function q(){return K.disabled=!0,G.show(`busy`,`Scanning your repository roots`),l(`scan-repo-roots`,{includeSuggestions:!0},{timeoutMs:h}).then(e=>{if(e.type===`repo-roots-scanned`&&e.error){we(e.error);return}G.clear(),K.hidden=!0,r.textContent=``,a.textContent=``,N.hidden=!0,r.appendChild(k(`-- Select a project --`,{value:``,disabled:!0,selected:!0}));let t=!1,n=e.type===`repo-roots-scanned`?e.directories:[];for(let e of n){if(e.projects.length===0)continue;let n=c(`optgroup`);n.label=e.root;for(let r of e.projects){let e=b(r.name),i=e>0?`${r.name} (${e} open)`:r.name;n.appendChild(k(i,{value:JSON.stringify({name:r.name,path:r.path})})),a.appendChild(ee(r.name,r.path)),t=!0}r.appendChild(n)}t||(r.textContent=``,r.appendChild(k(`No projects yet`,{disabled:!0,selected:!0})),a.textContent=`No projects yet.`,Te(e))}).catch(e=>{we(m(e,h))})}q(),r.addEventListener(`change`,()=>{try{let e=JSON.parse(r.value);I.value=x(e.name),L.value=e.path}catch{}});let J=_,Y=!1;function X(e){let t=c(`p`,`dialog-hint dialog-hint-warning`,e);return t.setAttribute(`role`,`status`),B.before(t),t}function Ee(e){Y=!0,V.disabled=!0,X(e).id=`add-session-agent-guidance`}l(`list-agents`,{},{timeoutMs:h}).then(t=>{let n=y(t);n.canSpawn||Ee(n.guidance);let r=S(t.type===`agents-listed`?t.agents:[],{defaultId:e});if(J=r.selectedId,De(),r.show){T.textContent=``;for(let e of r.options)T.appendChild(k(e.label,{value:e.id,selected:e.id===r.selectedId}));C.hidden=!1}}).catch(e=>{X(`Could not load the agent list (${m(e,h)}), so the session uses the default agent.`)}),T.addEventListener(`change`,()=>{J=T.value,De(),Z()});function De(){let e=J===v;e&&H&&W(!1),e&&U&&(O.value=``,O.dispatchEvent(new Event(`change`))),t.classList.toggle(`add-session-shell`,e),ye.hidden=!e,F.hidden=!e&&P.getAttribute(`aria-expanded`)!==`true`,e&&(I.value.trim()||(I.value=v),requestAnimationFrame(()=>I.focus()))}function Z(){if(!t.isConnected){Oe();return}let e=se(J),n=e?E(e):null;le.hidden=U===null||e===null||n===null||n.state===`signed-in`,ue.textContent=e?j(n,e):``}de.addEventListener(`click`,()=>{let e=se(J);e&&ce(e)});let Oe=w(Z);M();let ke=!1,Ae=!1;R.addEventListener(`change`,()=>{ke=!0});function Q(){let e=Ae&&U===null;he.hidden=e,!ke&&(R.checked=e)}l(`get-settings`,{},{timeoutMs:h}).then(e=>{e.type===`settings-error`?(X(`Could not load your settings (${e.message}). Check Sane YOLO mode yourself.`),Q()):(je(ae(e.settings)),Ae=ie(e.settings),Q())}).catch(e=>{X(`Could not load your settings (${m(e,h)}). Check Sane YOLO mode yourself.`),Q()});function je(e){if(e.length!==0){xe=e,O.textContent=``,O.appendChild(k(`Local`,{value:``,selected:!0}));for(let t of e)O.appendChild(k(t.name,{value:t.name}));ne.hidden=!1}}O.addEventListener(`change`,()=>{U=xe.find(e=>e.name===O.value)??null,g.hidden=U!==null,A.hidden=U===null,A.textContent=U?oe(U):``,Z(),Q(),U!==null&&H&&W(!1)}),I.addEventListener(`input`,()=>{r.selectedIndex=0}),L.addEventListener(`input`,()=>{r.selectedIndex=0});function Me(){if(Y)return;let e=I.value.trim(),t=L.value.trim();if(J===`shell`){if(!e){B.textContent=`Enter a name.`;return}$({name:x(e),path:t,agent:v});return}if(H){let t=[...a.querySelectorAll(`input:checked`)].map(e=>e.value);if(!e||t.length<2){B.textContent=`Enter a name and select at least two repositories.`;return}let n={name:x(e),path:t[0],repos:t,dangerouslySkipPermissions:R.checked,saneYolo:R.checked,unguarded:z.checked};J&&J!==`claude-code`&&(n.agent=J),$(n);return}if(!e||!t){B.textContent=`Both fields are required. Select a project or use Advanced options.`;return}let n={name:x(e),path:t,dangerouslySkipPermissions:R.checked,saneYolo:R.checked,unguarded:z.checked};J&&J!==`claude-code`&&(n.agent=J),U&&(n.environment=U.name),$(n)}function $(e){V.disabled=!0,B.textContent=``,l(`add-session`,e,{timeoutMs:h}).then(e=>{e.type===`add-session-result`&&e.ok?n():B.textContent=D(e)}).catch(e=>{B.textContent=`The session was not added: ${m(e,h)}`}).finally(()=>{V.disabled=Y})}be.addEventListener(`click`,n),V.addEventListener(`click`,Me),I.addEventListener(`keydown`,e=>{e.key===`Enter`&&(H&&Me(),H||L.focus())}),L.addEventListener(`keydown`,e=>{e.key===`Enter`&&Me()}),requestAnimationFrame(()=>r.focus())}function de({issueId:e,issueTitle:t,format:n,content:r,message:i,error:a}){let{dialog:o,close:s,actions:l,btnCancel:d}=u({title:`Investigation report`,dialogClass:`dialog dialog-report`,cancelLabel:`Close`}),f=c(`div`,`dialog-report-meta`,t||e||``),p=null;n===`html`&&!a&&!i&&(p=ne({source:{kind:`srcdoc`,html:r||``},className:`dialog-report-frame`,title:`Investigation report`,allowsScripts:!1})),p||=c(`pre`,a?`dialog-report-body dialog-report-error`:`dialog-report-body`,a||i||r||``),o.append(f,p,l),d.addEventListener(`click`,s),requestAnimationFrame(()=>d.focus())}function N({issueTitle:r,projectLabel:i,onOpenReport:o}){let{dialog:s,close:l,actions:d,btnCancel:f}=u({title:`Investigation`,dialogClass:`dialog dialog-report`,cancelLabel:`Close`}),p=c(`div`,`dialog-report-meta`,i?`${i}: ${r}`:r),m=c(`p`,`dialog-trail-status`),h=c(`p`,`dialog-trail-summary`),_=c(`ol`,`dialog-trail-steps`),v=c(`p`,`dialog-trail-empty`,`No tool calls yet; the session is reading the issue.`),y=c(`button`,`btn-dialog btn-dialog-cancel`,`Open report`);y.type=`button`,y.hidden=!0,y.addEventListener(`click`,()=>{l(),o()}),d.prepend(y),s.append(p,m,h,_,v,d),f.addEventListener(`click`,l),requestAnimationFrame(()=>f.focus());let b=null,x=``;function S(n){let r=_.scrollHeight-_.scrollTop-_.clientHeight<24,i=t(n);if(x!==i){_.textContent=``;for(let t of e(n.steps)){let e=c(`li`,`dialog-trail-step dialog-trail-${t.kind}`),r=t.kind===`note`?t.text:`${t.stepCount} ${t.stepCount===1?`step`:`steps`}`;e.append(c(`span`,`dialog-trail-at`,a(n.startedAt,t.at)),c(`span`,`dialog-trail-detail`,r)),_.append(e)}x=i}v.hidden=n.steps.length>0||!n.inFlight,_.hidden=n.steps.length===0,r&&(_.scrollTop=_.scrollHeight)}function C(e){m.textContent=n(e,T(e.startedAt))}function w(){b&&(C(b),m.dataset.tone=b.inFlight?`live`:`done`,h.textContent=b.summaryLine,h.hidden=!b.summaryLine,y.hidden=b.inFlight||!b.verdict,S(b))}let E=g(()=>{s.isConnected?b?.inFlight&&C(b):E()});return{update(e){b=e,w()},isOpen:()=>s.isConnected,close:()=>{E(),l()}}}export{E as agentLoginOf,j as agentLoginSummary,ue as createAddSessionDialog,N as createInvestigationDialog,de as createRadarReportDialog,w as onAgentLoginsChanged,ce as openAgentConnectDialog,le as openRemoteSetupDialog};
|
|
Binary file
|