@cleocode/adapters 2026.6.18 → 2026.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2384,6 +2384,7 @@ var init_tasks = __esm({
2384
2384
  severity: { type: "string", enum: ["P0", "P1", "P2", "P3"] },
2385
2385
  reason: { type: "string" },
2386
2386
  dependsWaiver: { type: "string" },
2387
+ blockedBy: { type: "string" },
2387
2388
  clearBlockedBy: { type: "boolean" },
2388
2389
  relates: {
2389
2390
  type: "array",
@@ -5083,6 +5084,12 @@ var init_operations_registry = __esm({
5083
5084
  required: false,
5084
5085
  description: "Justification to waive the critical-priority --depends requirement"
5085
5086
  },
5087
+ {
5088
+ name: "blockedBy",
5089
+ type: "string",
5090
+ required: false,
5091
+ description: "Set the free-text blockedBy reason (gh#1106)"
5092
+ },
5086
5093
  {
5087
5094
  name: "clearBlockedBy",
5088
5095
  type: "boolean",
@@ -12784,7 +12791,7 @@ var init_lafs = __esm({
12784
12791
 
12785
12792
  // packages/contracts/src/lease-ipc/messages.ts
12786
12793
  import { z as z11 } from "zod";
12787
- var LeaseScopeSchema, LeaseLaneSchema, LeaseAcquireRequestSchema, LeaseReleaseRequestSchema, LeaseRenewRequestSchema, RateCheckRequestSchema, ToolGrantRequestSchema, QueuePriorityClassSchema, QueueAdmitRequestSchema, WorkerHeartbeatRequestSchema, LeaseIpcRequestSchema, LeaseGrantedResponseSchema, LeaseQueuedResponseSchema, LeaseDeniedResponseSchema, RateResultResponseSchema, ToolGrantedResponseSchema, LeaseRevokedResponseSchema, ChildKilledUnresponsiveResponseSchema, QueueAdmitDispositionSchema, QueueAdmitResultResponseSchema, HeartbeatAckResponseSchema, LeaseErrorResponseSchema, LeaseIpcResponseSchema, LeaseIpcRequestEnvelopeSchema, LeaseIpcResponseEnvelopeSchema, LeaseIpcEnvelopeSchema, LEASE_IPC_REQUEST_KINDS, LEASE_IPC_RESPONSE_KINDS, LEASE_IPC_MESSAGE_KINDS;
12794
+ var LeaseScopeSchema, LeaseLaneSchema, LeaseAcquireRequestSchema, LeaseReleaseRequestSchema, LeaseRenewRequestSchema, RateCheckRequestSchema, ToolGrantRequestSchema, QueuePriorityClassSchema, QueueAdmitRequestSchema, WorkerHeartbeatRequestSchema, ResourceAdmitRequestSchema, ResourceReleaseRequestSchema, LeaseIpcRequestSchema, LeaseGrantedResponseSchema, LeaseQueuedResponseSchema, LeaseDeniedResponseSchema, RateResultResponseSchema, ToolGrantedResponseSchema, LeaseRevokedResponseSchema, ChildKilledUnresponsiveResponseSchema, QueueAdmitDispositionSchema, QueueAdmitResultResponseSchema, HeartbeatAckResponseSchema, ResourceAdmitDispositionSchema, ResourceAdmitResultResponseSchema, ResourceReleaseResultResponseSchema, LeaseErrorResponseSchema, LeaseIpcResponseSchema, LeaseIpcRequestEnvelopeSchema, LeaseIpcResponseEnvelopeSchema, LeaseIpcEnvelopeSchema, LEASE_IPC_REQUEST_KINDS, LEASE_IPC_RESPONSE_KINDS, LEASE_IPC_MESSAGE_KINDS;
12788
12795
  var init_messages2 = __esm({
12789
12796
  "packages/contracts/src/lease-ipc/messages.ts"() {
12790
12797
  "use strict";
@@ -12869,6 +12876,24 @@ var init_messages2 = __esm({
12869
12876
  /** The worker's own view of whether it is currently inside an LLM call. */
12870
12877
  in_flight_llm: z11.boolean()
12871
12878
  }).strict();
12879
+ ResourceAdmitRequestSchema = z11.object({
12880
+ /** Tag discriminating this request variant. */
12881
+ kind: z11.literal("resource_admit"),
12882
+ /** The resource class (e.g. `"db-heavy"`, `"full-build"`, `"test-run"`). */
12883
+ class: z11.string().min(1),
12884
+ /** The caller holding the slot — process/worktree-unique; the release key. */
12885
+ holder_id: z11.string().min(1),
12886
+ /** The client-computed budget: the max concurrent holders for this class. */
12887
+ budget: z11.number().int().nonnegative()
12888
+ }).strict();
12889
+ ResourceReleaseRequestSchema = z11.object({
12890
+ /** Tag discriminating this request variant. */
12891
+ kind: z11.literal("resource_release"),
12892
+ /** The resource class the slot belongs to. */
12893
+ class: z11.string().min(1),
12894
+ /** The holder that was admitted (matches the admit `holder_id`). */
12895
+ holder_id: z11.string().min(1)
12896
+ }).strict();
12872
12897
  LeaseIpcRequestSchema = z11.discriminatedUnion("kind", [
12873
12898
  LeaseAcquireRequestSchema,
12874
12899
  LeaseReleaseRequestSchema,
@@ -12876,7 +12901,9 @@ var init_messages2 = __esm({
12876
12901
  RateCheckRequestSchema,
12877
12902
  ToolGrantRequestSchema,
12878
12903
  QueueAdmitRequestSchema,
12879
- WorkerHeartbeatRequestSchema
12904
+ WorkerHeartbeatRequestSchema,
12905
+ ResourceAdmitRequestSchema,
12906
+ ResourceReleaseRequestSchema
12880
12907
  ]);
12881
12908
  LeaseGrantedResponseSchema = z11.object({
12882
12909
  /** Tag discriminating this response variant. */
@@ -12977,6 +13004,25 @@ var init_messages2 = __esm({
12977
13004
  /** Tag discriminating this response variant. */
12978
13005
  kind: z11.literal("heartbeat_ack")
12979
13006
  }).strict();
13007
+ ResourceAdmitDispositionSchema = z11.enum(["admitted", "deferred"]);
13008
+ ResourceAdmitResultResponseSchema = z11.object({
13009
+ /** Tag discriminating this response variant. */
13010
+ kind: z11.literal("resource_admit_result"),
13011
+ /** Whether the heavy op was admitted or deferred. */
13012
+ disposition: ResourceAdmitDispositionSchema,
13013
+ /** Back-off in ms before re-requesting (0 when admitted). */
13014
+ retry_after_ms: z11.number().int().nonnegative(),
13015
+ /** Remaining slots for the class after this decision. */
13016
+ slots_remaining: z11.number().int().nonnegative()
13017
+ }).strict();
13018
+ ResourceReleaseResultResponseSchema = z11.object({
13019
+ /** Tag discriminating this response variant. */
13020
+ kind: z11.literal("resource_release_result"),
13021
+ /** Whether a held slot was actually released (false = no such holder). */
13022
+ released: z11.boolean(),
13023
+ /** Remaining in-flight holders for the class after the release. */
13024
+ slots_remaining: z11.number().int().nonnegative()
13025
+ }).strict();
12980
13026
  LeaseErrorResponseSchema = z11.object({
12981
13027
  /** Tag discriminating this response variant. */
12982
13028
  kind: z11.literal("error"),
@@ -12995,6 +13041,8 @@ var init_messages2 = __esm({
12995
13041
  ChildKilledUnresponsiveResponseSchema,
12996
13042
  QueueAdmitResultResponseSchema,
12997
13043
  HeartbeatAckResponseSchema,
13044
+ ResourceAdmitResultResponseSchema,
13045
+ ResourceReleaseResultResponseSchema,
12998
13046
  LeaseErrorResponseSchema
12999
13047
  ]);
13000
13048
  LeaseIpcRequestEnvelopeSchema = z11.object({
@@ -13028,7 +13076,9 @@ var init_messages2 = __esm({
13028
13076
  "rate_check",
13029
13077
  "tool_grant",
13030
13078
  "queue_admit",
13031
- "worker_heartbeat"
13079
+ "worker_heartbeat",
13080
+ "resource_admit",
13081
+ "resource_release"
13032
13082
  ];
13033
13083
  LEASE_IPC_RESPONSE_KINDS = [
13034
13084
  "lease_granted",
@@ -13040,6 +13090,8 @@ var init_messages2 = __esm({
13040
13090
  "child_killed_unresponsive",
13041
13091
  "queue_admit_result",
13042
13092
  "heartbeat_ack",
13093
+ "resource_admit_result",
13094
+ "resource_release_result",
13043
13095
  "error"
13044
13096
  ];
13045
13097
  LEASE_IPC_MESSAGE_KINDS = [
@@ -14210,6 +14262,24 @@ var init_render = __esm({
14210
14262
  }
14211
14263
  });
14212
14264
 
14265
+ // packages/contracts/src/resource-governor.ts
14266
+ var RESOURCE_CLASSES;
14267
+ var init_resource_governor = __esm({
14268
+ "packages/contracts/src/resource-governor.ts"() {
14269
+ "use strict";
14270
+ RESOURCE_CLASSES = Object.freeze([
14271
+ "interactive-cli",
14272
+ "agent-session",
14273
+ "llm-call",
14274
+ "test-run",
14275
+ "scoped-build",
14276
+ "full-build",
14277
+ "db-heavy",
14278
+ "background-autonomous"
14279
+ ]);
14280
+ }
14281
+ });
14282
+
14213
14283
  // packages/contracts/src/session.ts
14214
14284
  var init_session2 = __esm({
14215
14285
  "packages/contracts/src/session.ts"() {
@@ -15960,6 +16030,7 @@ var init_src = __esm({
15960
16030
  init_evidence_atoms();
15961
16031
  init_plan();
15962
16032
  init_render();
16033
+ init_resource_governor();
15963
16034
  init_session2();
15964
16035
  init_session_journal();
15965
16036
  init_status_registry();