@claudexor/schema 3.5.0 → 3.6.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 (70) hide show
  1. package/dist/accounts-migration.d.ts +112 -0
  2. package/dist/accounts-migration.d.ts.map +1 -0
  3. package/dist/accounts-migration.js +74 -0
  4. package/dist/accounts-migration.js.map +1 -0
  5. package/dist/config.d.ts +38 -22
  6. package/dist/config.d.ts.map +1 -1
  7. package/dist/config.js +26 -6
  8. package/dist/config.js.map +1 -1
  9. package/dist/control-operation-responses.d.ts +7 -7
  10. package/dist/control-run-detail.d.ts +19 -19
  11. package/dist/control-run-failure.d.ts +4 -4
  12. package/dist/control-run-failure.d.ts.map +1 -1
  13. package/dist/control-run-failure.js +7 -1
  14. package/dist/control-run-failure.js.map +1 -1
  15. package/dist/control.d.ts +23 -23
  16. package/dist/control.d.ts.map +1 -1
  17. package/dist/control.js +8 -8
  18. package/dist/control.js.map +1 -1
  19. package/dist/credential-profile-snapshot.d.ts +236 -14
  20. package/dist/credential-profile-snapshot.d.ts.map +1 -1
  21. package/dist/credential-profile.d.ts +307 -7
  22. package/dist/credential-profile.d.ts.map +1 -1
  23. package/dist/credential-profile.js +104 -9
  24. package/dist/credential-profile.js.map +1 -1
  25. package/dist/credential-store.d.ts +19 -6
  26. package/dist/credential-store.d.ts.map +1 -1
  27. package/dist/credential-store.js +21 -6
  28. package/dist/credential-store.js.map +1 -1
  29. package/dist/events.d.ts +44 -4
  30. package/dist/events.d.ts.map +1 -1
  31. package/dist/events.js +34 -0
  32. package/dist/events.js.map +1 -1
  33. package/dist/harness.d.ts +5 -5
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1 -0
  37. package/dist/index.js.map +1 -1
  38. package/dist/mcp-run-result.d.ts +10 -10
  39. package/dist/quota.d.ts +33 -12
  40. package/dist/quota.d.ts.map +1 -1
  41. package/dist/quota.js +32 -0
  42. package/dist/quota.js.map +1 -1
  43. package/dist/rate-limit.d.ts +9 -0
  44. package/dist/rate-limit.d.ts.map +1 -1
  45. package/dist/rate-limit.js +21 -0
  46. package/dist/rate-limit.js.map +1 -1
  47. package/generated/AccountsUnifiedMigrationFile.schema.json +61 -0
  48. package/generated/ControlAccountPoolsResponse.schema.json +93 -0
  49. package/generated/ControlAccountsMigrationRollbackRequest.schema.json +18 -0
  50. package/generated/ControlAccountsMigrationRollbackResponse.schema.json +63 -0
  51. package/generated/ControlCredentialProfileDeleteResponse.schema.json +1 -1
  52. package/generated/ControlCredentialProfilesQueryResponse.schema.json +82 -2
  53. package/generated/ControlCredentialProfilesResponse.schema.json +77 -1
  54. package/generated/ControlCredentialProfilesSnapshotResponse.schema.json +79 -2
  55. package/generated/ControlHarnessAccountPool.schema.json +79 -0
  56. package/generated/ControlHarnessSettingsPatch.schema.json +2 -1
  57. package/generated/ControlPoolNextUp.schema.json +63 -0
  58. package/generated/ControlQuotaResponse.schema.json +2 -1
  59. package/generated/ControlRunDetail.schema.json +2 -1
  60. package/generated/ControlRunListResponse.schema.json +2 -1
  61. package/generated/ControlRunSummary.schema.json +2 -1
  62. package/generated/ControlSettingsSnapshot.schema.json +3 -2
  63. package/generated/ControlSettingsUpdateRequest.schema.json +2 -1
  64. package/generated/GlobalConfig.schema.json +3 -2
  65. package/generated/HarnessEvent.schema.json +2 -1
  66. package/generated/McpRunHandleResult.schema.json +2 -1
  67. package/generated/McpRunToolResult.schema.json +2 -1
  68. package/generated/RunEvent.schema.json +4 -0
  69. package/generated/RunFailure.schema.json +2 -1
  70. package/package.json +2 -2
package/dist/quota.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"quota.js","sourceRoot":"","sources":["../src/quota.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC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,EAAE,EAAE,CAAC;YAChE,eAAe,GAAG,OAAO,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,OAAO,iBAAiB,CAAC,KAAK,CAAC;QAC7B,KAAK,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU;QACpF,oBAAoB,EAAE,QAAQ;QAC9B,SAAS,EAAE,eAAe,EAAE,GAAG,IAAI,IAAI;QACvC,wBAAwB,EAAE,iBAAiB;KAC5C,CAAC,CAAC;AACL,CAAC;AAED;;iEAEiE;AACjE,MAAM,UAAU,qBAAqB,CACnC,QAA8B,EAC9B,IAAI,GAA0C,EAAE;IAEhD,OAAO;QACL,GAAG,QAAQ;QACX,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAC/C,GAAG,QAAQ;YACX,YAAY,EAAE,yBAAyB,CAAC,QAAQ,EAAE,IAAI,CAAC;SACxD,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC"}
@@ -17,4 +17,13 @@ export declare const RateLimitSignal: z.ZodObject<{
17
17
  retry_delay_ms?: number | null | undefined;
18
18
  }>;
19
19
  export type RateLimitSignal = z.infer<typeof RateLimitSignal>;
20
+ /**
21
+ * End of a vendor-reported DAY-granular reset day as a UTC instant — the
22
+ * honest cooldown bound when a vendor names the reset day but no instant
23
+ * (cursor's "your monthly cycle ends on M/D/YYYY", carried by the adapter as
24
+ * `payload.vendor_reset_day = "YYYY-MM-DD"` precisely because fabricating a
25
+ * midnight `resets_at` would overclaim). Next-midnight UTC covers the whole
26
+ * named day; null for an absent, malformed, or non-calendar value.
27
+ */
28
+ export declare function vendorResetDayCooldownEnd(payload: unknown): string | null;
20
29
  //# sourceMappingURL=rate-limit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rate-limit.d.ts","sourceRoot":"","sources":["../src/rate-limit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,2EAA2E;AAC3E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAuB1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"rate-limit.d.ts","sourceRoot":"","sources":["../src/rate-limit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,2EAA2E;AAC3E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAuB1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAWzE"}
@@ -21,4 +21,25 @@ export const RateLimitSignal = z.object({
21
21
  .default(null)
22
22
  .describe("Suggested retry delay in milliseconds, when reported."),
23
23
  });
24
+ /**
25
+ * End of a vendor-reported DAY-granular reset day as a UTC instant — the
26
+ * honest cooldown bound when a vendor names the reset day but no instant
27
+ * (cursor's "your monthly cycle ends on M/D/YYYY", carried by the adapter as
28
+ * `payload.vendor_reset_day = "YYYY-MM-DD"` precisely because fabricating a
29
+ * midnight `resets_at` would overclaim). Next-midnight UTC covers the whole
30
+ * named day; null for an absent, malformed, or non-calendar value.
31
+ */
32
+ export function vendorResetDayCooldownEnd(payload) {
33
+ const day = typeof payload === "object" && payload !== null && !Array.isArray(payload)
34
+ ? payload["vendor_reset_day"]
35
+ : null;
36
+ if (typeof day !== "string" || !/^\d{4}-\d{2}-\d{2}$/.test(day))
37
+ return null;
38
+ const start = Date.parse(`${day}T00:00:00.000Z`);
39
+ // Date.parse rolls invalid calendar days over (Feb 31 -> Mar 3); the
40
+ // round-trip check rejects a value that names no real day.
41
+ if (!Number.isFinite(start) || !new Date(start).toISOString().startsWith(day))
42
+ return null;
43
+ return new Date(start + 24 * 60 * 60_000).toISOString();
44
+ }
24
45
  //# sourceMappingURL=rate-limit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rate-limit.js","sourceRoot":"","sources":["../src/rate-limit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,aAAa,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACnC,oFAAoF,CACrF;IACD,iBAAiB,EAAE,CAAC;SACjB,KAAK,CAAC,EAAE,CAAC;SACT,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CACP,wFAAwF,CACzF;IACH,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,6CAA6C,CAAC;IAC1D,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,GAAG,EAAE;SACL,WAAW,EAAE;SACb,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,uDAAuD,CAAC;CACrE,CAAC,CAAC"}
1
+ {"version":3,"file":"rate-limit.js","sourceRoot":"","sources":["../src/rate-limit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,aAAa,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACnC,oFAAoF,CACrF;IACD,i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MigrationFile",
3
+ "definitions": {
4
+ "AccountsUnifiedMigrationFile": {
5
+ "type": "object",
6
+ "additionalProperties": {
7
+ "type": "object",
8
+ "properties": {
9
+ "phase": {
10
+ "type": "string",
11
+ "enum": [
12
+ "reserved",
13
+ "registry_written",
14
+ "continuity_migrated",
15
+ "completed",
16
+ "rolling_back"
17
+ ],
18
+ "description": "Crash-recoverable migration phase for one harness: reserved (id + backup persisted) → registry_written (row in config) → continuity_migrated (sessions/checkpoints/lane homes on the row id) → completed (legacy null quota subject retired). rolling_back marks an in-flight rollback: the startup migration never resumes it forward; re-running the rollback command finishes it."
19
+ },
20
+ "row_id": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "description": "The reserved registry row id (claude-default / codex-default, deterministic -2 suffix on collision) — persisted BEFORE any other phase so a crash can never re-reserve a different id."
24
+ },
25
+ "legacy_aliases": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": [
29
+ "string",
30
+ "null"
31
+ ]
32
+ },
33
+ "description": "Every legacy identity this row absorbed — [null] for the engine-default subject. Deletion of the row must retire the canonical id PLUS these aliases in one lifecycle operation."
34
+ },
35
+ "locator": {
36
+ "type": "string",
37
+ "description": "The exact legacy native store dir registered as the row's isolation_locator (bytes never move). Also the delete fence's exact-path allowlist entry for this row."
38
+ },
39
+ "backup_ref": {
40
+ "type": [
41
+ "string",
42
+ "null"
43
+ ],
44
+ "description": "Pre-migration backup directory (config.yaml copy), the manual-recovery half of the supported downgrade path; null when the backup could not be written."
45
+ }
46
+ },
47
+ "required": [
48
+ "phase",
49
+ "row_id",
50
+ "legacy_aliases",
51
+ "locator",
52
+ "backup_ref"
53
+ ],
54
+ "additionalProperties": false,
55
+ "description": "Per-harness unified-accounts migration record."
56
+ },
57
+ "description": "accounts-unified.json: harness id → unified-accounts migration record."
58
+ }
59
+ },
60
+ "$schema": "http://json-schema.org/draft-07/schema#"
61
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "$ref": "#/definitions/ControlAccountPoolsResponse",
3
+ "definitions": {
4
+ "ControlAccountPoolsResponse": {
5
+ "type": "object",
6
+ "properties": {
7
+ "accountPools": {
8
+ "type": "array",
9
+ "items": {
10
+ "type": "object",
11
+ "properties": {
12
+ "harness_id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "description": "Harness family this pool verdict belongs to."
16
+ },
17
+ "next_up": {
18
+ "anyOf": [
19
+ {
20
+ "type": "object",
21
+ "properties": {
22
+ "kind": {
23
+ "type": "string",
24
+ "const": "profile"
25
+ },
26
+ "profileId": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "description": "Non-empty identifier string."
30
+ }
31
+ },
32
+ "required": [
33
+ "kind",
34
+ "profileId"
35
+ ],
36
+ "additionalProperties": false,
37
+ "description": "An enabled account row is who an unpinned run routes to next."
38
+ },
39
+ {
40
+ "type": "object",
41
+ "properties": {
42
+ "kind": {
43
+ "type": "string",
44
+ "const": "api_key_route"
45
+ }
46
+ },
47
+ "required": [
48
+ "kind"
49
+ ],
50
+ "additionalProperties": false,
51
+ "description": "The account pool is empty or exhausted; the unpinned route is the policy-governed API key (INV-061) — a route, never an account row."
52
+ },
53
+ {
54
+ "type": "object",
55
+ "properties": {
56
+ "kind": {
57
+ "type": "string",
58
+ "const": "none"
59
+ },
60
+ "reason": {
61
+ "type": "string"
62
+ }
63
+ },
64
+ "required": [
65
+ "kind",
66
+ "reason"
67
+ ],
68
+ "additionalProperties": false,
69
+ "description": "An unpinned run has nothing routable, with a human reason."
70
+ }
71
+ ],
72
+ "description": "Server-computed pool routing verdict for one harness's unpinned runs (unified account model)."
73
+ }
74
+ },
75
+ "required": [
76
+ "harness_id",
77
+ "next_up"
78
+ ],
79
+ "additionalProperties": false,
80
+ "description": "Per-harness pool authority (unified account model): who an unpinned run routes to next."
81
+ },
82
+ "description": "Pool routing verdict per harness, computed by the routing owner."
83
+ }
84
+ },
85
+ "required": [
86
+ "accountPools"
87
+ ],
88
+ "additionalProperties": false,
89
+ "description": "Per-harness account-pool authority under the unified account model."
90
+ }
91
+ },
92
+ "$schema": "http://json-schema.org/draft-07/schema#"
93
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$ref": "#/definitions/ControlAccountsMigrationRollbackRequest",
3
+ "definitions": {
4
+ "ControlAccountsMigrationRollbackRequest": {
5
+ "type": "object",
6
+ "properties": {
7
+ "harnessId": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "description": "Roll back one harness's migration; omitted = every migrated harness."
11
+ }
12
+ },
13
+ "additionalProperties": false,
14
+ "description": "Request body for POST /accounts-migration/rollback."
15
+ }
16
+ },
17
+ "$schema": "http://json-schema.org/draft-07/schema#"
18
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "$ref": "#/definitions/ControlAccountsMigrationRollbackResponse",
3
+ "definitions": {
4
+ "ControlAccountsMigrationRollbackResponse": {
5
+ "type": "object",
6
+ "properties": {
7
+ "rolledBack": {
8
+ "type": "array",
9
+ "items": {
10
+ "type": "object",
11
+ "properties": {
12
+ "harness_id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "description": "Non-empty identifier string."
16
+ },
17
+ "row_id": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "description": "The auto-registered row the rollback removed."
21
+ },
22
+ "sessions": {
23
+ "type": "integer",
24
+ "description": "Thread sessions returned to the null engine-default subject."
25
+ },
26
+ "checkpoints": {
27
+ "type": "integer",
28
+ "description": "Lane checkpoints re-seeded onto the null lane."
29
+ },
30
+ "lanes": {
31
+ "type": "integer",
32
+ "description": "Durable lane home dirs renamed back."
33
+ },
34
+ "skipped_partitions": {
35
+ "type": "array",
36
+ "items": {
37
+ "type": "string"
38
+ },
39
+ "description": "Quarantined project partitions whose sessions could NOT be rolled back (disclosed residual: recover them and rerun the rollback before downgrading)."
40
+ }
41
+ },
42
+ "required": [
43
+ "harness_id",
44
+ "row_id",
45
+ "sessions",
46
+ "checkpoints",
47
+ "lanes",
48
+ "skipped_partitions"
49
+ ],
50
+ "additionalProperties": false
51
+ },
52
+ "description": "Per-harness rollback receipts (empty when nothing was migrated)."
53
+ }
54
+ },
55
+ "required": [
56
+ "rolledBack"
57
+ ],
58
+ "additionalProperties": false,
59
+ "description": "Receipt for a unified-accounts migration rollback."
60
+ }
61
+ },
62
+ "$schema": "http://json-schema.org/draft-07/schema#"
63
+ }
@@ -91,7 +91,7 @@
91
91
  },
92
92
  "cleanupWarning": {
93
93
  "type": "string",
94
- "description": "Present when the registry entry was removed but cleanup failed (orphan left)."
94
+ "description": "DEPRECATED (wire-compat only): a unified-model engine never emits it — partial cleanup is a typed retryable error instead of a removed-with-warning receipt."
95
95
  }
96
96
  },
97
97
  "required": [
@@ -284,7 +284,83 @@
284
284
  "description": "Per-harness accounts authority: native CLI-login state + the informational next-up identity."
285
285
  },
286
286
  "default": [],
287
- "description": "Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry."
287
+ "description": "Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry. A unified-model engine emits [] here (the key must stay present for legacy strict clients) and carries routing facts in accountPools instead."
288
+ },
289
+ "accountPools": {
290
+ "type": "array",
291
+ "items": {
292
+ "type": "object",
293
+ "properties": {
294
+ "harness_id": {
295
+ "type": "string",
296
+ "minLength": 1,
297
+ "description": "Harness family this pool verdict belongs to."
298
+ },
299
+ "next_up": {
300
+ "anyOf": [
301
+ {
302
+ "type": "object",
303
+ "properties": {
304
+ "kind": {
305
+ "type": "string",
306
+ "const": "profile"
307
+ },
308
+ "profileId": {
309
+ "$ref": "#/definitions/ControlCredentialProfilesQueryResponse/anyOf/0/properties/profiles/items/properties/status/properties/profile_id"
310
+ }
311
+ },
312
+ "required": [
313
+ "kind",
314
+ "profileId"
315
+ ],
316
+ "additionalProperties": false,
317
+ "description": "An enabled account row is who an unpinned run routes to next."
318
+ },
319
+ {
320
+ "type": "object",
321
+ "properties": {
322
+ "kind": {
323
+ "type": "string",
324
+ "const": "api_key_route"
325
+ }
326
+ },
327
+ "required": [
328
+ "kind"
329
+ ],
330
+ "additionalProperties": false,
331
+ "description": "The account pool is empty or exhausted; the unpinned route is the policy-governed API key (INV-061) — a route, never an account row."
332
+ },
333
+ {
334
+ "type": "object",
335
+ "properties": {
336
+ "kind": {
337
+ "type": "string",
338
+ "const": "none"
339
+ },
340
+ "reason": {
341
+ "type": "string"
342
+ }
343
+ },
344
+ "required": [
345
+ "kind",
346
+ "reason"
347
+ ],
348
+ "additionalProperties": false,
349
+ "description": "An unpinned run has nothing routable, with a human reason."
350
+ }
351
+ ],
352
+ "description": "Server-computed pool routing verdict for one harness's unpinned runs (unified account model)."
353
+ }
354
+ },
355
+ "required": [
356
+ "harness_id",
357
+ "next_up"
358
+ ],
359
+ "additionalProperties": false,
360
+ "description": "Per-harness pool authority (unified account model): who an unpinned run routes to next."
361
+ },
362
+ "default": [],
363
+ "description": "Additive per-harness pool authority of the unified account model: routing facts (next_up incl. the api_key_route kind) live here so legacy strict next_up decoders never see unknown kinds. Old clients ignore this key."
288
364
  }
289
365
  },
290
366
  "required": [
@@ -302,6 +378,9 @@
302
378
  "harnessAccounts": {
303
379
  "$ref": "#/definitions/ControlCredentialProfilesQueryResponse/anyOf/0/properties/harnessAccounts"
304
380
  },
381
+ "accountPools": {
382
+ "$ref": "#/definitions/ControlCredentialProfilesQueryResponse/anyOf/0/properties/accountPools"
383
+ },
305
384
  "harnesses": {
306
385
  "type": "array",
307
386
  "items": {
@@ -1244,7 +1323,8 @@
1244
1323
  "claude_statusline",
1245
1324
  "claude_api_retry",
1246
1325
  "claude_oauth_usage",
1247
- "agy_command_usage"
1326
+ "agy_command_usage",
1327
+ "cursor_rate_limit"
1248
1328
  ],
1249
1329
  "description": "Machine-readable source of quota evidence, classified by schema-owned traits."
1250
1330
  },
@@ -282,7 +282,83 @@
282
282
  "description": "Per-harness accounts authority: native CLI-login state + the informational next-up identity."
283
283
  },
284
284
  "default": [],
285
- "description": "Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry."
285
+ "description": "Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry. A unified-model engine emits [] here (the key must stay present for legacy strict clients) and carries routing facts in accountPools instead."
286
+ },
287
+ "accountPools": {
288
+ "type": "array",
289
+ "items": {
290
+ "type": "object",
291
+ "properties": {
292
+ "harness_id": {
293
+ "type": "string",
294
+ "minLength": 1,
295
+ "description": "Harness family this pool verdict belongs to."
296
+ },
297
+ "next_up": {
298
+ "anyOf": [
299
+ {
300
+ "type": "object",
301
+ "properties": {
302
+ "kind": {
303
+ "type": "string",
304
+ "const": "profile"
305
+ },
306
+ "profileId": {
307
+ "$ref": "#/definitions/ControlCredentialProfilesResponse/properties/profiles/items/properties/status/properties/profile_id"
308
+ }
309
+ },
310
+ "required": [
311
+ "kind",
312
+ "profileId"
313
+ ],
314
+ "additionalProperties": false,
315
+ "description": "An enabled account row is who an unpinned run routes to next."
316
+ },
317
+ {
318
+ "type": "object",
319
+ "properties": {
320
+ "kind": {
321
+ "type": "string",
322
+ "const": "api_key_route"
323
+ }
324
+ },
325
+ "required": [
326
+ "kind"
327
+ ],
328
+ "additionalProperties": false,
329
+ "description": "The account pool is empty or exhausted; the unpinned route is the policy-governed API key (INV-061) — a route, never an account row."
330
+ },
331
+ {
332
+ "type": "object",
333
+ "properties": {
334
+ "kind": {
335
+ "type": "string",
336
+ "const": "none"
337
+ },
338
+ "reason": {
339
+ "type": "string"
340
+ }
341
+ },
342
+ "required": [
343
+ "kind",
344
+ "reason"
345
+ ],
346
+ "additionalProperties": false,
347
+ "description": "An unpinned run has nothing routable, with a human reason."
348
+ }
349
+ ],
350
+ "description": "Server-computed pool routing verdict for one harness's unpinned runs (unified account model)."
351
+ }
352
+ },
353
+ "required": [
354
+ "harness_id",
355
+ "next_up"
356
+ ],
357
+ "additionalProperties": false,
358
+ "description": "Per-harness pool authority (unified account model): who an unpinned run routes to next."
359
+ },
360
+ "default": [],
361
+ "description": "Additive per-harness pool authority of the unified account model: routing facts (next_up incl. the api_key_route kind) live here so legacy strict next_up decoders never see unknown kinds. Old clients ignore this key."
286
362
  }
287
363
  },
288
364
  "required": [
@@ -282,7 +282,83 @@
282
282
  "description": "Per-harness accounts authority: native CLI-login state + the informational next-up identity."
283
283
  },
284
284
  "default": [],
285
- "description": "Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry."
285
+ "description": "Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry. A unified-model engine emits [] here (the key must stay present for legacy strict clients) and carries routing facts in accountPools instead."
286
+ },
287
+ "accountPools": {
288
+ "type": "array",
289
+ "items": {
290
+ "type": "object",
291
+ "properties": {
292
+ "harness_id": {
293
+ "type": "string",
294
+ "minLength": 1,
295
+ "description": "Harness family this pool verdict belongs to."
296
+ },
297
+ "next_up": {
298
+ "anyOf": [
299
+ {
300
+ "type": "object",
301
+ "properties": {
302
+ "kind": {
303
+ "type": "string",
304
+ "const": "profile"
305
+ },
306
+ "profileId": {
307
+ "$ref": "#/definitions/ControlCredentialProfilesSnapshotResponse/properties/profiles/items/properties/status/properties/profile_id"
308
+ }
309
+ },
310
+ "required": [
311
+ "kind",
312
+ "profileId"
313
+ ],
314
+ "additionalProperties": false,
315
+ "description": "An enabled account row is who an unpinned run routes to next."
316
+ },
317
+ {
318
+ "type": "object",
319
+ "properties": {
320
+ "kind": {
321
+ "type": "string",
322
+ "const": "api_key_route"
323
+ }
324
+ },
325
+ "required": [
326
+ "kind"
327
+ ],
328
+ "additionalProperties": false,
329
+ "description": "The account pool is empty or exhausted; the unpinned route is the policy-governed API key (INV-061) — a route, never an account row."
330
+ },
331
+ {
332
+ "type": "object",
333
+ "properties": {
334
+ "kind": {
335
+ "type": "string",
336
+ "const": "none"
337
+ },
338
+ "reason": {
339
+ "type": "string"
340
+ }
341
+ },
342
+ "required": [
343
+ "kind",
344
+ "reason"
345
+ ],
346
+ "additionalProperties": false,
347
+ "description": "An unpinned run has nothing routable, with a human reason."
348
+ }
349
+ ],
350
+ "description": "Server-computed pool routing verdict for one harness's unpinned runs (unified account model)."
351
+ }
352
+ },
353
+ "required": [
354
+ "harness_id",
355
+ "next_up"
356
+ ],
357
+ "additionalProperties": false,
358
+ "description": "Per-harness pool authority (unified account model): who an unpinned run routes to next."
359
+ },
360
+ "default": [],
361
+ "description": "Additive per-harness pool authority of the unified account model: routing facts (next_up incl. the api_key_route kind) live here so legacy strict next_up decoders never see unknown kinds. Old clients ignore this key."
286
362
  },
287
363
  "harnesses": {
288
364
  "type": "array",
@@ -1226,7 +1302,8 @@
1226
1302
  "claude_statusline",
1227
1303
  "claude_api_retry",
1228
1304
  "claude_oauth_usage",
1229
- "agy_command_usage"
1305
+ "agy_command_usage",
1306
+ "cursor_rate_limit"
1230
1307
  ],
1231
1308
  "description": "Machine-readable source of quota evidence, classified by schema-owned traits."
1232
1309
  },