@ouro.bot/cli 0.1.0-alpha.545 → 0.1.0-alpha.547

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/changelog.json CHANGED
@@ -1,6 +1,18 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.547",
6
+ "changes": [
7
+ "Version-managed macOS daemon LaunchAgents now point at the stable `~/.ouro-cli/CurrentVersion` entry path instead of a concrete installed version directory, so future runtime updates do not leave launchd holding stale daemon argv."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.546",
12
+ "changes": [
13
+ "Launchd habit sync now leaves the daemon launch agent plist alone, preventing the daemon from booting out its own `bot.ouro.daemon` service during startup."
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.545",
6
18
  "changes": [
@@ -97,6 +97,14 @@ function defaultWriteRaw(text) {
97
97
  process.stdout.write(text);
98
98
  }
99
99
  /* v8 ignore stop */
100
+ function resolveDaemonBootEntryPath(homeDir) {
101
+ const repoRoot = (0, identity_1.getRepoRoot)();
102
+ const versionManagerRootMarker = `${path.sep}.ouro-cli${path.sep}versions${path.sep}`;
103
+ if ((0, runtime_mode_1.detectRuntimeMode)(repoRoot) === "production" && repoRoot.includes(versionManagerRootMarker)) {
104
+ return path.join((0, ouro_version_manager_1.getOuroCliHome)(homeDir), "CurrentVersion", "node_modules", "@ouro.bot", "cli", "dist", "heart", "daemon", "daemon-entry.js");
105
+ }
106
+ return path.join(repoRoot, "dist", "heart", "daemon", "daemon-entry.js");
107
+ }
100
108
  /**
101
109
  * Read the runtimeVersion from the first .ouro bundle's bundle-meta.json.
102
110
  * Returns undefined if none found or unreadable.
@@ -218,7 +226,7 @@ function defaultEnsureDaemonBootPersistence(socketPath) {
218
226
  mkdirp: (dir) => fs.mkdirSync(dir, { recursive: true }),
219
227
  homeDir,
220
228
  };
221
- const entryPath = path.join((0, identity_1.getRepoRoot)(), "dist", "heart", "daemon", "daemon-entry.js");
229
+ const entryPath = resolveDaemonBootEntryPath(homeDir);
222
230
  /* v8 ignore next -- covered via mock in daemon-cli-defaults.test.ts; v8 on CI attributes the real fs.existsSync branch to the non-mock load @preserve */
223
231
  if (!fs.existsSync(entryPath)) {
224
232
  (0, runtime_1.emitNervesEvent)({
@@ -43,6 +43,7 @@ exports.crontabLine = crontabLine;
43
43
  const os = __importStar(require("os"));
44
44
  const runtime_1 = require("../../nerves/runtime");
45
45
  const PLIST_PREFIX = "bot.ouro.";
46
+ const DAEMON_PLIST_FILENAME = "bot.ouro.daemon.plist";
46
47
  function plistLabel(job) {
47
48
  return `${PLIST_PREFIX}${job.agent}.${job.taskId}`;
48
49
  }
@@ -176,7 +177,9 @@ class LaunchdCronManager {
176
177
  listPlistFiles() {
177
178
  if (!this.deps.existsFile(this.launchAgentsDir))
178
179
  return [];
179
- return this.deps.listDir(this.launchAgentsDir).filter((f) => f.startsWith(PLIST_PREFIX) && f.endsWith(".plist"));
180
+ return this.deps.listDir(this.launchAgentsDir).filter((f) => f.startsWith(PLIST_PREFIX) &&
181
+ f.endsWith(".plist") &&
182
+ f !== DAEMON_PLIST_FILENAME);
180
183
  }
181
184
  }
182
185
  exports.LaunchdCronManager = LaunchdCronManager;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.545",
3
+ "version": "0.1.0-alpha.547",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",