dsh-aperture 0.3.3 → 0.4.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.en.md +69 -46
- package/README.md +66 -43
- package/lib/client.js +481 -273
- package/lib/client.js.map +1 -1
- package/lib/index.js +1373 -342
- package/lib/types/adapter/context.d.ts +24 -0
- package/lib/types/adapter/index.d.ts +52 -0
- package/lib/types/adapter/replay.d.ts +66 -0
- package/lib/types/adapter/route.d.ts +45 -0
- package/lib/types/adapter/stream.d.ts +24 -0
- package/lib/types/config.d.ts +44 -32
- package/lib/types/index.d.ts +14 -13
- package/lib/types/panel.d.ts +1 -1
- package/lib/types/plan.d.ts +95 -0
- package/lib/types/provider.d.ts +84 -0
- package/lib/types/report.d.ts +11 -11
- package/lib/types/routes.d.ts +35 -0
- package/lib/types/runtime.d.ts +23 -6
- package/lib/types/types.d.ts +15 -5
- package/package.json +15 -2
- package/lib/types/profile.d.ts +0 -55
- package/lib/types/sync.d.ts +0 -47
package/lib/types/report.d.ts
CHANGED
|
@@ -40,13 +40,13 @@ export interface PanelModel {
|
|
|
40
40
|
/** 用户写下的清单别名(`aperture.modelAliases` 里对应那一项)。 */
|
|
41
41
|
readonly alias?: string;
|
|
42
42
|
}
|
|
43
|
-
/**
|
|
43
|
+
/** 报告里的一条已注册路由。 */
|
|
44
44
|
export interface PanelRoute {
|
|
45
|
-
/** provider
|
|
46
|
-
readonly
|
|
47
|
-
/**
|
|
48
|
-
readonly
|
|
49
|
-
/**
|
|
45
|
+
/** provider 路由键,例如 `aperture-openai-chat-completions`。 */
|
|
46
|
+
readonly id: string;
|
|
47
|
+
/** 服务它的线缆协议。 */
|
|
48
|
+
readonly protocol?: string;
|
|
49
|
+
/** 该协议下所有模型的基点地址。 */
|
|
50
50
|
readonly baseURL?: string;
|
|
51
51
|
/** 该路由承载的模型数。 */
|
|
52
52
|
readonly models: number;
|
|
@@ -77,11 +77,11 @@ export interface PanelRefresh {
|
|
|
77
77
|
readonly url: string;
|
|
78
78
|
readonly listed: number;
|
|
79
79
|
};
|
|
80
|
-
/**
|
|
81
|
-
readonly
|
|
82
|
-
|
|
83
|
-
readonly ops: number;
|
|
80
|
+
/** 路由注册的结果。 */
|
|
81
|
+
readonly publish?: {
|
|
82
|
+
/** 这一轮真正注册出去的路由键。 */
|
|
84
83
|
readonly routes: readonly string[];
|
|
84
|
+
/** 未能注册时的原因与要手工做的事。 */
|
|
85
85
|
readonly reason?: string;
|
|
86
86
|
};
|
|
87
87
|
}
|
|
@@ -91,7 +91,7 @@ export interface PanelReport {
|
|
|
91
91
|
readonly place: string;
|
|
92
92
|
/** 最近一次刷新;还一次都没跑过时为缺失。 */
|
|
93
93
|
readonly refresh?: PanelRefresh;
|
|
94
|
-
/**
|
|
94
|
+
/** 已注册的路由。 */
|
|
95
95
|
readonly routes: readonly PanelRoute[];
|
|
96
96
|
/** 逐模型清单:先是各条路由承载的模型,最后是没有任何路由的模型。 */
|
|
97
97
|
readonly models: readonly PanelModel[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ApertureProtocol } from "./types.js";
|
|
2
|
+
//#region src/routes.d.ts
|
|
3
|
+
/** 一条路由的固定词汇:它承载的协议,以及显示名括号里那个协议名。 */
|
|
4
|
+
interface RouteVocabulary {
|
|
5
|
+
/** 这条路由的线缆协议,也是 `models[].protocol` 与报告里的取值。 */
|
|
6
|
+
readonly protocol: ApertureProtocol;
|
|
7
|
+
/**
|
|
8
|
+
* 显示名括号里的协议名,也是路由键后缀的来源。
|
|
9
|
+
*
|
|
10
|
+
* 逐字取官方「模型」页给这三个协议的产品名:那一页用产品名显示协议、存 schema 标识符
|
|
11
|
+
* (`protocolOpenAiCompletions` → `openai-completions`),本插件跟着它写,用户在两个页面上看到
|
|
12
|
+
* 的就是同一套词——`OpenAI Chat Completions` 而不是只写 `Chat Completions`,厂牌与协议一起写
|
|
13
|
+
* 出来,这三条路由的名字才成套。
|
|
14
|
+
*/
|
|
15
|
+
readonly label: string;
|
|
16
|
+
}
|
|
17
|
+
/** 一条解析好的路由:协议、显示名与注册键。 */
|
|
18
|
+
export interface ResolvedRoute extends RouteVocabulary {
|
|
19
|
+
/** 注册给 dsh 的 provider 路由键,例如 `aperture-openai-chat-completions`。 */
|
|
20
|
+
readonly id: string;
|
|
21
|
+
/** 选择器与官方「模型」页上显示的名字,例如 `Aperture (OpenAI Chat Completions)`。 */
|
|
22
|
+
readonly displayName: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 由前缀解析出这一代的三条路由。
|
|
26
|
+
*
|
|
27
|
+
* 一个部署要换的从来只是前缀(`aperture` → 自己的名字):三条路由键都由它加协议名的小写写法拼
|
|
28
|
+
* 出来,三个显示名由它的标题写法加协议名拼出来。让它们互相矛盾因此变成不可能,而不是要校验出来的
|
|
29
|
+
* 错误。
|
|
30
|
+
*
|
|
31
|
+
* @param prefix - 已经过文法校验的路由名前缀。
|
|
32
|
+
* @returns 三条路由,顺序与 {@link VOCABULARY} 一致。
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveRoutes(prefix: string): readonly ResolvedRoute[];
|
|
35
|
+
//#endregion
|
package/lib/types/runtime.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DiscoveredModel } from "./types.js";
|
|
2
|
+
import { PlannedRoute, RoutePlan } from "./plan.js";
|
|
2
3
|
import { CatalogLoad, ModelCatalog } from "./catalog.js";
|
|
3
4
|
import { ResolvedConfig } from "./config.js";
|
|
4
|
-
import {
|
|
5
|
-
import { SyncOutcome } from "./sync.js";
|
|
5
|
+
import { PublishOutcome } from "./provider.js";
|
|
6
6
|
import { SettingsForms } from "@deepseek-ai/dsh-settings";
|
|
7
7
|
//#region src/runtime.d.ts
|
|
8
8
|
/** 运行时用来输出诊断信息的最小日志接口。 */
|
|
@@ -29,13 +29,13 @@ export interface RefreshOutcome {
|
|
|
29
29
|
/** 全部归一化后的模型。 */
|
|
30
30
|
readonly models: readonly DiscoveredModel[];
|
|
31
31
|
/** 该方案发布的路由。 */
|
|
32
|
-
readonly routes: readonly
|
|
32
|
+
readonly routes: readonly PlannedRoute[];
|
|
33
33
|
/** 没有任何路由能服务的模型。 */
|
|
34
34
|
readonly unserved: readonly DiscoveredModel[];
|
|
35
35
|
/** 清单提供的内容。 */
|
|
36
36
|
readonly catalog: CatalogLoad;
|
|
37
|
-
/**
|
|
38
|
-
readonly
|
|
37
|
+
/** 注册的结果(如果走到那一步)。 */
|
|
38
|
+
readonly publish?: PublishOutcome;
|
|
39
39
|
/** 刷新失败时的错误。 */
|
|
40
40
|
readonly error?: string;
|
|
41
41
|
}
|
|
@@ -49,6 +49,18 @@ export interface RuntimeDeps {
|
|
|
49
49
|
readonly logger: RuntimeLogger;
|
|
50
50
|
/** models.dev 缓存,在各次刷新之间共享。 */
|
|
51
51
|
readonly catalog: ModelCatalog;
|
|
52
|
+
/** provider 注册层,按刷新换掉适配器服务的那一代路由。 */
|
|
53
|
+
readonly provider: ProviderPublisher;
|
|
54
|
+
}
|
|
55
|
+
/** 运行时需要的注册能力:把一代方案注册出去,并报告做了什么。 */
|
|
56
|
+
export interface ProviderPublisher {
|
|
57
|
+
/**
|
|
58
|
+
* 发布一代方案。
|
|
59
|
+
*
|
|
60
|
+
* @param plan - 本次要服务的路由与本插件拥有的路由键。
|
|
61
|
+
* @returns 已注册的路由与未能注册时的原因。
|
|
62
|
+
*/
|
|
63
|
+
publish(plan: RoutePlan): Promise<PublishOutcome>;
|
|
52
64
|
}
|
|
53
65
|
/** 单飞(single-flight)的发现与发布。 */
|
|
54
66
|
export declare class ApertureRuntime {
|
|
@@ -79,7 +91,12 @@ export declare class ApertureRuntime {
|
|
|
79
91
|
private run;
|
|
80
92
|
/** 一次刷新的主体。 */
|
|
81
93
|
private execute;
|
|
82
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* 把方案交给注册层,或说明为什么没有注册任何内容。
|
|
96
|
+
*
|
|
97
|
+
* 关掉 `sync` 是「撤下本插件的路由」而不是「什么都不做」:适配器换成零条路由,于是配置里
|
|
98
|
+
* 这些模型不再可选,界面上也不会留下一份谁也说不清归属的清单。
|
|
99
|
+
*/
|
|
83
100
|
private publish;
|
|
84
101
|
}
|
|
85
102
|
/** 把未知的可抛出对象渲染为单行原因。 */
|
package/lib/types/types.d.ts
CHANGED
|
@@ -3,16 +3,26 @@
|
|
|
3
3
|
* Aperture 发现流水线的共享词汇表。
|
|
4
4
|
*
|
|
5
5
|
* 该流水线是一条纯函数链——端点响应进,provider profile 出——因此每个阶段都在这里
|
|
6
|
-
* 命名自己的类型,而不去碰 Cordis 或设置的接缝:只有 `src/index.ts`
|
|
7
|
-
*
|
|
6
|
+
* 命名自己的类型,而不去碰 Cordis 或设置的接缝:只有 `src/index.ts` 与注册层会接触服务。
|
|
7
|
+
* 它也因此是唯一一个谁都能安全引用的模块(没有循环依赖)。
|
|
8
8
|
*
|
|
9
9
|
* @module dsh-aperture/types
|
|
10
10
|
*/
|
|
11
11
|
/** 一个已发现模型可以声明的一种请求模态。 */
|
|
12
12
|
export type Modality = 'text' | 'image';
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* pi-ai 认得的推理档位,也是模型 `reasoningEfforts` 允许写下的键。
|
|
15
|
+
*
|
|
16
|
+
* 这份名单是 pi-ai 的 `ModelThinkingLevel` 的镜像:多写一个键只会落进它不认识的字典项,
|
|
17
|
+
* 少写一个键则让部署无法声明它其实支持的档位。它住在词汇表这一层,因为配置 schema 与 profile
|
|
18
|
+
* 都要用它,而两者分处依赖链的两端。
|
|
19
|
+
*/
|
|
20
|
+
export declare const REASONING_LEVELS: readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
21
|
+
/** 一个 pi-ai 推理档位。 */
|
|
22
|
+
export type ReasoningLevel = (typeof REASONING_LEVELS)[number];
|
|
23
|
+
/**
|
|
24
|
+
* 本插件发布的协议格式。三者都由 pi-ai 的三份线缆实现服务,这就是发现过程从不转换载荷的
|
|
25
|
+
* 原因:它只决定每个模型在网关的哪些端点上应答。
|
|
16
26
|
*/
|
|
17
27
|
export type ApertureProtocol = 'openai-completions' | 'openai-responses' | 'anthropic-messages';
|
|
18
28
|
/** 一项已归一化的事实的来源,用于报告中的诊断。 */
|
|
@@ -66,7 +76,7 @@ export interface ConfiguredModel {
|
|
|
66
76
|
/** 显示名。 */
|
|
67
77
|
readonly name?: string;
|
|
68
78
|
/** 协议覆盖;也是服务 Aperture 只在未服务端点上通告的模型的唯一方式。 */
|
|
69
|
-
readonly
|
|
79
|
+
readonly protocol?: string;
|
|
70
80
|
/** 上下文容量,以 token 计。 */
|
|
71
81
|
readonly contextWindow?: number;
|
|
72
82
|
/** 输出容量,以 token 计。 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-aperture",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "自动发现 Aperture 网关上的模型,并加进 DSH 的模型选择器。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.7.0",
|
|
@@ -71,15 +71,21 @@
|
|
|
71
71
|
"@deepseek-ai/dsh-client-ui-plugin-manager",
|
|
72
72
|
"@deepseek-ai/dsh-client-ui-primitives",
|
|
73
73
|
"@deepseek-ai/dsh-client-ui-renderer",
|
|
74
|
-
"@deepseek-ai/dsh-client-ui-settings"
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-settings-models"
|
|
75
76
|
]
|
|
76
77
|
}
|
|
77
78
|
},
|
|
78
79
|
"peerDependencies": {
|
|
79
80
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
80
81
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.5",
|
|
82
|
+
"@deepseek-ai/dsh-attachment": "^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
81
83
|
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
84
|
+
"@deepseek-ai/dsh-client-ui-settings-models": "^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
85
|
+
"@deepseek-ai/dsh-credentials": "^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
86
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
82
87
|
"@deepseek-ai/dsh-settings": "^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
88
|
+
"@deepseek-ai/dsh-timeout": "^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
83
89
|
"@deepseek-ai/dsh-typert-protocol": "^0.1.7-rc.1 || ^0.2.0-rc.1",
|
|
84
90
|
"@deepseek-ai/schemastery": "^3.18.4"
|
|
85
91
|
},
|
|
@@ -90,17 +96,21 @@
|
|
|
90
96
|
"@deepseek-ai/dsh-api-gateway": "0.2.0-rc.1",
|
|
91
97
|
"@deepseek-ai/dsh-api-remotes": "0.2.0-rc.1",
|
|
92
98
|
"@deepseek-ai/dsh-app-boot": "0.2.0-rc.1",
|
|
99
|
+
"@deepseek-ai/dsh-attachment": "0.2.0-rc.1",
|
|
93
100
|
"@deepseek-ai/dsh-client-locale": "0.2.0-rc.1",
|
|
94
101
|
"@deepseek-ai/dsh-client-store": "0.2.0-rc.1",
|
|
95
102
|
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.0-rc.1",
|
|
96
103
|
"@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.1",
|
|
97
104
|
"@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.1",
|
|
98
105
|
"@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.1",
|
|
106
|
+
"@deepseek-ai/dsh-client-ui-settings-models": "0.2.0-rc.1",
|
|
99
107
|
"@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.1",
|
|
100
108
|
"@deepseek-ai/dsh-config-editor": "0.2.0-rc.1",
|
|
109
|
+
"@deepseek-ai/dsh-credentials": "0.2.0-rc.1",
|
|
101
110
|
"@deepseek-ai/dsh-llm": "0.2.0-rc.1",
|
|
102
111
|
"@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.1",
|
|
103
112
|
"@deepseek-ai/dsh-settings": "0.2.0-rc.1",
|
|
113
|
+
"@deepseek-ai/dsh-timeout": "0.2.0-rc.1",
|
|
104
114
|
"@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.1",
|
|
105
115
|
"@deepseek-ai/dsh-typert-registry": "0.2.0-rc.1",
|
|
106
116
|
"@deepseek-ai/schemastery": "3.18.4",
|
|
@@ -108,5 +118,8 @@
|
|
|
108
118
|
"@types/react": "^18.3.12",
|
|
109
119
|
"tsdown": "^0.23.0",
|
|
110
120
|
"typescript": "^5.9.0"
|
|
121
|
+
},
|
|
122
|
+
"dependencies": {
|
|
123
|
+
"@earendil-works/pi-ai": "^0.85.1"
|
|
111
124
|
}
|
|
112
125
|
}
|
package/lib/types/profile.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { ConfiguredModel, DiscoveredModel } from "./types.js";
|
|
2
|
-
import { PiAiProviderProfile } from "@deepseek-ai/dsh-llm-pi-ai";
|
|
3
|
-
//#region src/profile.d.ts
|
|
4
|
-
/** 无凭据路由发送的占位凭据的默认值。 */
|
|
5
|
-
export declare const DEFAULT_PLACEHOLDER_CREDENTIAL = "dsh-aperture";
|
|
6
|
-
/** 一次发布过程所需的全部内容。 */
|
|
7
|
-
export interface ProfileOptions {
|
|
8
|
-
/** 归一化后的实例根。 */
|
|
9
|
-
readonly instanceRoot: string;
|
|
10
|
-
/** 拥有 OpenAI Chat Completions 模型的路由键。 */
|
|
11
|
-
readonly route: string;
|
|
12
|
-
/** 拥有 OpenAI Responses 模型的路由键。 */
|
|
13
|
-
readonly responsesRoute: string;
|
|
14
|
-
/** 拥有 Anthropic Messages 模型的路由键。 */
|
|
15
|
-
readonly anthropicRoute: string;
|
|
16
|
-
/** OpenAI Chat Completions 路由的选择器标签。 */
|
|
17
|
-
readonly displayName: string;
|
|
18
|
-
/** OpenAI Responses 路由的选择器标签。 */
|
|
19
|
-
readonly responsesDisplayName: string;
|
|
20
|
-
/** Anthropic 路由的选择器标签。 */
|
|
21
|
-
readonly anthropicDisplayName: string;
|
|
22
|
-
/** 凭据引用;部署配置了才有。 */
|
|
23
|
-
readonly apiKeyEnv?: string;
|
|
24
|
-
/** 额外的路由头;它们优先于占位头。 */
|
|
25
|
-
readonly headers: Readonly<Record<string, string>>;
|
|
26
|
-
/** 已配置的逐模型覆盖项,用于查询显式的推理档位。 */
|
|
27
|
-
readonly configured: readonly ConfiguredModel[];
|
|
28
|
-
}
|
|
29
|
-
/** 一条可写入 `llm-pi-ai` 配置段的路由。 */
|
|
30
|
-
export interface RoutePlan {
|
|
31
|
-
/** provider 路由键。 */
|
|
32
|
-
readonly provider: string;
|
|
33
|
-
/** profile 本身,与将被存储的内容完全一致。 */
|
|
34
|
-
readonly profile: PiAiProviderProfile;
|
|
35
|
-
/** 该路由发布的模型,用于报告。 */
|
|
36
|
-
readonly models: readonly DiscoveredModel[];
|
|
37
|
-
}
|
|
38
|
-
/** 完整的发布方案。 */
|
|
39
|
-
export interface ProfilePlan {
|
|
40
|
-
/** 至少含一个模型的路由,顺序稳定。 */
|
|
41
|
-
readonly routes: readonly RoutePlan[];
|
|
42
|
-
/** 没有任何路由可以服务的已发现模型。 */
|
|
43
|
-
readonly unserved: readonly DiscoveredModel[];
|
|
44
|
-
/** 本插件拥有的每个路由键,无论它当前是否有模型。 */
|
|
45
|
-
readonly ownedRoutes: readonly string[];
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* 把归一化后的注册表变成 provider profile。
|
|
49
|
-
*
|
|
50
|
-
* @param models - 所有已发现的模型。
|
|
51
|
-
* @param options - 路由与凭据配置。
|
|
52
|
-
* @returns 要发布的路由,以及未能被服务的模型。
|
|
53
|
-
*/
|
|
54
|
-
export declare function buildProfilePlan(models: readonly DiscoveredModel[], options: ProfileOptions): ProfilePlan;
|
|
55
|
-
//#endregion
|
package/lib/types/sync.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { RoutePlan } from "./profile.js";
|
|
2
|
-
import { SettingsForms, SettingsPathOp } from "@deepseek-ai/dsh-settings";
|
|
3
|
-
//#region src/sync.d.ts
|
|
4
|
-
/** pi-ai 适配器注册的设置命名空间,也是本插件写入的那一个。 */
|
|
5
|
-
export declare const PI_AI_NAMESPACE = "llm-pi-ai";
|
|
6
|
-
/** 一次发布尝试的结果。 */
|
|
7
|
-
export interface SyncOutcome {
|
|
8
|
-
/** 是否发出了写入。 */
|
|
9
|
-
readonly applied: boolean;
|
|
10
|
-
/** 该写入携带的路径 op 数量。 */
|
|
11
|
-
readonly ops: number;
|
|
12
|
-
/** 方案发布的路由键。 */
|
|
13
|
-
readonly routes: readonly string[];
|
|
14
|
-
/** 未写入任何内容时,说明原因。 */
|
|
15
|
-
readonly reason?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* 计算使某个配置段与方案一致的路径 op。
|
|
19
|
-
*
|
|
20
|
-
* @param current - 已解析的 `llm-pi-ai` 值;命名空间未注册时为 `undefined`。
|
|
21
|
-
* @param routes - 方案希望存在的路由。
|
|
22
|
-
* @param ownedRoutes - 本插件拥有的每个路由键,因此不再有模型的路由会被移除,而不是
|
|
23
|
-
* 继续服务一份陈旧的清单。
|
|
24
|
-
* @returns 要应用的 op;配置段已经匹配时为空数组。
|
|
25
|
-
*/
|
|
26
|
-
export declare function planSync(current: unknown, routes: readonly RoutePlan[], ownedRoutes: readonly string[]): SettingsPathOp[];
|
|
27
|
-
/**
|
|
28
|
-
* 把一个方案发布到 `llm-pi-ai` 配置段。
|
|
29
|
-
*
|
|
30
|
-
* @param settings - 设置服务。
|
|
31
|
-
* @param routes - 要发布的路由。
|
|
32
|
-
* @param ownedRoutes - 本插件拥有的每个路由键。
|
|
33
|
-
* @returns 发生了什么;未写入任何内容时包含原因。
|
|
34
|
-
*/
|
|
35
|
-
export declare function applySync(settings: SettingsForms, routes: readonly RoutePlan[], ownedRoutes: readonly string[]): Promise<SyncOutcome>;
|
|
36
|
-
/**
|
|
37
|
-
* 结构化 JSON 相等性。
|
|
38
|
-
*
|
|
39
|
-
* 之所以自己写而不导入,是因为这里比较的值恰好都是 JSON:本插件生成的 profile,以及设置
|
|
40
|
-
* 接缝从文档里解析回来的 profile。键顺序不属于这种同一性,因此被归一化掉。
|
|
41
|
-
*
|
|
42
|
-
* @param left - 一个 JSON 值。
|
|
43
|
-
* @param right - 另一个。
|
|
44
|
-
* @returns 两者是否结构相等。
|
|
45
|
-
*/
|
|
46
|
-
export declare function deepEqualJson(left: unknown, right: unknown): boolean;
|
|
47
|
-
//#endregion
|