@claudexor/schema 3.3.10 → 3.3.12

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.
@@ -1256,6 +1256,84 @@
1256
1256
  "unknown"
1257
1257
  ],
1258
1258
  "description": "Freshness of a quota snapshot at read time."
1259
+ },
1260
+ "availability": {
1261
+ "type": "object",
1262
+ "properties": {
1263
+ "state": {
1264
+ "type": "string",
1265
+ "enum": [
1266
+ "available",
1267
+ "exhausted",
1268
+ "cooldown"
1269
+ ],
1270
+ "description": "Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks."
1271
+ },
1272
+ "blocking_constraints": {
1273
+ "type": "array",
1274
+ "items": {
1275
+ "$ref": "#/definitions/ControlCredentialProfilesQueryResponse/anyOf/0/properties/profiles/items/properties/status/properties/profile_id"
1276
+ },
1277
+ "description": "Ids of the constraints that produced a non-available state."
1278
+ },
1279
+ "resets_at": {
1280
+ "anyOf": [
1281
+ {
1282
+ "type": "string",
1283
+ "format": "date-time"
1284
+ },
1285
+ {
1286
+ "type": "null"
1287
+ }
1288
+ ],
1289
+ "description": "Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."
1290
+ },
1291
+ "model_scoped_exhaustions": {
1292
+ "type": "array",
1293
+ "items": {
1294
+ "type": "object",
1295
+ "properties": {
1296
+ "constraint_id": {
1297
+ "$ref": "#/definitions/ControlCredentialProfilesQueryResponse/anyOf/0/properties/profiles/items/properties/status/properties/profile_id"
1298
+ },
1299
+ "applies_to_models": {
1300
+ "type": "array",
1301
+ "items": {
1302
+ "$ref": "#/definitions/ControlCredentialProfilesQueryResponse/anyOf/0/properties/profiles/items/properties/status/properties/profile_id"
1303
+ },
1304
+ "minItems": 1
1305
+ },
1306
+ "resets_at": {
1307
+ "anyOf": [
1308
+ {
1309
+ "type": "string",
1310
+ "format": "date-time"
1311
+ },
1312
+ {
1313
+ "type": "null"
1314
+ }
1315
+ ]
1316
+ }
1317
+ },
1318
+ "required": [
1319
+ "constraint_id",
1320
+ "applies_to_models",
1321
+ "resets_at"
1322
+ ],
1323
+ "additionalProperties": false,
1324
+ "description": "A spent or cooling window that applies only to the named models. Without a requested model it never sets the whole subject exhausted; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown)."
1325
+ },
1326
+ "description": "Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope."
1327
+ }
1328
+ },
1329
+ "required": [
1330
+ "state",
1331
+ "blocking_constraints",
1332
+ "resets_at",
1333
+ "model_scoped_exhaustions"
1334
+ ],
1335
+ "additionalProperties": false,
1336
+ "description": "Typed availability projection derived by the /v2/quota route; absent on surfaces that embed raw snapshots."
1259
1337
  }
1260
1338
  },
1261
1339
  "required": [
@@ -1266,7 +1344,7 @@
1266
1344
  "freshness"
1267
1345
  ],
1268
1346
  "additionalProperties": false,
1269
- "description": "All independently reported quota windows for one vendor-owned subject."
1347
+ "description": "One vendor-owned quota snapshot plus its derived availability projection."
1270
1348
  }
1271
1349
  },
1272
1350
  "absences": {
@@ -1238,6 +1238,84 @@
1238
1238
  "unknown"
1239
1239
  ],
1240
1240
  "description": "Freshness of a quota snapshot at read time."
1241
+ },
1242
+ "availability": {
1243
+ "type": "object",
1244
+ "properties": {
1245
+ "state": {
1246
+ "type": "string",
1247
+ "enum": [
1248
+ "available",
1249
+ "exhausted",
1250
+ "cooldown"
1251
+ ],
1252
+ "description": "Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks."
1253
+ },
1254
+ "blocking_constraints": {
1255
+ "type": "array",
1256
+ "items": {
1257
+ "$ref": "#/definitions/ControlCredentialProfilesSnapshotResponse/properties/profiles/items/properties/status/properties/profile_id"
1258
+ },
1259
+ "description": "Ids of the constraints that produced a non-available state."
1260
+ },
1261
+ "resets_at": {
1262
+ "anyOf": [
1263
+ {
1264
+ "type": "string",
1265
+ "format": "date-time"
1266
+ },
1267
+ {
1268
+ "type": "null"
1269
+ }
1270
+ ],
1271
+ "description": "Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."
1272
+ },
1273
+ "model_scoped_exhaustions": {
1274
+ "type": "array",
1275
+ "items": {
1276
+ "type": "object",
1277
+ "properties": {
1278
+ "constraint_id": {
1279
+ "$ref": "#/definitions/ControlCredentialProfilesSnapshotResponse/properties/profiles/items/properties/status/properties/profile_id"
1280
+ },
1281
+ "applies_to_models": {
1282
+ "type": "array",
1283
+ "items": {
1284
+ "$ref": "#/definitions/ControlCredentialProfilesSnapshotResponse/properties/profiles/items/properties/status/properties/profile_id"
1285
+ },
1286
+ "minItems": 1
1287
+ },
1288
+ "resets_at": {
1289
+ "anyOf": [
1290
+ {
1291
+ "type": "string",
1292
+ "format": "date-time"
1293
+ },
1294
+ {
1295
+ "type": "null"
1296
+ }
1297
+ ]
1298
+ }
1299
+ },
1300
+ "required": [
1301
+ "constraint_id",
1302
+ "applies_to_models",
1303
+ "resets_at"
1304
+ ],
1305
+ "additionalProperties": false,
1306
+ "description": "A spent or cooling window that applies only to the named models. Without a requested model it never sets the whole subject exhausted; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown)."
1307
+ },
1308
+ "description": "Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope."
1309
+ }
1310
+ },
1311
+ "required": [
1312
+ "state",
1313
+ "blocking_constraints",
1314
+ "resets_at",
1315
+ "model_scoped_exhaustions"
1316
+ ],
1317
+ "additionalProperties": false,
1318
+ "description": "Typed availability projection derived by the /v2/quota route; absent on surfaces that embed raw snapshots."
1241
1319
  }
1242
1320
  },
1243
1321
  "required": [
@@ -1248,7 +1326,7 @@
1248
1326
  "freshness"
1249
1327
  ],
1250
1328
  "additionalProperties": false,
1251
- "description": "All independently reported quota windows for one vendor-owned subject."
1329
+ "description": "One vendor-owned quota snapshot plus its derived availability projection."
1252
1330
  }
1253
1331
  },
1254
1332
  "absences": {
@@ -0,0 +1,18 @@
1
+ {
2
+ "$ref": "#/definitions/ControlQuotaRefreshRequest",
3
+ "definitions": {
4
+ "ControlQuotaRefreshRequest": {
5
+ "type": "object",
6
+ "properties": {
7
+ "model": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "description": "Optional model id/alias the caller intends to spend against. When present, each snapshot's availability.state is computed against this model (case-insensitive alias containment in either direction), so windows scoped to OTHER models never report the subject exhausted."
11
+ }
12
+ },
13
+ "additionalProperties": false,
14
+ "description": "Optional POST /v2/quota body; an empty or absent body keeps the model-agnostic projection."
15
+ }
16
+ },
17
+ "$schema": "http://json-schema.org/draft-07/schema#"
18
+ }
@@ -153,6 +153,84 @@
153
153
  "unknown"
154
154
  ],
155
155
  "description": "Freshness of a quota snapshot at read time."
156
+ },
157
+ "availability": {
158
+ "type": "object",
159
+ "properties": {
160
+ "state": {
161
+ "type": "string",
162
+ "enum": [
163
+ "available",
164
+ "exhausted",
165
+ "cooldown"
166
+ ],
167
+ "description": "Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks."
168
+ },
169
+ "blocking_constraints": {
170
+ "type": "array",
171
+ "items": {
172
+ "$ref": "#/definitions/ControlQuotaResponse/properties/snapshots/items/properties/subject/properties/harness"
173
+ },
174
+ "description": "Ids of the constraints that produced a non-available state."
175
+ },
176
+ "resets_at": {
177
+ "anyOf": [
178
+ {
179
+ "type": "string",
180
+ "format": "date-time"
181
+ },
182
+ {
183
+ "type": "null"
184
+ }
185
+ ],
186
+ "description": "Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."
187
+ },
188
+ "model_scoped_exhaustions": {
189
+ "type": "array",
190
+ "items": {
191
+ "type": "object",
192
+ "properties": {
193
+ "constraint_id": {
194
+ "$ref": "#/definitions/ControlQuotaResponse/properties/snapshots/items/properties/subject/properties/harness"
195
+ },
196
+ "applies_to_models": {
197
+ "type": "array",
198
+ "items": {
199
+ "$ref": "#/definitions/ControlQuotaResponse/properties/snapshots/items/properties/subject/properties/harness"
200
+ },
201
+ "minItems": 1
202
+ },
203
+ "resets_at": {
204
+ "anyOf": [
205
+ {
206
+ "type": "string",
207
+ "format": "date-time"
208
+ },
209
+ {
210
+ "type": "null"
211
+ }
212
+ ]
213
+ }
214
+ },
215
+ "required": [
216
+ "constraint_id",
217
+ "applies_to_models",
218
+ "resets_at"
219
+ ],
220
+ "additionalProperties": false,
221
+ "description": "A spent or cooling window that applies only to the named models. Without a requested model it never sets the whole subject exhausted; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown)."
222
+ },
223
+ "description": "Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope."
224
+ }
225
+ },
226
+ "required": [
227
+ "state",
228
+ "blocking_constraints",
229
+ "resets_at",
230
+ "model_scoped_exhaustions"
231
+ ],
232
+ "additionalProperties": false,
233
+ "description": "Typed availability projection derived by the /v2/quota route; absent on surfaces that embed raw snapshots."
156
234
  }
157
235
  },
158
236
  "required": [
@@ -163,7 +241,7 @@
163
241
  "freshness"
164
242
  ],
165
243
  "additionalProperties": false,
166
- "description": "All independently reported quota windows for one vendor-owned subject."
244
+ "description": "One vendor-owned quota snapshot plus its derived availability projection."
167
245
  }
168
246
  },
169
247
  "absences": {
@@ -204,7 +204,7 @@
204
204
  "harnessInactivityTimeoutMs": {
205
205
  "type": "integer",
206
206
  "exclusiveMinimum": 0,
207
- "default": 1200000,
207
+ "default": 3600000,
208
208
  "description": "Inactivity watchdog for harness streams, in milliseconds."
209
209
  },
210
210
  "transientRetry": {
@@ -235,7 +235,7 @@
235
235
  "harness_inactivity_timeout_ms": {
236
236
  "type": "integer",
237
237
  "exclusiveMinimum": 0,
238
- "default": 1200000,
238
+ "default": 3600000,
239
239
  "description": "Inactivity watchdog for harness streams: no events for this window aborts the stream and fails the attempt with a typed timeout."
240
240
  }
241
241
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudexor/schema",
3
- "version": "3.3.10",
3
+ "version": "3.3.12",
4
4
  "license": "MIT",
5
5
  "description": "Single source of truth for all Claudexor data shapes (Zod + generated JSON Schema).",
6
6
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "zod": "^4.4.3",
22
22
  "zod-to-json-schema": "^3.24.1",
23
- "@claudexor/util": "3.3.10"
23
+ "@claudexor/util": "3.3.12"
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",