@farmslot/protocol 0.21.0 → 0.25.0

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.
Files changed (117) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/dist/contracts/agents.d.ts +16 -0
  3. package/dist/contracts/agents.d.ts.map +1 -1
  4. package/dist/contracts/backlog.d.ts +8 -0
  5. package/dist/contracts/backlog.d.ts.map +1 -1
  6. package/dist/contracts/backlog.js.map +1 -1
  7. package/dist/contracts/device-inventory.d.ts +118 -0
  8. package/dist/contracts/device-inventory.d.ts.map +1 -0
  9. package/dist/contracts/device-inventory.js +51 -0
  10. package/dist/contracts/device-inventory.js.map +1 -0
  11. package/dist/contracts/dispatch.d.ts +2 -0
  12. package/dist/contracts/dispatch.d.ts.map +1 -1
  13. package/dist/contracts/execution-templates.d.ts +10 -0
  14. package/dist/contracts/execution-templates.d.ts.map +1 -1
  15. package/dist/contracts/gate-park.d.ts +284 -0
  16. package/dist/contracts/gate-park.d.ts.map +1 -0
  17. package/dist/contracts/gate-park.js +415 -0
  18. package/dist/contracts/gate-park.js.map +1 -0
  19. package/dist/contracts/index.d.ts +4 -0
  20. package/dist/contracts/index.d.ts.map +1 -1
  21. package/dist/contracts/index.js +4 -0
  22. package/dist/contracts/index.js.map +1 -1
  23. package/dist/contracts/pressure-admission.d.ts +175 -0
  24. package/dist/contracts/pressure-admission.d.ts.map +1 -0
  25. package/dist/contracts/pressure-admission.js +26 -0
  26. package/dist/contracts/pressure-admission.js.map +1 -0
  27. package/dist/contracts/resource-posture.d.ts +379 -0
  28. package/dist/contracts/resource-posture.d.ts.map +1 -0
  29. package/dist/contracts/resource-posture.js +293 -0
  30. package/dist/contracts/resource-posture.js.map +1 -0
  31. package/dist/contracts/resources.d.ts +27 -1
  32. package/dist/contracts/resources.d.ts.map +1 -1
  33. package/dist/contracts/resources.js +1 -1
  34. package/dist/contracts/resources.js.map +1 -1
  35. package/dist/contracts/reviews.d.ts +2 -0
  36. package/dist/contracts/reviews.d.ts.map +1 -1
  37. package/dist/contracts/reviews.js.map +1 -1
  38. package/dist/contracts/runs.d.ts +480 -7
  39. package/dist/contracts/runs.d.ts.map +1 -1
  40. package/dist/contracts/runs.js +130 -1
  41. package/dist/contracts/runs.js.map +1 -1
  42. package/dist/contracts/runtime-capabilities.d.ts +255 -3
  43. package/dist/contracts/runtime-capabilities.d.ts.map +1 -1
  44. package/dist/contracts/runtime-capabilities.js +113 -1
  45. package/dist/contracts/runtime-capabilities.js.map +1 -1
  46. package/dist/contracts/slots.d.ts +53 -1
  47. package/dist/contracts/slots.d.ts.map +1 -1
  48. package/dist/recipes/step-io.d.ts +10 -1
  49. package/dist/recipes/step-io.d.ts.map +1 -1
  50. package/dist/rpc/config.d.ts +9 -1
  51. package/dist/rpc/config.d.ts.map +1 -1
  52. package/dist/rpc/copilot-runtime.d.ts +17 -0
  53. package/dist/rpc/copilot-runtime.d.ts.map +1 -1
  54. package/dist/rpc/copilot-runtime.js +5 -0
  55. package/dist/rpc/copilot-runtime.js.map +1 -1
  56. package/dist/rpc/dispatch.d.ts +39 -1
  57. package/dist/rpc/dispatch.d.ts.map +1 -1
  58. package/dist/rpc/dispatch.js +2 -0
  59. package/dist/rpc/dispatch.js.map +1 -1
  60. package/dist/rpc/git.d.ts +35 -0
  61. package/dist/rpc/git.d.ts.map +1 -1
  62. package/dist/rpc/index.d.ts +3 -0
  63. package/dist/rpc/index.d.ts.map +1 -1
  64. package/dist/rpc/index.js +3 -0
  65. package/dist/rpc/index.js.map +1 -1
  66. package/dist/rpc/machine-pause.d.ts +158 -0
  67. package/dist/rpc/machine-pause.d.ts.map +1 -0
  68. package/dist/rpc/machine-pause.js +8 -0
  69. package/dist/rpc/machine-pause.js.map +1 -0
  70. package/dist/rpc/registry.d.ts +16 -0
  71. package/dist/rpc/registry.d.ts.map +1 -1
  72. package/dist/rpc/registry.js +17 -0
  73. package/dist/rpc/registry.js.map +1 -1
  74. package/dist/rpc/resource-posture.d.ts +36 -0
  75. package/dist/rpc/resource-posture.d.ts.map +1 -0
  76. package/dist/rpc/resource-posture.js +7 -0
  77. package/dist/rpc/resource-posture.js.map +1 -0
  78. package/dist/rpc/resource-pressure-selection.d.ts +4 -0
  79. package/dist/rpc/resource-pressure-selection.d.ts.map +1 -0
  80. package/dist/rpc/resource-pressure-selection.js +21 -0
  81. package/dist/rpc/resource-pressure-selection.js.map +1 -0
  82. package/dist/rpc/resources.d.ts +176 -1
  83. package/dist/rpc/resources.d.ts.map +1 -1
  84. package/dist/rpc/resources.js +6 -0
  85. package/dist/rpc/resources.js.map +1 -1
  86. package/dist/rpc/run.d.ts +122 -5
  87. package/dist/rpc/run.d.ts.map +1 -1
  88. package/dist/rpc/run.js +1 -0
  89. package/dist/rpc/run.js.map +1 -1
  90. package/dist/rpc/runtime-capabilities.d.ts +73 -3
  91. package/dist/rpc/runtime-capabilities.d.ts.map +1 -1
  92. package/dist/rpc/runtime-capabilities.js +11 -0
  93. package/dist/rpc/runtime-capabilities.js.map +1 -1
  94. package/dist/rpc/slot.d.ts +9 -1
  95. package/dist/rpc/slot.d.ts.map +1 -1
  96. package/dist/rpc/slot.js.map +1 -1
  97. package/dist/rpc/tmux.d.ts +4 -0
  98. package/dist/rpc/tmux.d.ts.map +1 -1
  99. package/dist/runs/decision-resolution.d.ts +7 -0
  100. package/dist/runs/decision-resolution.d.ts.map +1 -1
  101. package/dist/runs/decision-resolution.js +1 -0
  102. package/dist/runs/decision-resolution.js.map +1 -1
  103. package/dist/slots/tracking-branch.d.ts +12 -0
  104. package/dist/slots/tracking-branch.d.ts.map +1 -1
  105. package/dist/slots/tracking-branch.js +12 -0
  106. package/dist/slots/tracking-branch.js.map +1 -1
  107. package/dist/transport/events.d.ts +7 -1
  108. package/dist/transport/events.d.ts.map +1 -1
  109. package/dist/transport/events.js +2 -0
  110. package/dist/transport/events.js.map +1 -1
  111. package/dist/transport/signal.d.ts +11 -0
  112. package/dist/transport/signal.d.ts.map +1 -1
  113. package/dist/transport/signal.js +19 -1
  114. package/dist/transport/signal.js.map +1 -1
  115. package/dist/version.d.ts +1 -1
  116. package/dist/version.js +1 -1
  117. package/package.json +6 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pressure-admission.d.ts","sourceRoot":"","sources":["../../src/contracts/pressure-admission.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE/F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,OAAO,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;AAExF,eAAO,MAAM,iCAAiC,EAAE,SAAS,6BAA6B,EAGrF,CAAC;AAEF;;;;eAIe;AACf,MAAM,MAAM,sBAAsB,GAC9B,OAAO,GACP,WAAW,GACX,oBAAoB,GACpB,aAAa,GACb,OAAO,GACP,UAAU,GACV,UAAU,CAAC;AAEf;yCACyC;AACzC,eAAO,MAAM,kCAAkC,4PASrC,CAAC;AAEX,MAAM,MAAM,8BAA8B,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjG;kEACkE;AAClE,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;kFACkF;AAClF,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACn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C;AAED,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,CAAC;AACvE,MAAM,MAAM,iCAAiC,GAAG,6BAA6B,CAAC;AAE9E,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,yBAAyB,GAAG,SAAS,GAC9C,QAAQ,IAAI,yBAAyB,CAEvC"}
@@ -0,0 +1,26 @@
1
+ // Sustained-pressure dispatch admission contract (MANUAL-000109).
2
+ //
3
+ // One backend-owned decision shared by dispatch preview, automatic slot
4
+ // selection, and dispatch execution. Clients render these decisions and never
5
+ // re-derive thresholds. The evidence is the Goal 1 node-pressure history and
6
+ // process attribution — no dispatch-side sampler exists.
7
+ export const DISPATCH_PRESSURE_ADMISSION_MODES = [
8
+ 'off',
9
+ 'refuse',
10
+ ];
11
+ /** Stable machine-readable rejection codes. Never rename — clients and
12
+ * operators key automation off these. */
13
+ export const PRESSURE_ADMISSION_REJECTION_CODES = [
14
+ 'PRESSURE_SUSTAINED_CRITICAL',
15
+ 'PRESSURE_EVIDENCE_UNAVAILABLE',
16
+ 'PRESSURE_EVIDENCE_STALE',
17
+ 'PRESSURE_PREVIEW_STALE',
18
+ 'PRESSURE_OVERRIDE_STALE',
19
+ 'PRESSURE_OVERRIDE_MISMATCH',
20
+ 'PRESSURE_OVERRIDE_REASON_REQUIRED',
21
+ 'PRESSURE_OVERRIDE_CONSUMED',
22
+ ];
23
+ export function isPressureAdmissionRejected(decision) {
24
+ return decision?.outcome === 'rejected';
25
+ }
26
+ //# sourceMappingURL=pressure-admission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pressure-admission.js","sourceRoot":"","sources":["../../src/contracts/pressure-admission.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,wEAAwE;AACxE,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AAazD,MAAM,CAAC,MAAM,iCAAiC,GAA6C;IACzF,KAAK;IACL,QAAQ;CACT,CAAC;AAgBF;yCACyC;AACzC,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,6BAA6B;IAC7B,+BAA+B;IAC/B,yBAAyB;IACzB,wBAAwB;IACxB,yBAAyB;IACzB,4BAA4B;IAC5B,mCAAmC;IACnC,4BAA4B;CACpB,CAAC;AA2KX,MAAM,UAAU,2BAA2B,CACzC,QAA+C;IAE/C,OAAO,QAAQ,EAAE,OAAO,KAAK,UAAU,CAAC;AAC1C,CAAC"}
@@ -0,0 +1,379 @@
1
+ /**
2
+ * Run resource posture (ADR-054).
3
+ *
4
+ * The Gateway owns one semantic posture per run describing which runtime
5
+ * capabilities should be live at the current lifecycle boundary. Clients render
6
+ * the Gateway's decision — desired disposition, observed provider state, the
7
+ * winning policy source — and never resolve policy themselves.
8
+ */
9
+ import type { DeviceInventoryKey } from './device-inventory.js';
10
+ import type { MachinePauseEligibilityDetails } from './runs.js';
11
+ import type { RuntimeCapabilityAcquireConflict, RuntimeCapabilityClaimScope, RuntimeCapabilityHealthState, RuntimeCapabilityLeaseOwner, RuntimeCapabilityLeaseState, RuntimeCapabilityTarget } from './runtime-capabilities.js';
12
+ /**
13
+ * The lease fields `observedStateForLease` reads. Structural so this module
14
+ * stays free of a value-level dependency on the lease type.
15
+ */
16
+ export interface RuntimeCapabilityLeaseLike {
17
+ state: RuntimeCapabilityLeaseState;
18
+ health: {
19
+ state: RuntimeCapabilityHealthState;
20
+ };
21
+ keepWarmUntil?: string;
22
+ cleanupFailure?: string;
23
+ }
24
+ /** Semantic lifecycle intent. Never derived from run status, step names, or slot phases. */
25
+ export declare const RESOURCE_POSTURES: readonly ["active", "operator-wait", "parked", "terminal"];
26
+ export type ResourcePosture = (typeof RESOURCE_POSTURES)[number];
27
+ /** Operator vocabulary at a human gate; each resolves to a posture plus proof plan. */
28
+ export declare const RESOURCE_POSTURE_GATE_CHOICES: readonly ["keep-for-validation", "minimize", "free-slot", "project-default"];
29
+ export type ResourcePostureGateChoice = (typeof RESOURCE_POSTURE_GATE_CHOICES)[number];
30
+ /**
31
+ * Dispatch-time preset for every durable wait of a run. `project-default` is
32
+ * excluded: a preset that defers to the lower precedence levels is a no-op, and
33
+ * omitting the field already expresses it.
34
+ */
35
+ export declare const RESOURCE_POSTURE_WAIT_POLICIES: readonly ["keep-for-validation", "minimize", "free-slot"];
36
+ export type ResourcePostureWaitPolicy = (typeof RESOURCE_POSTURE_WAIT_POLICIES)[number];
37
+ /** Which precedence level produced the effective policy. */
38
+ export declare const RESOURCE_POSTURE_POLICY_SOURCES: readonly ["gate-choice", "run-dispatch", "project-default", "framework-default"];
39
+ export type ResourcePosturePolicySource = (typeof RESOURCE_POSTURE_POLICY_SOURCES)[number];
40
+ /** What the Gateway intends for a capability. Distinct from what is observed. */
41
+ export declare const RESOURCE_POSTURE_DISPOSITIONS: readonly ["acquired", "warm", "stopped"];
42
+ export type ResourcePostureDesiredDisposition = (typeof RESOURCE_POSTURE_DISPOSITIONS)[number];
43
+ /**
44
+ * What the provider is actually doing. A released lease with a live keep-warm
45
+ * provider is `running`, not `stopped`.
46
+ */
47
+ export declare const RESOURCE_POSTURE_OBSERVED_STATES: readonly ["running", "stopped", "unhealthy", "transitioning", "unknown"];
48
+ export type ResourcePostureObservedState = (typeof RESOURCE_POSTURE_OBSERVED_STATES)[number];
49
+ /** Per-provider project retention policy for a posture. */
50
+ export declare const RESOURCE_POSTURE_RETENTIONS: readonly ["retain", "warm", "stop"];
51
+ export type ResourcePostureRetention = (typeof RESOURCE_POSTURE_RETENTIONS)[number];
52
+ /**
53
+ * Postures a project may configure retention for. `active` is derived from the
54
+ * current proof plan and `parked` delegates to machine parking, so neither
55
+ * accepts a retention override.
56
+ */
57
+ export declare const RESOURCE_POSTURE_RETENTION_BOUNDARIES: readonly ["operator-wait", "terminal"];
58
+ export type ResourcePostureRetentionBoundary = (typeof RESOURCE_POSTURE_RETENTION_BOUNDARIES)[number];
59
+ /** Project-level posture defaults; per-provider `retention` overrides these. */
60
+ export interface ProjectResourcePostureConfig {
61
+ defaults?: Partial<Record<ResourcePostureRetentionBoundary, ResourcePostureRetention>>;
62
+ }
63
+ export interface ResourcePostureCapabilityState {
64
+ capabilityId: string;
65
+ desiredDisposition: ResourcePostureDesiredDisposition;
66
+ observedState: ResourcePostureObservedState;
67
+ policySource: ResourcePosturePolicySource;
68
+ reason: string;
69
+ leaseId?: string;
70
+ owner?: RuntimeCapabilityLeaseOwner;
71
+ /**
72
+ * The device identity the holding lease actually resolved to, when the
73
+ * provider takes one. Read off the lease's stored acquire parameters, so a
74
+ * client shows the device that is really in use rather than the slot's
75
+ * configured default after a re-target.
76
+ */
77
+ target?: RuntimeCapabilityTarget;
78
+ /** Deadline until which a released provider stays live. */
79
+ warmUntil?: string;
80
+ lastTransitionAt?: string;
81
+ releaseEffects: string[];
82
+ cleanupFailure?: string;
83
+ }
84
+ export type ResourcePostureRejection = {
85
+ kind: 'park-ineligible';
86
+ /** Machine-parking eligibility code, passed through unchanged. */
87
+ code: string;
88
+ reason: string;
89
+ /** Structured facts for the code, passed through unchanged. */
90
+ details?: MachinePauseEligibilityDetails;
91
+ } | {
92
+ kind: 'capability-unavailable';
93
+ capabilityId: string;
94
+ reason: string;
95
+ conflict: RuntimeCapabilityAcquireConflict;
96
+ } | {
97
+ /**
98
+ * A re-target named a device the slot's machine does not have
99
+ * (MANUAL-000124). Refused BEFORE the run's current device is released,
100
+ * so a typo costs the run nothing.
101
+ */
102
+ kind: 'device-unknown';
103
+ capabilityId: string;
104
+ /** The machine whose inventory was read. Device names are machine-scoped. */
105
+ machine: string;
106
+ /** The device-identity key the target named. */
107
+ key: DeviceInventoryKey;
108
+ identity: string;
109
+ /** Identities of the same key the machine does have, nearest first. */
110
+ nearest: string[];
111
+ reason: string;
112
+ } | {
113
+ kind: 'invalid-request';
114
+ reason: string;
115
+ };
116
+ export declare const RESOURCE_POSTURE_TRANSITION_OUTCOMES: readonly ["in-progress", "applied", "idempotent", "partial", "rejected", "failed"];
117
+ export type ResourcePostureTransitionOutcome = (typeof RESOURCE_POSTURE_TRANSITION_OUTCOMES)[number];
118
+ export interface ResourcePostureTransitionFailure {
119
+ capabilityId: string;
120
+ leaseId?: string;
121
+ reason: string;
122
+ }
123
+ export interface ResourcePostureTransition {
124
+ /** Caller-supplied `operationId` when present, so a replay returns this record. */
125
+ id: string;
126
+ posture: ResourcePosture;
127
+ policySource: ResourcePosturePolicySource;
128
+ gateChoice?: ResourcePostureGateChoice;
129
+ requestedAt: string;
130
+ completedAt?: string;
131
+ outcome: ResourcePostureTransitionOutcome;
132
+ effects: string[];
133
+ progress: {
134
+ total: number;
135
+ completed: number;
136
+ };
137
+ failures: ResourcePostureTransitionFailure[];
138
+ rejection?: ResourcePostureRejection;
139
+ }
140
+ /** Exact effect of applying a posture, returned before an operator commits. */
141
+ export interface ResourcePosturePlan {
142
+ runId: string;
143
+ slotId: string | null;
144
+ posture: ResourcePosture;
145
+ policySource: ResourcePosturePolicySource;
146
+ reason: string;
147
+ acquire: ResourcePostureCapabilityState[];
148
+ retain: ResourcePostureCapabilityState[];
149
+ warm: ResourcePostureCapabilityState[];
150
+ stop: ResourcePostureCapabilityState[];
151
+ /** Declared release effects of everything this plan would stop. */
152
+ effects: string[];
153
+ rejection?: ResourcePostureRejection;
154
+ }
155
+ /** Persisted on the run so a reconnecting client sees the same thing. */
156
+ export interface RunResourcePostureState {
157
+ posture: ResourcePosture;
158
+ policySource: ResourcePosturePolicySource;
159
+ gateChoice?: ResourcePostureGateChoice;
160
+ /**
161
+ * The run generation a `machine.pause.restore` replay took ownership at, when
162
+ * that restore re-presented a gate whose stored choice would re-park the run.
163
+ *
164
+ * Without it a run whose stored choice is `free-slot` re-parks itself the
165
+ * instant restore re-presents its gate: the replayed gate reaches the
166
+ * operator-wait boundary, the stored choice is carried forward, and the run
167
+ * parks again before the operator ever sees it. The restored gate therefore
168
+ * falls back to the framework default once; choosing `free-slot` again is
169
+ * still available, it just has to be chosen rather than inherited.
170
+ *
171
+ * Keyed on the GENERATION rather than a bare flag so it cannot outlive the
172
+ * gate it was set for. The replay is fire-and-forget: if it never reaches a
173
+ * wait boundary, a bare flag would sit on the run and silently swallow the
174
+ * operator's choice at some unrelated later wait. A generation that has moved
175
+ * on makes the suppression simply not apply.
176
+ *
177
+ * Cleared by the first wait boundary after it is set, whether or not that
178
+ * boundary carried an explicit choice — an operator who answers the restored
179
+ * gate consumes it just as an inheriting wait does.
180
+ */
181
+ gateChoiceSuppressedForGeneration?: number;
182
+ waitPolicy?: ResourcePostureWaitPolicy;
183
+ capabilities: ResourcePostureCapabilityState[];
184
+ /**
185
+ * The scoped resource claim this run is queued behind, while it is queued.
186
+ *
187
+ * Derived from the last transition's rejection rather than written
188
+ * separately, so it cannot outlive the wait it describes. A later transition
189
+ * that is not a scoped wait clears it. The work-graph reads this to report
190
+ * the node as `waitingOn.kind: 'resource'`.
191
+ */
192
+ resourceWait?: RunResourceWait;
193
+ /** ADR-038: no posture resolved here stops a gate-held worker. */
194
+ workerRetained: boolean;
195
+ lastTransition?: ResourcePostureTransition;
196
+ /**
197
+ * Recent transitions, newest first, bounded by
198
+ * `RESOURCE_POSTURE_TRANSITION_HISTORY`. Replaying an `operationId` returns the
199
+ * stored outcome for any id still in here, so a retry of an earlier operation
200
+ * cannot re-execute and undo a later one.
201
+ */
202
+ recentTransitions?: ResourcePostureTransition[];
203
+ updatedAt: string;
204
+ }
205
+ /**
206
+ * How far along a run's place in a scoped claim's queue is.
207
+ *
208
+ * `queued` is waiting its turn behind a holder. `granted` is the reservation
209
+ * the drain hands the head waiter: the claim is now held for this run and no
210
+ * provider has booted for it yet, so the run is not waiting on anyone else —
211
+ * it is waiting on its own completion. The two are reported separately because
212
+ * a `granted` wait that never clears is a stranded claim nobody else can take,
213
+ * and reporting nothing at all is how that used to stay invisible.
214
+ */
215
+ export declare const RUN_RESOURCE_WAIT_PHASES: readonly ["queued", "granted"];
216
+ export type RunResourceWaitPhase = (typeof RUN_RESOURCE_WAIT_PHASES)[number];
217
+ /**
218
+ * A run's durable place in a scoped claim's queue.
219
+ *
220
+ * `position` is a snapshot from the moment the acquire was refused, not a live
221
+ * counter: nothing renumbers a queue, and re-deriving it here would need the
222
+ * whole fleet's leases on every read of a run. A `granted` wait is past the
223
+ * queue entirely and reports position 0.
224
+ */
225
+ export interface RunResourceWait {
226
+ capabilityId: string;
227
+ claimId: string;
228
+ scope: RuntimeCapabilityClaimScope;
229
+ phase: RunResourceWaitPhase;
230
+ /** The run holding the claim, which is usually on another slot. */
231
+ blockingOwner: RuntimeCapabilityLeaseOwner;
232
+ /** The queued lease that holds this run's place in line. */
233
+ queuedLeaseId: string;
234
+ /** 1-based place in line, or 0 once the claim is reserved for this run. */
235
+ position: number;
236
+ since: string;
237
+ reason: string;
238
+ }
239
+ /** How many transitions a run keeps for operation-id replay. */
240
+ export declare const RESOURCE_POSTURE_TRANSITION_HISTORY = 20;
241
+ /** Gate choice -> posture. The only place this mapping exists. */
242
+ export declare function postureForGateChoice(choice: Exclude<ResourcePostureGateChoice, 'project-default'>): ResourcePosture;
243
+ /**
244
+ * The single derivation of a provider's observed state from its lease.
245
+ *
246
+ * Shared so the Gateway and every client answer "is this provider running?"
247
+ * identically. A client that re-derives this locally will drift — Slot View
248
+ * once decided an elapsed warm deadline meant `stopped` while the Gateway
249
+ * reported `unknown`, which labels a live provider as dead.
250
+ *
251
+ * `nowMs` is passed in so the caller evaluates the warm deadline against the
252
+ * same instant it rendered with.
253
+ */
254
+ export declare function observedStateForLease(lease: RuntimeCapabilityLeaseLike | undefined, nowMs: number): ResourcePostureObservedState;
255
+ export declare function isResourcePosture(value: unknown): value is ResourcePosture;
256
+ export declare function isResourcePostureGateChoice(value: unknown): value is ResourcePostureGateChoice;
257
+ export declare function isResourcePostureWaitPolicy(value: unknown): value is ResourcePostureWaitPolicy;
258
+ /**
259
+ * How the observed provider state stands against what the Gateway wanted.
260
+ *
261
+ * `unproven` is deliberately not folded into `mismatch` or `matches`: an
262
+ * `unknown` observation means the Gateway could not see the provider, and
263
+ * claiming either outcome from it would be a guess.
264
+ */
265
+ export type ResourcePostureRowStatus = 'matches' | 'pending' | 'mismatch' | 'unproven';
266
+ /**
267
+ * The single comparison of desired disposition against observed provider state.
268
+ *
269
+ * Shared so Command Center, Companion, and the CLI agree on when the Gateway
270
+ * got what it asked for. A client that re-derives this locally drifts, and the
271
+ * drift is always in the same direction: reporting a provider as handled when
272
+ * nothing observed it.
273
+ */
274
+ export declare function resourcePostureRowStatus(desired: ResourcePostureDesiredDisposition, observed: ResourcePostureObservedState): ResourcePostureRowStatus;
275
+ /**
276
+ * Counts of what the providers are observed to be doing, not of what was
277
+ * wanted. `stopped` requires an observed `stopped`: a provider the Gateway
278
+ * intended to stop but which is still running, or whose cleanup failed, must
279
+ * never be counted as stopped. Anything the Gateway cannot currently place —
280
+ * unknown, transitioning, or contradicting its intent — lands in `unresolved`
281
+ * so the buckets always account for every capability instead of quietly
282
+ * dropping one.
283
+ */
284
+ export interface ResourcePostureCounts {
285
+ retained: number;
286
+ warm: number;
287
+ stopped: number;
288
+ failed: number;
289
+ unresolved: number;
290
+ }
291
+ export declare function resourcePostureCounts(capabilities: readonly ResourcePostureCapabilityState[], lastTransition?: ResourcePostureTransition): ResourcePostureCounts;
292
+ /**
293
+ * Transition failures that are not already reported on a capability entry.
294
+ *
295
+ * A failed cleanup lands in both places: the transition's failure list and the
296
+ * capability's own `cleanupFailure`. Reporting both gives the operator the same
297
+ * alert twice. The capability entry wins — it sits next to that capability's
298
+ * desired and observed state, which is the context needed to act on it.
299
+ *
300
+ * The match is on capability AND reason. The Gateway reports a failure per
301
+ * lease while a capability entry carries one reason, so suppressing every
302
+ * failure for a capability that had any entry failure would silently drop a
303
+ * sibling lease's different failure — the one case where the transition list is
304
+ * the only place that failure is reported at all.
305
+ */
306
+ export declare function resourcePostureTransitionFailuresToShow(capabilities: readonly Pick<ResourcePostureCapabilityState, 'capabilityId' | 'cleanupFailure'>[], lastTransition?: ResourcePostureTransition): ResourcePostureTransitionFailure[];
307
+ /**
308
+ * Outcomes that end a transition. `in-progress` is deliberately absent: it is a
309
+ * wait, not an answer, and adopting it reports a reconciliation that can still
310
+ * fail as the operator's result.
311
+ *
312
+ * This is an allowlist rather than `!== 'in-progress'` so a new outcome added to
313
+ * the protocol is treated as non-terminal until it is considered here. The
314
+ * inverse defaults a new outcome to terminal on whichever client happens to
315
+ * update last, which is the wrong direction to fail in.
316
+ */
317
+ export declare const RESOURCE_POSTURE_TERMINAL_OUTCOMES: readonly ResourcePostureTransitionOutcome[];
318
+ export declare function isTerminalResourcePostureOutcome(outcome: ResourcePostureTransitionOutcome): boolean;
319
+ /** How many status reads a client waits through before reporting reconciliation pending. */
320
+ export declare const RESOURCE_POSTURE_TRANSITION_POLL_LIMIT = 10;
321
+ /**
322
+ * What a client knew before it sent a resolution, so the answer can be told
323
+ * apart from what was already there.
324
+ */
325
+ export interface ResourcePostureTransitionBaseline {
326
+ /** Transition ids the Gateway had already recorded. */
327
+ transitionIds: readonly string[];
328
+ /**
329
+ * Newest `requestedAt` among those, in the Gateway's own clock. Recency is
330
+ * compared Gateway-to-Gateway; a client clock never enters the comparison.
331
+ */
332
+ newestRequestedAt: string | undefined;
333
+ /** The gate choice the client forwarded, when it forwarded one. */
334
+ choice: ResourcePostureGateChoice | null;
335
+ }
336
+ /** The records to correlate over, newest first, as the protocol persists them. */
337
+ export declare function resourcePostureTransitions(state: Pick<RunResourcePostureState, 'recentTransitions' | 'lastTransition'> | undefined): readonly ResourcePostureTransition[];
338
+ export declare function resourcePostureTransitionBaseline(state: Pick<RunResourcePostureState, 'recentTransitions' | 'lastTransition'> | undefined, choice: ResourcePostureGateChoice | null): ResourcePostureTransitionBaseline;
339
+ /**
340
+ * The transition a resolution actually produced, or `undefined` while the
341
+ * Gateway has not recorded one yet.
342
+ *
343
+ * `run.resolveDecision` returns before posture reconciliation finishes, so the
344
+ * record on its response is frequently the one from BEFORE the resolution.
345
+ * Presenting that reports an old outcome as the answer to what the operator just
346
+ * did. Every client applies these four rules, from this one implementation:
347
+ *
348
+ * 1. Novelty. A record whose id was already in the baseline is one the Gateway
349
+ * had before the resolution, and is never adopted.
350
+ * 2. Recency, in Gateway time. A record must not be older than the newest
351
+ * `requestedAt` in the baseline. Both sides come from the Gateway, so no
352
+ * client clock is involved: anchoring on the client's send moment compares a
353
+ * phone or browser clock against the Gateway's, and a skewed client either
354
+ * adopts a stale record or rejects the real one forever. Not-older rather
355
+ * than strictly-newer, so two reconciliations in the same millisecond are not
356
+ * dropped; novelty already excludes the baseline itself. This rule excludes a
357
+ * backfilled or out-of-order record; it cannot exclude a genuinely concurrent
358
+ * one, which is what rule 3 is for.
359
+ * 3. Attribution. A record attributed to a different gate choice is excluded. A
360
+ * record carrying no `gateChoice` is never excluded on that basis, because
361
+ * the Gateway drops `project-default` before it picks a policy source and
362
+ * genuine rejections can also arrive without one. Among the survivors, a
363
+ * record the Gateway attributed to this choice WINS over an unattributed one;
364
+ * an unattributed record is only the fallback. Without that preference a
365
+ * concurrent unattributed reconciliation that lands afterwards is newest and
366
+ * therefore chosen, which misattributes it.
367
+ * 4. Terminality is the caller's half: `in-progress` is not an answer, so the
368
+ * caller keeps polling until `isTerminalResourcePostureOutcome`, bounded by
369
+ * `RESOURCE_POSTURE_TRANSITION_POLL_LIMIT`, and reports the wait on timeout.
370
+ *
371
+ * What this still cannot do: the record carries no decision key, and the
372
+ * resolve path supplies no `operationId` for the Gateway to mint the id from, so
373
+ * for a record with nothing attributed the correlation is positional. A
374
+ * concurrent reconciliation from another boundary could in principle be picked
375
+ * up. Surfaced wording must therefore describe what the run's posture did, never
376
+ * claim the operator's choice caused it.
377
+ */
378
+ export declare function correlateResourcePostureTransition(baseline: ResourcePostureTransitionBaseline, records: readonly ResourcePostureTransition[]): ResourcePostureTransition | undefined;
379
+ //# sourceMappingURL=resource-posture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-posture.d.ts","sourceRoot":"","sources":["../../src/contracts/resource-posture.ts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