glimmervoid 0.47.1-next.264 → 0.47.1-next.266
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 +9 -14
- package/dist/chunks/{adapters-C8x2FwGG.js → adapters-CkgywK6b.js} +1 -1
- package/dist/chunks/{adapters-C5_5WD_j.js → adapters-Dx1U5sPa.js} +4 -40
- package/dist/chunks/{agent-api-cli-CzV01Gb-.js → agent-api-cli-BLNaCyCK.js} +5 -46
- package/dist/chunks/{agent-api-cli-BOkcZdNS.js → agent-api-cli-BgtBfEpE.js} +1 -1
- package/dist/chunks/{agent-api-core-DU8qBehJ.js → agent-api-core-B9Y8p1sI.js} +1 -1
- package/dist/chunks/agent-home-Bg2CwnwX.js +1 -0
- package/dist/chunks/{agent-home-Cc2oGNYa.js → agent-home-BzANIIVe.js} +2 -2
- package/dist/chunks/{kimi-CugQghSh.js → kimi-CXbdfj0T.js} +125 -3
- package/dist/chunks/kimi-w5wnZn8w.js +1 -0
- package/dist/chunks/{loopback-post-DZK7YibD.js → loopback-post-DgtBg6M_.js} +2 -18
- package/dist/chunks/{main-C7UI2Z_o.js → main-mJAz4Qsd.js} +204 -566
- package/dist/chunks/{path-doctor-CkYCMK5u.js → path-doctor-C23VAqeu.js} +1 -54
- package/dist/chunks/{settings-cli-CwmPM1uU.js → settings-cli-Bb8uoBUd.js} +1 -1
- package/dist/chunks/{ssh-sign-cli-Cg4QjJ_z.js → ssh-sign-cli-CCRsXp-f.js} +1 -1
- package/dist/client/assets/{alert-sound-CmTaofiX.js → alert-sound-DgoHlCku.js} +1 -1
- package/dist/client/assets/alert-sound-DgoHlCku.js.br +0 -0
- package/dist/client/assets/{benchmark-panel-Dy_K-UFv.js → benchmark-panel-DNgsmHl2.js} +1 -1
- package/dist/client/assets/benchmark-panel-DNgsmHl2.js.br +0 -0
- package/dist/client/assets/{celebration-player-R2dYoU7S.js → celebration-player-BHpV1Rf_.js} +1 -1
- package/dist/client/assets/celebration-player-BHpV1Rf_.js.br +0 -0
- package/dist/client/assets/{community-panel-BSP99fGw.js → community-panel-Ba7Ppr-s.js} +1 -1
- package/dist/client/assets/community-panel-Ba7Ppr-s.js.br +0 -0
- package/dist/client/assets/{dialogs-XhOZf5GS.js → dialogs-eQXD58rA.js} +1 -1
- package/dist/client/assets/dialogs-eQXD58rA.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-B_VqQzyw.js → doc-editor-ui-CbBWXbrp.js} +1 -1
- package/dist/client/assets/doc-editor-ui-CbBWXbrp.js.br +0 -0
- package/dist/client/assets/{feature-hint-DZjRpmwM.js → feature-hint-BM_9juah.js} +1 -1
- package/dist/client/assets/feature-hint-BM_9juah.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-BxoC8Q_9.js → first-run-checklist-B0u3xzD5.js} +1 -1
- package/dist/client/assets/first-run-checklist-B0u3xzD5.js.br +0 -0
- package/dist/client/assets/{hooks-panel-DkARrmuw.js → hooks-panel-Cek00ZhO.js} +1 -1
- package/dist/client/assets/hooks-panel-Cek00ZhO.js.br +0 -0
- package/dist/client/assets/{index-DHGkZCOH.css → index-BeOPri-2.css} +1 -1
- package/dist/client/assets/index-BeOPri-2.css.br +0 -0
- package/dist/client/assets/index-CsZNHdJT.js +78 -0
- package/dist/client/assets/index-CsZNHdJT.js.br +0 -0
- package/dist/client/assets/{issues-panel-whc7eZzz.js → issues-panel-BOeYMzEs.js} +1 -1
- package/dist/client/assets/issues-panel-BOeYMzEs.js.br +0 -0
- package/dist/client/assets/{my-prs-panel-Dwk_Rhim.js → my-prs-panel-d9RoNUfy.js} +1 -1
- package/dist/client/assets/my-prs-panel-d9RoNUfy.js.br +0 -0
- package/dist/client/assets/{nyan-cat-B8R4MjVL.js → nyan-cat-BMsZXAWE.js} +1 -1
- package/dist/client/assets/nyan-cat-BMsZXAWE.js.br +0 -0
- package/dist/client/assets/{phone-shell-XsAEAiXU.js → phone-shell-CBvfs5Q4.js} +1 -1
- package/dist/client/assets/phone-shell-CBvfs5Q4.js.br +0 -0
- package/dist/client/assets/{plan-face-GrYhKJFM.js → plan-face-Bmre1ipT.js} +1 -1
- package/dist/client/assets/plan-face-Bmre1ipT.js.br +0 -0
- package/dist/client/assets/{plan-render-BchaYjXP.js → plan-render-CSgvT2MS.js} +1 -1
- package/dist/client/assets/plan-render-CSgvT2MS.js.br +0 -0
- package/dist/client/assets/{pr-queue-columns-kcijW74X.js → pr-queue-columns-PaYWyOTi.js} +1 -1
- package/dist/client/assets/pr-queue-columns-PaYWyOTi.js.br +0 -0
- package/dist/client/assets/{radar-panel-CKBOo-ry.js → radar-panel-CsJwUtqX.js} +1 -1
- package/dist/client/assets/radar-panel-CsJwUtqX.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-CZETOJLO.js → repo-roots-adder-I_osQTym.js} +1 -1
- package/dist/client/assets/repo-roots-adder-I_osQTym.js.br +0 -0
- package/dist/client/assets/{resume-dialog-BvwH7Xe-.js → resume-dialog-BoXngMc2.js} +1 -1
- package/dist/client/assets/resume-dialog-BoXngMc2.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-vgotOTaq.js → review-queue-panel-Dx4RTtN9.js} +1 -1
- package/dist/client/assets/review-queue-panel-Dx4RTtN9.js.br +0 -0
- package/dist/client/assets/{settings-panel-C5120ymJ.js → settings-panel-DCIkcVt_.js} +2 -2
- package/dist/client/assets/settings-panel-DCIkcVt_.js.br +0 -0
- package/dist/client/assets/{shown-lightbox-B7VMa082.js → shown-lightbox-CvQpDcpX.js} +1 -1
- package/dist/client/assets/shown-lightbox-CvQpDcpX.js.br +0 -0
- package/dist/client/assets/{team-review-panel-DZVlrO2l.js → team-review-panel-D6mFydSP.js} +1 -1
- package/dist/client/assets/team-review-panel-D6mFydSP.js.br +0 -0
- package/dist/client/assets/{trace-panel-B9iCBdk_.js → trace-panel-Bfq4tBBH.js} +1 -1
- package/dist/client/assets/trace-panel-Bfq4tBBH.js.br +0 -0
- package/dist/client/assets/{usage-panel-VHTpmgPJ.js → usage-panel-CAHY96Ka.js} +1 -1
- package/dist/client/assets/usage-panel-CAHY96Ka.js.br +0 -0
- package/dist/client/index.html +2 -2
- package/dist/client/index.html.br +0 -0
- package/dist/scripts/postinstall-path-check.js +1 -8
- package/dist/server/index.js +1 -1
- package/dist/session/command-hook-relay.js +1 -1
- package/dist/session/hook-relay.js +2 -2
- package/dist/session/statusline-relay.js +1 -1
- package/package.json +1 -2
- package/dist/chunks/agent-home-BZB8hXrH.js +0 -1
- package/dist/chunks/guardrails-proxy-core-BI3rdY-m.js +0 -27
- package/dist/chunks/kimi-CZo_p-dT.js +0 -1
- package/dist/chunks/spawn-command-CQECOvjC.js +0 -134
- package/dist/client/assets/alert-sound-CmTaofiX.js.br +0 -0
- package/dist/client/assets/benchmark-panel-Dy_K-UFv.js.br +0 -0
- package/dist/client/assets/celebration-player-R2dYoU7S.js.br +0 -0
- package/dist/client/assets/community-panel-BSP99fGw.js.br +0 -0
- package/dist/client/assets/dialogs-XhOZf5GS.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-B_VqQzyw.js.br +0 -0
- package/dist/client/assets/feature-hint-DZjRpmwM.js.br +0 -0
- package/dist/client/assets/first-run-checklist-BxoC8Q_9.js.br +0 -0
- package/dist/client/assets/hooks-panel-DkARrmuw.js.br +0 -0
- package/dist/client/assets/index-DHGkZCOH.css.br +0 -0
- package/dist/client/assets/index-DaPFBz4x.js +0 -78
- package/dist/client/assets/index-DaPFBz4x.js.br +0 -0
- package/dist/client/assets/issues-panel-whc7eZzz.js.br +0 -0
- package/dist/client/assets/my-prs-panel-Dwk_Rhim.js.br +0 -0
- package/dist/client/assets/nyan-cat-B8R4MjVL.js.br +0 -0
- package/dist/client/assets/phone-shell-XsAEAiXU.js.br +0 -0
- package/dist/client/assets/plan-face-GrYhKJFM.js.br +0 -0
- package/dist/client/assets/plan-render-BchaYjXP.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-kcijW74X.js.br +0 -0
- package/dist/client/assets/radar-panel-CKBOo-ry.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-CZETOJLO.js.br +0 -0
- package/dist/client/assets/resume-dialog-BvwH7Xe-.js.br +0 -0
- package/dist/client/assets/review-queue-panel-vgotOTaq.js.br +0 -0
- package/dist/client/assets/settings-panel-C5120ymJ.js.br +0 -0
- package/dist/client/assets/shown-lightbox-B7VMa082.js.br +0 -0
- package/dist/client/assets/team-review-panel-DZVlrO2l.js.br +0 -0
- package/dist/client/assets/trace-panel-B9iCBdk_.js.br +0 -0
- package/dist/client/assets/usage-panel-VHTpmgPJ.js.br +0 -0
- package/dist/session/guardrails-open-launcher.js +0 -145
package/dist/bin/glimmervoid.js
CHANGED
|
@@ -5,10 +5,10 @@ import { a as packageRoot } from "../chunks/runtime-paths-D_ZjJLE0.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-Bea8RPJ5.js";
|
|
7
7
|
import { a as execSync } from "../chunks/child-process-safe-BCOoKfxG.js";
|
|
8
|
-
import { r as agentCommandHelpLines } from "../chunks/agent-api-core-
|
|
8
|
+
import { r as agentCommandHelpLines } from "../chunks/agent-api-core-B9Y8p1sI.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-BvibrGvo.js";
|
|
11
|
-
import {
|
|
11
|
+
import { i as pnpmGlobalBinDir, n as npmGlobalBinDir, r as onPath, t as formatPathNotice } from "../chunks/path-doctor-C23VAqeu.js";
|
|
12
12
|
import fs from "node:fs";
|
|
13
13
|
import path from "node:path";
|
|
14
14
|
import os from "node:os";
|
|
@@ -65,17 +65,17 @@ var OWN_SUBCOMMAND_RUNNERS = [
|
|
|
65
65
|
return runAgentSetupCli(subcommandArgs);
|
|
66
66
|
}],
|
|
67
67
|
["settings", async (subcommandArgs) => {
|
|
68
|
-
const { runSettingsCli } = await import("../chunks/settings-cli-
|
|
68
|
+
const { runSettingsCli } = await import("../chunks/settings-cli-Bb8uoBUd.js");
|
|
69
69
|
return runSettingsCli(subcommandArgs);
|
|
70
70
|
}],
|
|
71
71
|
["ssh-sign", async (subcommandArgs) => {
|
|
72
|
-
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-
|
|
72
|
+
const { runSshSignCli } = await import("../chunks/ssh-sign-cli-CCRsXp-f.js");
|
|
73
73
|
return runSshSignCli(subcommandArgs);
|
|
74
74
|
}]
|
|
75
75
|
];
|
|
76
76
|
var ownSubcommandNames = new Set(OWN_SUBCOMMAND_RUNNERS.map(([name]) => name));
|
|
77
77
|
var SUBCOMMAND_RUNNERS = new Map([...OWN_SUBCOMMAND_RUNNERS, ...AGENT_API_VERBS.filter((verb) => !ownSubcommandNames.has(verb)).map((verb) => [verb, async (subcommandArgs, subcommandName) => {
|
|
78
|
-
const { runAgentApiCli } = await import("../chunks/agent-api-cli-
|
|
78
|
+
const { runAgentApiCli } = await import("../chunks/agent-api-cli-BgtBfEpE.js");
|
|
79
79
|
return runAgentApiCli([subcommandName, ...subcommandArgs]);
|
|
80
80
|
}])]);
|
|
81
81
|
var AGENT_INSTALL_COMMAND_BY_ID = {
|
|
@@ -89,7 +89,7 @@ function missingAgentText(agentId) {
|
|
|
89
89
|
}
|
|
90
90
|
async function printSessionLimits() {
|
|
91
91
|
if (!process.env["GLIMMERVOID_AGENT_URL"]) return;
|
|
92
|
-
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-
|
|
92
|
+
const { sessionLimitsHelpLines } = await import("../chunks/agent-api-cli-BgtBfEpE.js");
|
|
93
93
|
const limitsLines = await sessionLimitsHelpLines();
|
|
94
94
|
console.log(`\n${limitsLines.join("\n")}`);
|
|
95
95
|
}
|
|
@@ -222,7 +222,7 @@ async function runDoctor() {
|
|
|
222
222
|
}
|
|
223
223
|
switchSection("Agents");
|
|
224
224
|
try {
|
|
225
|
-
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-
|
|
225
|
+
const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-CkgywK6b.js");
|
|
226
226
|
const declaredCustomAgents = await readDeclaredCustomAgents();
|
|
227
227
|
if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
|
|
228
228
|
setCustomAgents(declaredCustomAgents.declared);
|
|
@@ -233,8 +233,8 @@ async function runDoctor() {
|
|
|
233
233
|
const { inspectGrokAgentSetup } = await import("../chunks/agent-setup-cli-CBbNJvmM.js");
|
|
234
234
|
const grokSetup = inspectGrokAgentSetup();
|
|
235
235
|
line("grok hook setup", `${grokSetup.classification}: ${grokSetup.filePath}`);
|
|
236
|
-
const { default: kimi } = await import("../chunks/kimi-
|
|
237
|
-
const { describeAgentHome } = await import("../chunks/agent-home-
|
|
236
|
+
const { default: kimi } = await import("../chunks/kimi-w5wnZn8w.js");
|
|
237
|
+
const { describeAgentHome } = await import("../chunks/agent-home-Bg2CwnwX.js");
|
|
238
238
|
const { KIMI_HOME_PROFILE } = await import("../chunks/agent-home-core-CgoT45SE.js");
|
|
239
239
|
line("kimi home", describeAgentHome(KIMI_HOME_PROFILE, kimi.expectedHooksBlock()));
|
|
240
240
|
} catch (err) {
|
|
@@ -264,11 +264,6 @@ async function runDoctor() {
|
|
|
264
264
|
line("reason", nodePty.reason);
|
|
265
265
|
line("hint", nodePtyRebuildHint(platform));
|
|
266
266
|
}
|
|
267
|
-
switchSection("Guardrails");
|
|
268
|
-
for (const [label, value] of guardrailsDoctorRows(probeGuardrailsDependencies({
|
|
269
|
-
platform,
|
|
270
|
-
exec: execSync
|
|
271
|
-
}))) line(label, value);
|
|
272
267
|
switchSection("Git");
|
|
273
268
|
for (const [label, value] of gitDoctorRows(probeGitVersion())) line(label, value);
|
|
274
269
|
switchSection("Config");
|
|
@@ -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-Dx1U5sPa.js";
|
|
@@ -5,7 +5,6 @@ import { c as spawn, i as execFileSync, r as execFileAsync } from "./child-proce
|
|
|
5
5
|
import { Dt as UpdateChannel, c as SHELL_AGENT_ID, x as InstallFlavor } from "./config-Bf3aImLn.js";
|
|
6
6
|
import { o as supervisionLine } from "./session-routes-BTMSVce8.js";
|
|
7
7
|
import { a as rawTextOr, o as textOr, r as numberOr } from "./coerce-oz_Z_6E7.js";
|
|
8
|
-
import { n as resolveAgentCommand, t as buildAgentSpawnCommand } from "./spawn-command-CQECOvjC.js";
|
|
9
8
|
import { n as parseJsonRecord } from "./json-core-If8h-Qgy.js";
|
|
10
9
|
import { i as saneYoloEnv, r as SANE_YOLO_PATH_ENV, t as CODEX_SANE_YOLO_FLAVOR } from "./sane-yolo-BjUkqIoH.js";
|
|
11
10
|
import { t as buildAgentEnv } from "./spawn-env-n2RVkMxc.js";
|
|
@@ -13,9 +12,9 @@ import { t as buildHookCommand } from "./hook-command-core-qTNK-xMF.js";
|
|
|
13
12
|
import { i as isSpinnerChar, n as classifyAgentTitle, r as isBrailleChar, t as grok } from "./grok-B5dS28Ox.js";
|
|
14
13
|
import { O as nextBackoffMs } from "./json-file-AKRVPqG1.js";
|
|
15
14
|
import { n as isExperimentalBuild, t as compareReleaseVersions } from "./build-channel-5BUVzH7i.js";
|
|
15
|
+
import { n as buildAgentSpawnCommand, r as resolveAgentCommand, t as kimi } from "./kimi-CXbdfj0T.js";
|
|
16
16
|
import { c as CODEX_HOME_PROFILE, f as renderCodexHookTables, n as AGENT_HOME_CONFIG_NAME, p as renderCodexHooksBlock } from "./agent-home-core-DgW3orTE.js";
|
|
17
|
-
import {
|
|
18
|
-
import { t as kimi } from "./kimi-CugQghSh.js";
|
|
17
|
+
import { c as releaseAgentHome, i as holdPreparedAgentHome, n as generatedAgentHomePath, s as realAgentHome } from "./agent-home-BzANIIVe.js";
|
|
19
18
|
import fs from "node:fs";
|
|
20
19
|
import path from "node:path";
|
|
21
20
|
import os from "node:os";
|
|
@@ -138,28 +137,6 @@ function buildEnv$2(baseEnv, extraEnv, options) {
|
|
|
138
137
|
return buildAgentEnv(baseEnv, extraEnv, envProfile$3, options);
|
|
139
138
|
}
|
|
140
139
|
var settingsArgs = (settingsPath) => ["--settings", settingsPath];
|
|
141
|
-
var SESSION_ID_FLAG = "--session-id";
|
|
142
|
-
function requestedSessionId(extraArgs) {
|
|
143
|
-
const flagIndex = extraArgs.indexOf(SESSION_ID_FLAG);
|
|
144
|
-
if (flagIndex !== -1) return extraArgs[flagIndex + 1] ?? null;
|
|
145
|
-
const assignment = extraArgs.find((argument) => argument.startsWith(`${SESSION_ID_FLAG}=`));
|
|
146
|
-
return assignment ? assignment.slice(13) : null;
|
|
147
|
-
}
|
|
148
|
-
function launchSessionId({ resumeSessionId, extraArgs, generatedId }) {
|
|
149
|
-
const knownSessionId = resumeSessionId ?? requestedSessionId(extraArgs);
|
|
150
|
-
if (knownSessionId) return {
|
|
151
|
-
agentSessionId: knownSessionId,
|
|
152
|
-
extraArgs: [...extraArgs]
|
|
153
|
-
};
|
|
154
|
-
return {
|
|
155
|
-
agentSessionId: generatedId,
|
|
156
|
-
extraArgs: [
|
|
157
|
-
...extraArgs,
|
|
158
|
-
SESSION_ID_FLAG,
|
|
159
|
-
generatedId
|
|
160
|
-
]
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
140
|
var APPEND_SYSTEM_PROMPT_FLAG = "--append-system-prompt";
|
|
164
141
|
var APPENDED_SYSTEM_PROMPT_FLAGS = Object.freeze([APPEND_SYSTEM_PROMPT_FLAG, "--append-system-prompt-file"]);
|
|
165
142
|
function isAppendedSystemPromptArgument(launchArgument) {
|
|
@@ -194,7 +171,6 @@ var claudeCode = {
|
|
|
194
171
|
buildEnv: buildEnv$2,
|
|
195
172
|
buildArgs: buildArgs$2,
|
|
196
173
|
settingsArgs,
|
|
197
|
-
launchSessionId,
|
|
198
174
|
capabilities: {
|
|
199
175
|
hooks: true,
|
|
200
176
|
awaitingInput: true,
|
|
@@ -1860,18 +1836,6 @@ var SKIP_PERMISSIONS_ARGS = [
|
|
|
1860
1836
|
"-s",
|
|
1861
1837
|
"workspace-write"
|
|
1862
1838
|
];
|
|
1863
|
-
var OUTER_GUARDRAILS_ARGS = ["-s", "danger-full-access"];
|
|
1864
|
-
var OUTER_GUARDRAILS_SKIP_PERMISSIONS_ARGS = [
|
|
1865
|
-
"-a",
|
|
1866
|
-
"never",
|
|
1867
|
-
...OUTER_GUARDRAILS_ARGS
|
|
1868
|
-
];
|
|
1869
|
-
function permissionArgs(dangerouslySkipPermissions, hasOuterGuardrails) {
|
|
1870
|
-
if (hasOuterGuardrails && dangerouslySkipPermissions) return OUTER_GUARDRAILS_SKIP_PERMISSIONS_ARGS;
|
|
1871
|
-
if (hasOuterGuardrails) return OUTER_GUARDRAILS_ARGS;
|
|
1872
|
-
if (dangerouslySkipPermissions) return SKIP_PERMISSIONS_ARGS;
|
|
1873
|
-
return [];
|
|
1874
|
-
}
|
|
1875
1839
|
var OPERATOR_CONFIG_FILE_NAME = "config.toml";
|
|
1876
1840
|
var DEVELOPER_INSTRUCTIONS_KEY = "developer_instructions";
|
|
1877
1841
|
var DEVELOPER_INSTRUCTIONS_DECLARATION_RE = /^[^\S\r\n]*["']?developer_instructions["']?[^\S\r\n]*=/m;
|
|
@@ -1886,11 +1850,11 @@ function setsOperatorInstructions(operatorConfigText) {
|
|
|
1886
1850
|
function isDeveloperInstructionsOverride(launchArgument) {
|
|
1887
1851
|
return launchArgument.startsWith(`${DEVELOPER_INSTRUCTIONS_KEY}=`);
|
|
1888
1852
|
}
|
|
1889
|
-
function buildArgs$1({ dangerouslySkipPermissions = false, resumeSessionId = null, extraArgs = [], initialPrompt = null,
|
|
1853
|
+
function buildArgs$1({ dangerouslySkipPermissions = false, resumeSessionId = null, extraArgs = [], initialPrompt = null, hasOperatorInstructions = false, canRunHelpCommand = true, canSpawn = false } = {}) {
|
|
1890
1854
|
const args = [...UPDATE_CHECK_ARGS];
|
|
1891
1855
|
if (canRunHelpCommand && !hasOperatorInstructions && !extraArgs.some(isDeveloperInstructionsOverride)) args.push("-c", `${DEVELOPER_INSTRUCTIONS_KEY}='''${supervisionLine({ canSpawn })}'''`);
|
|
1892
1856
|
if (resumeSessionId) args.push("resume", resumeSessionId);
|
|
1893
|
-
args.push(...
|
|
1857
|
+
if (dangerouslySkipPermissions) args.push(...SKIP_PERMISSIONS_ARGS);
|
|
1894
1858
|
if (extraArgs.length > 0) args.push(...extraArgs);
|
|
1895
1859
|
if (initialPrompt != null) args.push(initialPrompt);
|
|
1896
1860
|
return args;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { t as errorCode } from "./text-DoirglWV.js";
|
|
2
1
|
import { l as AgentLimitsReply, r as AGENT_URL_ENV } from "./session-Bea8RPJ5.js";
|
|
3
2
|
import { i as formatSessionLimits } from "./session-routes-BTMSVce8.js";
|
|
4
|
-
import { p as isAgentApiVerb, t as AGENT_COMMAND_HELP } from "./agent-api-core-
|
|
3
|
+
import { p as isAgentApiVerb, t as AGENT_COMMAND_HELP } from "./agent-api-core-B9Y8p1sI.js";
|
|
5
4
|
import { i as resolveHookTarget } from "./hook-relay-core-DA_bz2KA.js";
|
|
6
|
-
import { n as decideGuardrailsProxy } from "./guardrails-proxy-core-BI3rdY-m.js";
|
|
7
5
|
import { t as parseJsonOrNull } from "./json-core-If8h-Qgy.js";
|
|
8
6
|
import { r as describeOverCap } from "./shown-files-core-D2HvpYbu.js";
|
|
9
7
|
import fs from "node:fs";
|
|
@@ -169,31 +167,8 @@ function requestOverHttp(target, deadline, sendBody) {
|
|
|
169
167
|
sendBody(request);
|
|
170
168
|
});
|
|
171
169
|
}
|
|
172
|
-
function guardrailsProxyTarget(guardrailsProxy, endpoint, headers) {
|
|
173
|
-
const proxyHeaders = guardrailsProxy.authorization ? { "proxy-authorization": guardrailsProxy.authorization } : {};
|
|
174
|
-
return {
|
|
175
|
-
hostname: guardrailsProxy.hostname,
|
|
176
|
-
port: String(guardrailsProxy.port),
|
|
177
|
-
path: endpoint.href,
|
|
178
|
-
headers: {
|
|
179
|
-
...headers,
|
|
180
|
-
...proxyHeaders,
|
|
181
|
-
host: endpoint.host
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
function postThroughGuardrailsProxy(guardrailsProxy, { endpoint, headers, bodyText, deadline }) {
|
|
186
|
-
return requestOverHttp(guardrailsProxyTarget(guardrailsProxy, endpoint, {
|
|
187
|
-
...headers,
|
|
188
|
-
"content-length": String(Buffer.byteLength(bodyText))
|
|
189
|
-
}), deadline, (request) => request.end(bodyText));
|
|
190
|
-
}
|
|
191
|
-
function wasConnectionRefused(error) {
|
|
192
|
-
if (errorCode(error) === "ECONNREFUSED") return true;
|
|
193
|
-
return errorCode(error?.cause) === "ECONNREFUSED";
|
|
194
|
-
}
|
|
195
170
|
async function postToAgentIngress({ endpoint, token, body, deadline = null }) {
|
|
196
|
-
|
|
171
|
+
return postDirectly({
|
|
197
172
|
endpoint,
|
|
198
173
|
headers: {
|
|
199
174
|
"content-type": "application/json",
|
|
@@ -201,15 +176,7 @@ async function postToAgentIngress({ endpoint, token, body, deadline = null }) {
|
|
|
201
176
|
},
|
|
202
177
|
bodyText: JSON.stringify(body),
|
|
203
178
|
deadline
|
|
204
|
-
};
|
|
205
|
-
try {
|
|
206
|
-
return await postDirectly(post);
|
|
207
|
-
} catch (error) {
|
|
208
|
-
if (!wasConnectionRefused(error)) throw error;
|
|
209
|
-
const guardrailsProxy = decideGuardrailsProxy(process.env);
|
|
210
|
-
if (!guardrailsProxy) throw error;
|
|
211
|
-
return postThroughGuardrailsProxy(guardrailsProxy, post);
|
|
212
|
-
}
|
|
179
|
+
});
|
|
213
180
|
}
|
|
214
181
|
async function sessionLimitsHelpLines({ timeoutMs = HELP_LIMITS_TIMEOUT_MS } = {}) {
|
|
215
182
|
const rawUrl = process.env[AGENT_URL_ENV];
|
|
@@ -279,20 +246,12 @@ function streamFileBody(filePath) {
|
|
|
279
246
|
}
|
|
280
247
|
async function postFileToShow(endpoint, token, file, caption) {
|
|
281
248
|
const headers = showHeaders(token, file, caption);
|
|
282
|
-
|
|
249
|
+
return requestOverHttp({
|
|
283
250
|
hostname: endpoint.hostname,
|
|
284
251
|
port: endpoint.port,
|
|
285
252
|
path: `${endpoint.pathname}${endpoint.search}`,
|
|
286
253
|
headers
|
|
287
|
-
};
|
|
288
|
-
try {
|
|
289
|
-
return await requestOverHttp(directTarget, null, streamFileBody(file.filePath));
|
|
290
|
-
} catch (error) {
|
|
291
|
-
if (!wasConnectionRefused(error)) throw error;
|
|
292
|
-
const guardrailsProxy = decideGuardrailsProxy(process.env);
|
|
293
|
-
if (!guardrailsProxy) throw error;
|
|
294
|
-
return requestOverHttp(guardrailsProxyTarget(guardrailsProxy, endpoint, headers), null, streamFileBody(file.filePath));
|
|
295
|
-
}
|
|
254
|
+
}, null, streamFileBody(file.filePath));
|
|
296
255
|
}
|
|
297
256
|
function replyError(replyText) {
|
|
298
257
|
const reply = parseJsonOrNull(replyText);
|
|
@@ -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-BLNaCyCK.js";
|
|
@@ -881,4 +881,4 @@ function agentCommandHelpLines() {
|
|
|
881
881
|
return Object.values(AGENT_COMMAND_HELP).map(({ usage, summary }) => ` ${usage.padEnd(Math.max(USAGE_COLUMN_WIDTH, usage.length + 1))}${summary}`);
|
|
882
882
|
}
|
|
883
883
|
//#endregion
|
|
884
|
-
export { parseRefinedTaskTitle as A, shouldAdoptReportedResumeId as B, extractAiTitle as C, isSelfWakePrompt as D, extractPromptTaskTitle as E, RESUME_ID_RE as F,
|
|
884
|
+
export { parseRefinedTaskTitle as A, shouldAdoptReportedResumeId as B, extractAiTitle as C, isSelfWakePrompt as D, extractPromptTaskTitle as E, RESUME_ID_RE as F, nextSuggestedName as G, listRepoConversations as H, isConversationReplacedAtStartup as I, pickAutoResume as L, resolveTaskTitle as M, seedTaskTitleSources as N, isSubstantivePrompt as O, AUTO_CONTINUE_PROMPT as P, resolveResumeTarget as R, decideTaskTitleRefinement as S, extractOscTaskTitle as T, listRepoWorktreePaths as U, claudeProjectsDir as V, isAutoNameOf as W, projectReviews as _, decideAgentRequest as a, chooseRefinedSessionName as b, describeChildEndNote as c, describeRoleRefusal as d, describeUnpushedCloseRefusal as f, projectReviewDetail as g, projectMyPrs as h, checkAgentReply as i, resolveRefocusTaskTitle as j, parseRefinedSessionName as k, describeKeptChildAttention as l, parseAgentVerb as m, REFUSAL_REASON as n, decideSpawnAllowance as o, isAgentApiVerb as p, agentCommandHelpLines as r, deriveChildSessionName as s, AGENT_COMMAND_HELP as t, describePushLanding as u, buildPersistedTaskTitle as v, extractHookTaskTitle as w, cleanTaskPrompt as x, buildTaskTitleRefinementPrompt as y, resumePromptFor as z };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as describeAgentHome } from "./agent-home-BzANIIVe.js";
|
|
@@ -7,7 +7,7 @@ import fs, { closeSync, mkdirSync, openSync, readdirSync, renameSync, rmSync, un
|
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import os from "node:os";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
|
-
//#region server/
|
|
10
|
+
//#region server/session-temp/session-temp-locks.ts
|
|
11
11
|
var LOCK_FILE_SUFFIX = ".lock";
|
|
12
12
|
var SESSION_TEMP_GATE_FILE_NAME = "session-temp.gate";
|
|
13
13
|
var TRASH_FOLDER_PREFIX = ".deleting-";
|
|
@@ -577,4 +577,4 @@ function releaseUnheldAgentHomeSecrets(generatedHome) {
|
|
|
577
577
|
releaseSecretsUnlessHeldElsewhere(generatedHome, { whenLocksMissing: "keep" });
|
|
578
578
|
}
|
|
579
579
|
//#endregion
|
|
580
|
-
export {
|
|
580
|
+
export { prepareAgentHome as a, releaseAgentHome as c, releaseSessionLock as d, sessionIdOfLockFile as f, holdPreparedAgentHome as i, releaseUnheldAgentHomeSecrets as l, generatedAgentHomePath as n, prepareScratchAgentHome as o, trashSessionTempFolderOnceUnheld as p, holdAgentHome as r, realAgentHome as s, describeAgentHome as t, createHeldSessionTempFolder as u };
|
|
@@ -1,14 +1,136 @@
|
|
|
1
1
|
import { o as relayPath } from "./runtime-paths-D_ZjJLE0.js";
|
|
2
2
|
import { i as ASK_USER_QUESTION_TOOL_NAME } from "./session-Bea8RPJ5.js";
|
|
3
3
|
import { i as execFileSync } from "./child-process-safe-BCOoKfxG.js";
|
|
4
|
-
import { n as resolveAgentCommand, t as buildAgentSpawnCommand } from "./spawn-command-CQECOvjC.js";
|
|
5
4
|
import { n as KIMI_SANE_YOLO_FLAVOR } from "./sane-yolo-BjUkqIoH.js";
|
|
6
5
|
import { t as buildAgentEnv } from "./spawn-env-n2RVkMxc.js";
|
|
7
6
|
import { l as KIMI_HOME_PROFILE, m as renderKimiHooksBlock } from "./agent-home-core-DgW3orTE.js";
|
|
8
|
-
import {
|
|
7
|
+
import { c as releaseAgentHome, i as holdPreparedAgentHome, o as prepareScratchAgentHome, s as realAgentHome } from "./agent-home-BzANIIVe.js";
|
|
9
8
|
import fs from "node:fs";
|
|
10
9
|
import path from "node:path";
|
|
11
10
|
import { createHash } from "node:crypto";
|
|
11
|
+
//#region session/core/spawn-command.ts
|
|
12
|
+
function classifyCommandKind(resolvedPath) {
|
|
13
|
+
if (!resolvedPath) return "unresolved";
|
|
14
|
+
const ext = (resolvedPath.match(/\.[^.\\/]+$/) || [""])[0].toLowerCase();
|
|
15
|
+
return ext === ".exe" || ext === ".com" ? "exe" : "shim";
|
|
16
|
+
}
|
|
17
|
+
function dedupePathMatches(matches, platform = process.platform) {
|
|
18
|
+
const pathApi = platform === "win32" ? path.win32 : path.posix;
|
|
19
|
+
const seen = /* @__PURE__ */ new Set();
|
|
20
|
+
const unique = [];
|
|
21
|
+
for (const candidate of matches) {
|
|
22
|
+
let normalized = pathApi.normalize(candidate.trim());
|
|
23
|
+
if (normalized.length > 1) normalized = normalized.replace(/[\\/]+$/, "");
|
|
24
|
+
const key = platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
25
|
+
if (seen.has(key)) continue;
|
|
26
|
+
seen.add(key);
|
|
27
|
+
unique.push(normalized);
|
|
28
|
+
}
|
|
29
|
+
return unique;
|
|
30
|
+
}
|
|
31
|
+
var PATH_PROBE_OPTIONS = {
|
|
32
|
+
encoding: "utf8",
|
|
33
|
+
stdio: [
|
|
34
|
+
"ignore",
|
|
35
|
+
"pipe",
|
|
36
|
+
"ignore"
|
|
37
|
+
],
|
|
38
|
+
timeout: 2e3
|
|
39
|
+
};
|
|
40
|
+
function pathProbesFor(name, platform) {
|
|
41
|
+
if (platform === "win32") return [{
|
|
42
|
+
file: "where",
|
|
43
|
+
args: [name]
|
|
44
|
+
}];
|
|
45
|
+
return [{
|
|
46
|
+
file: "which",
|
|
47
|
+
args: ["-a", name]
|
|
48
|
+
}, {
|
|
49
|
+
file: "sh",
|
|
50
|
+
args: [
|
|
51
|
+
"-c",
|
|
52
|
+
"command -v \"$1\"",
|
|
53
|
+
"sh",
|
|
54
|
+
name
|
|
55
|
+
]
|
|
56
|
+
}];
|
|
57
|
+
}
|
|
58
|
+
function resolveCommandMatches(name, { platform, runProbe }) {
|
|
59
|
+
for (const probe of pathProbesFor(name, platform)) {
|
|
60
|
+
let matches = [];
|
|
61
|
+
try {
|
|
62
|
+
matches = dedupePathMatches(runProbe(probe).split(/\r?\n/).filter((line) => line.trim()), platform);
|
|
63
|
+
} catch {
|
|
64
|
+
matches = [];
|
|
65
|
+
}
|
|
66
|
+
if (matches.length > 0) return matches;
|
|
67
|
+
}
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
function resolveArgvCommandMatches(name, { platform, execFile }) {
|
|
71
|
+
return resolveCommandMatches(name, {
|
|
72
|
+
platform,
|
|
73
|
+
runProbe: (probe) => execFile(probe.file, probe.args, PATH_PROBE_OPTIONS)
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function isAbsoluteCommandPath(name, platform) {
|
|
77
|
+
return (platform === "win32" ? path.win32 : path.posix).isAbsolute(name);
|
|
78
|
+
}
|
|
79
|
+
function resolveAgentCommand({ name, platform = process.platform, execFile, pathExists }) {
|
|
80
|
+
if (isAbsoluteCommandPath(name, platform)) {
|
|
81
|
+
if (typeof pathExists !== "function") throw new TypeError("resolveAgentCommand requires a pathExists probe for an absolute command");
|
|
82
|
+
if (pathExists(name)) return {
|
|
83
|
+
path: name,
|
|
84
|
+
kind: classifyCommandKind(name)
|
|
85
|
+
};
|
|
86
|
+
console.warn(`[glimmervoid] could not resolve '${name}'`);
|
|
87
|
+
return {
|
|
88
|
+
path: null,
|
|
89
|
+
kind: "unresolved"
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
if (typeof execFile !== "function") throw new TypeError("resolveAgentCommand requires an execFile function");
|
|
93
|
+
const matches = resolveArgvCommandMatches(name, {
|
|
94
|
+
platform,
|
|
95
|
+
execFile
|
|
96
|
+
});
|
|
97
|
+
if (matches.length === 0) {
|
|
98
|
+
console.warn(`[glimmervoid] could not resolve '${name}'`);
|
|
99
|
+
return {
|
|
100
|
+
path: null,
|
|
101
|
+
kind: "unresolved"
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
const resolvedPath = matches[0];
|
|
105
|
+
if (process.env.GLIMMERVOID_DEBUG_SPAWN) console.log(`[glimmervoid] resolved '${name}' (first match wins): ${resolvedPath}`);
|
|
106
|
+
if (matches.length > 1) console.warn(`[glimmervoid] multiple '${name}' on PATH (Bun shim risk):\n ${matches.join("\n ")}`);
|
|
107
|
+
const kind = classifyCommandKind(resolvedPath);
|
|
108
|
+
if (platform === "win32") console.log(`[glimmervoid] ${name} spawn strategy: ${kind === "exe" ? "direct exe" : "cmd.exe shim fallback"}`);
|
|
109
|
+
return {
|
|
110
|
+
path: resolvedPath,
|
|
111
|
+
kind
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function buildAgentSpawnCommand({ name, platform, resolved, argGroups = [] }) {
|
|
115
|
+
const childArgs = argGroups.flatMap((group) => group || []);
|
|
116
|
+
if (platform !== "win32") return {
|
|
117
|
+
file: name,
|
|
118
|
+
args: childArgs
|
|
119
|
+
};
|
|
120
|
+
if (resolved && resolved.kind === "exe" && resolved.path) return {
|
|
121
|
+
file: resolved.path,
|
|
122
|
+
args: childArgs
|
|
123
|
+
};
|
|
124
|
+
return {
|
|
125
|
+
file: "cmd.exe",
|
|
126
|
+
args: [
|
|
127
|
+
"/c",
|
|
128
|
+
name,
|
|
129
|
+
...childArgs
|
|
130
|
+
]
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
12
134
|
//#region session/adapters/kimi.ts
|
|
13
135
|
var ID = "kimi";
|
|
14
136
|
var COMMAND_NAME = "kimi";
|
|
@@ -245,4 +367,4 @@ var kimi = {
|
|
|
245
367
|
}
|
|
246
368
|
};
|
|
247
369
|
//#endregion
|
|
248
|
-
export { kimi as t };
|
|
370
|
+
export { resolveArgvCommandMatches as i, buildAgentSpawnCommand as n, resolveAgentCommand as r, kimi as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as default } from "./kimi-CXbdfj0T.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { a as isLoopbackHostname } from "./hook-relay-core-DA_bz2KA.js";
|
|
2
|
-
import { n as decideGuardrailsProxy } from "./guardrails-proxy-core-BI3rdY-m.js";
|
|
3
2
|
//#region session/loopback-post.ts
|
|
4
3
|
var POST_TIMEOUT_MS = 1500;
|
|
5
4
|
var http = process.getBuiltinModule("node:http");
|
|
@@ -16,18 +15,6 @@ function directRoute(target) {
|
|
|
16
15
|
path: `${target.pathname}${target.search}`
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
|
-
function guardrailsProxyRoute(guardrailsProxy, target) {
|
|
20
|
-
const proxyHeaders = guardrailsProxy.authorization ? { "proxy-authorization": guardrailsProxy.authorization } : {};
|
|
21
|
-
return {
|
|
22
|
-
hostname: guardrailsProxy.hostname,
|
|
23
|
-
port: guardrailsProxy.port,
|
|
24
|
-
path: target.href,
|
|
25
|
-
headers: {
|
|
26
|
-
...proxyHeaders,
|
|
27
|
-
host: target.host
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
18
|
function sendPost(route, body) {
|
|
32
19
|
return new Promise((resolve) => {
|
|
33
20
|
let settled = false;
|
|
@@ -76,15 +63,12 @@ function sendPost(route, body) {
|
|
|
76
63
|
}
|
|
77
64
|
});
|
|
78
65
|
}
|
|
79
|
-
async function postToLoopback(url, body
|
|
66
|
+
async function postToLoopback(url, body) {
|
|
80
67
|
if (!URL.canParse(url)) return refusal("bad-url");
|
|
81
68
|
const target = new URL(url);
|
|
82
69
|
if (target.protocol !== "http:") return refusal("not-http");
|
|
83
70
|
if (!isLoopbackHostname(target.hostname)) return refusal("not-loopback");
|
|
84
|
-
|
|
85
|
-
const guardrailsProxy = decideGuardrailsProxy(env);
|
|
86
|
-
if (!guardrailsProxy) return refusal("guardrails-proxy-missing");
|
|
87
|
-
return sendPost(guardrailsProxyRoute(guardrailsProxy, target), body);
|
|
71
|
+
return sendPost(directRoute(target), body);
|
|
88
72
|
}
|
|
89
73
|
async function postPayload(url, body) {
|
|
90
74
|
return (await postToLoopback(url, body)).responseBody;
|