feat(runtime): add live Trust Verification sign endpoint (POST /trust-verification/sign/v1.0.0)#72
Merged
Conversation
Why: Enable runtime-hosted signing for the Trust Verification v1 sign flow so bridges do not handle private keys. Contract impact: adds versioned POST /trust-verification/sign/v1.0.0 receipt-producing endpoint without changing existing receipt proof contract.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
signverb so bridges (MCP) do not hold private keys and can remain transport-only.@commandlayer/runtime-core.Description
POST /trust-verification/sign/v1.0.0which accepts a JSON body with a non-nullpayloadfield and returns a signed canonical receipt produced by the existingmakeReceipt/signing flow (which uses@commandlayer/runtime-core).extractSignPayloadhelper and wire the endpoint intoserver.mjsto build an execution envelope{ entry, verb, version, class }and produce a signed receipt (no request-provided keys are accepted).runtime/tests/runtime-signing.test.mjscovering proof presence,signature.alg === "Ed25519",hash.alg === "SHA-256", verification success, tampered receipt invalidation, and missing-payload rejection.README.md.RECEIPT_SIGNING_PRIVATE_KEY_PEM_B64,RECEIPT_SIGNING_PUBLIC_KEY_B64,RECEIPT_SIGNER_ID).Files changed:
server.mjs,runtime/tests/runtime-signing.test.mjs,README.md.Testing
npm installandnpm run checksuccessfully;npm run buildis not present in this repo and was skipped.node --test runtime/tests/*.test.mjsand focused runsnode --test runtime/tests/runtime-signing.test.mjsuntil the signing tests passed; the final focused test run covering the new/trust-verification/signcases passed.Codex Task