open-agents-ai 0.187.21 → 0.187.23
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 +34 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -295141,6 +295141,22 @@ var init_dmn_engine = __esm({
|
|
|
295141
295141
|
recentTaskSummaries = [];
|
|
295142
295142
|
/** Maximum consecutive null cycles before entering extended rest */
|
|
295143
295143
|
maxConsecutiveNulls = 3;
|
|
295144
|
+
/** TUI writeContent callback — wraps stdout writes in scroll buffer management.
|
|
295145
|
+
* Set via setWriteContent() from interactive.ts. Without it, DMN output
|
|
295146
|
+
* bypasses the scroll buffer and disappears on scroll. */
|
|
295147
|
+
_writeContent = null;
|
|
295148
|
+
/** Set the TUI writeContent callback so DMN output goes through the scroll buffer */
|
|
295149
|
+
setWriteContent(fn) {
|
|
295150
|
+
this._writeContent = fn;
|
|
295151
|
+
}
|
|
295152
|
+
/** Write to TUI — uses writeContent if available, falls back to direct stdout */
|
|
295153
|
+
write(fn) {
|
|
295154
|
+
if (this._writeContent) {
|
|
295155
|
+
this._writeContent(fn);
|
|
295156
|
+
} else {
|
|
295157
|
+
fn();
|
|
295158
|
+
}
|
|
295159
|
+
}
|
|
295144
295160
|
constructor(config, repoRoot) {
|
|
295145
295161
|
this.config = config;
|
|
295146
295162
|
this.repoRoot = repoRoot;
|
|
@@ -295197,7 +295213,7 @@ var init_dmn_engine = __esm({
|
|
|
295197
295213
|
*/
|
|
295198
295214
|
async runCycle(onEvent) {
|
|
295199
295215
|
if (this.state.consecutiveNulls >= this.maxConsecutiveNulls) {
|
|
295200
|
-
renderDMNResting(this.state.consecutiveNulls);
|
|
295216
|
+
this.write(() => renderDMNResting(this.state.consecutiveNulls));
|
|
295201
295217
|
this.state.consecutiveNulls = 0;
|
|
295202
295218
|
this.saveState();
|
|
295203
295219
|
return null;
|
|
@@ -295211,20 +295227,16 @@ var init_dmn_engine = __esm({
|
|
|
295211
295227
|
this.gatherMemoryTopics()
|
|
295212
295228
|
]);
|
|
295213
295229
|
const capabilities = [
|
|
295214
|
-
"file_read
|
|
295215
|
-
"shell \u2014 run shell commands",
|
|
295216
|
-
"grep_search, find_files \u2014 search codebase",
|
|
295230
|
+
"file_read \u2014 read files",
|
|
295231
|
+
"shell \u2014 run shell commands (read-only queries, system checks)",
|
|
295232
|
+
"grep_search, find_files, list_directory \u2014 search and browse codebase",
|
|
295217
295233
|
"web_search, web_fetch \u2014 search and read the web",
|
|
295218
|
-
"memory_read, memory_write, memory_search \u2014 persistent memory",
|
|
295219
|
-
"
|
|
295220
|
-
"scheduler, reminder, agenda \u2014 temporal agency",
|
|
295221
|
-
"codebase_map, diagnostic, git_info \u2014 project analysis",
|
|
295222
|
-
"sub_agent \u2014 delegate subtasks to independent agents",
|
|
295223
|
-
"autoresearch \u2014 autonomous GPU ML experiment loop (modify architecture/hyperparams, train 5min, keep/discard)"
|
|
295234
|
+
"memory_read, memory_write, memory_search \u2014 persistent memory (consolidate insights here)",
|
|
295235
|
+
"codebase_map \u2014 project structure overview"
|
|
295224
295236
|
];
|
|
295225
295237
|
const prompt = buildDMNGatherPrompt(this.recentTaskSummaries, reminders, attention, memoryTopics, capabilities, this.state.competence, this.state.reflectionBuffer);
|
|
295226
295238
|
const modelTier = getModelTier(this.config.model);
|
|
295227
|
-
renderDMNCycleStart(cycleNum, modelTier === "large");
|
|
295239
|
+
this.write(() => renderDMNCycleStart(cycleNum, modelTier === "large"));
|
|
295228
295240
|
const useDeliberation = modelTier === "large";
|
|
295229
295241
|
let result;
|
|
295230
295242
|
let deliberationMeta = null;
|
|
@@ -295263,10 +295275,10 @@ var init_dmn_engine = __esm({
|
|
|
295263
295275
|
if (proposal) {
|
|
295264
295276
|
this.state.tasksGenerated++;
|
|
295265
295277
|
this.state.consecutiveNulls = 0;
|
|
295266
|
-
renderDMNCycleComplete(cycleNum, durationMs, proposal, deliberationMeta ?? void 0);
|
|
295278
|
+
this.write(() => renderDMNCycleComplete(cycleNum, durationMs, proposal, deliberationMeta ?? void 0));
|
|
295267
295279
|
} else {
|
|
295268
295280
|
this.state.consecutiveNulls++;
|
|
295269
|
-
renderDMNCycleNull(cycleNum, durationMs);
|
|
295281
|
+
this.write(() => renderDMNCycleNull(cycleNum, durationMs));
|
|
295270
295282
|
}
|
|
295271
295283
|
this.state.lastCycleAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
295272
295284
|
this.saveState();
|
|
@@ -295302,7 +295314,7 @@ DMN state directory: ${this.stateDir}`);
|
|
|
295302
295314
|
turns: result.turns
|
|
295303
295315
|
};
|
|
295304
295316
|
}
|
|
295305
|
-
/** Build the tool set for the DMN agent —
|
|
295317
|
+
/** Build the tool set for the DMN agent — exploration + memory + shell */
|
|
295306
295318
|
buildDMNTools() {
|
|
295307
295319
|
const tools = [
|
|
295308
295320
|
new FileReadTool(this.repoRoot),
|
|
@@ -295314,7 +295326,8 @@ DMN state directory: ${this.stateDir}`);
|
|
|
295314
295326
|
new MemorySearchTool(this.repoRoot),
|
|
295315
295327
|
new CodebaseMapTool(this.repoRoot),
|
|
295316
295328
|
new WebFetchTool(),
|
|
295317
|
-
new WebSearchTool()
|
|
295329
|
+
new WebSearchTool(),
|
|
295330
|
+
new ShellTool(this.repoRoot)
|
|
295318
295331
|
];
|
|
295319
295332
|
return [
|
|
295320
295333
|
...tools.map(adaptTool3),
|
|
@@ -295586,7 +295599,11 @@ OUTPUT: Call task_complete with JSON:
|
|
|
295586
295599
|
new GlobFindTool(this.repoRoot),
|
|
295587
295600
|
new ListDirectoryTool(this.repoRoot),
|
|
295588
295601
|
new MemoryReadTool(this.repoRoot),
|
|
295589
|
-
new MemorySearchTool(this.repoRoot)
|
|
295602
|
+
new MemorySearchTool(this.repoRoot),
|
|
295603
|
+
new ShellTool(this.repoRoot),
|
|
295604
|
+
new WebSearchTool(),
|
|
295605
|
+
new WebFetchTool(),
|
|
295606
|
+
new CodebaseMapTool(this.repoRoot)
|
|
295590
295607
|
];
|
|
295591
295608
|
tools.push(new MemoryWriteTool(this.repoRoot));
|
|
295592
295609
|
runner.registerTools([
|
|
@@ -309184,6 +309201,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
309184
309201
|
blessEngine = new BlessEngine(currentConfig, repoRoot);
|
|
309185
309202
|
blessEngine.start();
|
|
309186
309203
|
dmnEngine = new DMNEngine(currentConfig, repoRoot);
|
|
309204
|
+
dmnEngine.setWriteContent(writeContent);
|
|
309187
309205
|
writeContent(() => renderBlessStart());
|
|
309188
309206
|
showPrompt();
|
|
309189
309207
|
},
|
package/package.json
CHANGED