dominds 1.25.19 → 1.26.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.
Files changed (47) hide show
  1. package/README.md +17 -0
  2. package/README.zh.md +17 -0
  3. package/dist/apps/runtime.d.ts +2 -4
  4. package/dist/apps-host/client.d.ts +2 -5
  5. package/dist/apps-host/ipc-types.d.ts +2 -5
  6. package/dist/apps-host/ipc-types.js +5 -1
  7. package/dist/bootstrap/rtws-cli.d.ts +1 -0
  8. package/dist/bootstrap/rtws-cli.js +8 -8
  9. package/dist/cli/cert.d.ts +4 -0
  10. package/dist/cli/cert.js +247 -0
  11. package/dist/cli/create.d.ts +1 -1
  12. package/dist/cli/create.js +1 -1
  13. package/dist/cli/read.js +1 -1
  14. package/dist/cli/tui.js +1 -1
  15. package/dist/cli/webui.d.ts +1 -1
  16. package/dist/cli/webui.js +35 -5
  17. package/dist/cli-runner.d.ts +31 -0
  18. package/dist/cli-runner.js +349 -0
  19. package/dist/cli.d.ts +0 -30
  20. package/dist/cli.js +540 -292
  21. package/dist/docs/cli-usage.md +40 -3
  22. package/dist/docs/cli-usage.zh.md +40 -3
  23. package/dist/docs/dialog-persistence.md +1 -1
  24. package/dist/docs/dominds-terminology.md +2 -2
  25. package/dist/llm/kernel-driver/drive.js +19 -14
  26. package/dist/runtime/driver-messages.d.ts +2 -0
  27. package/dist/runtime/driver-messages.js +24 -4
  28. package/dist/server/auth.d.ts +7 -0
  29. package/dist/server/auth.js +15 -4
  30. package/dist/server/certificates.d.ts +61 -0
  31. package/dist/server/certificates.js +418 -0
  32. package/dist/server/dominds-self-update.js +33 -121
  33. package/dist/server/network-hosts.d.ts +5 -0
  34. package/dist/server/network-hosts.js +277 -0
  35. package/dist/server/server-core.d.ts +12 -1
  36. package/dist/server/server-core.js +26 -4
  37. package/dist/server/websocket-handler.d.ts +3 -2
  38. package/dist/server/websocket-handler.js +15 -8
  39. package/dist/server-debug.d.ts +2 -0
  40. package/dist/server-debug.js +79 -0
  41. package/dist/server.d.ts +5 -0
  42. package/dist/server.js +101 -126
  43. package/dist/supervisor-protocol.d.ts +15 -0
  44. package/dist/supervisor-protocol.js +4 -0
  45. package/package.json +6 -5
  46. package/dist/server/dominds-self-update-restart-helper.d.ts +0 -15
  47. package/dist/server/dominds-self-update-restart-helper.js +0 -305
package/README.md CHANGED
@@ -253,6 +253,23 @@ Platform note:
253
253
 
254
254
  - Windows also registers `codex_inspect_and_patch_tools`; its `readonly_shell` tool runs through `cmd.exe`, so prefer allowlisted commands available in that shell/PATH, such as `rg`, `git`, `dir`, `type`, and `where`.
255
255
 
256
+ ### Local HTTPS Certificates
257
+
258
+ Dominds always keeps an HTTP listener. When a valid certificate matching the current `--host` exists under `~/.dominds/certs/`, Dominds also starts HTTPS. Certificates match DNS/IP hostnames, not ports, so one certificate covers all Dominds WebUI ports on that host.
259
+
260
+ ```bash
261
+ # Create a 10-year self-signed certificate for detected non-loopback LAN hosts
262
+ dominds cert create
263
+
264
+ # Add explicit SAN hosts; --host can be repeated
265
+ dominds cert create --host 192.168.1.10 --host my-host.local
266
+
267
+ # Inspect whether the detected LAN hosts can use an HTTPS certificate
268
+ dominds cert status
269
+ ```
270
+
271
+ `localhost`, `loopback`, `127.0.0.0/8`, `169.254.0.0/16`, `::1`, `fe80::/10`, `0.0.0.0`, and `::` are not certificate hosts. `0.0.0.0` / `::` only mean bind-all; certificate matching uses detected non-loopback LAN hosts. A bare `--port 5666` disables Dominds built-in HTTPS and assumes a front proxy handles HTTPS, while the default port behavior and `--port 5666+/-` may auto-enable built-in HTTPS when a matching certificate exists.
272
+
256
273
  ## Start from scratch
257
274
 
258
275
  Starting from scratch means: create an empty folder, run `dominds`, let Setup generate the minimal `.minds/team.yaml`, then use the shadow team manager (`@fuxi`) to design a real team for your product.
package/README.zh.md CHANGED
@@ -192,6 +192,23 @@ dominds
192
192
 
193
193
  - Windows 也会注册 `codex_inspect_and_patch_tools`;其中 `readonly_shell` 通过 `cmd.exe` 执行,因此优先使用该 shell/PATH 中可用的白名单命令,例如 `rg`、`git`、`dir`、`type` 和 `where`。
194
194
 
195
+ ### 本地 HTTPS 证书
196
+
197
+ Dominds 默认始终提供 HTTP 监听;当 `~/.dominds/certs/` 下存在匹配当前 `--host` 的有效证书时,会额外启用 HTTPS。证书按 DNS/IP 主机名匹配,不绑定端口,因此同一张证书可覆盖该主机上的所有 Dominds WebUI 端口。
198
+
199
+ ```bash
200
+ # 自动为检测到的一个或多个非 loopback LAN 主机创建 10 年有效的自签名证书
201
+ dominds cert create
202
+
203
+ # 显式指定证书 SAN,可重复 --host
204
+ dominds cert create --host 192.168.1.10 --host my-host.local
205
+
206
+ # 查看检测到的 LAN 主机是否能匹配到证书
207
+ dominds cert status
208
+ ```
209
+
210
+ `localhost`、`loopback`、`127.0.0.0/8`、`169.254.0.0/16`、`::1`、`fe80::/10`、`0.0.0.0`、`::` 不会作为 HTTPS 证书主机;其中 `0.0.0.0` / `::` 仅表示绑定所有地址,匹配证书时会使用检测到的非 loopback LAN 主机。使用裸 `--port 5666` 启动时,Dominds 会认为 HTTPS 由前置代理负责,不启用内建 HTTPS;使用默认端口或 `--port 5666+/-` 时才会自动启用内建 HTTPS。
211
+
195
212
  ## 从零开始(空文件夹启动)
196
213
 
197
214
  若暂无模板或团队配置,可直接从空目录启动:
@@ -1,3 +1,4 @@
1
+ import type { DomindsKernelEndpoint } from '@longrun-ai/kernel/app-host-contract';
1
2
  import { type AppsHostClient } from '../apps-host/client';
2
3
  export type DynamicAppToolAvailabilityResult = Readonly<{
3
4
  status: 'ready';
@@ -36,8 +37,5 @@ export declare function resolveDynamicAppToolAvailabilityForMember(_params: {
36
37
  }): Promise<DynamicAppToolAvailabilityResult>;
37
38
  export declare function initAppsRuntime(params: {
38
39
  rtwsRootAbs: string;
39
- kernel: Readonly<{
40
- host: string;
41
- port: number;
42
- }>;
40
+ kernel: DomindsKernelEndpoint;
43
41
  }): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { DomindsAppDynamicToolsetsContext, DomindsAppReminderOwnerApplyContext, DomindsAppReminderOwnerRenderContext, DomindsAppReminderOwnerUpdateContext, DomindsAppReminderRenderedMessage, DomindsAppRunControlContext, DomindsAppRunControlResult } from '@longrun-ai/kernel/app-host-contract';
1
+ import type { DomindsAppDynamicToolsetsContext, DomindsAppReminderOwnerApplyContext, DomindsAppReminderOwnerRenderContext, DomindsAppReminderOwnerUpdateContext, DomindsAppReminderRenderedMessage, DomindsAppRunControlContext, DomindsAppRunControlResult, DomindsKernelEndpoint } from '@longrun-ai/kernel/app-host-contract';
2
2
  import type { DomindsAppHostReminderUpdateResult, DomindsAppHostToolResult, DomindsAppInstallJson, DomindsAppReminderApplyRequest, DomindsAppReminderApplyResult } from '@longrun-ai/kernel/app-json';
3
3
  import type { ToolArguments } from '../tool';
4
4
  import type { AppsHostMessageToKernel } from './ipc-types';
@@ -29,10 +29,7 @@ export type AppsHostReadyMessage = Extract<AppsHostMessageToKernel, {
29
29
  }>;
30
30
  export declare function startAppsHost(params: {
31
31
  rtwsRootAbs: string;
32
- kernel: Readonly<{
33
- host: string;
34
- port: number;
35
- }>;
32
+ kernel: DomindsKernelEndpoint;
36
33
  apps: ReadonlyArray<EnabledAppForHost>;
37
34
  }): Promise<Readonly<{
38
35
  client: AppsHostClient;
@@ -1,14 +1,11 @@
1
- import type { DomindsAppReminderRenderedMessage, DomindsAppRunControlResult } from '@longrun-ai/kernel/app-host-contract';
1
+ import type { DomindsAppReminderRenderedMessage, DomindsAppRunControlResult, DomindsKernelEndpoint } from '@longrun-ai/kernel/app-host-contract';
2
2
  import type { DomindsAppDialogReminderRequestBatch, DomindsAppHostReminderUpdateResult, DomindsAppInstallJson, DomindsAppReminderApplyRequest, DomindsAppReminderApplyResult, DomindsAppReminderState } from '@longrun-ai/kernel/app-json';
3
3
  import type { LanguageCode } from '@longrun-ai/kernel/types/language';
4
4
  import type { ToolArguments, ToolCallOutput } from '../tool';
5
5
  export type AppsHostKernelInitMessage = Readonly<{
6
6
  type: 'init';
7
7
  rtwsRootAbs: string;
8
- kernel: Readonly<{
9
- host: string;
10
- port: number;
11
- }>;
8
+ kernel: DomindsKernelEndpoint;
12
9
  apps: ReadonlyArray<Readonly<{
13
10
  appId: string;
14
11
  runtimePort: number | null;
@@ -126,9 +126,13 @@ function parseAppsHostMessageFromKernel(v) {
126
126
  throw new Error('Invalid init message: rtwsRootAbs required');
127
127
  if (!isRecord(kernel))
128
128
  throw new Error('Invalid init message: kernel must be object');
129
+ const scheme = kernel['scheme'];
129
130
  const host = asString(kernel['host']);
130
131
  const portRaw = kernel['port'];
131
132
  const port = typeof portRaw === 'number' && Number.isFinite(portRaw) ? Math.floor(portRaw) : null;
133
+ if (scheme !== 'http' && scheme !== 'https') {
134
+ throw new Error('Invalid init message: kernel.scheme must be http|https');
135
+ }
132
136
  if (!host)
133
137
  throw new Error('Invalid init message: kernel.host required');
134
138
  if (port === null || port < 0) {
@@ -157,7 +161,7 @@ function parseAppsHostMessageFromKernel(v) {
157
161
  }
158
162
  return { appId, runtimePort, installJson: installJson };
159
163
  });
160
- return { type: 'init', rtwsRootAbs, kernel: { host, port }, apps: parsedApps };
164
+ return { type: 'init', rtwsRootAbs, kernel: { scheme, host, port }, apps: parsedApps };
161
165
  }
162
166
  if (type === 'tool_call') {
163
167
  const callId = asString(v['callId']);
@@ -4,4 +4,5 @@ export type RtwsCliParseResult = Readonly<{
4
4
  }>;
5
5
  export declare function extractGlobalRtwsChdir(params: Readonly<{
6
6
  argv: ReadonlyArray<string>;
7
+ baseCwd?: string;
7
8
  }>): RtwsCliParseResult;
@@ -36,13 +36,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.extractGlobalRtwsChdir = extractGlobalRtwsChdir;
37
37
  const path = __importStar(require("path"));
38
38
  function extractGlobalRtwsChdir(params) {
39
+ const baseCwd = params.baseCwd ?? process.cwd();
39
40
  let chdir;
40
41
  const out = [];
41
- const readAbsoluteChdir = (argName, value) => {
42
- if (!path.isAbsolute(value)) {
43
- throw new Error(`${argName} requires an absolute directory path: ${value}`);
44
- }
45
- return value;
42
+ const readChdir = (argName, value) => {
43
+ if (value.trim() === '')
44
+ throw new Error(`${argName} requires a directory argument`);
45
+ return path.resolve(baseCwd, value);
46
46
  };
47
47
  for (let i = 0; i < params.argv.length; i++) {
48
48
  const arg = params.argv[i];
@@ -55,7 +55,7 @@ function extractGlobalRtwsChdir(params) {
55
55
  if (typeof next !== 'string' || next.length === 0 || next === '--') {
56
56
  throw new Error(`${arg} requires a directory argument`);
57
57
  }
58
- chdir = readAbsoluteChdir(arg, next);
58
+ chdir = readChdir(arg, next);
59
59
  i++;
60
60
  continue;
61
61
  }
@@ -63,14 +63,14 @@ function extractGlobalRtwsChdir(params) {
63
63
  const value = arg.slice('--cwd='.length);
64
64
  if (value.length === 0)
65
65
  throw new Error(`--cwd requires a directory argument`);
66
- chdir = readAbsoluteChdir('--cwd', value);
66
+ chdir = readChdir('--cwd', value);
67
67
  continue;
68
68
  }
69
69
  if (arg.startsWith('--chdir=')) {
70
70
  const value = arg.slice('--chdir='.length);
71
71
  if (value.length === 0)
72
72
  throw new Error(`--chdir requires a directory argument`);
73
- chdir = readAbsoluteChdir('--chdir', value);
73
+ chdir = readChdir('--chdir', value);
74
74
  continue;
75
75
  }
76
76
  out.push(arg);
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ export declare function main(args?: readonly string[], runtimeOptions?: Readonly<{
3
+ certsDirAbs?: string;
4
+ }>): Promise<void>;
@@ -0,0 +1,247 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.main = main;
5
+ const auth_1 = require("../server/auth");
6
+ const certificates_1 = require("../server/certificates");
7
+ function printHelp() {
8
+ console.log(`
9
+ Dominds certificate tools
10
+
11
+ Usage:
12
+ dominds cert create [--host <host>] [--days <days>] [--force]
13
+ dominds cert status [--host <host>] [--port <port>] [--origin]
14
+
15
+ Options:
16
+ --host <host> Host name or IP address (default: detected non-loopback LAN hosts)
17
+ --days <days> Certificate validity in days (default: ${certificates_1.DEFAULT_SELF_SIGNED_CERT_DAYS})
18
+ --force Overwrite existing generated files
19
+ --port <port> Port for status --origin output
20
+ --origin Print only the effective origin, using https when a matching cert exists
21
+ --help Show this help message
22
+
23
+ Certificates live in ~/.dominds/certs/. A WebUI server automatically enables HTTPS when it finds
24
+ a certificate/key pair that matches the bind host or, for 0.0.0.0/::, a detected non-loopback LAN host.
25
+ `);
26
+ }
27
+ async function main(args = process.argv.slice(2), runtimeOptions = {}) {
28
+ const first = args[0];
29
+ if (first === undefined || first === '--help' || first === '-h') {
30
+ printHelp();
31
+ return;
32
+ }
33
+ const action = parseAction(first);
34
+ if (action === null) {
35
+ console.error(`Error: Unknown cert subcommand '${first}'`);
36
+ printHelp();
37
+ process.exit(1);
38
+ }
39
+ const options = parseOptions(args.slice(1), action);
40
+ if (options.kind === 'error') {
41
+ console.error(`Error: ${options.message}`);
42
+ printHelp();
43
+ process.exit(1);
44
+ }
45
+ if (action === 'create') {
46
+ const created = await (0, certificates_1.createSelfSignedCertificate)({
47
+ host: options.host,
48
+ altHosts: options.altHosts,
49
+ days: options.days,
50
+ force: options.force,
51
+ certsDirAbs: runtimeOptions.certsDirAbs,
52
+ });
53
+ console.log(`Created self-signed certificate for ${created.host}`);
54
+ console.log(` hosts: ${created.hosts.join(', ')}`);
55
+ console.log(` cert: ${created.certPath}`);
56
+ console.log(` key: ${created.keyPath}`);
57
+ console.log(` meta: ${created.metadataPath}`);
58
+ console.log(` days: ${created.days}`);
59
+ return;
60
+ }
61
+ if (options.origin) {
62
+ if (options.port === undefined) {
63
+ console.error('Error: cert status --origin requires --port <port>');
64
+ process.exit(1);
65
+ }
66
+ const lookup = await withConsoleInfoOnStderr(async () => (0, certificates_1.findAutoHttpsCertificateForHost)({
67
+ host: options.host ?? '::',
68
+ certsDirAbs: runtimeOptions.certsDirAbs,
69
+ }));
70
+ console.log((0, auth_1.formatServerOrigin)({
71
+ scheme: lookup.kind === 'found' ? 'https' : 'http',
72
+ host: lookup.kind === 'found' ? lookup.certificate.matchedHost : lookup.endpoint.urlHost,
73
+ port: options.port,
74
+ }));
75
+ return;
76
+ }
77
+ const lookup = await (0, certificates_1.findAutoHttpsCertificateForHost)({
78
+ host: options.host ?? '::',
79
+ certsDirAbs: runtimeOptions.certsDirAbs,
80
+ });
81
+ for (const diagnostic of lookup.diagnostics) {
82
+ console.warn(`warning: ${diagnostic.message}`);
83
+ }
84
+ if (lookup.kind === 'found') {
85
+ console.log(`HTTPS certificate: found`);
86
+ console.log(` cert: ${lookup.certificate.certPath}`);
87
+ console.log(` key: ${lookup.certificate.keyPath}`);
88
+ console.log(` matchedHost: ${lookup.certificate.matchedHost}`);
89
+ console.log(` validTo: ${lookup.certificate.validTo.toISOString()}`);
90
+ }
91
+ else {
92
+ console.log(`HTTPS certificate: not found`);
93
+ console.log(` certsDir: ${lookup.certsDirAbs}`);
94
+ }
95
+ }
96
+ function parseAction(value) {
97
+ switch (value) {
98
+ case 'create':
99
+ return 'create';
100
+ case 'status':
101
+ return 'status';
102
+ default:
103
+ return null;
104
+ }
105
+ }
106
+ function parseOptions(args, action) {
107
+ let host;
108
+ let days;
109
+ const altHosts = [];
110
+ let force = false;
111
+ let port;
112
+ let origin = false;
113
+ for (let i = 0; i < args.length; i += 1) {
114
+ const arg = args[i];
115
+ if (arg === '--host') {
116
+ const next = args[i + 1];
117
+ if (next === undefined || next === '') {
118
+ return { kind: 'error', message: '--host requires a value' };
119
+ }
120
+ const hostResult = addHostOption({ action, host, altHosts, value: next });
121
+ if (hostResult.kind === 'error')
122
+ return hostResult;
123
+ host = hostResult.host;
124
+ i += 1;
125
+ continue;
126
+ }
127
+ if (arg.startsWith('--host=')) {
128
+ const value = arg.slice('--host='.length);
129
+ if (value === '')
130
+ return { kind: 'error', message: '--host requires a value' };
131
+ const hostResult = addHostOption({ action, host, altHosts, value });
132
+ if (hostResult.kind === 'error')
133
+ return hostResult;
134
+ host = hostResult.host;
135
+ continue;
136
+ }
137
+ if (arg === '--days') {
138
+ if (action !== 'create') {
139
+ return { kind: 'error', message: '--days is only valid for cert create' };
140
+ }
141
+ const next = args[i + 1];
142
+ const parsed = next === undefined ? null : parseInteger(next);
143
+ if (parsed === null)
144
+ return { kind: 'error', message: '--days requires an integer' };
145
+ days = parsed;
146
+ i += 1;
147
+ continue;
148
+ }
149
+ if (arg.startsWith('--days=')) {
150
+ if (action !== 'create') {
151
+ return { kind: 'error', message: '--days is only valid for cert create' };
152
+ }
153
+ const parsed = parseInteger(arg.slice('--days='.length));
154
+ if (parsed === null)
155
+ return { kind: 'error', message: '--days requires an integer' };
156
+ days = parsed;
157
+ continue;
158
+ }
159
+ if (arg === '--port') {
160
+ if (action !== 'status') {
161
+ return { kind: 'error', message: '--port is only valid for cert status' };
162
+ }
163
+ const next = args[i + 1];
164
+ const parsed = next === undefined ? null : parseInteger(next);
165
+ if (parsed === null || parsed < 1 || parsed > 65535) {
166
+ return { kind: 'error', message: '--port requires a valid TCP port' };
167
+ }
168
+ port = parsed;
169
+ i += 1;
170
+ continue;
171
+ }
172
+ if (arg.startsWith('--port=')) {
173
+ if (action !== 'status') {
174
+ return { kind: 'error', message: '--port is only valid for cert status' };
175
+ }
176
+ const parsed = parseInteger(arg.slice('--port='.length));
177
+ if (parsed === null || parsed < 1 || parsed > 65535) {
178
+ return { kind: 'error', message: '--port requires a valid TCP port' };
179
+ }
180
+ port = parsed;
181
+ continue;
182
+ }
183
+ if (arg === '--force') {
184
+ if (action !== 'create') {
185
+ return { kind: 'error', message: '--force is only valid for cert create' };
186
+ }
187
+ force = true;
188
+ continue;
189
+ }
190
+ if (arg === '--origin') {
191
+ if (action !== 'status') {
192
+ return { kind: 'error', message: '--origin is only valid for cert status' };
193
+ }
194
+ origin = true;
195
+ continue;
196
+ }
197
+ if (arg === '--help' || arg === '-h') {
198
+ printHelp();
199
+ process.exit(0);
200
+ }
201
+ if (!arg.startsWith('-') && host === undefined && action === 'create') {
202
+ host = arg;
203
+ continue;
204
+ }
205
+ return { kind: 'error', message: `Unknown option '${arg}'` };
206
+ }
207
+ return { kind: 'ok', host, days, altHosts, force, port, origin };
208
+ }
209
+ function addHostOption(params) {
210
+ if (params.host === undefined) {
211
+ return { kind: 'ok', host: params.value };
212
+ }
213
+ if (params.action !== 'create') {
214
+ return { kind: 'error', message: '--host can only be repeated for cert create' };
215
+ }
216
+ params.altHosts.push(params.value);
217
+ return { kind: 'ok', host: params.host };
218
+ }
219
+ function parseInteger(raw) {
220
+ if (!/^[0-9]+$/.test(raw))
221
+ return null;
222
+ const parsed = Number(raw);
223
+ return Number.isSafeInteger(parsed) ? parsed : null;
224
+ }
225
+ async function withConsoleInfoOnStderr(fn) {
226
+ const originalInfo = console.info;
227
+ const originalDebug = console.debug;
228
+ console.info = (...args) => {
229
+ console.error(...args);
230
+ };
231
+ console.debug = (...args) => {
232
+ console.error(...args);
233
+ };
234
+ try {
235
+ return await fn();
236
+ }
237
+ finally {
238
+ console.info = originalInfo;
239
+ console.debug = originalDebug;
240
+ }
241
+ }
242
+ if (require.main === module) {
243
+ main().catch((error) => {
244
+ console.error(error instanceof Error ? error.message : String(error));
245
+ process.exit(1);
246
+ });
247
+ }
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * Notes:
10
10
  * - Template can be a short name (resolved via DOMINDS_TEMPLATE_BASE) or a git URL.
11
- * - rtws directory is `process.cwd()`. Use 'dominds -C <abs-dir> create ...' to create under another base dir.
11
+ * - rtws directory is `process.cwd()`. Use 'dominds -C <dir> create ...' to create under another base dir.
12
12
  */
13
13
  declare function main(argv?: readonly string[]): Promise<void>;
14
14
  export { main };
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * Notes:
11
11
  * - Template can be a short name (resolved via DOMINDS_TEMPLATE_BASE) or a git URL.
12
- * - rtws directory is `process.cwd()`. Use 'dominds -C <abs-dir> create ...' to create under another base dir.
12
+ * - rtws directory is `process.cwd()`. Use 'dominds -C <dir> create ...' to create under another base dir.
13
13
  */
14
14
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
15
  if (k2 === undefined) k2 = k;
package/dist/cli/read.js CHANGED
@@ -59,7 +59,7 @@ function printUsage() {
59
59
  console.log('`--audit` runs prompt audit via hidden teammate @fuxi using default LLM config (skips when unavailable), and also includes static toolset checks (registry vs `.minds/mcp.yaml` declarations).');
60
60
  console.log('When <member-id> is omitted, reads all visible team members.');
61
61
  console.log('');
62
- console.log("Note: rtws (runtime workspace) directory is `process.cwd()`. Use 'dominds -C <abs-dir> read' to run in another rtws.");
62
+ console.log("Note: rtws (runtime workspace) directory is `process.cwd()`. Use 'dominds -C <dir> read' to run in another rtws.");
63
63
  console.log('');
64
64
  console.log('Examples:');
65
65
  console.log(' dominds read # Read all team members');
package/dist/cli/tui.js CHANGED
@@ -76,7 +76,7 @@ function showHelp() {
76
76
  console.log('');
77
77
  console.log('Start or continue a dialog with an AI team member using a Taskdoc.');
78
78
  console.log('');
79
- console.log("Note: rtws (runtime workspace) directory is `process.cwd()`. Use 'dominds -C <abs-dir> tui ...' to run in another rtws.");
79
+ console.log("Note: rtws (runtime workspace) directory is `process.cwd()`. Use 'dominds -C <dir> tui ...' to run in another rtws.");
80
80
  console.log('');
81
81
  console.log('Arguments:');
82
82
  console.log(' <taskdoc-path> Path to Taskdoc (required for dialog)');
@@ -9,7 +9,7 @@
9
9
  * -p, --port <port> Port to listen on. Bare port is strict; suffix + tries higher ports; suffix - tries lower ports.
10
10
  * -h, --host <host> Host to bind to (default: localhost)
11
11
  * --nobrowser Do not open a browser (opt-out)
12
- * -h, --help Show help
12
+ * --help Show help
13
13
  */
14
14
  declare function main(args?: readonly string[]): Promise<void>;
15
15
  export { main };
package/dist/cli/webui.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * -p, --port <port> Port to listen on. Bare port is strict; suffix + tries higher ports; suffix - tries lower ports.
11
11
  * -h, --host <host> Host to bind to (default: localhost)
12
12
  * --nobrowser Do not open a browser (opt-out)
13
- * -h, --help Show help
13
+ * --help Show help
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.main = main;
@@ -22,6 +22,14 @@ const server_1 = require("../server");
22
22
  const auth_1 = require("../server/auth");
23
23
  const port_selection_1 = require("../server/port-selection");
24
24
  const log = (0, log_1.createLogger)('webui');
25
+ function formatWebSocketEndpoint(params) {
26
+ const httpOrigin = (0, auth_1.formatServerOrigin)({
27
+ scheme: params.scheme === 'ws' ? 'http' : 'https',
28
+ host: params.host,
29
+ port: params.port,
30
+ });
31
+ return `${params.scheme}${httpOrigin.slice(httpOrigin.indexOf(':'))}/ws`;
32
+ }
25
33
  function printHelp() {
26
34
  console.log(`
27
35
  WebUI Server for dominds
@@ -30,7 +38,7 @@ Usage:
30
38
  dominds webui [options]
31
39
 
32
40
  Note:
33
- rtws (runtime workspace) directory is \`process.cwd()\`. Use 'dominds -C <abs-dir> webui' to run in another rtws.
41
+ rtws (runtime workspace) directory is \`process.cwd()\`. Use 'dominds -C <dir> webui' to run in another rtws.
34
42
 
35
43
  Options:
36
44
  -p, --port <port> Port to listen on. Bare port is strict; suffix + tries higher ports; suffix - tries lower ports.
@@ -145,12 +153,34 @@ async function main(args = process.argv.slice(2)) {
145
153
  });
146
154
  const httpServer = started.httpServer;
147
155
  const auth = started.auth;
148
- const baseUrl = `http://${started.host}:${started.port}`;
156
+ const baseUrl = (0, auth_1.formatServerOrigin)({
157
+ scheme: 'http',
158
+ host: started.urlHost,
159
+ port: started.port,
160
+ });
149
161
  log.info(`WebUI ready: ${baseUrl}`);
150
- log.debug(`WebSocket endpoint: ws://${started.host}:${started.port}/ws`);
162
+ log.debug(`WebSocket endpoint: ${formatWebSocketEndpoint({
163
+ scheme: 'ws',
164
+ host: started.urlHost,
165
+ port: started.port,
166
+ })}`);
167
+ if (started.httpsPort !== undefined && started.httpsUrlHost !== undefined) {
168
+ const httpsBaseUrl = (0, auth_1.formatServerOrigin)({
169
+ scheme: 'https',
170
+ host: started.httpsUrlHost,
171
+ port: started.httpsPort,
172
+ });
173
+ log.info(`HTTPS WebUI ready: ${httpsBaseUrl}`);
174
+ log.debug(`HTTPS WebSocket endpoint: ${formatWebSocketEndpoint({
175
+ scheme: 'wss',
176
+ host: started.httpsUrlHost,
177
+ port: started.httpsPort,
178
+ })}`);
179
+ }
151
180
  if (auth.kind === 'enabled') {
152
181
  const autoAuthUrl = (0, auth_1.formatAutoAuthUrl)({
153
- host: started.host,
182
+ scheme: 'http',
183
+ host: started.urlHost,
154
184
  port: started.port,
155
185
  authKey: auth.key,
156
186
  });
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Business CLI runner for dominds
4
+ *
5
+ * Usage:
6
+ * dominds [subcommand] [options]
7
+ *
8
+ * Subcommands:
9
+ * webui - Start WebUI server (default)
10
+ * tui - Start Text User Interface
11
+ * run - Run task dialog (alias for tui)
12
+ * read - Read team configuration
13
+ * man - Render toolset manual to stdout
14
+ * manual - Alias for man
15
+ * validate_team_def - Validate explicit team toolset declarations
16
+ * cert - Create and inspect local HTTPS certificates
17
+ * create - Create a new runtime workspace (rtws) from a template
18
+ * install - Install a Dominds App into this rtws
19
+ * doctor - Diagnose Dominds App state in this rtws
20
+ * enable - Enable an installed Dominds App in this rtws
21
+ * disable - Disable an installed Dominds App in this rtws
22
+ * uninstall- Uninstall a Dominds App from this rtws
23
+ * update - Update installed Dominds App(s)
24
+ * new - Alias for create
25
+ * help - Show help
26
+ *
27
+ * This file is launched by the top-level dominds supervisor.
28
+ */
29
+ import './tools/builtins';
30
+ export declare function configureEnvProxySupport(): void;
31
+ export declare function main(argv?: readonly string[]): Promise<void>;