@cloudagentfleet/hub 0.1.4 → 0.1.7
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 +11 -0
- package/README.md +36 -14
- package/dist/cloudagentfleet-hub.mjs +36 -9
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @cloudagentfleet/hub
|
|
2
2
|
|
|
3
|
+
## 0.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e8300b3`](https://github.com/hirenf14/cloudagentfleet/commit/e8300b3321289b1544c1cd8026c01fb363ab666e) Thanks [@hirenf14](https://github.com/hirenf14)! - Keep Shell (raw CLI) in the agent list and clarify provider CLI labels in Start session.
|
|
8
|
+
|
|
9
|
+
- [`e8300b3`](https://github.com/hirenf14/cloudagentfleet/commit/e8300b3321289b1544c1cd8026c01fb363ab666e) Thanks [@hirenf14](https://github.com/hirenf14)! - Use cloudagentfleet consistently in CLI help and Hub branding (hosted-agents remains a compatibility alias).
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`e8300b3`](https://github.com/hirenf14/cloudagentfleet/commit/e8300b3321289b1544c1cd8026c01fb363ab666e), [`e8300b3`](https://github.com/hirenf14/cloudagentfleet/commit/e8300b3321289b1544c1cd8026c01fb363ab666e)]:
|
|
12
|
+
- @cloudagentfleet/ui@0.1.7
|
|
13
|
+
|
|
3
14
|
## 0.1.4
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -19,13 +19,16 @@ npm install --global @cloudagentfleet/hub @cloudagentfleet/ui
|
|
|
19
19
|
|
|
20
20
|
## Start
|
|
21
21
|
|
|
22
|
-
From a dedicated folder (recommended)
|
|
22
|
+
From a dedicated folder (recommended). **Set a shared API token** — with a data
|
|
23
|
+
directory the Hub always enables UI login, and Workers / `enroll` need this
|
|
24
|
+
bearer token (without it they get `401 Authentication required`):
|
|
23
25
|
|
|
24
26
|
```bash
|
|
25
27
|
mkdir -p data
|
|
26
28
|
export HOSTED_AGENTS_HOST=127.0.0.1
|
|
27
29
|
export HOSTED_AGENTS_PORT=8787
|
|
28
30
|
export HOSTED_AGENTS_DATA_PATH="$PWD/data/hub.json"
|
|
31
|
+
export HOSTED_AGENTS_AUTH_TOKEN="replace-with-a-long-shared-secret"
|
|
29
32
|
|
|
30
33
|
npx cloudagentfleet-hub
|
|
31
34
|
```
|
|
@@ -39,23 +42,42 @@ Hub UI password: <generated>
|
|
|
39
42
|
|
|
40
43
|
Open `http://127.0.0.1:8787` and sign in with the printed password.
|
|
41
44
|
|
|
42
|
-
###
|
|
45
|
+
### Register a Codeman instance (required for the dashboard)
|
|
46
|
+
|
|
47
|
+
A running Worker alone does **not** appear in the Hub UI. After the Worker is
|
|
48
|
+
online, enroll an instance:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Same token as Hub. Use the Worker ID from setup.
|
|
52
|
+
export HOSTED_AGENTS_AUTH_TOKEN="replace-with-a-long-shared-secret"
|
|
53
|
+
|
|
54
|
+
cloudagentfleet enroll connector \
|
|
55
|
+
--controller-url http://127.0.0.1:8787 \
|
|
56
|
+
--instance-id codeman-1 \
|
|
57
|
+
--name "My Codeman" \
|
|
58
|
+
--node-id <worker-id-from-setup> \
|
|
59
|
+
--workspace-mode folders \
|
|
60
|
+
--workspace-root "$HOME/workspaces"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then **restart the Worker** so it picks up `CODEMAN_INSTANCE_ID=codeman-1`.
|
|
64
|
+
Refresh the Hub UI — the instance should appear.
|
|
65
|
+
|
|
66
|
+
Check registration:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
curl -H "Authorization: Bearer $HOSTED_AGENTS_AUTH_TOKEN" http://127.0.0.1:8787/api/workers
|
|
70
|
+
curl -H "Authorization: Bearer $HOSTED_AGENTS_AUTH_TOKEN" http://127.0.0.1:8787/api/instances
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Environment
|
|
43
74
|
|
|
44
75
|
| Variable | Default | Purpose |
|
|
45
76
|
| --- | --- | --- |
|
|
46
|
-
| `HOSTED_AGENTS_HOST` | `127.0.0.1` | Bind address (`0.0.0.0` for LAN) |
|
|
77
|
+
| `HOSTED_AGENTS_HOST` | `127.0.0.1` | Bind address (`0.0.0.0` for LAN; token then required) |
|
|
47
78
|
| `HOSTED_AGENTS_PORT` | `8787` | HTTP port |
|
|
48
79
|
| `HOSTED_AGENTS_DATA_PATH` | `data/hub.json` | Fleet state file |
|
|
49
80
|
| `HOSTED_AGENTS_UI_PASSWORD` | (generated) | Hub UI password (stops printing bootstrap password) |
|
|
50
|
-
| `HOSTED_AGENTS_AUTH_TOKEN` | unset |
|
|
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
|
|
81
|
+
| `HOSTED_AGENTS_AUTH_TOKEN` | unset | **Required** for Workers and CLI enroll when UI auth is on |
|
|
60
82
|
|
|
61
|
-
Source
|
|
83
|
+
Source: [hirenf14/cloudagentfleet](https://github.com/hirenf14/cloudagentfleet)
|
|
@@ -995,7 +995,13 @@ var CodemanConnectorAdapter = class {
|
|
|
995
995
|
const data = await this.request("capabilities");
|
|
996
996
|
const agents = isRecord2(data) && Array.isArray(data.agents) ? data.agents : data;
|
|
997
997
|
if (!Array.isArray(agents)) return this.instance.agents.map((agent) => ({ ...agent }));
|
|
998
|
-
|
|
998
|
+
const mapped = agents.map((agent) => toConnectorAgent(agent)).filter((agent) => agent !== void 0);
|
|
999
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1000
|
+
return mapped.filter((agent) => {
|
|
1001
|
+
if (seen.has(agent.id)) return false;
|
|
1002
|
+
seen.add(agent.id);
|
|
1003
|
+
return true;
|
|
1004
|
+
});
|
|
999
1005
|
}
|
|
1000
1006
|
async listWorkspaces() {
|
|
1001
1007
|
const data = await this.request("workspaces");
|
|
@@ -1044,7 +1050,12 @@ var CodemanConnectorAdapter = class {
|
|
|
1044
1050
|
const id2 = String(raw.id ?? "");
|
|
1045
1051
|
if (!id2) throw new Error("Connector returned a session without an ID");
|
|
1046
1052
|
const resolvedWorkspaceId = workspaceId ?? String(raw.workspaceId ?? raw.workingDir ?? "unknown");
|
|
1047
|
-
const resolvedAgent = agent ?? toConnectorAgent(raw.mode)
|
|
1053
|
+
const resolvedAgent = agent ?? toConnectorAgent(raw.mode) ?? {
|
|
1054
|
+
id: "shell",
|
|
1055
|
+
name: "Shell (raw CLI)",
|
|
1056
|
+
mode: "shell",
|
|
1057
|
+
ready: true
|
|
1058
|
+
};
|
|
1048
1059
|
const createdAt = connectorTimestamp(raw.createdAt ?? raw.created_at);
|
|
1049
1060
|
return {
|
|
1050
1061
|
id: id2,
|
|
@@ -1063,13 +1074,29 @@ var CodemanConnectorAdapter = class {
|
|
|
1063
1074
|
}
|
|
1064
1075
|
};
|
|
1065
1076
|
function toConnectorAgent(raw) {
|
|
1077
|
+
if (typeof raw === "string") {
|
|
1078
|
+
const known2 = ["claude", "shell", "opencode", "codex", "gemini", "antigravity", "pi", "grok", "deepseek"];
|
|
1079
|
+
if (!known2.includes(raw)) return void 0;
|
|
1080
|
+
return {
|
|
1081
|
+
id: raw,
|
|
1082
|
+
name: raw === "claude" ? "Claude Code" : raw === "shell" ? "Shell (raw CLI)" : raw,
|
|
1083
|
+
mode: raw,
|
|
1084
|
+
ready: true
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1066
1087
|
const value = isRecord2(raw) ? raw : {};
|
|
1067
|
-
const mode = String(value.mode ?? value.id ??
|
|
1088
|
+
const mode = String(value.mode ?? value.id ?? "shell");
|
|
1068
1089
|
const known = ["claude", "shell", "opencode", "codex", "gemini", "antigravity", "pi", "grok", "deepseek"];
|
|
1069
1090
|
const selected = known.includes(mode) ? mode : "shell";
|
|
1091
|
+
const id2 = String(value.id ?? selected);
|
|
1092
|
+
if (selected === "shell" && id2 !== "shell" && !String(value.name ?? "").trim()) {
|
|
1093
|
+
return void 0;
|
|
1094
|
+
}
|
|
1070
1095
|
return {
|
|
1071
|
-
id:
|
|
1072
|
-
name: String(
|
|
1096
|
+
id: id2,
|
|
1097
|
+
name: String(
|
|
1098
|
+
value.name ?? (id2 === "claude-code" ? "Claude Code CLI" : id2 === "cursor-agent" ? "Cursor Agent CLI" : selected === "claude" ? "Claude Code" : selected === "shell" ? "Shell (raw CLI)" : selected)
|
|
1099
|
+
),
|
|
1073
1100
|
mode: selected,
|
|
1074
1101
|
ready: value.ready !== false && value.available !== false
|
|
1075
1102
|
};
|
|
@@ -1613,7 +1640,7 @@ function defaultAgents() {
|
|
|
1613
1640
|
];
|
|
1614
1641
|
return modes.map((mode) => ({
|
|
1615
1642
|
id: mode,
|
|
1616
|
-
name: mode === "claude" ? "Claude Code" : mode,
|
|
1643
|
+
name: mode === "claude" ? "Claude Code" : mode === "shell" ? "Shell (raw CLI)" : mode,
|
|
1617
1644
|
mode,
|
|
1618
1645
|
ready: true
|
|
1619
1646
|
}));
|
|
@@ -1978,7 +2005,7 @@ var DASHBOARD_ROOT = resolveDashboardRoot();
|
|
|
1978
2005
|
function startControllerServer(options = {}) {
|
|
1979
2006
|
const controller = createControllerServer(options);
|
|
1980
2007
|
controller.server.listen(controller.port, controller.host, () => {
|
|
1981
|
-
console.log(`
|
|
2008
|
+
console.log(`Cloud Agent Fleet Hub listening on ${controller.host}:${controller.port}`);
|
|
1982
2009
|
if (controller.revealPassword) {
|
|
1983
2010
|
console.log(`Hub UI password: ${controller.revealPassword}`);
|
|
1984
2011
|
console.log(
|
|
@@ -2611,7 +2638,7 @@ function sendLoginPage(response, authEnabled) {
|
|
|
2611
2638
|
response.end(`<!doctype html>
|
|
2612
2639
|
<html lang="en">
|
|
2613
2640
|
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
2614
|
-
<title>
|
|
2641
|
+
<title>Cloud Agent Fleet \u2014 Sign in</title>
|
|
2615
2642
|
<style>
|
|
2616
2643
|
body{margin:0;min-height:100vh;display:grid;place-items:center;background:#090c10;color:#d7dee7;font:16px system-ui,sans-serif}
|
|
2617
2644
|
main{width:min(360px,calc(100vw - 48px));padding:28px;border:1px solid #253044;border-radius:14px;background:#111722;box-shadow:0 20px 60px #0008}
|
|
@@ -2620,7 +2647,7 @@ label{display:grid;gap:8px;color:#b9c5d6}input{padding:12px;border:1px solid #3a
|
|
|
2620
2647
|
button{width:100%;margin-top:16px;padding:12px;border:0;border-radius:8px;background:#77e0af;color:#07110d;font:600 15px system-ui;cursor:pointer}
|
|
2621
2648
|
#error{min-height:20px;margin-top:12px;color:#ff8585}
|
|
2622
2649
|
</style></head>
|
|
2623
|
-
<body><main><h1>
|
|
2650
|
+
<body><main><h1>Cloud Agent Fleet</h1><p>Sign in to the private fleet Hub.</p>
|
|
2624
2651
|
<form id="login"><label>Password<input id="password" type="password" autocomplete="current-password" required autofocus></label>
|
|
2625
2652
|
<button type="submit">Sign in</button><div id="error" role="alert"></div></form></main>
|
|
2626
2653
|
<script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudagentfleet/hub",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Cloud Agent Fleet Hub — control plane, routing, and Codeman proxy.",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"registry": "https://registry.npmjs.org/"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@cloudagentfleet/ui": "0.1.
|
|
29
|
+
"@cloudagentfleet/ui": "0.1.7"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=22.6.0"
|