@webskill/chatbot 0.22.0 → 0.24.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 +115 -0
- package/dist/chatbot.css +5 -2
- package/dist/config.d.ts +19 -1
- package/dist/config.js +56 -1
- package/dist/index.d.ts +259 -5
- package/dist/index.js +1989 -826
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -132,6 +132,121 @@ newest-first. This is a behavioural contract that the type system cannot check:
|
|
|
132
132
|
a store that still returns ascending order will render the oldest session at the
|
|
133
133
|
top.
|
|
134
134
|
|
|
135
|
+
## Which session opens on mount
|
|
136
|
+
|
|
137
|
+
Mounting `<Chatbot>` (opening the web dialog, opening the extension side panel)
|
|
138
|
+
lands on a **new conversation**, not on an old one:
|
|
139
|
+
|
|
140
|
+
- If the newest **non-archived** session on the first page is empty
|
|
141
|
+
(`ChatSessionMeta.messageCount === 0`, for example one made with **New chat**),
|
|
142
|
+
that session opens — no second empty session is created.
|
|
143
|
+
- Otherwise nothing is selected: the message area is empty and the list shows a
|
|
144
|
+
"new chat" placeholder. **Nothing is written to storage** until the first
|
|
145
|
+
message is sent, so opening and closing the panel repeatedly never piles up
|
|
146
|
+
empty sessions.
|
|
147
|
+
- A missing `messageCount` (a custom list that does not provide it) counts as
|
|
148
|
+
non-empty.
|
|
149
|
+
- If the engine is rebuilt while the component stays mounted (a config prop
|
|
150
|
+
changes identity), the conversation you have open stays open.
|
|
151
|
+
- Resuming an interrupted run from the banner first switches to the session the
|
|
152
|
+
run belongs to. If you render `InterruptedBanner` yourself, pass
|
|
153
|
+
`onBeforeResume` to do the same.
|
|
154
|
+
|
|
155
|
+
## Host components
|
|
156
|
+
|
|
157
|
+
A **host component** is a capability your app registers and the model triggers
|
|
158
|
+
as a tool — for example "send this summary to WeChat user alice". Each component
|
|
159
|
+
brings its own confirmation card, credential form and result card. This is the
|
|
160
|
+
only way a host can add its own tool _and_ get an in-conversation form, a
|
|
161
|
+
confirmation with "don't ask again", and a persisted result — tools behind an
|
|
162
|
+
in-process MCP endpoint get none of those.
|
|
163
|
+
|
|
164
|
+
This surface is `@experimental`: `createHttpMessageComponent` and the
|
|
165
|
+
`ChatComponent*` types are exported from `@webskill/chatbot`, but their shape may
|
|
166
|
+
still change, so they are not shown with an `import` line like the stable API.
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
// createHttpMessageComponent comes from '@webskill/chatbot' (experimental)
|
|
170
|
+
const adapter = {
|
|
171
|
+
storage,
|
|
172
|
+
skillRoots,
|
|
173
|
+
navigation,
|
|
174
|
+
components: [
|
|
175
|
+
createHttpMessageComponent({
|
|
176
|
+
name: 'wechat',
|
|
177
|
+
label: { zh: '微信', en: 'WeChat' },
|
|
178
|
+
endpoint: 'https://wechat.example.com/send',
|
|
179
|
+
tips: {
|
|
180
|
+
zh: '请向小鲁班发送“获取发送token”',
|
|
181
|
+
en: 'Send "获取发送token" to XiaoLuban to get the send token.'
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
]
|
|
185
|
+
};
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
`createHttpMessageComponent` gives the model two tools: `wechat` (arguments
|
|
189
|
+
`receiver` and `content` only) and `wechat_update_credentials`. A send goes:
|
|
190
|
+
confirmation card → token form (first time only) → one `POST` → a result card in
|
|
191
|
+
the conversation. If you set `tips` (a string, or `{ zh, en }` like `label`), the
|
|
192
|
+
token form shows it the first time the token is collected — typically how to
|
|
193
|
+
obtain one; it is not shown again when the user updates a saved token. The
|
|
194
|
+
request body is exactly:
|
|
195
|
+
|
|
196
|
+
```json
|
|
197
|
+
{ "content": "<h2>…</h2><p><b>…</b></p>", "receiver": "alice", "auth": "<token>" }
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
- `content` is always converted from Markdown (GFM) to HTML first; HTML already
|
|
201
|
+
in the text is kept as-is. The converter (`marked`) is loaded only when a
|
|
202
|
+
message is actually sent.
|
|
203
|
+
- `receiver` must come from the user — the tool description tells the model never
|
|
204
|
+
to guess one.
|
|
205
|
+
- `auth` is the component's credential. The model can neither see nor fill it: it
|
|
206
|
+
is not in the tool's input schema, and it appears only in the credential store
|
|
207
|
+
and the request body. It is never put in a session file, trace, snapshot,
|
|
208
|
+
`ChatEvent`, or LLM request.
|
|
209
|
+
- The endpoint comes only from your configuration. A confirmation card shows the
|
|
210
|
+
receiver, a plain-text preview of what will be sent and the target host (with
|
|
211
|
+
an "unencrypted" warning for `http:` outside loopback). Tick **Don't ask again**
|
|
212
|
+
and the card is skipped for that component **and that receiver** only.
|
|
213
|
+
- Every call leaves a result card on the assistant message (`componentCalls`),
|
|
214
|
+
independent of what the model says afterwards, and it survives a reload.
|
|
215
|
+
|
|
216
|
+
**Where credentials live.** By default in `localStorage`, read on every call (so
|
|
217
|
+
a token updated in another tab is used on the next send):
|
|
218
|
+
|
|
219
|
+
| Key | Value |
|
|
220
|
+
| --------------------------------------- | ------------------------------------------------ |
|
|
221
|
+
| `webskill.component.<name>.credentials` | `{"auth":"…"}` |
|
|
222
|
+
| `webskill.component.<name>.consent` | `["alice","bob"]` — receivers that skip the card |
|
|
223
|
+
|
|
224
|
+
A record that cannot be parsed counts as missing: the token is collected again
|
|
225
|
+
and the card is shown again. Where `localStorage` is unavailable (an extension
|
|
226
|
+
sandbox page, for example) and you did not inject a store, a call fails with
|
|
227
|
+
`TOOL_UNSUPPORTED` — it never silently falls back to memory. Inject
|
|
228
|
+
`ChatbotHostAdapter.componentStore` to keep credentials elsewhere.
|
|
229
|
+
|
|
230
|
+
**Things to know.**
|
|
231
|
+
|
|
232
|
+
- `localStorage` is readable by any script on the same origin. Inject your own
|
|
233
|
+
`componentStore` if that is not acceptable.
|
|
234
|
+
- From a web page the browser sends a CORS preflight for a JSON `POST`; the
|
|
235
|
+
service must allow your page's origin (and `content-type`). An `https:` page
|
|
236
|
+
cannot call an `http:` endpoint at all. Both show up as a failed result card
|
|
237
|
+
("Failed to fetch"). Extension pages with `host_permissions` for the endpoint
|
|
238
|
+
are not subject to CORS.
|
|
239
|
+
- The HTML is sent as converted and is **not sanitised** — it goes to your
|
|
240
|
+
service, not into this page. Sanitise on the receiving side before rendering it.
|
|
241
|
+
- A component name must match `^[a-z][a-z0-9_]{0,39}$` and not contain `__`; an
|
|
242
|
+
invalid or duplicate name makes `new ChatEngine(...)` throw
|
|
243
|
+
`VALIDATION_FAILED`. A name that collides with a built-in tool fails on the
|
|
244
|
+
first send with the same code.
|
|
245
|
+
- For anything other than an HTTP message, implement `ChatComponent` yourself
|
|
246
|
+
(`inputSchema`, optional `credentials`, `confirm`, `invoke`). Each credential
|
|
247
|
+
field may carry `description` (shown on every form) and `tips` (shown only
|
|
248
|
+
while that field has not been saved yet).
|
|
249
|
+
|
|
135
250
|
## Embedding models
|
|
136
251
|
|
|
137
252
|
- **As a component** inside an existing web app — mount `<Chatbot>` in your own
|
package/dist/chatbot.css
CHANGED
|
@@ -1294,6 +1294,9 @@
|
|
|
1294
1294
|
.break-words {
|
|
1295
1295
|
overflow-wrap: break-word;
|
|
1296
1296
|
}
|
|
1297
|
+
.break-all {
|
|
1298
|
+
word-break: break-all;
|
|
1299
|
+
}
|
|
1297
1300
|
.whitespace-nowrap {
|
|
1298
1301
|
white-space: nowrap;
|
|
1299
1302
|
}
|
|
@@ -1934,8 +1937,8 @@
|
|
|
1934
1937
|
.lg\:flex {
|
|
1935
1938
|
display: flex;
|
|
1936
1939
|
}
|
|
1937
|
-
.lg\:grid-cols-\[minmax\(
|
|
1938
|
-
grid-template-columns: minmax(
|
|
1940
|
+
.lg\:grid-cols-\[minmax\(var\(--webskill-primary-min\,0px\)\,1fr\)_0\.625rem_minmax\(18rem\,var\(--webskill-secondary-size\)\)\] {
|
|
1941
|
+
grid-template-columns: minmax(var(--webskill-primary-min,0px),1fr) 0.625rem minmax(18rem,var(--webskill-secondary-size));
|
|
1939
1942
|
}
|
|
1940
1943
|
}
|
|
1941
1944
|
.dark\:bg-subtle:where(.dark, .dark *, [data-theme='dark'], [data-theme='dark'] *) {
|
package/dist/config.d.ts
CHANGED
|
@@ -17,6 +17,24 @@ declare class WebSkillConfigError extends Error {
|
|
|
17
17
|
constructor(code: WebSkillConfigErrorCode, path: string, message: string);
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
|
+
//#region ../ui-kit/src/runtime-config/siteAccess.d.ts
|
|
21
|
+
/**
|
|
22
|
+
* 站点白名单的匹配规则(`RuntimeConfig.siteAccess.allowedHosts`)。
|
|
23
|
+
*
|
|
24
|
+
* 放在配置字段旁边而不是宿主里:规则一旦有第二份手抄,「配了却不生效」
|
|
25
|
+
* 和「以为拦住了其实没拦」就会同时存在,而后者是安全问题。
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* 地址是否落在白名单内。**空清单一律放行**——它表示「宿主没有设限」,
|
|
29
|
+
* 而不是「谁都不许」;把空当成全拒会让没配过的宿主整个瘫掉。
|
|
30
|
+
*
|
|
31
|
+
* 解析不出主机名的地址(`about:blank`、畸形串)在有清单时**拒绝**:
|
|
32
|
+
* 认不出来就不该当成自己人。
|
|
33
|
+
*
|
|
34
|
+
* @experimental
|
|
35
|
+
*/
|
|
36
|
+
declare function isAllowedSite(url: string | undefined, allowedHosts: readonly string[]): boolean;
|
|
37
|
+
//#endregion
|
|
20
38
|
//#region src/config/merge.d.ts
|
|
21
39
|
/**
|
|
22
40
|
* 三方合并:宿主缺省值 · 用户存储 · 上次应用过的缺省值快照。
|
|
@@ -104,4 +122,4 @@ interface ConfigDefaultsStoreOptions {
|
|
|
104
122
|
*/
|
|
105
123
|
declare function createConfigDefaultsStore(store: RuntimeConfigStore, options: ConfigDefaultsStoreOptions): RuntimeConfigStore;
|
|
106
124
|
//#endregion
|
|
107
|
-
export { type AppliedConfigDefaults, type ApplyConfigDefaultsInput, BAKED_KEY_SENTINEL, type BakedSecretLoader, CONFIGURED_RUNTIME_PATHS, CONFIG_FIELDS, CONFIG_TOP_LEVEL_SECTIONS, type ConfigDefaultsSnapshotStore, type ConfigDefaultsStoreOptions, type ConfigFieldSpec, type ConfigLeafKind, NON_CONFIGURABLE_RUNTIME_PATHS, type ParseWebSkillConfigOptions, type ParsedWebSkillConfig, type WebSkillConfigDefaults, WebSkillConfigError, type WebSkillConfigErrorCode, applyConfigDefaults, createConfigDefaultsStore, parseWebSkillConfig };
|
|
125
|
+
export { type AppliedConfigDefaults, type ApplyConfigDefaultsInput, BAKED_KEY_SENTINEL, type BakedSecretLoader, CONFIGURED_RUNTIME_PATHS, CONFIG_FIELDS, CONFIG_TOP_LEVEL_SECTIONS, type ConfigDefaultsSnapshotStore, type ConfigDefaultsStoreOptions, type ConfigFieldSpec, type ConfigLeafKind, NON_CONFIGURABLE_RUNTIME_PATHS, type ParseWebSkillConfigOptions, type ParsedWebSkillConfig, type WebSkillConfigDefaults, WebSkillConfigError, type WebSkillConfigErrorCode, applyConfigDefaults, createConfigDefaultsStore, isAllowedSite, parseWebSkillConfig };
|
package/dist/config.js
CHANGED
|
@@ -1,6 +1,61 @@
|
|
|
1
1
|
import { r as mergeRuntimeConfigDefaults } from "./types-DzBMgDa6.js";
|
|
2
2
|
import { a as NON_CONFIGURABLE_RUNTIME_PATHS, i as CONFIG_FIELDS, n as parseWebSkillConfig, o as WebSkillConfigError, r as CONFIGURED_RUNTIME_PATHS, t as CONFIG_TOP_LEVEL_SECTIONS } from "./parse-BaIF8Nm5.js";
|
|
3
3
|
|
|
4
|
+
//#region ../ui-kit/src/runtime-config/siteAccess.ts
|
|
5
|
+
/**
|
|
6
|
+
* 站点白名单的匹配规则(`RuntimeConfig.siteAccess.allowedHosts`)。
|
|
7
|
+
*
|
|
8
|
+
* 放在配置字段旁边而不是宿主里:规则一旦有第二份手抄,「配了却不生效」
|
|
9
|
+
* 和「以为拦住了其实没拦」就会同时存在,而后者是安全问题。
|
|
10
|
+
*/
|
|
11
|
+
/** 把用户写的模式归一:去空白、小写、去掉前导点与结尾点 */
|
|
12
|
+
function normalizePattern(pattern) {
|
|
13
|
+
return pattern.trim().toLowerCase().replace(/^\.+/, "").replace(/\.+$/, "");
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 单条模式是否命中主机名。
|
|
17
|
+
*
|
|
18
|
+
* - `*` 命中一切。
|
|
19
|
+
* - `*.example.com` 命中 `a.example.com`、`a.b.example.com`,**也命中** `example.com`
|
|
20
|
+
* 本体——与 Chrome 的 match pattern 同口径。用户写通配是为了「这个站」,
|
|
21
|
+
* 让主域漏网只会制造一条谁也想不到的缝。
|
|
22
|
+
* - `example.com` 只命中它自己。
|
|
23
|
+
*
|
|
24
|
+
* 端口与协议一律不参与:用户写的是域名。
|
|
25
|
+
*/
|
|
26
|
+
function matchesPattern(host, pattern) {
|
|
27
|
+
const p = normalizePattern(pattern);
|
|
28
|
+
if (p === "") return false;
|
|
29
|
+
if (p === "*") return true;
|
|
30
|
+
if (p.startsWith("*.")) {
|
|
31
|
+
const base = p.slice(2);
|
|
32
|
+
return base !== "" && (host === base || host.endsWith(`.${base}`));
|
|
33
|
+
}
|
|
34
|
+
return host === p;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 地址是否落在白名单内。**空清单一律放行**——它表示「宿主没有设限」,
|
|
38
|
+
* 而不是「谁都不许」;把空当成全拒会让没配过的宿主整个瘫掉。
|
|
39
|
+
*
|
|
40
|
+
* 解析不出主机名的地址(`about:blank`、畸形串)在有清单时**拒绝**:
|
|
41
|
+
* 认不出来就不该当成自己人。
|
|
42
|
+
*
|
|
43
|
+
* @experimental
|
|
44
|
+
*/
|
|
45
|
+
function isAllowedSite(url, allowedHosts) {
|
|
46
|
+
if (allowedHosts.length === 0) return true;
|
|
47
|
+
if (url === void 0) return false;
|
|
48
|
+
let host;
|
|
49
|
+
try {
|
|
50
|
+
host = new URL(url).hostname.toLowerCase().replace(/\.+$/, "");
|
|
51
|
+
} catch {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
if (host === "") return false;
|
|
55
|
+
return allowedHosts.some((pattern) => matchesPattern(host, pattern));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
4
59
|
//#region src/config/merge.ts
|
|
5
60
|
function isPlainObject(value) {
|
|
6
61
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -197,4 +252,4 @@ function createConfigDefaultsStore(store, options) {
|
|
|
197
252
|
}
|
|
198
253
|
|
|
199
254
|
//#endregion
|
|
200
|
-
export { BAKED_KEY_SENTINEL, CONFIGURED_RUNTIME_PATHS, CONFIG_FIELDS, CONFIG_TOP_LEVEL_SECTIONS, NON_CONFIGURABLE_RUNTIME_PATHS, WebSkillConfigError, applyConfigDefaults, createConfigDefaultsStore, parseWebSkillConfig };
|
|
255
|
+
export { BAKED_KEY_SENTINEL, CONFIGURED_RUNTIME_PATHS, CONFIG_FIELDS, CONFIG_TOP_LEVEL_SECTIONS, NON_CONFIGURABLE_RUNTIME_PATHS, WebSkillConfigError, applyConfigDefaults, createConfigDefaultsStore, isAllowedSite, parseWebSkillConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as RuntimeRendererId, c as RuntimeQuickPrompt, d as TranslateFn, i as RuntimeLlmEntry, l as Locale, n as RuntimeConfig, o as QuickPrompt, r as RuntimeConfigStore, s as QuickPromptIconName, t as RuntimeAppearanceConfig, u as LocalizedText } from "./index-6TE6MWZ2.js";
|
|
2
|
+
import { AgentLoopConfig, ApprovalScope, BridgeCapabilities, DataSourceInfo, DocumentSurfaceHost, DocxTextExtractor, ExternalSkillProvider, ExternalToolSource, FileSystemProvider, HookRunner, InteractionRequest, InteractionResponse, JsonSchema, LifecycleEventInit, LinkedDocumentReader, LlmClient, NetworkPolicy, Page, PageQuery, PdfTextExtractor, PptxTextExtractor, RenderBlock, RenderResultRequest, RunSnapshot, RunSnapshotListEntry, RuntimePhase, RuntimeRun, ScriptExecutor, SessionStore, SkillCandidateMarker, SkillCatalogEntry, SkillIntegrityGuard, SkillOutcomeReporter, SkillStateGuard, UiBridge, UiSpecDrafts, UiSpecEvent, UiSpecSnapshot, UiSurfaceActionRequest, UiSurfaceActionResponse, UserProfile, UserProfileExport, VisionDelegate, VisionDelegateRequest, VisionDelegateResult, WebSkillErrorCode, XlsxTextExtractor, diffUserProfile } from "@webskill/sdk";
|
|
2
3
|
import "react";
|
|
3
|
-
import { AgentLoopConfig, ApprovalScope, BridgeCapabilities, DataSourceInfo, DocumentSurfaceHost, DocxTextExtractor, ExternalSkillProvider, ExternalToolSource, FileSystemProvider, HookRunner, InteractionRequest, InteractionResponse, LifecycleEventInit, LinkedDocumentReader, LlmClient, NetworkPolicy, Page, PageQuery, PdfTextExtractor, PptxTextExtractor, RenderBlock, RenderResultRequest, RunSnapshot, RunSnapshotListEntry, RuntimePhase, RuntimeRun, ScriptExecutor, SessionStore, SkillCandidateMarker, SkillCatalogEntry, SkillIntegrityGuard, SkillOutcomeReporter, SkillStateGuard, UiBridge, UiSpecDrafts, UiSpecEvent, UiSpecSnapshot, UiSurfaceActionRequest, UiSurfaceActionResponse, UserProfile, UserProfileExport, VisionDelegate, VisionDelegateRequest, VisionDelegateResult, WebSkillErrorCode, XlsxTextExtractor, diffUserProfile } from "@webskill/sdk";
|
|
4
4
|
import { PageImageHost, RemoteImageHost, SandboxMode, TypeScriptSupportOptions, WebOfficeConsent, WebOfficeHost } from "@webskill/sdk/browser";
|
|
5
5
|
import { CustomSurfaceActionEvent, ReactBridgeState, SpecInteractionChannel, SurfaceRegistry, UiSurfaceActionEvent } from "@webskill/sdk/ui-react";
|
|
6
|
-
import { ConsentUi, DocxDocumentReader, DocxTemplateEngine, DownloadedFileConsent, DownloadedFileReader, DwgDocumentContent, DwgProjection, PageActionPolicy, PagePerceptionPolicy, PdfDocumentReader, PerceptionPagingBudget, PerceptionRecord, PptxDocumentReader, SkillCandidateSink, TabWorksetPolicy, TemplateFileSource, TodoItem, XlsxDocumentReader, XlsxTemplateEngine } from "@webskill/sdk/agent";
|
|
6
|
+
import { ConsentUi, DocxDocumentReader, DocxTemplateEngine, DownloadedFileConsent, DownloadedFileReader, DwgDocumentContent, DwgProjection, PageActionPolicy, PagePerceptionPolicy, PdfDocumentReader, PerceptionPagingBudget, PerceptionRecord, PptxDocumentReader, SkillCandidateSink, TabWorksetPolicy, TemplateFileSource, TodoItem, XlsxDocumentReader, XlsxTableReader, XlsxTemplateEngine } from "@webskill/sdk/agent";
|
|
7
7
|
//#region ../core/src/attachment/kind.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* 附件类型判据与文本形态。0.14.0 分册 20 从 `@webskill/chatbot` 迁入:
|
|
@@ -82,6 +82,116 @@ declare function createLocalStorageRuntimeConfigStore(options?: LocalStorageRunt
|
|
|
82
82
|
/** 内存实现:测试、SSR、以及宿主明确不想持久化时使用。 @experimental */
|
|
83
83
|
declare function createMemoryRuntimeConfigStore(initial?: Partial<RuntimeConfig>): RuntimeConfigStore;
|
|
84
84
|
//#endregion
|
|
85
|
+
//#region src/core/components/types.d.ts
|
|
86
|
+
/**
|
|
87
|
+
* 显示文本:不分语言的一个串,或中英两份。
|
|
88
|
+
* @experimental
|
|
89
|
+
*/
|
|
90
|
+
type ChatComponentText = string | {
|
|
91
|
+
readonly zh: string;
|
|
92
|
+
readonly en: string;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* 组件要用户提供、并长期保存的一项凭据。表单里一律是 password 字段。
|
|
96
|
+
* @experimental
|
|
97
|
+
*/
|
|
98
|
+
interface ChatComponentCredentialField {
|
|
99
|
+
/** 存储与执行入参里的键名,如 `auth` */
|
|
100
|
+
readonly name: string;
|
|
101
|
+
readonly label: ChatComponentText;
|
|
102
|
+
/** 每次弹表单都显示 */
|
|
103
|
+
readonly description?: ChatComponentText;
|
|
104
|
+
/** 只在存储里还没有这一项时显示:告诉用户去哪里拿 */
|
|
105
|
+
readonly tips?: ChatComponentText;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 执行前确认卡上要说清的东西。
|
|
109
|
+
* @experimental
|
|
110
|
+
*/
|
|
111
|
+
interface ChatComponentConfirmation {
|
|
112
|
+
/** 本次的目标;「不再询问」按(组件,target)记 */
|
|
113
|
+
readonly target: string;
|
|
114
|
+
/** 将发出内容的纯文本;卡上取前 2 000 字符 */
|
|
115
|
+
readonly preview?: string;
|
|
116
|
+
/** 目标服务地址;卡上显示主机名,并据协议决定是否加未加密提示 */
|
|
117
|
+
readonly endpoint?: string;
|
|
118
|
+
}
|
|
119
|
+
/** @experimental */
|
|
120
|
+
interface ChatComponentInvokeContext {
|
|
121
|
+
readonly credentials: Readonly<Record<string, string>>;
|
|
122
|
+
/** run 的取消信号 */
|
|
123
|
+
readonly signal?: AbortSignal;
|
|
124
|
+
}
|
|
125
|
+
/** @experimental */
|
|
126
|
+
interface ChatComponentOutcome {
|
|
127
|
+
readonly ok: boolean;
|
|
128
|
+
/** 结果卡上的细节,语言中立或英文,如 `HTTP 200` */
|
|
129
|
+
readonly detail?: string;
|
|
130
|
+
/** 回给模型的英文说明,不得含凭据 */
|
|
131
|
+
readonly message: string;
|
|
132
|
+
/** 服务明确拒绝了凭据(如 401/403):模型说明里会点名更新工具 */
|
|
133
|
+
readonly credentialsRejected?: boolean;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* 宿主组件:宿主在接入时注册、模型以工具调用触发的一项能力。
|
|
137
|
+
* @experimental
|
|
138
|
+
*/
|
|
139
|
+
interface ChatComponent {
|
|
140
|
+
/** 工具名,`^[a-z][a-z0-9_]{0,39}$`,不含 `__` */
|
|
141
|
+
readonly name: string;
|
|
142
|
+
readonly label: ChatComponentText;
|
|
143
|
+
/** 确认卡与结果卡上的动作名;缺省为「执行 / Run」 */
|
|
144
|
+
readonly actionLabel?: ChatComponentText;
|
|
145
|
+
/** 给模型看的英文说明:何时调用、参数怎么填 */
|
|
146
|
+
readonly description: string;
|
|
147
|
+
/** 模型填的入参;凭据字段不得出现在这里 */
|
|
148
|
+
readonly inputSchema: JsonSchema;
|
|
149
|
+
readonly credentials?: readonly ChatComponentCredentialField[];
|
|
150
|
+
/** 返回 undefined 表示这一次不需要确认 */
|
|
151
|
+
confirm?(args: Readonly<Record<string, unknown>>): ChatComponentConfirmation | undefined;
|
|
152
|
+
invoke(args: Readonly<Record<string, unknown>>, context: ChatComponentInvokeContext): Promise<ChatComponentOutcome>;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* 凭据与「不再询问」的存放处。缺省实现在 localStorage。
|
|
156
|
+
* @experimental
|
|
157
|
+
*/
|
|
158
|
+
interface ChatComponentStore {
|
|
159
|
+
readCredentials(component: string): Promise<Readonly<Record<string, string>> | undefined>;
|
|
160
|
+
writeCredentials(component: string, values: Readonly<Record<string, string>>): Promise<void>;
|
|
161
|
+
isConsentRemembered(component: string, target: string): Promise<boolean>;
|
|
162
|
+
rememberConsent(component: string, target: string): Promise<void>;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* 一次组件调用在会话里留下的记录。只存结构化结果,不存成句的文案。
|
|
166
|
+
* @experimental
|
|
167
|
+
*/
|
|
168
|
+
interface ChatComponentCallRecord {
|
|
169
|
+
readonly component: string;
|
|
170
|
+
readonly label: ChatComponentText;
|
|
171
|
+
readonly actionLabel?: ChatComponentText;
|
|
172
|
+
readonly action: 'invoke' | 'update-credentials';
|
|
173
|
+
readonly outcome: 'succeeded' | 'failed' | 'declined' | 'cancelled';
|
|
174
|
+
readonly target?: string;
|
|
175
|
+
readonly detail?: string;
|
|
176
|
+
/** epoch ms */
|
|
177
|
+
readonly at: number;
|
|
178
|
+
}
|
|
179
|
+
/** @experimental */
|
|
180
|
+
interface HttpMessageComponentOptions {
|
|
181
|
+
readonly name: string;
|
|
182
|
+
readonly label: ChatComponentText;
|
|
183
|
+
/** 只由宿主配置;模型改不了 */
|
|
184
|
+
readonly endpoint: string;
|
|
185
|
+
/** 覆盖给模型的说明 */
|
|
186
|
+
readonly description?: string;
|
|
187
|
+
/** 首次收集凭据时显示的获取提示;挂到 `auth` 字段的 `tips` 上 */
|
|
188
|
+
readonly tips?: ChatComponentText;
|
|
189
|
+
/** 扩展宿主传带 host_permissions 的那一个;缺省取全局 fetch */
|
|
190
|
+
readonly fetch?: typeof fetch;
|
|
191
|
+
/** 缺省 30 000 */
|
|
192
|
+
readonly timeoutMs?: number;
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
85
195
|
//#region src/core/visionDelegate.d.ts
|
|
86
196
|
/**
|
|
87
197
|
* 委派目标端点的可辨识标识;告知卡与审计都只用这三项(FR-17.6a / FR-17.7a)
|
|
@@ -229,6 +339,12 @@ interface ChatbotHostAdapter {
|
|
|
229
339
|
docxDocumentReader?: DocxDocumentReader;
|
|
230
340
|
/** xlsx → 行流(`createXlsxBlockReader`);不注入即 `read_document` 读不了 Excel @experimental */
|
|
231
341
|
xlsxDocumentReader?: XlsxDocumentReader;
|
|
342
|
+
/**
|
|
343
|
+
* xlsx → 单元格网格(`createXlsxTableReader`)。注入后,估算超过阈值的 xlsx 附件只以画像进消息,
|
|
344
|
+
* 统计交给 `query_table` 在本机对全表计算(整张表不进上下文);不注入则两者都不发生。
|
|
345
|
+
* @experimental
|
|
346
|
+
*/
|
|
347
|
+
xlsxTableReader?: XlsxTableReader;
|
|
232
348
|
/**
|
|
233
349
|
* pptx → 逐页的块序列(`createPptxBlockReader`);不注入即 `read_document` 读不了演示文稿。
|
|
234
350
|
* 给的是页上的字与图,**不是页面渲染图**——要版式只能退到截屏。
|
|
@@ -338,6 +454,19 @@ interface ChatbotHostAdapter {
|
|
|
338
454
|
* @experimental
|
|
339
455
|
*/
|
|
340
456
|
documentSurface?: DocumentSurfaceHost;
|
|
457
|
+
/**
|
|
458
|
+
* 宿主组件(0.26.0 分册 14):宿主注册、模型以工具调用触发的能力,例如「把汇总发到微信」。
|
|
459
|
+
* 每个组件带自己的确认、凭据与结果卡;不注入(或空数组)即工具表与系统提示逐字不变。
|
|
460
|
+
* 名字不合规或重名时 `new ChatEngine` 抛 `VALIDATION_FAILED`。
|
|
461
|
+
* @experimental
|
|
462
|
+
*/
|
|
463
|
+
components?: readonly ChatComponent[];
|
|
464
|
+
/**
|
|
465
|
+
* 组件凭据与「不再询问」的存放处。缺省在 `localStorage`(键名见 README);
|
|
466
|
+
* 没有可用的 `localStorage`(如扩展的 sandbox 页)且没注入时,组件调用回 `TOOL_UNSUPPORTED`。
|
|
467
|
+
* @experimental
|
|
468
|
+
*/
|
|
469
|
+
componentStore?: ChatComponentStore;
|
|
341
470
|
}
|
|
342
471
|
/**
|
|
343
472
|
* DWG 图纸的宿主出口(0.22.0 分册 19)。
|
|
@@ -807,6 +936,12 @@ interface ChatMessage {
|
|
|
807
936
|
* @experimental
|
|
808
937
|
*/
|
|
809
938
|
perceptions?: PerceptionRecord[];
|
|
939
|
+
/**
|
|
940
|
+
* 该 run 内的宿主组件调用记录(0.26.0 分册 14)。结果卡读它,不依赖模型复述;
|
|
941
|
+
* 凭据永不进入这里。
|
|
942
|
+
* @experimental
|
|
943
|
+
*/
|
|
944
|
+
componentCalls?: ChatComponentCallRecord[];
|
|
810
945
|
/**
|
|
811
946
|
* 该 run 的大模型用量(0.10.0 UI-UX5 #47):消息操作区图标右侧显示
|
|
812
947
|
* 输入输出合计 tokens(千分位)。上游不回报用量时缺省,不显示假数据。
|
|
@@ -851,6 +986,12 @@ interface ChatSessionMeta {
|
|
|
851
986
|
archived?: boolean;
|
|
852
987
|
/** 用户已手动重命名:后续 send 不再用首条消息覆盖标题 */
|
|
853
988
|
titleLocked?: boolean;
|
|
989
|
+
/**
|
|
990
|
+
* 已落盘的消息条数(新会话为 0)。打开面板时用它判断最新会话是不是空的(分册 12)。
|
|
991
|
+
* 缺省表示来源没给,按非空处理。
|
|
992
|
+
* @experimental
|
|
993
|
+
*/
|
|
994
|
+
messageCount?: number;
|
|
854
995
|
}
|
|
855
996
|
/**
|
|
856
997
|
* 会话列表页:除了数据,还得告诉 UI「为什么是空的」(FR-21.4 / FR-21.11)。 @experimental
|
|
@@ -976,6 +1117,10 @@ type ChatEvent =
|
|
|
976
1117
|
type: 'page-perceived';
|
|
977
1118
|
runId: string;
|
|
978
1119
|
record: PerceptionRecord;
|
|
1120
|
+
} | {
|
|
1121
|
+
type: 'component-called';
|
|
1122
|
+
runId: string;
|
|
1123
|
+
record: ChatComponentCallRecord;
|
|
979
1124
|
} | {
|
|
980
1125
|
type: 'interaction-requested';
|
|
981
1126
|
id: string;
|
|
@@ -1100,6 +1245,17 @@ interface ChatbotConfig {
|
|
|
1100
1245
|
executorFactory?: (deps: SandboxExecutorDeps) => ScriptExecutor;
|
|
1101
1246
|
}
|
|
1102
1247
|
//#endregion
|
|
1248
|
+
//#region src/core/components/httpMessage.d.ts
|
|
1249
|
+
/**
|
|
1250
|
+
* 「向外部服务发一条消息」的现成组件:`POST` JSON `{ content, receiver, auth }`。
|
|
1251
|
+
*
|
|
1252
|
+
* - `content` 一律先经 Markdown → HTML 转换;原文里的 HTML 原样保留。
|
|
1253
|
+
* - `auth` 是组件的唯一凭据:首次发送时向用户收集,存进组件存储后复用。
|
|
1254
|
+
* - 地址只由宿主配置,模型改不了。
|
|
1255
|
+
* @experimental
|
|
1256
|
+
*/
|
|
1257
|
+
declare function createHttpMessageComponent(options: HttpMessageComponentOptions): ChatComponent;
|
|
1258
|
+
//#endregion
|
|
1103
1259
|
//#region src/core/interactionBridge.d.ts
|
|
1104
1260
|
/** 单个渲染档的能力集(复合桥判定该不该回落 native 的唯一数据源) @experimental */
|
|
1105
1261
|
interface RendererCapability {
|
|
@@ -1260,6 +1416,8 @@ declare const chatbotDictionary: {
|
|
|
1260
1416
|
'message.deleted.description': string;
|
|
1261
1417
|
'message.viewTrace': string;
|
|
1262
1418
|
'message.tokens': string;
|
|
1419
|
+
'message.time.sent': string;
|
|
1420
|
+
'message.time.replied': string;
|
|
1263
1421
|
'message.skillsUsed': string;
|
|
1264
1422
|
'message.skill': string;
|
|
1265
1423
|
'message.edit': string;
|
|
@@ -1418,6 +1576,26 @@ declare const chatbotDictionary: {
|
|
|
1418
1576
|
'interaction.allow': string;
|
|
1419
1577
|
'interaction.deny': string;
|
|
1420
1578
|
'interaction.required': string;
|
|
1579
|
+
'interaction.component.body': string;
|
|
1580
|
+
'interaction.component.endpoint': string;
|
|
1581
|
+
'interaction.component.insecure': string;
|
|
1582
|
+
'interaction.component.previewTruncated': string;
|
|
1583
|
+
'interaction.component.remember': string;
|
|
1584
|
+
'component.locale': string;
|
|
1585
|
+
'component.action.invoke': string;
|
|
1586
|
+
'component.httpMessage.action': string;
|
|
1587
|
+
'component.httpMessage.credential': string;
|
|
1588
|
+
'component.httpMessage.credentialHint': string;
|
|
1589
|
+
'component.credentials.title': string;
|
|
1590
|
+
'component.credentials.updateTitle': string;
|
|
1591
|
+
'component.credentials.saved': string;
|
|
1592
|
+
'component.credentials.missing': string;
|
|
1593
|
+
'component.credentials.updated': string;
|
|
1594
|
+
'component.credentials.cancelled': string;
|
|
1595
|
+
'component.outcome.succeeded': string;
|
|
1596
|
+
'component.outcome.failed': string;
|
|
1597
|
+
'component.outcome.declined': string;
|
|
1598
|
+
'component.outcome.cancelled': string;
|
|
1421
1599
|
'surface.addItem': string;
|
|
1422
1600
|
'surface.removeItem': string;
|
|
1423
1601
|
'surface.arrayFirstItemOnly': string;
|
|
@@ -1480,6 +1658,7 @@ declare const chatbotDictionary: {
|
|
|
1480
1658
|
'attachment.pdfRefused': string;
|
|
1481
1659
|
'attachment.pdfNoExtractor': string;
|
|
1482
1660
|
'attachment.textTooLong': string;
|
|
1661
|
+
'attachment.tableAsQuery': string;
|
|
1483
1662
|
'composer.dictate': string;
|
|
1484
1663
|
'composer.dictate.stop': string;
|
|
1485
1664
|
'composer.dictate.recording': string;
|
|
@@ -1700,6 +1879,8 @@ declare const chatbotDictionary: {
|
|
|
1700
1879
|
'message.deleted.description': string;
|
|
1701
1880
|
'message.viewTrace': string;
|
|
1702
1881
|
'message.tokens': string;
|
|
1882
|
+
'message.time.sent': string;
|
|
1883
|
+
'message.time.replied': string;
|
|
1703
1884
|
'message.skillsUsed': string;
|
|
1704
1885
|
'message.skill': string;
|
|
1705
1886
|
'capability.tools.on': string;
|
|
@@ -1855,6 +2036,26 @@ declare const chatbotDictionary: {
|
|
|
1855
2036
|
'interaction.allow': string;
|
|
1856
2037
|
'interaction.deny': string;
|
|
1857
2038
|
'interaction.required': string;
|
|
2039
|
+
'interaction.component.body': string;
|
|
2040
|
+
'interaction.component.endpoint': string;
|
|
2041
|
+
'interaction.component.insecure': string;
|
|
2042
|
+
'interaction.component.previewTruncated': string;
|
|
2043
|
+
'interaction.component.remember': string;
|
|
2044
|
+
'component.locale': string;
|
|
2045
|
+
'component.action.invoke': string;
|
|
2046
|
+
'component.httpMessage.action': string;
|
|
2047
|
+
'component.httpMessage.credential': string;
|
|
2048
|
+
'component.httpMessage.credentialHint': string;
|
|
2049
|
+
'component.credentials.title': string;
|
|
2050
|
+
'component.credentials.updateTitle': string;
|
|
2051
|
+
'component.credentials.saved': string;
|
|
2052
|
+
'component.credentials.missing': string;
|
|
2053
|
+
'component.credentials.updated': string;
|
|
2054
|
+
'component.credentials.cancelled': string;
|
|
2055
|
+
'component.outcome.succeeded': string;
|
|
2056
|
+
'component.outcome.failed': string;
|
|
2057
|
+
'component.outcome.declined': string;
|
|
2058
|
+
'component.outcome.cancelled': string;
|
|
1858
2059
|
'surface.addItem': string;
|
|
1859
2060
|
'surface.removeItem': string;
|
|
1860
2061
|
'surface.arrayFirstItemOnly': string;
|
|
@@ -1917,6 +2118,7 @@ declare const chatbotDictionary: {
|
|
|
1917
2118
|
'attachment.pdfRefused': string;
|
|
1918
2119
|
'attachment.pdfNoExtractor': string;
|
|
1919
2120
|
'attachment.textTooLong': string;
|
|
2121
|
+
'attachment.tableAsQuery': string;
|
|
1920
2122
|
'composer.dictate': string;
|
|
1921
2123
|
'composer.dictate.stop': string;
|
|
1922
2124
|
'composer.dictate.recording': string;
|
|
@@ -2137,6 +2339,8 @@ declare const useT: () => TranslateFn<{
|
|
|
2137
2339
|
'message.deleted.description': string;
|
|
2138
2340
|
'message.viewTrace': string;
|
|
2139
2341
|
'message.tokens': string;
|
|
2342
|
+
'message.time.sent': string;
|
|
2343
|
+
'message.time.replied': string;
|
|
2140
2344
|
'message.skillsUsed': string;
|
|
2141
2345
|
'message.skill': string;
|
|
2142
2346
|
'message.edit': string;
|
|
@@ -2295,6 +2499,26 @@ declare const useT: () => TranslateFn<{
|
|
|
2295
2499
|
'interaction.allow': string;
|
|
2296
2500
|
'interaction.deny': string;
|
|
2297
2501
|
'interaction.required': string;
|
|
2502
|
+
'interaction.component.body': string;
|
|
2503
|
+
'interaction.component.endpoint': string;
|
|
2504
|
+
'interaction.component.insecure': string;
|
|
2505
|
+
'interaction.component.previewTruncated': string;
|
|
2506
|
+
'interaction.component.remember': string;
|
|
2507
|
+
'component.locale': string;
|
|
2508
|
+
'component.action.invoke': string;
|
|
2509
|
+
'component.httpMessage.action': string;
|
|
2510
|
+
'component.httpMessage.credential': string;
|
|
2511
|
+
'component.httpMessage.credentialHint': string;
|
|
2512
|
+
'component.credentials.title': string;
|
|
2513
|
+
'component.credentials.updateTitle': string;
|
|
2514
|
+
'component.credentials.saved': string;
|
|
2515
|
+
'component.credentials.missing': string;
|
|
2516
|
+
'component.credentials.updated': string;
|
|
2517
|
+
'component.credentials.cancelled': string;
|
|
2518
|
+
'component.outcome.succeeded': string;
|
|
2519
|
+
'component.outcome.failed': string;
|
|
2520
|
+
'component.outcome.declined': string;
|
|
2521
|
+
'component.outcome.cancelled': string;
|
|
2298
2522
|
'surface.addItem': string;
|
|
2299
2523
|
'surface.removeItem': string;
|
|
2300
2524
|
'surface.arrayFirstItemOnly': string;
|
|
@@ -2357,6 +2581,7 @@ declare const useT: () => TranslateFn<{
|
|
|
2357
2581
|
'attachment.pdfRefused': string;
|
|
2358
2582
|
'attachment.pdfNoExtractor': string;
|
|
2359
2583
|
'attachment.textTooLong': string;
|
|
2584
|
+
'attachment.tableAsQuery': string;
|
|
2360
2585
|
'composer.dictate': string;
|
|
2361
2586
|
'composer.dictate.stop': string;
|
|
2362
2587
|
'composer.dictate.recording': string;
|
|
@@ -2577,6 +2802,8 @@ declare const useT: () => TranslateFn<{
|
|
|
2577
2802
|
'message.deleted.description': string;
|
|
2578
2803
|
'message.viewTrace': string;
|
|
2579
2804
|
'message.tokens': string;
|
|
2805
|
+
'message.time.sent': string;
|
|
2806
|
+
'message.time.replied': string;
|
|
2580
2807
|
'message.skillsUsed': string;
|
|
2581
2808
|
'message.skill': string;
|
|
2582
2809
|
'capability.tools.on': string;
|
|
@@ -2732,6 +2959,26 @@ declare const useT: () => TranslateFn<{
|
|
|
2732
2959
|
'interaction.allow': string;
|
|
2733
2960
|
'interaction.deny': string;
|
|
2734
2961
|
'interaction.required': string;
|
|
2962
|
+
'interaction.component.body': string;
|
|
2963
|
+
'interaction.component.endpoint': string;
|
|
2964
|
+
'interaction.component.insecure': string;
|
|
2965
|
+
'interaction.component.previewTruncated': string;
|
|
2966
|
+
'interaction.component.remember': string;
|
|
2967
|
+
'component.locale': string;
|
|
2968
|
+
'component.action.invoke': string;
|
|
2969
|
+
'component.httpMessage.action': string;
|
|
2970
|
+
'component.httpMessage.credential': string;
|
|
2971
|
+
'component.httpMessage.credentialHint': string;
|
|
2972
|
+
'component.credentials.title': string;
|
|
2973
|
+
'component.credentials.updateTitle': string;
|
|
2974
|
+
'component.credentials.saved': string;
|
|
2975
|
+
'component.credentials.missing': string;
|
|
2976
|
+
'component.credentials.updated': string;
|
|
2977
|
+
'component.credentials.cancelled': string;
|
|
2978
|
+
'component.outcome.succeeded': string;
|
|
2979
|
+
'component.outcome.failed': string;
|
|
2980
|
+
'component.outcome.declined': string;
|
|
2981
|
+
'component.outcome.cancelled': string;
|
|
2735
2982
|
'surface.addItem': string;
|
|
2736
2983
|
'surface.removeItem': string;
|
|
2737
2984
|
'surface.arrayFirstItemOnly': string;
|
|
@@ -2794,6 +3041,7 @@ declare const useT: () => TranslateFn<{
|
|
|
2794
3041
|
'attachment.pdfRefused': string;
|
|
2795
3042
|
'attachment.pdfNoExtractor': string;
|
|
2796
3043
|
'attachment.textTooLong': string;
|
|
3044
|
+
'attachment.tableAsQuery': string;
|
|
2797
3045
|
'composer.dictate': string;
|
|
2798
3046
|
'composer.dictate.stop': string;
|
|
2799
3047
|
'composer.dictate.recording': string;
|
|
@@ -3204,13 +3452,19 @@ interface InterruptedBannerProps {
|
|
|
3204
3452
|
engine: ChatEngine;
|
|
3205
3453
|
/** 会话切换时重新检查(值变化即触发重新 listInterrupted) */
|
|
3206
3454
|
sessionId?: string;
|
|
3455
|
+
/**
|
|
3456
|
+
* 点「继续」后、`engine.resume` 之前调用,参数是快照所属的会话 id,用来把界面切到那个会话。
|
|
3457
|
+
* 不传则不切,行为与 0.25.0 相同;回调失败不阻断恢复。
|
|
3458
|
+
* @experimental
|
|
3459
|
+
*/
|
|
3460
|
+
onBeforeResume?(sessionId: string): void | Promise<void>;
|
|
3207
3461
|
}
|
|
3208
3462
|
/**
|
|
3209
3463
|
* 未完成对话提示条:挂载/会话切换时检查 interrupted 快照,非空则顶部 banner
|
|
3210
3464
|
* + Resume(engine.resume 后等待中的表单重新进入 bridge.pending)。
|
|
3211
3465
|
* @stable
|
|
3212
3466
|
*/
|
|
3213
|
-
declare function InterruptedBanner({ engine, sessionId }: InterruptedBannerProps): import("react").JSX.Element | null;
|
|
3467
|
+
declare function InterruptedBanner({ engine, sessionId, onBeforeResume }: InterruptedBannerProps): import("react").JSX.Element | null;
|
|
3214
3468
|
//#endregion
|
|
3215
3469
|
//#region src/react/ErrorCard.d.ts
|
|
3216
3470
|
/** @stable */
|
|
@@ -3240,6 +3494,6 @@ declare function ErrorCard({ code, message, loopLimits, onOpenSettings, onDismis
|
|
|
3240
3494
|
* Version of the published `@webskill/chatbot` package, injected at build time.
|
|
3241
3495
|
* @stable
|
|
3242
3496
|
*/
|
|
3243
|
-
declare const CHATBOT_VERSION = "0.
|
|
3497
|
+
declare const CHATBOT_VERSION = "0.24.0";
|
|
3244
3498
|
//#endregion
|
|
3245
|
-
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, ChatbotVisionDelegate, type ChatbotVisionDelegateOptions, CompositeUiBridge, type CompositeUiBridgeDeps, DEFAULT_RENDERER_CAPABILITIES, DEFAULT_RUNTIME_CONFIG_STORAGE_KEY, type DownloadableFile, type DwgHost, ErrorCard, type ErrorCardProps, InteractionCard, type InteractionCardProps, InterruptedBanner, type InterruptedBannerProps, type Locale, type LocalizedText, 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 RuntimeQuickPrompt, type RuntimeRendererId, type SandboxExecutorDeps, type SettingsSectionId, SkillBadges, SpecInteraction, type SpecInteractionProps, VercelPayloadPreview, type VercelPayloadPreviewProps, VercelSurfaceHost, type VercelSurfaceHostProps, VercelSurfaceSnapshotHost, type VercelSurfaceSnapshotHostProps, type VisionDelegationConsent, type VisionDelegationEndpoint, WEB_OFFICE_TEMPLATE_PREFIX, chatbotDictionary, configureA2uiMarkdown, createLocalStorageRuntimeConfigStore, createMemoryRuntimeConfigStore, isLlmEntryUsable, pickUsableLlmEntry, probeA2uiAvailability, probeOpenUiAvailability, sandboxExecutorDeps, useT };
|
|
3499
|
+
export { A2uiSurfaceHost, type A2uiSurfaceHostProps, A2uiSurfaceSnapshotHost, type A2uiSurfaceSnapshotHostProps, type AppearanceChange, CHATBOT_VERSION, type ChatAttachmentInput, type ChatAttachmentMeta, type ChatComponent, type ChatComponentCallRecord, type ChatComponentConfirmation, type ChatComponentCredentialField, type ChatComponentInvokeContext, type ChatComponentOutcome, type ChatComponentStore, type ChatComponentText, 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, ChatbotVisionDelegate, type ChatbotVisionDelegateOptions, CompositeUiBridge, type CompositeUiBridgeDeps, DEFAULT_RENDERER_CAPABILITIES, DEFAULT_RUNTIME_CONFIG_STORAGE_KEY, type DownloadableFile, type DwgHost, ErrorCard, type ErrorCardProps, type HttpMessageComponentOptions, InteractionCard, type InteractionCardProps, InterruptedBanner, type InterruptedBannerProps, type Locale, type LocalizedText, 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 RuntimeQuickPrompt, type RuntimeRendererId, type SandboxExecutorDeps, type SettingsSectionId, SkillBadges, SpecInteraction, type SpecInteractionProps, VercelPayloadPreview, type VercelPayloadPreviewProps, VercelSurfaceHost, type VercelSurfaceHostProps, VercelSurfaceSnapshotHost, type VercelSurfaceSnapshotHostProps, type VisionDelegationConsent, type VisionDelegationEndpoint, WEB_OFFICE_TEMPLATE_PREFIX, chatbotDictionary, configureA2uiMarkdown, createHttpMessageComponent, createLocalStorageRuntimeConfigStore, createMemoryRuntimeConfigStore, isLlmEntryUsable, pickUsableLlmEntry, probeA2uiAvailability, probeOpenUiAvailability, sandboxExecutorDeps, useT };
|