@freecallai/pro 0.0.11 → 0.0.13

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.
Files changed (60) hide show
  1. package/README.md +23 -2
  2. package/dist/{FkpRichText.vue_vue_type_script_setup_true_lang-D2sgT7XP.js → FkpRichText.vue_vue_type_script_setup_true_lang-D-SOdFra.js} +1811 -1781
  3. package/dist/{KnowledgeArea-Sbfs_E0C.js → KnowledgeArea-ClZoLiaZ.js} +1 -1
  4. package/dist/KnowledgeArea.vue_vue_type_script_setup_true_lang-CoFF-WCe.js +1830 -0
  5. package/dist/{ToolForm-_ZTW7lwU.js → ToolForm-BK9epxdr.js} +1 -1
  6. package/dist/agent-prompt-editor/index.js +575 -549
  7. package/dist/agent-prompt-editor/legacy-converter/index.js +98 -94
  8. package/dist/{choice-BqjECVyx.js → choice-UgePgrSl.js} +1 -1
  9. package/dist/{guard-BmLOamCj.js → guard-DPwe4mCm.js} +200 -185
  10. package/dist/{index-gS1h8iW8.js → index-BIi3k45j.js} +1 -1
  11. package/dist/index-BMHUPL5x.js +5 -0
  12. package/dist/{index-B1rTu0jX.js → index-CaA13lC9.js} +1 -1
  13. package/dist/{index-6VSUucFX.js → index-ChuzFuNm.js} +1 -1
  14. package/dist/index-DJLfgC4v.js +5 -0
  15. package/dist/{index-0BXLYaKG.js → index-DfKH-RZq.js} +2 -2
  16. package/dist/{index-CN2knQcE.js → index-DiLMgNEe.js} +1 -1
  17. package/dist/{index-BDinNJn_.js → index-RHu4JIw7.js} +1 -1
  18. package/dist/{index-CCwmXuSJ.js → index-v1UD08i6.js} +1 -1
  19. package/dist/index.js +3 -3
  20. package/dist/{inline-CRGzAti7.js → inline-CVF1zEsG.js} +1 -1
  21. package/dist/{knowledge-DNDouB-s.js → knowledge-DWM6tWnP.js} +1 -1
  22. package/dist/media-extensions-YYbGuUQa.js +341 -0
  23. package/dist/{media-migration-D1KoHKoP.js → media-migration-BctCLEuT.js} +1 -1
  24. package/dist/media-policy-B1UuSN2e.js +215 -0
  25. package/dist/{media-upload-C5N6YWHu.js → media-upload-DtH-oCtw.js} +1 -1
  26. package/dist/{model-BVh9EZ9G.js → model-VLLhEQfn.js} +1 -1
  27. package/dist/rich-text/index.js +6 -6
  28. package/dist/rich-text/legacy-converter/index.js +357 -355
  29. package/dist/style.css +1 -1
  30. package/dist/types/agent-prompt-editor/FkpAgentPromptEditor.vue.d.ts +37 -2
  31. package/dist/types/agent-prompt-editor/index.d.ts +1 -0
  32. package/dist/types/agent-prompt-editor/types.d.ts +4 -0
  33. package/dist/types/filters/FkpFilter.vue.d.ts +2 -2
  34. package/dist/types/filters/FkpFilterDateRange.vue.d.ts +2 -2
  35. package/dist/types/filters/FkpFilterPeriod.vue.d.ts +2 -2
  36. package/dist/types/filters/FkpSearchableMultiSelect.vue.d.ts +2 -2
  37. package/dist/types/index.d.ts +1 -0
  38. package/dist/types/rich-text/FkpRichText.vue.d.ts +20 -2
  39. package/dist/types/rich-text/index.d.ts +1 -0
  40. package/dist/types/rich-text/model/qianniu-video.d.ts +2 -0
  41. package/dist/types/rich-text/plugins/attribute/token.d.ts +1 -0
  42. package/dist/types/rich-text/plugins/tableKnowledge/token.d.ts +1 -0
  43. package/dist/types/rich-text/plugins/ticket/token.d.ts +2 -1
  44. package/dist/types/rich-text/plugins/token-catalog.d.ts +4 -1
  45. package/dist/types/rich-text/plugins/token-definition.d.ts +2 -0
  46. package/dist/types/rich-text/public/types.d.ts +7 -2
  47. package/dist/types/rich-text/runtime/document-adapter.d.ts +3 -0
  48. package/dist/types/rich-text/runtime/media-sources.d.ts +1 -1
  49. package/dist/types/rich-text/runtime/tag-validity.d.ts +46 -0
  50. package/dist/types/rich-text/ui/FkpKnowledgeTypePicker.vue.d.ts +2 -2
  51. package/dist/types/rich-text/ui/KnowledgeArea.vue.d.ts +10 -0
  52. package/dist/types/rich-text/ui/MediaSourceControls.vue.d.ts +23 -14
  53. package/dist/types/rich-text/ui/ToolForm.vue.d.ts +2 -2
  54. package/dist/types/switcher/FkpSwitcher.vue.d.ts +2 -2
  55. package/package.json +5 -4
  56. package/dist/KnowledgeArea.vue_vue_type_script_setup_true_lang-BNDRTWXW.js +0 -1659
  57. package/dist/index-CAczgwau.js +0 -5
  58. package/dist/index-faGbB8v6.js +0 -5
  59. package/dist/media-extensions-wlcCEdtg.js +0 -324
  60. package/dist/media-policy-D3-Qglzz.js +0 -158
@@ -31,6 +31,8 @@ declare function __VLS_template(): {
31
31
  fileInput: HTMLInputElement;
32
32
  area: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
33
33
  modelValue: JSONContent;
34
+ tagValidityPort?: import('..').TagValidityPort;
35
+ tagValidityKey?: string;
34
36
  editable: boolean;
35
37
  placeholder?: string;
36
38
  referencePlaceholder?: boolean;
@@ -42,6 +44,7 @@ declare function __VLS_template(): {
42
44
  "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
43
45
  "onRetry-media"?: ((id: string) => any) | undefined;
44
46
  "onLoad-error"?: ((message: string) => any) | undefined;
47
+ "onTag-validity-error"?: ((message: string) => any) | undefined;
45
48
  "onEdit-tool"?: ((payload: {
46
49
  nodeId: string;
47
50
  nodeVersion: number;
@@ -58,6 +61,10 @@ declare function __VLS_template(): {
58
61
  }) => any) | undefined;
59
62
  "onLeave-choice"?: (() => any) | undefined;
60
63
  }>, {
64
+ validateTagValidity: () => Promise<import('..').TagValidityReport | {
65
+ status: "unavailable";
66
+ items: never[];
67
+ }>;
61
68
  pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
62
69
  isSelectionInsideOriginalReply: () => boolean;
63
70
  insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
@@ -73,6 +80,7 @@ declare function __VLS_template(): {
73
80
  url: string;
74
81
  kind: "image" | "video";
75
82
  posterUrl?: string;
83
+ sourceType?: "qianniuVideo";
76
84
  }, name: string, target: MediaTarget, refocus: boolean) => JSONContent | null;
77
85
  insertPendingMedia: (file: File, kind: "image" | "video", target: MediaTarget) => string | null;
78
86
  insertPendingMediaBatch: (files: Array<{
@@ -135,6 +143,7 @@ declare function __VLS_template(): {
135
143
  "update:modelValue": (value: JSONContent) => any;
136
144
  "retry-media": (id: string) => any;
137
145
  "load-error": (message: string) => any;
146
+ "tag-validity-error": (message: string) => any;
138
147
  "edit-tool": (payload: {
139
148
  nodeId: string;
140
149
  nodeVersion: number;
@@ -161,6 +170,8 @@ declare function __VLS_template(): {
161
170
  Defaults: {};
162
171
  }, Readonly<{
163
172
  modelValue: JSONContent;
173
+ tagValidityPort?: import('..').TagValidityPort;
174
+ tagValidityKey?: string;
164
175
  editable: boolean;
165
176
  placeholder?: string;
166
177
  referencePlaceholder?: boolean;
@@ -172,6 +183,7 @@ declare function __VLS_template(): {
172
183
  "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
173
184
  "onRetry-media"?: ((id: string) => any) | undefined;
174
185
  "onLoad-error"?: ((message: string) => any) | undefined;
186
+ "onTag-validity-error"?: ((message: string) => any) | undefined;
175
187
  "onEdit-tool"?: ((payload: {
176
188
  nodeId: string;
177
189
  nodeVersion: number;
@@ -188,6 +200,10 @@ declare function __VLS_template(): {
188
200
  }) => any) | undefined;
189
201
  "onLeave-choice"?: (() => any) | undefined;
190
202
  }>, {
203
+ validateTagValidity: () => Promise<import('..').TagValidityReport | {
204
+ status: "unavailable";
205
+ items: never[];
206
+ }>;
191
207
  pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
192
208
  isSelectionInsideOriginalReply: () => boolean;
193
209
  insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
@@ -203,6 +219,7 @@ declare function __VLS_template(): {
203
219
  url: string;
204
220
  kind: "image" | "video";
205
221
  posterUrl?: string;
222
+ sourceType?: "qianniuVideo";
206
223
  }, name: string, target: MediaTarget, refocus: boolean) => JSONContent | null;
207
224
  insertPendingMedia: (file: File, kind: "image" | "video", target: MediaTarget) => string | null;
208
225
  insertPendingMediaBatch: (files: Array<{
@@ -267,30 +284,31 @@ declare function __VLS_template(): {
267
284
  };
268
285
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
269
286
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
287
+ validateTagValidity(): Promise<import('..').TagValidityReport>;
270
288
  insertContent(input: AgentPromptInsertInput): Promise<RichTextInsertResult>;
271
289
  focus(): void;
272
290
  validate(): AgentPromptIssue[];
273
291
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
274
- "update:modelValue": (value: AgentPromptValueV1) => any;
275
292
  change: (value: AgentPromptValueV1, meta: {
276
293
  promptKey: string;
277
294
  revision: number;
278
295
  origin: "user" | "api" | "plugin";
279
296
  capabilityId?: AgentPromptCapabilityId;
280
297
  }) => any;
298
+ "update:modelValue": (value: AgentPromptValueV1) => any;
281
299
  diagnostic: (issue: AgentPromptIssue) => any;
282
300
  "busy-change": (busy: {
283
301
  uploading: number;
284
302
  requesting: number;
285
303
  }) => any;
286
304
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
287
- "onUpdate:modelValue"?: ((value: AgentPromptValueV1) => any) | undefined;
288
305
  onChange?: ((value: AgentPromptValueV1, meta: {
289
306
  promptKey: string;
290
307
  revision: number;
291
308
  origin: "user" | "api" | "plugin";
292
309
  capabilityId?: AgentPromptCapabilityId;
293
310
  }) => any) | undefined;
311
+ "onUpdate:modelValue"?: ((value: AgentPromptValueV1) => any) | undefined;
294
312
  onDiagnostic?: ((issue: AgentPromptIssue) => any) | undefined;
295
313
  "onBusy-change"?: ((busy: {
296
314
  uploading: number;
@@ -309,6 +327,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
309
327
  fileInput: HTMLInputElement;
310
328
  area: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
311
329
  modelValue: JSONContent;
330
+ tagValidityPort?: import('..').TagValidityPort;
331
+ tagValidityKey?: string;
312
332
  editable: boolean;
313
333
  placeholder?: string;
314
334
  referencePlaceholder?: boolean;
@@ -320,6 +340,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
320
340
  "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
321
341
  "onRetry-media"?: ((id: string) => any) | undefined;
322
342
  "onLoad-error"?: ((message: string) => any) | undefined;
343
+ "onTag-validity-error"?: ((message: string) => any) | undefined;
323
344
  "onEdit-tool"?: ((payload: {
324
345
  nodeId: string;
325
346
  nodeVersion: number;
@@ -336,6 +357,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
336
357
  }) => any) | undefined;
337
358
  "onLeave-choice"?: (() => any) | undefined;
338
359
  }>, {
360
+ validateTagValidity: () => Promise<import('..').TagValidityReport | {
361
+ status: "unavailable";
362
+ items: never[];
363
+ }>;
339
364
  pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
340
365
  isSelectionInsideOriginalReply: () => boolean;
341
366
  insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
@@ -351,6 +376,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
351
376
  url: string;
352
377
  kind: "image" | "video";
353
378
  posterUrl?: string;
379
+ sourceType?: "qianniuVideo";
354
380
  }, name: string, target: MediaTarget, refocus: boolean) => JSONContent | null;
355
381
  insertPendingMedia: (file: File, kind: "image" | "video", target: MediaTarget) => string | null;
356
382
  insertPendingMediaBatch: (files: Array<{
@@ -413,6 +439,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
413
439
  "update:modelValue": (value: JSONContent) => any;
414
440
  "retry-media": (id: string) => any;
415
441
  "load-error": (message: string) => any;
442
+ "tag-validity-error": (message: string) => any;
416
443
  "edit-tool": (payload: {
417
444
  nodeId: string;
418
445
  nodeVersion: number;
@@ -439,6 +466,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
439
466
  Defaults: {};
440
467
  }, Readonly<{
441
468
  modelValue: JSONContent;
469
+ tagValidityPort?: import('..').TagValidityPort;
470
+ tagValidityKey?: string;
442
471
  editable: boolean;
443
472
  placeholder?: string;
444
473
  referencePlaceholder?: boolean;
@@ -450,6 +479,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
450
479
  "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
451
480
  "onRetry-media"?: ((id: string) => any) | undefined;
452
481
  "onLoad-error"?: ((message: string) => any) | undefined;
482
+ "onTag-validity-error"?: ((message: string) => any) | undefined;
453
483
  "onEdit-tool"?: ((payload: {
454
484
  nodeId: string;
455
485
  nodeVersion: number;
@@ -466,6 +496,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
466
496
  }) => any) | undefined;
467
497
  "onLeave-choice"?: (() => any) | undefined;
468
498
  }>, {
499
+ validateTagValidity: () => Promise<import('..').TagValidityReport | {
500
+ status: "unavailable";
501
+ items: never[];
502
+ }>;
469
503
  pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
470
504
  isSelectionInsideOriginalReply: () => boolean;
471
505
  insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
@@ -481,6 +515,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
481
515
  url: string;
482
516
  kind: "image" | "video";
483
517
  posterUrl?: string;
518
+ sourceType?: "qianniuVideo";
484
519
  }, name: string, target: MediaTarget, refocus: boolean) => JSONContent | null;
485
520
  insertPendingMedia: (file: File, kind: "image" | "video", target: MediaTarget) => string | null;
486
521
  insertPendingMediaBatch: (files: Array<{
@@ -4,3 +4,4 @@ export type { MediaSource, MediaSourceOptions } from './types';
4
4
  export { emptyAgentPrompt, validateAgentPrompt } from './model';
5
5
  export type { AgentPromptValueV1, AgentPromptCapabilityId, AgentPromptPolicyV1, AgentPromptIssue, } from './model';
6
6
  export type { AgentPromptConfigV1, AgentPromptCapabilityRuleV1, AgentPromptPorts, AgentPromptPortContext, AgentPromptInsertInput, AgentPromptEditorHandle, } from './types';
7
+ export type { TagValidityInput, TagValidityItem, TagValidityContext, TagValidityPort, TagValidityReport, } from '../rich-text/runtime/tag-validity';
@@ -1,3 +1,4 @@
1
+ import { TagValidityPort, TagValidityReport } from '../rich-text/runtime/tag-validity';
1
2
  import { CapabilityOption, MediaAsset, Page, PortResult, RichTextInsertOption, RichTextInsertResult, VariableOption } from '../rich-text/public/types';
2
3
  import { AgentPromptCapabilityId, AgentPromptIssue } from './model';
3
4
  export interface AgentPromptCapabilityRuleV1 {
@@ -19,6 +20,8 @@ export interface AgentPromptPortContext {
19
20
  reportProgress?: (percent: number) => void;
20
21
  }
21
22
  export interface AgentPromptPorts {
23
+ /** 校验提示词正文标签的当前业务状态。 */
24
+ validateTags?: TagValidityPort;
22
25
  uploadMedia?: (input: {
23
26
  file: File;
24
27
  kind: 'image' | 'video';
@@ -50,6 +53,7 @@ export type AgentPromptInsertInput = {
50
53
  option?: RichTextInsertOption;
51
54
  };
52
55
  export interface AgentPromptEditorHandle {
56
+ validateTagValidity(): Promise<TagValidityReport>;
53
57
  insertContent(input: AgentPromptInsertInput): Promise<RichTextInsertResult>;
54
58
  focus(): void;
55
59
  validate(): AgentPromptIssue[];
@@ -7,14 +7,14 @@ type __VLS_Props = {
7
7
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
8
  search: (value: string, field: string | undefined) => any;
9
9
  clear: () => any;
10
- "update:modelValue": (value: FilterModelValue) => any;
11
10
  change: (value: FilterModelValue) => any;
11
+ "update:modelValue": (value: FilterModelValue) => any;
12
12
  "update:field": (field: string) => any;
13
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
14
  onSearch?: ((value: string, field: string | undefined) => any) | undefined;
15
15
  onClear?: (() => any) | undefined;
16
- "onUpdate:modelValue"?: ((value: FilterModelValue) => any) | undefined;
17
16
  onChange?: ((value: FilterModelValue) => any) | undefined;
17
+ "onUpdate:modelValue"?: ((value: FilterModelValue) => any) | undefined;
18
18
  "onUpdate:field"?: ((field: string) => any) | undefined;
19
19
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
20
  export default _default;
@@ -4,10 +4,10 @@ type __VLS_Props = {
4
4
  disabled?: boolean;
5
5
  };
6
6
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
- "update:modelValue": (value: string[]) => any;
8
7
  change: (value: string[]) => any;
8
+ "update:modelValue": (value: string[]) => any;
9
9
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
11
10
  onChange?: ((value: string[]) => any) | undefined;
11
+ "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
12
12
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
13
  export default _default;
@@ -8,10 +8,10 @@ type __VLS_Props = {
8
8
  disabled?: boolean;
9
9
  };
10
10
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
- "update:modelValue": (value: string | number) => any;
12
11
  change: (value: string | number) => any;
12
+ "update:modelValue": (value: string | number) => any;
13
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
15
14
  onChange?: ((value: string | number) => any) | undefined;
15
+ "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
16
16
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
17
17
  export default _default;
@@ -22,11 +22,11 @@ declare function __VLS_template(): {
22
22
  };
23
23
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
24
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
- "update:modelValue": (value: FilterValue[]) => any;
26
25
  change: (value: FilterValue[]) => any;
26
+ "update:modelValue": (value: FilterValue[]) => any;
27
27
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
28
- "onUpdate:modelValue"?: ((value: FilterValue[]) => any) | undefined;
29
28
  onChange?: ((value: FilterValue[]) => any) | undefined;
29
+ "onUpdate:modelValue"?: ((value: FilterValue[]) => any) | undefined;
30
30
  }>, {
31
31
  modelValue: FilterValue[];
32
32
  placeholder: string;
@@ -8,6 +8,7 @@ export { default as FkpKnowledgeTypePicker } from './knowledge-type-picker';
8
8
  export type { FkpKnowledgeTypePickerProps } from './knowledge-type-picker';
9
9
  export type { MediaSource, MediaSourceOptions, } from './rich-text/runtime/media-sources';
10
10
  export type { KnowledgeMode } from './rich-text/types';
11
+ export type { TagValidityInput, TagValidityItem, TagValidityContext, TagValidityPort, TagValidityReport, } from './rich-text/runtime/tag-validity';
11
12
  export type { FkpRichTextProps, CapabilityModuleLoader, FkpRichTextHandle, RichTextInsertInput, RichTextInsertOption, RichTextInsertResult, KnowledgeSceneV1, KnowledgeConditionV1, LoadedConditionV1, SaveConditionInputV1, SavedConditionV1, KnowledgePersistenceAdapterV1, KnowledgeType, AddKnowledgeSceneRequest, DeleteKnowledgeSceneRequest, CapabilityId, CapabilitySlot, CapabilityRuleV1, SceneConfigInputV1, RichTextHostPorts, PortRequestContext, PortResult, PortErrorCode, Page, CapabilityOption, ToolFormField, ToolFormDefinition, VariableOption, AgentSummary, AgentPrompt, AgentPromptPreviewPart, MediaAsset, SceneConfigLayersV1, HostPolicySnapshotV1, EditorDiagnostic, ChangeMeta, } from './rich-text/public/types';
12
13
  export type { CapabilityDescriptor } from './rich-text/config/descriptor';
13
14
  export type { CapabilityModule, PluginInput, PluginOperation, PluginActionContext, } from './rich-text/plugins/operations';
@@ -4,12 +4,13 @@ import { MediaTarget } from './runtime/media-target';
4
4
  import { PluginPlan } from './runtime/operations';
5
5
  import { CapabilityId, AddKnowledgeSceneRequest, DeleteKnowledgeSceneRequest, ChangeMeta, EditorDiagnostic, FkpRichTextProps, RichTextInsertInput, RichTextInsertResult, KnowledgeSceneV1 } from './public/types';
6
6
  declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
7
+ validateTagValidity(): Promise<import('.').TagValidityReport>;
7
8
  undoTypeSwitch(): boolean;
8
9
  insertContent(input: RichTextInsertInput): Promise<RichTextInsertResult>;
9
10
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ change: (scene: KnowledgeSceneV1, meta: ChangeMeta) => any;
10
12
  delete: (request: DeleteKnowledgeSceneRequest) => any;
11
13
  "update:modelValue": (scene: KnowledgeSceneV1) => any;
12
- change: (scene: KnowledgeSceneV1, meta: ChangeMeta) => any;
13
14
  help: (request: {
14
15
  capabilityId: CapabilityId;
15
16
  }) => any;
@@ -23,9 +24,9 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
23
24
  }) => any;
24
25
  "add-scene": (request: AddKnowledgeSceneRequest) => any;
25
26
  }, string, import('vue').PublicProps, Readonly<FkpRichTextProps> & Readonly<{
27
+ onChange?: ((scene: KnowledgeSceneV1, meta: ChangeMeta) => any) | undefined;
26
28
  onDelete?: ((request: DeleteKnowledgeSceneRequest) => any) | undefined;
27
29
  "onUpdate:modelValue"?: ((scene: KnowledgeSceneV1) => any) | undefined;
28
- onChange?: ((scene: KnowledgeSceneV1, meta: ChangeMeta) => any) | undefined;
29
30
  onHelp?: ((request: {
30
31
  capabilityId: CapabilityId;
31
32
  }) => any) | undefined;
@@ -52,6 +53,8 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
52
53
  toolbarLeft: HTMLDivElement;
53
54
  area: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
54
55
  modelValue: JSONContent;
56
+ tagValidityPort?: import('.').TagValidityPort;
57
+ tagValidityKey?: string;
55
58
  editable: boolean;
56
59
  placeholder?: string;
57
60
  referencePlaceholder?: boolean;
@@ -63,6 +66,7 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
63
66
  "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
64
67
  "onRetry-media"?: ((id: string) => any) | undefined;
65
68
  "onLoad-error"?: ((message: string) => any) | undefined;
69
+ "onTag-validity-error"?: ((message: string) => any) | undefined;
66
70
  "onEdit-tool"?: ((payload: {
67
71
  nodeId: string;
68
72
  nodeVersion: number;
@@ -79,6 +83,10 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
79
83
  }) => any) | undefined;
80
84
  "onLeave-choice"?: (() => any) | undefined;
81
85
  }>, {
86
+ validateTagValidity: () => Promise<import('.').TagValidityReport | {
87
+ status: "unavailable";
88
+ items: never[];
89
+ }>;
82
90
  pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
83
91
  isSelectionInsideOriginalReply: () => boolean;
84
92
  insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
@@ -94,6 +102,7 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
94
102
  url: string;
95
103
  kind: "image" | "video";
96
104
  posterUrl?: string;
105
+ sourceType?: "qianniuVideo";
97
106
  }, name: string, target: MediaTarget, refocus: boolean) => JSONContent | null;
98
107
  insertPendingMedia: (file: File, kind: "image" | "video", target: MediaTarget) => string | null;
99
108
  insertPendingMediaBatch: (files: Array<{
@@ -156,6 +165,7 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
156
165
  "update:modelValue": (value: JSONContent) => any;
157
166
  "retry-media": (id: string) => any;
158
167
  "load-error": (message: string) => any;
168
+ "tag-validity-error": (message: string) => any;
159
169
  "edit-tool": (payload: {
160
170
  nodeId: string;
161
171
  nodeVersion: number;
@@ -182,6 +192,8 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
182
192
  Defaults: {};
183
193
  }, Readonly<{
184
194
  modelValue: JSONContent;
195
+ tagValidityPort?: import('.').TagValidityPort;
196
+ tagValidityKey?: string;
185
197
  editable: boolean;
186
198
  placeholder?: string;
187
199
  referencePlaceholder?: boolean;
@@ -193,6 +205,7 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
193
205
  "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
194
206
  "onRetry-media"?: ((id: string) => any) | undefined;
195
207
  "onLoad-error"?: ((message: string) => any) | undefined;
208
+ "onTag-validity-error"?: ((message: string) => any) | undefined;
196
209
  "onEdit-tool"?: ((payload: {
197
210
  nodeId: string;
198
211
  nodeVersion: number;
@@ -209,6 +222,10 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
209
222
  }) => any) | undefined;
210
223
  "onLeave-choice"?: (() => any) | undefined;
211
224
  }>, {
225
+ validateTagValidity: () => Promise<import('.').TagValidityReport | {
226
+ status: "unavailable";
227
+ items: never[];
228
+ }>;
212
229
  pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
213
230
  isSelectionInsideOriginalReply: () => boolean;
214
231
  insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
@@ -224,6 +241,7 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
224
241
  url: string;
225
242
  kind: "image" | "video";
226
243
  posterUrl?: string;
244
+ sourceType?: "qianniuVideo";
227
245
  }, name: string, target: MediaTarget, refocus: boolean) => JSONContent | null;
228
246
  insertPendingMedia: (file: File, kind: "image" | "video", target: MediaTarget) => string | null;
229
247
  insertPendingMediaBatch: (files: Array<{
@@ -20,3 +20,4 @@ export { buildAgentInvocationContext } from './model/agent-context';
20
20
  export type { AgentInvocationContext } from './model/agent-context';
21
21
  export { serializeQuestionForModel, serializeQuestionTagsForModel, } from './model/question-text';
22
22
  export type { SceneValidationResult, SceneValidationIssue, } from './model/validate';
23
+ export type { TagValidityInput, TagValidityItem, TagValidityContext, TagValidityPort, TagValidityReport, } from './runtime/tag-validity';
@@ -0,0 +1,2 @@
1
+ /** A Qianniu video-space URL is distinct from a generic online video. */
2
+ export declare function isQianniuVideoUrl(value: string): boolean;
@@ -1,5 +1,6 @@
1
1
  export declare const attributeToken: {
2
2
  allowInOriginalReply: false;
3
+ validateValidity?: false;
3
4
  choice: true;
4
5
  requiresInsertToken?: true;
5
6
  allowsParams?: true;
@@ -1,5 +1,6 @@
1
1
  export declare const tableKnowledgeToken: {
2
2
  validate: (attrs: Readonly<Record<string, unknown>>) => "label" | null;
3
+ validateValidity?: false;
3
4
  choice: true;
4
5
  requiresInsertToken?: true;
5
6
  allowsParams?: true;
@@ -1,6 +1,7 @@
1
1
  export declare const ticketToken: {
2
2
  allowsParams: true;
3
- validate(attrs: Readonly<Record<string, unknown>>): "label" | "params" | "key" | null;
3
+ validate(attrs: Readonly<Record<string, unknown>>): "params" | "key" | "label" | null;
4
+ validateValidity?: false;
4
5
  choice: true;
5
6
  requiresInsertToken?: true;
6
7
  allowInOriginalReply?: false;
@@ -6,7 +6,8 @@ export declare const tokenCatalog: {
6
6
  };
7
7
  ticket: {
8
8
  allowsParams: true;
9
- validate(attrs: Readonly<Record<string, unknown>>): "label" | "params" | "key" | null;
9
+ validate(attrs: Readonly<Record<string, unknown>>): "params" | "key" | "label" | null;
10
+ validateValidity?: false;
10
11
  choice: true;
11
12
  requiresInsertToken?: true;
12
13
  allowInOriginalReply?: false;
@@ -15,6 +16,7 @@ export declare const tokenCatalog: {
15
16
  };
16
17
  tableKnowledge: {
17
18
  validate: (attrs: Readonly<Record<string, unknown>>) => "label" | null;
19
+ validateValidity?: false;
18
20
  choice: true;
19
21
  requiresInsertToken?: true;
20
22
  allowsParams?: true;
@@ -25,6 +27,7 @@ export declare const tokenCatalog: {
25
27
  variable: BusinessTokenDefinition;
26
28
  attribute: {
27
29
  allowInOriginalReply: false;
30
+ validateValidity?: false;
28
31
  choice: true;
29
32
  requiresInsertToken?: true;
30
33
  allowsParams?: true;
@@ -10,6 +10,8 @@ export interface TokenPresentation {
10
10
  }
11
11
  /** Pure metadata/codecs: importing these contracts never loads editor views. */
12
12
  export interface BusinessTokenDefinition {
13
+ /** Fixed markers do not refer to a host-owned object. */
14
+ validateValidity?: false;
13
15
  choice?: true;
14
16
  requiresInsertToken?: true;
15
17
  allowsParams?: true;
@@ -1,3 +1,4 @@
1
+ import { TagValidityPort, TagValidityReport } from '../runtime/tag-validity';
1
2
  import { JSONContent } from '@tiptap/core';
2
3
  import { CapabilityDescriptor } from '../config/descriptor';
3
4
  import { CapabilityModule } from '../plugins/operations';
@@ -504,6 +505,8 @@ export interface MediaAsset {
504
505
  posterUrl?: string;
505
506
  }
506
507
  export interface RichTextHostPorts {
508
+ /** 校验正文标签的当前业务状态;失败不等同于失效。 */
509
+ validateTags?: TagValidityPort;
507
510
  /** 分页查询变量,返回含 token 的平铺变量选项;可用 group 在前端分栏。
508
511
  * @en Search flat, paged variable options with tokens; group controls the client-side columns.
509
512
  */
@@ -590,8 +593,8 @@ export interface FkpRichTextProps {
590
593
  * @en Remote and page-level capability rules.
591
594
  */
592
595
  config?: SceneConfigLayersV1;
593
- /** 图片和视频工具栏的来源;每种默认仅本地。单一来源直接执行,两种来源显示选择菜单。
594
- * @en Toolbar sources for images and videos. Each defaults to local only; one source runs directly, two open a chooser.
596
+ /** 图片和视频工具栏的来源;视频可配置 qianniu,由宿主按店铺平台及接待状态启用。
597
+ * @en Toolbar media sources; the host enables qianniu video for eligible shops.
595
598
  */
596
599
  mediaSources?: MediaSourceOptions;
597
600
  /** 宿主权限快照;过期或无效时禁止编辑。
@@ -629,6 +632,8 @@ export interface FkpRichTextProps {
629
632
  }
630
633
  export type CapabilityModuleLoader = (descriptor: Readonly<CapabilityDescriptor>) => CapabilityModule | undefined | Promise<CapabilityModule | undefined>;
631
634
  export interface FkpRichTextHandle {
635
+ /** 刷新正文标签状态;不会修改正文。 */
636
+ validateTagValidity(): Promise<TagValidityReport>;
632
637
  /** 撤销最近一次尚未被后续编辑覆盖的知识类型切换。
633
638
  * @en Undo the most recent uninterrupted knowledge type switch.
634
639
  */
@@ -1,9 +1,12 @@
1
1
  import { Extensions } from '@tiptap/core';
2
+ import { Node as ProseMirrorNode } from '@tiptap/pm/model';
3
+ import { TagValidityInput } from './tag-validity';
2
4
  import { KnowledgeClipboardAdapter } from './knowledge-clipboard';
3
5
  /** Private seam between the document editor and its scene-specific host. */
4
6
  export interface DocumentAdapter {
5
7
  ariaLabel: string;
6
8
  placeholder: string;
7
9
  extensions?: Extensions;
10
+ describeTagValidity?: (node: ProseMirrorNode) => Omit<TagValidityInput, 'requestItemId'> | undefined;
8
11
  clipboard?: KnowledgeClipboardAdapter;
9
12
  }
@@ -1,4 +1,4 @@
1
- export type MediaSource = 'local' | 'online';
1
+ export type MediaSource = 'local' | 'online' | 'qianniu';
2
2
  /** Toolbar sources for each media kind. Omitted kinds default to local upload. */
3
3
  export interface MediaSourceOptions {
4
4
  image?: readonly MediaSource[];
@@ -0,0 +1,46 @@
1
+ import { Extension, Editor } from '@tiptap/core';
2
+ import { Node as ProseMirrorNode } from '@tiptap/pm/model';
3
+ import { PortResult } from '../public/types';
4
+ /** Host-facing description of an inline business reference. */
5
+ export interface TagValidityInput {
6
+ requestItemId: string;
7
+ kind: string;
8
+ key?: string;
9
+ label: string;
10
+ token?: string;
11
+ params?: Record<string, unknown>;
12
+ }
13
+ export interface TagValidityItem {
14
+ requestItemId: string;
15
+ status: 'valid' | 'invalid' | 'unknown';
16
+ reason?: string;
17
+ }
18
+ export interface TagValidityContext {
19
+ editorKey: string;
20
+ requestId: string;
21
+ signal: AbortSignal;
22
+ }
23
+ export type TagValidityPort = (input: {
24
+ tags: TagValidityInput[];
25
+ }, context: TagValidityContext) => Promise<PortResult<{
26
+ items: TagValidityItem[];
27
+ }>>;
28
+ export interface TagValidityReport {
29
+ status: 'complete' | 'unavailable' | 'cancelled' | 'error';
30
+ items: Array<TagValidityItem & Omit<TagValidityInput, 'requestItemId'>>;
31
+ message?: string;
32
+ }
33
+ /** Transient state: never put validity or display suffixes in the document. */
34
+ export declare function createTagValiditySession(options: {
35
+ editor: () => Editor | undefined;
36
+ port: () => TagValidityPort | undefined;
37
+ editorKey: () => string;
38
+ onError?: (message: string) => void;
39
+ describeExtra?: (node: ProseMirrorNode) => Omit<TagValidityInput, 'requestItemId'> | undefined;
40
+ }): {
41
+ extension: Extension<any, any>;
42
+ schedule: () => void;
43
+ refresh: () => Promise<TagValidityReport>;
44
+ reset: () => void;
45
+ dispose(): void;
46
+ };
@@ -14,11 +14,11 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
14
  declare const __VLS_component: import('vue').DefineComponent<FkpKnowledgeTypePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
15
  select: (type: KnowledgeType) => any;
16
16
  create: (request: AddKnowledgeSceneRequest) => any;
17
- "update:open": (open: boolean, source: "click" | "hover" | "select" | "leave" | "outside" | "escape") => any;
17
+ "update:open": (open: boolean, source: "click" | "select" | "hover" | "leave" | "outside" | "escape") => any;
18
18
  }, string, import('vue').PublicProps, Readonly<FkpKnowledgeTypePickerProps> & Readonly<{
19
19
  onSelect?: ((type: KnowledgeType) => any) | undefined;
20
20
  onCreate?: ((request: AddKnowledgeSceneRequest) => any) | undefined;
21
- "onUpdate:open"?: ((open: boolean, source: "click" | "hover" | "select" | "leave" | "outside" | "escape") => any) | undefined;
21
+ "onUpdate:open"?: ((open: boolean, source: "click" | "select" | "hover" | "leave" | "outside" | "escape") => any) | undefined;
22
22
  }>, {
23
23
  open: boolean | null;
24
24
  disabled: boolean;
@@ -1,4 +1,5 @@
1
1
  import { JSONContent } from '@tiptap/core';
2
+ import { TagValidityPort } from '../runtime/tag-validity';
2
3
  import { KnowledgeSchemaPlan } from '../runtime/schema-plan';
3
4
  import { DocumentAdapter } from '../runtime/document-adapter';
4
5
  import { PasteCapability } from '../runtime/knowledge-clipboard';
@@ -8,6 +9,8 @@ import { NodeMutationPlan, PluginPlan } from '../runtime/operations';
8
9
  import { MediaTarget } from '../runtime/media-target';
9
10
  type __VLS_Props = {
10
11
  modelValue: JSONContent;
12
+ tagValidityPort?: TagValidityPort;
13
+ tagValidityKey?: string;
11
14
  editable: boolean;
12
15
  placeholder?: string;
13
16
  referencePlaceholder?: boolean;
@@ -29,6 +32,7 @@ declare function insertMedia(asset: {
29
32
  url: string;
30
33
  kind: 'image' | 'video';
31
34
  posterUrl?: string;
35
+ sourceType?: 'qianniuVideo';
32
36
  }, name: string, target: MediaTarget, refocus: boolean): JSONContent | null;
33
37
  declare function insertPendingMedia(file: File, kind: 'image' | 'video', target: MediaTarget): string | null;
34
38
  declare function insertPendingMediaBatch(files: Array<{
@@ -69,6 +73,10 @@ declare function captureSelection(): {
69
73
  declare function restoreSelection(selection: ReturnType<typeof captureSelection>): void;
70
74
  declare function pasteClipboardContent(event: ClipboardEvent): MediaTarget | null;
71
75
  declare const _default: import('vue').DefineComponent<__VLS_Props, {
76
+ validateTagValidity: () => Promise<import('..').TagValidityReport | {
77
+ status: "unavailable";
78
+ items: never[];
79
+ }>;
72
80
  pasteClipboardContent: typeof pasteClipboardContent;
73
81
  isSelectionInsideOriginalReply: () => boolean;
74
82
  insertToken: typeof insertToken;
@@ -103,6 +111,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
103
111
  "update:modelValue": (value: JSONContent) => any;
104
112
  "retry-media": (id: string) => any;
105
113
  "load-error": (message: string) => any;
114
+ "tag-validity-error": (message: string) => any;
106
115
  "edit-tool": (payload: {
107
116
  nodeId: string;
108
117
  nodeVersion: number;
@@ -122,6 +131,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
122
131
  "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
123
132
  "onRetry-media"?: ((id: string) => any) | undefined;
124
133
  "onLoad-error"?: ((message: string) => any) | undefined;
134
+ "onTag-validity-error"?: ((message: string) => any) | undefined;
125
135
  "onEdit-tool"?: ((payload: {
126
136
  nodeId: string;
127
137
  nodeVersion: number;