Browse operation contracts · Static machine index · OpenAPI release reference · Build manifest

Exact finite-scenario decision tradeoffs

Compare caller-defined alternatives using a complete loss matrix: all expected-loss, worst-loss and minimax-regret optima, scenario Pareto dominance and perfect-information value. Optional explicit positive relative probabilities; no inferred likelihoods or universal recommendation.

workflow-assurance · Operation ID: decision-scenarios-analyze

Choose this operation when

Outside this profile

Exact release references

Static JSON contract · Markdown reference · Fixed example response

Complete input schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "alternativeIds": {
      "minItems": 1,
      "maxItems": 24,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    "scenarioIds": {
      "minItems": 1,
      "maxItems": 24,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      }
    },
    "losses": {
      "minItems": 1,
      "maxItems": 24,
      "type": "array",
      "items": {
        "minItems": 1,
        "maxItems": 24,
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,6})?$"
        }
      }
    },
    "probabilityWeights": {
      "anyOf": [
        {
          "minItems": 1,
          "maxItems": 24,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,8}$"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "lossUnit": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    }
  },
  "required": [
    "alternativeIds",
    "scenarioIds",
    "losses",
    "probabilityWeights",
    "lossUnit"
  ],
  "additionalProperties": false
}

Complete output-envelope schema

{
  "type": "object",
  "required": [
    "operation",
    "version",
    "result",
    "provenance"
  ],
  "properties": {
    "operation": {
      "const": "decision-scenarios-analyze",
      "type": "string"
    },
    "version": {
      "const": "0.29.0",
      "type": "string"
    },
    "result": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "profile": {
          "type": "string",
          "const": "finite-scenario-loss-analysis-v1"
        },
        "externalRequests": {
          "type": "number",
          "const": 0
        },
        "execution": {
          "type": "boolean",
          "const": false
        },
        "assumptionsVerified": {
          "type": "boolean",
          "const": false
        },
        "lossUnit": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "scenarioIds": {
          "minItems": 1,
          "maxItems": 24,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "probabilityModel": {
          "type": "string",
          "enum": [
            "none-supplied",
            "normalized-positive-relative-weights"
          ]
        },
        "scenarios": {
          "minItems": 1,
          "maxItems": 24,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "scenarioId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "probability": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "numerator": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "denominator": {
                        "type": "string",
                        "pattern": "^[1-9][0-9]*$"
                      }
                    },
                    "required": [
                      "numerator",
                      "denominator"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "bestLoss": {
                "type": "object",
                "properties": {
                  "numerator": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "denominator": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]*$"
                  }
                },
                "required": [
                  "numerator",
                  "denominator"
                ],
                "additionalProperties": false
              },
              "bestAlternativeIds": {
                "minItems": 1,
                "maxItems": 24,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                }
              }
            },
            "required": [
              "scenarioId",
              "probability",
              "bestLoss",
              "bestAlternativeIds"
            ],
            "additionalProperties": false
          }
        },
        "alternatives": {
          "minItems": 1,
          "maxItems": 24,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "alternativeId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "expectedLoss": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "numerator": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]*)$"
                      },
                      "denominator": {
                        "type": "string",
                        "pattern": "^[1-9][0-9]*$"
                      }
                    },
                    "required": [
                      "numerator",
                      "denominator"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "worstLoss": {
                "type": "object",
                "properties": {
                  "numerator": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "denominator": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]*$"
                  }
                },
                "required": [
                  "numerator",
                  "denominator"
                ],
                "additionalProperties": false
              },
              "maximumRegret": {
                "type": "object",
                "properties": {
                  "numerator": {
                    "type": "string",
                    "pattern": "^(?:0|[1-9][0-9]*)$"
                  },
                  "denominator": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]*$"
                  }
                },
                "required": [
                  "numerator",
                  "denominator"
                ],
                "additionalProperties": false
              },
              "regrets": {
                "minItems": 1,
                "maxItems": 24,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "numerator": {
                      "type": "string",
                      "pattern": "^(?:0|[1-9][0-9]*)$"
                    },
                    "denominator": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    }
                  },
                  "required": [
                    "numerator",
                    "denominator"
                  ],
                  "additionalProperties": false
                }
              },
              "dominatedBy": {
                "maxItems": 23,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                }
              }
            },
            "required": [
              "alternativeId",
              "expectedLoss",
              "worstLoss",
              "maximumRegret",
              "regrets",
              "dominatedBy"
            ],
            "additionalProperties": false
          }
        },
        "criteria": {
          "type": "object",
          "properties": {
            "expectedLoss": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "minimum": {
                      "type": "object",
                      "properties": {
                        "numerator": {
                          "type": "string",
                          "pattern": "^(?:0|[1-9][0-9]*)$"
                        },
                        "denominator": {
                          "type": "string",
                          "pattern": "^[1-9][0-9]*$"
                        }
                      },
                      "required": [
                        "numerator",
                        "denominator"
                      ],
                      "additionalProperties": false
                    },
                    "alternativeIds": {
                      "minItems": 1,
                      "maxItems": 24,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      }
                    }
                  },
                  "required": [
                    "minimum",
                    "alternativeIds"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "worstLoss": {
              "type": "object",
              "properties": {
                "minimum": {
                  "type": "object",
                  "properties": {
                    "numerator": {
                      "type": "string",
                      "pattern": "^(?:0|[1-9][0-9]*)$"
                    },
                    "denominator": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    }
                  },
                  "required": [
                    "numerator",
                    "denominator"
                  ],
                  "additionalProperties": false
                },
                "alternativeIds": {
                  "minItems": 1,
                  "maxItems": 24,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  }
                }
              },
              "required": [
                "minimum",
                "alternativeIds"
              ],
              "additionalProperties": false
            },
            "maximumRegret": {
              "type": "object",
              "properties": {
                "minimum": {
                  "type": "object",
                  "properties": {
                    "numerator": {
                      "type": "string",
                      "pattern": "^(?:0|[1-9][0-9]*)$"
                    },
                    "denominator": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    }
                  },
                  "required": [
                    "numerator",
                    "denominator"
                  ],
                  "additionalProperties": false
                },
                "alternativeIds": {
                  "minItems": 1,
                  "maxItems": 24,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  }
                }
              },
              "required": [
                "minimum",
                "alternativeIds"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "expectedLoss",
            "worstLoss",
            "maximumRegret"
          ],
          "additionalProperties": false
        },
        "paretoAlternativeIds": {
          "minItems": 1,
          "maxItems": 24,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "perfectInformation": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "expectedBestScenarioLoss": {
                  "type": "object",
                  "properties": {
                    "numerator": {
                      "type": "string",
                      "pattern": "^(?:0|[1-9][0-9]*)$"
                    },
                    "denominator": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    }
                  },
                  "required": [
                    "numerator",
                    "denominator"
                  ],
                  "additionalProperties": false
                },
                "expectedValue": {
                  "type": "object",
                  "properties": {
                    "numerator": {
                      "type": "string",
                      "pattern": "^(?:0|[1-9][0-9]*)$"
                    },
                    "denominator": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$"
                    }
                  },
                  "required": [
                    "numerator",
                    "denominator"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "expectedBestScenarioLoss",
                "expectedValue"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "tiePolicy": {
          "type": "string",
          "const": "return-all-exact-ties-in-UTF-16-ID-order"
        }
      },
      "required": [
        "profile",
        "externalRequests",
        "execution",
        "assumptionsVerified",
        "lossUnit",
        "scenarioIds",
        "probabilityModel",
        "scenarios",
        "alternatives",
        "criteria",
        "paretoAlternativeIds",
        "perfectInformation",
        "tiePolicy"
      ],
      "additionalProperties": false
    },
    "provenance": {
      "type": "object",
      "required": [
        "inputSha256",
        "outputSha256",
        "deterministic",
        "externalRequests"
      ],
      "properties": {
        "inputSha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "outputSha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "deterministic": {
          "const": true
        },
        "externalRequests": {
          "const": 0
        }
      }
    }
  },
  "additionalProperties": false
}

Fixed example

One accepted fixed example, not a custom-input trial. No operation runs when this static page is requested.

Example input

{
  "alternativeIds": [
    "small-cache",
    "balanced-cache",
    "large-cache"
  ],
  "scenarioIds": [
    "light-load",
    "heavy-load"
  ],
  "losses": [
    [
      "2",
      "12"
    ],
    [
      "5",
      "6"
    ],
    [
      "9",
      "3"
    ]
  ],
  "probabilityWeights": [
    "3",
    "1"
  ],
  "lossUnit": "caller-defined operating loss units"
}

Example response

{
  "operation": "decision-scenarios-analyze",
  "version": "0.29.0",
  "result": {
    "profile": "finite-scenario-loss-analysis-v1",
    "externalRequests": 0,
    "execution": false,
    "assumptionsVerified": false,
    "lossUnit": "caller-defined operating loss units",
    "scenarioIds": [
      "heavy-load",
      "light-load"
    ],
    "probabilityModel": "normalized-positive-relative-weights",
    "scenarios": [
      {
        "scenarioId": "heavy-load",
        "probability": {
          "numerator": "1",
          "denominator": "4"
        },
        "bestLoss": {
          "numerator": "3",
          "denominator": "1"
        },
        "bestAlternativeIds": [
          "large-cache"
        ]
      },
      {
        "scenarioId": "light-load",
        "probability": {
          "numerator": "3",
          "denominator": "4"
        },
        "bestLoss": {
          "numerator": "2",
          "denominator": "1"
        },
        "bestAlternativeIds": [
          "small-cache"
        ]
      }
    ],
    "alternatives": [
      {
        "alternativeId": "balanced-cache",
        "expectedLoss": {
          "numerator": "21",
          "denominator": "4"
        },
        "worstLoss": {
          "numerator": "6",
          "denominator": "1"
        },
        "maximumRegret": {
          "numerator": "3",
          "denominator": "1"
        },
        "regrets": [
          {
            "numerator": "3",
            "denominator": "1"
          },
          {
            "numerator": "3",
            "denominator": "1"
          }
        ],
        "dominatedBy": []
      },
      {
        "alternativeId": "large-cache",
        "expectedLoss": {
          "numerator": "15",
          "denominator": "2"
        },
        "worstLoss": {
          "numerator": "9",
          "denominator": "1"
        },
        "maximumRegret": {
          "numerator": "7",
          "denominator": "1"
        },
        "regrets": [
          {
            "numerator": "0",
            "denominator": "1"
          },
          {
            "numerator": "7",
            "denominator": "1"
          }
        ],
        "dominatedBy": []
      },
      {
        "alternativeId": "small-cache",
        "expectedLoss": {
          "numerator": "9",
          "denominator": "2"
        },
        "worstLoss": {
          "numerator": "12",
          "denominator": "1"
        },
        "maximumRegret": {
          "numerator": "9",
          "denominator": "1"
        },
        "regrets": [
          {
            "numerator": "9",
            "denominator": "1"
          },
          {
            "numerator": "0",
            "denominator": "1"
          }
        ],
        "dominatedBy": []
      }
    ],
    "criteria": {
      "expectedLoss": {
        "minimum": {
          "numerator": "9",
          "denominator": "2"
        },
        "alternativeIds": [
          "small-cache"
        ]
      },
      "worstLoss": {
        "minimum": {
          "numerator": "6",
          "denominator": "1"
        },
        "alternativeIds": [
          "balanced-cache"
        ]
      },
      "maximumRegret": {
        "minimum": {
          "numerator": "3",
          "denominator": "1"
        },
        "alternativeIds": [
          "balanced-cache"
        ]
      }
    },
    "paretoAlternativeIds": [
      "balanced-cache",
      "large-cache",
      "small-cache"
    ],
    "perfectInformation": {
      "expectedBestScenarioLoss": {
        "numerator": "9",
        "denominator": "4"
      },
      "expectedValue": {
        "numerator": "9",
        "denominator": "4"
      }
    },
    "tiePolicy": "return-all-exact-ties-in-UTF-16-ID-order"
  },
  "provenance": {
    "inputSha256": "6503438bf50595b06913f93b1bcf8848af7f8a5603bdaba4569da2df1f5e00e1",
    "outputSha256": "7da7e3fd918490552b1a161ace8b7bc4f28243452db8962ae66114ab202853cb",
    "deterministic": true,
    "externalRequests": 0
  }
}

Bounds and precision

JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.

{
  "global": {
    "requestBytes": 131072,
    "responseBytes": 524288,
    "jsonDepth": 32,
    "jsonNodes": 20000,
    "requestsPerMinute": 60,
    "paidAttemptsPerMinute": 20,
    "idempotencyHours": 24
  },
  "operation": {
    "inputBytes": 48000,
    "outputBytes": 192000,
    "jsonNodes": 8000,
    "depth": 12,
    "alternatives": 24,
    "scenarios": 24,
    "matrixCells": 576,
    "maximumDominanceCellComparisons": 27648,
    "decimalIntegerDigits": 12,
    "decimalFractionDigits": 6,
    "probabilityWeightDigits": 9
  }
}

Complete schemas, descriptions and cross-field validation may impose additional limits.

Proposed price and protocol definitions

{
  "unit": "one successful operation call",
  "proposedNominalUsd": "0.006",
  "sixDecimalTokenBaseUnits": "6000",
  "subscription": false,
  "includesPayerWalletOrNetworkFees": false,
  "liveQuoteVerified": false,
  "condition": "Actual SDK challenge is authoritative only within the caller's explicit authorization; configured six-decimal token peg is an operator assertion, not a conversion guarantee."
}

Protocol definitions: x402, mpp. MPP uses Tempo charge. Paid MCP execution is unsupported. All runtime readiness is not evaluated in this build.

API path templates, not endpoints on this documentation host

{
  "x402": "/v1/x402/decision-scenarios-analyze",
  "mpp": "/v1/mpp/decision-scenarios-analyze"
}

Required headers

{
  "Content-Type": "application/json",
  "Idempotency-Key": "random 16–128 character operation identifier"
}

Actual SDK challenge amount, asset, network, recipient and wallet costs must pass independent authorization. Preserve identical key, body, protocol and credential on retries; on PAYMENT_UNCERTAIN stop and reconcile.

Execution profile and provider conditions

{
  "deterministic": true,
  "externalRequests": 0,
  "maxExternalRequests": 0,
  "resultSnapshotPersisted": false,
  "fixedExampleIsIllustrativeSnapshot": false,
  "requiresPayment": true,
  "supportsMcpExecution": false
}

Deterministic supplied-input operation with no external requests or stored request/result bodies. Payment infrastructure retains payment metadata and hashes.

Failure handling

Declared requirements

Before any paid call, refresh the live operation contract and POST the complete bounded budgeted plan to the separate API's /preflight. Unknown requirements block selection; compatible preflight is not permission to spend.

Related contracts