open-agents-ai 0.138.68 → 0.138.69

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 +36 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21985,6 +21985,17 @@ var init_agenticRunner = __esm({
21985
21985
  tokenEstimate: Math.ceil(personalitySuffix.length / 4)
21986
21986
  });
21987
21987
  }
21988
+ if (this.options.identityInjection) {
21989
+ sections.push({
21990
+ label: "c_identity",
21991
+ content: `
21992
+
21993
+ <identity-state>
21994
+ ${this.options.identityInjection}
21995
+ </identity-state>`,
21996
+ tokenEstimate: Math.ceil(this.options.identityInjection.length / 4)
21997
+ });
21998
+ }
21988
21999
  if (this.options.dynamicContext) {
21989
22000
  sections.push({
21990
22001
  label: "c_know",
@@ -54199,6 +54210,29 @@ function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce
54199
54210
  } catch {
54200
54211
  }
54201
54212
  const compactionThreshold = modelTier === "small" ? 12e3 : modelTier === "medium" ? 24e3 : 4e4;
54213
+ let identityInjection = "";
54214
+ try {
54215
+ const ikStateFile = join59(repoRoot, ".oa", "identity", "self-state.json");
54216
+ if (existsSync43(ikStateFile)) {
54217
+ const selfState = JSON.parse(readFileSync32(ikStateFile, "utf8"));
54218
+ const lines = [
54219
+ `[Identity State v${selfState.version}]`,
54220
+ `Self: ${selfState.narrative_summary}`,
54221
+ `Values: ${(selfState.values_stack || []).join(", ")}`,
54222
+ `Style: ${selfState.interaction_style?.tone || "collaborative"}, ${selfState.interaction_style?.depth_default || "balanced"} depth`
54223
+ ];
54224
+ if (selfState.active_commitments?.length > 0)
54225
+ lines.push(`Commitments: ${selfState.active_commitments.join("; ")}`);
54226
+ if (selfState.active_goals?.length > 0)
54227
+ lines.push(`Goals: ${selfState.active_goals.join("; ")}`);
54228
+ const h = selfState.homeostasis;
54229
+ if (h && (h.uncertainty > 0.3 || h.coherence < 0.7 || h.goal_tension > 0.3)) {
54230
+ lines.push(`Homeostasis: uncertainty=${h.uncertainty.toFixed(1)} coherence=${h.coherence.toFixed(1)} tension=${h.goal_tension.toFixed(1)}`);
54231
+ }
54232
+ identityInjection = lines.join("\n");
54233
+ }
54234
+ } catch {
54235
+ }
54202
54236
  const runner = new AgenticRunner(backend, {
54203
54237
  maxTurns: 60,
54204
54238
  maxTokens: 16384,
@@ -54217,7 +54251,8 @@ function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce
54217
54251
  // effectively unlimited — no hard timeout, agent runs until complete or aborted
54218
54252
  contextWindowSize: contextWindowSize ?? 0,
54219
54253
  personality: personality ? getPreset(personality) : void 0,
54220
- personalityName: personality ?? void 0
54254
+ personalityName: personality ?? void 0,
54255
+ identityInjection
54221
54256
  });
54222
54257
  runner.setWorkingDirectory(repoRoot);
54223
54258
  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.138.68",
3
+ "version": "0.138.69",
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",