glimmervoid 0.29.1 → 0.30.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/README.md +7 -9
- package/dist/bin/glimmervoid.js +28 -12
- package/dist/chunks/{adapters-DIavI9-i.js → adapters-Dho1VSY5.js} +1 -1
- package/dist/chunks/{adapters-Dlvu1FVB.js → adapters-zPDx1Xox.js} +23 -14
- package/dist/chunks/{agent-api-cli-ClOzm28U.js → agent-api-cli-D0MmtEdz.js} +2 -2
- package/dist/chunks/{agent-api-core-D6LHrpSL.js → agent-api-core-Dz0r21y9.js} +1 -1
- package/dist/chunks/{agent-setup-cli-C1CQ8Nkk.js → agent-setup-cli-B5Atxr3F.js} +5 -3
- package/dist/chunks/{child-process-safe-Cz22RwlG.js → child-process-safe-DRGsp0TE.js} +1 -1
- package/dist/chunks/child-process-safe-DvQjXsgz.js +2 -0
- package/dist/chunks/config-store-CC8T3okC.js +2 -0
- package/dist/chunks/{config-store-DtPUFVaO.js → config-store-mm7MgzoL.js} +13 -1
- package/dist/chunks/{contracts-JKChPhZ0.js → contracts-DGkKNh9W.js} +25 -3
- package/dist/chunks/{grok-COekzawt.js → grok-DuU8xVLZ.js} +54 -25
- package/dist/chunks/hook-command-core-DclEoE9e.js +14 -0
- package/dist/chunks/hook-tools-pSJia7ks.js +74 -0
- package/dist/chunks/{main-BVDjy7vH.js → main-CuIZQPhZ.js} +975 -156
- package/dist/chunks/{pair-cli-BQQnhkkc.js → pair-cli-w-gCAF-1.js} +2 -2
- package/dist/chunks/{remote-config-BHoDFCpo.js → remote-config-C2ytQwrs.js} +8 -4
- package/dist/chunks/rtk-hook-core-Bl6gYHPN.js +133 -0
- package/dist/chunks/rtk-resolver-CLo-gZzw.js +21 -0
- package/dist/chunks/rtk-resolver-CMQAidlI.js +2 -0
- package/dist/chunks/{runtime-paths-CVvq20A4.js → runtime-paths-Ci_ksSkj.js} +26 -2
- package/dist/chunks/runtime-paths-JLrZ3wyi.js +2 -0
- package/dist/chunks/{sandbox-deps-BwvbDBDl.js → sandbox-deps-Dd5-kZnf.js} +1 -1
- package/dist/chunks/{session-CJtOveHl.js → session-Cez8aIWg.js} +3 -1
- package/dist/chunks/{visions-cli-DUZnopGY.js → visions-cli-BXQFIBCX.js} +1 -1
- package/dist/chunks/{visions-setup-C_kJobsy.js → visions-setup-CvVnOe1r.js} +2 -2
- package/dist/client/assets/index-B1MFijjb.css +1 -0
- package/dist/client/assets/index-CU1iPPdn.js +249 -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/{rtk-relay.js → hook-tool-relay.js} +32 -15
- package/dist/session/statusline-relay.js +1 -1
- package/package.json +2 -1
- package/dist/chunks/config-store-DtUGwi4-.js +0 -2
- package/dist/chunks/rtk-hook-core-DRYrKwYP.js +0 -26
- package/dist/chunks/rtk-resolver-DDVVNRBT.js +0 -2
- package/dist/chunks/rtk-resolver-oGmO-ew7.js +0 -58
- package/dist/client/assets/index-BTwYgSAH.js +0 -248
- package/dist/client/assets/index-DgA708PE.css +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as resolveConfigPath } from "./config-store-
|
|
2
|
-
import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-
|
|
1
|
+
import { l as resolveConfigPath } from "./config-store-mm7MgzoL.js";
|
|
2
|
+
import { c as defaultPairingsPath, i as REVOCATION_PROPAGATION_SECONDS, l as defaultSeenPath, n as normalizeRemoteConfig, o as createPairingsStore, s as createSeenStore } from "./remote-config-C2ytQwrs.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
//#region server/text-format.ts
|
|
5
5
|
function trimIso(iso) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as equalsIgnoringCaseOnWindows, g as writeJsonAtomicSync, h as writeJsonAtomic, q as canonicalizePath, s as glimmervoidHomeDir } from "./config-store-
|
|
1
|
+
import { X as equalsIgnoringCaseOnWindows, g as writeJsonAtomicSync, h as writeJsonAtomic, q as canonicalizePath, s as glimmervoidHomeDir } from "./config-store-mm7MgzoL.js";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import crypto from "node:crypto";
|
|
@@ -445,24 +445,28 @@ function normalizeRemoteConfig(raw) {
|
|
|
445
445
|
const enabled = src.enabled === true;
|
|
446
446
|
const port = toPort(src.port);
|
|
447
447
|
const publicHost = typeof src.publicHost === "string" ? src.publicHost.trim() : "";
|
|
448
|
+
const ownerLogin = typeof src.ownerLogin === "string" ? src.ownerLogin.trim().toLowerCase() : "";
|
|
448
449
|
if (!enabled) return {
|
|
449
450
|
enabled,
|
|
450
451
|
port,
|
|
451
452
|
publicHost,
|
|
452
|
-
allowedOrigins: []
|
|
453
|
+
allowedOrigins: [],
|
|
454
|
+
ownerLogin
|
|
453
455
|
};
|
|
454
456
|
const listed = Array.isArray(src.allowedOrigins) ? src.allowedOrigins.filter((o) => typeof o === "string" && o.trim() !== "").map((o) => o.trim()) : [];
|
|
455
457
|
if (listed.length === 0 && publicHost !== "") return {
|
|
456
458
|
enabled,
|
|
457
459
|
port,
|
|
458
460
|
publicHost,
|
|
459
|
-
allowedOrigins: [`https://${publicHost}`]
|
|
461
|
+
allowedOrigins: [`https://${publicHost}`],
|
|
462
|
+
ownerLogin
|
|
460
463
|
};
|
|
461
464
|
return {
|
|
462
465
|
enabled,
|
|
463
466
|
port,
|
|
464
467
|
publicHost,
|
|
465
|
-
allowedOrigins: listed
|
|
468
|
+
allowedOrigins: listed,
|
|
469
|
+
ownerLogin
|
|
466
470
|
};
|
|
467
471
|
}
|
|
468
472
|
function validateRemoteConfig(remote, localPort) {
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
//#region session/core/sane-yolo.ts
|
|
2
|
+
var SANE_YOLO_PATH_ENV = "GLIMMERVOID_SANE_YOLO_PATH";
|
|
3
|
+
var SANE_YOLO_POLICY = {
|
|
4
|
+
version: 1,
|
|
5
|
+
destructive_command_protection: {
|
|
6
|
+
enabled: true,
|
|
7
|
+
overrides: {
|
|
8
|
+
"git.branch-force-delete": "off",
|
|
9
|
+
"git.merge-abort": "off",
|
|
10
|
+
"git.rebase-abort": "off",
|
|
11
|
+
"rm.recursive-force-dynamic-target": "on"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
secret_protection: { enabled: false }
|
|
15
|
+
};
|
|
16
|
+
var SANE_YOLO_RULES = {
|
|
17
|
+
version: 1,
|
|
18
|
+
rules: ["infra"],
|
|
19
|
+
overrides: {},
|
|
20
|
+
transparent_wrappers: ["rtk", "npx"]
|
|
21
|
+
};
|
|
22
|
+
var INFRA_REASON = "Sane YOLO blocks infrastructure teardown; run this command by hand.";
|
|
23
|
+
var TERRAFORM_DESTROY_FLAGS = [
|
|
24
|
+
"-destroy",
|
|
25
|
+
"--destroy",
|
|
26
|
+
"-destroy=true",
|
|
27
|
+
"--destroy=true"
|
|
28
|
+
];
|
|
29
|
+
var SANE_YOLO_FILES = {
|
|
30
|
+
"policy.json": SANE_YOLO_POLICY,
|
|
31
|
+
"rules/rule.json": SANE_YOLO_RULES,
|
|
32
|
+
"rules/infra/rulebook.json": {
|
|
33
|
+
rulebook_version: 1,
|
|
34
|
+
name: "infra",
|
|
35
|
+
version: "1.1.0",
|
|
36
|
+
allowed_commands: [
|
|
37
|
+
"terraform",
|
|
38
|
+
"tofu",
|
|
39
|
+
"pulumi",
|
|
40
|
+
"kubectl"
|
|
41
|
+
],
|
|
42
|
+
rules: [
|
|
43
|
+
{
|
|
44
|
+
name: "terraform-destroy",
|
|
45
|
+
command: "terraform",
|
|
46
|
+
subcommand: "destroy",
|
|
47
|
+
block_args: ["destroy"],
|
|
48
|
+
reason: INFRA_REASON
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "terraform-apply-destroy",
|
|
52
|
+
command: "terraform",
|
|
53
|
+
subcommand: "apply",
|
|
54
|
+
block_args: TERRAFORM_DESTROY_FLAGS,
|
|
55
|
+
reason: INFRA_REASON
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "tofu-destroy",
|
|
59
|
+
command: "tofu",
|
|
60
|
+
subcommand: "destroy",
|
|
61
|
+
block_args: ["destroy"],
|
|
62
|
+
reason: INFRA_REASON
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "tofu-apply-destroy",
|
|
66
|
+
command: "tofu",
|
|
67
|
+
subcommand: "apply",
|
|
68
|
+
block_args: TERRAFORM_DESTROY_FLAGS,
|
|
69
|
+
reason: INFRA_REASON
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "pulumi-destroy",
|
|
73
|
+
command: "pulumi",
|
|
74
|
+
subcommand: "destroy",
|
|
75
|
+
block_args: ["destroy"],
|
|
76
|
+
reason: INFRA_REASON
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "pulumi-down",
|
|
80
|
+
command: "pulumi",
|
|
81
|
+
subcommand: "down",
|
|
82
|
+
block_args: ["down"],
|
|
83
|
+
reason: INFRA_REASON
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "kubectl-delete-namespace",
|
|
87
|
+
command: "kubectl",
|
|
88
|
+
subcommand: "delete",
|
|
89
|
+
block_args: [
|
|
90
|
+
"ns",
|
|
91
|
+
"namespace",
|
|
92
|
+
"namespaces"
|
|
93
|
+
],
|
|
94
|
+
reason: INFRA_REASON
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
function saneYoloEnv(homeDir) {
|
|
100
|
+
return {
|
|
101
|
+
CC_SAFETY_NET_HOME: homeDir,
|
|
102
|
+
CC_SAFETY_NET_PROJECT_TIGHTEN_ONLY: "1",
|
|
103
|
+
CC_SAFETY_NET_AUDIT_HOME: homeDir,
|
|
104
|
+
CC_SAFETY_NET_AUDIT_SCOPE: "blocked"
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region session/core/rtk-hook-core.ts
|
|
109
|
+
var RTK_PATH_ENV = "GLIMMERVOID_RTK_PATH";
|
|
110
|
+
var MAX_RTK_STDOUT_BYTES = 65536;
|
|
111
|
+
function isPlainObject(value) {
|
|
112
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
113
|
+
}
|
|
114
|
+
function normalizeRtkHookResponse(stdoutText) {
|
|
115
|
+
if (typeof stdoutText !== "string") return "";
|
|
116
|
+
const trimmed = stdoutText.trim();
|
|
117
|
+
if (!trimmed) return "";
|
|
118
|
+
if (Buffer.byteLength(trimmed) > 65536) return "";
|
|
119
|
+
let parsed = null;
|
|
120
|
+
try {
|
|
121
|
+
parsed = JSON.parse(trimmed);
|
|
122
|
+
} catch {
|
|
123
|
+
return "";
|
|
124
|
+
}
|
|
125
|
+
if (!isPlainObject(parsed)) return "";
|
|
126
|
+
const hookSpecificOutput = parsed.hookSpecificOutput;
|
|
127
|
+
if (isPlainObject(hookSpecificOutput) && isPlainObject(hookSpecificOutput.updatedInput)) {
|
|
128
|
+
if (typeof hookSpecificOutput.permissionDecision !== "string") hookSpecificOutput.permissionDecision = "allow";
|
|
129
|
+
}
|
|
130
|
+
return JSON.stringify(parsed);
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
export { SANE_YOLO_PATH_ENV as a, SANE_YOLO_FILES as i, RTK_PATH_ENV as n, saneYoloEnv as o, normalizeRtkHookResponse as r, MAX_RTK_STDOUT_BYTES as t };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { i as execSync } from "./child-process-safe-DRGsp0TE.js";
|
|
2
|
+
import { n as glimmervoidHomeDir } from "./config-path-core-DFt-TemS.js";
|
|
3
|
+
import { r as resolveRtkPath } from "./hook-tools-pSJia7ks.js";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
import os from "node:os";
|
|
6
|
+
//#region server/rtk-resolver.ts
|
|
7
|
+
function resolveRtkPathFromSystem() {
|
|
8
|
+
return resolveRtkPath({
|
|
9
|
+
glimmervoidHome: glimmervoidHomeDir(os.homedir(), process.env),
|
|
10
|
+
platform: process.platform,
|
|
11
|
+
exec: execSync,
|
|
12
|
+
fsApi: fs
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
var cachedRtkPath = null;
|
|
16
|
+
function getRtkPath(resolve = resolveRtkPathFromSystem) {
|
|
17
|
+
if (!cachedRtkPath) cachedRtkPath = resolve();
|
|
18
|
+
return cachedRtkPath;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { getRtkPath as t };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
1
2
|
import fs from "node:fs";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
@@ -43,9 +44,32 @@ function hasPackageManifest(directory) {
|
|
|
43
44
|
return false;
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
var
|
|
47
|
+
var runtimePaths = computeRuntimePaths({
|
|
47
48
|
moduleFile: fileURLToPath(import.meta.url),
|
|
48
49
|
hasPackageJson: hasPackageManifest
|
|
49
50
|
});
|
|
51
|
+
var { assetRoot, bundled, cliPath, clientDir, extensionDir, packageRoot, relayPath } = runtimePaths;
|
|
52
|
+
var packageBins = /* @__PURE__ */ new Map();
|
|
53
|
+
function resolvePackageBin(packageName, binName) {
|
|
54
|
+
const cacheKey = `${packageName}:${binName}`;
|
|
55
|
+
if (packageBins.has(cacheKey)) return packageBins.get(cacheKey) ?? null;
|
|
56
|
+
const resolvedBin = readPackageBin(packageName, binName);
|
|
57
|
+
packageBins.set(cacheKey, resolvedBin);
|
|
58
|
+
return resolvedBin;
|
|
59
|
+
}
|
|
60
|
+
function readPackageBin(packageName, binName) {
|
|
61
|
+
try {
|
|
62
|
+
const manifestPath = createRequire(path.join(packageRoot, "package.json")).resolve(`${packageName}/package.json`);
|
|
63
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
|
|
64
|
+
if (!manifest || typeof manifest !== "object" || !("bin" in manifest)) return null;
|
|
65
|
+
const bins = manifest.bin;
|
|
66
|
+
const relativeBin = typeof bins === "string" ? bins : bins && typeof bins === "object" ? Reflect.get(bins, binName) : null;
|
|
67
|
+
if (typeof relativeBin !== "string") return null;
|
|
68
|
+
const binPath = path.join(path.dirname(manifestPath), relativeBin);
|
|
69
|
+
return fs.statSync(binPath).isFile() ? binPath : null;
|
|
70
|
+
} catch {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
50
74
|
//#endregion
|
|
51
|
-
export { packageRoot as a, extensionDir as i, cliPath as n, relayPath as o, clientDir as r, bundled as t };
|
|
75
|
+
export { packageRoot as a, runtimePaths as c, extensionDir as i, cliPath as n, relayPath as o, clientDir as r, resolvePackageBin as s, bundled as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as execSync } from "./child-process-safe-
|
|
1
|
+
import { i as execSync } from "./child-process-safe-DRGsp0TE.js";
|
|
2
2
|
import { r as resolvePathCommandMatches } from "./spawn-command-Cc40FiZI.js";
|
|
3
3
|
//#region server/core/sandbox-deps-core.ts
|
|
4
4
|
var LINUX_SANDBOX_BINARIES = Object.freeze(["bwrap", "socat"]);
|
|
@@ -81,6 +81,7 @@ function toolDetailLine(toolName, toolInput) {
|
|
|
81
81
|
var TASK_TITLE_CONTROL_CHARACTERS = /[\x00-\x1f\x7f-\x9f]/;
|
|
82
82
|
var PROMPT_DETAIL_HIDDEN_CHARACTERS = new RegExp(`${TASK_TITLE_CONTROL_CHARACTERS.source}|[\\p{Cf}\\u2028\\u2029]`, "u");
|
|
83
83
|
var TaskTitle = z.string().refine((title) => !TASK_TITLE_CONTROL_CHARACTERS.test(title)).trim().max(120);
|
|
84
|
+
var RefinedTaskTitle = z.object({ title: z.string().nullable() }).strict();
|
|
84
85
|
var SessionState = z.enum(STATES);
|
|
85
86
|
var PendingWakeup = z.object({
|
|
86
87
|
at: z.number().finite().nullable(),
|
|
@@ -111,6 +112,7 @@ var SessionSnapshot = z.object({
|
|
|
111
112
|
stateSince: z.number(),
|
|
112
113
|
sleeping: z.boolean(),
|
|
113
114
|
dangerouslySkipPermissions: z.boolean(),
|
|
115
|
+
saneYolo: z.boolean().default(false),
|
|
114
116
|
ephemeral: z.boolean(),
|
|
115
117
|
isWorktree: z.boolean(),
|
|
116
118
|
isWorkspace: z.boolean().default(false),
|
|
@@ -159,4 +161,4 @@ z.object({
|
|
|
159
161
|
ephemeral: SessionSnapshot.shape.ephemeral
|
|
160
162
|
}).strict();
|
|
161
163
|
//#endregion
|
|
162
|
-
export {
|
|
164
|
+
export { STATES as S, toolDetailFieldValue as _, AgentSpawnRequest as a, MERGEABLE_LIVE_STATES as b, PendingPromptQuestion as c, SessionSnapshot as d, SessionState as f, firstDetailLine as g, isSamePromptQuestion as h, AgentAttentionRequest as i, PendingWakeup as l, TaskTitle as m, AGENT_URL_ENV as n, PROMPT_DETAIL_HIDDEN_CHARACTERS as o, TASK_TITLE_CONTROL_CHARACTERS as p, ASK_USER_QUESTION_TOOL_NAME as r, PendingPromptDetail as s, AGENT_API_VERBS as t, RefinedTaskTitle as u, toolDetailLine as v, RESTARTABLE_STATES as x, KILLABLE_STATES as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
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-CvVnOe1r.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
//#region server/visions-cli.ts
|
|
5
5
|
function fileOutcomeRows(files) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as packageRoot, i as extensionDir, n as cliPath, o as relayPath, t as bundled } from "./runtime-paths-
|
|
2
|
-
import { i as execSync, n as execFileAsync } from "./child-process-safe-
|
|
1
|
+
import { a as packageRoot, i as extensionDir, n as cliPath, o as relayPath, t as bundled } from "./runtime-paths-Ci_ksSkj.js";
|
|
2
|
+
import { i as execSync, n as execFileAsync } from "./child-process-safe-DRGsp0TE.js";
|
|
3
3
|
import { r as resolvePathCommandMatches } from "./spawn-command-Cc40FiZI.js";
|
|
4
4
|
import { d as scrubText, n as SOURCE_DEFAULTS } from "./ingest-core-DWI1Mbu4.js";
|
|
5
5
|
import { stripTypeScriptTypes } from "node:module";
|