@morlay/dsh-desktop-host 0.2.8 → 0.2.10-alpha.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/dist/index.js +6 -12
- package/dist/paths.d.mts +1 -3
- package/dist/paths.js +1 -2
- package/dist/preload-source.d.mts +1 -3
- package/dist/preload-source.js +1 -2
- package/dist/settings-namespace.d.mts +1 -3
- package/dist/settings-namespace.js +1 -2
- package/dist/wire.d.mts +1 -3
- package/dist/wire.js +1 -2
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { bootAppProfile } from "@morlay/dsh-app-boot";
|
|
|
5
5
|
import inspector from "node:inspector";
|
|
6
6
|
import { inspect } from "node:util";
|
|
7
7
|
import { once } from "node:events";
|
|
8
|
-
|
|
8
|
+
// src/inspector.ts
|
|
9
9
|
function errorText$1(error) {
|
|
10
10
|
return error instanceof Error ? error.message : String(error);
|
|
11
11
|
}
|
|
@@ -46,8 +46,7 @@ function applyInspectorCommand(command) {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
//#region src/desktop-ipc.ts
|
|
49
|
+
// src/desktop-ipc.ts
|
|
51
50
|
/**
|
|
52
51
|
* 接上 IPC 面:挂好生命周期(`shutdown` 命令 / 通道断开)。
|
|
53
52
|
* @param options - 装配结果。
|
|
@@ -90,8 +89,7 @@ function connectDesktopIpc(options) {
|
|
|
90
89
|
stop
|
|
91
90
|
};
|
|
92
91
|
}
|
|
93
|
-
|
|
94
|
-
//#region src/fatal.ts
|
|
92
|
+
// src/fatal.ts
|
|
95
93
|
/** 诊断上限:壳把它写进日志,再长也没有额外价值。 */
|
|
96
94
|
const MAX_FATAL_DIAGNOSTIC_CHARS = 65536;
|
|
97
95
|
/** 任何抛出来的东西 → 一行消息。 */
|
|
@@ -113,8 +111,7 @@ function fatalEvent(error) {
|
|
|
113
111
|
}).slice(0, MAX_FATAL_DIAGNOSTIC_CHARS)
|
|
114
112
|
};
|
|
115
113
|
}
|
|
116
|
-
|
|
117
|
-
//#region src/invocation.ts
|
|
114
|
+
// src/invocation.ts
|
|
118
115
|
/**
|
|
119
116
|
* 解析宿主入口的参数。
|
|
120
117
|
* @param binName - 报错时前缀用的入口名(`dsh desktop` / `dsh web`)。
|
|
@@ -158,8 +155,7 @@ function parseHostInvocation(binName, argv) {
|
|
|
158
155
|
inner
|
|
159
156
|
};
|
|
160
157
|
}
|
|
161
|
-
|
|
162
|
-
//#region src/transport.ts
|
|
158
|
+
// src/transport.ts
|
|
163
159
|
const desktopStreamStats = {
|
|
164
160
|
active: 0,
|
|
165
161
|
opened: 0,
|
|
@@ -365,8 +361,7 @@ function installDesktopTransport(ctx) {
|
|
|
365
361
|
handler: streamHandler(ctx)
|
|
366
362
|
}), "dsh-desktop: remote stream route");
|
|
367
363
|
}
|
|
368
|
-
|
|
369
|
-
//#region src/index.ts
|
|
364
|
+
// src/index.ts
|
|
370
365
|
const DESKTOP_PATCH = fileURLToPath(new URL("../config/desktop.cordis.patch.yml", import.meta.url));
|
|
371
366
|
function reportMemoryWhenAsked(ctx) {
|
|
372
367
|
if (process.env.DSH_MEMORY_REPORT !== "1") return;
|
|
@@ -426,5 +421,4 @@ if (import.meta.main) main().catch((error) => {
|
|
|
426
421
|
process.exitCode = 1;
|
|
427
422
|
if (process.connected) process.disconnect?.();
|
|
428
423
|
});
|
|
429
|
-
//#endregion
|
|
430
424
|
export {};
|
package/dist/paths.d.mts
CHANGED
package/dist/paths.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
-
//#region src/preload-source.d.ts
|
|
3
2
|
/** 壳取 preload 的路径(`GET` 它得到可执行的 CJS 字节)。 */
|
|
4
3
|
export declare const PRELOAD_SOURCE_PATH = "/@dsh/preload.cjs";
|
|
5
4
|
export interface PreloadSourceOptions {
|
|
@@ -25,5 +24,4 @@ export declare const PRELOAD_BUNDLE_FILE: string;
|
|
|
25
24
|
* @param ctx - 宿主上下文(拿 `webServer`)。
|
|
26
25
|
* @param options - 见 {@link PreloadSourceOptions}。
|
|
27
26
|
*/
|
|
28
|
-
export declare function installPreloadSource(ctx: Context, options: PreloadSourceOptions): void;
|
|
29
|
-
//#endregion
|
|
27
|
+
export declare function installPreloadSource(ctx: Context, options: PreloadSourceOptions): void;
|
package/dist/preload-source.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { rolldown } from "rolldown";
|
|
4
|
-
|
|
4
|
+
// src/preload-source.ts
|
|
5
5
|
/**
|
|
6
6
|
* preload 的**源码**由服务现场打包成 CJS 交给壳,装配目录里因此不再有 `dist/`。
|
|
7
7
|
*
|
|
@@ -76,5 +76,4 @@ function installPreloadSource(ctx, options) {
|
|
|
76
76
|
handler: serve
|
|
77
77
|
}), `dsh-desktop-host: ${PRELOAD_SOURCE_PATH}`);
|
|
78
78
|
}
|
|
79
|
-
//#endregion
|
|
80
79
|
export { PRELOAD_BUNDLE_FILE, PRELOAD_SOURCE_PATH, bundlePreload, installPreloadSource };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
-
//#region src/settings-namespace.d.ts
|
|
3
2
|
export declare const name = "@morlay/dsh-desktop-host-settings-namespace";
|
|
4
3
|
/**
|
|
5
4
|
* 注册 settings namespace(`auto: false` 表示这个 namespace 的界面由宿主自己安排,不走自动渲染)。
|
|
6
5
|
* @param ctx - 宿主的上下文。
|
|
7
6
|
*/
|
|
8
|
-
export declare function apply(ctx: Context): void;
|
|
9
|
-
//#endregion
|
|
7
|
+
export declare function apply(ctx: Context): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/settings-namespace.ts
|
|
2
2
|
const name = "@morlay/dsh-desktop-host-settings-namespace";
|
|
3
3
|
/**
|
|
4
4
|
* 注册 settings namespace(`auto: false` 表示这个 namespace 的界面由宿主自己安排,不走自动渲染)。
|
|
@@ -9,5 +9,4 @@ function apply(ctx) {
|
|
|
9
9
|
scope.effect(() => scope.settings.configure({ auto: false }, ctx.fiber));
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
export { apply, name };
|
package/dist/wire.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/wire.d.ts
|
|
2
1
|
export declare const DESKTOP_HOST_PROTOCOL_VERSION: 1;
|
|
3
2
|
export declare const DESKTOP_STREAM_PATH = "/.dsh/remote-stream";
|
|
4
3
|
export declare function encodeDesktopStreamOpen(endpoint: string, payload: unknown): string;
|
|
@@ -105,5 +104,4 @@ export declare class DesktopHostResponseDecoder {
|
|
|
105
104
|
private parseError;
|
|
106
105
|
}
|
|
107
106
|
export declare function isDesktopHostEvent(value: unknown): value is DesktopHostEvent;
|
|
108
|
-
export declare function isDesktopHostCommand(value: unknown): value is DesktopHostCommand;
|
|
109
|
-
//#endregion
|
|
107
|
+
export declare function isDesktopHostCommand(value: unknown): value is DesktopHostCommand;
|
package/dist/wire.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StringDecoder } from "node:string_decoder";
|
|
2
|
-
|
|
2
|
+
// src/wire.ts
|
|
3
3
|
const DESKTOP_HOST_PROTOCOL_VERSION = 1;
|
|
4
4
|
const DESKTOP_STREAM_PATH = "/.dsh/remote-stream";
|
|
5
5
|
function encodeDesktopStreamOpen(endpoint, payload) {
|
|
@@ -262,5 +262,4 @@ function isDesktopHostCommand(value) {
|
|
|
262
262
|
if (value.type === "shutdown" || value.type === "inspect-off") return true;
|
|
263
263
|
return value.type === "inspect" && Number.isInteger(value.port) && value.port >= 0 && value.port <= 65535;
|
|
264
264
|
}
|
|
265
|
-
//#endregion
|
|
266
265
|
export { DESKTOP_CONTROL_IPC_FD, DESKTOP_HOST_PROTOCOL_VERSION, DESKTOP_PIPE_CHUNK_BYTES, DESKTOP_REQUEST_PIPE_FD, DESKTOP_RESPONSE_PIPE_FD, DESKTOP_STREAM_PATH, DesktopHostRequestDecoder, DesktopHostResponseDecoder, DesktopStreamBodyDecoder, encodeDesktopRequestCancel, encodeDesktopRequestData, encodeDesktopRequestEnd, encodeDesktopRequestStart, encodeDesktopResponseData, encodeDesktopResponseEnd, encodeDesktopResponseError, encodeDesktopResponseStart, encodeDesktopStreamItem, encodeDesktopStreamOpen, isDesktopHostCommand, isDesktopHostEvent };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morlay/dsh-desktop-host",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10-alpha.0",
|
|
4
4
|
"description": "Desktop host process for dshdev: boots the desktop profile and serves it through an in-process, portless webServer over byte pipes — upstream apps/desktop-host with the web carrier taken over and the Office composition dropped.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"desktop",
|
|
@@ -47,30 +47,30 @@
|
|
|
47
47
|
"./locale/*.json": "./locale/*.json"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@deepseek-ai/dsh-host-webserver": "^0.2.
|
|
51
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
52
|
-
"@morlay/dsh-app-boot": "0.2.
|
|
53
|
-
"@morlay/dsh-client-modules": "0.2.
|
|
54
|
-
"@morlay/web-custom-profile": "0.0.
|
|
50
|
+
"@deepseek-ai/dsh-host-webserver": "^0.2.2-alpha.2",
|
|
51
|
+
"@deepseek-ai/schemastery": "^3.18.6-alpha.1",
|
|
52
|
+
"@morlay/dsh-app-boot": "0.2.10-alpha.0",
|
|
53
|
+
"@morlay/dsh-client-modules": "0.2.11-alpha.0",
|
|
54
|
+
"@morlay/web-custom-profile": "0.0.5-alpha.0",
|
|
55
55
|
"lightningcss": "^1.32.0",
|
|
56
56
|
"rolldown": "1.x",
|
|
57
57
|
"ws": "^8.21.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
60
|
+
"@deepseek-ai/cordis": "^4.0.6-alpha.1",
|
|
61
61
|
"@local/devkit": "0.1.0",
|
|
62
62
|
"@types/node": "^26.5.0",
|
|
63
63
|
"@types/ws": "^8.18.2",
|
|
64
64
|
"playwright": "^1.64.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
68
|
-
"@deepseek-ai/dsh-api-gateway": "^0.2.
|
|
69
|
-
"@deepseek-ai/dsh-client-connection": "^0.2.
|
|
67
|
+
"@deepseek-ai/cordis": "^4.0.6-alpha.1",
|
|
68
|
+
"@deepseek-ai/dsh-api-gateway": "^0.2.2-alpha.2",
|
|
69
|
+
"@deepseek-ai/dsh-client-connection": "^0.2.2-alpha.2"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|
|
72
|
-
"
|
|
73
|
-
"
|
|
72
|
+
"dsh": ">= 0.2.2-alpha.2 < 0.2.3",
|
|
73
|
+
"node": ">=24.11.0"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"build": "pnpm exec tsdown"
|