File size: 1,732 Bytes
fc93158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import fs from "node:fs/promises";
import path from "node:path";
import { runOneHeartbeatCycle } from "./heartbeat.js";

async function forceActiveCycle() {
  const workspaceRoot = process.cwd();
  const sessionKey = "agent:main:main";
  const kernelPath = path.join(
    workspaceRoot,
    ".openskynet",
    "omega-session-state",
    "agent_main_main-6d9217fe77c7.json",
  );

  console.log("🛠️ Inyectando Kernel Activo con Tensión...");

  const activeKernel = {
    revision: 2,
    sessionKey: "agent:main:main",
    turnCount: 10,
    activeGoalId: "goal-ricci-repair",
    identity: { continuityId: "main-brain", lastTask: "Repair bottlenecks" },
    world: {
      lastOutcomeStatus: "error",
      lastObservedChangedFiles: ["src/omega/ricci-stress-test.ts"],
    },
    goals: [
      {
        id: "goal-ricci-repair",
        task: "Stabilize the Ricci bottleneck in ricci-stress-test.ts",
        status: "active",
        failureCount: 3,
        successCount: 0,
        updatedTurn: 10,
        targets: ["src/omega/ricci-stress-test.ts"],
      },
    ],
    tension: { failureStreak: 3, openGoalCount: 1, pendingCorrection: true },
    causalGraph: {
      files: [{ path: "src/omega/ricci-stress-test.ts", writeCount: 0, failureCount: 5 }],
      edges: [
        {
          goalId: "goal-ricci-repair",
          filePath: "src/omega/ricci-stress-test.ts",
          relation: "goal_failed_on_file",
        },
      ],
    },
    updatedAt: Date.now(),
  };

  await fs.writeFile(kernelPath, JSON.stringify(activeKernel, null, 2));

  console.log("🚀 Despertando a Omega en modo de TRABAJO...");
  await runOneHeartbeatCycle({ workspaceRoot, sessionKey });
}

forceActiveCycle().catch(console.error);