@vincentwei1021/synapse-openclaw-plugin 0.5.0 → 0.5.2
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincentwei1021/synapse-openclaw-plugin",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "OpenClaw plugin for Synapse research orchestration — SSE notifications, MCP tools, experiment lifecycle, autonomous loop",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/event-router.ts
CHANGED
|
@@ -148,6 +148,9 @@ export class SynapseEventRouter {
|
|
|
148
148
|
case "deep_research_requested":
|
|
149
149
|
this.handleDeepResearchRequested(notification);
|
|
150
150
|
break;
|
|
151
|
+
case "auto_search_triggered":
|
|
152
|
+
this.handleAutoSearchTriggered(notification);
|
|
153
|
+
break;
|
|
151
154
|
case "experiment_report_requested":
|
|
152
155
|
this.handleExperimentReportRequested(notification);
|
|
153
156
|
break;
|
|
@@ -312,10 +315,10 @@ export class SynapseEventRouter {
|
|
|
312
315
|
The experiment queue is empty. Your task:
|
|
313
316
|
1. Use synapse_get_project_full_context with researchProjectUuid "${projectUuid}" to review all project details, research questions, and experiment results
|
|
314
317
|
2. Analyze: What questions remain unanswered? What experiments could yield new insights? Are there gaps in the research?
|
|
315
|
-
3. If you identify valuable next steps, use synapse_propose_experiment to create
|
|
318
|
+
3. If you identify valuable next steps, use synapse_propose_experiment to create experiments in pending_review for human review
|
|
316
319
|
4. If the research objectives appear to be met, you may choose not to propose any new experiments
|
|
317
320
|
|
|
318
|
-
Proposed experiments will enter "
|
|
321
|
+
Proposed experiments will enter "pending_review" status and require human approval before execution.`,
|
|
319
322
|
{ notificationUuid: n.uuid, action: "autonomous_loop_triggered", entityUuid: n.entityUuid, projectUuid }
|
|
320
323
|
);
|
|
321
324
|
}
|
|
@@ -334,6 +337,23 @@ Proposed experiments will enter "draft" status and require human approval before
|
|
|
334
337
|
);
|
|
335
338
|
}
|
|
336
339
|
|
|
340
|
+
private handleAutoSearchTriggered(n: NotificationDetail): void {
|
|
341
|
+
const projectUuid = n.projectUuid ?? n.researchProjectUuid ?? "";
|
|
342
|
+
|
|
343
|
+
this.triggerAgent(
|
|
344
|
+
`[Synapse] Paper search requested for project "${n.entityTitle}" (projectUuid: ${projectUuid}).
|
|
345
|
+
|
|
346
|
+
Search for academic papers related to this research project:
|
|
347
|
+
1. Use synapse_get_related_works with researchProjectUuid "${projectUuid}" to see what papers are already collected — avoid searching for topics already well-covered
|
|
348
|
+
2. Use synapse_get_project_full_context with researchProjectUuid "${projectUuid}" to understand the research objectives, datasets, and methods
|
|
349
|
+
3. Based on the project context and gaps in existing papers, use synapse_search_papers to find new relevant academic papers
|
|
350
|
+
4. For each relevant paper found, use synapse_add_related_work with researchProjectUuid "${projectUuid}" to add it (duplicates are automatically skipped — if isNew=false, the paper already existed)
|
|
351
|
+
5. Search with multiple query variations to maximize coverage, but call synapse_search_papers sequentially (one at a time) to avoid rate limits
|
|
352
|
+
6. Focus on papers that fill gaps not covered by existing related works`,
|
|
353
|
+
{ notificationUuid: n.uuid, action: "auto_search_triggered", entityUuid: n.entityUuid, projectUuid }
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
|
|
337
357
|
private handleExperimentReportRequested(n: NotificationDetail): void {
|
|
338
358
|
const projectUuid = n.projectUuid ?? n.researchProjectUuid ?? "";
|
|
339
359
|
|
|
@@ -265,7 +265,7 @@ export const commonToolDefinitions = defineOpenClawTools([
|
|
|
265
265
|
priority?: string;
|
|
266
266
|
}>({
|
|
267
267
|
name: "synapse_propose_experiment",
|
|
268
|
-
description: "Propose a new experiment for human review (created in
|
|
268
|
+
description: "Propose a new experiment for human review (created in pending_review status). Only usable when autonomous loop is active.",
|
|
269
269
|
parameters: {
|
|
270
270
|
type: "object",
|
|
271
271
|
properties: {
|