Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
297b818
Merge pull request #33 from commandlayer/codex/fix-failing-chain-test…
GsCommand Mar 20, 2026
dc34376
[runtime] improve chain test failure diagnostics
GsCommand Mar 20, 2026
b4f8a16
Merge pull request #35 from commandlayer/codex/update-chain-test-to-i…
GsCommand Mar 20, 2026
10a91bb
[runtime] fix chain test: short-circuit schema network fetch to use b…
claude Mar 20, 2026
512172b
Merge pull request #39 from commandlayer/claude/debug-verify-endpoint…
GsCommand Mar 20, 2026
6d7dbaa
[runtime] make schema chain test deterministic
GsCommand Mar 20, 2026
2925635
Merge pull request #41 from commandlayer/codex/fix-failing-chain-test…
GsCommand Mar 20, 2026
a588bbf
[runtime] prefer builtin schemas during validator warmup
GsCommand Mar 20, 2026
abeeebe
Merge pull request #44 from commandlayer/codex/implement-builtin-firs…
GsCommand Mar 20, 2026
409579e
[runtime] tighten verify warmup polling\n\nWhy: make the runtime chai…
GsCommand Mar 20, 2026
bc9c97a
Merge pull request #46 from commandlayer/codex/tighten-test-durabilit…
GsCommand Mar 20, 2026
5f9b430
[runtime] add flow trace ids to signed receipts
GsCommand Mar 21, 2026
52c5634
Merge pull request #47 from commandlayer/codex/add-execution-trace-mo…
GsCommand Mar 21, 2026
df9f477
[runtime] emit commons receipts with canonical execute entry
GsCommand Mar 21, 2026
f58d8f8
Merge pull request #48 from commandlayer/codex/update-commons-receipt…
GsCommand Mar 21, 2026
a53f5f0
[runtime] add unified execute route
GsCommand Mar 21, 2026
ccd1a29
Merge pull request #49 from commandlayer/codex/add-unified-post-/exec…
GsCommand Mar 21, 2026
131a6aa
[runtime] normalize execute request bodies before verb dispatch
GsCommand Mar 21, 2026
876010e
Merge pull request #50 from commandlayer/codex/fix-/execute-request-n…
GsCommand Mar 21, 2026
77cffa8
[runtime] align commons surfaces to v1.1.0 current line
GsCommand Mar 22, 2026
14a766c
Merge pull request #51 from commandlayer/codex/align-repository-with-…
GsCommand Mar 22, 2026
5915576
Create agent_log.json
GsCommand Mar 22, 2026
5a06b02
Create agent.json for CommandLayer configuration
GsCommand Mar 22, 2026
a198d7a
[runtime] add dual-version commons verb routes
GsCommand Apr 26, 2026
d9930bb
Merge pull request #52 from commandlayer/codex/update-commandlayer-ru…
GsCommand Apr 26, 2026
b98aca4
[runtime] harden versioned-routes server boot diagnostics
GsCommand Apr 27, 2026
3b21a2d
[runtime] raise CI audit threshold to critical
GsCommand Apr 27, 2026
319d792
Merge pull request #53 from commandlayer/codex/fix-ci-failure-for-dua…
GsCommand Apr 27, 2026
38a69ec
Merge pull request #54 from commandlayer/codex/fix-ci-audit-failure-f…
GsCommand Apr 27, 2026
69d98c4
[runtime] add judge-facing integration comments
GsCommand Apr 27, 2026
14c169e
Merge pull request #55 from commandlayer/codex/add-integration-commen…
GsCommand Apr 27, 2026
511d808
[runtime] clarify VerifyAgent separation and runtime scope
GsCommand Apr 28, 2026
6516526
Merge pull request #56 from commandlayer/codex/clean-verifyagent-refe…
GsCommand Apr 28, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: npm ci

- name: Audit dependencies
run: npm audit --audit-level=high
run: npm audit --audit-level=critical

- name: Syntax check
run: npm run check
Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ All notable changes to this runtime repository will be documented in this file.

## Unreleased

- Adds production-surface tests for receipt signing and `POST /verify` behavior in `server.mjs`.
- Removes the in-repo `sdk/` subtree so this repository stays scoped to the runtime service layer.
- Separated VerifyAgent into its own public Commons/MIT repository. The runtime now focuses on executing agent actions and producing signed CommandLayer receipts. Public paste-and-verify receipt verification is handled externally by VerifyAgent.
- Aligns the runtime service, docs, examples, and package metadata on the CommandLayer Commons v1.1.0 current line.
- Removes Commons runtime dependence on inbound `x402` request metadata so public Commons responses remain payment-agnostic.
- Refreshes the golden receipt fixture and production-surface tests to match current wrapped receipt responses and verification expectations.

## v1.0.0

Expand Down
35 changes: 30 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# CommandLayer Runtime

Reference Node.js runtime for CommandLayer Commons verbs. This service exposes deterministic verb handlers, signs receipts with Ed25519 via `@commandlayer/runtime-core`, and verifies receipts with a configured public key or an ENS lookup.
Reference Node.js runtime for CommandLayer Commons verbs. This service executes deterministic verb handlers and produces signed CommandLayer receipts via `@commandlayer/runtime-core` (canonicalization, SHA-256 hashing, and Ed25519 signatures).

For public paste-and-verify receipt verification, use VerifyAgent: https://github.com/commandlayer/verifyagent

## Layer boundaries

- **Runtime (this repo):** executes agent actions and emits signed CommandLayer receipts through versioned runtime endpoints.
- **VerifyAgent (external):** public receipt verifier experience in a separate Commons/MIT repository.
- **SDK:** wraps agents and exposes reusable receipt tooling for programmatic verification and integrations.
- **Agent Cards:** machine-readable identity/capability metadata.
- **Commercial runtime:** hosted runtime surface (paid API, x402, indexing, dashboards).

## Runtime receipt flow

1. Runtime receives an agent action request.
2. Runtime executes the verb endpoint.
3. Runtime creates a canonical CommandLayer receipt.
4. Runtime signs the receipt with the configured Ed25519 key.
5. The receipt can be verified locally, by the SDK, or publicly through VerifyAgent.

## What is implemented

Expand All @@ -9,7 +27,7 @@ The runtime currently exposes:
- `GET /` — JSON index with service metadata and enabled verb routes.
- `GET /health` — health and signer/verifier readiness.
- `GET /healthz` — alias for `/health`.
- `POST /verify` — receipt hash/signature verification, with optional ENS lookup and optional schema validation.
- `POST /verify` — runtime verification API for receipt hash/signature checks, with optional ENS lookup and optional schema validation.
- `POST /<verb>/v1.1.0` for the verbs enabled by `ENABLED_VERBS`.

The default enabled verbs are:
Expand Down Expand Up @@ -49,9 +67,12 @@ Verb routes return a JSON object with a signed `receipt` and optional unsigned `

```json
{
"trace_id": "cltrace_...",
"steps": [{ "step": 1, "receipt": { "...": "signed receipt" } }],
"final_receipt": { "...": "same signed receipt" },
"receipt": { "...": "signed receipt" },
"runtime_metadata": {
"trace": { "...": "optional" },
"trace": { "trace_id": "cltrace_...", "...": "optional" },
"actor": { "...": "optional" },
"delegation_result": { "...": "optional" }
}
Expand All @@ -60,6 +81,8 @@ Verb routes return a JSON object with a signed `receipt` and optional unsigned `

The signed receipt is produced by `@commandlayer/runtime-core`. The runtime sets proof fields under `receipt.metadata.proof`, including:

- `trace_id`
- `receipt_id`
- `alg`
- `canonical`
- `signer_id`
Expand Down Expand Up @@ -101,7 +124,7 @@ Supported query flags:

When `schema=1`, schema validation uses the receipt verb to compute a `v1.1.0` receipt schema URL under `SCHEMA_HOST`.

When a verb request omits `x402`, the runtime fabricates defaults from the live route version: `version: "1.1.0"` and `entry: "x402://<verb>agent.eth/<verb>/v1.1.0"`.
When a commons verb request omits `execution`, the runtime fabricates receipt execution defaults from the live route version: `entry: "https://runtime.commandlayer.org/execute"`, `verb: "<verb>"`, `version: "1.1.0"`, and `class: "commons"`. Commercial/payment-aware behavior belongs in the separate commercial runtime and is intentionally out of scope here.

When `VERIFY_SCHEMA_CACHED_ONLY=1` (the default), `/verify?schema=1` returns HTTP `202` with `validator_not_warmed_yet` if the validator for that verb has not been compiled yet. `POST /debug/prewarm` can queue validator warmup, and `GET /debug/validators` shows cache state.

Expand Down Expand Up @@ -153,7 +176,7 @@ scripts/dev.sh

`scripts/dev.sh` generates `keys.env` with `tools/mkkeys.mjs` if needed, sources that file, enables debug routes, and starts `server.mjs` on `127.0.0.1:8099` by default.

### Verify locally
### Verify locally (runtime API)

```bash
curl -s http://127.0.0.1:8080/health | jq .
Expand All @@ -178,6 +201,8 @@ The production verification path is `server.mjs`, which signs receipts and verif

Repo-local test coverage now includes runtime service tests that exercise the receipt production path and `POST /verify` behavior directly, alongside the remaining legacy helper coverage under `runtime/tests/`.

For public paste-and-verify receipt verification, use VerifyAgent: https://github.com/commandlayer/verifyagent

## Configuration and operations

- Configuration reference: [`docs/CONFIGURATION.md`](docs/CONFIGURATION.md)
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ENS-backed verification currently reads these TXT records directly from the sign

The server does not implement `VERIFIER_ENS_NAME` or `ENS_SIGNER_TEXT_KEY`.

When schema verification is requested, the runtime resolves receipt schemas from the `v1.1.0` schema tree under `SCHEMA_HOST`. When a verb request omits `x402`, the runtime fabricates `version: "1.1.0"` and `entry: "x402://<verb>agent.eth/<verb>/v1.1.0"` before signing.
When schema verification is requested, the runtime resolves receipt schemas from the `v1.1.0` schema tree under `SCHEMA_HOST`. When a commons verb request omits `execution`, the runtime fabricates `entry: "https://runtime.commandlayer.org/execute"`, the live `verb`, `version: "1.1.0"`, and `class: "commons"` before signing.

### Controls not implemented by the current server

Expand Down
93 changes: 93 additions & 0 deletions agent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"name": "CommandLayer",
"version": "1.1.0",
"description": "Verifiable execution infrastructure for autonomous agents. Every agent action produces a cryptographically signed receipt tied to an ENS identity, verifiable by anyone without trusting the runtime.",
"operator_wallet": "0x6FFa1e00509d8B625c2F061D7dB07893B37199BC",
"erc8004": {
"agent_id": 33370,
"identity_registry": "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
"chain": "base",
"chain_id": "eip155:8453",
"registration_tx": "0xb511007618f8c0aa0b5c12b48084ce67dc52321a79e0ef9002fdc8e6db5e899d",
"registration_block": 43509626,
"registered_at": "2026-03-18T04:36:39Z"
},
"identity": {
"ens": "commandlayer.eth",
"signer_ens": "runtime.commandlayer.eth",
"signer_kid": "vC4WbcNoq2znSCiQ",
"signing_alg": "ed25519-sha256",
"canonical": "json.sorted_keys.v1"
},
"runtime": {
"base_url": "https://runtime.commandlayer.org",
"health": "https://runtime.commandlayer.org/health",
"verify": "https://runtime.commandlayer.org/verify",
"version": "1.1.0"
},
"supported_verbs": {
"commons": [
"fetch",
"describe",
"format",
"clean",
"parse",
"summarize",
"convert",
"explain",
"analyze",
"classify"
],
"commercial": [
"authorize",
"checkout",
"purchase",
"ship",
"verify"
]
},
"schemas": {
"commons": "https://commandlayer.org/schemas/v1.1.0/commons/",
"commercial": "https://commandlayer.org/schemas/v1.1.0/commercial/",
"agent_cards": "https://commandlayer.org/agent-cards/schemas/v1.1.0/"
},
"sdks": {
"typescript": "@commandlayer/sdk@1.1.0",
"python": "commandlayer==1.1.0"
},
"tech_stack": [
"Node.js",
"TypeScript",
"Python",
"Ed25519",
"ENS",
"IPFS",
"AJV",
"JSON Schema 2020-12",
"x402",
"ERC-8004"
],
"compute_constraints": {
"max_latency_ms": 2000,
"signing": "ed25519-sha256",
"node_version": ">=20.0.0"
},
"task_categories": [
"verification",
"signed-receipts",
"agent-identity",
"x402-execution",
"schema-validation",
"ens-key-discovery"
],
"repositories": {
"runtime": "https://github.com/commandlayer/runtime",
"protocol_commons": "https://github.com/commandlayer/protocol-commons",
"protocol_commercial": "https://github.com/commandlayer/protocol-commercial",
"agent_cards": "https://github.com/commandlayer/agent-cards",
"sdk": "https://github.com/commandlayer/sdk",
"runtime_core": "https://github.com/commandlayer/runtime-core",
"commercial_runtime": "https://github.com/commandlayer/commercial-runtime"
},
"site": "https://commandlayer.org"
}
186 changes: 186 additions & 0 deletions agent_log.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
{
"agent": "CommandLayer",
"agent_id": 33370,
"operator_wallet": "0x6FFa1e00509d8B625c2F061D7dB07893B37199BC",
"erc8004_registration_tx": "0xb511007618f8c0aa0b5c12b48084ce67dc52321a79e0ef9002fdc8e6db5e899d",
"hackathon": "Synthesis 2026",
"log_version": "1.0.0",
"generated_at": "2026-03-22T05:30:00Z",
"execution_log": [
{
"step": 1,
"timestamp": "2026-03-22T00:00:00Z",
"action": "cross_repo_audit",
"description": "Audited all 8 CommandLayer repositories for cross-repo coherence, version alignment, and hackathon readiness",
"tool_calls": [
"web_fetch: github.com/commandlayer/runtime",
"web_fetch: github.com/commandlayer/protocol-commons",
"web_fetch: github.com/commandlayer/protocol-commercial",
"web_fetch: github.com/commandlayer/agent-cards",
"web_fetch: github.com/commandlayer/sdk",
"web_fetch: github.com/commandlayer/runtime-core",
"web_fetch: github.com/commandlayer/commercial-runtime",
"web_fetch: github.com/commandlayer/commandlayer-org"
],
"decision": "Identified stale README content in protocol-commons and protocol-commercial; identified missing repo descriptions on runtime-core and commercial-runtime; identified SDK not published to npm or PyPI",
"outcome": "Audit complete — priority fix list generated",
"status": "success"
},
{
"step": 2,
"timestamp": "2026-03-22T01:00:00Z",
"action": "verify_runtime_health",
"description": "Confirmed live runtime status, signer identity, and ENS key resolution",
"tool_calls": [
"curl: GET https://runtime.commandlayer.org/health"
],
"decision": "Runtime confirmed live — signer_ok: true, verifier_ok: true, signer_id: runtime.commandlayer.eth, kid: vC4WbcNoq2znSCiQ",
"outcome": "Runtime healthy and signing",
"status": "success",
"evidence": {
"endpoint": "https://runtime.commandlayer.org/health",
"signer_id": "runtime.commandlayer.eth",
"signer_ok": true,
"verifier_ok": true,
"version": "1.1.0"
}
},
{
"step": 3,
"timestamp": "2026-03-22T02:00:00Z",
"action": "execute_verb_and_verify_receipt",
"description": "Executed summarize verb and verified signed receipt returned from runtime",
"tool_calls": [
"curl: POST https://runtime.commandlayer.org/summarize/v1.1.0"
],
"decision": "Receipt returned with valid Ed25519 signature, hash, and signer identity",
"outcome": "Live signed receipt produced and verified",
"status": "success",
"evidence": {
"receipt_id": "clrcpt_3aeed5c2f79e419ea2925fd69522ac71",
"trace_id": "cltrace_6991dc5194504516b687559470e1f168",
"verb": "summarize",
"version": "1.1.0",
"status": "success",
"signer_id": "runtime.commandlayer.eth",
"alg": "ed25519-sha256",
"hash_sha256": "79eb8f7581e9767e7bd0f4eb28ce6d6d5a7ab44e4f46d508cd706821cdbe7fbe",
"signature_b64": "J7Gx4QvHw7iP9fvl9qxc752wUtrIIcRhJTJKdim9Sm59QxsM0FRlwNFocgtGo4JRmKhHod5UdDivx6ln7sgrBw=="
}
},
{
"step": 4,
"timestamp": "2026-03-22T02:30:00Z",
"action": "publish_typescript_sdk",
"description": "Built and published @commandlayer/sdk@1.1.0 to npm",
"tool_calls": [
"npm ci",
"npm audit fix",
"npm run build",
"npm publish --access public"
],
"decision": "0 vulnerabilities after audit fix — safe to publish",
"outcome": "@commandlayer/sdk@1.1.0 published to npm registry",
"status": "success",
"evidence": {
"package": "@commandlayer/sdk",
"version": "1.1.0",
"registry": "https://registry.npmjs.org/",
"vulnerabilities": 0,
"files": 10,
"unpacked_size_kb": 182
}
},
{
"step": 5,
"timestamp": "2026-03-22T03:00:00Z",
"action": "publish_python_sdk",
"description": "Built and published commandlayer==1.1.0 to PyPI",
"tool_calls": [
"python -m build",
"python -m twine upload dist/*"
],
"decision": "Package built cleanly — publish to PyPI",
"outcome": "commandlayer@1.1.0 published to PyPI",
"status": "success",
"evidence": {
"package": "commandlayer",
"version": "1.1.0",
"registry": "https://pypi.org/project/commandlayer/1.1.0/"
}
},
{
"step": 6,
"timestamp": "2026-03-22T04:00:00Z",
"action": "verify_erc8004_registration",
"description": "Confirmed ERC-8004 registration on Base mainnet",
"tool_calls": [
"web_fetch: https://basescan.org/tx/0xb511007618f8c0aa0b5c12b48084ce67dc52321a79e0ef9002fdc8e6db5e899d"
],
"decision": "Registration confirmed — agent_id 33370, identity registry 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
"outcome": "ERC-8004 identity verified onchain",
"status": "success",
"evidence": {
"tx": "0xb511007618f8c0aa0b5c12b48084ce67dc52321a79e0ef9002fdc8e6db5e899d",
"agent_id": 33370,
"identity_registry": "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
"chain": "base",
"block": 43509626,
"status": "success"
}
},
{
"step": 7,
"timestamp": "2026-03-22T05:00:00Z",
"action": "self_custody_transfer",
"description": "Transferred hackathon ERC-8004 NFT to self-custody wallet for submission publishing",
"tool_calls": [
"curl: POST https://synthesis.devfolio.co/participants/me/transfer/init",
"curl: POST https://synthesis.devfolio.co/participants/me/transfer/confirm"
],
"decision": "Transfer to burner wallet for hackathon NFT custody",
"outcome": "Self-custody transfer complete",
"status": "success",
"evidence": {
"tx": "0xe9c8b5134e09b71b1ec62733483dab00cfd84592cf44251b84cf698d8822c165",
"custody_type": "self_custody",
"owner_address": "0x6A329F25b5b951Ea283FDa4473aB3453215D1D14"
}
},
{
"step": 8,
"timestamp": "2026-03-22T05:27:18Z",
"action": "submit_hackathon_project",
"description": "Created project draft via Synthesis API across 8 tracks",
"tool_calls": [
"curl: GET https://synthesis.devfolio.co/catalog",
"curl: POST https://synthesis.devfolio.co/projects",
"curl: POST https://synthesis.devfolio.co/projects/c7321290a59e43b786aaec48a0e6c9c8"
],
"decision": "Submit to Protocol Labs ERC-8004, Protocol Labs Let the Agent Cook, Base Agent Services, OpenServ, ENS Identity, ENS Open Integration, ENS Communication, Synthesis Open Track",
"outcome": "Draft project created — project UUID c7321290a59e43b786aaec48a0e6c9c8",
"status": "success",
"evidence": {
"project_uuid": "c7321290a59e43b786aaec48a0e6c9c8",
"slug": "commandlayer-d982",
"tracks": 8,
"status": "draft"
}
}
],
"summary": {
"total_steps": 8,
"successful": 8,
"failed": 0,
"tool_calls_total": 22,
"autonomous_decisions": 8,
"onchain_artifacts": [
"0xb511007618f8c0aa0b5c12b48084ce67dc52321a79e0ef9002fdc8e6db5e899d",
"0xe9c8b5134e09b71b1ec62733483dab00cfd84592cf44251b84cf698d8822c165"
],
"packages_published": [
"@commandlayer/sdk@1.1.0",
"commandlayer==1.1.0"
]
}
}
Loading
Loading