dsh-bash-terminal-ts 0.8.8 → 0.9.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +201 -190
  2. package/README.en.md +2 -1
  3. package/README.md +3 -2
  4. package/agent-presets/README.md +171 -170
  5. package/agent-presets/install-presets.mjs +180 -179
  6. package/agent-presets/standard-win-niu/agent.cordis.yml +271 -0
  7. package/agent-presets/standard-win-niu/preset.yml +2 -0
  8. package/cordis.patch.yml +84 -83
  9. package/dist/client.core.js +10 -1
  10. package/dist/client.js +10 -1
  11. package/docs/dsh-plugin-development.md +169 -0
  12. package/docs/niu-backend.md +197 -0
  13. package/dsh.plugin.json +3 -3
  14. package/lib/client.js +10 -1
  15. package/lib/dsh-types.d.ts +14 -2
  16. package/lib/index.d.ts +15 -2
  17. package/lib/index.js +43 -5
  18. package/lib/locales.js +9 -0
  19. package/lib/shell-id.d.ts +1 -1
  20. package/lib/shells.d.ts +1 -0
  21. package/lib/shells.js +8 -2
  22. package/lib/terminal.js +4 -0
  23. package/lib/webterminals/host.js +2 -2
  24. package/lib/webterminals/mount.js +1 -0
  25. package/locale/de.json +6 -6
  26. package/locale/en.json +6 -6
  27. package/locale/es.json +6 -6
  28. package/locale/fr.json +6 -6
  29. package/locale/it.json +6 -6
  30. package/locale/ja.json +6 -6
  31. package/locale/ko.json +6 -6
  32. package/locale/ru.json +6 -6
  33. package/locale/zh.json +6 -6
  34. package/package.json +151 -149
  35. package/scripts/check-artifacts.mjs +96 -96
  36. package/src/client.tsx +685 -685
  37. package/src/dsh-types.ts +332 -320
  38. package/src/index.ts +1316 -1275
  39. package/src/locales.ts +461 -452
  40. package/src/shell-id.ts +11 -11
  41. package/src/shells.ts +279 -272
  42. package/src/terminal.ts +616 -612
  43. package/src/webterminals/host.ts +361 -361
  44. package/src/webterminals/mount.ts +237 -236
package/src/dsh-types.ts CHANGED
@@ -1,320 +1,332 @@
1
- // Hand-written boundary types for the DSH seams this plugin consumes.
2
- //
3
- // The @deepseek-ai/* packages ship their own .d.ts, but their full generic
4
- // surface (cordis Context augmentation, agent/session graphs) is far wider
5
- // than what a plugin touches. These structural types describe exactly the
6
- // face this plugin programs against — call them the plugin's side of the
7
- // contract. Value imports stay on the real packages (see ./dsh.ts); only
8
- // the shapes live here, so peer version drift cannot ripple into this tree.
9
-
10
- // ---- shared ------------------------------------------------------------------
11
-
12
- /** The terminal backends this plugin exposes. */
13
- export type ShellId = "powershell" | "gitbash" | "msys2" | "wsl" | "payload";
14
-
15
- /** Permissive node of the DSH JSON-schema dialect used in tool output declarations. */
16
- export interface JsonSchemaNode {
17
- type?: string;
18
- required?: boolean;
19
- const?: string;
20
- enum?: readonly string[];
21
- properties?: Record<string, JsonSchemaNode>;
22
- items?: JsonSchemaNode;
23
- oneOf?: JsonSchemaNode[];
24
- additionalProperties?: boolean;
25
- }
26
-
27
- /** Model-facing content block (subset). */
28
- export interface ContentBlock {
29
- type: string;
30
- text?: string;
31
- }
32
-
33
- // ---- tool surface ------------------------------------------------------------
34
-
35
- /** One entry of a tool's `parameters` declaration. */
36
- export interface ToolParameterProperty {
37
- type: string;
38
- required?: boolean;
39
- description?: string;
40
- enum?: readonly string[];
41
- }
42
-
43
- export interface ToolParameters {
44
- type: "object";
45
- properties: Record<string, ToolParameterProperty>;
46
- }
47
-
48
- /** Flat parameter map as accepted by defineTool (wrapped into `ToolParameters` by the runtime). */
49
- export type ToolParameterMap = Record<string, ToolParameterProperty>;
50
-
51
- /** The exec object every tool body receives. */
52
- export interface ToolRunContext {
53
- /** Caller cancellation; observe or forward it in async work. */
54
- signal: AbortSignal;
55
- callId?: string;
56
- agent?: ExecAgent;
57
- }
58
-
59
- /** The agent slice of exec this plugin reads (session cwd) or passes on (owner). */
60
- export interface ExecAgent {
61
- session: { header: { cwd?: string } };
62
- }
63
-
64
- export interface ToolResult {
65
- content: ContentBlock[];
66
- isError?: boolean;
67
- }
68
-
69
- /** Tool output view handed to presentResult. */
70
- export interface CallView {
71
- card: string;
72
- [key: string]: unknown;
73
- }
74
-
75
- /** A fully specified tool: schema, canonical output, body, presentations. */
76
- export interface ToolSpec<TValue> {
77
- name: string;
78
- description: string;
79
- parameters: ToolParameterMap;
80
- output: {
81
- schema: JsonSchemaNode;
82
- render: (args: unknown, value: TValue) => ContentBlock[];
83
- };
84
- execute: (args: Record<string, unknown>, exec: ToolRunContext) => Promise<TValue>;
85
- presentCall?: (args: Record<string, unknown>) => CallView;
86
- presentResult?: (args: Record<string, unknown>, result: ToolResult) => CallView | undefined;
87
- }
88
-
89
- /** Canonical output declaration, erased of the tool's value type (registry face). */
90
- export interface ToolOutputDefinition {
91
- schema: JsonSchemaNode;
92
- render: (args: unknown, value: unknown) => ContentBlock[];
93
- }
94
-
95
- /** What defineTool hands back (opaque to the plugin; registered as-is). */
96
- export interface ToolDefinition {
97
- name: string;
98
- description: string;
99
- parameters: ToolParameters;
100
- output: ToolOutputDefinition;
101
- execute: (args: Record<string, unknown>, exec: ToolRunContext) => Promise<unknown>;
102
- }
103
-
104
- // ---- ctx services ------------------------------------------------------------
105
-
106
- export interface LoggerSeam {
107
- info?: (message: string) => void;
108
- warn?: (message: string) => void;
109
- error?: (message: string) => void;
110
- }
111
-
112
- export interface SystemPromptSection {
113
- name: string;
114
- order: number;
115
- text: string;
116
- }
117
-
118
- export interface SystemPromptSeam {
119
- section(spec: SystemPromptSection): unknown;
120
- }
121
-
122
- export interface ToolsSeam {
123
- register(tool: ToolDefinition): unknown;
124
- }
125
-
126
- /** A tool entry seen during system-prompt assembly (description re-render). */
127
- export interface AssembledToolRef {
128
- name: string;
129
- description?: string;
130
- }
131
-
132
- export interface PromptAssembly {
133
- tools: AssembledToolRef[];
134
- [key: string]: unknown;
135
- }
136
-
137
- /** Type of the system-prompt/assemble waterfall listener. */
138
- export type AssembleHandler = (
139
- assembly: PromptAssembly,
140
- context: unknown,
141
- next: () => Promise<PromptAssembly>
142
- ) => Promise<PromptAssembly>;
143
-
144
- export interface ShellEnvSeam {
145
- collect(exec: ToolRunContext): Record<string, string> | undefined;
146
- }
147
-
148
- export interface SettingsScope<T> {
149
- get(): T;
150
- }
151
-
152
- export interface SettingsSeam {
153
- register<T>(namespace: string, schema: unknown, options: { base: T }): SettingsScope<T>;
154
- }
155
-
156
- // ---- sandbox ------------------------------------------------------------------
157
-
158
- export interface SandboxPolicy {
159
- mode: string;
160
- workspaceRoot?: string;
161
- sessionId?: string;
162
- }
163
-
164
- export interface SandboxPolicySeam {
165
- resolve(scope: { session?: unknown }): SandboxPolicy;
166
- }
167
-
168
- export interface SandboxConfineResult {
169
- argv: string[];
170
- enforcement: string;
171
- denialSignatures?: string[];
172
- }
173
-
174
- export interface SandboxSeam {
175
- confine(argv: string[], policy: SandboxPolicy): SandboxConfineResult;
176
- }
177
-
178
- /** Sandbox facts embedded in a canonical result. */
179
- export interface SandboxFacts {
180
- mode: string;
181
- enforcement: string;
182
- denialSignatures?: string[];
183
- denied?: boolean;
184
- }
185
-
186
- export interface EscalationRequest {
187
- requestedMode: string;
188
- justification: string;
189
- effectiveMode: string;
190
- subject: string;
191
- }
192
-
193
- export interface EscalationContext {
194
- approver?: unknown;
195
- agent?: unknown;
196
- callId?: string;
197
- toolName: string;
198
- signal: AbortSignal;
199
- }
200
-
201
- // ---- background jobs ------------------------------------------------------------
202
-
203
- export interface JobHooks {
204
- cancel: () => void;
205
- done: Promise<unknown>;
206
- readOutput: () => string;
207
- }
208
-
209
- export interface JobSpec {
210
- kind: string;
211
- label: string;
212
- owner?: unknown;
213
- run: () => JobHooks;
214
- }
215
-
216
- export interface JobsRegistry {
217
- start(spec: JobSpec): string;
218
- }
219
-
220
- // ---- subprocess seam ------------------------------------------------------------
221
-
222
- /** Executable paths per backend; undefined when a backend is not installed. */
223
- export interface ResolvedPaths {
224
- pwsh?: string;
225
- gitbash?: string;
226
- msys2?: string;
227
- wsl?: string;
228
- /** The digest-verified pinned POSIX runtime payload (see src/payload.ts). */
229
- payload?: string;
230
- }
231
-
232
- export interface CollectSpec {
233
- maxBytes: number;
234
- spill: { maxBytes: number };
235
- }
236
-
237
- export interface StdioSpec {
238
- stdin: { data: string } | "ignore";
239
- stdout: CollectSpec;
240
- stderr: CollectSpec;
241
- }
242
-
243
- export interface SubprocessSpawnSpec {
244
- argv: string[];
245
- cwd?: string;
246
- stdio: StdioSpec;
247
- graceMs: number;
248
- signal?: AbortSignal;
249
- env?: Record<string, string | undefined>;
250
- }
251
-
252
- export interface CollectedStream {
253
- readFrom(offset: number): { text: string; lossy: boolean; nextOffset: number; spillPath?: string };
254
- }
255
-
256
- export interface SubprocessOutcome {
257
- exitCode: number | null;
258
- signal: string | null;
259
- }
260
-
261
- export interface SubprocessHandle {
262
- collected: { stdout: CollectedStream; stderr: CollectedStream };
263
- done: Promise<SubprocessOutcome>;
264
- terminate: () => void | Promise<void>;
265
- }
266
-
267
- export interface TerminalSpawnSpec {
268
- argv: string[];
269
- cwd: string;
270
- env: Record<string, string | undefined>;
271
- rows: number;
272
- cols: number;
273
- graceMs?: number;
274
- }
275
-
276
- export interface TerminalHandle {
277
- pid: number;
278
- output: NodeJS.ReadableStream;
279
- done: Promise<SubprocessOutcome>;
280
- write(data: string): void | Promise<void>;
281
- signalForeground(sig: string): void | Promise<unknown>;
282
- terminate(): Promise<void>;
283
- }
284
-
285
- export interface SubprocessSeam {
286
- spawn(spec: SubprocessSpawnSpec): SubprocessHandle;
287
- spawnTerminal?(spec: TerminalSpawnSpec): Promise<TerminalHandle>;
288
- }
289
-
290
- // ---- approval ------------------------------------------------------------------
291
-
292
- export interface ApprovalSeam {
293
- request(input: unknown): Promise<unknown>;
294
- }
295
-
296
- // ---- plugin context (server side) ----------------------------------------------
297
-
298
- /**
299
- * The structural context face dsh-bash-terminal-ts programs against: the union
300
- * of every `ctx.*` member touched by src/index.ts and src/terminal.ts.
301
- */
302
- export interface BashTerminalContext {
303
- logger?: LoggerSeam;
304
- systemPrompt: SystemPromptSeam;
305
- tools: ToolsSeam;
306
- on(event: "system-prompt/assemble", handler: AssembleHandler): void;
307
- shellEnv: ShellEnvSeam;
308
- sandboxPolicy: SandboxPolicySeam;
309
- sandbox: SandboxSeam;
310
- get(key: string): unknown;
311
- effect(fn: () => void | (() => void), name?: string): unknown;
312
- /**
313
- * Service-arrival callback (cordis core). Both host channels mount through it:
314
- * the six-line settings bridge and the browser terminal's routes. Typed to the
315
- * services they actually read; the derived context carries more.
316
- */
317
- inject?(deps: string[], callback: (svcCtx: { webServer?: unknown; settings?: unknown; effect(fn: () => void | (() => void), name?: string): unknown }) => void): void;
318
- /** Injected via `inject: ["subprocess"]`; tests may defer assignment. */
319
- subprocess: SubprocessSeam | null;
320
- }
1
+ // Hand-written boundary types for the DSH seams this plugin consumes.
2
+ //
3
+ // The @deepseek-ai/* packages ship their own .d.ts, but their full generic
4
+ // surface (cordis Context augmentation, agent/session graphs) is far wider
5
+ // than what a plugin touches. These structural types describe exactly the
6
+ // face this plugin programs against — call them the plugin's side of the
7
+ // contract. Value imports stay on the real packages (see ./dsh.ts); only
8
+ // the shapes live here, so peer version drift cannot ripple into this tree.
9
+
10
+ // ---- shared ------------------------------------------------------------------
11
+
12
+ /**
13
+ * The terminal backends this plugin exposes.
14
+ *
15
+ * Re-exported from `./shell-id.js` rather than declared here: the browser graph
16
+ * needs the same union (socket frames, catalog rows) and `shell-id.ts` is the one
17
+ * module with no Node references, so it is the single source of truth. Declaring
18
+ * a second copy here is how `niu` shipped in the union the catalog reads while
19
+ * `SHELL_DESCRIPTIONS` stayed five-keyed - a drift the compiler cannot see,
20
+ * because `Record<ShellId, string>` only complains in the module that owns the
21
+ * wider union.
22
+ */
23
+ export type { ShellId } from "./shell-id.js";
24
+
25
+ /** Permissive node of the DSH JSON-schema dialect used in tool output declarations. */
26
+ export interface JsonSchemaNode {
27
+ type?: string;
28
+ required?: boolean;
29
+ const?: string;
30
+ enum?: readonly string[];
31
+ properties?: Record<string, JsonSchemaNode>;
32
+ items?: JsonSchemaNode;
33
+ oneOf?: JsonSchemaNode[];
34
+ additionalProperties?: boolean;
35
+ }
36
+
37
+ /** Model-facing content block (subset). */
38
+ export interface ContentBlock {
39
+ type: string;
40
+ text?: string;
41
+ }
42
+
43
+ // ---- tool surface ------------------------------------------------------------
44
+
45
+ /** One entry of a tool's `parameters` declaration. */
46
+ export interface ToolParameterProperty {
47
+ type: string;
48
+ required?: boolean;
49
+ description?: string;
50
+ enum?: readonly string[];
51
+ }
52
+
53
+ export interface ToolParameters {
54
+ type: "object";
55
+ properties: Record<string, ToolParameterProperty>;
56
+ }
57
+
58
+ /** Flat parameter map as accepted by defineTool (wrapped into `ToolParameters` by the runtime). */
59
+ export type ToolParameterMap = Record<string, ToolParameterProperty>;
60
+
61
+ /** The exec object every tool body receives. */
62
+ export interface ToolRunContext {
63
+ /** Caller cancellation; observe or forward it in async work. */
64
+ signal: AbortSignal;
65
+ callId?: string;
66
+ agent?: ExecAgent;
67
+ }
68
+
69
+ /** The agent slice of exec this plugin reads (session cwd) or passes on (owner). */
70
+ export interface ExecAgent {
71
+ session: { header: { cwd?: string } };
72
+ }
73
+
74
+ export interface ToolResult {
75
+ content: ContentBlock[];
76
+ isError?: boolean;
77
+ }
78
+
79
+ /** Tool output view handed to presentResult. */
80
+ export interface CallView {
81
+ card: string;
82
+ [key: string]: unknown;
83
+ }
84
+
85
+ /** A fully specified tool: schema, canonical output, body, presentations. */
86
+ export interface ToolSpec<TValue> {
87
+ name: string;
88
+ description: string;
89
+ parameters: ToolParameterMap;
90
+ output: {
91
+ schema: JsonSchemaNode;
92
+ render: (args: unknown, value: TValue) => ContentBlock[];
93
+ };
94
+ execute: (args: Record<string, unknown>, exec: ToolRunContext) => Promise<TValue>;
95
+ presentCall?: (args: Record<string, unknown>) => CallView;
96
+ presentResult?: (args: Record<string, unknown>, result: ToolResult) => CallView | undefined;
97
+ }
98
+
99
+ /** Canonical output declaration, erased of the tool's value type (registry face). */
100
+ export interface ToolOutputDefinition {
101
+ schema: JsonSchemaNode;
102
+ render: (args: unknown, value: unknown) => ContentBlock[];
103
+ }
104
+
105
+ /** What defineTool hands back (opaque to the plugin; registered as-is). */
106
+ export interface ToolDefinition {
107
+ name: string;
108
+ description: string;
109
+ parameters: ToolParameters;
110
+ output: ToolOutputDefinition;
111
+ execute: (args: Record<string, unknown>, exec: ToolRunContext) => Promise<unknown>;
112
+ }
113
+
114
+ // ---- ctx services ------------------------------------------------------------
115
+
116
+ export interface LoggerSeam {
117
+ info?: (message: string) => void;
118
+ warn?: (message: string) => void;
119
+ error?: (message: string) => void;
120
+ }
121
+
122
+ export interface SystemPromptSection {
123
+ name: string;
124
+ order: number;
125
+ text: string;
126
+ }
127
+
128
+ export interface SystemPromptSeam {
129
+ section(spec: SystemPromptSection): unknown;
130
+ }
131
+
132
+ export interface ToolsSeam {
133
+ register(tool: ToolDefinition): unknown;
134
+ }
135
+
136
+ /** A tool entry seen during system-prompt assembly (description re-render). */
137
+ export interface AssembledToolRef {
138
+ name: string;
139
+ description?: string;
140
+ }
141
+
142
+ export interface PromptAssembly {
143
+ tools: AssembledToolRef[];
144
+ [key: string]: unknown;
145
+ }
146
+
147
+ /** Type of the system-prompt/assemble waterfall listener. */
148
+ export type AssembleHandler = (
149
+ assembly: PromptAssembly,
150
+ context: unknown,
151
+ next: () => Promise<PromptAssembly>
152
+ ) => Promise<PromptAssembly>;
153
+
154
+ export interface ShellEnvSeam {
155
+ collect(exec: ToolRunContext): Record<string, string> | undefined;
156
+ }
157
+
158
+ export interface SettingsScope<T> {
159
+ get(): T;
160
+ }
161
+
162
+ export interface SettingsSeam {
163
+ register<T>(namespace: string, schema: unknown, options: { base: T }): SettingsScope<T>;
164
+ }
165
+
166
+ // ---- sandbox ------------------------------------------------------------------
167
+
168
+ export interface SandboxPolicy {
169
+ mode: string;
170
+ workspaceRoot?: string;
171
+ sessionId?: string;
172
+ }
173
+
174
+ export interface SandboxPolicySeam {
175
+ resolve(scope: { session?: unknown }): SandboxPolicy;
176
+ }
177
+
178
+ export interface SandboxConfineResult {
179
+ argv: string[];
180
+ enforcement: string;
181
+ denialSignatures?: string[];
182
+ }
183
+
184
+ export interface SandboxSeam {
185
+ confine(argv: string[], policy: SandboxPolicy): SandboxConfineResult;
186
+ }
187
+
188
+ /** Sandbox facts embedded in a canonical result. */
189
+ export interface SandboxFacts {
190
+ mode: string;
191
+ enforcement: string;
192
+ denialSignatures?: string[];
193
+ denied?: boolean;
194
+ }
195
+
196
+ export interface EscalationRequest {
197
+ requestedMode: string;
198
+ justification: string;
199
+ effectiveMode: string;
200
+ subject: string;
201
+ }
202
+
203
+ export interface EscalationContext {
204
+ approver?: unknown;
205
+ agent?: unknown;
206
+ callId?: string;
207
+ toolName: string;
208
+ signal: AbortSignal;
209
+ }
210
+
211
+ // ---- background jobs ------------------------------------------------------------
212
+
213
+ export interface JobHooks {
214
+ cancel: () => void;
215
+ done: Promise<unknown>;
216
+ readOutput: () => string;
217
+ }
218
+
219
+ export interface JobSpec {
220
+ kind: string;
221
+ label: string;
222
+ owner?: unknown;
223
+ run: () => JobHooks;
224
+ }
225
+
226
+ export interface JobsRegistry {
227
+ start(spec: JobSpec): string;
228
+ }
229
+
230
+ // ---- subprocess seam ------------------------------------------------------------
231
+
232
+ /** Executable paths per backend; undefined when a backend is not installed. */
233
+ export interface ResolvedPaths {
234
+ pwsh?: string;
235
+ gitbash?: string;
236
+ msys2?: string;
237
+ wsl?: string;
238
+ /** The digest-verified pinned POSIX runtime payload (see src/payload.ts). */
239
+ payload?: string;
240
+ /** Niubash (native bash reimplementation); see candidateNiuPaths in index.ts. */
241
+ niu?: string;
242
+ }
243
+
244
+ export interface CollectSpec {
245
+ maxBytes: number;
246
+ spill: { maxBytes: number };
247
+ }
248
+
249
+ export interface StdioSpec {
250
+ stdin: { data: string } | "ignore";
251
+ stdout: CollectSpec;
252
+ stderr: CollectSpec;
253
+ }
254
+
255
+ export interface SubprocessSpawnSpec {
256
+ argv: string[];
257
+ cwd?: string;
258
+ stdio: StdioSpec;
259
+ graceMs: number;
260
+ signal?: AbortSignal;
261
+ env?: Record<string, string | undefined>;
262
+ }
263
+
264
+ export interface CollectedStream {
265
+ readFrom(offset: number): { text: string; lossy: boolean; nextOffset: number; spillPath?: string };
266
+ }
267
+
268
+ export interface SubprocessOutcome {
269
+ exitCode: number | null;
270
+ signal: string | null;
271
+ }
272
+
273
+ export interface SubprocessHandle {
274
+ collected: { stdout: CollectedStream; stderr: CollectedStream };
275
+ done: Promise<SubprocessOutcome>;
276
+ terminate: () => void | Promise<void>;
277
+ }
278
+
279
+ export interface TerminalSpawnSpec {
280
+ argv: string[];
281
+ cwd: string;
282
+ env: Record<string, string | undefined>;
283
+ rows: number;
284
+ cols: number;
285
+ graceMs?: number;
286
+ }
287
+
288
+ export interface TerminalHandle {
289
+ pid: number;
290
+ output: NodeJS.ReadableStream;
291
+ done: Promise<SubprocessOutcome>;
292
+ write(data: string): void | Promise<void>;
293
+ signalForeground(sig: string): void | Promise<unknown>;
294
+ terminate(): Promise<void>;
295
+ }
296
+
297
+ export interface SubprocessSeam {
298
+ spawn(spec: SubprocessSpawnSpec): SubprocessHandle;
299
+ spawnTerminal?(spec: TerminalSpawnSpec): Promise<TerminalHandle>;
300
+ }
301
+
302
+ // ---- approval ------------------------------------------------------------------
303
+
304
+ export interface ApprovalSeam {
305
+ request(input: unknown): Promise<unknown>;
306
+ }
307
+
308
+ // ---- plugin context (server side) ----------------------------------------------
309
+
310
+ /**
311
+ * The structural context face dsh-bash-terminal-ts programs against: the union
312
+ * of every `ctx.*` member touched by src/index.ts and src/terminal.ts.
313
+ */
314
+ export interface BashTerminalContext {
315
+ logger?: LoggerSeam;
316
+ systemPrompt: SystemPromptSeam;
317
+ tools: ToolsSeam;
318
+ on(event: "system-prompt/assemble", handler: AssembleHandler): void;
319
+ shellEnv: ShellEnvSeam;
320
+ sandboxPolicy: SandboxPolicySeam;
321
+ sandbox: SandboxSeam;
322
+ get(key: string): unknown;
323
+ effect(fn: () => void | (() => void), name?: string): unknown;
324
+ /**
325
+ * Service-arrival callback (cordis core). Both host channels mount through it:
326
+ * the six-line settings bridge and the browser terminal's routes. Typed to the
327
+ * services they actually read; the derived context carries more.
328
+ */
329
+ inject?(deps: string[], callback: (svcCtx: { webServer?: unknown; settings?: unknown; effect(fn: () => void | (() => void), name?: string): unknown }) => void): void;
330
+ /** Injected via `inject: ["subprocess"]`; tests may defer assignment. */
331
+ subprocess: SubprocessSeam | null;
332
+ }