diff --git a/README.md b/README.md index 4d1265699..f8a09733b 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ ObjectStack is a metadata-driven platform built on three foundational protocols: - [Quick Start Examples](./examples/) - CRM, Todo, and plugin examples - **Protocol References:** - - [Protocol Reference](./content/docs/references/) - All 70 protocol specifications + - [Protocol Reference](./content/docs/references/) - All 109 protocol specifications - [ObjectQL](./content/docs/objectql/) - Data layer documentation - [ObjectUI](./content/docs/objectui/) - UI layer documentation - [ObjectOS](./content/docs/objectos/) - System layer documentation diff --git a/content/docs/references/index.mdx b/content/docs/references/index.mdx index cd495737b..f12bbfd6b 100644 --- a/content/docs/references/index.mdx +++ b/content/docs/references/index.mdx @@ -1,6 +1,6 @@ --- title: Protocol Reference -description: Complete reference of all 70 ObjectStack protocol specifications +description: Complete reference of all 109 ObjectStack protocol specifications --- # Protocol Reference @@ -11,26 +11,27 @@ This is the complete reference for all protocol specifications in the ObjectStac | Module | Protocols | Description | | :--- | :---: | :--- | -| [Data Protocol](#data-protocol) | 8 | Core business logic and data modeling (ObjectQL) | +| [Data Protocol](#data-protocol) | 16 | Core business logic and data modeling (ObjectQL) | | [UI Protocol](#ui-protocol) | 10 | User interface definitions and interactions (ObjectUI) | -| [System Protocol](#system-protocol) | 14 | Runtime environment and platform capabilities (ObjectOS) | -| [AI Protocol](#ai-protocol) | 8 | AI/ML integration and agent orchestration | -| [API Protocol](#api-protocol) | 6 | Standardized API contracts and communication | +| [System Protocol](#system-protocol) | 39 | Runtime environment and platform capabilities (ObjectOS) | +| [AI Protocol](#ai-protocol) | 9 | AI/ML integration and agent orchestration | +| [API Protocol](#api-protocol) | 13 | Standardized API contracts and communication | | [Automation Protocol](#automation-protocol) | 7 | Workflow automation and integration | | [Auth Protocol](#auth-protocol) | 6 | Identity, authentication, and authorization | | [Permission Protocol](#permission-protocol) | 4 | Access control and security policies | -| [Hub Protocol](#hub-protocol) | 5 | Marketplace and multi-tenancy | -| [Shared Protocol](#shared-protocol) | 1 | Common utilities and identifiers | +| [Hub Protocol](#hub-protocol) | 6 | Marketplace and multi-tenancy | +| [Integration Protocol](#integration-protocol) | 5 | External system connectors and adapters | +| [Shared Protocol](#shared-protocol) | 3 | Common utilities and identifiers | | [Stack Protocol](#stack-protocol) | 1 | Root stack definition | -**Total: 70 protocols** +**Total: 109 protocols** --- ## Data Protocol (ObjectQL) **Location:** `packages/spec/src/data/` -**Count:** 8 protocols +**Count:** 16 protocols Defines the "Shape of Data" and business logic. @@ -44,6 +45,14 @@ Defines the "Shape of Data" and business logic. | `dataset.zod.ts` | `DatasetSchema` | Dataset definitions for reporting and analytics | | `mapping.zod.ts` | `FieldMappingSchema` | Field mapping configurations for data transformation | | `hook.zod.ts` | `HookSchema` | Lifecycle hooks (before/after insert, update, delete) | +| `data-engine.zod.ts` | `DataEngineSchema` | Data engine configuration and capabilities | +| `driver.zod.ts` | `DriverSchema` | Generic database driver interface and capabilities | +| `driver-sql.zod.ts` | `SQLDriverSchema` | SQL-specific driver configuration | +| `driver-nosql.zod.ts` | `NoSQLDriverSchema` | NoSQL-specific driver configuration | +| `document.zod.ts` | `DocumentSchema` | Document-oriented data structures | +| `external-lookup.zod.ts` | `ExternalLookupSchema` | External data source lookup configurations | +| `driver/postgres.zod.ts` | `PostgresConfigSchema` | PostgreSQL driver configuration | +| `driver/mongo.zod.ts` | `MongoConfigSchema` | MongoDB driver configuration | **Key Features:** - 44 field types including AI/ML vectors and GPS locations @@ -88,7 +97,7 @@ Defines the "Shape of Interaction" for rendering interfaces. ## System Protocol (ObjectOS) **Location:** `packages/spec/src/system/` -**Count:** 14 protocols +**Count:** 39 protocols Defines the "Runtime Environment" and platform capabilities. @@ -96,18 +105,32 @@ Defines the "Runtime Environment" and platform capabilities. | :--- | :--- | :--- | | `manifest.zod.ts` | `ManifestSchema` | Application/plugin manifest (`objectstack.config.ts`) with 7 package types | | `datasource.zod.ts` | `DatasourceSchema` | Data source connection configurations | -| `driver.zod.ts` | `DriverSchema` | Database driver definitions and options | -| `driver/postgres.zod.ts` | `PostgresConfigSchema` | PostgreSQL-specific driver configuration | -| `driver/mongo.zod.ts` | `MongoConfigSchema` | MongoDB-specific driver configuration | -| `plugin.zod.ts` | `PluginSchema` | Plugin lifecycle and interface definitions | | `context.zod.ts` | `KernelContextSchema` | Kernel execution context with user, org, tenant info | +| `plugin.zod.ts` | `PluginSchema` | Plugin lifecycle and interface definitions | +| `plugin-capability.zod.ts` | `PluginCapabilitySchema` | Plugin capability declarations | +| `plugin-lifecycle-events.zod.ts` | `PluginLifecycleEventsSchema` | Plugin lifecycle event definitions | +| `plugin-validator.zod.ts` | `PluginValidatorSchema` | Plugin validation rules | +| `startup-orchestrator.zod.ts` | `StartupOrchestratorSchema` | System startup orchestration | +| `service-registry.zod.ts` | `ServiceRegistrySchema` | Service discovery and registration | | `events.zod.ts` | `EventSchema` | Event bus and pub/sub patterns | | `job.zod.ts` | `JobSchema` | Background job scheduling (cron, interval, delayed) | | `audit.zod.ts` | `AuditEventSchema` | Audit logging for compliance | -| `logger.zod.ts` | `LoggerConfigSchema` | Structured logging configuration | +| `logging.zod.ts` | `LoggingSchema` | Structured logging configuration | +| `metrics.zod.ts` | `MetricsSchema` | Application metrics and monitoring | +| `tracing.zod.ts` | `TracingSchema` | Distributed tracing configuration | | `translation.zod.ts` | `TranslationSchema` | i18n/l10n support | | `feature.zod.ts` | `FeatureFlagSchema` | Feature flag definitions | -| `scoped-storage.zod.ts` | `ScopedStorageSchema` | Scoped key-value storage | +| `cache.zod.ts` | `CacheSchema` | Caching layer configuration | +| `object-storage.zod.ts` | `ObjectStorageSchema` | Object storage configuration | +| `message-queue.zod.ts` | `MessageQueueSchema` | Message queue integration | +| `search-engine.zod.ts` | `SearchEngineSchema` | Full-text search configuration | +| `encryption.zod.ts` | `EncryptionSchema` | Encryption and key management | +| `compliance.zod.ts` | `ComplianceSchema` | Compliance and regulatory controls | +| `masking.zod.ts` | `MaskingSchema` | Data masking rules | +| `notification.zod.ts` | `NotificationSchema` | Notification service configuration | +| `change-management.zod.ts` | `ChangeManagementSchema` | Change tracking and deployment | +| `collaboration.zod.ts` | `CollaborationSchema` | Real-time collaboration features | +| `http-server.zod.ts` | `HTTPServerSchema` | HTTP server configuration | **Package Types:** - `app` - Business application package @@ -125,13 +148,14 @@ Defines the "Runtime Environment" and platform capabilities. ## AI Protocol **Location:** `packages/spec/src/ai/` -**Count:** 8 protocols +**Count:** 9 protocols Defines AI agent integration capabilities. | File | Schema | Purpose | | :--- | :--- | :--- | | `agent.zod.ts` | `AgentSchema` | AI agent definitions and configurations | +| `agent-action.zod.ts` | `AgentActionSchema` | Actions that agents can perform | | `model-registry.zod.ts` | `ModelRegistrySchema` | LLM registry and selection | | `rag-pipeline.zod.ts` | `RAGPipelineSchema` | Retrieval-augmented generation | | `nlq.zod.ts` | `NLQSchema` | Natural language query processing (NL to ObjectQL) | @@ -147,7 +171,7 @@ Defines AI agent integration capabilities. ## API Protocol **Location:** `packages/spec/src/api/` -**Count:** 6 protocols +**Count:** 13 protocols Defines standardized API contracts. @@ -157,13 +181,81 @@ Defines standardized API contracts. | `endpoint.zod.ts` | `EndpointSchema` | REST endpoint definitions with rate limiting | | `router.zod.ts` | `RouterSchema` | API routing configuration | | `odata.zod.ts` | `ODataSchema` | OData query protocol support | +| `graphql.zod.ts` | `GraphQLSchema` | GraphQL API configuration | | `realtime.zod.ts` | `RealtimeSchema` | WebSocket/SSE real-time subscriptions | +| `websocket.zod.ts` | `WebSocketSchema` | WebSocket protocol configuration | | `discovery.zod.ts` | `DiscoverySchema` | API discovery and introspection | +| `batch.zod.ts` | `BatchSchema` | Batch API request processing | +| `http-cache.zod.ts` | `HTTPCacheSchema` | HTTP caching strategies | +| `errors.zod.ts` | `ErrorSchema` | Standardized error responses | +| `view-storage.zod.ts` | `ViewStorageSchema` | View state persistence | +| `protocol.zod.ts` | `ProtocolSchema` | API protocol definitions | +| `rest-server.zod.ts` | `RESTServerSchema` | REST server configuration | **Learn more:** [API Protocol Reference](/docs/references/api) --- +## Automation Protocol + +**Location:** `packages/spec/src/automation/` +**Count:** 7 protocols + +Defines workflow automation and business process management. + +| File | Schema | Purpose | +| :--- | :--- | :--- | +| `workflow.zod.ts` | `WorkflowSchema` | State machine and approval processes | +| `flow.zod.ts` | `FlowSchema` | Visual logic orchestration (autolaunched, screen, schedule) | +| `approval.zod.ts` | `ApprovalSchema` | Approval process configuration | +| `webhook.zod.ts` | `WebhookSchema` | Webhook definitions and handlers | +| `etl.zod.ts` | `ETLSchema` | Extract, transform, load pipelines | +| `trigger-registry.zod.ts` | `TriggerRegistrySchema` | Event-driven automation triggers | +| `sync.zod.ts` | `SyncSchema` | Data synchronization configurations | + +**Learn more:** [Automation Protocol Reference](/docs/references/automation) + +--- + +## Hub Protocol + +**Location:** `packages/spec/src/hub/` +**Count:** 6 protocols + +Defines marketplace and multi-tenancy capabilities. + +| File | Schema | Purpose | +| :--- | :--- | :--- | +| `marketplace.zod.ts` | `MarketplaceSchema` | Plugin marketplace configuration | +| `plugin-registry.zod.ts` | `PluginRegistrySchema` | Plugin registry and versioning | +| `composer.zod.ts` | `ComposerSchema` | Application composition tools | +| `space.zod.ts` | `SpaceSchema` | Workspace and environment management | +| `tenant.zod.ts` | `TenantSchema` | Multi-tenancy configuration | +| `license.zod.ts` | `LicenseSchema` | Licensing and entitlement management | + +**Learn more:** [Hub Protocol Reference](/docs/references/hub) + +--- + +## Integration Protocol + +**Location:** `packages/spec/src/integration/` +**Count:** 5 protocols + +Defines external system connectors and adapters. + +| File | Schema | Purpose | +| :--- | :--- | :--- | +| `connector.zod.ts` | `ConnectorSchema` | Generic connector interface | +| `connector/saas.zod.ts` | `SaaSConnectorSchema` | SaaS platform connectors (Salesforce, HubSpot, etc.) | +| `connector/database.zod.ts` | `DatabaseConnectorSchema` | Database connection adapters | +| `connector/file-storage.zod.ts` | `FileStorageConnectorSchema` | Cloud storage connectors (S3, Azure Blob, etc.) | +| `connector/message-queue.zod.ts` | `MessageQueueConnectorSchema` | Message queue integrations (RabbitMQ, Kafka, etc.) | + +**Learn more:** [Integration Protocol Reference](/docs/references/integration) + +--- + ## Recent Additions (2026-01-27) **ObjectQL Advanced Features:** diff --git a/content/docs/references/meta.json b/content/docs/references/meta.json index 577f212af..154d7fd6a 100644 --- a/content/docs/references/meta.json +++ b/content/docs/references/meta.json @@ -1,6 +1,7 @@ { "title": "Protocol Reference", "pages": [ + "packages", "data", "ui", "automation", @@ -8,6 +9,10 @@ "permission", "ai", "api", - "driver" + "driver", + "hub", + "integration", + "auth", + "shared" ] } \ No newline at end of file diff --git a/content/docs/references/packages.mdx b/content/docs/references/packages.mdx new file mode 100644 index 000000000..83ef743d7 --- /dev/null +++ b/content/docs/references/packages.mdx @@ -0,0 +1,349 @@ +--- +title: Package Reference +description: Complete reference of all ObjectStack packages in the monorepo +--- + +# Package Reference + +ObjectStack is distributed as a monorepo containing **12 packages** organized into core packages and plugins. + +## Package Overview + +| Category | Count | Description | +| :--- | :---: | :--- | +| [Core Packages](#core-packages) | 9 | Essential runtime, protocols, and client SDKs | +| [Plugin Packages](#plugin-packages) | 3 | Drivers and adapters for extending ObjectStack | + +**Total: 12 packages** + +--- + +## Core Packages + +### @objectstack/spec + +**Description:** ObjectStack Protocol & Specification - TypeScript Interfaces, JSON Schemas, and Convention Configurations + +**Purpose:** The foundational package containing all protocol definitions and schemas. This is the "DNA" of ObjectStack. + +**Key Exports:** +- `Data` - Data protocol schemas (Field, Object, Query, etc.) +- `UI` - UI protocol schemas (View, App, Dashboard, etc.) +- `System` - System protocol schemas (Manifest, Plugin, Events, etc.) +- `AI` - AI protocol schemas (Agent, RAG Pipeline, etc.) +- `API` - API protocol schemas (Contract, Endpoint, etc.) +- `Automation` - Automation protocol schemas (Flow, Workflow, etc.) +- `Auth` - Authentication protocol schemas +- `Permission` - Permission protocol schemas +- `Hub` - Hub protocol schemas +- `Integration` - Integration protocol schemas +- `Shared` - Shared utilities and identifiers + +**Protocol Count:** 109 Zod schemas + +**Learn more:** [Protocol Reference](/docs/references) + +--- + +### @objectstack/core + +**Description:** Microkernel Core for ObjectStack + +**Purpose:** Provides the runtime foundation for ObjectStack, including the plugin system, service registry, and logging infrastructure. + +**Key Features:** +- Plugin lifecycle management +- Service registry for dependency injection +- Structured logging system +- Event bus for inter-plugin communication +- Startup orchestration + +**Use Cases:** +- Building custom ObjectStack runtimes +- Creating plugin-based architectures +- Implementing microkernel patterns + +--- + +### @objectstack/runtime + +**Description:** ObjectStack Core Runtime & Query Engine + +**Purpose:** The main runtime engine that executes ObjectQL queries and manages data operations. + +**Key Features:** +- Query execution engine +- Data operation handlers (CRUD) +- Runtime context management +- Transaction support +- Driver orchestration + +**Use Cases:** +- Running ObjectStack applications +- Executing data queries +- Managing database operations + +--- + +### @objectstack/objectql + +**Description:** Isomorphic ObjectQL Engine for ObjectStack + +**Purpose:** Standalone ObjectQL query engine that can run in any JavaScript environment (Node.js, browsers, edge). + +**Key Features:** +- Isomorphic query execution (client and server) +- ObjectQL AST parsing and compilation +- Query optimization +- Driver-agnostic query interface + +**Use Cases:** +- Client-side data querying +- Edge function data access +- Serverless query execution + +--- + +### @objectstack/client + +**Description:** Official Client SDK for ObjectStack Protocol + +**Purpose:** Type-safe client library for interacting with ObjectStack APIs. + +**Key Features:** +- Type-safe API methods +- Query builder interface +- Authentication handling +- Request/response transformation +- Error handling + +**Use Cases:** +- Building frontend applications +- Consuming ObjectStack APIs +- Type-safe data fetching + +--- + +### @objectstack/client-react + +**Description:** React hooks for ObjectStack Client SDK + +**Purpose:** React-specific hooks and components for ObjectStack integration. + +**Requirements:** React 18+ + +**Key Features:** +- `useQuery` - Data fetching hook +- `useMutation` - Data mutation hook +- `useObject` - Object metadata hook +- React Query integration +- Optimistic updates + +**Use Cases:** +- Building React applications +- Real-time data synchronization +- Form handling with ObjectStack data + +--- + +### @objectstack/cli + +**Description:** Command Line Interface for ObjectStack Protocol + +**Purpose:** Developer tools for scaffolding, building, and managing ObjectStack applications. + +**Commands:** +- `os init` / `objectstack init` - Initialize new project +- `os build` / `objectstack build` - Build and validate metadata +- `os dev` / `objectstack dev` - Development server +- `os generate` - Code generation from schemas + +**Use Cases:** +- Project scaffolding +- Metadata validation +- Development workflows +- Code generation + +--- + +### @objectstack/ai-bridge + +**Description:** AI/ML integration bridge for ObjectStack + +**Purpose:** Provides adapters and utilities for integrating AI/ML models with ObjectStack. + +**Key Features:** +- LLM provider adapters (OpenAI, Anthropic, etc.) +- Model registry and routing +- Token usage tracking +- Embedding generation +- RAG pipeline support + +**Use Cases:** +- Building AI-powered applications +- Integrating LLMs with business data +- Implementing RAG workflows + +--- + +### @objectstack/types + +**Description:** Shared interfaces describing the ObjectStack Runtime environment + +**Purpose:** Common TypeScript type definitions used across all ObjectStack packages. + +**Key Exports:** +- `IKernel` - Kernel interface +- `RuntimePlugin` - Plugin interface +- Shared utility types +- Runtime context types + +**Use Cases:** +- Plugin development +- Type-safe integrations +- Extending ObjectStack core + +--- + +## Plugin Packages + +### @objectstack/driver-memory + +**Description:** In-Memory Driver for ObjectStack (Reference Implementation) + +**Purpose:** A fully functional in-memory database driver used for testing and development. + +**Key Features:** +- Full ObjectQL support +- Transaction support +- Query execution +- No external dependencies + +**Use Cases:** +- Testing ObjectStack applications +- Development without database setup +- Understanding driver implementation patterns + +**Status:** Reference implementation for driver developers + +--- + +### @objectstack/plugin-hono-server + +**Description:** Standard Hono Server Adapter for ObjectStack Runtime + +**Purpose:** HTTP server adapter using the Hono framework. + +**Key Features:** +- Fast HTTP server using Hono +- REST API endpoints +- Middleware support +- Edge runtime compatible + +**Use Cases:** +- Production REST API deployment +- Edge function hosting +- Serverless deployments + +--- + +### @objectstack/plugin-msw + +**Description:** MSW (Mock Service Worker) Plugin for ObjectStack Runtime + +**Purpose:** Testing plugin for mocking ObjectStack APIs in tests. + +**Key Features:** +- API mocking for tests +- Request interception +- Response simulation +- Integration with MSW + +**Use Cases:** +- Unit testing +- Integration testing +- Frontend testing without backend + +--- + +## Package Dependencies + +### Dependency Graph + +``` +@objectstack/spec (no dependencies) + ↓ + ├─→ @objectstack/types + ├─→ @objectstack/core + ├─→ @objectstack/objectql + ├─→ @objectstack/runtime + │ ↓ + │ └─→ @objectstack/client + │ ↓ + │ └─→ @objectstack/client-react + ├─→ @objectstack/cli + └─→ @objectstack/ai-bridge + +Plugins (depend on core packages): + ├─→ @objectstack/driver-memory + ├─→ @objectstack/plugin-hono-server + └─→ @objectstack/plugin-msw +``` + +### Installation + +**For Application Development:** +```bash +pnpm add @objectstack/runtime @objectstack/client +``` + +**For React Applications:** +```bash +pnpm add @objectstack/client-react +``` + +**For Plugin Development:** +```bash +pnpm add @objectstack/core @objectstack/spec +``` + +**For CLI Tools:** +```bash +pnpm add -g @objectstack/cli +``` + +--- + +## Version Compatibility + +All packages in the monorepo are versioned together and released simultaneously to ensure compatibility. + +**Current Version:** Check [CHANGELOG.md](https://github.com/objectstack-ai/spec/blob/main/CHANGELOG.md) + +**Compatibility Matrix:** + +| Package Version | Node.js | TypeScript | React (for client-react) | +| :--- | :--- | :--- | :--- | +| 0.6.x | ≥18.0.0 | ≥5.3.0 | ≥18.0.0 | + +--- + +## Next Steps + + + + + + diff --git a/content/docs/references/protocol-map.mdx b/content/docs/references/protocol-map.mdx index e786a6354..a69370d75 100644 --- a/content/docs/references/protocol-map.mdx +++ b/content/docs/references/protocol-map.mdx @@ -6,7 +6,7 @@ description: Visual guide to ObjectStack protocol relationships and dependencies # Protocol Architecture Map -Understand how the 70 ObjectStack protocols fit together to form a complete business platform. +Understand how the 109 ObjectStack protocols fit together to form a complete business platform. ## The Three-Layer Architecture @@ -34,7 +34,7 @@ Understand how the 70 ObjectStack protocols fit together to form a complete busi │ ┌────────▼────────┐ │ ObjectQL (Data) │ - │ 8 Protocols │ + │ 16 Protocols │ └────────┬────────┘ │ ┌────────────────────────────┴─────────────────────────────────────┐ @@ -47,7 +47,7 @@ Understand how the 70 ObjectStack protocols fit together to form a complete busi │ ┌────────▼────────┐ │ ObjectOS (Sys) │ - │ 40+ Protocols │ + │ 39 Protocols │ └─────────────────┘ ``` diff --git a/content/docs/references/quick-reference.mdx b/content/docs/references/quick-reference.mdx index 48f8dcd86..22f032610 100644 --- a/content/docs/references/quick-reference.mdx +++ b/content/docs/references/quick-reference.mdx @@ -6,13 +6,13 @@ description: Fast lookup table for all ObjectStack protocols # Quick Reference Guide -Fast lookup for all 70 ObjectStack protocols organized by category. +Fast lookup for all 109 ObjectStack protocols organized by category. Click on any protocol name to view its complete API reference. -## Data Protocol (8 protocols) +## Data Protocol (16 protocols) Core business logic and data modeling schemas. @@ -26,6 +26,14 @@ Core business logic and data modeling schemas. | **[Dataset](./data/dataset)** | `dataset.zod.ts` | Dataset, DatasetMode | Reusable dataset definitions | | **[Mapping](./data/mapping)** | `mapping.zod.ts` | FieldMapping | Field transformation mappings | | **[Hook](./data/hook)** | `hook.zod.ts` | Hook, HookEvent | Lifecycle event hooks | +| **[Data Engine](./data/data-engine)** | `data-engine.zod.ts` | DataEngine | Data engine configuration | +| **[Driver](./data/driver)** | `driver.zod.ts` | Driver, DriverCapabilities | Database driver interface | +| **[SQL Driver](./data/driver-sql)** | `driver-sql.zod.ts` | SQLDriver | SQL-specific driver | +| **[NoSQL Driver](./data/driver-nosql)** | `driver-nosql.zod.ts` | NoSQLDriver | NoSQL-specific driver | +| **[Document](./data/document)** | `document.zod.ts` | Document | Document-oriented data | +| **[External Lookup](./data/external-lookup)** | `external-lookup.zod.ts` | ExternalLookup | External data lookups | +| **[Postgres Driver](./driver/postgres)** | `driver/postgres.zod.ts` | PostgresConfig | PostgreSQL configuration | +| **[Mongo Driver](./driver/mongo)** | `driver/mongo.zod.ts` | MongoConfig | MongoDB configuration | ## UI Protocol (10 protocols) @@ -58,7 +66,7 @@ Workflows, flows, and integrations. | **[Sync](./automation/sync)** | `sync.zod.ts` | SyncConfig | Bi-directional data sync | | **[Connector](./automation/connector)** | `connector.zod.ts` | Connector, ConnectorType | External system connectors | -## System Protocol (14 protocols) +## System Protocol (39 protocols) Core system configuration and runtime infrastructure. @@ -66,20 +74,34 @@ Core system configuration and runtime infrastructure. |:---------|:-----------|:------------|:--------| | **[Manifest](./system/manifest)** | `manifest.zod.ts` | Manifest | Package manifest (objectstack.config.ts) | | **[Datasource](./system/datasource)** | `datasource.zod.ts` | Datasource, DatasourceType | Database connection configs | -| **[Driver](./system/driver)** | `driver.zod.ts` | Driver, DriverCapabilities | Database driver interface | -| **[Plugin](./system/plugin)** | `plugin.zod.ts` | Plugin, PluginHook | Plugin system interface | | **[Context](./system/context)** | `context.zod.ts` | KernelContext | Runtime execution context | +| **[Plugin](./system/plugin)** | `plugin.zod.ts` | Plugin, PluginHook | Plugin system interface | +| **[Plugin Capability](./system/plugin-capability)** | `plugin-capability.zod.ts` | PluginCapability | Plugin capability declarations | +| **[Plugin Lifecycle](./system/plugin-lifecycle-events)** | `plugin-lifecycle-events.zod.ts` | PluginLifecycleEvents | Plugin lifecycle events | +| **[Plugin Validator](./system/plugin-validator)** | `plugin-validator.zod.ts` | PluginValidator | Plugin validation | +| **[Startup Orchestrator](./system/startup-orchestrator)** | `startup-orchestrator.zod.ts` | StartupOrchestrator | System startup | +| **[Service Registry](./system/service-registry)** | `service-registry.zod.ts` | ServiceRegistry | Service discovery | | **[Events](./system/events)** | `events.zod.ts` | Event, EventBus | System event bus | | **[Job](./system/job)** | `job.zod.ts` | Job, JobSchedule | Background job queue | | **[Audit](./system/audit)** | `audit.zod.ts` | AuditLog, AuditEvent | Audit trail logging | -| **[Logger](./system/logger)** | `logger.zod.ts` | LoggerConfig | Logging configuration | +| **[Logging](./system/logging)** | `logging.zod.ts` | LoggingConfig | Structured logging | +| **[Metrics](./system/metrics)** | `metrics.zod.ts` | Metrics | Application metrics | +| **[Tracing](./system/tracing)** | `tracing.zod.ts` | Tracing | Distributed tracing | | **[Translation](./system/translation)** | `translation.zod.ts` | Translation | i18n support | | **[Feature](./system/feature)** | `feature.zod.ts` | FeatureFlag | Feature flags | -| **[Storage](./system/scoped-storage)** | `scoped-storage.zod.ts` | ScopedStorage | Key-value storage | -| **[Postgres Config](./system/misc)** | `postgres.zod.ts` | PostgresConfig | PostgreSQL driver config | -| **[Mongo Config](./system/misc)** | `mongo.zod.ts` | MongoConfig | MongoDB driver config | - -## AI Protocol (8 protocols) +| **[Cache](./system/cache)** | `cache.zod.ts` | CacheConfig | Caching layer | +| **[Object Storage](./system/object-storage)** | `object-storage.zod.ts` | ObjectStorage | Object storage | +| **[Message Queue](./system/message-queue)** | `message-queue.zod.ts` | MessageQueue | Message queuing | +| **[Search Engine](./system/search-engine)** | `search-engine.zod.ts` | SearchEngine | Full-text search | +| **[Encryption](./system/encryption)** | `encryption.zod.ts` | Encryption | Encryption & keys | +| **[Compliance](./system/compliance)** | `compliance.zod.ts` | Compliance | Regulatory controls | +| **[Masking](./system/masking)** | `masking.zod.ts` | Masking | Data masking | +| **[Notification](./system/notification)** | `notification.zod.ts` | Notification | Notifications | +| **[Change Management](./system/change-management)** | `change-management.zod.ts` | ChangeManagement | Change tracking | +| **[Collaboration](./system/collaboration)** | `collaboration.zod.ts` | Collaboration | Real-time collab | +| **[HTTP Server](./system/http-server)** | `http-server.zod.ts` | HTTPServer | HTTP server config | + +## AI Protocol (9 protocols) AI/ML capabilities - agents, models, RAG, and cost tracking. @@ -90,11 +112,12 @@ AI/ML capabilities - agents, models, RAG, and cost tracking. | **[RAG Pipeline](./ai/rag-pipeline)** | `rag-pipeline.zod.ts` | RAGPipelineConfig | Retrieval augmented generation | | **[NLQ](./ai/nlq)** | `nlq.zod.ts` | NLQRequest, NLQResponse | Natural language to query | | **[Conversation](./ai/conversation)** | `conversation.zod.ts` | ConversationSession | Conversation management | +| **[Agent Action](./ai/agent-action)** | `agent-action.zod.ts` | AgentAction | Agent action definitions | | **[Cost](./ai/cost)** | `cost.zod.ts` | CostEntry, BudgetLimit | AI cost tracking and budgets | | **[Predictive](./ai/predictive)** | `predictive.zod.ts` | PredictiveModel | Predictive ML models | | **[Orchestration](./ai/orchestration)** | `orchestration.zod.ts` | AIOrchestration | Multi-agent orchestration | -## API Protocol (6 protocols) +## API Protocol (13 protocols) REST/GraphQL endpoints and real-time subscriptions. @@ -104,8 +127,16 @@ REST/GraphQL endpoints and real-time subscriptions. | **[Endpoint](./api/endpoint)** | `endpoint.zod.ts` | Endpoint, EndpointMethod | REST endpoint configuration | | **[Router](./api/router)** | `router.zod.ts` | Router, Route | API routing rules | | **[OData](./api/odata)** | `odata.zod.ts` | ODataQuery | OData protocol support | +| **[GraphQL](./api/graphql)** | `graphql.zod.ts` | GraphQLSchema | GraphQL API config | | **[Realtime](./api/realtime)** | `realtime.zod.ts` | Subscription, Channel | WebSocket subscriptions | +| **[WebSocket](./api/websocket)** | `websocket.zod.ts` | WebSocketConfig | WebSocket protocol | | **[Discovery](./api/discovery)** | `discovery.zod.ts` | ServiceDiscovery | API discovery and metadata | +| **[Batch](./api/batch)** | `batch.zod.ts` | BatchRequest | Batch API processing | +| **[HTTP Cache](./api/http-cache)** | `http-cache.zod.ts` | CacheStrategy | HTTP caching | +| **[Errors](./api/errors)** | `errors.zod.ts` | ErrorResponse | Error responses | +| **[View Storage](./api/view-storage)** | `view-storage.zod.ts` | ViewStorage | View state storage | +| **[Protocol](./api/protocol)** | `protocol.zod.ts` | ProtocolDefinition | Protocol definitions | +| **[REST Server](./api/rest-server)** | `rest-server.zod.ts` | RESTServer | REST server config | ## Auth Protocol (6 protocols) @@ -131,18 +162,51 @@ Access control and row-level security. | **[RLS](./permission/rls)** | `rls.zod.ts` | RowLevelSecurity | Row-level security filters | | **[Territory](./permission/territory)** | `territory.zod.ts` | Territory | Territory-based access | -## Hub Protocol (5 protocols) +## Hub Protocol (6 protocols) Marketplace, licensing, and multi-tenancy. | Protocol | Source File | Key Schemas | Purpose | |:---------|:-----------|:------------|:--------| | **[Marketplace](./hub/marketplace)** | `marketplace.zod.ts` | Package, PackageVersion | Plugin marketplace | +| **[Plugin Registry](./hub/plugin-registry)** | `plugin-registry.zod.ts` | PluginRegistry | Plugin versioning | | **[Composer](./hub/composer)** | `composer.zod.ts` | Dependency | Dependency management | | **[License](./hub/license)** | `license.zod.ts` | License, LicenseType | Feature licensing | | **[Tenant](./hub/tenant)** | `tenant.zod.ts` | Tenant | Multi-tenancy isolation | | **[Space](./hub/space)** | `space.zod.ts` | Space, Workspace | Workspace management | +## Integration Protocol (5 protocols) + +External system connectors and adapters. + +| Protocol | Source File | Key Schemas | Purpose | +|:---------|:-----------|:------------|:--------| +| **[Connector](./integration/connector)** | `connector.zod.ts` | Connector | Generic connector interface | +| **[SaaS Connector](./integration/connector)** | `connector/saas.zod.ts` | SaaSConnector | SaaS integrations | +| **[Database Connector](./integration/connector)** | `connector/database.zod.ts` | DatabaseConnector | Database adapters | +| **[File Storage](./integration/connector)** | `connector/file-storage.zod.ts` | FileStorageConnector | Cloud storage | +| **[Message Queue](./integration/connector)** | `connector/message-queue.zod.ts` | MessageQueueConnector | Queue integrations | + +## Shared Protocol (3 protocols) + +Common utilities used across all protocols. + +| Protocol | Source File | Key Schemas | Purpose | +|:---------|:-----------|:------------|:--------| +| **[Identifiers](./shared/identifiers)** | `identifiers.zod.ts` | ID formats | Standard ID patterns | +| **[HTTP](./shared/http)** | `http.zod.ts` | HTTPRequest, HTTPResponse | HTTP utilities | +| **[Mapping](./shared/mapping)** | `mapping.zod.ts` | MappingRule | Field mapping utilities | + +## Stack Protocol (1 protocol) + +Root stack definition. + +| Protocol | Source File | Key Schemas | Purpose | +|:---------|:-----------|:------------|:--------| +| **[Stack](../stack.zod.ts)** | `stack.zod.ts` | Stack, StackConfig | ObjectStack root definition | + +--- + ## Common Patterns ### Naming Conventions