-
Notifications
You must be signed in to change notification settings - Fork 0
Validation Scripts
This page provides scripts and one-liners that validate the RDCP data layer end-to-end without relying on the Admin UI. Use these to prove the client SDK β RDCP server β headless builder pipeline.
Links: Quick Start Guide β’ Architecture Overview β’ Troubleshooting β’ Demo Scenarios
Script path:
- scripts/validate-admin-data.mjs
Run:
RDCP_API_KEY='dev-key-change-in-production-min-32-chars' \
node --enable-source-maps scripts/validate-admin-data.mjs
What it does:
- Imports @rdcp.dev/client, @rdcp.dev/core, and @rdcp.dev/admin-ui
- Calls discovery and status on the RDCP server (default http://localhost:3000)
- Generates AdminUISpec from discovery
- Prints both JSON blobs
Expected output (abridged):
--- AdminUISpec ---
{
"groups": [
{ "id": "default", "label": "Controls", "widgets": [
{ "type": "ToggleGroup", "categories": ["DATABASE","API_ROUTES", ...] },
{ "type": "StatusPanel" },
{ "type": "SubmitBar" }
]}
]
}
--- Discovery+Status ---
{
"discovery": { "protocol": "rdcp/1.0", ... },
"status": { "protocol": "rdcp/1.0", ... }
}
Interpretation:
- AdminUISpec present with at least one group β headless builder OK
- discovery.protocol and status.protocol == "rdcp/1.0" β RDCP server OK
- categories listed under discovery and status.categories show feature toggles
Verifies that ES module imports resolve properly at runtime.
node --input-type=module -e "import('@rdcp.dev/client').then(m=>console.log('client ok', Object.keys(m))).catch(console.error)"
node --input-type=module -e "import('@rdcp.dev/core').then(m=>console.log('core ok', Object.keys(m))).catch(console.error)"
node --input-type=module -e "import('@rdcp.dev/admin-ui').then(m=>console.log('admin-ui ok', Object.keys(m))).catch(console.error)"
Expected output (abridged):
client ok [ 'RDCPClientError', 'createRDCPClient' ]
core ok [ 'PROTOCOL_VERSION', 'RDCP_HEADERS', 'RDCP_PATHS', ... ]
admin-ui ok [ 'createAdminUISpec' ]
After starting the Admin App (port 3100):
curl -s http://localhost:3100/admin/spec | jq 'keys'
# β ["groups"]
curl -s http://localhost:3100/admin/json | jq '{
hasDiscovery: has("discovery"), hasStatus: has("status"),
discoveryProtocol: .discovery.protocol, statusProtocol: .status.protocol
}'
# β { hasDiscovery: true, hasStatus: true, discoveryProtocol: "rdcp/1.0", statusProtocol: "rdcp/1.0" }
What this validates:
- /admin/spec β headless builder pipeline exposed over HTTP
- /admin/json β client SDK aggregation of discovery + status
- discovery
- protocol must be rdcp/1.0
- categories[] enumerate controllable debug areas and metadata
- status
- protocol must be rdcp/1.0
- categories{} shows current on/off for each debug category
- AdminUISpec
- groups[].widgets[] drive UI composition; ToggleGroup + StatusPanel + SubmitBar indicate basic control workflow is enabled
Getting Started: Installation β’ Basic Usage β’ Authentication
Migration: From Manual Implementation β’ Framework Examples β’ Publishing Guide
Protocol: RDCP v1.0 Specification β’ Implementation Guide β’ API Reference
π Home | π¦ NPM Package | π GitHub | π Issues
RDCP SDK v1.0.0 - Runtime Debug Control Protocol implementation for JavaScript/Node.js applications
- Implementation-Status
- JavaScript-vs-TypeScript-Boundaries
- Core-Package-Boundaries
- Publishing-Setup
- Contributing
- API-Reference
- Protocol Specification
- Implementation Guide
- RDCP-Primitive-Types
- Protocol-Schemas
- Protocol-Error-Codes
- API-Reference
Version: 1.0.0
Protocol: RDCP v1.0
License: Apache-2.0