ObjectStackObjectStack

Package Version

Package Version protocol schemas

Package Version Protocol

A package version is an immutable release snapshot of a package.

Once published (status = 'published'), its manifestJson and checksum

fields are frozen — publishing is the act of sealing the snapshot.

Lifecycle:

draft → published → deprecated

Installing a package means pointing a sys_package_installation row at a

specific sys_package_version UUID. Upgrading swaps that pointer atomically.

See docs/adr/0003-package-as-first-class-citizen.md for the full rationale.

Source: packages/spec/src/cloud/package-version.zod.ts

TypeScript Usage

import { CreatePackageVersionRequest, PackageManifest, PackageVersion, PackageVersionStatus, PublishPackageVersionRequest, UpdatePackageVersionRequest } from '@objectstack/spec/cloud';
import type { CreatePackageVersionRequest, PackageManifest, PackageVersion, PackageVersionStatus, PublishPackageVersionRequest, UpdatePackageVersionRequest } from '@objectstack/spec/cloud';

// Validate data
const result = CreatePackageVersionRequest.parse(data);

CreatePackageVersionRequest

Create a new draft package version

Properties

PropertyTypeRequiredDescription
packageIdstringParent package UUID
versionstringSemantic version string
manifestJsonstringInitial manifest JSON (can be updated while draft)
releaseNotesstringoptional
isPreReleasebooleanoptional
createdBystringUser ID creating this version

PackageManifest

Package manifest snapshot embedded in a package version

Properties

PropertyTypeRequiredDescription
idstringPackage manifest ID (reverse-domain)
versionstringSemver version string (e.g. 1.2.3)
namestringDisplay name
descriptionstringoptionalShort description
scopeEnum<'platform' | 'environment'>Package scope
minPlatformVersionstringoptionalMinimum required platform version (semver)
dependenciesObject[]Package dependencies
metadataTypesstring[]Metadata types provided by this package
migrationsstring[]Migration script identifiers (ordered)
configurationSchemaRecord<string, any>optionalJSON Schema for per-installation configuration properties
metadataRecord<string, any>optionalExtension metadata

PackageVersion

Properties

PropertyTypeRequiredDescription
idstringUUID of the package version (stable, never reused)
packageIdstringUUID of the parent sys_package row
versionstringSemantic version string
statusEnum<'draft' | 'published' | 'deprecated'>Package version lifecycle status
manifestJsonstringJSON-serialized package manifest (frozen on publish)
checksumstringoptionalSHA-256 hex digest of manifestJson
releaseNotesstringoptionalRelease notes for this version (markdown)
minPlatformVersionstringoptionalMinimum required platform version (denormalized from manifest)
isPreReleasebooleanWhether this is a pre-release version
publishedAtstringoptionalPublish timestamp (ISO-8601)
publishedBystringoptionalUser ID who published this version
createdAtstringCreation timestamp (ISO-8601)
updatedAtstringLast update timestamp (ISO-8601)
createdBystringUser ID that created this version

PackageVersionStatus

Package version lifecycle status

Allowed Values

  • draft
  • published
  • deprecated

PublishPackageVersionRequest

Publish a draft version — seals manifestJson and checksum

Properties

PropertyTypeRequiredDescription
publishedBystringUser ID publishing this version

UpdatePackageVersionRequest

Update a draft package version (only while status is draft)

Properties

PropertyTypeRequiredDescription
manifestJsonstringoptionalUpdated manifest JSON
releaseNotesstringoptional
isPreReleasebooleanoptional

On this page