@jiyr0119/dsh-service-console 0.9.0 → 0.11.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 (56) hide show
  1. package/README.md +22 -6
  2. package/README.zh.md +8 -3
  3. package/assets/service-console-0.11.0.png +0 -0
  4. package/docs/DETAIL.md +1 -0
  5. package/docs/DETAIL.zh.md +1 -0
  6. package/docs/awesome-submission.yml +7 -9
  7. package/docs/compatibility.zh.md +24 -0
  8. package/docs/preview.svg +65 -0
  9. package/docs/rc5-upgrade-review.zh.md +16 -0
  10. package/docs/troubleshooting.zh.md +33 -0
  11. package/docs/user-guide.zh.md +33 -0
  12. package/icon.svg +4 -4
  13. package/lib/client/dictionaries.js +12 -0
  14. package/lib/client/locales/de.js +91 -0
  15. package/lib/client/locales/es.js +91 -0
  16. package/lib/client/locales/fr.js +91 -0
  17. package/lib/client/locales/ja.js +91 -0
  18. package/lib/client/locales/pt.js +91 -0
  19. package/lib/client/locales/ru.js +91 -0
  20. package/lib/client.js +641 -66
  21. package/lib/host/config-schema.js +45 -0
  22. package/lib/host/config.js +80 -27
  23. package/lib/host/ledger-projection.js +223 -0
  24. package/lib/host/ownership.js +2 -1
  25. package/lib/host/process-inspector.js +174 -49
  26. package/lib/host/service-registry.js +5 -4
  27. package/lib/host/service-tool.js +3 -1
  28. package/lib/host/snapshot-cache.js +59 -0
  29. package/lib/index.js +157 -24
  30. package/lib/types/client/ServiceConsole.d.ts +2 -0
  31. package/lib/types/client/dictionaries.d.ts +12 -0
  32. package/lib/types/client/locales/de.d.ts +89 -0
  33. package/lib/types/client/locales/es.d.ts +89 -0
  34. package/lib/types/client/locales/fr.d.ts +89 -0
  35. package/lib/types/client/locales/ja.d.ts +89 -0
  36. package/lib/types/client/locales/pt.d.ts +89 -0
  37. package/lib/types/client/locales/ru.d.ts +89 -0
  38. package/lib/types/host/config-schema.d.ts +52 -0
  39. package/lib/types/host/config.d.ts +27 -2
  40. package/lib/types/host/ledger-projection.d.ts +98 -0
  41. package/lib/types/host/process-inspector.d.ts +51 -2
  42. package/lib/types/host/service-registry.d.ts +1 -1
  43. package/lib/types/host/service-tool.d.ts +1 -1
  44. package/lib/types/host/snapshot-cache.d.ts +39 -0
  45. package/lib/types/host/types.d.ts +9 -0
  46. package/lib/types/index.d.ts +26 -1
  47. package/locale/de.json +7 -0
  48. package/locale/en.json +2 -1
  49. package/locale/es.json +7 -0
  50. package/locale/fr.json +7 -0
  51. package/locale/ja.json +7 -0
  52. package/locale/pt.json +7 -0
  53. package/locale/ru.json +7 -0
  54. package/locale/zh.json +2 -1
  55. package/package.json +16 -7
  56. package/assets/service-console-0.2.0.gif +0 -0
@@ -0,0 +1,98 @@
1
+ import { z } from 'zod';
2
+ import type { LedgerEntry } from './types';
3
+ /** 每个会话保留的台账条数上限(旧条目先丢) */
4
+ export declare const MAX_LEDGER_ENTRIES = 200;
5
+ /** 未结算调用(call 已记录、result 还没到)的上限 */
6
+ export declare const MAX_PENDING_CALLS = 32;
7
+ /** 条目保留时长(毫秒):开发服务的归属窗口远小于一天 */
8
+ export declare const LEDGER_TTL_MS: number;
9
+ /** 一次已发起、尚未结算的调用 */
10
+ export interface PendingLaunch {
11
+ /** tool/call 的 callId,或 PTC 的 subCallId */
12
+ id: string;
13
+ at: number;
14
+ command: string;
15
+ cwd: string | null;
16
+ redacted: string;
17
+ }
18
+ /** 台账状态(纯 JSON,projection 的持久化前提) */
19
+ export interface LedgerState {
20
+ /** 会话 id(内核 header),用于归属收窄 */
21
+ sessionKey: string;
22
+ /** 会话创建时的绝对工作目录(bash 未显式给 workdir 时作为 cwd 回退) */
23
+ sessionCwd: string | null;
24
+ entries: LedgerEntry[];
25
+ pending: PendingLaunch[];
26
+ }
27
+ /** 状态 schema:projection 用它在 checkpoint 反序列化时校验(不可信输入) */
28
+ export declare const ledgerStateSchema: z.ZodObject<{
29
+ sessionKey: z.ZodString;
30
+ sessionCwd: z.ZodNullable<z.ZodString>;
31
+ entries: z.ZodArray<z.ZodObject<{
32
+ at: z.ZodNumber;
33
+ command: z.ZodString;
34
+ cwd: z.ZodNullable<z.ZodString>;
35
+ sessionKey: z.ZodNullable<z.ZodString>;
36
+ redacted: z.ZodString;
37
+ }, z.core.$strip>>;
38
+ pending: z.ZodDefault<z.ZodArray<z.ZodObject<{
39
+ id: z.ZodString;
40
+ at: z.ZodNumber;
41
+ command: z.ZodString;
42
+ cwd: z.ZodNullable<z.ZodString>;
43
+ redacted: z.ZodString;
44
+ }, z.core.$strip>>>;
45
+ }, z.core.$strip>;
46
+ /** 折叠需要的事件形状(避免把整个 SessionEvent 联合拖进纯函数) */
47
+ export interface LedgerEventLike {
48
+ readonly type: string;
49
+ readonly time?: number;
50
+ readonly data?: Record<string, unknown>;
51
+ }
52
+ /**
53
+ * 纯 reducer:一条已提交事件 → 新状态(无关事件返回**同一引用**)。
54
+ * @param redact 命令脱敏函数(注入以便单测;生产用 `redaction.redact`)
55
+ */
56
+ export declare function foldLedgerEvent(state: LedgerState, event: LedgerEventLike, redact: (command: string) => string | null | undefined): LedgerState;
57
+ /** 初始状态(`init` 用):空台账 + 会话元数据 */
58
+ export declare function initLedgerState(header: {
59
+ id: string;
60
+ cwd?: string;
61
+ }): LedgerState;
62
+ /**
63
+ * 构造 rc.5 的 `ProjectionDefinition`。
64
+ * @param redact 命令脱敏
65
+ * @returns 可直接交给 `ctx.sessionProjections.register(...)` 的定义
66
+ */
67
+ export declare function createLedgerProjection(redact: (command: string) => string | null | undefined): {
68
+ readonly key: "serviceConsoleLedger";
69
+ readonly stateSchema: z.ZodObject<{
70
+ sessionKey: z.ZodString;
71
+ sessionCwd: z.ZodNullable<z.ZodString>;
72
+ entries: z.ZodArray<z.ZodObject<{
73
+ at: z.ZodNumber;
74
+ command: z.ZodString;
75
+ cwd: z.ZodNullable<z.ZodString>;
76
+ sessionKey: z.ZodNullable<z.ZodString>;
77
+ redacted: z.ZodString;
78
+ }, z.core.$strip>>;
79
+ pending: z.ZodDefault<z.ZodArray<z.ZodObject<{
80
+ id: z.ZodString;
81
+ at: z.ZodNumber;
82
+ command: z.ZodString;
83
+ cwd: z.ZodNullable<z.ZodString>;
84
+ redacted: z.ZodString;
85
+ }, z.core.$strip>>>;
86
+ }, z.core.$strip>;
87
+ readonly stateVersion: 1;
88
+ readonly init: (header: {
89
+ id: string;
90
+ cwd?: string;
91
+ }) => LedgerState;
92
+ readonly apply: (state: LedgerState, event: LedgerEventLike) => LedgerState;
93
+ };
94
+ /**
95
+ * 从投影状态里取条目;形状不对时返回空数组(宁可少归属,也不抛)。
96
+ * @param state `stateOf(session)` 的返回值(unknown:可能来自旧版本 checkpoint)
97
+ */
98
+ export declare function entriesOf(state: unknown, now?: number): LedgerEntry[];
@@ -3,8 +3,47 @@ export interface CommandResult {
3
3
  stderr: string;
4
4
  code: number | null;
5
5
  }
6
- export type CommandRunner = (command: string, timeoutMs?: number) => CommandResult | Promise<CommandResult>;
6
+ export type CommandRunner = (command: string, timeoutMs?: number, signal?: AbortSignal) => CommandResult | Promise<CommandResult>;
7
+ /**
8
+ * 异步命令执行(可取消):`execFile('/bin/sh', ['-c', …])` + `signal`。
9
+ *
10
+ * 扫描链路上的一切命令都必须走这里——`execFileSync` 无法响应取消,
11
+ * 面板的 8s 超时与模型的 `exec.signal` 都只能等进程自己结束。
12
+ * 取消/超时按「已结束但输出不完整」返回(code 125),由上层记为 partial。
13
+ */
14
+ export declare function runCommandAsync(command: string, timeoutMs?: number, signal?: AbortSignal): Promise<CommandResult>;
7
15
  export declare function runCommand(command: string, timeoutMs?: number): CommandResult;
16
+ export interface LsofFieldProcess {
17
+ pid: number;
18
+ /** lsof `c` 字段(命令名,可能被 lsof 截断到 9 字符;优先用 ps 的 command) */
19
+ command: string;
20
+ /** `n` 字段(LISTEN 扫描里是地址;cwd 扫描里不出现,走 cwd 字段) */
21
+ names: string[];
22
+ /** 仅 `-d cwd` 扫描里出现的 `n` 值 */
23
+ cwd: string | null;
24
+ }
25
+ /**
26
+ * 解析 `lsof -F<fields>` 输出(每条记录:p/c/f/n 前缀行)。
27
+ * @param stdout lsof 字段模式输出
28
+ */
29
+ export declare function parseLsofFieldOutput(stdout: string): LsofFieldProcess[];
30
+ export interface PsCombinedRow {
31
+ pid: number;
32
+ ppid: number;
33
+ pgid: number | null;
34
+ user: string | null;
35
+ lstart: string;
36
+ startedAt: number | null;
37
+ command: string;
38
+ }
39
+ /**
40
+ * 解析 `ps -o pid=,ppid=,pgid=,lstart=,command= -p <pids>` 的单次合并输出。
41
+ * lstart 固定占 5 个 token(Www Mmm D HH:MM:SS YYYY),command 是余下全部。
42
+ * @param stdout ps 输出
43
+ */
44
+ export declare function parsePsCombined(stdout: string): PsCombinedRow[];
45
+ /** 地址语法推断协议:`[::1]:80` / `[fe80::1]:80` 视为 tcp6,其余 tcp */
46
+ export declare function protocolOfAddress(address: string): string;
8
47
  export declare function parseLstart(str: string): number | null;
9
48
  export interface ListenRow {
10
49
  command: string;
@@ -36,6 +75,8 @@ export interface RawProcess {
36
75
  name: string | null;
37
76
  pgid: number | null;
38
77
  cwd: string | null;
78
+ /** 进程属主(来自同一次 ps 调用;root 判定用) */
79
+ user: string | null;
39
80
  }
40
81
  export interface RawListener {
41
82
  pid: number;
@@ -49,5 +90,13 @@ export interface RawScan {
49
90
  listeners: RawListener[];
50
91
  procs: Map<number, RawProcess>;
51
92
  partialWarnings: string[];
93
+ /**
94
+ * 监听扫描本身失败时的结构化错误(取消/超时、退出码异常、权限)。
95
+ * 缺省表示扫描成功;上层据此区分「真的没有服务」与「扫不出来」。
96
+ */
97
+ scanError?: {
98
+ code: 'SCAN_TIMEOUT' | 'SCAN_FAILED' | 'PERMISSION_DENIED';
99
+ message: string;
100
+ } | null;
52
101
  }
53
- export declare function scanRaw(commandRunner?: CommandRunner): Promise<RawScan>;
102
+ export declare function scanRaw(commandRunner?: CommandRunner, signal?: AbortSignal, commandTimeoutMs?: number): Promise<RawScan>;
@@ -2,4 +2,4 @@ import type { LedgerEntry, Snapshot, WorkspaceLike } from './types';
2
2
  import { type CommandRunner } from './process-inspector';
3
3
  import { type OwnershipContext } from './ownership';
4
4
  import { type ProtectionGuard } from './protection';
5
- export declare function buildSnapshot(ledgers: LedgerEntry[], workspaces: WorkspaceLike[], commandRunner?: CommandRunner, guard?: ProtectionGuard, context?: OwnershipContext): Promise<Snapshot>;
5
+ export declare function buildSnapshot(ledgers: LedgerEntry[], workspaces: WorkspaceLike[], commandRunner?: CommandRunner, guard?: ProtectionGuard, context?: OwnershipContext, signal?: AbortSignal, commandTimeoutMs?: number): Promise<Snapshot>;
@@ -6,6 +6,6 @@ export interface ServiceToolDeps {
6
6
  * 提供时「本次对话」归属按台账 sessionKey 收窄,避免同工作区另一会话的
7
7
  * 启动记录被误判成本次对话。
8
8
  */
9
- snapshot(sessionId?: string | null): Promise<Snapshot>;
9
+ snapshot(sessionId?: string | null, signal?: AbortSignal): Promise<Snapshot>;
10
10
  }
11
11
  export declare function buildServiceTool(deps: ServiceToolDeps): import("@deepseek-ai/dsh-tools").ToolDefinition;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * M7 · 扫描结果缓存(TTL + single-flight + 出错时保留上次结果)
3
+ *
4
+ * 两个客户端共用同一个扫描:控制台 tab(2–30 s)与 composer pill(30 s)。
5
+ * 一次扫描是 3 条同步/异步 shell 调用,所以在极短窗口内合并重复请求:
6
+ * - TTL 1 s:快于最快的轮询档(2 s),交互式刷新仍即时;
7
+ * - single-flight:同一 key 的并发请求只跑一次;
8
+ * - stale-while-error:扫描瞬时失败时返回上次结果并标记 stale(面板可提示);
9
+ * - `invalidate`:stop/restart 之后立刻失效,避免展示已死服务。
10
+ */
11
+ export interface CacheHit<T> {
12
+ value: T;
13
+ /** 命中过期但可用的旧值(仅出错时) */
14
+ stale: boolean;
15
+ }
16
+ export interface SnapshotCacheOptions {
17
+ /** 新鲜期(毫秒) */
18
+ ttlMs?: number;
19
+ /** 出错时允许回退到多久以内的旧值(毫秒) */
20
+ staleWhileErrorMs?: number;
21
+ /** 注入时钟(单测用) */
22
+ now?: () => number;
23
+ }
24
+ export declare class SnapshotCache<T> {
25
+ private readonly entries;
26
+ private readonly inflight;
27
+ private readonly ttlMs;
28
+ private readonly staleWhileErrorMs;
29
+ private readonly now;
30
+ constructor(options?: SnapshotCacheOptions);
31
+ /**
32
+ * 取缓存或加载一次。
33
+ * @param key 缓存键(含 sessionId:归属按调用方会话收窄)
34
+ * @param load 真实加载函数
35
+ */
36
+ get(key: string, load: () => Promise<T>): Promise<CacheHit<T>>;
37
+ /** 失效一个键(stop/restart 后调用);不传则清空。 */
38
+ invalidate(key?: string): void;
39
+ }
@@ -33,6 +33,11 @@ export interface Snapshot {
33
33
  services: Service[];
34
34
  partialWarnings: string[];
35
35
  ledgerCount: number;
36
+ /** 监听扫描失败时的结构化错误(缺省表示成功) */
37
+ scanError?: {
38
+ code: 'SCAN_TIMEOUT' | 'SCAN_FAILED' | 'PERMISSION_DENIED';
39
+ message: string;
40
+ } | null;
36
41
  }
37
42
  export interface ApiResult<T = unknown> {
38
43
  ok: boolean;
@@ -56,6 +61,10 @@ export interface Config {
56
61
  showUnknown: boolean;
57
62
  forceKill: boolean;
58
63
  autoCleanup: boolean;
64
+ /** 一次扫描请求的预算(毫秒) */
65
+ scanTimeoutMs: number;
66
+ /** 单条宿主命令的预算(毫秒) */
67
+ commandTimeoutMs: number;
59
68
  }
60
69
  export interface ActionRecord {
61
70
  at: number;
@@ -1,5 +1,6 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { WebServer } from '@deepseek-ai/dsh-host-webserver';
3
+ import type { PluginConfig } from './host/config-schema';
3
4
  declare module '@deepseek-ai/cordis' {
4
5
  interface Context {
5
6
  timer: {
@@ -10,10 +11,14 @@ declare module '@deepseek-ai/cordis' {
10
11
  webServer: WebServer;
11
12
  }
12
13
  }
14
+ /** 错误码 → HTTP 状态(客户端只读信封,但状态码让日志/代理可读) */
15
+ export declare function errorStatus(code: string): number;
13
16
  /** 一次请求的来源信息(handler 的第二个参数) */
14
17
  export interface RequestInfo {
15
18
  /** 调用方是否来自本机回环;变更类操作只允许 true。 */
16
19
  loopback: boolean;
20
+ /** 请求取消信号(客户端断开时中止扫描的 shell 子进程) */
21
+ signal: AbortSignal;
17
22
  }
18
23
  /**
19
24
  * 调用方是否来自本机回环。
@@ -28,6 +33,26 @@ export interface RequestInfo {
28
33
  export declare function isLoopbackCaller(remoteAddress: string | undefined | null): boolean;
29
34
  declare const _default: {
30
35
  inject: string[];
31
- apply(ctx: Context): void;
36
+ /** rc.5 契约:组合行里的 `config:` 由 Loader 用这份 schema 校验 */
37
+ Config: import("@deepseek-ai/schemastery").default<Schemastery.ObjectS<NoInfer<{
38
+ refreshInterval: import("@deepseek-ai/schemastery").default<number, number, "defined">;
39
+ defaultScope: import("@deepseek-ai/schemastery").default<"conversation" | "workspace" | "machine", "conversation" | "workspace" | "machine", "defined">;
40
+ gracefulTimeout: import("@deepseek-ai/schemastery").default<number, number, "defined">;
41
+ showUnknown: import("@deepseek-ai/schemastery").default<boolean, boolean, "defined">;
42
+ forceKill: import("@deepseek-ai/schemastery").default<boolean, boolean, "defined">;
43
+ autoCleanup: import("@deepseek-ai/schemastery").default<boolean, boolean, "defined">;
44
+ scanTimeoutMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
45
+ commandTimeoutMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
46
+ }>>, Schemastery.ObjectT<NoInfer<{
47
+ refreshInterval: import("@deepseek-ai/schemastery").default<number, number, "defined">;
48
+ defaultScope: import("@deepseek-ai/schemastery").default<"conversation" | "workspace" | "machine", "conversation" | "workspace" | "machine", "defined">;
49
+ gracefulTimeout: import("@deepseek-ai/schemastery").default<number, number, "defined">;
50
+ showUnknown: import("@deepseek-ai/schemastery").default<boolean, boolean, "defined">;
51
+ forceKill: import("@deepseek-ai/schemastery").default<boolean, boolean, "defined">;
52
+ autoCleanup: import("@deepseek-ai/schemastery").default<boolean, boolean, "defined">;
53
+ scanTimeoutMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
54
+ commandTimeoutMs: import("@deepseek-ai/schemastery").default<number, number, "defined">;
55
+ }>>, "plain">;
56
+ apply(ctx: Context, rowConfig?: Partial<PluginConfig>): void;
32
57
  };
33
58
  export default _default;
package/locale/de.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Dienstkonsole",
4
+ "description": "Erkennt lauschende TCP-Ports auf dieser Maschine, ordnet jeden Dienst einem Chat, Arbeitsbereich oder der Maschine zu und stoppt bzw. startet lokale Entwicklungsserver sicher. Erscheint als Tab in der rechten Seitenleiste, als Pill über dem Eingabefeld und als Karte des service_list-Tools.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/en.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Service console",
4
- "description": "Discovers listening TCP ports on this machine, attributes each service to a conversation, workspace, or the machine, and safely stops or restarts local dev servers."
4
+ "description": "Discovers listening TCP ports on this machine, attributes each service to a conversation, workspace, or the machine, and safely stops or restarts local dev servers. Shown as a right-Sidebar tab, an ambient composer pill, and an actionable chat card for the service_list tool.",
5
+ "detail": "docs/DETAIL.md"
5
6
  }
6
7
  }
package/locale/es.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Consola de servicios",
4
+ "description": "Descubre los puertos TCP a la escucha en esta máquina, atribuye cada servicio a una conversación, un espacio de trabajo o la máquina, y detiene o reinicia servidores locales de forma segura. Se muestra como pestaña de la barra lateral derecha, pill sobre el compositor y tarjeta del servicio_list.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Console des services",
4
+ "description": "Découvre les ports TCP en écoute sur cette machine, attribue chaque service à une conversation, un espace de travail ou la machine, et arrête ou redémarre les serveurs locaux en sécurité. Affiché comme onglet de la barre latérale droite, pill au-dessus du champ de saisie et carte du service_list.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "サービスコンソール",
4
+ "description": "このマシンで待ち受け中の TCP ポートを検出し、各サービスをチャット・ワークスペース・マシンに帰属させ、安全に停止・再起動します。右サイドバーのタブ、入力欄の常駐 pill、service_list のカードとして表示されます。",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Console de serviços",
4
+ "description": "Descobre as portas TCP à escuta nesta máquina, atribui cada serviço a uma conversa, área de trabalho ou à máquina, e para ou reinicia servidores locais em segurança. Mostra-se como separador da barra lateral direita, pill sobre o compositor e cartão do service_list.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Консоль сервисов",
4
+ "description": "Находит слушающие TCP-порты на этой машине, определяет принадлежность сервиса чату, рабочей области или машине и безопасно останавливает или перезапускает локальные серверы. Показывается как вкладка правой панели, pill над полем ввода и карточка инструмента service_list.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/zh.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "服务控制台",
4
- "description": "发现本机监听的 TCP 端口,识别每个服务归属的对话、工作区或本机,并安全地停止或重启本地开发服务。"
4
+ "description": "发现本机监听的 TCP 端口,识别每个服务归属的对话、工作区或本机,并安全地停止或重启本地开发服务。以右侧栏标签、输入框上方的常驻 pill 与 service_list 工具卡片三种形态呈现。",
5
+ "detail": "docs/DETAIL.zh.md"
5
6
  }
6
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiyr0119/dsh-service-console",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "DeepSeek Harness 本地开发服务控制台(原生插件):发现监听端口,识别服务归属,安全查看/停止/重启。Local development service console for DSH.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,8 +14,10 @@
14
14
  "types": "./lib/types/client/index.d.ts",
15
15
  "default": "./lib/client.js"
16
16
  },
17
- "./src/*": "./src/*",
18
- "./package.json": "./package.json"
17
+ "./icon": "./icon.svg",
18
+ "./locale/*.json": "./locale/*.json",
19
+ "./package.json": "./package.json",
20
+ "./src/*": "./src/*"
19
21
  },
20
22
  "publishConfig": {
21
23
  "access": "public"
@@ -27,10 +29,13 @@
27
29
  "homepage": "https://github.com/Jiyr0119/dsh-service-console",
28
30
  "keywords": [
29
31
  "deepseek-harness",
30
- "cordis",
32
+ "dsh",
31
33
  "dsh-plugin",
34
+ "cordis",
32
35
  "local-dev-server",
33
- "port-manager"
36
+ "port-manager",
37
+ "service-console",
38
+ "i18n"
34
39
  ],
35
40
  "engines": {
36
41
  "node": ">=24.9.0",
@@ -87,6 +92,7 @@
87
92
  "@deepseek-ai/dsh-client-ui-tool": "0.2.2-rc.5",
88
93
  "@deepseek-ai/dsh-host-webserver": "^0.2.2-rc.5",
89
94
  "@deepseek-ai/dsh-tools": "^0.2.2-rc.5",
95
+ "@deepseek-ai/schemastery": "~3.19.0",
90
96
  "@types/node": "^24.9.0",
91
97
  "@types/react": "^18.3.1",
92
98
  "lightningcss": "^1.33.0",
@@ -94,11 +100,14 @@
94
100
  "react": "^18.2.0",
95
101
  "react-dom": "^18.2.0",
96
102
  "tsdown": "^0.22.14",
97
- "typescript": "^5.6.0"
103
+ "typescript": "^5.6.0",
104
+ "zod": "4.6.6"
98
105
  },
99
106
  "peerDependencies": {
100
107
  "@deepseek-ai/cordis": "~4.1.0",
101
108
  "@deepseek-ai/dsh-tools": "^0.2.2-rc.5",
102
- "react": "^18.2.0"
109
+ "@deepseek-ai/schemastery": "~3.19.0",
110
+ "react": "^18.2.0",
111
+ "zod": "^4.6.6"
103
112
  }
104
113
  }
Binary file