@cloudagentfleet/worker 0.1.3 → 0.1.5

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,17 @@
1
1
  # @cloudagentfleet/worker
2
2
 
3
+ ## 0.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`35f2a3d`](https://github.com/hirenf14/cloudagentfleet/commit/35f2a3dcb5cd656c76338454b022de3c34dedf6b) Thanks [@hirenf14](https://github.com/hirenf14)! - Fix Worker CLI exiting immediately when invoked as cloudagentfleet.mjs.
8
+
9
+ ## 0.1.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [`c917cb8`](https://github.com/hirenf14/cloudagentfleet/commit/c917cb83c20000d1d42a4a4eeefde5c9935f1a6b) Thanks [@hirenf14](https://github.com/hirenf14)! - Add GitHub repository, homepage, and bugs links to published packages.
14
+
3
15
  ## 0.1.3
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -21,41 +21,41 @@ npx cloudagentfleet --help
21
21
 
22
22
  ## Quick start
23
23
 
24
- Point the Worker at a running Hub, then configure and start:
24
+ **Same `HOSTED_AGENTS_AUTH_TOKEN` as the Hub** is required (Hub UI auth rejects
25
+ Worker enroll without it). Codeman should already be running (`codeman web`).
25
26
 
26
27
  ```bash
28
+ export HOSTED_AGENTS_AUTH_TOKEN="replace-with-a-long-shared-secret"
27
29
  cloudagentfleet setup --run
28
30
  ```
29
31
 
30
- Or install as a user service:
32
+ Use the Hub’s reachable URL as Controller URL (not `127.0.0.1` if Hub is on
33
+ another machine). Note the Worker ID printed/chosen during setup.
31
34
 
32
- ```bash
33
- cloudagentfleet setup
34
- cloudagentfleet worker install
35
- cloudagentfleet worker start
36
- cloudagentfleet worker status
37
- ```
35
+ ### Enroll so the Hub UI shows an instance
38
36
 
39
- ## Enroll with the Hub
40
-
41
- Connector mode (Worker-backed):
37
+ The dashboard lists **instances**, not raw Workers. After the Worker is online:
42
38
 
43
39
  ```bash
40
+ export HOSTED_AGENTS_AUTH_TOKEN="replace-with-a-long-shared-secret"
41
+
44
42
  cloudagentfleet enroll connector \
45
- --controller-url http://127.0.0.1:8787 \
43
+ --controller-url http://<hub-host>:8787 \
46
44
  --instance-id codeman-1 \
47
45
  --name "My Codeman" \
48
- --node-id worker-1
46
+ --node-id <worker-id-from-setup> \
47
+ --workspace-mode folders \
48
+ --workspace-root "$HOME/workspaces"
49
49
  ```
50
50
 
51
- Direct Tailscale mode (preferred when Codeman is reachable on the tailnet):
51
+ Restart the Worker (`cloudagentfleet worker stop` / `start`, or re-run
52
+ `cloudagentfleet setup --run`) so it uses `CODEMAN_INSTANCE_ID=codeman-1`.
53
+
54
+ Check:
52
55
 
53
56
  ```bash
54
- cloudagentfleet enroll tailscale-url \
55
- --controller-url http://127.0.0.1:8787 \
56
- --instance-id codeman-1 \
57
- --name "My Codeman" \
58
- --url https://codeman.tailnet.ts.net
57
+ curl -H "Authorization: Bearer $HOSTED_AGENTS_AUTH_TOKEN" http://<hub-host>:8787/api/workers
58
+ curl -H "Authorization: Bearer $HOSTED_AGENTS_AUTH_TOKEN" http://<hub-host>:8787/api/instances
59
59
  ```
60
60
 
61
61
  ## Useful commands
@@ -903,7 +903,13 @@ function help() {
903
903
  "The setup flow asks before installing Codeman and never performs provider login."
904
904
  ].join("\n"));
905
905
  }
906
- if (process.argv[1] && (resolve(process.argv[1]) === resolve(fileURLToPath(import.meta.url)) || process.argv[1].endsWith("hosted-agents.mjs"))) {
906
+ function isDirectCliEntrypoint() {
907
+ const entry = process.argv[1];
908
+ if (!entry) return false;
909
+ const normalized = entry.replaceAll("\\", "/");
910
+ return normalized.endsWith("/hosted-agents.mjs") || normalized.endsWith("/cloudagentfleet.mjs") || resolve(entry) === resolve(fileURLToPath(import.meta.url));
911
+ }
912
+ if (isDirectCliEntrypoint()) {
907
913
  try {
908
914
  const commandName = process.argv[2] ?? "help";
909
915
  if (commandName === "setup") await setup();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudagentfleet/worker",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "private": false,
5
5
  "description": "Cloud Agent Fleet Worker — machine companion and operator CLI.",
6
6
  "type": "module",
@@ -14,6 +14,15 @@
14
14
  "README.md",
15
15
  "CHANGELOG.md"
16
16
  ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/hirenf14/cloudagentfleet.git",
20
+ "directory": "apps/node-agent"
21
+ },
22
+ "homepage": "https://github.com/hirenf14/cloudagentfleet/tree/master/apps/node-agent#readme",
23
+ "bugs": {
24
+ "url": "https://github.com/hirenf14/cloudagentfleet/issues"
25
+ },
17
26
  "publishConfig": {
18
27
  "access": "public",
19
28
  "registry": "https://registry.npmjs.org/"