@townco/agent 0.1.108 → 0.1.110

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
- if (needsKnowledgeGraphAnalysis) {
207
- const apiUrl = process.env.LIBRARY_API_URL;
208
- const apiKey = process.env.LIBRARY_API_KEY;
209
- logger.info("Attempting to dispatch to Library API", {
210
- hasApiUrl: !!apiUrl,
211
- hasApiKey: !!apiKey,
212
- });
213
- if (apiUrl && apiKey) {
214
- const serviceUrl = `${apiUrl}/compaction_analysis`;
215
- // Fire-and-forget - don't block compaction on external service
216
- fetch(serviceUrl, {
217
- method: "POST",
218
- headers: {
219
- "Content-Type": "application/json",
220
- Authorization: `Bearer ${apiKey}`,
221
- },
222
- body: JSON.stringify({
223
- conversation_text: conversationText,
224
- timestamp: Date.now(),
225
- }),
226
- })
227
- .then((response) => {
228
- logger.info("Library API response received", {
229
- status: response.status,
230
- ok: response.ok,
231
- });
232
- })
233
- .catch((error) => logger.error("Failed to send compaction for analysis", {
234
- error: error instanceof Error ? error.message : String(error),
235
- }));
236
- }
237
- else {
238
- logger.warn("Skipping Library API dispatch - missing config", {
239
- hasApiUrl: !!apiUrl,
240
- hasApiKey: !!apiKey,
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,