@webskill/chatbot 0.7.0 → 0.9.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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AgentLoopConfig, ApprovalScope, BridgeCapabilities, ExternalSkillProvider, ExternalToolSource, FileSystemProvider, HookRunner, InteractionRequest, InteractionResponse, LifecycleEventInit, LlmClient, NetworkPolicy, Page, PageQuery, RenderBlock, RenderResultRequest, RunSnapshot, RunSnapshotListEntry, RuntimePhase, RuntimeRun, ScriptExecutor, SessionStore, SkillCandidateMarker, SkillCatalogEntry, SkillIntegrityGuard, SkillOutcomeReporter, SkillStateGuard, UiBridge, UiSpecDrafts, UiSpecEvent, UiSpecSnapshot, UiSurfaceActionRequest, UiSurfaceActionResponse, UserProfile, UserProfileExport, WebSkillErrorCode, diffUserProfile } from "@webskill/sdk";
1
+ import { AgentLoopConfig, ApprovalScope, BridgeCapabilities, DocxTextExtractor, ExternalSkillProvider, ExternalToolSource, FileSystemProvider, HookRunner, InteractionRequest, InteractionResponse, LifecycleEventInit, LinkedDocumentReader, LlmClient, NetworkPolicy, Page, PageQuery, RenderBlock, RenderResultRequest, RunSnapshot, RunSnapshotListEntry, RuntimePhase, RuntimeRun, ScriptExecutor, SessionStore, SkillCandidateMarker, SkillCatalogEntry, SkillIntegrityGuard, SkillOutcomeReporter, SkillStateGuard, UiBridge, UiSpecDrafts, UiSpecEvent, UiSpecSnapshot, UiSurfaceActionRequest, UiSurfaceActionResponse, UserProfile, UserProfileExport, WebSkillErrorCode, diffUserProfile } from "@webskill/sdk";
2
2
  import { SandboxMode, TypeScriptSupportOptions } from "@webskill/sdk/browser";
3
3
  import { CustomSurfaceActionEvent, ReactBridgeState, SpecInteractionChannel, SurfaceRegistry, UiSurfaceActionEvent } from "@webskill/sdk/ui-react";
4
4
  import { PageActionPolicy, PagePerceptionPolicy, PerceptionRecord, SkillCandidateSink, TodoItem } from "@webskill/sdk/agent";
@@ -53,6 +53,10 @@ interface RuntimeLoopConfig {
53
53
  temperature?: number;
54
54
  toolResultMaxBytes: number;
55
55
  maxHistoryMessages: number;
56
+ /** `file` 分片的 base64 上限;超出即拒绝并说明,不截断(FR-23.4) */
57
+ maxDocumentBytes: number;
58
+ /** `document-text` 分片的字节上限;同样拒绝而不截断(FR-23.4) */
59
+ maxDocumentTextBytes: number;
56
60
  }
57
61
  interface RuntimeInteractionConfig {
58
62
  missingParams: 'user' | 'llm';
@@ -74,9 +78,22 @@ interface RuntimeSandboxConfig {
74
78
  networkPolicy: NetworkPolicy$1;
75
79
  capabilities: {
76
80
  readReference: CapabilityMode;
81
+ /** 同时管 readAsset 与 readAssetBinary */
82
+ readAsset: CapabilityMode;
77
83
  writeArtifact: CapabilityMode;
78
84
  confirm: CapabilityMode;
85
+ /**
86
+ * 脚本按宿主声明的数据源取数(分册 16)。
87
+ * 与 `readAsset` **相反**,缺省 `false`:它会出网,缺省开等于每个技能默认拿到出站能力。
88
+ */
89
+ fetchData: CapabilityMode;
79
90
  };
91
+ /**
92
+ * 单次取数结果的字节上限(分册 16)。超出即拒绝,**不截断**
93
+ * ——截断后的 JSON 解不出来,比拒绝更糟。结果回到脚本,不进模型上下文,
94
+ * 所以不受 `toolResultMaxBytes` 约束。
95
+ */
96
+ maxDataSourceBytes: number;
80
97
  /**
81
98
  * 出站 URL 准入策略(`RemoteUrlPolicy` 的可配置部分):技能安装、MCP 端点连接
82
99
  * 这类由宿主发起的取数都按它判定。两项都默认关,即 https-only 且拒绝内网/环回。
@@ -189,6 +206,17 @@ interface RuntimeAppearanceConfig {
189
206
  * 两者都会把图像随请求外发给模型提供方,属新增攻击面。
190
207
  * @experimental
191
208
  */
209
+ /**
210
+ * 文档投放面(0.11.0 分册 18)。
211
+ *
212
+ * **只有一个闸门字段**。CSP 白名单不在这里:它由 viewer 路由的**响应头**
213
+ * 下发(FR-18.3 第 1 条),是宿主部署时调 `viewerCspHeader` 的入参;
214
+ * 浏览器侧的运行时配置改不动已经发出去的响应头,携在这里只会是个不生效的假开关。
215
+ */
216
+ interface RuntimeDocumentSurfaceConfig {
217
+ /** 关着即没有这个投放面;开启还要求宿主额外提供一条 viewer 路由 */
218
+ enabled: boolean;
219
+ }
192
220
  interface RuntimeMultimodalConfig {
193
221
  imageAttachments: boolean;
194
222
  /** 页面图像抓取总开关(FR-12.3);关时感知只走纯文本路径 */
@@ -239,6 +267,7 @@ interface RuntimeConfig {
239
267
  security: RuntimeSecurityConfig;
240
268
  appearance: RuntimeAppearanceConfig;
241
269
  multimodal: RuntimeMultimodalConfig;
270
+ documentSurface: RuntimeDocumentSurfaceConfig;
242
271
  userProfile: RuntimeUserProfileConfig;
243
272
  skillState: RuntimeSkillStateConfig;
244
273
  /** 被用户删掉的自动模型条目 id(FR-14.3):删一次就不该再自己长回来 */
@@ -289,7 +318,7 @@ declare function createMemoryRuntimeConfigStore(initial?: Partial<RuntimeConfig>
289
318
  //#endregion
290
319
  //#region src/core/attachmentKind.d.ts
291
320
  /** 附件在模型侧的内容形态(0.6.0 FR-11.2) @experimental */
292
- type ChatAttachmentKind = 'text' | 'image' | 'file';
321
+ type ChatAttachmentKind = 'text' | 'image' | 'file' | 'document-text';
293
322
  //#endregion
294
323
  //#region src/core/types.d.ts
295
324
  /**
@@ -387,6 +416,8 @@ interface ChatRunPhase {
387
416
  endedAt?: number;
388
417
  /** 由结构化 `LifecycleEvent.data` 派生的一句摘要 */
389
418
  note?: string;
419
+ /** fail 相位的具体说明:`reason` 只有七种取值,说不出「哪个上限、哪个模型」 */
420
+ detail?: string;
390
421
  }
391
422
  /** 本轮发生的一次已提交交互(FR-17.8:提交后表单保留所填值) @experimental */
392
423
  interface ChatInteractionRecord {
@@ -417,6 +448,23 @@ interface ChatTokenUsage {
417
448
  /** 本 run 向大模型发送请求的次数(模型调用轮数) */
418
449
  llmCalls: number;
419
450
  }
451
+ /**
452
+ * 助手消息的有序内容段(分册 17 FR-17.1):文字与 surface / 结果块按生成顺序排列。
453
+ * 冗余记账——删掉本字段消息内容不缺失,只退化成「正文在上、扩展在下」(FR-17.11)。
454
+ * @experimental
455
+ */
456
+ type ChatContentPart = {
457
+ type: 'text';
458
+ text: string;
459
+ at: number;
460
+ } | {
461
+ type: 'surface';
462
+ surfaceId: string;
463
+ at: number;
464
+ } | {
465
+ type: 'blocks';
466
+ at: number;
467
+ };
420
468
  /** @stable */
421
469
  interface ChatMessage {
422
470
  id: string;
@@ -491,6 +539,11 @@ interface ChatMessage {
491
539
  * @experimental
492
540
  */
493
541
  candidates?: SkillCandidateMarker[];
542
+ /**
543
+ * 文字与 surface / blocks 的生成顺序(分册 17)。缺省时按 0.11.0 的两段式渲染。
544
+ * @experimental
545
+ */
546
+ contentParts?: ChatContentPart[];
494
547
  }
495
548
  /** @stable */
496
549
  interface ChatSessionMeta {
@@ -533,6 +586,21 @@ type ChatEvent = {
533
586
  } | {
534
587
  type: 'message-complete';
535
588
  message: ChatMessage;
589
+ } |
590
+ /**
591
+ * surface 上屏(分册 17 FR-17.3):载荷只有引用,spec 本体照旧走 `bridge.surfaceSnapshots`。
592
+ * 事件只承担「顺序」这一件事。
593
+ * @experimental
594
+ */
595
+ {
596
+ type: 'surface-opened';
597
+ runId: string;
598
+ surfaceId: string;
599
+ } |
600
+ /** 结果块整批上屏(分册 17 FR-17.3) @experimental */
601
+ {
602
+ type: 'blocks-rendered';
603
+ runId: string;
536
604
  } | {
537
605
  type: 'skill-activated';
538
606
  runId: string;
@@ -609,6 +677,23 @@ type ChatEvent = {
609
677
  message: string;
610
678
  code?: string;
611
679
  };
680
+ /**
681
+ * 快捷指令可选图标名(0.12.0 分册 21)。
682
+ * 用受控枚举而不是让宿主传组件:SDK 的图标集不进公开契约,
683
+ * 换实现(lucide → 别的)时宿主代码不用动。
684
+ * @experimental
685
+ */
686
+ type QuickPromptIconName = 'chart' | 'document' | 'report' | 'search' | 'list' | 'bug' | 'test' | 'metric' | 'compare' | 'page' | 'run' | 'warn' | 'sparkles' | 'settings';
687
+ /**
688
+ * 带图标的快捷指令(0.12.0 分册 21)。
689
+ * @experimental
690
+ */
691
+ interface QuickPrompt {
692
+ /** 点击后发出的文本,同时作为按钮可见文案 */
693
+ text: string;
694
+ /** 缺省或取值不在枚举内时按无图标渲染 */
695
+ icon?: QuickPromptIconName;
696
+ }
612
697
  /** @stable */
613
698
  interface ChatbotConfig {
614
699
  /** header 标题,默认 'WebSkill Chat' */
@@ -626,11 +711,12 @@ interface ChatbotConfig {
626
711
  * renderResult/sandbox/llm 映射;与 console Configure Tab 共用同一 store(宿主接线)
627
712
  */
628
713
  runtimeConfig?: RuntimeConfigStore;
629
- /** WelcomeScreen 快捷 prompt 覆盖(缺省用内置双语示例) */
630
- quickPrompts?: string[];
714
+ /** WelcomeScreen 快捷 prompt 覆盖(缺省用内置双语示例);给字符串即无图标 */
715
+ quickPrompts?: readonly (string | QuickPrompt)[];
631
716
  /**
632
717
  * 开启后模型多一个 `render_ui` 工具,可面向 AI Component Catalog 直接生成声明式 UI。
633
- * 默认关:工具描述 + 入参 schema 约 14 KB,会计入每一次请求。
718
+ * 默认关:工具描述 + 入参 schema 约 34 KB,会计入每一次请求。
719
+ * 数字的单一来源是 `@webskill/ui` 的 `catalog/budget.ts`(实测终态 12 744 + 21 470)。
634
720
  *
635
721
  * 接了 `runtimeConfig` 时以 `RuntimeConfig.agentCapabilities.generativeUi` 为准
636
722
  * (设置抽屉里的开关就是它),本字段只在未接配置存储的宿主上生效。
@@ -649,6 +735,14 @@ interface ChatbotConfig {
649
735
  * `SKILL_GENERATION_DISABLED`,不弹确认框、不产生候选。
650
736
  */
651
737
  skillCandidates?: SkillCandidateSink;
738
+ /**
739
+ * 宿主声明的数据源取数入口(分册 16):透传给 `ChatEngineOptions.fetchData`。
740
+ * 不注入即脚本上下文没有 `fetchData` 这个键。
741
+ *
742
+ * **必须是稳定引用**(模块级或 `useMemo`):它进 `ChatEngine` 的 `useMemo`
743
+ * 依赖表,每次渲染新建一个箭头函数会把整个引擎重建掉。
744
+ */
745
+ fetchData?: (sourceId: string, params?: Record<string, unknown>) => Promise<unknown>;
652
746
  }
653
747
  //#endregion
654
748
  //#region src/core/hostAdapter.d.ts
@@ -685,9 +779,33 @@ interface ChatbotHostAdapter {
685
779
  * @experimental
686
780
  */
687
781
  pageActions?: PageActionPolicy;
782
+ /**
783
+ * 读页面链接指向的文档(分册 22)。实现住在 `@webskill/browser`,
784
+ * 而 chatbot 不依赖它 —— 与 `pagePerception` 同一条装配规矩:宿主注入。
785
+ * 不注入即 `read_linked_document` 不注册。
786
+ */
787
+ linkedDocuments?: LinkedDocumentReader;
788
+ /** docx → 文本(`extractDocxText`);不注入即 Word 文档明确报「本环境不支持」 */
789
+ docxExtractor?: DocxTextExtractor;
790
+ /** 文档读取留痕出口(FR-22.6) */
791
+ documentAudit?: {
792
+ append(event: {
793
+ type: string;
794
+ target: string;
795
+ data?: Record<string, unknown>;
796
+ }): Promise<unknown>;
797
+ };
688
798
  }
689
799
  //#endregion
690
800
  //#region src/core/chatEngine.d.ts
801
+ /**
802
+ * 条目能否真的发请求:云端要有端点或密钥,浏览器内置两者都不需要。
803
+ *
804
+ * 导出给 UI:选择器不用同一份判据的话,用户能选中一个空配置条目,
805
+ * 而引擎静默回退到另一条——界面说在用 A、实际跑的是 B(UI-UX8 D1)。
806
+ * @experimental
807
+ */
808
+ declare const isLlmEntryUsable: (entry: RuntimeLlmEntry) => boolean;
691
809
  /**
692
810
  * 选中条目 → 默认条目 → 首条;命中不可用条目时**回退到下一个可用条目**
693
811
  * (0.10.0 复核:选中项失效时宁可静默换用可用模型,也不能把 UI 锁死成
@@ -742,6 +860,14 @@ interface ChatEngineOptions {
742
860
  generativeUi?: boolean;
743
861
  /** 沙箱执行器替换点(测试注入 spy 断言构造参数;缺省 BrowserWorkerScriptExecutor) */
744
862
  executorFactory?: (deps: SandboxExecutorDeps) => ScriptExecutor;
863
+ /**
864
+ * 宿主声明的数据源取数入口(分册 16)。不注入即脚本上下文没有 `fetchData` 这个键。
865
+ *
866
+ * 装配点必须在宿主:策略本体 `DataSourcePolicy` 住在 `@webskill/agent`,
867
+ * 而数据源的目标地址是宿主自己的业务知识,chatbot 无从代为声明。
868
+ * 能力开关 `sandbox.capabilities.fetchData` 缺省关,注入了也还要宿主在配置里打开。
869
+ */
870
+ fetchData?: (sourceId: string, params?: Record<string, unknown>) => Promise<unknown>;
745
871
  /**
746
872
  * 会话落盘替换点(缺省 `FsSessionStore`,落在 `<chatRoot>/sessions`)。
747
873
  * 宕主换自己的实现(如 IndexedDB)与测试统计端口读写量都走这里。
@@ -951,6 +1077,12 @@ interface CompositeUiBridgeDeps {
951
1077
  * @experimental
952
1078
  */
953
1079
  onSkillCandidate?(runId: string, candidate: SkillCandidateMarker): void;
1080
+ /**
1081
+ * surface 首次上屏(分册 17 FR-17.3)。只传引用,spec 本体照旧走 surfaceStore;
1082
+ * 引擎拿它在账本里记一个顺序位。
1083
+ * @experimental
1084
+ */
1085
+ onSurfaceOpened?(runId: string, surfaceId: string): void;
954
1086
  emit(event: ChatEvent): void;
955
1087
  }
956
1088
  /**
@@ -996,11 +1128,13 @@ declare const chatbotDictionary: {
996
1128
  'header.theme.dark': string;
997
1129
  'header.language': string;
998
1130
  'session.title': string;
1131
+ 'session.historyTitle': string;
1132
+ 'session.collapse': string;
1133
+ 'session.expand': string;
999
1134
  'session.new': string;
1000
1135
  'session.searchPlaceholder': string;
1001
1136
  'session.searchClear': string;
1002
1137
  'session.empty': string;
1003
- 'session.missingRoot': string;
1004
1138
  'session.skipped': string;
1005
1139
  'session.delete': string;
1006
1140
  'session.actions': string;
@@ -1126,6 +1260,15 @@ declare const chatbotDictionary: {
1126
1260
  'interaction.pageAction.role.click': string;
1127
1261
  'interaction.pageAction.role.fill': string;
1128
1262
  'interaction.pageAction.role.submit': string;
1263
+ 'interaction.pageAction.frame': string;
1264
+ 'interaction.pageAction.elevated': string;
1265
+ 'interaction.traceEvidence.title': string;
1266
+ 'interaction.traceEvidence.columnDraft': string;
1267
+ 'interaction.traceEvidence.columnTrace': string;
1268
+ 'interaction.traceEvidence.trace': string;
1269
+ 'interaction.traceEvidence.model': string;
1270
+ 'interaction.traceEvidence.noArgs': string;
1271
+ 'interaction.traceEvidence.redacted': string;
1129
1272
  'interaction.origin': string;
1130
1273
  'interaction.submitted': string;
1131
1274
  'interaction.submit': string;
@@ -1140,6 +1283,11 @@ declare const chatbotDictionary: {
1140
1283
  'surface.readOnlySnapshot': string;
1141
1284
  'surface.suggested': string;
1142
1285
  'surface.useSuggestion': string;
1286
+ 'surface.control.previousPage': string;
1287
+ 'surface.control.previous': string;
1288
+ 'surface.control.nextPage': string;
1289
+ 'surface.control.next': string;
1290
+ 'surface.control.carousel': string;
1143
1291
  'interaction.wait': string;
1144
1292
  'interaction.wait.inPanel': string;
1145
1293
  'interaction.wait.fallback': string;
@@ -1169,8 +1317,10 @@ declare const chatbotDictionary: {
1169
1317
  'composer.attachment.kind.text': string;
1170
1318
  'composer.attachment.kind.image': string;
1171
1319
  'composer.attachment.kind.file': string;
1320
+ 'composer.attachment.kind.document-text': string;
1172
1321
  'composer.attachment.compressed': string;
1173
1322
  'composer.model': string;
1323
+ 'composer.model.unconfigured': string;
1174
1324
  'composer.model.demo': string;
1175
1325
  'composer.noModel.title': string;
1176
1326
  'composer.noModel.description': string;
@@ -1318,6 +1468,7 @@ declare const chatbotDictionary: {
1318
1468
  'error.suggestion.RUN_INTERACTION_TIMEOUT': string;
1319
1469
  'error.suggestion.RUN_MAX_TURNS_EXCEEDED': string;
1320
1470
  'error.suggestion.TOOL_RESOLUTION_EXHAUSTED': string;
1471
+ 'error.suggestion.TOOL_SCHEMA_UNAVAILABLE': string;
1321
1472
  'error.limit.totalTimeoutMs': string;
1322
1473
  'error.limit.maxTurns': string;
1323
1474
  'error.message.RUN_CANCELLED': string;
@@ -1333,11 +1484,13 @@ declare const chatbotDictionary: {
1333
1484
  'header.theme.dark': string;
1334
1485
  'header.language': string;
1335
1486
  'session.title': string;
1487
+ 'session.historyTitle': string;
1488
+ 'session.collapse': string;
1489
+ 'session.expand': string;
1336
1490
  'session.new': string;
1337
1491
  'session.searchPlaceholder': string;
1338
1492
  'session.searchClear': string;
1339
1493
  'session.empty': string;
1340
- 'session.missingRoot': string;
1341
1494
  'session.skipped': string;
1342
1495
  'session.delete': string;
1343
1496
  'session.actions': string;
@@ -1463,6 +1616,15 @@ declare const chatbotDictionary: {
1463
1616
  'interaction.pageAction.role.click': string;
1464
1617
  'interaction.pageAction.role.fill': string;
1465
1618
  'interaction.pageAction.role.submit': string;
1619
+ 'interaction.pageAction.frame': string;
1620
+ 'interaction.pageAction.elevated': string;
1621
+ 'interaction.traceEvidence.title': string;
1622
+ 'interaction.traceEvidence.columnDraft': string;
1623
+ 'interaction.traceEvidence.columnTrace': string;
1624
+ 'interaction.traceEvidence.trace': string;
1625
+ 'interaction.traceEvidence.model': string;
1626
+ 'interaction.traceEvidence.noArgs': string;
1627
+ 'interaction.traceEvidence.redacted': string;
1466
1628
  'interaction.origin': string;
1467
1629
  'interaction.submitted': string;
1468
1630
  'interaction.submit': string;
@@ -1477,6 +1639,11 @@ declare const chatbotDictionary: {
1477
1639
  'surface.readOnlySnapshot': string;
1478
1640
  'surface.suggested': string;
1479
1641
  'surface.useSuggestion': string;
1642
+ 'surface.control.previousPage': string;
1643
+ 'surface.control.previous': string;
1644
+ 'surface.control.nextPage': string;
1645
+ 'surface.control.next': string;
1646
+ 'surface.control.carousel': string;
1480
1647
  'interaction.wait': string;
1481
1648
  'interaction.wait.inPanel': string;
1482
1649
  'interaction.wait.fallback': string;
@@ -1506,8 +1673,10 @@ declare const chatbotDictionary: {
1506
1673
  'composer.attachment.kind.text': string;
1507
1674
  'composer.attachment.kind.image': string;
1508
1675
  'composer.attachment.kind.file': string;
1676
+ 'composer.attachment.kind.document-text': string;
1509
1677
  'composer.attachment.compressed': string;
1510
1678
  'composer.model': string;
1679
+ 'composer.model.unconfigured': string;
1511
1680
  'composer.model.demo': string;
1512
1681
  'composer.noModel.title': string;
1513
1682
  'composer.noModel.description': string;
@@ -1655,6 +1824,7 @@ declare const chatbotDictionary: {
1655
1824
  'error.suggestion.RUN_INTERACTION_TIMEOUT': string;
1656
1825
  'error.suggestion.RUN_MAX_TURNS_EXCEEDED': string;
1657
1826
  'error.suggestion.TOOL_RESOLUTION_EXHAUSTED': string;
1827
+ 'error.suggestion.TOOL_SCHEMA_UNAVAILABLE': string;
1658
1828
  'error.limit.totalTimeoutMs': string;
1659
1829
  'error.limit.maxTurns': string;
1660
1830
  'error.message.RUN_CANCELLED': string;
@@ -1673,11 +1843,13 @@ declare const useT: () => TranslateFn<{
1673
1843
  'header.theme.dark': string;
1674
1844
  'header.language': string;
1675
1845
  'session.title': string;
1846
+ 'session.historyTitle': string;
1847
+ 'session.collapse': string;
1848
+ 'session.expand': string;
1676
1849
  'session.new': string;
1677
1850
  'session.searchPlaceholder': string;
1678
1851
  'session.searchClear': string;
1679
1852
  'session.empty': string;
1680
- 'session.missingRoot': string;
1681
1853
  'session.skipped': string;
1682
1854
  'session.delete': string;
1683
1855
  'session.actions': string;
@@ -1803,6 +1975,15 @@ declare const useT: () => TranslateFn<{
1803
1975
  'interaction.pageAction.role.click': string;
1804
1976
  'interaction.pageAction.role.fill': string;
1805
1977
  'interaction.pageAction.role.submit': string;
1978
+ 'interaction.pageAction.frame': string;
1979
+ 'interaction.pageAction.elevated': string;
1980
+ 'interaction.traceEvidence.title': string;
1981
+ 'interaction.traceEvidence.columnDraft': string;
1982
+ 'interaction.traceEvidence.columnTrace': string;
1983
+ 'interaction.traceEvidence.trace': string;
1984
+ 'interaction.traceEvidence.model': string;
1985
+ 'interaction.traceEvidence.noArgs': string;
1986
+ 'interaction.traceEvidence.redacted': string;
1806
1987
  'interaction.origin': string;
1807
1988
  'interaction.submitted': string;
1808
1989
  'interaction.submit': string;
@@ -1817,6 +1998,11 @@ declare const useT: () => TranslateFn<{
1817
1998
  'surface.readOnlySnapshot': string;
1818
1999
  'surface.suggested': string;
1819
2000
  'surface.useSuggestion': string;
2001
+ 'surface.control.previousPage': string;
2002
+ 'surface.control.previous': string;
2003
+ 'surface.control.nextPage': string;
2004
+ 'surface.control.next': string;
2005
+ 'surface.control.carousel': string;
1820
2006
  'interaction.wait': string;
1821
2007
  'interaction.wait.inPanel': string;
1822
2008
  'interaction.wait.fallback': string;
@@ -1846,8 +2032,10 @@ declare const useT: () => TranslateFn<{
1846
2032
  'composer.attachment.kind.text': string;
1847
2033
  'composer.attachment.kind.image': string;
1848
2034
  'composer.attachment.kind.file': string;
2035
+ 'composer.attachment.kind.document-text': string;
1849
2036
  'composer.attachment.compressed': string;
1850
2037
  'composer.model': string;
2038
+ 'composer.model.unconfigured': string;
1851
2039
  'composer.model.demo': string;
1852
2040
  'composer.noModel.title': string;
1853
2041
  'composer.noModel.description': string;
@@ -1995,6 +2183,7 @@ declare const useT: () => TranslateFn<{
1995
2183
  'error.suggestion.RUN_INTERACTION_TIMEOUT': string;
1996
2184
  'error.suggestion.RUN_MAX_TURNS_EXCEEDED': string;
1997
2185
  'error.suggestion.TOOL_RESOLUTION_EXHAUSTED': string;
2186
+ 'error.suggestion.TOOL_SCHEMA_UNAVAILABLE': string;
1998
2187
  'error.limit.totalTimeoutMs': string;
1999
2188
  'error.limit.maxTurns': string;
2000
2189
  'error.message.RUN_CANCELLED': string;
@@ -2010,11 +2199,13 @@ declare const useT: () => TranslateFn<{
2010
2199
  'header.theme.dark': string;
2011
2200
  'header.language': string;
2012
2201
  'session.title': string;
2202
+ 'session.historyTitle': string;
2203
+ 'session.collapse': string;
2204
+ 'session.expand': string;
2013
2205
  'session.new': string;
2014
2206
  'session.searchPlaceholder': string;
2015
2207
  'session.searchClear': string;
2016
2208
  'session.empty': string;
2017
- 'session.missingRoot': string;
2018
2209
  'session.skipped': string;
2019
2210
  'session.delete': string;
2020
2211
  'session.actions': string;
@@ -2140,6 +2331,15 @@ declare const useT: () => TranslateFn<{
2140
2331
  'interaction.pageAction.role.click': string;
2141
2332
  'interaction.pageAction.role.fill': string;
2142
2333
  'interaction.pageAction.role.submit': string;
2334
+ 'interaction.pageAction.frame': string;
2335
+ 'interaction.pageAction.elevated': string;
2336
+ 'interaction.traceEvidence.title': string;
2337
+ 'interaction.traceEvidence.columnDraft': string;
2338
+ 'interaction.traceEvidence.columnTrace': string;
2339
+ 'interaction.traceEvidence.trace': string;
2340
+ 'interaction.traceEvidence.model': string;
2341
+ 'interaction.traceEvidence.noArgs': string;
2342
+ 'interaction.traceEvidence.redacted': string;
2143
2343
  'interaction.origin': string;
2144
2344
  'interaction.submitted': string;
2145
2345
  'interaction.submit': string;
@@ -2154,6 +2354,11 @@ declare const useT: () => TranslateFn<{
2154
2354
  'surface.readOnlySnapshot': string;
2155
2355
  'surface.suggested': string;
2156
2356
  'surface.useSuggestion': string;
2357
+ 'surface.control.previousPage': string;
2358
+ 'surface.control.previous': string;
2359
+ 'surface.control.nextPage': string;
2360
+ 'surface.control.next': string;
2361
+ 'surface.control.carousel': string;
2157
2362
  'interaction.wait': string;
2158
2363
  'interaction.wait.inPanel': string;
2159
2364
  'interaction.wait.fallback': string;
@@ -2183,8 +2388,10 @@ declare const useT: () => TranslateFn<{
2183
2388
  'composer.attachment.kind.text': string;
2184
2389
  'composer.attachment.kind.image': string;
2185
2390
  'composer.attachment.kind.file': string;
2391
+ 'composer.attachment.kind.document-text': string;
2186
2392
  'composer.attachment.compressed': string;
2187
2393
  'composer.model': string;
2394
+ 'composer.model.unconfigured': string;
2188
2395
  'composer.model.demo': string;
2189
2396
  'composer.noModel.title': string;
2190
2397
  'composer.noModel.description': string;
@@ -2332,6 +2539,7 @@ declare const useT: () => TranslateFn<{
2332
2539
  'error.suggestion.RUN_INTERACTION_TIMEOUT': string;
2333
2540
  'error.suggestion.RUN_MAX_TURNS_EXCEEDED': string;
2334
2541
  'error.suggestion.TOOL_RESOLUTION_EXHAUSTED': string;
2542
+ 'error.suggestion.TOOL_SCHEMA_UNAVAILABLE': string;
2335
2543
  'error.limit.totalTimeoutMs': string;
2336
2544
  'error.limit.maxTurns': string;
2337
2545
  'error.message.RUN_CANCELLED': string;
@@ -2397,6 +2605,8 @@ interface ChatbotProps {
2397
2605
  surfaceRegistry?: SurfaceRegistry;
2398
2606
  /** 布局档(默认 'auto':按容器尺寸在 fullscreen / embedded / mobile 之间判定) */
2399
2607
  layout?: ChatLayout;
2608
+ /** 会话列表形态(默认 'auto':按**容器**宽度判定,不看视口) @stable */
2609
+ sessionList?: 'auto' | 'collapsed' | 'inline';
2400
2610
  /**
2401
2611
  * 打开配置面(FR-20.4)。配置面本身已迁到 console,chatbot 只负责发出这个请求;
2402
2612
  * 宿主不接就不渲染任何「打开设置」出口——给一个点了没反应的按钮更糟。
@@ -2414,7 +2624,7 @@ interface ChatbotProps {
2414
2624
  * presentation shell and accessible thread primitives.
2415
2625
  * @stable
2416
2626
  */
2417
- declare function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, renderer: rendererProp, dictationLang: dictationLangProp, surfaceRegistry, layout, onOpenSettings, onEngineReady }: ChatbotProps): import("react").JSX.Element;
2627
+ declare function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, renderer: rendererProp, dictationLang: dictationLangProp, surfaceRegistry, layout, sessionList, onOpenSettings, onEngineReady }: ChatbotProps): import("react").JSX.Element;
2418
2628
  //#endregion
2419
2629
  //#region src/react/A2uiSurfaceHost.d.ts
2420
2630
  /** @experimental */
@@ -2598,6 +2808,6 @@ declare function ErrorCard({ code, message, loopLimits, onOpenSettings, onDismis
2598
2808
  * Version of the published `@webskill/chatbot` package, injected at build time.
2599
2809
  * @stable
2600
2810
  */
2601
- declare const CHATBOT_VERSION = "0.7.0";
2811
+ declare const CHATBOT_VERSION = "0.8.0";
2602
2812
  //#endregion
2603
- export { A2uiSurfaceHost, type A2uiSurfaceHostProps, A2uiSurfaceSnapshotHost, type A2uiSurfaceSnapshotHostProps, type AppearanceChange, CHATBOT_VERSION, type ChatAttachmentInput, type ChatAttachmentMeta, ChatEngine, type ChatEngineOptions, type ChatEvent, type ChatInteractionRecord, type ChatLayout, type ChatMessage, type ChatRunPhase, type ChatSessionListResult, type ChatSessionMeta, type ChatTheme, type ChatThinking, type ChatTokenUsage, type ChatToolCall, Chatbot, type ChatbotConfig, type ChatbotGovernancePorts, type ChatbotHostAdapter, type ChatbotProps, CompositeUiBridge, type CompositeUiBridgeDeps, DEFAULT_RENDERER_CAPABILITIES, DEFAULT_RUNTIME_CONFIG_STORAGE_KEY, 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 RuntimeAppearanceConfig, type RuntimeConfig, type RuntimeConfigStore, type RuntimeRendererId, type SandboxExecutorDeps, type SettingsSectionId, SkillBadges, SpecInteraction, type SpecInteractionProps, VercelPayloadPreview, type VercelPayloadPreviewProps, VercelSurfaceHost, type VercelSurfaceHostProps, VercelSurfaceSnapshotHost, type VercelSurfaceSnapshotHostProps, chatbotDictionary, configureA2uiMarkdown, createLocalStorageRuntimeConfigStore, createMemoryRuntimeConfigStore, pickUsableLlmEntry, probeA2uiAvailability, probeOpenUiAvailability, sandboxExecutorDeps, useT };
2813
+ export { A2uiSurfaceHost, type A2uiSurfaceHostProps, A2uiSurfaceSnapshotHost, type A2uiSurfaceSnapshotHostProps, type AppearanceChange, CHATBOT_VERSION, type ChatAttachmentInput, type ChatAttachmentMeta, type ChatContentPart, ChatEngine, type ChatEngineOptions, type ChatEvent, type ChatInteractionRecord, type ChatLayout, type ChatMessage, type ChatRunPhase, type ChatSessionListResult, type ChatSessionMeta, type ChatTheme, type ChatThinking, type ChatTokenUsage, type ChatToolCall, Chatbot, type ChatbotConfig, type ChatbotGovernancePorts, type ChatbotHostAdapter, type ChatbotProps, CompositeUiBridge, type CompositeUiBridgeDeps, DEFAULT_RENDERER_CAPABILITIES, DEFAULT_RUNTIME_CONFIG_STORAGE_KEY, type DownloadableFile, ErrorCard, type ErrorCardProps, InteractionCard, type InteractionCardProps, InterruptedBanner, type InterruptedBannerProps, type Locale, OpenUiSurfaceHost, type OpenUiSurfaceHostProps, OpenUiSurfaceSnapshotHost, type OpenUiSurfaceSnapshotHostProps, type QuickPrompt, type QuickPromptIconName, type RendererCapability, type RendererKind, type ResolvedChatLayout, ResultBlockList, type ResultBlockListProps, ResultBlocksPro, type ResultBlocksProProps, type RunSnapshot, type RuntimeAppearanceConfig, type RuntimeConfig, type RuntimeConfigStore, type RuntimeRendererId, type SandboxExecutorDeps, type SettingsSectionId, SkillBadges, SpecInteraction, type SpecInteractionProps, VercelPayloadPreview, type VercelPayloadPreviewProps, VercelSurfaceHost, type VercelSurfaceHostProps, VercelSurfaceSnapshotHost, type VercelSurfaceSnapshotHostProps, chatbotDictionary, configureA2uiMarkdown, createLocalStorageRuntimeConfigStore, createMemoryRuntimeConfigStore, isLlmEntryUsable, pickUsableLlmEntry, probeA2uiAvailability, probeOpenUiAvailability, sandboxExecutorDeps, useT };