Patch release: seven framework correctness fixes from a full-framework review.
Fixed
ResourceConstraintsimmutability —per_tool_limitswas mutable after construction and aliased the caller's dict; now a read-onlyMappingProxyTypeover a defensive copy.get_model_pricingversioned models — the prefix match returned the first key, mispricing ids likegpt-4o-2024-08-06asgpt-4; the longest prefix now wins.SkillSpecname validation — rejected valid 64-character names (off-by-one) and accepted consecutive hyphens its own error message forbids; fixed with a structural regex plus an explicit 1–64 length check.ResourceConstraintsrejects boolean budgets —tokens=True(and booleanper_tool_limitsvalues) no longer pass validation.- Cost-axis conservation tolerance — exact-budget cost splits (e.g.
0.1 + 0.1 + 0.1vs0.3) no longer spuriously raiseConservationViolationError; a1e-9tolerance is applied. Token and per-tool axes are integer-valued and unchanged. ContractAgentstrict mode —strict_mode=Truenow raisesContractViolationErroras documented, and finalizes the execution log before raising so the audit trail stays complete.
Full changelog: https://github.com/flyersworder/agent-contracts/blob/main/CHANGELOG.md