nolo-cli 0.13.0 → 0.14.0-alpha.1
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/{_executeModel-4F7VZR5U.js → _executeModel-SQVV6CXR.js} +27 -28
- package/{action-OTOWUMPW.js → action-Q5CBVUV5.js} +7 -7
- package/{addContentAction-JGBUVR7K.js → addContentAction-ZCJJ3XOL.js} +6 -6
- package/{addDialogAgentAction-V6CL2UCF.js → addDialogAgentAction-ROUQPBVI.js} +5 -5
- package/{agentDeleteCommand-MMRSG6AB.js → agentDeleteCommand-TSY5OSG7.js} +18 -18
- package/{agentEmailCommands-VQENDYL5.js → agentEmailCommands-YX57M3P7.js} +34 -35
- package/{agentListCommands-2PZHIQ3I.js → agentListCommands-S65H4AVT.js} +19 -19
- package/{agentMachineCommands-Q3I3VDWS.js → agentMachineCommands-ELNLSTE4.js} +18 -18
- package/{agentRecordCommands-RY7CSPPL.js → agentRecordCommands-HVCGO2XK.js} +32 -33
- package/{agentRunCommand-U76NZ2G6.js → agentRunCommand-EOFDKKFI.js} +33 -35
- package/{agentRuntimeLocal-QDJCBXM2.js → agentRuntimeLocal-F4FWS5Z4.js} +16 -16
- package/{agentSlice-6JAJOU3X.js → agentSlice-R3WAV3VG.js} +7 -7
- package/{authCommand-DMW336GT.js → authCommand-O7SL3WW5.js} +4 -4
- package/{chunk-2BVGERJ2.js → chunk-2KNEWIDU.js} +106 -11
- package/{chunk-WVTBAALN.js → chunk-2MW6QFIQ.js} +2 -2
- package/{chunk-UWNSWEEC.js → chunk-3DKS6UER.js} +71 -29
- package/{chunk-3MI5LDDU.js → chunk-4GXQ74DF.js} +2 -2
- package/{chunk-4LG74DRG.js → chunk-4IJYA27C.js} +1 -1
- package/{chunk-TA7VKOHU.js → chunk-7H3O7ZA2.js} +6 -3
- package/{chunk-YUMYYXPI.js → chunk-7ULBTAQK.js} +16 -16
- package/{chunk-KGI44L4E.js → chunk-ACPNKI3V.js} +7 -7
- package/{chunk-5V524MHX.js → chunk-AEMXZOAK.js} +14 -13
- package/{chunk-OPM2DE2J.js → chunk-AGUNTRZV.js} +4 -4
- package/{chunk-Y5P3ZRGC.js → chunk-BHKOPLWJ.js} +6 -6
- package/{chunk-IVAOVLM7.js → chunk-BOJVWKNA.js} +1 -1
- package/{chunk-MG6BVV3T.js → chunk-BRODTPXY.js} +170 -98
- package/{chunk-C3BFP57W.js → chunk-CANREHJB.js} +1 -1
- package/{chunk-DPFWKRHG.js → chunk-CFX7LP6W.js} +2 -2
- package/{chunk-QJSTNKJY.js → chunk-DSCG2DY5.js} +1 -1
- package/{chunk-JU7J7EAV.js → chunk-EC2EU2F4.js} +3 -3
- package/{chunk-VBSWHE5W.js → chunk-FLY6L3KA.js} +1 -1
- package/{chunk-MZHSAPZP.js → chunk-HXPBV44X.js} +33 -29
- package/{chunk-TQYYGE6G.js → chunk-IVOFAQ5R.js} +3 -3
- package/{chunk-WPHL6ALY.js → chunk-JTINRTBT.js} +1 -1
- package/{chunk-QAJWQTLB.js → chunk-K4S6CYKK.js} +39 -27
- package/{chunk-XHQWJUW4.js → chunk-NJVPXLRY.js} +1 -1
- package/{chunk-BTYBYAMP.js → chunk-O2S35KSZ.js} +2 -2
- package/{chunk-H5Y2H2N6.js → chunk-OIMX7MM4.js} +1 -1
- package/{chunk-5S4SWV5G.js → chunk-PB2DHBEQ.js} +1 -1
- package/{chunk-QUHUVG6Y.js → chunk-QRBZS6G4.js} +2 -2
- package/{chunk-RWO5DGXI.js → chunk-QV25QXE2.js} +3 -3
- package/{chunk-JFANOO7I.js → chunk-SJQVOEIV.js} +3 -3
- package/{chunk-CGDQDXKZ.js → chunk-TSJBYH7X.js} +1 -1
- package/{chunk-LUKQQJFL.js → chunk-UW3WOIWJ.js} +1 -1
- package/{chunk-VKG4HXYV.js → chunk-V6PGKRZC.js} +9 -9
- package/{chunk-ARSC56DC.js → chunk-XZY4TCZO.js} +1 -1
- package/{chunk-O4FOPRCP.js → chunk-YX4H7EP4.js} +1 -1
- package/{chunk-FSUZIGIG.js → chunk-ZEYSZ5WG.js} +76 -62
- package/{createAgentAutomationAction-4NY4JLOK.js → createAgentAutomationAction-LL2UAZL3.js} +13 -13
- package/{createDialogAction-I5WUWFJ6.js → createDialogAction-MSMUS4NO.js} +14 -15
- package/{createPageAction-HFTIQ7TW.js → createPageAction-MGN4CQWL.js} +13 -13
- package/{dbSlice-J4PUZ6Y5.js → dbSlice-35VY6LYX.js} +5 -5
- package/{deleteFile-M7UNIUOO.js → deleteFile-WPWVZE4B.js} +3 -3
- package/{dialogCommands-SVXRJFZS.js → dialogCommands-7EKKHEGO.js} +19 -19
- package/{dialogSlice-35LA3ZRG.js → dialogSlice-ZRYCGVVH.js} +13 -13
- package/{docCreateCommands-Z7RIAYKQ.js → docCreateCommands-YCU2BINI.js} +18 -18
- package/{docDeleteCommands-NEYHUVZF.js → docDeleteCommands-CEB54GNO.js} +19 -19
- package/{docReadCommands-I4US2SDE.js → docReadCommands-Z2OZTAIA.js} +18 -18
- package/{docStore-3CP2IO6M.js → docStore-AYLR7HES.js} +14 -14
- package/{docUpdateCommands-UU5HQBRP.js → docUpdateCommands-VU2TNBPM.js} +18 -18
- package/fetchMessages-KTNM7QAR.js +1 -1
- package/getPricing-UGDJHI7M.js +1 -1
- package/{handleSendMessageAction-FWTLQGOZ.js → handleSendMessageAction-D4UALBU5.js} +13 -13
- package/index.js +42 -42
- package/{machineCommands-NGE4ZARV.js → machineCommands-65QZPPET.js} +33 -34
- package/{machineWsRunDispatch-FISQUBI2.js → machineWsRunDispatch-35QVFHKA.js} +31 -32
- package/package.json +1 -1
- package/{read-2MIMRBZ2.js → read-SIWMJRHC.js} +3 -3
- package/{readDocTool-QHVGQHUJ.js → readDocTool-TCYJY4PP.js} +1 -1
- package/{readlineWorkspace-JK6P56TT.js → readlineWorkspace-U4PN6GH2.js} +38 -40
- package/{removeDialogAgentAction-XUZYQBV4.js → removeDialogAgentAction-DPSDJL5F.js} +7 -7
- package/{runAgentClientLoop-FP2K33ZO.js → runAgentClientLoop-HND2XKNI.js} +24 -25
- package/{setDialogExtraReferencesAction-PTAIFKGM.js → setDialogExtraReferencesAction-6UPTOPJA.js} +5 -5
- package/{setPrimaryDialogAgentAction-HRFTDB44.js → setPrimaryDialogAgentAction-PFDHN53I.js} +7 -7
- package/{settingSlice-VGRJUSE5.js → settingSlice-6M2BKFW5.js} +6 -6
- package/{spaceCommands-GN73BCOB.js → spaceCommands-NP75DOJW.js} +18 -18
- package/{spaceSlice-WTFNKOVA.js → spaceSlice-J44RNCGS.js} +13 -13
- package/{streamAgentChatTurn-HBAQQVNK.js → streamAgentChatTurn-MNBTNJDU.js} +44 -41
- package/{tools-TPQYTLQZ.js → tools-R2M77NZJ.js} +18 -19
- package/{tuiSummaryLlmCaller-XDC7WG4K.js → tuiSummaryLlmCaller-2D65LKWM.js} +3 -3
- package/{updateDialogTitleAction-AWXNPUQJ.js → updateDialogTitleAction-ERVV47T7.js} +13 -13
- package/chunk-HNW7IJSK.js +0 -71
- package/chunk-XENYHRUE.js +0 -104
- package/understanding-3CUQQ6SV.js +0 -271
- package/{chunk-PDL2AV3E.js → chunk-5CS33IBL.js} +3 -3
- package/{chunk-TSUJOM6N.js → chunk-DVRHHFEA.js} +3 -3
- package/{chunk-TOILAPLH.js → chunk-EHLHSX7R.js} +3 -3
- package/{chunk-TYPHUVK5.js → chunk-KTFJUPDW.js} +3 -3
- package/{chunk-NCGFB7NN.js → chunk-OIQPORYI.js} +3 -3
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createMemoryItem,
|
|
3
|
-
writeMemoryItemWithIndexesToDb
|
|
4
|
-
} from "./chunk-HNW7IJSK.js";
|
|
5
|
-
import {
|
|
6
|
-
loadMemoryCandidatesFromDb
|
|
7
|
-
} from "./chunk-XENYHRUE.js";
|
|
8
|
-
import {
|
|
9
|
-
compactWhitespace
|
|
10
|
-
} from "./chunk-DWLEOOGR.js";
|
|
11
|
-
import "./chunk-O4BU24WZ.js";
|
|
12
|
-
import "./chunk-I42VC5KR.js";
|
|
13
|
-
import "./chunk-WWC7I6TA.js";
|
|
14
|
-
import "./chunk-3EUW3WEO.js";
|
|
15
|
-
import "./chunk-U6VC4MU4.js";
|
|
16
|
-
import "./chunk-G3SUCT4W.js";
|
|
17
|
-
import "./chunk-4VNS5WPM.js";
|
|
18
|
-
|
|
19
|
-
// packages/ai/memory/scope.ts
|
|
20
|
-
var buildUserMemoryTarget = (userId) => ({
|
|
21
|
-
ownerType: "user",
|
|
22
|
-
ownerId: userId,
|
|
23
|
-
visibility: "private",
|
|
24
|
-
subjectType: "user",
|
|
25
|
-
subjectId: userId
|
|
26
|
-
});
|
|
27
|
-
var buildSpaceMemoryTarget = (spaceId) => ({
|
|
28
|
-
ownerType: "space",
|
|
29
|
-
ownerId: spaceId,
|
|
30
|
-
visibility: "shared",
|
|
31
|
-
subjectType: "space",
|
|
32
|
-
subjectId: spaceId
|
|
33
|
-
});
|
|
34
|
-
var resolveUserOrSpaceMemoryTarget = (input) => {
|
|
35
|
-
if (input.userId) return buildUserMemoryTarget(input.userId);
|
|
36
|
-
if (input.spaceId) return buildSpaceMemoryTarget(input.spaceId);
|
|
37
|
-
return null;
|
|
38
|
-
};
|
|
39
|
-
var buildAgentSubjectTarget = (target, agentKey) => ({
|
|
40
|
-
owner: { ownerType: target.ownerType, ownerId: target.ownerId },
|
|
41
|
-
visibility: target.visibility,
|
|
42
|
-
subjectType: "agent",
|
|
43
|
-
subjectId: agentKey
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
// packages/ai/memory/understanding.ts
|
|
47
|
-
var UNDERSTANDING_TAG = "understanding-memory";
|
|
48
|
-
var normalizeClause = (value) => (
|
|
49
|
-
// Compact first so trailing whitespace after sentence punct still strips
|
|
50
|
-
// (matches pre-seam: compact → strip end punct → trim residual spaces).
|
|
51
|
-
compactWhitespace(value.replace(/[“”"]/g, "")).replace(/[。!?!?;;]+$/u, "").trim()
|
|
52
|
-
);
|
|
53
|
-
var normalizeSignalLead = (value) => normalizeClause(value.split(/[\n,,。!?!?;;]+/u)[0] ?? "");
|
|
54
|
-
var stripLead = (value) => value.replace(/^(明白|好的|对|是的|所以|其实|我记得|欢迎回来|嗯|那)\s*[,,::\-]?\s*/u, "").trim();
|
|
55
|
-
var contentToText = (content) => {
|
|
56
|
-
if (typeof content === "string") return content.trim();
|
|
57
|
-
if (!Array.isArray(content)) return "";
|
|
58
|
-
return content.map((part) => part?.type === "text" ? part.text.trim() : "").filter(Boolean).join("\n").trim();
|
|
59
|
-
};
|
|
60
|
-
var extractPreference = (text) => {
|
|
61
|
-
const matches = [];
|
|
62
|
-
const normalized = stripLead(text);
|
|
63
|
-
const moreValue = normalized.match(/[你我](?:更)?在意(.+)/u);
|
|
64
|
-
if (moreValue?.[1]) {
|
|
65
|
-
matches.push(`\u66F4\u5728\u610F${normalizeSignalLead(moreValue[1])}`);
|
|
66
|
-
}
|
|
67
|
-
const concern = normalized.match(/[你我](?:更)?关心(.+)/u);
|
|
68
|
-
if (concern?.[1]) {
|
|
69
|
-
matches.push(`\u66F4\u5173\u5FC3${normalizeSignalLead(concern[1])}`);
|
|
70
|
-
}
|
|
71
|
-
const fear = normalized.match(/[你我](?:更)?怕(.+)/u);
|
|
72
|
-
if (fear?.[1]) {
|
|
73
|
-
matches.push(`\u66F4\u6015${normalizeSignalLead(fear[1])}`);
|
|
74
|
-
}
|
|
75
|
-
const dontWant = normalized.match(/[你我]不想(.+)/u);
|
|
76
|
-
if (dontWant?.[1]) {
|
|
77
|
-
matches.push(`\u4E0D\u60F3${normalizeSignalLead(dontWant[1])}`);
|
|
78
|
-
}
|
|
79
|
-
const dontHope = normalized.match(/[你我]不希望(.+)/u);
|
|
80
|
-
if (dontHope?.[1]) {
|
|
81
|
-
matches.push(`\u4E0D\u5E0C\u671B${normalizeSignalLead(dontHope[1])}`);
|
|
82
|
-
}
|
|
83
|
-
return matches;
|
|
84
|
-
};
|
|
85
|
-
var extractStyle = (text) => {
|
|
86
|
-
const matches = [];
|
|
87
|
-
const normalized = stripLead(text);
|
|
88
|
-
const dislike = normalized.match(/[你我]不喜欢(.+)/u);
|
|
89
|
-
if (dislike?.[1]) {
|
|
90
|
-
matches.push(`\u4E0D\u559C\u6B22${normalizeSignalLead(dislike[1])}`);
|
|
91
|
-
}
|
|
92
|
-
const prefer = normalized.match(/[你我](?:更)?喜欢(.+)/u);
|
|
93
|
-
if (prefer?.[1]) {
|
|
94
|
-
matches.push(`\u66F4\u559C\u6B22${normalizeSignalLead(prefer[1])}`);
|
|
95
|
-
}
|
|
96
|
-
return matches;
|
|
97
|
-
};
|
|
98
|
-
var extractGoal = (text) => {
|
|
99
|
-
const matches = [];
|
|
100
|
-
const normalized = stripLead(text);
|
|
101
|
-
if (/[??]/u.test(normalized)) {
|
|
102
|
-
return matches;
|
|
103
|
-
}
|
|
104
|
-
const wantFirst = normalized.match(/[你我](?:这次)?(?:更)?想先(?:把)?(.+)/u);
|
|
105
|
-
if (wantFirst?.[1]) {
|
|
106
|
-
matches.push(`\u60F3\u5148${normalizeSignalLead(wantFirst[1])}`);
|
|
107
|
-
}
|
|
108
|
-
const shouldFirst = normalized.match(/[你我](?:还是)?想要先(?:把)?(.+)/u);
|
|
109
|
-
if (shouldFirst?.[1]) {
|
|
110
|
-
matches.push(`\u60F3\u5148${normalizeSignalLead(shouldFirst[1])}`);
|
|
111
|
-
}
|
|
112
|
-
return matches;
|
|
113
|
-
};
|
|
114
|
-
var normalizeTensionTail = (tail) => normalizeClause(
|
|
115
|
-
tail.replace(/^在/u, "").replace(/^权衡/u, "").replace(/^比较/u, "").split(/[。!?!?;;\n]/u)[0] ?? ""
|
|
116
|
-
);
|
|
117
|
-
var extractTension = (text) => {
|
|
118
|
-
const matches = [];
|
|
119
|
-
const normalized = stripLead(text);
|
|
120
|
-
const weigh = normalized.match(/[你我]在权衡(.+)/u);
|
|
121
|
-
if (weigh?.[1]) {
|
|
122
|
-
matches.push(`\u5728\u6743\u8861${normalizeTensionTail(weigh[1])}`);
|
|
123
|
-
}
|
|
124
|
-
const struggle = normalized.match(/[你我](?:现在)?(?:真正)?纠结(?:的是)?[::,,\s]*(.+)/u);
|
|
125
|
-
if (struggle?.[1] && struggle[1].includes("\u8FD8\u662F")) {
|
|
126
|
-
matches.push(`\u5728\u6743\u8861${normalizeTensionTail(struggle[1])}`);
|
|
127
|
-
}
|
|
128
|
-
const stuck = normalized.match(/[你我]卡的点不是.+?而是(.+)/u);
|
|
129
|
-
if (stuck?.[1]) {
|
|
130
|
-
matches.push(`\u5728\u6743\u8861${normalizeTensionTail(stuck[1])}`);
|
|
131
|
-
}
|
|
132
|
-
return matches;
|
|
133
|
-
};
|
|
134
|
-
var extractUnfinished = (text) => {
|
|
135
|
-
const matches = [];
|
|
136
|
-
const normalized = stripLead(text);
|
|
137
|
-
const direct = normalized.match(/[你我](?:还)?(?:没|尚未)决定(.+)/u);
|
|
138
|
-
if (direct?.[1]) {
|
|
139
|
-
matches.push(`\u8FD8\u6CA1\u51B3\u5B9A${normalizeClause(direct[1])}`);
|
|
140
|
-
}
|
|
141
|
-
const uncertain = normalized.match(/[你我](?:还)?不确定(.+)/u);
|
|
142
|
-
if (uncertain?.[1]) {
|
|
143
|
-
matches.push(`\u8FD8\u4E0D\u786E\u5B9A${normalizeClause(uncertain[1])}`);
|
|
144
|
-
}
|
|
145
|
-
const notReady = normalized.match(/[你我](?:还)?没想好(.+)/u);
|
|
146
|
-
if (notReady?.[1]) {
|
|
147
|
-
matches.push(`\u8FD8\u6CA1\u60F3\u597D${normalizeClause(notReady[1])}`);
|
|
148
|
-
}
|
|
149
|
-
return matches;
|
|
150
|
-
};
|
|
151
|
-
var buildPatternKey = (facet, content) => `understanding:${facet}:${content.toLowerCase()}`;
|
|
152
|
-
var buildCandidate = (facet, content) => {
|
|
153
|
-
const normalized = normalizeClause(content);
|
|
154
|
-
if (!normalized || normalized.length < 6) return null;
|
|
155
|
-
const importance = facet === "unfinished" ? 0.91 : facet === "tension" ? 0.89 : facet === "preference" ? 0.84 : facet === "style" ? 0.8 : 0.82;
|
|
156
|
-
const confidence = facet === "unfinished" || facet === "tension" ? 0.76 : 0.72;
|
|
157
|
-
return {
|
|
158
|
-
facet,
|
|
159
|
-
content: normalized,
|
|
160
|
-
importance,
|
|
161
|
-
confidence,
|
|
162
|
-
patternKey: buildPatternKey(facet, normalized),
|
|
163
|
-
tags: [UNDERSTANDING_TAG, `memory-facet:${facet}`]
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
var extractUnderstandingMemoryCandidates = (input) => {
|
|
167
|
-
const texts = [
|
|
168
|
-
input.userInput,
|
|
169
|
-
...(input.trace ?? []).filter((message) => message.role === "assistant" || message.role === "user").map((message) => contentToText(message.content))
|
|
170
|
-
].map((value) => value.trim()).filter(Boolean);
|
|
171
|
-
const candidates = [];
|
|
172
|
-
for (const text of texts) {
|
|
173
|
-
for (const content of extractPreference(text)) {
|
|
174
|
-
const candidate = buildCandidate("preference", content);
|
|
175
|
-
if (candidate) candidates.push(candidate);
|
|
176
|
-
}
|
|
177
|
-
for (const content of extractStyle(text)) {
|
|
178
|
-
const candidate = buildCandidate("style", content);
|
|
179
|
-
if (candidate) candidates.push(candidate);
|
|
180
|
-
}
|
|
181
|
-
for (const content of extractGoal(text)) {
|
|
182
|
-
const candidate = buildCandidate("goal", content);
|
|
183
|
-
if (candidate) candidates.push(candidate);
|
|
184
|
-
}
|
|
185
|
-
for (const content of extractTension(text)) {
|
|
186
|
-
const candidate = buildCandidate("tension", content);
|
|
187
|
-
if (candidate) candidates.push(candidate);
|
|
188
|
-
}
|
|
189
|
-
for (const content of extractUnfinished(text)) {
|
|
190
|
-
const candidate = buildCandidate("unfinished", content);
|
|
191
|
-
if (candidate) candidates.push(candidate);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
const seen = /* @__PURE__ */ new Set();
|
|
195
|
-
return candidates.filter((candidate) => {
|
|
196
|
-
const key = `${candidate.facet}:${candidate.content.toLowerCase()}`;
|
|
197
|
-
if (seen.has(key)) return false;
|
|
198
|
-
seen.add(key);
|
|
199
|
-
return true;
|
|
200
|
-
});
|
|
201
|
-
};
|
|
202
|
-
var buildUnderstandingTarget = (input) => {
|
|
203
|
-
const target = resolveUserOrSpaceMemoryTarget(input);
|
|
204
|
-
return target ? buildAgentSubjectTarget(target, input.agentKey) : null;
|
|
205
|
-
};
|
|
206
|
-
var sameUnderstanding = (item, candidate, agentKey) => item.subjectType === "agent" && item.subjectId === agentKey && item.patternKey === candidate.patternKey;
|
|
207
|
-
var captureUnderstandingMemoryFromDialog = async (input) => {
|
|
208
|
-
const target = buildUnderstandingTarget(input);
|
|
209
|
-
if (!target) return;
|
|
210
|
-
const candidates = extractUnderstandingMemoryCandidates({
|
|
211
|
-
userInput: input.userInput,
|
|
212
|
-
trace: input.trace
|
|
213
|
-
});
|
|
214
|
-
if (candidates.length === 0) return;
|
|
215
|
-
const existing = await loadMemoryCandidatesFromDb(input.db, {
|
|
216
|
-
owners: [target.owner],
|
|
217
|
-
subjects: [{ subjectType: target.subjectType, subjectId: target.subjectId }],
|
|
218
|
-
kinds: ["episodic", "semantic"],
|
|
219
|
-
ownerLimit: 100
|
|
220
|
-
});
|
|
221
|
-
for (const candidate of candidates) {
|
|
222
|
-
const sameItems = existing.filter((item) => sameUnderstanding(item, candidate, input.agentKey));
|
|
223
|
-
const existingSemantic = sameItems.find((item) => item.kind === "semantic");
|
|
224
|
-
if (existingSemantic) continue;
|
|
225
|
-
const existingEpisode = sameItems.find((item) => item.kind === "episodic");
|
|
226
|
-
if (existingEpisode && existingEpisode.sourceDialogId && existingEpisode.sourceDialogId !== input.dialogId) {
|
|
227
|
-
const semantic = createMemoryItem({
|
|
228
|
-
ownerType: target.owner.ownerType,
|
|
229
|
-
ownerId: target.owner.ownerId,
|
|
230
|
-
visibility: target.visibility,
|
|
231
|
-
subjectType: target.subjectType,
|
|
232
|
-
subjectId: target.subjectId,
|
|
233
|
-
kind: "semantic",
|
|
234
|
-
content: candidate.content,
|
|
235
|
-
facet: candidate.facet,
|
|
236
|
-
importance: Math.min(0.95, candidate.importance + 0.03),
|
|
237
|
-
confidence: Math.min(0.86, candidate.confidence + 0.06),
|
|
238
|
-
tags: [...candidate.tags, "consolidated-understanding"],
|
|
239
|
-
patternKey: candidate.patternKey,
|
|
240
|
-
sourceDialogId: input.dialogId
|
|
241
|
-
});
|
|
242
|
-
await writeMemoryItemWithIndexesToDb(input.db, semantic);
|
|
243
|
-
existing.push(semantic);
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
if (existingEpisode && existingEpisode.sourceDialogId === input.dialogId) {
|
|
247
|
-
continue;
|
|
248
|
-
}
|
|
249
|
-
const episodic = createMemoryItem({
|
|
250
|
-
ownerType: target.owner.ownerType,
|
|
251
|
-
ownerId: target.owner.ownerId,
|
|
252
|
-
visibility: target.visibility,
|
|
253
|
-
subjectType: target.subjectType,
|
|
254
|
-
subjectId: target.subjectId,
|
|
255
|
-
kind: "episodic",
|
|
256
|
-
content: candidate.content,
|
|
257
|
-
facet: candidate.facet,
|
|
258
|
-
importance: candidate.importance,
|
|
259
|
-
confidence: candidate.confidence,
|
|
260
|
-
tags: candidate.tags,
|
|
261
|
-
patternKey: candidate.patternKey,
|
|
262
|
-
sourceDialogId: input.dialogId
|
|
263
|
-
});
|
|
264
|
-
await writeMemoryItemWithIndexesToDb(input.db, episodic);
|
|
265
|
-
existing.push(episodic);
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
export {
|
|
269
|
-
captureUnderstandingMemoryFromDialog,
|
|
270
|
-
extractUnderstandingMemoryCandidates
|
|
271
|
-
};
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
asNonEmptyStringArray
|
|
6
6
|
} from "./chunk-I42VC5KR.js";
|
|
7
|
-
import {
|
|
8
|
-
isRecord
|
|
9
|
-
} from "./chunk-KUG52IAP.js";
|
|
10
7
|
import {
|
|
11
8
|
asTrimmedString
|
|
12
9
|
} from "./chunk-3EUW3WEO.js";
|
|
13
10
|
import {
|
|
14
11
|
asOptionalPositiveFiniteNumber
|
|
15
12
|
} from "./chunk-U6VC4MU4.js";
|
|
13
|
+
import {
|
|
14
|
+
isRecord
|
|
15
|
+
} from "./chunk-KUG52IAP.js";
|
|
16
16
|
|
|
17
17
|
// packages/agent-runtime/fileCredentialBroker.ts
|
|
18
18
|
import {
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
getIsDesktopApp,
|
|
4
4
|
isAbortError
|
|
5
5
|
} from "./chunk-OOSFSFMA.js";
|
|
6
|
-
import {
|
|
7
|
-
isRecord
|
|
8
|
-
} from "./chunk-KUG52IAP.js";
|
|
9
6
|
import {
|
|
10
7
|
asTrimmedString
|
|
11
8
|
} from "./chunk-3EUW3WEO.js";
|
|
12
9
|
import {
|
|
13
10
|
asOptionalPositiveFiniteNumber
|
|
14
11
|
} from "./chunk-U6VC4MU4.js";
|
|
12
|
+
import {
|
|
13
|
+
isRecord
|
|
14
|
+
} from "./chunk-KUG52IAP.js";
|
|
15
15
|
import {
|
|
16
16
|
API_ENDPOINTS,
|
|
17
17
|
SERVERS,
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
asOptionalFiniteNumber
|
|
9
9
|
} from "./chunk-WWC7I6TA.js";
|
|
10
|
-
import {
|
|
11
|
-
isRecord
|
|
12
|
-
} from "./chunk-KUG52IAP.js";
|
|
13
10
|
import {
|
|
14
11
|
asTrimmedString
|
|
15
12
|
} from "./chunk-3EUW3WEO.js";
|
|
13
|
+
import {
|
|
14
|
+
isRecord
|
|
15
|
+
} from "./chunk-KUG52IAP.js";
|
|
16
16
|
|
|
17
17
|
// packages/cli/oauth/callback-server.ts
|
|
18
18
|
import { createServer } from "node:http";
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
asTrimmedLowercaseString
|
|
6
6
|
} from "./chunk-QSJ3HFEF.js";
|
|
7
|
-
import {
|
|
8
|
-
isRecord
|
|
9
|
-
} from "./chunk-KUG52IAP.js";
|
|
10
7
|
import {
|
|
11
8
|
asTrimmedString
|
|
12
9
|
} from "./chunk-3EUW3WEO.js";
|
|
10
|
+
import {
|
|
11
|
+
isRecord
|
|
12
|
+
} from "./chunk-KUG52IAP.js";
|
|
13
13
|
import {
|
|
14
14
|
normalizeServerOrigin
|
|
15
15
|
} from "./chunk-CF7PE763.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
asOptionalFiniteNumber
|
|
3
3
|
} from "./chunk-WWC7I6TA.js";
|
|
4
|
-
import {
|
|
5
|
-
isRecord
|
|
6
|
-
} from "./chunk-KUG52IAP.js";
|
|
7
4
|
import {
|
|
8
5
|
asTrimmedString
|
|
9
6
|
} from "./chunk-3EUW3WEO.js";
|
|
7
|
+
import {
|
|
8
|
+
isRecord
|
|
9
|
+
} from "./chunk-KUG52IAP.js";
|
|
10
10
|
import {
|
|
11
11
|
asOptionalTrimmedString
|
|
12
12
|
} from "./chunk-G3SUCT4W.js";
|