glimmervoid 0.34.1 → 0.35.0
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 +31 -19
- package/dist/chunks/adapters-B37wqNti.js +1 -0
- package/dist/chunks/{adapters-D-cRFZ_Q.js → adapters-CADejSpq.js} +219 -9
- package/dist/chunks/agent-api-cli-CRj_FYbz.js +1 -0
- package/dist/chunks/{agent-api-cli-DuT7437B.js → agent-api-cli-vGwstJ1j.js} +57 -17
- package/dist/chunks/{agent-api-core-Ddg15j2j.js → agent-api-core-D1233u1U.js} +35 -9
- package/dist/chunks/{agent-setup-cli-CFielF2o.js → agent-setup-cli-BTAFcckd.js} +2 -2
- package/dist/chunks/child-process-safe-ChRmWAJP.js +1 -0
- package/dist/chunks/{config-DTwMFUjx.js → config-rPbbL4nW.js} +12 -21
- package/dist/chunks/config-store-BeIxAZNn.js +1 -0
- package/dist/chunks/{config-store-D0lRWsAM.js → config-store-BtsYbNC3.js} +44 -14
- package/dist/chunks/{contracts-DZV9H8px.js → contracts-DjIgIuDk.js} +27 -27
- package/dist/chunks/{git-version-CrLW4a6r.js → git-version-CUcDtF5k.js} +3 -3
- package/dist/chunks/{grok-BYKnBgdr.js → grok-KKgdSe-7.js} +7 -3
- package/dist/chunks/{ingest-editor-core-vR6Wv6bP.js → ingest-editor-core-B2tycW_m.js} +4 -4
- package/dist/chunks/{json-file-oEH9vt-0.js → json-file-BaxGcB2R.js} +1 -1
- package/dist/chunks/{knowledge-graph-cli-BBE3R9DJ.js → knowledge-graph-cli-Rj5nj87L.js} +4 -4
- package/dist/chunks/{main-VMWdsGC6.js → main-BTI0J5QE.js} +325 -424
- package/dist/chunks/{pair-cli-CI848omy.js → pair-cli-Dcyzv3In.js} +2 -2
- package/dist/chunks/paths-Bu4eH1Yd.js +27 -0
- package/dist/chunks/{remote-config-Y6YtqoiO.js → remote-config-Dd1T-VJA.js} +3 -3
- package/dist/chunks/{rtk-resolver-jJxy_Mrt.js → rtk-resolver-B9pzjLsM.js} +1 -1
- package/dist/chunks/rtk-resolver-SWU5VVM7.js +1 -0
- package/dist/chunks/{runtime-paths-BPoxENmK.js → runtime-paths-BkeftE60.js} +3 -4
- package/dist/chunks/runtime-paths-DSmormp7.js +1 -0
- package/dist/chunks/{sandbox-deps-C63o3mZs.js → sandbox-deps-CWiH1d1w.js} +3 -3
- package/dist/chunks/{session-C7rstCmA.js → session-D6xXN0UU.js} +26 -4
- package/dist/chunks/session-routes-BYy3am9m.js +127 -0
- package/dist/chunks/{ssh-sign-cli-SWtTF00D.js → ssh-sign-cli-DPHpT22B.js} +11 -7
- package/dist/chunks/{visions-cli-BhFdym5n.js → visions-cli-CYujESdJ.js} +2 -2
- package/dist/chunks/{visions-setup-CfgNHiG3.js → visions-setup-B-ZeRdsi.js} +9 -9
- package/dist/client/assets/index-DE2GUmqs.css +1 -0
- package/dist/client/assets/index-Ds4ngkHp.js +254 -0
- package/dist/client/index.html +2 -2
- package/dist/scripts/postinstall-path-check.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/session/hook-tool-relay.js +2 -2
- package/dist/session/sandbox-open-launcher.js +1 -1
- package/dist/session/statusline-relay.js +1 -1
- package/dist/session/visions-relay.js +3 -3
- package/dist/tools/vscode-visions/visions-lsp-core.js +1 -1
- package/package.json +8 -8
- package/dist/chunks/adapters-CgbcceU3.js +0 -2
- package/dist/chunks/agent-api-cli-CRJYxzVU.js +0 -2
- package/dist/chunks/child-process-safe-B3zcPdFM.js +0 -2
- package/dist/chunks/config-store-DwTxLe8Y.js +0 -2
- package/dist/chunks/paths-CeJl2Vcg.js +0 -55
- package/dist/chunks/rtk-resolver-CIVLE_xk.js +0 -2
- package/dist/chunks/runtime-paths-DU5jBEEO.js +0 -2
- package/dist/client/assets/index-BxU3Ww0L.css +0 -1
- package/dist/client/assets/index-b9goyXSa.js +0 -254
- package/dist/chunks/{child-process-safe-DDELk9XC.js → child-process-safe-CbQnyh7D.js} +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as errorMessage } from "./text-DoirglWV.js";
|
|
2
|
-
import { l as resolveConfigPath } from "./config-store-
|
|
3
|
-
import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-
|
|
2
|
+
import { l as resolveConfigPath } from "./config-store-BtsYbNC3.js";
|
|
3
|
+
import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-Dd1T-VJA.js";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
//#region server/text-format.ts
|
|
6
6
|
function trimIso(iso) {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
//#region shared/paths.ts
|
|
3
|
+
function caseFoldedPathKey(value) {
|
|
4
|
+
return process.platform === "win32" ? value.toLowerCase() : value;
|
|
5
|
+
}
|
|
6
|
+
function equalsIgnoringCaseOnWindows(a, b) {
|
|
7
|
+
return caseFoldedPathKey(a) === caseFoldedPathKey(b);
|
|
8
|
+
}
|
|
9
|
+
function isPathInside(parent, child, { allowEqual = true, foldCase = false } = {}) {
|
|
10
|
+
if (!parent || !child) return false;
|
|
11
|
+
const resolvedParent = path.resolve(parent);
|
|
12
|
+
const resolvedChild = path.resolve(child);
|
|
13
|
+
const from = foldCase ? resolvedParent.toLowerCase() : resolvedParent;
|
|
14
|
+
const to = foldCase ? resolvedChild.toLowerCase() : resolvedChild;
|
|
15
|
+
const relative = path.relative(from, to);
|
|
16
|
+
if (relative === "") return allowEqual;
|
|
17
|
+
if (path.isAbsolute(relative)) return false;
|
|
18
|
+
return relative !== ".." && !relative.startsWith(`..${path.sep}`);
|
|
19
|
+
}
|
|
20
|
+
function safePathSegment(value) {
|
|
21
|
+
return String(value).replace(/[<>:"/\\|?*\x00-\x1f]/g, "-").replace(/[. ]+$/, "") || "_";
|
|
22
|
+
}
|
|
23
|
+
function sanitizeWorktreeName(value) {
|
|
24
|
+
return String(value || "").replace(/[^\w.-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { sanitizeWorktreeName as a, safePathSegment as i, equalsIgnoringCaseOnWindows as n, isPathInside as r, caseFoldedPathKey as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as errorLabel, r as errorMessage } from "./text-DoirglWV.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as equalsIgnoringCaseOnWindows } from "./paths-Bu4eH1Yd.js";
|
|
3
3
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
4
4
|
import { n as unrefTimer, t as DEFAULT_TIMER_FNS } from "./timer-deps-u2DAQLok.js";
|
|
5
|
-
import { a as jsonStateLoadError, d as writeJsonAtomicSync, l as sleepSync, s as loadJsonStateFileSync, u as writeJsonAtomic } from "./json-file-
|
|
6
|
-
import { s as glimmervoidHomeDir } from "./config-store-
|
|
5
|
+
import { a as jsonStateLoadError, d as writeJsonAtomicSync, l as sleepSync, s as loadJsonStateFileSync, u as writeJsonAtomic } from "./json-file-BaxGcB2R.js";
|
|
6
|
+
import { nt as canonicalizePath, s as glimmervoidHomeDir } from "./config-store-BtsYbNC3.js";
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import crypto from "node:crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as execSync } from "./child-process-safe-
|
|
1
|
+
import { i as execSync } from "./child-process-safe-CbQnyh7D.js";
|
|
2
2
|
import { n as glimmervoidHomeDir } from "./config-path-core-DFt-TemS.js";
|
|
3
3
|
import { r as resolveRtkPath } from "./hook-tools-UX2fmt81.js";
|
|
4
4
|
import fs from "node:fs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as getRtkPath } from "./rtk-resolver-B9pzjLsM.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as isPathInside } from "./paths-Bu4eH1Yd.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -40,11 +40,10 @@ function hasPackageManifest(directory) {
|
|
|
40
40
|
return false;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
var
|
|
43
|
+
var { assetRoot, bundled, cliPath, clientDir, extensionDir, packageRoot, relayPath } = computeRuntimePaths({
|
|
44
44
|
moduleFile: fileURLToPath(import.meta.url),
|
|
45
45
|
hasPackageJson: hasPackageManifest
|
|
46
46
|
});
|
|
47
|
-
var { assetRoot, bundled, cliPath, clientDir, extensionDir, packageRoot, relayPath } = runtimePaths;
|
|
48
47
|
var packageBins = /* @__PURE__ */ new Map();
|
|
49
48
|
function resolvePackageBin(packageName, binName) {
|
|
50
49
|
const cacheKey = `${packageName}:${binName}`;
|
|
@@ -68,4 +67,4 @@ function readPackageBin(packageName, binName) {
|
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
//#endregion
|
|
71
|
-
export { packageRoot as a,
|
|
70
|
+
export { packageRoot as a, extensionDir as i, cliPath as n, relayPath as o, clientDir as r, resolvePackageBin as s, bundled as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { s as resolvePackageBin } from "./runtime-paths-BkeftE60.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as execSync } from "./child-process-safe-
|
|
1
|
+
import { i as execSync } from "./child-process-safe-CbQnyh7D.js";
|
|
2
2
|
import { r as resolvePathCommandMatches } from "./spawn-command-Cc40FiZI.js";
|
|
3
|
-
//#region server/core/sandbox-deps-core.ts
|
|
3
|
+
//#region server/sandbox/core/sandbox-deps-core.ts
|
|
4
4
|
var LINUX_SANDBOX_BINARIES = Object.freeze([
|
|
5
5
|
"bwrap",
|
|
6
6
|
"socat",
|
|
@@ -48,7 +48,7 @@ function sandboxInstallNotice(report) {
|
|
|
48
48
|
return `glimmervoid: ${missingBinariesPhrase(report)}; ${SANDBOXED_WORK} need ${namesList(report.requiredBinaries)}. ${report.installHint}`;
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
|
-
//#region server/sandbox-deps.ts
|
|
51
|
+
//#region server/sandbox/sandbox-deps.ts
|
|
52
52
|
function probeSandboxDependencies({ platform = process.platform, exec = execSync } = {}) {
|
|
53
53
|
return sandboxDependencyReport({
|
|
54
54
|
platform,
|
|
@@ -89,10 +89,12 @@ var PendingWakeup = z.object({
|
|
|
89
89
|
reason: z.string().nullable()
|
|
90
90
|
}).passthrough();
|
|
91
91
|
var ASK_USER_QUESTION_TOOL_NAME = "AskUserQuestion";
|
|
92
|
+
var PROMPT_QUESTION_MAX_CHARS = 300;
|
|
93
|
+
var PROMPT_QUESTION_OPTION_MAX_CHARS = 80;
|
|
92
94
|
var hasNoHiddenCharacters = (text) => !PROMPT_DETAIL_HIDDEN_CHARACTERS.test(text);
|
|
93
95
|
var PendingPromptQuestion = z.object({
|
|
94
|
-
text: z.string().min(1).max(
|
|
95
|
-
options: z.array(z.string().min(1).max(
|
|
96
|
+
text: z.string().min(1).max(PROMPT_QUESTION_MAX_CHARS).refine(hasNoHiddenCharacters),
|
|
97
|
+
options: z.array(z.string().min(1).max(PROMPT_QUESTION_OPTION_MAX_CHARS).refine(hasNoHiddenCharacters)).min(1).max(8),
|
|
96
98
|
multiSelect: z.boolean()
|
|
97
99
|
});
|
|
98
100
|
var PendingPromptDetail = z.object({
|
|
@@ -158,7 +160,8 @@ var AGENT_API_VERBS = [
|
|
|
158
160
|
"reopen",
|
|
159
161
|
"cancel",
|
|
160
162
|
"push",
|
|
161
|
-
"edit"
|
|
163
|
+
"edit",
|
|
164
|
+
"limits"
|
|
162
165
|
];
|
|
163
166
|
var ORCHESTRATOR_AGENT_VERBS = [
|
|
164
167
|
"dispatch",
|
|
@@ -193,6 +196,25 @@ var SessionDoc = z.object({
|
|
|
193
196
|
name: z.string(),
|
|
194
197
|
surfacedAt: z.number().finite()
|
|
195
198
|
}).strict();
|
|
199
|
+
var SESSION_COMMANDS = [
|
|
200
|
+
"push",
|
|
201
|
+
"spawn",
|
|
202
|
+
"attention",
|
|
203
|
+
"board",
|
|
204
|
+
"edit"
|
|
205
|
+
];
|
|
206
|
+
var AgentLimitsReply = z.object({
|
|
207
|
+
commands: z.array(z.object({
|
|
208
|
+
name: z.enum(SESSION_COMMANDS),
|
|
209
|
+
answers: z.boolean(),
|
|
210
|
+
reason: z.string().optional()
|
|
211
|
+
}).strict()),
|
|
212
|
+
sandboxed: z.boolean(),
|
|
213
|
+
deadEnds: z.array(z.object({
|
|
214
|
+
blocked: z.string(),
|
|
215
|
+
route: z.string()
|
|
216
|
+
}).strict())
|
|
217
|
+
}).strict().extend({ ok: z.literal(true) }).strict();
|
|
196
218
|
var AgentDispatchRequest = z.object({
|
|
197
219
|
workId: z.string().regex(/^wrk-[0-9a-f]{16}$/).optional(),
|
|
198
220
|
readyIntent: z.string().regex(/^wrk-[0-9a-f]{16}$/).optional()
|
|
@@ -207,4 +229,4 @@ z.discriminatedUnion("ok", [z.object({
|
|
|
207
229
|
reason: z.string()
|
|
208
230
|
})]);
|
|
209
231
|
//#endregion
|
|
210
|
-
export {
|
|
232
|
+
export { toolDetailFieldValue as A, SessionState as C, TaskTitle as D, TASK_TITLE_CONTROL_CHARACTERS as E, STATES as F, KILLABLE_STATES as M, MERGEABLE_LIVE_STATES as N, isSamePromptQuestion as O, RESTARTABLE_STATES as P, SessionSnapshot as S, SshSignRequest as T, SESSION_DOC_BODY_CAP_BYTES as _, AgentDispatchRequest as a, SSH_SIGN_BODY_CAP_BYTES as b, AgentSpawnRequest as c, PROMPT_DETAIL_HIDDEN_CHARACTERS as d, PendingPromptDetail as f, SESSION_COMMANDS as g, RefinedTaskTitle as h, AgentAttentionRequest as i, toolDetailLine as j, firstDetailLine as k, AgentTicketRequest as l, PendingWakeup as m, AGENT_URL_ENV as n, AgentEditRequest as o, PendingPromptQuestion as p, ASK_USER_QUESTION_TOOL_NAME as r, AgentLimitsReply as s, AGENT_API_VERBS as t, ORCHESTRATOR_AGENT_VERBS as u, SESSION_DOC_PATH_MAX_CHARS as v, SshSignReply as w, SessionDoc as x, SIGN_URL_ENV as y };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { g as SESSION_COMMANDS } from "./session-D6xXN0UU.js";
|
|
2
|
+
//#region session/core/session-routes.ts
|
|
3
|
+
var SUPERVISION_LINE = "Glimmervoid supervises this session. Run glimmervoid --help for the commands it gives you and this session's limits.";
|
|
4
|
+
var GUARDRAILS_LINE = "Its guardrails are OS-enforced, so a read, write or connection they refuse will not succeed on retry.";
|
|
5
|
+
var HELP_COMMAND = "glimmervoid --help";
|
|
6
|
+
var SHELL_TOOL_RULE = "Bash";
|
|
7
|
+
var SHELL_PREFIX_RULE = /^Bash\((.+):\*\)$/;
|
|
8
|
+
var NEVER_ASK_MODE = "dontAsk";
|
|
9
|
+
var NO_OWN_WORKTREE_REASON = "this session has no worktree of its own, so there is nothing of its own to land";
|
|
10
|
+
var ANSWERS = Object.freeze({ answers: true });
|
|
11
|
+
function supervisionLine({ isSandboxed }) {
|
|
12
|
+
if (!isSandboxed) return SUPERVISION_LINE;
|
|
13
|
+
return `${SUPERVISION_LINE} ${GUARDRAILS_LINE}`;
|
|
14
|
+
}
|
|
15
|
+
function coversHelpCommand(permissionRule) {
|
|
16
|
+
if (typeof permissionRule !== "string") return false;
|
|
17
|
+
if (permissionRule === SHELL_TOOL_RULE) return true;
|
|
18
|
+
const commandPrefix = SHELL_PREFIX_RULE.exec(permissionRule)?.[1];
|
|
19
|
+
if (commandPrefix === void 0) return false;
|
|
20
|
+
return HELP_COMMAND === commandPrefix || HELP_COMMAND.startsWith(`${commandPrefix} `);
|
|
21
|
+
}
|
|
22
|
+
function permissionRules(listed) {
|
|
23
|
+
return Array.isArray(listed) ? listed : [];
|
|
24
|
+
}
|
|
25
|
+
function permitsHelpCommand(settingsPermissions) {
|
|
26
|
+
if (settingsPermissions === null) return true;
|
|
27
|
+
if (permissionRules(settingsPermissions.deny).some(coversHelpCommand)) return false;
|
|
28
|
+
if (settingsPermissions.defaultMode !== NEVER_ASK_MODE) return true;
|
|
29
|
+
return permissionRules(settingsPermissions.allow).some(coversHelpCommand);
|
|
30
|
+
}
|
|
31
|
+
function pushRoute({ isEphemeral, isSpawnedChild, hasOwnWorktree }) {
|
|
32
|
+
if (isEphemeral && !isSpawnedChild) return {
|
|
33
|
+
answers: false,
|
|
34
|
+
code: "not-operator-session",
|
|
35
|
+
reason: "only an operator session or a session it spawned can push"
|
|
36
|
+
};
|
|
37
|
+
if (!hasOwnWorktree) return {
|
|
38
|
+
answers: false,
|
|
39
|
+
code: "no-worktree",
|
|
40
|
+
reason: NO_OWN_WORKTREE_REASON
|
|
41
|
+
};
|
|
42
|
+
return ANSWERS;
|
|
43
|
+
}
|
|
44
|
+
function spawnRoute({ isEphemeral, isSpawnedChild, factoryRole }) {
|
|
45
|
+
if (factoryRole === "worker") return {
|
|
46
|
+
answers: false,
|
|
47
|
+
reason: "the factory starts and counts its workers, so a worker may not spawn a session"
|
|
48
|
+
};
|
|
49
|
+
if (isSpawnedChild) return {
|
|
50
|
+
answers: false,
|
|
51
|
+
reason: "a spawned session may not spawn another"
|
|
52
|
+
};
|
|
53
|
+
if (isEphemeral) return {
|
|
54
|
+
answers: false,
|
|
55
|
+
reason: "only an operator session may spawn a session, because the new session gets an operator session's guardrails, which can be wider than this one's"
|
|
56
|
+
};
|
|
57
|
+
return ANSWERS;
|
|
58
|
+
}
|
|
59
|
+
function hasOperatorCard({ isEphemeral, isSpawnedChild, factoryRole }) {
|
|
60
|
+
if (!isEphemeral) return true;
|
|
61
|
+
if (factoryRole !== null) return true;
|
|
62
|
+
return isSpawnedChild;
|
|
63
|
+
}
|
|
64
|
+
function attentionRoute(caller) {
|
|
65
|
+
if (hasOperatorCard(caller)) return ANSWERS;
|
|
66
|
+
return {
|
|
67
|
+
answers: false,
|
|
68
|
+
reason: "a lane session cannot raise attention, because its notes are not delivered to the operator"
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function editRoute(caller) {
|
|
72
|
+
if (hasOperatorCard(caller)) return ANSWERS;
|
|
73
|
+
return {
|
|
74
|
+
answers: false,
|
|
75
|
+
reason: "a lane session cannot surface a file, because it has no card for the operator to open the file from"
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
var COMMAND_ROUTES = Object.freeze({
|
|
79
|
+
push: pushRoute,
|
|
80
|
+
spawn: spawnRoute,
|
|
81
|
+
attention: attentionRoute,
|
|
82
|
+
board: () => ANSWERS,
|
|
83
|
+
edit: editRoute
|
|
84
|
+
});
|
|
85
|
+
function commandLimit(name, facts) {
|
|
86
|
+
const verdict = COMMAND_ROUTES[name](facts);
|
|
87
|
+
if (verdict.answers) return {
|
|
88
|
+
name,
|
|
89
|
+
answers: true
|
|
90
|
+
};
|
|
91
|
+
return {
|
|
92
|
+
name,
|
|
93
|
+
answers: false,
|
|
94
|
+
reason: verdict.reason
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function runsUnderOperatorSessionSandbox({ isSandboxed, isEphemeral, isSpawnedChild }) {
|
|
98
|
+
if (!isSandboxed) return false;
|
|
99
|
+
return !isEphemeral || isSpawnedChild;
|
|
100
|
+
}
|
|
101
|
+
var OPERATOR_SESSION_GUARDRAIL_DEAD_ENDS = Object.freeze([{
|
|
102
|
+
blocked: "credential folders, Glimmervoid's own folder and any path the operator blocked are off limits",
|
|
103
|
+
route: "flag the operator with glimmervoid attention"
|
|
104
|
+
}]);
|
|
105
|
+
function describeSessionLimits(facts) {
|
|
106
|
+
return {
|
|
107
|
+
commands: SESSION_COMMANDS.map((name) => commandLimit(name, facts)),
|
|
108
|
+
sandboxed: facts.isSandboxed,
|
|
109
|
+
deadEnds: runsUnderOperatorSessionSandbox(facts) ? [...OPERATOR_SESSION_GUARDRAIL_DEAD_ENDS] : []
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function formatSessionLimits({ commands, sandboxed, deadEnds }) {
|
|
113
|
+
const commandLines = commands.map(({ name, answers, reason }) => answers ? ` ${name}: available` : ` ${name}: not available, ${reason}`);
|
|
114
|
+
if (!sandboxed) return [
|
|
115
|
+
"This session:",
|
|
116
|
+
...commandLines,
|
|
117
|
+
" guardrails: none"
|
|
118
|
+
];
|
|
119
|
+
return [
|
|
120
|
+
"This session:",
|
|
121
|
+
...commandLines,
|
|
122
|
+
" guardrails: OS-enforced, so a read, write or connection they refuse will not succeed on retry",
|
|
123
|
+
...deadEnds.map(({ blocked, route }) => ` ${blocked}: ${route}`)
|
|
124
|
+
];
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
export { formatSessionLimits as a, spawnRoute as c, editRoute as i, supervisionLine as l, attentionRoute as n, permitsHelpCommand as o, describeSessionLimits as r, pushRoute as s, NO_OWN_WORKTREE_REASON as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as errorMessage } from "./text-DoirglWV.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as execFileAsync, o as spawn } from "./child-process-safe-
|
|
2
|
+
import { w as SshSignReply, y as SIGN_URL_ENV } from "./session-D6xXN0UU.js";
|
|
3
|
+
import { n as execFileAsync, o as spawn } from "./child-process-safe-CbQnyh7D.js";
|
|
4
4
|
import { a as isLoopbackHostname } from "./hook-relay-core-DA_bz2KA.js";
|
|
5
|
-
import { t as postToAgentIngress } from "./agent-api-cli-
|
|
5
|
+
import { t as postToAgentIngress } from "./agent-api-cli-vGwstJ1j.js";
|
|
6
6
|
import { l as parseSshPublicKey } from "./ssh-signing-core-CRhVVWNW.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fsp from "node:fs/promises";
|
|
@@ -113,10 +113,14 @@ async function runSshSignCli(args, env = process.env) {
|
|
|
113
113
|
const localAttempt = env.SSH_AUTH_SOCK ? await runSigningProgram(signingProgram, args, { captureStderr: true }) : null;
|
|
114
114
|
if (localAttempt?.exitCode === 0) return 0;
|
|
115
115
|
const payload = await fsp.readFile(invocation.bufferFile);
|
|
116
|
-
const reply = await postToAgentIngress(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
const reply = await postToAgentIngress({
|
|
117
|
+
endpoint: target.endpoint,
|
|
118
|
+
token: target.token,
|
|
119
|
+
body: {
|
|
120
|
+
namespace: invocation.namespace,
|
|
121
|
+
publicKey: publicKeyText,
|
|
122
|
+
payload: payload.toString("base64")
|
|
123
|
+
}
|
|
120
124
|
}).then((answer) => parseSignReply(answer.text), (error) => ({
|
|
121
125
|
ok: false,
|
|
122
126
|
error: `Glimmervoid did not answer the signing request: ${errorMessage(error)}`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as renderTable } from "./ascii-figure-core-pDAwtlKO.js";
|
|
2
|
-
import { a as relayInvocationOptions, c as unwireEverything, d as extensionIdOf, f as buildSetupGuide, h as isExtensionInstalled, i as packVsix, l as wireEverything, m as recipeIds, o as resolveRelayInvocation, p as commandLine, r as editorExtensions, s as resolvedEditorPaths, t as RELAY_PATH, u as editorTargets } from "./visions-setup-
|
|
2
|
+
import { a as relayInvocationOptions, c as unwireEverything, d as extensionIdOf, f as buildSetupGuide, h as isExtensionInstalled, i as packVsix, l as wireEverything, m as recipeIds, o as resolveRelayInvocation, p as commandLine, r as editorExtensions, s as resolvedEditorPaths, t as RELAY_PATH, u as editorTargets } from "./visions-setup-B-ZeRdsi.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
|
-
//#region server/visions-cli.ts
|
|
4
|
+
//#region server/visions/visions-cli.ts
|
|
5
5
|
function fileOutcomeRows(files) {
|
|
6
6
|
return files.map((file) => [file.label, `${file.action}: ${file.filePath}`]);
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as errorMessage } from "./text-DoirglWV.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as packageRoot, i as extensionDir, n as cliPath, o as relayPath, t as bundled } from "./runtime-paths-
|
|
4
|
-
import { i as execSync, n as execFileAsync } from "./child-process-safe-
|
|
2
|
+
import { r as isPathInside } from "./paths-Bu4eH1Yd.js";
|
|
3
|
+
import { a as packageRoot, i as extensionDir, n as cliPath, o as relayPath, t as bundled } from "./runtime-paths-BkeftE60.js";
|
|
4
|
+
import { i as execSync, n as execFileAsync } from "./child-process-safe-CbQnyh7D.js";
|
|
5
5
|
import { r as resolvePathCommandMatches } from "./spawn-command-Cc40FiZI.js";
|
|
6
6
|
import { n as isRecord } from "./coerce-NSst8oRP.js";
|
|
7
7
|
import { stripTypeScriptTypes } from "node:module";
|
|
@@ -13,7 +13,7 @@ function escapeMarkup(value) {
|
|
|
13
13
|
return String(value).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
//#region server/lane-log.ts
|
|
16
|
+
//#region server/lanes/lane-log.ts
|
|
17
17
|
var MAX_ONCE_KEYS = 256;
|
|
18
18
|
function renderFieldValue(value) {
|
|
19
19
|
if (typeof value !== "string") return String(value);
|
|
@@ -361,7 +361,7 @@ function buildSetupGuide({ editorId = null, invocation }) {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
//#endregion
|
|
364
|
-
//#region server/core/visions-defaults-core.ts
|
|
364
|
+
//#region server/visions/core/visions-defaults-core.ts
|
|
365
365
|
var IMPLIED_INGEST = Object.freeze({
|
|
366
366
|
enabled: true,
|
|
367
367
|
sources: Object.freeze({
|
|
@@ -693,7 +693,7 @@ function addToHelixMarkdown(text) {
|
|
|
693
693
|
continue;
|
|
694
694
|
}
|
|
695
695
|
if (!inMarkdown || !/^language-servers\s*=\s*\[/.test(line)) continue;
|
|
696
|
-
if (line.includes(`"
|
|
696
|
+
if (line.includes(`"${SERVER_ID}"`)) return {
|
|
697
697
|
lines,
|
|
698
698
|
sawMarkdownLanguage,
|
|
699
699
|
changed: false
|
|
@@ -754,7 +754,7 @@ function removeFromHelixMarkdown(text) {
|
|
|
754
754
|
const lines = text.split("\n");
|
|
755
755
|
let changed = false;
|
|
756
756
|
for (let index = 0; index < lines.length; index += 1) {
|
|
757
|
-
if (!/^\s*language-servers\s*=\s*\[/.test(lines[index]) || !lines[index].includes(`"
|
|
757
|
+
if (!/^\s*language-servers\s*=\s*\[/.test(lines[index]) || !lines[index].includes(`"${SERVER_ID}"`)) continue;
|
|
758
758
|
lines[index] = lines[index].replace(new RegExp(`\\s*,\\s*"${SERVER_ID}"|"${SERVER_ID}"\\s*,\\s*|"${SERVER_ID}"`), "");
|
|
759
759
|
changed = true;
|
|
760
760
|
}
|
|
@@ -1107,10 +1107,10 @@ function unwireEditors({ dryRun = false, targets = null, ...detection } = {}) {
|
|
|
1107
1107
|
return (targets || editorTargets(detection)).map((target) => unwireEditor(target, { dryRun }));
|
|
1108
1108
|
}
|
|
1109
1109
|
//#endregion
|
|
1110
|
-
//#region server/visions-setup.ts
|
|
1110
|
+
//#region server/visions/visions-setup.ts
|
|
1111
1111
|
var EXTENSION_DIR = extensionDir;
|
|
1112
1112
|
var RELAY_PATH = relayPath("visions-relay");
|
|
1113
|
-
var LSP_CORE_PATH = bundled ? path.join(EXTENSION_DIR, "visions-lsp-core.js") : path.join(packageRoot, "server", "core", "visions-lsp-core.ts");
|
|
1113
|
+
var LSP_CORE_PATH = bundled ? path.join(EXTENSION_DIR, "visions-lsp-core.js") : path.join(packageRoot, "server", "visions", "core", "visions-lsp-core.ts");
|
|
1114
1114
|
var CLI_PATH = cliPath;
|
|
1115
1115
|
var EDITOR_TIMEOUT_MS = 6e4;
|
|
1116
1116
|
function underTestRunner(env) {
|