{
  "id": "recurrence-dates-expand",
  "name": "Bounded Date Recurrence Expansion",
  "description": "Expand a strict date-only daily, weekly or monthly rule into a complete bounded window, with COUNT/UNTIL, explicit inclusion/exclusion dates and normalized supported RRULE text; no timezone or account access.",
  "category": "structured",
  "priceUsd": "0.005",
  "pricingStatus": "proposed-unverified",
  "pricing": {
    "unit": "one successful operation call",
    "proposedNominalUsd": "0.005",
    "sixDecimalTokenBaseUnits": "5000",
    "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": [
    "Expand supplied date-only recurrence rules into explicit occurrence dates",
    "Generate complete daily, weekly or monthly dates inside a bounded window with exclusions"
  ],
  "whenToUse": [
    "Expand supplied date-only recurrence rules into explicit occurrence dates",
    "Generate complete daily, weekly or monthly dates inside a bounded window with exclusions"
  ],
  "whenNotToUse": [
    "General RRULE/ICS parsing, time zones, local times, DST, business calendars or finding free appointment slots",
    "Unbounded history, unsupported recurrence selectors, holiday guessing or scheduling account changes",
    "Uploading artifacts, executing database statements, sending invitations, accessing calendars or changing remote state"
  ],
  "capabilities": [
    "Declared profile: rfc5545-date-recurrence-subset-v1",
    "1900–2199 Gregorian dates; DAILY/WEEKLY/MONTHLY, explicit interval and exactly one COUNT or inclusive UNTIL",
    "Weekly selectors use explicit weekStart; monthly invalid dates skip rather than roll; DTSTART must match selectors",
    "COUNT counts valid rule instances before exclusions/window filtering; explicit inclusions union before exclusions",
    "Separate windowComplete and ruleFullyExpanded facts; capped expansion fails atomically instead of returning a truncated prefix",
    "Deterministic supplied-input-only artifact; no network, filesystem, database, shell, clock or randomness"
  ],
  "limits": {
    "inputBytes": 100000,
    "outputBytes": 400000,
    "jsonNodes": 12000,
    "depth": 20,
    "originToWindowDays": 3660,
    "visitedDates": 3661,
    "ruleCandidates": 3661,
    "count": 512,
    "outputDates": 512,
    "rdates": 256,
    "exdates": 256,
    "interval": 120,
    "years": "1900–2199",
    "profile": "rfc5545-date-recurrence-subset-v1"
  },
  "related": [
    "icalendar-compose",
    "business-calendar-shift",
    "timezone-convert"
  ],
  "errorCodes": [
    "INPUT_LIMIT",
    "OUTPUT_LIMIT",
    "COMPLEXITY_LIMIT",
    "INVALID_JSON",
    "INVALID_NUMBER",
    "INVALID_UNICODE",
    "UNSAFE_KEY",
    "INVALID_DATE",
    "INVALID_WINDOW",
    "UNSUPPORTED_RULE",
    "UNSYNCHRONIZED_START",
    "RECURRENCE_LIMIT"
  ],
  "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": "recurrence-dates-expand",
      "operation.category": "structured",
      "limit.httpRequestBytes": 131072,
      "limit.requestBytes": 100000,
      "limit.responseBytes": 524288,
      "limit.resultBytes": 400000,
      "limit.jsonDepth": 20,
      "limit.jsonNodes": 12000,
      "recurrence.profile": "rfc5545-date-recurrence-subset-v1",
      "recurrence.dateYears": "1900-2199",
      "recurrence.maxOriginToWindowDays": 3660,
      "recurrence.maxVisitedDates": 3661,
      "recurrence.maxOutputDates": 512,
      "recurrence.maxExplicitDatesPerList": 256,
      "recurrence.maxInterval": 120,
      "recurrence.windowConvention": "half-open",
      "recurrence.countBeforeExclusions": true,
      "recurrence.invalidMonthDates": "skip-without-consuming-count",
      "recurrence.windowCompletenessDistinctFromRuleExhaustion": true,
      "recurrence.fullRrule": false,
      "recurrence.timezoneAware": false,
      "recurrence.accountAccess": false,
      "recurrence.schedulesEvents": false,
      "input.dtstart.maxLength": 10,
      "input.rdates.maxItems": 256,
      "input.exdates.maxItems": 256
    },
    "unknownPolicy": "Undeclared requirements are unknown, never compatible. Matching declared facts does not establish semantic fit or input validity.",
    "preflight": "/preflight"
  },
  "documentation": "/reference/tools/recurrence-dates-expand.md",
  "serviceContract": "/reference/services/recurrence-dates-expand.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/recurrence-dates-expand",
    "mpp": "/v1/mpp/recurrence-dates-expand"
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "description": "Declared profile: rfc5545-date-recurrence-subset-v1",
    "type": "object",
    "properties": {
      "dtstart": {
        "type": "string",
        "maxLength": 10
      },
      "window": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "maxLength": 10
          },
          "endExclusive": {
            "type": "string",
            "maxLength": 10
          }
        },
        "required": [
          "start",
          "endExclusive"
        ],
        "additionalProperties": false
      },
      "rule": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "frequency": {
                "type": "string",
                "const": "DAILY"
              },
              "interval": {
                "type": "integer",
                "minimum": 1,
                "maximum": 120
              },
              "count": {
                "type": "integer",
                "minimum": 1,
                "maximum": 512
              }
            },
            "required": [
              "frequency",
              "interval",
              "count"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "frequency": {
                "type": "string",
                "const": "DAILY"
              },
              "interval": {
                "type": "integer",
                "minimum": 1,
                "maximum": 120
              },
              "until": {
                "type": "string",
                "maxLength": 10
              }
            },
            "required": [
              "frequency",
              "interval",
              "until"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "frequency": {
                "type": "string",
                "const": "WEEKLY"
              },
              "interval": {
                "type": "integer",
                "minimum": 1,
                "maximum": 120
              },
              "weekdays": {
                "minItems": 1,
                "maxItems": 7,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "MO",
                    "TU",
                    "WE",
                    "TH",
                    "FR",
                    "SA",
                    "SU"
                  ]
                }
              },
              "weekStart": {
                "type": "string",
                "enum": [
                  "MO",
                  "TU",
                  "WE",
                  "TH",
                  "FR",
                  "SA",
                  "SU"
                ]
              },
              "count": {
                "type": "integer",
                "minimum": 1,
                "maximum": 512
              }
            },
            "required": [
              "frequency",
              "interval",
              "weekdays",
              "weekStart",
              "count"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "frequency": {
                "type": "string",
                "const": "WEEKLY"
              },
              "interval": {
                "type": "integer",
                "minimum": 1,
                "maximum": 120
              },
              "weekdays": {
                "minItems": 1,
                "maxItems": 7,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "MO",
                    "TU",
                    "WE",
                    "TH",
                    "FR",
                    "SA",
                    "SU"
                  ]
                }
              },
              "weekStart": {
                "type": "string",
                "enum": [
                  "MO",
                  "TU",
                  "WE",
                  "TH",
                  "FR",
                  "SA",
                  "SU"
                ]
              },
              "until": {
                "type": "string",
                "maxLength": 10
              }
            },
            "required": [
              "frequency",
              "interval",
              "weekdays",
              "weekStart",
              "until"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "frequency": {
                "type": "string",
                "const": "MONTHLY"
              },
              "interval": {
                "type": "integer",
                "minimum": 1,
                "maximum": 120
              },
              "monthDays": {
                "minItems": 1,
                "maxItems": 31,
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 31
                }
              },
              "count": {
                "type": "integer",
                "minimum": 1,
                "maximum": 512
              }
            },
            "required": [
              "frequency",
              "interval",
              "monthDays",
              "count"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "frequency": {
                "type": "string",
                "const": "MONTHLY"
              },
              "interval": {
                "type": "integer",
                "minimum": 1,
                "maximum": 120
              },
              "monthDays": {
                "minItems": 1,
                "maxItems": 31,
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 31
                }
              },
              "until": {
                "type": "string",
                "maxLength": 10
              }
            },
            "required": [
              "frequency",
              "interval",
              "monthDays",
              "until"
            ],
            "additionalProperties": false
          }
        ]
      },
      "rdates": {
        "default": [],
        "maxItems": 256,
        "type": "array",
        "items": {
          "type": "string",
          "maxLength": 10
        }
      },
      "exdates": {
        "default": [],
        "maxItems": 256,
        "type": "array",
        "items": {
          "type": "string",
          "maxLength": 10
        }
      }
    },
    "required": [
      "dtstart",
      "window",
      "rule"
    ],
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "operation",
      "version",
      "result",
      "provenance"
    ],
    "properties": {
      "operation": {
        "const": "recurrence-dates-expand",
        "type": "string"
      },
      "version": {
        "const": "0.29.0",
        "type": "string"
      },
      "result": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "dates": {
            "maxItems": 512,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rrule": {
            "type": "string"
          },
          "ruleInstancesScanned": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3661
          },
          "excludedDatesInWindow": {
            "maxItems": 256,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "windowComplete": {
            "type": "boolean",
            "const": true
          },
          "ruleFullyExpanded": {
            "type": "boolean"
          }
        },
        "required": [
          "dates",
          "rrule",
          "ruleInstancesScanned",
          "excludedDatesInWindow",
          "windowComplete",
          "ruleFullyExpanded"
        ],
        "additionalProperties": false,
        "description": "Artifact result for declared profile: rfc5545-date-recurrence-subset-v1"
      },
      "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": {
    "dtstart": "2026-01-31",
    "window": {
      "start": "2026-01-31",
      "endExclusive": "2026-08-01"
    },
    "rule": {
      "frequency": "MONTHLY",
      "interval": 1,
      "monthDays": [
        31
      ],
      "count": 4
    },
    "rdates": [
      "2026-02-28"
    ],
    "exdates": [
      "2026-05-31"
    ]
  },
  "exampleResponse": {
    "operation": "recurrence-dates-expand",
    "version": "0.29.0",
    "result": {
      "dates": [
        "2026-01-31",
        "2026-02-28",
        "2026-03-31",
        "2026-07-31"
      ],
      "rrule": "FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=31;COUNT=4",
      "ruleInstancesScanned": 4,
      "excludedDatesInWindow": [
        "2026-05-31"
      ],
      "windowComplete": true,
      "ruleFullyExpanded": true
    },
    "provenance": {
      "inputSha256": "10f5a51bd3092752570d268cb0ea17caaeb18c55f4ea1396f704b7cddd83aef3",
      "outputSha256": "da2ea7e36399a9f04f5529eaeab5d60cf8e1667974afb4cfd2fada4255de4b10",
      "deterministic": true,
      "externalRequests": 0
    }
  },
  "requiredHeaders": {
    "Content-Type": "application/json",
    "Idempotency-Key": "random 16–128 character operation identifier"
  },
  "fixedExample": "/reference/examples/recurrence-dates-expand.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."
  }
}
