@cloudagentfleet/hub 0.1.1 → 0.1.3
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 +25 -0
- package/README.md +61 -0
- package/dist/cloudagentfleet-hub.mjs +7 -1
- package/package.json +5 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @cloudagentfleet/hub
|
|
2
|
+
|
|
3
|
+
## 0.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c659eba`](https://github.com/hirenf14/cloudagentfleet/commit/c659eba74f7328de378d9f73799bf6c938b7f7a3) Thanks [@hirenf14](https://github.com/hirenf14)! - Add package READMEs with install and start instructions for npm.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`c659eba`](https://github.com/hirenf14/cloudagentfleet/commit/c659eba74f7328de378d9f73799bf6c938b7f7a3)]:
|
|
10
|
+
- @cloudagentfleet/ui@0.1.3
|
|
11
|
+
|
|
12
|
+
## 0.1.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`add55cd`](https://github.com/hirenf14/cloudagentfleet/commit/add55cdecc20e049719cd8b06c7ff399dd491866) Thanks [@hirenf14](https://github.com/hirenf14)! - Fix Hub binary exiting immediately: start when invoked as cloudagentfleet-hub.mjs.
|
|
17
|
+
|
|
18
|
+
## 0.1.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [`ad68c04`](https://github.com/hirenf14/cloudagentfleet/commit/ad68c04bf6bcd4419f007e609d1fd6a3fcef339a) Thanks [@hirenf14](https://github.com/hirenf14)! - Initial public release of Cloud Agent Fleet Hub, UI, and Worker packages.
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [[`ad68c04`](https://github.com/hirenf14/cloudagentfleet/commit/ad68c04bf6bcd4419f007e609d1fd6a3fcef339a)]:
|
|
25
|
+
- @cloudagentfleet/ui@0.1.1
|
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# @cloudagentfleet/hub
|
|
2
|
+
|
|
3
|
+
Cloud Agent Fleet Hub — private control plane, Codeman proxy, and fleet API.
|
|
4
|
+
|
|
5
|
+
Requires Node.js **22.6+** and `@cloudagentfleet/ui` (Hub serves UI assets from that package).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
mkdir -p ~/cloudagentfleet-hub && cd ~/cloudagentfleet-hub
|
|
11
|
+
npm install @cloudagentfleet/hub @cloudagentfleet/ui
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Or globally:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install --global @cloudagentfleet/hub @cloudagentfleet/ui
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Start
|
|
21
|
+
|
|
22
|
+
From a dedicated folder (recommended):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
mkdir -p data
|
|
26
|
+
export HOSTED_AGENTS_HOST=127.0.0.1
|
|
27
|
+
export HOSTED_AGENTS_PORT=8787
|
|
28
|
+
export HOSTED_AGENTS_DATA_PATH="$PWD/data/hub.json"
|
|
29
|
+
|
|
30
|
+
npx cloudagentfleet-hub
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
You should see:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
Hosted Agents Controller listening on 127.0.0.1:8787
|
|
37
|
+
Hub UI password: <generated>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Open `http://127.0.0.1:8787` and sign in with the printed password.
|
|
41
|
+
|
|
42
|
+
### Optional environment
|
|
43
|
+
|
|
44
|
+
| Variable | Default | Purpose |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| `HOSTED_AGENTS_HOST` | `127.0.0.1` | Bind address (`0.0.0.0` for LAN) |
|
|
47
|
+
| `HOSTED_AGENTS_PORT` | `8787` | HTTP port |
|
|
48
|
+
| `HOSTED_AGENTS_DATA_PATH` | `data/hub.json` | Fleet state file |
|
|
49
|
+
| `HOSTED_AGENTS_UI_PASSWORD` | (generated) | Hub UI password (stops printing bootstrap password) |
|
|
50
|
+
| `HOSTED_AGENTS_AUTH_TOKEN` | unset | Optional API token for workers / enrollment |
|
|
51
|
+
|
|
52
|
+
## Binary
|
|
53
|
+
|
|
54
|
+
- `cloudagentfleet-hub` — starts the Hub (compiled CLI bundle only; no source tree)
|
|
55
|
+
|
|
56
|
+
## Related packages
|
|
57
|
+
|
|
58
|
+
- [`@cloudagentfleet/ui`](https://www.npmjs.com/package/@cloudagentfleet/ui) — Hub UI assets
|
|
59
|
+
- [`@cloudagentfleet/worker`](https://www.npmjs.com/package/@cloudagentfleet/worker) — machine Worker + operator CLI
|
|
60
|
+
|
|
61
|
+
Source and docs: [hirenf14/cloudagentfleet](https://github.com/hirenf14/cloudagentfleet)
|
|
@@ -2666,7 +2666,13 @@ async function readJson(request) {
|
|
|
2666
2666
|
chunks.push(decoder.decode());
|
|
2667
2667
|
return JSON.parse(chunks.join(""));
|
|
2668
2668
|
}
|
|
2669
|
-
|
|
2669
|
+
function isDirectHubEntrypoint() {
|
|
2670
|
+
const entry = process.argv[1];
|
|
2671
|
+
if (!entry) return false;
|
|
2672
|
+
const normalized = entry.replaceAll("\\", "/");
|
|
2673
|
+
return normalized.endsWith("/server.ts") || normalized.endsWith("/server.mjs") || normalized.endsWith("/cloudagentfleet-hub.mjs");
|
|
2674
|
+
}
|
|
2675
|
+
if (isDirectHubEntrypoint()) {
|
|
2670
2676
|
startControllerServer();
|
|
2671
2677
|
}
|
|
2672
2678
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudagentfleet/hub",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Cloud Agent Fleet Hub — control plane, routing, and Codeman proxy.",
|
|
6
6
|
"type": "module",
|
|
@@ -8,14 +8,16 @@
|
|
|
8
8
|
"cloudagentfleet-hub": "./dist/cloudagentfleet-hub.mjs"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
|
-
"dist"
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md",
|
|
13
|
+
"CHANGELOG.md"
|
|
12
14
|
],
|
|
13
15
|
"publishConfig": {
|
|
14
16
|
"access": "public",
|
|
15
17
|
"registry": "https://registry.npmjs.org/"
|
|
16
18
|
},
|
|
17
19
|
"dependencies": {
|
|
18
|
-
"@cloudagentfleet/ui": "0.1.
|
|
20
|
+
"@cloudagentfleet/ui": "0.1.3"
|
|
19
21
|
},
|
|
20
22
|
"engines": {
|
|
21
23
|
"node": ">=22.6.0"
|