66 lines
2.3 KiB
Markdown
66 lines
2.3 KiB
Markdown
# Asset Lifecycle
|
|
|
|
> **Contracts only.**
|
|
> Registry: [asset-registry.md](asset-registry.md)
|
|
> Contract version: `asset-lifecycle.v1`
|
|
|
|
---
|
|
|
|
## 1. Lifecycle states
|
|
|
|
| State | Meaning |
|
|
| --- | --- |
|
|
| `draft` | Editable; not generally installable |
|
|
| `review` | Submitted for commercial/content review |
|
|
| `published` | Generally available per visibility/policies |
|
|
| `deprecated` | Discouraged for new installs; existing may continue |
|
|
| `archived` | Retained for history; not installable |
|
|
| `deleted` | Soft-deleted / tombstoned (hard delete is operational policy) |
|
|
| `versioned` | Marker that a new version exists / versioning in progress *(also a versioning event)* |
|
|
| `cloned` | Derived from another asset (see lineage) |
|
|
| `installed` | Tenant/workspace installation record exists |
|
|
| `shared` | Shared within org / partner scope |
|
|
| `marketplace_ready` | Eligible for marketplace listing (no marketplace engine implied) |
|
|
|
|
States may combine with orthogonal flags (e.g. `published` + `marketplace_ready`). Primary `lifecycle_state` on AssetDefinition is the governance state (`draft`…`deleted`); installation/sharing/marketplace readiness MAY also appear as boolean/status fields on marketplace declaration and install records.
|
|
|
|
---
|
|
|
|
## 2. Logical transitions (normative intent)
|
|
|
|
```
|
|
draft → review → published → deprecated → archived → deleted
|
|
↘ marketplace_ready (flag)
|
|
published → cloned → draft (new asset)
|
|
published → installed / shared (tenant-scoped records)
|
|
any → versioned (new AssetVersion)
|
|
```
|
|
|
|
Invalid transitions are rejected by future engines; this document does not implement them.
|
|
|
|
---
|
|
|
|
## 3. AssetInstallRecord (logical)
|
|
|
|
| Field | Meaning |
|
|
| --- | --- |
|
|
| `registry_object_id` | Install record id |
|
|
| `asset_id` | Asset `registry_object_id` |
|
|
| `tenant_id` | |
|
|
| `workspace_id` | Optional |
|
|
| `version_code` | Installed version |
|
|
| `source` | `catalog` \| `clone` \| `share` \| `marketplace` \| `admin` |
|
|
| `status` | `installed` \| `removed` |
|
|
| `installed_at` | |
|
|
|
|
---
|
|
|
|
## 4. Lineage
|
|
|
|
| Field | Meaning |
|
|
| --- | --- |
|
|
| `cloned_from_asset_id` | Parent asset |
|
|
| `cloned_from_version_code` | |
|
|
|
|
Cloning creates a **new** asset with its own `registry_object_id` and typically `draft` state.
|