dsh-aperture 0.1.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.
@@ -0,0 +1,304 @@
1
+ /**
2
+ * models.dev 清单的索引与查找。
3
+ *
4
+ * Aperture 会上报容量,但并不总是上报能力,而且在大多数 provider 上,其列表
5
+ * 根本没有「这个模型是否会推理」的字段。models.dev 为同样的模型携带 `reasoning`、
6
+ * `tool_call` 和输入模态,但 id 只是有时逐字节相同:网关会重命名上游(这里是
7
+ * `x-ai/grok-4.5`,那里是 `xai/grok-4.5`),而其别名完全不带厂商前缀(`k3`)。
8
+ *
9
+ * 因此查找是评分式的,而非精确匹配。模型 id 按完整写法、按最后一个斜杠之后的
10
+ * 分段、以及两者折叠标点后的 slug 来匹配;一个清单条目贡献同样的三个键;而两侧
11
+ * 匹配上的 provider 别名优先于任何键得分,因为跨厂商的重名正是孤立的模型 id
12
+ * 唯一会说谎的地方。
13
+ *
14
+ * @module dsh-aperture/metadata/modelsdev
15
+ */
16
+ import { asRecord, firstPositiveInteger, firstString, normalizeKey, slugKey, stringValue, suffixAfterSlash } from "./utils.js";
17
+ /** provider 别名匹配优先于任何键匹配。 */
18
+ const PROVIDER_ALIAS_BONUS = 200;
19
+ /** 已索引的 models.dev 清单,按单个模型的 id 与 provider 提示查询。 */
20
+ export class ModelCatalogIndex {
21
+ byKey = new Map();
22
+ entries;
23
+ /**
24
+ * @param entries - 每一个可用的清单条目。
25
+ */
26
+ constructor(entries) {
27
+ this.entries = entries;
28
+ for (const entry of entries) {
29
+ for (const { key, score } of entryKeys(entry)) {
30
+ const bucket = this.byKey.get(key);
31
+ if (bucket === undefined) {
32
+ this.byKey.set(key, [{ entry, keyScore: score }]);
33
+ }
34
+ else {
35
+ bucket.push({ entry, keyScore: score });
36
+ }
37
+ }
38
+ }
39
+ }
40
+ /** 该索引持有的可用条目数量。 */
41
+ get size() {
42
+ return this.entries.length;
43
+ }
44
+ /**
45
+ * 为一个网关模型解析出最佳清单条目。
46
+ * @param modelId - 网关公布的 id。
47
+ * @param providerHints - 网关上报的上游 provider id 与名称。
48
+ * @returns 胜出条目的元数据;无任何匹配时为 `undefined`。
49
+ */
50
+ lookup(modelId, providerHints = []) {
51
+ const candidates = new Map();
52
+ for (const { key, score } of lookupKeys(modelId)) {
53
+ for (const scored of this.byKey.get(key) ?? []) {
54
+ const current = candidates.get(scored.entry) ?? 0;
55
+ candidates.set(scored.entry, Math.max(current, score + scored.keyScore));
56
+ }
57
+ }
58
+ const hintAliases = providerHints.flatMap((hint) => providerAliases(hint));
59
+ const modelProviderAliases = providerAliases(modelId.split('/')[0] ?? '');
60
+ let best;
61
+ for (const [entry, baseScore] of candidates) {
62
+ const providerScore = matchingAliasScore(entry.providerAliases, hintAliases) ||
63
+ matchingAliasScore(entry.providerAliases, modelProviderAliases);
64
+ const score = baseScore + providerScore;
65
+ if (best === undefined || score > best.score) {
66
+ best = { entry, score };
67
+ }
68
+ }
69
+ return best === undefined ? undefined : { ...best.entry.metadata };
70
+ }
71
+ }
72
+ /**
73
+ * 在一份已解析的 models.dev 文档之上构建查找。
74
+ *
75
+ * 接受该文档发布过的所有形态:当前扁平的 `{ "<provider>/<model>": { … } }` 映射、
76
+ * 值携带 `models` 的旧式 provider 键映射,以及在 `providers` 或 `models` 之下
77
+ * 暴露上述任一形态的包装对象。
78
+ *
79
+ * @param document - 已解析的 JSON,或任何其他值。
80
+ * @returns 该查找;文档不含可用条目时为 `undefined`。
81
+ */
82
+ export function buildCatalogLookup(document) {
83
+ const index = buildCatalogIndex(document);
84
+ if (index === undefined) {
85
+ return undefined;
86
+ }
87
+ return (model) => index.lookup(model.id, providerHintsOf(model));
88
+ }
89
+ /** 仅构建索引,并暴露其大小以用于诊断。 */
90
+ export function buildCatalogIndex(document) {
91
+ const entries = readEntries(document);
92
+ return entries.length === 0 ? undefined : new ModelCatalogIndex(entries);
93
+ }
94
+ /** 一次查找可用于评分的 provider 提示。 */
95
+ function providerHintsOf(model) {
96
+ const hints = [model.provider, model.providerName, model.id.includes('/') ? model.id.split('/')[0] : undefined];
97
+ return [...new Set(hints.filter((hint) => typeof hint === 'string' && hint.trim().length > 0))];
98
+ }
99
+ /** 从一份清单文档中读取每一个可用条目。 */
100
+ function readEntries(document) {
101
+ const root = asRecord(document);
102
+ if (!root) {
103
+ return [];
104
+ }
105
+ const providers = asRecord(root.providers);
106
+ if (providers) {
107
+ return readProviderMap(providers);
108
+ }
109
+ const models = asRecord(root.models);
110
+ if (models) {
111
+ return readModelMap(models);
112
+ }
113
+ // 扁平文档:通过观察各值是否携带 `models` 容器,区分「provider → { models }」
114
+ // 与「模型键 → 模型」。models.dev 实际发布的文档是第二种形态。
115
+ const providerShaped = Object.values(root).some((value) => asRecord(asRecord(value)?.models) !== undefined);
116
+ return providerShaped ? readProviderMap(root) : readModelMap(root);
117
+ }
118
+ /** 读取以 provider 为键的映射,并从其 provider 推导每个模型的别名。 */
119
+ function readProviderMap(providers) {
120
+ const entries = [];
121
+ for (const [providerKey, providerValue] of Object.entries(providers)) {
122
+ const provider = asRecord(providerValue);
123
+ const models = asRecord(provider?.models);
124
+ if (!provider || !models) {
125
+ continue;
126
+ }
127
+ const aliases = providerAliases(providerKey, stringValue(provider.id), stringValue(provider.name));
128
+ for (const [modelKey, modelValue] of Object.entries(models)) {
129
+ const entry = readModelEntry(modelKey, modelValue, aliases);
130
+ if (entry) {
131
+ entries.push(entry);
132
+ }
133
+ }
134
+ }
135
+ return entries;
136
+ }
137
+ /** 读取模型键 → 模型条目的映射,并从该键推导 provider 别名。 */
138
+ function readModelMap(models) {
139
+ const entries = [];
140
+ for (const [modelKey, modelValue] of Object.entries(models)) {
141
+ const model = asRecord(modelValue);
142
+ if (!model) {
143
+ continue;
144
+ }
145
+ const modelId = firstString([model.id, modelKey]) ?? modelKey;
146
+ const providerId = modelId.includes('/') ? (modelId.split('/')[0] ?? '') : '';
147
+ const entry = readModelEntry(modelKey, model, providerAliases(providerId));
148
+ if (entry) {
149
+ entries.push(entry);
150
+ }
151
+ }
152
+ return entries;
153
+ }
154
+ /** 读取一个清单条目;未给出任何可用信息时为 `undefined`。 */
155
+ function readModelEntry(modelKey, value, aliases) {
156
+ const model = asRecord(value);
157
+ if (!model) {
158
+ return undefined;
159
+ }
160
+ const metadata = readModelMetadata(model);
161
+ if (metadata === undefined) {
162
+ return undefined;
163
+ }
164
+ const modelId = firstString([model.id, modelKey]) ?? modelKey;
165
+ const modelName = firstString([model.name, model.display_name]);
166
+ return {
167
+ modelId,
168
+ ...(modelName === undefined ? {} : { modelName }),
169
+ providerAliases: aliases,
170
+ metadata,
171
+ };
172
+ }
173
+ /** 读取一个 models.dev 条目所贡献的元数据。 */
174
+ function readModelMetadata(model) {
175
+ const limit = asRecord(model.limit);
176
+ const topProvider = asRecord(model.top_provider);
177
+ const modalities = asRecord(model.modalities);
178
+ const contextWindow = firstPositiveInteger([
179
+ model.contextWindow,
180
+ model.context_window,
181
+ model.context_length,
182
+ model.max_input_tokens,
183
+ limit?.context,
184
+ limit?.input,
185
+ ]);
186
+ const maxTokens = firstPositiveInteger([
187
+ model.maxOutputTokens,
188
+ model.max_output_tokens,
189
+ model.maxTokens,
190
+ model.max_tokens,
191
+ limit?.output,
192
+ topProvider?.max_completion_tokens,
193
+ ]);
194
+ const reasoning = typeof model.reasoning === 'boolean' ? model.reasoning : undefined;
195
+ const input = readInputModalities(model, modalities);
196
+ const name = firstString([model.name, model.display_name]);
197
+ if (contextWindow === undefined &&
198
+ maxTokens === undefined &&
199
+ reasoning === undefined &&
200
+ input === undefined &&
201
+ name === undefined) {
202
+ return undefined;
203
+ }
204
+ return {
205
+ ...(contextWindow === undefined ? {} : { contextWindow }),
206
+ ...(maxTokens === undefined ? {} : { maxTokens }),
207
+ ...(reasoning === undefined ? {} : { reasoning }),
208
+ ...(input === undefined ? {} : { input }),
209
+ ...(name === undefined ? {} : { name }),
210
+ };
211
+ }
212
+ /** 读取清单条目声明的输入模态。 */
213
+ function readInputModalities(model, modalities) {
214
+ const list = modalities?.input ?? model.input;
215
+ if (!Array.isArray(list)) {
216
+ return undefined;
217
+ }
218
+ const declared = new Set();
219
+ for (const entry of list) {
220
+ const label = stringValue(entry)?.toLowerCase();
221
+ if (label === 'text') {
222
+ declared.add('text');
223
+ }
224
+ else if (label === 'image' || label === 'vision') {
225
+ declared.add('image');
226
+ }
227
+ }
228
+ return declared.size === 0 ? undefined : [...declared];
229
+ }
230
+ /** 一个清单条目贡献的每一个索引键及其得分。 */
231
+ function entryKeys(entry) {
232
+ const values = [entry.modelId, suffixAfterSlash(entry.modelId), entry.modelName];
233
+ return [...new Set(values.filter((value) => typeof value === 'string' && value.trim().length > 0))]
234
+ .flatMap((value) => [
235
+ { key: normalizeKey(value), score: 40 },
236
+ { key: slugKey(value), score: 30 },
237
+ ])
238
+ .filter((item) => item.key.length > 0);
239
+ }
240
+ /** 一个网关模型 id 被查询时使用的每一个查找键及其权重。 */
241
+ function lookupKeys(modelId) {
242
+ const suffix = suffixAfterSlash(modelId);
243
+ return [
244
+ { value: modelId, score: 70 },
245
+ { value: suffix, score: 80 },
246
+ ]
247
+ .flatMap(({ value, score }) => [
248
+ { key: normalizeKey(value), score },
249
+ { key: slugKey(value), score: score - 10 },
250
+ ])
251
+ .filter((item) => item.key.length > 0);
252
+ }
253
+ /** 一个 provider id 或名称响应的每一个别名写法。 */
254
+ function providerAliases(...values) {
255
+ const aliases = new Set();
256
+ for (const value of values) {
257
+ const slug = slugKey(value);
258
+ if (!slug) {
259
+ continue;
260
+ }
261
+ aliases.add(slug);
262
+ aliases.add(slug.replace(/-?ai$/u, ''));
263
+ aliases.add(slug.replace(/-?api$/u, ''));
264
+ aliases.add(slug.replace(/-?cloud$/u, ''));
265
+ }
266
+ const normalized = new Set();
267
+ for (const alias of aliases) {
268
+ if (!alias) {
269
+ continue;
270
+ }
271
+ normalized.add(alias);
272
+ switch (alias) {
273
+ case 'google-ai-studio':
274
+ case 'google-generative-ai':
275
+ normalized.add('google');
276
+ break;
277
+ case 'deepseek-ai':
278
+ normalized.add('deepseek');
279
+ break;
280
+ case 'x-ai':
281
+ normalized.add('xai');
282
+ break;
283
+ case 'moonshot':
284
+ case 'moonshot-ai':
285
+ normalized.add('moonshotai');
286
+ break;
287
+ case 'xiaomi':
288
+ case 'xiaomi-mimo':
289
+ normalized.add('xiaomimimo');
290
+ break;
291
+ default:
292
+ break;
293
+ }
294
+ }
295
+ return [...normalized];
296
+ }
297
+ /** 对两个别名集评分:任何交集都算一次 provider 匹配。 */
298
+ function matchingAliasScore(left, right) {
299
+ if (left.length === 0 || right.length === 0) {
300
+ return 0;
301
+ }
302
+ const rightSet = new Set(right);
303
+ return left.some((alias) => rightSet.has(alias)) ? PROVIDER_ALIAS_BONUS : 0;
304
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Aperture 与 models.dev 返回的松散类型 JSON 的防御式读取器。每一个都接受
3
+ * `unknown`,并以 `undefined` 作答而不是抛错:一条格式错误的条目不能让整个清单
4
+ * 刷新失败。
5
+ *
6
+ * @module dsh-aperture/metadata/utils
7
+ */
8
+ /** 读取普通 JSON 对象,拒绝数组与原始值。 */
9
+ export declare function asRecord(value: unknown): Record<string, unknown> | undefined;
10
+ /** 读取非空且已去除首尾空白的字符串。 */
11
+ export declare function stringValue(value: unknown): string | undefined;
12
+ /** 读取严格布尔值。 */
13
+ export declare function booleanValue(value: unknown): boolean | undefined;
14
+ /** 读取正整数,接受某些清单使用的 `128k` / `1.5M` 写法。 */
15
+ export declare function positiveInteger(value: unknown): number | undefined;
16
+ /** 候选中第一个已定义且去空白后非空的字符串。 */
17
+ export declare function firstString(values: readonly unknown[]): string | undefined;
18
+ /** 候选中第一个正整数。 */
19
+ export declare function firstPositiveInteger(values: readonly unknown[]): number | undefined;
20
+ /** 候选中第一个严格布尔值。 */
21
+ export declare function firstBoolean(values: readonly unknown[]): boolean | undefined;
22
+ /** 用于精确匹配的、转小写并去除空白的键。 */
23
+ export declare function normalizeKey(value: string | undefined): string;
24
+ /** 用于宽容匹配的、转小写并折叠标点的键。 */
25
+ export declare function slugKey(value: string | undefined): string;
26
+ /** 最后一个 `/` 之后的全部内容;没有 `/` 时即整个值。 */
27
+ export declare function suffixAfterSlash(value: string): string;
28
+ /** 对去空白后非空的字符串去重,并保持顺序。 */
29
+ export declare function uniqueStrings(values: readonly (string | undefined)[]): string[];
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Aperture 与 models.dev 返回的松散类型 JSON 的防御式读取器。每一个都接受
3
+ * `unknown`,并以 `undefined` 作答而不是抛错:一条格式错误的条目不能让整个清单
4
+ * 刷新失败。
5
+ *
6
+ * @module dsh-aperture/metadata/utils
7
+ */
8
+ /** 读取普通 JSON 对象,拒绝数组与原始值。 */
9
+ export function asRecord(value) {
10
+ return value !== null && typeof value === 'object' && !Array.isArray(value)
11
+ ? value
12
+ : undefined;
13
+ }
14
+ /** 读取非空且已去除首尾空白的字符串。 */
15
+ export function stringValue(value) {
16
+ return typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined;
17
+ }
18
+ /** 读取严格布尔值。 */
19
+ export function booleanValue(value) {
20
+ return typeof value === 'boolean' ? value : undefined;
21
+ }
22
+ /** 读取正整数,接受某些清单使用的 `128k` / `1.5M` 写法。 */
23
+ export function positiveInteger(value) {
24
+ if (typeof value === 'number') {
25
+ return Number.isSafeInteger(value) && value > 0 ? value : undefined;
26
+ }
27
+ if (typeof value !== 'string') {
28
+ return undefined;
29
+ }
30
+ const match = value.trim().replace(/[, _]/gu, '').match(/^(\d+(?:\.\d+)?)([kKmM])?$/u);
31
+ if (!match) {
32
+ return undefined;
33
+ }
34
+ const amount = Number(match[1]);
35
+ const suffix = match[2]?.toLowerCase();
36
+ const multiplier = suffix === 'm' ? 1_000_000 : suffix === 'k' ? 1_000 : 1;
37
+ const normalized = amount * multiplier;
38
+ return Number.isSafeInteger(normalized) && normalized > 0 ? normalized : undefined;
39
+ }
40
+ /** 候选中第一个已定义且去空白后非空的字符串。 */
41
+ export function firstString(values) {
42
+ for (const value of values) {
43
+ const normalized = stringValue(value);
44
+ if (normalized !== undefined) {
45
+ return normalized;
46
+ }
47
+ }
48
+ return undefined;
49
+ }
50
+ /** 候选中第一个正整数。 */
51
+ export function firstPositiveInteger(values) {
52
+ for (const value of values) {
53
+ const normalized = positiveInteger(value);
54
+ if (normalized !== undefined) {
55
+ return normalized;
56
+ }
57
+ }
58
+ return undefined;
59
+ }
60
+ /** 候选中第一个严格布尔值。 */
61
+ export function firstBoolean(values) {
62
+ for (const value of values) {
63
+ const normalized = booleanValue(value);
64
+ if (normalized !== undefined) {
65
+ return normalized;
66
+ }
67
+ }
68
+ return undefined;
69
+ }
70
+ /** 用于精确匹配的、转小写并去除空白的键。 */
71
+ export function normalizeKey(value) {
72
+ return value?.trim().toLowerCase() ?? '';
73
+ }
74
+ /** 用于宽容匹配的、转小写并折叠标点的键。 */
75
+ export function slugKey(value) {
76
+ return (value
77
+ ?.trim()
78
+ .toLowerCase()
79
+ .replace(/['"]/gu, '')
80
+ .replace(/[^a-z0-9]+/gu, '-')
81
+ .replace(/^-+|-+$/gu, '') ?? '');
82
+ }
83
+ /** 最后一个 `/` 之后的全部内容;没有 `/` 时即整个值。 */
84
+ export function suffixAfterSlash(value) {
85
+ return value.includes('/') ? (value.split('/').pop() ?? value) : value;
86
+ }
87
+ /** 对去空白后非空的字符串去重,并保持顺序。 */
88
+ export function uniqueStrings(values) {
89
+ const seen = new Set();
90
+ const result = [];
91
+ for (const value of values) {
92
+ const trimmed = value?.trim();
93
+ if (!trimmed || seen.has(trimmed)) {
94
+ continue;
95
+ }
96
+ seen.add(trimmed);
97
+ result.push(trimmed);
98
+ }
99
+ return result;
100
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 本插件夹在中间的两个设置命名空间。
3
+ *
4
+ * 从 `config.ts` 里分出来,是为了让发布路径不依赖配置 schema——也让这条纯函数
5
+ * 流水线能在不加载 schema 库的情况下被测试。
6
+ *
7
+ * @module dsh-aperture/namespaces
8
+ */
9
+ /** 本插件拥有、并可通过它配置的设置命名空间。 */
10
+ export declare const APERTURE_NAMESPACE = "aperture";
11
+ /** pi-ai 适配器注册的设置命名空间,也是本插件写入的那一个。 */
12
+ export declare const PI_AI_NAMESPACE = "llm-pi-ai";
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 本插件夹在中间的两个设置命名空间。
3
+ *
4
+ * 从 `config.ts` 里分出来,是为了让发布路径不依赖配置 schema——也让这条纯函数
5
+ * 流水线能在不加载 schema 库的情况下被测试。
6
+ *
7
+ * @module dsh-aperture/namespaces
8
+ */
9
+ /** 本插件拥有、并可通过它配置的设置命名空间。 */
10
+ export const APERTURE_NAMESPACE = 'aperture';
11
+ /** pi-ai 适配器注册的设置命名空间,也是本插件写入的那一个。 */
12
+ export const PI_AI_NAMESPACE = 'llm-pi-ai';
@@ -0,0 +1,70 @@
1
+ /**
2
+ * 发布阶段:把发现的模型变成 `llm-pi-ai` provider profile。
3
+ *
4
+ * 这里不做任何负载转换。本插件发布的两种协议——`openai-completions` 与
5
+ * `anthropic-messages`——都由已安装的 `dsh-llm-pi-ai` 适配器实现,因此剩下的工作只是
6
+ * 逐模型陈述该适配器无法通过一个无法识别的网关 URL 推断出的事实:模型有多大、接受
7
+ * 什么,以及它的推理控制如何在协议格式上传输。
8
+ *
9
+ * 该适配器的两个怪癖塑造了本模块。
10
+ *
11
+ * 未在其清单中随附的路由必须声明 `api`、`baseURL` 以及**非空**的 `models` 列表,因此
12
+ * 空无一物的协议完全不产生路由,而不是产生一条空路由。
13
+ *
14
+ * 它的 OpenAI 兼容路径在既无凭据、又无非空 `authorization` 头时拒绝派发。经 Tailscale
15
+ * 认证的网关两者都不需要,因此没有配置 `apiKeyEnv` 的路由会携带一个占位头——有文档
16
+ * 记载、非机密,并且可以通过改为配置一个凭据引用来移除。
17
+ *
18
+ * @module dsh-aperture/profile
19
+ */
20
+ import type { PiAiProviderProfile } from '@deepseek-ai/dsh-llm-pi-ai';
21
+ import type { ConfiguredModel, DiscoveredModel } from './types.ts';
22
+ /** 无凭据路由发送的占位凭据的默认值。 */
23
+ export declare const DEFAULT_PLACEHOLDER_CREDENTIAL = "dsh-aperture";
24
+ /** 一次发布过程所需的全部内容。 */
25
+ export interface ProfileOptions {
26
+ /** 归一化后的实例根。 */
27
+ readonly instanceRoot: string;
28
+ /** 拥有 OpenAI 兼容模型的路由键。 */
29
+ readonly route: string;
30
+ /** 拥有 Anthropic Messages 模型的路由键。 */
31
+ readonly anthropicRoute: string;
32
+ /** OpenAI 兼容路由的选择器标签。 */
33
+ readonly displayName: string;
34
+ /** Anthropic 路由的选择器标签。 */
35
+ readonly anthropicDisplayName: string;
36
+ /** 凭据引用;部署配置了才有。 */
37
+ readonly apiKeyEnv?: string;
38
+ /** 额外的路由头;它们优先于占位头。 */
39
+ readonly headers: Readonly<Record<string, string>>;
40
+ /** 占位凭据值;为空则不发布占位头。 */
41
+ readonly placeholderCredential: string;
42
+ /** 已配置的逐模型覆盖项,用于查询显式的推理档位。 */
43
+ readonly configured: readonly ConfiguredModel[];
44
+ }
45
+ /** 一条可写入 `llm-pi-ai` 配置段的路由。 */
46
+ export interface RoutePlan {
47
+ /** provider 路由键。 */
48
+ readonly provider: string;
49
+ /** profile 本身,与将被存储的内容完全一致。 */
50
+ readonly profile: PiAiProviderProfile;
51
+ /** 该路由发布的模型,用于报告。 */
52
+ readonly models: readonly DiscoveredModel[];
53
+ }
54
+ /** 完整的发布方案。 */
55
+ export interface ProfilePlan {
56
+ /** 至少含一个模型的路由,顺序稳定。 */
57
+ readonly routes: readonly RoutePlan[];
58
+ /** 没有任何路由可以服务的已发现模型。 */
59
+ readonly unserved: readonly DiscoveredModel[];
60
+ /** 本插件拥有的每个路由键,无论它当前是否有模型。 */
61
+ readonly ownedRoutes: readonly string[];
62
+ }
63
+ /**
64
+ * 把归一化后的注册表变成 provider profile。
65
+ *
66
+ * @param models - 所有已发现的模型。
67
+ * @param options - 路由与凭据配置。
68
+ * @returns 要发布的路由,以及未能被服务的模型。
69
+ */
70
+ export declare function buildProfilePlan(models: readonly DiscoveredModel[], options: ProfileOptions): ProfilePlan;