Skip to content

Commit c063734

Browse files
fix(metadata): a skill the platform registers keeps its own slot beside an app's same-named skill (#37021)
<!-- claude-projects-attribution: {"github_login":"os-warren"} --> _Requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8VxWpZoGVso4DL2WGJUUUeV)_ Fixes #37013 Part of #37130 Clause-②: yes (widening) Metadata-protocol: added Skills-docs: none — no skills/ page names `_provenance` or its values, and the new value is one no author writes: the artifact door refuses it ## 维护者速读 - 平台自带的技能和应用里同名的技能以后各存一份、互不覆盖:应用装上不会顶掉平台那份,平台启动或撤回时也不会改写或删掉应用那份;重启、集群其他节点读回来也是两份。 - 属于云端问数加载应用技能这条线,是云端那张卡需要的平台这一半。 - 出错的话最多是同名技能里某一份没被读到,不碰业务数据,可直接撤回。 - 本 PR 带了 ADR-0150 D4 和 ADR-0010 §3.5 的修订说明,属受治理改动(Tier H):由维护者合并,或经维护者批准后合并。 ## Governed This PR touches `docs/adr/**` and is governed (Tier H): it is landed by the maintainer, or after the maintainer's approval. Surface: `packages/spec/src/**` (one enum value, describes, comments), `content/docs/references/**` (generated), `packages/metadata/src/**`, `packages/metadata-protocol/src/**` (the save and restore doors, the boot census), `ui/packages/data-objectstack/src/metadata-client.ts`, `docs/adr/**` (two amendment notes), `.changeset/**`. ## What changes The metadata store keyed a package-less write under a name one package held as that package's customization (ADR-0150 D4), let a package's first item take over the name's bare slot, and let a removal naming no package take every slot of a one-holder name. A skill the platform's own code registers at boot is package-less, so it and an app's same-named skill overwrote each other in both directions. This gives the platform's record a marked slot of its own. The mark (`_provenance: 'platform'`) is a store-slot marker only, and it has one place on an item: the item's own top-level `_provenance` key. A key of that name nested in the body (an authored `metadata` record, for one) is the author's data, never the mark. **Write and removal.** - `MetadataManager.register(type, name, data, { origin: 'platform' })` stamps the body `_provenance: 'platform'` and fills the name's bare slot whatever packages hold the name, in the registry and in `sys_metadata` (`slottedWriteKey`, shared by `storeWriteKey` and `storeRowWriteKey`). - A package's first item never takes over a bare slot holding the platform's record. `DatabaseLoader` reads the stamp off the stored row's body, and for a bundled type (`email_template`) off the written member's row. The environment's own item in the bare slot is still taken over, as before. - A package-less environment write under a platform name keeps today's rule (card item 3 as amended): it takes the bare slot without the stamp, and the platform's next registration restores its record. - On a host that declares a package id, the boot pass leaves the platform's stored record without the host's package, for every type (`unstampedStoredRow`). - `MetadataManager.unregister(type, name, { origin: 'platform' })` takes only the record the platform registered (`storePlatformRemovalKeys`), for every type, carried to every loader (`MetadataLoaderDeleteOptions.platformOnly`; `DatabaseLoader` and `MemoryLoader` check each stored body) and every cluster peer (`ClusterMetadataRemoval.platformOnly`, dropped when malformed). A package's item of the name and the environment's own item stay, and nothing is refused however many packages hold the name. **Reads and the readers that rebuild the store.** - `MetadataManager.getPlatformItem(type, name)` reads the platform's record only: never a package's item, never the environment's own. - The plural read (`pluralEntryKeys`, behind `loadMany` and `loadManyKeyed`) gives the platform's entry a key of its own beside a one-holder name, so the boot pass is handed both rows. - `list`'s loader admission (`admitLoaderSlots`): the platform's record shadows, and is shadowed by, the platform's record only. - A read naming a package is never answered from the platform's record (`readIdentity`): the registry's platform slot defers to the loaders, where the package's item may be stored. - For `action`, a package-less registry slot the platform's registration stamped is the platform's (`platformSlotsOf`) whether or not a loader stores it, as an unstored one already was (#32560). - Reads naming no package keep their rules (card item 4). **Where the stamp can enter (card item 1 as sharpened).** It is set only by `register` with the option. One definition of where it lives (`carriesPlatformStamp`, `isPlatformOrigin`, `withoutPlatformOrigin`, exported by `@objectstack/metadata`) is read by the store, the artifact door, and the metadata protocol's restore doors and boot census, so each refuses or strips it exactly where the store would read it. Every other write strips or refuses it: - `register` without the option strips it. A stored row the boot pass re-registers keeps it only when the `datasource:` row held it as read (`storedPlatformRows`, recorded in `loadMany`), never because its caller set it after the read. - `registerInMemory`, `save` and `rollback` strip it. A `rollback` whose row is the platform's own record is refused, `409 RESOURCE_CONFLICT` naming the fix, with nothing written: only the platform's registration writes that record. - The metadata protocol's save door strips it: its strip of derived provenance keys (#16702) already removes the item's own top-level `_provenance`, the one place the mark lives. Its restore doors (`rollbackMetaItem`, `revertCommit`'s restore limb, through one body writer) write a history version back without it. - The metadata protocol's two undo writes, of a refused batch publish's landed promotions (`undoLandedPromotions`) and of a failed batch row write (`undoBatchRowWrite`), put a row back as the same operation found it, byte for byte: the mark comes back only where the row held it before that operation. - A body served from any loader other than a `datasource:` one (`file:`, `memory:`) is served without it (`servedLoaderBody`, at every loader read of the manager). - `getPublished` serves it on the answer's top level only when the stored item carries it there, and never inside a publish snapshot (`withoutServedPlatformMarks`). - The artifact door refuses an item that carries it, with or without a manifest id: `VALIDATION_ERROR` / 400 at `_provenance`, naming the fix (`artifactItemPlatformStampRefusal`). - A body that names a package is that package's item, whatever `_provenance` it carries (`isPlatformOrigin`). Class-level options, as `MetadataUnregisterOptions.packageId` already is: the spec's `MetadataWriteOptions` is not widened. **Spec.** `MetadataProvenanceSchema` (`packages/spec/src/kernel/metadata-protection.zod.ts`) gains `'platform'`, so the stamp is a declared value of the `_provenance` envelope key every schema spreads and survives a parse. Describe strings and comments updated; `content/docs/references/**` regenerated by `gen:docs` (44 reference pages, one enum cell each). **Metadata protocol.** Besides its doors above, its boot census `metadata_sealed_overlay_unserved` does not name the platform's own row beside a package that ships the name. Its other readers read the same rows by ADR-0150 D4 and ADR-0131 D6, unchanged. **UI.** `ui/packages/data-objectstack/src/metadata-client.ts` types the layered read's `provenance` from the spec's `MetadataProvenance`, so it accepts the new value and cannot trail the enum again. **Declaration and level.** `_provenance` is on the authorable surface (`authorable-surface.base.json`), and `SkillSchema` now accepts a value it refused, so by AGENTS.md's Post-Task Checklist step 3 the kind is `added`. The kind sets the level: `minor` on the four packages the diff moves (`@objectstack/spec`, `@objectstack/metadata`, `@objectstack/metadata-protocol`, `@object-ui/data-objectstack`). `Clause-②: yes (widening)` stands: nothing an author could write before is refused now (the artifact door's strict parse refused the value before this PR, and the door refuses it now). The authorable key set is unchanged. The consumer (cloud#4935) passes `{ origin: 'platform' }` from its boot registration and withdrawal. ## Tests - `packages/metadata/src/package-slotted-store.test.ts` (10 cases): the write, takeover, removal and read rules over the registry store, and copy semantics of stamp/strip; CONTROL: the environment's bare item is still taken over and D4 still folds a package-less write. - `packages/metadata/src/loaders/database-loader.test.ts`, first #37013 describe (9 cases): one per Acceptance line, registry plus `DatabaseLoader` over the shared mock driver, a primed restart included. - Same file, second #37013 describe (11 cases), from the stored rows and at every seam: platform, package, then platform again, read by a process primed from the rows (`get` naming the package, `getPlatformItem`, `list`, `loadMany`); a node whose registry holds nothing of the name, with the door's loader ahead of the rows and after them; a read naming the package beside the registry's platform slot; `registerInMemory`; `save`; a row given the stamp by its caller after the read; a `file:` loader's and a `memory:` loader's stamped body; the platform's withdrawal beside the door's package copy; `MemoryLoader.delete` with `platformOnly`; a type outside the by-package set (registry, cold node, an in-memory-only item, the door's copy; CONTROL: the platform's own record is withdrawn). - Same file: `action` (the platform's stored record named as the platform in a refusal beside two packages); `email_template` (the environment's `fr-FR`, then the platform's `en-US`, then a package's first `en-US`: the platform's row stays and a cold read finds it). - `packages/metadata/src/metadata-manager-cluster.test.ts` (3 cases): a peer drops the platform's record and keeps the package's, in its registry (an in-memory-only item included) and its door; for a type outside the by-package set, a peer keeps another writer's item held in memory alone; a removal whose platform scope is not `true` is dropped and deletes nothing, with a door that holds the platform's copy beside the package's. - `packages/metadata/src/plugin-artifact-platform-stamp.test.ts` (5 cases): the artifact door refuses the value with and without a manifest id, and on a view container, before storing anything; a connector whose authored `metadata` record carries the value is stored as authored and is not the platform's record; CONTROL: no provenance or the package's is stored. - `packages/metadata/src/loaders/database-loader.test.ts`, third #37013 describe (19 cases): the value inside a connector's authored `metadata` record is never the platform's record, at the stored row, at the platform's withdrawal and at `register`; `rollback` to a version the platform registered writes it back without the mark; a rollback whose row is the platform's own record is refused 409 with nothing written, for a skill beside a package's item (a primed read naming the package still answers the package's item) and for a view; `getPublished` of a skill whose snapshot carries the value, of a connector whose authored `metadata` record carries it, and of a snapshot nested in the platform's record's snapshot serves it without the value; CONTROL: the platform's own record is served with it; a host that declares a package id withdraws the platform's view after a restart; `getPlatformItem` of a type outside the by-package set answers the platform's row only; every site that serves a loader's body (`list` over a keyed and a plain loader, `get`/`load`/`getPlatformItem`, `loadManyKeyed` of both type kinds over both loader kinds) serves it without the value. - `packages/metadata-protocol/src/protocol.platform-mark-rollback.test.ts` (3 cases): the save door stores a body that carried the value without it; `rollbackMetaItem` and `revertCommit`'s restore limb, to a history version that carries the value, store the body without it. - `packages/metadata-protocol/src/protocol.reads-environment-only.test.ts` (1 case added): the boot census does not name the platform's row beside a package that ships the name; a hook beside it is still named. - `packages/spec/src/ai/skill.test.ts`: a stored skill carrying `_provenance: 'platform'` parses; CONTROL: a value outside the enum is refused at `_provenance`. <details><summary>Ablations (each mutation landed on disk, the #37013 cases run, restored to HEAD)</summary> Cases red per ablation, measured at head `a49b8e71`: a metadata-side mutation over the #37013 cases of the four metadata test files above, a protocol-side one over the two metadata-protocol files. 42 ablations, every one red: | Ablated | Red | |:--|:--| | strip in `register` off | 3 | | boot exception read by loader, not by the row's stamp | 1 | | `registerInMemory` strip off | 1 | | `save` strip off | 1 | | `servedLoaderBody` returns the body as stored | 9 | | artifact door refusal off | 1 | | `readIdentity` answers a package read from the platform slot | 1 | | `admitLoaderSlots`: a loader's platform row shadowed by a package slot | 1 | | `admitLoaderSlots`: a platform slot shadows a loader's package item | 1 | | `pluralEntryKeys` folds the platform entry into the holder's | 1 | | `platformSlotsOf` ignores the stamp | 1 | | bundled row predicate reads the slot's first row | 1 | | non-slotted removal keys unfiltered | 2 | | `DatabaseLoader.delete` non-slotted row check off | 1 | | `MemoryLoader.delete` non-slotted check off | 1 | | `MemoryLoader.delete` slotted `platformOnly` branch off | 3 | | peer registry branch off | 2 | | `receivedRemovalOf` `platformOnly` line off | 3 | | `DatabaseLoader.delete` slotted row check always true | 2 | | the mark read at a place other than the item's own top-level key | 6 | | `rollback` strip off | 1 | | protocol restore strip off | 2 | | boot census names the platform's row | 1 | | boot pass stamps the host's package on the platform's row of a type outside the by-package set | 1 | | serve strip off at `loaderSlotEntries` | 1 | | serve strip off at `loaderEntries`, plural arm | 1 | | serve strip off at `loadDiagnosed` | 1 | | serve strip off at the keyed-slotted read, keyed arm | 1 | | serve strip off at the keyed-slotted read, list arm | 1 | | serve strip off at `admitKeyed`, keyed arm | 1 | | serve strip off at `admitKeyed`, list arm | 1 | | view container refusal off | 1 | | peer branch for by-package types only | 1 | | `getPlatformItem` of a type outside the by-package set unchecked | 2 | | a malformed platform scope read as `true` | 1 | | serve strip off at `loaderSlotsNamed` | 1 | | serve strip off at `loadMany` | 1 | | `getPublished` strip off | 3 | | `getPublished` snapshot strip off | 1 | | `getPublished` keeps no top-level mark | 1 | | refusal of a rollback whose row is the platform's record off | 2 | | `_provenance` dropped from the save door's derived-provenance keys | 1 | </details> ## Acceptance notes - A read naming a package that holds no slot no longer falls back to the platform's record: the platform's record is never a package's item. It still falls back to the environment's own item (D3), unchanged. - The realtime `deleted` event of a platform withdrawal names the type and name with no package, as a removal by name does; only the cluster payload carries `platformOnly`. - ADR-0150 D4 and ADR-0010 §3.5 carry dated amendment notes for this change (ADR-0150's cites cloud ADR-0118, merged as `e738843b`), so the recorded rules and the code agree (Prime Directive 13). ## Verification Read first: 1. `packages/metadata/src/package-slotted-store.ts`: `carriesPlatformStamp` (the mark's one place), `slottedWriteKey` (the two platform branches), the platform helpers above `isPackageCaller`, `readIdentity`, `pluralEntryKeys`, `platformSlotsOf`. 2. `packages/metadata/src/metadata-manager.ts`: the stamp/strip in `register` and `rollback`, `storedPlatformRows` and `servedLoaderBody`, `registerInMemory`, `save`, `admitLoaderSlots`, the platform branch in `unregisterAt`, `getPlatformItem`, the peer branch. 3. `packages/metadata/src/loaders/database-loader.ts`: the row predicate in `slottedSaveTarget` and the `platformOnly` deletes; `memory-loader.ts` delete. 4. `packages/metadata/src/plugin.ts`: `artifactItemPlatformStampRefusal` and `unstampedStoredRow`. 5. `packages/spec/src/kernel/metadata-protection.zod.ts`: the one enum value. 6. `docs/adr/0150-…md` (end of D4) and `docs/adr/0010-metadata-protection-model.md` (§3.5): the two amendment notes. 7. `packages/metadata-protocol/src/protocol-package-bindings.ts` (`stripDerivedProvenance`), `protocol-authoring-gate.ts` (`restoredBodyWriter`), `protocol-diff-delete-load.ts` (the boot census): the three protocol sites. Two-minute check: `pnpm --filter @objectstack/metadata exec vitest run src/loaders/database-loader.test.ts -t 37013` → 42 passed. ## Local runs (head `a49b8e71`, `main` merged at `f588898c`) - `@objectstack/metadata`: `tsc --noEmit` exit 0; `vitest run` 83 files, 2698 passed. `database-loader.test.ts -t 37013` 42 passed. - `@objectstack/metadata-protocol`: `tsc --noEmit` exit 0. Its source change this round is the removal of one redundant line (the save door's derived-provenance strip already removes the key), with its two #37013 files green; its full suite ran at `34a193c6`: 23391 passed, 45 skipped. - `ui/packages/data-objectstack`: `tsc --noEmit` reports no error in `metadata-client.ts`. - Derived gates (`dispatch-gates --commands`, 133 commands, derived at the head): every one exit 0. The spec `.d.ts`-reading gates and `check:generated` were re-run against a dist `check:generated --fix` built at the head: exit 0, no file regenerated. NOT MEASURED locally, exit 3, left to CI: `check-plugin-teardown-shape --self-test` (shallow clone). - Correction to an earlier body: the merge of `main` under head `b934aafc` has second parent `bfd1049f22`, not `8e4ac50d4`. --- _Generated by [Claude Code](https://claude.ai/code/session_01JQwxbXCpczENRnUvAvzGDD)_ <!-- signed: repo:objectstack#1 · os-warren · session_01JQwxbXCpczENRnUvAvzGDD --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a1b26ff commit c063734

68 files changed

Lines changed: 1600 additions & 134 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/metadata': minor
4+
'@object-ui/data-objectstack': minor
5+
'@objectstack/metadata-protocol': minor
6+
---
7+
8+
fix(metadata): a skill the platform registers keeps its own slot beside an app's skill of the same name
9+
10+
Clause-②: yes (widening)
11+
Metadata-protocol: added
12+
Skills-docs: none — no skills/ page names `_provenance` or its values, and the new value is one no author writes: the artifact door refuses it
13+
14+
`MetadataProvenanceSchema` (`@objectstack/spec/kernel`) gains `'platform'`: the `_provenance` of a record the platform's own code registers at boot. It is a store-slot marker only, read at the item's own top-level `_provenance` key and nowhere else, and only the metadata service sets it.
15+
16+
For every type stored per `(package, name)` (`skill`, `agent`, `tool` and the rest of `PACKAGE_SLOTTED_STORE_TYPES`), the platform's built-in record and a package's item of the same name no longer overwrite each other, in memory, in `sys_metadata`, and on a process or cluster peer that reads them back from the rows.
17+
18+
- `MetadataManager.register(type, name, data, { origin: 'platform' })` marks a record the platform's own code registers: the body is stamped `_provenance: 'platform'` and the record fills the name's bare slot, in memory and in `sys_metadata`. Before, a package-less write under a name one package held was folded into that package's slot as its customization, so the platform's boot registration rewrote the app's skill.
19+
- A package's first item of a name no longer takes over the bare slot when the platform's record is in it; the two stay side by side. For a bundled type (`email_template`) the row judged is the written member's. The environment's own item in the bare slot is still taken over, as before.
20+
- A package-less environment write under a platform name keeps today's rule: it takes the bare slot without the stamp, and the platform's next registration restores its record.
21+
- The readers that rebuild the store from loaders and rows keep both records: the plural read (`loadMany`, `loadManyKeyed`) gives the platform's entry a key of its own, `list` keeps a loader's platform row beside a package's slot and a loader's package item beside a platform slot, and a read naming a package is never answered from the platform's record.
22+
- `MetadataManager.unregister(type, name, { origin: 'platform' })` withdraws the platform's record only, from the registry, every loader (`MetadataLoaderDeleteOptions.platformOnly`) and every cluster peer. A package's item of the name and the environment's own item are never taken, for any type, and nothing is refused however many packages hold the name. Before, a removal naming no package took every slot of a name one package held. On a host that declares a package id, the boot pass leaves the platform's stored record without the host's package, for every type, so the withdrawal takes the registry's copy too.
23+
- `MetadataManager.getPlatformItem(type, name)` reads the platform's record only, never a package's item and never the environment's own.
24+
- No other write carries the platform stamp. `register` without `origin: 'platform'`, `registerInMemory`, `save` and `rollback` store the body without it, and so do the metadata protocol's save door and its restore doors (`rollbackMetaItem` and the restore limb of `revertCommit`); a stored row the boot pass re-registers keeps it only when the row held it as read. `rollback` whose row is the platform's own record is refused (`409 RESOURCE_CONFLICT`, naming the fix), with nothing written. The metadata protocol's two undo writes, of a refused batch publish's landed promotions and of a failed batch row write, put a row back as the same operation found it, byte for byte, so the mark comes back only where the row held it. A body served from a loader other than a `datasource:` one is served without it; `getPublished` serves it on the answer's top level only when the stored item carries it there, and never inside a publish snapshot; and the artifact door refuses an item that carries it, with or without a manifest id (`VALIDATION_ERROR` at `_provenance`, naming the fix). A `_provenance` key nested in the body (an authored `metadata` record, for one) is the author's data: it is kept as written and never read as the mark. A body that names a package is that package's item, whatever `_provenance` it carries.
25+
- `@objectstack/metadata` exports the mark's one definition (`PLATFORM_PROVENANCE`, `carriesPlatformStamp`, `isPlatformOrigin`, `withoutPlatformOrigin`); the artifact door and the metadata protocol's doors read it.
26+
- `@objectstack/metadata-protocol`: the boot census `metadata_sealed_overlay_unserved` no longer names the platform's own row beside a package that ships the name, nor prescribes deleting it.
27+
- Reads naming no package, and every removal and write without the option, keep their rules.
28+
- Public API added on `MetadataManager`: the `origin` option of `MetadataRegisterOptions` and `MetadataUnregisterOptions`, and `getPlatformItem`. The spec's `MetadataWriteOptions` is not widened.
29+
- `@object-ui/data-objectstack`: the layered read's `provenance` is typed from the spec's `MetadataProvenance`, so it accepts `'platform'`.
30+
31+
Callers that register built-ins at boot pass `{ origin: 'platform' }` to `register` and `unregister` to get this behaviour; without it, a write is treated as before.

‎content/docs/references/ai/agent.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const result = AIModelConfigSchema.parse(data);
6363
| **_lock** | `Enum<'none' \| 'no-overlay' \| 'no-delete' \| 'full'>` | optional | Item-level lock — controls overlay & delete (ADR-0010). |
6464
| **_lockReason** | `string` | optional | Human-readable reason shown when a write is refused by _lock. |
6565
| **_lockSource** | `Enum<'artifact' \| 'package' \| 'env-forced'>` | optional | Layer that set _lock (artifact \| package \| env-forced). |
66-
| **_provenance** | `Enum<'package' \| 'org' \| 'env-forced'>` | optional | Origin of the item (package \| org \| env-forced). |
66+
| **_provenance** | `Enum<'package' \| 'org' \| 'env-forced' \| 'platform'>` | optional | Origin of the item (package \| org \| env-forced \| platform). |
6767
| **_packageId** | `string` | optional | Owning package machine id. |
6868
| **_packageVersion** | `string` | optional | Owning package version. |
6969
| **_lockDocsUrl** | `string` | optional | Optional documentation link surfaced next to _lockReason. |

‎content/docs/references/ai/skill.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const result = SkillSchema.parse(data);
4646
| **_lock** | `Enum<'none' \| 'no-overlay' \| 'no-delete' \| 'full'>` | optional | Item-level lock — controls overlay & delete (ADR-0010). |
4747
| **_lockReason** | `string` | optional | Human-readable reason shown when a write is refused by _lock. |
4848
| **_lockSource** | `Enum<'artifact' \| 'package' \| 'env-forced'>` | optional | Layer that set _lock (artifact \| package \| env-forced). |
49-
| **_provenance** | `Enum<'package' \| 'org' \| 'env-forced'>` | optional | Origin of the item (package \| org \| env-forced). |
49+
| **_provenance** | `Enum<'package' \| 'org' \| 'env-forced' \| 'platform'>` | optional | Origin of the item (package \| org \| env-forced \| platform). |
5050
| **_packageId** | `string` | optional | Owning package machine id. |
5151
| **_packageVersion** | `string` | optional | Owning package version. |
5252
| **_lockDocsUrl** | `string` | optional | Optional documentation link surfaced next to _lockReason. |

‎content/docs/references/ai/tool.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ AI tool definition. [READ-ONLY PROJECTION — not an execution entry point] Auth
4040
| **_lock** | `Enum<'none' \| 'no-overlay' \| 'no-delete' \| 'full'>` | optional | Item-level lock — controls overlay & delete (ADR-0010). |
4141
| **_lockReason** | `string` | optional | Human-readable reason shown when a write is refused by _lock. |
4242
| **_lockSource** | `Enum<'artifact' \| 'package' \| 'env-forced'>` | optional | Layer that set _lock (artifact \| package \| env-forced). |
43-
| **_provenance** | `Enum<'package' \| 'org' \| 'env-forced'>` | optional | Origin of the item (package \| org \| env-forced). |
43+
| **_provenance** | `Enum<'package' \| 'org' \| 'env-forced' \| 'platform'>` | optional | Origin of the item (package \| org \| env-forced \| platform). |
4444
| **_packageId** | `string` | optional | Owning package machine id. |
4545
| **_packageVersion** | `string` | optional | Owning package version. |
4646
| **_lockDocsUrl** | `string` | optional | Optional documentation link surfaced next to _lockReason. |

‎content/docs/references/api/app-bundle.mdx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const result = AppMetadataBundleResponseSchema.parse(data);
9191
| **lockReason** | `string` | optional | Human-readable explanation shown next to a refused write. Present only when the resolved item declares `_lockReason`. |
9292
| **lockSource** | `Enum<'artifact' \| 'package' \| 'env-forced'>` | optional | Which layer asserted the lock. Present only when the resolved item declares `_lockSource`. |
9393
| **lockDocsUrl** | `string` | optional | Documentation link surfaced beside `lockReason`. Present only when the resolved item declares `_lockDocsUrl`. |
94-
| **provenance** | `Enum<'package' \| 'org' \| 'env-forced'>` | optional | Where the item came from (package \| org \| env-forced). Present only when the resolved item declares `_provenance`. |
94+
| **provenance** | `Enum<'package' \| 'org' \| 'env-forced' \| 'platform'>` | optional | Where the item came from (package \| org \| env-forced \| platform). Present only when the resolved item declares `_provenance`. |
9595
| **packageId** | `string` | optional | Owning package machine id. Present only when the resolved item declares `_packageId`. |
9696
| **packageVersion** | `string` | optional | Owning package version. Present only when the resolved item declares `_packageVersion`. |
9797
| **editable** | `boolean` | optional | Whether an overlay write is permitted — false iff `lock` is `no-overlay` or `full`. A derived verdict: do not recompute it from `lock` client-side. |
@@ -115,7 +115,7 @@ const result = AppMetadataBundleResponseSchema.parse(data);
115115
| **lockReason** | `string` | optional | Human-readable explanation shown next to a refused write. Present only when the resolved item declares `_lockReason`. |
116116
| **lockSource** | `Enum<'artifact' \| 'package' \| 'env-forced'>` | optional | Which layer asserted the lock. Present only when the resolved item declares `_lockSource`. |
117117
| **lockDocsUrl** | `string` | optional | Documentation link surfaced beside `lockReason`. Present only when the resolved item declares `_lockDocsUrl`. |
118-
| **provenance** | `Enum<'package' \| 'org' \| 'env-forced'>` | optional | Where the item came from (package \| org \| env-forced). Present only when the resolved item declares `_provenance`. |
118+
| **provenance** | `Enum<'package' \| 'org' \| 'env-forced' \| 'platform'>` | optional | Where the item came from (package \| org \| env-forced \| platform). Present only when the resolved item declares `_provenance`. |
119119
| **packageId** | `string` | optional | Owning package machine id. Present only when the resolved item declares `_packageId`. |
120120
| **packageVersion** | `string` | optional | Owning package version. Present only when the resolved item declares `_packageVersion`. |
121121
| **editable** | `boolean` | optional | Whether an overlay write is permitted — false iff `lock` is `no-overlay` or `full`. A derived verdict: do not recompute it from `lock` client-side. |
@@ -139,7 +139,7 @@ const result = AppMetadataBundleResponseSchema.parse(data);
139139
| **lockReason** | `string` | optional | Human-readable explanation shown next to a refused write. Present only when the resolved item declares `_lockReason`. |
140140
| **lockSource** | `Enum<'artifact' \| 'package' \| 'env-forced'>` | optional | Which layer asserted the lock. Present only when the resolved item declares `_lockSource`. |
141141
| **lockDocsUrl** | `string` | optional | Documentation link surfaced beside `lockReason`. Present only when the resolved item declares `_lockDocsUrl`. |
142-
| **provenance** | `Enum<'package' \| 'org' \| 'env-forced'>` | optional | Where the item came from (package \| org \| env-forced). Present only when the resolved item declares `_provenance`. |
142+
| **provenance** | `Enum<'package' \| 'org' \| 'env-forced' \| 'platform'>` | optional | Where the item came from (package \| org \| env-forced \| platform). Present only when the resolved item declares `_provenance`. |
143143
| **packageId** | `string` | optional | Owning package machine id. Present only when the resolved item declares `_packageId`. |
144144
| **packageVersion** | `string` | optional | Owning package version. Present only when the resolved item declares `_packageVersion`. |
145145
| **editable** | `boolean` | optional | Whether an overlay write is permitted — false iff `lock` is `no-overlay` or `full`. A derived verdict: do not recompute it from `lock` client-side. |
@@ -163,7 +163,7 @@ const result = AppMetadataBundleResponseSchema.parse(data);
163163
| **lockReason** | `string` | optional | Human-readable explanation shown next to a refused write. Present only when the resolved item declares `_lockReason`. |
164164
| **lockSource** | `Enum<'artifact' \| 'package' \| 'env-forced'>` | optional | Which layer asserted the lock. Present only when the resolved item declares `_lockSource`. |
165165
| **lockDocsUrl** | `string` | optional | Documentation link surfaced beside `lockReason`. Present only when the resolved item declares `_lockDocsUrl`. |
166-
| **provenance** | `Enum<'package' \| 'org' \| 'env-forced'>` | optional | Where the item came from (package \| org \| env-forced). Present only when the resolved item declares `_provenance`. |
166+
| **provenance** | `Enum<'package' \| 'org' \| 'env-forced' \| 'platform'>` | optional | Where the item came from (package \| org \| env-forced \| platform). Present only when the resolved item declares `_provenance`. |
167167
| **packageId** | `string` | optional | Owning package machine id. Present only when the resolved item declares `_packageId`. |
168168
| **packageVersion** | `string` | optional | Owning package version. Present only when the resolved item declares `_packageVersion`. |
169169
| **editable** | `boolean` | optional | Whether an overlay write is permitted — false iff `lock` is `no-overlay` or `full`. A derived verdict: do not recompute it from `lock` client-side. |
@@ -187,7 +187,7 @@ const result = AppMetadataBundleResponseSchema.parse(data);
187187
| **lockReason** | `string` | optional | Human-readable explanation shown next to a refused write. Present only when the resolved item declares `_lockReason`. |
188188
| **lockSource** | `Enum<'artifact' \| 'package' \| 'env-forced'>` | optional | Which layer asserted the lock. Present only when the resolved item declares `_lockSource`. |
189189
| **lockDocsUrl** | `string` | optional | Documentation link surfaced beside `lockReason`. Present only when the resolved item declares `_lockDocsUrl`. |
190-
| **provenance** | `Enum<'package' \| 'org' \| 'env-forced'>` | optional | Where the item came from (package \| org \| env-forced). Present only when the resolved item declares `_provenance`. |
190+
| **provenance** | `Enum<'package' \| 'org' \| 'env-forced' \| 'platform'>` | optional | Where the item came from (package \| org \| env-forced \| platform). Present only when the resolved item declares `_provenance`. |
191191
| **packageId** | `string` | optional | Owning package machine id. Present only when the resolved item declares `_packageId`. |
192192
| **packageVersion** | `string` | optional | Owning package version. Present only when the resolved item declares `_packageVersion`. |
193193
| **editable** | `boolean` | optional | Whether an overlay write is permitted — false iff `lock` is `no-overlay` or `full`. A derived verdict: do not recompute it from `lock` client-side. |

0 commit comments

Comments
 (0)