@kumwe/studio-protocol 0.1.0-alpha.5 → 0.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -6
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/dist/generated/schema-models.d.ts +2750 -0
- package/dist/generated/schema-models.d.ts.map +1 -0
- package/dist/generated/schema-models.js +1 -0
- package/dist/guards.d.ts +4 -1
- package/dist/guards.d.ts.map +1 -1
- package/dist/guards.js +1 -332
- package/dist/host-failure.d.ts +16 -0
- package/dist/host-failure.d.ts.map +1 -0
- package/dist/host-failure.js +1 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/release.d.ts +8 -0
- package/dist/release.d.ts.map +1 -0
- package/dist/release.js +1 -0
- package/dist/schemas.d.ts +25 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +1 -93
- package/dist/types.d.ts +447 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -3
- package/package.json +7 -3
- package/schemas/authoring-http-vector.schema.json +195 -0
- package/schemas/authoring-http.schema.json +505 -0
- package/schemas/authoring-message-catalog.schema.json +45 -0
- package/schemas/authoring-save.schema.json +188 -0
- package/schemas/authoring-session.schema.json +151 -0
- package/schemas/authoring-target.schema.json +160 -0
- package/schemas/authoring-web-vector.schema.json +236 -0
- package/schemas/binding-projection-vector.schema.json +127 -0
- package/schemas/block-definition.schema.json +10 -1
- package/schemas/common.schema.json +45 -0
- package/schemas/host-error.schema.json +22 -1
- package/schemas/host-operations.schema.json +16 -0
- package/schemas/host-sequence-vector.schema.json +342 -0
- package/schemas/host-vector.schema.json +2 -0
- package/schemas/manifest.json +120 -11
- package/schemas/plugin-manifest.schema.json +1 -0
- package/schemas/preview-message.schema.json +44 -12
- package/schemas/preview-vector.schema.json +52 -0
- package/schemas/renderer-web-vector.schema.json +273 -0
- package/schemas/reusable-content-type.schema.json +99 -0
- package/schemas/rich-text-projection.schema.json +12 -3
- package/schemas/rich-text.schema.json +156 -7
- package/schemas/schema-profile-vector.schema.json +133 -0
- package/schemas/schema-profile.schema.json +47 -7
- package/schemas/studio-browser-assets.schema.json +376 -0
- package/schemas/studio-chart.schema.json +35 -0
- package/schemas/studio-config.schema.json +1 -33
- package/schemas/studio-deployment.schema.json +347 -0
- package/schemas/studio-drawing.schema.json +44 -0
- package/schemas/studio-money.schema.json +16 -0
- package/schemas/studio-presentation.schema.json +31 -0
- package/schemas/studio-release.schema.json +125 -0
- package/schemas/studio-table.schema.json +27 -0
- package/studio-release.json +35 -0
- package/dist/guards.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/schemas.js.map +0 -1
- package/dist/types.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,22 +1,88 @@
|
|
|
1
1
|
# `@kumwe/studio-protocol`
|
|
2
2
|
|
|
3
|
-
Status: pre-Gate-A
|
|
3
|
+
Status: governed beta development, still pre-Gate-A and not production-supported. The exact coordinated
|
|
4
|
+
version is in the workspace `studio-release.json`; these draft contracts may change and are not a supported
|
|
5
|
+
protocol.
|
|
4
6
|
|
|
5
7
|
Serializable contracts shared by Studio hosts, renderers, extensions, and non-JavaScript clients.
|
|
6
8
|
The package deliberately contains no DOM or framework dependency. JSON Schemas are published under
|
|
7
9
|
the `schemas` export for authoritative validation outside TypeScript.
|
|
8
10
|
|
|
9
11
|
The initial contract covers blueprints, block definitions, design profiles, host capabilities,
|
|
10
|
-
commands and canonical command vectors, preview messages, host port errors, media asset
|
|
12
|
+
commands and canonical command vectors, preview messages and identity vectors, host port errors, media asset
|
|
11
13
|
projections, persisted media references, media upload sessions, portable rich text, plugin
|
|
12
14
|
manifests, and entries. `MediaAsset` describes host-owned library state; the smaller
|
|
13
15
|
`MediaReference` is the portable value stored in an artifact. Consumers validate the document's
|
|
14
16
|
`contractVersion` and separately negotiate the SemVer wire `protocolVersion`; neither value may be
|
|
15
17
|
inferred from the other or from the `/studio/v1/` schema epoch URI.
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
The package exports deterministic schema-generated `Generated*` models for all 55 Version 2 protocol schema
|
|
20
|
+
roots and their 253 top-level reusable `$defs` definitions. `GeneratedProtocolModelMap` binds each schema
|
|
21
|
+
filename to its root model, `GENERATED_PROTOCOL_SCHEMA_FILES` exposes the complete checked registry, and
|
|
22
|
+
`GENERATED_TYPESCRIPT_MODEL_METADATA` records generator name/version, schema-manifest digest, schema epoch,
|
|
23
|
+
document contract revision, and supported wire-protocol range. Regenerate with
|
|
24
|
+
`npm run protocol:models:generate`; `npm run protocol:models:check` fails on byte drift.
|
|
25
|
+
|
|
26
|
+
Generated models are structural compile-time conveniences, not validators. Callers validate untrusted input
|
|
27
|
+
against the matching exported JSON Schema before using `roundTripGeneratedProtocolModel`; JSON Schema and
|
|
28
|
+
the normative contracts remain authoritative for patterns, numeric/string and maximum array bounds, exact
|
|
29
|
+
object closure, integer-ness, uniqueness, conditionals, dependencies, and `oneOf` exclusivity. The generator
|
|
30
|
+
models `minItems`, `prefixItems`, and open additional members; it fails closed if a canonical schema introduces
|
|
31
|
+
`patternProperties`. Object and array keywords receive a narrower structural projection only when the schema
|
|
32
|
+
declares the corresponding `type`; without it, scalar instances remain valid under JSON Schema and the generated
|
|
33
|
+
projection deliberately stays broad. The handwritten protocol interfaces remain the ergonomic runtime/port API
|
|
34
|
+
and may not widen the generated wire shape.
|
|
35
|
+
|
|
36
|
+
The test lane directly assigns every manifest-listed applicable positive corpus literal to its exact
|
|
37
|
+
filename-specific generated root except the two maximum-JSON-depth schema-profile vectors. Those vectors are an
|
|
38
|
+
explicit TypeScript 6 `TS2321` compiler-depth boundary, not a cast: the boundary test requires that diagnostic,
|
|
39
|
+
and the runtime lane schema-validates and round-trips the complete manifest-derived inventory.
|
|
40
|
+
|
|
41
|
+
The contextual authoring foundation is canonical protocol, not a shell-local convention. It exports the
|
|
42
|
+
bounded `AuthoringTargetDeclaration`, host-owned `ReusableContentTypeDefinition`, full
|
|
43
|
+
`AuthoringSessionSnapshot`, exact Model/Blueprint/Entry coordinates, explicit save intent/plan/result documents,
|
|
44
|
+
and the three distinct commit requests. `HostAdapter.authoring` adds resource-bound target resolution, type
|
|
45
|
+
listing, session start, save planning, and explicit item/new-version/new-type operations without changing the
|
|
46
|
+
legacy artifact port. A contextual start returns complete separately identified documents; reusable types never
|
|
47
|
+
carry Entry values.
|
|
48
|
+
|
|
49
|
+
The typed composition API covers all six canonical contribution payload families. Manifest `block`
|
|
50
|
+
declarations map to `BlockDefinition` documents whose discriminator is `block-definition`; patterns, design
|
|
51
|
+
vocabulary, migrations, inspectors, and field adapters retain matching discriminators. `InspectorContribution`
|
|
52
|
+
and `FieldAdapterContribution` are declarative data types only—execution remains a negotiated host capability.
|
|
53
|
+
|
|
54
|
+
The authoring message-catalog schema defines versioned locale bundles with closed message entries,
|
|
55
|
+
default text, and explicit named parameters. The canonical English shell catalog is published by
|
|
56
|
+
`@kumwe/studio` and replayed as a byte-identical testkit fixture.
|
|
57
|
+
|
|
58
|
+
Beyond document shapes, the package projects the host adapter surface (`HostAdapter` and its ten
|
|
18
59
|
typed ports sharing one request envelope), the stable host error taxonomy with the
|
|
19
|
-
`isHostPortError` guard, the
|
|
20
|
-
`
|
|
21
|
-
|
|
60
|
+
`isHostPortError` guard, and the JavaScript `HostPortFailure` rejection wrapper with its
|
|
61
|
+
`isHostPortFailure` guard. A stale generation remains `invalid-request` and is distinguished by the
|
|
62
|
+
stable `studio.host/stale-session-generation` diagnostic, also exported as
|
|
63
|
+
`STUDIO_STALE_SESSION_GENERATION_DIAGNOSTIC_CODE`, allowing a composed session to invalidate the
|
|
64
|
+
complete handle without treating every invalid request as stale. The package also projects the
|
|
65
|
+
extension lifecycle state vocabulary and preview guards for the message, rendered inventory, and
|
|
66
|
+
canonical marker grammar. Preview draft.2 closes its message discriminator,
|
|
67
|
+
requires artifact/revision/digest plus session-unique render-attempt correlation, and applies the same
|
|
68
|
+
safe local-name and 240–10000 pixel viewport bounds in schema and runtime guards.
|
|
69
|
+
`schemas/manifest.json` records its own generator version, the schema epoch, document contract revision, and
|
|
70
|
+
the file, canonical `$id`, and sha256 digest of every published schema. The generated TypeScript metadata
|
|
71
|
+
records the digest of those exact manifest bytes, so consumers can identify the corpus it was built against.
|
|
22
72
|
Canonical command vectors and the negative-fixture corpus ship through `@kumwe/studio-testkit`.
|
|
73
|
+
The protocol package also exports the single-exchange and ordered host-vector schemas. The sequence
|
|
74
|
+
schema fixes the idempotency scope/preimage and its deterministic clock/render control steps; the
|
|
75
|
+
portable corpora and runner-neutral digest manifest ship through the testkit. The published
|
|
76
|
+
`authoring-web-vector` schema similarly carries semantic keyboard, pointer and explicit-control lanes
|
|
77
|
+
without selectors or component-library types; its target profile remains unclaimed until the full
|
|
78
|
+
browser and accessibility matrix is reproduced.
|
|
79
|
+
|
|
80
|
+
Canonical production values include chart, drawing, exact-decimal money, text-only tables, and the closed Studio
|
|
81
|
+
presentation intent. The latter carries semantic alignment, sizing, spacing, position, print,
|
|
82
|
+
scrolling, marker, motion, and responsive-visibility choices without carrying CSS or JavaScript.
|
|
83
|
+
|
|
84
|
+
`@kumwe/studio-protocol/studio-release.json` is a byte-identical copy of the canonical workspace
|
|
85
|
+
release record. It binds the exact fixed eight-package family to the wire protocol and testkit corpus
|
|
86
|
+
digest. The publication guard requires all eight versions to equal its `release` coordinate. The abandoned
|
|
87
|
+
historical `0.1.0-rc.1` record listed nine proposed profile claims; it was not accepted evidence or a
|
|
88
|
+
production-support claim. The current beta record deliberately claims none.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
<!-- Generated by scripts/generate-third-party-notices.mjs. Do not edit by hand. -->
|
|
4
|
+
|
|
5
|
+
Package: `@kumwe/studio-protocol`
|
|
6
|
+
|
|
7
|
+
Production closure SHA-256: `4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945`
|
|
8
|
+
|
|
9
|
+
This package has no third-party runtime dependencies.
|