@deepseek-ai/dsh-cmdline 0.0.1-rc.1 → 0.0.1-rc.2

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 packages/boot/cmdline/README.md
5
- README.md: 98335e901bdf8fe33e14c1ad4c1a320d77f30c96
6
- README.zh.md: 28ea749943c60089c6b4725cb61e121f82aa0114
5
+ README.md: 2e8e58b23785fa78bd2663a459817669309a81be
6
+ README.zh.md: c04d76905edb4afa6b18b36b8284b14990be6bdd
package/README.md CHANGED
@@ -51,8 +51,6 @@ Every row configured from those values uses ordinary service injection and direc
51
51
 
52
52
  Loader defers a row's `!!js` interpolation until that row's declared injections are active, then evaluates against the row's plugin context. The example above can therefore read `ctx.webStartup` directly: Cordis has already populated that injected service before Loader asks for `webserver`'s config. Include trees preserve nested expression nodes until each target row reaches this point. Provider replacement and live patch reload repeat interpolation against the current injected services, so a launch flag cannot be silently reset.
53
53
 
54
- `enableRow(ctx, id)` turns on a row a bundle ships disabled because only some invocations want it (`dsh web --dev` and its client-plugin reload chain). The activation is an in-memory override: it does not rewrite the row's configured `disabled` value and survives config reapplication for that mounted entry. Loader applies the enabled row's ordinary injection ordering.
55
-
56
54
  ### Shared immutable arguments
57
55
 
58
56
  `get()` does not consume or mutate argv. Multiple plugins can parse the same snapshot and independently provide services. The launcher does not inspect the composition for a command-line owner; a profile with no reader simply ignores its app arguments.
package/README.zh.md CHANGED
@@ -51,8 +51,6 @@ export function apply(ctx: Context): void {
51
51
 
52
52
  Loader 会把一行的 `!!js` 插值推迟到该行声明的注入全部激活之后,再基于该行的插件上下文求值。所以上例可以直接读取 `ctx.webStartup`:Loader 索取 `webserver` 的配置之前,Cordis 已经填入了这个注入服务。Include 树会保留嵌套表达式节点,直到各个目标行到达这一时点。提供方替换与活动 patch 重载都会针对当前注入服务重新插值,因此启动 flag 不会被悄悄重置。
53
53
 
54
- `enableRow(ctx, id)` 打开某个组合包以禁用状态交付、只有部分调用才需要的行(`dsh web --dev` 及其客户端插件重载链路)。该激活是内存中的覆盖:它不会改写行所配置的 `disabled` 值,并会在已挂载条目的配置重新应用后继续生效。Loader 会对启用后的行应用普通的注入顺序。
55
-
56
54
  ### 共享不可变参数
57
55
 
58
56
  `get()` 不会消费或修改 argv。多个插件可以解析同一份快照,并分别提供服务。启动器不会检查组合中的命令行所有者;没有读取方的 profile 只会忽略自己的应用参数。
package/lib/index.js CHANGED
@@ -64,27 +64,6 @@ function parseCmdline(ctx, program, plan = (() => ({}))) {
64
64
  }
65
65
  }
66
66
  /**
67
- * Turn on a row this composition ships disabled, because this invocation asked
68
- * for it (`dsh web --dev` and its client-plugin reload chain).
69
- *
70
- * A row cannot be inserted from inside a mounting plugin — the Loader returns a
71
- * prefixed id it then fails to resolve — so a conditional row ships disabled
72
- * and a row mounted beside it enables it after startup resolves the invocation.
73
- * The Loader keeps that activation in memory, separate from serialized options,
74
- * so reapplying the composition cannot restore the invocation's row to disabled.
75
- * @param ctx - plugin context whose Loader tree carries the row.
76
- * @param id - the row id.
77
- * @returns nothing once the row has started or is waiting for its dependencies.
78
- * @throws when the Loader or named row is absent.
79
- */
80
- async function enableRow(ctx, id) {
81
- const loader = ctx.get("loader");
82
- if (loader === void 0) throw new Error("dsh-cmdline: enabling a row requires the Loader service");
83
- const entry = [...loader.entries()].find((candidate) => candidate.options.id === id);
84
- if (entry === void 0) throw new Error(`dsh-cmdline: the composition has no ${JSON.stringify(id)} row to enable`);
85
- await entry.enableRuntime();
86
- }
87
- /**
88
67
  * Whether a thrown value is commander's own control-flow error (help, version,
89
68
  * a parse error, or `program.error`).
90
69
  *
@@ -101,4 +80,4 @@ function isCommanderError(error) {
101
80
  return typeof candidate.code === "string" && candidate.code.startsWith("commander.") && typeof candidate.exitCode === "number";
102
81
  }
103
82
  //#endregion
104
- export { enableRow, internals, parseCmdline, provideCmdline };
83
+ export { internals, parseCmdline, provideCmdline };
@@ -92,19 +92,4 @@ export type CmdlinePlan<T = unknown> = (program: Command, ctx: Context) => T;
92
92
  * @throws when the launcher did not provide the command line and exit request.
93
93
  */
94
94
  export declare function parseCmdline<T>(ctx: Context, program: Command, plan?: CmdlinePlan<T>): T | undefined;
95
- /**
96
- * Turn on a row this composition ships disabled, because this invocation asked
97
- * for it (`dsh web --dev` and its client-plugin reload chain).
98
- *
99
- * A row cannot be inserted from inside a mounting plugin — the Loader returns a
100
- * prefixed id it then fails to resolve — so a conditional row ships disabled
101
- * and a row mounted beside it enables it after startup resolves the invocation.
102
- * The Loader keeps that activation in memory, separate from serialized options,
103
- * so reapplying the composition cannot restore the invocation's row to disabled.
104
- * @param ctx - plugin context whose Loader tree carries the row.
105
- * @param id - the row id.
106
- * @returns nothing once the row has started or is waiting for its dependencies.
107
- * @throws when the Loader or named row is absent.
108
- */
109
- export declare function enableRow(ctx: Context, id: string): Promise<void>;
110
95
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-cmdline",
3
3
  "description": "Immutable command-line handoff from a dsh launcher to any app plugin that injects cmdlineArgs",
4
- "version": "0.0.1-rc.1",
4
+ "version": "0.0.1-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -32,15 +32,15 @@
32
32
  ],
33
33
  "license": "BSD-3-Clause",
34
34
  "peerDependencies": {
35
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
36
- "@deepseek-ai/cordis": "^4.0.1-rc.1",
37
- "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1"
35
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
36
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
37
+ "@deepseek-ai/cordis": "^4.0.1-rc.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "commander": "^15.0.0",
41
- "@deepseek-ai/cordis-plugin-include": "^1.0.5-rc.1",
42
41
  "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
43
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
44
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
42
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
43
+ "@deepseek-ai/cordis": "^4.0.1-rc.1",
44
+ "@deepseek-ai/cordis-plugin-include": "^1.0.5-rc.1"
45
45
  }
46
46
  }