open-agents-ai 0.138.70 → 0.138.71

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 +28 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -54080,8 +54080,7 @@ function formatDMNToolArgs(toolName, args) {
54080
54080
  }
54081
54081
  async function runSelfImprovementCycle(repoRoot) {
54082
54082
  try {
54083
- const { IdentityKernelTool: IdentityKernelTool2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports));
54084
- const { ReflectionIntegrityTool: ReflectionIntegrityTool2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports));
54083
+ const { IdentityKernelTool: IdentityKernelTool2, ReflectionIntegrityTool: ReflectionIntegrityTool2 } = __require("@open-agents/execution");
54085
54084
  const ik = new IdentityKernelTool2(repoRoot);
54086
54085
  const reflect = new ReflectionIntegrityTool2(repoRoot);
54087
54086
  const state = await ik.execute({ op: "hydrate" });
@@ -54897,16 +54896,21 @@ When done, either call task_complete with your answer, or use FINAL_VAR(variable
54897
54896
  runSelfImprovementCycle(repoRoot).catch(() => {
54898
54897
  });
54899
54898
  }
54900
- Promise.resolve().then(() => (init_dist2(), dist_exports)).then(({ IdentityKernelTool: IdentityKernelTool2 }) => {
54901
- const ik = new IdentityKernelTool2(repoRoot);
54902
- ik.execute({
54903
- op: "observe",
54904
- event: `Task completed: ${result.summary.slice(0, 200)}`,
54905
- context: JSON.stringify({ turns: result.turns, toolCalls: result.toolCalls, durationMs: result.durationMs, model: config.model, completed: true })
54906
- }).catch(() => {
54907
- });
54908
- }).catch(() => {
54909
- });
54899
+ try {
54900
+ const ikFile = join59(repoRoot, ".oa", "identity", "self-state.json");
54901
+ if (existsSync43(ikFile)) {
54902
+ const ikState = JSON.parse(readFileSync32(ikFile, "utf8"));
54903
+ const event = `Task completed: ${result.summary.slice(0, 200)}`;
54904
+ if (/success|pass|complete|done|fixed/i.test(event)) {
54905
+ ikState.homeostasis.uncertainty = Math.max(0, ikState.homeostasis.uncertainty - 0.1);
54906
+ ikState.homeostasis.coherence = Math.min(1, ikState.homeostasis.coherence + 0.05);
54907
+ }
54908
+ ikState.session_count = (ikState.session_count || 0) + 1;
54909
+ ikState.updated_at = (/* @__PURE__ */ new Date()).toISOString();
54910
+ writeFileSync18(ikFile, JSON.stringify(ikState, null, 2));
54911
+ }
54912
+ } catch {
54913
+ }
54910
54914
  if (voice?.enabled && result.summary) {
54911
54915
  const emoFinal = emotionEngine?.getState();
54912
54916
  const emoCtxFinal = emoFinal ? { valence: emoFinal.valence, arousal: emoFinal.arousal, label: emoFinal.label, emoji: emoFinal.emoji } : void 0;
@@ -54914,16 +54918,18 @@ When done, either call task_complete with your answer, or use FINAL_VAR(variable
54914
54918
  }
54915
54919
  } else {
54916
54920
  renderTaskIncomplete(result.turns, result.toolCalls, result.durationMs, tokens);
54917
- Promise.resolve().then(() => (init_dist2(), dist_exports)).then(({ IdentityKernelTool: IdentityKernelTool2 }) => {
54918
- const ik = new IdentityKernelTool2(repoRoot);
54919
- ik.execute({
54920
- op: "observe",
54921
- event: `Task incomplete after ${result.turns} turns`,
54922
- context: JSON.stringify({ turns: result.turns, toolCalls: result.toolCalls, durationMs: result.durationMs, completed: false })
54923
- }).catch(() => {
54924
- });
54925
- }).catch(() => {
54926
- });
54921
+ try {
54922
+ const ikFile = join59(repoRoot, ".oa", "identity", "self-state.json");
54923
+ if (existsSync43(ikFile)) {
54924
+ const ikState = JSON.parse(readFileSync32(ikFile, "utf8"));
54925
+ ikState.homeostasis.uncertainty = Math.min(1, ikState.homeostasis.uncertainty + 0.1);
54926
+ ikState.homeostasis.coherence = Math.max(0, ikState.homeostasis.coherence - 0.05);
54927
+ ikState.session_count = (ikState.session_count || 0) + 1;
54928
+ ikState.updated_at = (/* @__PURE__ */ new Date()).toISOString();
54929
+ writeFileSync18(ikFile, JSON.stringify(ikState, null, 2));
54930
+ }
54931
+ } catch {
54932
+ }
54927
54933
  if (voice?.enabled) {
54928
54934
  const emoFinal2 = emotionEngine?.getState();
54929
54935
  const emoCtxFinal2 = emoFinal2 ? { valence: emoFinal2.valence, arousal: emoFinal2.arousal, label: emoFinal2.label, emoji: emoFinal2.emoji } : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.70",
3
+ "version": "0.138.71",
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",