agentflow-core 0.6.2 → 0.6.3

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.
@@ -390,7 +390,19 @@ function discoverProcessConfig(dirs) {
390
390
  }
391
391
  if (!processName && !pidFile && !workersFile) return null;
392
392
  if (!processName) processName = "agent";
393
- return { processName, pidFile, workersFile };
393
+ let systemdUnit;
394
+ try {
395
+ const unitName = `${processName}.service`;
396
+ const result = execSync(
397
+ `systemctl --user show ${unitName} --property=LoadState --no-pager 2>/dev/null`,
398
+ { encoding: "utf8", timeout: 3e3 }
399
+ );
400
+ if (result.includes("LoadState=loaded")) {
401
+ systemdUnit = unitName;
402
+ }
403
+ } catch {
404
+ }
405
+ return { processName, pidFile, workersFile, systemdUnit };
394
406
  }
395
407
  function auditProcesses(config) {
396
408
  const pidFile = auditPidFile(config);
package/dist/cli.cjs CHANGED
@@ -429,7 +429,19 @@ function discoverProcessConfig(dirs) {
429
429
  }
430
430
  if (!processName && !pidFile && !workersFile) return null;
431
431
  if (!processName) processName = "agent";
432
- return { processName, pidFile, workersFile };
432
+ let systemdUnit;
433
+ try {
434
+ const unitName = `${processName}.service`;
435
+ const result = (0, import_node_child_process.execSync)(
436
+ `systemctl --user show ${unitName} --property=LoadState --no-pager 2>/dev/null`,
437
+ { encoding: "utf8", timeout: 3e3 }
438
+ );
439
+ if (result.includes("LoadState=loaded")) {
440
+ systemdUnit = unitName;
441
+ }
442
+ } catch {
443
+ }
444
+ return { processName, pidFile, workersFile, systemdUnit };
433
445
  }
434
446
  function auditProcesses(config) {
435
447
  const pidFile = auditPidFile(config);
package/dist/cli.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  startWatch,
10
10
  toAsciiTree,
11
11
  toTimeline
12
- } from "./chunk-BXZC5ZMJ.js";
12
+ } from "./chunk-R5SNE2HB.js";
13
13
  import "./chunk-DY7YHFIB.js";
14
14
 
15
15
  // src/cli.ts
package/dist/index.cjs CHANGED
@@ -878,7 +878,19 @@ function discoverProcessConfig(dirs) {
878
878
  }
879
879
  if (!processName && !pidFile && !workersFile) return null;
880
880
  if (!processName) processName = "agent";
881
- return { processName, pidFile, workersFile };
881
+ let systemdUnit;
882
+ try {
883
+ const unitName = `${processName}.service`;
884
+ const result = (0, import_node_child_process.execSync)(
885
+ `systemctl --user show ${unitName} --property=LoadState --no-pager 2>/dev/null`,
886
+ { encoding: "utf8", timeout: 3e3 }
887
+ );
888
+ if (result.includes("LoadState=loaded")) {
889
+ systemdUnit = unitName;
890
+ }
891
+ } catch {
892
+ }
893
+ return { processName, pidFile, workersFile, systemdUnit };
882
894
  }
883
895
  function auditProcesses(config) {
884
896
  const pidFile = auditPidFile(config);
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  stitchTrace,
24
24
  toAsciiTree,
25
25
  toTimeline
26
- } from "./chunk-BXZC5ZMJ.js";
26
+ } from "./chunk-R5SNE2HB.js";
27
27
  import {
28
28
  graphToJson,
29
29
  loadGraph
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentflow-core",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Monitor any AI agent system. Auto-detects failures, sends alerts, audits OS processes. Zero config, zero dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",