@townco/agent 0.1.108 → 0.1.109
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.
|
@@ -352,7 +352,8 @@ export class AgentAcpAdapter {
|
|
|
352
352
|
// These return structured data with document_url, title, summary, document_id, etc.
|
|
353
353
|
const isLibraryTool = toolName.startsWith("library__") ||
|
|
354
354
|
toolName.includes("get_document") ||
|
|
355
|
-
toolName.includes("retrieve_document")
|
|
355
|
+
toolName.includes("retrieve_document") ||
|
|
356
|
+
toolName.includes("bibliotecha");
|
|
356
357
|
logger.info("Library tool check", {
|
|
357
358
|
toolName,
|
|
358
359
|
isLibraryTool,
|
|
@@ -203,44 +203,46 @@ Please provide your summary based on the conversation above, following this stru
|
|
|
203
203
|
const kgMatch = summaryText.match(/<knowledge_graph_analysis_needed>(yes|no)<\/knowledge_graph_analysis_needed>/i);
|
|
204
204
|
needsKnowledgeGraphAnalysis = kgMatch?.[1]?.toLowerCase() === "yes";
|
|
205
205
|
logger.info(`Knowledge graph analysis decision: needsAnalysis=${needsKnowledgeGraphAnalysis}, matchFound=${!!kgMatch}`);
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
206
|
+
// TODO: Re-enable graph analysis dispatch when ready
|
|
207
|
+
// if (needsKnowledgeGraphAnalysis) {
|
|
208
|
+
// const apiUrl = process.env.LIBRARY_API_URL;
|
|
209
|
+
// const apiKey = process.env.LIBRARY_API_KEY;
|
|
210
|
+
// logger.info("Attempting to dispatch to Library API", {
|
|
211
|
+
// hasApiUrl: !!apiUrl,
|
|
212
|
+
// hasApiKey: !!apiKey,
|
|
213
|
+
// });
|
|
214
|
+
// if (apiUrl && apiKey) {
|
|
215
|
+
// const serviceUrl = `${apiUrl}/compaction_analysis`;
|
|
216
|
+
// // Fire-and-forget - don't block compaction on external service
|
|
217
|
+
// fetch(serviceUrl, {
|
|
218
|
+
// method: "POST",
|
|
219
|
+
// headers: {
|
|
220
|
+
// "Content-Type": "application/json",
|
|
221
|
+
// Authorization: `Bearer ${apiKey}`,
|
|
222
|
+
// },
|
|
223
|
+
// body: JSON.stringify({
|
|
224
|
+
// conversation_text: conversationText,
|
|
225
|
+
// timestamp: Date.now(),
|
|
226
|
+
// }),
|
|
227
|
+
// })
|
|
228
|
+
// .then((response) => {
|
|
229
|
+
// logger.info("Library API response received", {
|
|
230
|
+
// status: response.status,
|
|
231
|
+
// ok: response.ok,
|
|
232
|
+
// });
|
|
233
|
+
// })
|
|
234
|
+
// .catch((error) =>
|
|
235
|
+
// logger.error("Failed to send compaction for analysis", {
|
|
236
|
+
// error: error instanceof Error ? error.message : String(error),
|
|
237
|
+
// }),
|
|
238
|
+
// );
|
|
239
|
+
// } else {
|
|
240
|
+
// logger.warn("Skipping Library API dispatch - missing config", {
|
|
241
|
+
// hasApiUrl: !!apiUrl,
|
|
242
|
+
// hasApiKey: !!apiKey,
|
|
243
|
+
// });
|
|
244
|
+
// }
|
|
245
|
+
// }
|
|
244
246
|
}
|
|
245
247
|
return {
|
|
246
248
|
newContextEntry,
|