SDS-038: CADSL Runtime & Renderer

Addresses Requirements

MVP Status

MVP


Component Description

The CADSL Runtime is responsible for parsing CADSL definitions and rendering them into interactive user interface components. It also handles user interactions with the rendered artifacts, translating them back into CADSL modifications or feedback events.


Technical Details

Interfaces

Direction Description Format
Input Cognitive Artifact CADSL (JSON/YAML)
Input User interaction events Events
Output Interactive UI components React/Web Components
Output CADSL modifications JSON
Output User feedback events Events

Protocols


Data Model

Refer to SDS-001: Data Model Schemas for:

Also see CADSL Language Specification for complete element catalog.


API Specification

Endpoints

Endpoint Method Description
/cadsl/render POST Render CADSL to UI components
/cadsl/artifact/{id} PUT Save artifact modifications

Request/Response

Render Artifact

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
POST /cadsl/render
{
  "artifact": {
    "type": "checklist",
    "canvas": [
      {"type": "Checkbox", "label": "Review complete", "checked": false}
    ]
  },
  "renderFormat": "react-components"
}

// Response
{
  "renderId": "render-uuid",
  "components": [...],
  "websocketUrl": "wss://server/render/render-uuid"
}

Save Artifact

1
2
3
4
5
6
7
8
PUT /cadsl/artifact/artifact-123
{
  "canvas": [
    {"type": "Checkbox", "label": "Review complete", "checked": true}
  ]
}

// Response: 200 OK

Error Codes

Code Description
400 Bad Request Invalid CADSL syntax
404 Not Found Artifact not found

Dependencies


Error Handling


Performance Considerations


Security Considerations


Testing Strategy