helixevo 0.2.3 → 0.2.5
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/dashboard/app/network/page.tsx +2 -14
- package/dist/cli.js +52 -35
- package/package.json +1 -2
- package/dashboard/package-lock.json +0 -1175
|
@@ -3,18 +3,6 @@ import NetworkClient from './client'
|
|
|
3
3
|
|
|
4
4
|
export const dynamic = 'force-dynamic'
|
|
5
5
|
|
|
6
|
-
interface EvolutionEntry {
|
|
7
|
-
id: string
|
|
8
|
-
timestamp: string
|
|
9
|
-
action: string
|
|
10
|
-
description: string
|
|
11
|
-
outcome: string
|
|
12
|
-
outcomeReason: string
|
|
13
|
-
task: number
|
|
14
|
-
align: number
|
|
15
|
-
sideEffect: number
|
|
16
|
-
}
|
|
17
|
-
|
|
18
6
|
export default function SkillNetworkPage() {
|
|
19
7
|
const graph = loadGraph()
|
|
20
8
|
const history = loadHistory()
|
|
@@ -31,7 +19,7 @@ export default function SkillNetworkPage() {
|
|
|
31
19
|
)
|
|
32
20
|
|
|
33
21
|
// Build evolution history per skill
|
|
34
|
-
const evolutionBySkill
|
|
22
|
+
const evolutionBySkill = {}
|
|
35
23
|
for (const iter of history.iterations) {
|
|
36
24
|
for (const p of iter.proposals) {
|
|
37
25
|
if (!evolutionBySkill[p.targetSkill]) evolutionBySkill[p.targetSkill] = []
|
|
@@ -45,7 +33,7 @@ export default function SkillNetworkPage() {
|
|
|
45
33
|
}
|
|
46
34
|
|
|
47
35
|
// Load skill contents
|
|
48
|
-
const skillContents
|
|
36
|
+
const skillContents = {}
|
|
49
37
|
for (const n of graph.nodes) {
|
|
50
38
|
const raw = loadSkillContent(n.id)
|
|
51
39
|
if (raw) skillContents[n.id] = raw.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/)?.[1]?.trim() ?? raw
|
package/dist/cli.js
CHANGED
|
@@ -12312,14 +12312,14 @@ ${replay.slice(0, 800)}`
|
|
|
12312
12312
|
// src/commands/dashboard.ts
|
|
12313
12313
|
import { execSync as execSync2, spawn as spawn2 } from "node:child_process";
|
|
12314
12314
|
import { join as join14, dirname as dirname2 } from "node:path";
|
|
12315
|
-
import { existsSync as existsSync10, cpSync as cpSync3, mkdirSync as mkdirSync4 } from "node:fs";
|
|
12315
|
+
import { existsSync as existsSync10, cpSync as cpSync3, mkdirSync as mkdirSync4, readdirSync as readdirSync2, statSync as statSync2, rmSync as rmSync2 } from "node:fs";
|
|
12316
12316
|
import { fileURLToPath } from "node:url";
|
|
12317
12317
|
import { homedir as homedir3 } from "node:os";
|
|
12318
12318
|
var __filename = "/Users/tianchichen/Documents/GitHub/skillgraph/src/commands/dashboard.ts";
|
|
12319
12319
|
var HELIX_DASHBOARD_DIR = join14(homedir3(), ".helix", "dashboard");
|
|
12320
12320
|
async function dashboardCommand() {
|
|
12321
|
-
const
|
|
12322
|
-
if (!
|
|
12321
|
+
const dir = prepareDashboard();
|
|
12322
|
+
if (!dir) {
|
|
12323
12323
|
console.error(` Dashboard not found.
|
|
12324
12324
|
`);
|
|
12325
12325
|
console.error(" You can install and run it manually:");
|
|
@@ -12327,7 +12327,6 @@ async function dashboardCommand() {
|
|
|
12327
12327
|
console.error(" cd helixevo/dashboard && npm install && npx next dev --port 3847");
|
|
12328
12328
|
process.exit(1);
|
|
12329
12329
|
}
|
|
12330
|
-
const dir = ensureWritableDashboard(sourceDir);
|
|
12331
12330
|
if (!existsSync10(join14(dir, "node_modules"))) {
|
|
12332
12331
|
console.log(" Installing dashboard dependencies...");
|
|
12333
12332
|
try {
|
|
@@ -12357,7 +12356,33 @@ async function dashboardCommand() {
|
|
|
12357
12356
|
process.exit(code ?? 0);
|
|
12358
12357
|
});
|
|
12359
12358
|
}
|
|
12360
|
-
function
|
|
12359
|
+
function prepareDashboard() {
|
|
12360
|
+
const devDir = findDevDashboard();
|
|
12361
|
+
if (devDir)
|
|
12362
|
+
return devDir;
|
|
12363
|
+
const npmSource = findNpmDashboard();
|
|
12364
|
+
if (npmSource)
|
|
12365
|
+
return copyToHelix(npmSource);
|
|
12366
|
+
if (existsSync10(join14(HELIX_DASHBOARD_DIR, "package.json"))) {
|
|
12367
|
+
return HELIX_DASHBOARD_DIR;
|
|
12368
|
+
}
|
|
12369
|
+
return null;
|
|
12370
|
+
}
|
|
12371
|
+
function findDevDashboard() {
|
|
12372
|
+
const candidates = [
|
|
12373
|
+
join14(process.cwd(), "dashboard")
|
|
12374
|
+
];
|
|
12375
|
+
const home = process.env.HOME ?? process.env.USERPROFILE ?? "";
|
|
12376
|
+
candidates.push(join14(home, "Documents", "GitHub", "helixevo", "dashboard"));
|
|
12377
|
+
candidates.push(join14(home, "Documents", "GitHub", "skillgraph", "dashboard"));
|
|
12378
|
+
for (const dir of candidates) {
|
|
12379
|
+
if (existsSync10(join14(dir, "package.json")) && !dir.includes("node_modules")) {
|
|
12380
|
+
return dir;
|
|
12381
|
+
}
|
|
12382
|
+
}
|
|
12383
|
+
return null;
|
|
12384
|
+
}
|
|
12385
|
+
function findNpmDashboard() {
|
|
12361
12386
|
const candidates = [];
|
|
12362
12387
|
try {
|
|
12363
12388
|
const thisFile = typeof __filename !== "undefined" ? __filename : fileURLToPath(import.meta.url);
|
|
@@ -12369,11 +12394,6 @@ function findDashboardSource() {
|
|
|
12369
12394
|
candidates.push(join14(globalPrefix, "lib", "node_modules", "helixevo", "dashboard"));
|
|
12370
12395
|
candidates.push(join14(globalPrefix, "node_modules", "helixevo", "dashboard"));
|
|
12371
12396
|
} catch {}
|
|
12372
|
-
candidates.push(HELIX_DASHBOARD_DIR);
|
|
12373
|
-
const home = process.env.HOME ?? process.env.USERPROFILE ?? "";
|
|
12374
|
-
candidates.push(join14(home, "Documents", "GitHub", "helixevo", "dashboard"));
|
|
12375
|
-
candidates.push(join14(home, "Documents", "GitHub", "skillgraph", "dashboard"));
|
|
12376
|
-
candidates.push(join14(process.cwd(), "dashboard"));
|
|
12377
12397
|
for (const dir of candidates) {
|
|
12378
12398
|
if (existsSync10(join14(dir, "package.json"))) {
|
|
12379
12399
|
return dir;
|
|
@@ -12381,36 +12401,33 @@ function findDashboardSource() {
|
|
|
12381
12401
|
}
|
|
12382
12402
|
return null;
|
|
12383
12403
|
}
|
|
12384
|
-
function
|
|
12385
|
-
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
const sourceMtime = __require("fs").statSync(sourcePackage).mtimeMs;
|
|
12395
|
-
const destMtime = __require("fs").statSync(destPackage).mtimeMs;
|
|
12396
|
-
if (sourceMtime <= destMtime) {
|
|
12397
|
-
return HELIX_DASHBOARD_DIR;
|
|
12398
|
-
}
|
|
12404
|
+
function copyToHelix(sourceDir) {
|
|
12405
|
+
const destPkg = join14(HELIX_DASHBOARD_DIR, "package.json");
|
|
12406
|
+
if (existsSync10(destPkg)) {
|
|
12407
|
+
try {
|
|
12408
|
+
const srcTime = statSync2(join14(sourceDir, "package.json")).mtimeMs;
|
|
12409
|
+
const dstTime = statSync2(destPkg).mtimeMs;
|
|
12410
|
+
if (srcTime <= dstTime) {
|
|
12411
|
+
return HELIX_DASHBOARD_DIR;
|
|
12412
|
+
}
|
|
12413
|
+
} catch {}
|
|
12399
12414
|
}
|
|
12400
|
-
console.log(" Setting up dashboard...");
|
|
12415
|
+
console.log(" Setting up dashboard at ~/.helix/dashboard...");
|
|
12401
12416
|
mkdirSync4(HELIX_DASHBOARD_DIR, { recursive: true });
|
|
12402
|
-
const items =
|
|
12417
|
+
const items = readdirSync2(sourceDir, { withFileTypes: true });
|
|
12403
12418
|
for (const item of items) {
|
|
12404
|
-
if (item.name === "node_modules" || item.name === ".next")
|
|
12419
|
+
if (item.name === "node_modules" || item.name === ".next" || item.name === "package-lock.json")
|
|
12405
12420
|
continue;
|
|
12406
12421
|
const src = join14(sourceDir, item.name);
|
|
12407
12422
|
const dest = join14(HELIX_DASHBOARD_DIR, item.name);
|
|
12408
12423
|
cpSync3(src, dest, { recursive: true });
|
|
12409
12424
|
}
|
|
12410
12425
|
const oldModules = join14(HELIX_DASHBOARD_DIR, "node_modules");
|
|
12411
|
-
if (existsSync10(oldModules))
|
|
12412
|
-
|
|
12413
|
-
|
|
12426
|
+
if (existsSync10(oldModules))
|
|
12427
|
+
rmSync2(oldModules, { recursive: true });
|
|
12428
|
+
const oldLock = join14(HELIX_DASHBOARD_DIR, "package-lock.json");
|
|
12429
|
+
if (existsSync10(oldLock))
|
|
12430
|
+
rmSync2(oldLock);
|
|
12414
12431
|
return HELIX_DASHBOARD_DIR;
|
|
12415
12432
|
}
|
|
12416
12433
|
|
|
@@ -12421,7 +12438,7 @@ import { existsSync as existsSync13 } from "node:fs";
|
|
|
12421
12438
|
// src/core/auto-capture.ts
|
|
12422
12439
|
init_data();
|
|
12423
12440
|
init_llm();
|
|
12424
|
-
import { readFileSync as readFileSync8, existsSync as existsSync11, statSync as
|
|
12441
|
+
import { readFileSync as readFileSync8, existsSync as existsSync11, statSync as statSync3 } from "node:fs";
|
|
12425
12442
|
var CORRECTION_SIGNALS = [
|
|
12426
12443
|
/\bno[, ]+(?:that's|thats|that is)\s+(?:wrong|incorrect|not right)/i,
|
|
12427
12444
|
/\bdon'?t\s+do\s+(?:that|it\s+like\s+that)/i,
|
|
@@ -12509,14 +12526,14 @@ If no corrections found, return: { "corrections": [] }`
|
|
|
12509
12526
|
}
|
|
12510
12527
|
function watchEvents(options) {
|
|
12511
12528
|
const { eventsPath, project, onCapture, onError, pollIntervalMs = 5000 } = options;
|
|
12512
|
-
let lastSize = existsSync11(eventsPath) ?
|
|
12529
|
+
let lastSize = existsSync11(eventsPath) ? statSync3(eventsPath).size : 0;
|
|
12513
12530
|
let messageBuffer = [];
|
|
12514
12531
|
let pendingExtraction = false;
|
|
12515
12532
|
const interval = setInterval(async () => {
|
|
12516
12533
|
try {
|
|
12517
12534
|
if (!existsSync11(eventsPath))
|
|
12518
12535
|
return;
|
|
12519
|
-
const currentSize =
|
|
12536
|
+
const currentSize = statSync3(eventsPath).size;
|
|
12520
12537
|
if (currentSize <= lastSize)
|
|
12521
12538
|
return;
|
|
12522
12539
|
const content = readFileSync8(eventsPath, "utf-8");
|
|
@@ -12907,7 +12924,7 @@ async function metricsCommand(options) {
|
|
|
12907
12924
|
|
|
12908
12925
|
// src/cli.ts
|
|
12909
12926
|
var program2 = new Command;
|
|
12910
|
-
program2.name("helixevo").description("Self-evolving skill ecosystem for AI agents").version("0.2.
|
|
12927
|
+
program2.name("helixevo").description("Self-evolving skill ecosystem for AI agents").version("0.2.5").addHelpText("after", `
|
|
12911
12928
|
Examples:
|
|
12912
12929
|
$ helixevo watch Always-on learning (auto-capture + auto-evolve)
|
|
12913
12930
|
$ helixevo watch --project myapp Watch with project context
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "helixevo",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Self-evolving skill ecosystem for AI agents. Skills and projects co-evolve through multi-judge evaluation and a Pareto frontier.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"dashboard/components/",
|
|
13
13
|
"dashboard/lib/",
|
|
14
14
|
"dashboard/package.json",
|
|
15
|
-
"dashboard/package-lock.json",
|
|
16
15
|
"dashboard/tsconfig.json",
|
|
17
16
|
"dashboard/next-env.d.ts",
|
|
18
17
|
"README.md",
|