@alook/daemon 0.1.13 → 0.1.14

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/README.md CHANGED
@@ -27,25 +27,23 @@ is what's reusable — plug in whatever host you like.
27
27
 
28
28
  ## Daemon lifecycle commands
29
29
 
30
- The web Machines sheet generates the full command, including the correct HTTP
31
- and WebSocket endpoints. Published-package commands use the package's explicit
32
- binary so npm never guesses the wrong executable:
30
+ The web Machines sheet generates the full command. Production commands use the
31
+ built-in Alook endpoints; local development commands include explicit local URLs:
33
32
 
34
33
  ```sh
35
- npm exec --yes --package=@alook/daemon@latest -- alook-daemon daemon start \
36
- --machine-key '<cmt_pair_token>' --server-url '<https_url>' --ws-url '<wss_url>'
34
+ npx --yes @alook/daemon@latest daemon start --machine-key '<cmt_pair_token>'
37
35
  ```
38
36
 
39
37
  Restart a previously paired machine without rotating its credential:
40
38
 
41
39
  ```sh
42
- npm exec --yes --package=@alook/daemon@latest -- alook-daemon daemon start --id '<machine_id>'
40
+ npx --yes @alook/daemon@latest daemon start --id '<machine_id>'
43
41
  ```
44
42
 
45
43
  Reconnect/rotate only with the command generated for that exact machine:
46
44
 
47
45
  ```sh
48
- npm exec --yes --package=@alook/daemon@latest -- alook-daemon daemon reconnect \
46
+ npx --yes @alook/daemon@latest daemon reconnect \
49
47
  --id '<machine_id>' --machine-key '<cmt_reconnect_token>'
50
48
  ```
51
49
 
package/dist/cli/index.js CHANGED
@@ -27975,6 +27975,8 @@ var RUNNER_TERM_GRACE_MS = 2000;
27975
27975
  var RUNNER_KILL_GRACE_MS = 2000;
27976
27976
  var MACHINE_ID_PATTERN = /^cm_[A-Za-z0-9_-]{8,64}$/;
27977
27977
  var LEGACY_DAEMON_ID_PATTERN = /^[a-f0-9]{12}$/;
27978
+ var DEFAULT_SERVER_URL = "https://alook.ai";
27979
+ var DEFAULT_WS_URL = "wss://alook.ai/api/ws/community-daemon";
27978
27980
  function resolveDefaultBaseDir() {
27979
27981
  const root = process.env.ALOOK_PROJECT_ROOT || path13.join(homedir4(), ".alook");
27980
27982
  return path13.join(root, "daemon");
@@ -28577,12 +28579,8 @@ async function resolveMachineIdentity(serverUrl, credential) {
28577
28579
  return body.machineId;
28578
28580
  }
28579
28581
  async function prepareDaemonStart(opts) {
28580
- const serverUrl = opts.serverUrl || process.env.ALOOK_SERVER_URL;
28581
- const wsUrl = opts.wsUrl || process.env.ALOOK_SERVER_WS_URL;
28582
- if (!serverUrl)
28583
- throw new Error("Server URL required — pass --server-url or set ALOOK_SERVER_URL");
28584
- if (!wsUrl)
28585
- throw new Error("WebSocket URL required — pass --ws-url or set ALOOK_SERVER_WS_URL");
28582
+ const serverUrl = opts.serverUrl || process.env.ALOOK_SERVER_URL || DEFAULT_SERVER_URL;
28583
+ const wsUrl = opts.wsUrl || process.env.ALOOK_SERVER_WS_URL || DEFAULT_WS_URL;
28586
28584
  if (!opts.machineKey.startsWith("cmt_") && !opts.machineKey.startsWith("cmk_")) {
28587
28585
  throw new Error("invalid machine key format — expected `cmt_` or `cmk_`");
28588
28586
  }
@@ -29668,7 +29666,7 @@ function buildProgram(stdin) {
29668
29666
  });
29669
29667
  const daemon = program.command("daemon").description("daemon operations").exitOverride();
29670
29668
  daemon.configureOutput({ writeOut: () => {}, writeErr: () => {} });
29671
- daemon.command("start").description("start the daemon (connects to server, manages agent lifecycles)").option("--machine-key <key>", "machine key for first-time pairing").option("--id <machineId>", "restart a previously paired machine by id").option("--server-url <url>", "server HTTP URL (or ALOOK_SERVER_URL env)").option("--ws-url <url>", "server WebSocket URL (or ALOOK_SERVER_WS_URL env)").option("--base-dir <path>", "data directory for agent workspaces and pidfile (or ALOOK_DATA_DIR env)").option("--foreground", "run in the current process and tee daemon logs to the terminal").exitOverride().configureOutput({ writeOut: () => {}, writeErr: () => {} }).action(async function() {
29669
+ daemon.command("start").description("start the daemon (connects to server, manages agent lifecycles)").option("--machine-key <key>", "machine key for first-time pairing").option("--id <machineId>", "restart a previously paired machine by id").option("--server-url <url>", "server HTTP URL (or ALOOK_SERVER_URL; defaults to production)").option("--ws-url <url>", "server WebSocket URL (or ALOOK_SERVER_WS_URL; defaults to production)").option("--base-dir <path>", "data directory for agent workspaces and pidfile (or ALOOK_DATA_DIR env)").option("--foreground", "run in the current process and tee daemon logs to the terminal").exitOverride().configureOutput({ writeOut: () => {}, writeErr: () => {} }).action(async function() {
29672
29670
  const localOpts = this.opts();
29673
29671
  const machineKey = localOpts.machineKey;
29674
29672
  const id = localOpts.id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alook/daemon",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Alook agent daemon — host-side runtime backend, process manager, credential proxy, and control plane.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/alookai/alook#readme",