Přeskočit obsah

Package Capability Invocation v1

Source schema: doc/schemas/package-capability-invocation.v1.schema.json

One append-only fact of the host invocation journal (P093 §9, R13). The started fact freezes the recovery context: recovery reads it, never the current overlay. Later facts name the same key (caller, invocation/id) and the new event.

Governing Basis

Project Lineage

Fields

Field Required Shape Description
schema yes const: package-capability-invocation.v1
schema/v yes const: 1
caller yes object
invocation/id yes ref: #/$defs/invocation-id
request/digest yes ref: #/$defs/digest
capability/id yes ref: #/$defs/capability-id
activation/generation yes integer
issued-at yes ref: #/$defs/timestamp
deadline yes ref: #/$defs/timestamp
protected-until yes ref: #/$defs/timestamp
recovery/context yes object
event yes enum: started, completed, aborted, compensated, unknown
result/status no enum: retained, unavailable
output/digest no ref: #/$defs/digest
cause no enum: no-outcome, output-contract-violation, pending-disposal
recorded-at yes ref: #/$defs/timestamp

Definitions

Definition Shape Description
capability-id string A package capability identifier (P093 §2); the host parses it with the one grammar.
digest string
invocation-id string
timestamp string
ref string

Conditional Rules

Rule 1

When:

{
  "properties": {
    "event": {
      "const": "completed"
    }
  },
  "required": [
    "event"
  ]
}

Then:

{
  "required": [
    "result/status"
  ],
  "allOf": [
    {
      "not": {
        "anyOf": [
          {
            "required": [
              "cause"
            ]
          }
        ]
      }
    }
  ]
}

Rule 2

When:

{
  "properties": {
    "event": {
      "const": "unknown"
    }
  },
  "required": [
    "event"
  ]
}

Then:

{
  "required": [
    "cause"
  ]
}

Field Semantics

schema

  • Required: yes
  • Shape: const: package-capability-invocation.v1

schema/v

  • Required: yes
  • Shape: const: 1

caller

  • Required: yes
  • Shape: object

invocation/id

  • Required: yes
  • Shape: ref: #/$defs/invocation-id

request/digest

  • Required: yes
  • Shape: ref: #/$defs/digest

capability/id

  • Required: yes
  • Shape: ref: #/$defs/capability-id

activation/generation

  • Required: yes
  • Shape: integer

issued-at

  • Required: yes
  • Shape: ref: #/$defs/timestamp

deadline

  • Required: yes
  • Shape: ref: #/$defs/timestamp

protected-until

  • Required: yes
  • Shape: ref: #/$defs/timestamp

recovery/context

  • Required: yes
  • Shape: object

event

  • Required: yes
  • Shape: enum: started, completed, aborted, compensated, unknown

result/status

  • Required: no
  • Shape: enum: retained, unavailable

output/digest

  • Required: no
  • Shape: ref: #/$defs/digest

cause

  • Required: no
  • Shape: enum: no-outcome, output-contract-violation, pending-disposal

recorded-at

  • Required: yes
  • Shape: ref: #/$defs/timestamp

Definition Semantics

$defs.capability-id

  • Shape: string

A package capability identifier (P093 §2); the host parses it with the one grammar.

$defs.digest

  • Shape: string

$defs.invocation-id

  • Shape: string

$defs.timestamp

  • Shape: string

$defs.ref

  • Shape: string