Repository navigation
v3.13.0
Resource/credential leasing ships in this release as a beta feature. The interfaces below are
stable enough for evaluation and feedback, but the capability is deliberately v1-scoped —
multi-holder admission (maxHolders > 1), budget counting, and phase-scoped leases are designed-for
but deferred, and details may evolve based on real-world usage. Deployments that declare no
resources:see zero behavior change.
Added
- Resource leasing (beta). Work items can now declare exclusive or advisory access to shared resources
(a staging slot, a test database, a deploy credential, a fleet-wide deployment mutex) via a new
resources:dimension on trait definitions, enforced as a gate insideadvance_itemat WORK
entry (startandresume) — no new MCP tool, no explicit acquire/release verb.exclusive
resources take a TTL-bounded lease (default 3600s, max 86400s); contention rejects with a
transientresource_unavailableerror (MCP) or409+Retry-After(REST), disclosing the
contended keys only, never the current holder.advisoryresources are audit-only. Lease
acquisition retries up to 5 times (40ms delay) onSQLITE_BUSY/SQLITE_LOCKEDcontention before
falling through to a transient DB-error response, so a losing writer in a genuine cross-connection
race gets a clean re-evaluation instead of a spurious failure. credentialRefsaudit field (beta).advance_itemtransitions accept an optionalcredentialRefs
array of opaque credential/resource labels (never secret values), persisted to
role_transitions.consumed_credentialsand surfaced read-only viaRoleTransitionDto.consumedCredentials.
Once an item declaresresources:, the field becomes a closed set validated against the
declared/registered keys, and declared keys are auto-recorded on work entry.- Resource-lease read/recovery surfaces.
get_context(itemId=...)item mode gains a
resourceLeasesblock (mirroringclaimDetail). New REST routesGET /api/v1/resources/leases
(list active leases; holder actor identity ADMIN-only) and
DELETE /api/v1/resources/leases/{key}(ADMIN-only force-release — the operator recovery path for
a crashed holder, without waiting out the TTL or disabling enforcement server-wide). - Enforcement matrix and kill switch. Both MCP and REST enforce the resource-lease gate by
default; REST additionally accepts an ADMIN-onlyoverrideResourceLeasesrequest flag (403 for
non-admin callers who set it, WARN-logged when used). NewRESOURCE_LEASES_ENFORCEDenv var
(defaulttrue) is a deployment-wide kill switch, read per advance call rather than once at
startup.CORS_EXPOSE_HEADERSnow defaults to includeRetry-After. - Lease-interval history (beta, audit log). New append-only
resource_lease_historytable records one
row per lease hold interval — answering "who held resource R at time T" after a lease has already
been released, stolen, or force-released. Every acquire/refresh/release/steal/force-release write
is mirrored into history in the same transaction as the live-row write;ResourceLeaseRepository
gainsfindHoldersAt/findRecentIntervals, andforceReleaseByKeygains an optionalactorId
parameter recorded on the closed interval. New REST route
GET /api/v1/resources/leases/history?key=&at=&limit=(holder/closer actor identity ADMIN-only,
atoptional ISO-8601 instant, 400 on an unparseable value,limitdefault 100 max 500). No
pruning/retention in v1 — append-only, cardinality tracks lease events.
Changed
- Every exit from the work phase — primary transitions, cascades, and
complete_tree— now releases
the item's resource leases automatically; TTL expiry remains the crash backstop. - Bumped plugin version to 3.5.2 — skills and hooks distinguish transient lease contention from
note-gate blocks (schema-workflow,dependency-manager,status-progression, the dispatched-agent
context, both orchestrator output styles),/manage-schemasrecognizes and preserves the
resources:config section, and/configure-serverdocuments theRESOURCE_LEASES_ENFORCED
kill switch. - Documented the one item = one concurrent actor modelling assumption (from beta field
feedback): item-keyed exclusivity arbitrates between items, not between actors sharing one item —
cut items at actor granularity;claim_itemis the opt-in enforcement. Stated in the
workflow-guide guarantees section and fleet capacity planning.
Fixed
- Lease-interval history could report two simultaneous holders for one key (beta field report): a
re-take of a previously-held key after an intervening expired holder left that holder's interval
open, and a late release then stamped it closed at "now". Stale holder intervals now close on
every acquire path, and history closes are clamped to the interval's own expiry with a truthful
expiredreason. Live-lease exclusivity was never affected — audit-view accuracy only.