agenthub-multiagent-mcp 1.22.0 → 1.25.0
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/dist/activity.d.ts +3 -0
- package/dist/activity.d.ts.map +1 -1
- package/dist/activity.js +21 -1
- package/dist/activity.js.map +1 -1
- package/dist/activityHookCli.d.ts +13 -0
- package/dist/activityHookCli.d.ts.map +1 -0
- package/dist/activityHookCli.js +47 -0
- package/dist/activityHookCli.js.map +1 -0
- package/dist/activityHookInstall.d.ts +10 -0
- package/dist/activityHookInstall.d.ts.map +1 -0
- package/dist/activityHookInstall.js +57 -0
- package/dist/activityHookInstall.js.map +1 -0
- package/dist/activityMarker.d.ts +25 -0
- package/dist/activityMarker.d.ts.map +1 -0
- package/dist/activityMarker.js +72 -0
- package/dist/activityMarker.js.map +1 -0
- package/dist/activityMarker.test.d.ts +2 -0
- package/dist/activityMarker.test.d.ts.map +1 -0
- package/dist/activityMarker.test.js +0 -0
- package/dist/activityMarker.test.js.map +1 -0
- package/dist/client.d.ts +52 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +46 -0
- package/dist/client.js.map +1 -1
- package/dist/client.unit.test.js +22 -0
- package/dist/client.unit.test.js.map +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/skillInstaller.d.ts +27 -1
- package/dist/skillInstaller.d.ts.map +1 -1
- package/dist/skillInstaller.gate.test.d.ts +2 -0
- package/dist/skillInstaller.gate.test.d.ts.map +1 -0
- package/dist/skillInstaller.gate.test.js +95 -0
- package/dist/skillInstaller.gate.test.js.map +1 -0
- package/dist/skillInstaller.js +59 -0
- package/dist/skillInstaller.js.map +1 -1
- package/dist/skillInstaller.test.js +19 -1
- package/dist/skillInstaller.test.js.map +1 -1
- package/dist/tools/capabilities.test.d.ts +6 -0
- package/dist/tools/capabilities.test.d.ts.map +1 -0
- package/dist/tools/capabilities.test.js +154 -0
- package/dist/tools/capabilities.test.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +127 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/tools.test.js +6 -2
- package/dist/tools/tools.test.js.map +1 -1
- package/package.json +71 -70
- package/skills/catalog.json +18 -0
- package/skills/manifest.json +11 -0
- package/skills/skills/deploy-staging/SKILL.md +164 -0
- package/skills/skills/deploy-vps-openclaw/SKILL.md +97 -0
package/package.json
CHANGED
|
@@ -1,70 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "agenthub-multiagent-mcp",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "MCP server for AgentHub multi-agent communication",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"bin": {
|
|
8
|
-
"agenthub-multiagent-mcp": "./dist/index.js",
|
|
9
|
-
"agenthub-hook": "./dist/planHookCli.js",
|
|
10
|
-
"agenthub-
|
|
11
|
-
"agenthub-
|
|
12
|
-
"agenthub-
|
|
13
|
-
"agenthub-
|
|
14
|
-
"agenthub-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"test
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"claude
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"@types/
|
|
62
|
-
"@types/
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "agenthub-multiagent-mcp",
|
|
3
|
+
"version": "1.25.0",
|
|
4
|
+
"description": "MCP server for AgentHub multi-agent communication",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"agenthub-multiagent-mcp": "./dist/index.js",
|
|
9
|
+
"agenthub-hook": "./dist/planHookCli.js",
|
|
10
|
+
"agenthub-activity-hook": "./dist/activityHookCli.js",
|
|
11
|
+
"agenthub-daemon": "./dist/daemon.js",
|
|
12
|
+
"agenthub-worker": "./dist/worker.js",
|
|
13
|
+
"agenthub-setup": "./dist/setup.js",
|
|
14
|
+
"agenthub-channel": "./dist/channel.js",
|
|
15
|
+
"agenthub-resume": "./dist/commands/resume.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"skills"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"dev": "tsx watch src/index.ts",
|
|
24
|
+
"start": "node dist/index.js",
|
|
25
|
+
"lint": "eslint src/",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"test:watch": "vitest"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"mcp",
|
|
32
|
+
"claude",
|
|
33
|
+
"claude-code",
|
|
34
|
+
"agenthub",
|
|
35
|
+
"multi-agent",
|
|
36
|
+
"ai-agents",
|
|
37
|
+
"codex",
|
|
38
|
+
"gemini",
|
|
39
|
+
"model-context-protocol"
|
|
40
|
+
],
|
|
41
|
+
"author": "Krishi AI",
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "https://github.com/anthropics/agenthub"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/anthropics/agenthub#readme",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/anthropics/agenthub/issues"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@anthropic-ai/sdk": "^0.79.0",
|
|
53
|
+
"@memvid/sdk": "^2.0.159",
|
|
54
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
55
|
+
"form-data": "^4.0.5",
|
|
56
|
+
"open": "^11.0.0",
|
|
57
|
+
"ws": "^8.18.0",
|
|
58
|
+
"zod": "^3.23.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/form-data": "^2.2.1",
|
|
62
|
+
"@types/node": "^20.0.0",
|
|
63
|
+
"@types/ws": "^8.5.13",
|
|
64
|
+
"tsx": "^4.0.0",
|
|
65
|
+
"typescript": "^5.0.0",
|
|
66
|
+
"vitest": "^4.0.16"
|
|
67
|
+
},
|
|
68
|
+
"engines": {
|
|
69
|
+
"node": ">=20.0.0"
|
|
70
|
+
}
|
|
71
|
+
}
|
package/skills/catalog.json
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
"category": "skill",
|
|
29
29
|
"current_hash": "6e22cc54cb02a5e98ae42d06d9d7292db0c1b43894831b32879beb0166b2aea7",
|
|
30
30
|
"prior_hashes": []
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "skills/deploy-staging/SKILL.md",
|
|
34
|
+
"name": "deploy-staging",
|
|
35
|
+
"description": "Staging deploy runbook — build + ship the Go server and dashboard to the Dockerized Contabo staging host, restart, verify, rollback. Destructive.",
|
|
36
|
+
"category": "skill",
|
|
37
|
+
"current_hash": "7194b1a167f43594c0d55249126a97a265009d8ff6515a0caac6d6277fc78f4a",
|
|
38
|
+
"prior_hashes": [
|
|
39
|
+
"aca1c1a5871921cbc9530c13c17d963b262d2e72c67be5326ae65aa0d58847f4"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"path": "skills/deploy-vps-openclaw/SKILL.md",
|
|
44
|
+
"name": "deploy-vps-openclaw",
|
|
45
|
+
"description": "OpenClaw VPS deploy runbook — build + ship the meta-agent plugin to the Hetzner VPS, restart the gateway, verify reconnect, rollback. Destructive.",
|
|
46
|
+
"category": "skill",
|
|
47
|
+
"current_hash": "1c7042b2714d04168b8d7b2afb519674242f18e7223f600b3c8f873bec640202",
|
|
48
|
+
"prior_hashes": []
|
|
31
49
|
}
|
|
32
50
|
]
|
|
33
51
|
}
|
package/skills/manifest.json
CHANGED
|
@@ -17,6 +17,17 @@
|
|
|
17
17
|
"hashes": [
|
|
18
18
|
"6e22cc54cb02a5e98ae42d06d9d7292db0c1b43894831b32879beb0166b2aea7"
|
|
19
19
|
]
|
|
20
|
+
},
|
|
21
|
+
"skills/deploy-staging/SKILL.md": {
|
|
22
|
+
"hashes": [
|
|
23
|
+
"aca1c1a5871921cbc9530c13c17d963b262d2e72c67be5326ae65aa0d58847f4",
|
|
24
|
+
"7194b1a167f43594c0d55249126a97a265009d8ff6515a0caac6d6277fc78f4a"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"skills/deploy-vps-openclaw/SKILL.md": {
|
|
28
|
+
"hashes": [
|
|
29
|
+
"1c7042b2714d04168b8d7b2afb519674242f18e7223f600b3c8f873bec640202"
|
|
30
|
+
]
|
|
20
31
|
}
|
|
21
32
|
}
|
|
22
33
|
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy-staging
|
|
3
|
+
description: Deploy AgentHub to the Contabo staging environment (agenthub.contetial.com) — build the Go server + dashboard, ship them INTO the Dockerized staging container, restart, and verify. Use when asked to deploy/ship/release AgentHub to staging. DESTRUCTIVE — runs real deploy commands against the live staging server.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Deploy AgentHub to Staging
|
|
8
|
+
|
|
9
|
+
Deploys the AgentHub Go server and React dashboard to the Contabo staging host.
|
|
10
|
+
This is a **destructive, outward-facing** operation: it restarts the live
|
|
11
|
+
staging service. Run deliberately, verify each step, and stop if anything looks
|
|
12
|
+
wrong.
|
|
13
|
+
|
|
14
|
+
**Target:** `agenthub.contetial.com` · host `109.123.246.254` · user `root`
|
|
15
|
+
**SSH key:** `~/.ssh/contabo_staging`
|
|
16
|
+
**Runtime:** Dockerized. Container `krishiai-agenthub`, image
|
|
17
|
+
`krishiai-agenthub:staging`. The systemd `agenthub.service` no longer applies.
|
|
18
|
+
|
|
19
|
+
## How this deployment actually works (read first)
|
|
20
|
+
|
|
21
|
+
This setup is **not** a host-binary-swap. Verified mechanism:
|
|
22
|
+
|
|
23
|
+
- The server binary lives **inside the container** at `/opt/agenthub/agenthub`
|
|
24
|
+
(the host's `/opt/agenthub/agenthub` is a stale leftover and is *not* what
|
|
25
|
+
runs). The container's filesystem persists across `docker restart`, so you
|
|
26
|
+
deploy with `docker cp` into the container, then restart.
|
|
27
|
+
- The dashboard is a **Docker named volume** `krishiai_agenthub_dashboard`
|
|
28
|
+
mounted at `/opt/agenthub/dashboard` (host path
|
|
29
|
+
`/var/lib/docker/volumes/krishiai_agenthub_dashboard/_data/`). You deploy by
|
|
30
|
+
writing the SPA build into that volume.
|
|
31
|
+
- The DB is the **`krishiai_agenthub_data`** volume mounted at
|
|
32
|
+
`/var/lib/agenthub` (`staging.db`). The container runs migrations on boot.
|
|
33
|
+
|
|
34
|
+
> ⚠️ **Do NOT overwrite KrishiAI-specific server state.** Specifically:
|
|
35
|
+
> - The dashboard volume has a **`docs/` subdir** (platform/intel/org-brain
|
|
36
|
+
> guides) and an `uploads/`/`assets/` layout — **never `rsync --delete`** the
|
|
37
|
+
> volume or you will wipe them. Add/overwrite files only.
|
|
38
|
+
> - **Never touch** the `krishiai_agenthub_data` volume / `staging.db`, the
|
|
39
|
+
> container's env (the entrypoint passes Slack/OAuth/DB flags), or the host's
|
|
40
|
+
> timestamped `agenthub.pre-*` backups.
|
|
41
|
+
> - Don't `docker run`/recreate the container — that drops env + the in-container
|
|
42
|
+
> binary. Use `docker restart` only.
|
|
43
|
+
|
|
44
|
+
## 0. Preconditions
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cd server && go test ./... && cd ..
|
|
48
|
+
cd mcp-server && npm run typecheck && cd ..
|
|
49
|
+
|
|
50
|
+
# SSH reachable + container present; confirm the binary is INSIDE the container.
|
|
51
|
+
ssh -i ~/.ssh/contabo_staging root@109.123.246.254 \
|
|
52
|
+
"docker ps --format '{{.Names}}' | grep krishiai-agenthub && \
|
|
53
|
+
docker exec krishiai-agenthub ls -la /opt/agenthub/agenthub"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If the container isn't named `krishiai-agenthub`, stop and reconcile.
|
|
57
|
+
|
|
58
|
+
## 1. Build the server (Linux binary)
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
cd server
|
|
62
|
+
GOOS=linux GOARCH=amd64 go build -o agenthub-linux ./cmd/agenthub
|
|
63
|
+
cd ..
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 2. Ship + restart the server (docker cp, not host swap)
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
TS=$(date +%Y%m%d-%H%M%S)
|
|
70
|
+
|
|
71
|
+
# 2a. Snapshot the CURRENT in-container binary to the host (rollback point).
|
|
72
|
+
ssh -i ~/.ssh/contabo_staging root@109.123.246.254 \
|
|
73
|
+
"docker cp krishiai-agenthub:/opt/agenthub/agenthub /opt/agenthub/agenthub.pre-$TS && \
|
|
74
|
+
ls -lh /opt/agenthub/agenthub.pre-$TS"
|
|
75
|
+
|
|
76
|
+
# 2b. Upload the new binary to the host, then copy it INTO the container.
|
|
77
|
+
scp -i ~/.ssh/contabo_staging server/agenthub-linux \
|
|
78
|
+
root@109.123.246.254:/tmp/agenthub-new
|
|
79
|
+
|
|
80
|
+
ssh -i ~/.ssh/contabo_staging root@109.123.246.254 '
|
|
81
|
+
set -e
|
|
82
|
+
docker cp /tmp/agenthub-new krishiai-agenthub:/opt/agenthub/agenthub
|
|
83
|
+
# docker cp writes as root; the container runs as the agenthub user, so fix
|
|
84
|
+
# ownership/perms with an explicit -u 0 exec.
|
|
85
|
+
docker exec -u 0 krishiai-agenthub chown agenthub:agenthub /opt/agenthub/agenthub
|
|
86
|
+
docker exec -u 0 krishiai-agenthub chmod 755 /opt/agenthub/agenthub
|
|
87
|
+
docker restart krishiai-agenthub
|
|
88
|
+
rm -f /tmp/agenthub-new
|
|
89
|
+
'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Watch migrations (the binary runs them on boot). `failed=` must be 0:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
ssh -i ~/.ssh/contabo_staging root@109.123.246.254 \
|
|
96
|
+
"docker logs --tail 120 krishiai-agenthub 2>&1 | grep -E 'migrations complete|failed=|ERROR|panic'"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
`worker WebSocket read error ... close 1006` lines right after restart are just
|
|
100
|
+
agents reconnecting — ignore them.
|
|
101
|
+
|
|
102
|
+
## 3. Build + deploy the dashboard (into the volume, preserving docs/)
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
cd agenthub-dashboard
|
|
106
|
+
npm run build
|
|
107
|
+
cd ..
|
|
108
|
+
|
|
109
|
+
VOL=/var/lib/docker/volumes/krishiai_agenthub_dashboard/_data
|
|
110
|
+
|
|
111
|
+
# SPA: overwrite index.html + assets/ ONLY. Do not delete the volume — that
|
|
112
|
+
# would remove the docs/ subdir served at /docs/.
|
|
113
|
+
scp -i ~/.ssh/contabo_staging agenthub-dashboard/dist/index.html root@109.123.246.254:$VOL/index.html
|
|
114
|
+
scp -i ~/.ssh/contabo_staging -r agenthub-dashboard/dist/assets root@109.123.246.254:$VOL/
|
|
115
|
+
|
|
116
|
+
# Docs guides (only if you changed them): push into the docs/ subdir.
|
|
117
|
+
scp -i ~/.ssh/contabo_staging docs/platform-guide.html docs/intel-layer-guide.html docs/org-brain-guide.html \
|
|
118
|
+
root@109.123.246.254:$VOL/docs/ 2>/dev/null || true
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
> The repo's `agenthub-dashboard/deploy.sh` rsyncs to the host path
|
|
122
|
+
> `/opt/agenthub/dashboard` — that path is **not** what the container serves
|
|
123
|
+
> (the volume is). Don't use it as-is; the volume scp above is the live path.
|
|
124
|
+
|
|
125
|
+
## 4. Verify (from the host — external curl may be blocked from your machine)
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
ssh -i ~/.ssh/contabo_staging root@109.123.246.254 '
|
|
129
|
+
echo "-- health --"; curl -s --max-time 10 http://127.0.0.1:8787/health; echo
|
|
130
|
+
echo "-- config --"; curl -s --max-time 10 http://127.0.0.1:8787/api/config/public; echo
|
|
131
|
+
echo "-- metrics --"; curl -s --max-time 10 http://127.0.0.1:8787/metrics | grep -E "^agenthub_capability_" | head
|
|
132
|
+
echo "-- nginx https --"; curl -sk --max-time 10 https://localhost/health; echo
|
|
133
|
+
'
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Optional DB smoke (catalog + new columns landed):
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
ssh -i ~/.ssh/contabo_staging root@109.123.246.254 \
|
|
140
|
+
"docker exec krishiai-agenthub sqlite3 /var/lib/agenthub/staging.db \
|
|
141
|
+
'SELECT count(*) FROM capabilities WHERE deprecated_at IS NULL;'"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## 5. Rollback (if needed)
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
ssh -i ~/.ssh/contabo_staging root@109.123.246.254 '
|
|
148
|
+
set -e
|
|
149
|
+
BK=$(ls -t /opt/agenthub/agenthub.pre-* | head -1)
|
|
150
|
+
docker cp "$BK" krishiai-agenthub:/opt/agenthub/agenthub
|
|
151
|
+
docker exec -u 0 krishiai-agenthub chown agenthub:agenthub /opt/agenthub/agenthub
|
|
152
|
+
docker exec -u 0 krishiai-agenthub chmod 755 /opt/agenthub/agenthub
|
|
153
|
+
docker restart krishiai-agenthub
|
|
154
|
+
'
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Then re-deploy the previous dashboard build (checkout the prior commit, rebuild,
|
|
158
|
+
re-run step 3).
|
|
159
|
+
|
|
160
|
+
## Done
|
|
161
|
+
|
|
162
|
+
Report: which commit shipped, migration outcome (`applied/failed`), and the
|
|
163
|
+
verification results. If anything failed mid-way, say exactly which step and
|
|
164
|
+
leave the system in a known state (rolled back or clearly flagged).
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy-vps-openclaw
|
|
3
|
+
description: Deploy the AgentHub meta-agent OpenClaw plugin to the Hetzner VPS — build the plugin, ship it to /root/.openclaw/extensions, restart the OpenClaw gateway, and verify. Use when asked to deploy/ship the meta-agent or OpenClaw plugin. DESTRUCTIVE — restarts the live gateway on the VPS.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Deploy the OpenClaw Meta-Agent to the Hetzner VPS
|
|
8
|
+
|
|
9
|
+
Deploys the AgentHub meta-agent plugin to the OpenClaw gateway on the Hetzner
|
|
10
|
+
VPS. This is a **destructive, outward-facing** operation: it restarts the live
|
|
11
|
+
gateway, which briefly drops the meta-agent's monitoring + Slack reporting. Run
|
|
12
|
+
deliberately and verify.
|
|
13
|
+
|
|
14
|
+
**Target:** Hetzner VPS `178.104.62.122` · user `root`
|
|
15
|
+
**SSH key:** `~/.ssh/id_openclaw`
|
|
16
|
+
**Plugin dir:** `/root/.openclaw/extensions/agenthub-meta-agent`
|
|
17
|
+
**State file:** `/root/.openclaw/state/meta-agent.json` (persists the connect
|
|
18
|
+
token; survives restarts so the gateway reconnects instead of 409-deadlocking).
|
|
19
|
+
|
|
20
|
+
> Authoritative script this runbook drives: `meta-agent/scripts/deploy-meta-agent.sh`.
|
|
21
|
+
> Prefer running that script directly; the manual steps below mirror it for when
|
|
22
|
+
> you need to deploy step-by-step or the script is unavailable.
|
|
23
|
+
|
|
24
|
+
## 0. Ordering — server first, plugin second
|
|
25
|
+
|
|
26
|
+
If this release also includes an AgentHub **server** change, deploy the server
|
|
27
|
+
first (see the `deploy-staging` skill). The plugin's 409 fallback calls
|
|
28
|
+
`POST /api/agents/{id}/replace_token`, which must exist server-side. A plugin
|
|
29
|
+
against an older server degrades to manual recovery rather than failing hard,
|
|
30
|
+
but the design assumes the endpoint is present.
|
|
31
|
+
|
|
32
|
+
## 1. Deploy via the maintained script (preferred)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cd meta-agent
|
|
36
|
+
./scripts/deploy-meta-agent.sh
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
That script builds the plugin (`npm run build`), uploads
|
|
40
|
+
`openclaw.plugin.json`, `package.json`, and `dist/` to the plugin dir, restarts
|
|
41
|
+
`openclaw-gateway`, and prints whether the service came back active.
|
|
42
|
+
|
|
43
|
+
## 2. Manual steps (if running step-by-step)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cd meta-agent
|
|
47
|
+
npm run build
|
|
48
|
+
|
|
49
|
+
VPS=root@178.104.62.122
|
|
50
|
+
KEY=~/.ssh/id_openclaw
|
|
51
|
+
DIR=/root/.openclaw/extensions/agenthub-meta-agent
|
|
52
|
+
|
|
53
|
+
ssh -i $KEY $VPS "mkdir -p $DIR/dist/src"
|
|
54
|
+
scp -i $KEY openclaw.plugin.json package.json $VPS:$DIR/
|
|
55
|
+
scp -i $KEY dist/index.js $VPS:$DIR/dist/
|
|
56
|
+
scp -i $KEY dist/index.js.map $VPS:$DIR/dist/ 2>/dev/null || true
|
|
57
|
+
scp -i $KEY -r dist/src/ $VPS:$DIR/dist/src/
|
|
58
|
+
|
|
59
|
+
ssh -i $KEY $VPS "systemctl restart openclaw-gateway"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 3. Verify
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
KEY=~/.ssh/id_openclaw; VPS=root@178.104.62.122
|
|
66
|
+
# Gateway is active.
|
|
67
|
+
ssh -i $KEY $VPS "systemctl is-active openclaw-gateway"
|
|
68
|
+
# Plugin reconnected (look for the lifecycle-path line).
|
|
69
|
+
ssh -i $KEY $VPS "journalctl -u openclaw-gateway -n 60 --no-pager | grep -iE 'meta-agent|lifecycle-path|reconnect'"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Expected lifecycle path on a healthy restart: `reconnect-from-disk` (it read the
|
|
73
|
+
persisted connect token). `register-fresh` or `409-replace-token` are also
|
|
74
|
+
valid; a stuck `409` deadlock means the state file was lost — see the recovery
|
|
75
|
+
runbook in `docs/meta-agent.md`.
|
|
76
|
+
|
|
77
|
+
Confirm in AgentHub that `meta-agent` is online (dashboard agents list) and
|
|
78
|
+
that it resumes posting to `#agenthub-digest` / `#agenthub-alerts` on schedule.
|
|
79
|
+
|
|
80
|
+
## 4. Rollback (if needed)
|
|
81
|
+
|
|
82
|
+
Redeploy the previous build:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
cd meta-agent && git checkout <previous-commit> -- . && npm run build && ./scripts/deploy-meta-agent.sh
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
If the gateway won't come back, check `journalctl -u openclaw-gateway` for plugin
|
|
89
|
+
load errors and, if needed, disable the plugin (`enabled: false` in
|
|
90
|
+
`openclaw.json` under `plugins.entries.agenthub-meta-agent`) then restart to
|
|
91
|
+
restore the gateway without the meta-agent.
|
|
92
|
+
|
|
93
|
+
## Done
|
|
94
|
+
|
|
95
|
+
Report: which commit shipped, the lifecycle-path line from the logs, gateway
|
|
96
|
+
active state, and whether the meta-agent re-appears online in AgentHub. If the
|
|
97
|
+
restart failed, say so and leave the gateway in a known state.
|