@freecallai/pro 0.0.4 → 0.0.6

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 (94) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +23 -23
  3. package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang--MPtqZY_.js +193 -0
  4. package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-DIIFWISD.js +4995 -0
  5. package/dist/KnowledgeArea-CEX1esVZ.js +4 -0
  6. package/dist/KnowledgeArea.vue_vue_type_script_setup_true_lang-Bg1e7xYT.js +1653 -0
  7. package/dist/ToolForm-Ch1YRmMw.js +196 -0
  8. package/dist/agent-prompt-editor/index.js +917 -0
  9. package/dist/agent-prompt-editor/legacy-converter/index.js +490 -0
  10. package/dist/{choice-C1SxozNA.js → choice-2dbddjJU.js} +1 -1
  11. package/dist/edition-info/index.js +1 -1
  12. package/dist/filters/index.js +1 -1
  13. package/dist/{guard-CXpVx8UR.js → guard-Cr_ny-sR.js} +226 -213
  14. package/dist/{index-B8jg37Wj.js → index-5FRWdHnd.js} +1 -1
  15. package/dist/index-7x1OTv0m.js +98 -0
  16. package/dist/{index-CM0MN2DT.js → index-BBxrpF3v.js} +1 -1
  17. package/dist/index-CEjD03Kk.js +5 -0
  18. package/dist/{index-UjI4WA5F.js → index-CK_CrdQW.js} +1 -1
  19. package/dist/index-Ck8RYpuE.js +816 -0
  20. package/dist/{index-lNhA3N9x.js → index-DBQsQ1ZK.js} +1 -0
  21. package/dist/{index-BqXNMfLG.js → index-DiaPY8Db.js} +2 -2
  22. package/dist/{index-bSNw0XAf.js → index-DmdrsEvk.js} +1 -1
  23. package/dist/index-DnmCPdCI.js +168 -0
  24. package/dist/{index-Cy4DqT8R.js → index-DwDYy2lj.js} +1 -1
  25. package/dist/{index-CZc2Gyjb.js → index-aic1yCBs.js} +1 -1
  26. package/dist/index-sWjZ9xuV.js +5 -0
  27. package/dist/index.js +13 -13
  28. package/dist/{inline-Zj7Hqg-_.js → inline-8aNfINLF.js} +1 -1
  29. package/dist/knowledge-type-picker/index.js +1 -1
  30. package/dist/{knowledge-DaTnF2IW.js → knowledge-y2j0ijgx.js} +1 -1
  31. package/dist/media-id-b2dgniSy.js +15 -0
  32. package/dist/{media-migration-C2QLMSpd.js → media-migration-Dy_rbdkK.js} +1 -1
  33. package/dist/media-policy-BwKjZPWt.js +158 -0
  34. package/dist/{media-upload-D9MYBbLg.js → media-upload-BetGuTLJ.js} +1 -1
  35. package/dist/model-DvukseoR.js +146 -0
  36. package/dist/navigation/index.js +1 -1
  37. package/dist/rich-text/index.js +75 -73
  38. package/dist/rich-text/legacy-converter/index.js +822 -799
  39. package/dist/style.css +1 -1
  40. package/dist/switcher/index.js +1 -1
  41. package/dist/types/agent-prompt-editor/FkpAgentPromptEditor.vue.d.ts +550 -0
  42. package/dist/types/agent-prompt-editor/agent-size-chart.d.ts +3 -0
  43. package/dist/types/agent-prompt-editor/document-adapter.d.ts +3 -0
  44. package/dist/types/agent-prompt-editor/index.d.ts +6 -0
  45. package/dist/types/agent-prompt-editor/legacy-converter-index.d.ts +2 -0
  46. package/dist/types/agent-prompt-editor/legacy-converter.d.ts +26 -0
  47. package/dist/types/agent-prompt-editor/model.d.ts +21 -0
  48. package/dist/types/agent-prompt-editor/types.d.ts +56 -0
  49. package/dist/types/edition-info/FkpEditionInfo.vue.d.ts +1 -3
  50. package/dist/types/edition-info/presets.d.ts +8 -0
  51. package/dist/types/edition-info/types.d.ts +1 -0
  52. package/dist/types/filters/FkpFilter.vue.d.ts +2 -2
  53. package/dist/types/filters/FkpFilterDateRange.vue.d.ts +2 -2
  54. package/dist/types/filters/FkpFilterPeriod.vue.d.ts +2 -2
  55. package/dist/types/filters/FkpSearchableMultiSelect.vue.d.ts +2 -2
  56. package/dist/types/index.d.ts +4 -1
  57. package/dist/types/navigation/FkpNavigation.vue.d.ts +20 -29
  58. package/dist/types/navigation/NavigationButton.vue.d.ts +26 -0
  59. package/dist/types/navigation/NavigationGroup.vue.d.ts +45 -0
  60. package/dist/types/navigation/NavigationIcon.vue.d.ts +28 -0
  61. package/dist/types/navigation/NavigationNodes.vue.d.ts +40 -0
  62. package/dist/types/navigation/index.d.ts +1 -1
  63. package/dist/types/navigation/types.d.ts +43 -5
  64. package/dist/types/navigation/use-navigation-tree.d.ts +13 -0
  65. package/dist/types/rich-text/FkpRichText.vue.d.ts +31 -9
  66. package/dist/types/rich-text/config/descriptor.d.ts +1 -0
  67. package/dist/types/rich-text/config/resolve.d.ts +1 -1
  68. package/dist/types/rich-text/index.d.ts +4 -1
  69. package/dist/types/rich-text/knowledge-document-adapter.d.ts +2 -0
  70. package/dist/types/rich-text/model/question-text.d.ts +1 -1
  71. package/dist/types/rich-text/plugins/registry.d.ts +2 -1
  72. package/dist/types/rich-text/public/types.d.ts +16 -0
  73. package/dist/types/rich-text/runtime/document-adapter.d.ts +9 -0
  74. package/dist/types/rich-text/runtime/knowledge-clipboard.d.ts +9 -3
  75. package/dist/types/rich-text/runtime/media-sources.d.ts +7 -0
  76. package/dist/types/rich-text/runtime/media-upload-session.d.ts +2 -0
  77. package/dist/types/rich-text/ui/FkpKnowledgeTypePicker.vue.d.ts +3 -3
  78. package/dist/types/rich-text/ui/KnowledgeArea.vue.d.ts +18 -3
  79. package/dist/types/rich-text/ui/MediaSourceControls.vue.d.ts +190 -0
  80. package/dist/types/rich-text/ui/ToolForm.vue.d.ts +2 -2
  81. package/dist/types/rich-text/ui/token-renderer.d.ts +3 -0
  82. package/dist/types/rich-text/ui/useMediaHint.d.ts +6 -0
  83. package/dist/types/switcher/FkpSwitcher.vue.d.ts +2 -2
  84. package/dist/types-PvYB5e85.js +14 -0
  85. package/package.json +13 -5
  86. package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-DYwu7oQs.js +0 -187
  87. package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-BowbZoTQ.js +0 -4885
  88. package/dist/KnowledgeArea-BH-_uF6R.js +0 -1438
  89. package/dist/ToolForm-C6XW31Y7.js +0 -185
  90. package/dist/index-CS2xQQ8W.js +0 -168
  91. package/dist/index-D0bJAQSN.js +0 -327
  92. package/dist/index-DAZ1ulyA.js +0 -5
  93. package/dist/index-DCmHHi07.js +0 -71
  94. package/dist/index-F7lDP1lI.js +0 -5
@@ -0,0 +1,550 @@
1
+ import { JSONContent } from '@tiptap/core';
2
+ import { MediaTarget } from '../rich-text/runtime/media-target';
3
+ import { MediaSourceOptions } from '../rich-text/runtime/media-sources';
4
+ import { RichTextInsertResult } from '../rich-text/public/types';
5
+ import { AgentPromptCapabilityId, AgentPromptIssue, AgentPromptPolicyV1, AgentPromptValueV1 } from './model';
6
+ import { AgentPromptConfigV1, AgentPromptInsertInput, AgentPromptPorts } from './types';
7
+ type __VLS_Props = {
8
+ promptKey: string;
9
+ modelValue: AgentPromptValueV1;
10
+ ackRevision?: number;
11
+ ports?: AgentPromptPorts;
12
+ policy?: AgentPromptPolicyV1;
13
+ config?: AgentPromptConfigV1;
14
+ /** 图片、视频来源配置;省略时各自仅本地。 */
15
+ mediaSources?: MediaSourceOptions;
16
+ capabilities?: readonly AgentPromptCapabilityId[];
17
+ readonly?: boolean;
18
+ disabled?: boolean;
19
+ placeholder?: string;
20
+ maxLength?: number;
21
+ };
22
+ declare function __VLS_template(): {
23
+ attrs: Partial<{}>;
24
+ slots: {
25
+ 'toolbar-action'?(_: {}): any;
26
+ };
27
+ refs: {
28
+ root: HTMLElement;
29
+ toolbar: HTMLDivElement;
30
+ toolbarLeft: HTMLDivElement;
31
+ fileInput: HTMLInputElement;
32
+ area: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
33
+ modelValue: JSONContent;
34
+ editable: boolean;
35
+ placeholder?: string;
36
+ referencePlaceholder?: boolean;
37
+ schemaPlan: import('../rich-text/runtime/schema-plan').KnowledgeSchemaPlan;
38
+ pasteCapabilities?: readonly import('../rich-text/runtime/knowledge-clipboard').PasteCapability[];
39
+ activeChoiceId?: string | null;
40
+ documentAdapter: import('../rich-text/runtime/document-adapter').DocumentAdapter;
41
+ }> & Readonly<{
42
+ "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
43
+ "onRetry-media"?: ((id: string) => any) | undefined;
44
+ "onLoad-error"?: ((message: string) => any) | undefined;
45
+ "onEdit-tool"?: ((payload: {
46
+ nodeId: string;
47
+ nodeVersion: number;
48
+ key: string;
49
+ label: string;
50
+ params: Record<string, unknown> | null;
51
+ }) => any) | undefined;
52
+ "onChoice-menu"?: ((payload: {
53
+ nodeId: string;
54
+ nodeVersion: number;
55
+ key: string;
56
+ kind: import('../rich-text/plugins/token-catalog').ChoiceTokenKind;
57
+ anchor: HTMLElement;
58
+ }) => any) | undefined;
59
+ "onLeave-choice"?: (() => any) | undefined;
60
+ }>, {
61
+ pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
62
+ isSelectionInsideOriginalReply: () => boolean;
63
+ insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
64
+ upsertToken: (kind: string, key: string, label: string, params: Record<string, unknown>) => boolean;
65
+ insertInlineNode: (type: string, attrs: Record<string, unknown>) => boolean;
66
+ insertText: (text: string, placement?: "lastCaret" | "end", selectInserted?: boolean) => boolean;
67
+ insertOriginal: () => boolean;
68
+ insertSeparator: () => boolean;
69
+ insertBatch: (content: JSONContent[], target: MediaTarget, refocus: boolean) => JSONContent | null;
70
+ restoreDoc: (doc: JSONContent) => void;
71
+ insertMedia: (asset: {
72
+ id?: string;
73
+ url: string;
74
+ kind: "image" | "video";
75
+ posterUrl?: string;
76
+ }, name: string, target: MediaTarget, refocus: boolean) => JSONContent | null;
77
+ insertPendingMedia: (file: File, kind: "image" | "video", target: MediaTarget) => string | null;
78
+ insertPendingMediaBatch: (files: Array<{
79
+ file: File;
80
+ kind: "image" | "video";
81
+ }>, target: MediaTarget) => string[] | null;
82
+ applyNodeUpdate: (plan: Extract<import('../rich-text/runtime/operations').PluginPlan, {
83
+ kind: "updateNode";
84
+ }>, owner: "image" | "video") => boolean;
85
+ applyPluginNodeOperation: (plan: import('../rich-text/runtime/operations').NodeMutationPlan, owner: string) => boolean;
86
+ applyPluginNodeOperations: (plans: readonly import('../rich-text/runtime/operations').NodeMutationPlan[], owner: string) => boolean;
87
+ previewPluginNodeOperations: (plans: readonly import('../rich-text/runtime/operations').NodeMutationPlan[], owner: string) => JSONContent | null;
88
+ failMedia: (id: string, message: string, expectedNodeVersion: number) => boolean;
89
+ completeMedia: (id: string, expectedNodeVersion: number, asset: {
90
+ id?: string;
91
+ url: string;
92
+ kind: "image" | "video";
93
+ posterUrl?: string;
94
+ }) => boolean;
95
+ retryMedia: (id: string, expectedNodeVersion: number) => boolean;
96
+ getMediaState: (id: string) => import('../rich-text/runtime/media-state').MediaNodeState | null;
97
+ reportMediaProgress: (id: string, expectedNodeVersion: number, percent: number) => boolean;
98
+ captureSelection: () => {
99
+ nodeCaret?: {
100
+ id: string;
101
+ kind: "inlineAfter";
102
+ offset: number;
103
+ } | {
104
+ id: string;
105
+ kind: "blockAfter";
106
+ offset: number;
107
+ siblingOffset: number;
108
+ } | undefined;
109
+ from: number;
110
+ to: number;
111
+ focused: boolean;
112
+ } | null;
113
+ restoreSelection: (selection: ReturnType<() => {
114
+ nodeCaret?: {
115
+ id: string;
116
+ kind: "inlineAfter";
117
+ offset: number;
118
+ } | {
119
+ id: string;
120
+ kind: "blockAfter";
121
+ offset: number;
122
+ siblingOffset: number;
123
+ } | undefined;
124
+ from: number;
125
+ to: number;
126
+ focused: boolean;
127
+ } | null>) => void;
128
+ captureMediaTarget: () => MediaTarget | null;
129
+ whenReady: () => Promise<boolean>;
130
+ captureEndTarget: () => MediaTarget | null;
131
+ captureMediaTargetAt: (clientX: number, clientY: number) => MediaTarget | null;
132
+ focus: () => boolean | undefined;
133
+ getJSON: () => import('@tiptap/core').DocumentType<Record<string, any> | undefined, import('@tiptap/core').NodeType<string, Record<string, any> | undefined, any, (import('@tiptap/core').NodeType<any, any, any, any> | import('@tiptap/core').TextType<import('@tiptap/core').MarkType<any, any>>)[]>[]> | undefined;
134
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
135
+ "update:modelValue": (value: JSONContent) => any;
136
+ "retry-media": (id: string) => any;
137
+ "load-error": (message: string) => any;
138
+ "edit-tool": (payload: {
139
+ nodeId: string;
140
+ nodeVersion: number;
141
+ key: string;
142
+ label: string;
143
+ params: Record<string, unknown> | null;
144
+ }) => any;
145
+ "choice-menu": (payload: {
146
+ nodeId: string;
147
+ nodeVersion: number;
148
+ key: string;
149
+ kind: import('../rich-text/plugins/token-catalog').ChoiceTokenKind;
150
+ anchor: HTMLElement;
151
+ }) => any;
152
+ "leave-choice": () => any;
153
+ }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
154
+ areaRoot: HTMLDivElement;
155
+ }, any, import('vue').ComponentProvideOptions, {
156
+ P: {};
157
+ B: {};
158
+ D: {};
159
+ C: {};
160
+ M: {};
161
+ Defaults: {};
162
+ }, Readonly<{
163
+ modelValue: JSONContent;
164
+ editable: boolean;
165
+ placeholder?: string;
166
+ referencePlaceholder?: boolean;
167
+ schemaPlan: import('../rich-text/runtime/schema-plan').KnowledgeSchemaPlan;
168
+ pasteCapabilities?: readonly import('../rich-text/runtime/knowledge-clipboard').PasteCapability[];
169
+ activeChoiceId?: string | null;
170
+ documentAdapter: import('../rich-text/runtime/document-adapter').DocumentAdapter;
171
+ }> & Readonly<{
172
+ "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
173
+ "onRetry-media"?: ((id: string) => any) | undefined;
174
+ "onLoad-error"?: ((message: string) => any) | undefined;
175
+ "onEdit-tool"?: ((payload: {
176
+ nodeId: string;
177
+ nodeVersion: number;
178
+ key: string;
179
+ label: string;
180
+ params: Record<string, unknown> | null;
181
+ }) => any) | undefined;
182
+ "onChoice-menu"?: ((payload: {
183
+ nodeId: string;
184
+ nodeVersion: number;
185
+ key: string;
186
+ kind: import('../rich-text/plugins/token-catalog').ChoiceTokenKind;
187
+ anchor: HTMLElement;
188
+ }) => any) | undefined;
189
+ "onLeave-choice"?: (() => any) | undefined;
190
+ }>, {
191
+ pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
192
+ isSelectionInsideOriginalReply: () => boolean;
193
+ insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
194
+ upsertToken: (kind: string, key: string, label: string, params: Record<string, unknown>) => boolean;
195
+ insertInlineNode: (type: string, attrs: Record<string, unknown>) => boolean;
196
+ insertText: (text: string, placement?: "lastCaret" | "end", selectInserted?: boolean) => boolean;
197
+ insertOriginal: () => boolean;
198
+ insertSeparator: () => boolean;
199
+ insertBatch: (content: JSONContent[], target: MediaTarget, refocus: boolean) => JSONContent | null;
200
+ restoreDoc: (doc: JSONContent) => void;
201
+ insertMedia: (asset: {
202
+ id?: string;
203
+ url: string;
204
+ kind: "image" | "video";
205
+ posterUrl?: string;
206
+ }, name: string, target: MediaTarget, refocus: boolean) => JSONContent | null;
207
+ insertPendingMedia: (file: File, kind: "image" | "video", target: MediaTarget) => string | null;
208
+ insertPendingMediaBatch: (files: Array<{
209
+ file: File;
210
+ kind: "image" | "video";
211
+ }>, target: MediaTarget) => string[] | null;
212
+ applyNodeUpdate: (plan: Extract<import('../rich-text/runtime/operations').PluginPlan, {
213
+ kind: "updateNode";
214
+ }>, owner: "image" | "video") => boolean;
215
+ applyPluginNodeOperation: (plan: import('../rich-text/runtime/operations').NodeMutationPlan, owner: string) => boolean;
216
+ applyPluginNodeOperations: (plans: readonly import('../rich-text/runtime/operations').NodeMutationPlan[], owner: string) => boolean;
217
+ previewPluginNodeOperations: (plans: readonly import('../rich-text/runtime/operations').NodeMutationPlan[], owner: string) => JSONContent | null;
218
+ failMedia: (id: string, message: string, expectedNodeVersion: number) => boolean;
219
+ completeMedia: (id: string, expectedNodeVersion: number, asset: {
220
+ id?: string;
221
+ url: string;
222
+ kind: "image" | "video";
223
+ posterUrl?: string;
224
+ }) => boolean;
225
+ retryMedia: (id: string, expectedNodeVersion: number) => boolean;
226
+ getMediaState: (id: string) => import('../rich-text/runtime/media-state').MediaNodeState | null;
227
+ reportMediaProgress: (id: string, expectedNodeVersion: number, percent: number) => boolean;
228
+ captureSelection: () => {
229
+ nodeCaret?: {
230
+ id: string;
231
+ kind: "inlineAfter";
232
+ offset: number;
233
+ } | {
234
+ id: string;
235
+ kind: "blockAfter";
236
+ offset: number;
237
+ siblingOffset: number;
238
+ } | undefined;
239
+ from: number;
240
+ to: number;
241
+ focused: boolean;
242
+ } | null;
243
+ restoreSelection: (selection: ReturnType<() => {
244
+ nodeCaret?: {
245
+ id: string;
246
+ kind: "inlineAfter";
247
+ offset: number;
248
+ } | {
249
+ id: string;
250
+ kind: "blockAfter";
251
+ offset: number;
252
+ siblingOffset: number;
253
+ } | undefined;
254
+ from: number;
255
+ to: number;
256
+ focused: boolean;
257
+ } | null>) => void;
258
+ captureMediaTarget: () => MediaTarget | null;
259
+ whenReady: () => Promise<boolean>;
260
+ captureEndTarget: () => MediaTarget | null;
261
+ captureMediaTargetAt: (clientX: number, clientY: number) => MediaTarget | null;
262
+ focus: () => boolean | undefined;
263
+ getJSON: () => import('@tiptap/core').DocumentType<Record<string, any> | undefined, import('@tiptap/core').NodeType<string, Record<string, any> | undefined, any, (import('@tiptap/core').NodeType<any, any, any, any> | import('@tiptap/core').TextType<import('@tiptap/core').MarkType<any, any>>)[]>[]> | undefined;
264
+ }, {}, {}, {}, {}> | null;
265
+ };
266
+ rootEl: HTMLElement;
267
+ };
268
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
269
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
270
+ insertContent(input: AgentPromptInsertInput): Promise<RichTextInsertResult>;
271
+ focus(): void;
272
+ validate(): AgentPromptIssue[];
273
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
274
+ "update:modelValue": (value: AgentPromptValueV1) => any;
275
+ change: (value: AgentPromptValueV1, meta: {
276
+ promptKey: string;
277
+ revision: number;
278
+ origin: "user" | "api" | "plugin";
279
+ capabilityId?: AgentPromptCapabilityId;
280
+ }) => any;
281
+ diagnostic: (issue: AgentPromptIssue) => any;
282
+ "busy-change": (busy: {
283
+ uploading: number;
284
+ requesting: number;
285
+ }) => any;
286
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
287
+ "onUpdate:modelValue"?: ((value: AgentPromptValueV1) => any) | undefined;
288
+ onChange?: ((value: AgentPromptValueV1, meta: {
289
+ promptKey: string;
290
+ revision: number;
291
+ origin: "user" | "api" | "plugin";
292
+ capabilityId?: AgentPromptCapabilityId;
293
+ }) => any) | undefined;
294
+ onDiagnostic?: ((issue: AgentPromptIssue) => any) | undefined;
295
+ "onBusy-change"?: ((busy: {
296
+ uploading: number;
297
+ requesting: number;
298
+ }) => any) | undefined;
299
+ }>, {
300
+ readonly: boolean;
301
+ disabled: boolean;
302
+ ackRevision: number;
303
+ placeholder: string;
304
+ maxLength: number;
305
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
306
+ root: HTMLElement;
307
+ toolbar: HTMLDivElement;
308
+ toolbarLeft: HTMLDivElement;
309
+ fileInput: HTMLInputElement;
310
+ area: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
311
+ modelValue: JSONContent;
312
+ editable: boolean;
313
+ placeholder?: string;
314
+ referencePlaceholder?: boolean;
315
+ schemaPlan: import('../rich-text/runtime/schema-plan').KnowledgeSchemaPlan;
316
+ pasteCapabilities?: readonly import('../rich-text/runtime/knowledge-clipboard').PasteCapability[];
317
+ activeChoiceId?: string | null;
318
+ documentAdapter: import('../rich-text/runtime/document-adapter').DocumentAdapter;
319
+ }> & Readonly<{
320
+ "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
321
+ "onRetry-media"?: ((id: string) => any) | undefined;
322
+ "onLoad-error"?: ((message: string) => any) | undefined;
323
+ "onEdit-tool"?: ((payload: {
324
+ nodeId: string;
325
+ nodeVersion: number;
326
+ key: string;
327
+ label: string;
328
+ params: Record<string, unknown> | null;
329
+ }) => any) | undefined;
330
+ "onChoice-menu"?: ((payload: {
331
+ nodeId: string;
332
+ nodeVersion: number;
333
+ key: string;
334
+ kind: import('../rich-text/plugins/token-catalog').ChoiceTokenKind;
335
+ anchor: HTMLElement;
336
+ }) => any) | undefined;
337
+ "onLeave-choice"?: (() => any) | undefined;
338
+ }>, {
339
+ pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
340
+ isSelectionInsideOriginalReply: () => boolean;
341
+ insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
342
+ upsertToken: (kind: string, key: string, label: string, params: Record<string, unknown>) => boolean;
343
+ insertInlineNode: (type: string, attrs: Record<string, unknown>) => boolean;
344
+ insertText: (text: string, placement?: "lastCaret" | "end", selectInserted?: boolean) => boolean;
345
+ insertOriginal: () => boolean;
346
+ insertSeparator: () => boolean;
347
+ insertBatch: (content: JSONContent[], target: MediaTarget, refocus: boolean) => JSONContent | null;
348
+ restoreDoc: (doc: JSONContent) => void;
349
+ insertMedia: (asset: {
350
+ id?: string;
351
+ url: string;
352
+ kind: "image" | "video";
353
+ posterUrl?: string;
354
+ }, name: string, target: MediaTarget, refocus: boolean) => JSONContent | null;
355
+ insertPendingMedia: (file: File, kind: "image" | "video", target: MediaTarget) => string | null;
356
+ insertPendingMediaBatch: (files: Array<{
357
+ file: File;
358
+ kind: "image" | "video";
359
+ }>, target: MediaTarget) => string[] | null;
360
+ applyNodeUpdate: (plan: Extract<import('../rich-text/runtime/operations').PluginPlan, {
361
+ kind: "updateNode";
362
+ }>, owner: "image" | "video") => boolean;
363
+ applyPluginNodeOperation: (plan: import('../rich-text/runtime/operations').NodeMutationPlan, owner: string) => boolean;
364
+ applyPluginNodeOperations: (plans: readonly import('../rich-text/runtime/operations').NodeMutationPlan[], owner: string) => boolean;
365
+ previewPluginNodeOperations: (plans: readonly import('../rich-text/runtime/operations').NodeMutationPlan[], owner: string) => JSONContent | null;
366
+ failMedia: (id: string, message: string, expectedNodeVersion: number) => boolean;
367
+ completeMedia: (id: string, expectedNodeVersion: number, asset: {
368
+ id?: string;
369
+ url: string;
370
+ kind: "image" | "video";
371
+ posterUrl?: string;
372
+ }) => boolean;
373
+ retryMedia: (id: string, expectedNodeVersion: number) => boolean;
374
+ getMediaState: (id: string) => import('../rich-text/runtime/media-state').MediaNodeState | null;
375
+ reportMediaProgress: (id: string, expectedNodeVersion: number, percent: number) => boolean;
376
+ captureSelection: () => {
377
+ nodeCaret?: {
378
+ id: string;
379
+ kind: "inlineAfter";
380
+ offset: number;
381
+ } | {
382
+ id: string;
383
+ kind: "blockAfter";
384
+ offset: number;
385
+ siblingOffset: number;
386
+ } | undefined;
387
+ from: number;
388
+ to: number;
389
+ focused: boolean;
390
+ } | null;
391
+ restoreSelection: (selection: ReturnType<() => {
392
+ nodeCaret?: {
393
+ id: string;
394
+ kind: "inlineAfter";
395
+ offset: number;
396
+ } | {
397
+ id: string;
398
+ kind: "blockAfter";
399
+ offset: number;
400
+ siblingOffset: number;
401
+ } | undefined;
402
+ from: number;
403
+ to: number;
404
+ focused: boolean;
405
+ } | null>) => void;
406
+ captureMediaTarget: () => MediaTarget | null;
407
+ whenReady: () => Promise<boolean>;
408
+ captureEndTarget: () => MediaTarget | null;
409
+ captureMediaTargetAt: (clientX: number, clientY: number) => MediaTarget | null;
410
+ focus: () => boolean | undefined;
411
+ getJSON: () => import('@tiptap/core').DocumentType<Record<string, any> | undefined, import('@tiptap/core').NodeType<string, Record<string, any> | undefined, any, (import('@tiptap/core').NodeType<any, any, any, any> | import('@tiptap/core').TextType<import('@tiptap/core').MarkType<any, any>>)[]>[]> | undefined;
412
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
413
+ "update:modelValue": (value: JSONContent) => any;
414
+ "retry-media": (id: string) => any;
415
+ "load-error": (message: string) => any;
416
+ "edit-tool": (payload: {
417
+ nodeId: string;
418
+ nodeVersion: number;
419
+ key: string;
420
+ label: string;
421
+ params: Record<string, unknown> | null;
422
+ }) => any;
423
+ "choice-menu": (payload: {
424
+ nodeId: string;
425
+ nodeVersion: number;
426
+ key: string;
427
+ kind: import('../rich-text/plugins/token-catalog').ChoiceTokenKind;
428
+ anchor: HTMLElement;
429
+ }) => any;
430
+ "leave-choice": () => any;
431
+ }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
432
+ areaRoot: HTMLDivElement;
433
+ }, any, import('vue').ComponentProvideOptions, {
434
+ P: {};
435
+ B: {};
436
+ D: {};
437
+ C: {};
438
+ M: {};
439
+ Defaults: {};
440
+ }, Readonly<{
441
+ modelValue: JSONContent;
442
+ editable: boolean;
443
+ placeholder?: string;
444
+ referencePlaceholder?: boolean;
445
+ schemaPlan: import('../rich-text/runtime/schema-plan').KnowledgeSchemaPlan;
446
+ pasteCapabilities?: readonly import('../rich-text/runtime/knowledge-clipboard').PasteCapability[];
447
+ activeChoiceId?: string | null;
448
+ documentAdapter: import('../rich-text/runtime/document-adapter').DocumentAdapter;
449
+ }> & Readonly<{
450
+ "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
451
+ "onRetry-media"?: ((id: string) => any) | undefined;
452
+ "onLoad-error"?: ((message: string) => any) | undefined;
453
+ "onEdit-tool"?: ((payload: {
454
+ nodeId: string;
455
+ nodeVersion: number;
456
+ key: string;
457
+ label: string;
458
+ params: Record<string, unknown> | null;
459
+ }) => any) | undefined;
460
+ "onChoice-menu"?: ((payload: {
461
+ nodeId: string;
462
+ nodeVersion: number;
463
+ key: string;
464
+ kind: import('../rich-text/plugins/token-catalog').ChoiceTokenKind;
465
+ anchor: HTMLElement;
466
+ }) => any) | undefined;
467
+ "onLeave-choice"?: (() => any) | undefined;
468
+ }>, {
469
+ pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
470
+ isSelectionInsideOriginalReply: () => boolean;
471
+ insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
472
+ upsertToken: (kind: string, key: string, label: string, params: Record<string, unknown>) => boolean;
473
+ insertInlineNode: (type: string, attrs: Record<string, unknown>) => boolean;
474
+ insertText: (text: string, placement?: "lastCaret" | "end", selectInserted?: boolean) => boolean;
475
+ insertOriginal: () => boolean;
476
+ insertSeparator: () => boolean;
477
+ insertBatch: (content: JSONContent[], target: MediaTarget, refocus: boolean) => JSONContent | null;
478
+ restoreDoc: (doc: JSONContent) => void;
479
+ insertMedia: (asset: {
480
+ id?: string;
481
+ url: string;
482
+ kind: "image" | "video";
483
+ posterUrl?: string;
484
+ }, name: string, target: MediaTarget, refocus: boolean) => JSONContent | null;
485
+ insertPendingMedia: (file: File, kind: "image" | "video", target: MediaTarget) => string | null;
486
+ insertPendingMediaBatch: (files: Array<{
487
+ file: File;
488
+ kind: "image" | "video";
489
+ }>, target: MediaTarget) => string[] | null;
490
+ applyNodeUpdate: (plan: Extract<import('../rich-text/runtime/operations').PluginPlan, {
491
+ kind: "updateNode";
492
+ }>, owner: "image" | "video") => boolean;
493
+ applyPluginNodeOperation: (plan: import('../rich-text/runtime/operations').NodeMutationPlan, owner: string) => boolean;
494
+ applyPluginNodeOperations: (plans: readonly import('../rich-text/runtime/operations').NodeMutationPlan[], owner: string) => boolean;
495
+ previewPluginNodeOperations: (plans: readonly import('../rich-text/runtime/operations').NodeMutationPlan[], owner: string) => JSONContent | null;
496
+ failMedia: (id: string, message: string, expectedNodeVersion: number) => boolean;
497
+ completeMedia: (id: string, expectedNodeVersion: number, asset: {
498
+ id?: string;
499
+ url: string;
500
+ kind: "image" | "video";
501
+ posterUrl?: string;
502
+ }) => boolean;
503
+ retryMedia: (id: string, expectedNodeVersion: number) => boolean;
504
+ getMediaState: (id: string) => import('../rich-text/runtime/media-state').MediaNodeState | null;
505
+ reportMediaProgress: (id: string, expectedNodeVersion: number, percent: number) => boolean;
506
+ captureSelection: () => {
507
+ nodeCaret?: {
508
+ id: string;
509
+ kind: "inlineAfter";
510
+ offset: number;
511
+ } | {
512
+ id: string;
513
+ kind: "blockAfter";
514
+ offset: number;
515
+ siblingOffset: number;
516
+ } | undefined;
517
+ from: number;
518
+ to: number;
519
+ focused: boolean;
520
+ } | null;
521
+ restoreSelection: (selection: ReturnType<() => {
522
+ nodeCaret?: {
523
+ id: string;
524
+ kind: "inlineAfter";
525
+ offset: number;
526
+ } | {
527
+ id: string;
528
+ kind: "blockAfter";
529
+ offset: number;
530
+ siblingOffset: number;
531
+ } | undefined;
532
+ from: number;
533
+ to: number;
534
+ focused: boolean;
535
+ } | null>) => void;
536
+ captureMediaTarget: () => MediaTarget | null;
537
+ whenReady: () => Promise<boolean>;
538
+ captureEndTarget: () => MediaTarget | null;
539
+ captureMediaTargetAt: (clientX: number, clientY: number) => MediaTarget | null;
540
+ focus: () => boolean | undefined;
541
+ getJSON: () => import('@tiptap/core').DocumentType<Record<string, any> | undefined, import('@tiptap/core').NodeType<string, Record<string, any> | undefined, any, (import('@tiptap/core').NodeType<any, any, any, any> | import('@tiptap/core').TextType<import('@tiptap/core').MarkType<any, any>>)[]>[]> | undefined;
542
+ }, {}, {}, {}, {}> | null;
543
+ }, HTMLElement>;
544
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
545
+ export default _default;
546
+ type __VLS_WithTemplateSlots<T, S> = T & {
547
+ new (): {
548
+ $slots: S;
549
+ };
550
+ };
@@ -0,0 +1,3 @@
1
+ import { Node } from '@tiptap/core';
2
+ /** Agent prompt only. Knowledge scenes deliberately do not install this node. */
3
+ export declare const AgentSizeChart: Node<any, any>;
@@ -0,0 +1,3 @@
1
+ import { DocumentAdapter } from '../rich-text/runtime/document-adapter';
2
+ /** Agent-only node and clipboard rules; the shared document editor stays scene-neutral. */
3
+ export declare function createAgentDocumentAdapter(canPasteSizeChart: () => boolean): DocumentAdapter;
@@ -0,0 +1,6 @@
1
+ export { default } from './FkpAgentPromptEditor.vue';
2
+ export { default as FkpAgentPromptEditor } from './FkpAgentPromptEditor.vue';
3
+ export type { MediaSource, MediaSourceOptions } from './types';
4
+ export { emptyAgentPrompt, validateAgentPrompt } from './model';
5
+ export type { AgentPromptValueV1, AgentPromptCapabilityId, AgentPromptPolicyV1, AgentPromptIssue, } from './model';
6
+ export type { AgentPromptConfigV1, AgentPromptCapabilityRuleV1, AgentPromptPorts, AgentPromptPortContext, AgentPromptInsertInput, AgentPromptEditorHandle, } from './types';
@@ -0,0 +1,2 @@
1
+ export { importLegacyAgentPrompt, exportLegacyAgentPrompt, } from './legacy-converter';
2
+ export type { LegacyAgentPromptFields, PromptImportResult, PromptExportResult, } from './legacy-converter';
@@ -0,0 +1,26 @@
1
+ import { AgentPromptIssue, AgentPromptValueV1 } from './model';
2
+ export interface LegacyAgentPromptFields {
3
+ clues: string;
4
+ webClues: string;
5
+ }
6
+ export type PromptImportResult = {
7
+ ok: true;
8
+ value: AgentPromptValueV1;
9
+ warnings: AgentPromptIssue[];
10
+ } | {
11
+ ok: false;
12
+ raw: LegacyAgentPromptFields;
13
+ issues: AgentPromptIssue[];
14
+ };
15
+ export type PromptExportResult = {
16
+ ok: true;
17
+ clues: string;
18
+ webClues: string;
19
+ } | {
20
+ ok: false;
21
+ issues: AgentPromptIssue[];
22
+ };
23
+ /** A strict, browser-side reader. Unrecognized business spans keep the old record editable only in the old editor. */
24
+ export declare function importLegacyAgentPrompt(raw: LegacyAgentPromptFields): PromptImportResult;
25
+ /** Export the CSR pair from one validated document; never return a partial pair. */
26
+ export declare function exportLegacyAgentPrompt(value: AgentPromptValueV1, maxLength?: number): PromptExportResult;
@@ -0,0 +1,21 @@
1
+ import { JSONContent } from '@tiptap/core';
2
+ import { EditorDiagnostic } from '../rich-text/public/types';
3
+ export interface AgentPromptValueV1 {
4
+ schemaVersion: 1;
5
+ doc: JSONContent;
6
+ }
7
+ export type AgentPromptCapabilityId = 'variable' | 'todo' | 'tableKnowledge' | 'sizeChart' | 'attribute' | 'image' | 'video' | 'originalReply' | 'separator' | 'smallPayment';
8
+ export declare const agentPromptCapabilities: readonly AgentPromptCapabilityId[];
9
+ export interface AgentPromptPolicyV1 {
10
+ revision: string;
11
+ expiresAt: number;
12
+ allowed: AgentPromptCapabilityId[];
13
+ }
14
+ export type AgentPromptIssue = EditorDiagnostic & {
15
+ path: string;
16
+ };
17
+ export declare const emptyAgentPrompt: () => AgentPromptValueV1;
18
+ export declare function findUnsupportedAgentPrompt(value: unknown): string | null;
19
+ /** Count visible prompt text and legacy marker text with the same rule as validation. */
20
+ export declare function countAgentPromptCharacters(value: AgentPromptValueV1): number;
21
+ export declare function validateAgentPrompt(value: AgentPromptValueV1, maxLength?: number): AgentPromptIssue[];