|
15 | 15 | - [Render SVG and Mermaid artifacts through the React preview runtime](../specs/2026-08-22-studio-react-document-artifacts.md) |
16 | 16 | - [Keep Walnut bootstrap receipts portable across platforms](../specs/2026-08-21-walnut-cross-platform-paths.md) |
17 | 17 | - [Implement external Artifact providers in Harness Studio](../specs/2026-08-22-studio-external-artifact-provider-runtime.md) |
| 18 | + - [Extract the Artifact provider SDK and prove it with Structurizr](../specs/2026-08-22-artifact-provider-sdk-and-structurizr.md) |
18 | 19 |
|
19 | 20 | ## Context |
20 | 21 |
|
@@ -175,12 +176,16 @@ type ArtifactSurfaceBinding = |
175 | 176 | | { kind: "unavailable"; reason: string }; |
176 | 177 | ``` |
177 | 178 |
|
178 | | -All TypeScript shapes in this ADR are conceptual ownership contracts until a |
179 | | -dated implementation spec freezes their internal names and validators; they are |
180 | | -not a new public package API. The current V2 catalog may continue to project |
181 | | -them through `backing`, `build`, and `renderer`. A later wire-format revision is |
182 | | -justified only when a client needs information that cannot be represented |
183 | | -safely and additively. |
| 179 | +The host-neutral descriptor, snapshot, source-entry, adapter, surface, and |
| 180 | +external Provider shapes are a public package API under |
| 181 | +`@qoder-ai/harness/artifacts`. Studio keeps compatibility re-exports while the |
| 182 | +core subpath is their sole source owner. React views, catalog discovery and |
| 183 | +classification, HTTP routes, activation storage, provider selection, compile |
| 184 | +execution, CSP, and iframe hosting stay in `@qoder-ai/harness-studio`; they are |
| 185 | +not SDK abstractions. The current V2 catalog continues to project the public |
| 186 | +contract through `backing`, `build`, and `renderer`. A later wire-format |
| 187 | +revision is justified only when a client needs information that cannot be |
| 188 | +represented safely and additively. |
184 | 189 |
|
185 | 190 | The V2 compatibility projection is explicit: |
186 | 191 |
|
@@ -253,6 +258,13 @@ executes the selected contribution and enforces project, dependency, time, and |
253 | 258 | output bounds. Adding an SVG-like virtual document edits the build-runtime |
254 | 259 | composition, not the compiler implementation. |
255 | 260 |
|
| 261 | +Numeric compile limits are Studio host policy. An embedder may lower them or |
| 262 | +raise them within Studio-owned hard ceilings; the effective policy participates |
| 263 | +in cache and build identity. Package permissions are not a numeric limit and |
| 264 | +remain owned by the selected trusted build-runtime contribution. A Provider |
| 265 | +that needs repository libraries performs a declared adapter transform instead |
| 266 | +of granting artifact-authored source arbitrary workspace imports. |
| 267 | + |
256 | 268 | Build and snapshot identities include the source revision, adapter or build |
257 | 269 | runtime id and version, schema version, and any external provider fingerprint |
258 | 270 | that can affect output. Cache hits therefore cannot cross a meaningful runtime |
@@ -550,24 +562,26 @@ must show that compare or replay is unavailable. |
550 | 562 |
|
551 | 563 | ### Keep ownership narrow and discoverable |
552 | 564 |
|
553 | | -Current source ownership remains: |
| 565 | +Current source ownership is: |
554 | 566 |
|
555 | 567 | | Concern | Owner | |
556 | 568 | | --- | --- | |
557 | | -| Browser-safe catalog, descriptor, snapshot, and build protocols | `packages/harness-studio/src/artifact-model.ts` | |
| 569 | +| Host-neutral descriptor, snapshot, source-entry, adapter, surface, and Provider contracts | `packages/harness/src/artifacts/`, published as `@qoder-ai/harness/artifacts` | |
| 570 | +| Browser-safe compatibility re-export | `packages/harness-studio/src/artifact-model.ts` | |
558 | 571 | | Directory discovery, classification, revision hashing, and catalog projection | `packages/harness-studio/src/server/artifact-catalog.ts` | |
559 | | -| Adapter/build/plugin contracts and ordered server selection | `packages/harness-studio/src/server/artifact-adapter-contract.ts` and `artifact-plugin-registry.ts` | |
| 572 | +| Ordered server selection, receipt verification, activation, and embedded Provider injection | `packages/harness-studio/src/server/artifact-plugin-registry.ts`, `artifact-provider-discovery.ts`, and `artifact-provider-activation.ts` | |
560 | 573 | | Format parsing and semantic projection | Format-owned adapter modules such as `pptx-artifact-adapter.ts` and `markdown-artifact-adapter.ts` | |
561 | 574 | | Studio compile/build lifecycle | `artifact-build-runtimes.ts` and `artifact-compile-runtime.ts` | |
562 | 575 | | Browser renderer composition | `packages/harness-studio/src/app/ArtifactView.tsx` | |
563 | 576 | | Opaque-origin Studio preview lifecycle | `packages/harness-studio/src/app/ArtifactPreviewHost.tsx` | |
564 | 577 | | External acquisition and verification | Provider-owned server modules, currently `packages/harness-studio/src/server/artifact-viewers.ts`, `qoder-canvas-viewer-bridge.ts`, and `walnut-bootstrap.ts` | |
565 | 578 |
|
566 | | -The first external-provider implementation spec will choose the exact module |
567 | | -split. It must move vendor translation and execution behind a provider-owned |
568 | | -boundary rather than creating a global service locator. Core catalog, common |
569 | | -server routes, and browser mounting must not gain another vendor branch when a |
570 | | -provider is added. |
| 579 | +External-provider implementations keep vendor translation and execution behind |
| 580 | +a provider-owned boundary rather than creating a global service locator. An |
| 581 | +embedding application supplies installed Providers explicitly to server |
| 582 | +startup; activation still binds one contribution, fingerprint, lane, matcher, |
| 583 | +adapter profile, and surface profile. Core catalog, common server routes, and |
| 584 | +browser mounting do not gain another vendor branch when a provider is added. |
571 | 585 |
|
572 | 586 | After that migration, `artifact-plugin-registry.ts` is the server composition |
573 | 587 | root: a `createArtifactPluginRegistry({ builtIns, externalProviders })`-shaped |
|
0 commit comments