ObjectStackObjectStack

Cli Plugin Commands

Cli Plugin Commands protocol schemas

CLI Plugin Commands Protocol

Defines the input/output schemas for the os plugin CLI commands

that manage the package build → validate → publish lifecycle.

Commands


os plugin build      — Build a .tgz artifact from the current project

os plugin validate   — Validate an artifact's structure, checksums, and signature

os plugin publish    — Upload an artifact to the marketplace

Architecture Alignment

  • npm: npm packnpm publish

  • Helm: helm packagehelm push

  • VS Code: vsce packagevsce publish

  • Salesforce: sf package version createsf package version promote

Source: packages/spec/src/kernel/cli-plugin-commands.zod.ts

TypeScript Usage

import { PluginBuildOptions, PluginBuildResult, PluginPublishOptions, PluginPublishResult, PluginValidateOptions, PluginValidateResult, ValidationFinding, ValidationSeverityEnum } from '@objectstack/spec/kernel';
import type { PluginBuildOptions, PluginBuildResult, PluginPublishOptions, PluginPublishResult, PluginValidateOptions, PluginValidateResult, ValidationFinding, ValidationSeverityEnum } from '@objectstack/spec/kernel';

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

PluginBuildOptions

Options for the os plugin build command

Properties

PropertyTypeRequiredDescription
directorystringoptionalProject root directory (defaults to current working directory)
outDirstringoptionalOutput directory for the built artifact (defaults to ./dist)
formatEnum<'tgz' | 'zip'>Archive format for the artifact
signbooleanWhether to digitally sign the artifact
privateKeyPathstringoptionalPath to RSA/ECDSA private key file for signing
signAlgorithmEnum<'RSA-SHA256' | 'RSA-SHA384' | 'RSA-SHA512' | 'ECDSA-SHA256'>optionalSigning algorithm to use
checksumAlgorithmEnum<'sha256' | 'sha384' | 'sha512'>Hash algorithm for file checksums
includeDatabooleanWhether to include seed data in the artifact
includeLocalesbooleanWhether to include locale/translation files

PluginBuildResult

Result of the os plugin build command

Properties

PropertyTypeRequiredDescription
successbooleanWhether the build succeeded
artifactPathstringoptionalAbsolute path to the generated artifact file
artifactObjectoptionalArtifact metadata
fileCountintegeroptionalTotal number of files in the artifact
sizeintegeroptionalTotal artifact size in bytes
durationMsnumberoptionalBuild duration in milliseconds
errorMessagestringoptionalError message if build failed
warningsstring[]optionalWarnings emitted during build

PluginPublishOptions

Options for the os plugin publish command

Properties

PropertyTypeRequiredDescription
artifactPathstringPath to the artifact file to publish
registryUrlstringoptionalMarketplace API base URL
tokenstringoptionalAuthentication token for marketplace API
releaseNotesstringoptionalRelease notes for this version
preReleasebooleanWhether this is a pre-release version
skipValidationbooleanWhether to skip local validation before publish
accessEnum<'public' | 'restricted'>Package access level on the marketplace
tagsstring[]optionalTags for marketplace categorization

PluginPublishResult

Result of the os plugin publish command

Properties

PropertyTypeRequiredDescription
successbooleanWhether the publish succeeded
packageIdstringoptionalPublished package identifier
versionstringoptionalPublished version string
artifactUrlstringoptionalURL of the published artifact in the marketplace
sha256stringoptionalSHA256 checksum of the uploaded artifact
submissionIdstringoptionalMarketplace submission ID for review tracking
errorMessagestringoptionalError message if publish failed
messagestringoptionalHuman-readable status message

PluginValidateOptions

Options for the os plugin validate command

Properties

PropertyTypeRequiredDescription
artifactPathstringPath to the artifact file to validate
verifySignaturebooleanWhether to verify the digital signature
publicKeyPathstringoptionalPath to the public key for signature verification
verifyChecksumsbooleanWhether to verify checksums of all files
validateMetadatabooleanWhether to validate metadata against schemas
platformVersionstringoptionalPlatform version for compatibility verification

PluginValidateResult

Result of the os plugin validate command

Properties

PropertyTypeRequiredDescription
validbooleanWhether the artifact passed validation
artifactObjectoptionalExtracted artifact metadata
checksumVerificationObjectoptionalChecksum verification result
signatureVerificationObjectoptionalSignature verification result
platformCompatibilityObjectoptionalPlatform compatibility check result
findingsObject[]All validation findings
summaryObjectoptionalFinding counts by severity

ValidationFinding

A single validation finding

Properties

PropertyTypeRequiredDescription
severityEnum<'error' | 'warning' | 'info'>Issue severity level
rulestringValidation rule identifier
messagestringHuman-readable finding description
pathstringoptionalRelative file path within the artifact

ValidationSeverityEnum

Validation issue severity

Allowed Values

  • error
  • warning
  • info

On this page