diff --git a/README.md b/README.md index 2b040f5..730e2f9 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,14 @@ standard library: ten ordinary record contracts and canonical implementing types, the four canonical record-change events, and inspectable timer-event and cancellation-action artifacts. Installing it is passive and grants no execution authority. +Pack 0.2.1 carries record contracts 1.1.0 and canonical types v2, which leave +the type key to the collection like the starters below: the 1.0.0 schemas +required and pinned `type: runtime_*` and rejected other top-level fields, so +runtime records were invalid in collections that declare types with +`mdbase_type`. Every 1.0.0-valid record stays valid under 1.1.0. Pack 0.2.0 is +hidden from the catalog; its artifacts stay byte-identical at their versioned +paths. 0.2.1 also gives every resource an explicit `managed` mode, which 0.2.0 +omitted. The `mdbase.contact` 1.2.0 pack offers one **Person** starter with portable IDs, editable issuer/subject account associations, and optional contact details. It @@ -87,7 +95,9 @@ dist/ deterministic publication artifact The runtime pack is generated in `mdbase-spec`. Contract and schema artifacts are imported byte-for-byte; its referenced canonical types are materialized as -editable inline schema snapshots for the catalog: +editable inline schema snapshots under `types/mdbase-runtime/v2/` for the +catalog. The importer adds the current pack version beside earlier ones and +refuses to overwrite a differing existing artifact: ```sh MDBASE_SPEC_DIR=../mdbase-spec npm run sync:runtime diff --git a/contracts/mdbase.runtime.action-attempt/1.1.0.md b/contracts/mdbase.runtime.action-attempt/1.1.0.md new file mode 100644 index 0000000..23d62c2 --- /dev/null +++ b/contracts/mdbase.runtime.action-attempt/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.action-attempt +version: 1.1.0 +name: Durable action attempt +description: Durable invocation intent and outcome evidence using the shared interoperability envelope. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.action-attempt/1.1.0.schema.json +--- + +# Durable action attempt + +Durable invocation intent and outcome evidence using the shared interoperability envelope. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/contracts/mdbase.runtime.capability-grant/1.1.0.md b/contracts/mdbase.runtime.capability-grant/1.1.0.md new file mode 100644 index 0000000..bdae78f --- /dev/null +++ b/contracts/mdbase.runtime.capability-grant/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.capability-grant +version: 1.1.0 +name: Capability grant evidence +description: A materialized authorization grant scoped independently from contract conformance. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.capability-grant/1.1.0.schema.json +--- + +# Capability grant evidence + +A materialized authorization grant scoped independently from contract conformance. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/contracts/mdbase.runtime.checkpoint/1.1.0.md b/contracts/mdbase.runtime.checkpoint/1.1.0.md new file mode 100644 index 0000000..e4d16e3 --- /dev/null +++ b/contracts/mdbase.runtime.checkpoint/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.checkpoint +version: 1.1.0 +name: Runtime checkpoint +description: A durable, lease-safe workflow continuation. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.checkpoint/1.1.0.schema.json +--- + +# Runtime checkpoint + +A durable, lease-safe workflow continuation. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/contracts/mdbase.runtime.dead-letter/1.1.0.md b/contracts/mdbase.runtime.dead-letter/1.1.0.md new file mode 100644 index 0000000..00ec93e --- /dev/null +++ b/contracts/mdbase.runtime.dead-letter/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.dead-letter +version: 1.1.0 +name: Runtime dead letter +description: Retained event or action evidence that cannot be processed safely. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.dead-letter/1.1.0.schema.json +--- + +# Runtime dead letter + +Retained event or action evidence that cannot be processed safely. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/contracts/mdbase.runtime.diagnostic/1.1.0.md b/contracts/mdbase.runtime.diagnostic/1.1.0.md new file mode 100644 index 0000000..021a541 --- /dev/null +++ b/contracts/mdbase.runtime.diagnostic/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.diagnostic +version: 1.1.0 +name: Runtime diagnostic +description: A machine-readable durable runtime diagnostic. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.diagnostic/1.1.0.schema.json +--- + +# Runtime diagnostic + +A machine-readable durable runtime diagnostic. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/contracts/mdbase.runtime.policy/1.1.0.md b/contracts/mdbase.runtime.policy/1.1.0.md new file mode 100644 index 0000000..51bbc75 --- /dev/null +++ b/contracts/mdbase.runtime.policy/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.policy +version: 1.1.0 +name: Runtime policy +description: Local authorization, executor, limit, and provider-selection policy. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.policy/1.1.0.schema.json +--- + +# Runtime policy + +Local authorization, executor, limit, and provider-selection policy. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/contracts/mdbase.runtime.provider-registration/1.1.0.md b/contracts/mdbase.runtime.provider-registration/1.1.0.md new file mode 100644 index 0000000..b9ddb77 --- /dev/null +++ b/contracts/mdbase.runtime.provider-registration/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.provider-registration +version: 1.1.0 +name: Provider registration evidence +description: An optional audit snapshot of a verified interoperability declaration; it never activates code. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.provider-registration/1.1.0.schema.json +--- + +# Provider registration evidence + +An optional audit snapshot of a verified interoperability declaration; it never activates code. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/contracts/mdbase.runtime.run/1.1.0.md b/contracts/mdbase.runtime.run/1.1.0.md new file mode 100644 index 0000000..1651718 --- /dev/null +++ b/contracts/mdbase.runtime.run/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.run +version: 1.1.0 +name: Durable run +description: The durable state and immutable admitted plan for one workflow execution. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.run/1.1.0.schema.json +--- + +# Durable run + +The durable state and immutable admitted plan for one workflow execution. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/contracts/mdbase.runtime.timer/1.1.0.md b/contracts/mdbase.runtime.timer/1.1.0.md new file mode 100644 index 0000000..8ce06f1 --- /dev/null +++ b/contracts/mdbase.runtime.timer/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.timer +version: 1.1.0 +name: Runtime timer +description: A generation-safe one-shot timer that publishes through the interoperability profile. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.timer/1.1.0.schema.json +--- + +# Runtime timer + +A generation-safe one-shot timer that publishes through the interoperability profile. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/contracts/mdbase.runtime.workflow/1.1.0.md b/contracts/mdbase.runtime.workflow/1.1.0.md new file mode 100644 index 0000000..3b7f8e3 --- /dev/null +++ b/contracts/mdbase.runtime.workflow/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.workflow +version: 1.1.0 +name: Durable workflow +description: A portable workflow whose event and action references are resolved and pinned at admission. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.workflow/1.1.0.schema.json +--- + +# Durable workflow + +A portable workflow whose event and action references are resolved and pinned at admission. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/contracts/mdbase.runtime.action-attempt/1.1.0.md b/dist/artifacts/contracts/mdbase.runtime.action-attempt/1.1.0.md new file mode 100644 index 0000000..23d62c2 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.action-attempt/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.action-attempt +version: 1.1.0 +name: Durable action attempt +description: Durable invocation intent and outcome evidence using the shared interoperability envelope. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.action-attempt/1.1.0.schema.json +--- + +# Durable action attempt + +Durable invocation intent and outcome evidence using the shared interoperability envelope. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/contracts/mdbase.runtime.capability-grant/1.1.0.md b/dist/artifacts/contracts/mdbase.runtime.capability-grant/1.1.0.md new file mode 100644 index 0000000..bdae78f --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.capability-grant/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.capability-grant +version: 1.1.0 +name: Capability grant evidence +description: A materialized authorization grant scoped independently from contract conformance. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.capability-grant/1.1.0.schema.json +--- + +# Capability grant evidence + +A materialized authorization grant scoped independently from contract conformance. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/contracts/mdbase.runtime.checkpoint/1.1.0.md b/dist/artifacts/contracts/mdbase.runtime.checkpoint/1.1.0.md new file mode 100644 index 0000000..e4d16e3 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.checkpoint/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.checkpoint +version: 1.1.0 +name: Runtime checkpoint +description: A durable, lease-safe workflow continuation. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.checkpoint/1.1.0.schema.json +--- + +# Runtime checkpoint + +A durable, lease-safe workflow continuation. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/contracts/mdbase.runtime.dead-letter/1.1.0.md b/dist/artifacts/contracts/mdbase.runtime.dead-letter/1.1.0.md new file mode 100644 index 0000000..00ec93e --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.dead-letter/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.dead-letter +version: 1.1.0 +name: Runtime dead letter +description: Retained event or action evidence that cannot be processed safely. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.dead-letter/1.1.0.schema.json +--- + +# Runtime dead letter + +Retained event or action evidence that cannot be processed safely. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/contracts/mdbase.runtime.diagnostic/1.1.0.md b/dist/artifacts/contracts/mdbase.runtime.diagnostic/1.1.0.md new file mode 100644 index 0000000..021a541 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.diagnostic/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.diagnostic +version: 1.1.0 +name: Runtime diagnostic +description: A machine-readable durable runtime diagnostic. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.diagnostic/1.1.0.schema.json +--- + +# Runtime diagnostic + +A machine-readable durable runtime diagnostic. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/contracts/mdbase.runtime.policy/1.1.0.md b/dist/artifacts/contracts/mdbase.runtime.policy/1.1.0.md new file mode 100644 index 0000000..51bbc75 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.policy/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.policy +version: 1.1.0 +name: Runtime policy +description: Local authorization, executor, limit, and provider-selection policy. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.policy/1.1.0.schema.json +--- + +# Runtime policy + +Local authorization, executor, limit, and provider-selection policy. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/contracts/mdbase.runtime.provider-registration/1.1.0.md b/dist/artifacts/contracts/mdbase.runtime.provider-registration/1.1.0.md new file mode 100644 index 0000000..b9ddb77 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.provider-registration/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.provider-registration +version: 1.1.0 +name: Provider registration evidence +description: An optional audit snapshot of a verified interoperability declaration; it never activates code. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.provider-registration/1.1.0.schema.json +--- + +# Provider registration evidence + +An optional audit snapshot of a verified interoperability declaration; it never activates code. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/contracts/mdbase.runtime.run/1.1.0.md b/dist/artifacts/contracts/mdbase.runtime.run/1.1.0.md new file mode 100644 index 0000000..1651718 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.run/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.run +version: 1.1.0 +name: Durable run +description: The durable state and immutable admitted plan for one workflow execution. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.run/1.1.0.schema.json +--- + +# Durable run + +The durable state and immutable admitted plan for one workflow execution. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/contracts/mdbase.runtime.timer/1.1.0.md b/dist/artifacts/contracts/mdbase.runtime.timer/1.1.0.md new file mode 100644 index 0000000..8ce06f1 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.timer/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.timer +version: 1.1.0 +name: Runtime timer +description: A generation-safe one-shot timer that publishes through the interoperability profile. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.timer/1.1.0.schema.json +--- + +# Runtime timer + +A generation-safe one-shot timer that publishes through the interoperability profile. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/contracts/mdbase.runtime.workflow/1.1.0.md b/dist/artifacts/contracts/mdbase.runtime.workflow/1.1.0.md new file mode 100644 index 0000000..3b7f8e3 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.workflow/1.1.0.md @@ -0,0 +1,23 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.workflow +version: 1.1.0 +name: Durable workflow +description: A portable workflow whose event and action references are resolved and pinned at admission. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.workflow/1.1.0.schema.json +--- + +# Durable workflow + +A portable workflow whose event and action references are resolved and pinned at admission. + +The record's type is declared under the collection's configured explicit type +key, so the schema neither requires nor pins a `type` field and accepts +top-level fields outside this contract. That is the only change from 1.0.0; +every record valid under 1.0.0 is also valid under 1.1.0. + +This artifact is passive. Installing it or a type that implements it grants no +authority to execute workflows or invoke providers. diff --git a/dist/artifacts/schemas/mdbase.runtime.action-attempt/1.1.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.action-attempt/1.1.0.schema.json new file mode 100644 index 0000000..70209ae --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.action-attempt/1.1.0.schema.json @@ -0,0 +1,230 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime action attempt", + "type": "object", + "required": [ + "id", + "run_id", + "step_id", + "request_id", + "invocation_id", + "attempt_id", + "contract", + "provider", + "provider_declaration_digest", + "status", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "step_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "request_id": { + "type": "string", + "minLength": 1 + }, + "invocation_id": { + "type": "string", + "minLength": 1 + }, + "attempt_id": { + "type": "string", + "minLength": 1 + }, + "contract": { + "$ref": "#/$defs/exactContractReference" + }, + "provider": { + "$ref": "#/$defs/identity" + }, + "provider_declaration_digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "handler_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "idempotency_key": { + "type": "string" + }, + "status": { + "enum": [ + "admitted", + "dispatching", + "succeeded", + "rejected", + "failed", + "cancelled", + "indeterminate" + ] + }, + "request": { + "type": "object" + }, + "invocation": { + "type": "object" + }, + "outcome": { + "type": "object" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.action-attempt/1.1.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.capability-grant/1.1.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.capability-grant/1.1.0.schema.json new file mode 100644 index 0000000..9b1c133 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.capability-grant/1.1.0.schema.json @@ -0,0 +1,189 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime capability grant", + "type": "object", + "required": [ + "id", + "capability", + "principal", + "mode", + "granted_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "capability": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "principal": { + "$ref": "#/$defs/identity" + }, + "mode": { + "enum": [ + "allow", + "deny" + ] + }, + "actions": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/contractRequirement" + } + }, + "providers": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/providerSelector" + } + }, + "granted_at": { + "type": "string", + "format": "date-time" + }, + "expires_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.capability-grant/1.1.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.checkpoint/1.1.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.checkpoint/1.1.0.schema.json new file mode 100644 index 0000000..f4e5526 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.checkpoint/1.1.0.schema.json @@ -0,0 +1,180 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime checkpoint", + "type": "object", + "required": [ + "id", + "run_id", + "generation", + "status", + "state", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "status": { + "enum": [ + "open", + "waiting", + "ready", + "completed", + "failed", + "cancelled" + ] + }, + "state": { + "type": "object" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.checkpoint/1.1.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.dead-letter/1.1.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.dead-letter/1.1.0.schema.json new file mode 100644 index 0000000..f754108 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.dead-letter/1.1.0.schema.json @@ -0,0 +1,183 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime dead letter", + "type": "object", + "required": [ + "id", + "reason", + "status", + "evidence", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "reason": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "status": { + "enum": [ + "unresolved", + "acknowledged", + "requeued" + ] + }, + "evidence_kind": { + "enum": [ + "event", + "action_request", + "action_outcome" + ] + }, + "evidence": { + "type": "object" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "acknowledged_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.dead-letter/1.1.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.diagnostic/1.1.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.diagnostic/1.1.0.schema.json new file mode 100644 index 0000000..dcfed28 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.diagnostic/1.1.0.schema.json @@ -0,0 +1,185 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime diagnostic", + "type": "object", + "required": [ + "id", + "severity", + "code", + "message", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "severity": { + "enum": [ + "info", + "warning", + "error" + ] + }, + "code": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "message": { + "type": "string", + "minLength": 1 + }, + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "attempt_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "path": { + "type": "string" + }, + "details": {}, + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.diagnostic/1.1.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.policy/1.1.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.policy/1.1.0.schema.json new file mode 100644 index 0000000..a85e1e7 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.policy/1.1.0.schema.json @@ -0,0 +1,255 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime policy", + "type": "object", + "required": [ + "id", + "version", + "enabled", + "grants" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "enabled": { + "type": "boolean" + }, + "executors": { + "type": "object", + "required": [], + "properties": { + "default": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "workflows": { + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "provider_selections": { + "type": "array", + "items": { + "type": "object", + "required": [ + "contract", + "selector" + ], + "properties": { + "contract": { + "$ref": "#/$defs/contractRequirement" + }, + "selector": { + "$ref": "#/$defs/providerSelector" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "grants": { + "type": "array", + "items": { + "type": "object", + "required": [ + "capability", + "mode" + ], + "properties": { + "capability": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "mode": { + "enum": [ + "allow", + "deny" + ] + }, + "actions": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/contractRequirement" + } + }, + "providers": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/providerSelector" + } + }, + "max_calls_per_run": { + "type": "integer", + "minimum": 1 + }, + "max_records_per_run": { + "type": "integer", + "minimum": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.policy/1.1.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.provider-registration/1.1.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.provider-registration/1.1.0.schema.json new file mode 100644 index 0000000..0999753 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.provider-registration/1.1.0.schema.json @@ -0,0 +1,170 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime provider registration evidence", + "type": "object", + "required": [ + "id", + "declaration_kind", + "declaration", + "verified_at", + "active" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "declaration_kind": { + "enum": [ + "event_source", + "action_provider" + ] + }, + "declaration": { + "type": "object" + }, + "verified_at": { + "type": "string", + "format": "date-time" + }, + "active": { + "type": "boolean" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.provider-registration/1.1.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.run/1.1.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.run/1.1.0.schema.json new file mode 100644 index 0000000..4967455 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.run/1.1.0.schema.json @@ -0,0 +1,348 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime run", + "type": "object", + "required": [ + "id", + "workflow_id", + "workflow_version", + "workflow_revision", + "event_id", + "event_contract", + "admitted_plan", + "status", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "workflow_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "workflow_version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "workflow_revision": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "event_id": { + "type": "string", + "minLength": 1 + }, + "event_contract": { + "$ref": "#/$defs/exactContractReference" + }, + "event_source": { + "$ref": "#/$defs/identity" + }, + "admitted_plan": { + "$ref": "#/$defs/admittedPlan" + }, + "policy_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "policy_revision": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "trigger_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "event_cursor": { + "type": "integer", + "minimum": 1 + }, + "executor": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "idempotency_key": { + "type": "string" + }, + "concurrency_group": { + "type": "string" + }, + "status": { + "enum": [ + "queued", + "running", + "waiting", + "succeeded", + "failed", + "cancelled", + "indeterminate" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "finished_at": { + "type": "string", + "format": "date-time" + }, + "lease": { + "$ref": "#/$defs/lease" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "admittedPlan": { + "type": "object", + "required": [ + "profile_version", + "workflow_revision", + "event", + "steps" + ], + "properties": { + "profile_version": { + "const": "0.2" + }, + "workflow_revision": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "event": { + "type": "object", + "required": [ + "contract", + "source" + ], + "properties": { + "contract": { + "$ref": "#/$defs/exactContractReference" + }, + "source": { + "$ref": "#/$defs/identity" + }, + "source_declaration_digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "contract", + "provider", + "provider_declaration_digest", + "handler_id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "contract": { + "$ref": "#/$defs/exactContractReference" + }, + "provider": { + "$ref": "#/$defs/identity" + }, + "provider_declaration_digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "handler_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "lease": { + "type": "object", + "required": [ + "owner", + "token", + "expires_at" + ], + "properties": { + "owner": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "token": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "string", + "format": "date-time" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.run/1.1.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.timer/1.1.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.timer/1.1.0.schema.json new file mode 100644 index 0000000..5a2862b --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.timer/1.1.0.schema.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime timer", + "type": "object", + "required": [ + "id", + "generation", + "status", + "fire_at", + "event", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "status": { + "enum": [ + "scheduled", + "firing", + "fired", + "cancelled" + ] + }, + "fire_at": { + "type": "string", + "format": "date-time" + }, + "event": { + "type": "object", + "required": [ + "contract", + "data" + ], + "properties": { + "contract": { + "$ref": "#/$defs/contractRequirement" + }, + "subject": { + "type": "string" + }, + "correlation_id": { + "type": "string" + }, + "causation_id": { + "type": "string" + }, + "data": {} + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "missed_run_policy": { + "const": "fire_once" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "fired_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.timer/1.1.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.workflow/1.1.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.workflow/1.1.0.schema.json new file mode 100644 index 0000000..fa23800 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.workflow/1.1.0.schema.json @@ -0,0 +1,384 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime workflow", + "type": "object", + "required": [ + "id", + "version", + "name", + "enabled", + "triggers", + "steps" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "requires": { + "$ref": "#/$defs/requires" + }, + "vars": { + "type": "object", + "additionalProperties": {} + }, + "triggers": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/trigger" + } + }, + "steps": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/step" + } + }, + "run": { + "$ref": "#/$defs/runPolicy" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "requires": { + "type": "object", + "required": [], + "properties": { + "capabilities": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "trigger": { + "type": "object", + "required": [ + "id", + "event" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "event": { + "$ref": "#/$defs/contractRequirement" + }, + "if": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "debounce": { + "$ref": "#/$defs/duration" + }, + "minimum_interval": { + "$ref": "#/$defs/duration" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "step": { + "type": "object", + "required": [ + "id", + "action" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "name": { + "type": "string" + }, + "action": { + "$ref": "#/$defs/contractRequirement" + }, + "provider": { + "$ref": "#/$defs/providerSelector" + }, + "requires": { + "$ref": "#/$defs/requires" + }, + "if": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "input": { + "type": "object", + "additionalProperties": {} + }, + "for_each": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": {}, + "as": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "duration": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)(ms|s|m|h|d)$" + }, + "runPolicy": { + "type": "object", + "required": [], + "properties": { + "idempotency": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": {} + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "concurrency": { + "type": "object", + "required": [ + "policy" + ], + "properties": { + "group": {}, + "policy": { + "enum": [ + "skip", + "queue", + "replace", + "allow" + ] + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "limits": { + "type": "object", + "required": [], + "properties": { + "timeout": { + "$ref": "#/$defs/duration" + }, + "max_items": { + "type": "integer", + "minimum": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "on_error": { + "enum": [ + "stop", + "continue" + ] + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.workflow/1.1.0.schema.json" +} diff --git a/dist/artifacts/types/mdbase-runtime/v2/action-attempt.md b/dist/artifacts/types/mdbase-runtime/v2/action-attempt.md new file mode 100644 index 0000000..9126566 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/v2/action-attempt.md @@ -0,0 +1,214 @@ +--- +kind: mdbase.type +name: runtime_action_attempt +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.action-attempt. +match: + where: + type: runtime_action_attempt +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime action attempt + type: object + required: + - id + - run_id + - step_id + - request_id + - invocation_id + - attempt_id + - contract + - provider + - provider_declaration_digest + - status + - created_at + - updated_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + run_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + step_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + request_id: + type: string + minLength: 1 + invocation_id: + type: string + minLength: 1 + attempt_id: + type: string + minLength: 1 + contract: + $ref: "#/$defs/exactContractReference" + provider: + $ref: "#/$defs/identity" + provider_declaration_digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + handler_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + idempotency_key: + type: string + status: + enum: + - admitted + - dispatching + - succeeded + - rejected + - failed + - cancelled + - indeterminate + request: + type: object + invocation: + type: object + outcome: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + completed_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.action-attempt/1.1.0.schema.json +implements: + - contract: mdbase.runtime.action-attempt + version: 1.1.0 + fields: + id: id + run_id: run_id + step_id: step_id + request_id: request_id + invocation_id: invocation_id + attempt_id: attempt_id + contract: contract + provider: provider + provider_declaration_digest: provider_declaration_digest + handler_id: handler_id + idempotency_key: idempotency_key + status: status + request: request + invocation: invocation + outcome: outcome + created_at: created_at + updated_at: updated_at + completed_at: completed_at +--- + +# Durable action attempt + +This canonical type makes `runtime_action_attempt` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_action_attempt` records in collections +whose type key is something else. diff --git a/dist/artifacts/types/mdbase-runtime/v2/capability-grant.md b/dist/artifacts/types/mdbase-runtime/v2/capability-grant.md new file mode 100644 index 0000000..672a20a --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/v2/capability-grant.md @@ -0,0 +1,171 @@ +--- +kind: mdbase.type +name: runtime_capability_grant +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.capability-grant. +match: + where: + type: runtime_capability_grant +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase runtime capability grant + type: object + required: + - id + - capability + - principal + - mode + - granted_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + capability: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + principal: + $ref: "#/$defs/identity" + mode: + enum: + - allow + - deny + actions: + type: array + uniqueItems: true + items: + $ref: "#/$defs/contractRequirement" + providers: + type: array + uniqueItems: true + items: + $ref: "#/$defs/providerSelector" + granted_at: + type: string + format: date-time + expires_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.capability-grant/1.1.0.schema.json +implements: + - contract: mdbase.runtime.capability-grant + version: 1.1.0 + fields: + id: id + capability: capability + principal: principal + mode: mode + actions: actions + providers: providers + granted_at: granted_at + expires_at: expires_at +--- + +# Capability grant evidence + +This canonical type makes `runtime_capability_grant` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_capability_grant` records in collections +whose type key is something else. diff --git a/dist/artifacts/types/mdbase-runtime/v2/checkpoint.md b/dist/artifacts/types/mdbase-runtime/v2/checkpoint.md new file mode 100644 index 0000000..62ff56f --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/v2/checkpoint.md @@ -0,0 +1,164 @@ +--- +kind: mdbase.type +name: runtime_checkpoint +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.checkpoint. +match: + where: + type: runtime_checkpoint +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime checkpoint + type: object + required: + - id + - run_id + - generation + - status + - state + - updated_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + run_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + generation: + type: integer + minimum: 1 + status: + enum: + - open + - waiting + - ready + - completed + - failed + - cancelled + state: + type: object + updated_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.checkpoint/1.1.0.schema.json +implements: + - contract: mdbase.runtime.checkpoint + version: 1.1.0 + fields: + id: id + run_id: run_id + generation: generation + status: status + state: state + updated_at: updated_at +--- + +# Runtime checkpoint + +This canonical type makes `runtime_checkpoint` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_checkpoint` records in collections +whose type key is something else. diff --git a/dist/artifacts/types/mdbase-runtime/v2/dead-letter.md b/dist/artifacts/types/mdbase-runtime/v2/dead-letter.md new file mode 100644 index 0000000..21be651 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/v2/dead-letter.md @@ -0,0 +1,166 @@ +--- +kind: mdbase.type +name: runtime_dead_letter +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.dead-letter. +match: + where: + type: runtime_dead_letter +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime dead letter + type: object + required: + - id + - reason + - status + - evidence + - created_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + reason: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + status: + enum: + - unresolved + - acknowledged + - requeued + evidence_kind: + enum: + - event + - action_request + - action_outcome + evidence: + type: object + created_at: + type: string + format: date-time + acknowledged_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.dead-letter/1.1.0.schema.json +implements: + - contract: mdbase.runtime.dead-letter + version: 1.1.0 + fields: + id: id + reason: reason + status: status + evidence_kind: evidence_kind + evidence: evidence + created_at: created_at + acknowledged_at: acknowledged_at +--- + +# Runtime dead letter + +This canonical type makes `runtime_dead_letter` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_dead_letter` records in collections +whose type key is something else. diff --git a/dist/artifacts/types/mdbase-runtime/v2/diagnostic.md b/dist/artifacts/types/mdbase-runtime/v2/diagnostic.md new file mode 100644 index 0000000..34ed583 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/v2/diagnostic.md @@ -0,0 +1,170 @@ +--- +kind: mdbase.type +name: runtime_diagnostic +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.diagnostic. +match: + where: + type: runtime_diagnostic +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime diagnostic + type: object + required: + - id + - severity + - code + - message + - created_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + severity: + enum: + - info + - warning + - error + code: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + message: + type: string + minLength: 1 + run_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + attempt_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + path: + type: string + details: {} + created_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.diagnostic/1.1.0.schema.json +implements: + - contract: mdbase.runtime.diagnostic + version: 1.1.0 + fields: + id: id + severity: severity + code: code + message: message + run_id: run_id + attempt_id: attempt_id + path: path + details: details + created_at: created_at +--- + +# Runtime diagnostic + +This canonical type makes `runtime_diagnostic` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_diagnostic` records in collections +whose type key is something else. diff --git a/dist/artifacts/types/mdbase-runtime/v2/policy.md b/dist/artifacts/types/mdbase-runtime/v2/policy.md new file mode 100644 index 0000000..c4d9f68 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/v2/policy.md @@ -0,0 +1,216 @@ +--- +kind: mdbase.type +name: runtime_policy +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.policy. +match: + where: + type: runtime_policy +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime policy + type: object + required: + - id + - version + - enabled + - grants + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + name: + type: string + minLength: 1 + enabled: + type: boolean + executors: + type: object + required: [] + properties: + default: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + workflows: + type: object + additionalProperties: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + provider_selections: + type: array + items: + type: object + required: + - contract + - selector + properties: + contract: + $ref: "#/$defs/contractRequirement" + selector: + $ref: "#/$defs/providerSelector" + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + grants: + type: array + items: + type: object + required: + - capability + - mode + properties: + capability: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + mode: + enum: + - allow + - deny + actions: + type: array + uniqueItems: true + items: + $ref: "#/$defs/contractRequirement" + providers: + type: array + uniqueItems: true + items: + $ref: "#/$defs/providerSelector" + max_calls_per_run: + type: integer + minimum: 1 + max_records_per_run: + type: integer + minimum: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.policy/1.1.0.schema.json +implements: + - contract: mdbase.runtime.policy + version: 1.1.0 + fields: + id: id + version: version + name: name + enabled: enabled + executors: executors + provider_selections: provider_selections + grants: grants +--- + +# Runtime policy + +This canonical type makes `runtime_policy` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_policy` records in collections +whose type key is something else. diff --git a/dist/artifacts/types/mdbase-runtime/v2/provider-registration.md b/dist/artifacts/types/mdbase-runtime/v2/provider-registration.md new file mode 100644 index 0000000..d02b2c8 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/v2/provider-registration.md @@ -0,0 +1,154 @@ +--- +kind: mdbase.type +name: runtime_provider_registration +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.provider-registration. +match: + where: + type: runtime_provider_registration +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase runtime provider registration evidence + type: object + required: + - id + - declaration_kind + - declaration + - verified_at + - active + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + declaration_kind: + enum: + - event_source + - action_provider + declaration: + type: object + verified_at: + type: string + format: date-time + active: + type: boolean + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.provider-registration/1.1.0.schema.json +implements: + - contract: mdbase.runtime.provider-registration + version: 1.1.0 + fields: + id: id + declaration_kind: declaration_kind + declaration: declaration + verified_at: verified_at + active: active +--- + +# Provider registration evidence + +This canonical type makes `runtime_provider_registration` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_provider_registration` records in collections +whose type key is something else. diff --git a/dist/artifacts/types/mdbase-runtime/v2/run.md b/dist/artifacts/types/mdbase-runtime/v2/run.md new file mode 100644 index 0000000..166a900 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/v2/run.md @@ -0,0 +1,302 @@ +--- +kind: mdbase.type +name: runtime_run +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.run. +match: + where: + type: runtime_run +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime run + type: object + required: + - id + - workflow_id + - workflow_version + - workflow_revision + - event_id + - event_contract + - admitted_plan + - status + - created_at + - updated_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + workflow_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + workflow_version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + workflow_revision: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + event_id: + type: string + minLength: 1 + event_contract: + $ref: "#/$defs/exactContractReference" + event_source: + $ref: "#/$defs/identity" + admitted_plan: + $ref: "#/$defs/admittedPlan" + policy_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + policy_revision: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + trigger_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + event_cursor: + type: integer + minimum: 1 + executor: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + idempotency_key: + type: string + concurrency_group: + type: string + status: + enum: + - queued + - running + - waiting + - succeeded + - failed + - cancelled + - indeterminate + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + started_at: + type: string + format: date-time + finished_at: + type: string + format: date-time + lease: + $ref: "#/$defs/lease" + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + admittedPlan: + type: object + required: + - profile_version + - workflow_revision + - event + - steps + properties: + profile_version: + const: "0.2" + workflow_revision: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + event: + type: object + required: + - contract + - source + properties: + contract: + $ref: "#/$defs/exactContractReference" + source: + $ref: "#/$defs/identity" + source_declaration_digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + steps: + type: array + items: + type: object + required: + - id + - contract + - provider + - provider_declaration_digest + - handler_id + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + contract: + $ref: "#/$defs/exactContractReference" + provider: + $ref: "#/$defs/identity" + provider_declaration_digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + handler_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + lease: + type: object + required: + - owner + - token + - expires_at + properties: + owner: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + token: + type: string + minLength: 1 + expires_at: + type: string + format: date-time + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.run/1.1.0.schema.json +implements: + - contract: mdbase.runtime.run + version: 1.1.0 + fields: + id: id + workflow_id: workflow_id + workflow_version: workflow_version + workflow_revision: workflow_revision + event_id: event_id + event_contract: event_contract + event_source: event_source + admitted_plan: admitted_plan + policy_id: policy_id + policy_revision: policy_revision + trigger_id: trigger_id + event_cursor: event_cursor + executor: executor + idempotency_key: idempotency_key + concurrency_group: concurrency_group + status: status + created_at: created_at + updated_at: updated_at + started_at: started_at + finished_at: finished_at + lease: lease +--- + +# Durable run + +This canonical type makes `runtime_run` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_run` records in collections +whose type key is something else. diff --git a/dist/artifacts/types/mdbase-runtime/v2/timer.md b/dist/artifacts/types/mdbase-runtime/v2/timer.md new file mode 100644 index 0000000..cf1bd56 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/v2/timer.md @@ -0,0 +1,190 @@ +--- +kind: mdbase.type +name: runtime_timer +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.timer. +match: + where: + type: runtime_timer +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime timer + type: object + required: + - id + - generation + - status + - fire_at + - event + - created_at + - updated_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + generation: + type: integer + minimum: 1 + status: + enum: + - scheduled + - firing + - fired + - cancelled + fire_at: + type: string + format: date-time + event: + type: object + required: + - contract + - data + properties: + contract: + $ref: "#/$defs/contractRequirement" + subject: + type: string + correlation_id: + type: string + causation_id: + type: string + data: {} + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + missed_run_policy: + const: fire_once + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + fired_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.timer/1.1.0.schema.json +implements: + - contract: mdbase.runtime.timer + version: 1.1.0 + fields: + id: id + generation: generation + status: status + fire_at: fire_at + event: event + missed_run_policy: missed_run_policy + created_at: created_at + updated_at: updated_at + fired_at: fired_at +--- + +# Runtime timer + +This canonical type makes `runtime_timer` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_timer` records in collections +whose type key is something else. diff --git a/dist/artifacts/types/mdbase-runtime/v2/workflow.md b/dist/artifacts/types/mdbase-runtime/v2/workflow.md new file mode 100644 index 0000000..db05584 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/v2/workflow.md @@ -0,0 +1,310 @@ +--- +kind: mdbase.type +name: runtime_workflow +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.workflow. +match: + where: + type: runtime_workflow +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime workflow + type: object + required: + - id + - version + - name + - enabled + - triggers + - steps + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + name: + type: string + minLength: 1 + description: + type: string + enabled: + type: boolean + requires: + $ref: "#/$defs/requires" + vars: + type: object + additionalProperties: {} + triggers: + type: array + minItems: 1 + items: + $ref: "#/$defs/trigger" + steps: + type: array + minItems: 1 + items: + $ref: "#/$defs/step" + run: + $ref: "#/$defs/runPolicy" + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + requires: + type: object + required: [] + properties: + capabilities: + type: array + uniqueItems: true + items: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + trigger: + type: object + required: + - id + - event + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + event: + $ref: "#/$defs/contractRequirement" + if: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + debounce: + $ref: "#/$defs/duration" + minimum_interval: + $ref: "#/$defs/duration" + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + step: + type: object + required: + - id + - action + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + name: + type: string + action: + $ref: "#/$defs/contractRequirement" + provider: + $ref: "#/$defs/providerSelector" + requires: + $ref: "#/$defs/requires" + if: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + input: + type: object + additionalProperties: {} + for_each: + type: object + required: + - items + properties: + items: {} + as: + type: string + pattern: ^[A-Za-z_][A-Za-z0-9_]*$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + duration: + type: string + pattern: ^(0|[1-9][0-9]*)(ms|s|m|h|d)$ + runPolicy: + type: object + required: [] + properties: + idempotency: + type: object + required: + - key + properties: + key: {} + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + concurrency: + type: object + required: + - policy + properties: + group: {} + policy: + enum: + - skip + - queue + - replace + - allow + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + limits: + type: object + required: [] + properties: + timeout: + $ref: "#/$defs/duration" + max_items: + type: integer + minimum: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + on_error: + enum: + - stop + - continue + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.workflow/1.1.0.schema.json +implements: + - contract: mdbase.runtime.workflow + version: 1.1.0 + fields: + id: id + version: version + name: name + description: description + enabled: enabled + requires: requires + vars: vars + triggers: triggers + steps: steps + run: run +--- + +# Durable workflow + +This canonical type makes `runtime_workflow` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_workflow` records in collections +whose type key is something else. diff --git a/dist/catalog.json b/dist/catalog.json index 5180e91..590e630 100644 --- a/dist/catalog.json +++ b/dist/catalog.json @@ -129,6 +129,16 @@ "artifact": "./artifacts/contracts/mdbase.runtime.action-attempt/1.0.0.md", "standards": [] }, + { + "id": "mdbase.runtime.action-attempt", + "version": "1.1.0", + "name": "Durable action attempt", + "description": "Durable invocation intent and outcome evidence using the shared interoperability envelope.", + "contract_type": "record", + "digest": "sha256:0c43ed2d09c6979974ffe40546e84c5ee3f670e667b1f65ba8594f0a8c8ad5ed", + "artifact": "./artifacts/contracts/mdbase.runtime.action-attempt/1.1.0.md", + "standards": [] + }, { "id": "mdbase.runtime.capability-grant", "version": "1.0.0", @@ -139,6 +149,16 @@ "artifact": "./artifacts/contracts/mdbase.runtime.capability-grant/1.0.0.md", "standards": [] }, + { + "id": "mdbase.runtime.capability-grant", + "version": "1.1.0", + "name": "Capability grant evidence", + "description": "A materialized authorization grant scoped independently from contract conformance.", + "contract_type": "record", + "digest": "sha256:09a0be953976b05820484b2d6f3160c85aca870eae7dd874f815abea6f1756dd", + "artifact": "./artifacts/contracts/mdbase.runtime.capability-grant/1.1.0.md", + "standards": [] + }, { "id": "mdbase.runtime.checkpoint", "version": "1.0.0", @@ -149,6 +169,16 @@ "artifact": "./artifacts/contracts/mdbase.runtime.checkpoint/1.0.0.md", "standards": [] }, + { + "id": "mdbase.runtime.checkpoint", + "version": "1.1.0", + "name": "Runtime checkpoint", + "description": "A durable, lease-safe workflow continuation.", + "contract_type": "record", + "digest": "sha256:f7b7377b8b62f00aac57394f9d9f203e0aa027c4dfa30d12673d78c79d48fe08", + "artifact": "./artifacts/contracts/mdbase.runtime.checkpoint/1.1.0.md", + "standards": [] + }, { "id": "mdbase.runtime.dead-letter", "version": "1.0.0", @@ -159,6 +189,16 @@ "artifact": "./artifacts/contracts/mdbase.runtime.dead-letter/1.0.0.md", "standards": [] }, + { + "id": "mdbase.runtime.dead-letter", + "version": "1.1.0", + "name": "Runtime dead letter", + "description": "Retained event or action evidence that cannot be processed safely.", + "contract_type": "record", + "digest": "sha256:f724d7d2fc345e9fd731355e52917d950b689b48db809d8a7a126ad8c8e38007", + "artifact": "./artifacts/contracts/mdbase.runtime.dead-letter/1.1.0.md", + "standards": [] + }, { "id": "mdbase.runtime.diagnostic", "version": "1.0.0", @@ -169,6 +209,16 @@ "artifact": "./artifacts/contracts/mdbase.runtime.diagnostic/1.0.0.md", "standards": [] }, + { + "id": "mdbase.runtime.diagnostic", + "version": "1.1.0", + "name": "Runtime diagnostic", + "description": "A machine-readable durable runtime diagnostic.", + "contract_type": "record", + "digest": "sha256:bc188903c01074bd061b71a2a65727662989a4422ce620e1effb4b0d5247cba1", + "artifact": "./artifacts/contracts/mdbase.runtime.diagnostic/1.1.0.md", + "standards": [] + }, { "id": "mdbase.runtime.policy", "version": "1.0.0", @@ -179,6 +229,16 @@ "artifact": "./artifacts/contracts/mdbase.runtime.policy/1.0.0.md", "standards": [] }, + { + "id": "mdbase.runtime.policy", + "version": "1.1.0", + "name": "Runtime policy", + "description": "Local authorization, executor, limit, and provider-selection policy.", + "contract_type": "record", + "digest": "sha256:3c400824980207d94329945037f19a064cba2c368aa1caa8f737dd9fb1df3911", + "artifact": "./artifacts/contracts/mdbase.runtime.policy/1.1.0.md", + "standards": [] + }, { "id": "mdbase.runtime.provider-registration", "version": "1.0.0", @@ -189,6 +249,16 @@ "artifact": "./artifacts/contracts/mdbase.runtime.provider-registration/1.0.0.md", "standards": [] }, + { + "id": "mdbase.runtime.provider-registration", + "version": "1.1.0", + "name": "Provider registration evidence", + "description": "An optional audit snapshot of a verified interoperability declaration; it never activates code.", + "contract_type": "record", + "digest": "sha256:9bd9bfbac90886ff882aeb3edd8b0446f2bfb342775faa52a48349156fc44b2a", + "artifact": "./artifacts/contracts/mdbase.runtime.provider-registration/1.1.0.md", + "standards": [] + }, { "id": "mdbase.runtime.run.cancel", "version": "1.0.0", @@ -209,6 +279,16 @@ "artifact": "./artifacts/contracts/mdbase.runtime.run/1.0.0.md", "standards": [] }, + { + "id": "mdbase.runtime.run", + "version": "1.1.0", + "name": "Durable run", + "description": "The durable state and immutable admitted plan for one workflow execution.", + "contract_type": "record", + "digest": "sha256:347fcf0b806bc969e555aadc07bc7dcd3b5b67ffb9063e8d613d890db45cae61", + "artifact": "./artifacts/contracts/mdbase.runtime.run/1.1.0.md", + "standards": [] + }, { "id": "mdbase.runtime.timer.fired", "version": "1.0.0", @@ -229,6 +309,16 @@ "artifact": "./artifacts/contracts/mdbase.runtime.timer/1.0.0.md", "standards": [] }, + { + "id": "mdbase.runtime.timer", + "version": "1.1.0", + "name": "Runtime timer", + "description": "A generation-safe one-shot timer that publishes through the interoperability profile.", + "contract_type": "record", + "digest": "sha256:c54924aa0a6c88c7808cfbc94d36bdb6d56e0c7e19198c46bc71e5c11fbc4dc0", + "artifact": "./artifacts/contracts/mdbase.runtime.timer/1.1.0.md", + "standards": [] + }, { "id": "mdbase.runtime.workflow", "version": "1.0.0", @@ -239,6 +329,16 @@ "artifact": "./artifacts/contracts/mdbase.runtime.workflow/1.0.0.md", "standards": [] }, + { + "id": "mdbase.runtime.workflow", + "version": "1.1.0", + "name": "Durable workflow", + "description": "A portable workflow whose event and action references are resolved and pinned at admission.", + "contract_type": "record", + "digest": "sha256:763cce69ac9dd85502f9d9ca07be514adbad7f9e81bc69ca4d4e1e26d7b84b0b", + "artifact": "./artifacts/contracts/mdbase.runtime.workflow/1.1.0.md", + "standards": [] + }, { "id": "mdbase.view", "version": "1.0.0", @@ -714,6 +814,125 @@ "Runtime 0.2" ] }, + "installation": { + "visibility": "hidden", + "recommendation": "integration-managed", + "primary_type": null, + "caution": "Most collections do not need this pack. Install it only when a runtime integration asks you to.", + "types": [ + { + "name": "runtime_workflow", + "label": "Runtime workflow" + }, + { + "name": "runtime_policy", + "label": "Runtime policy" + }, + { + "name": "runtime_provider_registration", + "label": "Runtime provider registration" + }, + { + "name": "runtime_capability_grant", + "label": "Runtime capability grant" + }, + { + "name": "runtime_run", + "label": "Runtime run" + }, + { + "name": "runtime_action_attempt", + "label": "Runtime action attempt" + }, + { + "name": "runtime_checkpoint", + "label": "Runtime checkpoint" + }, + { + "name": "runtime_timer", + "label": "Runtime timer" + }, + { + "name": "runtime_diagnostic", + "label": "Runtime diagnostic" + }, + { + "name": "runtime_dead_letter", + "label": "Runtime dead letter" + } + ] + } + }, + { + "id": "mdbase.runtime.standard", + "version": "0.2.1", + "name": "mdbase durable runtime standard library", + "description": "Runtime record implementations and inspectable built-in event/action contracts.", + "digest": "sha256:4c18e5608e2dd4a53bcb9c08c13483182e160bd814e477aaffc97f52f57c9a29", + "provision": "./packs/mdbase.runtime.standard/0.2.1.json", + "provides": [ + { + "id": "mdbase.runtime.action-attempt", + "version": "1.1.0", + "digest": "sha256:b1532c38d69fe0728b92203cd16662aa6877e022add3e9b33e6a4f9df61491c8" + }, + { + "id": "mdbase.runtime.capability-grant", + "version": "1.1.0", + "digest": "sha256:7cee5ce74c6e8eab140d6cfdf5100520024636b27b6c17087cd7484ac42c4c85" + }, + { + "id": "mdbase.runtime.checkpoint", + "version": "1.1.0", + "digest": "sha256:83dde7ee10549898cb7bb3b35a5c9fcd911af8e122fa0dc9f9ddce3d9ed2bd9c" + }, + { + "id": "mdbase.runtime.dead-letter", + "version": "1.1.0", + "digest": "sha256:3c114b7ae91b9c3b8edab87fcc0c1abb48c5505f3c55265019cf1eb1daeb104b" + }, + { + "id": "mdbase.runtime.diagnostic", + "version": "1.1.0", + "digest": "sha256:6cf2f280ad5c5c06f29a149e7de723668bdd870e6c341e2a370d953a9888ec85" + }, + { + "id": "mdbase.runtime.policy", + "version": "1.1.0", + "digest": "sha256:b915b5151e103936f965c8db6182ff44330ebfdf2bf9c1fc78ec374c6aae0965" + }, + { + "id": "mdbase.runtime.provider-registration", + "version": "1.1.0", + "digest": "sha256:4fd5c276f9edc86ca12bd5781519e6bd63dd04042144537013e89c088a5ef70c" + }, + { + "id": "mdbase.runtime.run", + "version": "1.1.0", + "digest": "sha256:527a22c70466d5f386d078793390426c5f75aaf8d78c573401518bda0a8eb0f7" + }, + { + "id": "mdbase.runtime.timer", + "version": "1.1.0", + "digest": "sha256:b12041cd617784b6ab3546da879c5553d4717ddf8399891be81f9c0d2a9def71" + }, + { + "id": "mdbase.runtime.workflow", + "version": "1.1.0", + "digest": "sha256:eeff8604e96d018a403bfeeede0effa81f4dab7ec2a73e8dbba8a04d8707c24c" + } + ], + "resource_count": 63, + "display": { + "name": "Runtime standard library", + "summary": "Internal records and contracts for durable workflows, runs, timers, and diagnostics.", + "category": "infrastructure", + "audience": "infrastructure", + "icon": "terminal-window", + "badges": [ + "Runtime 0.2" + ] + }, "installation": { "visibility": "advanced", "recommendation": "integration-managed", diff --git a/dist/packs/mdbase.runtime.standard/0.2.1.json b/dist/packs/mdbase.runtime.standard/0.2.1.json new file mode 100644 index 0000000..674a4ef --- /dev/null +++ b/dist/packs/mdbase.runtime.standard/0.2.1.json @@ -0,0 +1,758 @@ +{ + "manifest": { + "kind": "mdbase.type-pack", + "id": "mdbase.runtime.standard", + "version": "0.2.1", + "name": "mdbase durable runtime standard library", + "description": "Runtime record implementations and inspectable built-in event/action contracts.", + "resources": [ + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.workflow/1.1.0.schema.json", + "target": "schemas/mdbase.runtime.workflow/1.1.0.schema.json", + "digest": "sha256:d5d4100ff7d66e8856f6959fbd318c39d2d2aa04aab03a6dd315f7dec082fd21" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.workflow/1.1.0.md", + "target": "_contracts/mdbase.runtime.workflow/1.1.0.md", + "digest": "sha256:763cce69ac9dd85502f9d9ca07be514adbad7f9e81bc69ca4d4e1e26d7b84b0b" + }, + { + "kind": "type", + "mode": "managed", + "source": "types/mdbase-runtime/v2/workflow.md", + "target": "_types/workflow.md", + "digest": "sha256:ccec88eca9bd7462aa73ed755efae888615ac55c909ab417aee1a438e2849aa0" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.policy/1.1.0.schema.json", + "target": "schemas/mdbase.runtime.policy/1.1.0.schema.json", + "digest": "sha256:851d02b3132b857009182e4ac35029c62fe1862080629e8dd8448845e8f09195" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.policy/1.1.0.md", + "target": "_contracts/mdbase.runtime.policy/1.1.0.md", + "digest": "sha256:3c400824980207d94329945037f19a064cba2c368aa1caa8f737dd9fb1df3911" + }, + { + "kind": "type", + "mode": "managed", + "source": "types/mdbase-runtime/v2/policy.md", + "target": "_types/policy.md", + "digest": "sha256:15174955c105c43ec6beae40b5d460a59099ccfb9c5b9b0e41a138d319dcdb6a" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.provider-registration/1.1.0.schema.json", + "target": "schemas/mdbase.runtime.provider-registration/1.1.0.schema.json", + "digest": "sha256:7ca141d856eb266b984ba39ecf7cd428f4ce04b8cf6c0368de89bf819a205f76" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.provider-registration/1.1.0.md", + "target": "_contracts/mdbase.runtime.provider-registration/1.1.0.md", + "digest": "sha256:9bd9bfbac90886ff882aeb3edd8b0446f2bfb342775faa52a48349156fc44b2a" + }, + { + "kind": "type", + "mode": "managed", + "source": "types/mdbase-runtime/v2/provider-registration.md", + "target": "_types/provider-registration.md", + "digest": "sha256:1b872ebaeb70db297e38c641c4a9aff0de0202343a24f11f6e67fb7fe45e613c" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.capability-grant/1.1.0.schema.json", + "target": "schemas/mdbase.runtime.capability-grant/1.1.0.schema.json", + "digest": "sha256:d0c90f0da81c843968616fd6faa9af72c0309dd92cb86692609625892592ac96" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.capability-grant/1.1.0.md", + "target": "_contracts/mdbase.runtime.capability-grant/1.1.0.md", + "digest": "sha256:09a0be953976b05820484b2d6f3160c85aca870eae7dd874f815abea6f1756dd" + }, + { + "kind": "type", + "mode": "managed", + "source": "types/mdbase-runtime/v2/capability-grant.md", + "target": "_types/capability-grant.md", + "digest": "sha256:12280d296cf30ebdaf37d89faad277b81ba488d4eaf4cfc6579e128e52e6931a" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.run/1.1.0.schema.json", + "target": "schemas/mdbase.runtime.run/1.1.0.schema.json", + "digest": "sha256:5f134b5f345edd72dab50a25cd99b58f60cacf7078d5eae30fe775c5ef63bc3b" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.run/1.1.0.md", + "target": "_contracts/mdbase.runtime.run/1.1.0.md", + "digest": "sha256:347fcf0b806bc969e555aadc07bc7dcd3b5b67ffb9063e8d613d890db45cae61" + }, + { + "kind": "type", + "mode": "managed", + "source": "types/mdbase-runtime/v2/run.md", + "target": "_types/run.md", + "digest": "sha256:62ed0b5260c1d900b5db89b0c4223a3be5ecb642a19021af3e676087deb7234d" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.action-attempt/1.1.0.schema.json", + "target": "schemas/mdbase.runtime.action-attempt/1.1.0.schema.json", + "digest": "sha256:56007017db377c76374daaefddeb34a2ec42f5ae174e8b584d7371a316625d42" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.action-attempt/1.1.0.md", + "target": "_contracts/mdbase.runtime.action-attempt/1.1.0.md", + "digest": "sha256:0c43ed2d09c6979974ffe40546e84c5ee3f670e667b1f65ba8594f0a8c8ad5ed" + }, + { + "kind": "type", + "mode": "managed", + "source": "types/mdbase-runtime/v2/action-attempt.md", + "target": "_types/action-attempt.md", + "digest": "sha256:e1f23a19e8c5f2bd5dd2f0e054f75452ef261d6c4b118c459d3c062b12468165" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.checkpoint/1.1.0.schema.json", + "target": "schemas/mdbase.runtime.checkpoint/1.1.0.schema.json", + "digest": "sha256:4b545da125ce4a4c1408108a33f8e48e8a9a09dc5bf62dff1ba4437268a2d1f4" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.checkpoint/1.1.0.md", + "target": "_contracts/mdbase.runtime.checkpoint/1.1.0.md", + "digest": "sha256:f7b7377b8b62f00aac57394f9d9f203e0aa027c4dfa30d12673d78c79d48fe08" + }, + { + "kind": "type", + "mode": "managed", + "source": "types/mdbase-runtime/v2/checkpoint.md", + "target": "_types/checkpoint.md", + "digest": "sha256:a6c0d8095ea346f8aea96052d007cfd61542fb8630586b3dff1e353c12c6e010" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.timer/1.1.0.schema.json", + "target": "schemas/mdbase.runtime.timer/1.1.0.schema.json", + "digest": "sha256:a8de8d60cb2bfdc9c40257136cef9940f9686f051d40616b7cc271da1cfd280f" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.timer/1.1.0.md", + "target": "_contracts/mdbase.runtime.timer/1.1.0.md", + "digest": "sha256:c54924aa0a6c88c7808cfbc94d36bdb6d56e0c7e19198c46bc71e5c11fbc4dc0" + }, + { + "kind": "type", + "mode": "managed", + "source": "types/mdbase-runtime/v2/timer.md", + "target": "_types/timer.md", + "digest": "sha256:ceec019878f86f842a12ee2e5d5640996c771d3a1bb61c4063328c1f3a457c59" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.diagnostic/1.1.0.schema.json", + "target": "schemas/mdbase.runtime.diagnostic/1.1.0.schema.json", + "digest": "sha256:e2c56738f9f75ce2000dc3f85d714212eabbc25d052651edba5e8dbd994c69c3" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.diagnostic/1.1.0.md", + "target": "_contracts/mdbase.runtime.diagnostic/1.1.0.md", + "digest": "sha256:bc188903c01074bd061b71a2a65727662989a4422ce620e1effb4b0d5247cba1" + }, + { + "kind": "type", + "mode": "managed", + "source": "types/mdbase-runtime/v2/diagnostic.md", + "target": "_types/diagnostic.md", + "digest": "sha256:8244864de5775efd693029d2b4b66ffce669308cb9dd8b58dbf98bae83791dea" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.dead-letter/1.1.0.schema.json", + "target": "schemas/mdbase.runtime.dead-letter/1.1.0.schema.json", + "digest": "sha256:a3e93d2986987a2c093789e1fc990c699165ec4a098dc48c4f2544f38edb10e6" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.dead-letter/1.1.0.md", + "target": "_contracts/mdbase.runtime.dead-letter/1.1.0.md", + "digest": "sha256:f724d7d2fc345e9fd731355e52917d950b689b48db809d8a7a126ad8c8e38007" + }, + { + "kind": "type", + "mode": "managed", + "source": "types/mdbase-runtime/v2/dead-letter.md", + "target": "_types/dead-letter.md", + "digest": "sha256:47efbbf7a380740b8bd4308e448798dfd8feb81a1f7107c14db0eafdafe9e3ef" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.record.created/1.0.0.schema.json", + "target": "schemas/mdbase.record.created/1.0.0.schema.json", + "digest": "sha256:8d28a2a32083ab9a55f53ad1a619da47022fa3ef291191c6c2e5a9848ce59fcc" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.record.created/1.0.0.md", + "target": "_contracts/mdbase.record.created/1.0.0.md", + "digest": "sha256:4c157f94e63d1f4fb1a74da640e03264ccb6c78cfa9f88ddb71b09c8bd6d1d44" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.record.modified/1.0.0.schema.json", + "target": "schemas/mdbase.record.modified/1.0.0.schema.json", + "digest": "sha256:1ecda771bdeb4b6cea32b81ee344257005b49c4dcf71cdf95a1577a7459b74b0" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.record.modified/1.0.0.md", + "target": "_contracts/mdbase.record.modified/1.0.0.md", + "digest": "sha256:2f670ef18bf7330fbba73861f41889ee946b33644074ca7366e88913f6e4d88a" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.record.deleted/1.0.0.schema.json", + "target": "schemas/mdbase.record.deleted/1.0.0.schema.json", + "digest": "sha256:b5a1fa20b6526ea8d857e03a2eebfc8b2ed126b1c4e7ca2d9735c59ddbeb7206" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.record.deleted/1.0.0.md", + "target": "_contracts/mdbase.record.deleted/1.0.0.md", + "digest": "sha256:cb4f4a09f9f9b1f7f5e2207de0074ce02fd89008c08386626fd964a29299f956" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.record.renamed/1.0.0.schema.json", + "target": "schemas/mdbase.record.renamed/1.0.0.schema.json", + "digest": "sha256:11546c9497c9700ed48b2f634be8001a009b7cea92f19584ed8b8aafc783e990" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.record.renamed/1.0.0.md", + "target": "_contracts/mdbase.record.renamed/1.0.0.md", + "digest": "sha256:b6c507198379ba48408c9b48161a1c22d46dad2d291691af449167618484bb4c" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.timer.fired/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.timer.fired/1.0.0.schema.json", + "digest": "sha256:986cdde8c88a6ff363062d056101141c436271608e565d2a02f250cd74853f74" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.timer.fired/1.0.0.md", + "target": "_contracts/mdbase.runtime.timer.fired/1.0.0.md", + "digest": "sha256:9381a2c6778a3268758ac235e3c3b66991a769fa8e19f7303d4404b1e7e62bc6" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json", + "target": "schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json", + "digest": "sha256:88cbccbfe0e4d087b67159a2cc36cc6ec92b1ea7e849a5c6a82e074f06b270bb" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.run.cancel/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.run.cancel/1.0.0.schema.json", + "digest": "sha256:21dce4d30fd9848e43610c26990fd208476cdb27c5b489439f632384b4a76675" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.run.cancel/1.0.0.md", + "target": "_contracts/mdbase.runtime.run.cancel/1.0.0.md", + "digest": "sha256:949f039334cfc3f096beb870419baa08c3b40679b184e9849f9330a34a6f524d" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.workflow/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.workflow/1.0.0.schema.json", + "digest": "sha256:e8f413663a2911be5a51b1f7aefae80e9e42ea5c729f04d6ccfd0bc4eb1965ea" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.workflow/1.0.0.md", + "target": "_contracts/mdbase.runtime.workflow/1.0.0.md", + "digest": "sha256:7cf8ed016bf6232d9c1abc8d8bb9bb25fd2af1ffa6c6094317aa65baf3c31049" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.policy/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.policy/1.0.0.schema.json", + "digest": "sha256:4d1d2cb59df9991dcc47e269b21dab9e71c1628b99f71e5d9ff5948ba6f7bc45" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.policy/1.0.0.md", + "target": "_contracts/mdbase.runtime.policy/1.0.0.md", + "digest": "sha256:319a9bd4ca62a246871ee52e0ef0250a82c240cb14a95f88e4a505ad04450300" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.provider-registration/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.provider-registration/1.0.0.schema.json", + "digest": "sha256:4cfd9649863835163baee7542b601991c18b21b75c63b48324383da674a1f797" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.provider-registration/1.0.0.md", + "target": "_contracts/mdbase.runtime.provider-registration/1.0.0.md", + "digest": "sha256:97d157efaeb311745fc84e2cbe01e8147aaf44109384090c154527b68838d766" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.capability-grant/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.capability-grant/1.0.0.schema.json", + "digest": "sha256:14fcd3ad1fbe3d3c360024e869d8a52ec047aa8b2dd37755c63e2412535f50ca" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.capability-grant/1.0.0.md", + "target": "_contracts/mdbase.runtime.capability-grant/1.0.0.md", + "digest": "sha256:1cd3a2ff5fdc9294f766e538c371ed278ad4c54452480ba6fcc2870be08b47a1" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.run/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.run/1.0.0.schema.json", + "digest": "sha256:0add08b601ebd15b80dc14812fc7fbf9c1b5bd8415daed7b7d566e33741d91c3" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.run/1.0.0.md", + "target": "_contracts/mdbase.runtime.run/1.0.0.md", + "digest": "sha256:7e46270c951e6634fe25519dff10523652365f8adf30b034f01e29e1ca48cadb" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.action-attempt/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.action-attempt/1.0.0.schema.json", + "digest": "sha256:71c8cb274daa63ed8b428f474ec07d0053e65e06f42354cb7f36072cb136506c" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.action-attempt/1.0.0.md", + "target": "_contracts/mdbase.runtime.action-attempt/1.0.0.md", + "digest": "sha256:04c1bf55580d0d280d2be645c56177da25c2d0129f8fa71def7d5f96cf0ea629" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.checkpoint/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.checkpoint/1.0.0.schema.json", + "digest": "sha256:0c4a550356b974814690bb2e5db1902c6c3cff13be1ea69a139e2e43781ecf2c" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.checkpoint/1.0.0.md", + "target": "_contracts/mdbase.runtime.checkpoint/1.0.0.md", + "digest": "sha256:6413676d7482a71b31cbe4abf8c5a543a54a530ef62f669f8ef8e21bcc6bc237" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.timer/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.timer/1.0.0.schema.json", + "digest": "sha256:fd6fa1b8fa7a3e782160d1b0e1399f15392230d1560393e840e7869c7d407aac" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.timer/1.0.0.md", + "target": "_contracts/mdbase.runtime.timer/1.0.0.md", + "digest": "sha256:0500a421e81eef09c37bc4ef559e3805843e87a6e1b2cf2a393da4d76d4384fc" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.diagnostic/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.diagnostic/1.0.0.schema.json", + "digest": "sha256:b4d78f97b4feadc6c1e79b214fac20f0c305609e20f152f878d23d5d4e370935" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.diagnostic/1.0.0.md", + "target": "_contracts/mdbase.runtime.diagnostic/1.0.0.md", + "digest": "sha256:2e7379de9ceefa6435e9c66a71f4292e4805e8038ed6496c83dad946900267f6" + }, + { + "kind": "schema", + "mode": "managed", + "source": "schemas/mdbase.runtime.dead-letter/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.dead-letter/1.0.0.schema.json", + "digest": "sha256:1f866b1dfca061571a8dc3a87748fd9deb6268a6674fe5eaf764e8701d32fee9" + }, + { + "kind": "contract", + "mode": "managed", + "source": "contracts/mdbase.runtime.dead-letter/1.0.0.md", + "target": "_contracts/mdbase.runtime.dead-letter/1.0.0.md", + "digest": "sha256:737d08bad6662e087c3393f6f17d24374f258d60b41112a3f864cb5138af8edd" + } + ] + }, + "resources": [ + { + "source": "schemas/mdbase.runtime.workflow/1.1.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime workflow\",\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"name\",\n \"enabled\",\n \"triggers\",\n \"steps\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"boolean\"\n },\n \"requires\": {\n \"$ref\": \"#/$defs/requires\"\n },\n \"vars\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"triggers\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"$ref\": \"#/$defs/trigger\"\n }\n },\n \"steps\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"$ref\": \"#/$defs/step\"\n }\n },\n \"run\": {\n \"$ref\": \"#/$defs/runPolicy\"\n }\n },\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n },\n \"requires\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"capabilities\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"trigger\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"event\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"event\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n },\n \"if\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n },\n \"debounce\": {\n \"$ref\": \"#/$defs/duration\"\n },\n \"minimum_interval\": {\n \"$ref\": \"#/$defs/duration\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"step\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"action\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"action\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n },\n \"provider\": {\n \"$ref\": \"#/$defs/providerSelector\"\n },\n \"requires\": {\n \"$ref\": \"#/$defs/requires\"\n },\n \"if\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n },\n \"input\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"for_each\": {\n \"type\": \"object\",\n \"required\": [\n \"items\"\n ],\n \"properties\": {\n \"items\": {},\n \"as\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z_][A-Za-z0-9_]*$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"duration\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)(ms|s|m|h|d)$\"\n },\n \"runPolicy\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"idempotency\": {\n \"type\": \"object\",\n \"required\": [\n \"key\"\n ],\n \"properties\": {\n \"key\": {}\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"concurrency\": {\n \"type\": \"object\",\n \"required\": [\n \"policy\"\n ],\n \"properties\": {\n \"group\": {},\n \"policy\": {\n \"enum\": [\n \"skip\",\n \"queue\",\n \"replace\",\n \"allow\"\n ]\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"limits\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"timeout\": {\n \"$ref\": \"#/$defs/duration\"\n },\n \"max_items\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"on_error\": {\n \"enum\": [\n \"stop\",\n \"continue\"\n ]\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.workflow/1.1.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.workflow/1.1.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.workflow\nversion: 1.1.0\nname: Durable workflow\ndescription: A portable workflow whose event and action references are resolved and pinned at admission.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.workflow/1.1.0.schema.json\n---\n\n# Durable workflow\n\nA portable workflow whose event and action references are resolved and pinned at admission.\n\nThe record's type is declared under the collection's configured explicit type\nkey, so the schema neither requires nor pins a `type` field and accepts\ntop-level fields outside this contract. That is the only change from 1.0.0;\nevery record valid under 1.0.0 is also valid under 1.1.0.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "types/mdbase-runtime/v2/workflow.md", + "document": "---\nkind: mdbase.type\nname: runtime_workflow\nversion: 2\ndescription: Canonical Markdown implementation of mdbase.runtime.workflow.\nmatch:\n where:\n type: runtime_workflow\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: mdbase durable runtime workflow\n type: object\n required:\n - id\n - version\n - name\n - enabled\n - triggers\n - steps\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n name:\n type: string\n minLength: 1\n description:\n type: string\n enabled:\n type: boolean\n requires:\n $ref: \"#/$defs/requires\"\n vars:\n type: object\n additionalProperties: {}\n triggers:\n type: array\n minItems: 1\n items:\n $ref: \"#/$defs/trigger\"\n steps:\n type: array\n minItems: 1\n items:\n $ref: \"#/$defs/step\"\n run:\n $ref: \"#/$defs/runPolicy\"\n $defs:\n identifier:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n semanticVersion:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n dateTime:\n type: string\n format: date-time\n contractRequirement:\n type: object\n required:\n - id\n - version\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n minLength: 1\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n exactContractReference:\n type: object\n required:\n - id\n - version\n - digest\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n identity:\n type: object\n required:\n - application\n - implementation\n - version\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n providerSelector:\n type: object\n required: []\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n minProperties: 1\n expression:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n requires:\n type: object\n required: []\n properties:\n capabilities:\n type: array\n uniqueItems: true\n items:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n trigger:\n type: object\n required:\n - id\n - event\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n event:\n $ref: \"#/$defs/contractRequirement\"\n if:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n debounce:\n $ref: \"#/$defs/duration\"\n minimum_interval:\n $ref: \"#/$defs/duration\"\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n step:\n type: object\n required:\n - id\n - action\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n name:\n type: string\n action:\n $ref: \"#/$defs/contractRequirement\"\n provider:\n $ref: \"#/$defs/providerSelector\"\n requires:\n $ref: \"#/$defs/requires\"\n if:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n input:\n type: object\n additionalProperties: {}\n for_each:\n type: object\n required:\n - items\n properties:\n items: {}\n as:\n type: string\n pattern: ^[A-Za-z_][A-Za-z0-9_]*$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n duration:\n type: string\n pattern: ^(0|[1-9][0-9]*)(ms|s|m|h|d)$\n runPolicy:\n type: object\n required: []\n properties:\n idempotency:\n type: object\n required:\n - key\n properties:\n key: {}\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n concurrency:\n type: object\n required:\n - policy\n properties:\n group: {}\n policy:\n enum:\n - skip\n - queue\n - replace\n - allow\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n limits:\n type: object\n required: []\n properties:\n timeout:\n $ref: \"#/$defs/duration\"\n max_items:\n type: integer\n minimum: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n on_error:\n enum:\n - stop\n - continue\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.workflow/1.1.0.schema.json\nimplements:\n - contract: mdbase.runtime.workflow\n version: 1.1.0\n fields:\n id: id\n version: version\n name: name\n description: description\n enabled: enabled\n requires: requires\n vars: vars\n triggers: triggers\n steps: steps\n run: run\n---\n\n# Durable workflow\n\nThis canonical type makes `runtime_workflow` records discoverable through\nthe ordinary mdbase record-contract registry.\n\nApps create these records by naming the type; the engine writes it under the\ncollection's configured explicit type key. The `match` rule also\nrecognises hand-written `type: runtime_workflow` records in collections\nwhose type key is something else.\n" + }, + { + "source": "schemas/mdbase.runtime.policy/1.1.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime policy\",\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"enabled\",\n \"grants\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"enabled\": {\n \"type\": \"boolean\"\n },\n \"executors\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"default\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"workflows\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"provider_selections\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\n \"contract\",\n \"selector\"\n ],\n \"properties\": {\n \"contract\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n },\n \"selector\": {\n \"$ref\": \"#/$defs/providerSelector\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n },\n \"grants\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\n \"capability\",\n \"mode\"\n ],\n \"properties\": {\n \"capability\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"mode\": {\n \"enum\": [\n \"allow\",\n \"deny\"\n ]\n },\n \"actions\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n }\n },\n \"providers\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"$ref\": \"#/$defs/providerSelector\"\n }\n },\n \"max_calls_per_run\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"max_records_per_run\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n }\n },\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.policy/1.1.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.policy/1.1.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.policy\nversion: 1.1.0\nname: Runtime policy\ndescription: Local authorization, executor, limit, and provider-selection policy.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.policy/1.1.0.schema.json\n---\n\n# Runtime policy\n\nLocal authorization, executor, limit, and provider-selection policy.\n\nThe record's type is declared under the collection's configured explicit type\nkey, so the schema neither requires nor pins a `type` field and accepts\ntop-level fields outside this contract. That is the only change from 1.0.0;\nevery record valid under 1.0.0 is also valid under 1.1.0.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "types/mdbase-runtime/v2/policy.md", + "document": "---\nkind: mdbase.type\nname: runtime_policy\nversion: 2\ndescription: Canonical Markdown implementation of mdbase.runtime.policy.\nmatch:\n where:\n type: runtime_policy\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: mdbase durable runtime policy\n type: object\n required:\n - id\n - version\n - enabled\n - grants\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n name:\n type: string\n minLength: 1\n enabled:\n type: boolean\n executors:\n type: object\n required: []\n properties:\n default:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n workflows:\n type: object\n additionalProperties:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n provider_selections:\n type: array\n items:\n type: object\n required:\n - contract\n - selector\n properties:\n contract:\n $ref: \"#/$defs/contractRequirement\"\n selector:\n $ref: \"#/$defs/providerSelector\"\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n grants:\n type: array\n items:\n type: object\n required:\n - capability\n - mode\n properties:\n capability:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n mode:\n enum:\n - allow\n - deny\n actions:\n type: array\n uniqueItems: true\n items:\n $ref: \"#/$defs/contractRequirement\"\n providers:\n type: array\n uniqueItems: true\n items:\n $ref: \"#/$defs/providerSelector\"\n max_calls_per_run:\n type: integer\n minimum: 1\n max_records_per_run:\n type: integer\n minimum: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n $defs:\n identifier:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n semanticVersion:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n dateTime:\n type: string\n format: date-time\n contractRequirement:\n type: object\n required:\n - id\n - version\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n minLength: 1\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n exactContractReference:\n type: object\n required:\n - id\n - version\n - digest\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n identity:\n type: object\n required:\n - application\n - implementation\n - version\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n providerSelector:\n type: object\n required: []\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n minProperties: 1\n expression:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.policy/1.1.0.schema.json\nimplements:\n - contract: mdbase.runtime.policy\n version: 1.1.0\n fields:\n id: id\n version: version\n name: name\n enabled: enabled\n executors: executors\n provider_selections: provider_selections\n grants: grants\n---\n\n# Runtime policy\n\nThis canonical type makes `runtime_policy` records discoverable through\nthe ordinary mdbase record-contract registry.\n\nApps create these records by naming the type; the engine writes it under the\ncollection's configured explicit type key. The `match` rule also\nrecognises hand-written `type: runtime_policy` records in collections\nwhose type key is something else.\n" + }, + { + "source": "schemas/mdbase.runtime.provider-registration/1.1.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase runtime provider registration evidence\",\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"declaration_kind\",\n \"declaration\",\n \"verified_at\",\n \"active\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"declaration_kind\": {\n \"enum\": [\n \"event_source\",\n \"action_provider\"\n ]\n },\n \"declaration\": {\n \"type\": \"object\"\n },\n \"verified_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n },\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.provider-registration/1.1.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.provider-registration/1.1.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.provider-registration\nversion: 1.1.0\nname: Provider registration evidence\ndescription: An optional audit snapshot of a verified interoperability declaration; it never activates code.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.provider-registration/1.1.0.schema.json\n---\n\n# Provider registration evidence\n\nAn optional audit snapshot of a verified interoperability declaration; it never activates code.\n\nThe record's type is declared under the collection's configured explicit type\nkey, so the schema neither requires nor pins a `type` field and accepts\ntop-level fields outside this contract. That is the only change from 1.0.0;\nevery record valid under 1.0.0 is also valid under 1.1.0.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "types/mdbase-runtime/v2/provider-registration.md", + "document": "---\nkind: mdbase.type\nname: runtime_provider_registration\nversion: 2\ndescription: Canonical Markdown implementation of mdbase.runtime.provider-registration.\nmatch:\n where:\n type: runtime_provider_registration\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: mdbase runtime provider registration evidence\n type: object\n required:\n - id\n - declaration_kind\n - declaration\n - verified_at\n - active\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n declaration_kind:\n enum:\n - event_source\n - action_provider\n declaration:\n type: object\n verified_at:\n type: string\n format: date-time\n active:\n type: boolean\n $defs:\n identifier:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n semanticVersion:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n dateTime:\n type: string\n format: date-time\n contractRequirement:\n type: object\n required:\n - id\n - version\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n minLength: 1\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n exactContractReference:\n type: object\n required:\n - id\n - version\n - digest\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n identity:\n type: object\n required:\n - application\n - implementation\n - version\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n providerSelector:\n type: object\n required: []\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n minProperties: 1\n expression:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.provider-registration/1.1.0.schema.json\nimplements:\n - contract: mdbase.runtime.provider-registration\n version: 1.1.0\n fields:\n id: id\n declaration_kind: declaration_kind\n declaration: declaration\n verified_at: verified_at\n active: active\n---\n\n# Provider registration evidence\n\nThis canonical type makes `runtime_provider_registration` records discoverable through\nthe ordinary mdbase record-contract registry.\n\nApps create these records by naming the type; the engine writes it under the\ncollection's configured explicit type key. The `match` rule also\nrecognises hand-written `type: runtime_provider_registration` records in collections\nwhose type key is something else.\n" + }, + { + "source": "schemas/mdbase.runtime.capability-grant/1.1.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase runtime capability grant\",\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"capability\",\n \"principal\",\n \"mode\",\n \"granted_at\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"capability\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"principal\": {\n \"$ref\": \"#/$defs/identity\"\n },\n \"mode\": {\n \"enum\": [\n \"allow\",\n \"deny\"\n ]\n },\n \"actions\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n }\n },\n \"providers\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"$ref\": \"#/$defs/providerSelector\"\n }\n },\n \"granted_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"expires_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.capability-grant/1.1.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.capability-grant/1.1.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.capability-grant\nversion: 1.1.0\nname: Capability grant evidence\ndescription: A materialized authorization grant scoped independently from contract conformance.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.capability-grant/1.1.0.schema.json\n---\n\n# Capability grant evidence\n\nA materialized authorization grant scoped independently from contract conformance.\n\nThe record's type is declared under the collection's configured explicit type\nkey, so the schema neither requires nor pins a `type` field and accepts\ntop-level fields outside this contract. That is the only change from 1.0.0;\nevery record valid under 1.0.0 is also valid under 1.1.0.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "types/mdbase-runtime/v2/capability-grant.md", + "document": "---\nkind: mdbase.type\nname: runtime_capability_grant\nversion: 2\ndescription: Canonical Markdown implementation of mdbase.runtime.capability-grant.\nmatch:\n where:\n type: runtime_capability_grant\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: mdbase runtime capability grant\n type: object\n required:\n - id\n - capability\n - principal\n - mode\n - granted_at\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n capability:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n principal:\n $ref: \"#/$defs/identity\"\n mode:\n enum:\n - allow\n - deny\n actions:\n type: array\n uniqueItems: true\n items:\n $ref: \"#/$defs/contractRequirement\"\n providers:\n type: array\n uniqueItems: true\n items:\n $ref: \"#/$defs/providerSelector\"\n granted_at:\n type: string\n format: date-time\n expires_at:\n type: string\n format: date-time\n $defs:\n identifier:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n semanticVersion:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n dateTime:\n type: string\n format: date-time\n contractRequirement:\n type: object\n required:\n - id\n - version\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n minLength: 1\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n exactContractReference:\n type: object\n required:\n - id\n - version\n - digest\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n identity:\n type: object\n required:\n - application\n - implementation\n - version\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n providerSelector:\n type: object\n required: []\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n minProperties: 1\n expression:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.capability-grant/1.1.0.schema.json\nimplements:\n - contract: mdbase.runtime.capability-grant\n version: 1.1.0\n fields:\n id: id\n capability: capability\n principal: principal\n mode: mode\n actions: actions\n providers: providers\n granted_at: granted_at\n expires_at: expires_at\n---\n\n# Capability grant evidence\n\nThis canonical type makes `runtime_capability_grant` records discoverable through\nthe ordinary mdbase record-contract registry.\n\nApps create these records by naming the type; the engine writes it under the\ncollection's configured explicit type key. The `match` rule also\nrecognises hand-written `type: runtime_capability_grant` records in collections\nwhose type key is something else.\n" + }, + { + "source": "schemas/mdbase.runtime.run/1.1.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime run\",\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"workflow_id\",\n \"workflow_version\",\n \"workflow_revision\",\n \"event_id\",\n \"event_contract\",\n \"admitted_plan\",\n \"status\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"workflow_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"workflow_version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"workflow_revision\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"event_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"event_contract\": {\n \"$ref\": \"#/$defs/exactContractReference\"\n },\n \"event_source\": {\n \"$ref\": \"#/$defs/identity\"\n },\n \"admitted_plan\": {\n \"$ref\": \"#/$defs/admittedPlan\"\n },\n \"policy_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"policy_revision\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"trigger_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"event_cursor\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"executor\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"idempotency_key\": {\n \"type\": \"string\"\n },\n \"concurrency_group\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"enum\": [\n \"queued\",\n \"running\",\n \"waiting\",\n \"succeeded\",\n \"failed\",\n \"cancelled\",\n \"indeterminate\"\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"started_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"finished_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lease\": {\n \"$ref\": \"#/$defs/lease\"\n }\n },\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n },\n \"admittedPlan\": {\n \"type\": \"object\",\n \"required\": [\n \"profile_version\",\n \"workflow_revision\",\n \"event\",\n \"steps\"\n ],\n \"properties\": {\n \"profile_version\": {\n \"const\": \"0.2\"\n },\n \"workflow_revision\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"event\": {\n \"type\": \"object\",\n \"required\": [\n \"contract\",\n \"source\"\n ],\n \"properties\": {\n \"contract\": {\n \"$ref\": \"#/$defs/exactContractReference\"\n },\n \"source\": {\n \"$ref\": \"#/$defs/identity\"\n },\n \"source_declaration_digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"steps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"contract\",\n \"provider\",\n \"provider_declaration_digest\",\n \"handler_id\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"contract\": {\n \"$ref\": \"#/$defs/exactContractReference\"\n },\n \"provider\": {\n \"$ref\": \"#/$defs/identity\"\n },\n \"provider_declaration_digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"handler_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"lease\": {\n \"type\": \"object\",\n \"required\": [\n \"owner\",\n \"token\",\n \"expires_at\"\n ],\n \"properties\": {\n \"owner\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"token\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"expires_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.run/1.1.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.run/1.1.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.run\nversion: 1.1.0\nname: Durable run\ndescription: The durable state and immutable admitted plan for one workflow execution.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.run/1.1.0.schema.json\n---\n\n# Durable run\n\nThe durable state and immutable admitted plan for one workflow execution.\n\nThe record's type is declared under the collection's configured explicit type\nkey, so the schema neither requires nor pins a `type` field and accepts\ntop-level fields outside this contract. That is the only change from 1.0.0;\nevery record valid under 1.0.0 is also valid under 1.1.0.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "types/mdbase-runtime/v2/run.md", + "document": "---\nkind: mdbase.type\nname: runtime_run\nversion: 2\ndescription: Canonical Markdown implementation of mdbase.runtime.run.\nmatch:\n where:\n type: runtime_run\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: mdbase durable runtime run\n type: object\n required:\n - id\n - workflow_id\n - workflow_version\n - workflow_revision\n - event_id\n - event_contract\n - admitted_plan\n - status\n - created_at\n - updated_at\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n workflow_id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n workflow_version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n workflow_revision:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n event_id:\n type: string\n minLength: 1\n event_contract:\n $ref: \"#/$defs/exactContractReference\"\n event_source:\n $ref: \"#/$defs/identity\"\n admitted_plan:\n $ref: \"#/$defs/admittedPlan\"\n policy_id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n policy_revision:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n trigger_id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n event_cursor:\n type: integer\n minimum: 1\n executor:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n idempotency_key:\n type: string\n concurrency_group:\n type: string\n status:\n enum:\n - queued\n - running\n - waiting\n - succeeded\n - failed\n - cancelled\n - indeterminate\n created_at:\n type: string\n format: date-time\n updated_at:\n type: string\n format: date-time\n started_at:\n type: string\n format: date-time\n finished_at:\n type: string\n format: date-time\n lease:\n $ref: \"#/$defs/lease\"\n $defs:\n identifier:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n semanticVersion:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n dateTime:\n type: string\n format: date-time\n contractRequirement:\n type: object\n required:\n - id\n - version\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n minLength: 1\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n exactContractReference:\n type: object\n required:\n - id\n - version\n - digest\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n identity:\n type: object\n required:\n - application\n - implementation\n - version\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n providerSelector:\n type: object\n required: []\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n minProperties: 1\n expression:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n admittedPlan:\n type: object\n required:\n - profile_version\n - workflow_revision\n - event\n - steps\n properties:\n profile_version:\n const: \"0.2\"\n workflow_revision:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n event:\n type: object\n required:\n - contract\n - source\n properties:\n contract:\n $ref: \"#/$defs/exactContractReference\"\n source:\n $ref: \"#/$defs/identity\"\n source_declaration_digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n steps:\n type: array\n items:\n type: object\n required:\n - id\n - contract\n - provider\n - provider_declaration_digest\n - handler_id\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n contract:\n $ref: \"#/$defs/exactContractReference\"\n provider:\n $ref: \"#/$defs/identity\"\n provider_declaration_digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n handler_id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n lease:\n type: object\n required:\n - owner\n - token\n - expires_at\n properties:\n owner:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n token:\n type: string\n minLength: 1\n expires_at:\n type: string\n format: date-time\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.run/1.1.0.schema.json\nimplements:\n - contract: mdbase.runtime.run\n version: 1.1.0\n fields:\n id: id\n workflow_id: workflow_id\n workflow_version: workflow_version\n workflow_revision: workflow_revision\n event_id: event_id\n event_contract: event_contract\n event_source: event_source\n admitted_plan: admitted_plan\n policy_id: policy_id\n policy_revision: policy_revision\n trigger_id: trigger_id\n event_cursor: event_cursor\n executor: executor\n idempotency_key: idempotency_key\n concurrency_group: concurrency_group\n status: status\n created_at: created_at\n updated_at: updated_at\n started_at: started_at\n finished_at: finished_at\n lease: lease\n---\n\n# Durable run\n\nThis canonical type makes `runtime_run` records discoverable through\nthe ordinary mdbase record-contract registry.\n\nApps create these records by naming the type; the engine writes it under the\ncollection's configured explicit type key. The `match` rule also\nrecognises hand-written `type: runtime_run` records in collections\nwhose type key is something else.\n" + }, + { + "source": "schemas/mdbase.runtime.action-attempt/1.1.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime action attempt\",\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"run_id\",\n \"step_id\",\n \"request_id\",\n \"invocation_id\",\n \"attempt_id\",\n \"contract\",\n \"provider\",\n \"provider_declaration_digest\",\n \"status\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"run_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"step_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"request_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"invocation_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"attempt_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"contract\": {\n \"$ref\": \"#/$defs/exactContractReference\"\n },\n \"provider\": {\n \"$ref\": \"#/$defs/identity\"\n },\n \"provider_declaration_digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"handler_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"idempotency_key\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"enum\": [\n \"admitted\",\n \"dispatching\",\n \"succeeded\",\n \"rejected\",\n \"failed\",\n \"cancelled\",\n \"indeterminate\"\n ]\n },\n \"request\": {\n \"type\": \"object\"\n },\n \"invocation\": {\n \"type\": \"object\"\n },\n \"outcome\": {\n \"type\": \"object\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"completed_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.action-attempt/1.1.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.action-attempt/1.1.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.action-attempt\nversion: 1.1.0\nname: Durable action attempt\ndescription: Durable invocation intent and outcome evidence using the shared interoperability envelope.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.action-attempt/1.1.0.schema.json\n---\n\n# Durable action attempt\n\nDurable invocation intent and outcome evidence using the shared interoperability envelope.\n\nThe record's type is declared under the collection's configured explicit type\nkey, so the schema neither requires nor pins a `type` field and accepts\ntop-level fields outside this contract. That is the only change from 1.0.0;\nevery record valid under 1.0.0 is also valid under 1.1.0.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "types/mdbase-runtime/v2/action-attempt.md", + "document": "---\nkind: mdbase.type\nname: runtime_action_attempt\nversion: 2\ndescription: Canonical Markdown implementation of mdbase.runtime.action-attempt.\nmatch:\n where:\n type: runtime_action_attempt\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: mdbase durable runtime action attempt\n type: object\n required:\n - id\n - run_id\n - step_id\n - request_id\n - invocation_id\n - attempt_id\n - contract\n - provider\n - provider_declaration_digest\n - status\n - created_at\n - updated_at\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n run_id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n step_id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n request_id:\n type: string\n minLength: 1\n invocation_id:\n type: string\n minLength: 1\n attempt_id:\n type: string\n minLength: 1\n contract:\n $ref: \"#/$defs/exactContractReference\"\n provider:\n $ref: \"#/$defs/identity\"\n provider_declaration_digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n handler_id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n idempotency_key:\n type: string\n status:\n enum:\n - admitted\n - dispatching\n - succeeded\n - rejected\n - failed\n - cancelled\n - indeterminate\n request:\n type: object\n invocation:\n type: object\n outcome:\n type: object\n created_at:\n type: string\n format: date-time\n updated_at:\n type: string\n format: date-time\n completed_at:\n type: string\n format: date-time\n $defs:\n identifier:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n semanticVersion:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n dateTime:\n type: string\n format: date-time\n contractRequirement:\n type: object\n required:\n - id\n - version\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n minLength: 1\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n exactContractReference:\n type: object\n required:\n - id\n - version\n - digest\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n identity:\n type: object\n required:\n - application\n - implementation\n - version\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n providerSelector:\n type: object\n required: []\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n minProperties: 1\n expression:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.action-attempt/1.1.0.schema.json\nimplements:\n - contract: mdbase.runtime.action-attempt\n version: 1.1.0\n fields:\n id: id\n run_id: run_id\n step_id: step_id\n request_id: request_id\n invocation_id: invocation_id\n attempt_id: attempt_id\n contract: contract\n provider: provider\n provider_declaration_digest: provider_declaration_digest\n handler_id: handler_id\n idempotency_key: idempotency_key\n status: status\n request: request\n invocation: invocation\n outcome: outcome\n created_at: created_at\n updated_at: updated_at\n completed_at: completed_at\n---\n\n# Durable action attempt\n\nThis canonical type makes `runtime_action_attempt` records discoverable through\nthe ordinary mdbase record-contract registry.\n\nApps create these records by naming the type; the engine writes it under the\ncollection's configured explicit type key. The `match` rule also\nrecognises hand-written `type: runtime_action_attempt` records in collections\nwhose type key is something else.\n" + }, + { + "source": "schemas/mdbase.runtime.checkpoint/1.1.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime checkpoint\",\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"run_id\",\n \"generation\",\n \"status\",\n \"state\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"run_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"generation\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"status\": {\n \"enum\": [\n \"open\",\n \"waiting\",\n \"ready\",\n \"completed\",\n \"failed\",\n \"cancelled\"\n ]\n },\n \"state\": {\n \"type\": \"object\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.checkpoint/1.1.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.checkpoint/1.1.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.checkpoint\nversion: 1.1.0\nname: Runtime checkpoint\ndescription: A durable, lease-safe workflow continuation.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.checkpoint/1.1.0.schema.json\n---\n\n# Runtime checkpoint\n\nA durable, lease-safe workflow continuation.\n\nThe record's type is declared under the collection's configured explicit type\nkey, so the schema neither requires nor pins a `type` field and accepts\ntop-level fields outside this contract. That is the only change from 1.0.0;\nevery record valid under 1.0.0 is also valid under 1.1.0.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "types/mdbase-runtime/v2/checkpoint.md", + "document": "---\nkind: mdbase.type\nname: runtime_checkpoint\nversion: 2\ndescription: Canonical Markdown implementation of mdbase.runtime.checkpoint.\nmatch:\n where:\n type: runtime_checkpoint\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: mdbase durable runtime checkpoint\n type: object\n required:\n - id\n - run_id\n - generation\n - status\n - state\n - updated_at\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n run_id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n generation:\n type: integer\n minimum: 1\n status:\n enum:\n - open\n - waiting\n - ready\n - completed\n - failed\n - cancelled\n state:\n type: object\n updated_at:\n type: string\n format: date-time\n $defs:\n identifier:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n semanticVersion:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n dateTime:\n type: string\n format: date-time\n contractRequirement:\n type: object\n required:\n - id\n - version\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n minLength: 1\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n exactContractReference:\n type: object\n required:\n - id\n - version\n - digest\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n identity:\n type: object\n required:\n - application\n - implementation\n - version\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n providerSelector:\n type: object\n required: []\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n minProperties: 1\n expression:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.checkpoint/1.1.0.schema.json\nimplements:\n - contract: mdbase.runtime.checkpoint\n version: 1.1.0\n fields:\n id: id\n run_id: run_id\n generation: generation\n status: status\n state: state\n updated_at: updated_at\n---\n\n# Runtime checkpoint\n\nThis canonical type makes `runtime_checkpoint` records discoverable through\nthe ordinary mdbase record-contract registry.\n\nApps create these records by naming the type; the engine writes it under the\ncollection's configured explicit type key. The `match` rule also\nrecognises hand-written `type: runtime_checkpoint` records in collections\nwhose type key is something else.\n" + }, + { + "source": "schemas/mdbase.runtime.timer/1.1.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime timer\",\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"generation\",\n \"status\",\n \"fire_at\",\n \"event\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"generation\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"status\": {\n \"enum\": [\n \"scheduled\",\n \"firing\",\n \"fired\",\n \"cancelled\"\n ]\n },\n \"fire_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"event\": {\n \"type\": \"object\",\n \"required\": [\n \"contract\",\n \"data\"\n ],\n \"properties\": {\n \"contract\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n },\n \"subject\": {\n \"type\": \"string\"\n },\n \"correlation_id\": {\n \"type\": \"string\"\n },\n \"causation_id\": {\n \"type\": \"string\"\n },\n \"data\": {}\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"missed_run_policy\": {\n \"const\": \"fire_once\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"fired_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.timer/1.1.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.timer/1.1.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.timer\nversion: 1.1.0\nname: Runtime timer\ndescription: A generation-safe one-shot timer that publishes through the interoperability profile.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.timer/1.1.0.schema.json\n---\n\n# Runtime timer\n\nA generation-safe one-shot timer that publishes through the interoperability profile.\n\nThe record's type is declared under the collection's configured explicit type\nkey, so the schema neither requires nor pins a `type` field and accepts\ntop-level fields outside this contract. That is the only change from 1.0.0;\nevery record valid under 1.0.0 is also valid under 1.1.0.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "types/mdbase-runtime/v2/timer.md", + "document": "---\nkind: mdbase.type\nname: runtime_timer\nversion: 2\ndescription: Canonical Markdown implementation of mdbase.runtime.timer.\nmatch:\n where:\n type: runtime_timer\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: mdbase durable runtime timer\n type: object\n required:\n - id\n - generation\n - status\n - fire_at\n - event\n - created_at\n - updated_at\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n generation:\n type: integer\n minimum: 1\n status:\n enum:\n - scheduled\n - firing\n - fired\n - cancelled\n fire_at:\n type: string\n format: date-time\n event:\n type: object\n required:\n - contract\n - data\n properties:\n contract:\n $ref: \"#/$defs/contractRequirement\"\n subject:\n type: string\n correlation_id:\n type: string\n causation_id:\n type: string\n data: {}\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n missed_run_policy:\n const: fire_once\n created_at:\n type: string\n format: date-time\n updated_at:\n type: string\n format: date-time\n fired_at:\n type: string\n format: date-time\n $defs:\n identifier:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n semanticVersion:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n dateTime:\n type: string\n format: date-time\n contractRequirement:\n type: object\n required:\n - id\n - version\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n minLength: 1\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n exactContractReference:\n type: object\n required:\n - id\n - version\n - digest\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n identity:\n type: object\n required:\n - application\n - implementation\n - version\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n providerSelector:\n type: object\n required: []\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n minProperties: 1\n expression:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.timer/1.1.0.schema.json\nimplements:\n - contract: mdbase.runtime.timer\n version: 1.1.0\n fields:\n id: id\n generation: generation\n status: status\n fire_at: fire_at\n event: event\n missed_run_policy: missed_run_policy\n created_at: created_at\n updated_at: updated_at\n fired_at: fired_at\n---\n\n# Runtime timer\n\nThis canonical type makes `runtime_timer` records discoverable through\nthe ordinary mdbase record-contract registry.\n\nApps create these records by naming the type; the engine writes it under the\ncollection's configured explicit type key. The `match` rule also\nrecognises hand-written `type: runtime_timer` records in collections\nwhose type key is something else.\n" + }, + { + "source": "schemas/mdbase.runtime.diagnostic/1.1.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime diagnostic\",\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"severity\",\n \"code\",\n \"message\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"severity\": {\n \"enum\": [\n \"info\",\n \"warning\",\n \"error\"\n ]\n },\n \"code\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"message\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"run_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"attempt_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"path\": {\n \"type\": \"string\"\n },\n \"details\": {},\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.diagnostic/1.1.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.diagnostic/1.1.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.diagnostic\nversion: 1.1.0\nname: Runtime diagnostic\ndescription: A machine-readable durable runtime diagnostic.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.diagnostic/1.1.0.schema.json\n---\n\n# Runtime diagnostic\n\nA machine-readable durable runtime diagnostic.\n\nThe record's type is declared under the collection's configured explicit type\nkey, so the schema neither requires nor pins a `type` field and accepts\ntop-level fields outside this contract. That is the only change from 1.0.0;\nevery record valid under 1.0.0 is also valid under 1.1.0.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "types/mdbase-runtime/v2/diagnostic.md", + "document": "---\nkind: mdbase.type\nname: runtime_diagnostic\nversion: 2\ndescription: Canonical Markdown implementation of mdbase.runtime.diagnostic.\nmatch:\n where:\n type: runtime_diagnostic\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: mdbase durable runtime diagnostic\n type: object\n required:\n - id\n - severity\n - code\n - message\n - created_at\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n severity:\n enum:\n - info\n - warning\n - error\n code:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n message:\n type: string\n minLength: 1\n run_id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n attempt_id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n path:\n type: string\n details: {}\n created_at:\n type: string\n format: date-time\n $defs:\n identifier:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n semanticVersion:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n dateTime:\n type: string\n format: date-time\n contractRequirement:\n type: object\n required:\n - id\n - version\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n minLength: 1\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n exactContractReference:\n type: object\n required:\n - id\n - version\n - digest\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n identity:\n type: object\n required:\n - application\n - implementation\n - version\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n providerSelector:\n type: object\n required: []\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n minProperties: 1\n expression:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.diagnostic/1.1.0.schema.json\nimplements:\n - contract: mdbase.runtime.diagnostic\n version: 1.1.0\n fields:\n id: id\n severity: severity\n code: code\n message: message\n run_id: run_id\n attempt_id: attempt_id\n path: path\n details: details\n created_at: created_at\n---\n\n# Runtime diagnostic\n\nThis canonical type makes `runtime_diagnostic` records discoverable through\nthe ordinary mdbase record-contract registry.\n\nApps create these records by naming the type; the engine writes it under the\ncollection's configured explicit type key. The `match` rule also\nrecognises hand-written `type: runtime_diagnostic` records in collections\nwhose type key is something else.\n" + }, + { + "source": "schemas/mdbase.runtime.dead-letter/1.1.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime dead letter\",\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"reason\",\n \"status\",\n \"evidence\",\n \"created_at\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"reason\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"status\": {\n \"enum\": [\n \"unresolved\",\n \"acknowledged\",\n \"requeued\"\n ]\n },\n \"evidence_kind\": {\n \"enum\": [\n \"event\",\n \"action_request\",\n \"action_outcome\"\n ]\n },\n \"evidence\": {\n \"type\": \"object\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"acknowledged_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.dead-letter/1.1.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.dead-letter/1.1.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.dead-letter\nversion: 1.1.0\nname: Runtime dead letter\ndescription: Retained event or action evidence that cannot be processed safely.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.dead-letter/1.1.0.schema.json\n---\n\n# Runtime dead letter\n\nRetained event or action evidence that cannot be processed safely.\n\nThe record's type is declared under the collection's configured explicit type\nkey, so the schema neither requires nor pins a `type` field and accepts\ntop-level fields outside this contract. That is the only change from 1.0.0;\nevery record valid under 1.0.0 is also valid under 1.1.0.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "types/mdbase-runtime/v2/dead-letter.md", + "document": "---\nkind: mdbase.type\nname: runtime_dead_letter\nversion: 2\ndescription: Canonical Markdown implementation of mdbase.runtime.dead-letter.\nmatch:\n where:\n type: runtime_dead_letter\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: mdbase durable runtime dead letter\n type: object\n required:\n - id\n - reason\n - status\n - evidence\n - created_at\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n reason:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n status:\n enum:\n - unresolved\n - acknowledged\n - requeued\n evidence_kind:\n enum:\n - event\n - action_request\n - action_outcome\n evidence:\n type: object\n created_at:\n type: string\n format: date-time\n acknowledged_at:\n type: string\n format: date-time\n $defs:\n identifier:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n semanticVersion:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n dateTime:\n type: string\n format: date-time\n contractRequirement:\n type: object\n required:\n - id\n - version\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n minLength: 1\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n exactContractReference:\n type: object\n required:\n - id\n - version\n - digest\n properties:\n id:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n digest:\n type: string\n pattern: ^sha256:[0-9a-f]{64}$\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n identity:\n type: object\n required:\n - application\n - implementation\n - version\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n version:\n type: string\n pattern: ^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n providerSelector:\n type: object\n required: []\n properties:\n application:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n implementation:\n type: string\n pattern: ^[A-Za-z][A-Za-z0-9._:-]*$\n instance_id:\n type: string\n minLength: 1\n patternProperties:\n ^x-[A-Za-z0-9._:-]+$: true\n additionalProperties: false\n minProperties: 1\n expression:\n type: object\n required:\n - $expr\n properties:\n $expr:\n type: string\n minLength: 1\n additionalProperties: false\n $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.dead-letter/1.1.0.schema.json\nimplements:\n - contract: mdbase.runtime.dead-letter\n version: 1.1.0\n fields:\n id: id\n reason: reason\n status: status\n evidence_kind: evidence_kind\n evidence: evidence\n created_at: created_at\n acknowledged_at: acknowledged_at\n---\n\n# Runtime dead letter\n\nThis canonical type makes `runtime_dead_letter` records discoverable through\nthe ordinary mdbase record-contract registry.\n\nApps create these records by naming the type; the engine writes it under the\ncollection's configured explicit type key. The `match` rule also\nrecognises hand-written `type: runtime_dead_letter` records in collections\nwhose type key is something else.\n" + }, + { + "source": "schemas/mdbase.record.created/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase record-created event data\",\n \"type\": \"object\",\n \"required\": [\n \"path\",\n \"after\",\n \"changed_fields\",\n \"revision\",\n \"types\"\n ],\n \"properties\": {\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"after\": {\n \"type\": \"object\"\n },\n \"changed_fields\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"types\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.record.created/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.record.created/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: event\nid: mdbase.record.created\nversion: 1.0.0\nname: Record created\ndescription: Published after a record is created and derived collection state is consistent.\ndata_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.record.created/1.0.0.schema.json\n---\n\n# Record created\n\nThis built-in is an ordinary, inspectable contract artifact. Runtime exchange\nuses the mdbase interoperability profile unchanged.\n" + }, + { + "source": "schemas/mdbase.record.modified/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase record-modified event data\",\n \"type\": \"object\",\n \"required\": [\n \"path\",\n \"before\",\n \"after\",\n \"changed_fields\",\n \"previous_revision\",\n \"revision\",\n \"previous_types\",\n \"types\"\n ],\n \"properties\": {\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"before\": {\n \"type\": \"object\"\n },\n \"after\": {\n \"type\": \"object\"\n },\n \"changed_fields\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"previous_revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"previous_types\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n },\n \"types\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.record.modified/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.record.modified/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: event\nid: mdbase.record.modified\nversion: 1.0.0\nname: Record modified\ndescription: Published after a record is modified and derived collection state is consistent.\ndata_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.record.modified/1.0.0.schema.json\n---\n\n# Record modified\n\nThis built-in is an ordinary, inspectable contract artifact. Runtime exchange\nuses the mdbase interoperability profile unchanged.\n" + }, + { + "source": "schemas/mdbase.record.deleted/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase record-deleted event data\",\n \"type\": \"object\",\n \"required\": [\n \"path\",\n \"before\",\n \"previous_revision\",\n \"types\"\n ],\n \"properties\": {\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"before\": {\n \"type\": \"object\"\n },\n \"previous_revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"types\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.record.deleted/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.record.deleted/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: event\nid: mdbase.record.deleted\nversion: 1.0.0\nname: Record deleted\ndescription: Published after a record is deleted and derived collection state is consistent.\ndata_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.record.deleted/1.0.0.schema.json\n---\n\n# Record deleted\n\nThis built-in is an ordinary, inspectable contract artifact. Runtime exchange\nuses the mdbase interoperability profile unchanged.\n" + }, + { + "source": "schemas/mdbase.record.renamed/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase record-renamed event data\",\n \"type\": \"object\",\n \"required\": [\n \"from\",\n \"to\",\n \"before\",\n \"after\",\n \"previous_revision\",\n \"revision\",\n \"previous_types\",\n \"types\"\n ],\n \"properties\": {\n \"from\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"to\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"before\": {\n \"type\": \"object\"\n },\n \"after\": {\n \"type\": \"object\"\n },\n \"previous_revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"revision\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"previous_types\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n },\n \"types\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.record.renamed/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.record.renamed/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: event\nid: mdbase.record.renamed\nversion: 1.0.0\nname: Record renamed\ndescription: Published after a record is renamed and derived collection state is consistent.\ndata_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.record.renamed/1.0.0.schema.json\n---\n\n# Record renamed\n\nThis built-in is an ordinary, inspectable contract artifact. Runtime exchange\nuses the mdbase interoperability profile unchanged.\n" + }, + { + "source": "schemas/mdbase.runtime.timer.fired/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase runtime timer-fired event data\",\n \"type\": \"object\",\n \"required\": [\n \"timer_id\",\n \"generation\",\n \"scheduled_for\",\n \"fired_at\",\n \"late_by_ms\",\n \"data\"\n ],\n \"properties\": {\n \"timer_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"generation\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"scheduled_for\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"fired_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"late_by_ms\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"data\": {\n \"description\": \"Opaque application data supplied when the timer was scheduled.\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.timer.fired/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.timer.fired/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: event\nid: mdbase.runtime.timer.fired\nversion: 1.0.0\nname: Runtime timer fired\ndescription: Published with scheduling evidence and opaque application data when the current generation of a durable timer fires.\ndata_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.timer.fired/1.0.0.schema.json\n---\n\n# Runtime timer fired\n\nThis built-in is an ordinary, inspectable contract artifact. Runtime exchange\nuses the mdbase interoperability profile unchanged.\n" + }, + { + "source": "schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase runtime run-cancel action output\",\n \"type\": \"object\",\n \"required\": [\n \"run_id\",\n \"status\"\n ],\n \"properties\": {\n \"run_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"status\": {\n \"enum\": [\n \"cancellation_requested\",\n \"already_terminal\"\n ]\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.run.cancel/1.0.0.output.schema.json\"\n}\n" + }, + { + "source": "schemas/mdbase.runtime.run.cancel/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase runtime run-cancel action input\",\n \"type\": \"object\",\n \"required\": [\n \"run_id\"\n ],\n \"properties\": {\n \"run_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"reason\": {\n \"type\": \"string\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.run.cancel/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.run.cancel/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: action\nid: mdbase.runtime.run.cancel\nversion: 1.0.0\nname: Cancel durable runtime run\ndescription: Request cooperative cancellation of one durable runtime run.\ninput_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.run.cancel/1.0.0.schema.json\noutput_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json\nbehavior:\n idempotency: required\n cancellation: none\n---\n\n# Cancel durable runtime run\n\nThis built-in is an ordinary, inspectable contract artifact. Runtime exchange\nuses the mdbase interoperability profile unchanged.\n" + }, + { + "source": "schemas/mdbase.runtime.workflow/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime workflow\",\n \"type\": \"object\",\n \"required\": [\n \"type\",\n \"id\",\n \"version\",\n \"name\",\n \"enabled\",\n \"triggers\",\n \"steps\"\n ],\n \"properties\": {\n \"type\": {\n \"const\": \"runtime_workflow\"\n },\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"enabled\": {\n \"type\": \"boolean\"\n },\n \"requires\": {\n \"$ref\": \"#/$defs/requires\"\n },\n \"vars\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"triggers\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"$ref\": \"#/$defs/trigger\"\n }\n },\n \"steps\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"$ref\": \"#/$defs/step\"\n }\n },\n \"run\": {\n \"$ref\": \"#/$defs/runPolicy\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n },\n \"requires\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"capabilities\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"trigger\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"event\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"event\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n },\n \"if\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n },\n \"debounce\": {\n \"$ref\": \"#/$defs/duration\"\n },\n \"minimum_interval\": {\n \"$ref\": \"#/$defs/duration\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"step\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"action\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"action\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n },\n \"provider\": {\n \"$ref\": \"#/$defs/providerSelector\"\n },\n \"requires\": {\n \"$ref\": \"#/$defs/requires\"\n },\n \"if\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n },\n \"input\": {\n \"type\": \"object\",\n \"additionalProperties\": {}\n },\n \"for_each\": {\n \"type\": \"object\",\n \"required\": [\n \"items\"\n ],\n \"properties\": {\n \"items\": {},\n \"as\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z_][A-Za-z0-9_]*$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"duration\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)(ms|s|m|h|d)$\"\n },\n \"runPolicy\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"idempotency\": {\n \"type\": \"object\",\n \"required\": [\n \"key\"\n ],\n \"properties\": {\n \"key\": {}\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"concurrency\": {\n \"type\": \"object\",\n \"required\": [\n \"policy\"\n ],\n \"properties\": {\n \"group\": {},\n \"policy\": {\n \"enum\": [\n \"skip\",\n \"queue\",\n \"replace\",\n \"allow\"\n ]\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"limits\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"timeout\": {\n \"$ref\": \"#/$defs/duration\"\n },\n \"max_items\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"on_error\": {\n \"enum\": [\n \"stop\",\n \"continue\"\n ]\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.workflow/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.workflow/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.workflow\nversion: 1.0.0\nname: Durable workflow\ndescription: A portable workflow whose event and action references are resolved and pinned at admission.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.workflow/1.0.0.schema.json\n---\n\n# Durable workflow\n\nA portable workflow whose event and action references are resolved and pinned at admission.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "schemas/mdbase.runtime.policy/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime policy\",\n \"type\": \"object\",\n \"required\": [\n \"type\",\n \"id\",\n \"version\",\n \"enabled\",\n \"grants\"\n ],\n \"properties\": {\n \"type\": {\n \"const\": \"runtime_policy\"\n },\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"enabled\": {\n \"type\": \"boolean\"\n },\n \"executors\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"default\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"workflows\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"provider_selections\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\n \"contract\",\n \"selector\"\n ],\n \"properties\": {\n \"contract\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n },\n \"selector\": {\n \"$ref\": \"#/$defs/providerSelector\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n },\n \"grants\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\n \"capability\",\n \"mode\"\n ],\n \"properties\": {\n \"capability\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"mode\": {\n \"enum\": [\n \"allow\",\n \"deny\"\n ]\n },\n \"actions\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n }\n },\n \"providers\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"$ref\": \"#/$defs/providerSelector\"\n }\n },\n \"max_calls_per_run\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"max_records_per_run\": {\n \"type\": \"integer\",\n \"minimum\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.policy/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.policy/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.policy\nversion: 1.0.0\nname: Runtime policy\ndescription: Local authorization, executor, limit, and provider-selection policy.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.policy/1.0.0.schema.json\n---\n\n# Runtime policy\n\nLocal authorization, executor, limit, and provider-selection policy.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "schemas/mdbase.runtime.provider-registration/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase runtime provider registration evidence\",\n \"type\": \"object\",\n \"required\": [\n \"type\",\n \"id\",\n \"declaration_kind\",\n \"declaration\",\n \"verified_at\",\n \"active\"\n ],\n \"properties\": {\n \"type\": {\n \"const\": \"runtime_provider_registration\"\n },\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"declaration_kind\": {\n \"enum\": [\n \"event_source\",\n \"action_provider\"\n ]\n },\n \"declaration\": {\n \"type\": \"object\"\n },\n \"verified_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"active\": {\n \"type\": \"boolean\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.provider-registration/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.provider-registration/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.provider-registration\nversion: 1.0.0\nname: Provider registration evidence\ndescription: An optional audit snapshot of a verified interoperability declaration; it never activates code.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.provider-registration/1.0.0.schema.json\n---\n\n# Provider registration evidence\n\nAn optional audit snapshot of a verified interoperability declaration; it never activates code.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "schemas/mdbase.runtime.capability-grant/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase runtime capability grant\",\n \"type\": \"object\",\n \"required\": [\n \"type\",\n \"id\",\n \"capability\",\n \"principal\",\n \"mode\",\n \"granted_at\"\n ],\n \"properties\": {\n \"type\": {\n \"const\": \"runtime_capability_grant\"\n },\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"capability\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"principal\": {\n \"$ref\": \"#/$defs/identity\"\n },\n \"mode\": {\n \"enum\": [\n \"allow\",\n \"deny\"\n ]\n },\n \"actions\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n }\n },\n \"providers\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"$ref\": \"#/$defs/providerSelector\"\n }\n },\n \"granted_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"expires_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.capability-grant/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.capability-grant/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.capability-grant\nversion: 1.0.0\nname: Capability grant evidence\ndescription: A materialized authorization grant scoped independently from contract conformance.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.capability-grant/1.0.0.schema.json\n---\n\n# Capability grant evidence\n\nA materialized authorization grant scoped independently from contract conformance.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "schemas/mdbase.runtime.run/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime run\",\n \"type\": \"object\",\n \"required\": [\n \"type\",\n \"id\",\n \"workflow_id\",\n \"workflow_version\",\n \"workflow_revision\",\n \"event_id\",\n \"event_contract\",\n \"admitted_plan\",\n \"status\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"type\": {\n \"const\": \"runtime_run\"\n },\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"workflow_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"workflow_version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"workflow_revision\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"event_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"event_contract\": {\n \"$ref\": \"#/$defs/exactContractReference\"\n },\n \"event_source\": {\n \"$ref\": \"#/$defs/identity\"\n },\n \"admitted_plan\": {\n \"$ref\": \"#/$defs/admittedPlan\"\n },\n \"policy_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"policy_revision\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"trigger_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"event_cursor\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"executor\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"idempotency_key\": {\n \"type\": \"string\"\n },\n \"concurrency_group\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"enum\": [\n \"queued\",\n \"running\",\n \"waiting\",\n \"succeeded\",\n \"failed\",\n \"cancelled\",\n \"indeterminate\"\n ]\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"started_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"finished_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lease\": {\n \"$ref\": \"#/$defs/lease\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n },\n \"admittedPlan\": {\n \"type\": \"object\",\n \"required\": [\n \"profile_version\",\n \"workflow_revision\",\n \"event\",\n \"steps\"\n ],\n \"properties\": {\n \"profile_version\": {\n \"const\": \"0.2\"\n },\n \"workflow_revision\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"event\": {\n \"type\": \"object\",\n \"required\": [\n \"contract\",\n \"source\"\n ],\n \"properties\": {\n \"contract\": {\n \"$ref\": \"#/$defs/exactContractReference\"\n },\n \"source\": {\n \"$ref\": \"#/$defs/identity\"\n },\n \"source_declaration_digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"steps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"contract\",\n \"provider\",\n \"provider_declaration_digest\",\n \"handler_id\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"contract\": {\n \"$ref\": \"#/$defs/exactContractReference\"\n },\n \"provider\": {\n \"$ref\": \"#/$defs/identity\"\n },\n \"provider_declaration_digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"handler_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"lease\": {\n \"type\": \"object\",\n \"required\": [\n \"owner\",\n \"token\",\n \"expires_at\"\n ],\n \"properties\": {\n \"owner\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"token\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"expires_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.run/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.run/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.run\nversion: 1.0.0\nname: Durable run\ndescription: The durable state and immutable admitted plan for one workflow execution.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.run/1.0.0.schema.json\n---\n\n# Durable run\n\nThe durable state and immutable admitted plan for one workflow execution.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "schemas/mdbase.runtime.action-attempt/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime action attempt\",\n \"type\": \"object\",\n \"required\": [\n \"type\",\n \"id\",\n \"run_id\",\n \"step_id\",\n \"request_id\",\n \"invocation_id\",\n \"attempt_id\",\n \"contract\",\n \"provider\",\n \"provider_declaration_digest\",\n \"status\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"type\": {\n \"const\": \"runtime_action_attempt\"\n },\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"run_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"step_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"request_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"invocation_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"attempt_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"contract\": {\n \"$ref\": \"#/$defs/exactContractReference\"\n },\n \"provider\": {\n \"$ref\": \"#/$defs/identity\"\n },\n \"provider_declaration_digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"handler_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"idempotency_key\": {\n \"type\": \"string\"\n },\n \"status\": {\n \"enum\": [\n \"admitted\",\n \"dispatching\",\n \"succeeded\",\n \"rejected\",\n \"failed\",\n \"cancelled\",\n \"indeterminate\"\n ]\n },\n \"request\": {\n \"type\": \"object\"\n },\n \"invocation\": {\n \"type\": \"object\"\n },\n \"outcome\": {\n \"type\": \"object\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"completed_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.action-attempt/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.action-attempt/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.action-attempt\nversion: 1.0.0\nname: Durable action attempt\ndescription: Durable invocation intent and outcome evidence using the shared interoperability envelope.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.action-attempt/1.0.0.schema.json\n---\n\n# Durable action attempt\n\nDurable invocation intent and outcome evidence using the shared interoperability envelope.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "schemas/mdbase.runtime.checkpoint/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime checkpoint\",\n \"type\": \"object\",\n \"required\": [\n \"type\",\n \"id\",\n \"run_id\",\n \"generation\",\n \"status\",\n \"state\",\n \"updated_at\"\n ],\n \"properties\": {\n \"type\": {\n \"const\": \"runtime_checkpoint\"\n },\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"run_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"generation\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"status\": {\n \"enum\": [\n \"open\",\n \"waiting\",\n \"ready\",\n \"completed\",\n \"failed\",\n \"cancelled\"\n ]\n },\n \"state\": {\n \"type\": \"object\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.checkpoint/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.checkpoint/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.checkpoint\nversion: 1.0.0\nname: Runtime checkpoint\ndescription: A durable, lease-safe workflow continuation.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.checkpoint/1.0.0.schema.json\n---\n\n# Runtime checkpoint\n\nA durable, lease-safe workflow continuation.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "schemas/mdbase.runtime.timer/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime timer\",\n \"type\": \"object\",\n \"required\": [\n \"type\",\n \"id\",\n \"generation\",\n \"status\",\n \"fire_at\",\n \"event\",\n \"created_at\",\n \"updated_at\"\n ],\n \"properties\": {\n \"type\": {\n \"const\": \"runtime_timer\"\n },\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"generation\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"status\": {\n \"enum\": [\n \"scheduled\",\n \"firing\",\n \"fired\",\n \"cancelled\"\n ]\n },\n \"fire_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"event\": {\n \"type\": \"object\",\n \"required\": [\n \"contract\",\n \"data\"\n ],\n \"properties\": {\n \"contract\": {\n \"$ref\": \"#/$defs/contractRequirement\"\n },\n \"subject\": {\n \"type\": \"string\"\n },\n \"correlation_id\": {\n \"type\": \"string\"\n },\n \"causation_id\": {\n \"type\": \"string\"\n },\n \"data\": {}\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"missed_run_policy\": {\n \"const\": \"fire_once\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"fired_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.timer/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.timer/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.timer\nversion: 1.0.0\nname: Runtime timer\ndescription: A generation-safe one-shot timer that publishes through the interoperability profile.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.timer/1.0.0.schema.json\n---\n\n# Runtime timer\n\nA generation-safe one-shot timer that publishes through the interoperability profile.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "schemas/mdbase.runtime.diagnostic/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime diagnostic\",\n \"type\": \"object\",\n \"required\": [\n \"type\",\n \"id\",\n \"severity\",\n \"code\",\n \"message\",\n \"created_at\"\n ],\n \"properties\": {\n \"type\": {\n \"const\": \"runtime_diagnostic\"\n },\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"severity\": {\n \"enum\": [\n \"info\",\n \"warning\",\n \"error\"\n ]\n },\n \"code\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"message\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"run_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"attempt_id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"path\": {\n \"type\": \"string\"\n },\n \"details\": {},\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.diagnostic/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.diagnostic/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.diagnostic\nversion: 1.0.0\nname: Runtime diagnostic\ndescription: A machine-readable durable runtime diagnostic.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.diagnostic/1.0.0.schema.json\n---\n\n# Runtime diagnostic\n\nA machine-readable durable runtime diagnostic.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + }, + { + "source": "schemas/mdbase.runtime.dead-letter/1.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"mdbase durable runtime dead letter\",\n \"type\": \"object\",\n \"required\": [\n \"type\",\n \"id\",\n \"reason\",\n \"status\",\n \"evidence\",\n \"created_at\"\n ],\n \"properties\": {\n \"type\": {\n \"const\": \"runtime_dead_letter\"\n },\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"reason\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"status\": {\n \"enum\": [\n \"unresolved\",\n \"acknowledged\",\n \"requeued\"\n ]\n },\n \"evidence_kind\": {\n \"enum\": [\n \"event\",\n \"action_request\",\n \"action_outcome\"\n ]\n },\n \"evidence\": {\n \"type\": \"object\"\n },\n \"created_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"acknowledged_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"identifier\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"semanticVersion\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n },\n \"dateTime\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"contractRequirement\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"exactContractReference\": {\n \"type\": \"object\",\n \"required\": [\n \"id\",\n \"version\",\n \"digest\"\n ],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"digest\": {\n \"type\": \"string\",\n \"pattern\": \"^sha256:[0-9a-f]{64}$\"\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"identity\": {\n \"type\": \"object\",\n \"required\": [\n \"application\",\n \"implementation\",\n \"version\"\n ],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"version\": {\n \"type\": \"string\",\n \"pattern\": \"^(0|[1-9][0-9]*)\\\\.(0|[1-9][0-9]*)\\\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?(?:\\\\+[0-9A-Za-z-]+(?:\\\\.[0-9A-Za-z-]+)*)?$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false\n },\n \"providerSelector\": {\n \"type\": \"object\",\n \"required\": [],\n \"properties\": {\n \"application\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"implementation\": {\n \"type\": \"string\",\n \"pattern\": \"^[A-Za-z][A-Za-z0-9._:-]*$\"\n },\n \"instance_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"patternProperties\": {\n \"^x-[A-Za-z0-9._:-]+$\": true\n },\n \"additionalProperties\": false,\n \"minProperties\": 1\n },\n \"expression\": {\n \"type\": \"object\",\n \"required\": [\n \"$expr\"\n ],\n \"properties\": {\n \"$expr\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n \"$id\": \"https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.dead-letter/1.0.0.schema.json\"\n}\n" + }, + { + "source": "contracts/mdbase.runtime.dead-letter/1.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.runtime.dead-letter\nversion: 1.0.0\nname: Runtime dead letter\ndescription: Retained event or action evidence that cannot be processed safely.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.runtime.dead-letter/1.0.0.schema.json\n---\n\n# Runtime dead letter\n\nRetained event or action evidence that cannot be processed safely.\n\nThis artifact is passive. Installing it or a type that implements it grants no\nauthority to execute workflows or invoke providers.\n" + } + ], + "provides": [ + { + "id": "mdbase.runtime.action-attempt", + "version": "1.1.0", + "digest": "sha256:b1532c38d69fe0728b92203cd16662aa6877e022add3e9b33e6a4f9df61491c8" + }, + { + "id": "mdbase.runtime.capability-grant", + "version": "1.1.0", + "digest": "sha256:7cee5ce74c6e8eab140d6cfdf5100520024636b27b6c17087cd7484ac42c4c85" + }, + { + "id": "mdbase.runtime.checkpoint", + "version": "1.1.0", + "digest": "sha256:83dde7ee10549898cb7bb3b35a5c9fcd911af8e122fa0dc9f9ddce3d9ed2bd9c" + }, + { + "id": "mdbase.runtime.dead-letter", + "version": "1.1.0", + "digest": "sha256:3c114b7ae91b9c3b8edab87fcc0c1abb48c5505f3c55265019cf1eb1daeb104b" + }, + { + "id": "mdbase.runtime.diagnostic", + "version": "1.1.0", + "digest": "sha256:6cf2f280ad5c5c06f29a149e7de723668bdd870e6c341e2a370d953a9888ec85" + }, + { + "id": "mdbase.runtime.policy", + "version": "1.1.0", + "digest": "sha256:b915b5151e103936f965c8db6182ff44330ebfdf2bf9c1fc78ec374c6aae0965" + }, + { + "id": "mdbase.runtime.provider-registration", + "version": "1.1.0", + "digest": "sha256:4fd5c276f9edc86ca12bd5781519e6bd63dd04042144537013e89c088a5ef70c" + }, + { + "id": "mdbase.runtime.run", + "version": "1.1.0", + "digest": "sha256:527a22c70466d5f386d078793390426c5f75aaf8d78c573401518bda0a8eb0f7" + }, + { + "id": "mdbase.runtime.timer", + "version": "1.1.0", + "digest": "sha256:b12041cd617784b6ab3546da879c5553d4717ddf8399891be81f9c0d2a9def71" + }, + { + "id": "mdbase.runtime.workflow", + "version": "1.1.0", + "digest": "sha256:eeff8604e96d018a403bfeeede0effa81f4dab7ec2a73e8dbba8a04d8707c24c" + } + ] +} diff --git a/dist/schemas/mdbase.runtime.action-attempt/1.1.0.schema.json b/dist/schemas/mdbase.runtime.action-attempt/1.1.0.schema.json new file mode 100644 index 0000000..70209ae --- /dev/null +++ b/dist/schemas/mdbase.runtime.action-attempt/1.1.0.schema.json @@ -0,0 +1,230 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime action attempt", + "type": "object", + "required": [ + "id", + "run_id", + "step_id", + "request_id", + "invocation_id", + "attempt_id", + "contract", + "provider", + "provider_declaration_digest", + "status", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "step_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "request_id": { + "type": "string", + "minLength": 1 + }, + "invocation_id": { + "type": "string", + "minLength": 1 + }, + "attempt_id": { + "type": "string", + "minLength": 1 + }, + "contract": { + "$ref": "#/$defs/exactContractReference" + }, + "provider": { + "$ref": "#/$defs/identity" + }, + "provider_declaration_digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "handler_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "idempotency_key": { + "type": "string" + }, + "status": { + "enum": [ + "admitted", + "dispatching", + "succeeded", + "rejected", + "failed", + "cancelled", + "indeterminate" + ] + }, + "request": { + "type": "object" + }, + "invocation": { + "type": "object" + }, + "outcome": { + "type": "object" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.action-attempt/1.1.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.capability-grant/1.1.0.schema.json b/dist/schemas/mdbase.runtime.capability-grant/1.1.0.schema.json new file mode 100644 index 0000000..9b1c133 --- /dev/null +++ b/dist/schemas/mdbase.runtime.capability-grant/1.1.0.schema.json @@ -0,0 +1,189 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime capability grant", + "type": "object", + "required": [ + "id", + "capability", + "principal", + "mode", + "granted_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "capability": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "principal": { + "$ref": "#/$defs/identity" + }, + "mode": { + "enum": [ + "allow", + "deny" + ] + }, + "actions": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/contractRequirement" + } + }, + "providers": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/providerSelector" + } + }, + "granted_at": { + "type": "string", + "format": "date-time" + }, + "expires_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.capability-grant/1.1.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.checkpoint/1.1.0.schema.json b/dist/schemas/mdbase.runtime.checkpoint/1.1.0.schema.json new file mode 100644 index 0000000..f4e5526 --- /dev/null +++ b/dist/schemas/mdbase.runtime.checkpoint/1.1.0.schema.json @@ -0,0 +1,180 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime checkpoint", + "type": "object", + "required": [ + "id", + "run_id", + "generation", + "status", + "state", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "status": { + "enum": [ + "open", + "waiting", + "ready", + "completed", + "failed", + "cancelled" + ] + }, + "state": { + "type": "object" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.checkpoint/1.1.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.dead-letter/1.1.0.schema.json b/dist/schemas/mdbase.runtime.dead-letter/1.1.0.schema.json new file mode 100644 index 0000000..f754108 --- /dev/null +++ b/dist/schemas/mdbase.runtime.dead-letter/1.1.0.schema.json @@ -0,0 +1,183 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime dead letter", + "type": "object", + "required": [ + "id", + "reason", + "status", + "evidence", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "reason": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "status": { + "enum": [ + "unresolved", + "acknowledged", + "requeued" + ] + }, + "evidence_kind": { + "enum": [ + "event", + "action_request", + "action_outcome" + ] + }, + "evidence": { + "type": "object" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "acknowledged_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.dead-letter/1.1.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.diagnostic/1.1.0.schema.json b/dist/schemas/mdbase.runtime.diagnostic/1.1.0.schema.json new file mode 100644 index 0000000..dcfed28 --- /dev/null +++ b/dist/schemas/mdbase.runtime.diagnostic/1.1.0.schema.json @@ -0,0 +1,185 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime diagnostic", + "type": "object", + "required": [ + "id", + "severity", + "code", + "message", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "severity": { + "enum": [ + "info", + "warning", + "error" + ] + }, + "code": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "message": { + "type": "string", + "minLength": 1 + }, + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "attempt_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "path": { + "type": "string" + }, + "details": {}, + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.diagnostic/1.1.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.policy/1.1.0.schema.json b/dist/schemas/mdbase.runtime.policy/1.1.0.schema.json new file mode 100644 index 0000000..a85e1e7 --- /dev/null +++ b/dist/schemas/mdbase.runtime.policy/1.1.0.schema.json @@ -0,0 +1,255 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime policy", + "type": "object", + "required": [ + "id", + "version", + "enabled", + "grants" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "enabled": { + "type": "boolean" + }, + "executors": { + "type": "object", + "required": [], + "properties": { + "default": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "workflows": { + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "provider_selections": { + "type": "array", + "items": { + "type": "object", + "required": [ + "contract", + "selector" + ], + "properties": { + "contract": { + "$ref": "#/$defs/contractRequirement" + }, + "selector": { + "$ref": "#/$defs/providerSelector" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "grants": { + "type": "array", + "items": { + "type": "object", + "required": [ + "capability", + "mode" + ], + "properties": { + "capability": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "mode": { + "enum": [ + "allow", + "deny" + ] + }, + "actions": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/contractRequirement" + } + }, + "providers": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/providerSelector" + } + }, + "max_calls_per_run": { + "type": "integer", + "minimum": 1 + }, + "max_records_per_run": { + "type": "integer", + "minimum": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.policy/1.1.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.provider-registration/1.1.0.schema.json b/dist/schemas/mdbase.runtime.provider-registration/1.1.0.schema.json new file mode 100644 index 0000000..0999753 --- /dev/null +++ b/dist/schemas/mdbase.runtime.provider-registration/1.1.0.schema.json @@ -0,0 +1,170 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime provider registration evidence", + "type": "object", + "required": [ + "id", + "declaration_kind", + "declaration", + "verified_at", + "active" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "declaration_kind": { + "enum": [ + "event_source", + "action_provider" + ] + }, + "declaration": { + "type": "object" + }, + "verified_at": { + "type": "string", + "format": "date-time" + }, + "active": { + "type": "boolean" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.provider-registration/1.1.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.run/1.1.0.schema.json b/dist/schemas/mdbase.runtime.run/1.1.0.schema.json new file mode 100644 index 0000000..4967455 --- /dev/null +++ b/dist/schemas/mdbase.runtime.run/1.1.0.schema.json @@ -0,0 +1,348 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime run", + "type": "object", + "required": [ + "id", + "workflow_id", + "workflow_version", + "workflow_revision", + "event_id", + "event_contract", + "admitted_plan", + "status", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "workflow_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "workflow_version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "workflow_revision": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "event_id": { + "type": "string", + "minLength": 1 + }, + "event_contract": { + "$ref": "#/$defs/exactContractReference" + }, + "event_source": { + "$ref": "#/$defs/identity" + }, + "admitted_plan": { + "$ref": "#/$defs/admittedPlan" + }, + "policy_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "policy_revision": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "trigger_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "event_cursor": { + "type": "integer", + "minimum": 1 + }, + "executor": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "idempotency_key": { + "type": "string" + }, + "concurrency_group": { + "type": "string" + }, + "status": { + "enum": [ + "queued", + "running", + "waiting", + "succeeded", + "failed", + "cancelled", + "indeterminate" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "finished_at": { + "type": "string", + "format": "date-time" + }, + "lease": { + "$ref": "#/$defs/lease" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "admittedPlan": { + "type": "object", + "required": [ + "profile_version", + "workflow_revision", + "event", + "steps" + ], + "properties": { + "profile_version": { + "const": "0.2" + }, + "workflow_revision": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "event": { + "type": "object", + "required": [ + "contract", + "source" + ], + "properties": { + "contract": { + "$ref": "#/$defs/exactContractReference" + }, + "source": { + "$ref": "#/$defs/identity" + }, + "source_declaration_digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "contract", + "provider", + "provider_declaration_digest", + "handler_id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "contract": { + "$ref": "#/$defs/exactContractReference" + }, + "provider": { + "$ref": "#/$defs/identity" + }, + "provider_declaration_digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "handler_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "lease": { + "type": "object", + "required": [ + "owner", + "token", + "expires_at" + ], + "properties": { + "owner": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "token": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "string", + "format": "date-time" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.run/1.1.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.timer/1.1.0.schema.json b/dist/schemas/mdbase.runtime.timer/1.1.0.schema.json new file mode 100644 index 0000000..5a2862b --- /dev/null +++ b/dist/schemas/mdbase.runtime.timer/1.1.0.schema.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime timer", + "type": "object", + "required": [ + "id", + "generation", + "status", + "fire_at", + "event", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "status": { + "enum": [ + "scheduled", + "firing", + "fired", + "cancelled" + ] + }, + "fire_at": { + "type": "string", + "format": "date-time" + }, + "event": { + "type": "object", + "required": [ + "contract", + "data" + ], + "properties": { + "contract": { + "$ref": "#/$defs/contractRequirement" + }, + "subject": { + "type": "string" + }, + "correlation_id": { + "type": "string" + }, + "causation_id": { + "type": "string" + }, + "data": {} + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "missed_run_policy": { + "const": "fire_once" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "fired_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.timer/1.1.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.workflow/1.1.0.schema.json b/dist/schemas/mdbase.runtime.workflow/1.1.0.schema.json new file mode 100644 index 0000000..fa23800 --- /dev/null +++ b/dist/schemas/mdbase.runtime.workflow/1.1.0.schema.json @@ -0,0 +1,384 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime workflow", + "type": "object", + "required": [ + "id", + "version", + "name", + "enabled", + "triggers", + "steps" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "requires": { + "$ref": "#/$defs/requires" + }, + "vars": { + "type": "object", + "additionalProperties": {} + }, + "triggers": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/trigger" + } + }, + "steps": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/step" + } + }, + "run": { + "$ref": "#/$defs/runPolicy" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "requires": { + "type": "object", + "required": [], + "properties": { + "capabilities": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "trigger": { + "type": "object", + "required": [ + "id", + "event" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "event": { + "$ref": "#/$defs/contractRequirement" + }, + "if": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "debounce": { + "$ref": "#/$defs/duration" + }, + "minimum_interval": { + "$ref": "#/$defs/duration" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "step": { + "type": "object", + "required": [ + "id", + "action" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "name": { + "type": "string" + }, + "action": { + "$ref": "#/$defs/contractRequirement" + }, + "provider": { + "$ref": "#/$defs/providerSelector" + }, + "requires": { + "$ref": "#/$defs/requires" + }, + "if": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "input": { + "type": "object", + "additionalProperties": {} + }, + "for_each": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": {}, + "as": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "duration": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)(ms|s|m|h|d)$" + }, + "runPolicy": { + "type": "object", + "required": [], + "properties": { + "idempotency": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": {} + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "concurrency": { + "type": "object", + "required": [ + "policy" + ], + "properties": { + "group": {}, + "policy": { + "enum": [ + "skip", + "queue", + "replace", + "allow" + ] + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "limits": { + "type": "object", + "required": [], + "properties": { + "timeout": { + "$ref": "#/$defs/duration" + }, + "max_items": { + "type": "integer", + "minimum": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "on_error": { + "enum": [ + "stop", + "continue" + ] + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.workflow/1.1.0.schema.json" +} diff --git a/packs/mdbase.runtime.standard/0.2.0.pack.yaml b/packs/mdbase.runtime.standard/0.2.0.pack.yaml index d29c234..88f862f 100644 --- a/packs/mdbase.runtime.standard/0.2.0.pack.yaml +++ b/packs/mdbase.runtime.standard/0.2.0.pack.yaml @@ -12,7 +12,7 @@ display: badges: - Runtime 0.2 installation: - visibility: advanced + visibility: hidden recommendation: integration-managed primary_type: null caution: Most collections do not need this pack. Install it only when a runtime integration asks you to. diff --git a/packs/mdbase.runtime.standard/0.2.1.pack.yaml b/packs/mdbase.runtime.standard/0.2.1.pack.yaml new file mode 100644 index 0000000..e6fe8f5 --- /dev/null +++ b/packs/mdbase.runtime.standard/0.2.1.pack.yaml @@ -0,0 +1,292 @@ +kind: mdbase.catalog-pack +id: mdbase.runtime.standard +version: 0.2.1 +name: mdbase durable runtime standard library +description: Runtime record implementations and inspectable built-in event/action contracts. +display: + name: Runtime standard library + summary: Internal records and contracts for durable workflows, runs, timers, and diagnostics. + category: infrastructure + audience: infrastructure + icon: terminal-window + badges: + - Runtime 0.2 +installation: + visibility: advanced + recommendation: integration-managed + primary_type: null + caution: Most collections do not need this pack. Install it only when a runtime integration asks you to. +provides: + - id: mdbase.runtime.action-attempt + version: 1.1.0 + - id: mdbase.runtime.capability-grant + version: 1.1.0 + - id: mdbase.runtime.checkpoint + version: 1.1.0 + - id: mdbase.runtime.dead-letter + version: 1.1.0 + - id: mdbase.runtime.diagnostic + version: 1.1.0 + - id: mdbase.runtime.policy + version: 1.1.0 + - id: mdbase.runtime.provider-registration + version: 1.1.0 + - id: mdbase.runtime.run + version: 1.1.0 + - id: mdbase.runtime.timer + version: 1.1.0 + - id: mdbase.runtime.workflow + version: 1.1.0 +resources: + - kind: schema + mode: managed + source: schemas/mdbase.runtime.workflow/1.1.0.schema.json + target: schemas/mdbase.runtime.workflow/1.1.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.workflow/1.1.0.md + target: _contracts/mdbase.runtime.workflow/1.1.0.md + - kind: type + mode: managed + source: types/mdbase-runtime/v2/workflow.md + target: _types/workflow.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.policy/1.1.0.schema.json + target: schemas/mdbase.runtime.policy/1.1.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.policy/1.1.0.md + target: _contracts/mdbase.runtime.policy/1.1.0.md + - kind: type + mode: managed + source: types/mdbase-runtime/v2/policy.md + target: _types/policy.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.provider-registration/1.1.0.schema.json + target: schemas/mdbase.runtime.provider-registration/1.1.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.provider-registration/1.1.0.md + target: _contracts/mdbase.runtime.provider-registration/1.1.0.md + - kind: type + mode: managed + source: types/mdbase-runtime/v2/provider-registration.md + target: _types/provider-registration.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.capability-grant/1.1.0.schema.json + target: schemas/mdbase.runtime.capability-grant/1.1.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.capability-grant/1.1.0.md + target: _contracts/mdbase.runtime.capability-grant/1.1.0.md + - kind: type + mode: managed + source: types/mdbase-runtime/v2/capability-grant.md + target: _types/capability-grant.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.run/1.1.0.schema.json + target: schemas/mdbase.runtime.run/1.1.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.run/1.1.0.md + target: _contracts/mdbase.runtime.run/1.1.0.md + - kind: type + mode: managed + source: types/mdbase-runtime/v2/run.md + target: _types/run.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.action-attempt/1.1.0.schema.json + target: schemas/mdbase.runtime.action-attempt/1.1.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.action-attempt/1.1.0.md + target: _contracts/mdbase.runtime.action-attempt/1.1.0.md + - kind: type + mode: managed + source: types/mdbase-runtime/v2/action-attempt.md + target: _types/action-attempt.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.checkpoint/1.1.0.schema.json + target: schemas/mdbase.runtime.checkpoint/1.1.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.checkpoint/1.1.0.md + target: _contracts/mdbase.runtime.checkpoint/1.1.0.md + - kind: type + mode: managed + source: types/mdbase-runtime/v2/checkpoint.md + target: _types/checkpoint.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.timer/1.1.0.schema.json + target: schemas/mdbase.runtime.timer/1.1.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.timer/1.1.0.md + target: _contracts/mdbase.runtime.timer/1.1.0.md + - kind: type + mode: managed + source: types/mdbase-runtime/v2/timer.md + target: _types/timer.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.diagnostic/1.1.0.schema.json + target: schemas/mdbase.runtime.diagnostic/1.1.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.diagnostic/1.1.0.md + target: _contracts/mdbase.runtime.diagnostic/1.1.0.md + - kind: type + mode: managed + source: types/mdbase-runtime/v2/diagnostic.md + target: _types/diagnostic.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.dead-letter/1.1.0.schema.json + target: schemas/mdbase.runtime.dead-letter/1.1.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.dead-letter/1.1.0.md + target: _contracts/mdbase.runtime.dead-letter/1.1.0.md + - kind: type + mode: managed + source: types/mdbase-runtime/v2/dead-letter.md + target: _types/dead-letter.md + - kind: schema + mode: managed + source: schemas/mdbase.record.created/1.0.0.schema.json + target: schemas/mdbase.record.created/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.record.created/1.0.0.md + target: _contracts/mdbase.record.created/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.record.modified/1.0.0.schema.json + target: schemas/mdbase.record.modified/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.record.modified/1.0.0.md + target: _contracts/mdbase.record.modified/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.record.deleted/1.0.0.schema.json + target: schemas/mdbase.record.deleted/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.record.deleted/1.0.0.md + target: _contracts/mdbase.record.deleted/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.record.renamed/1.0.0.schema.json + target: schemas/mdbase.record.renamed/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.record.renamed/1.0.0.md + target: _contracts/mdbase.record.renamed/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.timer.fired/1.0.0.schema.json + target: schemas/mdbase.runtime.timer.fired/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.timer.fired/1.0.0.md + target: _contracts/mdbase.runtime.timer.fired/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json + target: schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json + - kind: schema + mode: managed + source: schemas/mdbase.runtime.run.cancel/1.0.0.schema.json + target: schemas/mdbase.runtime.run.cancel/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.run.cancel/1.0.0.md + target: _contracts/mdbase.runtime.run.cancel/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.workflow/1.0.0.schema.json + target: schemas/mdbase.runtime.workflow/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.workflow/1.0.0.md + target: _contracts/mdbase.runtime.workflow/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.policy/1.0.0.schema.json + target: schemas/mdbase.runtime.policy/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.policy/1.0.0.md + target: _contracts/mdbase.runtime.policy/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.provider-registration/1.0.0.schema.json + target: schemas/mdbase.runtime.provider-registration/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.provider-registration/1.0.0.md + target: _contracts/mdbase.runtime.provider-registration/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.capability-grant/1.0.0.schema.json + target: schemas/mdbase.runtime.capability-grant/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.capability-grant/1.0.0.md + target: _contracts/mdbase.runtime.capability-grant/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.run/1.0.0.schema.json + target: schemas/mdbase.runtime.run/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.run/1.0.0.md + target: _contracts/mdbase.runtime.run/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.action-attempt/1.0.0.schema.json + target: schemas/mdbase.runtime.action-attempt/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.action-attempt/1.0.0.md + target: _contracts/mdbase.runtime.action-attempt/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.checkpoint/1.0.0.schema.json + target: schemas/mdbase.runtime.checkpoint/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.checkpoint/1.0.0.md + target: _contracts/mdbase.runtime.checkpoint/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.timer/1.0.0.schema.json + target: schemas/mdbase.runtime.timer/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.timer/1.0.0.md + target: _contracts/mdbase.runtime.timer/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.diagnostic/1.0.0.schema.json + target: schemas/mdbase.runtime.diagnostic/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.diagnostic/1.0.0.md + target: _contracts/mdbase.runtime.diagnostic/1.0.0.md + - kind: schema + mode: managed + source: schemas/mdbase.runtime.dead-letter/1.0.0.schema.json + target: schemas/mdbase.runtime.dead-letter/1.0.0.schema.json + - kind: contract + mode: managed + source: contracts/mdbase.runtime.dead-letter/1.0.0.md + target: _contracts/mdbase.runtime.dead-letter/1.0.0.md diff --git a/schemas/mdbase.runtime.action-attempt/1.1.0.schema.json b/schemas/mdbase.runtime.action-attempt/1.1.0.schema.json new file mode 100644 index 0000000..70209ae --- /dev/null +++ b/schemas/mdbase.runtime.action-attempt/1.1.0.schema.json @@ -0,0 +1,230 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime action attempt", + "type": "object", + "required": [ + "id", + "run_id", + "step_id", + "request_id", + "invocation_id", + "attempt_id", + "contract", + "provider", + "provider_declaration_digest", + "status", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "step_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "request_id": { + "type": "string", + "minLength": 1 + }, + "invocation_id": { + "type": "string", + "minLength": 1 + }, + "attempt_id": { + "type": "string", + "minLength": 1 + }, + "contract": { + "$ref": "#/$defs/exactContractReference" + }, + "provider": { + "$ref": "#/$defs/identity" + }, + "provider_declaration_digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "handler_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "idempotency_key": { + "type": "string" + }, + "status": { + "enum": [ + "admitted", + "dispatching", + "succeeded", + "rejected", + "failed", + "cancelled", + "indeterminate" + ] + }, + "request": { + "type": "object" + }, + "invocation": { + "type": "object" + }, + "outcome": { + "type": "object" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "completed_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.action-attempt/1.1.0.schema.json" +} diff --git a/schemas/mdbase.runtime.capability-grant/1.1.0.schema.json b/schemas/mdbase.runtime.capability-grant/1.1.0.schema.json new file mode 100644 index 0000000..9b1c133 --- /dev/null +++ b/schemas/mdbase.runtime.capability-grant/1.1.0.schema.json @@ -0,0 +1,189 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime capability grant", + "type": "object", + "required": [ + "id", + "capability", + "principal", + "mode", + "granted_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "capability": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "principal": { + "$ref": "#/$defs/identity" + }, + "mode": { + "enum": [ + "allow", + "deny" + ] + }, + "actions": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/contractRequirement" + } + }, + "providers": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/providerSelector" + } + }, + "granted_at": { + "type": "string", + "format": "date-time" + }, + "expires_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.capability-grant/1.1.0.schema.json" +} diff --git a/schemas/mdbase.runtime.checkpoint/1.1.0.schema.json b/schemas/mdbase.runtime.checkpoint/1.1.0.schema.json new file mode 100644 index 0000000..f4e5526 --- /dev/null +++ b/schemas/mdbase.runtime.checkpoint/1.1.0.schema.json @@ -0,0 +1,180 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime checkpoint", + "type": "object", + "required": [ + "id", + "run_id", + "generation", + "status", + "state", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "status": { + "enum": [ + "open", + "waiting", + "ready", + "completed", + "failed", + "cancelled" + ] + }, + "state": { + "type": "object" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.checkpoint/1.1.0.schema.json" +} diff --git a/schemas/mdbase.runtime.dead-letter/1.1.0.schema.json b/schemas/mdbase.runtime.dead-letter/1.1.0.schema.json new file mode 100644 index 0000000..f754108 --- /dev/null +++ b/schemas/mdbase.runtime.dead-letter/1.1.0.schema.json @@ -0,0 +1,183 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime dead letter", + "type": "object", + "required": [ + "id", + "reason", + "status", + "evidence", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "reason": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "status": { + "enum": [ + "unresolved", + "acknowledged", + "requeued" + ] + }, + "evidence_kind": { + "enum": [ + "event", + "action_request", + "action_outcome" + ] + }, + "evidence": { + "type": "object" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "acknowledged_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.dead-letter/1.1.0.schema.json" +} diff --git a/schemas/mdbase.runtime.diagnostic/1.1.0.schema.json b/schemas/mdbase.runtime.diagnostic/1.1.0.schema.json new file mode 100644 index 0000000..dcfed28 --- /dev/null +++ b/schemas/mdbase.runtime.diagnostic/1.1.0.schema.json @@ -0,0 +1,185 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime diagnostic", + "type": "object", + "required": [ + "id", + "severity", + "code", + "message", + "created_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "severity": { + "enum": [ + "info", + "warning", + "error" + ] + }, + "code": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "message": { + "type": "string", + "minLength": 1 + }, + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "attempt_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "path": { + "type": "string" + }, + "details": {}, + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.diagnostic/1.1.0.schema.json" +} diff --git a/schemas/mdbase.runtime.policy/1.1.0.schema.json b/schemas/mdbase.runtime.policy/1.1.0.schema.json new file mode 100644 index 0000000..a85e1e7 --- /dev/null +++ b/schemas/mdbase.runtime.policy/1.1.0.schema.json @@ -0,0 +1,255 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime policy", + "type": "object", + "required": [ + "id", + "version", + "enabled", + "grants" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "enabled": { + "type": "boolean" + }, + "executors": { + "type": "object", + "required": [], + "properties": { + "default": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "workflows": { + "type": "object", + "additionalProperties": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "provider_selections": { + "type": "array", + "items": { + "type": "object", + "required": [ + "contract", + "selector" + ], + "properties": { + "contract": { + "$ref": "#/$defs/contractRequirement" + }, + "selector": { + "$ref": "#/$defs/providerSelector" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "grants": { + "type": "array", + "items": { + "type": "object", + "required": [ + "capability", + "mode" + ], + "properties": { + "capability": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "mode": { + "enum": [ + "allow", + "deny" + ] + }, + "actions": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/contractRequirement" + } + }, + "providers": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/$defs/providerSelector" + } + }, + "max_calls_per_run": { + "type": "integer", + "minimum": 1 + }, + "max_records_per_run": { + "type": "integer", + "minimum": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.policy/1.1.0.schema.json" +} diff --git a/schemas/mdbase.runtime.provider-registration/1.1.0.schema.json b/schemas/mdbase.runtime.provider-registration/1.1.0.schema.json new file mode 100644 index 0000000..0999753 --- /dev/null +++ b/schemas/mdbase.runtime.provider-registration/1.1.0.schema.json @@ -0,0 +1,170 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime provider registration evidence", + "type": "object", + "required": [ + "id", + "declaration_kind", + "declaration", + "verified_at", + "active" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "declaration_kind": { + "enum": [ + "event_source", + "action_provider" + ] + }, + "declaration": { + "type": "object" + }, + "verified_at": { + "type": "string", + "format": "date-time" + }, + "active": { + "type": "boolean" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.provider-registration/1.1.0.schema.json" +} diff --git a/schemas/mdbase.runtime.run/1.1.0.schema.json b/schemas/mdbase.runtime.run/1.1.0.schema.json new file mode 100644 index 0000000..4967455 --- /dev/null +++ b/schemas/mdbase.runtime.run/1.1.0.schema.json @@ -0,0 +1,348 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime run", + "type": "object", + "required": [ + "id", + "workflow_id", + "workflow_version", + "workflow_revision", + "event_id", + "event_contract", + "admitted_plan", + "status", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "workflow_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "workflow_version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "workflow_revision": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "event_id": { + "type": "string", + "minLength": 1 + }, + "event_contract": { + "$ref": "#/$defs/exactContractReference" + }, + "event_source": { + "$ref": "#/$defs/identity" + }, + "admitted_plan": { + "$ref": "#/$defs/admittedPlan" + }, + "policy_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "policy_revision": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "trigger_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "event_cursor": { + "type": "integer", + "minimum": 1 + }, + "executor": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "idempotency_key": { + "type": "string" + }, + "concurrency_group": { + "type": "string" + }, + "status": { + "enum": [ + "queued", + "running", + "waiting", + "succeeded", + "failed", + "cancelled", + "indeterminate" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "started_at": { + "type": "string", + "format": "date-time" + }, + "finished_at": { + "type": "string", + "format": "date-time" + }, + "lease": { + "$ref": "#/$defs/lease" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "admittedPlan": { + "type": "object", + "required": [ + "profile_version", + "workflow_revision", + "event", + "steps" + ], + "properties": { + "profile_version": { + "const": "0.2" + }, + "workflow_revision": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "event": { + "type": "object", + "required": [ + "contract", + "source" + ], + "properties": { + "contract": { + "$ref": "#/$defs/exactContractReference" + }, + "source": { + "$ref": "#/$defs/identity" + }, + "source_declaration_digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "steps": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "contract", + "provider", + "provider_declaration_digest", + "handler_id" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "contract": { + "$ref": "#/$defs/exactContractReference" + }, + "provider": { + "$ref": "#/$defs/identity" + }, + "provider_declaration_digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "handler_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "lease": { + "type": "object", + "required": [ + "owner", + "token", + "expires_at" + ], + "properties": { + "owner": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "token": { + "type": "string", + "minLength": 1 + }, + "expires_at": { + "type": "string", + "format": "date-time" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.run/1.1.0.schema.json" +} diff --git a/schemas/mdbase.runtime.timer/1.1.0.schema.json b/schemas/mdbase.runtime.timer/1.1.0.schema.json new file mode 100644 index 0000000..5a2862b --- /dev/null +++ b/schemas/mdbase.runtime.timer/1.1.0.schema.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime timer", + "type": "object", + "required": [ + "id", + "generation", + "status", + "fire_at", + "event", + "created_at", + "updated_at" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "status": { + "enum": [ + "scheduled", + "firing", + "fired", + "cancelled" + ] + }, + "fire_at": { + "type": "string", + "format": "date-time" + }, + "event": { + "type": "object", + "required": [ + "contract", + "data" + ], + "properties": { + "contract": { + "$ref": "#/$defs/contractRequirement" + }, + "subject": { + "type": "string" + }, + "correlation_id": { + "type": "string" + }, + "causation_id": { + "type": "string" + }, + "data": {} + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "missed_run_policy": { + "const": "fire_once" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "fired_at": { + "type": "string", + "format": "date-time" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.timer/1.1.0.schema.json" +} diff --git a/schemas/mdbase.runtime.workflow/1.1.0.schema.json b/schemas/mdbase.runtime.workflow/1.1.0.schema.json new file mode 100644 index 0000000..fa23800 --- /dev/null +++ b/schemas/mdbase.runtime.workflow/1.1.0.schema.json @@ -0,0 +1,384 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime workflow", + "type": "object", + "required": [ + "id", + "version", + "name", + "enabled", + "triggers", + "steps" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "name": { + "type": "string", + "minLength": 1 + }, + "description": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "requires": { + "$ref": "#/$defs/requires" + }, + "vars": { + "type": "object", + "additionalProperties": {} + }, + "triggers": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/trigger" + } + }, + "steps": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/$defs/step" + } + }, + "run": { + "$ref": "#/$defs/runPolicy" + } + }, + "$defs": { + "identifier": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "semanticVersion": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + }, + "dateTime": { + "type": "string", + "format": "date-time" + }, + "contractRequirement": { + "type": "object", + "required": [ + "id", + "version" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "minLength": 1 + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "exactContractReference": { + "type": "object", + "required": [ + "id", + "version", + "digest" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "digest": { + "type": "string", + "pattern": "^sha256:[0-9a-f]{64}$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "identity": { + "type": "object", + "required": [ + "application", + "implementation", + "version" + ], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "providerSelector": { + "type": "object", + "required": [], + "properties": { + "application": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "implementation": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "instance_id": { + "type": "string", + "minLength": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false, + "minProperties": 1 + }, + "expression": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "requires": { + "type": "object", + "required": [], + "properties": { + "capabilities": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "trigger": { + "type": "object", + "required": [ + "id", + "event" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "event": { + "$ref": "#/$defs/contractRequirement" + }, + "if": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "debounce": { + "$ref": "#/$defs/duration" + }, + "minimum_interval": { + "$ref": "#/$defs/duration" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "step": { + "type": "object", + "required": [ + "id", + "action" + ], + "properties": { + "id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "name": { + "type": "string" + }, + "action": { + "$ref": "#/$defs/contractRequirement" + }, + "provider": { + "$ref": "#/$defs/providerSelector" + }, + "requires": { + "$ref": "#/$defs/requires" + }, + "if": { + "type": "object", + "required": [ + "$expr" + ], + "properties": { + "$expr": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": false + }, + "input": { + "type": "object", + "additionalProperties": {} + }, + "for_each": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": {}, + "as": { + "type": "string", + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "duration": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)(ms|s|m|h|d)$" + }, + "runPolicy": { + "type": "object", + "required": [], + "properties": { + "idempotency": { + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": {} + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "concurrency": { + "type": "object", + "required": [ + "policy" + ], + "properties": { + "group": {}, + "policy": { + "enum": [ + "skip", + "queue", + "replace", + "allow" + ] + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "limits": { + "type": "object", + "required": [], + "properties": { + "timeout": { + "$ref": "#/$defs/duration" + }, + "max_items": { + "type": "integer", + "minimum": 1 + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + }, + "on_error": { + "enum": [ + "stop", + "continue" + ] + } + }, + "patternProperties": { + "^x-[A-Za-z0-9._:-]+$": true + }, + "additionalProperties": false + } + }, + "$id": "https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.workflow/1.1.0.schema.json" +} diff --git a/scripts/starter-type-keys.test.mjs b/scripts/starter-type-keys.test.mjs index 126b350..39b2ba6 100644 --- a/scripts/starter-type-keys.test.mjs +++ b/scripts/starter-type-keys.test.mjs @@ -9,7 +9,11 @@ const root = new URL("../", import.meta.url); // configured explicit type key (`type` by default, `mdbase_type` in some collections). // A starter that requires or pins its own name under `type`, or rejects unknown // top-level fields, fails in every collection whose key is something else. -for (const source of ["types/person/3.md", "types/comment/2.md", "types/view/2.md", "types/daily-note/1.md"]) { +const runtimeTypes = [ + "action-attempt", "capability-grant", "checkpoint", "dead-letter", "diagnostic", + "policy", "provider-registration", "run", "timer", "workflow" +].map((slug) => `types/mdbase-runtime/v2/${slug}.md`); +for (const source of ["types/person/3.md", "types/comment/2.md", "types/view/2.md", "types/daily-note/1.md", ...runtimeTypes]) { test(`${source} leaves the type key to the collection`, async () => { const type = matter(await readFile(new URL(source, root), "utf8")).data; const schema = type.schema.value; diff --git a/scripts/sync-runtime-pack.mjs b/scripts/sync-runtime-pack.mjs index a2bf0e9..b153c3c 100644 --- a/scripts/sync-runtime-pack.mjs +++ b/scripts/sync-runtime-pack.mjs @@ -1,10 +1,4 @@ -import { - cp, - mkdir, - readFile, - rm, - writeFile -} from "node:fs/promises"; +import { mkdir, readFile, writeFile } from "node:fs/promises"; import { dirname, join, resolve } from "node:path"; import { fileURLToPath } from "node:url"; import { parse, stringify } from "yaml"; @@ -13,53 +7,50 @@ const root = resolve(dirname(fileURLToPath(import.meta.url)), ".."); const specRoot = resolve( process.env.MDBASE_SPEC_DIR ?? join(root, "..", "mdbase-spec") ); -const sourceRoot = join(specRoot, "standard-packs/mdbase-runtime/0.2.0"); +// Published artifacts are immutable: this imports the current pack version +// alongside earlier ones and refuses to overwrite a differing existing file. +const PACK_VERSION = "0.2.1"; +// Type snapshots are versioned so earlier packs keep their published sources. +const TYPE_DIR = "types/mdbase-runtime/v2"; +const sourceRoot = join(specRoot, `standard-packs/mdbase-runtime/${PACK_VERSION}`); const manifest = parse(await readFile(join(sourceRoot, "mdbase-pack.yaml"), "utf8")); if ( manifest.kind !== "mdbase.type-pack" || manifest.id !== "mdbase.runtime.standard" - || manifest.version !== "0.2.0" + || manifest.version !== PACK_VERSION ) { - throw new Error("The source is not mdbase.runtime.standard 0.2.0."); + throw new Error(`The source is not mdbase.runtime.standard ${PACK_VERSION}.`); } -const runtimeContractIds = manifest.resources - .filter(({ kind }) => kind === "contract") - .map(({ source }) => source.split("/")[1]); +// The pack provides the record contract versions its types implement; it also +// installs earlier versions so collection types that still implement them stay valid. const runtimeRecordIds = []; -for (const resource of manifest.resources.filter(({ kind }) => kind === "contract")) { +const recordContractVersions = new Map(); +for (const resource of manifest.resources.filter(({ kind }) => kind === "type")) { const document = await readFile(join(sourceRoot, resource.source), "utf8"); - const frontmatter = parseFrontmatter(document, resource.source).frontmatter; - if (frontmatter.contract_type === "record") { - runtimeRecordIds.push(frontmatter.id); + for (const { contract, version } of parseFrontmatter(document, resource.source).frontmatter.implements ?? []) { + runtimeRecordIds.push(contract); + recordContractVersions.set(contract, version); } } -const runtimeSchemaIds = manifest.resources - .filter(({ kind }) => kind === "schema") - .map(({ source }) => source.split("/")[1]); - -for (const id of new Set(runtimeContractIds)) { - await rm(join(root, "contracts", id), { recursive: true, force: true }); -} -for (const id of new Set(runtimeSchemaIds)) { - await rm(join(root, "schemas", id), { recursive: true, force: true }); -} -await rm(join(root, "types/mdbase-runtime"), { recursive: true, force: true }); - const resources = []; for (const resource of manifest.resources) { const source = catalogSource(resource); const from = join(sourceRoot, resource.source); const to = join(root, source); await mkdir(dirname(to), { recursive: true }); - if (resource.kind === "type") { - await writeFile(to, await editableTypeSnapshot(from), "utf8"); - } else { - await cp(from, to); + const contents = resource.kind === "type" + ? await editableTypeSnapshot(from) + : await readFile(from, "utf8"); + const existing = await readFile(to, "utf8").catch(() => null); + if (existing !== null && existing !== contents) { + throw new Error(`${source} already exists with different content; publish a new version instead.`); } + await writeFile(to, contents, "utf8"); resources.push({ kind: resource.kind, + mode: resource.mode, source, target: resource.target }); @@ -90,10 +81,10 @@ const definition = { // declarations say which sources/providers actually supply them. provides: [...new Set(runtimeRecordIds)] .sort() - .map((id) => ({ id, version: "1.0.0" })), + .map((id) => ({ id, version: recordContractVersions.get(id) })), resources }; -const packPath = join(root, "packs/mdbase.runtime.standard/0.2.0.pack.yaml"); +const packPath = join(root, `packs/mdbase.runtime.standard/${PACK_VERSION}.pack.yaml`); await mkdir(dirname(packPath), { recursive: true }); await writeFile(packPath, stringify(definition, { lineWidth: 0 }), "utf8"); @@ -129,7 +120,7 @@ function catalogSource(resource) { return resource.source.replace(/^_contracts\//u, "contracts/"); } if (resource.kind === "type") { - return resource.source.replace(/^_types\//u, "types/mdbase-runtime/"); + return resource.source.replace(/^_types\//u, `${TYPE_DIR}/`); } return resource.source; } diff --git a/sources.json b/sources.json index 92f3f4f..cc93cef 100644 --- a/sources.json +++ b/sources.json @@ -1,7 +1,7 @@ { "runtime_standard_pack": { "repository": "mdbase-dev/mdbase-spec", - "ref": "92f0032a086cc265d3415189cbf6245e369b13c4" + "ref": "13531d8d2ad7344d45d0eb15124e731e07ee76c4" }, "mdbase_engine": { "repository": "mdbase-dev/mdbase-connect", diff --git a/types/mdbase-runtime/v2/action-attempt.md b/types/mdbase-runtime/v2/action-attempt.md new file mode 100644 index 0000000..9126566 --- /dev/null +++ b/types/mdbase-runtime/v2/action-attempt.md @@ -0,0 +1,214 @@ +--- +kind: mdbase.type +name: runtime_action_attempt +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.action-attempt. +match: + where: + type: runtime_action_attempt +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime action attempt + type: object + required: + - id + - run_id + - step_id + - request_id + - invocation_id + - attempt_id + - contract + - provider + - provider_declaration_digest + - status + - created_at + - updated_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + run_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + step_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + request_id: + type: string + minLength: 1 + invocation_id: + type: string + minLength: 1 + attempt_id: + type: string + minLength: 1 + contract: + $ref: "#/$defs/exactContractReference" + provider: + $ref: "#/$defs/identity" + provider_declaration_digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + handler_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + idempotency_key: + type: string + status: + enum: + - admitted + - dispatching + - succeeded + - rejected + - failed + - cancelled + - indeterminate + request: + type: object + invocation: + type: object + outcome: + type: object + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + completed_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.action-attempt/1.1.0.schema.json +implements: + - contract: mdbase.runtime.action-attempt + version: 1.1.0 + fields: + id: id + run_id: run_id + step_id: step_id + request_id: request_id + invocation_id: invocation_id + attempt_id: attempt_id + contract: contract + provider: provider + provider_declaration_digest: provider_declaration_digest + handler_id: handler_id + idempotency_key: idempotency_key + status: status + request: request + invocation: invocation + outcome: outcome + created_at: created_at + updated_at: updated_at + completed_at: completed_at +--- + +# Durable action attempt + +This canonical type makes `runtime_action_attempt` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_action_attempt` records in collections +whose type key is something else. diff --git a/types/mdbase-runtime/v2/capability-grant.md b/types/mdbase-runtime/v2/capability-grant.md new file mode 100644 index 0000000..672a20a --- /dev/null +++ b/types/mdbase-runtime/v2/capability-grant.md @@ -0,0 +1,171 @@ +--- +kind: mdbase.type +name: runtime_capability_grant +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.capability-grant. +match: + where: + type: runtime_capability_grant +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase runtime capability grant + type: object + required: + - id + - capability + - principal + - mode + - granted_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + capability: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + principal: + $ref: "#/$defs/identity" + mode: + enum: + - allow + - deny + actions: + type: array + uniqueItems: true + items: + $ref: "#/$defs/contractRequirement" + providers: + type: array + uniqueItems: true + items: + $ref: "#/$defs/providerSelector" + granted_at: + type: string + format: date-time + expires_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.capability-grant/1.1.0.schema.json +implements: + - contract: mdbase.runtime.capability-grant + version: 1.1.0 + fields: + id: id + capability: capability + principal: principal + mode: mode + actions: actions + providers: providers + granted_at: granted_at + expires_at: expires_at +--- + +# Capability grant evidence + +This canonical type makes `runtime_capability_grant` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_capability_grant` records in collections +whose type key is something else. diff --git a/types/mdbase-runtime/v2/checkpoint.md b/types/mdbase-runtime/v2/checkpoint.md new file mode 100644 index 0000000..62ff56f --- /dev/null +++ b/types/mdbase-runtime/v2/checkpoint.md @@ -0,0 +1,164 @@ +--- +kind: mdbase.type +name: runtime_checkpoint +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.checkpoint. +match: + where: + type: runtime_checkpoint +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime checkpoint + type: object + required: + - id + - run_id + - generation + - status + - state + - updated_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + run_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + generation: + type: integer + minimum: 1 + status: + enum: + - open + - waiting + - ready + - completed + - failed + - cancelled + state: + type: object + updated_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.checkpoint/1.1.0.schema.json +implements: + - contract: mdbase.runtime.checkpoint + version: 1.1.0 + fields: + id: id + run_id: run_id + generation: generation + status: status + state: state + updated_at: updated_at +--- + +# Runtime checkpoint + +This canonical type makes `runtime_checkpoint` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_checkpoint` records in collections +whose type key is something else. diff --git a/types/mdbase-runtime/v2/dead-letter.md b/types/mdbase-runtime/v2/dead-letter.md new file mode 100644 index 0000000..21be651 --- /dev/null +++ b/types/mdbase-runtime/v2/dead-letter.md @@ -0,0 +1,166 @@ +--- +kind: mdbase.type +name: runtime_dead_letter +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.dead-letter. +match: + where: + type: runtime_dead_letter +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime dead letter + type: object + required: + - id + - reason + - status + - evidence + - created_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + reason: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + status: + enum: + - unresolved + - acknowledged + - requeued + evidence_kind: + enum: + - event + - action_request + - action_outcome + evidence: + type: object + created_at: + type: string + format: date-time + acknowledged_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.dead-letter/1.1.0.schema.json +implements: + - contract: mdbase.runtime.dead-letter + version: 1.1.0 + fields: + id: id + reason: reason + status: status + evidence_kind: evidence_kind + evidence: evidence + created_at: created_at + acknowledged_at: acknowledged_at +--- + +# Runtime dead letter + +This canonical type makes `runtime_dead_letter` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_dead_letter` records in collections +whose type key is something else. diff --git a/types/mdbase-runtime/v2/diagnostic.md b/types/mdbase-runtime/v2/diagnostic.md new file mode 100644 index 0000000..34ed583 --- /dev/null +++ b/types/mdbase-runtime/v2/diagnostic.md @@ -0,0 +1,170 @@ +--- +kind: mdbase.type +name: runtime_diagnostic +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.diagnostic. +match: + where: + type: runtime_diagnostic +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime diagnostic + type: object + required: + - id + - severity + - code + - message + - created_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + severity: + enum: + - info + - warning + - error + code: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + message: + type: string + minLength: 1 + run_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + attempt_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + path: + type: string + details: {} + created_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.diagnostic/1.1.0.schema.json +implements: + - contract: mdbase.runtime.diagnostic + version: 1.1.0 + fields: + id: id + severity: severity + code: code + message: message + run_id: run_id + attempt_id: attempt_id + path: path + details: details + created_at: created_at +--- + +# Runtime diagnostic + +This canonical type makes `runtime_diagnostic` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_diagnostic` records in collections +whose type key is something else. diff --git a/types/mdbase-runtime/v2/policy.md b/types/mdbase-runtime/v2/policy.md new file mode 100644 index 0000000..c4d9f68 --- /dev/null +++ b/types/mdbase-runtime/v2/policy.md @@ -0,0 +1,216 @@ +--- +kind: mdbase.type +name: runtime_policy +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.policy. +match: + where: + type: runtime_policy +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime policy + type: object + required: + - id + - version + - enabled + - grants + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + name: + type: string + minLength: 1 + enabled: + type: boolean + executors: + type: object + required: [] + properties: + default: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + workflows: + type: object + additionalProperties: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + provider_selections: + type: array + items: + type: object + required: + - contract + - selector + properties: + contract: + $ref: "#/$defs/contractRequirement" + selector: + $ref: "#/$defs/providerSelector" + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + grants: + type: array + items: + type: object + required: + - capability + - mode + properties: + capability: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + mode: + enum: + - allow + - deny + actions: + type: array + uniqueItems: true + items: + $ref: "#/$defs/contractRequirement" + providers: + type: array + uniqueItems: true + items: + $ref: "#/$defs/providerSelector" + max_calls_per_run: + type: integer + minimum: 1 + max_records_per_run: + type: integer + minimum: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.policy/1.1.0.schema.json +implements: + - contract: mdbase.runtime.policy + version: 1.1.0 + fields: + id: id + version: version + name: name + enabled: enabled + executors: executors + provider_selections: provider_selections + grants: grants +--- + +# Runtime policy + +This canonical type makes `runtime_policy` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_policy` records in collections +whose type key is something else. diff --git a/types/mdbase-runtime/v2/provider-registration.md b/types/mdbase-runtime/v2/provider-registration.md new file mode 100644 index 0000000..d02b2c8 --- /dev/null +++ b/types/mdbase-runtime/v2/provider-registration.md @@ -0,0 +1,154 @@ +--- +kind: mdbase.type +name: runtime_provider_registration +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.provider-registration. +match: + where: + type: runtime_provider_registration +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase runtime provider registration evidence + type: object + required: + - id + - declaration_kind + - declaration + - verified_at + - active + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + declaration_kind: + enum: + - event_source + - action_provider + declaration: + type: object + verified_at: + type: string + format: date-time + active: + type: boolean + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.provider-registration/1.1.0.schema.json +implements: + - contract: mdbase.runtime.provider-registration + version: 1.1.0 + fields: + id: id + declaration_kind: declaration_kind + declaration: declaration + verified_at: verified_at + active: active +--- + +# Provider registration evidence + +This canonical type makes `runtime_provider_registration` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_provider_registration` records in collections +whose type key is something else. diff --git a/types/mdbase-runtime/v2/run.md b/types/mdbase-runtime/v2/run.md new file mode 100644 index 0000000..166a900 --- /dev/null +++ b/types/mdbase-runtime/v2/run.md @@ -0,0 +1,302 @@ +--- +kind: mdbase.type +name: runtime_run +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.run. +match: + where: + type: runtime_run +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime run + type: object + required: + - id + - workflow_id + - workflow_version + - workflow_revision + - event_id + - event_contract + - admitted_plan + - status + - created_at + - updated_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + workflow_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + workflow_version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + workflow_revision: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + event_id: + type: string + minLength: 1 + event_contract: + $ref: "#/$defs/exactContractReference" + event_source: + $ref: "#/$defs/identity" + admitted_plan: + $ref: "#/$defs/admittedPlan" + policy_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + policy_revision: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + trigger_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + event_cursor: + type: integer + minimum: 1 + executor: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + idempotency_key: + type: string + concurrency_group: + type: string + status: + enum: + - queued + - running + - waiting + - succeeded + - failed + - cancelled + - indeterminate + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + started_at: + type: string + format: date-time + finished_at: + type: string + format: date-time + lease: + $ref: "#/$defs/lease" + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + admittedPlan: + type: object + required: + - profile_version + - workflow_revision + - event + - steps + properties: + profile_version: + const: "0.2" + workflow_revision: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + event: + type: object + required: + - contract + - source + properties: + contract: + $ref: "#/$defs/exactContractReference" + source: + $ref: "#/$defs/identity" + source_declaration_digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + steps: + type: array + items: + type: object + required: + - id + - contract + - provider + - provider_declaration_digest + - handler_id + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + contract: + $ref: "#/$defs/exactContractReference" + provider: + $ref: "#/$defs/identity" + provider_declaration_digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + handler_id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + lease: + type: object + required: + - owner + - token + - expires_at + properties: + owner: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + token: + type: string + minLength: 1 + expires_at: + type: string + format: date-time + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.run/1.1.0.schema.json +implements: + - contract: mdbase.runtime.run + version: 1.1.0 + fields: + id: id + workflow_id: workflow_id + workflow_version: workflow_version + workflow_revision: workflow_revision + event_id: event_id + event_contract: event_contract + event_source: event_source + admitted_plan: admitted_plan + policy_id: policy_id + policy_revision: policy_revision + trigger_id: trigger_id + event_cursor: event_cursor + executor: executor + idempotency_key: idempotency_key + concurrency_group: concurrency_group + status: status + created_at: created_at + updated_at: updated_at + started_at: started_at + finished_at: finished_at + lease: lease +--- + +# Durable run + +This canonical type makes `runtime_run` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_run` records in collections +whose type key is something else. diff --git a/types/mdbase-runtime/v2/timer.md b/types/mdbase-runtime/v2/timer.md new file mode 100644 index 0000000..cf1bd56 --- /dev/null +++ b/types/mdbase-runtime/v2/timer.md @@ -0,0 +1,190 @@ +--- +kind: mdbase.type +name: runtime_timer +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.timer. +match: + where: + type: runtime_timer +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime timer + type: object + required: + - id + - generation + - status + - fire_at + - event + - created_at + - updated_at + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + generation: + type: integer + minimum: 1 + status: + enum: + - scheduled + - firing + - fired + - cancelled + fire_at: + type: string + format: date-time + event: + type: object + required: + - contract + - data + properties: + contract: + $ref: "#/$defs/contractRequirement" + subject: + type: string + correlation_id: + type: string + causation_id: + type: string + data: {} + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + missed_run_policy: + const: fire_once + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + fired_at: + type: string + format: date-time + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.timer/1.1.0.schema.json +implements: + - contract: mdbase.runtime.timer + version: 1.1.0 + fields: + id: id + generation: generation + status: status + fire_at: fire_at + event: event + missed_run_policy: missed_run_policy + created_at: created_at + updated_at: updated_at + fired_at: fired_at +--- + +# Runtime timer + +This canonical type makes `runtime_timer` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_timer` records in collections +whose type key is something else. diff --git a/types/mdbase-runtime/v2/workflow.md b/types/mdbase-runtime/v2/workflow.md new file mode 100644 index 0000000..db05584 --- /dev/null +++ b/types/mdbase-runtime/v2/workflow.md @@ -0,0 +1,310 @@ +--- +kind: mdbase.type +name: runtime_workflow +version: 2 +description: Canonical Markdown implementation of mdbase.runtime.workflow. +match: + where: + type: runtime_workflow +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime workflow + type: object + required: + - id + - version + - name + - enabled + - triggers + - steps + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + name: + type: string + minLength: 1 + description: + type: string + enabled: + type: boolean + requires: + $ref: "#/$defs/requires" + vars: + type: object + additionalProperties: {} + triggers: + type: array + minItems: 1 + items: + $ref: "#/$defs/trigger" + steps: + type: array + minItems: 1 + items: + $ref: "#/$defs/step" + run: + $ref: "#/$defs/runPolicy" + $defs: + identifier: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + semanticVersion: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + dateTime: + type: string + format: date-time + contractRequirement: + type: object + required: + - id + - version + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + minLength: 1 + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + exactContractReference: + type: object + required: + - id + - version + - digest + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + digest: + type: string + pattern: ^sha256:[0-9a-f]{64}$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + identity: + type: object + required: + - application + - implementation + - version + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + version: + type: string + pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + providerSelector: + type: object + required: [] + properties: + application: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + implementation: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + instance_id: + type: string + minLength: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + minProperties: 1 + expression: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + requires: + type: object + required: [] + properties: + capabilities: + type: array + uniqueItems: true + items: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + trigger: + type: object + required: + - id + - event + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + event: + $ref: "#/$defs/contractRequirement" + if: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + debounce: + $ref: "#/$defs/duration" + minimum_interval: + $ref: "#/$defs/duration" + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + step: + type: object + required: + - id + - action + properties: + id: + type: string + pattern: ^[A-Za-z][A-Za-z0-9._:-]*$ + name: + type: string + action: + $ref: "#/$defs/contractRequirement" + provider: + $ref: "#/$defs/providerSelector" + requires: + $ref: "#/$defs/requires" + if: + type: object + required: + - $expr + properties: + $expr: + type: string + minLength: 1 + additionalProperties: false + input: + type: object + additionalProperties: {} + for_each: + type: object + required: + - items + properties: + items: {} + as: + type: string + pattern: ^[A-Za-z_][A-Za-z0-9_]*$ + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + duration: + type: string + pattern: ^(0|[1-9][0-9]*)(ms|s|m|h|d)$ + runPolicy: + type: object + required: [] + properties: + idempotency: + type: object + required: + - key + properties: + key: {} + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + concurrency: + type: object + required: + - policy + properties: + group: {} + policy: + enum: + - skip + - queue + - replace + - allow + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + limits: + type: object + required: [] + properties: + timeout: + $ref: "#/$defs/duration" + max_items: + type: integer + minimum: 1 + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + on_error: + enum: + - stop + - continue + patternProperties: + ^x-[A-Za-z0-9._:-]+$: true + additionalProperties: false + $id: https://mdbase.dev/schemas/runtime/v0.2/mdbase.runtime.workflow/1.1.0.schema.json +implements: + - contract: mdbase.runtime.workflow + version: 1.1.0 + fields: + id: id + version: version + name: name + description: description + enabled: enabled + requires: requires + vars: vars + triggers: triggers + steps: steps + run: run +--- + +# Durable workflow + +This canonical type makes `runtime_workflow` records discoverable through +the ordinary mdbase record-contract registry. + +Apps create these records by naming the type; the engine writes it under the +collection's configured explicit type key. The `match` rule also +recognises hand-written `type: runtime_workflow` records in collections +whose type key is something else.