Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ make agent-heartbeat # Build heartbeat WASM agent → agents/heartbeat/agent.
make agent-pricewatcher # Build price watcher WASM agent → agents/pricewatcher/agent.wasm
make agent-sentinel # Build treasury sentinel WASM agent → agents/sentinel/agent.wasm
make agent-x402buyer # Build x402 buyer WASM agent → agents/x402buyer/agent.wasm
make agent-deployer # Build deployer WASM agent → agents/deployer/agent.wasm
make test # Run tests: go test -v ./...
make lint # golangci-lint (5m timeout)
make vet # go vet
Expand All @@ -31,6 +32,7 @@ make demo-portable # Build + run portable agent demo (run → stop → copy
make demo-pricewatcher # Build + run price watcher demo (fetch prices → stop → resume → verify)
make demo-sentinel # Build + run treasury sentinel demo (effect lifecycle → crash → reconcile)
make demo-x402 # Build + run x402 payment demo (pay for premium data → crash → reconcile)
make demo-deployer # Build + run deployer demo (pay → deploy → monitor → crash → reconcile)
make clean # Remove bin/, checkpoints/, agent.wasm
```

Expand Down Expand Up @@ -89,6 +91,7 @@ Atomic writes via temp file → fsync → rename. Every checkpoint is also archi
- `agents/pricewatcher/` — Demo agent: fetches BTC/ETH prices from CoinGecko, tracks high/low/latest across checkpoint/resume
- `agents/sentinel/` — Treasury sentinel: monitors simulated treasury balance, triggers refills with effect-safe intent tracking, demonstrates crash recovery and reconciliation
- `agents/x402buyer/` — x402 payment demo: encounters HTTP 402 paywall, pays from budget via wallet_pay hostcall, receives premium data, crash-safe payment reconciliation
- `agents/deployer/` — Deployer demo: pays compute provider, deploys itself, monitors deployment status, multi-step effect-safe crash recovery
- `agents/research/example/` — Original demo agent (Survivor) from research phases
- `agents/research/reconciliation/` — Bridge reconciliation demo agent (research phase)
- `scripts/demo-portable.sh` — End-to-end portable agent demo
Expand Down
19 changes: 18 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help bootstrap build build-lab clean test lint vet fmt fmt-check tidy agent agent-heartbeat agent-reconciliation agent-pricewatcher agent-sentinel agent-x402buyer run-agent demo demo-portable demo-pricewatcher demo-sentinel demo-x402 gh-check gh-metadata gh-release
.PHONY: help bootstrap build build-lab clean test lint vet fmt fmt-check tidy agent agent-heartbeat agent-reconciliation agent-pricewatcher agent-sentinel agent-x402buyer agent-deployer run-agent demo demo-portable demo-pricewatcher demo-sentinel demo-x402 demo-deployer gh-check gh-metadata gh-release

.DEFAULT_GOAL := help

Expand All @@ -11,6 +11,7 @@ RECONCILIATION_AGENT_DIR := agents/research/reconciliation
PRICEWATCHER_AGENT_DIR := agents/pricewatcher
SENTINEL_AGENT_DIR := agents/sentinel
X402BUYER_AGENT_DIR := agents/x402buyer
DEPLOYER_AGENT_DIR := agents/deployer

# Go commands
GOCMD := go
Expand Down Expand Up @@ -60,6 +61,7 @@ clean: ## Remove build artifacts
rm -f agents/pricewatcher/agent.wasm
rm -f agents/sentinel/agent.wasm
rm -f agents/x402buyer/agent.wasm
rm -f agents/deployer/agent.wasm
@echo "Clean complete"

test: ## Run tests (with race detector)
Expand Down Expand Up @@ -145,6 +147,13 @@ agent-x402buyer: ## Build x402 buyer demo agent WASM
cd $(X402BUYER_AGENT_DIR) && $(MAKE) build
@echo "Agent built: $(X402BUYER_AGENT_DIR)/agent.wasm"

agent-deployer: ## Build deployer demo agent WASM
@echo "Building deployer agent..."
@which tinygo > /dev/null || \
(echo "tinygo not found. See docs/governance/DEVELOPMENT.md for installation" && exit 1)
cd $(DEPLOYER_AGENT_DIR) && $(MAKE) build
@echo "Agent built: $(DEPLOYER_AGENT_DIR)/agent.wasm"

demo: build agent-reconciliation ## Build and run reconciliation demo
@echo "Building demo runner..."
@mkdir -p $(BINARY_DIR)
Expand Down Expand Up @@ -175,6 +184,14 @@ demo-x402: build agent-x402buyer ## Run the x402 payment demo (pay for premium d
@chmod +x scripts/demo-x402.sh
@./scripts/demo-x402.sh

demo-deployer: build agent-deployer ## Run the deployer demo (pay, deploy, monitor, crash recovery)
@echo "Building mockcloud server..."
@mkdir -p $(BINARY_DIR)
$(GOBUILD) -o $(BINARY_DIR)/mockcloud ./cmd/mockcloud
@echo "Running Deployer Demo..."
@chmod +x scripts/demo-deployer.sh
@./scripts/demo-deployer.sh

check: fmt-check vet lint test ## Run all checks (formatting, vet, lint, tests)
@echo "All checks passed"

Expand Down
7 changes: 7 additions & 0 deletions agents/deployer/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONY: build clean

build:
tinygo build -target=wasi -no-debug -o agent.wasm .

clean:
rm -f agent.wasm
26 changes: 26 additions & 0 deletions agents/deployer/agent.manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"capabilities": {
"clock": { "version": 1 },
"rand": { "version": 1 },
"log": { "version": 1 },
"wallet": { "version": 1 },
"http": {
"version": 1,
"options": {
"allowed_hosts": ["localhost"],
"timeout_ms": 5000,
"max_response_bytes": 8192
}
},
"x402": {
"version": 1,
"options": {
"allowed_recipients": ["mockcloud-provider"],
"max_payment_microcents": 5000000
}
}
},
"resource_limits": {
"max_memory_bytes": 67108864
}
}
7 changes: 7 additions & 0 deletions agents/deployer/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module github.com/simonovic86/igor/agents/deployer

go 1.24

require github.com/simonovic86/igor/sdk/igor v0.0.0

replace github.com/simonovic86/igor/sdk/igor => ../../sdk/igor
Loading
Loading