Files
browser/openspec/changes/implement-platform-api-surface/tasks.md
T
2026-07-11 14:56:10 +08:00

1.5 KiB

1. DTO And Router Contracts

  • 1.1 Add named DTO list/error response contracts and request-to-domain conversion helpers for core resource create requests.
  • 1.2 Add injectable platform router construction that wires health and core API routes through service.Core with an in-memory default.

2. Core API Handlers

  • 2.1 Implement users, AI providers, game plugins, server instances, and run endpoints create/list/detail handlers.
  • 2.2 Implement jobs, artifacts, log streams, and audit events create/list/detail handlers.
  • 2.3 Implement shared JSON decode, encode, method, and error mapping behavior using named DTO responses.
  • 2.4 Update platform/api/routes.md to identify implemented routes and deferred transport/bridge behavior.

3. API Tests

  • 3.1 Add handler tests for successful create/list/detail workflows and query filters.
  • 3.2 Add handler tests for malformed JSON, validation errors, duplicates, missing resources, dependency failures, and AI provider redaction.

4. Verification

  • 4.1 Run go test ./... from platform/ and record evidence.
  • 4.2 Run scripts/check-structure.sh and record evidence.
  • 4.3 Run openspec validate implement-platform-api-surface --strict and record evidence.

Evidence

  • go test ./api: passed.
  • go test ./dto: passed.
  • go test ./... from platform/: passed.
  • scripts/check-structure.sh: passed.
  • openspec validate implement-platform-api-surface --strict: passed.