dsh-aperture 0.3.1 → 0.3.2

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 (51) hide show
  1. package/README.en.md +8 -7
  2. package/README.md +8 -7
  3. package/lib/client.js +1463 -0
  4. package/lib/client.js.map +1 -0
  5. package/lib/index.js +2084 -131
  6. package/lib/{aperture.d.ts → types/aperture.d.ts} +12 -10
  7. package/lib/types/catalog.d.ts +25 -0
  8. package/lib/types/config.d.ts +204 -0
  9. package/lib/types/index.d.ts +37 -0
  10. package/lib/{metadata → types/metadata}/extract.d.ts +15 -24
  11. package/lib/types/metadata/modelsdev.d.ts +40 -0
  12. package/lib/{metadata → types/metadata}/utils.d.ts +2 -0
  13. package/lib/types/panel.d.ts +71 -0
  14. package/lib/types/profile.d.ts +55 -0
  15. package/lib/types/registry.d.ts +31 -0
  16. package/lib/{relay.d.ts → types/relay.d.ts} +2 -0
  17. package/lib/types/remote.d.ts +54 -0
  18. package/lib/types/report.d.ts +115 -0
  19. package/lib/types/runtime.d.ts +87 -0
  20. package/lib/{sync.d.ts → types/sync.d.ts} +12 -23
  21. package/lib/types/types.d.ts +118 -0
  22. package/lib/{url.d.ts → types/url.d.ts} +5 -3
  23. package/package.json +32 -13
  24. package/client/aperture.js +0 -1566
  25. package/lib/aperture.js +0 -107
  26. package/lib/catalog.d.ts +0 -35
  27. package/lib/catalog.js +0 -74
  28. package/lib/config.d.ts +0 -214
  29. package/lib/config.js +0 -168
  30. package/lib/index.d.ts +0 -70
  31. package/lib/metadata/extract.js +0 -217
  32. package/lib/metadata/modelsdev.d.ts +0 -53
  33. package/lib/metadata/modelsdev.js +0 -302
  34. package/lib/metadata/utils.js +0 -86
  35. package/lib/panel.d.ts +0 -86
  36. package/lib/panel.js +0 -263
  37. package/lib/profile.d.ts +0 -62
  38. package/lib/profile.js +0 -158
  39. package/lib/registry.d.ts +0 -48
  40. package/lib/registry.js +0 -234
  41. package/lib/relay.js +0 -63
  42. package/lib/remote.d.ts +0 -64
  43. package/lib/remote.js +0 -96
  44. package/lib/report.d.ts +0 -123
  45. package/lib/report.js +0 -109
  46. package/lib/runtime.d.ts +0 -97
  47. package/lib/runtime.js +0 -194
  48. package/lib/sync.js +0 -176
  49. package/lib/types.d.ts +0 -116
  50. package/lib/types.js +0 -10
  51. package/lib/url.js +0 -67
@@ -0,0 +1,115 @@
1
+ import { FactSource, Modality } from "./types.js";
2
+ import { ResolvedConfig } from "./config.js";
3
+ import { RefreshOutcome } from "./runtime.js";
4
+ //#region src/report.d.ts
5
+ /** 报告里的一个模型。 */
6
+ export interface PanelModel {
7
+ /** Aperture 接受的模型 id。 */
8
+ readonly id: string;
9
+ /** 显示名(可能来自清单或覆盖)。 */
10
+ readonly name: string;
11
+ /** 承载它的路由键;没有任何路由能服务时缺失。 */
12
+ readonly route?: string;
13
+ /** 网关通告的协议;未通告时缺失。 */
14
+ readonly protocol?: string;
15
+ /** 网关为该模型通告的每一个端点,用于诊断。 */
16
+ readonly endpoints: readonly string[];
17
+ /** 生效的上下文容量,以 token 计。 */
18
+ readonly contextWindow?: number;
19
+ /** 生效的最大输出,以 token 计。 */
20
+ readonly maxTokens?: number;
21
+ /** 生效的请求模态。 */
22
+ readonly input: readonly Modality[];
23
+ /** 生效的推理能力。 */
24
+ readonly reasoning: boolean;
25
+ /** 每项事实的来源;界面按语言渲染它。 */
26
+ readonly provenance: {
27
+ readonly limits: FactSource;
28
+ readonly reasoning: FactSource;
29
+ readonly input: FactSource;
30
+ readonly name: FactSource;
31
+ };
32
+ /**
33
+ * 用户层里这一行自己写下的键(含界面不编辑的,例如 `reasoningEfforts`;别名写成 `alias`)。
34
+ *
35
+ * 这是「覆盖」的唯一判据,且只能从用户层读——官方也是这么定义的:看字段在不在用户层里,
36
+ * 而不是拿值与默认值比。解析后的配置用不得:schema 会把没写的数组字段补成 `[]`,界面就会
37
+ * 在一行什么都没写过的模型上挂一颗永远撤不掉的「已覆盖」。
38
+ */
39
+ readonly overrideKeys?: readonly string[];
40
+ /** 用户写下的清单别名(`aperture.modelAliases` 里对应那一项)。 */
41
+ readonly alias?: string;
42
+ }
43
+ /** 报告里的一条已发布路由。 */
44
+ export interface PanelRoute {
45
+ /** provider 路由键。 */
46
+ readonly provider: string;
47
+ /** 服务它的协议;本插件自己拼的方案里一定有,类型上仍是可选(`PiAiProviderProfile`)。 */
48
+ readonly api?: string;
49
+ /** 路由的 baseURL,同上。 */
50
+ readonly baseURL?: string;
51
+ /** 该路由承载的模型数。 */
52
+ readonly models: number;
53
+ }
54
+ /** 最近一次刷新做了什么。 */
55
+ export interface PanelRefresh {
56
+ /** 触发来源。 */
57
+ readonly trigger: string;
58
+ /** ISO 时间戳;界面按本地时区渲染。 */
59
+ readonly at: string;
60
+ /** 耗时。 */
61
+ readonly durationMs: number;
62
+ /** 发现与发布是否都成功。 */
63
+ readonly ok: boolean;
64
+ /** 失败原因。 */
65
+ readonly error?: string;
66
+ /** 清单提供了什么。 */
67
+ readonly catalog: {
68
+ /** 清单是否可用。 */
69
+ readonly available: boolean;
70
+ /** 条目数。 */
71
+ readonly entries: number;
72
+ /** 清单不可用时的原因。 */
73
+ readonly reason?: string;
74
+ };
75
+ /** 应答的端点与它列出的行数。 */
76
+ readonly endpoint?: {
77
+ readonly url: string;
78
+ readonly listed: number;
79
+ };
80
+ /** 设置写入的结果。 */
81
+ readonly sync?: {
82
+ readonly applied: boolean;
83
+ readonly ops: number;
84
+ readonly routes: readonly string[];
85
+ readonly reason?: string;
86
+ };
87
+ }
88
+ /** 配置页要显示的整份报告。 */
89
+ export interface PanelReport {
90
+ /** 实例地址(已归一化);没有配置时为空串,措辞交给界面。 */
91
+ readonly place: string;
92
+ /** 最近一次刷新;还一次都没跑过时为缺失。 */
93
+ readonly refresh?: PanelRefresh;
94
+ /** 已发布的路由。 */
95
+ readonly routes: readonly PanelRoute[];
96
+ /** 逐模型清单:先是各条路由承载的模型,最后是没有任何路由的模型。 */
97
+ readonly models: readonly PanelModel[];
98
+ }
99
+ /** 用户层里写下的东西:报告要照着它说「哪些是这一行自己写的」。 */
100
+ export interface DeclaredOverrides {
101
+ /** 用户层 `aperture.models` 的原样条目。 */
102
+ readonly models?: readonly Record<string, unknown>[];
103
+ /** 用户层 `aperture.modelAliases` 里写过的模型 id。 */
104
+ readonly aliasIds?: readonly string[];
105
+ }
106
+ /**
107
+ * 组装报告。
108
+ *
109
+ * @param outcome - 最近一次刷新;一次都没完成过时传 `undefined`。
110
+ * @param config - 当前生效配置。
111
+ * @param declared - 用户层里写下的覆盖;缺省即「什么都没写过」。
112
+ * @returns 报告。
113
+ */
114
+ export declare function buildReport(outcome: RefreshOutcome | undefined, config: ResolvedConfig, declared?: DeclaredOverrides): PanelReport;
115
+ //#endregion
@@ -0,0 +1,87 @@
1
+ import { DiscoveredModel } from "./types.js";
2
+ import { CatalogLoad, ModelCatalog } from "./catalog.js";
3
+ import { ResolvedConfig } from "./config.js";
4
+ import { RoutePlan } from "./profile.js";
5
+ import { SyncOutcome } from "./sync.js";
6
+ import { SettingsForms } from "@deepseek-ai/dsh-settings";
7
+ //#region src/runtime.d.ts
8
+ /** 运行时用来输出诊断信息的最小日志接口。 */
9
+ export interface RuntimeLogger {
10
+ error(message: string, ...rest: unknown[]): void;
11
+ info(message: string, ...rest: unknown[]): void;
12
+ warn(message: string, ...rest: unknown[]): void;
13
+ debug(message: string, ...rest: unknown[]): void;
14
+ }
15
+ /** 一次已完成的刷新。 */
16
+ export interface RefreshOutcome {
17
+ /** 触发这次刷新的来源。 */
18
+ readonly trigger: string;
19
+ /** 发现与发布是否都成功。 */
20
+ readonly ok: boolean;
21
+ /** 完成时间。 */
22
+ readonly at: Date;
23
+ /** 耗时。 */
24
+ readonly durationMs: number;
25
+ /** 应答的 URL(如果有)。 */
26
+ readonly endpoint?: string;
27
+ /** 网关列出的模型行数。 */
28
+ readonly listed: number;
29
+ /** 全部归一化后的模型。 */
30
+ readonly models: readonly DiscoveredModel[];
31
+ /** 该方案发布的路由。 */
32
+ readonly routes: readonly RoutePlan[];
33
+ /** 没有任何路由能服务的模型。 */
34
+ readonly unserved: readonly DiscoveredModel[];
35
+ /** 清单提供的内容。 */
36
+ readonly catalog: CatalogLoad;
37
+ /** 设置写入的结果(如果尝试过写入)。 */
38
+ readonly sync?: SyncOutcome;
39
+ /** 刷新失败时的错误。 */
40
+ readonly error?: string;
41
+ }
42
+ /** 运行时从宿主读取的全部内容。 */
43
+ export interface RuntimeDeps {
44
+ /** 当前生效的配置,每次刷新都会重新读取。 */
45
+ readonly config: () => ResolvedConfig;
46
+ /** 设置服务;插件把它声明为必需注入。 */
47
+ readonly settings: SettingsForms;
48
+ /** 具名 logger。 */
49
+ readonly logger: RuntimeLogger;
50
+ /** models.dev 缓存,在各次刷新之间共享。 */
51
+ readonly catalog: ModelCatalog;
52
+ }
53
+ /** 单飞(single-flight)的发现与发布。 */
54
+ export declare class ApertureRuntime {
55
+ private readonly deps;
56
+ private running;
57
+ /** 正在跑的那一轮读的是哪一份配置;用来判断排队者该并进它还是排到它后面。 */
58
+ private runningConfig;
59
+ private latest;
60
+ /**
61
+ * @param deps - 宿主服务与配置活引用(thunk)。
62
+ */
63
+ constructor(deps: RuntimeDeps);
64
+ /** 最近一次已完成的刷新(如果完成过)。 */
65
+ last(): RefreshOutcome | undefined;
66
+ /**
67
+ * 刷新;已有刷新在运行时,等它收尾之后再决定是并进新的一轮,还是自己起一轮。
68
+ *
69
+ * 承诺是「返回的那一轮读的是**此刻**的配置」:正在跑的那一轮若读的就是此刻这份配置,
70
+ * 调用方并进它;否则等它收尾再重问一次。设置界面刚写完配置就来重读报告时,等的必须是
71
+ * 读过新配置的那一轮——等正在跑的那一轮回来等于拿回过期报告,界面于是「保存了却没变」。
72
+ * 配置身份可以直接比:设置服务每次提交都换一份深冻结的解析结果,没变就还是同一个对象。
73
+ *
74
+ * @param trigger - 触发来源;出现在配置页的状态段里。
75
+ * @returns 本次调用所参与的那一轮刷新的结果。
76
+ */
77
+ refresh(trigger: string): Promise<RefreshOutcome>;
78
+ /** 执行一次刷新,绝不抛出异常。 */
79
+ private run;
80
+ /** 一次刷新的主体。 */
81
+ private execute;
82
+ /** 写入方案,或说明为什么没有写入任何内容。 */
83
+ private publish;
84
+ }
85
+ /** 把未知的可抛出对象渲染为单行原因。 */
86
+ export declare function message(error: unknown): string;
87
+ //#endregion
@@ -1,30 +1,18 @@
1
- /**
2
- * 写入阶段:把方案发布到 `llm-pi-ai` 配置段。
3
- *
4
- * 该配置段属于另一个插件(`@deepseek-ai/dsh-llm-pi-ai`),而设置接缝不做归属检查,因此
5
- * 写入它是被允许的,也是被认可的机制而非变通:宿主把 pi-ai 适配器组合为休眠状态,并声明
6
- * 「哪些 provider 运行由用户的设置文档决定」。
7
- *
8
- * 三条性质使这一写入可以安全重复:没有变化时是空操作(比较对象是**已解析的**配置段,因此
9
- * 部署自身的组合层不算漂移);只写入本插件拥有的路由键,且用路径寻址的 op,配置段里其他
10
- * provider 原样保留;绝不在发现失败后运行——瞬时网络错误下删除可用模型比什么都不做更糟。
11
- *
12
- * @module dsh-aperture/sync
13
- */
14
- import type { SettingsForms, SettingsPathOp } from '@deepseek-ai/dsh-settings';
15
- import type { RoutePlan } from './profile.ts';
1
+ import { RoutePlan } from "./profile.js";
2
+ import { SettingsForms, SettingsPathOp } from "@deepseek-ai/dsh-settings";
3
+ //#region src/sync.d.ts
16
4
  /** pi-ai 适配器注册的设置命名空间,也是本插件写入的那一个。 */
17
5
  export declare const PI_AI_NAMESPACE = "llm-pi-ai";
18
6
  /** 一次发布尝试的结果。 */
19
7
  export interface SyncOutcome {
20
- /** 是否发出了写入。 */
21
- readonly applied: boolean;
22
- /** 该写入携带的路径 op 数量。 */
23
- readonly ops: number;
24
- /** 方案发布的路由键。 */
25
- readonly routes: readonly string[];
26
- /** 未写入任何内容时,说明原因。 */
27
- readonly reason?: string;
8
+ /** 是否发出了写入。 */
9
+ readonly applied: boolean;
10
+ /** 该写入携带的路径 op 数量。 */
11
+ readonly ops: number;
12
+ /** 方案发布的路由键。 */
13
+ readonly routes: readonly string[];
14
+ /** 未写入任何内容时,说明原因。 */
15
+ readonly reason?: string;
28
16
  }
29
17
  /**
30
18
  * 计算使某个配置段与方案一致的路径 op。
@@ -56,3 +44,4 @@ export declare function applySync(settings: SettingsForms, routes: readonly Rout
56
44
  * @returns 两者是否结构相等。
57
45
  */
58
46
  export declare function deepEqualJson(left: unknown, right: unknown): boolean;
47
+ //#endregion
@@ -0,0 +1,118 @@
1
+ //#region src/types.d.ts
2
+ /**
3
+ * Aperture 发现流水线的共享词汇表。
4
+ *
5
+ * 该流水线是一条纯函数链——端点响应进,provider profile 出——因此每个阶段都在这里
6
+ * 命名自己的类型,而不去碰 Cordis 或设置的接缝:只有 `src/index.ts` 和 `src/sync.ts`
7
+ * 会接触服务。
8
+ *
9
+ * @module dsh-aperture/types
10
+ */
11
+ /** 一个已发现模型可以声明的一种请求模态。 */
12
+ export type Modality = 'text' | 'image';
13
+ /**
14
+ * 本插件发布的协议格式。三者都由已安装的 `dsh-llm-pi-ai` 适配器服务,这就是发现
15
+ * 过程从不转换载荷的原因:它只决定每个模型在网关的哪些端点上应答。
16
+ */
17
+ export type ApertureProtocol = 'openai-completions' | 'openai-responses' | 'anthropic-messages';
18
+ /** 一项已归一化的事实的来源,用于报告中的诊断。 */
19
+ export type FactSource = 'aperture' | 'models.dev' | 'config' | 'default';
20
+ /** 已发现模型携带的每个值的来源。 */
21
+ export interface ModelProvenance {
22
+ /** `contextWindow` 与 `maxTokens` 的来源。 */
23
+ readonly limits: FactSource;
24
+ /** `reasoning` 的来源。 */
25
+ readonly reasoning: FactSource;
26
+ /** `input` 的来源。 */
27
+ readonly input: FactSource;
28
+ /** `name` 的来源。 */
29
+ readonly name: FactSource;
30
+ }
31
+ /** 经过归一化、补全与配置合并后的一个模型。 */
32
+ export interface DiscoveredModel {
33
+ /** Aperture 接受的模型 id。 */
34
+ readonly id: string;
35
+ /** 供选择器使用的显示名。 */
36
+ readonly name: string;
37
+ /**
38
+ * 模型可访问所用的协议,由网关的 `supported_endpoints` 推导得出。网关没有提供
39
+ * 本插件可服务的端点时缺失。
40
+ */
41
+ readonly protocol?: ApertureProtocol;
42
+ /** 网关为该模型通告的每一个端点,用于诊断。 */
43
+ readonly endpoints: readonly string[];
44
+ /** 请求与响应合计的最大上下文长度,以 token 计。 */
45
+ readonly contextWindow?: number;
46
+ /** 最大输出 token 数。 */
47
+ readonly maxTokens?: number;
48
+ /** 为该模型声明的请求模态。 */
49
+ readonly input: readonly Modality[];
50
+ /** 该模型是否接受推理档位控制。 */
51
+ readonly reasoning: boolean;
52
+ /** 网关上报的上游 provider id,在上报时提供。 */
53
+ readonly provider?: string;
54
+ /** 每项事实的来源。 */
55
+ readonly provenance: ModelProvenance;
56
+ }
57
+ /**
58
+ * 插件 `models` 配置列表中的一条条目。
59
+ *
60
+ * id 也被端点通告的条目只覆盖它声明的字段;命名未知 id 的条目会作为额外模型加入,
61
+ * 网关少报时正是靠这一点保持可用。
62
+ */
63
+ export interface ConfiguredModel {
64
+ /** 模型 id;与端点通告的 id 匹配,或新增一个。 */
65
+ readonly id: string;
66
+ /** 显示名。 */
67
+ readonly name?: string;
68
+ /** 协议覆盖;也是服务 Aperture 只在未服务端点上通告的模型的唯一方式。 */
69
+ readonly api?: string;
70
+ /** 上下文容量,以 token 计。 */
71
+ readonly contextWindow?: number;
72
+ /** 输出容量,以 token 计。 */
73
+ readonly maxTokens?: number;
74
+ /** 请求模态。 */
75
+ readonly input?: readonly Modality[];
76
+ /** 强制打开(`true`)或关闭(`false`)推理能力。 */
77
+ readonly thinking?: boolean;
78
+ /** 显式可选的推理档位:key = 档位,value = 协议格式中的写法。 */
79
+ readonly reasoningEfforts?: Readonly<Record<string, string | null>>;
80
+ }
81
+ /** 流水线把一个网关变成 provider profile 所需的全部内容。 */
82
+ export interface BuildOptions {
83
+ /** 配置的覆盖项与额外项。 */
84
+ readonly models: readonly ConfiguredModel[];
85
+ /** 非空时把清单限制为这些 id。 */
86
+ readonly enabledModelIds: readonly string[];
87
+ /**
88
+ * 网关模型 id → 清单模型 id,在两者不一致时使用。
89
+ *
90
+ * 网关会改名:这个网关把 DeepSeek 的 flash 模型服务为 `deepseek-flash`,把 Kimi
91
+ * 的服务为 `k3`,任何评分规则都无法在不猜测的情况下弥合这一差异。
92
+ */
93
+ readonly modelAliases: Readonly<Record<string, string>>;
94
+ /** 是否采纳 models.dev 的输入模态(图像)。 */
95
+ readonly images: 'ignore' | 'metadata';
96
+ /** `auto` 映射推理能力;`off` 把每个模型都声明为非推理。 */
97
+ readonly reasoning: 'auto' | 'off';
98
+ }
99
+ /** 一次清单查找可以为模型贡献的元数据。 */
100
+ export interface CatalogMetadata {
101
+ /** 上下文容量,以 token 计。 */
102
+ readonly contextWindow?: number;
103
+ /** 输出容量,以 token 计。 */
104
+ readonly maxTokens?: number;
105
+ /** 该模型是否接受推理档位控制。 */
106
+ readonly reasoning?: boolean;
107
+ /** 请求模态。 */
108
+ readonly input?: readonly Modality[];
109
+ /** 人类可读的名称。 */
110
+ readonly name?: string;
111
+ }
112
+ /** 为一个端点通告的模型查找清单元数据。 */
113
+ export type CatalogLookup = (model: {
114
+ readonly id: string;
115
+ readonly provider?: string;
116
+ readonly providerName?: string;
117
+ }) => CatalogMetadata | undefined;
118
+ //#endregion
@@ -1,3 +1,4 @@
1
+ //#region src/url.d.ts
1
2
  /**
2
3
  * 单个 Aperture 实例的 URL 归一化。
3
4
  *
@@ -27,11 +28,12 @@ export declare function buildModelsEndpoint(instanceRoot: string): string;
27
28
  /**
28
29
  * 某种协议下,一条 pi-ai 路由必须携带的 `baseURL`。
29
30
  *
30
- * `openai-completions` 会在路由的 `baseURL` 后面追加 `/chat/completions`,所以它
31
- * 拿到的是带 `/v1` 的根地址;`anthropic-messages` 走 provider SDK,SDK 自己会追加
31
+ * 两种 OpenAI 协议会在路由的 `baseURL` 后面追加各自端点,所以它们拿到的是带 `/v1`
32
+ * 的根地址;`anthropic-messages` 走 provider SDK,SDK 自己会追加
32
33
  * `/v1/messages`,所以它拿到的是裸的实例根地址。
33
34
  * @param instanceRoot - 归一化后的实例根地址。
34
35
  * @param protocol - 该路由的协议格式。
35
36
  * @returns 该路由的 `baseURL`。
36
37
  */
37
- export declare function buildRouteBaseUrl(instanceRoot: string, protocol: 'openai-completions' | 'anthropic-messages'): string;
38
+ export declare function buildRouteBaseUrl(instanceRoot: string, protocol: 'openai-completions' | 'openai-responses' | 'anthropic-messages'): string;
39
+ //#endregion
package/package.json CHANGED
@@ -1,24 +1,23 @@
1
1
  {
2
2
  "name": "dsh-aperture",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "自动发现 Aperture 网关上的模型,并加进 DSH 的模型选择器。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
- "types": "lib/index.d.ts",
7
+ "types": "lib/types/index.d.ts",
8
8
  "icon": "./icon.svg",
9
9
  "exports": {
10
10
  ".": {
11
- "types": "./lib/index.d.ts",
11
+ "types": "./lib/types/index.d.ts",
12
12
  "default": "./lib/index.js"
13
13
  },
14
- "./client": "./client/aperture.js",
14
+ "./client": "./lib/client.js",
15
15
  "./locale/*.json": "./locale/*.json",
16
16
  "./package.json": "./package.json",
17
17
  "./cordis.patch.yml": "./cordis.patch.yml"
18
18
  },
19
19
  "files": [
20
20
  "lib",
21
- "client",
22
21
  "locale/*.json",
23
22
  "icon.svg",
24
23
  "cordis.patch.yml",
@@ -27,11 +26,17 @@
27
26
  "LICENSE"
28
27
  ],
29
28
  "scripts": {
30
- "build": "tsc -p tsconfig.json",
31
- "prepare": "tsc -p tsconfig.json",
32
- "typecheck": "tsc -p tsconfig.test.json && node --check client/aperture.js",
33
- "test": "node --test --test-isolation=none \"test/**/*.test.ts\"",
34
- "test:live": "node --test --test-isolation=none test/live.test.ts",
29
+ "prebuild": "node -e \"require('node:fs').rmSync('lib', { recursive: true, force: true })\"",
30
+ "build": "tsdown --concurrency 1",
31
+ "build:host": "tsdown --filter dsh-aperture/host && tsdown --filter dsh-aperture/types",
32
+ "build:client": "tsdown --filter dsh-aperture/client",
33
+ "watch": "tsdown --watch --concurrency 1",
34
+ "watch:client": "tsdown --filter dsh-aperture/client --watch",
35
+ "prepare": "npm run build",
36
+ "typecheck": "tsc -p tsconfig.test.json && tsc -p tsconfig.client.json",
37
+ "pretest": "npm run build:client",
38
+ "test": "node --test \"test/**/*.test.ts\"",
39
+ "test:live": "node --test test/live.test.ts",
35
40
  "inspect": "node scripts/inspect-live.mjs"
36
41
  },
37
42
  "keywords": [
@@ -50,7 +55,8 @@
50
55
  "url": "git+https://github.com/he0119/dsh-aperture.git"
51
56
  },
52
57
  "engines": {
53
- "node": ">=24.0.0"
58
+ "node": "^22.19.0 || >=24.0.0",
59
+ "dsh": "^0.1.7-rc.1"
54
60
  },
55
61
  "dsh": {
56
62
  "bundle": {
@@ -59,10 +65,12 @@
59
65
  "client": {
60
66
  "platform": "web",
61
67
  "inject": [
68
+ "@deepseek-ai/dsh-api-remotes",
62
69
  "@deepseek-ai/dsh-client-locale",
70
+ "@deepseek-ai/dsh-client-ui-plugin-manager",
63
71
  "@deepseek-ai/dsh-client-ui-primitives",
64
- "@deepseek-ai/dsh-client-ui-settings",
65
- "@deepseek-ai/dsh-client-ui-plugin-manager"
72
+ "@deepseek-ai/dsh-client-ui-renderer",
73
+ "@deepseek-ai/dsh-client-ui-settings"
66
74
  ]
67
75
  }
68
76
  },
@@ -76,7 +84,16 @@
76
84
  "devDependencies": {
77
85
  "@deepseek-ai/cordis": "4.0.4",
78
86
  "@deepseek-ai/cordis-plugin-loader": "1.0.5",
87
+ "@deepseek-ai/dsh-api-gateway": "0.1.7-rc.1",
88
+ "@deepseek-ai/dsh-api-remotes": "0.1.7-rc.1",
79
89
  "@deepseek-ai/dsh-app-boot": "0.1.7-rc.1",
90
+ "@deepseek-ai/dsh-client-locale": "0.1.7-rc.1",
91
+ "@deepseek-ai/dsh-client-store": "0.1.7-rc.1",
92
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.1.7-rc.1",
93
+ "@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.1",
94
+ "@deepseek-ai/dsh-client-ui-renderer": "0.1.7-rc.1",
95
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.1",
96
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.1",
80
97
  "@deepseek-ai/dsh-config-editor": "0.1.7-rc.1",
81
98
  "@deepseek-ai/dsh-llm": "0.1.7-rc.1",
82
99
  "@deepseek-ai/dsh-llm-pi-ai": "0.1.7-rc.1",
@@ -85,6 +102,8 @@
85
102
  "@deepseek-ai/dsh-typert-registry": "0.1.7-rc.1",
86
103
  "@deepseek-ai/schemastery": "3.18.4",
87
104
  "@types/node": "^22.20.0",
105
+ "@types/react": "^18.3.12",
106
+ "tsdown": "^0.23.0",
88
107
  "typescript": "^5.9.0"
89
108
  }
90
109
  }