diff --git a/runtime/tests/runtime-signing.test.mjs b/runtime/tests/runtime-signing.test.mjs index 107794d..c04ba61 100644 --- a/runtime/tests/runtime-signing.test.mjs +++ b/runtime/tests/runtime-signing.test.mjs @@ -86,11 +86,11 @@ test("private PEM_B64 + public raw32 b64 path signs and /verify roundtrip works" assert.equal(h.kid, keys.kid); const body = { - x402: { verb: "describe", version: "1.0.0", entry: "x402://describeagent.eth/describe/v1.0.0" }, + x402: { verb: "describe", version: "1.1.0", entry: "x402://describeagent.eth/describe/v1.1.0" }, input: { subject: "t", detail_level: "short" }, trace: { provider: "test" }, }; - const receiptResp = await fetch(`${srv.base}/describe/v1.0.0`, { + const receiptResp = await fetch(`${srv.base}/describe/v1.1.0`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(body), @@ -144,12 +144,12 @@ test("/verify?ens=1 passes with mocked ENS TXT response", async () => { try { const body = { - x402: { verb: "describe", version: "1.0.0", entry: "x402://describeagent.eth/describe/v1.0.0" }, + x402: { verb: "describe", version: "1.1.0", entry: "x402://describeagent.eth/describe/v1.1.0" }, input: { subject: "t", detail_level: "short" }, trace: { provider: "test" }, }; const response = await ( - await fetch(`${srv.base}/describe/v1.0.0`, { + await fetch(`${srv.base}/describe/v1.1.0`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(body), diff --git a/scripts/smoke-ens.sh b/scripts/smoke-ens.sh index e175d75..d003233 100644 --- a/scripts/smoke-ens.sh +++ b/scripts/smoke-ens.sh @@ -3,7 +3,7 @@ set -euo pipefail BASE="${RUNTIME_BASE:-https://runtime.commandlayer.org}" -curl -sS -X POST "$BASE/describe/v1.0.0" \ +curl -sS -X POST "$BASE/describe/v1.1.0" \ -H "content-type: application/json" \ --data-binary '{"input":{"subject":"hello"}}' > /tmp/receipt.json diff --git a/scripts/smoke.mjs b/scripts/smoke.mjs index 48e5a40..069fd79 100644 --- a/scripts/smoke.mjs +++ b/scripts/smoke.mjs @@ -2,7 +2,7 @@ import process from "node:process"; const base = process.env.SMOKE_BASE_URL || `http://127.0.0.1:${process.env.PORT || 8080}`; const input = { - x402: { entry: "x402://describeagent.eth/describe/v1.0.0", verb: "describe", version: "1.0.0" }, + x402: { entry: "x402://describeagent.eth/describe/v1.1.0", verb: "describe", version: "1.1.0" }, input: { subject: "CommandLayer", detail_level: "short" }, }; @@ -18,14 +18,14 @@ try { if (!healthResp.ok) fail("/health http", health); if (!health.signer_ok || !health.verifier_ok) fail("/health signer/verifier", health); - const describeResp = await fetch(`${base}/describe/v1.0.0`, { + const describeResp = await fetch(`${base}/describe/v1.1.0`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(input), }); const response = await describeResp.json(); const receipt = response?.receipt || response; - if (!describeResp.ok) fail("/describe/v1.0.0 http", response); + if (!describeResp.ok) fail("/describe/v1.1.0 http", response); if (!receipt?.metadata?.proof?.hash_sha256 || !receipt?.metadata?.proof?.signature_b64) { fail("describe proof fields", receipt?.metadata?.proof || response); } diff --git a/server.mjs b/server.mjs index a6830e0..f53e9a3 100644 --- a/server.mjs +++ b/server.mjs @@ -138,9 +138,9 @@ const runtimeConfig = { // service identity / discovery const SERVICE_NAME = process.env.SERVICE_NAME || "commandlayer-runtime"; -const SERVICE_VERSION = process.env.SERVICE_VERSION || "1.0.0"; +const SERVICE_VERSION = process.env.SERVICE_VERSION || "1.1.0"; const CANONICAL_BASE = (process.env.CANONICAL_BASE_URL || "https://runtime.commandlayer.org").replace(/\/+$/, ""); -const API_VERSION = process.env.API_VERSION || "1.0.0"; +const API_VERSION = process.env.API_VERSION || "1.1.0"; // ENS verifier config const ETH_RPC_URL = runtimeConfig.ethRpcUrl; @@ -1020,7 +1020,7 @@ function doDescribe(body) { ? `**${subject}** is a standard “API meaning” contract agents can call using published schemas and receipts.` : `**${subject}** is a semantic contract for agents. It standardizes verbs, strict JSON Schemas (requests + receipts), and verifiable receipts so different runtimes can execute the same intent without semantic drift.`; - return { description, bullets, properties: { verb: "describe", version: "1.0.0", detail_level: detail } }; + return { description, bullets, properties: { verb: "describe", version: API_VERSION, detail_level: detail } }; } function doFormat(body) { @@ -1349,7 +1349,7 @@ async function handleVerb(verb, req, res) { }; try { - const x402 = req.body?.x402 || { verb, version: "1.0.0", entry: `x402://${verb}agent.eth/${verb}/v1.0.0` }; + const x402 = req.body?.x402 || { verb, version: API_VERSION, entry: `x402://${verb}agent.eth/${verb}/v${API_VERSION}` }; const callerTimeout = Number(req.body?.limits?.timeout_ms || req.body?.limits?.max_latency_ms || 0); const timeoutMs = Math.min(SERVER_MAX_HANDLER_MS, callerTimeout && callerTimeout > 0 ? callerTimeout : SERVER_MAX_HANDLER_MS); @@ -1374,7 +1374,7 @@ async function handleVerb(verb, req, res) { } } catch (e) { - const x402 = req.body?.x402 || { verb, version: "1.0.0", entry: `x402://${verb}agent.eth/${verb}/v1.0.0` }; + const x402 = req.body?.x402 || { verb, version: API_VERSION, entry: `x402://${verb}agent.eth/${verb}/v${API_VERSION}` }; const actor = req.body?.actor ? { id: String(req.body.actor), role: "user" } diff --git a/tests/smoke.mjs b/tests/smoke.mjs index 67afe6b..a48228e 100644 --- a/tests/smoke.mjs +++ b/tests/smoke.mjs @@ -209,12 +209,12 @@ async function main() { } const describeBody = { - x402: { verb: "describe", version: "1.0.0", entry: "x402://describeagent.eth/describe/v1.0.0" }, + x402: { verb: "describe", version: "1.1.0", entry: "x402://describeagent.eth/describe/v1.1.0" }, input: { subject: "smoke-test", detail_level: "short" }, trace: { provider: "smoke" }, }; - const describe = await httpJson(`${baseUrl}/describe/v1.0.0`, { method: "POST", body: describeBody }); + const describe = await httpJson(`${baseUrl}/describe/v1.1.0`, { method: "POST", body: describeBody }); assert.equal(describe.status, 200, `describe failed: ${JSON.stringify(describe.json)}`); const { receipt, runtimeMetadata } = extractReceiptEnvelope(describe.json); assert.equal(receipt.status, "success", `describe receipt status must be success`);