diff --git a/content/docs/references/api/dispatcher.mdx b/content/docs/references/api/dispatcher.mdx index 15cf69a75f..a4dcbe884a 100644 --- a/content/docs/references/api/dispatcher.mdx +++ b/content/docs/references/api/dispatcher.mdx @@ -5,7 +5,7 @@ description: Dispatcher protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# HttpDispatcher Protocol +## HttpDispatcher Protocol Defines how the ObjectStack HttpDispatcher routes incoming API requests to the correct kernel service based on URL prefix matching. diff --git a/content/docs/references/api/package-api.mdx b/content/docs/references/api/package-api.mdx index b1ea120a07..3d70ea305d 100644 --- a/content/docs/references/api/package-api.mdx +++ b/content/docs/references/api/package-api.mdx @@ -5,7 +5,7 @@ description: Package Api protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Package API Protocol +## Package API Protocol REST API endpoint schemas for package lifecycle management. diff --git a/content/docs/references/api/versioning.mdx b/content/docs/references/api/versioning.mdx index 4fcc2825cf..c9a8fae0e9 100644 --- a/content/docs/references/api/versioning.mdx +++ b/content/docs/references/api/versioning.mdx @@ -5,7 +5,7 @@ description: Versioning protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# API Versioning Protocol +## API Versioning Protocol Defines how API versions are negotiated between client and server. Supports multiple versioning strategies and deprecation lifecycle management. diff --git a/content/docs/references/cloud/app-store.mdx b/content/docs/references/cloud/app-store.mdx index 1fe4636ee3..99f3ac328b 100644 --- a/content/docs/references/cloud/app-store.mdx +++ b/content/docs/references/cloud/app-store.mdx @@ -5,22 +5,22 @@ description: App Store protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# App Store Protocol (Customer Experience) +## App Store Protocol (Customer Experience) Defines schemas for the end-customer experience when browsing, evaluating, installing, and managing marketplace apps from within ObjectOS. -## Architecture Alignment +### Architecture Alignment - **Salesforce AppExchange (Customer)**: Browse apps, read reviews, 1-click install - **Shopify App Store (Merchant)**: App evaluation, trial, install, manage subscriptions - **Apple App Store (User)**: Ratings, reviews, featured collections, personalized recs -## Customer Journey +### Customer Journey ``` Discover → Evaluate → Install → Configure → Use → Rate/Review → Manage ``` -## Key Concepts +### Key Concepts - **Reviews & Ratings**: User-submitted ratings and reviews with moderation - **Collections & Recommendations**: Personalized discovery and curated picks - **Subscription Management**: Manage licenses, billing, and renewals diff --git a/content/docs/references/cloud/developer-portal.mdx b/content/docs/references/cloud/developer-portal.mdx index 6c97ac7b93..15d37bd079 100644 --- a/content/docs/references/cloud/developer-portal.mdx +++ b/content/docs/references/cloud/developer-portal.mdx @@ -5,7 +5,7 @@ description: Developer Portal protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Developer Portal Protocol +## Developer Portal Protocol Defines schemas for the developer-facing side of the marketplace ecosystem. Covers the complete developer journey: @@ -14,12 +14,12 @@ Covers the complete developer journey: Register → Create App → Develop → Validate → Build → Submit → Monitor → Iterate ``` -## Architecture Alignment +### Architecture Alignment - **Salesforce Partner Portal**: ISV registration, AppExchange publishing, Trialforce - **Shopify Partner Dashboard**: App management, analytics, billing - **VS Code Marketplace Management**: Extension publishing, statistics, tokens -## Identity Integration (better-auth) +### Identity Integration (better-auth) Authentication, organization management, and API keys are handled by the Identity module (`@objectstack/spec` Identity namespace), which follows the better-auth specification. This module only defines marketplace-specific @@ -35,7 +35,7 @@ extensions on top of the shared identity layer: There is no `Identity.ApiKeySchema` — #8715 retired it (it documented better-auth's apiKey plugin, which this platform does not load) -## Key Concepts +### Key Concepts - **Publisher Profile**: Links an Identity Organization to a marketplace publisher - **App Listing Management**: CRUD for marketplace listings (draft → published) - **Version Channels**: alpha / beta / rc / stable release channels diff --git a/content/docs/references/cloud/environment-artifact.mdx b/content/docs/references/cloud/environment-artifact.mdx index c42862dfdd..8fbd7a8827 100644 --- a/content/docs/references/cloud/environment-artifact.mdx +++ b/content/docs/references/cloud/environment-artifact.mdx @@ -5,7 +5,7 @@ description: Environment Artifact protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Environment Artifact Envelope — re-export (#4740, #4535 C10) +## Environment Artifact Envelope — re-export (#4740, #4535 C10) The envelope has exactly ONE declaration: `../system/environment-artifact.zod` (maintainer route A′ on #4740 — diff --git a/content/docs/references/cloud/environment-package.mdx b/content/docs/references/cloud/environment-package.mdx index a4ba268ec7..385ca26204 100644 --- a/content/docs/references/cloud/environment-package.mdx +++ b/content/docs/references/cloud/environment-package.mdx @@ -5,7 +5,7 @@ description: Environment Package protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Environment Package Installation Protocol +## Environment Package Installation Protocol Models `sys_package_installation` — the pairing between an Environment and a specific, immutable `sys_package_version` snapshot. diff --git a/content/docs/references/cloud/environment.mdx b/content/docs/references/cloud/environment.mdx index 4731452c71..6ca8c281d5 100644 --- a/content/docs/references/cloud/environment.mdx +++ b/content/docs/references/cloud/environment.mdx @@ -5,7 +5,7 @@ description: Environment protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Environment Protocol (runtime container) +## Environment Protocol (runtime container) An **Environment** is the runtime container of an organization's data. It owns a physically isolated database, a canonical hostname, a plan/quota diff --git a/content/docs/references/cloud/marketplace-admin.mdx b/content/docs/references/cloud/marketplace-admin.mdx index 6b7e5b8821..a96fbee061 100644 --- a/content/docs/references/cloud/marketplace-admin.mdx +++ b/content/docs/references/cloud/marketplace-admin.mdx @@ -5,17 +5,17 @@ description: Marketplace Admin protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Marketplace Administration Protocol +## Marketplace Administration Protocol Defines schemas for the platform (Cloud) side of marketplace operations. Covers the administrative workflows for managing and governing the marketplace. -## Architecture Alignment +### Architecture Alignment - **Salesforce AppExchange Admin**: Security review, ISV monitoring, partner management - **Apple App Store Connect Review**: Human review process, guidelines, rejection reasons - **Google Play Console**: Policy enforcement, quality gates, content moderation -## Key Concepts +### Key Concepts - **Review Process**: Structured workflow for submission review (automated + manual) - **Curation**: Featured apps, curated collections, editorial picks - **Governance**: Policy enforcement, takedown, compliance diff --git a/content/docs/references/cloud/marketplace.mdx b/content/docs/references/cloud/marketplace.mdx index b6d16017e6..4e633feacf 100644 --- a/content/docs/references/cloud/marketplace.mdx +++ b/content/docs/references/cloud/marketplace.mdx @@ -5,7 +5,7 @@ description: Marketplace protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Marketplace Protocol +## Marketplace Protocol Defines the core schemas for the plugin marketplace ecosystem, covering: - **Developer Side**: Package publishing, submission, and version releases @@ -14,13 +14,13 @@ Defines the core schemas for the plugin marketplace ecosystem, covering: This protocol defines the contract between plugin developers, the marketplace platform, and customers who install plugins. -## Architecture Alignment +### Architecture Alignment - **Salesforce AppExchange**: Security review, managed packages, listing profiles - **VS Code Marketplace**: Extension publishing, ratings, verified publishers - **npm Registry**: Package publishing, versioning, scoped packages - **Shopify App Store**: App review process, billing integration, merchant installs -## Developer Publishing Flow +### Developer Publishing Flow ``` 1. Develop → Build the project locally using ObjectStack CLI 2. Validate → Run `os validate` (schema + security checks) @@ -30,7 +30,7 @@ platform, and customers who install plugins. 6. Publish → Approved listing goes live on marketplace ``` -## Platform Management Flow +### Platform Management Flow ``` 1. Receive → Accept submissions from verified publishers 2. Scan → Automated security scan and compatibility check diff --git a/content/docs/references/data/context-tokens.mdx b/content/docs/references/data/context-tokens.mdx index 9e34c9f1ce..c6976670c2 100644 --- a/content/docs/references/data/context-tokens.mdx +++ b/content/docs/references/data/context-tokens.mdx @@ -8,7 +8,7 @@ description: Context Tokens protocol schemas Context Tokens — the declarative placeholders that resolve against the **caller's session** (who am I, which org am I in) rather than the clock. -# Why this lives in `spec` +## Why this lives in `spec` These are the sibling vocabulary to `{date-macros}`. Filter values in dashboards, views, reports and pages travel as JSON, so a user-scoped @@ -38,7 +38,7 @@ neither is an ERROR, not a null comparand: resolving to `null` degrades to `IS NULL` on most drivers and would hand back the rows the filter was written to exclude. -# Presentation scope, NOT a security boundary +## Presentation scope, NOT a security boundary This is the single most important thing to understand about these tokens. `{current_user_id}` scopes what a surface *shows*; it does not @@ -60,7 +60,7 @@ Never reach for a context token to keep a user away from data. Removing a `{current_user_id}` filter widens a *view*; it must never widen *access*. -# Where the tokens are honoured +## Where the tokens are honoured Filter values on every surface that resolves placeholders — object list views, dashboard widgets, reports, SDUI page components. Navigation @@ -69,7 +69,7 @@ such as `{active_package}`; those are nav-only and are NOT valid inside filter values, because filters are not evaluated with the sidebar's selector state. -# Out of scope +## Out of scope - `current_user.*` RLS expressions — see `@objectstack/plugin-security`. - `{date-macros}` — the clock-based sibling; see `./date-macros.zod.ts`. diff --git a/content/docs/references/data/date-macros.mdx b/content/docs/references/data/date-macros.mdx index 16ae5053f8..4776613267 100644 --- a/content/docs/references/data/date-macros.mdx +++ b/content/docs/references/data/date-macros.mdx @@ -8,7 +8,7 @@ description: Date Macros protocol schemas Date Macro Tokens — the declarative placeholders the UI substitutes into filter values before sending a query to the data engine. -# Why this lives in `spec` +## Why this lives in `spec` Filter values in dashboards, views, reports and pages travel as JSON. Because JSON cannot evaluate code, callers cannot write `daysAgo(30)` @@ -52,7 +52,7 @@ so the **set of recognised tokens is part of the platform contract** and must live here next to the rest of the JSON-DSL schemas, not inside any single UI implementation. -# Two flavours of token +## Two flavours of token 1. **Fixed tokens** — small, finite list (`{today}`, `{current_quarter_start}`, `{last_year_end}`, …). Enumerated by @@ -63,7 +63,7 @@ inside any single UI implementation. `DATE_MACRO_PARAM_RE`. Units: `minute(s)`, `hour(s)`, `day(s)`, `week(s)`, `month(s)`, `year(s)`. Directions: `ago`, `from_now`. -# Out of scope +## Out of scope - CEL expressions (`cel\`daysAgo(30)\``) run **server-side** in the formula engine. They are unrelated to these placeholders; see diff --git a/content/docs/references/data/seed-loader.mdx b/content/docs/references/data/seed-loader.mdx index 490d0ca592..1d9e7c2722 100644 --- a/content/docs/references/data/seed-loader.mdx +++ b/content/docs/references/data/seed-loader.mdx @@ -5,17 +5,17 @@ description: Seed Loader protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Seed Loader Protocol +## Seed Loader Protocol Defines the schemas for metadata-driven seed data loading with automatic relationship resolution, dependency ordering, and multi-pass insertion. -## Architecture Alignment +### Architecture Alignment - **Salesforce Data Loader**: External ID-based upsert with relationship resolution - **ServiceNow**: Sys ID and display value mapping during import - **Airtable**: Linked record resolution via display names -## Loading Flow +### Loading Flow ``` 1. Build object dependency graph from field metadata (lookup/master_detail) 2. Topological sort → determine insert order (parents before children) diff --git a/content/docs/references/data/validation.mdx b/content/docs/references/data/validation.mdx index 202c38bc91..498f7f7362 100644 --- a/content/docs/references/data/validation.mdx +++ b/content/docs/references/data/validation.mdx @@ -5,12 +5,12 @@ description: Validation protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# ObjectStack Validation Protocol +## ObjectStack Validation Protocol This module defines the validation schema protocol for ObjectStack, providing a comprehensive type-safe validation system similar to Salesforce's validation rules but with enhanced capabilities. -## Overview +### Overview Validation rules are applied at the data layer to ensure data integrity and enforce business logic. A validation rule is a **deterministic, synchronous, side-effect-free predicate over a single @@ -30,7 +30,7 @@ The system supports these validation types: 5. **JSON Schema Validation**: Validate a JSON field against a JSON Schema 6. **Conditional Validation**: Apply a nested rule based on a CEL condition -## Deliberately NOT validation rules +### Deliberately NOT validation rules These were once declared here but never enforced. Because the contract above rules them out (they need I/O or are client-side concerns), they were removed rather than left as silent @@ -51,7 +51,7 @@ no-ops. Use the layer that already does each one correctly: a `delete` event was a proven silent no-op — the enum value was removed rather than left advertised-but-unenforced (#3184; see docs/audits/2026-06-validationschema-property-liveness.md). -## Salesforce Comparison +### Salesforce Comparison ObjectStack validation rules are inspired by Salesforce validation rules but enhanced: - Salesforce: Formula-based validation with `Error Condition Formula` diff --git a/content/docs/references/identity/scim.mdx b/content/docs/references/identity/scim.mdx index 4a10b5f2b6..5442b93015 100644 --- a/content/docs/references/identity/scim.mdx +++ b/content/docs/references/identity/scim.mdx @@ -5,18 +5,18 @@ description: Scim protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# SCIM 2.0 Protocol Implementation +## SCIM 2.0 Protocol Implementation System for Cross-domain Identity Management (SCIM) 2.0 specification implementation for ObjectStack. -## Overview +### Overview SCIM 2.0 is an HTTP-based protocol for managing user and group identities across domains. It provides a standardized REST API for user provisioning, de-provisioning, and synchronization. -## Use Cases +### Use Cases 1. **Enterprise SSO Integration** - Integrate with Okta, Azure AD, OneLogin @@ -38,13 +38,13 @@ de-provisioning, and synchronization. - Track all identity changes - Meet SOX/HIPAA requirements for user management -## Specification References +### Specification References - **RFC 7643**: SCIM Core Schema - **RFC 7644**: SCIM Protocol - **RFC 7642**: SCIM Requirements -## Industry Implementations +### Industry Implementations - **Okta**: Leading SCIM provider - **Azure AD**: Microsoft's identity platform diff --git a/content/docs/references/kernel/cli-extension.mdx b/content/docs/references/kernel/cli-extension.mdx index c48f11b1e0..7ff473752d 100644 --- a/content/docs/references/kernel/cli-extension.mdx +++ b/content/docs/references/kernel/cli-extension.mdx @@ -5,14 +5,14 @@ description: Cli Extension protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# CLI Extension Protocol +## CLI Extension Protocol Defines the contract for plugins that extend the ObjectStack CLI with custom commands. This enables third-party packages (e.g., marketplace, cloud deployment tools) to register new CLI commands via oclif's built-in plugin system. -## How It Works (oclif Plugin Model) +### How It Works (oclif Plugin Model) 1. **Declare** — Plugin's `package.json` includes an `oclif` config section declaring its commands directory and any topics. @@ -21,7 +21,7 @@ built-in plugin system. 3. **Load** — oclif automatically discovers and registers all Command classes exported from the plugin's commands directory. -## Plugin Package Contract +### Plugin Package Contract The plugin must be a valid oclif plugin: @@ -57,7 +57,7 @@ export default class MarketplaceSearch extends Command { } ``` -## Migration from Commander.js +### Migration from Commander.js The previous plugin model required `contributes.commands` in the manifest and exported Commander.js `Command` instances. The new model uses oclif's diff --git a/content/docs/references/kernel/cluster.mdx b/content/docs/references/kernel/cluster.mdx index 1a10c51bdc..2e42592e54 100644 --- a/content/docs/references/kernel/cluster.mdx +++ b/content/docs/references/kernel/cluster.mdx @@ -5,7 +5,7 @@ description: Cluster protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Cluster Protocol +## Cluster Protocol Defines the runtime semantics required for ObjectStack to behave correctly when more than one Node.js process is involved. The protocol layer codifies diff --git a/content/docs/references/kernel/dependency-resolution.mdx b/content/docs/references/kernel/dependency-resolution.mdx index 505e90b5e4..000dd7ed47 100644 --- a/content/docs/references/kernel/dependency-resolution.mdx +++ b/content/docs/references/kernel/dependency-resolution.mdx @@ -5,18 +5,18 @@ description: Dependency Resolution protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Dependency Resolution Protocol +## Dependency Resolution Protocol Defines schemas for runtime dependency resolution when installing, upgrading, or managing packages. Provides a standardized way to express dependency conflicts, resolution results, and installation order. -## Architecture Alignment +### Architecture Alignment - **npm**: Dependency tree resolution with conflict detection - **Helm**: Dependency management with version constraints - **Salesforce**: Package dependency validation at install time -## Resolution Flow +### Resolution Flow ``` 1. Parse manifest.dependencies (SemVer ranges) 2. Check installed packages registry diff --git a/content/docs/references/kernel/metadata-customization.mdx b/content/docs/references/kernel/metadata-customization.mdx index bcf5239ad7..6dffc471ca 100644 --- a/content/docs/references/kernel/metadata-customization.mdx +++ b/content/docs/references/kernel/metadata-customization.mdx @@ -5,20 +5,20 @@ description: Metadata Customization protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Metadata Customization Layer Protocol +## Metadata Customization Layer Protocol Defines the overlay system for managing user customizations on top of package-delivered metadata. This protocol solves the critical challenge of separating "vendor-managed" metadata from "customer-customized" metadata, enabling safe package upgrades without losing user changes. -## Architecture Alignment +### Architecture Alignment - **Salesforce**: Managed vs Unmanaged metadata components - **ServiceNow**: Update Sets with collision detection - **WordPress**: Parent/child theme overlay model - **Kubernetes**: Strategic merge patch for resource customization -## Three-Layer Model +### Three-Layer Model ``` ┌─────────────────────────────────┐ │ User Layer (scope: user) │ ← Personal overrides (per-user) @@ -29,7 +29,7 @@ enabling safe package upgrades without losing user changes. └─────────────────────────────────┘ ``` -## Merge Resolution Order +### Merge Resolution Order Effective metadata = System ← merge(Platform) ← merge(User) Each layer only stores the delta (changed fields), not the full definition. diff --git a/content/docs/references/kernel/metadata-loader.mdx b/content/docs/references/kernel/metadata-loader.mdx index dd18be8103..26de3d765f 100644 --- a/content/docs/references/kernel/metadata-loader.mdx +++ b/content/docs/references/kernel/metadata-loader.mdx @@ -5,7 +5,7 @@ description: Metadata Loader protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Metadata Manager Configuration +## Metadata Manager Configuration How the runtime `MetadataManager` is wired: which datasource backs `sys_metadata`, what to fall back to when that datasource is unreachable, cache / watch / validation settings, and the persistence write gates. diff --git a/content/docs/references/kernel/metadata-plugin.mdx b/content/docs/references/kernel/metadata-plugin.mdx index 09aa14ab6d..3ebbbadc21 100644 --- a/content/docs/references/kernel/metadata-plugin.mdx +++ b/content/docs/references/kernel/metadata-plugin.mdx @@ -5,12 +5,12 @@ description: Metadata Plugin protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Metadata Plugin Protocol +## Metadata Plugin Protocol Defines the specification for the **Metadata Plugin** — the central authority responsible for managing ALL metadata across the ObjectStack platform. -## Architecture +### Architecture The Metadata Plugin consolidates all scattered metadata operations into a single, cohesive plugin that "takes over" the entire platform's metadata management: @@ -30,12 +30,12 @@ cohesive plugin that "takes over" the entire platform's metadata management: └──────────────────────────────────────────────────────────────────┘ ``` -## Alignment +### Alignment - **Salesforce**: Metadata API (deploy, retrieve, describe) - **ServiceNow**: System Dictionary + Metadata API - **Kubernetes**: API Server + CRD Registry -## References +### References - [kernel/metadata-loader.zod.ts](/docs/references/kernel/metadata-loader) — MetadataManager wiring (datasource, cache, write gates) - [kernel/metadata-customization.zod.ts](/docs/references/kernel/metadata-customization) — Overlay/merge protocol - [system/metadata-persistence.zod.ts](/docs/references/system/metadata-persistence) — Database record format + loader/watch envelope types diff --git a/content/docs/references/kernel/metadata-protection.mdx b/content/docs/references/kernel/metadata-protection.mdx index 2cc4aa1077..faabad30b7 100644 --- a/content/docs/references/kernel/metadata-protection.mdx +++ b/content/docs/references/kernel/metadata-protection.mdx @@ -5,7 +5,7 @@ description: Metadata Protection protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Metadata Protection Model — Phase 1 (ADR-0010) +## Metadata Protection Model — Phase 1 (ADR-0010) Phase 1 introduces the **item-level lock** (`_lock`) and the provenance / package tags that drive it. Later phases extend this diff --git a/content/docs/references/kernel/package-artifact.mdx b/content/docs/references/kernel/package-artifact.mdx index f5565a8562..13b32b2cc6 100644 --- a/content/docs/references/kernel/package-artifact.mdx +++ b/content/docs/references/kernel/package-artifact.mdx @@ -5,13 +5,13 @@ description: Package Artifact protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Package Artifact Format Protocol +## Package Artifact Format Protocol Defines the standard structure of a package artifact (.tgz) produced by the build pipeline. The marketplace uses these schemas to validate, store, and distribute package artifacts. -## Artifact Internal Structure +### Artifact Internal Structure ``` ├── manifest.json ← ManifestSchema serialized ├── metadata/ ← 30+ metadata types (JSON) @@ -32,7 +32,7 @@ and distribute package artifacts. └── signature.sig ← RSA-SHA256 package signature ``` -## Architecture Alignment +### Architecture Alignment - **Salesforce**: Managed Package .zip with metadata components - **npm**: .tgz with package.json + contents - **Helm**: Chart .tgz with Chart.yaml + templates diff --git a/content/docs/references/kernel/package-registry.mdx b/content/docs/references/kernel/package-registry.mdx index 96ae353ad6..32c31b10e3 100644 --- a/content/docs/references/kernel/package-registry.mdx +++ b/content/docs/references/kernel/package-registry.mdx @@ -5,11 +5,11 @@ description: Package Registry protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Package Registry Protocol +## Package Registry Protocol Defines the runtime state and lifecycle operations for installed packages. -## Key Distinction: App vs Package (ADR-0019) +### Key Distinction: App vs Package (ADR-0019) - **App (AppSchema)**: the one consumer-facing unit — what a tenant downloads, opens, and uninstalls. Only `type: app` packages are consumer-installable (see `isConsumerInstallable`), and a consumer package defines **at most one @@ -21,7 +21,7 @@ Defines the runtime state and lifecycle operations for installed packages. the .app bundle" — bundled within an App or operator-provisioned; a consumer never installs them directly. -## Architecture Alignment +### Architecture Alignment - **Salesforce**: Managed Packages with install/uninstall lifecycle - **VS Code**: Extension marketplace with enable/disable per-workspace - **Kubernetes**: Helm charts with release state tracking diff --git a/content/docs/references/kernel/package-upgrade.mdx b/content/docs/references/kernel/package-upgrade.mdx index ea3fb2afa3..180e04a7bd 100644 --- a/content/docs/references/kernel/package-upgrade.mdx +++ b/content/docs/references/kernel/package-upgrade.mdx @@ -5,19 +5,19 @@ description: Package Upgrade protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Package Upgrade Protocol +## Package Upgrade Protocol Defines the complete lifecycle for upgrading installed packages, including pre-upgrade analysis, snapshot/backup, execution, validation, and rollback capabilities. -## Architecture Alignment +### Architecture Alignment - **Salesforce**: Managed Package upgrade with push upgrades and subscriber control - **ServiceNow**: Update Sets with preview, commit, and back-out support - **Helm**: Helm upgrade with rollback to previous release - **Kubernetes**: Rolling update with readiness probes and automatic rollback -## Upgrade Flow +### Upgrade Flow ``` 1. PreCheck → Validate compatibility, check dependencies 2. Plan → Generate upgrade plan with metadata diff diff --git a/content/docs/references/kernel/plugin-capability.mdx b/content/docs/references/kernel/plugin-capability.mdx index 0305f80b30..3ea87f6b97 100644 --- a/content/docs/references/kernel/plugin-capability.mdx +++ b/content/docs/references/kernel/plugin-capability.mdx @@ -5,7 +5,7 @@ description: Plugin Capability protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Plugin Capability Protocol +## Plugin Capability Protocol Defines the standard way plugins declare their capabilities, implementations, and conformance levels to ensure interoperability across vendors. diff --git a/content/docs/references/kernel/plugin-lifecycle-advanced.mdx b/content/docs/references/kernel/plugin-lifecycle-advanced.mdx index 3f2db79127..d8b842acd0 100644 --- a/content/docs/references/kernel/plugin-lifecycle-advanced.mdx +++ b/content/docs/references/kernel/plugin-lifecycle-advanced.mdx @@ -5,7 +5,7 @@ description: Plugin Lifecycle Advanced protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Advanced Plugin Lifecycle — host-driven library vocabularies +## Advanced Plugin Lifecycle — host-driven library vocabularies Declares the INPUT contracts of the host-driven lifecycle classes exported by `@objectstack/core` — `PluginHealthMonitor` (reads `PluginHealthCheck`, diff --git a/content/docs/references/kernel/plugin-loading.mdx b/content/docs/references/kernel/plugin-loading.mdx index ea9cae4073..46ad18cfe0 100644 --- a/content/docs/references/kernel/plugin-loading.mdx +++ b/content/docs/references/kernel/plugin-loading.mdx @@ -5,7 +5,7 @@ description: Plugin Loading protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Plugin Loading Protocol +## Plugin Loading Protocol What remains of this module is the **observational** half: the lifecycle event a loader would emit (`PluginLoadingEventSchema`) and the per-plugin diff --git a/content/docs/references/kernel/plugin-registry.mdx b/content/docs/references/kernel/plugin-registry.mdx index 5e48238505..ff0125e8b6 100644 --- a/content/docs/references/kernel/plugin-registry.mdx +++ b/content/docs/references/kernel/plugin-registry.mdx @@ -5,7 +5,7 @@ description: Plugin Registry protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Plugin Registry Protocol +## Plugin Registry Protocol Defines the schema for the plugin discovery and registry system. This enables plugins from different vendors to be discovered, validated, diff --git a/content/docs/references/kernel/plugin-security-advanced.mdx b/content/docs/references/kernel/plugin-security-advanced.mdx index 6b66de7d41..7f244f83de 100644 --- a/content/docs/references/kernel/plugin-security-advanced.mdx +++ b/content/docs/references/kernel/plugin-security-advanced.mdx @@ -5,7 +5,7 @@ description: Plugin Security Advanced protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Plugin Security and Sandboxing Protocol +## Plugin Security and Sandboxing Protocol Defines comprehensive security mechanisms for plugin isolation, permission management, and threat protection in the ObjectStack ecosystem. diff --git a/content/docs/references/kernel/plugin-security.mdx b/content/docs/references/kernel/plugin-security.mdx index e8d6b81807..568528cc5d 100644 --- a/content/docs/references/kernel/plugin-security.mdx +++ b/content/docs/references/kernel/plugin-security.mdx @@ -5,7 +5,7 @@ description: Plugin Security protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Plugin Security & Dependency Resolution Protocol +## Plugin Security & Dependency Resolution Protocol Provides comprehensive security scanning, vulnerability management, and dependency resolution for the ObjectStack plugin ecosystem. diff --git a/content/docs/references/kernel/plugin-versioning.mdx b/content/docs/references/kernel/plugin-versioning.mdx index 92a5c5e441..f5d4c1e277 100644 --- a/content/docs/references/kernel/plugin-versioning.mdx +++ b/content/docs/references/kernel/plugin-versioning.mdx @@ -5,7 +5,7 @@ description: Plugin Versioning protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Plugin Versioning and Compatibility Protocol +## Plugin Versioning and Compatibility Protocol Defines comprehensive versioning, compatibility checking, and dependency resolution mechanisms for the plugin ecosystem. diff --git a/content/docs/references/security/rls.mdx b/content/docs/references/security/rls.mdx index a4e43ba397..02e8723136 100644 --- a/content/docs/references/security/rls.mdx +++ b/content/docs/references/security/rls.mdx @@ -5,18 +5,18 @@ description: Rls protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Row-Level Security (RLS) Protocol +## Row-Level Security (RLS) Protocol Implements fine-grained record-level access control inspired by PostgreSQL RLS and Salesforce Criteria-Based Sharing Rules. -## Overview +### Overview Row-Level Security (RLS) allows you to control which rows users can access in database tables based on their identity and positions. Unlike object-level permissions (CRUD), RLS provides record-level filtering. -## Use Cases +### Use Cases 1. **Multi-Tenant Data Isolation** - Users only see records from their organization @@ -41,7 +41,7 @@ object-level permissions (CRUD), RLS provides record-level filtering. - `using: "assigned_to_id in current_user.team_member_ids"` (the runtime pre-resolves `team_member_ids`, no subquery needed) -## PostgreSQL RLS Comparison +### PostgreSQL RLS Comparison PostgreSQL RLS Example: ```sql @@ -64,7 +64,7 @@ ObjectStack RLS Equivalent: } ``` -## Salesforce Sharing Rules Comparison +### Salesforce Sharing Rules Comparison Salesforce uses "Sharing Rules" and a visibility hierarchy for record-level access (our equivalent hierarchy is the business-unit tree, ADR-0090 D3). @@ -80,7 +80,7 @@ ObjectStack RLS: - Subquery-shaped needs are pre-resolved by the runtime (§7.3.1) - Multiple policies OR-combine for union (any-match-allows) semantics -## Best Practices +### Best Practices 1. **Always Define SELECT Policy**: Control what users can view 2. **Define INSERT/UPDATE CHECK Policies**: Prevent data leakage @@ -88,7 +88,7 @@ ObjectStack RLS: 4. **Test Thoroughly**: RLS can have complex interactions 5. **Monitor Performance**: Complex RLS policies can impact query performance -## Security Considerations +### Security Considerations 1. **Defense in Depth**: RLS is one layer; use with object permissions 2. **Default Deny**: If no policy matches, access is denied diff --git a/content/docs/references/shared/expression.mdx b/content/docs/references/shared/expression.mdx index 0546252581..932b4103c5 100644 --- a/content/docs/references/shared/expression.mdx +++ b/content/docs/references/shared/expression.mdx @@ -5,7 +5,7 @@ description: Expression protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Expression Protocol +## Expression Protocol Canonical wire format for all "expression"-shaped metadata across ObjectStack (formula fields, predicates, conditions, criteria, visibility rules, seed @@ -16,7 +16,7 @@ compile` normalization, `{ dialect, ast }`). String-only shorthand is accepted at *input* time for developer ergonomics; build emits the canonical envelope. -## Dialects +### Dialects | dialect | engine | use | |:---|:---|:---| diff --git a/content/docs/references/shared/protection.mdx b/content/docs/references/shared/protection.mdx index 318e9fbe5c..1186d1cf0b 100644 --- a/content/docs/references/shared/protection.mdx +++ b/content/docs/references/shared/protection.mdx @@ -5,7 +5,7 @@ description: Protection protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Package-level metadata protection (ADR-0010 §3.7 — Phase 4.3) +## Package-level metadata protection (ADR-0010 §3.7 — Phase 4.3) Public, type-safe author surface for package authors to declare how much of one of their metadata items the runtime (and the diff --git a/content/docs/references/system/core-services.mdx b/content/docs/references/system/core-services.mdx index aa068a2833..55ef1df0d2 100644 --- a/content/docs/references/system/core-services.mdx +++ b/content/docs/references/system/core-services.mdx @@ -5,7 +5,7 @@ description: Core Services protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Service Registry Protocol +## Service Registry Protocol Defines the standard built-in services that constitute the ObjectStack Kernel. This registry is used by the `ObjectKernel` and `HttpDispatcher` to: diff --git a/content/docs/references/system/environment-artifact.mdx b/content/docs/references/system/environment-artifact.mdx index d4240921d3..0afe0ec305 100644 --- a/content/docs/references/system/environment-artifact.mdx +++ b/content/docs/references/system/environment-artifact.mdx @@ -5,7 +5,7 @@ description: Environment Artifact protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Environment Artifact Envelope +## Environment Artifact Envelope THE single declaration of the environment artifact envelope (#4740, #4535 C10 — maintainer route A′). `@objectstack/spec/cloud` re-exports @@ -24,7 +24,7 @@ listing). This envelope wraps the compiled `ObjectStackDefinitionSchema` produced by `objectstack compile` together with control-plane assigned identity (`commitId`, `checksum`). -## Boundary +### Boundary - **Artifact (this schema):** compiled environment metadata plus provenance. Immutable, content-addressable via `commitId` and @@ -35,7 +35,7 @@ identity (`commitId`, `checksum`). See `content/docs/concepts/north-star.mdx` §6.3 for the runtime-inputs boundary. -## History (#4740) +### History (#4740) This file previously documented a richer "v0" envelope — a `{ algorithm, value }` checksum object, a category-bag `metadata`, inlined diff --git a/content/docs/references/system/registry-config.mdx b/content/docs/references/system/registry-config.mdx index ca3ab28985..6d1d28bc3b 100644 --- a/content/docs/references/system/registry-config.mdx +++ b/content/docs/references/system/registry-config.mdx @@ -5,7 +5,7 @@ description: Registry Config protocol schemas {/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */} -# Registry Configuration Protocol +## Registry Configuration Protocol Defines the configuration for the ObjectStack Registry Service. Includes federation, synchronization, and storage settings. diff --git a/packages/spec/scripts/build-docs.ts b/packages/spec/scripts/build-docs.ts index f4626f9e41..8c6c199219 100644 --- a/packages/spec/scripts/build-docs.ts +++ b/packages/spec/scripts/build-docs.ts @@ -396,6 +396,27 @@ function generateMarkdown(schemaName: string, schema: any, category: string, _zo return renderSchemaSection(schemaName, schema, { schemaHref: schemaHrefFrom(category) }); } +/** + * The heading level a top-level section of a reference page sits at. + * + * A page's `