@webskill/chatbot 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1417 @@
1
+ import "react";
2
+ import "react/jsx-runtime";
3
+ //#region ../ui-kit/src/i18n/types.d.ts
4
+ /** @stable */
5
+ type Locale = 'zh' | 'en';
6
+ /**
7
+ * 宿主 / 用户提供的、随界面语言切换的短文案(0.13.0 分册 21 FR-21.1)。
8
+ * SDK 自己的界面文案走 `createI18n` 字典,不用这个类型。
9
+ * 允许只填部分语种,缺的语种由 `resolveLocalizedText` 借用已填的。
10
+ * @experimental
11
+ */
12
+ type LocalizedText = Partial<Record<Locale, string>>;
13
+ /** 单语言词条:key → 文案(支持 {name} 占位插值) */
14
+ type LocaleMessages = Record<string, string>;
15
+ /** 双语字典:zh/en 两个 locale 的键集必须一致(见 assertDictionaryComplete) */
16
+ interface Dictionary {
17
+ en: LocaleMessages;
18
+ zh: LocaleMessages;
19
+ }
20
+ type DictionaryKey<D extends Dictionary> = keyof D['en'] & string;
21
+ type InterpolationParams = Record<string, string | number>;
22
+ /** t(key, params?):查当前 locale 词条并做 {name} 插值 */
23
+ type TranslateFn<D extends Dictionary = Dictionary> = (key: DictionaryKey<D>, params?: InterpolationParams) => string;
24
+ //#endregion
25
+ //#region ../../node_modules/.pnpm/@types+unist@3.0.3/node_modules/@types/unist/index.d.ts
26
+ // ## Interfaces
27
+ /**
28
+ * Info associated with nodes by the ecosystem.
29
+ *
30
+ * This space is guaranteed to never be specified by unist or specifications
31
+ * implementing unist.
32
+ * But you can use it in utilities and plugins to store data.
33
+ *
34
+ * This type can be augmented to register custom data.
35
+ * For example:
36
+ *
37
+ * ```ts
38
+ * declare module 'unist' {
39
+ * interface Data {
40
+ * // `someNode.data.myId` is typed as `number | undefined`
41
+ * myId?: number | undefined
42
+ * }
43
+ * }
44
+ * ```
45
+ */
46
+ interface Data$1 {}
47
+ /**
48
+ * One place in a source file.
49
+ */
50
+ interface Point {
51
+ /**
52
+ * Line in a source file (1-indexed integer).
53
+ */
54
+ line: number;
55
+ /**
56
+ * Column in a source file (1-indexed integer).
57
+ */
58
+ column: number;
59
+ /**
60
+ * Character in a source file (0-indexed integer).
61
+ */
62
+ offset?: number | undefined;
63
+ }
64
+ /**
65
+ * Position of a node in a source document.
66
+ *
67
+ * A position is a range between two points.
68
+ */
69
+ interface Position {
70
+ /**
71
+ * Place of the first character of the parsed source region.
72
+ */
73
+ start: Point;
74
+ /**
75
+ * Place of the first character after the parsed source region.
76
+ */
77
+ end: Point;
78
+ }
79
+ /**
80
+ * Abstract unist node.
81
+ *
82
+ * The syntactic unit in unist syntax trees are called nodes.
83
+ *
84
+ * This interface is supposed to be extended.
85
+ * If you can use {@link Literal} or {@link Parent}, you should.
86
+ * But for example in markdown, a `thematicBreak` (`***`), is neither literal
87
+ * nor parent, but still a node.
88
+ */
89
+ interface Node$1 {
90
+ /**
91
+ * Node type.
92
+ */
93
+ type: string;
94
+ /**
95
+ * Info from the ecosystem.
96
+ */
97
+ data?: Data$1 | undefined;
98
+ /**
99
+ * Position of a node in a source document.
100
+ *
101
+ * Nodes that are generated (not in the original source document) must not
102
+ * have a position.
103
+ */
104
+ position?: Position | undefined;
105
+ }
106
+ //#endregion
107
+ //#region ../../node_modules/.pnpm/@types+hast@3.0.5/node_modules/@types/hast/index.d.ts
108
+ // ## Interfaces
109
+ /**
110
+ * Info associated with hast nodes by the ecosystem.
111
+ *
112
+ * This space is guaranteed to never be specified by unist or hast.
113
+ * But you can use it in utilities and plugins to store data.
114
+ *
115
+ * This type can be augmented to register custom data.
116
+ * For example:
117
+ *
118
+ * ```ts
119
+ * declare module 'hast' {
120
+ * interface Data {
121
+ * // `someNode.data.myId` is typed as `number | undefined`
122
+ * myId?: number | undefined
123
+ * }
124
+ * }
125
+ * ```
126
+ */
127
+ interface Data extends Data$1 {}
128
+ /**
129
+ * Info associated with an element.
130
+ */
131
+ interface Properties {
132
+ abbr?: string | undefined;
133
+ about?: Array<string> | undefined;
134
+ accentHeight?: number | string | undefined;
135
+ accept?: Array<string> | undefined;
136
+ acceptCharset?: Array<string> | undefined;
137
+ accessKey?: Array<string> | undefined;
138
+ accumulate?: string | undefined;
139
+ action?: string | undefined;
140
+ additive?: string | undefined;
141
+ align?: string | undefined;
142
+ alignmentBaseline?: string | undefined;
143
+ aLink?: string | undefined;
144
+ allow?: string | undefined;
145
+ allowFullScreen?: boolean | string | undefined;
146
+ allowPaymentRequest?: boolean | string | undefined;
147
+ allowTransparency?: string | undefined;
148
+ allowUserMedia?: boolean | string | undefined;
149
+ alpha?: boolean | string | undefined;
150
+ alphabetic?: number | string | undefined;
151
+ alt?: string | undefined;
152
+ amplitude?: number | string | undefined;
153
+ arabicForm?: string | undefined;
154
+ archive?: Array<string> | undefined;
155
+ ariaActiveDescendant?: string | undefined;
156
+ ariaAtomic?: "false" | "true" | (string & {}) | undefined;
157
+ ariaAutoComplete?: string | undefined;
158
+ ariaBusy?: "false" | "true" | (string & {}) | undefined;
159
+ ariaChecked?: "false" | "true" | (string & {}) | undefined;
160
+ ariaColCount?: number | string | undefined;
161
+ ariaColIndex?: number | string | undefined;
162
+ ariaColSpan?: number | string | undefined;
163
+ ariaControls?: Array<string> | undefined;
164
+ ariaCurrent?: string | undefined;
165
+ ariaDescribedBy?: Array<string> | undefined;
166
+ ariaDetails?: string | undefined;
167
+ ariaDisabled?: "false" | "true" | (string & {}) | undefined;
168
+ ariaDropEffect?: Array<string> | undefined;
169
+ ariaErrorMessage?: string | undefined;
170
+ ariaExpanded?: "false" | "true" | (string & {}) | undefined;
171
+ ariaFlowTo?: Array<string> | undefined;
172
+ ariaGrabbed?: "false" | "true" | (string & {}) | undefined;
173
+ ariaHasPopup?: string | undefined;
174
+ ariaHidden?: "false" | "true" | (string & {}) | undefined;
175
+ ariaInvalid?: string | undefined;
176
+ ariaKeyShortcuts?: string | undefined;
177
+ ariaLabel?: string | undefined;
178
+ ariaLabelledBy?: Array<string> | undefined;
179
+ ariaLevel?: number | string | undefined;
180
+ ariaLive?: string | undefined;
181
+ ariaModal?: "false" | "true" | (string & {}) | undefined;
182
+ ariaMultiLine?: "false" | "true" | (string & {}) | undefined;
183
+ ariaMultiSelectable?: "false" | "true" | (string & {}) | undefined;
184
+ ariaOrientation?: string | undefined;
185
+ ariaOwns?: Array<string> | undefined;
186
+ ariaPlaceholder?: string | undefined;
187
+ ariaPosInSet?: number | string | undefined;
188
+ ariaPressed?: "false" | "true" | (string & {}) | undefined;
189
+ ariaReadOnly?: "false" | "true" | (string & {}) | undefined;
190
+ ariaRelevant?: string | undefined;
191
+ ariaRequired?: "false" | "true" | (string & {}) | undefined;
192
+ ariaRoleDescription?: Array<string> | undefined;
193
+ ariaRowCount?: number | string | undefined;
194
+ ariaRowIndex?: number | string | undefined;
195
+ ariaRowSpan?: number | string | undefined;
196
+ ariaSelected?: "false" | "true" | (string & {}) | undefined;
197
+ ariaSetSize?: number | string | undefined;
198
+ ariaSort?: string | undefined;
199
+ ariaValueMax?: number | string | undefined;
200
+ ariaValueMin?: number | string | undefined;
201
+ ariaValueNow?: number | string | undefined;
202
+ ariaValueText?: string | undefined;
203
+ as?: string | undefined;
204
+ ascent?: number | string | undefined;
205
+ async?: boolean | string | undefined;
206
+ attributeName?: string | undefined;
207
+ attributeType?: string | undefined;
208
+ autoCapitalize?: string | undefined;
209
+ autoComplete?: Array<string> | undefined;
210
+ autoCorrect?: string | undefined;
211
+ autoFocus?: boolean | string | undefined;
212
+ autoPlay?: boolean | string | undefined;
213
+ autoSave?: string | undefined;
214
+ axis?: string | undefined;
215
+ azimuth?: number | string | undefined;
216
+ background?: string | undefined;
217
+ bandwidth?: string | undefined;
218
+ baseFrequency?: string | undefined;
219
+ baselineShift?: string | undefined;
220
+ baseProfile?: string | undefined;
221
+ bbox?: string | undefined;
222
+ begin?: string | undefined;
223
+ bgColor?: string | undefined;
224
+ bias?: number | string | undefined;
225
+ blocking?: Array<string> | undefined;
226
+ border?: number | string | undefined;
227
+ borderColor?: string | undefined;
228
+ bottomMargin?: number | string | undefined;
229
+ by?: string | undefined;
230
+ calcMode?: string | undefined;
231
+ capHeight?: number | string | undefined;
232
+ capture?: string | undefined;
233
+ cellPadding?: string | undefined;
234
+ cellSpacing?: string | undefined;
235
+ char?: string | undefined;
236
+ charOff?: string | undefined;
237
+ charSet?: string | undefined;
238
+ checked?: boolean | string | undefined;
239
+ cite?: string | undefined;
240
+ classId?: string | undefined;
241
+ className?: Array<string> | undefined;
242
+ clear?: string | undefined;
243
+ clip?: string | undefined;
244
+ clipPath?: string | undefined;
245
+ clipPathUnits?: string | undefined;
246
+ clipRule?: string | undefined;
247
+ closedBy?: string | undefined;
248
+ code?: string | undefined;
249
+ codeBase?: string | undefined;
250
+ codeType?: string | undefined;
251
+ color?: string | undefined;
252
+ colorInterpolation?: string | undefined;
253
+ colorInterpolationFilters?: string | undefined;
254
+ colorProfile?: string | undefined;
255
+ colorRendering?: string | undefined;
256
+ colorSpace?: string | undefined;
257
+ cols?: number | string | undefined;
258
+ colSpan?: number | string | undefined;
259
+ command?: string | undefined;
260
+ commandFor?: string | undefined;
261
+ compact?: boolean | string | undefined;
262
+ content?: string | undefined;
263
+ contentEditable?: "false" | "true" | (string & {}) | undefined;
264
+ contentScriptType?: string | undefined;
265
+ contentStyleType?: string | undefined;
266
+ controls?: boolean | string | undefined;
267
+ controlsList?: Array<string> | undefined;
268
+ coords?: Array<number | string> | undefined;
269
+ credentialless?: boolean | string | undefined;
270
+ crossOrigin?: string | undefined;
271
+ cursor?: string | undefined;
272
+ cx?: string | undefined;
273
+ cy?: string | undefined;
274
+ d?: string | undefined;
275
+ data?: string | undefined;
276
+ dataType?: string | undefined;
277
+ dateTime?: string | undefined;
278
+ declare?: boolean | string | undefined;
279
+ decoding?: string | undefined;
280
+ default?: boolean | string | undefined;
281
+ defaultAction?: string | undefined;
282
+ defer?: boolean | string | undefined;
283
+ descent?: number | string | undefined;
284
+ diffuseConstant?: number | string | undefined;
285
+ dir?: string | undefined;
286
+ direction?: string | undefined;
287
+ dirName?: string | undefined;
288
+ disabled?: boolean | string | undefined;
289
+ disablePictureInPicture?: boolean | string | undefined;
290
+ disableRemotePlayback?: boolean | string | undefined;
291
+ display?: string | undefined;
292
+ divisor?: number | string | undefined;
293
+ dominantBaseline?: string | undefined;
294
+ download?: boolean | string | undefined;
295
+ draggable?: "false" | "true" | (string & {}) | undefined;
296
+ dur?: string | undefined;
297
+ dx?: string | undefined;
298
+ dy?: string | undefined;
299
+ edgeMode?: string | undefined;
300
+ editable?: string | undefined;
301
+ elevation?: number | string | undefined;
302
+ enableBackground?: string | undefined;
303
+ encType?: string | undefined;
304
+ end?: string | undefined;
305
+ enterKeyHint?: string | undefined;
306
+ event?: string | undefined;
307
+ exponent?: number | string | undefined;
308
+ exportParts?: Array<string> | undefined;
309
+ externalResourcesRequired?: string | undefined;
310
+ face?: string | undefined;
311
+ fetchPriority?: string | undefined;
312
+ fill?: string | undefined;
313
+ fillOpacity?: number | string | undefined;
314
+ fillRule?: string | undefined;
315
+ filter?: string | undefined;
316
+ filterRes?: string | undefined;
317
+ filterUnits?: string | undefined;
318
+ floodColor?: string | undefined;
319
+ floodOpacity?: string | undefined;
320
+ focusable?: string | undefined;
321
+ focusHighlight?: string | undefined;
322
+ fontFamily?: string | undefined;
323
+ fontSize?: string | undefined;
324
+ fontSizeAdjust?: string | undefined;
325
+ fontStretch?: string | undefined;
326
+ fontStyle?: string | undefined;
327
+ fontVariant?: string | undefined;
328
+ fontWeight?: string | undefined;
329
+ form?: string | undefined;
330
+ formAction?: string | undefined;
331
+ format?: string | undefined;
332
+ formEncType?: string | undefined;
333
+ formMethod?: string | undefined;
334
+ formNoValidate?: boolean | string | undefined;
335
+ formTarget?: string | undefined;
336
+ fr?: string | undefined;
337
+ frame?: string | undefined;
338
+ frameBorder?: string | undefined;
339
+ from?: string | undefined;
340
+ fx?: string | undefined;
341
+ fy?: string | undefined;
342
+ g1?: Array<string> | undefined;
343
+ g2?: Array<string> | undefined;
344
+ glyphName?: Array<string> | undefined;
345
+ glyphOrientationHorizontal?: string | undefined;
346
+ glyphOrientationVertical?: string | undefined;
347
+ glyphRef?: string | undefined;
348
+ gradientTransform?: string | undefined;
349
+ gradientUnits?: string | undefined;
350
+ handler?: string | undefined;
351
+ hanging?: number | string | undefined;
352
+ hatchContentUnits?: string | undefined;
353
+ hatchUnits?: string | undefined;
354
+ headers?: Array<string> | undefined;
355
+ height?: number | string | undefined;
356
+ hidden?: boolean | string | undefined;
357
+ high?: number | string | undefined;
358
+ horizAdvX?: number | string | undefined;
359
+ horizOriginX?: number | string | undefined;
360
+ horizOriginY?: number | string | undefined;
361
+ href?: string | undefined;
362
+ hrefLang?: string | undefined;
363
+ hSpace?: number | string | undefined;
364
+ htmlFor?: Array<string> | undefined;
365
+ httpEquiv?: Array<string> | undefined;
366
+ id?: string | undefined;
367
+ ideographic?: number | string | undefined;
368
+ imageRendering?: string | undefined;
369
+ imageSizes?: string | undefined;
370
+ imageSrcSet?: string | undefined;
371
+ in?: string | undefined;
372
+ in2?: string | undefined;
373
+ inert?: boolean | string | undefined;
374
+ initialVisibility?: string | undefined;
375
+ inputMode?: string | undefined;
376
+ integrity?: string | undefined;
377
+ intercept?: number | string | undefined;
378
+ is?: string | undefined;
379
+ isMap?: boolean | string | undefined;
380
+ itemId?: string | undefined;
381
+ itemProp?: Array<string> | undefined;
382
+ itemRef?: Array<string> | undefined;
383
+ itemScope?: boolean | string | undefined;
384
+ itemType?: Array<string> | undefined;
385
+ k?: number | string | undefined;
386
+ k1?: number | string | undefined;
387
+ k2?: number | string | undefined;
388
+ k3?: number | string | undefined;
389
+ k4?: number | string | undefined;
390
+ kernelMatrix?: Array<string> | undefined;
391
+ kernelUnitLength?: string | undefined;
392
+ kerning?: string | undefined;
393
+ keyPoints?: string | undefined;
394
+ keySplines?: string | undefined;
395
+ keyTimes?: string | undefined;
396
+ kind?: string | undefined;
397
+ label?: string | undefined;
398
+ lang?: string | undefined;
399
+ language?: string | undefined;
400
+ leftMargin?: number | string | undefined;
401
+ lengthAdjust?: string | undefined;
402
+ letterSpacing?: string | undefined;
403
+ lightingColor?: string | undefined;
404
+ limitingConeAngle?: number | string | undefined;
405
+ link?: string | undefined;
406
+ list?: string | undefined;
407
+ loading?: string | undefined;
408
+ local?: string | undefined;
409
+ longDesc?: string | undefined;
410
+ loop?: boolean | string | undefined;
411
+ low?: number | string | undefined;
412
+ lowSrc?: string | undefined;
413
+ manifest?: string | undefined;
414
+ marginHeight?: number | string | undefined;
415
+ marginWidth?: number | string | undefined;
416
+ markerEnd?: string | undefined;
417
+ markerHeight?: string | undefined;
418
+ markerMid?: string | undefined;
419
+ markerStart?: string | undefined;
420
+ markerUnits?: string | undefined;
421
+ markerWidth?: string | undefined;
422
+ mask?: string | undefined;
423
+ maskContentUnits?: string | undefined;
424
+ maskType?: string | undefined;
425
+ maskUnits?: string | undefined;
426
+ mathematical?: string | undefined;
427
+ max?: string | undefined;
428
+ maxLength?: number | string | undefined;
429
+ media?: string | undefined;
430
+ mediaCharacterEncoding?: string | undefined;
431
+ mediaContentEncodings?: string | undefined;
432
+ mediaSize?: number | string | undefined;
433
+ mediaTime?: string | undefined;
434
+ method?: string | undefined;
435
+ min?: string | undefined;
436
+ minLength?: number | string | undefined;
437
+ mode?: string | undefined;
438
+ multiple?: boolean | string | undefined;
439
+ muted?: boolean | string | undefined;
440
+ name?: string | undefined;
441
+ navDown?: string | undefined;
442
+ navDownLeft?: string | undefined;
443
+ navDownRight?: string | undefined;
444
+ navLeft?: string | undefined;
445
+ navNext?: string | undefined;
446
+ navPrev?: string | undefined;
447
+ navRight?: string | undefined;
448
+ navUp?: string | undefined;
449
+ navUpLeft?: string | undefined;
450
+ navUpRight?: string | undefined;
451
+ noHref?: boolean | string | undefined;
452
+ noModule?: boolean | string | undefined;
453
+ nonce?: string | undefined;
454
+ noResize?: boolean | string | undefined;
455
+ noShade?: boolean | string | undefined;
456
+ noValidate?: boolean | string | undefined;
457
+ noWrap?: boolean | string | undefined;
458
+ numOctaves?: string | undefined;
459
+ object?: string | undefined;
460
+ observer?: string | undefined;
461
+ offset?: string | undefined;
462
+ onAbort?: string | undefined;
463
+ onActivate?: string | undefined;
464
+ onAfterPrint?: string | undefined;
465
+ onAuxClick?: string | undefined;
466
+ onBeforeMatch?: string | undefined;
467
+ onBeforePrint?: string | undefined;
468
+ onBeforeToggle?: string | undefined;
469
+ onBeforeUnload?: string | undefined;
470
+ onBegin?: string | undefined;
471
+ onBlur?: string | undefined;
472
+ onCancel?: string | undefined;
473
+ onCanPlay?: string | undefined;
474
+ onCanPlayThrough?: string | undefined;
475
+ onChange?: string | undefined;
476
+ onClick?: string | undefined;
477
+ onClose?: string | undefined;
478
+ onContextLost?: string | undefined;
479
+ onContextMenu?: string | undefined;
480
+ onContextRestored?: string | undefined;
481
+ onCopy?: string | undefined;
482
+ onCueChange?: string | undefined;
483
+ onCut?: string | undefined;
484
+ onDblClick?: string | undefined;
485
+ onDrag?: string | undefined;
486
+ onDragEnd?: string | undefined;
487
+ onDragEnter?: string | undefined;
488
+ onDragExit?: string | undefined;
489
+ onDragLeave?: string | undefined;
490
+ onDragOver?: string | undefined;
491
+ onDragStart?: string | undefined;
492
+ onDrop?: string | undefined;
493
+ onDurationChange?: string | undefined;
494
+ onEmptied?: string | undefined;
495
+ onEnd?: string | undefined;
496
+ onEnded?: string | undefined;
497
+ onError?: string | undefined;
498
+ onFocus?: string | undefined;
499
+ onFocusIn?: string | undefined;
500
+ onFocusOut?: string | undefined;
501
+ onFormData?: string | undefined;
502
+ onHashChange?: string | undefined;
503
+ onInput?: string | undefined;
504
+ onInvalid?: string | undefined;
505
+ onKeyDown?: string | undefined;
506
+ onKeyPress?: string | undefined;
507
+ onKeyUp?: string | undefined;
508
+ onLanguageChange?: string | undefined;
509
+ onLoad?: string | undefined;
510
+ onLoadedData?: string | undefined;
511
+ onLoadedMetadata?: string | undefined;
512
+ onLoadEnd?: string | undefined;
513
+ onLoadStart?: string | undefined;
514
+ onMessage?: string | undefined;
515
+ onMessageError?: string | undefined;
516
+ onMouseDown?: string | undefined;
517
+ onMouseEnter?: string | undefined;
518
+ onMouseLeave?: string | undefined;
519
+ onMouseMove?: string | undefined;
520
+ onMouseOut?: string | undefined;
521
+ onMouseOver?: string | undefined;
522
+ onMouseUp?: string | undefined;
523
+ onMouseWheel?: string | undefined;
524
+ onOffline?: string | undefined;
525
+ onOnline?: string | undefined;
526
+ onPageHide?: string | undefined;
527
+ onPageShow?: string | undefined;
528
+ onPaste?: string | undefined;
529
+ onPause?: string | undefined;
530
+ onPlay?: string | undefined;
531
+ onPlaying?: string | undefined;
532
+ onPopState?: string | undefined;
533
+ onProgress?: string | undefined;
534
+ onRateChange?: string | undefined;
535
+ onRejectionHandled?: string | undefined;
536
+ onRepeat?: string | undefined;
537
+ onReset?: string | undefined;
538
+ onResize?: string | undefined;
539
+ onScroll?: string | undefined;
540
+ onScrollEnd?: string | undefined;
541
+ onSecurityPolicyViolation?: string | undefined;
542
+ onSeeked?: string | undefined;
543
+ onSeeking?: string | undefined;
544
+ onSelect?: string | undefined;
545
+ onShow?: string | undefined;
546
+ onSlotChange?: string | undefined;
547
+ onStalled?: string | undefined;
548
+ onStorage?: string | undefined;
549
+ onSubmit?: string | undefined;
550
+ onSuspend?: string | undefined;
551
+ onTimeUpdate?: string | undefined;
552
+ onToggle?: string | undefined;
553
+ onUnhandledRejection?: string | undefined;
554
+ onUnload?: string | undefined;
555
+ onVolumeChange?: string | undefined;
556
+ onWaiting?: string | undefined;
557
+ onWheel?: string | undefined;
558
+ onZoom?: string | undefined;
559
+ opacity?: string | undefined;
560
+ open?: boolean | string | undefined;
561
+ operator?: string | undefined;
562
+ optimum?: number | string | undefined;
563
+ order?: string | undefined;
564
+ orient?: string | undefined;
565
+ orientation?: string | undefined;
566
+ origin?: string | undefined;
567
+ overflow?: string | undefined;
568
+ overlay?: string | undefined;
569
+ overlinePosition?: number | string | undefined;
570
+ overlineThickness?: number | string | undefined;
571
+ paintOrder?: string | undefined;
572
+ panose1?: string | undefined;
573
+ part?: Array<string> | undefined;
574
+ path?: string | undefined;
575
+ pathLength?: number | string | undefined;
576
+ pattern?: string | undefined;
577
+ patternContentUnits?: string | undefined;
578
+ patternTransform?: string | undefined;
579
+ patternUnits?: string | undefined;
580
+ phase?: string | undefined;
581
+ ping?: Array<string> | undefined;
582
+ pitch?: string | undefined;
583
+ placeholder?: string | undefined;
584
+ playbackOrder?: string | undefined;
585
+ playsInline?: boolean | string | undefined;
586
+ pointerEvents?: string | undefined;
587
+ points?: string | undefined;
588
+ pointsAtX?: number | string | undefined;
589
+ pointsAtY?: number | string | undefined;
590
+ pointsAtZ?: number | string | undefined;
591
+ popover?: string | undefined;
592
+ popoverTarget?: string | undefined;
593
+ popoverTargetAction?: string | undefined;
594
+ poster?: string | undefined;
595
+ prefix?: string | undefined;
596
+ preload?: string | undefined;
597
+ preserveAlpha?: string | undefined;
598
+ preserveAspectRatio?: string | undefined;
599
+ primitiveUnits?: string | undefined;
600
+ profile?: string | undefined;
601
+ prompt?: string | undefined;
602
+ propagate?: string | undefined;
603
+ property?: string | Array<string> | undefined;
604
+ r?: string | undefined;
605
+ radius?: string | undefined;
606
+ readOnly?: boolean | string | undefined;
607
+ referrerPolicy?: string | undefined;
608
+ refX?: string | undefined;
609
+ refY?: string | undefined;
610
+ rel?: Array<string> | undefined;
611
+ renderingIntent?: string | undefined;
612
+ repeatCount?: string | undefined;
613
+ repeatDur?: string | undefined;
614
+ required?: boolean | string | undefined;
615
+ requiredExtensions?: Array<string> | undefined;
616
+ requiredFeatures?: Array<string> | undefined;
617
+ requiredFonts?: Array<string> | undefined;
618
+ requiredFormats?: Array<string> | undefined;
619
+ resource?: string | undefined;
620
+ restart?: string | undefined;
621
+ result?: string | undefined;
622
+ results?: number | string | undefined;
623
+ rev?: string | Array<string> | undefined;
624
+ reversed?: boolean | string | undefined;
625
+ rightMargin?: number | string | undefined;
626
+ role?: string | undefined;
627
+ rotate?: string | undefined;
628
+ rows?: number | string | undefined;
629
+ rowSpan?: number | string | undefined;
630
+ rules?: string | undefined;
631
+ rx?: string | undefined;
632
+ ry?: string | undefined;
633
+ sandbox?: Array<string> | undefined;
634
+ scale?: string | undefined;
635
+ scheme?: string | undefined;
636
+ scope?: string | undefined;
637
+ scoped?: boolean | string | undefined;
638
+ scrolling?: "false" | "true" | (string & {}) | undefined;
639
+ seamless?: boolean | string | undefined;
640
+ security?: string | undefined;
641
+ seed?: string | undefined;
642
+ selected?: boolean | string | undefined;
643
+ shadowRootClonable?: boolean | string | undefined;
644
+ shadowRootCustomElementRegistry?: boolean | string | undefined;
645
+ shadowRootDelegatesFocus?: boolean | string | undefined;
646
+ shadowRootMode?: string | undefined;
647
+ shadowRootSerializable?: boolean | string | undefined;
648
+ shape?: string | undefined;
649
+ shapeRendering?: string | undefined;
650
+ side?: string | undefined;
651
+ size?: number | string | undefined;
652
+ sizes?: string | undefined;
653
+ slope?: string | undefined;
654
+ slot?: string | undefined;
655
+ snapshotTime?: string | undefined;
656
+ spacing?: string | undefined;
657
+ span?: number | string | undefined;
658
+ specularConstant?: number | string | undefined;
659
+ specularExponent?: number | string | undefined;
660
+ spellCheck?: "false" | "true" | (string & {}) | undefined;
661
+ spreadMethod?: string | undefined;
662
+ src?: string | undefined;
663
+ srcDoc?: string | undefined;
664
+ srcLang?: string | undefined;
665
+ srcSet?: string | undefined;
666
+ standby?: string | undefined;
667
+ start?: number | string | undefined;
668
+ startOffset?: string | undefined;
669
+ stdDeviation?: string | undefined;
670
+ stemh?: string | undefined;
671
+ stemv?: string | undefined;
672
+ step?: string | undefined;
673
+ stitchTiles?: string | undefined;
674
+ stopColor?: string | undefined;
675
+ stopOpacity?: string | undefined;
676
+ strikethroughPosition?: number | string | undefined;
677
+ strikethroughThickness?: number | string | undefined;
678
+ string?: string | undefined;
679
+ stroke?: string | undefined;
680
+ strokeDashArray?: Array<string> | undefined;
681
+ strokeDashOffset?: string | undefined;
682
+ strokeLineCap?: string | undefined;
683
+ strokeLineJoin?: string | undefined;
684
+ strokeMiterLimit?: number | string | undefined;
685
+ strokeOpacity?: number | string | undefined;
686
+ strokeWidth?: string | undefined;
687
+ style?: string | undefined;
688
+ summary?: string | undefined;
689
+ surfaceScale?: number | string | undefined;
690
+ syncBehavior?: string | undefined;
691
+ syncBehaviorDefault?: string | undefined;
692
+ syncMaster?: string | undefined;
693
+ syncTolerance?: string | undefined;
694
+ syncToleranceDefault?: string | undefined;
695
+ systemLanguage?: Array<string> | undefined;
696
+ tabIndex?: number | string | undefined;
697
+ tableValues?: string | undefined;
698
+ target?: string | undefined;
699
+ targetX?: number | string | undefined;
700
+ targetY?: number | string | undefined;
701
+ text?: string | undefined;
702
+ textAnchor?: string | undefined;
703
+ textDecoration?: string | undefined;
704
+ textLength?: string | undefined;
705
+ textRendering?: string | undefined;
706
+ timelineBegin?: string | undefined;
707
+ title?: string | undefined;
708
+ to?: string | undefined;
709
+ topMargin?: number | string | undefined;
710
+ transform?: string | undefined;
711
+ transformBehavior?: string | undefined;
712
+ transformOrigin?: string | undefined;
713
+ translate?: string | undefined;
714
+ type?: string | undefined;
715
+ typeMustMatch?: boolean | string | undefined;
716
+ typeOf?: Array<string> | undefined;
717
+ u1?: string | undefined;
718
+ u2?: string | undefined;
719
+ underlinePosition?: number | string | undefined;
720
+ underlineThickness?: number | string | undefined;
721
+ unicode?: string | undefined;
722
+ unicodeBidi?: string | undefined;
723
+ unicodeRange?: string | undefined;
724
+ unitsPerEm?: number | string | undefined;
725
+ unselectable?: string | undefined;
726
+ useMap?: string | undefined;
727
+ vAlign?: string | undefined;
728
+ vAlphabetic?: number | string | undefined;
729
+ value?: "false" | "true" | (string & {}) | undefined;
730
+ values?: string | undefined;
731
+ valueType?: string | undefined;
732
+ vectorEffect?: string | undefined;
733
+ version?: string | undefined;
734
+ vertAdvY?: number | string | undefined;
735
+ vertOriginX?: number | string | undefined;
736
+ vertOriginY?: number | string | undefined;
737
+ vHanging?: number | string | undefined;
738
+ vIdeographic?: number | string | undefined;
739
+ viewBox?: string | undefined;
740
+ viewTarget?: string | undefined;
741
+ visibility?: string | undefined;
742
+ vLink?: string | undefined;
743
+ vMathematical?: number | string | undefined;
744
+ vSpace?: number | string | undefined;
745
+ width?: number | string | undefined;
746
+ widths?: string | undefined;
747
+ wordSpacing?: string | undefined;
748
+ wrap?: string | undefined;
749
+ writingMode?: string | undefined;
750
+ writingSuggestions?: string | undefined;
751
+ x?: string | undefined;
752
+ x1?: string | undefined;
753
+ x2?: string | undefined;
754
+ xChannelSelector?: string | undefined;
755
+ xHeight?: number | string | undefined;
756
+ xLinkActuate?: string | undefined;
757
+ xLinkArcRole?: string | undefined;
758
+ xLinkHref?: string | undefined;
759
+ xLinkRole?: string | undefined;
760
+ xLinkShow?: string | undefined;
761
+ xLinkTitle?: string | undefined;
762
+ xLinkType?: string | undefined;
763
+ xmlBase?: string | undefined;
764
+ xmlLang?: string | undefined;
765
+ xmlns?: string | undefined;
766
+ xmlnsXLink?: string | undefined;
767
+ xmlSpace?: string | undefined;
768
+ y?: string | undefined;
769
+ y1?: string | undefined;
770
+ y2?: string | undefined;
771
+ yChannelSelector?: string | undefined;
772
+ z?: string | undefined;
773
+ zoomAndPan?: string | undefined;
774
+ [PropertyName: string]: boolean | number | string | null | undefined | Array<string | number>;
775
+ }
776
+ // ## Content maps
777
+ /**
778
+ * Union of registered hast nodes that can occur in {@link Element}.
779
+ *
780
+ * To register mote custom hast nodes, add them to {@link ElementContentMap}.
781
+ * They will be automatically added here.
782
+ */
783
+ type ElementContent = ElementContentMap[keyof ElementContentMap];
784
+ /**
785
+ * Registry of all hast nodes that can occur as children of {@link Element}.
786
+ *
787
+ * For a union of all {@link Element} children, see {@link ElementContent}.
788
+ */
789
+ interface ElementContentMap {
790
+ comment: Comment;
791
+ element: Element$1;
792
+ text: Text;
793
+ }
794
+ /**
795
+ * Union of registered hast nodes that can occur in {@link Root}.
796
+ *
797
+ * To register custom hast nodes, add them to {@link RootContentMap}.
798
+ * They will be automatically added here.
799
+ */
800
+ type RootContent = RootContentMap[keyof RootContentMap];
801
+ /**
802
+ * Registry of all hast nodes that can occur as children of {@link Root}.
803
+ *
804
+ * > 👉 **Note**: {@link Root} does not need to be an entire document.
805
+ * > it can also be a fragment.
806
+ *
807
+ * For a union of all {@link Root} children, see {@link RootContent}.
808
+ */
809
+ interface RootContentMap {
810
+ comment: Comment;
811
+ doctype: Doctype;
812
+ element: Element$1;
813
+ text: Text;
814
+ }
815
+ // ## Abstract nodes
816
+ /**
817
+ * Abstract hast node.
818
+ *
819
+ * This interface is supposed to be extended.
820
+ * If you can use {@link Literal} or {@link Parent}, you should.
821
+ * But for example in HTML, a `Doctype` is neither literal nor parent, but
822
+ * still a node.
823
+ *
824
+ * To register custom hast nodes, add them to {@link RootContentMap} and other
825
+ * places where relevant (such as {@link ElementContentMap}).
826
+ *
827
+ * For a union of all registered hast nodes, see {@link Nodes}.
828
+ */
829
+ interface Node extends Node$1 {
830
+ /**
831
+ * Info from the ecosystem.
832
+ */
833
+ data?: Data | undefined;
834
+ }
835
+ /**
836
+ * Abstract hast node that contains the smallest possible value.
837
+ *
838
+ * This interface is supposed to be extended if you make custom hast nodes.
839
+ *
840
+ * For a union of all registered hast literals, see {@link Literals}.
841
+ */
842
+ interface Literal extends Node {
843
+ /**
844
+ * Plain-text value.
845
+ */
846
+ value: string;
847
+ }
848
+ /**
849
+ * Abstract hast node that contains other hast nodes (*children*).
850
+ *
851
+ * This interface is supposed to be extended if you make custom hast nodes.
852
+ *
853
+ * For a union of all registered hast parents, see {@link Parents}.
854
+ */
855
+ interface Parent extends Node {
856
+ /**
857
+ * List of children.
858
+ */
859
+ children: RootContent[];
860
+ }
861
+ // ## Concrete nodes
862
+ /**
863
+ * HTML comment.
864
+ */
865
+ interface Comment extends Literal {
866
+ /**
867
+ * Node type of HTML comments in hast.
868
+ */
869
+ type: "comment";
870
+ /**
871
+ * Data associated with the comment.
872
+ */
873
+ data?: CommentData | undefined;
874
+ }
875
+ /**
876
+ * Info associated with hast comments by the ecosystem.
877
+ */
878
+ interface CommentData extends Data {}
879
+ /**
880
+ * HTML document type.
881
+ */
882
+ interface Doctype extends Node$1 {
883
+ /**
884
+ * Node type of HTML document types in hast.
885
+ */
886
+ type: "doctype";
887
+ /**
888
+ * Data associated with the doctype.
889
+ */
890
+ data?: DoctypeData | undefined;
891
+ }
892
+ /**
893
+ * Info associated with hast doctypes by the ecosystem.
894
+ */
895
+ interface DoctypeData extends Data {}
896
+ /**
897
+ * HTML element.
898
+ */
899
+ interface Element$1 extends Parent {
900
+ /**
901
+ * Node type of elements.
902
+ */
903
+ type: "element";
904
+ /**
905
+ * Tag name (such as `'body'`) of the element.
906
+ */
907
+ tagName: string;
908
+ /**
909
+ * Info associated with the element.
910
+ */
911
+ properties: Properties;
912
+ /**
913
+ * Children of element.
914
+ */
915
+ children: ElementContent[];
916
+ /**
917
+ * When the `tagName` field is `'template'`, a `content` field can be
918
+ * present.
919
+ */
920
+ content?: Root | undefined;
921
+ /**
922
+ * Data associated with the element.
923
+ */
924
+ data?: ElementData | undefined;
925
+ }
926
+ /**
927
+ * Info associated with hast elements by the ecosystem.
928
+ */
929
+ interface ElementData extends Data {}
930
+ /**
931
+ * Document fragment or a whole document.
932
+ *
933
+ * Should be used as the root of a tree and must not be used as a child.
934
+ *
935
+ * Can also be used as the value for the content field on a `'template'` element.
936
+ */
937
+ interface Root extends Parent {
938
+ /**
939
+ * Node type of hast root.
940
+ */
941
+ type: "root";
942
+ /**
943
+ * Children of root.
944
+ */
945
+ children: RootContent[];
946
+ /**
947
+ * Data associated with the hast root.
948
+ */
949
+ data?: RootData | undefined;
950
+ }
951
+ /**
952
+ * Info associated with hast root nodes by the ecosystem.
953
+ */
954
+ interface RootData extends Data {}
955
+ /**
956
+ * HTML character data (plain text).
957
+ */
958
+ interface Text extends Literal {
959
+ /**
960
+ * Node type of HTML character data (plain text) in hast.
961
+ */
962
+ type: "text";
963
+ /**
964
+ * Data associated with the text.
965
+ */
966
+ data?: TextData | undefined;
967
+ }
968
+ /**
969
+ * Info associated with hast texts by the ecosystem.
970
+ */
971
+ interface TextData extends Data {}
972
+ //#endregion
973
+ //#region ../../node_modules/.pnpm/mdast-util-to-hast@13.2.1/node_modules/mdast-util-to-hast/index.d.ts
974
+ /**
975
+ * Raw string of HTML embedded into HTML AST.
976
+ */
977
+ interface Raw extends Literal {
978
+ /**
979
+ * Node type of raw.
980
+ */
981
+ type: 'raw';
982
+ /**
983
+ * Data associated with the hast raw.
984
+ */
985
+ data?: RawData | undefined;
986
+ }
987
+ /**
988
+ * Info associated with hast raw nodes by the ecosystem.
989
+ */
990
+ interface RawData extends Data {}
991
+ // Register nodes in content.
992
+ declare module 'hast' {
993
+ interface ElementData {
994
+ /**
995
+ * Custom info relating to the node, if `<code>` in `<pre>`.
996
+ *
997
+ * Defined by `mdast-util-to-hast` (`remark-rehype`).
998
+ */
999
+ meta?: string | null | undefined;
1000
+ }
1001
+ interface ElementContentMap {
1002
+ /**
1003
+ * Raw string of HTML embedded into HTML AST.
1004
+ */
1005
+ raw: Raw;
1006
+ }
1007
+ interface RootContentMap {
1008
+ /**
1009
+ * Raw string of HTML embedded into HTML AST.
1010
+ */
1011
+ raw: Raw;
1012
+ }
1013
+ }
1014
+ // Register data on mdast.
1015
+ declare module 'mdast' {
1016
+ interface Data {
1017
+ /**
1018
+ * Field supported by `mdast-util-to-hast` to signal that a node should
1019
+ * result in something with these children.
1020
+ *
1021
+ * When this is defined, when a parent is created, these children will
1022
+ * be used.
1023
+ */
1024
+ hChildren?: ElementContent[] | undefined;
1025
+ /**
1026
+ * Field supported by `mdast-util-to-hast` to signal that a node should
1027
+ * result in a particular element, instead of its default behavior.
1028
+ *
1029
+ * When this is defined, an element with the given tag name is created.
1030
+ * For example, when setting `hName` to `'b'`, a `<b>` element is created.
1031
+ */
1032
+ hName?: string | undefined;
1033
+ /**
1034
+ * Field supported by `mdast-util-to-hast` to signal that a node should
1035
+ * result in an element with these properties.
1036
+ *
1037
+ * When this is defined, when an element is created, these properties will
1038
+ * be used.
1039
+ */
1040
+ hProperties?: Properties | undefined;
1041
+ }
1042
+ }
1043
+ //#endregion
1044
+ //#region ../runtime/src/sandbox/bridgeProtocol.d.ts
1045
+ /**
1046
+ * 能力模式:true 直通 / false 关闭(TOOL_UNSUPPORTED)/ 'require-approval' 调用前强制授权
1047
+ * (布尔语义与现状完全兼容)
1048
+ */
1049
+ type CapabilityMode = boolean | 'require-approval';
1050
+ /** 授权粒度:'once-per-run'(默认,run 内同类能力批准一次)/ 'every-call'(每次调用都问) */
1051
+ type ApprovalScope = 'once-per-run' | 'every-call';
1052
+ //#endregion
1053
+ //#region ../runtime/src/sandbox/networkPolicy.d.ts
1054
+ /**
1055
+ * 网络策略类型 + 匹配逻辑(单一来源:browser worker 经函数字符串注入、
1056
+ * node worker 直接 import,禁止各自重复实现)。
1057
+ *
1058
+ * 注意:isNetworkAllowed 会被 toString() 内嵌进浏览器 Worker bootstrap,
1059
+ * 函数体必须自包含(不引用模块内其它符号),且不得使用模板字符串/反引号。
1060
+ */
1061
+ type NetworkPolicy = 'deny-all' | 'allow-all' | {
1062
+ allow: string[];
1063
+ };
1064
+ //#endregion
1065
+ //#region ../ui-kit/src/runtime-config/quickPrompts.d.ts
1066
+ /**
1067
+ * 快捷指令可选图标名(0.12.0 分册 21)。
1068
+ * 用受控枚举而不是让宿主传组件:SDK 的图标集不进公开契约,
1069
+ * 换实现(lucide → 别的)时宿主代码不用动。
1070
+ *
1071
+ * 0.13.0 分册 17 FR-17.1:真值源从 `@webskill/chatbot` 迁到这里,
1072
+ * 让 console 的配置界面也能用同一份枚举;`@webskill/chatbot` 原样 re-export,
1073
+ * 公开面逐字不变。
1074
+ * @experimental
1075
+ */
1076
+ type QuickPromptIconName = 'chart' | 'document' | 'report' | 'search' | 'list' | 'bug' | 'test' | 'metric' | 'compare' | 'page' | 'run' | 'warn' | 'sparkles' | 'settings';
1077
+ /**
1078
+ * 带图标的快捷指令(0.12.0 分册 21)。
1079
+ * @experimental
1080
+ */
1081
+ interface QuickPrompt {
1082
+ /**
1083
+ * 点击后发出的文本,同时作为按钮可见文案。
1084
+ * 0.13.0 分册 21 FR-21.1:改为按语种取值,可只填部分语种。
1085
+ */
1086
+ text: LocalizedText;
1087
+ /** 缺省或取值不在枚举内时按无图标渲染 */
1088
+ icon?: QuickPromptIconName;
1089
+ }
1090
+ /**
1091
+ * `RuntimeConfig` 里持久化的快捷指令条目(0.13.0 分册 17)。
1092
+ * 比 `QuickPrompt` 多一个稳定 `id`:列表增删改需要它做定位,
1093
+ * 用 `text` 当 key 在「两条同文案」时会塌陷。`id` 不进任何发给模型的字符串。
1094
+ * @experimental
1095
+ */
1096
+ interface RuntimeQuickPrompt {
1097
+ id: string;
1098
+ text: LocalizedText;
1099
+ icon?: QuickPromptIconName;
1100
+ }
1101
+ //#endregion
1102
+ //#region ../ui-kit/src/runtime-config/types.d.ts
1103
+ /**
1104
+ * 运行环境配置模型(P2):console Configure Tab 编辑、chatbot ChatEngine 装配应用,
1105
+ * 宿主经 RuntimeConfigStore 接线同一存储源(playground localStorage / 集成 OPFS 文件)。
1106
+ * 默认值严格对齐 SDK(AgentLoop/InteractionPolicy/executor 缺省)。
1107
+ */
1108
+ interface RuntimeLoopConfig {
1109
+ maxTurns: number;
1110
+ totalTimeoutMs: number;
1111
+ toolTimeoutMs: number;
1112
+ temperature?: number;
1113
+ toolResultMaxBytes: number;
1114
+ maxHistoryMessages: number;
1115
+ /** `file` 分片的 base64 上限;超出即拒绝并说明,不截断(FR-23.4) */
1116
+ maxDocumentBytes: number;
1117
+ /** `document-text` 分片的字节上限;同样拒绝而不截断(FR-23.4) */
1118
+ maxDocumentTextBytes: number;
1119
+ }
1120
+ interface RuntimeInteractionConfig {
1121
+ missingParams: 'user' | 'llm';
1122
+ confirmations: 'required' | 'auto-approve';
1123
+ interactionTimeoutMs: number;
1124
+ approvalScope: ApprovalScope;
1125
+ }
1126
+ type RuntimeRouterStrategy = 'progressive' | 'full-disclosure';
1127
+ /** 生命周期钩子执行策略(`HookRunnerOptions` 的可配置部分) */
1128
+ interface RuntimeHooksConfig {
1129
+ timeoutMs: number;
1130
+ /** true 时钩子异常终止 run;缺省隔离为 warning */
1131
+ failOnHookError: boolean;
1132
+ }
1133
+ /** 浏览器宿主执行器档位;Node 宿主的 in-process/worker/process 由宿主侧扩展展示 */
1134
+ type RuntimeSandboxExecutor = 'auto' | 'blob-worker' | 'iframe-sandbox';
1135
+ /**
1136
+ * 用户自己声明的取数源(0.14.0 分册 19)。
1137
+ *
1138
+ * 存在的理由:从别的宿主导出的技能会声明本宿主没有的源 id,没有这一段就永远跑不起来。
1139
+ * 它不放宽任何闸门——`url` 照过 `sandbox.remoteUrl` 判定,取数照受 `capabilities.fetchData` 管,
1140
+ * 变的只是「谁来写这个地址」:宿主开发者,还是宿主的使用者。
1141
+ */
1142
+ interface RuntimeDataSourceEntry {
1143
+ id: string;
1144
+ /** 绝对 http(s) 地址 */
1145
+ url: string;
1146
+ description: string;
1147
+ }
1148
+ interface RuntimeSandboxConfig {
1149
+ executor: RuntimeSandboxExecutor;
1150
+ networkPolicy: NetworkPolicy;
1151
+ capabilities: {
1152
+ readReference: CapabilityMode;
1153
+ /** 同时管 readAsset 与 readAssetBinary */
1154
+ readAsset: CapabilityMode;
1155
+ writeArtifact: CapabilityMode;
1156
+ confirm: CapabilityMode;
1157
+ /**
1158
+ * 脚本按宿主声明的数据源取数(分册 16)。
1159
+ * 与 `readAsset` **相反**,缺省 `false`:它会出网,缺省开等于每个技能默认拿到出站能力。
1160
+ */
1161
+ fetchData: CapabilityMode;
1162
+ };
1163
+ /**
1164
+ * 单次取数结果的字节上限(分册 16)。超出即拒绝,**不截断**
1165
+ * ——截断后的 JSON 解不出来,比拒绝更糟。结果回到脚本,不进模型上下文,
1166
+ * 所以不受 `toolResultMaxBytes` 约束。
1167
+ */
1168
+ maxDataSourceBytes: number;
1169
+ /**
1170
+ * 用户声明的取数源(0.14.0 分册 19);缺省空数组 = 只有宿主代码写死的那些。
1171
+ * 与宿主源撞 id 时宿主的那条胜出——否则用户配置就能改写宿主的授权面。
1172
+ */
1173
+ dataSources: RuntimeDataSourceEntry[];
1174
+ /**
1175
+ * 出站 URL 准入策略(`RemoteUrlPolicy` 的可配置部分):技能安装、MCP 端点连接
1176
+ * 这类由宿主发起的取数都按它判定。两项都默认关,即 https-only 且拒绝内网/环回。
1177
+ */
1178
+ remoteUrl: RuntimeRemoteUrlConfig;
1179
+ /** 浏览器沙箱的 TypeScript 支持;关闭时 `.ts` 脚本按 `TOOL_UNSUPPORTED` 拒绝 */
1180
+ typescript: RuntimeTypeScriptConfig;
1181
+ /**
1182
+ * 读取用户下载的文件(0.14.0 分册 20)。缺省 `false`。
1183
+ *
1184
+ * **不放进 `capabilities`**:那张表的语义是三态 `CapabilityMode`(关 / 需批准 / 开),
1185
+ * 而本能力的「需批准」是恒定的,放进去会凭空多出一个「开且不批准」的非法组合。
1186
+ */
1187
+ downloadedFiles: boolean;
1188
+ /**
1189
+ * 让技能脚本读用户本轮上传的文件(0.15.0 分册 17)。缺省 `false`。
1190
+ *
1191
+ * **不放进 `capabilities`**,理由同 `downloadedFiles`:本能力的「需批准」是恒定的。
1192
+ * 关闭时脚本上下文里连那两个成员都不存在,而不是存在但总失败。
1193
+ */
1194
+ uploadFiles: boolean;
1195
+ /**
1196
+ * 单个上传文件交给脚本的字节上限(分册 17)。超出即拒,**不截断**
1197
+ * ——截一半的 xlsx / 图片解不开,而脚本看不出它残缺。
1198
+ */
1199
+ maxUploadFileBytes: number;
1200
+ }
1201
+ /**
1202
+ * 只做类型擦除,不做类型检查。`esbuildUrl` 为绝对 http(s) 地址时按 `remoteUrl` 判定;
1203
+ * 同源相对路径与打包器 specifier 不属于出站请求,不参与判定。
1204
+ */
1205
+ interface RuntimeTypeScriptConfig {
1206
+ enabled: boolean;
1207
+ /** esbuild-wasm 的 JS 入口地址;enabled 时必填 */
1208
+ esbuildUrl?: string;
1209
+ /** esbuild.wasm 二进制地址;缺省由 esbuild 自行推导 */
1210
+ wasmUrl?: string;
1211
+ }
1212
+ /** 与 `@webskill/core` 的 `RemoteUrlPolicy` 同形,但两个字段都是必填(配置需要确定值) */
1213
+ interface RuntimeRemoteUrlConfig {
1214
+ allowHttp: boolean;
1215
+ allowPrivateHosts: boolean;
1216
+ }
1217
+ /** `chrome-builtin` 走浏览器 Prompt API,无端点与密钥;其余三档是云端 HTTP 协议 */
1218
+ type RuntimeLlmProvider = 'openai-compatible' | 'anthropic' | 'google' | 'chrome-builtin';
1219
+ /**
1220
+ * 单个模型的能力声明(FR-11.4 / FR-14.2)。`image` 缺省视为 `false`:
1221
+ * 猜测支持会把图片发给纯文本模型,拿到的是 provider 的不可读报错。
1222
+ * `tools` 反过来,缺省视为 `true`:云端模型几乎都支持,默认关会把存量配置里
1223
+ * 没标能力的条目全部降级成纯对话。
1224
+ * @experimental
1225
+ */
1226
+ interface RuntimeLlmCapabilities {
1227
+ image: boolean;
1228
+ /** 是否支持原生工具调用;false 时 Agent 走纯对话路径 */
1229
+ tools: boolean;
1230
+ }
1231
+ /**
1232
+ * 单个模型条目。`id` 稳定,会话记录与消息归属存的是它,用户改名不影响历史;
1233
+ * `label` 只用于展示——同一个 `model` 可能配了两个不同的 `baseUrl`(公司代理与直连),
1234
+ * 光看 `model` 区分不出来。
1235
+ */
1236
+ interface RuntimeLlmEntry {
1237
+ id: string;
1238
+ label: string;
1239
+ provider: RuntimeLlmProvider;
1240
+ baseUrl?: string;
1241
+ apiKey?: string;
1242
+ model: string;
1243
+ requestTimeoutMs?: number;
1244
+ capabilities?: RuntimeLlmCapabilities;
1245
+ /**
1246
+ * Anthropic extended thinking 预算(0.10.0 遗留项 #1):仅 anthropic 条目有意义;
1247
+ * 设置面是开关,开启写入 `DEFAULT_THINKING_BUDGET_TOKENS`。
1248
+ * 0.10.0 #40.4:缺省(undefined)视为**开启**(按默认预算),显式关闭存 0。
1249
+ * @experimental
1250
+ */
1251
+ thinkingBudgetTokens?: number;
1252
+ /**
1253
+ * 该模型的上下文窗口(token,分册 20 FR-20.4)。
1254
+ *
1255
+ * 缺省即「未知」,与「为零」必须可区分:未知时不触发任何压缩,也不显示占比。
1256
+ * 仓内**不预置**任何厂商的窗口表——型号到窗口的映射会过期,过期的默认值比没有更坏。
1257
+ * 该值只用于判断要不要压缩历史,不参与请求体拼装。
1258
+ */
1259
+ contextWindow?: number;
1260
+ }
1261
+ /** 模型列表 + 默认项。`defaultId` 由 `mergeRuntimeConfigDefaults` 归一到真实存在的条目 */
1262
+ interface RuntimeLlmSelection {
1263
+ entries: readonly RuntimeLlmEntry[];
1264
+ defaultId?: string;
1265
+ }
1266
+ /**
1267
+ * Agent 能力开关(0.5.0)。默认值逐项经需求评审确定,不适用「新能力一律默认关」的通则。
1268
+ * `todo`:待办清单,默认**开启**——不引入新攻击面、提示词体积远小于生成式 UI catalog,
1269
+ * 且关闭时多步任务体验明显更差。
1270
+ * `skillGeneration`:技能自动生成,默认**关闭**——会把对话内容写进持久化的候选,
1271
+ * 属于新增攻击面(AC-G7 判据一)。
1272
+ * `generativeUi`:生成式 UI,默认**关闭**——catalog 描述约 14 KB 计入每次请求。
1273
+ * `uiPresets`:开放给模型的场景预设,默认全开——预设本体按需加载,
1274
+ * 只有名字与一行摘要计入请求;置空列表等于完全关闭预设。
1275
+ */
1276
+ interface RuntimeAgentCapabilitiesConfig {
1277
+ todo: boolean;
1278
+ skillGeneration: boolean;
1279
+ generativeUi: boolean;
1280
+ /** 串行委派(FR-11.8):默认关。一句话可能展开成多个子 run,调用量对用户不可预期 */
1281
+ delegation: boolean;
1282
+ uiPresets: string[];
1283
+ }
1284
+ /**
1285
+ * 未签名技能的处置策略(与 core 的 `UnsignedPolicy` 同形,配置层独立命名)。
1286
+ * 默认 `'warn'` 由需求评审定下(FR-1.2):`deny` 会让现存未签名技能立即不可用,
1287
+ * 且默认信任库为空时接受集为空;`allow` 等于策略不存在。
1288
+ */
1289
+ type UnsignedSkillPolicy = 'allow' | 'warn' | 'deny';
1290
+ interface RuntimeSecurityConfig {
1291
+ unsignedSkills: UnsignedSkillPolicy;
1292
+ }
1293
+ /** 生成式 UI 的渲染器档位。ui-kit 不依赖 `@webskill/ui`,因此这里写字面量联合 @experimental */
1294
+ type RuntimeRendererId = 'native' | 'a2ui' | 'openui' | 'vercel';
1295
+ /**
1296
+ * 外观配置(0.6.0 FR-20.1)。0.5.x 之前外观由宿主自持并单独存一份,
1297
+ * 导致 chatbot 与 console 各看各的;纳入 `RuntimeConfig` 后两端共用同一份。
1298
+ * `dictationLang` 只对 chatbot 有意义(console 无语音输入),但同属外观段。
1299
+ * @experimental
1300
+ */
1301
+ interface RuntimeAppearanceConfig {
1302
+ theme: 'light' | 'dark';
1303
+ locale: Locale;
1304
+ renderer: RuntimeRendererId;
1305
+ dictationLang: string;
1306
+ }
1307
+ /**
1308
+ * 多模态输入配置(0.6.0 FR-11.3 / FR-11.6 / FR-12.3)。
1309
+ * `imageAttachments` 与 `pageImageCapture` 默认都关(AC-G5):
1310
+ * 两者都会把图像随请求外发给模型提供方,属新增攻击面。
1311
+ * @experimental
1312
+ */
1313
+ /**
1314
+ * 文档投放面(0.11.0 分册 18)。
1315
+ *
1316
+ * **只有一个闸门字段**。CSP 白名单不在这里:它由 viewer 路由的**响应头**
1317
+ * 下发(FR-18.3 第 1 条),是宿主部署时调 `viewerCspHeader` 的入参;
1318
+ * 浏览器侧的运行时配置改不动已经发出去的响应头,携在这里只会是个不生效的假开关。
1319
+ */
1320
+ interface RuntimeDocumentSurfaceConfig {
1321
+ /** 关着即没有这个投放面;开启还要求宿主额外提供一条 viewer 路由 */
1322
+ enabled: boolean;
1323
+ }
1324
+ interface RuntimeMultimodalConfig {
1325
+ imageAttachments: boolean;
1326
+ /** 页面图像抓取总开关(FR-12.3);关时感知只走纯文本路径 */
1327
+ pageImageCapture: boolean;
1328
+ /** 附件与取像共用 */
1329
+ maxImageBytes: number;
1330
+ /** 附件与取像共用 */
1331
+ maxImagesPerMessage: number;
1332
+ /**
1333
+ * 页面取像时小于该面积(平方像素)的元素视作工具图标,不占名额(0.13.0 FR-20.4)。
1334
+ * `0` 是合法值,意为关闭过滤;只作用于页面取像,不管用户上传的附件。
1335
+ */
1336
+ minImageArea: number;
1337
+ }
1338
+ /**
1339
+ * 用户画像配置(0.6.0 FR-19.6)。`enabled` 默认**关**(AC-G5):
1340
+ * 开启后会把用户的提问与填写持久化到本地,属新增攻击面;
1341
+ * `encrypted` 默认**开**——它不新增采集,只决定已采集的数据怎么落盘,默认明文无正当理由。
1342
+ * chatbot 与 console 共用这一份。
1343
+ * @experimental
1344
+ */
1345
+ interface RuntimeUserProfileConfig {
1346
+ enabled: boolean;
1347
+ /** 画像注入系统提示的字节上限(FR-19.4) */
1348
+ injectMaxBytes: number;
1349
+ /** 行为记录容量上限,超出淘汰最旧(FR-19.2) */
1350
+ recordLimit: number;
1351
+ /** 本地存储加密(FR-19.5) */
1352
+ encrypted: boolean;
1353
+ }
1354
+ /** @experimental */
1355
+ interface RuntimeSkillStateConfig {
1356
+ /**
1357
+ * 技能连续失败自动隔离阈值(0.10.0 UI-UX5 #48-12;#49-2 起默认 5),
1358
+ * 与 governance `SkillStatePolicy` 的缺省对齐。读点在 console 的
1359
+ * GovernanceFacade 装配处(`failureThreshold`),守卫本身不读配置。
1360
+ */
1361
+ quarantineThreshold: number;
1362
+ }
1363
+ /** @experimental */
1364
+ interface RuntimeConfig {
1365
+ loop: RuntimeLoopConfig;
1366
+ interaction: RuntimeInteractionConfig;
1367
+ router: {
1368
+ strategy: RuntimeRouterStrategy;
1369
+ };
1370
+ hooks: RuntimeHooksConfig;
1371
+ streaming: boolean;
1372
+ renderResult: boolean;
1373
+ sandbox: RuntimeSandboxConfig;
1374
+ llm: RuntimeLlmSelection;
1375
+ agentCapabilities: RuntimeAgentCapabilitiesConfig;
1376
+ security: RuntimeSecurityConfig;
1377
+ appearance: RuntimeAppearanceConfig;
1378
+ multimodal: RuntimeMultimodalConfig;
1379
+ documentSurface: RuntimeDocumentSurfaceConfig;
1380
+ userProfile: RuntimeUserProfileConfig;
1381
+ skillState: RuntimeSkillStateConfig;
1382
+ /**
1383
+ * 快捷指令的**唯一权威**(0.13.0 分册 21 FR-21.5)。
1384
+ * `ChatbotConfig.quickPrompts` 降级为一次性种子源,不再参与渲染判断。
1385
+ */
1386
+ quickPrompts: readonly RuntimeQuickPrompt[];
1387
+ /**
1388
+ * 宿主种子是否已注入过(FR-21.6)。
1389
+ * 不得用 `quickPrompts.length === 0` 推断:「从未配置」与「用户删光了」都是空数组,
1390
+ * 靠数组本身分不开——这正是 D-17-3 当年绕不过去的地方。
1391
+ */
1392
+ quickPromptsSeeded: boolean;
1393
+ /** 空态与动态指令条最多展示多少条;超出的部分截断。取值 1..{@link MAX_QUICK_PROMPT_LIMIT} */
1394
+ quickPromptLimit: number;
1395
+ /** 被用户删掉的自动模型条目 id(FR-14.3):删一次就不该再自己长回来 */
1396
+ dismissedAutoEntries: readonly string[];
1397
+ }
1398
+ /** @experimental */
1399
+ interface RuntimeConfigStore {
1400
+ /**
1401
+ * Loads the runtime configuration. Implementations SHOULD return a complete
1402
+ * RuntimeConfig; consumers wrap stores with `withRuntimeConfigDefaults` so partial
1403
+ * or legacy data is normalized through `mergeRuntimeConfigDefaults` on the read
1404
+ * path. Callers must not apply their own additional fallback merge.
1405
+ */
1406
+ load(): Promise<RuntimeConfig>;
1407
+ save(config: RuntimeConfig): Promise<void>;
1408
+ reset(): Promise<void>;
1409
+ /**
1410
+ * Subscribes to configuration changes; returns an unsubscribe function.
1411
+ * Optional: stores without it degrade to the previous behaviour where hosts
1412
+ * remount consumers after a save.
1413
+ */
1414
+ subscribe?(listener: () => void): () => void;
1415
+ }
1416
+ //#endregion
1417
+ export { RuntimeRendererId as a, RuntimeQuickPrompt as c, TranslateFn as d, RuntimeLlmEntry as i, Locale as l, RuntimeConfig as n, QuickPrompt as o, RuntimeConfigStore as r, QuickPromptIconName as s, RuntimeAppearanceConfig as t, LocalizedText as u };