|
| 1 | +# 2026-07-10 Unified Runtime |
| 2 | + |
| 3 | +## Intent |
| 4 | + |
| 5 | +Deliver the 0.2.0 unified execution layer so applications can run different providers through one validated, observable contract. |
| 6 | + |
| 7 | +## Changed |
| 8 | + |
| 9 | +| Area | Files | Purpose | |
| 10 | +| --- | --- | --- | |
| 11 | +| Runtime contracts | `packages/runtime/src/contracts.ts` | Define adapter, request, result, output, usage, progress, and event contracts | |
| 12 | +| Unified execution | `packages/runtime/src/runtime.ts` | Resolve configuration, validate, select adapters, execute, and normalize results | |
| 13 | +| Input validation | `packages/runtime/src/input-validation.ts` | Validate required fields, types, options, ranges, lists, and capabilities | |
| 14 | +| Built-in adapters | `packages/runtime/src/adapters.ts` | Bridge OpenAI-compatible and RunningHub clients into the unified runtime | |
| 15 | +| Tests | `tests/runtime.test.mjs` | Cover execution, validation, adapter selection, timeouts, hooks, mapping, and normalization | |
| 16 | +| Release | `package.json`, `package-lock.json`, `CHANGELOG.md` | Prepare version 0.2.0 | |
| 17 | +| Documentation | `README.md`, `docs/*` | Document architecture, public API, examples, and boundaries | |
| 18 | + |
| 19 | +## Verification |
| 20 | + |
| 21 | +| Check | Result | |
| 22 | +| --- | --- | |
| 23 | +| `npm run harness:verify:release` | Passed | |
| 24 | +| `npm test` | Passed (26 tests) | |
| 25 | +| Installed tarball consumer | Passed | |
| 26 | +| `npm audit --audit-level=high` | Passed (0 vulnerabilities) | |
| 27 | + |
| 28 | +## Decisions |
| 29 | + |
| 30 | +- Registry model IDs are the public execution identifiers; upstream model IDs remain adapter concerns. |
| 31 | +- Adapter clients are injected so credentials remain owned by the host application. |
| 32 | +- Observability hooks are isolated from execution success/failure. |
| 33 | +- Raw provider responses remain optional while standard outputs are always available. |
| 34 | + |
| 35 | +## Risks |
| 36 | + |
| 37 | +- Vendor-specific async video providers still need dedicated adapters or endpoint/result normalization callbacks. |
| 38 | +- Version 0.2.0 remains pre-1.0 and may evolve as real host applications integrate it. |
| 39 | + |
| 40 | +## Next |
| 41 | + |
| 42 | +Integrate 0.2.0 into a host application, collect provider fixtures, and add provider-specific adapters based on real demand. |
0 commit comments