From 2d59d18d9776a76c9e43e06174b221764931851e Mon Sep 17 00:00:00 2001 From: callumalpass Date: Wed, 29 Jul 2026 00:30:24 +1000 Subject: [PATCH 1/2] feat: publish the Runtime 0.2 standard pack --- README.md | 11 + .../mdbase.runtime.action-attempt/1.0.0.md | 18 + .../mdbase.runtime.capability-grant/1.0.0.md | 18 + contracts/mdbase.runtime.checkpoint/1.0.0.md | 18 + contracts/mdbase.runtime.dead-letter/1.0.0.md | 18 + contracts/mdbase.runtime.diagnostic/1.0.0.md | 18 + contracts/mdbase.runtime.policy/1.0.0.md | 18 + .../1.0.0.md | 18 + contracts/mdbase.runtime.run.cancel/1.0.0.md | 22 + contracts/mdbase.runtime.run/1.0.0.md | 18 + contracts/mdbase.runtime.timer.fired/1.0.0.md | 16 + contracts/mdbase.runtime.timer/1.0.0.md | 18 + contracts/mdbase.runtime.workflow/1.0.0.md | 18 + .../mdbase.runtime.action-attempt/1.0.0.md | 18 + .../mdbase.runtime.capability-grant/1.0.0.md | 18 + .../mdbase.runtime.checkpoint/1.0.0.md | 18 + .../mdbase.runtime.dead-letter/1.0.0.md | 18 + .../mdbase.runtime.diagnostic/1.0.0.md | 18 + .../contracts/mdbase.runtime.policy/1.0.0.md | 18 + .../1.0.0.md | 18 + .../mdbase.runtime.run.cancel/1.0.0.md | 22 + .../contracts/mdbase.runtime.run/1.0.0.md | 18 + .../mdbase.runtime.timer.fired/1.0.0.md | 16 + .../contracts/mdbase.runtime.timer/1.0.0.md | 18 + .../mdbase.runtime.workflow/1.0.0.md | 18 + .../1.0.0.schema.json | 238 ++++++++++ .../1.0.0.schema.json | 197 +++++++++ .../1.0.0.schema.json | 188 ++++++++ .../1.0.0.schema.json | 191 +++++++++ .../1.0.0.schema.json | 193 +++++++++ .../mdbase.runtime.policy/1.0.0.schema.json | 263 ++++++++++++ .../1.0.0.schema.json | 178 ++++++++ .../1.0.0.output.schema.json | 161 +++++++ .../1.0.0.schema.json | 157 +++++++ .../mdbase.runtime.run/1.0.0.schema.json | 356 +++++++++++++++ .../1.0.0.schema.json | 164 +++++++ .../mdbase.runtime.timer/1.0.0.schema.json | 221 ++++++++++ .../mdbase.runtime.workflow/1.0.0.schema.json | 392 +++++++++++++++++ .../types/mdbase-runtime/action-attempt.md | 40 ++ .../types/mdbase-runtime/capability-grant.md | 30 ++ .../types/mdbase-runtime/checkpoint.md | 28 ++ .../types/mdbase-runtime/dead-letter.md | 29 ++ .../types/mdbase-runtime/diagnostic.md | 31 ++ dist/artifacts/types/mdbase-runtime/policy.md | 29 ++ .../mdbase-runtime/provider-registration.md | 27 ++ dist/artifacts/types/mdbase-runtime/run.md | 43 ++ dist/artifacts/types/mdbase-runtime/timer.md | 31 ++ .../types/mdbase-runtime/workflow.md | 32 ++ dist/catalog.json | 172 ++++++++ dist/packs/mdbase.runtime.standard/0.2.0.json | 405 ++++++++++++++++++ .../1.0.0.schema.json | 238 ++++++++++ .../1.0.0.schema.json | 197 +++++++++ .../1.0.0.schema.json | 188 ++++++++ .../1.0.0.schema.json | 191 +++++++++ .../1.0.0.schema.json | 193 +++++++++ .../mdbase.runtime.policy/1.0.0.schema.json | 263 ++++++++++++ .../1.0.0.schema.json | 178 ++++++++ .../1.0.0.output.schema.json | 161 +++++++ .../1.0.0.schema.json | 157 +++++++ .../mdbase.runtime.run/1.0.0.schema.json | 356 +++++++++++++++ .../1.0.0.schema.json | 164 +++++++ .../mdbase.runtime.timer/1.0.0.schema.json | 221 ++++++++++ .../mdbase.runtime.workflow/1.0.0.schema.json | 392 +++++++++++++++++ package.json | 2 +- packs/mdbase.runtime.standard/0.2.0.pack.yaml | 133 ++++++ .../1.0.0.schema.json | 238 ++++++++++ .../1.0.0.schema.json | 197 +++++++++ .../1.0.0.schema.json | 188 ++++++++ .../1.0.0.schema.json | 191 +++++++++ .../1.0.0.schema.json | 193 +++++++++ .../mdbase.runtime.policy/1.0.0.schema.json | 263 ++++++++++++ .../1.0.0.schema.json | 178 ++++++++ .../1.0.0.output.schema.json | 161 +++++++ .../1.0.0.schema.json | 157 +++++++ schemas/mdbase.runtime.run/1.0.0.schema.json | 356 +++++++++++++++ .../1.0.0.schema.json | 164 +++++++ .../mdbase.runtime.timer/1.0.0.schema.json | 221 ++++++++++ .../mdbase.runtime.workflow/1.0.0.schema.json | 392 +++++++++++++++++ scripts/sync-runtime-pack.mjs | 91 ++++ sources.json | 3 +- types/mdbase-runtime/action-attempt.md | 40 ++ types/mdbase-runtime/capability-grant.md | 30 ++ types/mdbase-runtime/checkpoint.md | 28 ++ types/mdbase-runtime/dead-letter.md | 29 ++ types/mdbase-runtime/diagnostic.md | 31 ++ types/mdbase-runtime/policy.md | 29 ++ types/mdbase-runtime/provider-registration.md | 27 ++ types/mdbase-runtime/run.md | 43 ++ types/mdbase-runtime/timer.md | 31 ++ types/mdbase-runtime/workflow.md | 32 ++ 90 files changed, 10587 insertions(+), 3 deletions(-) create mode 100644 contracts/mdbase.runtime.action-attempt/1.0.0.md create mode 100644 contracts/mdbase.runtime.capability-grant/1.0.0.md create mode 100644 contracts/mdbase.runtime.checkpoint/1.0.0.md create mode 100644 contracts/mdbase.runtime.dead-letter/1.0.0.md create mode 100644 contracts/mdbase.runtime.diagnostic/1.0.0.md create mode 100644 contracts/mdbase.runtime.policy/1.0.0.md create mode 100644 contracts/mdbase.runtime.provider-registration/1.0.0.md create mode 100644 contracts/mdbase.runtime.run.cancel/1.0.0.md create mode 100644 contracts/mdbase.runtime.run/1.0.0.md create mode 100644 contracts/mdbase.runtime.timer.fired/1.0.0.md create mode 100644 contracts/mdbase.runtime.timer/1.0.0.md create mode 100644 contracts/mdbase.runtime.workflow/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.action-attempt/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.capability-grant/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.checkpoint/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.dead-letter/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.diagnostic/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.policy/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.provider-registration/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.run.cancel/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.run/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.timer.fired/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.timer/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.runtime.workflow/1.0.0.md create mode 100644 dist/artifacts/schemas/mdbase.runtime.action-attempt/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.policy/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.run/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.timer/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.runtime.workflow/1.0.0.schema.json create mode 100644 dist/artifacts/types/mdbase-runtime/action-attempt.md create mode 100644 dist/artifacts/types/mdbase-runtime/capability-grant.md create mode 100644 dist/artifacts/types/mdbase-runtime/checkpoint.md create mode 100644 dist/artifacts/types/mdbase-runtime/dead-letter.md create mode 100644 dist/artifacts/types/mdbase-runtime/diagnostic.md create mode 100644 dist/artifacts/types/mdbase-runtime/policy.md create mode 100644 dist/artifacts/types/mdbase-runtime/provider-registration.md create mode 100644 dist/artifacts/types/mdbase-runtime/run.md create mode 100644 dist/artifacts/types/mdbase-runtime/timer.md create mode 100644 dist/artifacts/types/mdbase-runtime/workflow.md create mode 100644 dist/packs/mdbase.runtime.standard/0.2.0.json create mode 100644 dist/schemas/mdbase.runtime.action-attempt/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.policy/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json create mode 100644 dist/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.run/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.timer/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.runtime.workflow/1.0.0.schema.json create mode 100644 packs/mdbase.runtime.standard/0.2.0.pack.yaml create mode 100644 schemas/mdbase.runtime.action-attempt/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.capability-grant/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.checkpoint/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.dead-letter/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.diagnostic/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.policy/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.provider-registration/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json create mode 100644 schemas/mdbase.runtime.run.cancel/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.run/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.timer.fired/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.timer/1.0.0.schema.json create mode 100644 schemas/mdbase.runtime.workflow/1.0.0.schema.json create mode 100644 scripts/sync-runtime-pack.mjs create mode 100644 types/mdbase-runtime/action-attempt.md create mode 100644 types/mdbase-runtime/capability-grant.md create mode 100644 types/mdbase-runtime/checkpoint.md create mode 100644 types/mdbase-runtime/dead-letter.md create mode 100644 types/mdbase-runtime/diagnostic.md create mode 100644 types/mdbase-runtime/policy.md create mode 100644 types/mdbase-runtime/provider-registration.md create mode 100644 types/mdbase-runtime/run.md create mode 100644 types/mdbase-runtime/timer.md create mode 100644 types/mdbase-runtime/workflow.md diff --git a/README.md b/README.md index b65edb4..1471867 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,11 @@ instead of inheriting that boundary. Once installed, the type belongs to the collection: users can edit its fields and update the explicit contract mapping without changing the published contract. +The featured `mdbase.runtime.standard` pack supplies the durable runtime 0.2 +standard library: ten ordinary record contracts and canonical implementing +types, plus inspectable timer-event and cancellation-action artifacts. +Installing it is passive and grants no execution authority. + This repository is the canonical source. Its deterministic `dist/` output is published at `https://mdbase.dev/contracts/`. A catalog entry is only a discovery aid: every installable pack contains an exact manifest, embedded @@ -25,6 +30,12 @@ packs//.pack.yaml readable pack definitions dist/ deterministic publication artifact ``` +The runtime pack is generated in `mdbase-spec` and imported exactly with: + +```sh +MDBASE_SPEC_DIR=../mdbase-spec npm run sync:runtime +``` + ## Build and verify Requires Node.js 22+ and a built checkout of diff --git a/contracts/mdbase.runtime.action-attempt/1.0.0.md b/contracts/mdbase.runtime.action-attempt/1.0.0.md new file mode 100644 index 0000000..db55d3a --- /dev/null +++ b/contracts/mdbase.runtime.action-attempt/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.action-attempt +version: 1.0.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.0.0.schema.json +--- + +# Durable action attempt + +Durable invocation intent and outcome evidence using the shared interoperability envelope. + +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.0.0.md b/contracts/mdbase.runtime.capability-grant/1.0.0.md new file mode 100644 index 0000000..5119e27 --- /dev/null +++ b/contracts/mdbase.runtime.capability-grant/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.capability-grant +version: 1.0.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.0.0.schema.json +--- + +# Capability grant evidence + +A materialized authorization grant scoped independently from contract conformance. + +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.0.0.md b/contracts/mdbase.runtime.checkpoint/1.0.0.md new file mode 100644 index 0000000..2f2fb16 --- /dev/null +++ b/contracts/mdbase.runtime.checkpoint/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.checkpoint +version: 1.0.0 +name: Runtime checkpoint +description: A durable, lease-safe workflow continuation. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.checkpoint/1.0.0.schema.json +--- + +# Runtime checkpoint + +A durable, lease-safe workflow continuation. + +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.0.0.md b/contracts/mdbase.runtime.dead-letter/1.0.0.md new file mode 100644 index 0000000..15f2466 --- /dev/null +++ b/contracts/mdbase.runtime.dead-letter/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.dead-letter +version: 1.0.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.0.0.schema.json +--- + +# Runtime dead letter + +Retained event or action evidence that cannot be processed safely. + +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.0.0.md b/contracts/mdbase.runtime.diagnostic/1.0.0.md new file mode 100644 index 0000000..82708f1 --- /dev/null +++ b/contracts/mdbase.runtime.diagnostic/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.diagnostic +version: 1.0.0 +name: Runtime diagnostic +description: A machine-readable durable runtime diagnostic. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.diagnostic/1.0.0.schema.json +--- + +# Runtime diagnostic + +A machine-readable durable runtime diagnostic. + +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.0.0.md b/contracts/mdbase.runtime.policy/1.0.0.md new file mode 100644 index 0000000..9845a29 --- /dev/null +++ b/contracts/mdbase.runtime.policy/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.policy +version: 1.0.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.0.0.schema.json +--- + +# Runtime policy + +Local authorization, executor, limit, and provider-selection policy. + +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.0.0.md b/contracts/mdbase.runtime.provider-registration/1.0.0.md new file mode 100644 index 0000000..c2af919 --- /dev/null +++ b/contracts/mdbase.runtime.provider-registration/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.provider-registration +version: 1.0.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.0.0.schema.json +--- + +# Provider registration evidence + +An optional audit snapshot of a verified interoperability declaration; it never activates code. + +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.cancel/1.0.0.md b/contracts/mdbase.runtime.run.cancel/1.0.0.md new file mode 100644 index 0000000..1f6af38 --- /dev/null +++ b/contracts/mdbase.runtime.run.cancel/1.0.0.md @@ -0,0 +1,22 @@ +--- +kind: mdbase.contract +contract_type: action +id: mdbase.runtime.run.cancel +version: 1.0.0 +name: Cancel durable runtime run +description: Request cooperative cancellation of one durable runtime run. +input_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.run.cancel/1.0.0.schema.json +output_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json +behavior: + idempotency: required + cancellation: none +--- + +# Cancel durable runtime run + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/contracts/mdbase.runtime.run/1.0.0.md b/contracts/mdbase.runtime.run/1.0.0.md new file mode 100644 index 0000000..2ae260f --- /dev/null +++ b/contracts/mdbase.runtime.run/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.run +version: 1.0.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.0.0.schema.json +--- + +# Durable run + +The durable state and immutable admitted plan for one workflow execution. + +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.fired/1.0.0.md b/contracts/mdbase.runtime.timer.fired/1.0.0.md new file mode 100644 index 0000000..25abf6b --- /dev/null +++ b/contracts/mdbase.runtime.timer.fired/1.0.0.md @@ -0,0 +1,16 @@ +--- +kind: mdbase.contract +contract_type: event +id: mdbase.runtime.timer.fired +version: 1.0.0 +name: Runtime timer fired +description: Published when the current generation of a durable timer fires. +data_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.timer.fired/1.0.0.schema.json +--- + +# Runtime timer fired + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/contracts/mdbase.runtime.timer/1.0.0.md b/contracts/mdbase.runtime.timer/1.0.0.md new file mode 100644 index 0000000..7477f69 --- /dev/null +++ b/contracts/mdbase.runtime.timer/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.timer +version: 1.0.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.0.0.schema.json +--- + +# Runtime timer + +A generation-safe one-shot timer that publishes through the interoperability profile. + +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.0.0.md b/contracts/mdbase.runtime.workflow/1.0.0.md new file mode 100644 index 0000000..30bcc06 --- /dev/null +++ b/contracts/mdbase.runtime.workflow/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.workflow +version: 1.0.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.0.0.schema.json +--- + +# Durable workflow + +A portable workflow whose event and action references are resolved and pinned at admission. + +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.0.0.md b/dist/artifacts/contracts/mdbase.runtime.action-attempt/1.0.0.md new file mode 100644 index 0000000..db55d3a --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.action-attempt/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.action-attempt +version: 1.0.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.0.0.schema.json +--- + +# Durable action attempt + +Durable invocation intent and outcome evidence using the shared interoperability envelope. + +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.0.0.md b/dist/artifacts/contracts/mdbase.runtime.capability-grant/1.0.0.md new file mode 100644 index 0000000..5119e27 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.capability-grant/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.capability-grant +version: 1.0.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.0.0.schema.json +--- + +# Capability grant evidence + +A materialized authorization grant scoped independently from contract conformance. + +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.0.0.md b/dist/artifacts/contracts/mdbase.runtime.checkpoint/1.0.0.md new file mode 100644 index 0000000..2f2fb16 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.checkpoint/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.checkpoint +version: 1.0.0 +name: Runtime checkpoint +description: A durable, lease-safe workflow continuation. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.checkpoint/1.0.0.schema.json +--- + +# Runtime checkpoint + +A durable, lease-safe workflow continuation. + +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.0.0.md b/dist/artifacts/contracts/mdbase.runtime.dead-letter/1.0.0.md new file mode 100644 index 0000000..15f2466 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.dead-letter/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.dead-letter +version: 1.0.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.0.0.schema.json +--- + +# Runtime dead letter + +Retained event or action evidence that cannot be processed safely. + +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.0.0.md b/dist/artifacts/contracts/mdbase.runtime.diagnostic/1.0.0.md new file mode 100644 index 0000000..82708f1 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.diagnostic/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.diagnostic +version: 1.0.0 +name: Runtime diagnostic +description: A machine-readable durable runtime diagnostic. +record_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.diagnostic/1.0.0.schema.json +--- + +# Runtime diagnostic + +A machine-readable durable runtime diagnostic. + +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.0.0.md b/dist/artifacts/contracts/mdbase.runtime.policy/1.0.0.md new file mode 100644 index 0000000..9845a29 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.policy/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.policy +version: 1.0.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.0.0.schema.json +--- + +# Runtime policy + +Local authorization, executor, limit, and provider-selection policy. + +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.0.0.md b/dist/artifacts/contracts/mdbase.runtime.provider-registration/1.0.0.md new file mode 100644 index 0000000..c2af919 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.provider-registration/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.provider-registration +version: 1.0.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.0.0.schema.json +--- + +# Provider registration evidence + +An optional audit snapshot of a verified interoperability declaration; it never activates code. + +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.cancel/1.0.0.md b/dist/artifacts/contracts/mdbase.runtime.run.cancel/1.0.0.md new file mode 100644 index 0000000..1f6af38 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.run.cancel/1.0.0.md @@ -0,0 +1,22 @@ +--- +kind: mdbase.contract +contract_type: action +id: mdbase.runtime.run.cancel +version: 1.0.0 +name: Cancel durable runtime run +description: Request cooperative cancellation of one durable runtime run. +input_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.run.cancel/1.0.0.schema.json +output_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json +behavior: + idempotency: required + cancellation: none +--- + +# Cancel durable runtime run + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/dist/artifacts/contracts/mdbase.runtime.run/1.0.0.md b/dist/artifacts/contracts/mdbase.runtime.run/1.0.0.md new file mode 100644 index 0000000..2ae260f --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.run/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.run +version: 1.0.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.0.0.schema.json +--- + +# Durable run + +The durable state and immutable admitted plan for one workflow execution. + +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.fired/1.0.0.md b/dist/artifacts/contracts/mdbase.runtime.timer.fired/1.0.0.md new file mode 100644 index 0000000..25abf6b --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.timer.fired/1.0.0.md @@ -0,0 +1,16 @@ +--- +kind: mdbase.contract +contract_type: event +id: mdbase.runtime.timer.fired +version: 1.0.0 +name: Runtime timer fired +description: Published when the current generation of a durable timer fires. +data_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.runtime.timer.fired/1.0.0.schema.json +--- + +# Runtime timer fired + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/dist/artifacts/contracts/mdbase.runtime.timer/1.0.0.md b/dist/artifacts/contracts/mdbase.runtime.timer/1.0.0.md new file mode 100644 index 0000000..7477f69 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.timer/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.timer +version: 1.0.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.0.0.schema.json +--- + +# Runtime timer + +A generation-safe one-shot timer that publishes through the interoperability profile. + +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.0.0.md b/dist/artifacts/contracts/mdbase.runtime.workflow/1.0.0.md new file mode 100644 index 0000000..30bcc06 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.runtime.workflow/1.0.0.md @@ -0,0 +1,18 @@ +--- +kind: mdbase.contract +contract_type: record +id: mdbase.runtime.workflow +version: 1.0.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.0.0.schema.json +--- + +# Durable workflow + +A portable workflow whose event and action references are resolved and pinned at admission. + +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.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.action-attempt/1.0.0.schema.json new file mode 100644 index 0000000..b02f7b7 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.action-attempt/1.0.0.schema.json @@ -0,0 +1,238 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime action attempt", + "type": "object", + "required": [ + "type", + "id", + "run_id", + "step_id", + "request_id", + "invocation_id", + "attempt_id", + "contract", + "provider", + "provider_declaration_digest", + "status", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_action_attempt" + }, + "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" + } + }, + "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.action-attempt/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json new file mode 100644 index 0000000..9d6cc2d --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json @@ -0,0 +1,197 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime capability grant", + "type": "object", + "required": [ + "type", + "id", + "capability", + "principal", + "mode", + "granted_at" + ], + "properties": { + "type": { + "const": "runtime_capability_grant" + }, + "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" + } + }, + "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.capability-grant/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json new file mode 100644 index 0000000..f14163b --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json @@ -0,0 +1,188 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime checkpoint", + "type": "object", + "required": [ + "type", + "id", + "run_id", + "generation", + "status", + "state", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_checkpoint" + }, + "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" + } + }, + "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.checkpoint/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json new file mode 100644 index 0000000..ea3be8b --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json @@ -0,0 +1,191 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime dead letter", + "type": "object", + "required": [ + "type", + "id", + "reason", + "status", + "evidence", + "created_at" + ], + "properties": { + "type": { + "const": "runtime_dead_letter" + }, + "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" + } + }, + "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.dead-letter/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json new file mode 100644 index 0000000..0dec633 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json @@ -0,0 +1,193 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime diagnostic", + "type": "object", + "required": [ + "type", + "id", + "severity", + "code", + "message", + "created_at" + ], + "properties": { + "type": { + "const": "runtime_diagnostic" + }, + "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" + } + }, + "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.diagnostic/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.policy/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.policy/1.0.0.schema.json new file mode 100644 index 0000000..a873c7b --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.policy/1.0.0.schema.json @@ -0,0 +1,263 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime policy", + "type": "object", + "required": [ + "type", + "id", + "version", + "enabled", + "grants" + ], + "properties": { + "type": { + "const": "runtime_policy" + }, + "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 + } + } + }, + "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.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json new file mode 100644 index 0000000..1fb73c5 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime provider registration evidence", + "type": "object", + "required": [ + "type", + "id", + "declaration_kind", + "declaration", + "verified_at", + "active" + ], + "properties": { + "type": { + "const": "runtime_provider_registration" + }, + "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" + } + }, + "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.provider-registration/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json b/dist/artifacts/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json new file mode 100644 index 0000000..8c3ed04 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json @@ -0,0 +1,161 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime run-cancel action output", + "type": "object", + "required": [ + "run_id", + "status" + ], + "properties": { + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "status": { + "enum": [ + "cancellation_requested", + "already_terminal" + ] + } + }, + "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.run.cancel/1.0.0.output.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json new file mode 100644 index 0000000..e5fd257 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json @@ -0,0 +1,157 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime run-cancel action input", + "type": "object", + "required": [ + "run_id" + ], + "properties": { + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "reason": { + "type": "string" + } + }, + "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.run.cancel/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.run/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.run/1.0.0.schema.json new file mode 100644 index 0000000..3966490 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.run/1.0.0.schema.json @@ -0,0 +1,356 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime run", + "type": "object", + "required": [ + "type", + "id", + "workflow_id", + "workflow_version", + "workflow_revision", + "event_id", + "event_contract", + "admitted_plan", + "status", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_run" + }, + "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" + } + }, + "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 + }, + "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.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json new file mode 100644 index 0000000..e61ff1c --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json @@ -0,0 +1,164 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime timer-fired event data", + "type": "object", + "required": [ + "timer_id", + "generation", + "scheduled_for" + ], + "properties": { + "timer_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "scheduled_for": { + "type": "string", + "format": "date-time" + } + }, + "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.timer.fired/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.timer/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.timer/1.0.0.schema.json new file mode 100644 index 0000000..a03fc67 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.timer/1.0.0.schema.json @@ -0,0 +1,221 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime timer", + "type": "object", + "required": [ + "type", + "id", + "generation", + "status", + "fire_at", + "event", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_timer" + }, + "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" + } + }, + "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.timer/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.workflow/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.workflow/1.0.0.schema.json new file mode 100644 index 0000000..60cf082 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.runtime.workflow/1.0.0.schema.json @@ -0,0 +1,392 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime workflow", + "type": "object", + "required": [ + "type", + "id", + "version", + "name", + "enabled", + "triggers", + "steps" + ], + "properties": { + "type": { + "const": "runtime_workflow" + }, + "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" + } + }, + "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 + }, + "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.0.0.schema.json" +} diff --git a/dist/artifacts/types/mdbase-runtime/action-attempt.md b/dist/artifacts/types/mdbase-runtime/action-attempt.md new file mode 100644 index 0000000..68812f3 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/action-attempt.md @@ -0,0 +1,40 @@ +--- +kind: mdbase.type +name: runtime_action_attempt +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.action-attempt. +match: + where: + type: runtime_action_attempt +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.action-attempt/1.0.0.schema.json +implements: + - contract: mdbase.runtime.action-attempt + version: 1.0.0 + fields: + type: type + 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. diff --git a/dist/artifacts/types/mdbase-runtime/capability-grant.md b/dist/artifacts/types/mdbase-runtime/capability-grant.md new file mode 100644 index 0000000..578b8b8 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/capability-grant.md @@ -0,0 +1,30 @@ +--- +kind: mdbase.type +name: runtime_capability_grant +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.capability-grant. +match: + where: + type: runtime_capability_grant +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.capability-grant/1.0.0.schema.json +implements: + - contract: mdbase.runtime.capability-grant + version: 1.0.0 + fields: + type: type + 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. diff --git a/dist/artifacts/types/mdbase-runtime/checkpoint.md b/dist/artifacts/types/mdbase-runtime/checkpoint.md new file mode 100644 index 0000000..f022e64 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/checkpoint.md @@ -0,0 +1,28 @@ +--- +kind: mdbase.type +name: runtime_checkpoint +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.checkpoint. +match: + where: + type: runtime_checkpoint +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.checkpoint/1.0.0.schema.json +implements: + - contract: mdbase.runtime.checkpoint + version: 1.0.0 + fields: + type: type + 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. diff --git a/dist/artifacts/types/mdbase-runtime/dead-letter.md b/dist/artifacts/types/mdbase-runtime/dead-letter.md new file mode 100644 index 0000000..78bdda6 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/dead-letter.md @@ -0,0 +1,29 @@ +--- +kind: mdbase.type +name: runtime_dead_letter +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.dead-letter. +match: + where: + type: runtime_dead_letter +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.dead-letter/1.0.0.schema.json +implements: + - contract: mdbase.runtime.dead-letter + version: 1.0.0 + fields: + type: type + 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. diff --git a/dist/artifacts/types/mdbase-runtime/diagnostic.md b/dist/artifacts/types/mdbase-runtime/diagnostic.md new file mode 100644 index 0000000..d5545ea --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/diagnostic.md @@ -0,0 +1,31 @@ +--- +kind: mdbase.type +name: runtime_diagnostic +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.diagnostic. +match: + where: + type: runtime_diagnostic +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.diagnostic/1.0.0.schema.json +implements: + - contract: mdbase.runtime.diagnostic + version: 1.0.0 + fields: + type: type + 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. diff --git a/dist/artifacts/types/mdbase-runtime/policy.md b/dist/artifacts/types/mdbase-runtime/policy.md new file mode 100644 index 0000000..2eb0490 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/policy.md @@ -0,0 +1,29 @@ +--- +kind: mdbase.type +name: runtime_policy +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.policy. +match: + where: + type: runtime_policy +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.policy/1.0.0.schema.json +implements: + - contract: mdbase.runtime.policy + version: 1.0.0 + fields: + type: type + 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. diff --git a/dist/artifacts/types/mdbase-runtime/provider-registration.md b/dist/artifacts/types/mdbase-runtime/provider-registration.md new file mode 100644 index 0000000..226ca51 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/provider-registration.md @@ -0,0 +1,27 @@ +--- +kind: mdbase.type +name: runtime_provider_registration +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.provider-registration. +match: + where: + type: runtime_provider_registration +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.provider-registration/1.0.0.schema.json +implements: + - contract: mdbase.runtime.provider-registration + version: 1.0.0 + fields: + type: type + 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. diff --git a/dist/artifacts/types/mdbase-runtime/run.md b/dist/artifacts/types/mdbase-runtime/run.md new file mode 100644 index 0000000..3fdd476 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/run.md @@ -0,0 +1,43 @@ +--- +kind: mdbase.type +name: runtime_run +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.run. +match: + where: + type: runtime_run +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.run/1.0.0.schema.json +implements: + - contract: mdbase.runtime.run + version: 1.0.0 + fields: + type: type + 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. diff --git a/dist/artifacts/types/mdbase-runtime/timer.md b/dist/artifacts/types/mdbase-runtime/timer.md new file mode 100644 index 0000000..36d5664 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/timer.md @@ -0,0 +1,31 @@ +--- +kind: mdbase.type +name: runtime_timer +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.timer. +match: + where: + type: runtime_timer +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.timer/1.0.0.schema.json +implements: + - contract: mdbase.runtime.timer + version: 1.0.0 + fields: + type: type + 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. diff --git a/dist/artifacts/types/mdbase-runtime/workflow.md b/dist/artifacts/types/mdbase-runtime/workflow.md new file mode 100644 index 0000000..68efe08 --- /dev/null +++ b/dist/artifacts/types/mdbase-runtime/workflow.md @@ -0,0 +1,32 @@ +--- +kind: mdbase.type +name: runtime_workflow +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.workflow. +match: + where: + type: runtime_workflow +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.workflow/1.0.0.schema.json +implements: + - contract: mdbase.runtime.workflow + version: 1.0.0 + fields: + type: type + 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. diff --git a/dist/catalog.json b/dist/catalog.json index f1c0f02..3d59e22 100644 --- a/dist/catalog.json +++ b/dist/catalog.json @@ -28,6 +28,126 @@ ] } ] + }, + { + "id": "mdbase.runtime.action-attempt", + "version": "1.0.0", + "name": "Durable action attempt", + "description": "Durable invocation intent and outcome evidence using the shared interoperability envelope.", + "contract_type": "record", + "digest": "sha256:04c1bf55580d0d280d2be645c56177da25c2d0129f8fa71def7d5f96cf0ea629", + "artifact": "./artifacts/contracts/mdbase.runtime.action-attempt/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.capability-grant", + "version": "1.0.0", + "name": "Capability grant evidence", + "description": "A materialized authorization grant scoped independently from contract conformance.", + "contract_type": "record", + "digest": "sha256:1cd3a2ff5fdc9294f766e538c371ed278ad4c54452480ba6fcc2870be08b47a1", + "artifact": "./artifacts/contracts/mdbase.runtime.capability-grant/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.checkpoint", + "version": "1.0.0", + "name": "Runtime checkpoint", + "description": "A durable, lease-safe workflow continuation.", + "contract_type": "record", + "digest": "sha256:6413676d7482a71b31cbe4abf8c5a543a54a530ef62f669f8ef8e21bcc6bc237", + "artifact": "./artifacts/contracts/mdbase.runtime.checkpoint/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.dead-letter", + "version": "1.0.0", + "name": "Runtime dead letter", + "description": "Retained event or action evidence that cannot be processed safely.", + "contract_type": "record", + "digest": "sha256:737d08bad6662e087c3393f6f17d24374f258d60b41112a3f864cb5138af8edd", + "artifact": "./artifacts/contracts/mdbase.runtime.dead-letter/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.diagnostic", + "version": "1.0.0", + "name": "Runtime diagnostic", + "description": "A machine-readable durable runtime diagnostic.", + "contract_type": "record", + "digest": "sha256:2e7379de9ceefa6435e9c66a71f4292e4805e8038ed6496c83dad946900267f6", + "artifact": "./artifacts/contracts/mdbase.runtime.diagnostic/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.policy", + "version": "1.0.0", + "name": "Runtime policy", + "description": "Local authorization, executor, limit, and provider-selection policy.", + "contract_type": "record", + "digest": "sha256:319a9bd4ca62a246871ee52e0ef0250a82c240cb14a95f88e4a505ad04450300", + "artifact": "./artifacts/contracts/mdbase.runtime.policy/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.provider-registration", + "version": "1.0.0", + "name": "Provider registration evidence", + "description": "An optional audit snapshot of a verified interoperability declaration; it never activates code.", + "contract_type": "record", + "digest": "sha256:97d157efaeb311745fc84e2cbe01e8147aaf44109384090c154527b68838d766", + "artifact": "./artifacts/contracts/mdbase.runtime.provider-registration/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.run.cancel", + "version": "1.0.0", + "name": "Cancel durable runtime run", + "description": "Request cooperative cancellation of one durable runtime run.", + "contract_type": "action", + "digest": "sha256:949f039334cfc3f096beb870419baa08c3b40679b184e9849f9330a34a6f524d", + "artifact": "./artifacts/contracts/mdbase.runtime.run.cancel/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.run", + "version": "1.0.0", + "name": "Durable run", + "description": "The durable state and immutable admitted plan for one workflow execution.", + "contract_type": "record", + "digest": "sha256:7e46270c951e6634fe25519dff10523652365f8adf30b034f01e29e1ca48cadb", + "artifact": "./artifacts/contracts/mdbase.runtime.run/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.timer.fired", + "version": "1.0.0", + "name": "Runtime timer fired", + "description": "Published when the current generation of a durable timer fires.", + "contract_type": "event", + "digest": "sha256:730231fac07ad13dfaff74ff5ee25e26a75f48dd629a4ef8c4d52ffe6b62fb4b", + "artifact": "./artifacts/contracts/mdbase.runtime.timer.fired/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.timer", + "version": "1.0.0", + "name": "Runtime timer", + "description": "A generation-safe one-shot timer that publishes through the interoperability profile.", + "contract_type": "record", + "digest": "sha256:0500a421e81eef09c37bc4ef559e3805843e87a6e1b2cf2a393da4d76d4384fc", + "artifact": "./artifacts/contracts/mdbase.runtime.timer/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.runtime.workflow", + "version": "1.0.0", + "name": "Durable workflow", + "description": "A portable workflow whose event and action references are resolved and pinned at admission.", + "contract_type": "record", + "digest": "sha256:7cf8ed016bf6232d9c1abc8d8bb9bb25fd2af1ffa6c6094317aa65baf3c31049", + "artifact": "./artifacts/contracts/mdbase.runtime.workflow/1.0.0.md", + "standards": [] } ], "packs": [ @@ -46,6 +166,58 @@ ], "resource_count": 3, "featured": true + }, + { + "id": "mdbase.runtime.standard", + "version": "0.2.0", + "name": "mdbase durable runtime standard library", + "description": "Runtime record implementations and inspectable built-in event/action contracts.", + "digest": "sha256:1302c93f97c8b3b7a4032b73ab090cc177663b219f20b8eb9b3f5ec249d54255", + "provision": "./packs/mdbase.runtime.standard/0.2.0.json", + "provides": [ + { + "id": "mdbase.runtime.workflow", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.policy", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.provider-registration", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.capability-grant", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.run", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.action-attempt", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.checkpoint", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.timer", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.diagnostic", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.dead-letter", + "version": "1.0.0" + } + ], + "resource_count": 35, + "featured": true } ] } diff --git a/dist/packs/mdbase.runtime.standard/0.2.0.json b/dist/packs/mdbase.runtime.standard/0.2.0.json new file mode 100644 index 0000000..2f36d83 --- /dev/null +++ b/dist/packs/mdbase.runtime.standard/0.2.0.json @@ -0,0 +1,405 @@ +{ + "manifest": { + "kind": "mdbase.type-pack", + "id": "mdbase.runtime.standard", + "version": "0.2.0", + "name": "mdbase durable runtime standard library", + "description": "Runtime record implementations and inspectable built-in event/action contracts.", + "resources": [ + { + "kind": "schema", + "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", + "source": "contracts/mdbase.runtime.workflow/1.0.0.md", + "target": "_contracts/mdbase.runtime.workflow/1.0.0.md", + "digest": "sha256:7cf8ed016bf6232d9c1abc8d8bb9bb25fd2af1ffa6c6094317aa65baf3c31049" + }, + { + "kind": "type", + "source": "types/mdbase-runtime/workflow.md", + "target": "_types/workflow.md", + "digest": "sha256:f0a848daa96fe0f92459e5157bb6cdee41c0679d49a4f581d585846a339c11c9" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.runtime.policy/1.0.0.md", + "target": "_contracts/mdbase.runtime.policy/1.0.0.md", + "digest": "sha256:319a9bd4ca62a246871ee52e0ef0250a82c240cb14a95f88e4a505ad04450300" + }, + { + "kind": "type", + "source": "types/mdbase-runtime/policy.md", + "target": "_types/policy.md", + "digest": "sha256:0f14852150c7ad48c6f5457167333ff4d50ce272822fa4feca34aae09c539aa4" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.runtime.provider-registration/1.0.0.md", + "target": "_contracts/mdbase.runtime.provider-registration/1.0.0.md", + "digest": "sha256:97d157efaeb311745fc84e2cbe01e8147aaf44109384090c154527b68838d766" + }, + { + "kind": "type", + "source": "types/mdbase-runtime/provider-registration.md", + "target": "_types/provider-registration.md", + "digest": "sha256:3f8f1334b345ebc63236f499b7c1fadf09884bd3ef60c5e0df2216020e50f388" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.runtime.capability-grant/1.0.0.md", + "target": "_contracts/mdbase.runtime.capability-grant/1.0.0.md", + "digest": "sha256:1cd3a2ff5fdc9294f766e538c371ed278ad4c54452480ba6fcc2870be08b47a1" + }, + { + "kind": "type", + "source": "types/mdbase-runtime/capability-grant.md", + "target": "_types/capability-grant.md", + "digest": "sha256:bb2060851c08e28a0ee096da870398b519c90621e3bb7206082f59df85169340" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.runtime.run/1.0.0.md", + "target": "_contracts/mdbase.runtime.run/1.0.0.md", + "digest": "sha256:7e46270c951e6634fe25519dff10523652365f8adf30b034f01e29e1ca48cadb" + }, + { + "kind": "type", + "source": "types/mdbase-runtime/run.md", + "target": "_types/run.md", + "digest": "sha256:03a1236cfb4fd097904cf6ad3ff04c821ff3c485b6aea8bfec0568a3b1baec2e" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.runtime.action-attempt/1.0.0.md", + "target": "_contracts/mdbase.runtime.action-attempt/1.0.0.md", + "digest": "sha256:04c1bf55580d0d280d2be645c56177da25c2d0129f8fa71def7d5f96cf0ea629" + }, + { + "kind": "type", + "source": "types/mdbase-runtime/action-attempt.md", + "target": "_types/action-attempt.md", + "digest": "sha256:96ed9f48adcc7e81118895351823a4db7eeba5d7e1fd35454394f072f0488b0e" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.runtime.checkpoint/1.0.0.md", + "target": "_contracts/mdbase.runtime.checkpoint/1.0.0.md", + "digest": "sha256:6413676d7482a71b31cbe4abf8c5a543a54a530ef62f669f8ef8e21bcc6bc237" + }, + { + "kind": "type", + "source": "types/mdbase-runtime/checkpoint.md", + "target": "_types/checkpoint.md", + "digest": "sha256:da22fafe5975c53b1d3adab345194e74e8f03ea816386de04e91cbbc4ddbd0e3" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.runtime.timer/1.0.0.md", + "target": "_contracts/mdbase.runtime.timer/1.0.0.md", + "digest": "sha256:0500a421e81eef09c37bc4ef559e3805843e87a6e1b2cf2a393da4d76d4384fc" + }, + { + "kind": "type", + "source": "types/mdbase-runtime/timer.md", + "target": "_types/timer.md", + "digest": "sha256:4cfe2766837203bd277812e855aaa250efa613c465b2b9e2aec470b66d258851" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.runtime.diagnostic/1.0.0.md", + "target": "_contracts/mdbase.runtime.diagnostic/1.0.0.md", + "digest": "sha256:2e7379de9ceefa6435e9c66a71f4292e4805e8038ed6496c83dad946900267f6" + }, + { + "kind": "type", + "source": "types/mdbase-runtime/diagnostic.md", + "target": "_types/diagnostic.md", + "digest": "sha256:5bca79bacfcfeae8bc573216bd09d00e6ec8807ffae7422571834350bf6e241a" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.runtime.dead-letter/1.0.0.md", + "target": "_contracts/mdbase.runtime.dead-letter/1.0.0.md", + "digest": "sha256:737d08bad6662e087c3393f6f17d24374f258d60b41112a3f864cb5138af8edd" + }, + { + "kind": "type", + "source": "types/mdbase-runtime/dead-letter.md", + "target": "_types/dead-letter.md", + "digest": "sha256:b0d60190734983889d63400b2c9aa1c0b5fa668e37920ab5969575cea43aa1f3" + }, + { + "kind": "schema", + "source": "schemas/mdbase.runtime.timer.fired/1.0.0.schema.json", + "target": "schemas/mdbase.runtime.timer.fired/1.0.0.schema.json", + "digest": "sha256:10512a03c1ee9db3c52cf45ab8dd862672d2d0a66108218e878ce2e0de2f1682" + }, + { + "kind": "contract", + "source": "contracts/mdbase.runtime.timer.fired/1.0.0.md", + "target": "_contracts/mdbase.runtime.timer.fired/1.0.0.md", + "digest": "sha256:730231fac07ad13dfaff74ff5ee25e26a75f48dd629a4ef8c4d52ffe6b62fb4b" + }, + { + "kind": "schema", + "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", + "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", + "source": "contracts/mdbase.runtime.run.cancel/1.0.0.md", + "target": "_contracts/mdbase.runtime.run.cancel/1.0.0.md", + "digest": "sha256:949f039334cfc3f096beb870419baa08c3b40679b184e9849f9330a34a6f524d" + } + ] + }, + "resources": [ + { + "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": "types/mdbase-runtime/workflow.md", + "document": "---\nkind: mdbase.type\nname: runtime_workflow\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.workflow.\nmatch:\n where:\n type: runtime_workflow\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.workflow/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.workflow\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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": "types/mdbase-runtime/policy.md", + "document": "---\nkind: mdbase.type\nname: runtime_policy\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.policy.\nmatch:\n where:\n type: runtime_policy\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.policy/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.policy\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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": "types/mdbase-runtime/provider-registration.md", + "document": "---\nkind: mdbase.type\nname: runtime_provider_registration\nversion: 1\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 ref: ../schemas/mdbase.runtime.provider-registration/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.provider-registration\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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": "types/mdbase-runtime/capability-grant.md", + "document": "---\nkind: mdbase.type\nname: runtime_capability_grant\nversion: 1\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 ref: ../schemas/mdbase.runtime.capability-grant/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.capability-grant\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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": "types/mdbase-runtime/run.md", + "document": "---\nkind: mdbase.type\nname: runtime_run\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.run.\nmatch:\n where:\n type: runtime_run\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.run/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.run\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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": "types/mdbase-runtime/action-attempt.md", + "document": "---\nkind: mdbase.type\nname: runtime_action_attempt\nversion: 1\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 ref: ../schemas/mdbase.runtime.action-attempt/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.action-attempt\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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": "types/mdbase-runtime/checkpoint.md", + "document": "---\nkind: mdbase.type\nname: runtime_checkpoint\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.checkpoint.\nmatch:\n where:\n type: runtime_checkpoint\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.checkpoint/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.checkpoint\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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": "types/mdbase-runtime/timer.md", + "document": "---\nkind: mdbase.type\nname: runtime_timer\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.timer.\nmatch:\n where:\n type: runtime_timer\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.timer/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.timer\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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": "types/mdbase-runtime/diagnostic.md", + "document": "---\nkind: mdbase.type\nname: runtime_diagnostic\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.diagnostic.\nmatch:\n where:\n type: runtime_diagnostic\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.diagnostic/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.diagnostic\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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" + }, + { + "source": "types/mdbase-runtime/dead-letter.md", + "document": "---\nkind: mdbase.type\nname: runtime_dead_letter\nversion: 1\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 ref: ../schemas/mdbase.runtime.dead-letter/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.dead-letter\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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 ],\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 },\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 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" + } + ], + "provides": [ + { + "id": "mdbase.runtime.workflow", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.policy", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.provider-registration", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.capability-grant", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.run", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.action-attempt", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.checkpoint", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.timer", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.diagnostic", + "version": "1.0.0" + }, + { + "id": "mdbase.runtime.dead-letter", + "version": "1.0.0" + } + ] +} diff --git a/dist/schemas/mdbase.runtime.action-attempt/1.0.0.schema.json b/dist/schemas/mdbase.runtime.action-attempt/1.0.0.schema.json new file mode 100644 index 0000000..b02f7b7 --- /dev/null +++ b/dist/schemas/mdbase.runtime.action-attempt/1.0.0.schema.json @@ -0,0 +1,238 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime action attempt", + "type": "object", + "required": [ + "type", + "id", + "run_id", + "step_id", + "request_id", + "invocation_id", + "attempt_id", + "contract", + "provider", + "provider_declaration_digest", + "status", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_action_attempt" + }, + "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" + } + }, + "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.action-attempt/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json b/dist/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json new file mode 100644 index 0000000..9d6cc2d --- /dev/null +++ b/dist/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json @@ -0,0 +1,197 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime capability grant", + "type": "object", + "required": [ + "type", + "id", + "capability", + "principal", + "mode", + "granted_at" + ], + "properties": { + "type": { + "const": "runtime_capability_grant" + }, + "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" + } + }, + "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.capability-grant/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json b/dist/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json new file mode 100644 index 0000000..f14163b --- /dev/null +++ b/dist/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json @@ -0,0 +1,188 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime checkpoint", + "type": "object", + "required": [ + "type", + "id", + "run_id", + "generation", + "status", + "state", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_checkpoint" + }, + "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" + } + }, + "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.checkpoint/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json b/dist/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json new file mode 100644 index 0000000..ea3be8b --- /dev/null +++ b/dist/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json @@ -0,0 +1,191 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime dead letter", + "type": "object", + "required": [ + "type", + "id", + "reason", + "status", + "evidence", + "created_at" + ], + "properties": { + "type": { + "const": "runtime_dead_letter" + }, + "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" + } + }, + "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.dead-letter/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json b/dist/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json new file mode 100644 index 0000000..0dec633 --- /dev/null +++ b/dist/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json @@ -0,0 +1,193 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime diagnostic", + "type": "object", + "required": [ + "type", + "id", + "severity", + "code", + "message", + "created_at" + ], + "properties": { + "type": { + "const": "runtime_diagnostic" + }, + "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" + } + }, + "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.diagnostic/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.policy/1.0.0.schema.json b/dist/schemas/mdbase.runtime.policy/1.0.0.schema.json new file mode 100644 index 0000000..a873c7b --- /dev/null +++ b/dist/schemas/mdbase.runtime.policy/1.0.0.schema.json @@ -0,0 +1,263 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime policy", + "type": "object", + "required": [ + "type", + "id", + "version", + "enabled", + "grants" + ], + "properties": { + "type": { + "const": "runtime_policy" + }, + "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 + } + } + }, + "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.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json b/dist/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json new file mode 100644 index 0000000..1fb73c5 --- /dev/null +++ b/dist/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime provider registration evidence", + "type": "object", + "required": [ + "type", + "id", + "declaration_kind", + "declaration", + "verified_at", + "active" + ], + "properties": { + "type": { + "const": "runtime_provider_registration" + }, + "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" + } + }, + "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.provider-registration/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json b/dist/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json new file mode 100644 index 0000000..8c3ed04 --- /dev/null +++ b/dist/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json @@ -0,0 +1,161 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime run-cancel action output", + "type": "object", + "required": [ + "run_id", + "status" + ], + "properties": { + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "status": { + "enum": [ + "cancellation_requested", + "already_terminal" + ] + } + }, + "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.run.cancel/1.0.0.output.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json b/dist/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json new file mode 100644 index 0000000..e5fd257 --- /dev/null +++ b/dist/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json @@ -0,0 +1,157 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime run-cancel action input", + "type": "object", + "required": [ + "run_id" + ], + "properties": { + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "reason": { + "type": "string" + } + }, + "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.run.cancel/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.run/1.0.0.schema.json b/dist/schemas/mdbase.runtime.run/1.0.0.schema.json new file mode 100644 index 0000000..3966490 --- /dev/null +++ b/dist/schemas/mdbase.runtime.run/1.0.0.schema.json @@ -0,0 +1,356 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime run", + "type": "object", + "required": [ + "type", + "id", + "workflow_id", + "workflow_version", + "workflow_revision", + "event_id", + "event_contract", + "admitted_plan", + "status", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_run" + }, + "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" + } + }, + "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 + }, + "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.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json b/dist/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json new file mode 100644 index 0000000..e61ff1c --- /dev/null +++ b/dist/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json @@ -0,0 +1,164 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime timer-fired event data", + "type": "object", + "required": [ + "timer_id", + "generation", + "scheduled_for" + ], + "properties": { + "timer_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "scheduled_for": { + "type": "string", + "format": "date-time" + } + }, + "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.timer.fired/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.timer/1.0.0.schema.json b/dist/schemas/mdbase.runtime.timer/1.0.0.schema.json new file mode 100644 index 0000000..a03fc67 --- /dev/null +++ b/dist/schemas/mdbase.runtime.timer/1.0.0.schema.json @@ -0,0 +1,221 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime timer", + "type": "object", + "required": [ + "type", + "id", + "generation", + "status", + "fire_at", + "event", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_timer" + }, + "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" + } + }, + "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.timer/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.workflow/1.0.0.schema.json b/dist/schemas/mdbase.runtime.workflow/1.0.0.schema.json new file mode 100644 index 0000000..60cf082 --- /dev/null +++ b/dist/schemas/mdbase.runtime.workflow/1.0.0.schema.json @@ -0,0 +1,392 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime workflow", + "type": "object", + "required": [ + "type", + "id", + "version", + "name", + "enabled", + "triggers", + "steps" + ], + "properties": { + "type": { + "const": "runtime_workflow" + }, + "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" + } + }, + "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 + }, + "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.0.0.schema.json" +} diff --git a/package.json b/package.json index 8ef6054..149660f 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "type": "module", "scripts": { + "sync:runtime": "node scripts/sync-runtime-pack.mjs", "build": "node scripts/build.mjs", "verify": "node scripts/verify.mjs", "test": "npm run build && npm run verify" @@ -19,4 +20,3 @@ }, "license": "MIT" } - diff --git a/packs/mdbase.runtime.standard/0.2.0.pack.yaml b/packs/mdbase.runtime.standard/0.2.0.pack.yaml new file mode 100644 index 0000000..2c16e19 --- /dev/null +++ b/packs/mdbase.runtime.standard/0.2.0.pack.yaml @@ -0,0 +1,133 @@ +kind: mdbase.catalog-pack +id: mdbase.runtime.standard +version: 0.2.0 +name: mdbase durable runtime standard library +description: Runtime record implementations and inspectable built-in event/action contracts. +featured: true +provides: + - id: mdbase.runtime.workflow + version: 1.0.0 + - id: mdbase.runtime.policy + version: 1.0.0 + - id: mdbase.runtime.provider-registration + version: 1.0.0 + - id: mdbase.runtime.capability-grant + version: 1.0.0 + - id: mdbase.runtime.run + version: 1.0.0 + - id: mdbase.runtime.action-attempt + version: 1.0.0 + - id: mdbase.runtime.checkpoint + version: 1.0.0 + - id: mdbase.runtime.timer + version: 1.0.0 + - id: mdbase.runtime.diagnostic + version: 1.0.0 + - id: mdbase.runtime.dead-letter + version: 1.0.0 +resources: + - kind: schema + source: schemas/mdbase.runtime.workflow/1.0.0.schema.json + target: schemas/mdbase.runtime.workflow/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.workflow/1.0.0.md + target: _contracts/mdbase.runtime.workflow/1.0.0.md + - kind: type + source: types/mdbase-runtime/workflow.md + target: _types/workflow.md + - kind: schema + source: schemas/mdbase.runtime.policy/1.0.0.schema.json + target: schemas/mdbase.runtime.policy/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.policy/1.0.0.md + target: _contracts/mdbase.runtime.policy/1.0.0.md + - kind: type + source: types/mdbase-runtime/policy.md + target: _types/policy.md + - kind: schema + source: schemas/mdbase.runtime.provider-registration/1.0.0.schema.json + target: schemas/mdbase.runtime.provider-registration/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.provider-registration/1.0.0.md + target: _contracts/mdbase.runtime.provider-registration/1.0.0.md + - kind: type + source: types/mdbase-runtime/provider-registration.md + target: _types/provider-registration.md + - kind: schema + source: schemas/mdbase.runtime.capability-grant/1.0.0.schema.json + target: schemas/mdbase.runtime.capability-grant/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.capability-grant/1.0.0.md + target: _contracts/mdbase.runtime.capability-grant/1.0.0.md + - kind: type + source: types/mdbase-runtime/capability-grant.md + target: _types/capability-grant.md + - kind: schema + source: schemas/mdbase.runtime.run/1.0.0.schema.json + target: schemas/mdbase.runtime.run/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.run/1.0.0.md + target: _contracts/mdbase.runtime.run/1.0.0.md + - kind: type + source: types/mdbase-runtime/run.md + target: _types/run.md + - kind: schema + source: schemas/mdbase.runtime.action-attempt/1.0.0.schema.json + target: schemas/mdbase.runtime.action-attempt/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.action-attempt/1.0.0.md + target: _contracts/mdbase.runtime.action-attempt/1.0.0.md + - kind: type + source: types/mdbase-runtime/action-attempt.md + target: _types/action-attempt.md + - kind: schema + source: schemas/mdbase.runtime.checkpoint/1.0.0.schema.json + target: schemas/mdbase.runtime.checkpoint/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.checkpoint/1.0.0.md + target: _contracts/mdbase.runtime.checkpoint/1.0.0.md + - kind: type + source: types/mdbase-runtime/checkpoint.md + target: _types/checkpoint.md + - kind: schema + source: schemas/mdbase.runtime.timer/1.0.0.schema.json + target: schemas/mdbase.runtime.timer/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.timer/1.0.0.md + target: _contracts/mdbase.runtime.timer/1.0.0.md + - kind: type + source: types/mdbase-runtime/timer.md + target: _types/timer.md + - kind: schema + source: schemas/mdbase.runtime.diagnostic/1.0.0.schema.json + target: schemas/mdbase.runtime.diagnostic/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.diagnostic/1.0.0.md + target: _contracts/mdbase.runtime.diagnostic/1.0.0.md + - kind: type + source: types/mdbase-runtime/diagnostic.md + target: _types/diagnostic.md + - kind: schema + source: schemas/mdbase.runtime.dead-letter/1.0.0.schema.json + target: schemas/mdbase.runtime.dead-letter/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.dead-letter/1.0.0.md + target: _contracts/mdbase.runtime.dead-letter/1.0.0.md + - kind: type + source: types/mdbase-runtime/dead-letter.md + target: _types/dead-letter.md + - kind: schema + source: schemas/mdbase.runtime.timer.fired/1.0.0.schema.json + target: schemas/mdbase.runtime.timer.fired/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.timer.fired/1.0.0.md + target: _contracts/mdbase.runtime.timer.fired/1.0.0.md + - kind: schema + 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 + source: schemas/mdbase.runtime.run.cancel/1.0.0.schema.json + target: schemas/mdbase.runtime.run.cancel/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.runtime.run.cancel/1.0.0.md + target: _contracts/mdbase.runtime.run.cancel/1.0.0.md diff --git a/schemas/mdbase.runtime.action-attempt/1.0.0.schema.json b/schemas/mdbase.runtime.action-attempt/1.0.0.schema.json new file mode 100644 index 0000000..b02f7b7 --- /dev/null +++ b/schemas/mdbase.runtime.action-attempt/1.0.0.schema.json @@ -0,0 +1,238 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime action attempt", + "type": "object", + "required": [ + "type", + "id", + "run_id", + "step_id", + "request_id", + "invocation_id", + "attempt_id", + "contract", + "provider", + "provider_declaration_digest", + "status", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_action_attempt" + }, + "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" + } + }, + "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.action-attempt/1.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json b/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json new file mode 100644 index 0000000..9d6cc2d --- /dev/null +++ b/schemas/mdbase.runtime.capability-grant/1.0.0.schema.json @@ -0,0 +1,197 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime capability grant", + "type": "object", + "required": [ + "type", + "id", + "capability", + "principal", + "mode", + "granted_at" + ], + "properties": { + "type": { + "const": "runtime_capability_grant" + }, + "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" + } + }, + "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.capability-grant/1.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json b/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json new file mode 100644 index 0000000..f14163b --- /dev/null +++ b/schemas/mdbase.runtime.checkpoint/1.0.0.schema.json @@ -0,0 +1,188 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime checkpoint", + "type": "object", + "required": [ + "type", + "id", + "run_id", + "generation", + "status", + "state", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_checkpoint" + }, + "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" + } + }, + "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.checkpoint/1.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json b/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json new file mode 100644 index 0000000..ea3be8b --- /dev/null +++ b/schemas/mdbase.runtime.dead-letter/1.0.0.schema.json @@ -0,0 +1,191 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime dead letter", + "type": "object", + "required": [ + "type", + "id", + "reason", + "status", + "evidence", + "created_at" + ], + "properties": { + "type": { + "const": "runtime_dead_letter" + }, + "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" + } + }, + "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.dead-letter/1.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json b/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json new file mode 100644 index 0000000..0dec633 --- /dev/null +++ b/schemas/mdbase.runtime.diagnostic/1.0.0.schema.json @@ -0,0 +1,193 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime diagnostic", + "type": "object", + "required": [ + "type", + "id", + "severity", + "code", + "message", + "created_at" + ], + "properties": { + "type": { + "const": "runtime_diagnostic" + }, + "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" + } + }, + "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.diagnostic/1.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.policy/1.0.0.schema.json b/schemas/mdbase.runtime.policy/1.0.0.schema.json new file mode 100644 index 0000000..a873c7b --- /dev/null +++ b/schemas/mdbase.runtime.policy/1.0.0.schema.json @@ -0,0 +1,263 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime policy", + "type": "object", + "required": [ + "type", + "id", + "version", + "enabled", + "grants" + ], + "properties": { + "type": { + "const": "runtime_policy" + }, + "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 + } + } + }, + "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.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json b/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json new file mode 100644 index 0000000..1fb73c5 --- /dev/null +++ b/schemas/mdbase.runtime.provider-registration/1.0.0.schema.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime provider registration evidence", + "type": "object", + "required": [ + "type", + "id", + "declaration_kind", + "declaration", + "verified_at", + "active" + ], + "properties": { + "type": { + "const": "runtime_provider_registration" + }, + "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" + } + }, + "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.provider-registration/1.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json b/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json new file mode 100644 index 0000000..8c3ed04 --- /dev/null +++ b/schemas/mdbase.runtime.run.cancel/1.0.0.output.schema.json @@ -0,0 +1,161 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime run-cancel action output", + "type": "object", + "required": [ + "run_id", + "status" + ], + "properties": { + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "status": { + "enum": [ + "cancellation_requested", + "already_terminal" + ] + } + }, + "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.run.cancel/1.0.0.output.schema.json" +} diff --git a/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json b/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json new file mode 100644 index 0000000..e5fd257 --- /dev/null +++ b/schemas/mdbase.runtime.run.cancel/1.0.0.schema.json @@ -0,0 +1,157 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime run-cancel action input", + "type": "object", + "required": [ + "run_id" + ], + "properties": { + "run_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "reason": { + "type": "string" + } + }, + "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.run.cancel/1.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.run/1.0.0.schema.json b/schemas/mdbase.runtime.run/1.0.0.schema.json new file mode 100644 index 0000000..3966490 --- /dev/null +++ b/schemas/mdbase.runtime.run/1.0.0.schema.json @@ -0,0 +1,356 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime run", + "type": "object", + "required": [ + "type", + "id", + "workflow_id", + "workflow_version", + "workflow_revision", + "event_id", + "event_contract", + "admitted_plan", + "status", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_run" + }, + "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" + } + }, + "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 + }, + "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.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json b/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json new file mode 100644 index 0000000..e61ff1c --- /dev/null +++ b/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json @@ -0,0 +1,164 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase runtime timer-fired event data", + "type": "object", + "required": [ + "timer_id", + "generation", + "scheduled_for" + ], + "properties": { + "timer_id": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + }, + "generation": { + "type": "integer", + "minimum": 1 + }, + "scheduled_for": { + "type": "string", + "format": "date-time" + } + }, + "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.timer.fired/1.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.timer/1.0.0.schema.json b/schemas/mdbase.runtime.timer/1.0.0.schema.json new file mode 100644 index 0000000..a03fc67 --- /dev/null +++ b/schemas/mdbase.runtime.timer/1.0.0.schema.json @@ -0,0 +1,221 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime timer", + "type": "object", + "required": [ + "type", + "id", + "generation", + "status", + "fire_at", + "event", + "created_at", + "updated_at" + ], + "properties": { + "type": { + "const": "runtime_timer" + }, + "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" + } + }, + "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.timer/1.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.workflow/1.0.0.schema.json b/schemas/mdbase.runtime.workflow/1.0.0.schema.json new file mode 100644 index 0000000..60cf082 --- /dev/null +++ b/schemas/mdbase.runtime.workflow/1.0.0.schema.json @@ -0,0 +1,392 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase durable runtime workflow", + "type": "object", + "required": [ + "type", + "id", + "version", + "name", + "enabled", + "triggers", + "steps" + ], + "properties": { + "type": { + "const": "runtime_workflow" + }, + "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" + } + }, + "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 + }, + "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.0.0.schema.json" +} diff --git a/scripts/sync-runtime-pack.mjs b/scripts/sync-runtime-pack.mjs new file mode 100644 index 0000000..9136a7d --- /dev/null +++ b/scripts/sync-runtime-pack.mjs @@ -0,0 +1,91 @@ +import { + cp, + mkdir, + readFile, + rm, + writeFile +} from "node:fs/promises"; +import { dirname, join, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; +import { parse, stringify } from "yaml"; + +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"); +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" +) { + throw new Error("The source is not mdbase.runtime.standard 0.2.0."); +} + +const runtimeContractIds = manifest.resources + .filter(({ kind }) => kind === "contract") + .map(({ source }) => source.split("/")[1]); +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 }); + await cp(from, to); + resources.push({ + kind: resource.kind, + source, + target: resource.target + }); +} + +const definition = { + kind: "mdbase.catalog-pack", + id: manifest.id, + version: manifest.version, + name: manifest.name, + description: manifest.description, + featured: true, + provides: [ + "mdbase.runtime.workflow", + "mdbase.runtime.policy", + "mdbase.runtime.provider-registration", + "mdbase.runtime.capability-grant", + "mdbase.runtime.run", + "mdbase.runtime.action-attempt", + "mdbase.runtime.checkpoint", + "mdbase.runtime.timer", + "mdbase.runtime.diagnostic", + "mdbase.runtime.dead-letter" + ].map((id) => ({ id, version: "1.0.0" })), + resources +}; +const packPath = join(root, "packs/mdbase.runtime.standard/0.2.0.pack.yaml"); +await mkdir(dirname(packPath), { recursive: true }); +await writeFile(packPath, stringify(definition, { lineWidth: 0 }), "utf8"); + +console.log(`Synced ${resources.length} runtime resources from ${sourceRoot}.`); + +function catalogSource(resource) { + if (resource.kind === "contract") { + return resource.source.replace(/^_contracts\//u, "contracts/"); + } + if (resource.kind === "type") { + return resource.source.replace(/^_types\//u, "types/mdbase-runtime/"); + } + return resource.source; +} diff --git a/sources.json b/sources.json index 7f4fad7..9793394 100644 --- a/sources.json +++ b/sources.json @@ -1,7 +1,6 @@ { "typescript_implementation": { "repository": "callumalpass/mdbase", - "ref": "a45632ab51f97f55dab05ad55d4fe91bdb118183" + "ref": "83746e98825a02635ec10a2cad2ea28d5e4b0223" } } - diff --git a/types/mdbase-runtime/action-attempt.md b/types/mdbase-runtime/action-attempt.md new file mode 100644 index 0000000..68812f3 --- /dev/null +++ b/types/mdbase-runtime/action-attempt.md @@ -0,0 +1,40 @@ +--- +kind: mdbase.type +name: runtime_action_attempt +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.action-attempt. +match: + where: + type: runtime_action_attempt +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.action-attempt/1.0.0.schema.json +implements: + - contract: mdbase.runtime.action-attempt + version: 1.0.0 + fields: + type: type + 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. diff --git a/types/mdbase-runtime/capability-grant.md b/types/mdbase-runtime/capability-grant.md new file mode 100644 index 0000000..578b8b8 --- /dev/null +++ b/types/mdbase-runtime/capability-grant.md @@ -0,0 +1,30 @@ +--- +kind: mdbase.type +name: runtime_capability_grant +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.capability-grant. +match: + where: + type: runtime_capability_grant +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.capability-grant/1.0.0.schema.json +implements: + - contract: mdbase.runtime.capability-grant + version: 1.0.0 + fields: + type: type + 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. diff --git a/types/mdbase-runtime/checkpoint.md b/types/mdbase-runtime/checkpoint.md new file mode 100644 index 0000000..f022e64 --- /dev/null +++ b/types/mdbase-runtime/checkpoint.md @@ -0,0 +1,28 @@ +--- +kind: mdbase.type +name: runtime_checkpoint +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.checkpoint. +match: + where: + type: runtime_checkpoint +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.checkpoint/1.0.0.schema.json +implements: + - contract: mdbase.runtime.checkpoint + version: 1.0.0 + fields: + type: type + 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. diff --git a/types/mdbase-runtime/dead-letter.md b/types/mdbase-runtime/dead-letter.md new file mode 100644 index 0000000..78bdda6 --- /dev/null +++ b/types/mdbase-runtime/dead-letter.md @@ -0,0 +1,29 @@ +--- +kind: mdbase.type +name: runtime_dead_letter +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.dead-letter. +match: + where: + type: runtime_dead_letter +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.dead-letter/1.0.0.schema.json +implements: + - contract: mdbase.runtime.dead-letter + version: 1.0.0 + fields: + type: type + 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. diff --git a/types/mdbase-runtime/diagnostic.md b/types/mdbase-runtime/diagnostic.md new file mode 100644 index 0000000..d5545ea --- /dev/null +++ b/types/mdbase-runtime/diagnostic.md @@ -0,0 +1,31 @@ +--- +kind: mdbase.type +name: runtime_diagnostic +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.diagnostic. +match: + where: + type: runtime_diagnostic +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.diagnostic/1.0.0.schema.json +implements: + - contract: mdbase.runtime.diagnostic + version: 1.0.0 + fields: + type: type + 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. diff --git a/types/mdbase-runtime/policy.md b/types/mdbase-runtime/policy.md new file mode 100644 index 0000000..2eb0490 --- /dev/null +++ b/types/mdbase-runtime/policy.md @@ -0,0 +1,29 @@ +--- +kind: mdbase.type +name: runtime_policy +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.policy. +match: + where: + type: runtime_policy +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.policy/1.0.0.schema.json +implements: + - contract: mdbase.runtime.policy + version: 1.0.0 + fields: + type: type + 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. diff --git a/types/mdbase-runtime/provider-registration.md b/types/mdbase-runtime/provider-registration.md new file mode 100644 index 0000000..226ca51 --- /dev/null +++ b/types/mdbase-runtime/provider-registration.md @@ -0,0 +1,27 @@ +--- +kind: mdbase.type +name: runtime_provider_registration +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.provider-registration. +match: + where: + type: runtime_provider_registration +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.provider-registration/1.0.0.schema.json +implements: + - contract: mdbase.runtime.provider-registration + version: 1.0.0 + fields: + type: type + 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. diff --git a/types/mdbase-runtime/run.md b/types/mdbase-runtime/run.md new file mode 100644 index 0000000..3fdd476 --- /dev/null +++ b/types/mdbase-runtime/run.md @@ -0,0 +1,43 @@ +--- +kind: mdbase.type +name: runtime_run +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.run. +match: + where: + type: runtime_run +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.run/1.0.0.schema.json +implements: + - contract: mdbase.runtime.run + version: 1.0.0 + fields: + type: type + 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. diff --git a/types/mdbase-runtime/timer.md b/types/mdbase-runtime/timer.md new file mode 100644 index 0000000..36d5664 --- /dev/null +++ b/types/mdbase-runtime/timer.md @@ -0,0 +1,31 @@ +--- +kind: mdbase.type +name: runtime_timer +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.timer. +match: + where: + type: runtime_timer +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.timer/1.0.0.schema.json +implements: + - contract: mdbase.runtime.timer + version: 1.0.0 + fields: + type: type + 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. diff --git a/types/mdbase-runtime/workflow.md b/types/mdbase-runtime/workflow.md new file mode 100644 index 0000000..68efe08 --- /dev/null +++ b/types/mdbase-runtime/workflow.md @@ -0,0 +1,32 @@ +--- +kind: mdbase.type +name: runtime_workflow +version: 1 +description: Canonical Markdown implementation of mdbase.runtime.workflow. +match: + where: + type: runtime_workflow +schema: + dialect: json-schema-2020-12 + ref: ../schemas/mdbase.runtime.workflow/1.0.0.schema.json +implements: + - contract: mdbase.runtime.workflow + version: 1.0.0 + fields: + type: type + 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. From e87f9f5302e924b5fd251229c7ee0ba0ece2211a Mon Sep 17 00:00:00 2001 From: callumalpass Date: Wed, 29 Jul 2026 01:15:13 +1000 Subject: [PATCH 2/2] sync canonical runtime event contracts --- README.md | 7 +- contracts/mdbase.record.created/1.0.0.md | 16 + contracts/mdbase.record.deleted/1.0.0.md | 16 + contracts/mdbase.record.modified/1.0.0.md | 16 + contracts/mdbase.record.renamed/1.0.0.md | 16 + contracts/mdbase.runtime.timer.fired/1.0.0.md | 2 +- .../contracts/mdbase.record.created/1.0.0.md | 16 + .../contracts/mdbase.record.deleted/1.0.0.md | 16 + .../contracts/mdbase.record.modified/1.0.0.md | 16 + .../contracts/mdbase.record.renamed/1.0.0.md | 16 + .../mdbase.runtime.timer.fired/1.0.0.md | 2 +- .../mdbase.record.created/1.0.0.schema.json | 180 +++++++++++ .../mdbase.record.deleted/1.0.0.schema.json | 172 +++++++++++ .../mdbase.record.modified/1.0.0.schema.json | 198 ++++++++++++ .../mdbase.record.renamed/1.0.0.schema.json | 195 ++++++++++++ .../1.0.0.schema.json | 16 +- .../types/mdbase-runtime/action-attempt.md | 178 ++++++++++- .../types/mdbase-runtime/capability-grant.md | 145 ++++++++- .../types/mdbase-runtime/checkpoint.md | 140 ++++++++- .../types/mdbase-runtime/dead-letter.md | 141 ++++++++- .../types/mdbase-runtime/diagnostic.md | 143 ++++++++- dist/artifacts/types/mdbase-runtime/policy.md | 191 +++++++++++- .../mdbase-runtime/provider-registration.md | 131 +++++++- dist/artifacts/types/mdbase-runtime/run.md | 263 +++++++++++++++- dist/artifacts/types/mdbase-runtime/timer.md | 163 +++++++++- .../types/mdbase-runtime/workflow.md | 282 +++++++++++++++++- dist/catalog.json | 68 ++++- dist/packs/mdbase.runtime.standard/0.2.0.json | 148 ++++++--- .../mdbase.record.created/1.0.0.schema.json | 180 +++++++++++ .../mdbase.record.deleted/1.0.0.schema.json | 172 +++++++++++ .../mdbase.record.modified/1.0.0.schema.json | 198 ++++++++++++ .../mdbase.record.renamed/1.0.0.schema.json | 195 ++++++++++++ .../1.0.0.schema.json | 16 +- packs/mdbase.runtime.standard/0.2.0.pack.yaml | 44 ++- .../mdbase.record.created/1.0.0.schema.json | 180 +++++++++++ .../mdbase.record.deleted/1.0.0.schema.json | 172 +++++++++++ .../mdbase.record.modified/1.0.0.schema.json | 198 ++++++++++++ .../mdbase.record.renamed/1.0.0.schema.json | 195 ++++++++++++ .../1.0.0.schema.json | 16 +- scripts/sync-runtime-pack.mjs | 57 +++- sources.json | 4 + types/mdbase-runtime/action-attempt.md | 178 ++++++++++- types/mdbase-runtime/capability-grant.md | 145 ++++++++- types/mdbase-runtime/checkpoint.md | 140 ++++++++- types/mdbase-runtime/dead-letter.md | 141 ++++++++- types/mdbase-runtime/diagnostic.md | 143 ++++++++- types/mdbase-runtime/policy.md | 191 +++++++++++- types/mdbase-runtime/provider-registration.md | 131 +++++++- types/mdbase-runtime/run.md | 263 +++++++++++++++- types/mdbase-runtime/timer.md | 163 +++++++++- types/mdbase-runtime/workflow.md | 282 +++++++++++++++++- 51 files changed, 6199 insertions(+), 98 deletions(-) create mode 100644 contracts/mdbase.record.created/1.0.0.md create mode 100644 contracts/mdbase.record.deleted/1.0.0.md create mode 100644 contracts/mdbase.record.modified/1.0.0.md create mode 100644 contracts/mdbase.record.renamed/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.record.created/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.record.deleted/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.record.modified/1.0.0.md create mode 100644 dist/artifacts/contracts/mdbase.record.renamed/1.0.0.md create mode 100644 dist/artifacts/schemas/mdbase.record.created/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.record.deleted/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.record.modified/1.0.0.schema.json create mode 100644 dist/artifacts/schemas/mdbase.record.renamed/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.record.created/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.record.deleted/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.record.modified/1.0.0.schema.json create mode 100644 dist/schemas/mdbase.record.renamed/1.0.0.schema.json create mode 100644 schemas/mdbase.record.created/1.0.0.schema.json create mode 100644 schemas/mdbase.record.deleted/1.0.0.schema.json create mode 100644 schemas/mdbase.record.modified/1.0.0.schema.json create mode 100644 schemas/mdbase.record.renamed/1.0.0.schema.json diff --git a/README.md b/README.md index 1471867..17feccc 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ without changing the published contract. The featured `mdbase.runtime.standard` pack supplies the durable runtime 0.2 standard library: ten ordinary record contracts and canonical implementing -types, plus inspectable timer-event and cancellation-action artifacts. +types, the four canonical record-change events, and inspectable timer-event +and cancellation-action artifacts. Installing it is passive and grants no execution authority. This repository is the canonical source. Its deterministic `dist/` output is @@ -30,7 +31,9 @@ packs//.pack.yaml readable pack definitions dist/ deterministic publication artifact ``` -The runtime pack is generated in `mdbase-spec` and imported exactly with: +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: ```sh MDBASE_SPEC_DIR=../mdbase-spec npm run sync:runtime diff --git a/contracts/mdbase.record.created/1.0.0.md b/contracts/mdbase.record.created/1.0.0.md new file mode 100644 index 0000000..1a1c06c --- /dev/null +++ b/contracts/mdbase.record.created/1.0.0.md @@ -0,0 +1,16 @@ +--- +kind: mdbase.contract +contract_type: event +id: mdbase.record.created +version: 1.0.0 +name: Record created +description: Published after a record is created and derived collection state is consistent. +data_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.record.created/1.0.0.schema.json +--- + +# Record created + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/contracts/mdbase.record.deleted/1.0.0.md b/contracts/mdbase.record.deleted/1.0.0.md new file mode 100644 index 0000000..3965bf9 --- /dev/null +++ b/contracts/mdbase.record.deleted/1.0.0.md @@ -0,0 +1,16 @@ +--- +kind: mdbase.contract +contract_type: event +id: mdbase.record.deleted +version: 1.0.0 +name: Record deleted +description: Published after a record is deleted and derived collection state is consistent. +data_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.record.deleted/1.0.0.schema.json +--- + +# Record deleted + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/contracts/mdbase.record.modified/1.0.0.md b/contracts/mdbase.record.modified/1.0.0.md new file mode 100644 index 0000000..2ccff27 --- /dev/null +++ b/contracts/mdbase.record.modified/1.0.0.md @@ -0,0 +1,16 @@ +--- +kind: mdbase.contract +contract_type: event +id: mdbase.record.modified +version: 1.0.0 +name: Record modified +description: Published after a record is modified and derived collection state is consistent. +data_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.record.modified/1.0.0.schema.json +--- + +# Record modified + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/contracts/mdbase.record.renamed/1.0.0.md b/contracts/mdbase.record.renamed/1.0.0.md new file mode 100644 index 0000000..bbeef56 --- /dev/null +++ b/contracts/mdbase.record.renamed/1.0.0.md @@ -0,0 +1,16 @@ +--- +kind: mdbase.contract +contract_type: event +id: mdbase.record.renamed +version: 1.0.0 +name: Record renamed +description: Published after a record is renamed and derived collection state is consistent. +data_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.record.renamed/1.0.0.schema.json +--- + +# Record renamed + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/contracts/mdbase.runtime.timer.fired/1.0.0.md b/contracts/mdbase.runtime.timer.fired/1.0.0.md index 25abf6b..410b93a 100644 --- a/contracts/mdbase.runtime.timer.fired/1.0.0.md +++ b/contracts/mdbase.runtime.timer.fired/1.0.0.md @@ -4,7 +4,7 @@ contract_type: event id: mdbase.runtime.timer.fired version: 1.0.0 name: Runtime timer fired -description: Published when the current generation of a durable timer fires. +description: Published with scheduling evidence and opaque application data when the current generation of a durable timer fires. data_schema: dialect: json-schema-2020-12 ref: ../../schemas/mdbase.runtime.timer.fired/1.0.0.schema.json diff --git a/dist/artifacts/contracts/mdbase.record.created/1.0.0.md b/dist/artifacts/contracts/mdbase.record.created/1.0.0.md new file mode 100644 index 0000000..1a1c06c --- /dev/null +++ b/dist/artifacts/contracts/mdbase.record.created/1.0.0.md @@ -0,0 +1,16 @@ +--- +kind: mdbase.contract +contract_type: event +id: mdbase.record.created +version: 1.0.0 +name: Record created +description: Published after a record is created and derived collection state is consistent. +data_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.record.created/1.0.0.schema.json +--- + +# Record created + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/dist/artifacts/contracts/mdbase.record.deleted/1.0.0.md b/dist/artifacts/contracts/mdbase.record.deleted/1.0.0.md new file mode 100644 index 0000000..3965bf9 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.record.deleted/1.0.0.md @@ -0,0 +1,16 @@ +--- +kind: mdbase.contract +contract_type: event +id: mdbase.record.deleted +version: 1.0.0 +name: Record deleted +description: Published after a record is deleted and derived collection state is consistent. +data_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.record.deleted/1.0.0.schema.json +--- + +# Record deleted + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/dist/artifacts/contracts/mdbase.record.modified/1.0.0.md b/dist/artifacts/contracts/mdbase.record.modified/1.0.0.md new file mode 100644 index 0000000..2ccff27 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.record.modified/1.0.0.md @@ -0,0 +1,16 @@ +--- +kind: mdbase.contract +contract_type: event +id: mdbase.record.modified +version: 1.0.0 +name: Record modified +description: Published after a record is modified and derived collection state is consistent. +data_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.record.modified/1.0.0.schema.json +--- + +# Record modified + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/dist/artifacts/contracts/mdbase.record.renamed/1.0.0.md b/dist/artifacts/contracts/mdbase.record.renamed/1.0.0.md new file mode 100644 index 0000000..bbeef56 --- /dev/null +++ b/dist/artifacts/contracts/mdbase.record.renamed/1.0.0.md @@ -0,0 +1,16 @@ +--- +kind: mdbase.contract +contract_type: event +id: mdbase.record.renamed +version: 1.0.0 +name: Record renamed +description: Published after a record is renamed and derived collection state is consistent. +data_schema: + dialect: json-schema-2020-12 + ref: ../../schemas/mdbase.record.renamed/1.0.0.schema.json +--- + +# Record renamed + +This built-in is an ordinary, inspectable contract artifact. Runtime exchange +uses the mdbase interoperability profile unchanged. diff --git a/dist/artifacts/contracts/mdbase.runtime.timer.fired/1.0.0.md b/dist/artifacts/contracts/mdbase.runtime.timer.fired/1.0.0.md index 25abf6b..410b93a 100644 --- a/dist/artifacts/contracts/mdbase.runtime.timer.fired/1.0.0.md +++ b/dist/artifacts/contracts/mdbase.runtime.timer.fired/1.0.0.md @@ -4,7 +4,7 @@ contract_type: event id: mdbase.runtime.timer.fired version: 1.0.0 name: Runtime timer fired -description: Published when the current generation of a durable timer fires. +description: Published with scheduling evidence and opaque application data when the current generation of a durable timer fires. data_schema: dialect: json-schema-2020-12 ref: ../../schemas/mdbase.runtime.timer.fired/1.0.0.schema.json diff --git a/dist/artifacts/schemas/mdbase.record.created/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.record.created/1.0.0.schema.json new file mode 100644 index 0000000..f2f1c4e --- /dev/null +++ b/dist/artifacts/schemas/mdbase.record.created/1.0.0.schema.json @@ -0,0 +1,180 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-created event data", + "type": "object", + "required": [ + "path", + "after", + "changed_fields", + "revision", + "types" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "after": { + "type": "object" + }, + "changed_fields": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "revision": { + "type": "string", + "minLength": 1 + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.created/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.record.deleted/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.record.deleted/1.0.0.schema.json new file mode 100644 index 0000000..49a395f --- /dev/null +++ b/dist/artifacts/schemas/mdbase.record.deleted/1.0.0.schema.json @@ -0,0 +1,172 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-deleted event data", + "type": "object", + "required": [ + "path", + "before", + "previous_revision", + "types" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "before": { + "type": "object" + }, + "previous_revision": { + "type": "string", + "minLength": 1 + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.deleted/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.record.modified/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.record.modified/1.0.0.schema.json new file mode 100644 index 0000000..57ad051 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.record.modified/1.0.0.schema.json @@ -0,0 +1,198 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-modified event data", + "type": "object", + "required": [ + "path", + "before", + "after", + "changed_fields", + "previous_revision", + "revision", + "previous_types", + "types" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "before": { + "type": "object" + }, + "after": { + "type": "object" + }, + "changed_fields": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "previous_revision": { + "type": "string", + "minLength": 1 + }, + "revision": { + "type": "string", + "minLength": 1 + }, + "previous_types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.modified/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.record.renamed/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.record.renamed/1.0.0.schema.json new file mode 100644 index 0000000..4c11fc8 --- /dev/null +++ b/dist/artifacts/schemas/mdbase.record.renamed/1.0.0.schema.json @@ -0,0 +1,195 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-renamed event data", + "type": "object", + "required": [ + "from", + "to", + "before", + "after", + "previous_revision", + "revision", + "previous_types", + "types" + ], + "properties": { + "from": { + "type": "string", + "minLength": 1 + }, + "to": { + "type": "string", + "minLength": 1 + }, + "before": { + "type": "object" + }, + "after": { + "type": "object" + }, + "previous_revision": { + "type": "string", + "minLength": 1 + }, + "revision": { + "type": "string", + "minLength": 1 + }, + "previous_types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.renamed/1.0.0.schema.json" +} diff --git a/dist/artifacts/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json b/dist/artifacts/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json index e61ff1c..26296a9 100644 --- a/dist/artifacts/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json +++ b/dist/artifacts/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json @@ -5,7 +5,10 @@ "required": [ "timer_id", "generation", - "scheduled_for" + "scheduled_for", + "fired_at", + "late_by_ms", + "data" ], "properties": { "timer_id": { @@ -19,6 +22,17 @@ "scheduled_for": { "type": "string", "format": "date-time" + }, + "fired_at": { + "type": "string", + "format": "date-time" + }, + "late_by_ms": { + "type": "integer", + "minimum": 0 + }, + "data": { + "description": "Opaque application data supplied when the timer was scheduled." } }, "patternProperties": { diff --git a/dist/artifacts/types/mdbase-runtime/action-attempt.md b/dist/artifacts/types/mdbase-runtime/action-attempt.md index 68812f3..edd8505 100644 --- a/dist/artifacts/types/mdbase-runtime/action-attempt.md +++ b/dist/artifacts/types/mdbase-runtime/action-attempt.md @@ -8,7 +8,183 @@ match: type: runtime_action_attempt schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.action-attempt/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime action attempt + type: object + required: + - type + - id + - run_id + - step_id + - request_id + - invocation_id + - attempt_id + - contract + - provider + - provider_declaration_digest + - status + - created_at + - updated_at + properties: + type: + const: runtime_action_attempt + 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 + 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.action-attempt/1.0.0.schema.json implements: - contract: mdbase.runtime.action-attempt version: 1.0.0 diff --git a/dist/artifacts/types/mdbase-runtime/capability-grant.md b/dist/artifacts/types/mdbase-runtime/capability-grant.md index 578b8b8..687225d 100644 --- a/dist/artifacts/types/mdbase-runtime/capability-grant.md +++ b/dist/artifacts/types/mdbase-runtime/capability-grant.md @@ -8,7 +8,150 @@ match: type: runtime_capability_grant schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.capability-grant/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase runtime capability grant + type: object + required: + - type + - id + - capability + - principal + - mode + - granted_at + properties: + type: + const: runtime_capability_grant + 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 + 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.capability-grant/1.0.0.schema.json implements: - contract: mdbase.runtime.capability-grant version: 1.0.0 diff --git a/dist/artifacts/types/mdbase-runtime/checkpoint.md b/dist/artifacts/types/mdbase-runtime/checkpoint.md index f022e64..fad5438 100644 --- a/dist/artifacts/types/mdbase-runtime/checkpoint.md +++ b/dist/artifacts/types/mdbase-runtime/checkpoint.md @@ -8,7 +8,145 @@ match: type: runtime_checkpoint schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.checkpoint/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime checkpoint + type: object + required: + - type + - id + - run_id + - generation + - status + - state + - updated_at + properties: + type: + const: runtime_checkpoint + 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 + 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.checkpoint/1.0.0.schema.json implements: - contract: mdbase.runtime.checkpoint version: 1.0.0 diff --git a/dist/artifacts/types/mdbase-runtime/dead-letter.md b/dist/artifacts/types/mdbase-runtime/dead-letter.md index 78bdda6..1db79a3 100644 --- a/dist/artifacts/types/mdbase-runtime/dead-letter.md +++ b/dist/artifacts/types/mdbase-runtime/dead-letter.md @@ -8,7 +8,146 @@ match: type: runtime_dead_letter schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.dead-letter/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime dead letter + type: object + required: + - type + - id + - reason + - status + - evidence + - created_at + properties: + type: + const: runtime_dead_letter + 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 + 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.dead-letter/1.0.0.schema.json implements: - contract: mdbase.runtime.dead-letter version: 1.0.0 diff --git a/dist/artifacts/types/mdbase-runtime/diagnostic.md b/dist/artifacts/types/mdbase-runtime/diagnostic.md index d5545ea..961b0be 100644 --- a/dist/artifacts/types/mdbase-runtime/diagnostic.md +++ b/dist/artifacts/types/mdbase-runtime/diagnostic.md @@ -8,7 +8,148 @@ match: type: runtime_diagnostic schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.diagnostic/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime diagnostic + type: object + required: + - type + - id + - severity + - code + - message + - created_at + properties: + type: + const: runtime_diagnostic + 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 + 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.diagnostic/1.0.0.schema.json implements: - contract: mdbase.runtime.diagnostic version: 1.0.0 diff --git a/dist/artifacts/types/mdbase-runtime/policy.md b/dist/artifacts/types/mdbase-runtime/policy.md index 2eb0490..636cc65 100644 --- a/dist/artifacts/types/mdbase-runtime/policy.md +++ b/dist/artifacts/types/mdbase-runtime/policy.md @@ -8,7 +8,196 @@ match: type: runtime_policy schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.policy/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime policy + type: object + required: + - type + - id + - version + - enabled + - grants + properties: + type: + const: runtime_policy + 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 + 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.0.0.schema.json implements: - contract: mdbase.runtime.policy version: 1.0.0 diff --git a/dist/artifacts/types/mdbase-runtime/provider-registration.md b/dist/artifacts/types/mdbase-runtime/provider-registration.md index 226ca51..d78cd28 100644 --- a/dist/artifacts/types/mdbase-runtime/provider-registration.md +++ b/dist/artifacts/types/mdbase-runtime/provider-registration.md @@ -8,7 +8,136 @@ match: type: runtime_provider_registration schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.provider-registration/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase runtime provider registration evidence + type: object + required: + - type + - id + - declaration_kind + - declaration + - verified_at + - active + properties: + type: + const: runtime_provider_registration + 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 + 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.provider-registration/1.0.0.schema.json implements: - contract: mdbase.runtime.provider-registration version: 1.0.0 diff --git a/dist/artifacts/types/mdbase-runtime/run.md b/dist/artifacts/types/mdbase-runtime/run.md index 3fdd476..3c98755 100644 --- a/dist/artifacts/types/mdbase-runtime/run.md +++ b/dist/artifacts/types/mdbase-runtime/run.md @@ -8,7 +8,268 @@ match: type: runtime_run schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.run/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime run + type: object + required: + - type + - id + - workflow_id + - workflow_version + - workflow_revision + - event_id + - event_contract + - admitted_plan + - status + - created_at + - updated_at + properties: + type: + const: runtime_run + 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" + 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 + 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.0.0.schema.json implements: - contract: mdbase.runtime.run version: 1.0.0 diff --git a/dist/artifacts/types/mdbase-runtime/timer.md b/dist/artifacts/types/mdbase-runtime/timer.md index 36d5664..8da12bb 100644 --- a/dist/artifacts/types/mdbase-runtime/timer.md +++ b/dist/artifacts/types/mdbase-runtime/timer.md @@ -8,7 +8,168 @@ match: type: runtime_timer schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.timer/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime timer + type: object + required: + - type + - id + - generation + - status + - fire_at + - event + - created_at + - updated_at + properties: + type: + const: runtime_timer + 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 + 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.timer/1.0.0.schema.json implements: - contract: mdbase.runtime.timer version: 1.0.0 diff --git a/dist/artifacts/types/mdbase-runtime/workflow.md b/dist/artifacts/types/mdbase-runtime/workflow.md index 68efe08..16787d0 100644 --- a/dist/artifacts/types/mdbase-runtime/workflow.md +++ b/dist/artifacts/types/mdbase-runtime/workflow.md @@ -8,7 +8,287 @@ match: type: runtime_workflow schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.workflow/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime workflow + type: object + required: + - type + - id + - version + - name + - enabled + - triggers + - steps + properties: + type: + const: runtime_workflow + 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" + 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 + 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.0.0.schema.json implements: - contract: mdbase.runtime.workflow version: 1.0.0 diff --git a/dist/catalog.json b/dist/catalog.json index 3d59e22..0606d58 100644 --- a/dist/catalog.json +++ b/dist/catalog.json @@ -29,6 +29,46 @@ } ] }, + { + "id": "mdbase.record.created", + "version": "1.0.0", + "name": "Record created", + "description": "Published after a record is created and derived collection state is consistent.", + "contract_type": "event", + "digest": "sha256:4c157f94e63d1f4fb1a74da640e03264ccb6c78cfa9f88ddb71b09c8bd6d1d44", + "artifact": "./artifacts/contracts/mdbase.record.created/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.record.deleted", + "version": "1.0.0", + "name": "Record deleted", + "description": "Published after a record is deleted and derived collection state is consistent.", + "contract_type": "event", + "digest": "sha256:cb4f4a09f9f9b1f7f5e2207de0074ce02fd89008c08386626fd964a29299f956", + "artifact": "./artifacts/contracts/mdbase.record.deleted/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.record.modified", + "version": "1.0.0", + "name": "Record modified", + "description": "Published after a record is modified and derived collection state is consistent.", + "contract_type": "event", + "digest": "sha256:2f670ef18bf7330fbba73861f41889ee946b33644074ca7366e88913f6e4d88a", + "artifact": "./artifacts/contracts/mdbase.record.modified/1.0.0.md", + "standards": [] + }, + { + "id": "mdbase.record.renamed", + "version": "1.0.0", + "name": "Record renamed", + "description": "Published after a record is renamed and derived collection state is consistent.", + "contract_type": "event", + "digest": "sha256:b6c507198379ba48408c9b48161a1c22d46dad2d291691af449167618484bb4c", + "artifact": "./artifacts/contracts/mdbase.record.renamed/1.0.0.md", + "standards": [] + }, { "id": "mdbase.runtime.action-attempt", "version": "1.0.0", @@ -123,9 +163,9 @@ "id": "mdbase.runtime.timer.fired", "version": "1.0.0", "name": "Runtime timer fired", - "description": "Published when the current generation of a durable timer fires.", + "description": "Published with scheduling evidence and opaque application data when the current generation of a durable timer fires.", "contract_type": "event", - "digest": "sha256:730231fac07ad13dfaff74ff5ee25e26a75f48dd629a4ef8c4d52ffe6b62fb4b", + "digest": "sha256:9381a2c6778a3268758ac235e3c3b66991a769fa8e19f7303d4404b1e7e62bc6", "artifact": "./artifacts/contracts/mdbase.runtime.timer.fired/1.0.0.md", "standards": [] }, @@ -172,51 +212,51 @@ "version": "0.2.0", "name": "mdbase durable runtime standard library", "description": "Runtime record implementations and inspectable built-in event/action contracts.", - "digest": "sha256:1302c93f97c8b3b7a4032b73ab090cc177663b219f20b8eb9b3f5ec249d54255", + "digest": "sha256:998fa577db5ba3ac442f5ae06e721e247b9519613042b744cc4494e72c84e2e6", "provision": "./packs/mdbase.runtime.standard/0.2.0.json", "provides": [ { - "id": "mdbase.runtime.workflow", + "id": "mdbase.runtime.action-attempt", "version": "1.0.0" }, { - "id": "mdbase.runtime.policy", + "id": "mdbase.runtime.capability-grant", "version": "1.0.0" }, { - "id": "mdbase.runtime.provider-registration", + "id": "mdbase.runtime.checkpoint", "version": "1.0.0" }, { - "id": "mdbase.runtime.capability-grant", + "id": "mdbase.runtime.dead-letter", "version": "1.0.0" }, { - "id": "mdbase.runtime.run", + "id": "mdbase.runtime.diagnostic", "version": "1.0.0" }, { - "id": "mdbase.runtime.action-attempt", + "id": "mdbase.runtime.policy", "version": "1.0.0" }, { - "id": "mdbase.runtime.checkpoint", + "id": "mdbase.runtime.provider-registration", "version": "1.0.0" }, { - "id": "mdbase.runtime.timer", + "id": "mdbase.runtime.run", "version": "1.0.0" }, { - "id": "mdbase.runtime.diagnostic", + "id": "mdbase.runtime.timer", "version": "1.0.0" }, { - "id": "mdbase.runtime.dead-letter", + "id": "mdbase.runtime.workflow", "version": "1.0.0" } ], - "resource_count": 35, + "resource_count": 43, "featured": true } ] diff --git a/dist/packs/mdbase.runtime.standard/0.2.0.json b/dist/packs/mdbase.runtime.standard/0.2.0.json index 2f36d83..4e823e8 100644 --- a/dist/packs/mdbase.runtime.standard/0.2.0.json +++ b/dist/packs/mdbase.runtime.standard/0.2.0.json @@ -22,7 +22,7 @@ "kind": "type", "source": "types/mdbase-runtime/workflow.md", "target": "_types/workflow.md", - "digest": "sha256:f0a848daa96fe0f92459e5157bb6cdee41c0679d49a4f581d585846a339c11c9" + "digest": "sha256:15e80fe618bfa4bf430225377d9aae50ec1e1531be217b0c2ba74da3dee747e7" }, { "kind": "schema", @@ -40,7 +40,7 @@ "kind": "type", "source": "types/mdbase-runtime/policy.md", "target": "_types/policy.md", - "digest": "sha256:0f14852150c7ad48c6f5457167333ff4d50ce272822fa4feca34aae09c539aa4" + "digest": "sha256:5cd588138916c792068bfa6ec43ceada81b14921d68cfaa582be8938e27b9cdb" }, { "kind": "schema", @@ -58,7 +58,7 @@ "kind": "type", "source": "types/mdbase-runtime/provider-registration.md", "target": "_types/provider-registration.md", - "digest": "sha256:3f8f1334b345ebc63236f499b7c1fadf09884bd3ef60c5e0df2216020e50f388" + "digest": "sha256:f5f8189553abfbb947d6bec17cfc3d5c6e3ab22a07e7a1b657a92efbe65eefb7" }, { "kind": "schema", @@ -76,7 +76,7 @@ "kind": "type", "source": "types/mdbase-runtime/capability-grant.md", "target": "_types/capability-grant.md", - "digest": "sha256:bb2060851c08e28a0ee096da870398b519c90621e3bb7206082f59df85169340" + "digest": "sha256:8856057d1329e2fdd715d6b8ca3083e29f3c1c9fe3265cd47694d92effffd344" }, { "kind": "schema", @@ -94,7 +94,7 @@ "kind": "type", "source": "types/mdbase-runtime/run.md", "target": "_types/run.md", - "digest": "sha256:03a1236cfb4fd097904cf6ad3ff04c821ff3c485b6aea8bfec0568a3b1baec2e" + "digest": "sha256:493c29c92701e733822cc3b3a0acecd845242c1e62c233b6cbe2a847c9b063ed" }, { "kind": "schema", @@ -112,7 +112,7 @@ "kind": "type", "source": "types/mdbase-runtime/action-attempt.md", "target": "_types/action-attempt.md", - "digest": "sha256:96ed9f48adcc7e81118895351823a4db7eeba5d7e1fd35454394f072f0488b0e" + "digest": "sha256:2439c819f16f599c6859eaf3f2052ca85856d7a032b1f211e8183eb44c7247d0" }, { "kind": "schema", @@ -130,7 +130,7 @@ "kind": "type", "source": "types/mdbase-runtime/checkpoint.md", "target": "_types/checkpoint.md", - "digest": "sha256:da22fafe5975c53b1d3adab345194e74e8f03ea816386de04e91cbbc4ddbd0e3" + "digest": "sha256:3800feba41ce4d729703e8cd92c3e7bc4a826cccd37063c1ba62b7a9790bee76" }, { "kind": "schema", @@ -148,7 +148,7 @@ "kind": "type", "source": "types/mdbase-runtime/timer.md", "target": "_types/timer.md", - "digest": "sha256:4cfe2766837203bd277812e855aaa250efa613c465b2b9e2aec470b66d258851" + "digest": "sha256:eb6ac4d28f3fe5c5f507652dda76cf7bb6eb99e38eb1d6d87cdd7418ac594cde" }, { "kind": "schema", @@ -166,7 +166,7 @@ "kind": "type", "source": "types/mdbase-runtime/diagnostic.md", "target": "_types/diagnostic.md", - "digest": "sha256:5bca79bacfcfeae8bc573216bd09d00e6ec8807ffae7422571834350bf6e241a" + "digest": "sha256:728996e9b0ab2803ab81a856e2c3af7c08202765fc263c536c037b1e586ab055" }, { "kind": "schema", @@ -184,19 +184,67 @@ "kind": "type", "source": "types/mdbase-runtime/dead-letter.md", "target": "_types/dead-letter.md", - "digest": "sha256:b0d60190734983889d63400b2c9aa1c0b5fa668e37920ab5969575cea43aa1f3" + "digest": "sha256:46290341f04a369598a273f16275ee18d6e0a35c8e691b829d7b49ae920b5aab" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.record.created/1.0.0.md", + "target": "_contracts/mdbase.record.created/1.0.0.md", + "digest": "sha256:4c157f94e63d1f4fb1a74da640e03264ccb6c78cfa9f88ddb71b09c8bd6d1d44" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.record.modified/1.0.0.md", + "target": "_contracts/mdbase.record.modified/1.0.0.md", + "digest": "sha256:2f670ef18bf7330fbba73861f41889ee946b33644074ca7366e88913f6e4d88a" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.record.deleted/1.0.0.md", + "target": "_contracts/mdbase.record.deleted/1.0.0.md", + "digest": "sha256:cb4f4a09f9f9b1f7f5e2207de0074ce02fd89008c08386626fd964a29299f956" + }, + { + "kind": "schema", + "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", + "source": "contracts/mdbase.record.renamed/1.0.0.md", + "target": "_contracts/mdbase.record.renamed/1.0.0.md", + "digest": "sha256:b6c507198379ba48408c9b48161a1c22d46dad2d291691af449167618484bb4c" }, { "kind": "schema", "source": "schemas/mdbase.runtime.timer.fired/1.0.0.schema.json", "target": "schemas/mdbase.runtime.timer.fired/1.0.0.schema.json", - "digest": "sha256:10512a03c1ee9db3c52cf45ab8dd862672d2d0a66108218e878ce2e0de2f1682" + "digest": "sha256:986cdde8c88a6ff363062d056101141c436271608e565d2a02f250cd74853f74" }, { "kind": "contract", "source": "contracts/mdbase.runtime.timer.fired/1.0.0.md", "target": "_contracts/mdbase.runtime.timer.fired/1.0.0.md", - "digest": "sha256:730231fac07ad13dfaff74ff5ee25e26a75f48dd629a4ef8c4d52ffe6b62fb4b" + "digest": "sha256:9381a2c6778a3268758ac235e3c3b66991a769fa8e19f7303d4404b1e7e62bc6" }, { "kind": "schema", @@ -229,7 +277,7 @@ }, { "source": "types/mdbase-runtime/workflow.md", - "document": "---\nkind: mdbase.type\nname: runtime_workflow\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.workflow.\nmatch:\n where:\n type: runtime_workflow\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.workflow/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.workflow\n version: 1.0.0\n fields:\n type: type\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" + "document": "---\nkind: mdbase.type\nname: runtime_workflow\nversion: 1\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 - type\n - id\n - version\n - name\n - enabled\n - triggers\n - steps\n properties:\n type:\n const: runtime_workflow\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 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 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.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.workflow\n version: 1.0.0\n fields:\n type: type\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" }, { "source": "schemas/mdbase.runtime.policy/1.0.0.schema.json", @@ -241,7 +289,7 @@ }, { "source": "types/mdbase-runtime/policy.md", - "document": "---\nkind: mdbase.type\nname: runtime_policy\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.policy.\nmatch:\n where:\n type: runtime_policy\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.policy/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.policy\n version: 1.0.0\n fields:\n type: type\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" + "document": "---\nkind: mdbase.type\nname: runtime_policy\nversion: 1\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 - type\n - id\n - version\n - enabled\n - grants\n properties:\n type:\n const: runtime_policy\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 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.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.policy\n version: 1.0.0\n fields:\n type: type\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" }, { "source": "schemas/mdbase.runtime.provider-registration/1.0.0.schema.json", @@ -253,7 +301,7 @@ }, { "source": "types/mdbase-runtime/provider-registration.md", - "document": "---\nkind: mdbase.type\nname: runtime_provider_registration\nversion: 1\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 ref: ../schemas/mdbase.runtime.provider-registration/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.provider-registration\n version: 1.0.0\n fields:\n type: type\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" + "document": "---\nkind: mdbase.type\nname: runtime_provider_registration\nversion: 1\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 - type\n - id\n - declaration_kind\n - declaration\n - verified_at\n - active\n properties:\n type:\n const: runtime_provider_registration\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 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.provider-registration/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.provider-registration\n version: 1.0.0\n fields:\n type: type\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" }, { "source": "schemas/mdbase.runtime.capability-grant/1.0.0.schema.json", @@ -265,7 +313,7 @@ }, { "source": "types/mdbase-runtime/capability-grant.md", - "document": "---\nkind: mdbase.type\nname: runtime_capability_grant\nversion: 1\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 ref: ../schemas/mdbase.runtime.capability-grant/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.capability-grant\n version: 1.0.0\n fields:\n type: type\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" + "document": "---\nkind: mdbase.type\nname: runtime_capability_grant\nversion: 1\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 - type\n - id\n - capability\n - principal\n - mode\n - granted_at\n properties:\n type:\n const: runtime_capability_grant\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 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.capability-grant/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.capability-grant\n version: 1.0.0\n fields:\n type: type\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" }, { "source": "schemas/mdbase.runtime.run/1.0.0.schema.json", @@ -277,7 +325,7 @@ }, { "source": "types/mdbase-runtime/run.md", - "document": "---\nkind: mdbase.type\nname: runtime_run\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.run.\nmatch:\n where:\n type: runtime_run\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.run/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.run\n version: 1.0.0\n fields:\n type: type\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" + "document": "---\nkind: mdbase.type\nname: runtime_run\nversion: 1\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 - 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 properties:\n type:\n const: runtime_run\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 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 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.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.run\n version: 1.0.0\n fields:\n type: type\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" }, { "source": "schemas/mdbase.runtime.action-attempt/1.0.0.schema.json", @@ -289,7 +337,7 @@ }, { "source": "types/mdbase-runtime/action-attempt.md", - "document": "---\nkind: mdbase.type\nname: runtime_action_attempt\nversion: 1\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 ref: ../schemas/mdbase.runtime.action-attempt/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.action-attempt\n version: 1.0.0\n fields:\n type: type\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" + "document": "---\nkind: mdbase.type\nname: runtime_action_attempt\nversion: 1\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 - 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 properties:\n type:\n const: runtime_action_attempt\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 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.action-attempt/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.action-attempt\n version: 1.0.0\n fields:\n type: type\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" }, { "source": "schemas/mdbase.runtime.checkpoint/1.0.0.schema.json", @@ -301,7 +349,7 @@ }, { "source": "types/mdbase-runtime/checkpoint.md", - "document": "---\nkind: mdbase.type\nname: runtime_checkpoint\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.checkpoint.\nmatch:\n where:\n type: runtime_checkpoint\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.checkpoint/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.checkpoint\n version: 1.0.0\n fields:\n type: type\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" + "document": "---\nkind: mdbase.type\nname: runtime_checkpoint\nversion: 1\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 - type\n - id\n - run_id\n - generation\n - status\n - state\n - updated_at\n properties:\n type:\n const: runtime_checkpoint\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 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.checkpoint/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.checkpoint\n version: 1.0.0\n fields:\n type: type\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" }, { "source": "schemas/mdbase.runtime.timer/1.0.0.schema.json", @@ -313,7 +361,7 @@ }, { "source": "types/mdbase-runtime/timer.md", - "document": "---\nkind: mdbase.type\nname: runtime_timer\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.timer.\nmatch:\n where:\n type: runtime_timer\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.timer/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.timer\n version: 1.0.0\n fields:\n type: type\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" + "document": "---\nkind: mdbase.type\nname: runtime_timer\nversion: 1\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 - type\n - id\n - generation\n - status\n - fire_at\n - event\n - created_at\n - updated_at\n properties:\n type:\n const: runtime_timer\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 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.timer/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.timer\n version: 1.0.0\n fields:\n type: type\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" }, { "source": "schemas/mdbase.runtime.diagnostic/1.0.0.schema.json", @@ -325,7 +373,7 @@ }, { "source": "types/mdbase-runtime/diagnostic.md", - "document": "---\nkind: mdbase.type\nname: runtime_diagnostic\nversion: 1\ndescription: Canonical Markdown implementation of mdbase.runtime.diagnostic.\nmatch:\n where:\n type: runtime_diagnostic\nschema:\n dialect: json-schema-2020-12\n ref: ../schemas/mdbase.runtime.diagnostic/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.diagnostic\n version: 1.0.0\n fields:\n type: type\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" + "document": "---\nkind: mdbase.type\nname: runtime_diagnostic\nversion: 1\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 - type\n - id\n - severity\n - code\n - message\n - created_at\n properties:\n type:\n const: runtime_diagnostic\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 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.diagnostic/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.diagnostic\n version: 1.0.0\n fields:\n type: type\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" }, { "source": "schemas/mdbase.runtime.dead-letter/1.0.0.schema.json", @@ -337,15 +385,47 @@ }, { "source": "types/mdbase-runtime/dead-letter.md", - "document": "---\nkind: mdbase.type\nname: runtime_dead_letter\nversion: 1\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 ref: ../schemas/mdbase.runtime.dead-letter/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.dead-letter\n version: 1.0.0\n fields:\n type: type\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" + "document": "---\nkind: mdbase.type\nname: runtime_dead_letter\nversion: 1\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 - type\n - id\n - reason\n - status\n - evidence\n - created_at\n properties:\n type:\n const: runtime_dead_letter\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 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.dead-letter/1.0.0.schema.json\nimplements:\n - contract: mdbase.runtime.dead-letter\n version: 1.0.0\n fields:\n type: type\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" + }, + { + "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 ],\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 },\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" + "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 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" + "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", @@ -362,43 +442,43 @@ ], "provides": [ { - "id": "mdbase.runtime.workflow", + "id": "mdbase.runtime.action-attempt", "version": "1.0.0" }, { - "id": "mdbase.runtime.policy", + "id": "mdbase.runtime.capability-grant", "version": "1.0.0" }, { - "id": "mdbase.runtime.provider-registration", + "id": "mdbase.runtime.checkpoint", "version": "1.0.0" }, { - "id": "mdbase.runtime.capability-grant", + "id": "mdbase.runtime.dead-letter", "version": "1.0.0" }, { - "id": "mdbase.runtime.run", + "id": "mdbase.runtime.diagnostic", "version": "1.0.0" }, { - "id": "mdbase.runtime.action-attempt", + "id": "mdbase.runtime.policy", "version": "1.0.0" }, { - "id": "mdbase.runtime.checkpoint", + "id": "mdbase.runtime.provider-registration", "version": "1.0.0" }, { - "id": "mdbase.runtime.timer", + "id": "mdbase.runtime.run", "version": "1.0.0" }, { - "id": "mdbase.runtime.diagnostic", + "id": "mdbase.runtime.timer", "version": "1.0.0" }, { - "id": "mdbase.runtime.dead-letter", + "id": "mdbase.runtime.workflow", "version": "1.0.0" } ] diff --git a/dist/schemas/mdbase.record.created/1.0.0.schema.json b/dist/schemas/mdbase.record.created/1.0.0.schema.json new file mode 100644 index 0000000..f2f1c4e --- /dev/null +++ b/dist/schemas/mdbase.record.created/1.0.0.schema.json @@ -0,0 +1,180 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-created event data", + "type": "object", + "required": [ + "path", + "after", + "changed_fields", + "revision", + "types" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "after": { + "type": "object" + }, + "changed_fields": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "revision": { + "type": "string", + "minLength": 1 + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.created/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.record.deleted/1.0.0.schema.json b/dist/schemas/mdbase.record.deleted/1.0.0.schema.json new file mode 100644 index 0000000..49a395f --- /dev/null +++ b/dist/schemas/mdbase.record.deleted/1.0.0.schema.json @@ -0,0 +1,172 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-deleted event data", + "type": "object", + "required": [ + "path", + "before", + "previous_revision", + "types" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "before": { + "type": "object" + }, + "previous_revision": { + "type": "string", + "minLength": 1 + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.deleted/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.record.modified/1.0.0.schema.json b/dist/schemas/mdbase.record.modified/1.0.0.schema.json new file mode 100644 index 0000000..57ad051 --- /dev/null +++ b/dist/schemas/mdbase.record.modified/1.0.0.schema.json @@ -0,0 +1,198 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-modified event data", + "type": "object", + "required": [ + "path", + "before", + "after", + "changed_fields", + "previous_revision", + "revision", + "previous_types", + "types" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "before": { + "type": "object" + }, + "after": { + "type": "object" + }, + "changed_fields": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "previous_revision": { + "type": "string", + "minLength": 1 + }, + "revision": { + "type": "string", + "minLength": 1 + }, + "previous_types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.modified/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.record.renamed/1.0.0.schema.json b/dist/schemas/mdbase.record.renamed/1.0.0.schema.json new file mode 100644 index 0000000..4c11fc8 --- /dev/null +++ b/dist/schemas/mdbase.record.renamed/1.0.0.schema.json @@ -0,0 +1,195 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-renamed event data", + "type": "object", + "required": [ + "from", + "to", + "before", + "after", + "previous_revision", + "revision", + "previous_types", + "types" + ], + "properties": { + "from": { + "type": "string", + "minLength": 1 + }, + "to": { + "type": "string", + "minLength": 1 + }, + "before": { + "type": "object" + }, + "after": { + "type": "object" + }, + "previous_revision": { + "type": "string", + "minLength": 1 + }, + "revision": { + "type": "string", + "minLength": 1 + }, + "previous_types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.renamed/1.0.0.schema.json" +} diff --git a/dist/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json b/dist/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json index e61ff1c..26296a9 100644 --- a/dist/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json +++ b/dist/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json @@ -5,7 +5,10 @@ "required": [ "timer_id", "generation", - "scheduled_for" + "scheduled_for", + "fired_at", + "late_by_ms", + "data" ], "properties": { "timer_id": { @@ -19,6 +22,17 @@ "scheduled_for": { "type": "string", "format": "date-time" + }, + "fired_at": { + "type": "string", + "format": "date-time" + }, + "late_by_ms": { + "type": "integer", + "minimum": 0 + }, + "data": { + "description": "Opaque application data supplied when the timer was scheduled." } }, "patternProperties": { diff --git a/packs/mdbase.runtime.standard/0.2.0.pack.yaml b/packs/mdbase.runtime.standard/0.2.0.pack.yaml index 2c16e19..ff29e8e 100644 --- a/packs/mdbase.runtime.standard/0.2.0.pack.yaml +++ b/packs/mdbase.runtime.standard/0.2.0.pack.yaml @@ -5,25 +5,25 @@ name: mdbase durable runtime standard library description: Runtime record implementations and inspectable built-in event/action contracts. featured: true provides: - - id: mdbase.runtime.workflow + - id: mdbase.runtime.action-attempt version: 1.0.0 - - id: mdbase.runtime.policy + - id: mdbase.runtime.capability-grant version: 1.0.0 - - id: mdbase.runtime.provider-registration + - id: mdbase.runtime.checkpoint version: 1.0.0 - - id: mdbase.runtime.capability-grant + - id: mdbase.runtime.dead-letter version: 1.0.0 - - id: mdbase.runtime.run + - id: mdbase.runtime.diagnostic version: 1.0.0 - - id: mdbase.runtime.action-attempt + - id: mdbase.runtime.policy version: 1.0.0 - - id: mdbase.runtime.checkpoint + - id: mdbase.runtime.provider-registration version: 1.0.0 - - id: mdbase.runtime.timer + - id: mdbase.runtime.run version: 1.0.0 - - id: mdbase.runtime.diagnostic + - id: mdbase.runtime.timer version: 1.0.0 - - id: mdbase.runtime.dead-letter + - id: mdbase.runtime.workflow version: 1.0.0 resources: - kind: schema @@ -116,6 +116,30 @@ resources: - kind: type source: types/mdbase-runtime/dead-letter.md target: _types/dead-letter.md + - kind: schema + source: schemas/mdbase.record.created/1.0.0.schema.json + target: schemas/mdbase.record.created/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.record.created/1.0.0.md + target: _contracts/mdbase.record.created/1.0.0.md + - kind: schema + source: schemas/mdbase.record.modified/1.0.0.schema.json + target: schemas/mdbase.record.modified/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.record.modified/1.0.0.md + target: _contracts/mdbase.record.modified/1.0.0.md + - kind: schema + source: schemas/mdbase.record.deleted/1.0.0.schema.json + target: schemas/mdbase.record.deleted/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.record.deleted/1.0.0.md + target: _contracts/mdbase.record.deleted/1.0.0.md + - kind: schema + source: schemas/mdbase.record.renamed/1.0.0.schema.json + target: schemas/mdbase.record.renamed/1.0.0.schema.json + - kind: contract + source: contracts/mdbase.record.renamed/1.0.0.md + target: _contracts/mdbase.record.renamed/1.0.0.md - kind: schema source: schemas/mdbase.runtime.timer.fired/1.0.0.schema.json target: schemas/mdbase.runtime.timer.fired/1.0.0.schema.json diff --git a/schemas/mdbase.record.created/1.0.0.schema.json b/schemas/mdbase.record.created/1.0.0.schema.json new file mode 100644 index 0000000..f2f1c4e --- /dev/null +++ b/schemas/mdbase.record.created/1.0.0.schema.json @@ -0,0 +1,180 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-created event data", + "type": "object", + "required": [ + "path", + "after", + "changed_fields", + "revision", + "types" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "after": { + "type": "object" + }, + "changed_fields": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "revision": { + "type": "string", + "minLength": 1 + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.created/1.0.0.schema.json" +} diff --git a/schemas/mdbase.record.deleted/1.0.0.schema.json b/schemas/mdbase.record.deleted/1.0.0.schema.json new file mode 100644 index 0000000..49a395f --- /dev/null +++ b/schemas/mdbase.record.deleted/1.0.0.schema.json @@ -0,0 +1,172 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-deleted event data", + "type": "object", + "required": [ + "path", + "before", + "previous_revision", + "types" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "before": { + "type": "object" + }, + "previous_revision": { + "type": "string", + "minLength": 1 + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.deleted/1.0.0.schema.json" +} diff --git a/schemas/mdbase.record.modified/1.0.0.schema.json b/schemas/mdbase.record.modified/1.0.0.schema.json new file mode 100644 index 0000000..57ad051 --- /dev/null +++ b/schemas/mdbase.record.modified/1.0.0.schema.json @@ -0,0 +1,198 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-modified event data", + "type": "object", + "required": [ + "path", + "before", + "after", + "changed_fields", + "previous_revision", + "revision", + "previous_types", + "types" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "before": { + "type": "object" + }, + "after": { + "type": "object" + }, + "changed_fields": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "previous_revision": { + "type": "string", + "minLength": 1 + }, + "revision": { + "type": "string", + "minLength": 1 + }, + "previous_types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.modified/1.0.0.schema.json" +} diff --git a/schemas/mdbase.record.renamed/1.0.0.schema.json b/schemas/mdbase.record.renamed/1.0.0.schema.json new file mode 100644 index 0000000..4c11fc8 --- /dev/null +++ b/schemas/mdbase.record.renamed/1.0.0.schema.json @@ -0,0 +1,195 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "mdbase record-renamed event data", + "type": "object", + "required": [ + "from", + "to", + "before", + "after", + "previous_revision", + "revision", + "previous_types", + "types" + ], + "properties": { + "from": { + "type": "string", + "minLength": 1 + }, + "to": { + "type": "string", + "minLength": 1 + }, + "before": { + "type": "object" + }, + "after": { + "type": "object" + }, + "previous_revision": { + "type": "string", + "minLength": 1 + }, + "revision": { + "type": "string", + "minLength": 1 + }, + "previous_types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + }, + "types": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z0-9._:-]*$" + } + } + }, + "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.record.renamed/1.0.0.schema.json" +} diff --git a/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json b/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json index e61ff1c..26296a9 100644 --- a/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json +++ b/schemas/mdbase.runtime.timer.fired/1.0.0.schema.json @@ -5,7 +5,10 @@ "required": [ "timer_id", "generation", - "scheduled_for" + "scheduled_for", + "fired_at", + "late_by_ms", + "data" ], "properties": { "timer_id": { @@ -19,6 +22,17 @@ "scheduled_for": { "type": "string", "format": "date-time" + }, + "fired_at": { + "type": "string", + "format": "date-time" + }, + "late_by_ms": { + "type": "integer", + "minimum": 0 + }, + "data": { + "description": "Opaque application data supplied when the timer was scheduled." } }, "patternProperties": { diff --git a/scripts/sync-runtime-pack.mjs b/scripts/sync-runtime-pack.mjs index 9136a7d..eccfdc9 100644 --- a/scripts/sync-runtime-pack.mjs +++ b/scripts/sync-runtime-pack.mjs @@ -27,6 +27,14 @@ if ( const runtimeContractIds = manifest.resources .filter(({ kind }) => kind === "contract") .map(({ source }) => source.split("/")[1]); +const runtimeRecordIds = []; +for (const resource of manifest.resources.filter(({ kind }) => kind === "contract")) { + 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); + } +} const runtimeSchemaIds = manifest.resources .filter(({ kind }) => kind === "schema") .map(({ source }) => source.split("/")[1]); @@ -45,7 +53,11 @@ for (const resource of manifest.resources) { const from = join(sourceRoot, resource.source); const to = join(root, source); await mkdir(dirname(to), { recursive: true }); - await cp(from, to); + if (resource.kind === "type") { + await writeFile(to, await editableTypeSnapshot(from), "utf8"); + } else { + await cp(from, to); + } resources.push({ kind: resource.kind, source, @@ -60,18 +72,12 @@ const definition = { name: manifest.name, description: manifest.description, featured: true, - provides: [ - "mdbase.runtime.workflow", - "mdbase.runtime.policy", - "mdbase.runtime.provider-registration", - "mdbase.runtime.capability-grant", - "mdbase.runtime.run", - "mdbase.runtime.action-attempt", - "mdbase.runtime.checkpoint", - "mdbase.runtime.timer", - "mdbase.runtime.diagnostic", - "mdbase.runtime.dead-letter" - ].map((id) => ({ id, version: "1.0.0" })), + // `provides` means the installed types implement these record contracts. + // Event/action artifacts remain available for admission, while live + // declarations say which sources/providers actually supply them. + provides: [...new Set(runtimeRecordIds)] + .sort() + .map((id) => ({ id, version: "1.0.0" })), resources }; const packPath = join(root, "packs/mdbase.runtime.standard/0.2.0.pack.yaml"); @@ -80,6 +86,31 @@ await writeFile(packPath, stringify(definition, { lineWidth: 0 }), "utf8"); console.log(`Synced ${resources.length} runtime resources from ${sourceRoot}.`); +async function editableTypeSnapshot(path) { + const document = await readFile(path, "utf8"); + const { frontmatter, body } = parseFrontmatter(document, path); + const reference = frontmatter?.schema?.ref; + if (typeof reference !== "string") { + throw new Error(`Runtime type ${path} has no schema.ref to materialize.`); + } + const value = JSON.parse( + await readFile(resolve(dirname(path), reference), "utf8") + ); + frontmatter.schema = { + dialect: frontmatter.schema.dialect, + value + }; + return `---\n${stringify(frontmatter, { lineWidth: 0 })}---\n${body}`; +} + +function parseFrontmatter(document, label) { + const match = /^---\r?\n([\s\S]*?)\r?\n---\r?\n([\s\S]*)$/u.exec(document); + if (!match) { + throw new Error(`Runtime resource ${label} has no YAML frontmatter.`); + } + return { frontmatter: parse(match[1]), body: match[2] }; +} + function catalogSource(resource) { if (resource.kind === "contract") { return resource.source.replace(/^_contracts\//u, "contracts/"); diff --git a/sources.json b/sources.json index 9793394..f9891cb 100644 --- a/sources.json +++ b/sources.json @@ -1,4 +1,8 @@ { + "runtime_standard_pack": { + "repository": "mdbase-dev/mdbase-spec", + "ref": "92f0032a086cc265d3415189cbf6245e369b13c4" + }, "typescript_implementation": { "repository": "callumalpass/mdbase", "ref": "83746e98825a02635ec10a2cad2ea28d5e4b0223" diff --git a/types/mdbase-runtime/action-attempt.md b/types/mdbase-runtime/action-attempt.md index 68812f3..edd8505 100644 --- a/types/mdbase-runtime/action-attempt.md +++ b/types/mdbase-runtime/action-attempt.md @@ -8,7 +8,183 @@ match: type: runtime_action_attempt schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.action-attempt/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime action attempt + type: object + required: + - type + - id + - run_id + - step_id + - request_id + - invocation_id + - attempt_id + - contract + - provider + - provider_declaration_digest + - status + - created_at + - updated_at + properties: + type: + const: runtime_action_attempt + 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 + 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.action-attempt/1.0.0.schema.json implements: - contract: mdbase.runtime.action-attempt version: 1.0.0 diff --git a/types/mdbase-runtime/capability-grant.md b/types/mdbase-runtime/capability-grant.md index 578b8b8..687225d 100644 --- a/types/mdbase-runtime/capability-grant.md +++ b/types/mdbase-runtime/capability-grant.md @@ -8,7 +8,150 @@ match: type: runtime_capability_grant schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.capability-grant/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase runtime capability grant + type: object + required: + - type + - id + - capability + - principal + - mode + - granted_at + properties: + type: + const: runtime_capability_grant + 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 + 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.capability-grant/1.0.0.schema.json implements: - contract: mdbase.runtime.capability-grant version: 1.0.0 diff --git a/types/mdbase-runtime/checkpoint.md b/types/mdbase-runtime/checkpoint.md index f022e64..fad5438 100644 --- a/types/mdbase-runtime/checkpoint.md +++ b/types/mdbase-runtime/checkpoint.md @@ -8,7 +8,145 @@ match: type: runtime_checkpoint schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.checkpoint/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime checkpoint + type: object + required: + - type + - id + - run_id + - generation + - status + - state + - updated_at + properties: + type: + const: runtime_checkpoint + 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 + 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.checkpoint/1.0.0.schema.json implements: - contract: mdbase.runtime.checkpoint version: 1.0.0 diff --git a/types/mdbase-runtime/dead-letter.md b/types/mdbase-runtime/dead-letter.md index 78bdda6..1db79a3 100644 --- a/types/mdbase-runtime/dead-letter.md +++ b/types/mdbase-runtime/dead-letter.md @@ -8,7 +8,146 @@ match: type: runtime_dead_letter schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.dead-letter/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime dead letter + type: object + required: + - type + - id + - reason + - status + - evidence + - created_at + properties: + type: + const: runtime_dead_letter + 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 + 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.dead-letter/1.0.0.schema.json implements: - contract: mdbase.runtime.dead-letter version: 1.0.0 diff --git a/types/mdbase-runtime/diagnostic.md b/types/mdbase-runtime/diagnostic.md index d5545ea..961b0be 100644 --- a/types/mdbase-runtime/diagnostic.md +++ b/types/mdbase-runtime/diagnostic.md @@ -8,7 +8,148 @@ match: type: runtime_diagnostic schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.diagnostic/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime diagnostic + type: object + required: + - type + - id + - severity + - code + - message + - created_at + properties: + type: + const: runtime_diagnostic + 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 + 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.diagnostic/1.0.0.schema.json implements: - contract: mdbase.runtime.diagnostic version: 1.0.0 diff --git a/types/mdbase-runtime/policy.md b/types/mdbase-runtime/policy.md index 2eb0490..636cc65 100644 --- a/types/mdbase-runtime/policy.md +++ b/types/mdbase-runtime/policy.md @@ -8,7 +8,196 @@ match: type: runtime_policy schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.policy/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime policy + type: object + required: + - type + - id + - version + - enabled + - grants + properties: + type: + const: runtime_policy + 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 + 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.0.0.schema.json implements: - contract: mdbase.runtime.policy version: 1.0.0 diff --git a/types/mdbase-runtime/provider-registration.md b/types/mdbase-runtime/provider-registration.md index 226ca51..d78cd28 100644 --- a/types/mdbase-runtime/provider-registration.md +++ b/types/mdbase-runtime/provider-registration.md @@ -8,7 +8,136 @@ match: type: runtime_provider_registration schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.provider-registration/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase runtime provider registration evidence + type: object + required: + - type + - id + - declaration_kind + - declaration + - verified_at + - active + properties: + type: + const: runtime_provider_registration + 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 + 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.provider-registration/1.0.0.schema.json implements: - contract: mdbase.runtime.provider-registration version: 1.0.0 diff --git a/types/mdbase-runtime/run.md b/types/mdbase-runtime/run.md index 3fdd476..3c98755 100644 --- a/types/mdbase-runtime/run.md +++ b/types/mdbase-runtime/run.md @@ -8,7 +8,268 @@ match: type: runtime_run schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.run/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime run + type: object + required: + - type + - id + - workflow_id + - workflow_version + - workflow_revision + - event_id + - event_contract + - admitted_plan + - status + - created_at + - updated_at + properties: + type: + const: runtime_run + 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" + 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 + 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.0.0.schema.json implements: - contract: mdbase.runtime.run version: 1.0.0 diff --git a/types/mdbase-runtime/timer.md b/types/mdbase-runtime/timer.md index 36d5664..8da12bb 100644 --- a/types/mdbase-runtime/timer.md +++ b/types/mdbase-runtime/timer.md @@ -8,7 +8,168 @@ match: type: runtime_timer schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.timer/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime timer + type: object + required: + - type + - id + - generation + - status + - fire_at + - event + - created_at + - updated_at + properties: + type: + const: runtime_timer + 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 + 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.timer/1.0.0.schema.json implements: - contract: mdbase.runtime.timer version: 1.0.0 diff --git a/types/mdbase-runtime/workflow.md b/types/mdbase-runtime/workflow.md index 68efe08..16787d0 100644 --- a/types/mdbase-runtime/workflow.md +++ b/types/mdbase-runtime/workflow.md @@ -8,7 +8,287 @@ match: type: runtime_workflow schema: dialect: json-schema-2020-12 - ref: ../schemas/mdbase.runtime.workflow/1.0.0.schema.json + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: mdbase durable runtime workflow + type: object + required: + - type + - id + - version + - name + - enabled + - triggers + - steps + properties: + type: + const: runtime_workflow + 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" + 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 + 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.0.0.schema.json implements: - contract: mdbase.runtime.workflow version: 1.0.0