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.
- package/dist/index.js +28 -22
- 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 } =
|
|
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
|
-
|
|
54901
|
-
const
|
|
54902
|
-
|
|
54903
|
-
|
|
54904
|
-
event
|
|
54905
|
-
|
|
54906
|
-
|
|
54907
|
-
|
|
54908
|
-
|
|
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
|
-
|
|
54918
|
-
const
|
|
54919
|
-
|
|
54920
|
-
|
|
54921
|
-
|
|
54922
|
-
|
|
54923
|
-
|
|
54924
|
-
|
|
54925
|
-
|
|
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