create-loopengine 0.1.16 → 0.1.17
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/package.json
CHANGED
|
@@ -524,6 +524,13 @@ async function handleHttpToolPost(req: IncomingMessage, res: ServerResponse, age
|
|
|
524
524
|
return
|
|
525
525
|
}
|
|
526
526
|
|
|
527
|
+
// Resolved *before* createHttpTool writes anything to disk. Reading it
|
|
528
|
+
// after would risk a cold import of the freshly-written tools/index.ts
|
|
529
|
+
// (folder-form agents don't cache config.tools) — which already contains
|
|
530
|
+
// the new tool by then, so the ...currentTools, tool below would append
|
|
531
|
+
// it a second time.
|
|
532
|
+
const currentTools = entry.config.tools ?? (await loadDefaultTools(entry.config))
|
|
533
|
+
|
|
527
534
|
let tool: ToolDefinition
|
|
528
535
|
try {
|
|
529
536
|
const result = await createHttpTool(agentName, parsed.value)
|
|
@@ -534,7 +541,6 @@ async function handleHttpToolPost(req: IncomingMessage, res: ServerResponse, age
|
|
|
534
541
|
return
|
|
535
542
|
}
|
|
536
543
|
|
|
537
|
-
const currentTools = entry.config.tools ?? (await loadDefaultTools(entry.config))
|
|
538
544
|
updateAgent(agentName, { config: { tools: [...currentTools, tool] } })
|
|
539
545
|
|
|
540
546
|
if (parsed.decision) {
|