@jiyr0119/dsh-service-console 0.7.2 → 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.
- package/README.md +7 -5
- package/README.zh.md +7 -5
- package/docs/local-debugging.md +1 -1
- package/docs/rc5-upgrade-review.zh.md +182 -0
- package/docs/release-checklist.md +15 -12
- package/icon.svg +8 -0
- package/lib/client/dictionaries.js +19 -2
- package/lib/client/i18n.js +29 -70
- package/lib/client/service-list-view.js +186 -0
- package/lib/client.js +1284 -685
- package/lib/host/config.js +1 -2
- package/lib/host/ledger.js +2 -3
- package/lib/host/lifecycle.js +2 -3
- package/lib/host/ownership.js +8 -4
- package/lib/host/process-inspector.js +1 -2
- package/lib/host/protection.js +1 -2
- package/lib/host/redaction.js +1 -2
- package/lib/host/service-registry.js +4 -5
- package/lib/host/service-tool.js +42 -4
- package/lib/index.js +54 -11
- package/lib/types/client/ServiceConsole.d.ts +35 -15
- package/lib/types/client/ServiceDockPill.d.ts +29 -0
- package/lib/types/client/ServiceListCard.d.ts +17 -0
- package/lib/types/client/api.d.ts +19 -0
- package/lib/types/client/dictionaries.d.ts +18 -0
- package/lib/types/client/i18n.d.ts +33 -40
- package/lib/types/client/index.d.ts +21 -10
- package/lib/types/client/service-list-view.d.ts +92 -0
- package/lib/types/host/ledger.d.ts +7 -0
- package/lib/types/host/ownership.d.ts +9 -1
- package/lib/types/host/service-registry.d.ts +2 -1
- package/lib/types/host/service-tool.d.ts +7 -2
- package/lib/types/index.d.ts +18 -2
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +34 -33
- package/dsh.plugin.json +0 -16
- package/dynamic/client.js +0 -193
- package/dynamic/host.js +0 -337
- package/manifest.json +0 -24
|
@@ -1,57 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* i18n
|
|
2
|
+
* i18n 注册/绑定(0.8.0:对齐 DSH 0.2.2-rc.5 的 locale 契约)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* rc.5 的 `ctx.locale.register(ns, { zh, en, … })` 是**类型化对象式**重载:一次注册
|
|
5
|
+
* 全部语种,词典键按 `LocaleNamespaceMap` 的 namespace 联合校验(缺键/多键/拼写错误
|
|
6
|
+
* 都是编译错误)。3 参逐语种式是给「不在 merge 表里的 namespace」用的降级路径,
|
|
7
|
+
* 用它会绕过类型校验,因此不再使用。
|
|
8
|
+
*
|
|
9
|
+
* 两个真实事故口(0.7.1/0.7.2 已修,这里保留对应机制):
|
|
10
|
+
* 1. 桌面竞态:`dsh-client-locale` 的 apply 要先 `await __DSH_LOCALE__.read()`
|
|
11
|
+
* (Electron IPC)才 `ctx.provide('locale')`;本插件 apply 先跑,一次性
|
|
12
|
+
* `ctx.get('locale')` 取到 undefined 即整体跳过 i18n,UI 永久回显原始键。
|
|
13
|
+
* 2. 热更新双装载:dshmarket 更新会把插件装载两次,第二次 `register` 抛
|
|
14
|
+
* `already has locale`;旧实例卸载时不得撤走词典。
|
|
15
|
+
*
|
|
16
|
+
* 对策:`ctx.inject(['locale'], …)` 等 provider fiber 就绪后进入;词典注册幂等且
|
|
17
|
+
* 有意不随实例卸载撤销。组件文案改由 rc.5 框架合成的 `t` seat 提供
|
|
18
|
+
* (slot 注册项的 `locale:` 选项),本模块只保留 `label` thunk 需要的绑定。
|
|
8
19
|
*/
|
|
9
|
-
import type {
|
|
10
|
-
/** 平台 locale 服务的最小兼容面(
|
|
20
|
+
import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
|
|
21
|
+
/** 平台 locale 服务的最小兼容面(rc.5:对象式注册 + namespace 绑定) */
|
|
11
22
|
export interface LocaleCompat {
|
|
12
|
-
register(ns: string,
|
|
23
|
+
register(ns: string, dicts: Record<string, Record<string, string>>): unknown;
|
|
13
24
|
bind(ns: string): (key: string, params?: Record<string, unknown>) => string;
|
|
14
|
-
subscribe(fn: () => void): (() => void) | void;
|
|
15
|
-
}
|
|
16
|
-
export type Translate = (key: ConsoleKey, params?: Record<string, unknown>) => string;
|
|
17
|
-
export interface BoundLocale {
|
|
18
|
-
t: Translate;
|
|
19
|
-
subscribe: (fn: () => void) => () => void;
|
|
20
25
|
}
|
|
26
|
+
/** 词典键域翻译函数(namespace 联合 + 公共词表兜底) */
|
|
27
|
+
export type Translate = TranslateNS<'dsh-service-console'>;
|
|
28
|
+
/** 语言 id → 词典 */
|
|
29
|
+
export type DictionaryMap = Record<string, Record<string, string>>;
|
|
21
30
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
31
|
+
* 幂等注册词典:单次对象式注册;已由先前装载注册(`already has locale`)视为
|
|
32
|
+
* 成功,其余错误留一条告警而不是静默吞成「UI 回显原始键」。
|
|
24
33
|
*/
|
|
25
|
-
export declare function registerDictionaries(locale: LocaleCompat, ns: string, dicts:
|
|
34
|
+
export declare function registerDictionaries(locale: LocaleCompat, ns: string, dicts: DictionaryMap): void;
|
|
26
35
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
36
|
+
* 绑定翻译函数:rc.5 的 bound 原生支持 `{param}` 插值;这里仍保留兜底替换,
|
|
37
|
+
* 以便旧版/桩实现忽略 params 时标签不出现裸占位符。
|
|
29
38
|
*/
|
|
30
|
-
export declare function bindTranslator(locale: LocaleCompat, ns: string):
|
|
39
|
+
export declare function bindTranslator(locale: LocaleCompat, ns: string): Translate;
|
|
31
40
|
/** 宿主上下文最小面:本模块只用到 get / inject(真实 ctx 来自 @deepseek-ai/cordis) */
|
|
32
41
|
export interface PluginContextCompat {
|
|
33
42
|
get(name: string, strict?: boolean): unknown;
|
|
34
43
|
inject(deps: string[], callback: (ctx: PluginContextCompat) => void): unknown;
|
|
35
44
|
}
|
|
36
45
|
/**
|
|
37
|
-
* 反应式 i18n
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* 退回 `entry.label` 等原始键:
|
|
41
|
-
*
|
|
42
|
-
* 1. 服务晚到(桌面竞态):桌面客户端 `globalThis.__DSH_LOCALE__` 存在时,
|
|
43
|
-
* dsh-client-locale 的 apply 要先 `await bridge.read()`(Electron IPC)才
|
|
44
|
-
* `ctx.provide('locale')`;本插件 apply 先跑,get 取到 undefined 即整体
|
|
45
|
-
* 跳过 i18n。浏览器开发环境无 bridge、provide 同步完成,所以“本地验证
|
|
46
|
-
* 通过、用户下载后失效”。另外 cordis 的 get(strict) 在 provider fiber
|
|
47
|
-
* 尚未落定(state != 2)时同样返回 undefined。
|
|
48
|
-
* 2. 热更新双装载的 dispose 顺序:dshmarket 更新会把插件装载两次,第二次
|
|
49
|
-
* register 抛 already has locale 被跳过;随后旧实例卸载时若把词典 disposer
|
|
50
|
-
* 掉,词典即被撤走,留下没有词典的新实例回显原始键。
|
|
51
|
-
*
|
|
52
|
-
* 对策:`ctx.inject(['locale'], …)` 按平台注入等待语义在服务真正可用
|
|
53
|
-
* (provider fiber 就绪)后才进入;provider 重启/热更新重载都会重新进入
|
|
54
|
-
* 回调并重绑;词典注册保持幂等,且有意不在实例卸载时撤销(见上第 2 条),
|
|
55
|
-
* 注册本身只增不减,对双装载安全。
|
|
46
|
+
* 反应式 i18n 挂载:等 locale 服务真正可用(provider fiber 就绪)后注册词典,
|
|
47
|
+
* 并把绑定好的翻译函数交给调用方(用于 slot 注册项的 `label` thunk——它在每次
|
|
48
|
+
* 投影时被重新读取,因此语言切换无需重新注册)。
|
|
56
49
|
*/
|
|
57
|
-
export declare function attachLocale(ctx: PluginContextCompat, ns: string, dicts:
|
|
50
|
+
export declare function attachLocale(ctx: PluginContextCompat, ns: string, dicts: DictionaryMap, onReady: (t: Translate) => void): void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* dsh-service-console — Client
|
|
2
|
+
* dsh-service-console — Client 入口(rc.5 右侧栏页面型 tab)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* -
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
4
|
+
* 架构(M1 迁移后):
|
|
5
|
+
* - 控制台是**右侧栏的一个页面型 tab**:静态类型注册(stage one)+
|
|
6
|
+
* `sidebar.right.pane.tab` / `.title` 的 keyed 注册(stage two)。
|
|
7
|
+
* 面板的边框、拖拽、停靠、焦点、持久化、关闭全部由侧栏拥有——插件只剩内容。
|
|
8
|
+
* - i18n 走 slot 注册项的 `locale:` 选项(框架合成的 `t` seat),
|
|
9
|
+
* 不再需要模块级 bind 与手动订阅。
|
|
10
|
+
* - 设置页仍是全局 `settings.section`(无会话也能改配置)。
|
|
11
|
+
* - API 通过 fetch 直连 webServer JSON 路由(不走 host.call / LLM)。
|
|
12
12
|
*/
|
|
13
13
|
import type { Context } from '@deepseek-ai/cordis';
|
|
14
14
|
import { type ConsoleKey } from './dictionaries';
|
|
@@ -17,7 +17,18 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
17
17
|
'dsh-service-console': ConsoleKey;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* 页面参数(M10 快捷键 / 第三方入口用得上):
|
|
22
|
+
* 打开已存在的 console tab 时通过 navigation.params 传焦点意图,无需新的打开路径。
|
|
23
|
+
*/
|
|
24
|
+
declare module '@deepseek-ai/dsh-client-ui-sidebar-right/client' {
|
|
25
|
+
interface SidebarRightTabParamsMap {
|
|
26
|
+
'service-console': {
|
|
27
|
+
readonly focus?: 'services' | 'settings';
|
|
28
|
+
} | undefined;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** cordis-plugin-timer 的最小结构化面(客户端只用 timeout) */
|
|
21
32
|
interface TimerLike {
|
|
22
33
|
timeout(callback: () => void, delay: number): () => void;
|
|
23
34
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* service_list 的呈现投影(纯函数,无 React / 无 DOM)
|
|
3
|
+
*
|
|
4
|
+
* 模型工具 `service_list` 的 `output.presentationMeta` 会随会话日志**持久化**,
|
|
5
|
+
* 因此这里把它当作**不可信输入**:旧会话(无 meta)、被截断的记录、未来版本新增
|
|
6
|
+
* 字段、手工篡改都可能出现。任何坏形状都必须降级成可见的纯文本行,绝不抛错
|
|
7
|
+
* ——toolview 组件抛错会让该 key 的整行粘性空白(框架放弃该 entry)。
|
|
8
|
+
*/
|
|
9
|
+
import type { Ownership } from '../host/types';
|
|
10
|
+
import type { ConsoleKey } from './dictionaries';
|
|
11
|
+
import type { TagTone } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
12
|
+
/** 卡片最多展示多少行(meta 由宿主限长,这里再兜一次,防止回放旧数据) */
|
|
13
|
+
export declare const MAX_CARD_ROWS = 20;
|
|
14
|
+
/** 归属 → 主题色(两处 UI 共用,避免各写一份) */
|
|
15
|
+
export declare const OWNERSHIP_COLOR: Record<Ownership, string>;
|
|
16
|
+
/**
|
|
17
|
+
* 归属徽标的 tone:统一 `neutral`。
|
|
18
|
+
*
|
|
19
|
+
* 平台 Tag 的语义色(success/warning/danger)在浅色主题下实测对比度不足
|
|
20
|
+
* (success 2.09:1 / warning 1.96:1 / danger 3.80:1,均低于 AA 4.5:1),
|
|
21
|
+
* 而 `neutral` 为 5.36:1。归属的细粒度语义由前面的彩色圆点承担(装饰性)。
|
|
22
|
+
*/
|
|
23
|
+
export declare const OWNERSHIP_TONE: Record<Ownership, TagTone>;
|
|
24
|
+
/** 归属 → 词典键 */
|
|
25
|
+
export declare const OWNERSHIP_KEY: Record<Ownership, ConsoleKey>;
|
|
26
|
+
/** API 字符串 → 归属级别(未知值降级 unknown,不炸 UI) */
|
|
27
|
+
export declare function ownershipLevel(value: string): Ownership;
|
|
28
|
+
export interface ServiceListRow {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
/** 逗号分隔的端口(与工具输出同形) */
|
|
32
|
+
ports: string;
|
|
33
|
+
ownership: Ownership;
|
|
34
|
+
protected: boolean;
|
|
35
|
+
/** 能否安全重启(meta 缺失时保守为 false:不提供重启入口) */
|
|
36
|
+
restartable: boolean;
|
|
37
|
+
/** 可打开的 localhost URL;非本机监听 / 旧 meta 为 null */
|
|
38
|
+
url: string | null;
|
|
39
|
+
}
|
|
40
|
+
export interface ServiceListViewModel {
|
|
41
|
+
/** 扫描时刻(epoch ms);缺失或非法时为 null */
|
|
42
|
+
scannedAt: number | null;
|
|
43
|
+
/** 过滤前总数 */
|
|
44
|
+
total: number;
|
|
45
|
+
/** 实际返回数 */
|
|
46
|
+
count: number;
|
|
47
|
+
/** 有界行(≤ MAX_CARD_ROWS) */
|
|
48
|
+
rows: ServiceListRow[];
|
|
49
|
+
/** 被截断的行数(count - rows.length,≥0) */
|
|
50
|
+
truncated: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 只接受 http(s) + 回环主机;其余(含 `javascript:`、`data:`、外部域名)一律 null。
|
|
54
|
+
* @param value meta 里的 url 字段(unknown)
|
|
55
|
+
*/
|
|
56
|
+
export declare function safeServiceUrl(value: unknown): string | null;
|
|
57
|
+
/**
|
|
58
|
+
* `presentationMeta` → 卡片视图模型。
|
|
59
|
+
* @param meta 持久化的 meta(`unknown`:旧会话可能没有,或形状已变)
|
|
60
|
+
* @returns 可渲染模型;`null` 表示「没有可用 meta」,调用方应回退到纯文本内容
|
|
61
|
+
*/
|
|
62
|
+
export declare function projectServiceListMeta(meta: unknown): ServiceListViewModel | null;
|
|
63
|
+
/** 端口去重后的一行摘要片段(最多 6 个,避免撑爆行宽);语言无关 */
|
|
64
|
+
export declare function serviceListPorts(model: ServiceListViewModel): string;
|
|
65
|
+
/** 行是否可执行生命周期操作(与面板同一判定:受保护目标只读) */
|
|
66
|
+
export declare function canControlService(row: ServiceListRow): boolean;
|
|
67
|
+
/** 扫描接口返回的服务行(只取 pill 需要的字段) */
|
|
68
|
+
export interface ScanServiceLike {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
ownership: Ownership;
|
|
72
|
+
protected: boolean;
|
|
73
|
+
ports: string;
|
|
74
|
+
}
|
|
75
|
+
export interface SessionPillModel {
|
|
76
|
+
/** 本会话名下的服务数 */
|
|
77
|
+
count: number;
|
|
78
|
+
/** 去重后的端口片段(`:3000 :5173`,最多 4 个) */
|
|
79
|
+
ports: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 从一次扫描快照里挑出「属于本会话」的服务。
|
|
83
|
+
* 归属判定在宿主完成(scan 带 sessionId 时按台账 sessionKey 收窄),
|
|
84
|
+
* 这里只做防御式读取:坏行丢弃,未知归属不计数。
|
|
85
|
+
* @param services 扫描接口的 `data.services`(不可信:可能缺失/坏形状)
|
|
86
|
+
*/
|
|
87
|
+
export declare function selectSessionServices(services: unknown): ScanServiceLike[];
|
|
88
|
+
/**
|
|
89
|
+
* 本会话服务摘要;`count === 0` 时 pill 不渲染。
|
|
90
|
+
* @param services `selectSessionServices` 的结果
|
|
91
|
+
*/
|
|
92
|
+
export declare function summarizeSessionServices(services: readonly ScanServiceLike[]): SessionPillModel;
|
|
@@ -2,6 +2,13 @@ import type { LedgerEntry } from './types';
|
|
|
2
2
|
export declare const DEV_COMMAND_RE: RegExp;
|
|
3
3
|
export interface ToolExecLike {
|
|
4
4
|
name?: string;
|
|
5
|
+
/**
|
|
6
|
+
* DSH ≥ 0.2.0:`ToolExecution.arguments`(executor 已解析、lossless JSON 快照的参数)。
|
|
7
|
+
* 0.1.x 曾叫 `args`,0.2.0-rc.2 起改名为 `arguments`——读错字段会让台账恒空
|
|
8
|
+
* (「本次对话」归属与「重启」能力静默失效),因此两个名字都读,优先新名。
|
|
9
|
+
*/
|
|
10
|
+
arguments?: Record<string, unknown>;
|
|
11
|
+
/** @deprecated DSH 0.1.x 字段名,仅为跨版本兼容保留 */
|
|
5
12
|
args?: Record<string, unknown>;
|
|
6
13
|
agent?: {
|
|
7
14
|
id?: string;
|
|
@@ -5,8 +5,16 @@ export interface OwnershipResult {
|
|
|
5
5
|
evidence: string[];
|
|
6
6
|
ledgerEntry: LedgerEntry | null;
|
|
7
7
|
}
|
|
8
|
+
/** 归属判定的会话上下文(缺省时保持 0.7.x 的启发式行为) */
|
|
9
|
+
export interface OwnershipContext {
|
|
10
|
+
/**
|
|
11
|
+
* 当前会话 id。提供时,只有 `sessionKey` 相等的台账条目才能确认「本次对话」;
|
|
12
|
+
* 同一工作区里**另一个会话**起的服务最多降级为「工作区推断」。
|
|
13
|
+
*/
|
|
14
|
+
sessionId?: string | null;
|
|
15
|
+
}
|
|
8
16
|
export declare function classifyOwnership(proc: {
|
|
9
17
|
cwd: string | null;
|
|
10
18
|
command: string | null;
|
|
11
19
|
startedAt: number | null;
|
|
12
|
-
}, ledgers: LedgerEntry[], workspaces: WorkspaceLike[]): OwnershipResult;
|
|
20
|
+
}, ledgers: LedgerEntry[], workspaces: WorkspaceLike[], context?: OwnershipContext): OwnershipResult;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LedgerEntry, Snapshot, WorkspaceLike } from './types';
|
|
2
2
|
import { type CommandRunner } from './process-inspector';
|
|
3
|
+
import { type OwnershipContext } from './ownership';
|
|
3
4
|
import { type ProtectionGuard } from './protection';
|
|
4
|
-
export declare function buildSnapshot(ledgers: LedgerEntry[], workspaces: WorkspaceLike[], commandRunner?: CommandRunner, guard?: ProtectionGuard): Promise<Snapshot>;
|
|
5
|
+
export declare function buildSnapshot(ledgers: LedgerEntry[], workspaces: WorkspaceLike[], commandRunner?: CommandRunner, guard?: ProtectionGuard, context?: OwnershipContext): Promise<Snapshot>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { Snapshot } from './types';
|
|
2
2
|
export interface ServiceToolDeps {
|
|
3
|
-
/**
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* 与 API scan 路由同源的快照函数(含受保护判定 guard)。
|
|
5
|
+
* @param sessionId 调用方会话 id(`exec.agent.id`,rc.5 起就是 `SessionId`);
|
|
6
|
+
* 提供时「本次对话」归属按台账 sessionKey 收窄,避免同工作区另一会话的
|
|
7
|
+
* 启动记录被误判成本次对话。
|
|
8
|
+
*/
|
|
9
|
+
snapshot(sessionId?: string | null): Promise<Snapshot>;
|
|
5
10
|
}
|
|
6
11
|
export declare function buildServiceTool(deps: ServiceToolDeps): import("@deepseek-ai/dsh-tools").ToolDefinition;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Context } from 'cordis';
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
import type { WebServer } from '@deepseek-ai/dsh-host-webserver';
|
|
3
|
-
declare module 'cordis' {
|
|
3
|
+
declare module '@deepseek-ai/cordis' {
|
|
4
4
|
interface Context {
|
|
5
5
|
timer: {
|
|
6
6
|
timeout(callback: () => void, delay: number): () => void;
|
|
@@ -10,6 +10,22 @@ declare module 'cordis' {
|
|
|
10
10
|
webServer: WebServer;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
+
/** 一次请求的来源信息(handler 的第二个参数) */
|
|
14
|
+
export interface RequestInfo {
|
|
15
|
+
/** 调用方是否来自本机回环;变更类操作只允许 true。 */
|
|
16
|
+
loopback: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 调用方是否来自本机回环。
|
|
20
|
+
*
|
|
21
|
+
* rc.5 的 `dsh-host-webserver` 允许绑非 loopback 地址(容器 / Pod 场景),
|
|
22
|
+
* 此时同网段的任何客户端都能请求这些路由。停止/重启进程是**本机**操作,
|
|
23
|
+
* 变更类路由必须只接受回环来源,否则暴露 Web UI 就等于开放一个远程杀进程入口。
|
|
24
|
+
*
|
|
25
|
+
* 只信任 peer socket 地址(不读 `x-forwarded-for` 之类可伪造的请求头);
|
|
26
|
+
* 无法判定来源(例如同进程直调、Unix socket)时按本机处理,保持既有行为。
|
|
27
|
+
*/
|
|
28
|
+
export declare function isLoopbackCaller(remoteAddress: string | undefined | null): boolean;
|
|
13
29
|
declare const _default: {
|
|
14
30
|
inject: string[];
|
|
15
31
|
apply(ctx: Context): void;
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jiyr0119/dsh-service-console",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "DeepSeek Harness 本地开发服务控制台(原生插件):发现监听端口,识别服务归属,安全查看/停止/重启。Local development service console for DSH.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -32,18 +32,21 @@
|
|
|
32
32
|
"local-dev-server",
|
|
33
33
|
"port-manager"
|
|
34
34
|
],
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=24.9.0",
|
|
37
|
+
"dsh": ">=0.2.2-rc.5 <0.3.0"
|
|
38
|
+
},
|
|
35
39
|
"files": [
|
|
36
40
|
"lib",
|
|
37
|
-
"dsh.plugin.json",
|
|
38
41
|
"cordis.patch.yml",
|
|
39
|
-
"
|
|
42
|
+
"locale",
|
|
43
|
+
"icon.svg",
|
|
40
44
|
"docs",
|
|
41
45
|
"assets",
|
|
42
46
|
"demo",
|
|
43
47
|
"README.md",
|
|
44
48
|
"README.zh.md",
|
|
45
|
-
"LICENSE"
|
|
46
|
-
"manifest.json"
|
|
49
|
+
"LICENSE"
|
|
47
50
|
],
|
|
48
51
|
"dsh": {
|
|
49
52
|
"bundle": {
|
|
@@ -52,52 +55,50 @@
|
|
|
52
55
|
"client": {
|
|
53
56
|
"inject": [
|
|
54
57
|
"@deepseek-ai/dsh-client-locale",
|
|
55
|
-
"@deepseek-ai/dsh-client-ui-
|
|
56
|
-
"@deepseek-ai/dsh-client-ui-
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-layout",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-slots"
|
|
57
64
|
],
|
|
58
65
|
"platform": "web"
|
|
59
|
-
},
|
|
60
|
-
"plugin": {
|
|
61
|
-
"id": "dsh-service-console",
|
|
62
|
-
"kind": "dynamic-cordis-plugin",
|
|
63
|
-
"host": "dynamic/host.js",
|
|
64
|
-
"client": "dynamic/client.js",
|
|
65
|
-
"hostHandler": "scan",
|
|
66
|
-
"clientSlots": [
|
|
67
|
-
"conversation.session.header.utilities",
|
|
68
|
-
"shell.overlay",
|
|
69
|
-
"settings.section"
|
|
70
|
-
]
|
|
71
66
|
}
|
|
72
67
|
},
|
|
73
68
|
"scripts": {
|
|
74
69
|
"build": "tsdown && tsc -p tsconfig.build.json",
|
|
75
70
|
"prepublishOnly": "npm run build",
|
|
76
71
|
"typecheck": "tsc --noEmit",
|
|
77
|
-
"test": "npm run build && node --test test/*.test.mjs"
|
|
72
|
+
"test": "npm run build && node --test test/*.test.mjs",
|
|
73
|
+
"smoke:gui": "npm run build && node scripts/gui-smoke.mjs"
|
|
78
74
|
},
|
|
79
75
|
"devDependencies": {
|
|
80
|
-
"@deepseek-ai/cordis": "~4.0
|
|
81
|
-
"@deepseek-ai/dsh-client-locale": "^0.2.
|
|
82
|
-
"@deepseek-ai/dsh-client-ui-
|
|
83
|
-
"@deepseek-ai/dsh-client-ui-
|
|
84
|
-
"@deepseek-ai/dsh-client-ui-
|
|
85
|
-
"@deepseek-ai/dsh-client-ui-
|
|
86
|
-
"@deepseek-ai/dsh-client-ui-
|
|
87
|
-
"@deepseek-ai/dsh-client-ui-
|
|
88
|
-
"@deepseek-ai/dsh-
|
|
89
|
-
"@deepseek-ai/dsh-
|
|
90
|
-
"@
|
|
76
|
+
"@deepseek-ai/cordis": "~4.1.0",
|
|
77
|
+
"@deepseek-ai/dsh-client-locale": "^0.2.2-rc.5",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-chat": "0.2.2-rc.5",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.2-rc.5",
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-dockkit": "0.2.2-rc.5",
|
|
81
|
+
"@deepseek-ai/dsh-client-ui-layout": "^0.2.2-rc.5",
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.2.2-rc.5",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.5",
|
|
84
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.5",
|
|
85
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.2-rc.5",
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.5",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-tool": "0.2.2-rc.5",
|
|
88
|
+
"@deepseek-ai/dsh-host-webserver": "^0.2.2-rc.5",
|
|
89
|
+
"@deepseek-ai/dsh-tools": "^0.2.2-rc.5",
|
|
90
|
+
"@types/node": "^24.9.0",
|
|
91
91
|
"@types/react": "^18.3.1",
|
|
92
|
-
"cordis": "^4.0.0-rc.7",
|
|
93
92
|
"lightningcss": "^1.33.0",
|
|
93
|
+
"playwright": "^1.65.1",
|
|
94
94
|
"react": "^18.2.0",
|
|
95
95
|
"react-dom": "^18.2.0",
|
|
96
96
|
"tsdown": "^0.22.14",
|
|
97
97
|
"typescript": "^5.6.0"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
|
-
"@deepseek-ai/cordis": "~4.0
|
|
100
|
+
"@deepseek-ai/cordis": "~4.1.0",
|
|
101
|
+
"@deepseek-ai/dsh-tools": "^0.2.2-rc.5",
|
|
101
102
|
"react": "^18.2.0"
|
|
102
103
|
}
|
|
103
104
|
}
|
package/dsh.plugin.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "dsh-external/dsh-service-console",
|
|
3
|
-
"version": "0.7.2",
|
|
4
|
-
"main": "./lib/index.js",
|
|
5
|
-
"description": "本地开发服务控制台:发现监听端口,识别服务归属,安全查看/停止/重启。Local development service console for DSH.",
|
|
6
|
-
"engines": {
|
|
7
|
-
"dsh": ">=0.2.0-rc.2"
|
|
8
|
-
},
|
|
9
|
-
"contributes": {
|
|
10
|
-
"tools": [],
|
|
11
|
-
"skills": []
|
|
12
|
-
},
|
|
13
|
-
"client": {
|
|
14
|
-
"main": "./lib/client.js"
|
|
15
|
-
}
|
|
16
|
-
}
|