Skip to content

Commit 90e76c0

Browse files
authored
Merge pull request #255 from commandlayer/codex/clean-up-legacy-dark-terminal-pages
Refresh legacy dark pages into protocol-aligned light stubs and docs
2 parents 9e0d318 + e5488cf commit 90e76c0

15 files changed

Lines changed: 182 additions & 5937 deletions

README.md

Lines changed: 45 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,34 @@
1-
# commandlayer-org
1+
# CommandLayer
22

3-
Agents don’t make claims — they produce proof.
4-
Wrap → sign → verify.
5-
CommandLayer turns any agent action into a signed, verifiable receipt.
6-
VerifyAgent.eth is the public verifier for receipts produced by ENS-named agents.
7-
8-
## Shipped proof flow
9-
10-
- Verifier UI: https://www.commandlayer.org/verify.html
11-
- Raw verifier API: POST https://www.commandlayer.org/api/verify
12-
- Callable VerifyAgent endpoint: POST https://www.commandlayer.org/api/agents/verifyagent
13-
- npm: `npm install @commandlayer/agent-sdk`
3+
CommandLayer turns agent actions into signed, independently verifiable receipts.
144

155
## Core flow
166

17-
Agent action
18-
→ SDK wraps action
19-
→ signed receipt is emitted with ENS identity
20-
→ VerifyAgent resolves signer identity from ENS and verifies receipt
21-
→ VERIFIED or INVALID
22-
23-
If the output changes, the proof breaks.
7+
Action requested
8+
→ runtime signs canonical receipt
9+
→ verifier checks `metadata.proof`
10+
→ valid receipts pass
11+
→ tampered receipts fail
2412

25-
## Repos
13+
## Verified surfaces
2614

27-
- **agent-sdk**: wrap any agent action and emit a signed receipt
28-
- **verifyagent**: reference verifier and tamper-detection demo
29-
- **commandlayer-org**: hosted UI, public APIs, and docs
15+
- Manual verifier: `/verify.html`
16+
- Production proof: `/stack-proof-demo.html`
17+
- Automatic verification demo: `/webhook-auto-verify.html`
18+
- Runtime verifier: `POST https://runtime.commandlayer.org/verify`
19+
- Runtime signer endpoints: `POST https://runtime.commandlayer.org/trust-verification/{verb}/v1.0.0`
20+
- SDK: `@commandlayer/agent-sdk@1.2.0`
3021

31-
## Developer quickstart
22+
## SDK example
3223

3324
```ts
3425
import { CommandLayer } from "@commandlayer/agent-sdk";
3526

3627
const cl = new CommandLayer({
3728
agent: "runtime.commandlayer.eth",
38-
privateKey: process.env.CL_PRIVATE_KEY_PEM,
39-
keyId: "vC4WbcNoq2znSCiQ"
29+
privateKeyPem: process.env.CL_PRIVATE_KEY_PEM,
30+
keyId: "vC4WbcNoq2znSCiQ",
31+
verifierUrl: "https://runtime.commandlayer.org/verify"
4032
});
4133

4234
const result = await cl.wrap("summarize", async () => {
@@ -47,126 +39,38 @@ const verified = await cl.verify(result.receipt);
4739
console.log(verified.status);
4840
```
4941

50-
## Public verification APIs
51-
52-
### 1) `POST /api/verify`
53-
54-
**Purpose:** Verifies a raw CommandLayer receipt.
55-
56-
**Request:** Raw receipt JSON.
57-
58-
**Response:**
59-
60-
```json
61-
{
62-
"ok": true,
63-
"status": "VERIFIED",
64-
"reason": "Receipt verification passed.",
65-
"signer": "runtime.commandlayer.eth",
66-
"verb": "agent.execute",
67-
"hash": "...",
68-
"hash_matches": true,
69-
"signature_valid": true,
70-
"ens_resolved": true,
71-
"key_id": "..."
72-
}
73-
```
74-
75-
### 2) `POST /api/agents/verifyagent`
76-
77-
**Purpose:** Callable VerifyAgent.eth endpoint for agent-to-agent or app-to-agent verification.
42+
## Canonical proof fields
7843

79-
**Request:**
44+
- `metadata.proof.canonicalization = json.sorted_keys.v1`
45+
- `metadata.proof.hash.alg = SHA-256`
46+
- `metadata.proof.hash.value`
47+
- `metadata.proof.signature.alg = Ed25519`
48+
- `metadata.proof.signature.kid = vC4WbcNoq2znSCiQ`
49+
- `metadata.proof.signature.value`
50+
- `metadata.proof.signer_id = runtime.commandlayer.eth`
8051

81-
```json
82-
{
83-
"receipt": { "...": "CommandLayer receipt" }
84-
}
85-
```
86-
87-
**Response:**
88-
89-
```json
90-
{
91-
"agent": "verifyagent.eth",
92-
"action": "verify_receipt",
93-
"ok": true,
94-
"status": "VERIFIED",
95-
"result": {
96-
"reason": "Receipt verification passed.",
97-
"hash_matches": true,
98-
"signature_valid": true,
99-
"ens_resolved": true
100-
}
101-
}
102-
```
103-
104-
VerifyAgent.eth does not execute the original task. It verifies whether a submitted receipt is valid or tampered.
105-
106-
### cURL examples
107-
108-
```bash
109-
curl -X POST https://www.commandlayer.org/api/verify \
110-
-H "Content-Type: application/json" \
111-
--data-binary @public/examples/sample-receipt.json
112-
```
113-
114-
```bash
115-
printf '{"receipt":' > verifyagent-body.json
116-
cat public/examples/sample-receipt.json >> verifyagent-body.json
117-
printf '}' >> verifyagent-body.json
118-
119-
curl -X POST https://www.commandlayer.org/api/agents/verifyagent \
120-
-H "Content-Type: application/json" \
121-
--data-binary @verifyagent-body.json
122-
```
123-
124-
## What verification checks
125-
126-
- canonical JSON payload using `json.sorted_keys.v1`
127-
- SHA-256 hash matches `metadata.proof.hash_sha256`
128-
- Ed25519 signature validates
129-
- signer identity and verification metadata resolve from ENS (`cl.sig.pub`, `cl.sig.kid`, `cl.sig.canonical`, `cl.receipt.signer`)
130-
- tampered input/output returns `INVALID`
131-
132-
VerifyAgent resolves signer keys from ENS TXT records.
133-
For the hackathon demo, `runtime.commandlayer.eth` is supported via a labeled fallback resolver that mirrors the ENS record structure.
134-
The verification flow is designed to operate against live ENS records.
135-
136-
## Scope
137-
138-
CommandLayer focuses on a single primitive: verifiable agent execution.
139-
140-
Every action produces a signed receipt.
141-
Every receipt can be independently verified.
142-
143-
The current public demo focuses on this proof loop.
144-
145-
## Local development
146-
147-
### Install
148-
149-
```bash
150-
npm install
151-
```
152-
153-
### Run locally
154-
155-
```bash
156-
vercel dev
157-
```
52+
## Automatic verification proof
15853

159-
If you use another local workflow, keep the site static-first and preserve published URL paths.
54+
Valid receipt:
16055

161-
## Deployment note
56+
- `status = accepted`
57+
- `verifier_status = VALID`
58+
- `hash_matches = true`
59+
- `signature_valid = true`
16260

163-
Published URLs are part of the protocol surface.
61+
Tampered receipt:
16462

165-
Do not rename or move stable public paths for:
63+
- `status = rejected`
64+
- `verifier_status = INVALID`
65+
- `hash_matches = false`
66+
- `signature_valid = false`
16667

167-
- docs pages
168-
- schema URLs
169-
- Agent Card URLs
170-
- demo surfaces
68+
## Trust boundaries
17169

172-
CommandLayer is designed for ENS-named agents to be verifiable and discoverable, with identity and verification metadata resolved directly from ENS.
70+
- Runtime signs.
71+
- Verifier validates.
72+
- MCP bridges.
73+
- SDK wraps.
74+
- Schemas describe.
75+
- Schema-valid alone is not verified.
76+
- Webhook sender authentication is separate from receipt verification.

0 commit comments

Comments
 (0)