@openape/nest 2.1.1 → 2.1.2

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/index.mjs +8 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -8,8 +8,14 @@ import process4 from "process";
8
8
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
9
9
  import { homedir } from "os";
10
10
  import { join } from "path";
11
- var REGISTRY_DIR = homedir();
12
- var REGISTRY_PATH = join(REGISTRY_DIR, "agents.json");
11
+ function resolveRegistryPath() {
12
+ if (process.env.OPENAPE_NEST_REGISTRY_PATH) return process.env.OPENAPE_NEST_REGISTRY_PATH;
13
+ if (existsSync("/var/openape/nest/agents.json")) return "/var/openape/nest/agents.json";
14
+ if (existsSync("/var/openape/nest")) return "/var/openape/nest/agents.json";
15
+ return join(homedir(), "agents.json");
16
+ }
17
+ var REGISTRY_PATH = resolveRegistryPath();
18
+ var REGISTRY_DIR = REGISTRY_PATH.replace(/\/agents\.json$/, "");
13
19
  function emptyRegistry() {
14
20
  return { version: 1, agents: [] };
15
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openape/nest",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "OpenApe Nest — local control-plane daemon that supervises agent processes on this computer. Talks to troop SP for ownership state, spawns/destroys agents via DDISA always-grants, supervises chat-bridge children (replacing per-agent launchd plists).",
5
5
  "type": "module",
6
6
  "license": "MIT",