@webskill/chatbot 0.1.0 → 0.2.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 +6 -15
- package/dist/chatbot.css +24 -0
- package/dist/index.d.ts +445 -28
- package/dist/index.js +1957 -549
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AgentLoopConfig, ApprovalScope, BridgeCapabilities, ExternalSkillProvider, ExternalToolSource, FileSystemProvider, HookRunner, InteractionRequest, InteractionResponse, LifecycleEventInit, LlmClient, NetworkPolicy, Page, PageQuery, RenderBlock, RenderResultRequest, RunSnapshot, RunSnapshotListEntry, ScriptExecutor, SessionStore, SkillCatalogEntry, SkillIntegrityGuard, SkillOutcomeReporter, SkillStateGuard, UiBridge, UiSpecDrafts, UiSpecEvent, UiSpecSnapshot, UiSurfaceActionRequest, UiSurfaceActionResponse } from "@webskill/sdk";
|
|
2
|
-
import { SandboxMode } from "@webskill/sdk/browser";
|
|
2
|
+
import { SandboxMode, TypeScriptSupportOptions } from "@webskill/sdk/browser";
|
|
3
3
|
import { CustomSurfaceActionEvent, ReactBridgeState, SpecInteractionChannel, SurfaceRegistry, UiSurfaceActionEvent } from "@webskill/sdk/ui-react";
|
|
4
|
+
import { PagePerceptionPolicy, PerceptionRecord, SkillCandidateSink, TodoItem } from "@webskill/sdk/agent";
|
|
4
5
|
import "react";
|
|
5
6
|
import "react/jsx-runtime";
|
|
6
7
|
//#region ../ui-kit/src/i18n/types.d.ts
|
|
@@ -81,20 +82,76 @@ interface RuntimeSandboxConfig {
|
|
|
81
82
|
* 这类由宿主发起的取数都按它判定。两项都默认关,即 https-only 且拒绝内网/环回。
|
|
82
83
|
*/
|
|
83
84
|
remoteUrl: RuntimeRemoteUrlConfig;
|
|
85
|
+
/** 浏览器沙箱的 TypeScript 支持;关闭时 `.ts` 脚本按 `TOOL_UNSUPPORTED` 拒绝 */
|
|
86
|
+
typescript: RuntimeTypeScriptConfig;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 只做类型擦除,不做类型检查。`esbuildUrl` 为绝对 http(s) 地址时按 `remoteUrl` 判定;
|
|
90
|
+
* 同源相对路径与打包器 specifier 不属于出站请求,不参与判定。
|
|
91
|
+
*/
|
|
92
|
+
interface RuntimeTypeScriptConfig {
|
|
93
|
+
enabled: boolean;
|
|
94
|
+
/** esbuild-wasm 的 JS 入口地址;enabled 时必填 */
|
|
95
|
+
esbuildUrl?: string;
|
|
96
|
+
/** esbuild.wasm 二进制地址;缺省由 esbuild 自行推导 */
|
|
97
|
+
wasmUrl?: string;
|
|
84
98
|
}
|
|
85
99
|
/** 与 `@webskill/core` 的 `RemoteUrlPolicy` 同形,但两个字段都是必填(配置需要确定值) */
|
|
86
100
|
interface RuntimeRemoteUrlConfig {
|
|
87
101
|
allowHttp: boolean;
|
|
88
102
|
allowPrivateHosts: boolean;
|
|
89
103
|
}
|
|
90
|
-
|
|
91
|
-
|
|
104
|
+
/** `chrome-builtin` 走浏览器 Prompt API,无端点与密钥;其余三档是云端 HTTP 协议 */
|
|
105
|
+
type RuntimeLlmProvider = 'openai-compatible' | 'anthropic' | 'google' | 'chrome-builtin';
|
|
106
|
+
/**
|
|
107
|
+
* 单个模型条目。`id` 稳定,会话记录与消息归属存的是它,用户改名不影响历史;
|
|
108
|
+
* `label` 只用于展示——同一个 `model` 可能配了两个不同的 `baseUrl`(公司代理与直连),
|
|
109
|
+
* 光看 `model` 区分不出来。
|
|
110
|
+
*/
|
|
111
|
+
interface RuntimeLlmEntry {
|
|
112
|
+
id: string;
|
|
113
|
+
label: string;
|
|
92
114
|
provider: RuntimeLlmProvider;
|
|
93
115
|
baseUrl?: string;
|
|
94
116
|
apiKey?: string;
|
|
95
117
|
model: string;
|
|
96
118
|
requestTimeoutMs?: number;
|
|
97
119
|
}
|
|
120
|
+
/** 模型列表 + 默认项。`defaultId` 由 `mergeRuntimeConfigDefaults` 归一到真实存在的条目 */
|
|
121
|
+
interface RuntimeLlmSelection {
|
|
122
|
+
entries: readonly RuntimeLlmEntry[];
|
|
123
|
+
defaultId?: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Agent 能力开关(0.5.0)。默认值逐项经需求评审确定,不适用「新能力一律默认关」的通则。
|
|
127
|
+
* `todo`:待办清单,默认**开启**——不引入新攻击面、提示词体积远小于生成式 UI catalog,
|
|
128
|
+
* 且关闭时多步任务体验明显更差。
|
|
129
|
+
* `skillGeneration`:技能自动生成,默认**关闭**——会把对话内容写进持久化的候选,
|
|
130
|
+
* 属于新增攻击面(AC-G7 判据一)。
|
|
131
|
+
* `generativeUi`:生成式 UI,默认**关闭**——catalog 描述约 14 KB 计入每次请求。
|
|
132
|
+
* `formAutofill`:跨会话表单自动填充,默认**关闭**(FR-5.10)——会把用户亲手填的内容
|
|
133
|
+
* (可能是手机号、地址)跨会话持久化,属新增攻击面。
|
|
134
|
+
* `uiPresets`:开放给模型的场景预设,默认全开——预设本体按需加载,
|
|
135
|
+
* 只有名字与一行摘要计入请求;置空列表等于完全关闭预设。
|
|
136
|
+
*/
|
|
137
|
+
interface RuntimeAgentCapabilitiesConfig {
|
|
138
|
+
todo: boolean;
|
|
139
|
+
skillGeneration: boolean;
|
|
140
|
+
generativeUi: boolean;
|
|
141
|
+
formAutofill: boolean;
|
|
142
|
+
/** 串行委派(FR-11.8):默认关。一句话可能展开成多个子 run,调用量对用户不可预期 */
|
|
143
|
+
delegation: boolean;
|
|
144
|
+
uiPresets: string[];
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* 未签名技能的处置策略(与 core 的 `UnsignedPolicy` 同形,配置层独立命名)。
|
|
148
|
+
* 默认 `'warn'` 由需求评审定下(FR-1.2):`deny` 会让现存未签名技能立即不可用,
|
|
149
|
+
* 且默认信任库为空时接受集为空;`allow` 等于策略不存在。
|
|
150
|
+
*/
|
|
151
|
+
type UnsignedSkillPolicy = 'allow' | 'warn' | 'deny';
|
|
152
|
+
interface RuntimeSecurityConfig {
|
|
153
|
+
unsignedSkills: UnsignedSkillPolicy;
|
|
154
|
+
}
|
|
98
155
|
/** @experimental */
|
|
99
156
|
interface RuntimeConfig {
|
|
100
157
|
loop: RuntimeLoopConfig;
|
|
@@ -106,7 +163,9 @@ interface RuntimeConfig {
|
|
|
106
163
|
streaming: boolean;
|
|
107
164
|
renderResult: boolean;
|
|
108
165
|
sandbox: RuntimeSandboxConfig;
|
|
109
|
-
llm:
|
|
166
|
+
llm: RuntimeLlmSelection;
|
|
167
|
+
agentCapabilities: RuntimeAgentCapabilitiesConfig;
|
|
168
|
+
security: RuntimeSecurityConfig;
|
|
110
169
|
}
|
|
111
170
|
/** @experimental */
|
|
112
171
|
interface RuntimeConfigStore {
|
|
@@ -121,6 +180,43 @@ interface RuntimeConfigStore {
|
|
|
121
180
|
reset(): Promise<void>;
|
|
122
181
|
}
|
|
123
182
|
//#endregion
|
|
183
|
+
//#region ../ui-kit/src/runtime-config/preferences.d.ts
|
|
184
|
+
/** 导出结构的版本;导入时逐字校验,不做向前兼容猜测 */
|
|
185
|
+
declare const PREFERENCE_EXPORT_VERSION = 1;
|
|
186
|
+
/**
|
|
187
|
+
* 模型条目的可导出形态。`Omit<RuntimeLlmEntry, 'apiKey'>` 让**编译期**就放不进密钥——
|
|
188
|
+
* 靠「序列化时记得删」依赖开发者不忘记,靠类型则依赖编译器(FR-5.2)。
|
|
189
|
+
* @experimental
|
|
190
|
+
*/
|
|
191
|
+
type PreferenceLlmEntry = Omit<RuntimeLlmEntry, 'apiKey'>;
|
|
192
|
+
/** 宿主自己持有的外观状态(不在 `RuntimeConfig` 里,由调用方传入) @experimental */
|
|
193
|
+
interface PreferenceAppearance {
|
|
194
|
+
theme?: string;
|
|
195
|
+
locale?: string;
|
|
196
|
+
renderer?: string;
|
|
197
|
+
}
|
|
198
|
+
/** @experimental */
|
|
199
|
+
interface PreferenceExport {
|
|
200
|
+
version: typeof PREFERENCE_EXPORT_VERSION;
|
|
201
|
+
exportedAt: string;
|
|
202
|
+
preferences: {
|
|
203
|
+
appearance?: PreferenceAppearance;
|
|
204
|
+
interaction?: {
|
|
205
|
+
missingParams?: string;
|
|
206
|
+
confirmations?: string;
|
|
207
|
+
};
|
|
208
|
+
models?: readonly PreferenceLlmEntry[];
|
|
209
|
+
agentCapabilities?: {
|
|
210
|
+
todo?: boolean;
|
|
211
|
+
skillGeneration?: boolean;
|
|
212
|
+
generativeUi?: boolean;
|
|
213
|
+
formAutofill?: boolean;
|
|
214
|
+
delegation?: boolean;
|
|
215
|
+
uiPresets?: string[];
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
124
220
|
//#region src/core/types.d.ts
|
|
125
221
|
/**
|
|
126
222
|
* 治理 port 集合(F1):宿主把 `SkillStatePolicy` 的适配器交给 chatbot,
|
|
@@ -156,12 +252,6 @@ type LifecycleChatEvent = WithChatMeta<LifecycleEventInit>;
|
|
|
156
252
|
* @experimental
|
|
157
253
|
*/
|
|
158
254
|
type RendererKind = 'native' | 'a2ui' | 'openui' | 'vercel';
|
|
159
|
-
/** OpenAI 兼容端点配置(全部缺省时使用内置演示 LLM) @stable */
|
|
160
|
-
interface LlmConfig {
|
|
161
|
-
baseUrl?: string;
|
|
162
|
-
apiKey?: string;
|
|
163
|
-
model?: string;
|
|
164
|
-
}
|
|
165
255
|
/** assistant 消息所属 run 的一次工具调用(终态:completed/failed) @stable */
|
|
166
256
|
interface ChatToolCall {
|
|
167
257
|
callId: string;
|
|
@@ -171,6 +261,13 @@ interface ChatToolCall {
|
|
|
171
261
|
args?: string;
|
|
172
262
|
/** 执行耗时(trace completed/failed 回填;live 由 started→终态计时) */
|
|
173
263
|
durationMs?: number;
|
|
264
|
+
/**
|
|
265
|
+
* failed 时的结构化错误码(如 `TOOL_NOT_ALLOWED`)。
|
|
266
|
+
* 「被策略拒绝」与「执行失败」在 UI 上是两回事,靠错误码区分而不是解析文案。
|
|
267
|
+
*/
|
|
268
|
+
errorCode?: string;
|
|
269
|
+
/** failed 时的错误说明(拒绝时即「被哪条策略拒绝」) */
|
|
270
|
+
errorMessage?: string;
|
|
174
271
|
}
|
|
175
272
|
/** 已落盘的待发送附件(composer 附件适配器产出) @experimental */
|
|
176
273
|
interface ChatAttachmentInput {
|
|
@@ -207,6 +304,19 @@ interface ChatMessage {
|
|
|
207
304
|
blocks?: RenderBlock[];
|
|
208
305
|
/** The completed generative UI surfaces emitted by this run, retained for history replay. */
|
|
209
306
|
surfaces?: UiSpecSnapshot[];
|
|
307
|
+
/** 该 run 的待办清单终态(历史消息重放;未产生清单时缺省) */
|
|
308
|
+
todos?: TodoItem[];
|
|
309
|
+
/**
|
|
310
|
+
* 该 run 内发生的页面只读感知(需求 10 FR-10.5)。
|
|
311
|
+
* 随消息持久化而不只在运行中闪现——事后仍能查到「那一次它读了哪些区域」。
|
|
312
|
+
* @experimental
|
|
313
|
+
*/
|
|
314
|
+
perceptions?: PerceptionRecord[];
|
|
315
|
+
/**
|
|
316
|
+
* 发出本轮请求的模型条目 id(`RuntimeConfig.llm.entries[].id`)。
|
|
317
|
+
* 写在消息上而不是会话上:切换模型只对后续消息生效,已有消息的归属不能被改写。
|
|
318
|
+
*/
|
|
319
|
+
model?: string;
|
|
210
320
|
}
|
|
211
321
|
/** @stable */
|
|
212
322
|
interface ChatSessionMeta {
|
|
@@ -251,12 +361,21 @@ type ChatEvent = {
|
|
|
251
361
|
callId: string;
|
|
252
362
|
name: string;
|
|
253
363
|
args?: string;
|
|
364
|
+
errorCode?: string;
|
|
254
365
|
} | {
|
|
255
366
|
type: 'run-completed';
|
|
256
367
|
runId: string;
|
|
257
368
|
status: 'completed' | 'failed' | 'cancelled';
|
|
258
369
|
output: string;
|
|
259
370
|
activeSkillNames: string[];
|
|
371
|
+
} | {
|
|
372
|
+
type: 'todo-changed';
|
|
373
|
+
runId: string;
|
|
374
|
+
items: readonly TodoItem[];
|
|
375
|
+
} | {
|
|
376
|
+
type: 'page-perceived';
|
|
377
|
+
runId: string;
|
|
378
|
+
record: PerceptionRecord;
|
|
260
379
|
} | {
|
|
261
380
|
type: 'interaction-requested';
|
|
262
381
|
id: string;
|
|
@@ -285,7 +404,7 @@ interface ChatbotConfig {
|
|
|
285
404
|
placeholder?: string;
|
|
286
405
|
/** 会话/trace/artifact 存储根,默认 '/chat' */
|
|
287
406
|
chatRoot?: string;
|
|
288
|
-
/** 覆盖 LLM(缺省走
|
|
407
|
+
/** 覆盖 LLM(缺省走 `RuntimeConfig.llm` → 内置演示 LLM 的选择链) */
|
|
289
408
|
llm?: LlmClient;
|
|
290
409
|
/** AgentLoop 调参(maxTurns、超时等) */
|
|
291
410
|
loopConfig?: AgentLoopConfig;
|
|
@@ -299,6 +418,9 @@ interface ChatbotConfig {
|
|
|
299
418
|
/**
|
|
300
419
|
* 开启后模型多一个 `render_ui` 工具,可面向 AI Component Catalog 直接生成声明式 UI。
|
|
301
420
|
* 默认关:工具描述 + 入参 schema 约 14 KB,会计入每一次请求。
|
|
421
|
+
*
|
|
422
|
+
* 接了 `runtimeConfig` 时以 `RuntimeConfig.agentCapabilities.generativeUi` 为准
|
|
423
|
+
* (设置抽屉里的开关就是它),本字段只在未接配置存储的宿主上生效。
|
|
302
424
|
*/
|
|
303
425
|
generativeUi?: boolean;
|
|
304
426
|
/** 宿主注册好钩子的 `HookRunner`;执行策略(超时/严格模式)按 `RuntimeConfig.hooks` 应用 */
|
|
@@ -308,22 +430,24 @@ interface ChatbotConfig {
|
|
|
308
430
|
* 不注入即完全关闭,行为与 0.0.2 一致。
|
|
309
431
|
*/
|
|
310
432
|
governance?: ChatbotGovernancePorts;
|
|
433
|
+
/**
|
|
434
|
+
* 技能自动生成的候选收货端(需求 9):透传给 `ChatEngineOptions.skillCandidates`。
|
|
435
|
+
* 开关只决定工具进不进列表,候选往哪存由宙主注入;不注入时工具返回
|
|
436
|
+
* `SKILL_GENERATION_DISABLED`,不弹确认框、不产生候选。
|
|
437
|
+
*/
|
|
438
|
+
skillCandidates?: SkillCandidateSink;
|
|
311
439
|
}
|
|
312
440
|
//#endregion
|
|
313
441
|
//#region src/core/hostAdapter.d.ts
|
|
314
442
|
/**
|
|
315
443
|
* 宿主装配口:chatbot 不感知环境(浏览器/Node),全部能力经此注入。
|
|
316
444
|
* 页面动态技能来源同时是外部工具来源与外部技能提供者(同一对象两个 port)。
|
|
445
|
+
* LLM 配置不在这里——它统一由 `RuntimeConfigStore` 承载(0.5.0 起)。
|
|
317
446
|
* @stable
|
|
318
447
|
*/
|
|
319
448
|
interface ChatbotHostAdapter {
|
|
320
449
|
storage: FileSystemProvider;
|
|
321
450
|
skillRoots: string[];
|
|
322
|
-
llmConfig: {
|
|
323
|
-
load(): Promise<LlmConfig | undefined>;
|
|
324
|
-
save(config: LlmConfig): Promise<void>;
|
|
325
|
-
clear(): Promise<void>;
|
|
326
|
-
};
|
|
327
451
|
pageSkillSource?: ExternalToolSource & ExternalSkillProvider;
|
|
328
452
|
navigation: {
|
|
329
453
|
openConsole(): void;
|
|
@@ -332,6 +456,13 @@ interface ChatbotHostAdapter {
|
|
|
332
456
|
};
|
|
333
457
|
/** 缺省 BrowserWorkerScriptExecutor(@webskill/browser);Node 宿主可注入自己的执行器 */
|
|
334
458
|
executor?: ScriptExecutor;
|
|
459
|
+
/**
|
|
460
|
+
* 页面只读感知策略(需求 10)。**只能在这里注入**:启用与否是宿主侧配置,
|
|
461
|
+
* 设置抽屉里没有也不会有开关(FR-10.1)——风险由部署方承担,
|
|
462
|
+
* 不应交给终端用户随手勾选。
|
|
463
|
+
* @experimental
|
|
464
|
+
*/
|
|
465
|
+
pagePerception?: PagePerceptionPolicy;
|
|
335
466
|
}
|
|
336
467
|
//#endregion
|
|
337
468
|
//#region src/core/chatEngine.d.ts
|
|
@@ -343,6 +474,8 @@ interface SandboxExecutorDeps {
|
|
|
343
474
|
capabilities?: BridgeCapabilities;
|
|
344
475
|
approvalScope?: ApprovalScope;
|
|
345
476
|
uiBridge?: UiBridge;
|
|
477
|
+
/** 缺省时 `.ts` 脚本按 `TOOL_UNSUPPORTED` 拒绝 */
|
|
478
|
+
typescript?: TypeScriptSupportOptions;
|
|
346
479
|
}
|
|
347
480
|
/** @stable */
|
|
348
481
|
interface ChatEngineOptions {
|
|
@@ -353,7 +486,12 @@ interface ChatEngineOptions {
|
|
|
353
486
|
runtimeConfig?: RuntimeConfigStore;
|
|
354
487
|
/** 初始渲染框架档(默认 'native';运行中可 setRenderer 热切换) */
|
|
355
488
|
renderer?: RendererKind;
|
|
356
|
-
/**
|
|
489
|
+
/**
|
|
490
|
+
* 注入 `render_ui` 工具,让模型面向 AI Component Catalog 生成声明式 UI。
|
|
491
|
+
*
|
|
492
|
+
* 注入了 `runtimeConfig` 时**以 `RuntimeConfig.agentCapabilities.generativeUi` 为准**,
|
|
493
|
+
* 本字段只在未接配置存储的宿主上生效(否则设置面板里的开关点了不算数)。
|
|
494
|
+
*/
|
|
357
495
|
generativeUi?: boolean;
|
|
358
496
|
/** 沙箱执行器替换点(测试注入 spy 断言构造参数;缺省 BrowserWorkerScriptExecutor) */
|
|
359
497
|
executorFactory?: (deps: SandboxExecutorDeps) => ScriptExecutor;
|
|
@@ -377,18 +515,35 @@ interface ChatEngineOptions {
|
|
|
377
515
|
* 却仍旧照常路由和执行,降级形同虚设。
|
|
378
516
|
*/
|
|
379
517
|
governance?: ChatbotGovernancePorts;
|
|
518
|
+
/**
|
|
519
|
+
* 技能自动生成的候选收货端(需求 12 号)。与 `governance` 同理,装配点在宿主:
|
|
520
|
+
* `@webskill/governance` 的 `createCandidateSink()` 是现成实现。
|
|
521
|
+
*
|
|
522
|
+
* 开关另在 `RuntimeConfig.agentCapabilities.skillGeneration`(默认关);
|
|
523
|
+
* 开关开但未注入本端口时,工具会把 `SKILL_GENERATION_DISABLED` 回给模型。
|
|
524
|
+
*/
|
|
525
|
+
skillCandidates?: SkillCandidateSink;
|
|
380
526
|
}
|
|
381
527
|
/**
|
|
382
528
|
* 对话框引擎:装配 WebSkillRuntime + 会话持久化 + 事件分发。
|
|
383
|
-
*
|
|
529
|
+
* RuntimeConfig 的 load() 是异步的,runtime 在首次 send 前懒装配(#ensureReady)。
|
|
384
530
|
* @stable
|
|
385
531
|
*/
|
|
386
532
|
declare class ChatEngine {
|
|
387
533
|
#private;
|
|
388
534
|
readonly bridge: ReactBridgeState;
|
|
389
535
|
constructor(adapter: ChatbotHostAdapter, options?: ChatEngineOptions);
|
|
536
|
+
/** 当前待办清单快照(宿主可直读;实时更新订阅 `todo-changed` 事件) */
|
|
537
|
+
get todos(): readonly TodoItem[];
|
|
390
538
|
/** 当前渲染框架档 */
|
|
391
539
|
get renderer(): RendererKind;
|
|
540
|
+
/** 当前会话选中的模型条目 id;未显式切换过时为 undefined(走 `RuntimeConfig.llm.defaultId`) */
|
|
541
|
+
get modelId(): string | undefined;
|
|
542
|
+
/**
|
|
543
|
+
* 切换本会话后续消息使用的模型条目(需求 4)。传 `undefined` 回到配置里的默认项。
|
|
544
|
+
* 重装配 runtime 以换掉客户端;已落盘的消息不受影响。
|
|
545
|
+
*/
|
|
546
|
+
setModel(entryId: string | undefined): void;
|
|
392
547
|
/** 渲染框架热切换:复合桥按档分发,无需重装配 runtime(会话句柄保留) */
|
|
393
548
|
setRenderer(renderer: RendererKind): void;
|
|
394
549
|
/** 非 native 三档共用的交互通道(Chatbot 的 SpecInteraction 订阅/attach;core 只产出 catalog 节点树) */
|
|
@@ -401,8 +556,6 @@ declare class ChatEngine {
|
|
|
401
556
|
* runtime/llm/会话句柄,下次 send 重新装配(RuntimeConfig 重新 load() 应用)
|
|
402
557
|
*/
|
|
403
558
|
reloadConfig(): void;
|
|
404
|
-
/** 旧名保留(与 reloadConfig 同语义,向后兼容) */
|
|
405
|
-
reloadLlm(): void;
|
|
406
559
|
/**
|
|
407
560
|
* 会话列表页。归档会话也返回:UI 自己分区展示。
|
|
408
561
|
* `limit` 不给默认值——缺省属于 `SessionStore` 实现,在这里兜底就等于只下推了一半。
|
|
@@ -451,6 +604,12 @@ declare class ChatEngine {
|
|
|
451
604
|
* 完成后与 send 同路径(assistant 消息持久化 + run-completed + trace 落盘)。
|
|
452
605
|
*/
|
|
453
606
|
resume(runId: string): Promise<void>;
|
|
607
|
+
/**
|
|
608
|
+
* 清除跨会话表单填写历史(FR-5.11)。不传 `fieldKey` 即整体清空。
|
|
609
|
+
* 与开关分开:关掉开关只是停止召回,用户往往还想把已存的内容删干净。
|
|
610
|
+
* @experimental
|
|
611
|
+
*/
|
|
612
|
+
clearFormAutofill(fieldKey?: string): Promise<void>;
|
|
454
613
|
}
|
|
455
614
|
//#endregion
|
|
456
615
|
//#region src/core/interactionBridge.d.ts
|
|
@@ -577,8 +736,11 @@ declare const chatbotDictionary: {
|
|
|
577
736
|
'tool.status.running': string;
|
|
578
737
|
'tool.status.completed': string;
|
|
579
738
|
'tool.status.failed': string;
|
|
739
|
+
'tool.status.denied': string;
|
|
580
740
|
'tool.duration': string;
|
|
581
741
|
'tool.args': string;
|
|
742
|
+
'tool.denied.reason': string;
|
|
743
|
+
'tool.failed.reason': string;
|
|
582
744
|
'cot.thinking': string;
|
|
583
745
|
'cot.thought': string;
|
|
584
746
|
'cot.summary': string;
|
|
@@ -586,12 +748,20 @@ declare const chatbotDictionary: {
|
|
|
586
748
|
'cot.working': string;
|
|
587
749
|
'trace.title': string;
|
|
588
750
|
'trace.skill': string;
|
|
751
|
+
'perception.reading': string;
|
|
752
|
+
'perception.excluded': string;
|
|
589
753
|
'trace.phase.route': string;
|
|
590
754
|
'trace.phase.activate': string;
|
|
591
755
|
'trace.phase.execute': string;
|
|
592
756
|
'trace.phase.interact': string;
|
|
593
757
|
'trace.phase.complete': string;
|
|
594
758
|
'trace.phase.fail': string;
|
|
759
|
+
'todo.title': string;
|
|
760
|
+
'todo.progress': string;
|
|
761
|
+
'todo.status.pending': string;
|
|
762
|
+
'todo.status.inProgress': string;
|
|
763
|
+
'todo.status.completed': string;
|
|
764
|
+
'todo.delegatedTo': string;
|
|
595
765
|
'interaction.ask.title': string;
|
|
596
766
|
'interaction.confirm.title': string;
|
|
597
767
|
'interaction.form.title': string;
|
|
@@ -600,6 +770,7 @@ declare const chatbotDictionary: {
|
|
|
600
770
|
'interaction.authorize.description': string;
|
|
601
771
|
'interaction.authorize.capability': string;
|
|
602
772
|
'interaction.authorize.details': string;
|
|
773
|
+
'interaction.origin': string;
|
|
603
774
|
'interaction.submit': string;
|
|
604
775
|
'interaction.cancel': string;
|
|
605
776
|
'interaction.confirm': string;
|
|
@@ -627,14 +798,37 @@ declare const chatbotDictionary: {
|
|
|
627
798
|
'composer.attachments': string;
|
|
628
799
|
'composer.addAttachment': string;
|
|
629
800
|
'composer.removeAttachment': string;
|
|
801
|
+
'composer.model': string;
|
|
802
|
+
'composer.model.demo': string;
|
|
803
|
+
'composer.dictate': string;
|
|
804
|
+
'composer.dictate.stop': string;
|
|
805
|
+
'composer.dictate.recording': string;
|
|
806
|
+
'composer.dictate.api-missing': string;
|
|
807
|
+
'composer.dictate.insecure-context': string;
|
|
630
808
|
'settings.title': string;
|
|
631
809
|
'settings.model.title': string;
|
|
632
810
|
'settings.model.description': string;
|
|
811
|
+
'settings.model.empty': string;
|
|
812
|
+
'settings.model.add': string;
|
|
813
|
+
'settings.model.edit': string;
|
|
814
|
+
'settings.model.remove': string;
|
|
815
|
+
'settings.model.setDefault': string;
|
|
816
|
+
'settings.model.default': string;
|
|
817
|
+
'settings.model.label': string;
|
|
818
|
+
'settings.model.labelNote': string;
|
|
819
|
+
'settings.model.unavailable': string;
|
|
820
|
+
'settings.model.cancel': string;
|
|
633
821
|
'settings.provider': string;
|
|
634
822
|
'settings.providerNote': string;
|
|
635
823
|
'settings.provider.openai-compatible': string;
|
|
636
824
|
'settings.provider.anthropic': string;
|
|
637
825
|
'settings.provider.google': string;
|
|
826
|
+
'settings.provider.chrome-builtin': string;
|
|
827
|
+
'settings.provider.chrome-builtin.note': string;
|
|
828
|
+
'settings.provider.chrome-builtin.limitation': string;
|
|
829
|
+
'settings.chromeBuiltin.api-missing': string;
|
|
830
|
+
'settings.chromeBuiltin.model-not-ready': string;
|
|
831
|
+
'settings.chromeBuiltin.unsupported-browser': string;
|
|
638
832
|
'settings.provider.anthropic.note': string;
|
|
639
833
|
'settings.provider.google.note': string;
|
|
640
834
|
'settings.endpoint': string;
|
|
@@ -654,6 +848,30 @@ declare const chatbotDictionary: {
|
|
|
654
848
|
'settings.demoNote': string;
|
|
655
849
|
'settings.save': string;
|
|
656
850
|
'settings.clear': string;
|
|
851
|
+
'settings.agent.title': string;
|
|
852
|
+
'settings.agent.description': string;
|
|
853
|
+
'settings.agent.todo': string;
|
|
854
|
+
'settings.agent.todoNote': string;
|
|
855
|
+
'settings.agent.generativeUi': string;
|
|
856
|
+
'settings.agent.generativeUiNote': string;
|
|
857
|
+
'settings.agent.skillGeneration': string;
|
|
858
|
+
'settings.agent.skillGenerationNote': string;
|
|
859
|
+
'settings.agent.delegation': string;
|
|
860
|
+
'settings.agent.delegationNote': string;
|
|
861
|
+
'settings.agent.formAutofill': string;
|
|
862
|
+
'settings.agent.formAutofillNote': string;
|
|
863
|
+
'settings.agent.formAutofillClear': string;
|
|
864
|
+
'settings.agent.formAutofillCleared': string;
|
|
865
|
+
'settings.preferences.title': string;
|
|
866
|
+
'settings.preferences.description': string;
|
|
867
|
+
'settings.preferences.export': string;
|
|
868
|
+
'settings.preferences.import': string;
|
|
869
|
+
'settings.preferences.exported': string;
|
|
870
|
+
'settings.preferences.imported': string;
|
|
871
|
+
'settings.voice.title': string;
|
|
872
|
+
'settings.voice.description': string;
|
|
873
|
+
'settings.voice.lang': string;
|
|
874
|
+
'settings.voice.langFollow': string;
|
|
657
875
|
'settings.appearance.title': string;
|
|
658
876
|
'settings.appearance.description': string;
|
|
659
877
|
'settings.theme': string;
|
|
@@ -719,8 +937,11 @@ declare const chatbotDictionary: {
|
|
|
719
937
|
'tool.status.running': string;
|
|
720
938
|
'tool.status.completed': string;
|
|
721
939
|
'tool.status.failed': string;
|
|
940
|
+
'tool.status.denied': string;
|
|
722
941
|
'tool.duration': string;
|
|
723
942
|
'tool.args': string;
|
|
943
|
+
'tool.denied.reason': string;
|
|
944
|
+
'tool.failed.reason': string;
|
|
724
945
|
'cot.thinking': string;
|
|
725
946
|
'cot.thought': string;
|
|
726
947
|
'cot.summary': string;
|
|
@@ -728,12 +949,20 @@ declare const chatbotDictionary: {
|
|
|
728
949
|
'cot.working': string;
|
|
729
950
|
'trace.title': string;
|
|
730
951
|
'trace.skill': string;
|
|
952
|
+
'perception.reading': string;
|
|
953
|
+
'perception.excluded': string;
|
|
731
954
|
'trace.phase.route': string;
|
|
732
955
|
'trace.phase.activate': string;
|
|
733
956
|
'trace.phase.execute': string;
|
|
734
957
|
'trace.phase.interact': string;
|
|
735
958
|
'trace.phase.complete': string;
|
|
736
959
|
'trace.phase.fail': string;
|
|
960
|
+
'todo.title': string;
|
|
961
|
+
'todo.progress': string;
|
|
962
|
+
'todo.status.pending': string;
|
|
963
|
+
'todo.status.inProgress': string;
|
|
964
|
+
'todo.status.completed': string;
|
|
965
|
+
'todo.delegatedTo': string;
|
|
737
966
|
'interaction.ask.title': string;
|
|
738
967
|
'interaction.confirm.title': string;
|
|
739
968
|
'interaction.form.title': string;
|
|
@@ -742,6 +971,7 @@ declare const chatbotDictionary: {
|
|
|
742
971
|
'interaction.authorize.description': string;
|
|
743
972
|
'interaction.authorize.capability': string;
|
|
744
973
|
'interaction.authorize.details': string;
|
|
974
|
+
'interaction.origin': string;
|
|
745
975
|
'interaction.submit': string;
|
|
746
976
|
'interaction.cancel': string;
|
|
747
977
|
'interaction.confirm': string;
|
|
@@ -769,14 +999,37 @@ declare const chatbotDictionary: {
|
|
|
769
999
|
'composer.attachments': string;
|
|
770
1000
|
'composer.addAttachment': string;
|
|
771
1001
|
'composer.removeAttachment': string;
|
|
1002
|
+
'composer.model': string;
|
|
1003
|
+
'composer.model.demo': string;
|
|
1004
|
+
'composer.dictate': string;
|
|
1005
|
+
'composer.dictate.stop': string;
|
|
1006
|
+
'composer.dictate.recording': string;
|
|
1007
|
+
'composer.dictate.api-missing': string;
|
|
1008
|
+
'composer.dictate.insecure-context': string;
|
|
772
1009
|
'settings.title': string;
|
|
773
1010
|
'settings.model.title': string;
|
|
774
1011
|
'settings.model.description': string;
|
|
1012
|
+
'settings.model.empty': string;
|
|
1013
|
+
'settings.model.add': string;
|
|
1014
|
+
'settings.model.edit': string;
|
|
1015
|
+
'settings.model.remove': string;
|
|
1016
|
+
'settings.model.setDefault': string;
|
|
1017
|
+
'settings.model.default': string;
|
|
1018
|
+
'settings.model.label': string;
|
|
1019
|
+
'settings.model.labelNote': string;
|
|
1020
|
+
'settings.model.unavailable': string;
|
|
1021
|
+
'settings.model.cancel': string;
|
|
775
1022
|
'settings.provider': string;
|
|
776
1023
|
'settings.providerNote': string;
|
|
777
1024
|
'settings.provider.openai-compatible': string;
|
|
778
1025
|
'settings.provider.anthropic': string;
|
|
779
1026
|
'settings.provider.google': string;
|
|
1027
|
+
'settings.provider.chrome-builtin': string;
|
|
1028
|
+
'settings.provider.chrome-builtin.note': string;
|
|
1029
|
+
'settings.provider.chrome-builtin.limitation': string;
|
|
1030
|
+
'settings.chromeBuiltin.api-missing': string;
|
|
1031
|
+
'settings.chromeBuiltin.model-not-ready': string;
|
|
1032
|
+
'settings.chromeBuiltin.unsupported-browser': string;
|
|
780
1033
|
'settings.provider.anthropic.note': string;
|
|
781
1034
|
'settings.provider.google.note': string;
|
|
782
1035
|
'settings.endpoint': string;
|
|
@@ -796,6 +1049,30 @@ declare const chatbotDictionary: {
|
|
|
796
1049
|
'settings.demoNote': string;
|
|
797
1050
|
'settings.save': string;
|
|
798
1051
|
'settings.clear': string;
|
|
1052
|
+
'settings.agent.title': string;
|
|
1053
|
+
'settings.agent.description': string;
|
|
1054
|
+
'settings.agent.todo': string;
|
|
1055
|
+
'settings.agent.todoNote': string;
|
|
1056
|
+
'settings.agent.generativeUi': string;
|
|
1057
|
+
'settings.agent.generativeUiNote': string;
|
|
1058
|
+
'settings.agent.skillGeneration': string;
|
|
1059
|
+
'settings.agent.skillGenerationNote': string;
|
|
1060
|
+
'settings.agent.delegation': string;
|
|
1061
|
+
'settings.agent.delegationNote': string;
|
|
1062
|
+
'settings.agent.formAutofill': string;
|
|
1063
|
+
'settings.agent.formAutofillNote': string;
|
|
1064
|
+
'settings.agent.formAutofillClear': string;
|
|
1065
|
+
'settings.agent.formAutofillCleared': string;
|
|
1066
|
+
'settings.preferences.title': string;
|
|
1067
|
+
'settings.preferences.description': string;
|
|
1068
|
+
'settings.preferences.export': string;
|
|
1069
|
+
'settings.preferences.import': string;
|
|
1070
|
+
'settings.preferences.exported': string;
|
|
1071
|
+
'settings.preferences.imported': string;
|
|
1072
|
+
'settings.voice.title': string;
|
|
1073
|
+
'settings.voice.description': string;
|
|
1074
|
+
'settings.voice.lang': string;
|
|
1075
|
+
'settings.voice.langFollow': string;
|
|
799
1076
|
'settings.appearance.title': string;
|
|
800
1077
|
'settings.appearance.description': string;
|
|
801
1078
|
'settings.theme': string;
|
|
@@ -864,8 +1141,11 @@ declare const useT: () => TranslateFn<{
|
|
|
864
1141
|
'tool.status.running': string;
|
|
865
1142
|
'tool.status.completed': string;
|
|
866
1143
|
'tool.status.failed': string;
|
|
1144
|
+
'tool.status.denied': string;
|
|
867
1145
|
'tool.duration': string;
|
|
868
1146
|
'tool.args': string;
|
|
1147
|
+
'tool.denied.reason': string;
|
|
1148
|
+
'tool.failed.reason': string;
|
|
869
1149
|
'cot.thinking': string;
|
|
870
1150
|
'cot.thought': string;
|
|
871
1151
|
'cot.summary': string;
|
|
@@ -873,12 +1153,20 @@ declare const useT: () => TranslateFn<{
|
|
|
873
1153
|
'cot.working': string;
|
|
874
1154
|
'trace.title': string;
|
|
875
1155
|
'trace.skill': string;
|
|
1156
|
+
'perception.reading': string;
|
|
1157
|
+
'perception.excluded': string;
|
|
876
1158
|
'trace.phase.route': string;
|
|
877
1159
|
'trace.phase.activate': string;
|
|
878
1160
|
'trace.phase.execute': string;
|
|
879
1161
|
'trace.phase.interact': string;
|
|
880
1162
|
'trace.phase.complete': string;
|
|
881
1163
|
'trace.phase.fail': string;
|
|
1164
|
+
'todo.title': string;
|
|
1165
|
+
'todo.progress': string;
|
|
1166
|
+
'todo.status.pending': string;
|
|
1167
|
+
'todo.status.inProgress': string;
|
|
1168
|
+
'todo.status.completed': string;
|
|
1169
|
+
'todo.delegatedTo': string;
|
|
882
1170
|
'interaction.ask.title': string;
|
|
883
1171
|
'interaction.confirm.title': string;
|
|
884
1172
|
'interaction.form.title': string;
|
|
@@ -887,6 +1175,7 @@ declare const useT: () => TranslateFn<{
|
|
|
887
1175
|
'interaction.authorize.description': string;
|
|
888
1176
|
'interaction.authorize.capability': string;
|
|
889
1177
|
'interaction.authorize.details': string;
|
|
1178
|
+
'interaction.origin': string;
|
|
890
1179
|
'interaction.submit': string;
|
|
891
1180
|
'interaction.cancel': string;
|
|
892
1181
|
'interaction.confirm': string;
|
|
@@ -914,14 +1203,37 @@ declare const useT: () => TranslateFn<{
|
|
|
914
1203
|
'composer.attachments': string;
|
|
915
1204
|
'composer.addAttachment': string;
|
|
916
1205
|
'composer.removeAttachment': string;
|
|
1206
|
+
'composer.model': string;
|
|
1207
|
+
'composer.model.demo': string;
|
|
1208
|
+
'composer.dictate': string;
|
|
1209
|
+
'composer.dictate.stop': string;
|
|
1210
|
+
'composer.dictate.recording': string;
|
|
1211
|
+
'composer.dictate.api-missing': string;
|
|
1212
|
+
'composer.dictate.insecure-context': string;
|
|
917
1213
|
'settings.title': string;
|
|
918
1214
|
'settings.model.title': string;
|
|
919
1215
|
'settings.model.description': string;
|
|
1216
|
+
'settings.model.empty': string;
|
|
1217
|
+
'settings.model.add': string;
|
|
1218
|
+
'settings.model.edit': string;
|
|
1219
|
+
'settings.model.remove': string;
|
|
1220
|
+
'settings.model.setDefault': string;
|
|
1221
|
+
'settings.model.default': string;
|
|
1222
|
+
'settings.model.label': string;
|
|
1223
|
+
'settings.model.labelNote': string;
|
|
1224
|
+
'settings.model.unavailable': string;
|
|
1225
|
+
'settings.model.cancel': string;
|
|
920
1226
|
'settings.provider': string;
|
|
921
1227
|
'settings.providerNote': string;
|
|
922
1228
|
'settings.provider.openai-compatible': string;
|
|
923
1229
|
'settings.provider.anthropic': string;
|
|
924
1230
|
'settings.provider.google': string;
|
|
1231
|
+
'settings.provider.chrome-builtin': string;
|
|
1232
|
+
'settings.provider.chrome-builtin.note': string;
|
|
1233
|
+
'settings.provider.chrome-builtin.limitation': string;
|
|
1234
|
+
'settings.chromeBuiltin.api-missing': string;
|
|
1235
|
+
'settings.chromeBuiltin.model-not-ready': string;
|
|
1236
|
+
'settings.chromeBuiltin.unsupported-browser': string;
|
|
925
1237
|
'settings.provider.anthropic.note': string;
|
|
926
1238
|
'settings.provider.google.note': string;
|
|
927
1239
|
'settings.endpoint': string;
|
|
@@ -941,6 +1253,30 @@ declare const useT: () => TranslateFn<{
|
|
|
941
1253
|
'settings.demoNote': string;
|
|
942
1254
|
'settings.save': string;
|
|
943
1255
|
'settings.clear': string;
|
|
1256
|
+
'settings.agent.title': string;
|
|
1257
|
+
'settings.agent.description': string;
|
|
1258
|
+
'settings.agent.todo': string;
|
|
1259
|
+
'settings.agent.todoNote': string;
|
|
1260
|
+
'settings.agent.generativeUi': string;
|
|
1261
|
+
'settings.agent.generativeUiNote': string;
|
|
1262
|
+
'settings.agent.skillGeneration': string;
|
|
1263
|
+
'settings.agent.skillGenerationNote': string;
|
|
1264
|
+
'settings.agent.delegation': string;
|
|
1265
|
+
'settings.agent.delegationNote': string;
|
|
1266
|
+
'settings.agent.formAutofill': string;
|
|
1267
|
+
'settings.agent.formAutofillNote': string;
|
|
1268
|
+
'settings.agent.formAutofillClear': string;
|
|
1269
|
+
'settings.agent.formAutofillCleared': string;
|
|
1270
|
+
'settings.preferences.title': string;
|
|
1271
|
+
'settings.preferences.description': string;
|
|
1272
|
+
'settings.preferences.export': string;
|
|
1273
|
+
'settings.preferences.import': string;
|
|
1274
|
+
'settings.preferences.exported': string;
|
|
1275
|
+
'settings.preferences.imported': string;
|
|
1276
|
+
'settings.voice.title': string;
|
|
1277
|
+
'settings.voice.description': string;
|
|
1278
|
+
'settings.voice.lang': string;
|
|
1279
|
+
'settings.voice.langFollow': string;
|
|
944
1280
|
'settings.appearance.title': string;
|
|
945
1281
|
'settings.appearance.description': string;
|
|
946
1282
|
'settings.theme': string;
|
|
@@ -1006,8 +1342,11 @@ declare const useT: () => TranslateFn<{
|
|
|
1006
1342
|
'tool.status.running': string;
|
|
1007
1343
|
'tool.status.completed': string;
|
|
1008
1344
|
'tool.status.failed': string;
|
|
1345
|
+
'tool.status.denied': string;
|
|
1009
1346
|
'tool.duration': string;
|
|
1010
1347
|
'tool.args': string;
|
|
1348
|
+
'tool.denied.reason': string;
|
|
1349
|
+
'tool.failed.reason': string;
|
|
1011
1350
|
'cot.thinking': string;
|
|
1012
1351
|
'cot.thought': string;
|
|
1013
1352
|
'cot.summary': string;
|
|
@@ -1015,12 +1354,20 @@ declare const useT: () => TranslateFn<{
|
|
|
1015
1354
|
'cot.working': string;
|
|
1016
1355
|
'trace.title': string;
|
|
1017
1356
|
'trace.skill': string;
|
|
1357
|
+
'perception.reading': string;
|
|
1358
|
+
'perception.excluded': string;
|
|
1018
1359
|
'trace.phase.route': string;
|
|
1019
1360
|
'trace.phase.activate': string;
|
|
1020
1361
|
'trace.phase.execute': string;
|
|
1021
1362
|
'trace.phase.interact': string;
|
|
1022
1363
|
'trace.phase.complete': string;
|
|
1023
1364
|
'trace.phase.fail': string;
|
|
1365
|
+
'todo.title': string;
|
|
1366
|
+
'todo.progress': string;
|
|
1367
|
+
'todo.status.pending': string;
|
|
1368
|
+
'todo.status.inProgress': string;
|
|
1369
|
+
'todo.status.completed': string;
|
|
1370
|
+
'todo.delegatedTo': string;
|
|
1024
1371
|
'interaction.ask.title': string;
|
|
1025
1372
|
'interaction.confirm.title': string;
|
|
1026
1373
|
'interaction.form.title': string;
|
|
@@ -1029,6 +1376,7 @@ declare const useT: () => TranslateFn<{
|
|
|
1029
1376
|
'interaction.authorize.description': string;
|
|
1030
1377
|
'interaction.authorize.capability': string;
|
|
1031
1378
|
'interaction.authorize.details': string;
|
|
1379
|
+
'interaction.origin': string;
|
|
1032
1380
|
'interaction.submit': string;
|
|
1033
1381
|
'interaction.cancel': string;
|
|
1034
1382
|
'interaction.confirm': string;
|
|
@@ -1056,14 +1404,37 @@ declare const useT: () => TranslateFn<{
|
|
|
1056
1404
|
'composer.attachments': string;
|
|
1057
1405
|
'composer.addAttachment': string;
|
|
1058
1406
|
'composer.removeAttachment': string;
|
|
1407
|
+
'composer.model': string;
|
|
1408
|
+
'composer.model.demo': string;
|
|
1409
|
+
'composer.dictate': string;
|
|
1410
|
+
'composer.dictate.stop': string;
|
|
1411
|
+
'composer.dictate.recording': string;
|
|
1412
|
+
'composer.dictate.api-missing': string;
|
|
1413
|
+
'composer.dictate.insecure-context': string;
|
|
1059
1414
|
'settings.title': string;
|
|
1060
1415
|
'settings.model.title': string;
|
|
1061
1416
|
'settings.model.description': string;
|
|
1417
|
+
'settings.model.empty': string;
|
|
1418
|
+
'settings.model.add': string;
|
|
1419
|
+
'settings.model.edit': string;
|
|
1420
|
+
'settings.model.remove': string;
|
|
1421
|
+
'settings.model.setDefault': string;
|
|
1422
|
+
'settings.model.default': string;
|
|
1423
|
+
'settings.model.label': string;
|
|
1424
|
+
'settings.model.labelNote': string;
|
|
1425
|
+
'settings.model.unavailable': string;
|
|
1426
|
+
'settings.model.cancel': string;
|
|
1062
1427
|
'settings.provider': string;
|
|
1063
1428
|
'settings.providerNote': string;
|
|
1064
1429
|
'settings.provider.openai-compatible': string;
|
|
1065
1430
|
'settings.provider.anthropic': string;
|
|
1066
1431
|
'settings.provider.google': string;
|
|
1432
|
+
'settings.provider.chrome-builtin': string;
|
|
1433
|
+
'settings.provider.chrome-builtin.note': string;
|
|
1434
|
+
'settings.provider.chrome-builtin.limitation': string;
|
|
1435
|
+
'settings.chromeBuiltin.api-missing': string;
|
|
1436
|
+
'settings.chromeBuiltin.model-not-ready': string;
|
|
1437
|
+
'settings.chromeBuiltin.unsupported-browser': string;
|
|
1067
1438
|
'settings.provider.anthropic.note': string;
|
|
1068
1439
|
'settings.provider.google.note': string;
|
|
1069
1440
|
'settings.endpoint': string;
|
|
@@ -1083,6 +1454,30 @@ declare const useT: () => TranslateFn<{
|
|
|
1083
1454
|
'settings.demoNote': string;
|
|
1084
1455
|
'settings.save': string;
|
|
1085
1456
|
'settings.clear': string;
|
|
1457
|
+
'settings.agent.title': string;
|
|
1458
|
+
'settings.agent.description': string;
|
|
1459
|
+
'settings.agent.todo': string;
|
|
1460
|
+
'settings.agent.todoNote': string;
|
|
1461
|
+
'settings.agent.generativeUi': string;
|
|
1462
|
+
'settings.agent.generativeUiNote': string;
|
|
1463
|
+
'settings.agent.skillGeneration': string;
|
|
1464
|
+
'settings.agent.skillGenerationNote': string;
|
|
1465
|
+
'settings.agent.delegation': string;
|
|
1466
|
+
'settings.agent.delegationNote': string;
|
|
1467
|
+
'settings.agent.formAutofill': string;
|
|
1468
|
+
'settings.agent.formAutofillNote': string;
|
|
1469
|
+
'settings.agent.formAutofillClear': string;
|
|
1470
|
+
'settings.agent.formAutofillCleared': string;
|
|
1471
|
+
'settings.preferences.title': string;
|
|
1472
|
+
'settings.preferences.description': string;
|
|
1473
|
+
'settings.preferences.export': string;
|
|
1474
|
+
'settings.preferences.import': string;
|
|
1475
|
+
'settings.preferences.exported': string;
|
|
1476
|
+
'settings.preferences.imported': string;
|
|
1477
|
+
'settings.voice.title': string;
|
|
1478
|
+
'settings.voice.description': string;
|
|
1479
|
+
'settings.voice.lang': string;
|
|
1480
|
+
'settings.voice.langFollow': string;
|
|
1086
1481
|
'settings.appearance.title': string;
|
|
1087
1482
|
'settings.appearance.description': string;
|
|
1088
1483
|
'settings.theme': string;
|
|
@@ -1116,6 +1511,11 @@ interface AppearanceChange {
|
|
|
1116
1511
|
locale?: Locale;
|
|
1117
1512
|
/** 渲染框架档(native/a2ui);宿主持久化后经 Chatbot renderer prop 回注 */
|
|
1118
1513
|
renderer?: RendererKind;
|
|
1514
|
+
/**
|
|
1515
|
+
* 语音识别语言(BCP-47,需求 7 的 FR-7.7)。空串表示跟随界面语言——
|
|
1516
|
+
* 用 `''` 而不是省略字段,是为了让「改回跟随」也能作为一次变更传给宿主。
|
|
1517
|
+
*/
|
|
1518
|
+
dictationLang?: string;
|
|
1119
1519
|
}
|
|
1120
1520
|
//#endregion
|
|
1121
1521
|
//#region src/react/useChatLayout.d.ts
|
|
@@ -1135,6 +1535,8 @@ interface ChatbotProps {
|
|
|
1135
1535
|
theme?: ChatTheme;
|
|
1136
1536
|
/** 交互渲染框架档(默认 'native';'a2ui' 需宿主安装 optional peer @a2ui/lit) */
|
|
1137
1537
|
renderer?: RendererKind;
|
|
1538
|
+
/** 语音识别语言(BCP-47);缺省跟随界面语言(FR-7.7) */
|
|
1539
|
+
dictationLang?: string;
|
|
1138
1540
|
/** Native custom surface 的显式 renderer/schema allowlist。 */
|
|
1139
1541
|
surfaceRegistry?: SurfaceRegistry;
|
|
1140
1542
|
/** 布局档(默认 'auto':按容器尺寸在 fullscreen / embedded / mobile 之间判定) */
|
|
@@ -1151,7 +1553,7 @@ interface ChatbotProps {
|
|
|
1151
1553
|
* presentation shell and accessible thread primitives.
|
|
1152
1554
|
* @stable
|
|
1153
1555
|
*/
|
|
1154
|
-
declare function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, renderer: rendererProp, surfaceRegistry, layout, onAppearanceChange, onEngineReady }: ChatbotProps): import("react").JSX.Element;
|
|
1556
|
+
declare function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, renderer: rendererProp, dictationLang: dictationLangProp, surfaceRegistry, layout, onAppearanceChange, onEngineReady }: ChatbotProps): import("react").JSX.Element;
|
|
1155
1557
|
//#endregion
|
|
1156
1558
|
//#region src/react/A2uiSurfaceHost.d.ts
|
|
1157
1559
|
/** @experimental */
|
|
@@ -1309,24 +1711,39 @@ declare function InterruptedBanner({ engine, sessionId }: InterruptedBannerProps
|
|
|
1309
1711
|
/** @stable */
|
|
1310
1712
|
interface SettingsDrawerProps {
|
|
1311
1713
|
open: boolean;
|
|
1312
|
-
llmConfig: ChatbotHostAdapter['llmConfig'];
|
|
1313
1714
|
/**
|
|
1314
|
-
*
|
|
1315
|
-
*
|
|
1715
|
+
* 运行环境配置存储:模型列表、流式、temperature、Agent 能力全部读写这里。
|
|
1716
|
+
* 缺省时模型区只读展示(宿主没接配置源,谈不上持久化)。
|
|
1316
1717
|
*/
|
|
1317
1718
|
runtimeConfig?: RuntimeConfigStore;
|
|
1318
1719
|
theme: ChatTheme;
|
|
1319
1720
|
locale: Locale;
|
|
1320
|
-
/** 当前渲染框架档(Appearance
|
|
1721
|
+
/** 当前渲染框架档(Appearance 区可切换;缺 optional peer 的档位置灰) */
|
|
1321
1722
|
renderer?: RendererKind;
|
|
1723
|
+
/**
|
|
1724
|
+
* 语音识别语言(BCP-47);空串即跟随界面语言(FR-7.7)。
|
|
1725
|
+
* @experimental
|
|
1726
|
+
*/
|
|
1727
|
+
dictationLang?: string;
|
|
1322
1728
|
/** 主题/语言切换时回调(宿主借此持久化;内部 state 由 Chatbot 跟随) */
|
|
1323
1729
|
onAppearanceChange?(next: AppearanceChange): void;
|
|
1324
1730
|
/** 保存/清除成功后回调(Chatbot 借此触发 engine.reloadConfig) */
|
|
1325
1731
|
onSaved(): void;
|
|
1732
|
+
/**
|
|
1733
|
+
* 清除跨会话表单填写历史(FR-5.11)。不注入即不渲染按钮(R11)。
|
|
1734
|
+
* @experimental
|
|
1735
|
+
*/
|
|
1736
|
+
onClearFormAutofill?(): Promise<void>;
|
|
1737
|
+
/**
|
|
1738
|
+
* 导出偏好时回调(FR-5.1):不注入时默认触发浏览器下载;
|
|
1739
|
+
* 宿主要改成写入自己的存储(或复制到剪贴板)时接本回调。
|
|
1740
|
+
* @experimental
|
|
1741
|
+
*/
|
|
1742
|
+
onExportPreferences?(data: PreferenceExport): void;
|
|
1326
1743
|
onClose(): void;
|
|
1327
1744
|
}
|
|
1328
|
-
/**
|
|
1329
|
-
declare function SettingsDrawer({ open,
|
|
1745
|
+
/** 设置抽屉:模型列表(增删改 / 设默认 / 逐条探测)+ 流式与 temperature + Agent 能力 + 外观 @stable */
|
|
1746
|
+
declare function SettingsDrawer({ open, runtimeConfig, theme, locale, renderer, dictationLang, onAppearanceChange, onSaved, onClearFormAutofill, onExportPreferences, onClose }: SettingsDrawerProps): import("react").JSX.Element;
|
|
1330
1747
|
//#endregion
|
|
1331
1748
|
//#region src/react/ErrorCard.d.ts
|
|
1332
1749
|
/** @stable */
|
|
@@ -1339,4 +1756,4 @@ interface ErrorCardProps {
|
|
|
1339
1756
|
/** 结构化错误卡:错误码徽章 + 描述 + 建议(engine error 事件 / 失败 run) @stable */
|
|
1340
1757
|
declare function ErrorCard({ code, message, onDismiss }: ErrorCardProps): import("react").JSX.Element;
|
|
1341
1758
|
//#endregion
|
|
1342
|
-
export { A2uiSurfaceHost, type A2uiSurfaceHostProps, A2uiSurfaceSnapshotHost, type A2uiSurfaceSnapshotHostProps, type AppearanceChange, type ChatAttachmentInput, type ChatAttachmentMeta, ChatEngine, type ChatEngineOptions, type ChatEvent, type ChatLayout, type ChatMessage, type ChatSessionMeta, type ChatTheme, type ChatToolCall, Chatbot, type ChatbotConfig, type ChatbotGovernancePorts, type ChatbotHostAdapter, type ChatbotProps, CompositeUiBridge, type CompositeUiBridgeDeps, DEFAULT_RENDERER_CAPABILITIES, type DownloadableFile, ErrorCard, type ErrorCardProps, InteractionCard, type InteractionCardProps, InterruptedBanner, type InterruptedBannerProps, type
|
|
1759
|
+
export { A2uiSurfaceHost, type A2uiSurfaceHostProps, A2uiSurfaceSnapshotHost, type A2uiSurfaceSnapshotHostProps, type AppearanceChange, type ChatAttachmentInput, type ChatAttachmentMeta, ChatEngine, type ChatEngineOptions, type ChatEvent, type ChatLayout, type ChatMessage, type ChatSessionMeta, type ChatTheme, type ChatToolCall, Chatbot, type ChatbotConfig, type ChatbotGovernancePorts, type ChatbotHostAdapter, type ChatbotProps, CompositeUiBridge, type CompositeUiBridgeDeps, DEFAULT_RENDERER_CAPABILITIES, type DownloadableFile, ErrorCard, type ErrorCardProps, InteractionCard, type InteractionCardProps, InterruptedBanner, type InterruptedBannerProps, type Locale, OpenUiSurfaceHost, type OpenUiSurfaceHostProps, OpenUiSurfaceSnapshotHost, type OpenUiSurfaceSnapshotHostProps, type RendererCapability, type RendererKind, type ResolvedChatLayout, ResultBlockList, type ResultBlockListProps, ResultBlocksPro, type ResultBlocksProProps, type RunSnapshot, type SandboxExecutorDeps, SettingsDrawer, type SettingsDrawerProps, SkillBadges, SpecInteraction, type SpecInteractionProps, VercelPayloadPreview, type VercelPayloadPreviewProps, VercelSurfaceHost, type VercelSurfaceHostProps, VercelSurfaceSnapshotHost, type VercelSurfaceSnapshotHostProps, chatbotDictionary, configureA2uiMarkdown, probeA2uiAvailability, probeOpenUiAvailability, useT };
|