open-agents-ai 0.152.0 → 0.153.0

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.
Files changed (2) hide show
  1. package/dist/index.js +18 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -25117,6 +25117,15 @@ If you're stuck, try a completely different approach. Do NOT repeat what failed
25117
25117
  } else {
25118
25118
  compacted = await this.compactMessages(messages);
25119
25119
  }
25120
+ if (this.options.environmentProvider) {
25121
+ try {
25122
+ const envStr = this.options.environmentProvider();
25123
+ if (envStr) {
25124
+ compacted.push({ role: "system", content: envStr });
25125
+ }
25126
+ } catch {
25127
+ }
25128
+ }
25120
25129
  const { maxOutputTokens: effectiveMaxTokens } = this.contextLimits();
25121
25130
  const chatRequest = {
25122
25131
  messages: compacted,
@@ -58890,11 +58899,13 @@ function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce
58890
58899
  const modelTier = getModelTier(config.model);
58891
58900
  const projectCtx = buildProjectContext(repoRoot, taskStores?.contextStores);
58892
58901
  let dynamicContext = formatContextForPrompt(projectCtx, modelTier);
58893
- try {
58894
- const snap = collectSnapshot(repoRoot);
58895
- dynamicContext += "\n\n" + formatSnapshotForContext(snap);
58896
- } catch {
58897
- }
58902
+ const environmentProvider = () => {
58903
+ try {
58904
+ return formatSnapshotForContext(collectSnapshot(repoRoot));
58905
+ } catch {
58906
+ return "";
58907
+ }
58908
+ };
58898
58909
  try {
58899
58910
  const { MemoryMetabolismTool: MemoryMetabolismTool2 } = __require("@open-agents/execution");
58900
58911
  const mm = new MemoryMetabolismTool2(repoRoot);
@@ -59089,7 +59100,8 @@ ${lines.join("\n")}
59089
59100
  contextWindowSize: contextWindowSize ?? 0,
59090
59101
  personality: personality ? getPreset(personality) : void 0,
59091
59102
  personalityName: personality ?? void 0,
59092
- identityInjection
59103
+ identityInjection,
59104
+ environmentProvider
59093
59105
  });
59094
59106
  runner.setWorkingDirectory(repoRoot);
59095
59107
  const tools = buildTools(repoRoot, config, contextWindowSize);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.152.0",
3
+ "version": "0.153.0",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",