Skip to content
Open
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
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libcurl4-openssl-dev libwebsockets-dev libgpiod-dev i2c-tools cppcheck lcov nodejs
sudo apt-get install -y build-essential libcurl4-openssl-dev libwebsockets-dev libbrotli-dev zlib1g-dev libgpiod-dev i2c-tools cppcheck lcov nodejs

- name: Static analysis (cppcheck)
run: make static
Expand Down Expand Up @@ -55,13 +55,15 @@ jobs:
fi
echo "Binary size: $size bytes (OK)"

- name: Coverage (agent core >= 80%, hardware excluded)
run: GATEWAY=1 make coverage
- name: Set up Python for ASAP compliance
uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: ASAP compliance check
# Pin: asap-compliance >= 1.0.0 (https://pypi.org/project/asap-compliance/)
# Requires Python 3.10+. Gracefully skips if package not yet published.
- name: Check ASAP compliance and SDK interoperability
run: |
pip install --quiet 'asap-compliance>=1.0.0' 2>/dev/null \
&& asap-compliance --config tests/fixtures/ci_asap_test.toml build/shellclaw \
|| echo "asap-compliance unavailable or skipped (non-blocking until v0.3.0 release)"
python3 -m pip install 'asap-compliance==1.4.0' 'asap-protocol==2.6.0'
python3 scripts/run_asap_ci.py build/shellclaw

- name: Coverage (agent core >= 80%, hardware excluded)
run: GATEWAY=1 make coverage
4 changes: 2 additions & 2 deletions .github/workflows/publish-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libcurl4-openssl-dev libwebsockets-dev libgpiod-dev
sudo apt-get install -y build-essential libcurl4-openssl-dev libwebsockets-dev libbrotli-dev zlib1g-dev libgpiod-dev

- name: Build shellclaw (gateway)
run: make clean && GATEWAY=1 make shellclaw
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libcurl4-openssl-dev libwebsockets-dev libgpiod-dev
sudo apt-get install -y build-essential libcurl4-openssl-dev libwebsockets-dev libbrotli-dev zlib1g-dev libgpiod-dev

- name: Build shellclaw (gateway)
run: make clean && GATEWAY=1 make shellclaw
Expand Down
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ DSYMDIR ?= tests-dSYM
INC := -I. -I tests -I src -I vendor/tomlc99 -I vendor/sqlite3 -I vendor/cJSON -Isrc/vendor/tweetnacl
LDLIBS := -lcurl -lm
# Gateway (Phase 2): libwebsockets for HTTP+WebSocket on same port
# Install: brew install libwebsockets
# Install: brew install libwebsockets brotli zlib
# Set GATEWAY=0 to build without gateway when libwebsockets not installed
GATEWAY ?= $(shell pkg-config --exists libwebsockets 2>/dev/null && echo 1 || echo 0)
GATEWAY_CFLAGS := $(if $(filter 1,$(GATEWAY)),$(shell pkg-config --cflags libwebsockets 2>/dev/null),)
GATEWAY_CFLAGS += $(if $(filter 1,$(GATEWAY)),$(shell pkg-config --cflags openssl 2>/dev/null),)
GATEWAY_CFLAGS += $(if $(filter 1,$(GATEWAY)),$(shell pkg-config --cflags libbrotlidec zlib),)
GATEWAY_LDLIBS := $(if $(filter 1,$(GATEWAY)),$(shell pkg-config --libs libwebsockets 2>/dev/null),)
GATEWAY_LDLIBS += $(if $(filter 1,$(GATEWAY)),$(shell pkg-config --libs openssl 2>/dev/null),)
GATEWAY_LDLIBS += $(if $(filter 1,$(GATEWAY)),$(shell pkg-config --libs libbrotlidec zlib),)
# Hardware GPIO (Phase 5): libgpiod v2 API for Jetson / RPi (JetPack 6 / Bookworm)
# Set LIBGPIOD=0 when libgpiod-dev is not installed (stub backend only).
# pkg-config may find libgpiod 1.x on older distros; we require >= 2.0.
Expand Down Expand Up @@ -330,7 +332,7 @@ src/gateway/static.o: src/gateway/static.c src/gateway/static.h src/gateway/ui_a
$(JCS_O): src/crypto/jcs.c src/crypto/jcs.h vendor/cJSON/cJSON.h
$(CC) $(CFLAGS) $(INC) -c -o $@ src/crypto/jcs.c

$(MANIFEST_O): src/asap/manifest.c src/asap/manifest.h
$(MANIFEST_O): src/asap/manifest.c src/asap/manifest.h src/asap/manifest_build.h src/core/config.h src/core/version.h vendor/cJSON/cJSON.h
$(CC) $(CFLAGS) $(INC) -c -o $@ src/asap/manifest.c

$(MANIFEST_PROFILES_O): src/asap/manifest_profiles.c src/asap/manifest_profiles.h src/core/config.h src/hardware/board_detect.h
Expand All @@ -348,7 +350,9 @@ $(MANIFEST_KEYS_O): src/asap/manifest_keys.c src/asap/manifest_keys.h src/core/c
$(ASAP_HTTP_BODY_O): src/gateway/asap_http_body.c src/gateway/asap_http_body.h src/gateway/http_lws.h
$(CC) $(CFLAGS) $(INC) $(GATEWAY_CFLAGS) -c -o $@ src/gateway/asap_http_body.c

$(ENVELOPE_O): src/asap/envelope.c src/asap/envelope.h src/asap/asap_version.h vendor/cJSON/cJSON.h
$(ROUTES_O): src/gateway/asap_http_body.h

$(ENVELOPE_O): src/asap/envelope.c src/asap/envelope.h src/asap/asap_version.h src/asap/ulid.h vendor/cJSON/cJSON.h
$(CC) $(CFLAGS) $(INC) -c -o $@ src/asap/envelope.c

$(ULID_O): src/asap/ulid.c src/asap/ulid.h src/crypto/crypto.h
Expand All @@ -360,7 +364,7 @@ $(CLIENT_O): src/asap/client.c src/asap/client.h src/asap/envelope.h src/asap/ul
$(ASAP_REGISTRY_O): src/asap/registry.c src/asap/registry.h src/asap/client.h src/providers/provider.h vendor/cJSON/cJSON.h
$(CC) $(CFLAGS) $(INC) -c -o $@ src/asap/registry.c

$(SERVER_O): src/asap/server.c src/asap/server.h src/asap/envelope.h src/asap/asap_version.h src/asap/ulid.h src/core/agent.h src/core/config.h src/core/memory.h src/providers/provider.h vendor/cJSON/cJSON.h
$(SERVER_O): src/asap/server.c src/asap/server.h src/asap/envelope.h src/asap/manifest_build.h src/asap/asap_version.h src/asap/ulid.h src/core/agent.h src/core/config.h src/core/memory.h src/providers/provider.h vendor/cJSON/cJSON.h
$(CC) $(CFLAGS) $(INC) -pthread -c -o $@ src/asap/server.c

$(ASAP_LOG_O): src/asap/log.c src/asap/log.h
Expand Down Expand Up @@ -713,9 +717,9 @@ test_manifest: test_manifest_build test_manifest_keys test_jcs
$(BINDIR)/test_manifest_keys
$(BINDIR)/test_jcs

test_asap_envelope: tests/test_asap_envelope.c $(ENVELOPE_O) $(CJSON_O)
test_asap_envelope: tests/test_asap_envelope.c $(ENVELOPE_O) $(ULID_O) $(CRYPTO_LINK) $(CJSON_O)
@mkdir -p $(BINDIR)
$(CC) $(CFLAGS) $(LDFLAGS) $(INC) -o $(BINDIR)/$@ tests/test_asap_envelope.c $(ENVELOPE_O) $(CJSON_O) $(LDLIBS)
$(CC) $(CFLAGS) $(LDFLAGS) $(INC) -o $(BINDIR)/$@ tests/test_asap_envelope.c $(ENVELOPE_O) $(ULID_O) $(CRYPTO_LINK) $(CJSON_O) $(LDLIBS) -pthread
$(DSYM_SCRIPT)

test_asap_ulid: tests/test_asap_ulid.c $(ULID_O) $(CRYPTO_LINK)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ ShellClaw is **not another OpenClaw clone** in a different language. It is a **h
- `make static` — cppcheck on `src/` (requires cppcheck)
- `make test-sanitize` — AddressSanitizer + UBSan full suite
- `make coverage` — coverage report; fails if core < 80% (requires lcov)
- CI enforces release binary < 2 MB; optional `asap-compliance` when the Python package is available
- The gateway build requires libwebsockets, Brotli, and zlib. Make sure that `pkg-config` finds `libwebsockets`, `libbrotlidec`, and `zlib`.
- CI enforces a release binary smaller than 2 MB. The ASAP validators and the official SDK tests must pass.
- **Before opening a PR:** run `CI=true make clean && CI=true make test` (matches Linux CI with `-Werror`), or on a machine with the same apt deps as [.github/workflows/ci.yml](.github/workflows/ci.yml): `chmod +x scripts/ci-local.sh && ./scripts/ci-local.sh`

See [CONTRIBUTING.md](CONTRIBUTING.md) for PR workflow, coding standards, and the pre-tag `gpio-mockup` release ritual.
Expand Down
10 changes: 4 additions & 6 deletions config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ description = "C-native edge-AI ASAP agent on NVIDIA Jetson Orin Nano Super (CUD
# Production: set to your HTTPS origin before marketplace registration (example.com is dev-only).
public_base_url = "https://shellclaw.example.com"
registry_url = "https://raw.githubusercontent.com/asap-protocol/asap-protocol/main/registry.json"
# POST /asap is protocol-public (rate-limited, not Bearer). Empty trusted_senders
# allows every sender URN. After inbound dispatch is wired, a trusted (or, with
# an empty list, any) sender can run task.request (agent_run + tool table) and
# mcp.tool_call (direct tool execute, no LLM). Default gateway bind is 127.0.0.1.
# Set this in production before exposing the gateway so sessions keyed as
# asap:<sender> cannot be spoofed and local tools are not open to any URN.
# The gateway compares the sender URN on every /asap request with this list.
# If the list is empty, the gateway accepts all sender URNs.
# Control network access to legacy ASAP requests that can use local tools.
# The SDK envelope format supports the built-in echo skill.
# trusted_senders = ["urn:asap:agent:peer"]

[asap.skill_descriptions]
Expand Down
Loading
Loading