open-agents-ai 0.185.58 → 0.185.60
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
CHANGED
|
@@ -40431,6 +40431,23 @@ function saveSessionContext(repoRoot, entry) {
|
|
|
40431
40431
|
}
|
|
40432
40432
|
ctx.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
40433
40433
|
writeFileSync15(filePath, JSON.stringify(ctx, null, 2) + "\n", "utf-8");
|
|
40434
|
+
try {
|
|
40435
|
+
const diaryLines = ["# Session Diary", ""];
|
|
40436
|
+
for (const e of ctx.entries.slice(-10)) {
|
|
40437
|
+
const date = e.savedAt ? new Date(e.savedAt).toISOString().slice(0, 16).replace("T", " ") : "unknown";
|
|
40438
|
+
const status = e.completed ? "\u2713" : "\u25CB";
|
|
40439
|
+
const task = (e.task || "untitled").slice(0, 120);
|
|
40440
|
+
diaryLines.push(`## ${date} \u2014 ${task} ${status}`);
|
|
40441
|
+
if (e.filesModified?.length) {
|
|
40442
|
+
diaryLines.push(`Files: ${e.filesModified.slice(0, 5).join(", ")}${e.filesModified.length > 5 ? ` (+${e.filesModified.length - 5} more)` : ""}`);
|
|
40443
|
+
}
|
|
40444
|
+
if (e.summary)
|
|
40445
|
+
diaryLines.push(`Summary: ${e.summary.slice(0, 200)}`);
|
|
40446
|
+
diaryLines.push("");
|
|
40447
|
+
}
|
|
40448
|
+
writeFileSync15(join53(contextDir, "session-diary.md"), diaryLines.join("\n"), "utf-8");
|
|
40449
|
+
} catch {
|
|
40450
|
+
}
|
|
40434
40451
|
}
|
|
40435
40452
|
function loadSessionContext(repoRoot) {
|
|
40436
40453
|
const filePath = join53(repoRoot, OA_DIR, "context", CONTEXT_SAVE_FILE);
|
|
@@ -54226,19 +54243,24 @@ ${ctx.memoryContext}
|
|
|
54226
54243
|
|
|
54227
54244
|
Use this context to avoid re-learning known patterns. Update with memory_write if you discover new insights.`);
|
|
54228
54245
|
}
|
|
54229
|
-
if (
|
|
54230
|
-
if (
|
|
54246
|
+
if (ctx.sessionHistory) {
|
|
54247
|
+
if (modelTier === "small") {
|
|
54248
|
+
const compactHistory = ctx.sessionHistory.split("\n").slice(0, 6).join("\n");
|
|
54249
|
+
sections.push(`## Session History
|
|
54250
|
+
|
|
54251
|
+
${compactHistory}`);
|
|
54252
|
+
} else {
|
|
54231
54253
|
sections.push(`## Session History
|
|
54232
54254
|
|
|
54233
54255
|
${ctx.sessionHistory}`);
|
|
54234
54256
|
}
|
|
54235
|
-
|
|
54236
|
-
|
|
54257
|
+
}
|
|
54258
|
+
if (modelTier !== "small" && ctx.taskMemories) {
|
|
54259
|
+
sections.push(`## Cross-Session Task Memory
|
|
54237
54260
|
|
|
54238
54261
|
${ctx.taskMemories}
|
|
54239
54262
|
|
|
54240
54263
|
Use this history to avoid re-doing completed work and to learn from past approaches.`);
|
|
54241
|
-
}
|
|
54242
54264
|
}
|
|
54243
54265
|
if (ctx.failurePatterns) {
|
|
54244
54266
|
sections.push(`## Known Failure Patterns
|
|
@@ -65611,8 +65633,8 @@ function ollamaRequest(ollamaUrl, path, method, body) {
|
|
|
65611
65633
|
});
|
|
65612
65634
|
});
|
|
65613
65635
|
});
|
|
65614
|
-
proxyReq.setTimeout(
|
|
65615
|
-
proxyReq.destroy(new Error("Backend request timeout (
|
|
65636
|
+
proxyReq.setTimeout(12e4, () => {
|
|
65637
|
+
proxyReq.destroy(new Error("Backend request timeout (120s)"));
|
|
65616
65638
|
});
|
|
65617
65639
|
proxyReq.on("error", reject);
|
|
65618
65640
|
if (body)
|
|
@@ -65640,8 +65662,8 @@ function ollamaStream(ollamaUrl, path, method, body, onData, onEnd, onError) {
|
|
|
65640
65662
|
proxyRes.on("data", onData);
|
|
65641
65663
|
proxyRes.on("end", onEnd);
|
|
65642
65664
|
});
|
|
65643
|
-
proxyReq.setTimeout(
|
|
65644
|
-
proxyReq.destroy(new Error("Backend stream timeout (
|
|
65665
|
+
proxyReq.setTimeout(12e4, () => {
|
|
65666
|
+
proxyReq.destroy(new Error("Backend stream timeout (120s)"));
|
|
65645
65667
|
});
|
|
65646
65668
|
proxyReq.on("error", onError);
|
|
65647
65669
|
if (body)
|
|
@@ -71132,6 +71154,10 @@ Summarize or analyze this transcription as appropriate.`;
|
|
|
71132
71154
|
|
|
71133
71155
|
NEW TASK: ${fullInput}`;
|
|
71134
71156
|
restoredSessionContext = null;
|
|
71157
|
+
} else if (existsSync54(join71(repoRoot, ".oa", "context", "session-diary.md"))) {
|
|
71158
|
+
taskInput = `[Previous sessions exist \u2014 file_read(".oa/context/session-diary.md") to recall]
|
|
71159
|
+
|
|
71160
|
+
${fullInput}`;
|
|
71135
71161
|
}
|
|
71136
71162
|
try {
|
|
71137
71163
|
statusBar.setProcessing(true);
|
package/package.json
CHANGED
|
@@ -80,7 +80,7 @@ You are **Open Agent** (open-agents-ai), an autonomous AI coding agent running o
|
|
|
80
80
|
- Code: read, write, edit, search, patch files across any language
|
|
81
81
|
- Shell: run any command — tests, builds, git, npm, docker, etc.
|
|
82
82
|
- Web: search documentation and fetch web pages
|
|
83
|
-
- Memory: persistent cross-session knowledge (memory_read/memory_write)
|
|
83
|
+
- Memory: persistent cross-session knowledge (memory_read/memory_write). Your memories live in .oa/memory/ — use memory_read(topic) to recall, memory_write(topic, key, value) to save insights for future sessions. Session history: file_read(".oa/context/session-diary.md")
|
|
84
84
|
- Skills: 250+ behavioral skills (skill_list), build new ones (skill_build)
|
|
85
85
|
- P2P: nexus agent mesh — ALWAYS call nexus(action='connect') FIRST, then join_room/send_message/discover_peers/expose
|
|
86
86
|
- Background tasks: run long commands in background, check status later
|
|
@@ -25,6 +25,7 @@ Rules:
|
|
|
25
25
|
- Use list_directory for directories, NOT file_read. Prefer list_directory over shell ls.
|
|
26
26
|
- You are **Open Agent** (open-agents-ai) — an AI coding agent running locally via Ollama/vLLM. No cloud APIs.
|
|
27
27
|
- Core: code editing, shell commands, web search, memory, 250+ skills (skill_list), P2P mesh (nexus — call connect FIRST), background tasks.
|
|
28
|
+
- Memory: your persistent memories live in .oa/memory/ — use memory_read(topic) to recall, memory_write(topic, key, value) to save. Session history: file_read(".oa/context/session-diary.md")
|
|
28
29
|
- When asked "what can you do?", use explore_tools() and skill_list() to discover and report your actual capabilities. Do NOT hallucinate.
|
|
29
30
|
|
|
30
31
|
Debugging — OBSERVE before reasoning:
|