{
  "id": "workflow-resource-plan",
  "name": "Renewable Resource Workflow Planner",
  "description": "Build a deterministic capacity-feasible candidate task schedule with dependencies, release times and renewable resource demands; no optimality or live availability guarantee.",
  "category": "workflow-assurance",
  "priceUsd": "0.01",
  "pricingStatus": "proposed-unverified",
  "pricing": {
    "unit": "one successful operation call",
    "proposedNominalUsd": "0.01",
    "sixDecimalTokenBaseUnits": "10000",
    "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."
  },
  "intents": [
    "Schedule dependent tasks against supplied concurrent worker or renewable resource capacities",
    "Return earliest-insertion candidate start and end times when unlimited-worker DAG timing is insufficient"
  ],
  "whenToUse": [
    "Schedule dependent tasks against supplied concurrent worker or renewable resource capacities",
    "Return earliest-insertion candidate start and end times when unlimited-worker DAG timing is insufficient"
  ],
  "whenNotToUse": [
    "Optimal makespan, execution, resource reservations, observed worker availability or runtime prediction",
    "Token-bucket dispatch quotas or retry timing",
    "Proof that no schedule can fit a caller horizon"
  ],
  "capabilities": [
    "Nonpreemptive serial schedule generation; ready-task order is priority descending then exact UTF-16 ID ascending",
    "Earliest feasible integer insertion; half-open execution intervals; prior placements never move",
    "Complete resource-usage evidence and complete candidate even when the reporting horizon is exceeded",
    "All input durations, capacities and availability are assumptions; no external requests or execution"
  ],
  "limits": {
    "inputBytes": 100000,
    "outputBytes": 400000,
    "jsonNodes": 12000,
    "depth": 20,
    "tasks": 64,
    "resources": 8,
    "dependencyEdges": 256,
    "resourceUnits": 1000000000,
    "duration": 1000000000,
    "release": 1000000000000,
    "scheduleTime": 1064000000000,
    "usageSegments": 128,
    "buckets": 8,
    "jobs": 200,
    "tokenUnits": 1000000000,
    "refillPeriodMs": 1000000000,
    "horizonMs": 1000000000000
  },
  "related": [
    "workflow-dag-analyze",
    "quota-dispatch-plan"
  ],
  "errorCodes": [
    "INPUT_LIMIT",
    "OUTPUT_LIMIT",
    "COMPLEXITY_LIMIT",
    "INVALID_NUMBER",
    "INVALID_UNICODE",
    "UNSAFE_KEY",
    "DUPLICATE_ID",
    "EDGE_LIMIT",
    "DUPLICATE_DEPENDENCY",
    "MISSING_DEPENDENCY",
    "UNKNOWN_RESOURCE",
    "DEMAND_EXCEEDS_CAPACITY",
    "DEPENDENCY_CYCLE",
    "TIME_LIMIT",
    "INTERNAL_PLANNING_ERROR"
  ],
  "requirementsProfile": {
    "format": "declared-requirements-v1",
    "facts": {
      "execution.suppliedCode": false,
      "execution.remoteMutation": false,
      "execution.llmInference": false,
      "execution.paidMcp": false,
      "verification.semanticTruth": false,
      "verification.sourceAuthenticity": false,
      "verification.liveVulnerabilities": false,
      "numbers.arbitraryPrecisionJson": false,
      "numbers.model": "ieee754-binary64",
      "privacy.requestBodyPersisted": false,
      "execution.deterministic": true,
      "execution.networkAccess": false,
      "privacy.resultBodyPersisted": false,
      "payment.x402": true,
      "payment.mpp": true,
      "operation.id": "workflow-resource-plan",
      "operation.category": "workflow-assurance",
      "limit.httpRequestBytes": 131072,
      "limit.requestBytes": 100000,
      "limit.responseBytes": 524288,
      "limit.resultBytes": 400000,
      "limit.jsonDepth": 20,
      "limit.jsonNodes": 12000,
      "resourcePlan.algorithm": "priority-id-serial-earliest-insertion",
      "resourcePlan.maxTasks": 64,
      "resourcePlan.maxResources": 8,
      "resourcePlan.maxDependencyEdges": 256,
      "resourcePlan.maxResourceUnits": 1000000000,
      "resourcePlan.maxDuration": 1000000000,
      "resourcePlan.maxRelease": 1000000000000,
      "resourcePlan.maxScheduleTime": 1064000000000,
      "resourcePlan.maxUsageSegments": 128,
      "resourcePlan.intervalConvention": "half-open",
      "resourcePlan.preemptive": false,
      "resourcePlan.optimalityGuaranteed": false,
      "resourcePlan.horizonFailureProvesInfeasibility": false,
      "resourcePlan.horizonExceededReturnsCompleteCandidate": true,
      "resourcePlan.reservesResources": false,
      "resourcePlan.liveAvailabilityVerified": false,
      "input.tasks.maxItems": 64,
      "input.horizon.maximum": 1064000000000,
      "input.horizon.minimum": 0
    },
    "unknownPolicy": "Undeclared requirements are unknown, never compatible. Matching declared facts does not establish semantic fit or input validity.",
    "preflight": "/preflight"
  },
  "documentation": "/reference/tools/workflow-resource-plan.md",
  "serviceContract": "/reference/services/workflow-resource-plan.json",
  "errors": [
    {
      "status": 400,
      "meaning": "Malformed JSON, missing/invalid idempotency key, or payment identifier mismatch",
      "retry": "Correct the request before payment"
    },
    {
      "status": 402,
      "meaning": "Payment challenge or rejected payment",
      "retry": "Use official protocol SDK; inspect payment outcome before another payment"
    },
    {
      "status": 409,
      "meaning": "Idempotency conflict, duplicate proof, or PAYMENT_UNCERTAIN",
      "retry": "Keep original key, body, and proof; reconcile uncertainty with operator; never blindly repay"
    },
    {
      "status": 413,
      "meaning": "Input or generated output too large",
      "retry": "Reduce input; no payment attempted for validation failure"
    },
    {
      "status": 415,
      "meaning": "Unsupported media type or compression",
      "retry": "Send uncompressed application/json"
    },
    {
      "status": 422,
      "meaning": "Schema or service-specific semantic validation failure",
      "retry": "Correct input using returned error code; no payment attempted"
    },
    {
      "status": 429,
      "meaning": "Request/payment-attempt rate exceeded",
      "retry": "Wait for rate limit window; preserve existing payment identity"
    },
    {
      "status": 503,
      "meaning": "Payment configuration/provider/state unavailable, or live DNS preparation failed before settlement",
      "retry": "Check readiness; DNS preparation failures may retry the identical key/body/credential only; uncertainty requires reconciliation"
    }
  ],
  "numericPrecision": "JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.",
  "paymentWorkflow": {
    "discoveryOnly": false,
    "supportedProtocols": [
      "x402",
      "mpp"
    ],
    "x402": {
      "credentialHeader": "PAYMENT-SIGNATURE",
      "challengeHeader": "PAYMENT-REQUIRED",
      "receiptHeader": "PAYMENT-RESPONSE",
      "version": 2,
      "scheme": "exact",
      "paymentIdentifier": "payment-identifier extension MUST equal the HTTP Idempotency-Key",
      "sdk": "@x402/core with @x402/evm"
    },
    "mpp": {
      "supported": true,
      "credentialHeader": "Authorization",
      "challengeHeader": "WWW-Authenticate",
      "receiptHeader": "Payment-Receipt",
      "method": "tempo",
      "intent": "charge",
      "sdk": "mppx",
      "tokenDecimals": 6
    },
    "steps": [
      "Check configured readiness and the exact service schema",
      "Generate a fresh random Idempotency-Key for this operation; never use a discovery probe fixture for purchases",
      "Send valid input without a credential to obtain the official protocol challenge",
      "Use the official SDK and authorized wallet to fulfill the challenge",
      "Retry only with identical key, body, protocol and credential",
      "On PAYMENT_UNCERTAIN stop and request operator reconciliation; never blindly pay again"
    ],
    "versionedRetries": "Request fingerprint includes service release version. Retries across a version upgrade can conflict; coordinate upgrades outside the 24-hour replay window and reconcile pending attempts.",
    "docs": "/llms.txt"
  },
  "method": "POST",
  "paths": {
    "x402": "/v1/x402/workflow-resource-plan",
    "mpp": "/v1/mpp/workflow-resource-plan"
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "resources": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "additionalProperties": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000000000
        }
      },
      "tasks": {
        "maxItems": 64,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "duration": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000000
            },
            "release": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000000000
            },
            "priority": {
              "default": 0,
              "type": "integer",
              "minimum": -1000000000,
              "maximum": 1000000000
            },
            "requires": {
              "default": {},
              "type": "object",
              "propertyNames": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "additionalProperties": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000
              }
            },
            "dependsOn": {
              "default": [],
              "maxItems": 64,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              }
            }
          },
          "required": [
            "id",
            "duration"
          ],
          "additionalProperties": false
        }
      },
      "horizon": {
        "type": "integer",
        "minimum": 0,
        "maximum": 1064000000000
      }
    },
    "required": [
      "resources",
      "tasks"
    ],
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "operation",
      "version",
      "result",
      "provenance"
    ],
    "properties": {
      "operation": {
        "const": "workflow-resource-plan",
        "type": "string"
      },
      "version": {
        "const": "0.29.0",
        "type": "string"
      },
      "result": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "advisoryOnly": {
            "type": "boolean",
            "const": true
          },
          "externalRequests": {
            "type": "number",
            "const": 0
          },
          "execution": {
            "type": "boolean",
            "const": false
          },
          "availabilityVerified": {
            "type": "boolean",
            "const": false
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "horizon-exceeded"
            ]
          },
          "tasks": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "start": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1064000000000
                },
                "end": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1064000000000
                }
              },
              "required": [
                "id",
                "start",
                "end"
              ],
              "additionalProperties": false
            }
          },
          "selectionOrder": {
            "maxItems": 64,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "makespan": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1064000000000
          },
          "horizon": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1064000000000
              },
              {
                "type": "null"
              }
            ]
          },
          "withinHorizon": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "optimalityGuaranteed": {
            "type": "boolean",
            "const": false
          },
          "resourceUsage": {
            "maxItems": 128,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1064000000000
                },
                "end": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1064000000000
                },
                "usage": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "additionalProperties": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  }
                }
              },
              "required": [
                "start",
                "end",
                "usage"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "advisoryOnly",
          "externalRequests",
          "execution",
          "availabilityVerified",
          "status",
          "tasks",
          "selectionOrder",
          "makespan",
          "horizon",
          "withinHorizon",
          "optimalityGuaranteed",
          "resourceUsage"
        ],
        "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
  },
  "exampleInput": {
    "resources": {
      "cpu": 2,
      "browser": 1
    },
    "tasks": [
      {
        "id": "a",
        "duration": 5,
        "requires": {
          "cpu": 1,
          "browser": 1
        },
        "dependsOn": []
      },
      {
        "id": "b",
        "duration": 3,
        "requires": {
          "cpu": 1,
          "browser": 1
        },
        "dependsOn": []
      },
      {
        "id": "c",
        "duration": 4,
        "requires": {
          "cpu": 2
        },
        "dependsOn": [
          "a"
        ]
      }
    ]
  },
  "exampleResponse": {
    "operation": "workflow-resource-plan",
    "version": "0.29.0",
    "result": {
      "advisoryOnly": true,
      "externalRequests": 0,
      "execution": false,
      "availabilityVerified": false,
      "status": "scheduled",
      "tasks": [
        {
          "id": "a",
          "start": 0,
          "end": 5
        },
        {
          "id": "b",
          "start": 5,
          "end": 8
        },
        {
          "id": "c",
          "start": 8,
          "end": 12
        }
      ],
      "selectionOrder": [
        "a",
        "b",
        "c"
      ],
      "makespan": 12,
      "horizon": null,
      "withinHorizon": null,
      "optimalityGuaranteed": false,
      "resourceUsage": [
        {
          "start": 0,
          "end": 8,
          "usage": {
            "browser": 1,
            "cpu": 1
          }
        },
        {
          "start": 8,
          "end": 12,
          "usage": {
            "browser": 0,
            "cpu": 2
          }
        }
      ]
    },
    "provenance": {
      "inputSha256": "d1150812127c26832befbe825634dd56b8e2ccfb0db8042878f7c054d8dd2361",
      "outputSha256": "29c03bb47adc67b5c6c79c353333f2d3a6cbc8fed59059f5721ecc702014135c",
      "deterministic": true,
      "externalRequests": 0
    }
  },
  "requiredHeaders": {
    "Content-Type": "application/json",
    "Idempotency-Key": "random 16–128 character operation identifier"
  },
  "fixedExample": "/reference/examples/workflow-resource-plan.json",
  "execution": {
    "deterministic": true,
    "externalRequests": 0,
    "maxExternalRequests": 0,
    "resultSnapshotPersisted": false,
    "fixedExampleIsIllustrativeSnapshot": false,
    "requiresPayment": true,
    "supportsMcpExecution": false
  },
  "releaseSnapshot": {
    "format": "static-release-reference-v1",
    "sourceVersion": "0.29.0",
    "sourceRegistrySha256": "a2b5ec09bf6c38b9d2879d746a4fded374f5928b445377b0270ef6aa8e6cac65",
    "generatedAt": "2026-10-06T15:38:00Z",
    "releaseAcceptance": "not-verified-by-generator",
    "runtimeReadiness": "not-evaluated",
    "livePaymentsVerified": false,
    "indexingVerified": false,
    "apiOrigin": null,
    "notice": "Build-time release reference. Runtime readiness, deployment, payment settlement and external indexing are not evaluated here. Prices are proposed; this file cannot authorize execution or payment."
  }
}
