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
61 changes: 61 additions & 0 deletions artifacts/store-schema/schemas/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,67 @@
"description": "true: every record this mount answers carries _owner, the opaque principal id of the owner (for auth, the user id; never an email or name), so a member can tell requesters apart. Only this mount shows it: the owner's mount, transitions and StoreExports never do."
}
}
},
"intervals": {
"description": "A non-overlap constraint for scheduling: among the records it applies to, no two in the same scope (and with equal within values) may hold overlapping half-open [start, end) intervals, so an interval ending where another starts is allowed. Checked inside the write transaction of every create, PUT, PATCH and transition against an index, never a scan of the collection; an overlap answers 409 interval_conflict and nothing is written, so a move that would overlap keeps the record where it was. Activation refuses stored records that already overlap. Not on a membership collection.",
"type": "object",
"additionalProperties": false,
"required": [
"start",
"end"
],
"properties": {
"start": {
"type": "string",
"pattern": "^[a-z][A-Za-z0-9_]{0,63}$",
"description": "A required property holding the start: a string with format: date-time, whose values must be UTC (ending in Z) with at most millisecond precision and compare as instants, or an integer or number."
},
"end": {
"type": "string",
"pattern": "^[a-z][A-Za-z0-9_]{0,63}$",
"description": "A required property of the same kind as start holding the end; a record whose end is not after its start answers 422 invalid_record."
},
"within": {
"type": "array",
"maxItems": 4,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[a-z][A-Za-z0-9_]{0,63}$"
},
"description": "Required properties that partition the constraint (a room, a resource): two intervals conflict only when every one of these is equal."
},
"scope": {
"enum": [
"collection",
"owner"
],
"description": "collection (default): every record blocks every other, across owners on an owned collection (another owner's conflicting record is never named). owner: with ownership: owner only, each owner's records are constrained among themselves."
},
"when": {
"type": "object",
"minProperties": 1,
"maxProperties": 8,
"propertyNames": {
"pattern": "^[a-z][A-Za-z0-9_]{0,63}$"
},
"additionalProperties": {
"oneOf": [
{
"type": "string",
"maxLength": 256
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"description": "Only records holding exactly these values take part, for example {status: booked} so a cancelled booking frees its slot; each value must satisfy its property's schema. Without it every record takes part."
}
}
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion docs/EXTENSION-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Two distinctions hold throughout:
| `audit` | Durable, bounded audit log other extensions record privileged actions into | — | config 1 | [@jimhoyd/urlcode-audit](../packages/audit/README.md#field-reference) |
| `auth` | Accounts and sessions from Better Auth on one mount; protected routes receive the signed-in user id | — | config 0 | [@jimhoyd/urlcode-auth](../packages/auth/README.md#field-reference) |
| `mcp` | Declarative MCP (Model Context Protocol) server: tools, resources and prompts backed by trusted project handlers | — | config 43 | [@jimhoyd/urlcode-mcp](../packages/mcp/README.md#field-reference) |
| `store` | SQLite-backed collections served as a bounded CRUD API, declared in YAML with no handler code | uses audit | config 44 | [@jimhoyd/urlcode-store](../packages/store/README.md#field-reference) |
| `store` | SQLite-backed collections served as a bounded CRUD API, declared in YAML with no handler code | uses audit | config 50 | [@jimhoyd/urlcode-store](../packages/store/README.md#field-reference) |
<!-- extension-reference:end -->

## Capability to reference
Expand Down
Loading
Loading