@mrciphersmith/keryx 0.2.156 → 0.2.157

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.
Files changed (2) hide show
  1. package/dist/cli.js +22 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -53008,7 +53008,7 @@ import path47 from "path";
53008
53008
  // package.json
53009
53009
  var package_default = {
53010
53010
  name: "@mrciphersmith/keryx",
53011
- version: "0.2.156",
53011
+ version: "0.2.157",
53012
53012
  description: "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
53013
53013
  private: false,
53014
53014
  publishConfig: {
@@ -88927,8 +88927,18 @@ function defaultRun(command, args, input) {
88927
88927
  }
88928
88928
  });
88929
88929
  }
88930
+ function inTestContext() {
88931
+ return process.env["NODE_ENV"] === "test";
88932
+ }
88933
+ function refuseRealHost(what) {
88934
+ throw new Error(`keryx refuses to touch the real ${what} while running under \`bun test\` (NODE_ENV=test) with no fake ` + "ScheduleHost injected. Pass a ScheduleHost with `run` (a fake systemctl/launchctl/crontab) and, for " + "systemd/launchd, `unitDir`/`launchAgentsDir` pointed at a temp directory \u2014 see src/trigger/install.test.ts. " + "This guard exists because an un-hermetic test once installed a real, enabled systemd --user timer on a " + "developer's machine.");
88935
+ }
88930
88936
  function runner(host) {
88931
- return host.run ?? defaultRun;
88937
+ if (host.run !== undefined)
88938
+ return host.run;
88939
+ if (inTestContext())
88940
+ refuseRealHost("scheduler (systemctl / launchctl / crontab / loginctl)");
88941
+ return defaultRun;
88932
88942
  }
88933
88943
  var backendCache = new WeakMap;
88934
88944
  var DEFAULT_HOST_KEY = {};
@@ -88965,10 +88975,18 @@ function runnerInvocation(confirmed) {
88965
88975
  return scriptPath === undefined ? { execPath } : { execPath, scriptPath };
88966
88976
  }
88967
88977
  function systemdUserUnitDir(host = {}) {
88968
- return host.unitDir ?? path191.join(process.env["XDG_CONFIG_HOME"] ?? path191.join(homedir6(), ".config"), "systemd", "user");
88978
+ if (host.unitDir !== undefined)
88979
+ return host.unitDir;
88980
+ if (inTestContext())
88981
+ refuseRealHost("systemd --user unit directory (~/.config/systemd/user)");
88982
+ return path191.join(process.env["XDG_CONFIG_HOME"] ?? path191.join(homedir6(), ".config"), "systemd", "user");
88969
88983
  }
88970
88984
  function launchAgentsDir(host) {
88971
- return host.launchAgentsDir ?? path191.join(homedir6(), "Library", "LaunchAgents");
88985
+ if (host.launchAgentsDir !== undefined)
88986
+ return host.launchAgentsDir;
88987
+ if (inTestContext())
88988
+ refuseRealHost("LaunchAgents directory (~/Library/LaunchAgents)");
88989
+ return path191.join(homedir6(), "Library", "LaunchAgents");
88972
88990
  }
88973
88991
  function uidOf(host) {
88974
88992
  return host.uid ?? (typeof process.getuid === "function" ? process.getuid() : 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/keryx",
3
- "version": "0.2.156",
3
+ "version": "0.2.157",
4
4
  "description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
5
5
  "private": false,
6
6
  "publishConfig": {