@webskill/chatbot 0.16.0 → 0.18.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,280 @@
1
+ import { n as __exportAll } from "./rolldown-runtime-DZ8SGSJo.js";
2
+ import { t as markup } from "./markup-D2NSmoAx.js";
3
+
4
+ //#region ../../node_modules/.pnpm/refractor@5.0.0/node_modules/refractor/lang/markdown.js
5
+ /**
6
+ * @import {Refractor} from '../lib/core.js'
7
+ */
8
+ var markdown_exports = /* @__PURE__ */ __exportAll({ default: () => markdown });
9
+ markdown.displayName = "markdown";
10
+ markdown.aliases = ["md"];
11
+ /** @param {Refractor} Prism */
12
+ function markdown(Prism) {
13
+ Prism.register(markup);
14
+ (function(Prism) {
15
+ var inner = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
16
+ /**
17
+ * This function is intended for the creation of the bold or italic pattern.
18
+ *
19
+ * This also adds a lookbehind group to the given pattern to ensure that the pattern is not backslash-escaped.
20
+ *
21
+ * _Note:_ Keep in mind that this adds a capturing group.
22
+ *
23
+ * @param {string} pattern
24
+ * @returns {RegExp}
25
+ */
26
+ function createInline(pattern) {
27
+ pattern = pattern.replace(/<inner>/g, function() {
28
+ return inner;
29
+ });
30
+ return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + pattern + ")");
31
+ }
32
+ var tableCell = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source;
33
+ var tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
34
+ return tableCell;
35
+ });
36
+ var tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
37
+ Prism.languages.markdown = Prism.languages.extend("markup", {});
38
+ Prism.languages.insertBefore("markdown", "prolog", {
39
+ "front-matter-block": {
40
+ pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
41
+ lookbehind: true,
42
+ greedy: true,
43
+ inside: {
44
+ punctuation: /^---|---$/,
45
+ "front-matter": {
46
+ pattern: /\S+(?:\s+\S+)*/,
47
+ alias: ["yaml", "language-yaml"],
48
+ inside: Prism.languages.yaml
49
+ }
50
+ }
51
+ },
52
+ blockquote: {
53
+ pattern: /^>(?:[\t ]*>)*/m,
54
+ alias: "punctuation"
55
+ },
56
+ table: {
57
+ pattern: RegExp("^" + tableRow + tableLine + "(?:" + tableRow + ")*", "m"),
58
+ inside: {
59
+ "table-data-rows": {
60
+ pattern: RegExp("^(" + tableRow + tableLine + ")(?:" + tableRow + ")*$"),
61
+ lookbehind: true,
62
+ inside: {
63
+ "table-data": {
64
+ pattern: RegExp(tableCell),
65
+ inside: Prism.languages.markdown
66
+ },
67
+ punctuation: /\|/
68
+ }
69
+ },
70
+ "table-line": {
71
+ pattern: RegExp("^(" + tableRow + ")" + tableLine + "$"),
72
+ lookbehind: true,
73
+ inside: { punctuation: /\||:?-{3,}:?/ }
74
+ },
75
+ "table-header-row": {
76
+ pattern: RegExp("^" + tableRow + "$"),
77
+ inside: {
78
+ "table-header": {
79
+ pattern: RegExp(tableCell),
80
+ alias: "important",
81
+ inside: Prism.languages.markdown
82
+ },
83
+ punctuation: /\|/
84
+ }
85
+ }
86
+ }
87
+ },
88
+ code: [{
89
+ pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
90
+ lookbehind: true,
91
+ alias: "keyword"
92
+ }, {
93
+ pattern: /^```[\s\S]*?^```$/m,
94
+ greedy: true,
95
+ inside: {
96
+ "code-block": {
97
+ pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
98
+ lookbehind: true
99
+ },
100
+ "code-language": {
101
+ pattern: /^(```).+/,
102
+ lookbehind: true
103
+ },
104
+ punctuation: /```/
105
+ }
106
+ }],
107
+ title: [{
108
+ pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
109
+ alias: "important",
110
+ inside: { punctuation: /==+$|--+$/ }
111
+ }, {
112
+ pattern: /(^\s*)#.+/m,
113
+ lookbehind: true,
114
+ alias: "important",
115
+ inside: { punctuation: /^#+|#+$/ }
116
+ }],
117
+ hr: {
118
+ pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
119
+ lookbehind: true,
120
+ alias: "punctuation"
121
+ },
122
+ list: {
123
+ pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
124
+ lookbehind: true,
125
+ alias: "punctuation"
126
+ },
127
+ "url-reference": {
128
+ pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
129
+ inside: {
130
+ variable: {
131
+ pattern: /^(!?\[)[^\]]+/,
132
+ lookbehind: true
133
+ },
134
+ string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
135
+ punctuation: /^[\[\]!:]|[<>]/
136
+ },
137
+ alias: "url"
138
+ },
139
+ bold: {
140
+ pattern: createInline(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
141
+ lookbehind: true,
142
+ greedy: true,
143
+ inside: {
144
+ content: {
145
+ pattern: /(^..)[\s\S]+(?=..$)/,
146
+ lookbehind: true,
147
+ inside: {}
148
+ },
149
+ punctuation: /\*\*|__/
150
+ }
151
+ },
152
+ italic: {
153
+ pattern: createInline(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
154
+ lookbehind: true,
155
+ greedy: true,
156
+ inside: {
157
+ content: {
158
+ pattern: /(^.)[\s\S]+(?=.$)/,
159
+ lookbehind: true,
160
+ inside: {}
161
+ },
162
+ punctuation: /[*_]/
163
+ }
164
+ },
165
+ strike: {
166
+ pattern: createInline(/(~~?)(?:(?!~)<inner>)+\2/.source),
167
+ lookbehind: true,
168
+ greedy: true,
169
+ inside: {
170
+ content: {
171
+ pattern: /(^~~?)[\s\S]+(?=\1$)/,
172
+ lookbehind: true,
173
+ inside: {}
174
+ },
175
+ punctuation: /~~?/
176
+ }
177
+ },
178
+ "code-snippet": {
179
+ pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
180
+ lookbehind: true,
181
+ greedy: true,
182
+ alias: ["code", "keyword"]
183
+ },
184
+ url: {
185
+ pattern: createInline(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
186
+ lookbehind: true,
187
+ greedy: true,
188
+ inside: {
189
+ operator: /^!/,
190
+ content: {
191
+ pattern: /(^\[)[^\]]+(?=\])/,
192
+ lookbehind: true,
193
+ inside: {}
194
+ },
195
+ variable: {
196
+ pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
197
+ lookbehind: true
198
+ },
199
+ url: {
200
+ pattern: /(^\]\()[^\s)]+/,
201
+ lookbehind: true
202
+ },
203
+ string: {
204
+ pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
205
+ lookbehind: true
206
+ }
207
+ }
208
+ }
209
+ });
210
+ [
211
+ "url",
212
+ "bold",
213
+ "italic",
214
+ "strike"
215
+ ].forEach(function(token) {
216
+ [
217
+ "url",
218
+ "bold",
219
+ "italic",
220
+ "strike",
221
+ "code-snippet"
222
+ ].forEach(function(inside) {
223
+ if (token !== inside) Prism.languages.markdown[token].inside.content.inside[inside] = Prism.languages.markdown[inside];
224
+ });
225
+ });
226
+ Prism.hooks.add("after-tokenize", function(env) {
227
+ if (env.language !== "markdown" && env.language !== "md") return;
228
+ function walkTokens(tokens) {
229
+ if (!tokens || typeof tokens === "string") return;
230
+ for (var i = 0, l = tokens.length; i < l; i++) {
231
+ var token = tokens[i];
232
+ if (token.type !== "code") {
233
+ walkTokens(token.content);
234
+ continue;
235
+ }
236
+ var codeLang = token.content[1];
237
+ var codeBlock = token.content[3];
238
+ if (codeLang && codeBlock && codeLang.type === "code-language" && codeBlock.type === "code-block" && typeof codeLang.content === "string") {
239
+ var lang = codeLang.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
240
+ lang = (/[a-z][\w-]*/i.exec(lang) || [""])[0].toLowerCase();
241
+ var alias = "language-" + lang;
242
+ if (!codeBlock.alias) codeBlock.alias = [alias];
243
+ else if (typeof codeBlock.alias === "string") codeBlock.alias = [codeBlock.alias, alias];
244
+ else codeBlock.alias.push(alias);
245
+ }
246
+ }
247
+ }
248
+ walkTokens(env.tokens);
249
+ });
250
+ Prism.hooks.add("wrap", function(env) {
251
+ if (env.type !== "code-block") return;
252
+ var codeLang = "";
253
+ for (var i = 0, l = env.classes.length; i < l; i++) {
254
+ var cls = env.classes[i];
255
+ var match = /language-(.+)/.exec(cls);
256
+ if (match) {
257
+ codeLang = match[1];
258
+ break;
259
+ }
260
+ }
261
+ var grammar = Prism.languages[codeLang];
262
+ if (!grammar) {
263
+ if (codeLang && codeLang !== "none" && Prism.plugins.autoloader) {
264
+ var id = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 0x2386f26fc10000);
265
+ env.attributes["id"] = id;
266
+ Prism.plugins.autoloader.loadLanguages(codeLang, function() {
267
+ var ele = document.getElementById(id);
268
+ if (ele) ele.innerHTML = Prism.highlight(ele.textContent, Prism.languages[codeLang], codeLang);
269
+ });
270
+ }
271
+ } else env.content = Prism.highlight(env.content.value, grammar, codeLang);
272
+ });
273
+ RegExp(Prism.languages.markup.tag.pattern.source, "gi");
274
+ String.fromCodePoint || String.fromCharCode;
275
+ Prism.languages.md = Prism.languages.markdown;
276
+ })(Prism);
277
+ }
278
+
279
+ //#endregion
280
+ export { markdown_exports as n, markdown as t };
@@ -0,0 +1,280 @@
1
+ import { a as RuntimeRendererId, n as RuntimeConfig } from "./index-Nnkn73aD.js";
2
+ //#region src/config/schema.d.ts
3
+ /**
4
+ * 配置文件的字段表——**唯一**手写的部分。
5
+ *
6
+ * 表里只写两件事:配置文件里的路径,和它在 `RuntimeConfig` 里的落点。
7
+ * 叶子类型与取值区间都不写:前者从 `defaultRuntimeConfig()` 推导,后者查
8
+ * `RUNTIME_CONFIG_BOUNDS`。SDK 以后给已有分区加字段时,改这张表一行即可,
9
+ * 不用再写一个 `readInt(..., { min: 1024 })`。
10
+ *
11
+ * 层级也不写:合法子键由「以本层路径为前缀的表项」算出来,
12
+ * 因此不存在「加了字段忘了往 allowlist 里补一行」这种漏。
13
+ */
14
+ /** 叶子的取值形态。`custom` 交给 parse.ts 里的专用解析器 @experimental */
15
+ type ConfigLeafKind = 'boolean' | 'integer' | 'number' | 'string' | 'string[]' | 'capability' | 'custom';
16
+ /** 一个可配字段的声明 @experimental */
17
+ interface ConfigFieldSpec {
18
+ /** `RuntimeConfig` 里的落点路径 */
19
+ readonly target: readonly string[];
20
+ /** 受控枚举取值;给了就按枚举校验 */
21
+ readonly values?: readonly string[];
22
+ /** 覆盖由默认值推导出的叶子类型;仅用于默认值缺席或不足以表达形态的字段 */
23
+ readonly kind?: ConfigLeafKind;
24
+ /** 允许空串 */
25
+ readonly allowEmpty?: boolean;
26
+ /** `custom` 叶子实际覆盖的 `RuntimeConfig` 路径;缺省即 `[target]` */
27
+ readonly covers?: readonly (readonly string[])[];
28
+ }
29
+ /**
30
+ * 分节名与 Console「设置」各页的分组一一对应,字段名与 `RuntimeConfig` 同形,
31
+ * 方便对着界面逐项核对。
32
+ * @experimental
33
+ */
34
+ declare const CONFIG_FIELDS: {
35
+ readonly models: {
36
+ readonly target: readonly ["llm", "entries"];
37
+ readonly kind: "custom";
38
+ };
39
+ readonly defaultModel: {
40
+ readonly target: readonly ["llm", "defaultId"];
41
+ readonly kind: "string";
42
+ };
43
+ readonly 'agentRuntime.streaming': {
44
+ readonly target: readonly ["streaming"];
45
+ };
46
+ readonly 'agentRuntime.renderResult': {
47
+ readonly target: readonly ["renderResult"];
48
+ };
49
+ readonly 'agentRuntime.router': {
50
+ readonly target: readonly ["router", "strategy"];
51
+ readonly values: readonly ["progressive", "full-disclosure"];
52
+ };
53
+ readonly 'agentRuntime.skillState.quarantineThreshold': {
54
+ readonly target: readonly ["skillState", "quarantineThreshold"];
55
+ };
56
+ readonly 'agentRuntime.loop.maxTurns': {
57
+ readonly target: readonly ["loop", "maxTurns"];
58
+ };
59
+ readonly 'agentRuntime.loop.maxHistoryMessages': {
60
+ readonly target: readonly ["loop", "maxHistoryMessages"];
61
+ };
62
+ readonly 'agentRuntime.loop.totalTimeoutMs': {
63
+ readonly target: readonly ["loop", "totalTimeoutMs"];
64
+ };
65
+ readonly 'agentRuntime.loop.toolTimeoutMs': {
66
+ readonly target: readonly ["loop", "toolTimeoutMs"];
67
+ };
68
+ readonly 'agentRuntime.loop.toolResultMaxBytes': {
69
+ readonly target: readonly ["loop", "toolResultMaxBytes"];
70
+ };
71
+ readonly 'agentRuntime.loop.maxDocumentBytes': {
72
+ readonly target: readonly ["loop", "maxDocumentBytes"];
73
+ };
74
+ readonly 'agentRuntime.loop.maxDocumentTextBytes': {
75
+ readonly target: readonly ["loop", "maxDocumentTextBytes"];
76
+ };
77
+ readonly 'agentRuntime.loop.temperature': {
78
+ readonly target: readonly ["loop", "temperature"];
79
+ readonly kind: "number";
80
+ };
81
+ readonly 'agentRuntime.interaction.missingParams': {
82
+ readonly target: readonly ["interaction", "missingParams"];
83
+ readonly values: readonly ["user", "llm"];
84
+ };
85
+ readonly 'agentRuntime.interaction.confirmations': {
86
+ readonly target: readonly ["interaction", "confirmations"];
87
+ readonly values: readonly ["required", "auto-approve"];
88
+ };
89
+ readonly 'agentRuntime.interaction.approvalScope': {
90
+ readonly target: readonly ["interaction", "approvalScope"];
91
+ readonly values: readonly ["once-per-run", "every-call"];
92
+ };
93
+ readonly 'agentRuntime.interaction.interactionTimeoutMs': {
94
+ readonly target: readonly ["interaction", "interactionTimeoutMs"];
95
+ };
96
+ readonly 'agentRuntime.hooks.timeoutMs': {
97
+ readonly target: readonly ["hooks", "timeoutMs"];
98
+ };
99
+ readonly 'agentRuntime.hooks.failOnHookError': {
100
+ readonly target: readonly ["hooks", "failOnHookError"];
101
+ };
102
+ readonly 'agentRuntime.agentCapabilities.todo': {
103
+ readonly target: readonly ["agentCapabilities", "todo"];
104
+ };
105
+ readonly 'agentRuntime.agentCapabilities.generativeUi': {
106
+ readonly target: readonly ["agentCapabilities", "generativeUi"];
107
+ };
108
+ readonly 'agentRuntime.agentCapabilities.skillGeneration': {
109
+ readonly target: readonly ["agentCapabilities", "skillGeneration"];
110
+ };
111
+ readonly 'agentRuntime.agentCapabilities.delegation': {
112
+ readonly target: readonly ["agentCapabilities", "delegation"];
113
+ };
114
+ readonly 'agentRuntime.agentCapabilities.uiPresets': {
115
+ readonly target: readonly ["agentCapabilities", "uiPresets"];
116
+ };
117
+ readonly 'agentRuntime.multimodal.imageAttachments': {
118
+ readonly target: readonly ["multimodal", "imageAttachments"];
119
+ };
120
+ readonly 'agentRuntime.multimodal.pageImageCapture': {
121
+ readonly target: readonly ["multimodal", "pageImageCapture"];
122
+ };
123
+ readonly 'agentRuntime.multimodal.maxImagesPerMessage': {
124
+ readonly target: readonly ["multimodal", "maxImagesPerMessage"];
125
+ };
126
+ readonly 'agentRuntime.multimodal.maxImageBytes': {
127
+ readonly target: readonly ["multimodal", "maxImageBytes"];
128
+ };
129
+ readonly 'agentRuntime.multimodal.minImageArea': {
130
+ readonly target: readonly ["multimodal", "minImageArea"];
131
+ };
132
+ readonly 'sandbox.executor': {
133
+ readonly target: readonly ["sandbox", "executor"];
134
+ readonly values: readonly ["auto", "blob-worker", "iframe-sandbox"];
135
+ };
136
+ readonly 'sandbox.networkPolicy': {
137
+ readonly target: readonly ["sandbox", "networkPolicy"];
138
+ readonly kind: "custom";
139
+ readonly values: readonly ["deny-all", "allow-all"];
140
+ };
141
+ readonly 'sandbox.typescript': {
142
+ readonly target: readonly ["sandbox", "typescript"];
143
+ readonly kind: "custom";
144
+ readonly covers: readonly [readonly ["sandbox", "typescript", "enabled"], readonly ["sandbox", "typescript", "esbuildUrl"], readonly ["sandbox", "typescript", "wasmUrl"]];
145
+ };
146
+ readonly 'sandbox.downloadedFiles': {
147
+ readonly target: readonly ["sandbox", "downloadedFiles"];
148
+ };
149
+ readonly 'sandbox.uploadFiles': {
150
+ readonly target: readonly ["sandbox", "uploadFiles"];
151
+ };
152
+ readonly 'sandbox.allowHttp': {
153
+ readonly target: readonly ["sandbox", "remoteUrl", "allowHttp"];
154
+ };
155
+ readonly 'sandbox.allowPrivateHosts': {
156
+ readonly target: readonly ["sandbox", "remoteUrl", "allowPrivateHosts"];
157
+ };
158
+ readonly 'sandbox.capabilities.readReference': {
159
+ readonly target: readonly ["sandbox", "capabilities", "readReference"];
160
+ readonly kind: "capability";
161
+ };
162
+ readonly 'sandbox.capabilities.readAsset': {
163
+ readonly target: readonly ["sandbox", "capabilities", "readAsset"];
164
+ readonly kind: "capability";
165
+ };
166
+ readonly 'sandbox.capabilities.writeArtifact': {
167
+ readonly target: readonly ["sandbox", "capabilities", "writeArtifact"];
168
+ readonly kind: "capability";
169
+ };
170
+ readonly 'sandbox.capabilities.confirm': {
171
+ readonly target: readonly ["sandbox", "capabilities", "confirm"];
172
+ readonly kind: "capability";
173
+ };
174
+ readonly 'sandbox.capabilities.fetchData': {
175
+ readonly target: readonly ["sandbox", "capabilities", "fetchData"];
176
+ readonly kind: "capability";
177
+ };
178
+ readonly 'sandbox.dataSources': {
179
+ readonly target: readonly ["sandbox", "dataSources"];
180
+ readonly kind: "custom";
181
+ };
182
+ readonly 'sandbox.maxDataSourceBytes': {
183
+ readonly target: readonly ["sandbox", "maxDataSourceBytes"];
184
+ };
185
+ readonly 'sandbox.maxUploadFileBytes': {
186
+ readonly target: readonly ["sandbox", "maxUploadFileBytes"];
187
+ };
188
+ readonly 'sandbox.unsignedSkills': {
189
+ readonly target: readonly ["security", "unsignedSkills"];
190
+ readonly values: readonly ["allow", "warn", "deny"];
191
+ };
192
+ readonly 'sandbox.documentSurface': {
193
+ readonly target: readonly ["documentSurface", "enabled"];
194
+ };
195
+ readonly 'quickPrompts.limit': {
196
+ readonly target: readonly ["quickPromptLimit"];
197
+ };
198
+ readonly 'quickPrompts.items': {
199
+ readonly target: readonly ["quickPrompts"];
200
+ readonly kind: "custom";
201
+ };
202
+ readonly 'privacy.userProfile': {
203
+ readonly target: readonly ["userProfile", "enabled"];
204
+ };
205
+ readonly 'privacy.encryptProfile': {
206
+ readonly target: readonly ["userProfile", "encrypted"];
207
+ };
208
+ readonly 'privacy.injectMaxBytes': {
209
+ readonly target: readonly ["userProfile", "injectMaxBytes"];
210
+ };
211
+ readonly 'privacy.recordLimit': {
212
+ readonly target: readonly ["userProfile", "recordLimit"];
213
+ };
214
+ readonly 'appearance.theme': {
215
+ readonly target: readonly ["appearance", "theme"];
216
+ readonly values: readonly ["light", "dark"];
217
+ };
218
+ readonly 'appearance.locale': {
219
+ readonly target: readonly ["appearance", "locale"];
220
+ readonly values: readonly ["zh", "en"];
221
+ };
222
+ readonly 'appearance.renderer': {
223
+ readonly target: readonly ["appearance", "renderer"];
224
+ readonly values: readonly RuntimeRendererId[];
225
+ };
226
+ readonly 'appearance.dictationLang': {
227
+ readonly target: readonly ["appearance", "dictationLang"];
228
+ readonly allowEmpty: true;
229
+ };
230
+ };
231
+ /**
232
+ * `RuntimeConfig` 里**不可配置**的字段(DV-5)。
233
+ *
234
+ * 它们不是出厂设置:`quickPromptsSeeded` 是写了 `quickPrompts.items` 之后的派生值,
235
+ * `dismissedAutoEntries` 是用户点掉过哪几条模型的运行时状态。
236
+ * 完整性测试要读这张表来算排除项——把排除项内联进测试就是造下一个手抄副本。
237
+ * @experimental
238
+ */
239
+ declare const NON_CONFIGURABLE_RUNTIME_PATHS: readonly string[];
240
+ /** 配置文件覆盖到的全部 `RuntimeConfig` 路径(点号形式),供完整性测试使用 @experimental */
241
+ declare const CONFIGURED_RUNTIME_PATHS: readonly string[];
242
+ //#endregion
243
+ //#region src/config/parse.d.ts
244
+ /** 配置文件能覆盖的 `RuntimeConfig` 子集:逐层可选,数组整体替换 */
245
+ type ConfigDefaultsOf<T> = { [K in keyof T]?: T[K] extends readonly unknown[] ? T[K] : T[K] extends object ? ConfigDefaultsOf<T[K]> : T[K]; };
246
+ /**
247
+ * 配置文件解析出的缺省值。形状是逐层可选的 `RuntimeConfig`——
248
+ * 只有配置文件里**出现过**的键才在这里,缺席的键留给 SDK 默认值。
249
+ * @experimental
250
+ */
251
+ type WebSkillConfigDefaults = ConfigDefaultsOf<RuntimeConfig>;
252
+ /** 解析选项 @experimental */
253
+ interface ParseWebSkillConfigOptions {
254
+ /**
255
+ * 宿主自有的顶层分节名。SDK 不解析也不拒绝,原样回给调用方。
256
+ * 浏览器扩展的 `manifest` 覆写走这里——它跟 `RuntimeConfig` 没有关系。
257
+ */
258
+ readonly hostSections?: readonly string[];
259
+ }
260
+ /** 解析结果的三部分:缺省值、凭据、宿主自有分节 @experimental */
261
+ interface ParsedWebSkillConfig {
262
+ /** 逐段拼出的缺省值 */
263
+ readonly defaults: WebSkillConfigDefaults;
264
+ /** entryId → 明文 apiKey;调用方负责决定它怎么进产物 */
265
+ readonly secrets: Record<string, string>;
266
+ /** `hostSections` 声明的分节原值 */
267
+ readonly host: Record<string, unknown>;
268
+ }
269
+ /**
270
+ * 把一份已解析的配置 JSON 校验并映射成 `RuntimeConfig` 缺省值。
271
+ *
272
+ * 任何不合法的字段都抛 `WebSkillConfigError`(带稳定错误码与完整路径),
273
+ * 不做任何静默忽略。`apiKey` 被摘到 `secrets` 里,不进 `defaults`。
274
+ * @experimental
275
+ */
276
+ declare function parseWebSkillConfig(raw: unknown, options?: ParseWebSkillConfigOptions): ParsedWebSkillConfig;
277
+ /** 配置文件的顶层分节名,供宿主生成文档或校验示例文件 @experimental */
278
+ declare const CONFIG_TOP_LEVEL_SECTIONS: readonly string[];
279
+ //#endregion
280
+ export { parseWebSkillConfig as a, ConfigFieldSpec as c, WebSkillConfigDefaults as i, ConfigLeafKind as l, ParseWebSkillConfigOptions as n, CONFIGURED_RUNTIME_PATHS as o, ParsedWebSkillConfig as r, CONFIG_FIELDS as s, CONFIG_TOP_LEVEL_SECTIONS as t, NON_CONFIGURABLE_RUNTIME_PATHS as u };