@opennous/cli 0.18.1 → 0.18.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @opennous/cli changelog
2
2
 
3
+ ## 0.18.2
4
+
5
+ ### Fixed: the runner service finds your Mac's name
6
+
7
+ Started at login, the runner couldn't find `scutil`, so it named your Mac by its network hostname
8
+ instead of its own name. It now calls it by its full path, and saves nothing (GET-1308).
9
+
3
10
  ## 0.18.1
4
11
 
5
12
  ### Fixed: one machine is one runner
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opennous/cli",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "description": "Ownable CLI — set up Ownable, connect it to your coding agent, and read the Context API from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -731,13 +731,10 @@ runnerCmd
731
731
  if (s.log) console.log(`Log: ${s.log}`);
732
732
  });
733
733
 
734
- /** This machine's name for its runner, kept in the config so it is the same every run (GET-1308). */
734
+ /** This machine's name for its runner, the same every run (GET-1308). */
735
735
  async function runnerHost() {
736
736
  const { machineName } = await import("./runner.js");
737
- const cfg = readConfig();
738
- const name = machineName({ saved: cfg.runnerHost ?? null });
739
- if (name !== cfg.runnerHost) writeConfig({ ...cfg, runnerHost: name });
740
- return name;
737
+ return machineName();
741
738
  }
742
739
 
743
740
  /** The agent to read with: the one asked for, or whichever is signed in. Exits with what to do. */
package/src/runner.js CHANGED
@@ -37,12 +37,14 @@ export const RUN_COMMAND = "npx -y @opennous/cli@latest runner";
37
37
  /**
38
38
  * This machine's name for Ownable (GET-1308), the same every run. `os.hostname()` on a Mac follows
39
39
  * the network ("Mac.lan" on one, "Bennets-MacBook-Air.local" on another), which made one machine
40
- * two runners. The Mac's own name (System Settings → General → About) is asked once and kept.
40
+ * two runners. The Mac's own name (System Settings → General → About) is the same every run, so it
41
+ * is asked each time; elsewhere the hostname is stable. Nothing is saved: 0.18.1 saved a fallback.
41
42
  */
42
43
  export function machineName({ saved = null, os = platform(), run = spawnSync, host = hostname } = {}) {
43
44
  if (saved) return saved;
44
45
  if (os === "darwin") {
45
- const r = run("scutil", ["--get", "ComputerName"], { encoding: "utf8" });
46
+ // By its full path: a launchd service's PATH has no /usr/sbin (GET-1308, 0.18.2).
47
+ const r = run("/usr/sbin/scutil", ["--get", "ComputerName"], { encoding: "utf8" });
46
48
  const name = r.status === 0 ? String(r.stdout).trim() : "";
47
49
  if (name) return name;
48
50
  }