@commonlyai/cli 0.1.204 → 0.1.206

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonlyai/cli",
3
- "version": "0.1.204",
3
+ "version": "0.1.206",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The Commonly CLI — connect agents, manage pods, iterate fast",
6
6
  "type": "module",
@@ -1,4 +1,6 @@
1
1
  import { createOwnKeyResolver, createMachineReportClient } from '../lib/own-key-launch.js';
2
+ import { foregroundDaemonHint } from '../lib/daemon-hint.js';
3
+ import { loadDaemonRecord } from '../lib/daemon-store.js';
2
4
  import { WALKED_HARNESSES } from '../lib/runtime-inventory.js';
3
5
  import { createRuntimeReporter } from '../lib/runtime-observation.js';
4
6
  /**
@@ -3551,6 +3553,9 @@ export const performDetach = async ({
3551
3553
  * kernel's own timestamps without conversion.
3552
3554
  */
3553
3555
  const stamp = () => new Date().toISOString();
3556
+ // An unreadable daemon record still means a daemon was registered here; the
3557
+ // hint only chooses between the two steps, so it must not throw on it.
3558
+ const hasDaemonRecord = () => { try { return Boolean(loadDaemonRecord()); } catch { return true; } };
3554
3559
 
3555
3560
  /**
3556
3561
  * Map `agent run`'s cascade flags onto resolveCascadeSettings' override keys.
@@ -4044,7 +4049,7 @@ Docs:
4044
4049
  });
4045
4050
 
4046
4051
  console.log(`${stamp()} [${name}] polling ${record.instanceUrl} for events (ctrl+c to stop)`);
4047
- console.log(`${stamp()} [${name}] foreground mode; to background and keep it across logins, run: commonly daemon install`);
4052
+ console.log(`${stamp()} [${name}] ${foregroundDaemonHint({ daemonRegistered: hasDaemonRecord() })}`);
4048
4053
 
4049
4054
  const { stop } = performRun({
4050
4055
  instanceUrl: record.instanceUrl,
@@ -0,0 +1,6 @@
1
+ // The hint a foreground `commonly agent run` prints for keeping the agent
2
+ // running. The daemon supervises only the agents placed on this computer, so
3
+ // the hint depends on whether a daemon is registered here at all.
4
+ export const foregroundDaemonHint = ({ daemonRegistered }) => (daemonRegistered
5
+ ? 'foreground mode; this stops when the terminal closes. To keep it running, add the agent to this computer in the web app: Agents → Bring your own → On my computer'
6
+ : 'foreground mode; this stops when the terminal closes. To keep it running, add this computer with: commonly daemon register && commonly daemon install, then add the agent to it in the web app: Agents → Bring your own → On my computer');
@@ -45,7 +45,8 @@ const PLATFORM_BASELINE = String.raw`
45
45
  (path "/dev/null")
46
46
  (vnode-type CHARACTER-DEVICE)))
47
47
 
48
- ; Loader + standard system resources.
48
+ ; Loader + standard system resources. Node opens this one macOS OpenSSL config
49
+ ; file at startup; the macOS adapter job's Node was denied it without this rule.
49
50
  (allow file-read* file-test-existence
50
51
  (subpath "/Library/Apple")
51
52
  (subpath "/Library/Filesystems/NetFSPlugins")
@@ -54,8 +55,8 @@ const PLATFORM_BASELINE = String.raw`
54
55
  (subpath "/private/var/db/timezone")
55
56
  (subpath "/usr/lib")
56
57
  (subpath "/usr/share")
58
+ (literal "/System/Library/OpenSSL/openssl.cnf")
57
59
  (subpath "/Library/Preferences")
58
- (subpath "/Library/Keychains")
59
60
  (subpath "/var/db")
60
61
  (subpath "/private/var/db"))
61
62
  (allow file-read* file-test-existence