@kenhkl/agent-moss 0.16.9 → 0.16.13
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.md +3 -0
- package/dist/cli.d.ts +19 -1
- package/dist/cli.js +2605 -478
- package/dist/data/agent_moss.service +4 -0
- package/dist/data/rules_template/README.md +133 -0
- package/dist/data/rules_template/extra.json +14 -0
- package/dist/data/rules_template/override.json +15 -0
- package/dist/engine/coordinator.js +917 -208
- package/dist/server.d.ts +18 -1
- package/dist/server.js +1809 -312
- package/dist/static/index.html +26 -1
- package/package.json +2 -1
package/dist/server.d.ts
CHANGED
|
@@ -27,5 +27,22 @@ declare function startServer(host?: string, port?: number): Promise<{
|
|
|
27
27
|
serve: () => Promise<void>;
|
|
28
28
|
port: number;
|
|
29
29
|
}>;
|
|
30
|
+
/**
|
|
31
|
+
* 以 **Unix Domain Socket** 方式启动(镜像 Python `server/socket_server.py` 的
|
|
32
|
+
* `agent-moss server --mode socket`)。复用同一份 Hono app/路由,只换传输层。
|
|
33
|
+
*
|
|
34
|
+
* 为什么需要:同机多实例 / 不想占用 TCP 端口 / 只允许本机访问的部署。
|
|
35
|
+
* 用 `node:http` 的 createServer + `getRequestListener(app.fetch)` 而不是
|
|
36
|
+
* `@hono/node-server` 的 serve() —— 后者只接受 `{hostname, port}`,不支持 uds。
|
|
37
|
+
*
|
|
38
|
+
* 与 TCP 模式的差异:无端口占用探测(socket 路径是显式的);启动前清理**残留 socket
|
|
39
|
+
* 文件**(进程被 kill -9 时文件会留下,直接 bind 会 EADDRINUSE 起不来 —— 这也是
|
|
40
|
+
* Python 侧 uvicorn 的同款坑,见 socket_server.py 的说明)。
|
|
41
|
+
*/
|
|
42
|
+
declare function startUnixSocketServer(socketPath?: string): Promise<{
|
|
43
|
+
socketPath: string;
|
|
44
|
+
serve: () => Promise<void>;
|
|
45
|
+
close: () => Promise<void>;
|
|
46
|
+
}>;
|
|
30
47
|
|
|
31
|
-
export { createApp, findFreePort, logDeploymentSelfCheck, startServer };
|
|
48
|
+
export { createApp, findFreePort, logDeploymentSelfCheck, startServer, startUnixSocketServer };
|