open-agents-ai 0.187.34 → 0.187.35

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 +32 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -260248,6 +260248,10 @@ var init_agenticRunner = __esm({
260248
260248
  // WO-KG-12
260249
260249
  _graphSummaryProvider = null;
260250
260250
  // WO-KG-13
260251
+ _retrievalProvider = null;
260252
+ // WO-KG-15
260253
+ _retrievalContextCache = null;
260254
+ // WO-KG-15: cache per-run
260251
260255
  _loopBlockedTools;
260252
260256
  // Loop intervention: tools removed from schema
260253
260257
  // -- Session Checkpointing (Priority 5) --
@@ -260324,7 +260328,7 @@ var init_agenticRunner = __esm({
260324
260328
  * - Priority 20: c_know (retrieved knowledge, dynamic context)
260325
260329
  * - Priority 30: c_tools (tool definitions — handled separately by API)
260326
260330
  */
260327
- assembleContext(task, context) {
260331
+ async assembleContext(task, context) {
260328
260332
  const sections = [];
260329
260333
  const pressureCue = pressureCheck(task);
260330
260334
  const basePrompt = getSystemPromptForTier(this.options.modelTier) + pressureCue;
@@ -260368,6 +260372,24 @@ ${ctx3}`,
260368
260372
  tokenEstimate: Math.ceil(ctx3.length / 4)
260369
260373
  });
260370
260374
  }
260375
+ if (this._retrievalProvider && !this._retrievalContextCache) {
260376
+ try {
260377
+ const tier = this.options.modelTier ?? "large";
260378
+ const budget = tier === "small" ? 2e3 : tier === "medium" ? 4e3 : 8e3;
260379
+ this._retrievalContextCache = await this._retrievalProvider(task, budget);
260380
+ } catch {
260381
+ this._retrievalContextCache = "";
260382
+ }
260383
+ }
260384
+ if (this._retrievalContextCache) {
260385
+ sections.push({
260386
+ label: "c_retrieval",
260387
+ content: `
260388
+
260389
+ ${this._retrievalContextCache}`,
260390
+ tokenEstimate: Math.ceil(this._retrievalContextCache.length / 4)
260391
+ });
260392
+ }
260371
260393
  if (this._graphSummaryProvider) {
260372
260394
  try {
260373
260395
  const tier = this.options.modelTier ?? "large";
@@ -260776,7 +260798,7 @@ Respond with your assessment, then take action.`;
260776
260798
  verbose: false
260777
260799
  });
260778
260800
  this._hookManager.runSessionHook("session_start", this._sessionId);
260779
- const contextComposition = this.assembleContext(task, context);
260801
+ const contextComposition = await this.assembleContext(task, context);
260780
260802
  const systemPrompt = contextComposition.assembled;
260781
260803
  this.emit({
260782
260804
  type: "status",
@@ -260845,6 +260867,7 @@ TASK: ${task}` : task;
260845
260867
  this._microcompactHintEmitted = false;
260846
260868
  this._hookDenyHintCount = 0;
260847
260869
  this._selfConsistencyVotes = 0;
260870
+ this._retrievalContextCache = null;
260848
260871
  this._loopBlockedTools = void 0;
260849
260872
  let pendingConstraintWarnings = [];
260850
260873
  let consecutiveTextOnly = 0;
@@ -262186,6 +262209,13 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
262186
262209
  setGraphSummaryProvider(provider) {
262187
262210
  this._graphSummaryProvider = provider;
262188
262211
  }
262212
+ /** WO-KG-15: Set the retrieval provider — called during assembleContext().
262213
+ * Takes the task text and token budget, returns formatted retrieval context
262214
+ * (files, snippets, architecture notes) ready for prompt injection.
262215
+ * Wired from interactive.ts when contextAssembler is available. */
262216
+ setRetrievalProvider(provider) {
262217
+ this._retrievalProvider = provider;
262218
+ }
262189
262219
  /** Provide the sudo password — resolves any pending sudo_request wait. */
262190
262220
  setSudoPassword(password) {
262191
262221
  this._sudoPassword = password;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.34",
3
+ "version": "0.187.35",
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",