{
  "openapi": "3.0.1",
  "info": {
    "title": "EffectProof Guard — Retry, Check or Stop",
    "description": "Prevent duplicate agent actions after timeouts with evidence-bound RETRY, CHECK or STOP decisions.",
    "version": "1.0",
    "x-build-id": "jUtgVrfdfgsBQojU3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/travelmonitorlab~effectproof-guard/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-travelmonitorlab-effectproof-guard",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/travelmonitorlab~effectproof-guard/runs": {
      "post": {
        "operationId": "runs-sync-travelmonitorlab-effectproof-guard",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/travelmonitorlab~effectproof-guard/run-sync": {
      "post": {
        "operationId": "run-sync-travelmonitorlab-effectproof-guard",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "tool",
          "result"
        ],
        "properties": {
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Compute the same decision without charging the recovery-decision event. Enabled in the prefilled QA example.",
            "default": false
          },
          "tool": {
            "title": "Tool",
            "required": [
              "name"
            ],
            "type": "object",
            "description": "The invoked tool and the scoped evidence about its recovery capabilities. Declarations alone never authorize a retry.",
            "properties": {
              "name": {
                "title": "Tool name",
                "description": "Name of the tool or API operation whose result is ambiguous.",
                "type": "string",
                "editor": "textfield",
                "prefill": "charge-card"
              },
              "capabilities": {
                "title": "Verified capabilities",
                "description": "Optional recovery evidence. A verified capability must include the exact test or production scope in which it was established.",
                "type": "object",
                "editor": "json",
                "properties": {
                  "readOnly": {
                    "title": "Read-only proof",
                    "description": "Proof that replay is read-only within a named scope.",
                    "type": "object",
                    "editor": "json",
                    "properties": {
                      "status": {
                        "title": "Proof status",
                        "description": "Only verified with a non-empty scope can authorize a retry.",
                        "type": "string",
                        "editor": "select",
                        "enum": [
                          "unknown",
                          "declared",
                          "observed",
                          "verified",
                          "contradicted"
                        ],
                        "default": "unknown"
                      },
                      "scope": {
                        "title": "Proof scope",
                        "description": "Named environment and implementation version covered by the proof.",
                        "type": "string",
                        "editor": "textfield"
                      }
                    }
                  },
                  "sameKeyDeduplication": {
                    "title": "Same-key deduplication proof",
                    "description": "Proof that replaying the identical payload with the original operation key is deduplicated in the named scope.",
                    "type": "object",
                    "editor": "json",
                    "properties": {
                      "status": {
                        "title": "Proof status",
                        "description": "Only verified with a non-empty scope can authorize a retry.",
                        "type": "string",
                        "editor": "select",
                        "enum": [
                          "unknown",
                          "declared",
                          "observed",
                          "verified",
                          "contradicted"
                        ],
                        "default": "unknown"
                      },
                      "scope": {
                        "title": "Proof scope",
                        "description": "Named environment and implementation version covered by the proof.",
                        "type": "string",
                        "editor": "textfield"
                      }
                    }
                  },
                  "outcomeQuery": {
                    "title": "Outcome query proof",
                    "description": "Proof that a trusted status path can reconcile the original operation in the named scope.",
                    "type": "object",
                    "editor": "json",
                    "properties": {
                      "status": {
                        "title": "Proof status",
                        "description": "Only verified with a non-empty scope enables reconciliation.",
                        "type": "string",
                        "editor": "select",
                        "enum": [
                          "unknown",
                          "declared",
                          "observed",
                          "verified",
                          "contradicted"
                        ],
                        "default": "unknown"
                      },
                      "scope": {
                        "title": "Proof scope",
                        "description": "Named environment and implementation version covered by the proof.",
                        "type": "string",
                        "editor": "textfield"
                      }
                    }
                  }
                },
                "prefill": {
                  "outcomeQuery": {
                    "status": "verified",
                    "scope": "payment-sandbox-v1"
                  },
                  "sameKeyDeduplication": {
                    "status": "declared"
                  }
                }
              }
            }
          },
          "result": {
            "title": "Observed result",
            "required": [
              "outcome",
              "dispatched"
            ],
            "type": "object",
            "description": "What the caller actually observed. A timeout after dispatch is not proof of failure.",
            "properties": {
              "outcome": {
                "title": "Observed outcome",
                "description": "Transport or acknowledgment outcome for this attempt.",
                "type": "string",
                "editor": "select",
                "enum": [
                  "timeout",
                  "connection_lost",
                  "not_dispatched",
                  "succeeded",
                  "rejected"
                ],
                "prefill": "timeout"
              },
              "dispatched": {
                "title": "Request dispatched",
                "description": "Whether transport evidence establishes that the request was dispatched. Unknown-after-dispatch cases must use true.",
                "type": "boolean",
                "editor": "checkbox",
                "prefill": true
              },
              "operationKey": {
                "title": "Original operation key",
                "description": "The exact idempotency or operation key used by the original attempt, if one exists. Never invent a new key for a blind retry.",
                "type": "string",
                "editor": "textfield",
                "prefill": "order-42"
              },
              "observedStatus": {
                "title": "Status query observation",
                "description": "Latest observation from the original operation's status path, if already queried.",
                "type": "string",
                "editor": "select",
                "enum": [
                  "unknown",
                  "completed",
                  "failed",
                  "not_found"
                ],
                "default": "unknown",
                "prefill": "unknown"
              },
              "lateCommitPossible": {
                "title": "Late commit possible",
                "description": "Whether the operation can still commit after a not_found observation. When true, not_found never proves absence.",
                "type": "boolean",
                "editor": "checkbox",
                "default": true,
                "prefill": true
              }
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}