Scaffold full commandlayer/router production implementation#2
Open
Scaffold full commandlayer/router production implementation#2
Conversation
Implements the complete CommandLayer Router as a production-grade TypeScript repo from scratch on the feature branch. ## What's included ### Core - POST /run/v1.0.0 supporting explicit plan mode and scored mode (no LLM) - Deterministic score function: 0.40*relevance + 0.30*need_bonus + 0.10*novelty + 0.10*cost_penalty + 0.10*risk_penalty; tie-break alphabetical - Prerequisite graph: fetch→clean→summarize→classify→parse→analyze→format - Schema-shaped request builders per verb (fetch special: x402+source only) - Append-only RunState: artifacts, trace, decisions - Stop conditions: final artifact, score<=0, max_steps, timeout, max_receipts ### Infrastructure - Ed25519 + SHA-256 + json.sorted_keys.v1 receipt signing/verification - ENS TXT pubkey resolution for runtime.commandlayer.eth (?ens=1) - AJV schema warm queue (background, non-blocking); POST /debug/prewarm → 202 - /verify?schema=1: cached-only mode returns 202 + retry_after_ms - SSRF guard for fetch: blocks private IPs, localhost, IPv6, metadata service - In-memory idempotency cache with SHA-256 key derivation - NDJSON replay logs per run; GET /replay/:run_id endpoint - HTTP delegate mode via RuntimeClient (RUNTIME_URL env) - Local reference handlers for demo/test (no RUNTIME_URL needed) - CLI: cl-router run --goal/--content/--source/--plan ### ENS Anchors (source of truth embedded) - runtime.commandlayer.eth: alg=ed25519, kid=v1, canonical=json.sorted_keys.v1 - cleanagent.eth: canonical example of Commons agent TXT record shape ### Tests (37 passing) - scoring: verb selection, policy, stop conditions, tie-break, novelty penalty - prereqs: all 10 verbs, conditions, edge cases - requestBuilders: fetch vs non-fetch schema shapes, idempotency_key, limits - idempotency: cache hit/miss, null result, stable stringify - engine: scored/explicit modes, conditions, optional steps, unique run_ids ### Docs - SPEC.md: full /run/v1.0.0 spec, score function, prereq graph, state model - API.md: all endpoints + env vars reference - CONTRACTS.md: RunRequest/RunResponse/RunState types, receipt expectations - INTEGRATION_RUNTIME.md: HTTP delegate and drop-in block patterns - INTEGRATION_SITE.md: site docs update guide - EXAMPLES.md: curl/CLI/SDK usage examples with ENS anchor reference https://claude.ai/code/session_01TjunT4KVR59QhARYaw2nUE
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Implements the complete CommandLayer Router as a production-grade TypeScript repo from scratch on the feature branch.
What's included
Core
Infrastructure
ENS Anchors (source of truth embedded)
Tests (37 passing)
Docs
https://claude.ai/code/session_01TjunT4KVR59QhARYaw2nUE