Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions content/docs/references/api/discovery.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ description: Discovery 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 Status Enum
Describes the operational state of a service in the discovery response.

- `available` – Fully operational: service is registered AND HTTP handler is verified.
- `registered` – Route is declared in the dispatcher table but the HTTP handler has
not been verified (may 501 at runtime).
- `unavailable` – Service is not installed / not registered in the kernel.
- `degraded` – Partially working (e.g., in-memory fallback, missing persistence).
- `stub` – Placeholder handler that always returns 501 Not Implemented.

<Callout type="info">
**Source:** `packages/spec/src/api/discovery.zod.ts`
</Callout>
Expand Down
3 changes: 0 additions & 3 deletions content/docs/references/api/endpoint.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ description: Endpoint 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 Mapping Schema
Transform input/output data.

<Callout type="info">
**Source:** `packages/spec/src/api/endpoint.zod.ts`
</Callout>
Expand Down
10 changes: 0 additions & 10 deletions content/docs/references/api/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ description: Events 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 Event Types

Triggered when metadata items are created, updated, or deleted.
Follows the pattern: `metadata.{type}.{action}`

Examples:
- `metadata.object.created` - A new object was created
- `metadata.view.updated` - A view was updated
- `metadata.agent.deleted` - An agent was deleted

<Callout type="info">
**Source:** `packages/spec/src/api/events.zod.ts`
</Callout>
Expand Down
12 changes: 0 additions & 12 deletions content/docs/references/automation/flow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@ description: Flow protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Flow Node Types — **built-in seed set** (ADR-0018).

Historically this `z.enum` *gated* `FlowNodeSchema.type`, which made the
closed protocol reject any plugin-registered node type — defeating the open
runtime registry (`registerNodeExecutor(type: string)`). Per ADR-0018 the
gate is removed: `FlowNodeSchema.type` is now a validated `string`, checked
against the live action registry at `registerFlow()` time, not frozen here.

`FlowNodeAction` is **retained** as the canonical list of built-in type ids
(documentation + the seed descriptor set the engine registers at boot). It
no longer constrains authored flows — plugins extend the vocabulary.

<Callout type="info">
**Source:** `packages/spec/src/automation/flow.zod.ts`
</Callout>
Expand Down
31 changes: 0 additions & 31 deletions content/docs/references/automation/webhook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,6 @@ description: Webhook protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Webhook Trigger Event
When should this webhook fire?

These mirror the record events the engine actually emits
(`data.record.created` / `updated` / `deleted`), which the webhook
auto-enqueuer maps to `create` / `update` / `delete`. Only events with a real
producer are declared here — an author can't subscribe to something that
never fires.

**Bulk triggers (#4639).** `bulk_update` / `bulk_delete` map to the engine's
aggregate `data.records.updated` / `data.records.deleted`, emitted when a
predicate write (`multi: true` → `IDataDriver.updateMany`/`deleteMany`)
affects a set of rows the driver reports only as a count. They are separate
trigger values, not extra sources for `update` / `delete`, because their
delivery has a different SHAPE: no `recordId`, no record body, just
`object` + `matched`. Folding them into the per-record triggers would send
every existing subscriber a body missing the fields it reads — the same
class of breakage as the pre-#4626 `recordId: ''` fabrication, arriving from
the other direction. A webhook that wants both subscribes to both.

Deliberately NOT triggers (#3196):
- `undelete` — there is no soft-delete / restore capability in the engine
(`delete` is a hard delete; no `deleted_at` convention, no restore
operation, no `data.record.undeleted` emit), so it had no event source.
Reintroduce it only alongside a real restore subsystem that emits an
undelete event.
- `api` (manual/programmatic fire) — no manual fire path exists (the only
webhook HTTP surface re-queues already-failed deliveries). Reintroduce it
with a real "fire this webhook now" endpoint/service, not as a bare enum
value that silently never fires.

<Callout type="info">
**Source:** `packages/spec/src/automation/webhook.zod.ts`
</Callout>
Expand Down
18 changes: 0 additions & 18 deletions content/docs/references/data/document.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,6 @@ description: Document protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Document Version Schema

Represents a single version of a document in a version-controlled system.
Each version is immutable and maintains its own metadata and download URL.

@example
```json
{
"versionNumber": 2,
"createdAt": 1704067200000,
"createdBy": "user_123",
"size": 2048576,
"checksum": "a1b2c3d4e5f6",
"downloadUrl": "https://storage.example.com/docs/v2/file.pdf",
"isLatest": true
}
```

<Callout type="info">
**Source:** `packages/spec/src/data/document.zod.ts`
</Callout>
Expand Down
3 changes: 0 additions & 3 deletions content/docs/references/data/driver-nosql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ description: Driver Nosql protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

NoSQL Database Type Enumeration
Supported NoSQL database types

<Callout type="info">
**Source:** `packages/spec/src/data/driver-nosql.zod.ts`
</Callout>
Expand Down
3 changes: 0 additions & 3 deletions content/docs/references/data/driver-sql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ description: Driver Sql protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

SQL Dialect Enumeration
Supported SQL database dialects

<Callout type="info">
**Source:** `packages/spec/src/data/driver-sql.zod.ts`
</Callout>
Expand Down
3 changes: 0 additions & 3 deletions content/docs/references/data/driver.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ description: Driver protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Common Driver Options
Passed to most driver methods to control behavior (transactions, timeouts, etc.)

<Callout type="info">
**Source:** `packages/spec/src/data/driver.zod.ts`
</Callout>
Expand Down
2 changes: 0 additions & 2 deletions content/docs/references/data/field.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ description: Field protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Field Type Enum

<Callout type="info">
**Source:** `packages/spec/src/data/field.zod.ts`
</Callout>
Expand Down
2 changes: 0 additions & 2 deletions content/docs/references/data/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ description: Object 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 Operations Enum

<Callout type="info">
**Source:** `packages/spec/src/data/object.zod.ts`
</Callout>
Expand Down
3 changes: 0 additions & 3 deletions content/docs/references/data/seed.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ description: Seed 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 Import Strategy
Defines how the engine handles existing records when a seed is applied.

<Callout type="info">
**Source:** `packages/spec/src/data/seed.zod.ts`
</Callout>
Expand Down
34 changes: 0 additions & 34 deletions content/docs/references/identity/position.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,6 @@ description: Position protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Position Schema — the flat capability-distribution group (ADR-0090 D3).

A position (岗位, "job role" in NetSuite/Workday terms) is a **named,
assignable bundle of permission sets**: users hold positions
(`sys_user_position`), positions bind permission sets
(`sys_position_permission_set`), and a user's capability is the union of
every set reached that way plus direct grants.

Positions are deliberately **flat** — no `parent`, no hierarchy. The
visibility hierarchy lives on the business-unit tree (`sys_business_unit`,
ADR-0057 D2) and the manager chain (`sys_user.manager_id`); re-adding a
second tree here is the mistake ADR-0057 D5 retired and ADR-0090 D3
finalizes.

VOCABULARY (ADR-0090 D3): the word "role" is reserved-forbidden across the
platform — capability = permission_set, distribution = position,
hierarchy = business_unit. The sole exception is better-auth's internal
`sys_member.role` (org-membership tier), projected as
`org_membership_level`.

**NAMING CONVENTION:**
Position names MUST be lowercase snake_case to prevent security issues.

@example Good position names
- 'sales_manager'
- 'ceo'
- 'region_east_vp'
- 'engineering_lead'

@example Bad position names (will be rejected)
- 'SalesManager' (camelCase)
- 'CEO' (uppercase)
- 'Region East VP' (spaces and uppercase)

<Callout type="info">
**Source:** `packages/spec/src/identity/position.zod.ts`
</Callout>
Expand Down
13 changes: 0 additions & 13 deletions content/docs/references/kernel/events-bus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ description: Events Bus protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Event Bus Configuration Schema
Complete configuration for the event bus system

@example
\{
"persistence": \{ "enabled": true, "retention": 365 \},
"queue": \{ "concurrency": 20 \},
"eventSourcing": \{ "enabled": true \},
"webhooks": [],
"messageQueue": \{ "provider": "kafka", "topic": "events" \},
"realtime": \{ "enabled": true, "protocol": "websocket" \}
\}

<Callout type="info">
**Source:** `packages/spec/src/kernel/events/bus.zod.ts`
</Callout>
Expand Down
4 changes: 0 additions & 4 deletions content/docs/references/kernel/events-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ description: Events Core protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Event Priority Enum
Priority levels for event processing
Lower numbers = higher priority

<Callout type="info">
**Source:** `packages/spec/src/kernel/events/core.zod.ts`
</Callout>
Expand Down
3 changes: 0 additions & 3 deletions content/docs/references/kernel/events-dlq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ description: Events Dlq protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Dead Letter Queue Entry Schema
Represents a failed event in the dead letter queue

<Callout type="info">
**Source:** `packages/spec/src/kernel/events/dlq.zod.ts`
</Callout>
Expand Down
3 changes: 0 additions & 3 deletions content/docs/references/kernel/events-handlers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ description: Events Handlers protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Event Handler Schema
Defines how to handle a specific event

<Callout type="info">
**Source:** `packages/spec/src/kernel/events/handlers.zod.ts`
</Callout>
Expand Down
11 changes: 0 additions & 11 deletions content/docs/references/kernel/events-integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@ description: Events Integrations protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Event Webhook Configuration Schema
Configuration for sending events to webhooks

@example
\{
"eventPattern": "order.*",
"url": "https://api.example.com/webhooks/orders",
"method": "POST",
"headers": \{ "Authorization": "Bearer token" \}
\}

<Callout type="info">
**Source:** `packages/spec/src/kernel/events/integrations.zod.ts`
</Callout>
Expand Down
13 changes: 0 additions & 13 deletions content/docs/references/kernel/events-queue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ description: Events Queue protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Event Queue Configuration Schema
Configuration for async event processing queue

@example
\{
"name": "event_queue",
"concurrency": 10,
"retryPolicy": \{
"maxRetries": 3,
"backoffStrategy": "exponential"
\}
\}

<Callout type="info">
**Source:** `packages/spec/src/kernel/events/queue.zod.ts`
</Callout>
Expand Down
14 changes: 0 additions & 14 deletions content/docs/references/kernel/execution-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,6 @@ description: Execution Context protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Execution Context Schema

Defines the runtime context that flows from HTTP request → data operations.
This is the "identity + environment" envelope that every data operation can carry.

Design:
- All fields are optional for backward compatibility
- `isSystem` bypasses permission checks (for internal/migration operations)
- `transaction` carries the database transaction handle for atomicity
- `traceId` enables distributed tracing across microservices

Usage:
engine.find('account', \{ context: \{ userId: '...', tenantId: '...' \} \})

<Callout type="info">
**Source:** `packages/spec/src/kernel/execution-context.zod.ts`
</Callout>
Expand Down
3 changes: 0 additions & 3 deletions content/docs/references/security/sharing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ description: Sharing protocol schemas

{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}

Organization-Wide Defaults (OWD)
The baseline security posture for an object.

<Callout type="info">
**Source:** `packages/spec/src/security/sharing.zod.ts`
</Callout>
Expand Down
Loading
Loading