@cloudagentfleet/worker 0.1.4 → 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 +6 -0
- package/README.md +19 -19
- package/dist/cloudagentfleet.mjs +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
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
|
+
|
|
3
9
|
## 0.1.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -21,41 +21,41 @@ npx cloudagentfleet --help
|
|
|
21
21
|
|
|
22
22
|
## Quick start
|
|
23
23
|
|
|
24
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
43
|
+
--controller-url http://<hub-host>:8787 \
|
|
46
44
|
--instance-id codeman-1 \
|
|
47
45
|
--name "My Codeman" \
|
|
48
|
-
--node-id worker-
|
|
46
|
+
--node-id <worker-id-from-setup> \
|
|
47
|
+
--workspace-mode folders \
|
|
48
|
+
--workspace-root "$HOME/workspaces"
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
|
|
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
|
-
|
|
55
|
-
|
|
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
|
package/dist/cloudagentfleet.mjs
CHANGED
|
@@ -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
|
-
|
|
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();
|