open-agents-ai 0.187.588 → 0.187.589
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/dist/index.js +125 -7
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -588317,19 +588317,21 @@ After synthesis, call task_complete with the final prioritized summary.`,
|
|
|
588317
588317
|
new GrepSearchTool(this.repoRoot),
|
|
588318
588318
|
new GlobFindTool(this.repoRoot),
|
|
588319
588319
|
new MemoryReadTool(this.repoRoot),
|
|
588320
|
-
new MemorySearchTool(this.repoRoot)
|
|
588320
|
+
new MemorySearchTool(this.repoRoot),
|
|
588321
|
+
new MemoryWriteTool(this.repoRoot)
|
|
588321
588322
|
];
|
|
588322
|
-
return [...tools.map(adaptTool2), taskComplete];
|
|
588323
|
+
return [...tools.map(adaptTool2), this.createDreamTodoWriteTool(), this.createDreamWorkingNotesTool(), taskComplete];
|
|
588323
588324
|
}
|
|
588324
588325
|
case "monitor": {
|
|
588325
588326
|
const tools = [
|
|
588326
588327
|
new FileReadTool(this.repoRoot),
|
|
588327
588328
|
new DreamShellTool(this.repoRoot),
|
|
588328
588329
|
// read-only shell
|
|
588329
|
-
new AutoresearchTool(this.repoRoot)
|
|
588330
|
+
new AutoresearchTool(this.repoRoot),
|
|
588330
588331
|
// status-only in prompt
|
|
588332
|
+
new MemoryReadTool(this.repoRoot)
|
|
588331
588333
|
];
|
|
588332
|
-
return [...tools.map(adaptTool2), taskComplete];
|
|
588334
|
+
return [...tools.map(adaptTool2), this.createDreamTodoWriteTool(), taskComplete];
|
|
588333
588335
|
}
|
|
588334
588336
|
case "evaluator": {
|
|
588335
588337
|
const tools = [
|
|
@@ -588341,7 +588343,7 @@ After synthesis, call task_complete with the final prioritized summary.`,
|
|
|
588341
588343
|
new MemoryWriteTool(this.repoRoot),
|
|
588342
588344
|
new GrepSearchTool(this.repoRoot)
|
|
588343
588345
|
];
|
|
588344
|
-
return [...tools.map(adaptTool2), taskComplete];
|
|
588346
|
+
return [...tools.map(adaptTool2), this.createDreamTodoWriteTool(), this.createDreamWorkingNotesTool(), taskComplete];
|
|
588345
588347
|
}
|
|
588346
588348
|
case "critic": {
|
|
588347
588349
|
const tools = [
|
|
@@ -588350,7 +588352,7 @@ After synthesis, call task_complete with the final prioritized summary.`,
|
|
|
588350
588352
|
new MemorySearchTool(this.repoRoot),
|
|
588351
588353
|
new GrepSearchTool(this.repoRoot)
|
|
588352
588354
|
];
|
|
588353
|
-
return [...tools.map(adaptTool2), taskComplete];
|
|
588355
|
+
return [...tools.map(adaptTool2), this.createDreamTodoWriteTool(), taskComplete];
|
|
588354
588356
|
}
|
|
588355
588357
|
case "flow_maintainer": {
|
|
588356
588358
|
const tools = [
|
|
@@ -588358,7 +588360,7 @@ After synthesis, call task_complete with the final prioritized summary.`,
|
|
|
588358
588360
|
new MemoryWriteTool(this.repoRoot),
|
|
588359
588361
|
new MemorySearchTool(this.repoRoot)
|
|
588360
588362
|
];
|
|
588361
|
-
return [...tools.map(adaptTool2), taskComplete];
|
|
588363
|
+
return [...tools.map(adaptTool2), this.createDreamTodoWriteTool(), this.createDreamWorkingNotesTool(), taskComplete];
|
|
588362
588364
|
}
|
|
588363
588365
|
}
|
|
588364
588366
|
}
|
|
@@ -588735,6 +588737,13 @@ ${summaryResult}
|
|
|
588735
588737
|
}
|
|
588736
588738
|
/** Build tools appropriate for the dream mode */
|
|
588737
588739
|
buildDreamTools(toolMode) {
|
|
588740
|
+
const memoryAndPlanTools = [
|
|
588741
|
+
new MemoryReadTool(this.repoRoot),
|
|
588742
|
+
new MemoryWriteTool(this.repoRoot),
|
|
588743
|
+
new MemorySearchTool(this.repoRoot)
|
|
588744
|
+
].map(adaptTool2);
|
|
588745
|
+
const todoWriteTool = this.createDreamTodoWriteTool();
|
|
588746
|
+
const workingNotesTool = this.createDreamWorkingNotesTool();
|
|
588738
588747
|
if (toolMode === "full") {
|
|
588739
588748
|
const tools = [
|
|
588740
588749
|
new FileReadTool(this.repoRoot),
|
|
@@ -588752,6 +588761,9 @@ ${summaryResult}
|
|
|
588752
588761
|
];
|
|
588753
588762
|
return [
|
|
588754
588763
|
...tools.map(adaptTool2),
|
|
588764
|
+
...memoryAndPlanTools,
|
|
588765
|
+
todoWriteTool,
|
|
588766
|
+
workingNotesTool,
|
|
588755
588767
|
this.createTaskCompleteTool()
|
|
588756
588768
|
];
|
|
588757
588769
|
}
|
|
@@ -588772,9 +588784,113 @@ ${summaryResult}
|
|
|
588772
588784
|
return [
|
|
588773
588785
|
...readTools.map(adaptTool2),
|
|
588774
588786
|
...dreamWriteTools.map(adaptTool2),
|
|
588787
|
+
...memoryAndPlanTools,
|
|
588788
|
+
todoWriteTool,
|
|
588789
|
+
workingNotesTool,
|
|
588775
588790
|
this.createTaskCompleteTool()
|
|
588776
588791
|
];
|
|
588777
588792
|
}
|
|
588793
|
+
/** Dream-scoped todo_write — persists to .oa/dreams/todo-state.json */
|
|
588794
|
+
createDreamTodoWriteTool() {
|
|
588795
|
+
const todoPath3 = join114(this.dreamsDir, "todo-state.json");
|
|
588796
|
+
return {
|
|
588797
|
+
name: "todo_write",
|
|
588798
|
+
description: "Update the task checklist for this dream session. Mark items in_progress/completed/pending as you work through stages.",
|
|
588799
|
+
parameters: {
|
|
588800
|
+
type: "object",
|
|
588801
|
+
properties: {
|
|
588802
|
+
todos: {
|
|
588803
|
+
type: "array",
|
|
588804
|
+
description: "Full list of todo items for this dream session",
|
|
588805
|
+
items: {
|
|
588806
|
+
type: "object",
|
|
588807
|
+
properties: {
|
|
588808
|
+
id: { type: "string", description: "Stable id for this item" },
|
|
588809
|
+
content: { type: "string", description: "What needs to be done" },
|
|
588810
|
+
status: { type: "string", enum: ["pending", "in_progress", "completed", "blocked"] }
|
|
588811
|
+
},
|
|
588812
|
+
required: ["content", "status"]
|
|
588813
|
+
}
|
|
588814
|
+
}
|
|
588815
|
+
},
|
|
588816
|
+
required: ["todos"]
|
|
588817
|
+
},
|
|
588818
|
+
async execute(args) {
|
|
588819
|
+
const todos = args["todos"];
|
|
588820
|
+
if (!Array.isArray(todos)) {
|
|
588821
|
+
return { success: false, output: "", error: "todos must be an array" };
|
|
588822
|
+
}
|
|
588823
|
+
try {
|
|
588824
|
+
writeFileSync52(todoPath3, JSON.stringify({ todos, updatedAt: (/* @__PURE__ */ new Date()).toISOString() }, null, 2), "utf-8");
|
|
588825
|
+
const summary = todos.map(
|
|
588826
|
+
(t2, i2) => ` ${t2.status === "completed" ? "✓" : t2.status === "in_progress" ? "▶" : "◯"} ${i2 + 1}: ${t2.content || "(untitled)"}`
|
|
588827
|
+
).join("\n");
|
|
588828
|
+
return { success: true, output: `Todo list updated (${todos.length} items):
|
|
588829
|
+
${summary}` };
|
|
588830
|
+
} catch (err) {
|
|
588831
|
+
return { success: false, output: "", error: String(err) };
|
|
588832
|
+
}
|
|
588833
|
+
}
|
|
588834
|
+
};
|
|
588835
|
+
}
|
|
588836
|
+
/** Dream-scoped working_notes — persists to .oa/dreams/working-notes.json */
|
|
588837
|
+
createDreamWorkingNotesTool() {
|
|
588838
|
+
const notesPath = join114(this.dreamsDir, "working-notes.json");
|
|
588839
|
+
return {
|
|
588840
|
+
name: "working_notes",
|
|
588841
|
+
description: "Track discoveries, decisions, and findings across dream stages. Notes persist within this dream session.",
|
|
588842
|
+
parameters: {
|
|
588843
|
+
type: "object",
|
|
588844
|
+
properties: {
|
|
588845
|
+
action: {
|
|
588846
|
+
type: "string",
|
|
588847
|
+
enum: ["add", "list", "search", "clear", "summary"],
|
|
588848
|
+
description: "Action to perform (default: list)"
|
|
588849
|
+
},
|
|
588850
|
+
content: { type: "string", description: "Note content (for add action)" },
|
|
588851
|
+
category: {
|
|
588852
|
+
type: "string",
|
|
588853
|
+
enum: ["finding", "todo", "question", "decision", "blocker"],
|
|
588854
|
+
description: "Note category (for add action, default: finding)"
|
|
588855
|
+
}
|
|
588856
|
+
}
|
|
588857
|
+
},
|
|
588858
|
+
async execute(args) {
|
|
588859
|
+
const action = args["action"] || "list";
|
|
588860
|
+
try {
|
|
588861
|
+
let notes2 = [];
|
|
588862
|
+
if (existsSync97(notesPath)) {
|
|
588863
|
+
notes2 = JSON.parse(readFileSync80(notesPath, "utf-8"));
|
|
588864
|
+
}
|
|
588865
|
+
if (action === "add") {
|
|
588866
|
+
const note = {
|
|
588867
|
+
content: String(args["content"] ?? ""),
|
|
588868
|
+
category: String(args["category"] ?? "finding"),
|
|
588869
|
+
addedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
588870
|
+
};
|
|
588871
|
+
notes2.push(note);
|
|
588872
|
+
writeFileSync52(notesPath, JSON.stringify(notes2, null, 2), "utf-8");
|
|
588873
|
+
return { success: true, output: `Note added: [${note.category}] ${note.content.slice(0, 80)}` };
|
|
588874
|
+
}
|
|
588875
|
+
if (action === "clear") {
|
|
588876
|
+
writeFileSync52(notesPath, "[]", "utf-8");
|
|
588877
|
+
return { success: true, output: "All notes cleared." };
|
|
588878
|
+
}
|
|
588879
|
+
if (action === "search") {
|
|
588880
|
+
const q = String(args["content"] ?? "").toLowerCase();
|
|
588881
|
+
const matches = notes2.filter((n2) => n2.content.toLowerCase().includes(q));
|
|
588882
|
+
return { success: true, output: matches.length ? matches.map((n2) => `[${n2.category}] ${n2.content}`).join("\n") : "No matching notes." };
|
|
588883
|
+
}
|
|
588884
|
+
if (notes2.length === 0) {
|
|
588885
|
+
return { success: true, output: "No working notes yet." };
|
|
588886
|
+
}
|
|
588887
|
+
return { success: true, output: notes2.map((n2) => `[${n2.category}] ${n2.content}`).join("\n") };
|
|
588888
|
+
} catch (err) {
|
|
588889
|
+
return { success: false, output: "", error: String(err) };
|
|
588890
|
+
}
|
|
588891
|
+
}
|
|
588892
|
+
};
|
|
588893
|
+
}
|
|
588778
588894
|
createTaskCompleteTool() {
|
|
588779
588895
|
return {
|
|
588780
588896
|
name: "task_complete",
|
|
@@ -588954,6 +589070,8 @@ ${files.map((f2) => `- [\`${f2}\`](./${f2})`).join("\n")}
|
|
|
588954
589070
|
parameters: t2.parameters,
|
|
588955
589071
|
execute: t2.execute.bind(t2)
|
|
588956
589072
|
}));
|
|
589073
|
+
tools.push(this.createDreamTodoWriteTool());
|
|
589074
|
+
tools.push(this.createDreamWorkingNotesTool());
|
|
588957
589075
|
tools.push({
|
|
588958
589076
|
name: "task_complete",
|
|
588959
589077
|
description: "Signal consolidation is done. Args: {summary: string}",
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-agents-ai",
|
|
3
|
-
"version": "0.187.
|
|
3
|
+
"version": "0.187.589",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "open-agents-ai",
|
|
9
|
-
"version": "0.187.
|
|
9
|
+
"version": "0.187.589",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED