Commit 9165d5c
fix(spec): declare the assembled manifest stage on the package read API (#17517)
* wip(spec): declare the assembled manifest stage on the installed-package row
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Co-authored-by: Claude <noreply@anthropic.com>
* wip(spec): keep the read-API record body JSON-Schema representable
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Co-authored-by: Claude <noreply@anthropic.com>
* feat(spec): declare the assembled manifest stage on the package read API
`GET /packages` and `GET /packages/:id` serve the row a package was
installed with, and two stages reach that table through declared doors:
`POST /packages` installs an authoring manifest (`objects` = glob
patterns) and a `defineStack()` host installs the assembled body
(`objects` = object definitions). Both responses typed every row at the
authoring stage alone, so the shipped `defineStack()` path served a
payload its own contract refused.
Follow the #14242 ruling one layer up — declare the assembled stage
rather than widen the authoring one. `@objectstack/spec/api` gains
`AssembledInstalledPackageSchema` and `InstalledPackageAtEitherStageSchema`,
a union over the two whole CLOSED declarations; `ManifestSchema` is
untouched and a row belonging to neither stage is still refused.
Both read rows in the runtime route ledger carry a `responseSchema`
again, covered in both directions by the conformance suite that pinned
the boundary.
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Co-authored-by: Claude <noreply@anthropic.com>
* chore(spec): regenerate api-surface, export-origins, declaration-map, docs
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Co-authored-by: Claude <noreply@anthropic.com>
* fix(spec): give `./api` a browser export condition
The package read API's assembled-stage declaration made
`src/api/index.ts` reach the driver-config validators
(`package-api.zod.ts` -> `stack.zod` -> `data/datasource.zod` ->
`driver/config-registry.zod` -> `postgres.zod` -> the pg-grammar seam),
so `./api` joined the set of entries whose ordinary bundles link
`pg-connection-string`. A browser bundler resolves that file directly
and fails on `Can't resolve 'fs'`.
Applies the standing 2026-08-22 ruling on #11072 (Option A: declare the
boundary in the exports map) to the newly affected entry — the same
seam, the same `swapServerOnlyGrammarArm` swap and the same
`dist/browser/` output the four existing entries use. No second
mechanism, and the four existing entries are untouched.
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Co-authored-by: Claude <noreply@anthropic.com>
* fix(runtime): strip tracker ids from the /packages route-ledger notes
`check:doc-authoring` refuses internal issue ids in runtime string prose:
a `note:` reaches authors, operators and generated surfaces, none of whom
can resolve `#NNNN`. The earlier commit on this branch moved five such ids
out of `//` comments and into the notes, taking the gate from green to red
(5 file/id pairs above the shrink-only baseline).
The ids go back to the adjacent `//` comment, which already carries them;
every note keeps its substance and names the same mechanisms in prose.
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Co-authored-by: Claude <noreply@anthropic.com>
* docs(changeset): record the `./api` browser export condition
The exports map is published surface: browser consumers of
`@objectstack/spec/api` now resolve a different build, and the postgres
`url` refinement degrades there to its shape-only checks. Say so where
the release notes will read it.
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Co-authored-by: Claude <noreply@anthropic.com>
* docs(changeset): state what the stage union does and does not buy statically
The changeset told consumers they "see a union at `manifest` and narrow at the
point of use". Measured against the built `.d.ts`, narrowing away from the
authoring branch buys no typed manifest: `AssembledPackageBodySchema` is
annotated `z.ZodType<Record<string, unknown>, …>` in `stack.zod.ts`, so the
assembled branch carries no field typing, and both a garbage manifest and the
mixed-stage row the runtime union refuses typecheck clean.
Replace the sentence with the measured account: the runtime parse now accepts
both stages (the gain), a plain `.manifest.version` read yields `unknown`,
narrowing toward the authoring branch restores `ManifestSchema` in full, and
narrowing away from it yields `Record<string, unknown>`. The opacity is
inherited from `stack.zod.ts` and untouched here. No code, schema, exports map
or ledger row changes.
Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH
Co-authored-by: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0aa88eb commit 9165d5c
16 files changed
Lines changed: 798 additions & 61 deletions
File tree
- .changeset
- content/docs/references
- api
- packages
- runtime/src
- domains
- spec
- api-surface
- authorable-defaults
- authorable-surface
- declaration-map
- export-origins
- json-schema.manifest
- src/api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments