@monotykamary/dsh 0.1.0-rc.9 → 0.1.1
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.i18n.yaml +2 -2
- package/README.md +4 -1
- package/README.zh.md +10 -5
- package/lib/bin.js +40 -6
- package/lib/distribution-12O2K2qe.js +63 -0
- package/lib/{dump-config-Bh3Bz4l0.js → dump-config-0GRcwOil.js} +1 -3
- package/lib/{plugin-cfFEyTiM.js → plugin-Cgl0ZnNV.js} +3 -2
- package/lib/{profile-boot-hvAsNaX6.js → profile-boot-Bt4vObgm.js} +5 -2
- package/lib/profile-boot-BuZ54o2X.js +2 -0
- package/package.json +83 -70
- package/lib/dump-config-BZ1o2tve.js +0 -52
- package/lib/dump-config-BvzGWnE3.js +0 -66
- package/lib/plugin-D0jZWziz.js +0 -129
- package/lib/plugin-vw4XdVuN.js +0 -129
- package/lib/profile-boot-B45utNE5.js +0 -2
- package/lib/profile-boot-B9SlvOjV.js +0 -2
- package/lib/profile-boot-CCBe1Ijy.js +0 -261
- package/lib/profile-boot-CXPZgDex.js +0 -273
- package/lib/profile-boot-DOU04Otj.js +0 -2
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write apps/cli/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 98048c14ccc99fc1f86f17f75fb3b822318e4849
|
|
6
|
+
README.zh.md: 412687905628248f32227e024d3467c801d66599
|
package/README.md
CHANGED
|
@@ -12,6 +12,9 @@ The `dsh` command is the product launcher for profiles: ordered stacks of plugin
|
|
|
12
12
|
| `dsh --profile headless "job"` | Run one fresh persisted session, print the final answer, and exit. |
|
|
13
13
|
| `dsh web` | Alias of `--profile web`. |
|
|
14
14
|
| `dsh plugin --profile <name> <pnpm args>` | Manage a profile's plugins by forwarding to pnpm in the profile directory. |
|
|
15
|
+
| `dsh version [--json]` | Report the installed DSH, Fabric, and Fovea closure. |
|
|
16
|
+
| `dsh update [--check] [--json]` | Check versions or hand an npm-global update to a detached worker. |
|
|
17
|
+
| `dsh doctor [--json]` | Report the installation channel, Node version, DSH home, and package versions. |
|
|
15
18
|
|
|
16
19
|
The invoking directory is the default workspace root. The `web` and `headless` profiles auto-initialize on first use from shipped templates; any other profile must be created through `dsh plugin`.
|
|
17
20
|
|
|
@@ -29,7 +32,7 @@ dsh --help # the launcher's own help
|
|
|
29
32
|
|
|
30
33
|
## Profiles
|
|
31
34
|
|
|
32
|
-
A profile directory holds a `package.json` (out-of-tree plugin dependencies plus
|
|
35
|
+
A profile directory holds a `package.json` (out-of-tree plugin dependencies plus `dsh.profile.template` for an installation-owned shipped stack and `dsh.profile.bundles` for user-managed layers) and a `cordis.patch.yml` (the user's own patch layer).
|
|
33
36
|
|
|
34
37
|
The tree composes over an empty root:
|
|
35
38
|
- each bundle's patch in `dsh.profile.bundles` order
|
package/README.zh.md
CHANGED
|
@@ -12,12 +12,15 @@
|
|
|
12
12
|
| `dsh --profile headless "job"` | 运行一个全新的持久化会话,打印最终答案并退出。 |
|
|
13
13
|
| `dsh web` | `--profile web` 的别名。 |
|
|
14
14
|
| `dsh plugin --profile <name> <pnpm args>` | 通过在 profile 目录中转发给 pnpm 来管理该 profile 的插件。 |
|
|
15
|
+
| `dsh version [--json]` | 报告已安装的 DSH、Fabric 与 Fovea 闭包。 |
|
|
16
|
+
| `dsh update [--check] [--json]` | 检查版本,或把 npm 全局更新交给分离 Worker。 |
|
|
17
|
+
| `dsh doctor [--json]` | 报告安装渠道、Node 版本、DSH home 与包版本。 |
|
|
15
18
|
|
|
16
19
|
运行命令时所在的目录将作为默认 workspace 根目录。`web` 和 `headless` profile 在首次使用时会从随附模板自动初始化;其他任何 profile 都必须通过 `dsh plugin` 创建。
|
|
17
20
|
|
|
18
21
|
## 应用参数
|
|
19
22
|
|
|
20
|
-
启动器只解析自身的 flag,并将其后的所有内容交给已启动的 profile;注入该 profile 的任意应用插件都可以解析这份共享的不可变快照([`dsh-cmdline`](../../packages/boot/cmdline/README.md))。因此,启动器的 flag 必须写在最前面;启动器无法识别的第一个 token 标志着应用参数的开始:
|
|
23
|
+
启动器只解析自身的 flag,并将其后的所有内容交给已启动的 profile;注入该 profile 的任意应用插件都可以解析这份共享的不可变快照([`dsh-cmdline`](../../packages/boot/cmdline/README.zh.md))。因此,启动器的 flag 必须写在最前面;启动器无法识别的第一个 token 标志着应用参数的开始:
|
|
21
24
|
|
|
22
25
|
```sh
|
|
23
26
|
dsh --profile web --port 8080 # --port belongs to the web app
|
|
@@ -27,12 +30,14 @@ dsh --profile web --help # the web app's flags, not the launcher's
|
|
|
27
30
|
dsh --help # the launcher's own help
|
|
28
31
|
```
|
|
29
32
|
|
|
33
|
+
<a id="profiles"></a>
|
|
34
|
+
|
|
30
35
|
## Profile
|
|
31
36
|
|
|
32
|
-
profile 目录包含一个 `package.json
|
|
37
|
+
profile 目录包含一个 `package.json`,其中记录树外插件依赖、由安装拥有的内置栈 `dsh.profile.template`,以及用户管理的 `dsh.profile.bundles`;还包含一个 `cordis.patch.yml`,其中保存用户自己的 patch 层。
|
|
33
38
|
|
|
34
39
|
配置树以空根为起点,依次叠加以下配置层:
|
|
35
|
-
- `dsh.profile.bundles`
|
|
40
|
+
- `dsh.profile.template` 的当前安装层,然后是 `dsh.profile.bundles` 中各用户组合包的 patch
|
|
36
41
|
- profile 自身的 `cordis.patch.yml`,然后是 home 级的 `$DSH_HOME/cordis.patch.yml`
|
|
37
42
|
- `--patch` 指定的覆盖层
|
|
38
43
|
|
|
@@ -40,8 +45,8 @@ profile 目录包含一个 `package.json`,其中记录树外插件依赖,以
|
|
|
40
45
|
|
|
41
46
|
使用 `--dump-default-config` 和 `--dump-config` 可在不启动的情况下检查组合后的配置树。
|
|
42
47
|
|
|
43
|
-
层的确切优先级、flag、关闭行为、部署默认值和源码执行方式,以 [CLI(命令行界面)行为参考](reference/README.md)为准。
|
|
48
|
+
层的确切优先级、flag、关闭行为、部署默认值和源码执行方式,以 [CLI(命令行界面)行为参考](reference/README.zh.md)为准。
|
|
44
49
|
|
|
45
50
|
## 开发
|
|
46
51
|
|
|
47
|
-
生产运行需要已构建的包与前端产物。请在仓库根目录单独运行 `pnpm run build`,然后使用 `pnpm dsh <args...>` 运行 TypeScript 入口并转发所有参数;模块解析约定以[源码执行参考](reference/README.md#source-execution)为准。
|
|
52
|
+
生产运行需要已构建的包与前端产物。请在仓库根目录单独运行 `pnpm run build`,然后使用 `pnpm dsh <args...>` 运行 TypeScript 入口并转发所有参数;模块解析约定以[源码执行参考](reference/README.zh.md#source-execution)为准。
|
package/lib/bin.js
CHANGED
|
@@ -34,6 +34,9 @@ Examples:
|
|
|
34
34
|
dsh --profile tui --resume <session> arguments after the launcher flags reach the app
|
|
35
35
|
dsh --profile web --help the web app's own flags and help
|
|
36
36
|
dsh plugin --profile tui add <package> install a plugin into the tui profile
|
|
37
|
+
dsh update --check check DSH, Fabric, and Fovea versions
|
|
38
|
+
dsh doctor --json print installation diagnostics
|
|
39
|
+
dsh portless setup install the bundled HTTPS service
|
|
37
40
|
`;
|
|
38
41
|
/**
|
|
39
42
|
* Resolve a boot or dump invocation from the launcher flags and the leftover
|
|
@@ -103,12 +106,34 @@ function parseDshArgs(argv, version) {
|
|
|
103
106
|
args
|
|
104
107
|
};
|
|
105
108
|
});
|
|
109
|
+
program.command("portless").description("manage the installation-owned named-localhost HTTPS service").command("setup").description("install and start the bundled portless HTTPS service (may request elevation)").action(() => {
|
|
110
|
+
rejectParentOptions("portless");
|
|
111
|
+
resolved = {
|
|
112
|
+
mode: "portless",
|
|
113
|
+
action: "setup"
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
for (const command of ["version", "doctor"]) program.command(command).description(command === "version" ? "show the complete installed distribution version" : "show installation diagnostics").option("--json", "write machine-readable JSON").action((options) => {
|
|
117
|
+
rejectParentOptions(command);
|
|
118
|
+
resolved = {
|
|
119
|
+
mode: "distribution",
|
|
120
|
+
action: command,
|
|
121
|
+
json: options.json === true
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
program.command("update").description("check for updates or start a channel-aware update").option("--check", "check without installing").option("--json", "write machine-readable JSON").action((options) => {
|
|
125
|
+
rejectParentOptions("update");
|
|
126
|
+
resolved = {
|
|
127
|
+
mode: "distribution",
|
|
128
|
+
action: options.check === true ? "check" : "update",
|
|
129
|
+
json: options.json === true
|
|
130
|
+
};
|
|
131
|
+
});
|
|
106
132
|
try {
|
|
107
133
|
program.parse(argv, { from: "user" });
|
|
108
134
|
} catch (error) {
|
|
109
135
|
return process.exit(error instanceof CommanderError ? error.exitCode : 1);
|
|
110
136
|
}
|
|
111
|
-
/* v8 ignore next -- an action resolves or Commander throws */
|
|
112
137
|
if (resolved === void 0) throw new Error("dsh: no invocation resolved");
|
|
113
138
|
return resolved;
|
|
114
139
|
}
|
|
@@ -120,7 +145,6 @@ function parseDshArgs(argv, version) {
|
|
|
120
145
|
* `--help`/`--version`/a parse error, so only a valid mode reaches the switch.
|
|
121
146
|
* @module @monotykamary/dsh/bin
|
|
122
147
|
*/
|
|
123
|
-
/* v8 ignore file -- built-bin acceptance exercises this self-executing dispatch. */
|
|
124
148
|
/** This app's version, read from its checked-in package.json. */
|
|
125
149
|
function readVersion() {
|
|
126
150
|
const manifest = JSON.parse(readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf8"));
|
|
@@ -129,7 +153,7 @@ function readVersion() {
|
|
|
129
153
|
const invocation = parseDshArgs(process.argv.slice(2), readVersion());
|
|
130
154
|
switch (invocation.mode) {
|
|
131
155
|
case "profile": {
|
|
132
|
-
const { runProfile } = await import("./profile-boot-
|
|
156
|
+
const { runProfile } = await import("./profile-boot-BuZ54o2X.js");
|
|
133
157
|
await runProfile({
|
|
134
158
|
environment: loadLayeredEnv("dsh"),
|
|
135
159
|
profile: invocation.profile,
|
|
@@ -139,16 +163,26 @@ switch (invocation.mode) {
|
|
|
139
163
|
break;
|
|
140
164
|
}
|
|
141
165
|
case "plugin": {
|
|
142
|
-
const { runPlugin } = await import("./plugin-
|
|
166
|
+
const { runPlugin } = await import("./plugin-Cgl0ZnNV.js");
|
|
143
167
|
process.exit(runPlugin(invocation.profile, invocation.args));
|
|
144
168
|
break;
|
|
145
169
|
}
|
|
170
|
+
case "portless": {
|
|
171
|
+
const { runPortlessCli } = await import("@monotykamary/dsh-web-app/portless");
|
|
172
|
+
process.exitCode = runPortlessCli(["service", "install"]);
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
146
175
|
case "dump-config": {
|
|
147
|
-
const { runDumpConfig } = await import("./dump-config-
|
|
176
|
+
const { runDumpConfig } = await import("./dump-config-0GRcwOil.js");
|
|
148
177
|
runDumpConfig(invocation.profile, invocation.defaultOnly, invocation.patches);
|
|
149
178
|
break;
|
|
150
179
|
}
|
|
180
|
+
case "distribution": {
|
|
181
|
+
const { runDistribution } = await import("./distribution-12O2K2qe.js");
|
|
182
|
+
process.exitCode = await runDistribution(invocation.action, invocation.json, fileURLToPath(new URL("../package.json", import.meta.url)));
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
151
185
|
default: throw new Error(`dsh: unhandled invocation mode ${JSON.stringify(invocation)}`);
|
|
152
186
|
}
|
|
153
187
|
//#endregion
|
|
154
|
-
export {};
|
|
188
|
+
export { readVersion };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { checkInstalledDistribution, detectInstallChannel, installationDiagnostics, installedDistribution, launchDetachedUpdate } from "@monotykamary/dsh-distribution-update";
|
|
2
|
+
import { resolveDshHome } from "@monotykamary/dsh-home-paths";
|
|
3
|
+
//#region lib/types/distribution.js
|
|
4
|
+
/** CLI presentation for DSH distribution inventory and updates. */
|
|
5
|
+
function report(appManifest) {
|
|
6
|
+
return {
|
|
7
|
+
channel: detectInstallChannel(appManifest),
|
|
8
|
+
dshHome: resolveDshHome(),
|
|
9
|
+
node: process.version,
|
|
10
|
+
packages: installedDistribution(appManifest)
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function printReport(value) {
|
|
14
|
+
process.stdout.write(`Install channel: ${value.channel}\n`);
|
|
15
|
+
process.stdout.write(`Node: ${value.node}\n`);
|
|
16
|
+
process.stdout.write(`DSH home: ${value.dshHome}\n`);
|
|
17
|
+
for (const pkg of value.packages) process.stdout.write(`${pkg.name}: ${pkg.installed}\n`);
|
|
18
|
+
if ("diagnostics" in value) for (const diagnostic of value.diagnostics) {
|
|
19
|
+
process.stdout.write(`[${diagnostic.severity}] ${diagnostic.summary}\n`);
|
|
20
|
+
if (diagnostic.remediation !== null) process.stdout.write(` ${diagnostic.remediation}\n`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Execute one distribution command.
|
|
25
|
+
* @param action - launcher-owned distribution operation.
|
|
26
|
+
* @param json - whether to emit machine-readable JSON.
|
|
27
|
+
* @param appManifest - running DSH package manifest.
|
|
28
|
+
* @param diagnose - host diagnostic sampler used only by doctor.
|
|
29
|
+
* @returns the process exit code.
|
|
30
|
+
*/
|
|
31
|
+
async function runDistribution(action, json, appManifest, diagnose = installationDiagnostics) {
|
|
32
|
+
if (action === "version" || action === "doctor") {
|
|
33
|
+
const value = action === "doctor" ? {
|
|
34
|
+
...report(appManifest),
|
|
35
|
+
diagnostics: diagnose()
|
|
36
|
+
} : report(appManifest);
|
|
37
|
+
if (json) process.stdout.write(`${JSON.stringify(value, void 0, 2)}\n`);
|
|
38
|
+
else printReport(value);
|
|
39
|
+
return "diagnostics" in value && value.diagnostics.some((item) => item.severity === "blocking") ? 2 : 0;
|
|
40
|
+
}
|
|
41
|
+
if (action === "check") try {
|
|
42
|
+
const packages = await checkInstalledDistribution(appManifest);
|
|
43
|
+
const value = {
|
|
44
|
+
...report(appManifest),
|
|
45
|
+
packages
|
|
46
|
+
};
|
|
47
|
+
if (json) process.stdout.write(`${JSON.stringify(value, void 0, 2)}\n`);
|
|
48
|
+
else {
|
|
49
|
+
printReport(value);
|
|
50
|
+
process.stdout.write(packages.some((pkg) => pkg.updateAvailable) ? "Updates are available.\n" : "DSH is up to date.\n");
|
|
51
|
+
}
|
|
52
|
+
return packages.some((pkg) => pkg.updateAvailable) ? 10 : 0;
|
|
53
|
+
} catch (error) {
|
|
54
|
+
process.stderr.write(`dsh: update check failed: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
55
|
+
return 1;
|
|
56
|
+
}
|
|
57
|
+
const result = launchDetachedUpdate(appManifest);
|
|
58
|
+
if (json) process.stdout.write(`${JSON.stringify(result, void 0, 2)}\n`);
|
|
59
|
+
else process.stdout.write(`${result.message}\n`);
|
|
60
|
+
return result.started ? 0 : 2;
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { runDistribution };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as prepareProfile, n as PROFILE_ROOT_FILENAME, r as homePatchPath } from "./profile-boot-
|
|
1
|
+
import { i as prepareProfile, n as PROFILE_ROOT_FILENAME, r as homePatchPath } from "./profile-boot-Bt4vObgm.js";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { loadOptionalPatches, loadOverlayPatches, renderConfigDump } from "@monotykamary/dsh-app-boot";
|
|
4
4
|
import { join, resolve } from "node:path";
|
|
@@ -11,7 +11,6 @@ import { join, resolve } from "node:path";
|
|
|
11
11
|
* @module @monotykamary/dsh/dump-config
|
|
12
12
|
*/
|
|
13
13
|
const NAME = "dsh";
|
|
14
|
-
/* v8 ignore start -- built-bin acceptance drives this boot-free dispatch */
|
|
15
14
|
/**
|
|
16
15
|
* Print a profile composition with comments naming each source file and patch layer.
|
|
17
16
|
* @param profile - the profile name.
|
|
@@ -61,6 +60,5 @@ function runDumpConfig(profile, defaultOnly, patches) {
|
|
|
61
60
|
}
|
|
62
61
|
process.stdout.write(renderConfigDump(NAME, join(loaded.dir, PROFILE_ROOT_FILENAME), layers));
|
|
63
62
|
}
|
|
64
|
-
/* v8 ignore stop */
|
|
65
63
|
//#endregion
|
|
66
64
|
export { runDumpConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as INSTALL_ANCHOR } from "./profile-boot-
|
|
1
|
+
import { t as INSTALL_ANCHOR } from "./profile-boot-Bt4vObgm.js";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
3
|
import { DEFAULT_PROFILE_BUNDLES, PROFILE_TEMPLATES, initProfile, readProfileManifest, resolveBundleDir, resolveProfileDir, writeProfileManifest } from "@monotykamary/dsh-app-boot";
|
|
4
4
|
import { join, resolve } from "node:path";
|
|
@@ -101,7 +101,8 @@ function anchorPathSpec(argument, cwd) {
|
|
|
101
101
|
function runPlugin(profile, args) {
|
|
102
102
|
const dir = resolveProfileDir(profile);
|
|
103
103
|
if (!existsSync(join(dir, "package.json"))) {
|
|
104
|
-
|
|
104
|
+
const template = PROFILE_TEMPLATES[profile];
|
|
105
|
+
initProfile(dir, template ?? DEFAULT_PROFILE_BUNDLES, template === void 0 ? void 0 : profile);
|
|
105
106
|
process.stderr.write(`${NAME}: initialized profile ${profile} at ${dir}\n`);
|
|
106
107
|
}
|
|
107
108
|
const before = readProfileManifest(NAME, dir);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { writeFileSync } from "node:fs";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
import { PROFILE_PATCH_FILENAME, boot, composeEntries, healProfilesModuleFallback, installFailLoud, loadOptionalPatches, loadOverlayPatches, loadProfile, watchUserPatches } from "@monotykamary/dsh-app-boot";
|
|
4
|
-
import { join, resolve } from "node:path";
|
|
5
4
|
import { resolveDshHome } from "@monotykamary/dsh-home-paths";
|
|
5
|
+
import { join, resolve } from "node:path";
|
|
6
6
|
import { DSH_LAUNCH_ENVIRONMENT_KEY } from "@monotykamary/dsh-launch-environment";
|
|
7
7
|
import { provideCmdline } from "@monotykamary/dsh-cmdline";
|
|
8
8
|
//#region lib/types/process-shutdown.js
|
|
@@ -27,7 +27,6 @@ function createProcessShutdown(dispose, forceExit = (code) => {
|
|
|
27
27
|
let completed = false;
|
|
28
28
|
let forceExited = false;
|
|
29
29
|
const clearExitTimeout = () => {
|
|
30
|
-
/* v8 ignore else -- shutdown() arms the timer before any asynchronous exit path can run. */
|
|
31
30
|
if (timeout !== void 0) clearTimeout(timeout);
|
|
32
31
|
};
|
|
33
32
|
const forceExitOnce = (code) => {
|
|
@@ -160,6 +159,10 @@ function composeProfile(name, patchFiles) {
|
|
|
160
159
|
}
|
|
161
160
|
});
|
|
162
161
|
}
|
|
162
|
+
if (bundlePatches.some((patch) => patch.id === "distribution-update" || Array.isArray(patch.insert) && patch.insert.some((row) => row.id === "distribution-update"))) bundlePatches.push({
|
|
163
|
+
id: "distribution-update",
|
|
164
|
+
config: { appManifest: INSTALL_ANCHOR }
|
|
165
|
+
});
|
|
163
166
|
const rows = /* @__PURE__ */ new Map();
|
|
164
167
|
for (const row of composeEntries([
|
|
165
168
|
bundlePatches,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monotykamary/dsh",
|
|
3
3
|
"description": "dsh CLI: profile boot, plugin management, and the browser UI alias",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -23,82 +23,95 @@
|
|
|
23
23
|
"commander": "^15.0.0",
|
|
24
24
|
"js-yaml": "^4.2.0",
|
|
25
25
|
"node-addon-require-builtin": "^0.1.4",
|
|
26
|
-
"dsh-
|
|
27
|
-
"dsh-
|
|
26
|
+
"dsh-tool-repair": "0.1.0",
|
|
27
|
+
"dsh-fabric": "0.1.5",
|
|
28
|
+
"dsh-fovea": "0.5.0",
|
|
29
|
+
"dsh-factory": "0.1.1",
|
|
28
30
|
"@monotykamary/cordis-plugin-include": "^1.0.6",
|
|
29
|
-
"@monotykamary/dsh-app-boot": "^0.1.0-rc.9",
|
|
30
|
-
"@monotykamary/dsh-client-ui-agent-preset": "^0.1.0-rc.9",
|
|
31
|
-
"@monotykamary/cordis-plugin-loader": "^1.0.2",
|
|
32
|
-
"@monotykamary/dsh-cordis-client-runner": "^0.1.0-rc.9",
|
|
33
|
-
"@monotykamary/dsh-client-ui-cordis": "^0.1.0-rc.9",
|
|
34
|
-
"@monotykamary/dsh-base": "^0.1.0-rc.9",
|
|
35
31
|
"@monotykamary/cordis-plugin-hmr": "^1.0.16",
|
|
36
|
-
"@monotykamary/dsh-agent-tool-presentation": "^0.1.
|
|
37
|
-
"@monotykamary/
|
|
32
|
+
"@monotykamary/dsh-agent-tool-presentation": "^0.1.1",
|
|
33
|
+
"@monotykamary/cordis-plugin-loader": "^1.0.2",
|
|
38
34
|
"@monotykamary/cordis-plugin-timer": "^1.1.3",
|
|
39
|
-
"@monotykamary/dsh-
|
|
40
|
-
"@monotykamary/dsh-
|
|
41
|
-
"@monotykamary/dsh-
|
|
42
|
-
"@monotykamary/dsh-
|
|
43
|
-
"@monotykamary/dsh-
|
|
44
|
-
"@monotykamary/dsh-
|
|
45
|
-
"@monotykamary/dsh-
|
|
46
|
-
"@monotykamary/dsh-
|
|
47
|
-
"@monotykamary/dsh-
|
|
48
|
-
"@monotykamary/dsh-
|
|
49
|
-
"@monotykamary/dsh-
|
|
50
|
-
"@monotykamary/dsh-
|
|
51
|
-
"@monotykamary/dsh-
|
|
52
|
-
"@monotykamary/dsh-
|
|
53
|
-
"@monotykamary/dsh-
|
|
54
|
-
"@monotykamary/dsh-
|
|
55
|
-
"@monotykamary/dsh-
|
|
56
|
-
"@monotykamary/dsh-
|
|
57
|
-
"@monotykamary/dsh-
|
|
58
|
-
"@monotykamary/dsh-
|
|
59
|
-
"@monotykamary/dsh-
|
|
60
|
-
"@monotykamary/dsh-
|
|
61
|
-
"@monotykamary/dsh-
|
|
62
|
-
"@monotykamary/dsh-
|
|
63
|
-
"@monotykamary/dsh-
|
|
64
|
-
"@monotykamary/dsh-
|
|
65
|
-
"@monotykamary/dsh-
|
|
66
|
-
"@monotykamary/dsh-
|
|
67
|
-
"@monotykamary/dsh-
|
|
68
|
-
"@monotykamary/dsh-tool-
|
|
69
|
-
"@monotykamary/dsh-
|
|
70
|
-
"@monotykamary/dsh-
|
|
71
|
-
"@monotykamary/dsh-tool-
|
|
72
|
-
"@monotykamary/dsh-tool-
|
|
73
|
-
"@monotykamary/dsh-tool-
|
|
74
|
-
"@monotykamary/dsh-
|
|
75
|
-
"@monotykamary/dsh-tool-
|
|
76
|
-
"@monotykamary/dsh-tool-
|
|
77
|
-
"@monotykamary/dsh-tool-
|
|
78
|
-
"@monotykamary/dsh-tool-
|
|
79
|
-
"@monotykamary/dsh-
|
|
80
|
-
"@monotykamary/dsh-
|
|
81
|
-
"@monotykamary/dsh-tool-
|
|
35
|
+
"@monotykamary/dsh-app-boot": "^0.1.1",
|
|
36
|
+
"@monotykamary/dsh-base": "^0.1.1",
|
|
37
|
+
"@monotykamary/dsh-cordis-client-runner": "^0.1.1",
|
|
38
|
+
"@monotykamary/dsh-client-ui-cordis": "^0.1.1",
|
|
39
|
+
"@monotykamary/dsh-client-ui-agent-preset": "^0.1.1",
|
|
40
|
+
"@monotykamary/dsh-command-compact": "^0.1.1",
|
|
41
|
+
"@monotykamary/dsh-command-goal": "^0.1.1",
|
|
42
|
+
"@monotykamary/dsh-compaction-basic": "^0.1.1",
|
|
43
|
+
"@monotykamary/dsh-goal-round-driver": "^0.1.1",
|
|
44
|
+
"@monotykamary/dsh-cmdline": "^0.1.1",
|
|
45
|
+
"@monotykamary/dsh-goal": "^0.1.1",
|
|
46
|
+
"@monotykamary/dsh-launch-environment": "^0.1.1",
|
|
47
|
+
"@monotykamary/dsh-fs-local": "^0.1.1",
|
|
48
|
+
"@monotykamary/dsh-compaction-tool-result-pruner": "^0.1.1",
|
|
49
|
+
"@monotykamary/dsh-mcp-client": "^0.1.1",
|
|
50
|
+
"@monotykamary/dsh-headless": "^0.1.1",
|
|
51
|
+
"@monotykamary/dsh-persona": "^0.1.1",
|
|
52
|
+
"@monotykamary/dsh-home-paths": "^0.1.1",
|
|
53
|
+
"@monotykamary/dsh-plan-mode": "^0.1.1",
|
|
54
|
+
"@monotykamary/dsh-terminal-bash": "^0.1.1",
|
|
55
|
+
"@monotykamary/dsh-terminal": "^0.1.1",
|
|
56
|
+
"@monotykamary/dsh-pwsh-local": "^0.1.1",
|
|
57
|
+
"@monotykamary/dsh-session-projection": "^0.1.1",
|
|
58
|
+
"@monotykamary/dsh-pwsh-sandbox": "^0.1.1",
|
|
59
|
+
"@monotykamary/dsh-skill": "^0.1.1",
|
|
60
|
+
"@monotykamary/dsh-session-reference": "^0.1.1",
|
|
61
|
+
"@monotykamary/dsh-skill-filesystem": "^0.1.1",
|
|
62
|
+
"@monotykamary/dsh-jobs-local": "^0.1.1",
|
|
63
|
+
"@monotykamary/dsh-token-meter": "^0.1.1",
|
|
64
|
+
"@monotykamary/dsh-tool-ask-user": "^0.1.1",
|
|
65
|
+
"@monotykamary/dsh-time-context": "^0.1.1",
|
|
66
|
+
"@monotykamary/dsh-tool-bash": "^0.1.1",
|
|
67
|
+
"@monotykamary/dsh-tool-bash-persistent": "^0.1.1",
|
|
68
|
+
"@monotykamary/dsh-tool-pwsh-persistent": "^0.1.1",
|
|
69
|
+
"@monotykamary/dsh-tool-cordis": "^0.1.1",
|
|
70
|
+
"@monotykamary/dsh-tmux-context": "^0.1.1",
|
|
71
|
+
"@monotykamary/dsh-tool-fs": "^0.1.1",
|
|
72
|
+
"@monotykamary/dsh-tool-goal": "^0.1.1",
|
|
73
|
+
"@monotykamary/dsh-tool-ralph": "^0.1.1",
|
|
74
|
+
"@monotykamary/dsh-tool-fs-search": "^0.1.1",
|
|
75
|
+
"@monotykamary/dsh-schedule": "^0.1.1",
|
|
76
|
+
"@monotykamary/dsh-tool-skill": "^0.1.1",
|
|
77
|
+
"@monotykamary/dsh-tool-pwsh": "^0.1.1",
|
|
78
|
+
"@monotykamary/dsh-tool-str-replace-editor": "^0.1.1",
|
|
79
|
+
"@monotykamary/dsh-tool-subagent": "^0.1.1",
|
|
80
|
+
"@monotykamary/dsh-tool-subagent-control": "^0.1.1",
|
|
81
|
+
"@monotykamary/dsh-tool-todo": "^0.1.1",
|
|
82
|
+
"@monotykamary/dsh-tool-web": "^0.1.1",
|
|
83
|
+
"@monotykamary/dsh-tool-workflow": "^0.1.1",
|
|
84
|
+
"@monotykamary/dsh-tool-jobs": "^0.1.1",
|
|
85
|
+
"@monotykamary/dsh-web-app": "^0.1.1",
|
|
86
|
+
"@monotykamary/dsh-workflow-worker-thread": "^0.1.1",
|
|
87
|
+
"@monotykamary/dsh-agent-instructions": "^0.1.1",
|
|
82
88
|
"@monotykamary/cordis": "^4.0.1",
|
|
83
|
-
"@monotykamary/dsh-
|
|
84
|
-
"@monotykamary/dsh-workflow-worker-thread": "^0.1.0-rc.9",
|
|
85
|
-
"@monotykamary/dsh-agent-instructions": "^0.1.0-rc.9",
|
|
86
|
-
"@monotykamary/dsh-tool-pwsh": "^0.1.0-rc.9"
|
|
89
|
+
"@monotykamary/dsh-distribution-update": "^0.1.1"
|
|
87
90
|
},
|
|
88
91
|
"devDependencies": {
|
|
89
92
|
"@types/js-yaml": "^4.0.9",
|
|
90
93
|
"execa": "^10.0.0",
|
|
91
|
-
"@monotykamary/dsh-
|
|
92
|
-
"@monotykamary/dsh-host-
|
|
93
|
-
"@monotykamary/dsh-host-
|
|
94
|
-
"@monotykamary/dsh-
|
|
95
|
-
"@monotykamary/dsh-
|
|
96
|
-
"@monotykamary/dsh-
|
|
97
|
-
"@monotykamary/dsh-
|
|
98
|
-
"@monotykamary/dsh-
|
|
99
|
-
"@monotykamary/dsh-
|
|
100
|
-
"@monotykamary/dsh-
|
|
101
|
-
"@monotykamary/dsh-tools": "^0.1.
|
|
102
|
-
"@monotykamary/dsh-
|
|
94
|
+
"@monotykamary/dsh-agent": "^0.1.1",
|
|
95
|
+
"@monotykamary/dsh-host-frontend-static": "^0.1.1",
|
|
96
|
+
"@monotykamary/dsh-host-apiproxy": "^0.1.1",
|
|
97
|
+
"@monotykamary/dsh-host-webserver": "^0.1.1",
|
|
98
|
+
"@monotykamary/dsh-llm": "^0.1.1",
|
|
99
|
+
"@monotykamary/dsh-llm-mock-server": "^0.1.1",
|
|
100
|
+
"@monotykamary/dsh-loader-smoke": "^0.1.1",
|
|
101
|
+
"@monotykamary/dsh-session": "^0.1.1",
|
|
102
|
+
"@monotykamary/dsh-settings": "^0.1.1",
|
|
103
|
+
"@monotykamary/dsh-subagent": "^0.1.1",
|
|
104
|
+
"@monotykamary/dsh-tools": "^0.1.1",
|
|
105
|
+
"@monotykamary/dsh-system-prompt": "^0.1.1"
|
|
106
|
+
},
|
|
107
|
+
"dsh": {
|
|
108
|
+
"distribution": {
|
|
109
|
+
"companions": {
|
|
110
|
+
"dsh-tool-repair": "0.1.0",
|
|
111
|
+
"dsh-fabric": "0.1.5",
|
|
112
|
+
"dsh-fovea": "0.5.0",
|
|
113
|
+
"dsh-factory": "0.1.1"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
103
116
|
}
|
|
104
117
|
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { i as prepareProfile, n as PROFILE_ROOT_FILENAME, r as homePatchPath } from "./profile-boot-CCBe1Ijy.js";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { loadOptionalPatches, loadOverlayPatches, renderConfigDump } from "@monotykamary/dsh-app-boot";
|
|
4
|
-
import { join, resolve } from "node:path";
|
|
5
|
-
//#region lib/types/dump-config.js
|
|
6
|
-
/**
|
|
7
|
-
* Config-dump entry for `dsh --profile <name> --dump-config`: compose the
|
|
8
|
-
* profile's patch layers through the include plugin's patch algorithm without
|
|
9
|
-
* booting or evaluating `!!js`, with one source layer per bundle, the
|
|
10
|
-
* profile's own patch file, and each `--patch` overlay.
|
|
11
|
-
* @module @monotykamary/dsh/dump-config
|
|
12
|
-
*/
|
|
13
|
-
const NAME = "dsh";
|
|
14
|
-
/* v8 ignore start -- built-bin acceptance drives this boot-free dispatch */
|
|
15
|
-
/**
|
|
16
|
-
* Print a profile composition with comments naming each source file and patch layer.
|
|
17
|
-
* @param profile - the profile name.
|
|
18
|
-
* @param defaultOnly - omit the profile's user layer and `--patch` overlays
|
|
19
|
-
* (the recovery diagnostic for a broken `cordis.patch.yml`, which is then
|
|
20
|
-
* never parsed).
|
|
21
|
-
* @param patches - `--patch` overlay paths, in argv order.
|
|
22
|
-
*/
|
|
23
|
-
function runDumpConfig(profile, defaultOnly, patches) {
|
|
24
|
-
const loaded = prepareProfile(profile, !defaultOnly);
|
|
25
|
-
const layers = loaded.layers.map((layer) => ({
|
|
26
|
-
label: layer.packageName,
|
|
27
|
-
patches: layer.patches
|
|
28
|
-
}));
|
|
29
|
-
if (!defaultOnly) {
|
|
30
|
-
if (existsSync(loaded.patchPath)) layers.push({
|
|
31
|
-
label: loaded.patchPath,
|
|
32
|
-
patches: loaded.patches
|
|
33
|
-
});
|
|
34
|
-
const homePatchFile = homePatchPath();
|
|
35
|
-
const homePatches = loadOptionalPatches(NAME, homePatchFile);
|
|
36
|
-
if (homePatches !== void 0) layers.push({
|
|
37
|
-
label: homePatchFile,
|
|
38
|
-
patches: homePatches
|
|
39
|
-
});
|
|
40
|
-
for (const file of patches) {
|
|
41
|
-
const absolute = resolve(file);
|
|
42
|
-
layers.push({
|
|
43
|
-
label: absolute,
|
|
44
|
-
patches: loadOverlayPatches(NAME, absolute)
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
process.stdout.write(renderConfigDump(NAME, join(loaded.dir, PROFILE_ROOT_FILENAME), layers));
|
|
49
|
-
}
|
|
50
|
-
/* v8 ignore stop */
|
|
51
|
-
//#endregion
|
|
52
|
-
export { runDumpConfig };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { i as prepareProfile, n as PROFILE_ROOT_FILENAME, r as homePatchPath } from "./profile-boot-CXPZgDex.js";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { loadOptionalPatches, loadOverlayPatches, renderConfigDump } from "@monotykamary/dsh-app-boot";
|
|
4
|
-
import { join, resolve } from "node:path";
|
|
5
|
-
//#region lib/types/dump-config.js
|
|
6
|
-
/**
|
|
7
|
-
* Config-dump entry for `dsh --profile <name> --dump-config`: compose the
|
|
8
|
-
* profile's patch layers through the include plugin's patch algorithm without
|
|
9
|
-
* booting or evaluating `!!js`, with one source layer per bundle, the
|
|
10
|
-
* profile's own patch file, and each `--patch` overlay.
|
|
11
|
-
* @module @monotykamary/dsh/dump-config
|
|
12
|
-
*/
|
|
13
|
-
const NAME = "dsh";
|
|
14
|
-
/* v8 ignore start -- built-bin acceptance drives this boot-free dispatch */
|
|
15
|
-
/**
|
|
16
|
-
* Print a profile composition with comments naming each source file and patch layer.
|
|
17
|
-
* @param profile - the profile name.
|
|
18
|
-
* @param defaultOnly - omit the profile's user layer and `--patch` overlays
|
|
19
|
-
* (the recovery diagnostic for a broken `cordis.patch.yml`, which is then
|
|
20
|
-
* never parsed).
|
|
21
|
-
* @param patches - `--patch` overlay paths, in argv order.
|
|
22
|
-
*/
|
|
23
|
-
function runDumpConfig(profile, defaultOnly, patches) {
|
|
24
|
-
const loaded = prepareProfile(profile, !defaultOnly);
|
|
25
|
-
const layers = loaded.layers.map((layer) => ({
|
|
26
|
-
label: layer.packageName,
|
|
27
|
-
patches: layer.patches
|
|
28
|
-
}));
|
|
29
|
-
if (process.env.DSH_TOOLS_MODE !== void 0) {
|
|
30
|
-
const lastBundleTools = loaded.layers.flatMap((layer) => layer.patches).reverse().find((patch) => patch.id === "tools" && !Array.isArray(patch.insert));
|
|
31
|
-
const toolsConfig = lastBundleTools?.config !== void 0 && typeof lastBundleTools.config === "object" ? { ...lastBundleTools.config } : {};
|
|
32
|
-
layers.push({
|
|
33
|
-
label: "dsh launcher (DSH_TOOLS_MODE)",
|
|
34
|
-
patches: [{
|
|
35
|
-
id: "tools",
|
|
36
|
-
config: {
|
|
37
|
-
...toolsConfig,
|
|
38
|
-
mode: process.env.DSH_TOOLS_MODE
|
|
39
|
-
}
|
|
40
|
-
}]
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
if (!defaultOnly) {
|
|
44
|
-
if (existsSync(loaded.patchPath)) layers.push({
|
|
45
|
-
label: loaded.patchPath,
|
|
46
|
-
patches: loaded.patches
|
|
47
|
-
});
|
|
48
|
-
const homePatchFile = homePatchPath();
|
|
49
|
-
const homePatches = loadOptionalPatches(NAME, homePatchFile);
|
|
50
|
-
if (homePatches !== void 0) layers.push({
|
|
51
|
-
label: homePatchFile,
|
|
52
|
-
patches: homePatches
|
|
53
|
-
});
|
|
54
|
-
for (const file of patches) {
|
|
55
|
-
const absolute = resolve(file);
|
|
56
|
-
layers.push({
|
|
57
|
-
label: absolute,
|
|
58
|
-
patches: loadOverlayPatches(NAME, absolute)
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
process.stdout.write(renderConfigDump(NAME, join(loaded.dir, PROFILE_ROOT_FILENAME), layers));
|
|
63
|
-
}
|
|
64
|
-
/* v8 ignore stop */
|
|
65
|
-
//#endregion
|
|
66
|
-
export { runDumpConfig };
|