@freecallai/pro 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -17
- package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-xR8ZhhdJ.js +187 -0
- package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-CaHRIHab.js +4864 -0
- package/dist/KnowledgeArea-_rsydhnt.js +1438 -0
- package/dist/{ToolForm-CWpUIVTl.js → ToolForm-Czg67cDT.js} +1 -1
- package/dist/{choice-DDg5gNtS.js → choice-Bt2xhoN_.js} +1 -1
- package/dist/edition-info/index.js +4 -0
- package/dist/filters/index.js +7 -0
- package/dist/guard-B7U3S4F1.js +1163 -0
- package/dist/{index-D8bcFtWR.js → index-9NM1SHoR.js} +1 -1
- package/dist/index-B4-2_sJI.js +10 -0
- package/dist/{index-DOEijEGU.js → index-BBv72oZe.js} +10 -10
- package/dist/index-BF6MRSMb.js +6 -0
- package/dist/index-BQrYBmwR.js +5 -0
- package/dist/index-CS2xQQ8W.js +168 -0
- package/dist/index-D0bJAQSN.js +327 -0
- package/dist/index-D9yqpH_4.js +57 -0
- package/dist/index-DCmHHi07.js +71 -0
- package/dist/index-DYeJRJY1.js +6 -0
- package/dist/{index-CJlAseSN.js → index-DnaEbb6l.js} +1 -1
- package/dist/{index-DSgEWJGP.js → index-Dy2Gy3bL.js} +1 -1
- package/dist/index-lNhA3N9x.js +379 -0
- package/dist/{index-5a9mHHzg.js → index-sjDmbR5o.js} +1 -1
- package/dist/index-trxE5T0w.js +6 -0
- package/dist/index-uCVrA6xK.js +5 -0
- package/dist/index.js +36 -11
- package/dist/inline-KPGqYMIR.js +19 -0
- package/dist/knowledge-CupkY2rK.js +6 -0
- package/dist/{knowledge-DnYGicjn.js → knowledge-DzwXQR-q.js} +1 -1
- package/dist/knowledge-type-picker/index.js +5 -0
- package/dist/media-extensions-DhRlLKYM.js +321 -0
- package/dist/{media-migration-CGOFwdYm.js → media-migration-CbMT2wS0.js} +1 -1
- package/dist/{media-upload-Dx45yv6a.js → media-upload-P9WeUHHr.js} +1 -1
- package/dist/navigation/index.js +4 -0
- package/dist/operations-D8pn-_iW.js +20 -0
- package/dist/{question-DGC6JHy5.js → question-C7akkjHn.js} +1 -1
- package/dist/{question-D1--acV8.js → question-DXZ8R-34.js} +1 -1
- package/dist/rich-text/index.js +57 -53
- package/dist/rich-text/legacy-converter/index.js +1271 -340
- package/dist/style.css +1 -1
- package/dist/switcher/index.js +4 -0
- package/dist/types/edition-info/FkpEditionInfo.vue.d.ts +5 -0
- package/dist/types/edition-info/index.d.ts +2 -0
- package/dist/types/edition-info/types.d.ts +5 -0
- package/dist/types/filters/FkpFilter.vue.d.ts +20 -0
- package/dist/types/filters/FkpFilterDateRange.vue.d.ts +13 -0
- package/dist/types/filters/FkpFilterPeriod.vue.d.ts +17 -0
- package/dist/types/filters/FkpSearchableMultiSelect.vue.d.ts +44 -0
- package/dist/types/filters/index.d.ts +5 -0
- package/dist/types/filters/selection.d.ts +5 -0
- package/dist/types/filters/types.d.ts +30 -0
- package/dist/types/index.d.ts +7 -1
- package/dist/types/knowledge-type-picker/index.d.ts +3 -0
- package/dist/types/navigation/FkpNavigation.vue.d.ts +51 -0
- package/dist/types/navigation/index.d.ts +2 -0
- package/dist/types/navigation/types.d.ts +15 -0
- package/dist/types/rich-text/FkpRichText.vue.d.ts +31 -7
- package/dist/types/rich-text/__demo__/conversion-fixtures.d.ts +2 -2
- package/dist/types/rich-text/__demo__/reasoning-template-examples.d.ts +11 -0
- package/dist/types/rich-text/config/descriptor.d.ts +25 -2
- package/dist/types/rich-text/config/resolve.d.ts +2 -0
- package/dist/types/rich-text/index.d.ts +3 -1
- package/dist/types/rich-text/legacy-converter/agent-prompt-preview.d.ts +2 -0
- package/dist/types/rich-text/legacy-converter/business-attribute.d.ts +12 -0
- package/dist/types/rich-text/legacy-converter/index.d.ts +8 -0
- package/dist/types/rich-text/legacy-converter/tool-contract.d.ts +1 -0
- package/dist/types/rich-text/model/guard.d.ts +2 -1
- package/dist/types/rich-text/model/node-contract.d.ts +3 -5
- package/dist/types/rich-text/model/node-identity.d.ts +7 -1
- package/dist/types/rich-text/model/question-text.d.ts +2 -4
- package/dist/types/rich-text/plugins/attribute/token.d.ts +9 -0
- package/dist/types/rich-text/plugins/operations.d.ts +9 -0
- package/dist/types/rich-text/plugins/reasoningTemplate/defaults.d.ts +14 -0
- package/dist/types/rich-text/plugins/reasoningTemplate/examples.d.ts +9 -0
- package/dist/types/rich-text/plugins/separator/token.d.ts +2 -0
- package/dist/types/rich-text/plugins/tableKnowledge/descriptor.d.ts +2 -0
- package/dist/types/rich-text/plugins/tableKnowledge/index.d.ts +2 -0
- package/dist/types/rich-text/plugins/tableKnowledge/token.d.ts +9 -0
- package/dist/types/rich-text/plugins/ticket/protocol.d.ts +8 -0
- package/dist/types/rich-text/plugins/ticket/token.d.ts +9 -0
- package/dist/types/rich-text/plugins/todo/token.d.ts +3 -0
- package/dist/types/rich-text/plugins/token-catalog.d.ts +46 -0
- package/dist/types/rich-text/plugins/token-definition.d.ts +24 -0
- package/dist/types/rich-text/plugins/tool/presentation.d.ts +2 -1
- package/dist/types/rich-text/plugins/tool/protocol.d.ts +5 -0
- package/dist/types/rich-text/plugins/tool/rules.d.ts +35 -0
- package/dist/types/rich-text/plugins/tool/token.d.ts +2 -0
- package/dist/types/rich-text/plugins/variable/token.d.ts +2 -0
- package/dist/types/rich-text/public/types.d.ts +73 -6
- package/dist/types/rich-text/runtime/action-ports.d.ts +6 -1
- package/dist/types/rich-text/runtime/file-drop-guard.d.ts +2 -0
- package/dist/types/rich-text/runtime/knowledge-clipboard.d.ts +16 -0
- package/dist/types/rich-text/runtime/media-policy.d.ts +15 -0
- package/dist/types/rich-text/runtime/media-target.d.ts +3 -0
- package/dist/types/rich-text/runtime/media-upload-session.d.ts +5 -1
- package/dist/types/rich-text/runtime/media-upload-slots.d.ts +4 -0
- package/dist/types/rich-text/runtime/schema-plan.d.ts +1 -0
- package/dist/types/rich-text/types.d.ts +3 -40
- package/dist/types/rich-text/ui/FkpKnowledgeTypePicker.vue.d.ts +38 -0
- package/dist/types/rich-text/ui/KnowledgeArea.vue.d.ts +12 -1
- package/dist/types/rich-text/ui/knowledge-type-picker-types.d.ts +14 -0
- package/dist/types/rich-text/ui/token-renderer.d.ts +5 -0
- package/dist/types/switcher/FkpSwitcher.vue.d.ts +52 -0
- package/dist/types/switcher/index.d.ts +2 -0
- package/dist/types/switcher/types.d.ts +7 -0
- package/package.json +26 -6
- package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-DnknqQTh.js +0 -4115
- package/dist/KnowledgeArea-OPR7smbt.js +0 -923
- package/dist/guard-BCatAeT4.js +0 -749
- package/dist/index-BsQLwz91.js +0 -5
- package/dist/index-CzpY61Qj.js +0 -6
- package/dist/index-DxxX09iY.js +0 -6
- package/dist/index-nnvfy5q0.js +0 -31
- package/dist/index-urNonkMH.js +0 -6
- package/dist/index-xAjlBylT.js +0 -5
- package/dist/inline-TT_dl8Y3.js +0 -17
- package/dist/knowledge-BZCmalF_.js +0 -6
- package/dist/media-extensions-ZoxmhIhH.js +0 -276
- package/dist/operations-JgnjGx3H.js +0 -19
package/dist/rich-text/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { p as S, v as C,
|
|
2
|
-
import { _ as B, _ as G,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { p as S, v as C, d as O, e as E } from "../FkpRichText.vue_vue_type_script_setup_true_lang-CaHRIHab.js";
|
|
2
|
+
import { _ as B, _ as G, r as H } from "../FkpRichText.vue_vue_type_script_setup_true_lang-CaHRIHab.js";
|
|
3
|
+
import { _ as W, a as X, e as Y } from "../FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-xR8ZhhdJ.js";
|
|
4
|
+
import { f as v, c as x } from "../guard-B7U3S4F1.js";
|
|
5
|
+
import { s as ee, a as ne } from "../guard-B7U3S4F1.js";
|
|
6
|
+
import { a as se, b as oe } from "../media-migration-CbMT2wS0.js";
|
|
7
|
+
const b = (e) => !!e && typeof e == "object" && !Array.isArray(e);
|
|
7
8
|
function m(e) {
|
|
8
9
|
let n;
|
|
9
10
|
try {
|
|
@@ -13,7 +14,7 @@ function m(e) {
|
|
|
13
14
|
} catch {
|
|
14
15
|
return { ok: !1, path: "condition" };
|
|
15
16
|
}
|
|
16
|
-
if (!
|
|
17
|
+
if (!b(n)) return { ok: !1, path: "condition" };
|
|
17
18
|
if (n.schemaVersion !== 1) return { ok: !1, path: "schemaVersion" };
|
|
18
19
|
const t = Object.keys(n).find(
|
|
19
20
|
(i) => !["schemaVersion", "id", "scenes"].includes(i)
|
|
@@ -22,10 +23,10 @@ function m(e) {
|
|
|
22
23
|
if (n.id !== void 0 && (typeof n.id != "string" || !n.id.trim()))
|
|
23
24
|
return { ok: !1, path: "id" };
|
|
24
25
|
if (!Array.isArray(n.scenes)) return { ok: !1, path: "scenes" };
|
|
25
|
-
const o = /* @__PURE__ */ new Set(),
|
|
26
|
+
const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
26
27
|
for (const [i, s] of n.scenes.entries()) {
|
|
27
28
|
const c = `scenes[${i}]`;
|
|
28
|
-
if (!
|
|
29
|
+
if (!b(s)) return { ok: !1, path: c };
|
|
29
30
|
const p = Object.keys(s).find(
|
|
30
31
|
(h) => !["sceneKey", "scene"].includes(h)
|
|
31
32
|
);
|
|
@@ -33,13 +34,13 @@ function m(e) {
|
|
|
33
34
|
if (typeof s.sceneKey != "string" || !s.sceneKey.trim() || o.has(s.sceneKey))
|
|
34
35
|
return { ok: !1, path: `${c}.sceneKey` };
|
|
35
36
|
o.add(s.sceneKey);
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
if (!
|
|
37
|
+
const a = x(s.scene);
|
|
38
|
+
if (a) return { ok: !1, path: `${c}.scene.${a}` };
|
|
39
|
+
const l = s.scene;
|
|
40
|
+
if (l.id !== void 0) {
|
|
41
|
+
if (!l.id.trim() || r.has(l.id))
|
|
41
42
|
return { ok: !1, path: `${c}.scene.id` };
|
|
42
|
-
|
|
43
|
+
r.add(l.id);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
return { ok: !0, data: n };
|
|
@@ -69,11 +70,11 @@ function N(e) {
|
|
|
69
70
|
return { ok: !1, path: "expectedRevision" };
|
|
70
71
|
if (!d(n.idempotencyKey))
|
|
71
72
|
return { ok: !1, path: "idempotencyKey" };
|
|
72
|
-
const
|
|
73
|
+
const r = C(
|
|
73
74
|
o.data.scenes.map((s) => s.scene)
|
|
74
75
|
);
|
|
75
|
-
if (!
|
|
76
|
-
const s = (i =
|
|
76
|
+
if (!r.ok) {
|
|
77
|
+
const s = (i = r.issues[0]) == null ? void 0 : i.sceneIndex;
|
|
77
78
|
return {
|
|
78
79
|
ok: !1,
|
|
79
80
|
path: s == null ? "condition.scenes" : `condition.scenes[${s}].scene`
|
|
@@ -111,7 +112,7 @@ const J = (e) => {
|
|
|
111
112
|
function M(e) {
|
|
112
113
|
return S(e, J);
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function P(e) {
|
|
115
116
|
return S(
|
|
116
117
|
e,
|
|
117
118
|
(n) => J(n) || j(n)
|
|
@@ -120,11 +121,11 @@ function z(e) {
|
|
|
120
121
|
function T(e) {
|
|
121
122
|
return S(e, L);
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
+
function _(e, n) {
|
|
124
125
|
const t = N(e);
|
|
125
126
|
if (!t.ok) return { ok: !1, path: t.path };
|
|
126
|
-
const o = t.data.condition,
|
|
127
|
-
if (!
|
|
127
|
+
const o = t.data.condition, r = T({ ok: !0, data: n });
|
|
128
|
+
if (!r.ok) {
|
|
128
129
|
const s = (() => {
|
|
129
130
|
try {
|
|
130
131
|
return y(n) && v(n) === null ? m(n.condition) : null;
|
|
@@ -134,8 +135,8 @@ function P(e, n) {
|
|
|
134
135
|
})();
|
|
135
136
|
return s != null && s.ok && o.scenes.length !== s.data.scenes.length ? { ok: !1, path: "scenes" } : { ok: !1, path: "saved" };
|
|
136
137
|
}
|
|
137
|
-
const i =
|
|
138
|
-
if (t.data.expectedRevision !== null &&
|
|
138
|
+
const i = r.data.condition;
|
|
139
|
+
if (t.data.expectedRevision !== null && r.data.revision === t.data.expectedRevision)
|
|
139
140
|
return { ok: !1, path: "revision" };
|
|
140
141
|
if (o.id !== void 0 && o.id !== i.id)
|
|
141
142
|
return { ok: !1, path: "id" };
|
|
@@ -145,13 +146,13 @@ function P(e, n) {
|
|
|
145
146
|
const p = i.scenes[s];
|
|
146
147
|
if (c.sceneKey !== p.sceneKey)
|
|
147
148
|
return { ok: !1, path: `scenes[${s}].sceneKey` };
|
|
148
|
-
const
|
|
149
|
-
if (c.scene.id === void 0 && delete
|
|
149
|
+
const a = { ...p.scene };
|
|
150
|
+
if (c.scene.id === void 0 && delete a.id, O(c.scene) !== O(a))
|
|
150
151
|
return { ok: !1, path: `scenes[${s}].scene` };
|
|
151
152
|
}
|
|
152
153
|
return { ok: !0 };
|
|
153
154
|
}
|
|
154
|
-
function
|
|
155
|
+
function z(e, n) {
|
|
155
156
|
var c, p;
|
|
156
157
|
if (e.type !== "reasoning")
|
|
157
158
|
throw new Error("只有推理知识可以构造推理引用上下文");
|
|
@@ -159,15 +160,15 @@ function Q(e, n) {
|
|
|
159
160
|
if (t) throw new Error(`知识内容无效:${t}`);
|
|
160
161
|
if (!n || typeof n != "object" || Array.isArray(n) || v(n) !== null)
|
|
161
162
|
throw new Error("属性值不是合法的 JSON 对象");
|
|
162
|
-
const o = [],
|
|
163
|
-
var
|
|
164
|
-
if (
|
|
165
|
-
const
|
|
166
|
-
if ((
|
|
163
|
+
const o = [], r = [], i = [], s = (a) => {
|
|
164
|
+
var l, h, K, R, I, $;
|
|
165
|
+
if (a.type === "businessToken") {
|
|
166
|
+
const u = String((l = a.attrs) == null ? void 0 : l.kind), f = String((h = a.attrs) == null ? void 0 : h.key), k = String(((K = a.attrs) == null ? void 0 : K.id) || ""), w = String(((R = a.attrs) == null ? void 0 : R.label) || f);
|
|
167
|
+
if ((u === "ticket" || u === "attribute" || u === "tool") && !k.trim())
|
|
167
168
|
throw new Error(`引用缺少稳定节点 ID:${f}`);
|
|
168
|
-
if (
|
|
169
|
-
|
|
170
|
-
else if (
|
|
169
|
+
if (u === "ticket")
|
|
170
|
+
r.push({ nodeId: k, key: f, label: w });
|
|
171
|
+
else if (u === "attribute") {
|
|
171
172
|
if (!Object.prototype.hasOwnProperty.call(n, f))
|
|
172
173
|
throw new Error(`缺少属性值:${f}`);
|
|
173
174
|
o.push({
|
|
@@ -176,8 +177,8 @@ function Q(e, n) {
|
|
|
176
177
|
label: w,
|
|
177
178
|
value: JSON.parse(JSON.stringify(n[f]))
|
|
178
179
|
});
|
|
179
|
-
} else if (
|
|
180
|
-
const g = (I =
|
|
180
|
+
} else if (u === "tool") {
|
|
181
|
+
const g = (I = a.attrs) == null ? void 0 : I.params;
|
|
181
182
|
if (!g || typeof g != "object" || Array.isArray(g))
|
|
182
183
|
throw new Error(`工具缺少配置参数:${f}`);
|
|
183
184
|
i.push({
|
|
@@ -188,37 +189,40 @@ function Q(e, n) {
|
|
|
188
189
|
});
|
|
189
190
|
}
|
|
190
191
|
}
|
|
191
|
-
($ =
|
|
192
|
+
($ = a.content) == null || $.forEach(s);
|
|
192
193
|
};
|
|
193
|
-
return (p = (c = e.knowledge.doc) == null ? void 0 : c.content) == null || p.forEach(s), { knowledgeType: "reasoning", tickets:
|
|
194
|
+
return (p = (c = e.knowledge.doc) == null ? void 0 : c.content) == null || p.forEach(s), { knowledgeType: "reasoning", tickets: r, attributes: o, tools: i };
|
|
194
195
|
}
|
|
195
|
-
function
|
|
196
|
-
var o;
|
|
196
|
+
function Q(e) {
|
|
197
|
+
var o, r;
|
|
197
198
|
if (e.type !== "agent")
|
|
198
199
|
throw new Error("只有Agent知识可以构造Agent调用上下文");
|
|
199
200
|
const n = x(e);
|
|
200
201
|
if (n) throw new Error(`知识内容无效:${n}`);
|
|
201
|
-
|
|
202
|
+
if ((o = e.knowledge.agentRef) != null && o.invalid)
|
|
203
|
+
throw new Error("Agent 已失效,请重新选择");
|
|
204
|
+
const t = (r = e.knowledge.agentRef) == null ? void 0 : r.id;
|
|
202
205
|
if (!(t != null && t.trim())) throw new Error("请选择Agent");
|
|
203
206
|
return { knowledgeType: "agent", agentId: t };
|
|
204
207
|
}
|
|
205
208
|
export {
|
|
209
|
+
W as FkpKnowledgeTypePicker,
|
|
206
210
|
B as FkpRichText,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
+
se as assignLegacyExtensionIds,
|
|
212
|
+
oe as assignLegacyMediaIds,
|
|
213
|
+
Q as buildAgentInvocationContext,
|
|
214
|
+
z as buildReasoningReferenceContext,
|
|
211
215
|
G as default,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
216
|
+
X as emptyDoc,
|
|
217
|
+
Y as emptyScene,
|
|
218
|
+
P as parseConditionLoadResult,
|
|
215
219
|
m as parseKnowledgeConditionV1,
|
|
216
220
|
M as parseLoadedConditionResult,
|
|
217
221
|
N as parseSaveConditionInput,
|
|
218
222
|
T as parseSavedConditionResult,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
223
|
+
H as resolveSceneConfig,
|
|
224
|
+
ee as serializeQuestionForModel,
|
|
225
|
+
ne as serializeQuestionTagsForModel,
|
|
222
226
|
C as validateKnowledgeScenes,
|
|
223
|
-
|
|
227
|
+
_ as verifySavedConditionEcho
|
|
224
228
|
};
|