@freecallai/pro 0.0.3 → 0.0.5

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 (95) 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-bw74hFS9.js +4980 -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-DA-EFBhw.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-Bt2xhoN_.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-B7U3S4F1.js → guard-Cr_ny-sR.js} +255 -237
  14. package/dist/index-7x1OTv0m.js +98 -0
  15. package/dist/{index-BF6MRSMb.js → index-BBxrpF3v.js} +1 -1
  16. package/dist/{index-sjDmbR5o.js → index-CgRisH4B.js} +1 -1
  17. package/dist/index-Ck8RYpuE.js +816 -0
  18. package/dist/index-CnjG7Mj4.js +5 -0
  19. package/dist/{index-lNhA3N9x.js → index-DBQsQ1ZK.js} +1 -0
  20. package/dist/index-DCZKt14c.js +5 -0
  21. package/dist/{index-D9yqpH_4.js → index-DiaPY8Db.js} +2 -2
  22. package/dist/{index-trxE5T0w.js → index-DmdrsEvk.js} +1 -1
  23. package/dist/index-DnmCPdCI.js +168 -0
  24. package/dist/{index-B4-2_sJI.js → index-DwDYy2lj.js} +1 -1
  25. package/dist/{index-BBv72oZe.js → index-FQQfN6nm.js} +1 -1
  26. package/dist/{index-DYeJRJY1.js → index-aic1yCBs.js} +1 -1
  27. package/dist/index.js +13 -13
  28. package/dist/{inline-KPGqYMIR.js → inline-8aNfINLF.js} +1 -1
  29. package/dist/knowledge-type-picker/index.js +1 -1
  30. package/dist/{knowledge-CupkY2rK.js → knowledge-y2j0ijgx.js} +1 -1
  31. package/dist/{media-extensions-DhRlLKYM.js → media-extensions-wlcCEdtg.js} +27 -24
  32. package/dist/media-id-b2dgniSy.js +15 -0
  33. package/dist/{media-migration-CbMT2wS0.js → media-migration-Dy_rbdkK.js} +1 -1
  34. package/dist/media-policy-BwKjZPWt.js +158 -0
  35. package/dist/{media-upload-P9WeUHHr.js → media-upload-NzWYyCm3.js} +1 -1
  36. package/dist/model-DvukseoR.js +146 -0
  37. package/dist/navigation/index.js +1 -1
  38. package/dist/rich-text/index.js +75 -73
  39. package/dist/rich-text/legacy-converter/index.js +988 -867
  40. package/dist/style.css +1 -1
  41. package/dist/switcher/index.js +1 -1
  42. package/dist/types/agent-prompt-editor/FkpAgentPromptEditor.vue.d.ts +550 -0
  43. package/dist/types/agent-prompt-editor/agent-size-chart.d.ts +3 -0
  44. package/dist/types/agent-prompt-editor/document-adapter.d.ts +3 -0
  45. package/dist/types/agent-prompt-editor/index.d.ts +6 -0
  46. package/dist/types/agent-prompt-editor/legacy-converter-index.d.ts +2 -0
  47. package/dist/types/agent-prompt-editor/legacy-converter.d.ts +26 -0
  48. package/dist/types/agent-prompt-editor/model.d.ts +21 -0
  49. package/dist/types/agent-prompt-editor/types.d.ts +56 -0
  50. package/dist/types/edition-info/FkpEditionInfo.vue.d.ts +1 -3
  51. package/dist/types/edition-info/presets.d.ts +8 -0
  52. package/dist/types/edition-info/types.d.ts +1 -0
  53. package/dist/types/filters/FkpFilter.vue.d.ts +2 -2
  54. package/dist/types/filters/FkpFilterDateRange.vue.d.ts +2 -2
  55. package/dist/types/filters/FkpFilterPeriod.vue.d.ts +2 -2
  56. package/dist/types/filters/FkpSearchableMultiSelect.vue.d.ts +2 -2
  57. package/dist/types/index.d.ts +4 -1
  58. package/dist/types/navigation/FkpNavigation.vue.d.ts +20 -29
  59. package/dist/types/navigation/NavigationButton.vue.d.ts +26 -0
  60. package/dist/types/navigation/NavigationGroup.vue.d.ts +45 -0
  61. package/dist/types/navigation/NavigationIcon.vue.d.ts +28 -0
  62. package/dist/types/navigation/NavigationNodes.vue.d.ts +40 -0
  63. package/dist/types/navigation/index.d.ts +1 -1
  64. package/dist/types/navigation/types.d.ts +43 -5
  65. package/dist/types/navigation/use-navigation-tree.d.ts +13 -0
  66. package/dist/types/rich-text/FkpRichText.vue.d.ts +28 -8
  67. package/dist/types/rich-text/config/descriptor.d.ts +1 -0
  68. package/dist/types/rich-text/config/resolve.d.ts +1 -1
  69. package/dist/types/rich-text/index.d.ts +4 -1
  70. package/dist/types/rich-text/knowledge-document-adapter.d.ts +2 -0
  71. package/dist/types/rich-text/model/question-text.d.ts +1 -1
  72. package/dist/types/rich-text/plugins/registry.d.ts +2 -1
  73. package/dist/types/rich-text/public/types.d.ts +12 -0
  74. package/dist/types/rich-text/runtime/document-adapter.d.ts +9 -0
  75. package/dist/types/rich-text/runtime/knowledge-clipboard.d.ts +9 -3
  76. package/dist/types/rich-text/runtime/media-sources.d.ts +7 -0
  77. package/dist/types/rich-text/runtime/media-upload-session.d.ts +2 -0
  78. package/dist/types/rich-text/ui/FkpKnowledgeTypePicker.vue.d.ts +3 -3
  79. package/dist/types/rich-text/ui/KnowledgeArea.vue.d.ts +18 -3
  80. package/dist/types/rich-text/ui/MediaSourceControls.vue.d.ts +190 -0
  81. package/dist/types/rich-text/ui/ToolForm.vue.d.ts +2 -2
  82. package/dist/types/rich-text/ui/token-renderer.d.ts +3 -0
  83. package/dist/types/rich-text/ui/useMediaHint.d.ts +6 -0
  84. package/dist/types/switcher/FkpSwitcher.vue.d.ts +2 -2
  85. package/dist/types-PvYB5e85.js +14 -0
  86. package/package.json +13 -5
  87. package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-xR8ZhhdJ.js +0 -187
  88. package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-CaHRIHab.js +0 -4864
  89. package/dist/KnowledgeArea-_rsydhnt.js +0 -1438
  90. package/dist/ToolForm-Czg67cDT.js +0 -185
  91. package/dist/index-BQrYBmwR.js +0 -5
  92. package/dist/index-CS2xQQ8W.js +0 -168
  93. package/dist/index-D0bJAQSN.js +0 -327
  94. package/dist/index-DCmHHi07.js +0 -71
  95. package/dist/index-uCVrA6xK.js +0 -5
@@ -0,0 +1,56 @@
1
+ import { CapabilityOption, MediaAsset, Page, PortResult, RichTextInsertOption, RichTextInsertResult, VariableOption } from '../rich-text/public/types';
2
+ import { AgentPromptCapabilityId, AgentPromptIssue } from './model';
3
+ export interface AgentPromptCapabilityRuleV1 {
4
+ /** 已安装的提示词能力。 */
5
+ id: AgentPromptCapabilityId;
6
+ /** 是否显示工具栏入口;省略时默认显示,不影响程序化插入和已有内容。 */
7
+ visible?: boolean;
8
+ }
9
+ export interface AgentPromptConfigV1 {
10
+ schemaVersion: 1;
11
+ rules: AgentPromptCapabilityRuleV1[];
12
+ }
13
+ export type { MediaSource, MediaSourceOptions, } from '../rich-text/runtime/media-sources';
14
+ export interface AgentPromptPortContext {
15
+ promptKey: string;
16
+ capabilityId: AgentPromptCapabilityId;
17
+ requestId: string;
18
+ signal: AbortSignal;
19
+ reportProgress?: (percent: number) => void;
20
+ }
21
+ export interface AgentPromptPorts {
22
+ uploadMedia?: (input: {
23
+ file: File;
24
+ kind: 'image' | 'video';
25
+ }, context: AgentPromptPortContext) => Promise<PortResult<MediaAsset>>;
26
+ listVariables?: (query: {
27
+ search?: string;
28
+ cursor?: string;
29
+ limit: number;
30
+ }, context: AgentPromptPortContext) => Promise<PortResult<Page<VariableOption>>>;
31
+ listCapabilityOptions?: (query: {
32
+ capabilityId: AgentPromptCapabilityId;
33
+ search?: string;
34
+ cursor?: string;
35
+ limit: number;
36
+ }, context: AgentPromptPortContext) => Promise<PortResult<Page<CapabilityOption>>>;
37
+ }
38
+ export type AgentPromptInsertInput = {
39
+ type: 'text';
40
+ text: string;
41
+ placement?: 'lastCaret' | 'end';
42
+ selectInserted?: boolean;
43
+ } | {
44
+ type: 'media';
45
+ asset: MediaAsset;
46
+ name?: string;
47
+ } | {
48
+ type: 'capability';
49
+ capabilityId: AgentPromptCapabilityId;
50
+ option?: RichTextInsertOption;
51
+ };
52
+ export interface AgentPromptEditorHandle {
53
+ insertContent(input: AgentPromptInsertInput): Promise<RichTextInsertResult>;
54
+ focus(): void;
55
+ validate(): AgentPromptIssue[];
56
+ }
@@ -1,5 +1,3 @@
1
1
  import { EditionInfo } from './types';
2
- declare const _default: import('vue').DefineComponent<EditionInfo, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EditionInfo> & Readonly<{}>, {
3
- badgeLabel: string;
4
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
2
+ declare const _default: import('vue').DefineComponent<EditionInfo, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EditionInfo> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
5
3
  export default _default;
@@ -0,0 +1,8 @@
1
+ import { default as standardConnector } from './assets/description-connector-standard.png?url';
2
+ import { default as customConnector } from './assets/description-connector-custom.png?url';
3
+ interface EditionBadgePreset {
4
+ readonly url: string;
5
+ readonly width: number;
6
+ }
7
+ export { standardConnector, customConnector };
8
+ export declare const editionBadges: Readonly<Partial<Record<number, EditionBadgePreset>>>;
@@ -1,4 +1,5 @@
1
1
  export interface EditionInfo {
2
+ level?: number | string | null;
2
3
  description: string;
3
4
  badgeUrl?: string;
4
5
  badgeLabel?: string;
@@ -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
- change: (value: FilterModelValue) => any;
11
10
  "update:modelValue": (value: FilterModelValue) => any;
11
+ change: (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
- onChange?: ((value: FilterModelValue) => any) | undefined;
17
16
  "onUpdate:modelValue"?: ((value: FilterModelValue) => any) | undefined;
17
+ onChange?: ((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
- change: (value: string[]) => any;
8
7
  "update:modelValue": (value: string[]) => any;
8
+ change: (value: string[]) => any;
9
9
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- onChange?: ((value: string[]) => any) | undefined;
11
10
  "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
11
+ onChange?: ((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
- change: (value: string | number) => any;
12
11
  "update:modelValue": (value: string | number) => any;
12
+ change: (value: string | number) => any;
13
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- onChange?: ((value: string | number) => any) | undefined;
15
14
  "onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
15
+ onChange?: ((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
- change: (value: FilterValue[]) => any;
26
25
  "update:modelValue": (value: FilterValue[]) => any;
26
+ change: (value: FilterValue[]) => any;
27
27
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
28
- onChange?: ((value: FilterValue[]) => any) | undefined;
29
28
  "onUpdate:modelValue"?: ((value: FilterValue[]) => any) | undefined;
29
+ onChange?: ((value: FilterValue[]) => any) | undefined;
30
30
  }>, {
31
31
  modelValue: FilterValue[];
32
32
  placeholder: string;
@@ -6,8 +6,11 @@ export * from './navigation';
6
6
  export { default as FkpRichText } from './rich-text';
7
7
  export { default as FkpKnowledgeTypePicker } from './knowledge-type-picker';
8
8
  export type { FkpKnowledgeTypePickerProps } from './knowledge-type-picker';
9
+ export type { MediaSource, MediaSourceOptions, } from './rich-text/runtime/media-sources';
9
10
  export type { KnowledgeMode } from './rich-text/types';
10
- export type { FkpRichTextProps, FkpRichTextHandle, RichTextInsertInput, RichTextInsertOption, RichTextInsertResult, KnowledgeSceneV1, KnowledgeConditionV1, LoadedConditionV1, SaveConditionInputV1, SavedConditionV1, KnowledgePersistenceAdapterV1, KnowledgeType, AddKnowledgeSceneRequest, 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';
11
+ export type { FkpRichTextProps, CapabilityModuleLoader, FkpRichTextHandle, RichTextInsertInput, RichTextInsertOption, RichTextInsertResult, KnowledgeSceneV1, KnowledgeConditionV1, LoadedConditionV1, SaveConditionInputV1, SavedConditionV1, KnowledgePersistenceAdapterV1, KnowledgeType, AddKnowledgeSceneRequest, 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
+ export type { CapabilityDescriptor } from './rich-text/config/descriptor';
13
+ export type { CapabilityModule, PluginInput, PluginOperation, PluginActionContext, } from './rich-text/plugins/operations';
11
14
  export { emptyScene, resolveSceneConfig } from './rich-text';
12
15
  export { serializeQuestionForModel, serializeQuestionTagsForModel, } from './rich-text';
13
16
  declare const _default: {
@@ -1,47 +1,38 @@
1
- import { ProNavItem, ProNavGroup } from './types';
1
+ import { ProNavSection, ProNavPanelChange, ProNavSlots } from './types';
2
2
  type __VLS_Props = {
3
- products: ProNavItem[];
4
- groups?: ProNavGroup[];
5
- productOrder?: string[];
3
+ sections: readonly ProNavSection[];
6
4
  selectedKey?: string;
5
+ expandedKeys?: readonly string[];
7
6
  collapsed?: boolean;
7
+ showSectionTitles?: boolean;
8
+ reordering?: boolean;
9
+ ariaLabel?: string;
8
10
  };
9
11
  declare function __VLS_template(): {
10
12
  attrs: Partial<{}>;
11
- slots: {
12
- 'product-icon'?(_: {
13
- item: any;
14
- }): any;
15
- 'product-icon'?(_: {
16
- item: ProNavItem;
17
- }): any;
18
- 'product-icon'?(_: {
19
- item: ProNavItem;
20
- }): any;
21
- };
22
- refs: {
23
- editButton: HTMLButtonElement;
24
- };
13
+ slots: Readonly<ProNavSlots> & ProNavSlots;
14
+ refs: {};
25
15
  rootEl: HTMLElement;
26
16
  };
27
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
28
18
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
- open: (key: string, item: ProNavItem) => any;
19
+ open: (key: string, item: import('./types').ProNavItem) => any;
30
20
  select: (key: string) => any;
31
- "update:productOrder": (order: string[]) => any;
32
- orderChange: (order: string[]) => any;
21
+ "update:expandedKeys": (keys: string[]) => any;
22
+ reorder: (payload: import('./types').ProNavReorder) => any;
23
+ "panel-open": (payload: ProNavPanelChange) => any;
33
24
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
34
- onOpen?: ((key: string, item: ProNavItem) => any) | undefined;
25
+ onOpen?: ((key: string, item: import('./types').ProNavItem) => any) | undefined;
35
26
  onSelect?: ((key: string) => any) | undefined;
36
- "onUpdate:productOrder"?: ((order: string[]) => any) | undefined;
37
- onOrderChange?: ((order: string[]) => any) | undefined;
27
+ "onUpdate:expandedKeys"?: ((keys: string[]) => any) | undefined;
28
+ onReorder?: ((payload: import('./types').ProNavReorder) => any) | undefined;
29
+ "onPanel-open"?: ((payload: ProNavPanelChange) => any) | undefined;
38
30
  }>, {
39
- groups: ProNavGroup[];
40
- productOrder: string[];
41
31
  collapsed: boolean;
42
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
43
- editButton: HTMLButtonElement;
44
- }, HTMLElement>;
32
+ showSectionTitles: boolean;
33
+ reordering: boolean;
34
+ ariaLabel: string;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
45
36
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
46
37
  export default _default;
47
38
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -0,0 +1,26 @@
1
+ import { ProNavItem, ProNavSection, ProNavSlots } from './types';
2
+ type __VLS_Props = {
3
+ item: ProNavItem;
4
+ section: ProNavSection;
5
+ selectedKey?: string;
6
+ collapsed?: boolean;
7
+ };
8
+ declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
10
+ slots: Readonly<ProNavSlots> & ProNavSlots;
11
+ refs: {};
12
+ rootEl: HTMLButtonElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ select: (key: string) => any;
17
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onSelect?: ((key: string) => any) | undefined;
19
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,45 @@
1
+ import { ProNavItem, ProNavSection, ProNavSlots } from './types';
2
+ type __VLS_Props = {
3
+ item: ProNavItem;
4
+ section: ProNavSection;
5
+ level: number;
6
+ selectedKey?: string;
7
+ expandedKeys: readonly string[];
8
+ collapsed?: boolean;
9
+ inPopup?: boolean;
10
+ disabled?: boolean;
11
+ panelVisible?: boolean;
12
+ activeGroupKey?: string;
13
+ };
14
+ declare function __VLS_template(): {
15
+ attrs: Partial<{}>;
16
+ slots: Readonly<ProNavSlots> & ProNavSlots;
17
+ refs: {
18
+ triggerButton: HTMLButtonElement;
19
+ popupContent: HTMLDivElement;
20
+ };
21
+ rootEl: any;
22
+ };
23
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
24
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
+ select: (key: string) => any;
26
+ "group-open": () => any;
27
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
28
+ onSelect?: ((key: string) => any) | undefined;
29
+ "onGroup-open"?: (() => any) | undefined;
30
+ }>, {
31
+ disabled: boolean;
32
+ panelVisible: boolean;
33
+ collapsed: boolean;
34
+ inPopup: boolean;
35
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
36
+ triggerButton: HTMLButtonElement;
37
+ popupContent: HTMLDivElement;
38
+ }, any>;
39
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
40
+ export default _default;
41
+ type __VLS_WithTemplateSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,28 @@
1
+ import { FkpIconName } from '@freecallai/icons';
2
+ import { VNode } from 'vue';
3
+ type __VLS_Props = {
4
+ icon?: FkpIconName;
5
+ iconUrl?: string;
6
+ size?: number;
7
+ };
8
+ declare function __VLS_template(): {
9
+ attrs: Partial<{}>;
10
+ slots: Readonly<{
11
+ default?: () => VNode[];
12
+ }> & {
13
+ default?: () => VNode[];
14
+ };
15
+ refs: {};
16
+ rootEl: HTMLSpanElement;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
+ size: number;
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
22
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
23
+ export default _default;
24
+ type __VLS_WithTemplateSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,40 @@
1
+ import { ProNavItem, ProNavSection, ProNavSlots } from './types';
2
+ type __VLS_Props = {
3
+ items: readonly ProNavItem[];
4
+ section: ProNavSection;
5
+ level?: number;
6
+ selectedKey?: string;
7
+ expandedKeys?: readonly string[];
8
+ disabled?: boolean;
9
+ collapsed?: boolean;
10
+ inPopup?: boolean;
11
+ panelVisible?: boolean;
12
+ };
13
+ declare function __VLS_template(): {
14
+ attrs: Partial<{}>;
15
+ slots: Readonly<ProNavSlots> & ProNavSlots;
16
+ refs: {};
17
+ rootEl: any;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
21
+ select: (key: string) => any;
22
+ "group-open": () => any;
23
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
24
+ onSelect?: ((key: string) => any) | undefined;
25
+ "onGroup-open"?: (() => any) | undefined;
26
+ }>, {
27
+ disabled: boolean;
28
+ level: number;
29
+ panelVisible: boolean;
30
+ collapsed: boolean;
31
+ expandedKeys: readonly string[];
32
+ inPopup: boolean;
33
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
34
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
35
+ export default _default;
36
+ type __VLS_WithTemplateSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };
@@ -1,2 +1,2 @@
1
1
  export { default as FkpNavigation } from './FkpNavigation.vue';
2
- export type { ProNavItem, ProNavGroup } from './types';
2
+ export type { ProNavItem, ProNavSection, ProNavReorder, ProNavPanelChange, ProNavIconSlotProps, ProNavSlots, ProNavEmits, } from './types';
@@ -1,15 +1,53 @@
1
1
  import { FkpIconName } from '@freecallai/icons';
2
+ import { Slot } from 'vue';
2
3
  export interface ProNavItem {
3
4
  key: string;
4
5
  label: string;
5
6
  icon?: FkpIconName;
6
7
  iconUrl?: string;
7
8
  disabled?: boolean;
8
- /** Show a hover affordance and emit open instead of select. The host owns navigation. */
9
+ /** The host owns navigation; external items emit open instead of select. */
9
10
  opensInNewTab?: boolean;
11
+ children?: readonly ProNavItem[];
10
12
  }
11
- export interface ProNavGroup extends ProNavItem {
12
- children: ProNavItem[];
13
+ export interface ProNavSection {
14
+ key: string;
15
+ title?: string;
16
+ items: readonly ProNavItem[];
17
+ /** Only flat sections can be reordered; input item order is authoritative. */
18
+ sortable?: boolean;
19
+ /** Positive integer; only applies to flat sections. */
20
+ maxVisible?: number;
21
+ }
22
+ export interface ProNavReorder {
23
+ sectionKey: string;
24
+ keys: string[];
25
+ }
26
+ export interface ProNavPanelChange {
27
+ sectionKey: string;
28
+ panel: 'more' | 'sort';
29
+ visible: boolean;
30
+ }
31
+ export interface ProNavIconSlotProps {
32
+ item: ProNavItem;
33
+ section: ProNavSection;
34
+ /** 从 0 开始的菜单层级。 */
35
+ level: number;
36
+ }
37
+ export interface ProNavSlots {
38
+ 'item-icon'?: Slot<ProNavIconSlotProps>;
39
+ }
40
+ /** 内部菜单项的选择意图,由入口组件统一处理。 */
41
+ export interface NavigationItemEmits {
42
+ select: [key: string];
43
+ }
44
+ /** 递归节点与分组共享的内部事件,不从包入口导出。 */
45
+ export interface NavigationNodeEmits extends NavigationItemEmits {
46
+ 'group-open': [];
47
+ }
48
+ export interface ProNavEmits extends NavigationItemEmits {
49
+ 'open': [key: string, item: ProNavItem];
50
+ 'update:expandedKeys': [keys: string[]];
51
+ 'reorder': [payload: ProNavReorder];
52
+ 'panel-open': [payload: ProNavPanelChange];
13
53
  }
14
- /** Ignore stale/duplicate saved keys and append newly authorized products. */
15
- export declare function resolveProductOrder(products: ProNavItem[], order: string[]): ProNavItem[];
@@ -0,0 +1,13 @@
1
+ import { ProNavItem, ProNavSection } from './types';
2
+ interface NavigationTreeProps {
3
+ sections: readonly ProNavSection[];
4
+ selectedKey?: string;
5
+ expandedKeys?: readonly string[];
6
+ }
7
+ export declare const useNavigationTree: (props: NavigationTreeProps, onExpandedKeysChange: (keys: string[]) => void) => {
8
+ expandedKeys: import('vue').ComputedRef<string[]>;
9
+ selectedKeys: import('vue').ComputedRef<string[]>;
10
+ updateSectionExpandedKeys: (sectionKey: string, keys: string[]) => void;
11
+ getSelectableItem: (key: string) => ProNavItem | undefined;
12
+ };
13
+ export {};
@@ -7,11 +7,11 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
7
7
  undoTypeSwitch(): boolean;
8
8
  insertContent(input: RichTextInsertInput): Promise<RichTextInsertResult>;
9
9
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
+ "update:modelValue": (scene: KnowledgeSceneV1) => any;
10
11
  change: (scene: KnowledgeSceneV1, meta: ChangeMeta) => any;
11
12
  help: (request: {
12
13
  capabilityId: CapabilityId;
13
14
  }) => any;
14
- "update:modelValue": (scene: KnowledgeSceneV1) => any;
15
15
  diagnostic: (issue: EditorDiagnostic) => any;
16
16
  "busy-change": (busy: {
17
17
  uploading: number;
@@ -22,11 +22,11 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
22
22
  }) => any;
23
23
  "add-scene": (request: AddKnowledgeSceneRequest) => any;
24
24
  }, string, import('vue').PublicProps, Readonly<FkpRichTextProps> & Readonly<{
25
+ "onUpdate:modelValue"?: ((scene: KnowledgeSceneV1) => any) | undefined;
25
26
  onChange?: ((scene: KnowledgeSceneV1, meta: ChangeMeta) => any) | undefined;
26
27
  onHelp?: ((request: {
27
28
  capabilityId: CapabilityId;
28
29
  }) => any) | undefined;
29
- "onUpdate:modelValue"?: ((scene: KnowledgeSceneV1) => any) | undefined;
30
30
  onDiagnostic?: ((issue: EditorDiagnostic) => any) | undefined;
31
31
  "onBusy-change"?: ((busy: {
32
32
  uploading: number;
@@ -56,6 +56,7 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
56
56
  schemaPlan: import('./runtime/schema-plan').KnowledgeSchemaPlan;
57
57
  pasteCapabilities?: readonly import('./runtime/knowledge-clipboard').PasteCapability[];
58
58
  activeChoiceId?: string | null;
59
+ documentAdapter: import('./runtime/document-adapter').DocumentAdapter;
59
60
  }> & Readonly<{
60
61
  "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
61
62
  "onRetry-media"?: ((id: string) => any) | undefined;
@@ -78,9 +79,12 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
78
79
  }>, {
79
80
  pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
80
81
  isSelectionInsideOriginalReply: () => boolean;
81
- insertToken: (kind: string, key: string, label: string, token?: string) => void;
82
- insertOriginal: () => void;
83
- insertSeparator: () => void;
82
+ insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
83
+ upsertToken: (kind: string, key: string, label: string, params: Record<string, unknown>) => boolean;
84
+ insertInlineNode: (type: string, attrs: Record<string, unknown>) => boolean;
85
+ insertText: (text: string, placement?: "lastCaret" | "end", selectInserted?: boolean) => boolean;
86
+ insertOriginal: () => boolean;
87
+ insertSeparator: () => boolean;
84
88
  insertBatch: (content: JSONContent[], target: MediaTarget, refocus: boolean) => JSONContent | null;
85
89
  restoreDoc: (doc: JSONContent) => void;
86
90
  insertMedia: (asset: {
@@ -101,6 +105,12 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
101
105
  applyPluginNodeOperations: (plans: readonly import('./runtime/operations').NodeMutationPlan[], owner: string) => boolean;
102
106
  previewPluginNodeOperations: (plans: readonly import('./runtime/operations').NodeMutationPlan[], owner: string) => JSONContent | null;
103
107
  failMedia: (id: string, message: string, expectedNodeVersion: number) => boolean;
108
+ completeMedia: (id: string, expectedNodeVersion: number, asset: {
109
+ id?: string;
110
+ url: string;
111
+ kind: "image" | "video";
112
+ posterUrl?: string;
113
+ }) => boolean;
104
114
  retryMedia: (id: string, expectedNodeVersion: number) => boolean;
105
115
  getMediaState: (id: string) => import('./runtime/media-state').MediaNodeState | null;
106
116
  reportMediaProgress: (id: string, expectedNodeVersion: number, percent: number) => boolean;
@@ -176,6 +186,7 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
176
186
  schemaPlan: import('./runtime/schema-plan').KnowledgeSchemaPlan;
177
187
  pasteCapabilities?: readonly import('./runtime/knowledge-clipboard').PasteCapability[];
178
188
  activeChoiceId?: string | null;
189
+ documentAdapter: import('./runtime/document-adapter').DocumentAdapter;
179
190
  }> & Readonly<{
180
191
  "onUpdate:modelValue"?: ((value: JSONContent) => any) | undefined;
181
192
  "onRetry-media"?: ((id: string) => any) | undefined;
@@ -198,9 +209,12 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
198
209
  }>, {
199
210
  pasteClipboardContent: (event: ClipboardEvent) => MediaTarget | null;
200
211
  isSelectionInsideOriginalReply: () => boolean;
201
- insertToken: (kind: string, key: string, label: string, token?: string) => void;
202
- insertOriginal: () => void;
203
- insertSeparator: () => void;
212
+ insertToken: (kind: string, key: string, label: string, token?: string, params?: Record<string, unknown>) => boolean;
213
+ upsertToken: (kind: string, key: string, label: string, params: Record<string, unknown>) => boolean;
214
+ insertInlineNode: (type: string, attrs: Record<string, unknown>) => boolean;
215
+ insertText: (text: string, placement?: "lastCaret" | "end", selectInserted?: boolean) => boolean;
216
+ insertOriginal: () => boolean;
217
+ insertSeparator: () => boolean;
204
218
  insertBatch: (content: JSONContent[], target: MediaTarget, refocus: boolean) => JSONContent | null;
205
219
  restoreDoc: (doc: JSONContent) => void;
206
220
  insertMedia: (asset: {
@@ -221,6 +235,12 @@ declare const _default: import('vue').DefineComponent<FkpRichTextProps, {
221
235
  applyPluginNodeOperations: (plans: readonly import('./runtime/operations').NodeMutationPlan[], owner: string) => boolean;
222
236
  previewPluginNodeOperations: (plans: readonly import('./runtime/operations').NodeMutationPlan[], owner: string) => JSONContent | null;
223
237
  failMedia: (id: string, message: string, expectedNodeVersion: number) => boolean;
238
+ completeMedia: (id: string, expectedNodeVersion: number, asset: {
239
+ id?: string;
240
+ url: string;
241
+ kind: "image" | "video";
242
+ posterUrl?: string;
243
+ }) => boolean;
224
244
  retryMedia: (id: string, expectedNodeVersion: number) => boolean;
225
245
  getMediaState: (id: string) => import('./runtime/media-state').MediaNodeState | null;
226
246
  reportMediaProgress: (id: string, expectedNodeVersion: number, percent: number) => boolean;
@@ -49,6 +49,7 @@ export interface CapabilityDescriptor {
49
49
  classes: readonly string[];
50
50
  width?: number;
51
51
  helpClass: string;
52
+ warning?: readonly string[];
52
53
  guidance?: readonly string[];
53
54
  guidanceClass?: string;
54
55
  headingClass?: string;
@@ -16,4 +16,4 @@ export interface ResolvedSceneConfig {
16
16
  diagnostics: EditorDiagnostic[];
17
17
  fingerprint: string;
18
18
  }
19
- export declare function resolveSceneConfig(type: KnowledgeType, input: Pick<FkpRichTextProps, 'config' | 'policy' | 'ports' | 'readonly' | 'disabled'>, now?: number): ResolvedSceneConfig;
19
+ export declare function resolveSceneConfig(type: KnowledgeType, input: Pick<FkpRichTextProps, 'config' | 'policy' | 'ports' | 'readonly' | 'disabled' | 'mediaSources'>, now?: number): ResolvedSceneConfig;
@@ -2,7 +2,10 @@ export { default } from './FkpRichText.vue';
2
2
  export { default as FkpRichText } from './FkpRichText.vue';
3
3
  export { default as FkpKnowledgeTypePicker } from './ui/FkpKnowledgeTypePicker.vue';
4
4
  export type { FkpKnowledgeTypePickerProps } from './ui/knowledge-type-picker-types';
5
- export type { FkpRichTextProps, FkpRichTextHandle, RichTextInsertInput, RichTextInsertOption, RichTextInsertResult, KnowledgeSceneV1, KnowledgeConditionV1, MigrationIssueV1, LoadedConditionV1, LegacyReadonlyConditionV1, ConditionLoadV1, SaveConditionInputV1, SavedConditionV1, KnowledgePersistenceAdapterV1, KnowledgeType, AddKnowledgeSceneRequest, CapabilityId, CapabilitySlot, CapabilityRuleV1, SceneConfigInputV1, RichTextHostPorts, PortRequestContext, PortResult, PortErrorCode, Page, CapabilityOption, ToolFormField, ToolFormDefinition, VariableOption, AgentSummary, AgentPrompt, AgentPromptPreviewPart, MediaAsset, SceneConfigLayersV1, HostPolicySnapshotV1, EditorDiagnostic, ChangeMeta, } from './public/types';
5
+ export type { MediaSource, MediaSourceOptions } from './runtime/media-sources';
6
+ export type { FkpRichTextProps, CapabilityModuleLoader, FkpRichTextHandle, RichTextInsertInput, RichTextInsertOption, RichTextInsertResult, KnowledgeSceneV1, KnowledgeConditionV1, MigrationIssueV1, LoadedConditionV1, LegacyReadonlyConditionV1, ConditionLoadV1, SaveConditionInputV1, SavedConditionV1, KnowledgePersistenceAdapterV1, KnowledgeType, AddKnowledgeSceneRequest, CapabilityId, CapabilitySlot, CapabilityRuleV1, SceneConfigInputV1, RichTextHostPorts, PortRequestContext, PortResult, PortErrorCode, Page, CapabilityOption, ToolFormField, ToolFormDefinition, VariableOption, AgentSummary, AgentPrompt, AgentPromptPreviewPart, MediaAsset, SceneConfigLayersV1, HostPolicySnapshotV1, EditorDiagnostic, ChangeMeta, } from './public/types';
7
+ export type { CapabilityDescriptor } from './config/descriptor';
8
+ export type { CapabilityModule, PluginInput, PluginOperation, PluginActionContext, } from './plugins/operations';
6
9
  export { emptyScene, emptyDoc } from './public/types';
7
10
  export { resolveSceneConfig } from './config/resolve';
8
11
  export { validateKnowledgeScenes } from './model/validate';
@@ -0,0 +1,2 @@
1
+ import { DocumentAdapter } from './runtime/document-adapter';
2
+ export declare const knowledgeDocumentAdapter: DocumentAdapter;
@@ -1,5 +1,5 @@
1
1
  import { CapabilityId, KnowledgeSceneV1 } from '../public/types';
2
- /** Historical/current brackets and line breaks are reserved intent delimiters. */
2
+ /** ASCII model delimiters and line breaks are reserved; full-width brackets may be balanced intent text. */
3
3
  export declare function hasQuestionDelimiter(text: string): boolean;
4
4
  /** Plan labels must remain one unambiguous model-protocol token. */
5
5
  export declare function hasPlanLabelDelimiter(label: string): boolean;
@@ -1,4 +1,5 @@
1
1
  import { CapabilityDescriptor } from '../config/descriptor';
2
+ import { CapabilityModuleLoader } from '../public/types';
2
3
  import { CapabilityModule } from './operations';
3
4
  export type CapabilityLoader = () => Promise<{
4
5
  default: CapabilityModule;
@@ -11,4 +12,4 @@ export type CapabilityLoadResult = {
11
12
  ok: false;
12
13
  reason: 'NOT_REGISTERED' | 'VERSION_MISMATCH';
13
14
  };
14
- export declare function loadCapability(descriptor: CapabilityDescriptor): Promise<CapabilityLoadResult>;
15
+ export declare function loadCapability(descriptor: CapabilityDescriptor, override?: CapabilityModuleLoader): Promise<CapabilityLoadResult>;