@galaxy-stack/blackhole-cli 2.0.13 → 2.1.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 +5 -0
- package/dist/application.d.ts +34 -0
- package/dist/application.d.ts.map +1 -1
- package/dist/application.js +43 -4
- package/dist/application.js.map +1 -1
- package/dist/flow.d.ts +6 -0
- package/dist/flow.d.ts.map +1 -1
- package/dist/flow.js +8 -1
- package/dist/flow.js.map +1 -1
- package/dist/mcp-requirements.d.ts +25 -0
- package/dist/mcp-requirements.d.ts.map +1 -0
- package/dist/mcp-requirements.js +28 -0
- package/dist/mcp-requirements.js.map +1 -0
- package/dist/web/dsh.d.ts +41 -1
- package/dist/web/dsh.d.ts.map +1 -1
- package/dist/web/dsh.js +119 -29
- package/dist/web/dsh.js.map +1 -1
- package/package.json +7 -2
- package/skills/galaxy-ui/SKILL.md +6 -1
- package/skills/orbit-framework/SKILL.md +7 -1
- package/web/brand/client.template.js +2 -35
- package/web/brand/lib/client.js +7 -41
- package/web/brand/vi.locales.json +1 -2
package/dist/web/dsh.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { execFileSync } from "node:child_process";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
3
5
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { join } from "node:path";
|
|
5
6
|
/** The DSH release this gbh line is verified against. */
|
|
6
7
|
export const PINNED_DSH_VERSION = "0.1.5-rc.3";
|
|
8
|
+
/** The one command that installs the pinned runtime; the failure message shares it. */
|
|
9
|
+
export const DSH_INSTALL_HINT = "npm i -g @deepseek-ai/dsh@" + PINNED_DSH_VERSION;
|
|
10
|
+
/** The runtime package, the manifest that anchors a resolution, and its JS entry. */
|
|
11
|
+
export const DSH_PACKAGE = "@deepseek-ai/dsh";
|
|
12
|
+
const DSH_MANIFEST = DSH_PACKAGE + "/package.json";
|
|
13
|
+
const DSH_ENTRY = join("lib", "bin.js");
|
|
14
|
+
/** Windows cannot spawn a `.cmd`/`.bat` without a shell, so one never reaches `spawn` as-is. */
|
|
15
|
+
const WINDOWS_SHIM = /\.(cmd|bat)$/i;
|
|
16
|
+
/** A JS entry carries its own interpreter, so the override is started through node. */
|
|
17
|
+
const JS_ENTRY = /\.(js|mjs|cjs)$/i;
|
|
7
18
|
function readVersion(command, baseArgs) {
|
|
8
19
|
try {
|
|
9
20
|
const out = execFileSync(command, [...baseArgs, "--version"], {
|
|
@@ -19,41 +30,120 @@ function readVersion(command, baseArgs) {
|
|
|
19
30
|
return undefined;
|
|
20
31
|
}
|
|
21
32
|
}
|
|
22
|
-
function describe(
|
|
23
|
-
const version = readVersion(command, baseArgs);
|
|
24
|
-
return version === undefined ? {
|
|
33
|
+
function describe(candidate) {
|
|
34
|
+
const version = readVersion(candidate.command, candidate.baseArgs);
|
|
35
|
+
return version === undefined ? { ...candidate } : { ...candidate, version };
|
|
25
36
|
}
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
/** Whether a directory holds a complete DSH install. */
|
|
38
|
+
function hasEntry(environment, packageDir) {
|
|
39
|
+
return environment.exists(join(packageDir, DSH_ENTRY));
|
|
40
|
+
}
|
|
41
|
+
/** Start a JS entry through node: no shim, no PATH, no shell — the same shape on every platform. */
|
|
42
|
+
function entryCandidate(environment, packageDir, source) {
|
|
43
|
+
return { command: environment.node, baseArgs: [join(packageDir, DSH_ENTRY)], source };
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Turn a Windows shim into something `spawn` accepts.
|
|
47
|
+
*
|
|
48
|
+
* npm writes `<prefix>\dsh.cmd` beside `<prefix>\node_modules\@deepseek-ai\dsh`, so the
|
|
49
|
+
* shim names the install itself: when that entry is still there the shim is dropped and
|
|
50
|
+
* node runs the JS entry. Only a shim whose package is gone falls back to `cmd.exe`,
|
|
51
|
+
* which is the invocation Node's own `shell: true` builds (see the `.bat`/`.cmd` rule in
|
|
52
|
+
* the child_process docs) — a last resort, since a prefix containing spaces then depends
|
|
53
|
+
* on how cmd strips the outer quotes.
|
|
54
|
+
*/
|
|
55
|
+
function shimCandidate(environment, shim, source) {
|
|
56
|
+
const packageDir = join(dirname(shim), "node_modules", "@deepseek-ai", "dsh");
|
|
57
|
+
if (hasEntry(environment, packageDir))
|
|
58
|
+
return entryCandidate(environment, packageDir, source);
|
|
59
|
+
return { command: environment.env.ComSpec ?? "cmd.exe", baseArgs: ["/d", "/s", "/c", shim], source };
|
|
60
|
+
}
|
|
61
|
+
/** The directory of an installed `@deepseek-ai/dsh`, when Node resolution finds one. */
|
|
62
|
+
function installedPackageDir(environment) {
|
|
28
63
|
try {
|
|
29
|
-
|
|
30
|
-
const first = out.split(/\r?\n/)[0];
|
|
31
|
-
return first === undefined || first.length === 0 ? undefined : first;
|
|
64
|
+
return dirname(environment.resolve(DSH_MANIFEST));
|
|
32
65
|
}
|
|
33
66
|
catch {
|
|
34
67
|
return undefined;
|
|
35
68
|
}
|
|
36
69
|
}
|
|
37
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Plan how to start DSH: explicit override, the dependency this CLI ships, the shim npm
|
|
72
|
+
* writes beside the package, then PATH.
|
|
73
|
+
*
|
|
74
|
+
* Shipping the runtime as an optional dependency is what keeps this ladder short on a
|
|
75
|
+
* normal install — Node resolution finds it and the JS entry runs through node, so no
|
|
76
|
+
* shell, no PATH, and no global install is involved. PATH stays as the escape hatch for
|
|
77
|
+
* a hoisted tree, a global install, or `GBH_DSH_BIN`.
|
|
78
|
+
*/
|
|
79
|
+
export function planDsh(environment) {
|
|
80
|
+
const override = (environment.env.GBH_DSH_BIN ?? "").trim();
|
|
81
|
+
if (override.length > 0) {
|
|
82
|
+
const source = "GBH_DSH_BIN=" + override;
|
|
83
|
+
if (JS_ENTRY.test(override))
|
|
84
|
+
return { command: environment.node, baseArgs: [override], source };
|
|
85
|
+
if (WINDOWS_SHIM.test(override))
|
|
86
|
+
return shimCandidate(environment, override, source);
|
|
87
|
+
return { command: override, baseArgs: [], source };
|
|
88
|
+
}
|
|
89
|
+
const installed = installedPackageDir(environment);
|
|
90
|
+
if (installed !== undefined)
|
|
91
|
+
return entryCandidate(environment, installed, DSH_PACKAGE + " (dependency)");
|
|
92
|
+
/* Two levels up: this file lives in src/web/ in a checkout and dist/web/ in a package. */
|
|
93
|
+
const root = fileURLToPath(new URL("../../", import.meta.url));
|
|
94
|
+
const localBin = join(root, "node_modules", ".bin", environment.platform === "win32" ? "dsh.cmd" : "dsh");
|
|
95
|
+
if (environment.exists(localBin)) {
|
|
96
|
+
const localPackage = join(root, "node_modules", "@deepseek-ai", "dsh");
|
|
97
|
+
if (hasEntry(environment, localPackage))
|
|
98
|
+
return entryCandidate(environment, localPackage, "node_modules/.bin/dsh");
|
|
99
|
+
if (WINDOWS_SHIM.test(localBin))
|
|
100
|
+
return shimCandidate(environment, localBin, "node_modules/.bin/dsh");
|
|
101
|
+
return { command: localBin, baseArgs: [], source: "node_modules/.bin/dsh" };
|
|
102
|
+
}
|
|
103
|
+
const onPath = environment.pathLookup();
|
|
104
|
+
if (onPath !== undefined) {
|
|
105
|
+
const source = "PATH (" + onPath + ")";
|
|
106
|
+
if (WINDOWS_SHIM.test(onPath))
|
|
107
|
+
return shimCandidate(environment, onPath, source);
|
|
108
|
+
return { command: onPath, baseArgs: [], source };
|
|
109
|
+
}
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* First line of a PATH lookup, or undefined when the finder matched nothing.
|
|
114
|
+
*
|
|
115
|
+
* `stderr` stays piped on purpose: `where.exe` writes its "INFO: Could not find files for
|
|
116
|
+
* the given pattern(s)." note there, and `execFileSync` forwards a child's stderr whenever
|
|
117
|
+
* `stdio` is not given — which is why that note used to appear right before the real error.
|
|
118
|
+
*/
|
|
119
|
+
export function lookupOnPath(finder, name) {
|
|
120
|
+
try {
|
|
121
|
+
const out = execFileSync(finder, [name], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }).trim();
|
|
122
|
+
const first = (out.split(/\r?\n/)[0] ?? "").trim();
|
|
123
|
+
return first.length === 0 ? undefined : first;
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** The live process facts: real filesystem, real PATH lookup, real Node resolution. */
|
|
130
|
+
function systemEnvironment() {
|
|
131
|
+
const require = createRequire(import.meta.url);
|
|
132
|
+
return {
|
|
133
|
+
platform: process.platform,
|
|
134
|
+
env: process.env,
|
|
135
|
+
node: process.execPath,
|
|
136
|
+
exists: existsSync,
|
|
137
|
+
pathLookup: () => lookupOnPath(process.platform === "win32" ? "where" : "which", "dsh"),
|
|
138
|
+
resolve: specifier => require.resolve(specifier),
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/** Resolve the DSH runtime: explicit override, bundled dependency, local shim, then PATH. */
|
|
38
142
|
export function resolveDsh() {
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
return describe(value, [], "GBH_DSH_BIN=" + value);
|
|
46
|
-
}
|
|
47
|
-
const root = fileURLToPath(new URL("../", import.meta.url));
|
|
48
|
-
const localBin = join(root, "node_modules", ".bin", process.platform === "win32" ? "dsh.cmd" : "dsh");
|
|
49
|
-
if (existsSync(localBin))
|
|
50
|
-
return describe(localBin, [], "node_modules/.bin/dsh");
|
|
51
|
-
const localJs = join(root, "node_modules", "@deepseek-ai", "dsh", "lib", "bin.js");
|
|
52
|
-
if (existsSync(localJs))
|
|
53
|
-
return describe(process.execPath, [localJs], "@deepseek-ai/dsh (local)");
|
|
54
|
-
const onPath = whichDsh();
|
|
55
|
-
if (onPath !== undefined)
|
|
56
|
-
return describe(onPath, [], "PATH (" + onPath + ")");
|
|
57
|
-
throw new Error("DSH runtime not found. Install @deepseek-ai/dsh or set GBH_DSH_BIN.");
|
|
143
|
+
const candidate = planDsh(systemEnvironment());
|
|
144
|
+
if (candidate === undefined) {
|
|
145
|
+
throw new Error("DSH runtime not found. Install it with `" + DSH_INSTALL_HINT + "`, or point GBH_DSH_BIN at a dsh entry (" + DSH_ENTRY + ").");
|
|
146
|
+
}
|
|
147
|
+
return describe(candidate);
|
|
58
148
|
}
|
|
59
149
|
//# sourceMappingURL=dsh.js.map
|
package/dist/web/dsh.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dsh.js","sourceRoot":"","sources":["../../src/web/dsh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"dsh.js","sourceRoot":"","sources":["../../src/web/dsh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,yDAAyD;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE/C,uFAAuF;AACvF,MAAM,CAAC,MAAM,gBAAgB,GAAG,4BAA4B,GAAG,kBAAkB,CAAC;AAElF,qFAAqF;AACrF,MAAM,CAAC,MAAM,WAAW,GAAG,kBAAkB,CAAC;AAC9C,MAAM,YAAY,GAAG,WAAW,GAAG,eAAe,CAAC;AACnD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAExC,gGAAgG;AAChG,MAAM,YAAY,GAAG,eAAe,CAAC;AACr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OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;QACvF,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;KACjD,CAAC;AACJ,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,UAAU;IACxB,MAAM,SAAS,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAC/C,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,0CAA0C,GAAG,gBAAgB,GAAG,0CAA0C,GAAG,SAAS,GAAG,IAAI,CAC9H,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC7B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galaxy-stack/blackhole-cli",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Galaxy Code CLI and terminal UI for the Galaxy agent runtime",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,18 +23,23 @@
|
|
|
23
23
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
24
24
|
"test": "tsx --test test/*.test.ts test/*.test.tsx",
|
|
25
25
|
"check": "npm run core:build && npm run typecheck && npm test && npm run build",
|
|
26
|
+
"skills:check": "node scripts/sync-skill.mjs",
|
|
27
|
+
"skills:sync": "node scripts/sync-skill.mjs --write",
|
|
26
28
|
"publish:alpha": "node scripts/publish.mjs",
|
|
27
29
|
"publish:release": "node scripts/publish.mjs"
|
|
28
30
|
},
|
|
29
31
|
"dependencies": {
|
|
30
32
|
"@assistant-ui/react-ink": "^0.0.44",
|
|
31
|
-
"@galaxy-stack/ai-coder-core": "0.3.
|
|
33
|
+
"@galaxy-stack/ai-coder-core": "0.3.5",
|
|
32
34
|
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
33
35
|
"ink": "7.1.1",
|
|
34
36
|
"react": "^19.3.0",
|
|
35
37
|
"string-width": "^8.2.2",
|
|
36
38
|
"wrap-ansi": "^9.0.2"
|
|
37
39
|
},
|
|
40
|
+
"optionalDependencies": {
|
|
41
|
+
"@deepseek-ai/dsh": "0.1.5-rc.3"
|
|
42
|
+
},
|
|
38
43
|
"devDependencies": {
|
|
39
44
|
"@types/node": "^22.19.15",
|
|
40
45
|
"@types/react": "^19.3.0",
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: galaxy-ui
|
|
3
3
|
description: Guide for building UIs with Galaxy UI components across React, Vue, Angular, React Native, and Flutter. Use when the user asks to create UIs, add components, scaffold projects with the Nebula CLI, style with Tailwind v3/v4, or asks about Galaxy component APIs and patterns. Requires using the Nebula CLI for installation and referencing real component APIs (via MCP tools or docs) before writing code.
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
|
+
# The companion MCP is installed separately and answers the props lookups this skill routes to;
|
|
6
|
+
# get_component { id, section } with real per-component props arrives with nebula-mcp 1.1.0, and
|
|
7
|
+
# older servers answer an empty manifest for a component that exists.
|
|
8
|
+
requires:
|
|
9
|
+
nebula: ">=1.1.0"
|
|
5
10
|
---
|
|
6
11
|
|
|
7
12
|
# Galaxy UI
|
|
@@ -5,7 +5,13 @@ description: >
|
|
|
5
5
|
(@galaxy-stack/orbit-*), a NestJS-style framework optimized for the Bun
|
|
6
6
|
runtime. Use when creating modules, controllers, providers, GraphQL APIs,
|
|
7
7
|
microservices, or when migrating from NestJS to Orbit.
|
|
8
|
-
version: 1.
|
|
8
|
+
version: 1.1.0
|
|
9
|
+
# The companion server is installed separately and the harness validates every call against the
|
|
10
|
+
# schema it declares, so this skill states the version its documented call shapes need. 0.4.0
|
|
11
|
+
# declared orbit_knowledge_read { id } as required and had no symbol argument, which rejected the
|
|
12
|
+
# { symbol } and { section } shapes taught below.
|
|
13
|
+
requires:
|
|
14
|
+
orbit: ">=0.4.1"
|
|
9
15
|
---
|
|
10
16
|
|
|
11
17
|
# Orbit Framework Skill
|
|
@@ -161,39 +161,8 @@ window.__ModuleLoader__.load({
|
|
|
161
161
|
"dialog.failed": "Could not delete the session.",
|
|
162
162
|
"dialog.done": "Session deleted.",
|
|
163
163
|
"dialog.alreadyDeleted": "This session was already deleted. Its row has now been cleaned up.",
|
|
164
|
-
"dialog.unknown": "This session left no trace in the DSH home; the list has been cleaned up."
|
|
165
|
-
"turnError.hint": "This conversation outgrew what the route really serves (~655k prompt tokens with tools and images), so the provider refuses every request that carries it — including /compact. Fork an earlier turn (branch icon) or open a new session to get back under the limit."
|
|
164
|
+
"dialog.unknown": "This session left no trace in the DSH home; the list has been cleaned up."
|
|
166
165
|
};
|
|
167
|
-
/** Provider failure codes whose only way out is changing the request itself. */
|
|
168
|
-
const GBH_STUCK_CODES = { SERVER: 1, TRANSPORT: 1, TIMEOUT: 1, RATE_LIMIT: 1, EMPTY_RESPONSE: 1 };
|
|
169
|
-
/**
|
|
170
|
-
* Point at the way out when the provider refuses a turn.
|
|
171
|
-
*
|
|
172
|
-
* DSH renders a terminal turn failure with no next step, and re-sending the exact
|
|
173
|
-
* prompt is what keeps failing (measured 2026-09-29: the same conversation was
|
|
174
|
-
* still refused 2 and 20 minutes later, while every other conversation worked, and
|
|
175
|
-
* the route itself served 1M-token prompts). Both escapes change the request: a
|
|
176
|
-
* compaction replaces the history with a summary, and a fork from an earlier turn
|
|
177
|
-
* starts from a smaller prefix.
|
|
178
|
-
*/
|
|
179
|
-
function gbhAnnotateTurnErrors(sessionsT) {
|
|
180
|
-
var rows = document.querySelectorAll("[class*=turnErrorRow]");
|
|
181
|
-
var limit = Math.min(rows.length, 20);
|
|
182
|
-
for (var i = 0; i < limit; i += 1) {
|
|
183
|
-
var row = rows[i];
|
|
184
|
-
/* React may re-render the row and drop the node, so probe the hint, not a flag. */
|
|
185
|
-
if (row.querySelector("[data-gbh-turn-hint]") !== null) continue;
|
|
186
|
-
var code = row.querySelector("[class*=turnErrorCode]");
|
|
187
|
-
var label = code === null ? "" : (code.textContent || "").trim();
|
|
188
|
-
if (GBH_STUCK_CODES[label] !== 1) continue;
|
|
189
|
-
var hint = document.createElement("div");
|
|
190
|
-
hint.setAttribute("data-gbh-turn-hint", "1");
|
|
191
|
-
hint.textContent = sessionsT("turnError.hint");
|
|
192
|
-
/* The row is a 10px | copy | code grid, so the hint spans the copy column below. */
|
|
193
|
-
hint.style.cssText = "grid-column:2/-1;margin-top:2px;color:var(--dsw-alias-label-tertiary,inherit);font-size:12px;line-height:18px";
|
|
194
|
-
row.append(hint);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
166
|
/** Success wording that reports what the route actually did. */
|
|
198
167
|
function gbhDeleteOutcomeText(body, t) {
|
|
199
168
|
if (body && body.found === false) return t("dialog.unknown");
|
|
@@ -731,8 +700,7 @@ window.__ModuleLoader__.load({
|
|
|
731
700
|
* A session switch re-renders the transcript thousands of times, and probing the
|
|
732
701
|
* document for an open menu on every record froze the renderer; a burst now costs
|
|
733
702
|
* a single probe after the DOM settles, and a burst without element insertions is
|
|
734
|
-
* ignored entirely.
|
|
735
|
-
* two bounded row queries per burst.
|
|
703
|
+
* ignored entirely.
|
|
736
704
|
*/
|
|
737
705
|
var menuProbeScheduled = false;
|
|
738
706
|
function scheduleMenuProbe() {
|
|
@@ -741,7 +709,6 @@ window.__ModuleLoader__.load({
|
|
|
741
709
|
setTimeout(function () {
|
|
742
710
|
menuProbeScheduled = false;
|
|
743
711
|
gbhInjectDeleteMenuItem(sessionsT);
|
|
744
|
-
gbhAnnotateTurnErrors(sessionsT);
|
|
745
712
|
}, 150);
|
|
746
713
|
}
|
|
747
714
|
new MutationObserver(function (mutations) {
|