@asiflow/devcortex 0.1.2 → 0.1.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.
package/dist/cli.js CHANGED
@@ -3473,7 +3473,7 @@ var program = new Command();
3473
3473
  // package.json
3474
3474
  var package_default = {
3475
3475
  name: "@asiflow/devcortex",
3476
- version: "0.1.2",
3476
+ version: "0.1.3",
3477
3477
  description: "The cognitive layer for AI coding agents \u2014 evidence-backed ship reports, blast-radius protection, and persistent project memory. Works with Claude Code, Codex, Cursor, and any MCP client.",
3478
3478
  license: "Apache-2.0",
3479
3479
  type: "module",
@@ -37516,9 +37516,8 @@ async function cmdRecordEvidence(g, payload) {
37516
37516
  // src/daemon.ts
37517
37517
  import { spawn as spawn2 } from "child_process";
37518
37518
  import { readFile as readFile24 } from "fs/promises";
37519
- import { createRequire } from "module";
37520
37519
  import path29 from "path";
37521
- var nodeRequire = createRequire(import.meta.url);
37520
+ import { fileURLToPath } from "url";
37522
37521
  var DEFAULT_DAEMON_PORT = 7420;
37523
37522
  function pidfilePath(root) {
37524
37523
  return path29.join(workspacePaths(root).cacheDir, "daemon.pid");
@@ -37548,8 +37547,10 @@ function isAlive(pid) {
37548
37547
  }
37549
37548
  }
37550
37549
  function resolveDaemonBin() {
37551
- const pkgJson = nodeRequire.resolve("@devcortex/daemon/package.json");
37552
- return path29.join(path29.dirname(pkgJson), "dist", "main.js");
37550
+ return fileURLToPath(new URL("./daemon.js", import.meta.url));
37551
+ }
37552
+ function resolveDashboardDist() {
37553
+ return fileURLToPath(new URL("./dashboard", import.meta.url));
37553
37554
  }
37554
37555
  async function delay(ms) {
37555
37556
  await new Promise((resolve15) => setTimeout(resolve15, ms));
@@ -37586,7 +37587,10 @@ async function cmdDaemonStart(g, opts) {
37586
37587
  const port = opts.port ?? DEFAULT_DAEMON_PORT;
37587
37588
  const child = spawn2(process.execPath, [resolveDaemonBin(), "--root", g.root, "--port", String(port)], {
37588
37589
  detached: true,
37589
- stdio: "ignore"
37590
+ stdio: "ignore",
37591
+ // Point the daemon at the dashboard SPA shipped alongside the CLI, so it
37592
+ // serves the UI from a global npm install (not just the workspace).
37593
+ env: { ...process.env, DEVCORTEX_DASHBOARD_DIST: resolveDashboardDist() }
37590
37594
  });
37591
37595
  child.unref();
37592
37596
  const info = await waitForRunning(g.root);