ObjectStackObjectStack

Startup Orchestrator

Startup Orchestrator protocol schemas

Startup Orchestrator Protocol

Zod schemas for plugin startup orchestration data structures.

These schemas align with the IStartupOrchestrator contract interface.

Following ObjectStack "Zod First" principle - all data structures

must have Zod schemas for runtime validation and JSON Schema generation.

Source: packages/spec/src/kernel/startup-orchestrator.zod.ts

TypeScript Usage

import { HealthStatus, PluginStartupResult, StartupOptions, StartupOrchestrationResult } from '@objectstack/spec/kernel';
import type { HealthStatus, PluginStartupResult, StartupOptions, StartupOrchestrationResult } from '@objectstack/spec/kernel';

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

HealthStatus

Properties

PropertyTypeRequiredDescription
healthybooleanWhether the plugin is healthy
timestampintegerUnix timestamp in milliseconds when health check was performed
detailsRecord<string, any>optionalOptional plugin-specific health details
messagestringoptionalError message if plugin is unhealthy

PluginStartupResult

Properties

PropertyTypeRequiredDescription
pluginRecord<string, any>Plugin metadata
successbooleanWhether the plugin started successfully
durationnumberTime taken to start the plugin in milliseconds
errorObjectoptionalSerializable error representation if startup failed
healthObjectoptionalHealth status after startup if health check was enabled

StartupOptions

Properties

PropertyTypeRequiredDescription
timeoutintegerMaximum time in milliseconds to wait for each plugin to start
rollbackOnFailurebooleanWhether to rollback already-started plugins if any plugin fails
healthCheckbooleanWhether to run health checks after plugin startup
parallelbooleanWhether to start plugins in parallel when dependencies allow
contextanyoptionalCustom context object to pass to plugin lifecycle methods

StartupOrchestrationResult

Properties

PropertyTypeRequiredDescription
resultsObject[]Startup results for each plugin
totalDurationnumberTotal time taken for all plugins in milliseconds
allSuccessfulbooleanWhether all plugins started successfully
rolledBackstring[]optionalNames of plugins that were rolled back

On this page