@monotykamary/dsh 0.1.0-rc.8 → 0.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.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: c475fb62e420cad707777697bdd5336ac4531ba5
6
- README.zh.md: 3a43608196c6848cf4aff90040a579a5547dd8d1
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 the profile manifest `dsh.profile` with its ordered `bundles` list) and a `cordis.patch.yml` (the user's own patch layer).
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`,其中记录树外插件依赖,以及 profile manifest(元数据清单)`dsh.profile` 和其中按顺序排列的 `bundles` 列表;还包含一个 `cordis.patch.yml`,其中保存用户自己的 patch 层。
37
+ profile 目录包含一个 `package.json`,其中记录树外插件依赖、由安装拥有的内置栈 `dsh.profile.template`,以及用户管理的 `dsh.profile.bundles`;还包含一个 `cordis.patch.yml`,其中保存用户自己的 patch 层。
33
38
 
34
39
  配置树以空根为起点,依次叠加以下配置层:
35
- - `dsh.profile.bundles` 中各组合包的 patch
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)为准。
@@ -198,9 +198,10 @@
198
198
  toolName: subagent_fork
199
199
  backgroundMode: continuable
200
200
 
201
- # Production dsh does not install these optional providers. An opting-in
202
- # Profile mounts each provider once on the host plane; copy this preset,
203
- # then remove `disabled` from the matching tool row.
201
+ # Production dsh does not install these optional providers. Install the
202
+ # matching Bundle in this Profile and restart the Host, then copy this
203
+ # preset and remove `disabled` from the matching tool row. Host availability
204
+ # alone grants no tool.
204
205
  - id: tool-subagent-codex
205
206
  name: '@monotykamary/dsh-tool-subagent'
206
207
  disabled: true
@@ -185,9 +185,10 @@
185
185
  toolName: subagent_fork
186
186
  backgroundMode: continuable
187
187
 
188
- # Production dsh does not install these optional providers. An opting-in
189
- # Profile mounts each provider once on the host plane; copy this preset,
190
- # then remove `disabled` from the matching tool row.
188
+ # Production dsh does not install these optional providers. Install the
189
+ # matching Bundle in this Profile and restart the Host, then copy this
190
+ # preset and remove `disabled` from the matching tool row. Host availability
191
+ # alone grants no tool.
191
192
  - id: tool-subagent-codex
192
193
  name: '@monotykamary/dsh-tool-subagent'
193
194
  disabled: true
@@ -123,7 +123,16 @@ After a clean mount-validation, ask the user to start a session on the new prese
123
123
 
124
124
  ## Native product subagents
125
125
 
126
- Codex and Claude Code providers belong on the host plane but are not installed by production `dsh`. The active Profile must install and mount the selected provider before a preset can expose its ordinary delegation-tool row; never move a product provider into the preset and never add a product-specific settings field.
126
+ Codex and Claude Code providers are independent optional Profile Bundles. Install only the products a Profile needs, then restart the Profile so its Host registers those providers:
127
+
128
+ ```sh
129
+ dsh plugin --profile <name> add @monotykamary/dsh-subagent-codex
130
+ dsh plugin --profile <name> add @monotykamary/dsh-subagent-claude-code
131
+ dsh plugin --profile <name> remove @monotykamary/dsh-subagent-codex
132
+ dsh plugin --profile <name> remove @monotykamary/dsh-subagent-claude-code
133
+ ```
134
+
135
+ Each Bundle owns its Host availability; the preset separately grants one Agent its ordinary delegation tool. Never move a product provider into the preset and never add a product-specific settings field. Removing one package withdraws only that provider on the next Profile start.
127
136
 
128
137
  Copy these disabled templates from a shipped full preset and remove `disabled` only for the products the user requested:
129
138
 
@@ -147,7 +156,9 @@ Copy these disabled templates from a shipped full preset and remove `disabled` o
147
156
  maxDepth: provider-managed
148
157
  ```
149
158
 
150
- The two rows are independent. Leaving both disabled preserves the copied preset, enabling one exposes only that product tool, and enabling both exposes both. Production `dsh` does not install or mount either optional provider: before enabling a row, the Profile must install the matching `@monotykamary/dsh-subagent-codex` or `@monotykamary/dsh-subagent-claude-code` package and mount it once on the host plane. A preset cannot provide that host dependency. `backgroundMode: one-shot` keeps omitted or `false` calls in the foreground and lets explicit `run_in_background: true` return a generic Job id. Full presets already carry `tool-jobs`, while the base host carries the job registry; retain both so `job_output`, `job_list`, `job_kill`, cancellation, and completion notices stay available. The host must also provide `codex` or `claude` on `PATH`; the preset does not install, authenticate, select a model for, or probe either product.
159
+ For additional named Codex or Claude Code instances, mount a separate host-plane provider row for each instance with a unique `providerName`, then add a separate preset tool row whose `provider` exactly matches that name and whose `toolName` is also unique. Keep the shipped rows for the default `codex` and `claude-code` names; do not reuse one tool row for several providers or derive either name from permission or environment settings.
160
+
161
+ The two rows are independent. Leaving both disabled preserves the copied preset, enabling one exposes only that product tool, and enabling both exposes both. Production `dsh` does not install either optional provider: before enabling a row, install the matching `@monotykamary/dsh-subagent-codex` or `@monotykamary/dsh-subagent-claude-code` Bundle in the Profile and restart it. Each Bundle registers its dormant default provider and exclusively uses its pinned package-local platform CLI; additional named instances use extra host-plane rows from the same installed package. A preset cannot provide that host dependency. `backgroundMode: one-shot` keeps omitted or `false` calls in the foreground and lets explicit `run_in_background: true` return a generic Job id. Full presets already carry `tool-jobs`, while the base host carries the job registry; retain both so `job_output`, `job_list`, `job_kill`, cancellation, and completion notices stay available. Installing a Bundle or composing a preset row does not start a product, authenticate an account, select a model, probe credentials, or manage native product settings.
151
162
 
152
163
  ## What not to move into a preset
153
164
 
@@ -3,7 +3,8 @@
3
3
  # The persona is the complete system prompt, so global identity, Web orientation,
4
4
  # tool guidance, and later assembly listeners cannot add prompt text. Runtime
5
5
  # context snapshots are suppressed for this preset, and the model composes only
6
- # persistent `bash` and `str_replace_editor`. Context compaction is absent.
6
+ # the persistent shell (`bash` on POSIX, `pwsh` on win32) and
7
+ # `str_replace_editor`. Context compaction is absent.
7
8
 
8
9
  - id: persona
9
10
  name: '@monotykamary/dsh-persona'
@@ -12,10 +13,14 @@
12
13
  complete: true
13
14
  includeRuntimeContext: false
14
15
 
15
- # The tool consumes the Host terminal registry/backend inherited by every
16
- # Agent and contributes only its model-facing persistent-bash operation.
16
+ # The persistent tools consume the Host terminal registry/backend inherited
17
+ # by every Agent and contribute only their model-facing persistent
18
+ # operations; the base bundle mounts the per-platform shell backends. Exactly
19
+ # one shell stack mounts per host: the bash stack gates off win32 and its
20
+ # pwsh twin gates off POSIX.
17
21
  - id: persistent-bash
18
22
  name: '@monotykamary/dsh-tool-bash-persistent'
23
+ disabled: !!js process.platform === 'win32'
19
24
  config:
20
25
  timeoutMs: 300000
21
26
  description: |-
@@ -28,6 +33,20 @@
28
33
  * Please avoid commands that may produce a very large amount of output.
29
34
  * Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.
30
35
 
36
+ - id: persistent-pwsh
37
+ name: '@monotykamary/dsh-tool-pwsh-persistent'
38
+ disabled: !!js process.platform !== 'win32'
39
+ config:
40
+ timeoutMs: 300000
41
+ description: |-
42
+ Run commands in a PowerShell shell
43
+ * When invoking this tool, the contents of the "command" parameter does NOT need to be XML-escaped.
44
+ * You don't have access to the internet via this tool.
45
+ * State is persistent across command calls and discussions with the user.
46
+ * Use native Windows paths (C:\...) and $env:NAME variables; this is PowerShell, not bash.
47
+ * Please avoid commands that may produce a very large amount of output.
48
+ * Please run long lived commands in the background, e.g. 'Start-Job' or start a server with Start-Process.
49
+
31
50
  # The bare local filesystem shadows the host's sandboxed provider only for this
32
51
  # preset. The editor shares that realm and requires absolute paths.
33
52
  - id: filesystem
@@ -197,9 +197,10 @@
197
197
  toolName: subagent_fork
198
198
  backgroundMode: continuable
199
199
 
200
- # Production dsh does not install these optional providers. An opting-in
201
- # Profile mounts each provider once on the host plane; copy this preset,
202
- # then remove `disabled` from the matching tool row.
200
+ # Production dsh does not install these optional providers. Install the
201
+ # matching Bundle in this Profile and restart the Host, then copy this
202
+ # preset and remove `disabled` from the matching tool row. Host availability
203
+ # alone grants no tool.
203
204
  - id: tool-subagent-codex
204
205
  name: '@monotykamary/dsh-tool-subagent'
205
206
  disabled: true
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,6 +106,29 @@ 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) {
@@ -129,7 +155,7 @@ function readVersion() {
129
155
  const invocation = parseDshArgs(process.argv.slice(2), readVersion());
130
156
  switch (invocation.mode) {
131
157
  case "profile": {
132
- const { runProfile } = await import("./profile-boot-B45utNE5.js");
158
+ const { runProfile } = await import("./profile-boot-nB64ulZn.js");
133
159
  await runProfile({
134
160
  environment: loadLayeredEnv("dsh"),
135
161
  profile: invocation.profile,
@@ -139,16 +165,26 @@ switch (invocation.mode) {
139
165
  break;
140
166
  }
141
167
  case "plugin": {
142
- const { runPlugin } = await import("./plugin-D0jZWziz.js");
168
+ const { runPlugin } = await import("./plugin-Cey6G1P7.js");
143
169
  process.exit(runPlugin(invocation.profile, invocation.args));
144
170
  break;
145
171
  }
172
+ case "portless": {
173
+ const { runPortlessCli } = await import("@monotykamary/dsh-web-app/portless");
174
+ process.exitCode = runPortlessCli(["service", "install"]);
175
+ break;
176
+ }
146
177
  case "dump-config": {
147
- const { runDumpConfig } = await import("./dump-config-BZ1o2tve.js");
178
+ const { runDumpConfig } = await import("./dump-config-COISA6E3.js");
148
179
  runDumpConfig(invocation.profile, invocation.defaultOnly, invocation.patches);
149
180
  break;
150
181
  }
182
+ case "distribution": {
183
+ const { runDistribution } = await import("./distribution-12O2K2qe.js");
184
+ process.exitCode = await runDistribution(invocation.action, invocation.json, fileURLToPath(new URL("../package.json", import.meta.url)));
185
+ break;
186
+ }
151
187
  default: throw new Error(`dsh: unhandled invocation mode ${JSON.stringify(invocation)}`);
152
188
  }
153
189
  //#endregion
154
- export {};
190
+ 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-CCBe1Ijy.js";
1
+ import { i as prepareProfile, n as PROFILE_ROOT_FILENAME, r as homePatchPath } from "./profile-boot-BprVIHkR.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";
@@ -26,6 +26,20 @@ function runDumpConfig(profile, defaultOnly, patches) {
26
26
  label: layer.packageName,
27
27
  patches: layer.patches
28
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
+ }
29
43
  if (!defaultOnly) {
30
44
  if (existsSync(loaded.patchPath)) layers.push({
31
45
  label: loaded.patchPath,
@@ -1,4 +1,4 @@
1
- import { t as INSTALL_ANCHOR } from "./profile-boot-CCBe1Ijy.js";
1
+ import { t as INSTALL_ANCHOR } from "./profile-boot-BprVIHkR.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
- initProfile(dir, PROFILE_TEMPLATES[profile] ?? DEFAULT_PROFILE_BUNDLES);
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
@@ -148,6 +148,22 @@ function composeProfile(name, patchFiles) {
148
148
  const homePatches = loadOptionalPatches(NAME, homePatchPath()) ?? [];
149
149
  const overlays = patchFiles.flatMap((file) => loadOverlayPatches(NAME, resolve(file)));
150
150
  const bundlePatches = profile.layers.flatMap((layer) => layer.patches);
151
+ const toolMode = process.env.DSH_TOOLS_MODE;
152
+ if (toolMode !== void 0) {
153
+ const lastTools = [...bundlePatches].reverse().find((patch) => patch.id === "tools" && !Array.isArray(patch.insert));
154
+ const toolsConfig = lastTools?.config !== void 0 && typeof lastTools.config === "object" ? { ...lastTools.config } : {};
155
+ bundlePatches.push({
156
+ id: "tools",
157
+ config: {
158
+ ...toolsConfig,
159
+ mode: toolMode
160
+ }
161
+ });
162
+ }
163
+ if (bundlePatches.some((patch) => patch.id === "distribution-update" || Array.isArray(patch.insert) && patch.insert.some((row) => row.id === "distribution-update"))) bundlePatches.push({
164
+ id: "distribution-update",
165
+ config: { appManifest: INSTALL_ANCHOR }
166
+ });
151
167
  const rows = /* @__PURE__ */ new Map();
152
168
  for (const row of composeEntries([
153
169
  bundlePatches,
@@ -231,7 +247,7 @@ async function runProfile(options) {
231
247
  });
232
248
  });
233
249
  app.current = ctx;
234
- if (!signalShutdown.signal.aborted && ctx.fiber.state === 2 && ctx.get("loader") !== void 0) try {
250
+ if (!signalShutdown.signal.aborted && ctx.fiber.state === 2 && ctx.get("loader") !== void 0 && ctx.get("headlessStartup") === void 0) try {
235
251
  if (ctx.get("hmr") === void 0) {
236
252
  if (ctx.get("timer") === void 0) await ctx.loader.create({ name: "@monotykamary/cordis-plugin-timer" });
237
253
  await ctx.loader.create({
@@ -0,0 +1,2 @@
1
+ import { a as runProfile } from "./profile-boot-BprVIHkR.js";
2
+ export { runProfile };
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.0-rc.8",
4
+ "version": "0.1.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -21,83 +21,95 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "commander": "^15.0.0",
24
- "dsh-fabric": "^0.1.0",
25
- "dsh-fovea": "^0.2.0",
26
24
  "js-yaml": "^4.2.0",
27
25
  "node-addon-require-builtin": "^0.1.4",
28
- "@monotykamary/cordis-plugin-hmr": "^1.0.16",
26
+ "dsh-fabric": "0.1.4",
27
+ "dsh-fovea": "0.4.4",
28
+ "dsh-factory": "0.1.0",
29
+ "@monotykamary/cordis-plugin-timer": "^1.1.3",
29
30
  "@monotykamary/cordis-plugin-loader": "^1.0.2",
31
+ "@monotykamary/dsh-agent-tool-presentation": "^0.1.0",
32
+ "@monotykamary/cordis-plugin-hmr": "^1.0.16",
33
+ "@monotykamary/dsh-app-boot": "^0.1.0",
30
34
  "@monotykamary/cordis-plugin-include": "^1.0.6",
31
- "@monotykamary/dsh-base": "^0.1.0-rc.8",
32
- "@monotykamary/dsh-cordis-client-runner": "^0.1.0-rc.8",
33
- "@monotykamary/dsh-client-ui-agent-preset": "^0.1.0-rc.8",
34
- "@monotykamary/dsh-app-boot": "^0.1.0-rc.8",
35
- "@monotykamary/dsh-client-ui-cordis": "^0.1.0-rc.8",
36
- "@monotykamary/dsh-command-compact": "^0.1.0-rc.8",
37
- "@monotykamary/dsh-compaction-basic": "^0.1.0-rc.8",
38
- "@monotykamary/dsh-compaction-tool-result-pruner": "^0.1.0-rc.8",
39
- "@monotykamary/cordis-plugin-timer": "^1.1.3",
40
- "@monotykamary/dsh-goal-round-driver": "^0.1.0-rc.8",
41
- "@monotykamary/dsh-cmdline": "^0.1.0-rc.8",
42
- "@monotykamary/dsh-goal": "^0.1.0-rc.8",
43
- "@monotykamary/dsh-launch-environment": "^0.1.0-rc.8",
44
- "@monotykamary/dsh-command-goal": "^0.1.0-rc.8",
45
- "@monotykamary/dsh-fs-local": "^0.1.0-rc.8",
46
- "@monotykamary/dsh-headless": "^0.1.0-rc.8",
47
- "@monotykamary/dsh-home-paths": "^0.1.0-rc.8",
48
- "@monotykamary/dsh-plan-mode": "^0.1.0-rc.8",
49
- "@monotykamary/dsh-mcp-client": "^0.1.0-rc.8",
50
- "@monotykamary/dsh-persona": "^0.1.0-rc.8",
51
- "@monotykamary/dsh-pwsh-local": "^0.1.0-rc.8",
52
- "@monotykamary/dsh-pwsh-sandbox": "^0.1.0-rc.8",
53
- "@monotykamary/dsh-terminal-bash": "^0.1.0-rc.8",
54
- "@monotykamary/dsh-session-projection": "^0.1.0-rc.8",
55
- "@monotykamary/dsh-jobs-local": "^0.1.0-rc.8",
56
- "@monotykamary/dsh-time-context": "^0.1.0-rc.8",
57
- "@monotykamary/dsh-skill-filesystem": "^0.1.0-rc.8",
58
- "@monotykamary/dsh-tmux-context": "^0.1.0-rc.8",
59
- "@monotykamary/dsh-tool-ask-user": "^0.1.0-rc.8",
60
- "@monotykamary/dsh-terminal": "^0.1.0-rc.8",
61
- "@monotykamary/dsh-token-meter": "^0.1.0-rc.8",
62
- "@monotykamary/dsh-tool-bash": "^0.1.0-rc.8",
63
- "@monotykamary/dsh-agent-tool-presentation": "^0.1.0-rc.8",
64
- "@monotykamary/dsh-tool-fs": "^0.1.0-rc.8",
65
- "@monotykamary/dsh-tool-bash-persistent": "^0.1.0-rc.8",
66
- "@monotykamary/dsh-tool-cordis": "^0.1.0-rc.8",
67
- "@monotykamary/dsh-tool-fs-search": "^0.1.0-rc.8",
68
- "@monotykamary/dsh-tool-goal": "^0.1.0-rc.8",
69
- "@monotykamary/dsh-session-reference": "^0.1.0-rc.8",
70
- "@monotykamary/dsh-skill": "^0.1.0-rc.8",
71
- "@monotykamary/dsh-schedule": "^0.1.0-rc.8",
72
- "@monotykamary/dsh-tool-ralph": "^0.1.0-rc.8",
73
- "@monotykamary/dsh-tool-str-replace-editor": "^0.1.0-rc.8",
74
- "@monotykamary/dsh-tool-subagent": "^0.1.0-rc.8",
75
- "@monotykamary/dsh-tool-skill": "^0.1.0-rc.8",
76
- "@monotykamary/dsh-tool-subagent-control": "^0.1.0-rc.8",
77
- "@monotykamary/dsh-tool-pwsh": "^0.1.0-rc.8",
78
- "@monotykamary/dsh-tool-jobs": "^0.1.0-rc.8",
79
- "@monotykamary/dsh-tool-todo": "^0.1.0-rc.8",
80
- "@monotykamary/cordis": "^4.0.1",
81
- "@monotykamary/dsh-workflow-worker-thread": "^0.1.0-rc.8",
82
- "@monotykamary/dsh-agent-instructions": "^0.1.0-rc.8",
83
- "@monotykamary/dsh-tool-web": "^0.1.0-rc.8",
84
- "@monotykamary/dsh-tool-workflow": "^0.1.0-rc.8",
85
- "@monotykamary/dsh-web-app": "^0.1.0-rc.8"
35
+ "@monotykamary/dsh-base": "^0.1.0",
36
+ "@monotykamary/dsh-cordis-client-runner": "^0.1.0",
37
+ "@monotykamary/dsh-client-ui-agent-preset": "^0.1.0",
38
+ "@monotykamary/dsh-command-compact": "^0.1.0",
39
+ "@monotykamary/dsh-client-ui-cordis": "^0.1.0",
40
+ "@monotykamary/dsh-command-goal": "^0.1.0",
41
+ "@monotykamary/dsh-compaction-basic": "^0.1.0",
42
+ "@monotykamary/dsh-compaction-tool-result-pruner": "^0.1.0",
43
+ "@monotykamary/dsh-goal": "^0.1.0",
44
+ "@monotykamary/dsh-goal-round-driver": "^0.1.0",
45
+ "@monotykamary/dsh-cmdline": "^0.1.0",
46
+ "@monotykamary/dsh-launch-environment": "^0.1.0",
47
+ "@monotykamary/dsh-fs-local": "^0.1.0",
48
+ "@monotykamary/dsh-headless": "^0.1.0",
49
+ "@monotykamary/dsh-mcp-client": "^0.1.0",
50
+ "@monotykamary/dsh-home-paths": "^0.1.0",
51
+ "@monotykamary/dsh-persona": "^0.1.0",
52
+ "@monotykamary/dsh-terminal": "^0.1.0",
53
+ "@monotykamary/dsh-plan-mode": "^0.1.0",
54
+ "@monotykamary/dsh-terminal-bash": "^0.1.0",
55
+ "@monotykamary/dsh-pwsh-sandbox": "^0.1.0",
56
+ "@monotykamary/dsh-session-reference": "^0.1.0",
57
+ "@monotykamary/dsh-time-context": "^0.1.0",
58
+ "@monotykamary/dsh-pwsh-local": "^0.1.0",
59
+ "@monotykamary/dsh-skill-filesystem": "^0.1.0",
60
+ "@monotykamary/dsh-skill": "^0.1.0",
61
+ "@monotykamary/dsh-session-projection": "^0.1.0",
62
+ "@monotykamary/dsh-jobs-local": "^0.1.0",
63
+ "@monotykamary/dsh-tmux-context": "^0.1.0",
64
+ "@monotykamary/dsh-token-meter": "^0.1.0",
65
+ "@monotykamary/dsh-tool-bash": "^0.1.0",
66
+ "@monotykamary/dsh-tool-bash-persistent": "^0.1.0",
67
+ "@monotykamary/dsh-tool-ask-user": "^0.1.0",
68
+ "@monotykamary/dsh-tool-pwsh-persistent": "^0.1.0",
69
+ "@monotykamary/dsh-tool-cordis": "^0.1.0",
70
+ "@monotykamary/dsh-tool-fs": "^0.1.0",
71
+ "@monotykamary/dsh-tool-fs-search": "^0.1.0",
72
+ "@monotykamary/dsh-tool-pwsh": "^0.1.0",
73
+ "@monotykamary/dsh-tool-ralph": "^0.1.0",
74
+ "@monotykamary/dsh-tool-goal": "^0.1.0",
75
+ "@monotykamary/dsh-tool-skill": "^0.1.0",
76
+ "@monotykamary/dsh-schedule": "^0.1.0",
77
+ "@monotykamary/dsh-tool-str-replace-editor": "^0.1.0",
78
+ "@monotykamary/dsh-tool-subagent-control": "^0.1.0",
79
+ "@monotykamary/dsh-tool-subagent": "^0.1.0",
80
+ "@monotykamary/dsh-tool-jobs": "^0.1.0",
81
+ "@monotykamary/dsh-tool-todo": "^0.1.0",
82
+ "@monotykamary/dsh-tool-workflow": "^0.1.0",
83
+ "@monotykamary/dsh-web-app": "^0.1.0",
84
+ "@monotykamary/dsh-tool-web": "^0.1.0",
85
+ "@monotykamary/dsh-workflow-worker-thread": "^0.1.0",
86
+ "@monotykamary/dsh-agent-instructions": "^0.1.0",
87
+ "@monotykamary/dsh-distribution-update": "^0.1.0",
88
+ "@monotykamary/cordis": "^4.0.1"
86
89
  },
87
90
  "devDependencies": {
88
91
  "@types/js-yaml": "^4.0.9",
89
92
  "execa": "^10.0.0",
90
- "@monotykamary/dsh-agent": "^0.1.0-rc.8",
91
- "@monotykamary/dsh-host-apiproxy": "^0.1.0-rc.8",
92
- "@monotykamary/dsh-host-frontend-static": "^0.1.0-rc.8",
93
- "@monotykamary/dsh-loader-smoke": "^0.1.0-rc.8",
94
- "@monotykamary/dsh-llm-mock-server": "^0.1.0-rc.8",
95
- "@monotykamary/dsh-session": "^0.1.0-rc.8",
96
- "@monotykamary/dsh-settings": "^0.1.0-rc.8",
97
- "@monotykamary/dsh-subagent": "^0.1.0-rc.8",
98
- "@monotykamary/dsh-llm": "^0.1.0-rc.8",
99
- "@monotykamary/dsh-host-webserver": "^0.1.0-rc.8",
100
- "@monotykamary/dsh-tools": "^0.1.0-rc.8",
101
- "@monotykamary/dsh-system-prompt": "^0.1.0-rc.8"
93
+ "@monotykamary/dsh-agent": "^0.1.0",
94
+ "@monotykamary/dsh-host-frontend-static": "^0.1.0",
95
+ "@monotykamary/dsh-host-webserver": "^0.1.0",
96
+ "@monotykamary/dsh-llm": "^0.1.0",
97
+ "@monotykamary/dsh-loader-smoke": "^0.1.0",
98
+ "@monotykamary/dsh-llm-mock-server": "^0.1.0",
99
+ "@monotykamary/dsh-session": "^0.1.0",
100
+ "@monotykamary/dsh-host-apiproxy": "^0.1.0",
101
+ "@monotykamary/dsh-system-prompt": "^0.1.0",
102
+ "@monotykamary/dsh-subagent": "^0.1.0",
103
+ "@monotykamary/dsh-settings": "^0.1.0",
104
+ "@monotykamary/dsh-tools": "^0.1.0"
105
+ },
106
+ "dsh": {
107
+ "distribution": {
108
+ "companions": {
109
+ "dsh-fabric": "0.1.4",
110
+ "dsh-fovea": "0.4.4",
111
+ "dsh-factory": "0.1.0"
112
+ }
113
+ }
102
114
  }
103
115
  }
@@ -1,2 +0,0 @@
1
- import { a as runProfile } from "./profile-boot-CCBe1Ijy.js";
2
- export { runProfile };