Plugin Structure
Plugin Structure protocol schemas
ObjectStack Plugin Structure Standards (OPS)
Formal Zod definitions for the Plugin Directory Structure and File Naming conventions.
This can be used by the CLI or IDE extensions to lint project structure.
@see PLUGIN_STANDARDS.md
Source: packages/spec/src/kernel/plugin-structure.zod.ts
TypeScript Usage
import { OpsDomainModule, OpsFilePath, OpsPluginStructure } from '@objectstack/spec/kernel';
import type { OpsDomainModule, OpsFilePath, OpsPluginStructure } from '@objectstack/spec/kernel';
// Validate data
const result = OpsDomainModule.parse(data);OpsDomainModule
Scanned domain module representing a plugin folder
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Module name (snake_case) |
| files | string[] | ✅ | List of files in this module |
| metadata | Record<string, any> | optional | Custom metadata key-value pairs for extensibility |
OpsPluginStructure
Full plugin project layout validated against OPS conventions
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| root | string | ✅ | Root directory path of the plugin project |
| files | string[] | ✅ | List of all file paths relative to root |
| metadata | Record<string, any> | optional | Custom metadata key-value pairs for extensibility |