glimmervoid 0.52.3-next.745 → 0.52.3-next.747
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 +11 -11
- package/dist/chunks/{adapters-BjWZak_C.js → adapters-DIL3fRTv.js} +2 -2
- package/dist/chunks/{adapters-BkRfCPly.js → adapters-ssS1xdYz.js} +1 -1
- package/dist/chunks/agent-api-cli-Hv7ZSe1j.js +1 -0
- package/dist/chunks/{agent-api-cli-CzWtZL6s.js → agent-api-cli-PgRkZU4P.js} +1 -1
- package/dist/chunks/{agent-api-core-xnAoNPvc.js → agent-api-core-x2zowz6c.js} +1 -1
- package/dist/chunks/{config-nPlxQDp8.js → config-DcDW4QHL.js} +1 -0
- package/dist/chunks/{config-store-CqyR7WrE.js → config-store-DEv5kK3A.js} +24 -1
- package/dist/chunks/config-store-X9gU0_HY.js +1 -0
- package/dist/chunks/{main-IWhu5WqE.js → main-Buf2PV_P.js} +321 -9
- package/dist/chunks/{packs-cli-3UZGrZnI.js → packs-cli-s61MOWh7.js} +1 -1
- package/dist/chunks/{pair-cli-DwHsuMKf.js → pair-cli-CWLOarkw.js} +2 -2
- package/dist/chunks/{pr-flows-cli-CwabZqZM.js → pr-flows-cli-D6M6kXRm.js} +2 -2
- package/dist/chunks/{remote-config-CWZDCKrX.js → remote-config-D7z6o2EA.js} +1 -1
- package/dist/chunks/{settings-cli-B_EZcvQj.js → settings-cli-CYaiaFRJ.js} +4 -4
- package/dist/chunks/{settings-readout-core-PKhnFzgs.js → settings-readout-core-C-bA2Dag.js} +1 -1
- package/dist/chunks/{ssh-sign-cli-Cf0DEUOk.js → ssh-sign-cli-BAlpaJTq.js} +1 -1
- package/dist/client/assets/{agent-mark-B1M1oswI.js → agent-mark-CirNT2PG.js} +1 -1
- package/dist/client/assets/agent-mark-CirNT2PG.js.br +0 -0
- package/dist/client/assets/arena-panel-X0Q5Y1AR.js +2 -0
- package/dist/client/assets/arena-panel-X0Q5Y1AR.js.br +0 -0
- package/dist/client/assets/{benchmark-panel-BSL_o52t.js → benchmark-panel-4WY8PAaE.js} +1 -1
- package/dist/client/assets/benchmark-panel-4WY8PAaE.js.br +0 -0
- package/dist/client/assets/{boards-view-8RPm84c1.js → boards-view-DRObO-14.js} +1 -1
- package/dist/client/assets/boards-view-DRObO-14.js.br +0 -0
- package/dist/client/assets/{community-panel-1rPE7j3L.js → community-panel-rwqrTFlQ.js} +1 -1
- package/dist/client/assets/community-panel-rwqrTFlQ.js.br +0 -0
- package/dist/client/assets/{dialogs-BmZnkMd0.js → dialogs-BGxunstG.js} +1 -1
- package/dist/client/assets/dialogs-BGxunstG.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-AFnqu9gC.js → doc-editor-ui-Bfl4PXOZ.js} +1 -1
- package/dist/client/assets/doc-editor-ui-Bfl4PXOZ.js.br +0 -0
- package/dist/client/assets/{feature-hint-BrTQ_7C0.js → feature-hint-Ci1zTmOg.js} +1 -1
- package/dist/client/assets/feature-hint-Ci1zTmOg.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-BhF4ts1R.js → first-run-checklist-DZwWgHmS.js} +1 -1
- package/dist/client/assets/first-run-checklist-DZwWgHmS.js.br +0 -0
- package/dist/client/assets/{hooks-panel-2zmNSkQl.js → hooks-panel-DRGRq5fB.js} +1 -1
- package/dist/client/assets/hooks-panel-DRGRq5fB.js.br +0 -0
- package/dist/client/assets/index-B_eYvX3O.css +2 -0
- package/dist/client/assets/index-B_eYvX3O.css.br +0 -0
- package/dist/client/assets/index-w3M2_7N6.js +75 -0
- package/dist/client/assets/index-w3M2_7N6.js.br +0 -0
- package/dist/client/assets/{issues-panel-zXQvD9N_.js → issues-panel-CzLBaprb.js} +1 -1
- package/dist/client/assets/issues-panel-CzLBaprb.js.br +0 -0
- package/dist/client/assets/{lane-read-token-step-DYIgg72p.js → lane-read-token-step-BIQdL33y.js} +3 -3
- package/dist/client/assets/lane-read-token-step-BIQdL33y.js.br +0 -0
- package/dist/client/assets/{my-prs-panel-CZFyILCv.js → my-prs-panel-x9wHi8gt.js} +1 -1
- package/dist/client/assets/my-prs-panel-x9wHi8gt.js.br +0 -0
- package/dist/client/assets/{nyan-cat-C-BalG-A.js → nyan-cat-CJa0pm1M.js} +1 -1
- package/dist/client/assets/nyan-cat-CJa0pm1M.js.br +0 -0
- package/dist/client/assets/{phone-shell-BKNtXe5z.js → phone-shell-BtsrwaBM.js} +1 -1
- package/dist/client/assets/phone-shell-BtsrwaBM.js.br +0 -0
- package/dist/client/assets/{plan-face-CXJHkYIO.js → plan-face-wNz8IEVl.js} +1 -1
- package/dist/client/assets/plan-face-wNz8IEVl.js.br +0 -0
- package/dist/client/assets/plan-render-DV_LJkLm.js +4 -0
- package/dist/client/assets/plan-render-DV_LJkLm.js.br +0 -0
- package/dist/client/assets/{pr-queue-columns-CMb-lH3m.js → pr-queue-columns-DsYX5kQ2.js} +1 -1
- package/dist/client/assets/pr-queue-columns-DsYX5kQ2.js.br +0 -0
- package/dist/client/assets/{radar-panel-B5yYxGqt.js → radar-panel-DBvUnftI.js} +1 -1
- package/dist/client/assets/radar-panel-DBvUnftI.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-DloDL6w6.js → repo-roots-adder-Tq0yc1-u.js} +1 -1
- package/dist/client/assets/repo-roots-adder-Tq0yc1-u.js.br +0 -0
- package/dist/client/assets/{resume-dialog-C7nngoAX.js → resume-dialog-fcUJsveK.js} +1 -1
- package/dist/client/assets/resume-dialog-fcUJsveK.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-D9mchXEm.js → review-queue-panel-CHR2Zr0d.js} +1 -1
- package/dist/client/assets/review-queue-panel-CHR2Zr0d.js.br +0 -0
- package/dist/client/assets/{session-actions-CrzVPQpb.js → session-actions-De5p92mz.js} +2 -2
- package/dist/client/assets/session-actions-De5p92mz.js.br +0 -0
- package/dist/client/assets/{session-row-QnVKtvK-.js → session-row-Dgmv5mTi.js} +1 -1
- package/dist/client/assets/session-row-Dgmv5mTi.js.br +0 -0
- package/dist/client/assets/settings-panel-ZZywRHM8.js +4 -0
- package/dist/client/assets/settings-panel-ZZywRHM8.js.br +0 -0
- package/dist/client/assets/{trace-panel-maxILNvG.js → trace-panel-8mC9kd04.js} +1 -1
- package/dist/client/assets/trace-panel-8mC9kd04.js.br +0 -0
- package/dist/client/assets/{usage-panel-U9pxkZhz.js → usage-panel-CBlZSbZW.js} +1 -1
- package/dist/client/assets/usage-panel-CBlZSbZW.js.br +0 -0
- package/dist/client/assets/{your-day-tip-CFH3o0Ny.js → your-day-tip-BGpgBYY2.js} +1 -1
- package/dist/client/assets/your-day-tip-BGpgBYY2.js.br +0 -0
- package/dist/client/index.html +5 -6
- package/dist/client/index.html.br +0 -0
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/agent-api-cli-DZCpFKjO.js +0 -1
- package/dist/chunks/config-store-B0sTkXcn.js +0 -1
- package/dist/client/assets/agent-mark-B1M1oswI.js.br +0 -0
- package/dist/client/assets/arena-panel-CAqzMsyz.js +0 -2
- package/dist/client/assets/arena-panel-CAqzMsyz.js.br +0 -0
- package/dist/client/assets/benchmark-panel-BSL_o52t.js.br +0 -0
- package/dist/client/assets/boards-view-8RPm84c1.js.br +0 -0
- package/dist/client/assets/community-panel-1rPE7j3L.js.br +0 -0
- package/dist/client/assets/dialogs-BmZnkMd0.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-AFnqu9gC.js.br +0 -0
- package/dist/client/assets/feature-hint-BrTQ_7C0.js.br +0 -0
- package/dist/client/assets/first-run-checklist-BhF4ts1R.js.br +0 -0
- package/dist/client/assets/hooks-panel-2zmNSkQl.js.br +0 -0
- package/dist/client/assets/http-url-B85DM2Ri.js +0 -1
- package/dist/client/assets/index-CPBJBoN8.js +0 -75
- package/dist/client/assets/index-CPBJBoN8.js.br +0 -0
- package/dist/client/assets/index-ak-vMlx2.css +0 -2
- package/dist/client/assets/index-ak-vMlx2.css.br +0 -0
- package/dist/client/assets/issues-panel-zXQvD9N_.js.br +0 -0
- package/dist/client/assets/lane-read-token-step-DYIgg72p.js.br +0 -0
- package/dist/client/assets/my-prs-panel-CZFyILCv.js.br +0 -0
- package/dist/client/assets/nyan-cat-C-BalG-A.js.br +0 -0
- package/dist/client/assets/phone-shell-BKNtXe5z.js.br +0 -0
- package/dist/client/assets/plan-face-CXJHkYIO.js.br +0 -0
- package/dist/client/assets/plan-render-CzezaovM.js +0 -4
- package/dist/client/assets/plan-render-CzezaovM.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-CMb-lH3m.js.br +0 -0
- package/dist/client/assets/radar-panel-B5yYxGqt.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-DloDL6w6.js.br +0 -0
- package/dist/client/assets/resume-dialog-C7nngoAX.js.br +0 -0
- package/dist/client/assets/review-queue-panel-D9mchXEm.js.br +0 -0
- package/dist/client/assets/session-actions-CrzVPQpb.js.br +0 -0
- package/dist/client/assets/session-row-QnVKtvK-.js.br +0 -0
- package/dist/client/assets/settings-panel-CiWQDd4l.js +0 -4
- package/dist/client/assets/settings-panel-CiWQDd4l.js.br +0 -0
- package/dist/client/assets/trace-panel-maxILNvG.js.br +0 -0
- package/dist/client/assets/usage-panel-U9pxkZhz.js.br +0 -0
- package/dist/client/assets/your-day-tip-CFH3o0Ny.js.br +0 -0
package/dist/bin/glimmervoid.js
CHANGED
|
@@ -5,7 +5,7 @@ import { o as packageRoot } from "../chunks/runtime-paths-DfoHzN15.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-BOzHqxD5.js";
|
|
7
7
|
import { a as execSync } from "../chunks/child-process-safe-BIh8yQ0I.js";
|
|
8
|
-
import { it as parseCommand, nt as OWNED_COMMAND_SPECS, r as agentCommandHelpLines, rt as isOwnedCommandName } from "../chunks/agent-api-core-
|
|
8
|
+
import { it as parseCommand, nt as OWNED_COMMAND_SPECS, r as agentCommandHelpLines, rt as isOwnedCommandName } from "../chunks/agent-api-core-x2zowz6c.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-BfOQqktJ.js";
|
|
11
11
|
import { i as pnpmGlobalBinDir, n as npmGlobalBinDir, r as onPath, t as formatPathNotice } from "../chunks/path-doctor-C23VAqeu.js";
|
|
@@ -64,7 +64,7 @@ var OWNED_COMMAND_RUNNERS = {
|
|
|
64
64
|
return await runDoctor() ? 0 : 1;
|
|
65
65
|
},
|
|
66
66
|
pair: async ({ values }) => {
|
|
67
|
-
const { runPairCli } = await import("../chunks/pair-cli-
|
|
67
|
+
const { runPairCli } = await import("../chunks/pair-cli-CWLOarkw.js");
|
|
68
68
|
return runPairCli({
|
|
69
69
|
isListing: values.list === true,
|
|
70
70
|
revokeDeviceId: typeof values.revoke === "string" ? values.revoke : null,
|
|
@@ -76,23 +76,23 @@ var OWNED_COMMAND_RUNNERS = {
|
|
|
76
76
|
return runAgentSetupCli();
|
|
77
77
|
},
|
|
78
78
|
settings: async (parsed) => {
|
|
79
|
-
const { runParsedSettingsCli } = await import("../chunks/settings-cli-
|
|
79
|
+
const { runParsedSettingsCli } = await import("../chunks/settings-cli-CYaiaFRJ.js");
|
|
80
80
|
return runParsedSettingsCli(parsed);
|
|
81
81
|
},
|
|
82
82
|
"pr-flows": async (parsed) => {
|
|
83
|
-
const { runPrFlowsCheckCli } = await import("../chunks/pr-flows-cli-
|
|
83
|
+
const { runPrFlowsCheckCli } = await import("../chunks/pr-flows-cli-D6M6kXRm.js");
|
|
84
84
|
return runPrFlowsCheckCli(parsed);
|
|
85
85
|
},
|
|
86
86
|
packs: async (parsed) => {
|
|
87
|
-
const { runPacksCli } = await import("../chunks/packs-cli-
|
|
87
|
+
const { runPacksCli } = await import("../chunks/packs-cli-s61MOWh7.js");
|
|
88
88
|
return runPacksCli(parsed);
|
|
89
89
|
},
|
|
90
90
|
"pr-action": async (parsed) => {
|
|
91
|
-
const { runPrActionReportCli } = await import("../chunks/pr-flows-cli-
|
|
91
|
+
const { runPrActionReportCli } = await import("../chunks/pr-flows-cli-D6M6kXRm.js");
|
|
92
92
|
return runPrActionReportCli(parsed);
|
|
93
93
|
},
|
|
94
94
|
"ssh-sign": async ({ rawArgs }) => {
|
|
95
|
-
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-
|
|
95
|
+
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-BAlpaJTq.js");
|
|
96
96
|
return runSshSignCli(rawArgs);
|
|
97
97
|
}
|
|
98
98
|
};
|
|
@@ -114,7 +114,7 @@ async function runOwnedCommand(name, subcommandArgs) {
|
|
|
114
114
|
return OWNED_COMMAND_RUNNERS[name](parsed);
|
|
115
115
|
}
|
|
116
116
|
var SUBCOMMAND_RUNNERS = new Map([...Object.keys(OWNED_COMMAND_SPECS).filter(isOwnedCommandName).map((name) => [name, (subcommandArgs) => runOwnedCommand(name, subcommandArgs)]), ...AGENT_API_VERBS.filter((verb) => !isOwnedCommandName(verb)).map((verb) => [verb, async (subcommandArgs, subcommandName) => {
|
|
117
|
-
const { runAgentApiCli } = await import("../chunks/agent-api-cli-
|
|
117
|
+
const { runAgentApiCli } = await import("../chunks/agent-api-cli-Hv7ZSe1j.js");
|
|
118
118
|
return runAgentApiCli([subcommandName, ...subcommandArgs]);
|
|
119
119
|
}])]);
|
|
120
120
|
var AGENT_INSTALL_COMMAND_BY_ID = {
|
|
@@ -128,7 +128,7 @@ function missingAgentText(agentId) {
|
|
|
128
128
|
}
|
|
129
129
|
async function printSessionLimits() {
|
|
130
130
|
if (!process.env["GLIMMERVOID_AGENT_URL"]) return;
|
|
131
|
-
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-
|
|
131
|
+
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-Hv7ZSe1j.js");
|
|
132
132
|
const limitsLines = await sessionLimitsHelpLines();
|
|
133
133
|
console.log(`\n${limitsLines.join("\n")}`);
|
|
134
134
|
}
|
|
@@ -185,7 +185,7 @@ async function readDeclaredCustomAgents() {
|
|
|
185
185
|
declared: [],
|
|
186
186
|
error: null
|
|
187
187
|
};
|
|
188
|
-
const { loadConfigFile } = await import("../chunks/config-store-
|
|
188
|
+
const { loadConfigFile } = await import("../chunks/config-store-X9gU0_HY.js");
|
|
189
189
|
try {
|
|
190
190
|
const loaded = loadConfigFile(decided.path, { exitOnError: false });
|
|
191
191
|
if (!loaded.config) return {
|
|
@@ -261,7 +261,7 @@ async function runDoctor() {
|
|
|
261
261
|
}
|
|
262
262
|
switchSection("Agents");
|
|
263
263
|
try {
|
|
264
|
-
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-
|
|
264
|
+
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-ssS1xdYz.js");
|
|
265
265
|
const declaredCustomAgents = await readDeclaredCustomAgents();
|
|
266
266
|
if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
|
|
267
267
|
setCustomAgents(declaredCustomAgents.declared);
|
|
@@ -4,7 +4,7 @@ import { C as CONVERSATION_TOOL_RESULT_HOOK_EVENT, E as REQUEST_USER_INPUT_TOOL_
|
|
|
4
4
|
import { i as execFileSync, l as spawn, r as execFileAsync } from "./child-process-safe-BIh8yQ0I.js";
|
|
5
5
|
import { Mt as HTTP_URL_RE, an as PLAN_RESULT_HOOK_EVENT, en as UpdateChannel, on as PLAN_TOOL_NAME, qt as InstallFlavor, rn as PLAN_HOOK_EVENT } from "./control-messages-UMn16rhR.js";
|
|
6
6
|
import { a as rawTextOr, n as isRecord, o as textOr, r as numberOr } from "./coerce-oz_Z_6E7.js";
|
|
7
|
-
import { c as SHELL_AGENT_ID } from "./config-
|
|
7
|
+
import { c as SHELL_AGENT_ID } from "./config-DcDW4QHL.js";
|
|
8
8
|
import { r as QUESTION_TOOL_HOLD_HOOK_EVENT } from "./question-manager-pKtRKOEX.js";
|
|
9
9
|
import { n as parseJsonRecord } from "./json-core-If8h-Qgy.js";
|
|
10
10
|
import { a as QWEN_SANE_YOLO_FLAVOR, n as COPILOT_SANE_YOLO_FLAVOR, o as SANE_YOLO_PATH_ENV, r as GEMINI_SANE_YOLO_FLAVOR, s as saneYoloEnv, t as CODEX_SANE_YOLO_FLAVOR } from "./sane-yolo-YyMaZ6jg.js";
|
|
@@ -12,7 +12,7 @@ import { n as buildAgentEnv } from "./spawn-env-B5_go00h.js";
|
|
|
12
12
|
import { n as shellQuote, 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-BjfxvxFV.js";
|
|
14
14
|
import { O as nextBackoffMs, c as loadedJsonValue, d as writeJsonAtomicSync, f as writeTextAtomic, p as writeTextAtomicSync, s as loadJsonStateFileSync, t as appendJsonLine } from "./json-file-AKRVPqG1.js";
|
|
15
|
-
import { C as isExperimentalBuild, S as compareReleaseVersions, o as glimmervoidHomeDir } from "./config-store-
|
|
15
|
+
import { C as isExperimentalBuild, S as compareReleaseVersions, o as glimmervoidHomeDir } from "./config-store-DEv5kK3A.js";
|
|
16
16
|
import { n as buildAgentSpawnCommand, r as resolveAgentCommand, t as kimi } from "./kimi-BDdLoKZh.js";
|
|
17
17
|
import { _ as renderCodexHookTables, c as CODEX_HOME_PROFILE, f as QWEN_HOME_PROFILE, l as COPILOT_HOME_PROFILE, p as doesProjectConfigTurnHooksOff, t as AGENT_HOME_CONFIG_NAME, u as GEMINI_HOME_PROFILE, v as renderCodexHooksBlock, x as cleanJsonc } from "./agent-home-core-kOGl6Fwb.js";
|
|
18
18
|
import { c as realAgentHome, i as holdPreparedAgentHome, l as releaseAgentHome, n as generatedAgentHomePath, s as readOptionalText } from "./agent-home-DJ4vlmD4.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { o as describeAgentResolvability, d as listAgentIds, m as setCustomAgents } from "./adapters-
|
|
1
|
+
export { o as describeAgentResolvability, d as listAgentIds, m as setCustomAgents } from "./adapters-DIL3fRTv.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as askAgentApi, n as postToAgentIngress, r as runAgentApiCli, i as sessionLimitsHelpLines } from "./agent-api-cli-PgRkZU4P.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nt as UNIT_STATUSES, ot as WhiteboardAgentReply, r as AGENT_URL_ENV, u as AgentLimitsReply } from "./session-BOzHqxD5.js";
|
|
2
|
-
import { Y as formatSessionLimits, i as agentCommandSpec, it as parseCommand, m as isAgentApiVerb, t as AGENT_COMMAND_HELP } from "./agent-api-core-
|
|
2
|
+
import { Y as formatSessionLimits, i as agentCommandSpec, it as parseCommand, m as isAgentApiVerb, t as AGENT_COMMAND_HELP } from "./agent-api-core-x2zowz6c.js";
|
|
3
3
|
import { a as resolveHookTarget } from "./hook-relay-core-CfWWWQxq.js";
|
|
4
4
|
import { t as parseJsonOrNull } from "./json-core-If8h-Qgy.js";
|
|
5
5
|
import { o as planSteps, r as layoutBoard, t as boardSvgDocument } from "./whiteboard-svg-core-bnP72KuQ.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { D as RefinedTaskTitle, O as SESSION_COMMANDS, V as TASK_TITLE_CONTROL_CHARACTERS, _ as AgentSettingsRequest, a as AgentAnswerRequest, c as AgentCloseRequest, d as AgentPacksRequest, f as AgentPullRequestRequest, h as AgentSendRequest, l as AgentEditRequest, m as AgentReviewsRequest, n as AGENT_REPLY_SCHEMAS, o as AgentAttentionRequest, p as AgentReadRequest, s as AgentCheckoutRequest, st as WhiteboardAgentRequest, t as AGENT_API_VERBS, v as AgentSpawnRequest, y as AgentWhyRequest } from "./session-BOzHqxD5.js";
|
|
2
2
|
import { Qt as pullRequestKeyFromReference } from "./control-messages-UMn16rhR.js";
|
|
3
3
|
import { n as isRecord } from "./coerce-oz_Z_6E7.js";
|
|
4
|
-
import { l as TASK_TITLE_SOURCE_PRIORITY, o as PersistedTaskTitle } from "./config-
|
|
4
|
+
import { l as TASK_TITLE_SOURCE_PRIORITY, o as PersistedTaskTitle } from "./config-DcDW4QHL.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { parseArgs } from "node:util";
|
|
7
7
|
import crypto from "node:crypto";
|
|
@@ -190,6 +190,7 @@ var createBrowserConfigShape = (isAbsolutePath) => ({
|
|
|
190
190
|
cursorBlink: optionalBoolean("cursorBlink"),
|
|
191
191
|
debugMode: optionalBoolean("debugMode"),
|
|
192
192
|
streamerMode: optionalBoolean("streamerMode"),
|
|
193
|
+
linkPreviews: optionalBoolean("linkPreviews"),
|
|
193
194
|
viewTabOrder: z.array(z.string({ error: "viewTabOrder must be an array of view ids" }), { error: "viewTabOrder must be an array of view ids" }).optional(),
|
|
194
195
|
hiddenAgents: z.array(z.string({ error: "hiddenAgents must be an array of agent ids" }), { error: "hiddenAgents must be an array of agent ids" }).optional(),
|
|
195
196
|
remoteSessions: optionalBoolean("remoteSessions"),
|
|
@@ -4,7 +4,7 @@ import { n as glimmervoidHomeDir$1, t as decideConfigPath } from "./config-path-
|
|
|
4
4
|
import { O as SESSION_COMMANDS, On as PrFlowPrAction, Vn as prFlowRulesJsonSchema, jn as PrFlowSourceCommand, kn as PrFlowRule, xn as PrFlowCommand } from "./session-BOzHqxD5.js";
|
|
5
5
|
import { $ as MEMORY_RESERVE_MB_RANGE, $t as UPDATE_CHANNELS, Ct as WORKFLOWS_MAX_CONCURRENT_SESSIONS_RANGE, Gt as DASHBOARD_VIEWS, J as FLYING_ANIMALS_DEFAULTS, Jt as ONBOARDING_STEPS, Q as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, St as WORKFLOWS_MAX_ACTIONS_PER_POLL_RANGE, X as FLYING_ANIMALS_GAP_RANGE, Xt as OPERATOR_ACTIONS_BY_SURFACE, Y as FLYING_ANIMALS_DURATION_RANGE, Yt as ONBOARDING_STEP_STATES, Z as FLYING_ANIMALS_SCALE_RANGE, Zt as OPERATOR_SURFACES, _t as TASK_TITLE_TIMEOUT_RANGE, bt as USAGE_RETAIN_DAYS_RANGE, dt as POSTHOG_TRAFFIC_BASELINE_RANGE, et as NON_NEGATIVE_NUMBER_RANGE, gt as REPLAY_BUFFER_KB_RANGE, h as DEFAULT_MODELS, it as POSTHOG_FIX_TIMEOUT_RANGE, lt as POSTHOG_PROJECT_ID_RANGE, mt as POSTHOG_TRAFFIC_MULTIPLIER_RANGE, nt as POSITIVE_NUMBER_RANGE, o as HintFeature, pt as POSTHOG_TRAFFIC_MIN_USERS_RANGE, q as COMMUNITY_INTERVAL_MINUTES_RANGE, tt as PORT_RANGE, vt as USAGE_BUDGET_RANGE, xt as USAGE_SCAN_INTERVAL_RANGE, yt as USAGE_INTEGER_RANGES } from "./control-messages-UMn16rhR.js";
|
|
6
6
|
import { n as isRecord } from "./coerce-oz_Z_6E7.js";
|
|
7
|
-
import { d as BranchGcFileSettings, f as USAGE_COST_MODES, i as Config, m as normalizeLegacyConfigNumbers, n as BUILTIN_AGENT_IDS, s as RUNTIME_CONFIG_SCALAR_KEYS, t as AGENT_ID_SHAPE_MESSAGE, u as configIssueMessage } from "./config-
|
|
7
|
+
import { d as BranchGcFileSettings, f as USAGE_COST_MODES, i as Config, m as normalizeLegacyConfigNumbers, n as BUILTIN_AGENT_IDS, s as RUNTIME_CONFIG_SCALAR_KEYS, t as AGENT_ID_SHAPE_MESSAGE, u as configIssueMessage } from "./config-DcDW4QHL.js";
|
|
8
8
|
import { o as QuestionRule } from "./question-manager-pKtRKOEX.js";
|
|
9
9
|
import { d as writeJsonAtomicSync, f as writeTextAtomic, p as writeTextAtomicSync } from "./json-file-AKRVPqG1.js";
|
|
10
10
|
import fs from "node:fs";
|
|
@@ -838,6 +838,10 @@ function parseDataAttach(rawUrl) {
|
|
|
838
838
|
function describeDataAttach(attach) {
|
|
839
839
|
return attach.isOutputPaused ? `${attach.history} paused` : attach.history;
|
|
840
840
|
}
|
|
841
|
+
z.object({
|
|
842
|
+
title: z.string().optional(),
|
|
843
|
+
iconDataUrl: z.string().startsWith("data:image/").optional()
|
|
844
|
+
});
|
|
841
845
|
//#endregion
|
|
842
846
|
//#region shared/settings/registry-fields.ts
|
|
843
847
|
var BROWSER_NOW = {
|
|
@@ -1295,6 +1299,23 @@ var MACHINE_SESSIONS = {
|
|
|
1295
1299
|
defaultValue: false,
|
|
1296
1300
|
...MACHINE_NOW
|
|
1297
1301
|
},
|
|
1302
|
+
{
|
|
1303
|
+
id: "link-previews",
|
|
1304
|
+
path: "linkPreviews",
|
|
1305
|
+
title: "Link page previews",
|
|
1306
|
+
description: "Resting the pointer on a terminal link for about 600 ms fetches that page from this machine to show its title and icon. Off, the link card shows the address only.",
|
|
1307
|
+
control: "toggle",
|
|
1308
|
+
keywords: [
|
|
1309
|
+
"links",
|
|
1310
|
+
"preview",
|
|
1311
|
+
"title",
|
|
1312
|
+
"favicon",
|
|
1313
|
+
"hover",
|
|
1314
|
+
"privacy"
|
|
1315
|
+
],
|
|
1316
|
+
defaultValue: true,
|
|
1317
|
+
...MACHINE_NOW
|
|
1318
|
+
},
|
|
1298
1319
|
{
|
|
1299
1320
|
id: "hint-cards",
|
|
1300
1321
|
path: "hintCards",
|
|
@@ -4027,6 +4048,7 @@ var DEFAULT_CONFIG = {
|
|
|
4027
4048
|
cursorBlink: false,
|
|
4028
4049
|
debugMode: false,
|
|
4029
4050
|
streamerMode: false,
|
|
4051
|
+
linkPreviews: true,
|
|
4030
4052
|
viewTabOrder: [],
|
|
4031
4053
|
hiddenAgents: [],
|
|
4032
4054
|
remoteSessions: false,
|
|
@@ -4483,6 +4505,7 @@ function createConfigStore({ settingsDefaults, readTelemetryInstallId, isExperim
|
|
|
4483
4505
|
cursorBlink: config.cursorBlink ?? effectiveDefaults.cursorBlink,
|
|
4484
4506
|
debugMode: config.debugMode ?? effectiveDefaults.debugMode,
|
|
4485
4507
|
streamerMode: config.streamerMode ?? effectiveDefaults.streamerMode,
|
|
4508
|
+
linkPreviews: config.linkPreviews ?? effectiveDefaults.linkPreviews,
|
|
4486
4509
|
viewTabOrder: config.viewTabOrder ?? DEFAULT_CONFIG.viewTabOrder,
|
|
4487
4510
|
hiddenAgents: config.hiddenAgents ?? DEFAULT_CONFIG.hiddenAgents,
|
|
4488
4511
|
remoteSessions: config.remoteSessions ?? effectiveDefaults.remoteSessions,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { s as loadConfigFile } from "./config-store-DEv5kK3A.js";
|
|
@@ -6,9 +6,9 @@ import { $ as Note, $t as TeamReviewActionRequest, An as PrFlowSaveRuleRequest,
|
|
|
6
6
|
import { c as runCommandSafely$1, i as execFileSync, l as spawn, n as execFile, r as execFileAsync, s as refuseLaunchesOf, t as assertLaunchable } from "./child-process-safe-BIh8yQ0I.js";
|
|
7
7
|
import { A as CommunityItem, At as IssuesStatus, B as WorkflowCommentBody, Bt as changeMapFactId, C as BenchmarkSuite, D as PrCheckoutCaseInput, Dt as IssueUpdate, E as MinedPrReviewData, Et as IssueKey, F as GithubPrDetailNode, Ft as MAX_RAW_LINE_CHARS, H as WorkflowsSettings, I as GithubPrKey, It as TraceCheckpoint, Kt as GithubTeam, L as GithubPrLightSearchNode, Lt as TraceRecord, M as CommunityVerdict, N as DISCORD_CHANNEL_NAME_RE, Nt as HookEnvelope, O as CommunityActionRequest, Ot as IssuesSearchResponse, P as SKILL_NAME_RE, Pt as SessionSetup, Q as KEEP_MERGEABLE_TIMEOUT_MINUTES_RANGE, Qt as pullRequestKeyFromReference, R as GithubPrsFrame, Rt as CoherenceJournalOutput, S as BenchmarkStatus, T as MergedPrListing, Tt as GithubIssueResponse, Ut as CLIENT_LOG_TEXT_MAX_CHARS, V as WorkflowLabelName, Vt as CHANGES_POLL_INTERVAL_MS, W as WorkflowsState, Wt as CONTROL_FRAME_MAX_BYTES, _ as BenchmarkActionRequest, a as HINT_VIEW_BY_FEATURE, an as PLAN_RESULT_HOOK_EVENT, b as BenchmarkJudgement, c as JudgeResult, cn as PlanRevision, d as RaceRecord, f as RaceSpec, g as EFFORT_OPTION_ID, h as DEFAULT_MODELS, i as HINT_FEATURES, in as PLAN_HOOK_OUTPUT_MAX_CHARS, j as CommunityState, jt as issuePullRequestStateFromGithub, k as CommunityDraft, kt as IssuesState, ln as parseExitPlanModeHookPayload, m as CATALOG_AGENT_IDS, n as PackApproveRequest, nn as PLAN_BODY_CAP_BYTES, on as PLAN_TOOL_NAME, r as FeatureHintState, rn as PLAN_HOOK_EVENT, sn as PlanDecision, t as ClientMessage, tn as UpdateJournal, un as planTitle, v as BenchmarkCase, w as CommitComparison, wt as GithubIssuePullRequestsRepository, x as BenchmarkRun, y as BenchmarkId, yt as USAGE_INTEGER_RANGES, z as comparablePrKey, zt as ChangeMap } from "./control-messages-UMn16rhR.js";
|
|
8
8
|
import { a as PackStoreData, d as packStoreSizeError, u as packStoreAfterSet } from "./pack-bridge-CAS7jBbr.js";
|
|
9
|
-
import { $ as routeAgentNotes, A as isSubstantivePrompt, B as resolveResumeTarget, C as decideTaskTitleRefinement, D as extractOscTaskTitle, E as extractNotifiedTaskIds, F as seedTaskTitleSources, G as listRepoWorktreePaths, H as shouldAdoptReportedResumeId, I as AUTO_CONTINUE_PROMPT, J as describeSessionLimits, K as isAutoNameOf, L as RESUME_ID_RE, M as parseRefinedTaskTitle, N as resolveRefocusTaskTitle, O as extractPromptTaskTitle, P as resolveTaskTitle, Q as promptHintFor, R as isConversationReplacedAtStartup, S as cleanTaskPrompt, T as extractHookTaskTitle, U as claudeProjectsDir, V as resumePromptFor, W as listRepoConversations, X as hintFor, Z as permitsHelpCommand, _ as projectReviewDetail, a as checkAgentReply, b as buildTaskTitleRefinementPrompt, c as deriveChildSessionName, d as describePushLanding, et as supervisionLine, f as describeRoleRefusal, g as projectMyPrs, h as parseAgentVerb, j as parseRefinedSessionName, k as isSelfWakePrompt, l as describeChildEndNote, n as REFUSAL_REASON, o as decideAgentRequest, p as describeUnpushedCloseRefusal, q as nextSuggestedName, s as decideSpawnAllowance, tt as toolHookFactsOf, u as describeKeptChildAttention, v as projectReviews, w as extractAiTitle, x as chooseRefinedSessionName, y as buildPersistedTaskTitle, z as pickAutoResume } from "./agent-api-core-
|
|
9
|
+
import { $ as routeAgentNotes, A as isSubstantivePrompt, B as resolveResumeTarget, C as decideTaskTitleRefinement, D as extractOscTaskTitle, E as extractNotifiedTaskIds, F as seedTaskTitleSources, G as listRepoWorktreePaths, H as shouldAdoptReportedResumeId, I as AUTO_CONTINUE_PROMPT, J as describeSessionLimits, K as isAutoNameOf, L as RESUME_ID_RE, M as parseRefinedTaskTitle, N as resolveRefocusTaskTitle, O as extractPromptTaskTitle, P as resolveTaskTitle, Q as promptHintFor, R as isConversationReplacedAtStartup, S as cleanTaskPrompt, T as extractHookTaskTitle, U as claudeProjectsDir, V as resumePromptFor, W as listRepoConversations, X as hintFor, Z as permitsHelpCommand, _ as projectReviewDetail, a as checkAgentReply, b as buildTaskTitleRefinementPrompt, c as deriveChildSessionName, d as describePushLanding, et as supervisionLine, f as describeRoleRefusal, g as projectMyPrs, h as parseAgentVerb, j as parseRefinedSessionName, k as isSelfWakePrompt, l as describeChildEndNote, n as REFUSAL_REASON, o as decideAgentRequest, p as describeUnpushedCloseRefusal, q as nextSuggestedName, s as decideSpawnAllowance, tt as toolHookFactsOf, u as describeKeptChildAttention, v as projectReviews, w as extractAiTitle, x as chooseRefinedSessionName, y as buildPersistedTaskTitle, z as pickAutoResume } from "./agent-api-core-x2zowz6c.js";
|
|
10
10
|
import { a as rawTextOr, i as positiveNumberOr, n as isRecord$2, o as textOr, r as numberOr, t as coercedNumberOr } from "./coerce-oz_Z_6E7.js";
|
|
11
|
-
import { a as ConfigUpdate, c as SHELL_AGENT_ID, f as USAGE_COST_MODES, n as BUILTIN_AGENT_IDS, p as USAGE_VENDOR_KEYS, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, u as configIssueMessage } from "./config-
|
|
11
|
+
import { a as ConfigUpdate, c as SHELL_AGENT_ID, f as USAGE_COST_MODES, n as BUILTIN_AGENT_IDS, p as USAGE_VENDOR_KEYS, r as BrowserConfig, s as RUNTIME_CONFIG_SCALAR_KEYS, u as configIssueMessage } from "./config-DcDW4QHL.js";
|
|
12
12
|
import { a as QuestionManagerSettings, n as QUESTION_ANSWERED_NOTIFY_CATEGORY, t as ManagerLaneResult } from "./question-manager-pKtRKOEX.js";
|
|
13
13
|
import { i as parseCommandLine, n as warnWhenGitIsTooOld } from "./git-version-BfOQqktJ.js";
|
|
14
14
|
import { t as HOOK_URL_ENV } from "./hook-relay-core-CfWWWQxq.js";
|
|
@@ -21,16 +21,16 @@ import { a as mcpLaunchFor, o as parsePresentedCredential } from "./agent-config
|
|
|
21
21
|
import { t as DETACHED_DESKTOP_BUS_ADDRESS } from "./spawn-env-B5_go00h.js";
|
|
22
22
|
import { n as shellQuote } from "./hook-command-core-qTNK-xMF.js";
|
|
23
23
|
import { C as parseCgroupBytes, D as DEFAULT_MAX_MS, E as DEFAULT_BASE_MS, O as nextBackoffMs, S as memoryReserveBytes, T as parseMemAvailableBytes, _ as createSpawnGate, a as jsonStateLoadError, b as cgroupLimitBytes, c as loadedJsonValue, d as writeJsonAtomicSync, f as writeTextAtomic, g as createSerialQueue, h as createMemoryAdmission, i as createJsonStateWriter, m as createKeyedSerialQueue, n as appendJsonLines, o as loadJsonStateFile, p as writeTextAtomicSync, r as createJsonStateStore, s as loadJsonStateFileSync, t as appendJsonLine, u as writeJsonAtomic, v as isQueueAdmissionTimeout, w as parseCgroupV2Path, x as headroomFromReadings, y as cgroupAncestorPaths } from "./json-file-AKRVPqG1.js";
|
|
24
|
-
import { $ as buildAiGenerationEvents, Ct as isSameDirectoryPath, D as settingsBlockSpecFor, E as mergeSettingsBlock, G as LOGGED_FAST_CLOSE_COUNTS, H as isExperimentalSetting, J as parseDataClientMessage, K as describeDataAttach, O as validateSettingsBlock, Q as adapterBucket, St as comparableDirectoryPath, U as DEEP_HISTORY_SCROLLBACK_LINES, X as TELEMETRY_BATCH_URL, Y as FIRST_RUN_NOTICE, Z as TELEMETRY_FLAGS_URL, _ as sessionIdFromBranch, a as generateProjectId, at as codexUserIdOf, b as DEFAULT_TIMER_FNS, ct as decideTelemetryConsent, d as DEFAULT_CONFIG, dt as parsePosthogReleaseId, et as buildBrowserExceptionProperties, f as DEFAULT_BRANCH_GC_PREFIXES, ft as resolveProjectToken, g as planWorktreeGc, gt as TelemetryState, h as planBranchGc, ht as TELEMETRY_EVENT_SCHEMAS, i as ensureProjectIds, it as claudeAccountUuidOf, k as SETTINGS_INDEX, lt as exceptionFingerprint, m as matchedPrefix, mt as PendingCrashReport, n as createConfigStore, nt as buildPersonProperties, o as glimmervoidHomeDir$1, ot as decideIsDevInstall, p as isGcCandidateWorktree, pt as DashboardTelemetryReport, q as parseDataAttach, r as ABORT_CONFIG_SAVE, rt as classifySessionExit, st as decideRemoteTelemetryState, tt as buildExceptionProperties, ut as nodeMajorVersion, v as usablePrefixes, x as unrefTimer, xt as canonicalizePath, y as worktreeIntegrationTips, yt as stableConfigKey, z as valueAtPath } from "./config-store-
|
|
24
|
+
import { $ as buildAiGenerationEvents, Ct as isSameDirectoryPath, D as settingsBlockSpecFor, E as mergeSettingsBlock, G as LOGGED_FAST_CLOSE_COUNTS, H as isExperimentalSetting, J as parseDataClientMessage, K as describeDataAttach, O as validateSettingsBlock, Q as adapterBucket, St as comparableDirectoryPath, U as DEEP_HISTORY_SCROLLBACK_LINES, X as TELEMETRY_BATCH_URL, Y as FIRST_RUN_NOTICE, Z as TELEMETRY_FLAGS_URL, _ as sessionIdFromBranch, a as generateProjectId, at as codexUserIdOf, b as DEFAULT_TIMER_FNS, ct as decideTelemetryConsent, d as DEFAULT_CONFIG, dt as parsePosthogReleaseId, et as buildBrowserExceptionProperties, f as DEFAULT_BRANCH_GC_PREFIXES, ft as resolveProjectToken, g as planWorktreeGc, gt as TelemetryState, h as planBranchGc, ht as TELEMETRY_EVENT_SCHEMAS, i as ensureProjectIds, it as claudeAccountUuidOf, k as SETTINGS_INDEX, lt as exceptionFingerprint, m as matchedPrefix, mt as PendingCrashReport, n as createConfigStore, nt as buildPersonProperties, o as glimmervoidHomeDir$1, ot as decideIsDevInstall, p as isGcCandidateWorktree, pt as DashboardTelemetryReport, q as parseDataAttach, r as ABORT_CONFIG_SAVE, rt as classifySessionExit, st as decideRemoteTelemetryState, tt as buildExceptionProperties, ut as nodeMajorVersion, v as usablePrefixes, x as unrefTimer, xt as canonicalizePath, y as worktreeIntegrationTips, yt as stableConfigKey, z as valueAtPath } from "./config-store-DEv5kK3A.js";
|
|
25
25
|
import { i as resolveArgvCommandMatches, t as kimi } from "./kimi-BDdLoKZh.js";
|
|
26
|
-
import { $ as decideFileRead, $t as listClaudeGlobalConfigPathCandidates, A as openContainedFile, At as HOOK_EVENTS, B as TRACE_TAIL_SCAN_BYTES, Bt as hooksForProject, C as normalizeSha, Ct as mergeGenerationRollups, D as parseResolvedSha, Dt as totalTokensOf$1, E as parseRegistryLatest, Et as shouldReplace, F as framePathPaste, Ft as writeSessionSettings, G as planContiguousRead, Gt as upsertHook, H as completeLineBytes, Ht as rawStoredHooks, I as imageMimeForUploadFilename, It as HOOK_EVENT_CATALOG, J as codexFallbackRoots, Jt as sweepOrphanedHostScratch, K as resumeOffsetFrom, Kt as HOOK_TOOLS, L as isSafePathSegment, Lt as ID_RE, M as buildUploadFilename, Mt as buildHookSettings, N as decideUploadType, Nt as generateToken, O as pickNewestPublished, Ot as vendorUsageEntry, P as exceedsUploadCap, Pt as sweepOrphans, Q as continuationDelayMs, Qt as removalsJournalPath, R as planUploadRetention, Rt as agentHookGroupOf, S as isCheckFresh, St as isWithinGenerationRecencyWindow, T as parseRegistryDeprecation, Tt as parseUsageLine, U as containmentRefusalReason, Ut as readStoredHooks, V as committedOffsetFromTraceTailOrNull, Vt as normalizeHook, W as isOversizedPartialLine, Wt as removeHook, X as codexRootCandidates, Xt as appendRemovalRecordSync, Y as codexHomes, Yt as appendRemovalRecord, Z as codexSessionIdFromPath, Zt as recordSweptPath, _ as readHostCodexVersion, _t as emptyTotals, a as customAgentFingerprint, at as passOutcome, b as decideInstallFlavor, bt as foldReplacementIntoGenerationRollup, c as hookProfileOf, ct as scopedClaudeRoots, d as listAgentIds, dt as shouldPersistWarehouse, et as dedupeCodexFiles, f as resetCommandCache, ft as splitLines, g as codex, gt as dedupKeys, h as folderTrustRoot, ht as addEntryToTotals, i as commandFor, it as kimiHomes, j as MAX_UPLOAD_BYTES, jt as PLAN_HOLD_RELEASE_MS, k as shortSha$1, kt as claudeCode, l as isBuiltInAgentId, lt as sessionsRootCandidates, m as setCustomAgents, mt as parseKimiUsageLine, n as DEFAULT_AGENT_ID$1, nt as grokHomes, o as describeAgentResolvability, ot as projectDirCandidates, p as resolveAdapter, pt as kimiDedupIdentity, q as withCommittedOffset, qt as makeHostScratchDirectory, r as cachedAgentResolvability, rt as isUsageFile, s as getAdapter, st as resolveProjectsDirs, tt as expandTilde, u as isKnownAgentId, ut as shouldEvaluateDespiteIoFailures, v as requestCodexAppServer, vt as expandAdvisorIterations, w as normalizeUpdateChannel, wt as parseJsonLine$1, x as decideUpdateStatus, xt as identityFromRelPath, y as NODE_PTY_INSTALL_SCRIPT_FLAG, yt as foldEntryIntoGenerationRollup, z as MAX_TRANSCRIPT_READ_BYTES, zt as appendUserHooks } from "./adapters-
|
|
26
|
+
import { $ as decideFileRead, $t as listClaudeGlobalConfigPathCandidates, A as openContainedFile, At as HOOK_EVENTS, B as TRACE_TAIL_SCAN_BYTES, Bt as hooksForProject, C as normalizeSha, Ct as mergeGenerationRollups, D as parseResolvedSha, Dt as totalTokensOf$1, E as parseRegistryLatest, Et as shouldReplace, F as framePathPaste, Ft as writeSessionSettings, G as planContiguousRead, Gt as upsertHook, H as completeLineBytes, Ht as rawStoredHooks, I as imageMimeForUploadFilename, It as HOOK_EVENT_CATALOG, J as codexFallbackRoots, Jt as sweepOrphanedHostScratch, K as resumeOffsetFrom, Kt as HOOK_TOOLS, L as isSafePathSegment, Lt as ID_RE, M as buildUploadFilename, Mt as buildHookSettings, N as decideUploadType, Nt as generateToken, O as pickNewestPublished, Ot as vendorUsageEntry, P as exceedsUploadCap, Pt as sweepOrphans, Q as continuationDelayMs, Qt as removalsJournalPath, R as planUploadRetention, Rt as agentHookGroupOf, S as isCheckFresh, St as isWithinGenerationRecencyWindow, T as parseRegistryDeprecation, Tt as parseUsageLine, U as containmentRefusalReason, Ut as readStoredHooks, V as committedOffsetFromTraceTailOrNull, Vt as normalizeHook, W as isOversizedPartialLine, Wt as removeHook, X as codexRootCandidates, Xt as appendRemovalRecordSync, Y as codexHomes, Yt as appendRemovalRecord, Z as codexSessionIdFromPath, Zt as recordSweptPath, _ as readHostCodexVersion, _t as emptyTotals, a as customAgentFingerprint, at as passOutcome, b as decideInstallFlavor, bt as foldReplacementIntoGenerationRollup, c as hookProfileOf, ct as scopedClaudeRoots, d as listAgentIds, dt as shouldPersistWarehouse, et as dedupeCodexFiles, f as resetCommandCache, ft as splitLines, g as codex, gt as dedupKeys, h as folderTrustRoot, ht as addEntryToTotals, i as commandFor, it as kimiHomes, j as MAX_UPLOAD_BYTES, jt as PLAN_HOLD_RELEASE_MS, k as shortSha$1, kt as claudeCode, l as isBuiltInAgentId, lt as sessionsRootCandidates, m as setCustomAgents, mt as parseKimiUsageLine, n as DEFAULT_AGENT_ID$1, nt as grokHomes, o as describeAgentResolvability, ot as projectDirCandidates, p as resolveAdapter, pt as kimiDedupIdentity, q as withCommittedOffset, qt as makeHostScratchDirectory, r as cachedAgentResolvability, rt as isUsageFile, s as getAdapter, st as resolveProjectsDirs, tt as expandTilde, u as isKnownAgentId, ut as shouldEvaluateDespiteIoFailures, v as requestCodexAppServer, vt as expandAdvisorIterations, w as normalizeUpdateChannel, wt as parseJsonLine$1, x as decideUpdateStatus, xt as identityFromRelPath, y as NODE_PTY_INSTALL_SCRIPT_FLAG, yt as foldEntryIntoGenerationRollup, z as MAX_TRANSCRIPT_READ_BYTES, zt as appendUserHooks } from "./adapters-DIL3fRTv.js";
|
|
27
27
|
import { C as matchPathPatterns, S as createTsconfigPathsResolver, T as resolveExtendsPath, d as KIMI_HOME_PROFILE, i as AGENT_HOME_PROFILES, w as parseTsconfigJsonc } from "./agent-home-core-kOGl6Fwb.js";
|
|
28
28
|
import { c as realAgentHome, d as createHeldSessionTempFolder, f as releaseSessionLock, m as trashSessionTempFolderOnceUnheld, n as generatedAgentHomePath, p as sessionIdOfLockFile, u as releaseUnheldAgentHomeSecrets } from "./agent-home-DJ4vlmD4.js";
|
|
29
29
|
import { _ as decideHostAllowed, c as approvedPackPanels, d as packRow, f as pendingPackNote, g as readCappedBody, h as parseJsonBody, l as approvedPackThemes, m as decodeHeaderText, n as readPacksForAgent, p as declaredContentLength, u as packFileHeaders } from "./pack-agent-CkB9cms5.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, u as wellKnownAgentSocketPaths } from "./ssh-signing-core-BbhBpAhR.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-
|
|
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-D7z6o2EA.js";
|
|
32
32
|
import { A as shouldTellBranchMoved, B as withPrActionRun, E as prFlowsConfig, H as withRuleRun, I as visibleRun, L as withHandled, N as teammateThreadItems, O as savedRuleFor, P as threadCandidates, R as withInterruptedRuns, S as plannedActions, T as prFlowSetup, V as withReopened, _ as itemLocation, b as packPathsOf, d as acceptReport, f as branchMovedNote, g as flaggingReviewers, h as fixLocallyPrompt, i as packsStatePath, j as sourceCandidates$1, k as scopedToRepo, l as PacksState, o as readPackDir, p as commandFingerprint, r as packDirsUnder, s as PACK_FILE_NAME, t as PACKS_DIR_NAME, v as mergeItems, w as prActionRunAfterExit, z as withOnlyOpenPrs } from "./pack-files-Cfan8-2u.js";
|
|
33
|
-
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-
|
|
33
|
+
import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-C-bA2Dag.js";
|
|
34
34
|
import { t as createPrFlowsExternal } from "./pr-flows-external-DfmjUfce.js";
|
|
35
35
|
import { createRequire } from "node:module";
|
|
36
36
|
import fs, { readFileSync } from "node:fs";
|
|
@@ -39,18 +39,19 @@ import os from "node:os";
|
|
|
39
39
|
import { z } from "zod";
|
|
40
40
|
import crypto, { createHash, randomBytes, randomInt, randomUUID } from "node:crypto";
|
|
41
41
|
import http from "node:http";
|
|
42
|
-
import net, { isIPv6 } from "node:net";
|
|
42
|
+
import net, { BlockList, isIP, isIPv6 } from "node:net";
|
|
43
43
|
import fs$1, { chmod, copyFile, lstat, mkdir, mkdtemp, open, readFile, readdir, readlink, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
44
44
|
import { pipeline } from "node:stream";
|
|
45
45
|
import express from "express";
|
|
46
46
|
import { toNodeHandler } from "@modelcontextprotocol/node";
|
|
47
47
|
import { McpServer, createMcpHandler } from "@modelcontextprotocol/server";
|
|
48
|
+
import dns from "node:dns";
|
|
49
|
+
import https from "node:https";
|
|
48
50
|
import WebSocket$1, { WebSocket, WebSocketServer } from "ws";
|
|
49
51
|
import { EventEmitter } from "node:events";
|
|
50
52
|
import pty from "node-pty";
|
|
51
53
|
import headless from "@xterm/headless";
|
|
52
54
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
53
|
-
import https from "node:https";
|
|
54
55
|
import { StringDecoder } from "node:string_decoder";
|
|
55
56
|
import { monitorEventLoopDelay } from "node:perf_hooks";
|
|
56
57
|
//#region server/core/removal-guard-core.ts
|
|
@@ -1463,6 +1464,100 @@ function decideOpenExternalRequest({ isLoopback, trust, origin, listenerPorts, t
|
|
|
1463
1464
|
};
|
|
1464
1465
|
}
|
|
1465
1466
|
//#endregion
|
|
1467
|
+
//#region server/core/link-preview-core.ts
|
|
1468
|
+
var LINK_PREVIEW_LIMITS = {
|
|
1469
|
+
maxBodyBytes: 65536,
|
|
1470
|
+
maxIconBytes: 16384,
|
|
1471
|
+
timeoutMs: 3e3,
|
|
1472
|
+
maxRedirects: 3,
|
|
1473
|
+
cacheEntries: 500,
|
|
1474
|
+
maxTitleCharacters: 200
|
|
1475
|
+
};
|
|
1476
|
+
var ICON_CONTENT_TYPES = /* @__PURE__ */ new Set([
|
|
1477
|
+
"image/png",
|
|
1478
|
+
"image/x-icon",
|
|
1479
|
+
"image/vnd.microsoft.icon",
|
|
1480
|
+
"image/gif",
|
|
1481
|
+
"image/jpeg",
|
|
1482
|
+
"image/webp",
|
|
1483
|
+
"image/svg+xml"
|
|
1484
|
+
]);
|
|
1485
|
+
var NAMED_ENTITIES = {
|
|
1486
|
+
amp: "&",
|
|
1487
|
+
lt: "<",
|
|
1488
|
+
gt: ">",
|
|
1489
|
+
quot: "\"",
|
|
1490
|
+
apos: "'",
|
|
1491
|
+
nbsp: " "
|
|
1492
|
+
};
|
|
1493
|
+
function decideLinkPreviewRequest(input) {
|
|
1494
|
+
const verdict = decideOpenExternalRequest(input);
|
|
1495
|
+
if (!verdict.ok) return verdict;
|
|
1496
|
+
if (!input.isEnabled) return {
|
|
1497
|
+
ok: false,
|
|
1498
|
+
status: 404,
|
|
1499
|
+
error: "link previews are off"
|
|
1500
|
+
};
|
|
1501
|
+
return verdict;
|
|
1502
|
+
}
|
|
1503
|
+
function decodeHtmlEntities(text) {
|
|
1504
|
+
return text.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (entity, body) => {
|
|
1505
|
+
const lowerBody = body.toLowerCase();
|
|
1506
|
+
if (lowerBody.startsWith("#x")) return codePointOrEntity(Number.parseInt(lowerBody.slice(2), 16), entity);
|
|
1507
|
+
if (lowerBody.startsWith("#")) return codePointOrEntity(Number.parseInt(lowerBody.slice(1), 10), entity);
|
|
1508
|
+
return NAMED_ENTITIES[lowerBody] ?? entity;
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
function codePointOrEntity(codePoint, entity) {
|
|
1512
|
+
if (!Number.isInteger(codePoint) || codePoint <= 0 || codePoint > 1114111) return entity;
|
|
1513
|
+
return String.fromCodePoint(codePoint);
|
|
1514
|
+
}
|
|
1515
|
+
function attributeValue(tag, attributeName) {
|
|
1516
|
+
const match = new RegExp(`\\s${attributeName}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s>]+))`, "i").exec(tag);
|
|
1517
|
+
if (!match) return null;
|
|
1518
|
+
return match[1] ?? match[2] ?? match[3] ?? null;
|
|
1519
|
+
}
|
|
1520
|
+
function resolveHttpHref(href, pageUrl) {
|
|
1521
|
+
try {
|
|
1522
|
+
const resolved = new URL(decodeHtmlEntities(href.trim()), pageUrl);
|
|
1523
|
+
if (resolved.protocol !== "http:" && resolved.protocol !== "https:") return null;
|
|
1524
|
+
return resolved.href;
|
|
1525
|
+
} catch {
|
|
1526
|
+
return null;
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
function extractTitle(htmlHead) {
|
|
1530
|
+
const match = /<title[^>]*>([\s\S]*?)<\/title>/i.exec(htmlHead);
|
|
1531
|
+
if (!match) return null;
|
|
1532
|
+
const title = decodeHtmlEntities(match[1] ?? "").replace(/\s+/g, " ").trim();
|
|
1533
|
+
if (title.length === 0) return null;
|
|
1534
|
+
return title.slice(0, LINK_PREVIEW_LIMITS.maxTitleCharacters);
|
|
1535
|
+
}
|
|
1536
|
+
function extractIconHref(htmlHead, pageUrl) {
|
|
1537
|
+
for (const tag of htmlHead.match(/<link\b[^>]*>/gi) ?? []) {
|
|
1538
|
+
if (!(attributeValue(tag, "rel")?.toLowerCase().split(/\s+/) ?? []).includes("icon")) continue;
|
|
1539
|
+
const href = attributeValue(tag, "href");
|
|
1540
|
+
if (!href) continue;
|
|
1541
|
+
const resolved = resolveHttpHref(href, pageUrl);
|
|
1542
|
+
if (resolved) return resolved;
|
|
1543
|
+
}
|
|
1544
|
+
return resolveHttpHref("/favicon.ico", pageUrl);
|
|
1545
|
+
}
|
|
1546
|
+
function extractTitleAndIconHref(htmlHead, pageUrl) {
|
|
1547
|
+
return {
|
|
1548
|
+
title: extractTitle(htmlHead),
|
|
1549
|
+
iconHref: extractIconHref(htmlHead, pageUrl)
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
function iconContentTypeOf(contentTypeHeader) {
|
|
1553
|
+
const contentType = (contentTypeHeader ?? "").split(";")[0]?.trim().toLowerCase() ?? "";
|
|
1554
|
+
return ICON_CONTENT_TYPES.has(contentType) ? contentType : null;
|
|
1555
|
+
}
|
|
1556
|
+
function isHtmlContentType(contentTypeHeader) {
|
|
1557
|
+
const contentType = (contentTypeHeader ?? "").split(";")[0]?.trim().toLowerCase() ?? "";
|
|
1558
|
+
return contentType === "text/html" || contentType === "application/xhtml+xml";
|
|
1559
|
+
}
|
|
1560
|
+
//#endregion
|
|
1466
1561
|
//#region shared/client-trust.ts
|
|
1467
1562
|
function normalizeClientTrust(trust) {
|
|
1468
1563
|
return trust === "remote" ? "remote" : "local";
|
|
@@ -2644,6 +2739,33 @@ function answerOpenExternal({ req, res, remoteListenerPort, listenerPortsFor, to
|
|
|
2644
2739
|
});
|
|
2645
2740
|
});
|
|
2646
2741
|
}
|
|
2742
|
+
function answerLinkPreview({ req, res, remoteListenerPort, listenerPortsFor, tokenMatches, isLinkPreviewEnabled, fetchLinkPreview }) {
|
|
2743
|
+
readCappedBody(req, OPEN_EXTERNAL_BODY_CAP_BYTES, () => {}).then(async (body) => {
|
|
2744
|
+
if (body === null) return;
|
|
2745
|
+
const verdict = decideLinkPreviewRequest({
|
|
2746
|
+
isLoopback: isLoopbackRequest(req),
|
|
2747
|
+
trust: classifyRequestOrigin({
|
|
2748
|
+
localPort: req.socket.localPort,
|
|
2749
|
+
remoteListenerPort
|
|
2750
|
+
}),
|
|
2751
|
+
origin: req.headers.origin,
|
|
2752
|
+
listenerPorts: listenerPortsFor(req.socket),
|
|
2753
|
+
tokenOk: tokenMatches(req.headers["x-glimmervoid-page-token"]),
|
|
2754
|
+
requestedUrl: parseJsonBody(body).url,
|
|
2755
|
+
isEnabled: isLinkPreviewEnabled()
|
|
2756
|
+
});
|
|
2757
|
+
if (!verdict.ok) {
|
|
2758
|
+
res.status(verdict.status).json({
|
|
2759
|
+
ok: false,
|
|
2760
|
+
error: verdict.error
|
|
2761
|
+
});
|
|
2762
|
+
return;
|
|
2763
|
+
}
|
|
2764
|
+
const preview = await fetchLinkPreview(verdict.url);
|
|
2765
|
+
res.setHeader("Cache-Control", "no-store");
|
|
2766
|
+
res.json(preview);
|
|
2767
|
+
});
|
|
2768
|
+
}
|
|
2647
2769
|
var BOARD_PAGE_SANDBOX_POLICY = "sandbox allow-scripts allow-popups allow-modals allow-forms";
|
|
2648
2770
|
var BOARD_MEDIA_SANDBOX_POLICY = "default-src 'none'; sandbox";
|
|
2649
2771
|
var DASHBOARD_FRAME_POLICY = "frame-src 'self' blob: data:";
|
|
@@ -2964,7 +3086,7 @@ function createAgentIngressApp(dependencies) {
|
|
|
2964
3086
|
return app;
|
|
2965
3087
|
}
|
|
2966
3088
|
function createBackendHttpApp(dependencies) {
|
|
2967
|
-
const { staticDir, customSoundsDir = resolveCustomSoundsDir(glimmervoidHomeDir$1()), configStore, remote, remoteAuth, allowedHosts, listenerPortsFor, pageToken, remoteListenerPort = null, tokenMatches = () => false, openUrlOnHost = async () => "unsupported-platform", getSession, logger = console } = dependencies;
|
|
3089
|
+
const { staticDir, customSoundsDir = resolveCustomSoundsDir(glimmervoidHomeDir$1()), configStore, remote, remoteAuth, allowedHosts, listenerPortsFor, pageToken, remoteListenerPort = null, tokenMatches = () => false, openUrlOnHost = async () => "unsupported-platform", isLinkPreviewEnabled = () => false, fetchLinkPreview = async () => ({}), getSession, logger = console } = dependencies;
|
|
2968
3090
|
const app = express();
|
|
2969
3091
|
mountHostAllowList(app, allowedHosts);
|
|
2970
3092
|
app.use((_req, res, next) => {
|
|
@@ -2998,6 +3120,17 @@ function createBackendHttpApp(dependencies) {
|
|
|
2998
3120
|
logger
|
|
2999
3121
|
});
|
|
3000
3122
|
});
|
|
3123
|
+
app.post("/link-preview", (req, res) => {
|
|
3124
|
+
answerLinkPreview({
|
|
3125
|
+
req,
|
|
3126
|
+
res,
|
|
3127
|
+
remoteListenerPort,
|
|
3128
|
+
listenerPortsFor,
|
|
3129
|
+
tokenMatches,
|
|
3130
|
+
isLinkPreviewEnabled,
|
|
3131
|
+
fetchLinkPreview
|
|
3132
|
+
});
|
|
3133
|
+
});
|
|
3001
3134
|
mountAgentIngressRoutes(app, dependencies);
|
|
3002
3135
|
mountPrActionReportRoute(app, {
|
|
3003
3136
|
getPrActionReports: dependencies.getPrActionReports ?? (() => null),
|
|
@@ -3149,6 +3282,182 @@ function createBackendHttpApp(dependencies) {
|
|
|
3149
3282
|
return app;
|
|
3150
3283
|
}
|
|
3151
3284
|
//#endregion
|
|
3285
|
+
//#region server/link-preview-fetcher.ts
|
|
3286
|
+
var REQUEST_HEADERS = {
|
|
3287
|
+
accept: "text/html,application/xhtml+xml,image/*;q=0.8",
|
|
3288
|
+
"user-agent": "Glimmervoid link preview"
|
|
3289
|
+
};
|
|
3290
|
+
var PRIVATE_IPV4_SUBNETS = [
|
|
3291
|
+
["0.0.0.0", 8],
|
|
3292
|
+
["10.0.0.0", 8],
|
|
3293
|
+
["100.64.0.0", 10],
|
|
3294
|
+
["127.0.0.0", 8],
|
|
3295
|
+
["169.254.0.0", 16],
|
|
3296
|
+
["172.16.0.0", 12],
|
|
3297
|
+
["192.0.0.0", 24],
|
|
3298
|
+
["192.168.0.0", 16],
|
|
3299
|
+
["198.18.0.0", 15],
|
|
3300
|
+
["224.0.0.0", 4],
|
|
3301
|
+
["240.0.0.0", 4]
|
|
3302
|
+
];
|
|
3303
|
+
var PRIVATE_IPV6_SUBNETS = [
|
|
3304
|
+
["::", 128],
|
|
3305
|
+
["::1", 128],
|
|
3306
|
+
["fc00::", 7],
|
|
3307
|
+
["fe80::", 10],
|
|
3308
|
+
["ff00::", 8],
|
|
3309
|
+
["64:ff9b::", 96],
|
|
3310
|
+
["2002::", 16]
|
|
3311
|
+
];
|
|
3312
|
+
var privateAddresses = new BlockList();
|
|
3313
|
+
for (const [network, prefix] of PRIVATE_IPV4_SUBNETS) privateAddresses.addSubnet(network, prefix, "ipv4");
|
|
3314
|
+
for (const [network, prefix] of PRIVATE_IPV6_SUBNETS) privateAddresses.addSubnet(network, prefix, "ipv6");
|
|
3315
|
+
var IPV4_MAPPED_PREFIX = /^::ffff:/i;
|
|
3316
|
+
function isPublicAddress(address) {
|
|
3317
|
+
const family = isIP(address);
|
|
3318
|
+
if (family === 0) return false;
|
|
3319
|
+
if (family === 4) return !privateAddresses.check(address, "ipv4");
|
|
3320
|
+
const unmapped = address.replace(IPV4_MAPPED_PREFIX, "");
|
|
3321
|
+
if (unmapped !== address && isIP(unmapped) === 4) return isPublicAddress(unmapped);
|
|
3322
|
+
if (IPV4_MAPPED_PREFIX.test(address)) return false;
|
|
3323
|
+
return !privateAddresses.check(address, "ipv6");
|
|
3324
|
+
}
|
|
3325
|
+
var REDIRECT_STATUSES = /* @__PURE__ */ new Set([
|
|
3326
|
+
301,
|
|
3327
|
+
302,
|
|
3328
|
+
303,
|
|
3329
|
+
307,
|
|
3330
|
+
308
|
|
3331
|
+
]);
|
|
3332
|
+
function guardedLookup(hostname, isAllowedAddress) {
|
|
3333
|
+
return (lookupHostname, options, callback) => {
|
|
3334
|
+
dns.lookup(lookupHostname, {
|
|
3335
|
+
all: true,
|
|
3336
|
+
family: options.family ?? 0
|
|
3337
|
+
}, (lookupError, addresses) => {
|
|
3338
|
+
if (lookupError) return callback(lookupError, "", 0);
|
|
3339
|
+
if (addresses.find((entry) => !isAllowedAddress(entry.address, hostname)) || addresses.length === 0) return callback(/* @__PURE__ */ new Error(`refused address for ${hostname}`), "", 0);
|
|
3340
|
+
if (options.all) return callback(null, addresses);
|
|
3341
|
+
const [first] = addresses;
|
|
3342
|
+
return callback(null, first?.address ?? "", first?.family ?? 0);
|
|
3343
|
+
});
|
|
3344
|
+
};
|
|
3345
|
+
}
|
|
3346
|
+
function requestOnce(url, isAllowedAddress, signal) {
|
|
3347
|
+
const hostname = url.hostname.replace(/^\[|\]$/g, "");
|
|
3348
|
+
if (isIP(hostname) !== 0 && !isAllowedAddress(hostname, hostname)) return Promise.reject(/* @__PURE__ */ new Error(`refused address ${hostname}`));
|
|
3349
|
+
const transport = url.protocol === "https:" ? https : http;
|
|
3350
|
+
const anonymousUrl = new URL(url.href);
|
|
3351
|
+
anonymousUrl.username = "";
|
|
3352
|
+
anonymousUrl.password = "";
|
|
3353
|
+
const options = {
|
|
3354
|
+
method: "GET",
|
|
3355
|
+
headers: REQUEST_HEADERS,
|
|
3356
|
+
signal,
|
|
3357
|
+
lookup: guardedLookup(hostname, isAllowedAddress),
|
|
3358
|
+
agent: false
|
|
3359
|
+
};
|
|
3360
|
+
return new Promise((resolve, reject) => {
|
|
3361
|
+
const request = transport.request(anonymousUrl, options, resolve);
|
|
3362
|
+
request.on("error", reject);
|
|
3363
|
+
request.end();
|
|
3364
|
+
});
|
|
3365
|
+
}
|
|
3366
|
+
function readCapped(response, maxBytes) {
|
|
3367
|
+
return new Promise((resolve, reject) => {
|
|
3368
|
+
const chunks = [];
|
|
3369
|
+
let receivedBytes = 0;
|
|
3370
|
+
response.on("data", (chunk) => {
|
|
3371
|
+
chunks.push(chunk);
|
|
3372
|
+
receivedBytes += chunk.length;
|
|
3373
|
+
if (receivedBytes <= maxBytes) return;
|
|
3374
|
+
response.destroy();
|
|
3375
|
+
resolve({
|
|
3376
|
+
bytes: Buffer.concat(chunks).subarray(0, maxBytes),
|
|
3377
|
+
isTruncated: true
|
|
3378
|
+
});
|
|
3379
|
+
});
|
|
3380
|
+
response.on("end", () => resolve({
|
|
3381
|
+
bytes: Buffer.concat(chunks),
|
|
3382
|
+
isTruncated: false
|
|
3383
|
+
}));
|
|
3384
|
+
response.on("error", reject);
|
|
3385
|
+
});
|
|
3386
|
+
}
|
|
3387
|
+
async function fetchCapped(startUrl, maxBytes, isAllowedAddress, signal) {
|
|
3388
|
+
let currentUrl = startUrl;
|
|
3389
|
+
for (let redirectCount = 0; redirectCount <= LINK_PREVIEW_LIMITS.maxRedirects; redirectCount += 1) {
|
|
3390
|
+
const response = await requestOnce(new URL(currentUrl), isAllowedAddress, signal);
|
|
3391
|
+
const location = response.headers.location;
|
|
3392
|
+
if (REDIRECT_STATUSES.has(response.statusCode ?? 0) && location) {
|
|
3393
|
+
response.resume();
|
|
3394
|
+
const nextUrl = normalizedHttpUrl(new URL(location, currentUrl).href);
|
|
3395
|
+
if (!nextUrl) return null;
|
|
3396
|
+
currentUrl = nextUrl;
|
|
3397
|
+
continue;
|
|
3398
|
+
}
|
|
3399
|
+
if ((response.statusCode ?? 0) < 200 || (response.statusCode ?? 0) >= 300) {
|
|
3400
|
+
response.resume();
|
|
3401
|
+
return null;
|
|
3402
|
+
}
|
|
3403
|
+
const body = await readCapped(response, maxBytes);
|
|
3404
|
+
return {
|
|
3405
|
+
finalUrl: currentUrl,
|
|
3406
|
+
contentType: response.headers["content-type"],
|
|
3407
|
+
...body
|
|
3408
|
+
};
|
|
3409
|
+
}
|
|
3410
|
+
return null;
|
|
3411
|
+
}
|
|
3412
|
+
async function fetchIconDataUrl(iconUrl, isAllowedAddress, signal) {
|
|
3413
|
+
const icon = await fetchCapped(iconUrl, LINK_PREVIEW_LIMITS.maxIconBytes, isAllowedAddress, signal);
|
|
3414
|
+
if (!icon || icon.isTruncated || icon.bytes.length === 0) return void 0;
|
|
3415
|
+
const contentType = iconContentTypeOf(icon.contentType);
|
|
3416
|
+
if (!contentType) return void 0;
|
|
3417
|
+
return `data:${contentType};base64,${icon.bytes.toString("base64")}`;
|
|
3418
|
+
}
|
|
3419
|
+
async function fetchPreviewUncached(url, isAllowedAddress) {
|
|
3420
|
+
const signal = AbortSignal.timeout(LINK_PREVIEW_LIMITS.timeoutMs);
|
|
3421
|
+
const page = await fetchCapped(url, LINK_PREVIEW_LIMITS.maxBodyBytes, isAllowedAddress, signal);
|
|
3422
|
+
if (!page) return {
|
|
3423
|
+
preview: {},
|
|
3424
|
+
isCacheable: false
|
|
3425
|
+
};
|
|
3426
|
+
if (!isHtmlContentType(page.contentType)) return {
|
|
3427
|
+
preview: {},
|
|
3428
|
+
isCacheable: true
|
|
3429
|
+
};
|
|
3430
|
+
const { title, iconHref } = extractTitleAndIconHref(page.bytes.toString("utf8"), page.finalUrl);
|
|
3431
|
+
const iconDataUrl = iconHref ? await fetchIconDataUrl(iconHref, isAllowedAddress, signal).catch(() => void 0) : void 0;
|
|
3432
|
+
return {
|
|
3433
|
+
preview: {
|
|
3434
|
+
...title ? { title } : {},
|
|
3435
|
+
...iconDataUrl ? { iconDataUrl } : {}
|
|
3436
|
+
},
|
|
3437
|
+
isCacheable: true
|
|
3438
|
+
};
|
|
3439
|
+
}
|
|
3440
|
+
function createLinkPreviewFetcher({ isAllowedAddress = (address) => isPublicAddress(address) } = {}) {
|
|
3441
|
+
const previewsByUrl = /* @__PURE__ */ new Map();
|
|
3442
|
+
return function fetchLinkPreview(url) {
|
|
3443
|
+
const cached = previewsByUrl.get(url);
|
|
3444
|
+
if (cached) return cached;
|
|
3445
|
+
const preview = fetchPreviewUncached(url, isAllowedAddress).catch(() => ({
|
|
3446
|
+
preview: {},
|
|
3447
|
+
isCacheable: false
|
|
3448
|
+
})).then((outcome) => {
|
|
3449
|
+
if (!outcome.isCacheable && previewsByUrl.get(url) === preview) previewsByUrl.delete(url);
|
|
3450
|
+
return outcome.preview;
|
|
3451
|
+
});
|
|
3452
|
+
previewsByUrl.set(url, preview);
|
|
3453
|
+
if (previewsByUrl.size > LINK_PREVIEW_LIMITS.cacheEntries) {
|
|
3454
|
+
const oldestUrl = previewsByUrl.keys().next().value;
|
|
3455
|
+
if (oldestUrl !== void 0) previewsByUrl.delete(oldestUrl);
|
|
3456
|
+
}
|
|
3457
|
+
return preview;
|
|
3458
|
+
};
|
|
3459
|
+
}
|
|
3460
|
+
//#endregion
|
|
3152
3461
|
//#region server/host-url-opener.ts
|
|
3153
3462
|
var OPENER_EXIT_WINDOW_MS = 2e3;
|
|
3154
3463
|
function createHostUrlOpener({ platform = process.platform, spawnProcess = spawn, exitWindowMs = OPENER_EXIT_WINDOW_MS, windowsSystemRoot = process.env.SystemRoot } = {}) {
|
|
@@ -58432,6 +58741,7 @@ function createUpdateApplyLane(dependencies) {
|
|
|
58432
58741
|
layout.stagePrefix,
|
|
58433
58742
|
"--no-audit",
|
|
58434
58743
|
"--no-fund",
|
|
58744
|
+
"--prefer-online",
|
|
58435
58745
|
`glimmervoid@${targetVersion}`
|
|
58436
58746
|
];
|
|
58437
58747
|
if (platform === "linux") installArgs.push(NODE_PTY_INSTALL_SCRIPT_FLAG);
|
|
@@ -60226,6 +60536,8 @@ function createBackend(httpServer, options = {}) {
|
|
|
60226
60536
|
remoteListenerPort,
|
|
60227
60537
|
tokenMatches,
|
|
60228
60538
|
openUrlOnHost: createHostUrlOpener(),
|
|
60539
|
+
isLinkPreviewEnabled: () => config.linkPreviews !== false,
|
|
60540
|
+
fetchLinkPreview: createLinkPreviewFetcher(),
|
|
60229
60541
|
getPackFile: (packName, accessKey, filePath) => laneAssembly.packStore.servableFile(packName, accessKey, filePath)
|
|
60230
60542
|
});
|
|
60231
60543
|
agentIngressServer.on("request", createAgentIngressApp(agentIngressDependencies));
|
|
@@ -551,7 +551,7 @@ async function runList() {
|
|
|
551
551
|
process.stderr.write("glimmervoid packs list reads the running Glimmervoid, so it works inside a Glimmervoid session; the operator sees the same list in Settings, Packs\n");
|
|
552
552
|
return 1;
|
|
553
553
|
}
|
|
554
|
-
const { askAgentApi } = await import("./agent-api-cli-
|
|
554
|
+
const { askAgentApi } = await import("./agent-api-cli-Hv7ZSe1j.js");
|
|
555
555
|
const reply = AGENT_REPLY_SCHEMAS.packs.safeParse(await askAgentApi("packs", { command: "list" }));
|
|
556
556
|
if (!reply.success) {
|
|
557
557
|
process.stderr.write("glimmervoid packs list: Glimmervoid did not answer with a pack list\n");
|