agentflow-core 0.7.0 → 0.8.1
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/README.md +99 -0
- package/dist/{chunk-DY7YHFIB.js → chunk-BYWLDTZK.js} +2 -1
- package/dist/{chunk-5PRHVYYD.js → chunk-NVFWBTAZ.js} +198 -89
- package/dist/cli.cjs +225 -112
- package/dist/cli.js +12 -8
- package/dist/index.cjs +1657 -166
- package/dist/index.d.cts +917 -37
- package/dist/index.d.ts +917 -37
- package/dist/index.js +1381 -10
- package/dist/{loader-LYRR6LMM.js → loader-JMFEFI3Q.js} +1 -1
- package/package.json +7 -3
package/dist/cli.js
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
startWatch,
|
|
10
10
|
toAsciiTree,
|
|
11
11
|
toTimeline
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-NVFWBTAZ.js";
|
|
13
|
+
import "./chunk-BYWLDTZK.js";
|
|
14
14
|
|
|
15
15
|
// src/cli.ts
|
|
16
16
|
import { basename, resolve as resolve2 } from "path";
|
|
@@ -95,7 +95,7 @@ async function traceShow(argv) {
|
|
|
95
95
|
const { join } = await import("path");
|
|
96
96
|
const fname = graphId.endsWith(".json") ? graphId : `${graphId}.json`;
|
|
97
97
|
try {
|
|
98
|
-
const { loadGraph } = await import("./loader-
|
|
98
|
+
const { loadGraph } = await import("./loader-JMFEFI3Q.js");
|
|
99
99
|
const content = await readFile(join(dir, fname), "utf-8");
|
|
100
100
|
graph = loadGraph(content);
|
|
101
101
|
} catch {
|
|
@@ -124,7 +124,7 @@ async function traceTimeline(argv) {
|
|
|
124
124
|
const { join } = await import("path");
|
|
125
125
|
const fname = graphId.endsWith(".json") ? graphId : `${graphId}.json`;
|
|
126
126
|
try {
|
|
127
|
-
const { loadGraph } = await import("./loader-
|
|
127
|
+
const { loadGraph } = await import("./loader-JMFEFI3Q.js");
|
|
128
128
|
const content = await readFile(join(dir, fname), "utf-8");
|
|
129
129
|
graph = loadGraph(content);
|
|
130
130
|
} catch {
|
|
@@ -381,7 +381,7 @@ function parseAuditArgs(argv) {
|
|
|
381
381
|
if (args[0] === "audit") args.shift();
|
|
382
382
|
let i = 0;
|
|
383
383
|
while (i < args.length) {
|
|
384
|
-
const arg = args[i];
|
|
384
|
+
const arg = args[i] ?? "";
|
|
385
385
|
if (arg === "--help" || arg === "-h") {
|
|
386
386
|
printAuditUsage();
|
|
387
387
|
process.exit(0);
|
|
@@ -414,12 +414,16 @@ function parseAuditArgs(argv) {
|
|
|
414
414
|
if (!processName && !pidFile && !workersFile && discoverDirs.length > 0) {
|
|
415
415
|
const discovered = discoverProcessConfig(discoverDirs);
|
|
416
416
|
if (discovered) {
|
|
417
|
-
console.log(
|
|
417
|
+
console.log(
|
|
418
|
+
`Auto-discovered: process="${discovered.processName}"${discovered.pidFile ? ` pid-file=${discovered.pidFile}` : ""}${discovered.workersFile ? ` workers=${discovered.workersFile}` : ""}`
|
|
419
|
+
);
|
|
418
420
|
return { ...discovered, systemdUnit };
|
|
419
421
|
}
|
|
420
422
|
}
|
|
421
423
|
if (!processName) {
|
|
422
|
-
console.error(
|
|
424
|
+
console.error(
|
|
425
|
+
"Error: --process <name> is required, or provide directories for auto-discovery."
|
|
426
|
+
);
|
|
423
427
|
console.error("Examples:");
|
|
424
428
|
console.error(" agentflow audit --process alfred --pid-file ./data/alfred.pid");
|
|
425
429
|
console.error(" agentflow audit ./data # auto-discovers *.pid and workers.json");
|
|
@@ -467,7 +471,7 @@ function runAudit(argv) {
|
|
|
467
471
|
async function main() {
|
|
468
472
|
const argv = process.argv.slice(2);
|
|
469
473
|
const knownCommands = ["run", "live", "watch", "trace", "audit"];
|
|
470
|
-
if (argv.length === 0 || !knownCommands.includes(argv[0]) && (argv.includes("--help") || argv.includes("-h"))) {
|
|
474
|
+
if (argv.length === 0 || !knownCommands.includes(argv[0] ?? "") && (argv.includes("--help") || argv.includes("-h"))) {
|
|
471
475
|
printHelp();
|
|
472
476
|
process.exit(0);
|
|
473
477
|
}
|