Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
28a2f60
docs: add global AgentMesh handoff design document
Apr 8, 2026
57816fa
feat(handoff): implement Phase H1 — handoff module with three-layer auth
Apr 8, 2026
4a21da8
feat(handoff): implement Phase H2 — registry mode, identity successio…
Apr 9, 2026
4d44eae
feat(handoff): implement Phase H3 — CLI command and plugin tools
Apr 9, 2026
1ccb1dc
security(handoff): close §9.9 security gaps — confirmation gate, inje…
Apr 9, 2026
d65baae
feat(mesh): implement global registry deployment — Ingress, OAuth, re…
Apr 9, 2026
5409321
test+docs(mesh): integration tests and security/architecture document…
Apr 9, 2026
8c3e0f1
fix(plugin): gate handoff mutation tools behind AGT_REGISTRY_MODE=global
Apr 9, 2026
b586844
feat(mesh): add promote/demote commands for registry global mode
Apr 9, 2026
6e7e0c8
feat(mesh): add --allow-ip to promote for IP-based access control
Apr 9, 2026
df06924
feat(mesh): auto-detect AppGW IP and use sslip.io for zero-config DNS
Apr 9, 2026
7983a0f
refactor(mesh): switch promote/demote to LoadBalancer Services
Apr 9, 2026
88d829c
feat(plugin): LLM-driven handoff orchestration via E2E mesh
Apr 10, 2026
c0424be
fix(mesh): promote checks health and reconnects stale port-forwards
Apr 10, 2026
a71ce60
fix(plugin): use async import for fs in ESM context
Apr 10, 2026
47c9898
feat(handoff): spawn AKS pod from dev mode for cloud handoff
Apr 10, 2026
4d51df2
fix(handoff): propagate trusted_peers and registry_mode to spawned pods
Apr 10, 2026
838a187
docs: add cloud handoff flow diagram (section 11)
Apr 10, 2026
1fa5eb6
feat(handoff): async orchestration with real-time progress tracking
Apr 10, 2026
96d3663
fix(review): address security and reliability findings from handoff a…
Apr 10, 2026
96f6595
docs: revise handoff flow diagrams with full review findings
Apr 10, 2026
05b263b
fix(review): address remaining TS findings — orphan cleanup, guards, …
Apr 10, 2026
3c3aefe
fix(review): address Rust findings — state machine, resume, tests
Apr 10, 2026
6ad4d30
handoff: incremental progress polling, SDK reconnect fix, policy cleanup
Apr 10, 2026
7d5c35e
fix(crd): add trustedPeers and registryMode to Helm CRD schema
Apr 10, 2026
3f461c8
fix(router): read admin token from correct mount path
Apr 10, 2026
cfd1644
fix(handoff): pre-build audit — snapshot strict, direction propagatio…
Apr 10, 2026
90056c8
fix(handoff): enforce state machine — migrate all handlers to try_tra…
Apr 10, 2026
3bad747
fix(handoff): verification hash mismatch + synchronous progress
Apr 10, 2026
374ffe5
fix(spawn): check Docker API HTTP status codes in docker_api
Apr 10, 2026
fd8cca8
feat(handoff): propagate channel credentials to cloud target
Apr 10, 2026
9f10b0b
feat(handoff): full state hydration — workspace, memory, conversation…
Apr 10, 2026
5c8e491
fix: cross-container handoff — return state in response, not filesystem
Apr 10, 2026
9b22f72
security: harden workspace tar extraction and chat snapshot parsing
Apr 10, 2026
0f53f10
perf: split sandbox Dockerfile into base + overlay for fast rebuilds
Apr 11, 2026
332a837
feat(handoff): implement reverse handoff (cloud → local)
Apr 13, 2026
806b693
fix(router): raise body limit on handoff routes to 50MB
Apr 13, 2026
5457442
fix(handoff): read AKS admin token from mounted secret
Apr 13, 2026
d98be79
fix(handoff): use POST for snapshot route (was GET → 405)
Apr 13, 2026
eb1b170
fix(handoff): reuse existing snapshot blob in reverse path
Apr 13, 2026
c992c7b
fix(handoff): pipe restore payload via stdin for large blobs
Apr 13, 2026
2b274cc
fix(connect): handle Ctrl+C to disconnect port-forward
Apr 13, 2026
bd1bfbb
fix(handoff): init local handoff session + auth headers for restore
Apr 13, 2026
4be12e3
fix(handoff): correct step count + Telegram notification on handoff
Apr 13, 2026
9b12e31
fix(handoff): clean up local handoff state after reverse restore
Apr 13, 2026
9912d96
fix(handoff): extend verification timeout + retry mesh send
Apr 13, 2026
13aeb03
fix(relay): increase max_message_size to 1MB for handoff blobs
Apr 13, 2026
99909b3
fix: collect workspace/chat/credentials in CLI handoff snapshot
Apr 13, 2026
4933c2c
fix: stop stepper spinner and cleanup port-forward after handoff
Apr 13, 2026
4dde544
feat: add /agt/handoff/succession router endpoint for Ed25519-signed …
Apr 13, 2026
7f2392b
feat: sub-agent handoff — collect, snapshot, and re-spawn during handoff
Apr 13, 2026
958afee
feat: AMID remapping + sub-agent workspace collection during handoff
Apr 13, 2026
e98100a
feat: collect sub-agent workspace via E2E mesh during handoff
Apr 14, 2026
060451c
feat: expand workspace tar to include cron/policies/agents + mesh 768…
Apr 14, 2026
3cc1445
feat: chunked mesh transfer for large sub-agent workspaces
Apr 14, 2026
663ef19
feat: unified chunked mesh transport layer + file transfer tool
Apr 14, 2026
ceefbbe
fix: configurable router URL + fix spawn test timeouts + add transpor…
Apr 14, 2026
17a7ea6
fix: address 4 direction-specific handoff gaps
Apr 14, 2026
d3abeb8
feat: graceful sub-agent interrupt during handoff
Apr 14, 2026
577dfb1
feat: sub-agent workspace injection + task resumption after handoff
Apr 14, 2026
f0d77cb
fix: sub-agent handoff — Docker API encoding + name prefix + source c…
Apr 14, 2026
3d5e88d
fix: sub-agent handoff — wrong API URLs + missing report steps
Apr 14, 2026
95801f2
fix: set trusted_peers for re-spawned sub-agents after handoff
Apr 14, 2026
4f49039
feat: include sub-agent status in Telegram greeting after handoff
Apr 14, 2026
f0d2648
fix: use per-sandbox runtime for operator exec path, not global devMode
Apr 14, 2026
244251d
fix: sub-agent trust + workspace logging after handoff
Apr 14, 2026
8d03f42
security: remove clawhub.com and openclaw.ai from default egress allo…
Apr 14, 2026
9f1addb
fix: use sub_agent_results as trust+resume loop driver, not sub_agent…
Apr 14, 2026
3661564
fix(sdk): reuse active Signal Protocol session instead of crashing
Apr 14, 2026
8510158
fix: don't expose handoff confirmation code to LLM, add console.log d…
Apr 14, 2026
3ead837
chore: increase sub-agent tool-calling rounds from 10 to 25
Apr 14, 2026
6e73979
fix: increase prekey retry window from 16s to 45s for sub-agent mesh …
Apr 14, 2026
408ac4d
fix: add file_transfer_ack for verified file delivery
Apr 14, 2026
48dbf7d
fix: filter protocol messages from mesh_inbox, improve file transfer …
Apr 14, 2026
d86b9a6
fix: auto-decode file_transfer content in mesh_inbox
Apr 14, 2026
f2ad564
fix: stale AMID cache poisoning breaks post-handoff mesh delivery
Apr 14, 2026
78e46e2
fix: write HANDOFF_FILES.md manifest after workspace inject
Apr 14, 2026
a66786b
chore: bump AGT rate limits for multi-agent handoff
Apr 14, 2026
3d5f5bc
fix: promote incoming/ files to workspace root after handoff inject
Apr 14, 2026
fa616d0
fix: scale down sub-agent deployments during cloud→local decommission
Apr 14, 2026
20837f2
docs: add bidirectional handoff architecture diagrams and changelog
Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ jobs:
- name: Build inference router image
run: docker build --build-arg ROUTER_CACHE_BUST=$(date +%s) -t azureclaw-inference-router:test -f inference-router/Dockerfile .

- name: Build sandbox base image
run: docker build --build-arg OPENCLAW_CACHE_BUST=$(date +%s) -t azureclaw-sandbox-base:test -f sandbox-images/openclaw/Dockerfile.base .

- name: Build sandbox image
run: docker build --build-arg OPENCLAW_CACHE_BUST=$(date +%s) --build-arg INFERENCE_ROUTER_IMAGE=azureclaw-inference-router:test -t azureclaw-sandbox:test -f sandbox-images/openclaw/Dockerfile .
run: docker build --build-arg SANDBOX_BASE_IMAGE=azureclaw-sandbox-base:test --build-arg INFERENCE_ROUTER_IMAGE=azureclaw-inference-router:test -t azureclaw-sandbox:test -f sandbox-images/openclaw/Dockerfile .

- name: Scan image with Trivy
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
Expand Down Expand Up @@ -130,6 +133,7 @@ jobs:
IGNORE="--ignore DL3008 --ignore DL3013 --ignore DL3018 --ignore DL3006 --ignore DL4006 --ignore DL3003 --ignore DL3016 --ignore DL3059 --ignore SC2015 --ignore SC2028"
hadolint $IGNORE controller/Dockerfile
hadolint $IGNORE inference-router/Dockerfile
hadolint $IGNORE sandbox-images/openclaw/Dockerfile.base
hadolint $IGNORE sandbox-images/openclaw/Dockerfile
hadolint $IGNORE vendor/agentmesh-relay/Dockerfile
hadolint $IGNORE vendor/agentmesh-registry/Dockerfile
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -472,3 +472,4 @@ cli/*.test.*
SECURITY-HARDENING-PLAN.md
.DS_Store
docs/demo-script.md
nohup.out
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- **Bidirectional Agent Handoff** — live-migrate agents between local Docker and AKS cloud with `azureclaw handoff <name> --to cloud|local`. Supports both CLI-driven (operator) and LLM-driven (webchat) orchestration paths
- **Sub-Agent Handoff** — sub-agents are snapshotted (workspace + task state), destroyed on source, re-spawned on target, and injected with workspace + resume signal via E2E encrypted mesh
- **Stale AMID Cache Poisoning Fix** — three-layer defense: identity-based AMID rejection, prekey readiness gate, workspace inject retry with ack verification
- **Workspace Injection Pipeline** — tarball extraction with path traversal validation, `incoming/` file promotion to workspace root, `HANDOFF_FILES.md` manifest for agent discoverability
- **Handoff Decommission Cleanup** — reverse handoff deletes all cloud CRDs (parent + sub-agents); forward handoff destroys local sub-agent containers
- **Mesh Inbox Improvements** — protocol message filtering (hides handoff/ack messages), auto-decode of `file_transfer` base64 content
- **AGT Governance Sidecar** — Python sidecar wrapping AGT SDK v3.0.0 with PolicyEvaluator, FileTrustStore (0–1000, ±200 clamp), SHA-256 Merkle audit chain, RateLimiter, and AgentBehaviorMonitor
- **E2E Encrypted Inter-Agent Messaging** — Signal Protocol (X3DH + Double Ratchet) via AgentMesh relay/registry with KNOCK trust handshake
- **Content Safety Circuit Breaker** — fail-open with 60s auto-reset cooldown (prevents cascading failures when Content Safety endpoint is misconfigured)
Expand All @@ -28,6 +34,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 8 vendor patches for AgentMesh relay, registry, and SDK bugs
- Foundry Memory Store format — ensureMemoryStore creates full store with chat + embedding models; item format matches Foundry REST API spec

### Changed
- AGT inference rate limit bumped from 120 → 500 calls/60s (policy) and router token bucket from 100 → 500 global req/s (needed for multi-agent handoff traffic)

### Security
- Circuit breaker fails open instead of closed (prevents total service lockout)
- iptables UID-based egress — agent process restricted to localhost
Expand Down
168 changes: 168 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 15 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,19 @@ image-router: ## Build inference router Docker image
--label "org.opencontainers.image.revision=$(GIT_SHA)" \
-f inference-router/Dockerfile .

image-sandbox: image-router ## Build sandbox Docker image
image-sandbox-base: ## Build sandbox base image (heavy deps — rebuild when upgrading OpenClaw/Python/Go tools)
docker build --platform linux/amd64 \
--build-arg AZURELINUX_BASE=mcr.microsoft.com/azurelinux/base/core:3.0 \
--build-arg OPENCLAW_CACHE_BUST=$$(date +%s) \
-t $(REGISTRY)/azureclaw-sandbox-base:$(IMAGE_TAG) \
-t $(REGISTRY)/azureclaw-sandbox-base:latest \
-f sandbox-images/openclaw/Dockerfile.base .

image-sandbox: image-router ## Build sandbox Docker image (slim overlay — fast per-commit rebuild)
docker build --platform linux/amd64 \
--build-arg SANDBOX_BASE_IMAGE=$(REGISTRY)/azureclaw-sandbox-base:latest \
--build-arg INFERENCE_ROUTER_IMAGE=$(REGISTRY)/azureclaw-inference-router:latest \
-t $(REGISTRY)/azureclaw-sandbox:$(IMAGE_TAG) \
-t $(REGISTRY)/azureclaw-sandbox:latest \
-t $(REGISTRY)/openclaw-sandbox:$(IMAGE_TAG) \
-t $(REGISTRY)/openclaw-sandbox:latest \
-f sandbox-images/openclaw/Dockerfile .

image-relay: ## Build AgentMesh relay image
Expand All @@ -91,8 +98,10 @@ push: ## Push all images to ACR
docker push $(REGISTRY)/azureclaw-controller:latest
docker push $(REGISTRY)/azureclaw-inference-router:$(IMAGE_TAG)
docker push $(REGISTRY)/azureclaw-inference-router:latest
docker push $(REGISTRY)/azureclaw-sandbox:$(IMAGE_TAG)
docker push $(REGISTRY)/azureclaw-sandbox:latest
docker push $(REGISTRY)/azureclaw-sandbox-base:$(IMAGE_TAG)
docker push $(REGISTRY)/azureclaw-sandbox-base:latest
docker push $(REGISTRY)/openclaw-sandbox:$(IMAGE_TAG)
docker push $(REGISTRY)/openclaw-sandbox:latest
docker push $(REGISTRY)/agentmesh-relay:$(IMAGE_TAG)
docker push $(REGISTRY)/agentmesh-relay:latest
docker push $(REGISTRY)/agentmesh-registry:$(IMAGE_TAG)
Expand Down
Loading
Loading