@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.
- package/dist/accounts-migration.d.ts +112 -0
- package/dist/accounts-migration.d.ts.map +1 -0
- package/dist/accounts-migration.js +74 -0
- package/dist/accounts-migration.js.map +1 -0
- package/dist/config.d.ts +38 -22
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +26 -6
- package/dist/config.js.map +1 -1
- package/dist/control-operation-responses.d.ts +7 -7
- package/dist/control-run-detail.d.ts +19 -19
- package/dist/control-run-failure.d.ts +4 -4
- package/dist/control-run-failure.d.ts.map +1 -1
- package/dist/control-run-failure.js +7 -1
- package/dist/control-run-failure.js.map +1 -1
- package/dist/control.d.ts +23 -23
- package/dist/control.d.ts.map +1 -1
- package/dist/control.js +8 -8
- package/dist/control.js.map +1 -1
- package/dist/credential-profile-snapshot.d.ts +236 -14
- package/dist/credential-profile-snapshot.d.ts.map +1 -1
- package/dist/credential-profile.d.ts +307 -7
- package/dist/credential-profile.d.ts.map +1 -1
- package/dist/credential-profile.js +104 -9
- package/dist/credential-profile.js.map +1 -1
- package/dist/credential-store.d.ts +19 -6
- package/dist/credential-store.d.ts.map +1 -1
- package/dist/credential-store.js +21 -6
- package/dist/credential-store.js.map +1 -1
- package/dist/events.d.ts +44 -4
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +34 -0
- package/dist/events.js.map +1 -1
- package/dist/harness.d.ts +5 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-run-result.d.ts +10 -10
- package/dist/quota.d.ts +33 -12
- package/dist/quota.d.ts.map +1 -1
- package/dist/quota.js +32 -0
- package/dist/quota.js.map +1 -1
- package/dist/rate-limit.d.ts +9 -0
- package/dist/rate-limit.d.ts.map +1 -1
- package/dist/rate-limit.js +21 -0
- package/dist/rate-limit.js.map +1 -1
- package/generated/AccountsUnifiedMigrationFile.schema.json +61 -0
- package/generated/ControlAccountPoolsResponse.schema.json +93 -0
- package/generated/ControlAccountsMigrationRollbackRequest.schema.json +18 -0
- package/generated/ControlAccountsMigrationRollbackResponse.schema.json +63 -0
- package/generated/ControlCredentialProfileDeleteResponse.schema.json +1 -1
- package/generated/ControlCredentialProfilesQueryResponse.schema.json +82 -2
- package/generated/ControlCredentialProfilesResponse.schema.json +77 -1
- package/generated/ControlCredentialProfilesSnapshotResponse.schema.json +79 -2
- package/generated/ControlHarnessAccountPool.schema.json +79 -0
- package/generated/ControlHarnessSettingsPatch.schema.json +2 -1
- package/generated/ControlPoolNextUp.schema.json +63 -0
- package/generated/ControlQuotaResponse.schema.json +2 -1
- package/generated/ControlRunDetail.schema.json +2 -1
- package/generated/ControlRunListResponse.schema.json +2 -1
- package/generated/ControlRunSummary.schema.json +2 -1
- package/generated/ControlSettingsSnapshot.schema.json +3 -2
- package/generated/ControlSettingsUpdateRequest.schema.json +2 -1
- package/generated/GlobalConfig.schema.json +3 -2
- package/generated/HarnessEvent.schema.json +2 -1
- package/generated/McpRunHandleResult.schema.json +2 -1
- package/generated/McpRunToolResult.schema.json +2 -1
- package/generated/RunEvent.schema.json +4 -0
- package/generated/RunFailure.schema.json +2 -1
- package/package.json +2 -2
package/dist/events.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const ThreadHeadPing: z.ZodObject<{
|
|
|
36
36
|
revision: number;
|
|
37
37
|
}>;
|
|
38
38
|
export type ThreadHeadPing = z.infer<typeof ThreadHeadPing>;
|
|
39
|
-
export declare const RunEventType: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "project.claude_bridge.created", "budget.lease.created", "budget.observation", "budget.cash", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.profile.headroom_exceeded", "route.profile.rotated", "route.profile.rotation_exhausted", "route.transient.exhausted", "route.fallback.auth_switched", "route.primary.diverged", "route.pool.degraded", "session.continuity", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "plan.questions", "plan.brief.materialized", "council.started", "council.draft", "council.member.failed", "council.merged", "budget.quota_pressure", "delegation.belt.unavailable", "delegation.belt.degraded", "output.ready", "gate.started", "gate.completed", "review.preflight", "review.started", "review.skipped", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed", "run.continuation", "run.continuation.denied"]>;
|
|
39
|
+
export declare const RunEventType: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "project.claude_bridge.created", "budget.lease.created", "budget.observation", "budget.cash", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.profile.headroom_exceeded", "route.profile.rotated", "route.profile.rotation_exhausted", "route.profile.credential_unusable", "route.account.pool_selected", "route.account.lane_switch", "route.account.pool_exhausted", "route.transient.exhausted", "route.fallback.auth_switched", "route.primary.diverged", "route.pool.degraded", "session.continuity", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "plan.questions", "plan.brief.materialized", "council.started", "council.draft", "council.member.failed", "council.merged", "budget.quota_pressure", "delegation.belt.unavailable", "delegation.belt.degraded", "output.ready", "gate.started", "gate.completed", "review.preflight", "review.started", "review.skipped", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed", "run.continuation", "run.continuation.denied"]>;
|
|
40
40
|
export type RunEventType = z.infer<typeof RunEventType>;
|
|
41
41
|
/**
|
|
42
42
|
* Typed receipt emitted only after a user-facing run artifact has materialized.
|
|
@@ -58,6 +58,46 @@ export declare const OutputReadyPayload: z.ZodObject<{
|
|
|
58
58
|
state?: "diagnostic" | "ready" | undefined;
|
|
59
59
|
}>;
|
|
60
60
|
export type OutputReadyPayload = z.infer<typeof OutputReadyPayload>;
|
|
61
|
+
/**
|
|
62
|
+
* Typed payload for `route.profile.credential_unusable` (A7): the differential
|
|
63
|
+
* probe's observation plus the attempt it fired in. The rotation module
|
|
64
|
+
* validates this before stamping it onto the RunEvent payload, so the
|
|
65
|
+
* unusable verdict is always evidence-backed — code, source, and expiry come
|
|
66
|
+
* from the observation itself, never invented at emit time.
|
|
67
|
+
*/
|
|
68
|
+
export declare const RouteCredentialUnusablePayload: z.ZodObject<{
|
|
69
|
+
harness_id: z.ZodString;
|
|
70
|
+
profile_id: z.ZodNullable<z.ZodString>;
|
|
71
|
+
model: z.ZodNullable<z.ZodString>;
|
|
72
|
+
code: z.ZodEnum<["auth_revoked", "capability_refused", "verification_failed"]>;
|
|
73
|
+
source: z.ZodEnum<["vendor_poller", "attempt_stream", "local_probe"]>;
|
|
74
|
+
detail: z.ZodNullable<z.ZodString>;
|
|
75
|
+
observed_at: z.ZodString;
|
|
76
|
+
expires_at: z.ZodString;
|
|
77
|
+
} & {
|
|
78
|
+
attempt_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
79
|
+
}, "strict", z.ZodTypeAny, {
|
|
80
|
+
harness_id: string;
|
|
81
|
+
profile_id: string | null;
|
|
82
|
+
model: string | null;
|
|
83
|
+
code: "auth_revoked" | "capability_refused" | "verification_failed";
|
|
84
|
+
source: "attempt_stream" | "local_probe" | "vendor_poller";
|
|
85
|
+
detail: string | null;
|
|
86
|
+
observed_at: string;
|
|
87
|
+
expires_at: string;
|
|
88
|
+
attempt_id: string | null;
|
|
89
|
+
}, {
|
|
90
|
+
harness_id: string;
|
|
91
|
+
profile_id: string | null;
|
|
92
|
+
model: string | null;
|
|
93
|
+
code: "auth_revoked" | "capability_refused" | "verification_failed";
|
|
94
|
+
source: "attempt_stream" | "local_probe" | "vendor_poller";
|
|
95
|
+
detail: string | null;
|
|
96
|
+
observed_at: string;
|
|
97
|
+
expires_at: string;
|
|
98
|
+
attempt_id?: string | null | undefined;
|
|
99
|
+
}>;
|
|
100
|
+
export type RouteCredentialUnusablePayload = z.infer<typeof RouteCredentialUnusablePayload>;
|
|
61
101
|
/**
|
|
62
102
|
* Typed payload for `route.fallback.*` events. The orchestrator validates this
|
|
63
103
|
* before stamping it onto the (otherwise free-form) RunEvent.payload, so a
|
|
@@ -185,7 +225,7 @@ export declare const RunEvent: z.ZodObject<{
|
|
|
185
225
|
/** Thread this run is a turn of, when any. Lets the global event multiplex
|
|
186
226
|
* route live progress to a chat surface without a reverse job lookup. */
|
|
187
227
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
188
|
-
type: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "project.claude_bridge.created", "budget.lease.created", "budget.observation", "budget.cash", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.profile.headroom_exceeded", "route.profile.rotated", "route.profile.rotation_exhausted", "route.transient.exhausted", "route.fallback.auth_switched", "route.primary.diverged", "route.pool.degraded", "session.continuity", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "plan.questions", "plan.brief.materialized", "council.started", "council.draft", "council.member.failed", "council.merged", "budget.quota_pressure", "delegation.belt.unavailable", "delegation.belt.degraded", "output.ready", "gate.started", "gate.completed", "review.preflight", "review.started", "review.skipped", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed", "run.continuation", "run.continuation.denied"]>;
|
|
228
|
+
type: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "project.claude_bridge.created", "budget.lease.created", "budget.observation", "budget.cash", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.profile.headroom_exceeded", "route.profile.rotated", "route.profile.rotation_exhausted", "route.profile.credential_unusable", "route.account.pool_selected", "route.account.lane_switch", "route.account.pool_exhausted", "route.transient.exhausted", "route.fallback.auth_switched", "route.primary.diverged", "route.pool.degraded", "session.continuity", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "plan.questions", "plan.brief.materialized", "council.started", "council.draft", "council.member.failed", "council.merged", "budget.quota_pressure", "delegation.belt.unavailable", "delegation.belt.degraded", "output.ready", "gate.started", "gate.completed", "review.preflight", "review.started", "review.skipped", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed", "run.continuation", "run.continuation.denied"]>;
|
|
189
229
|
payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
190
230
|
}, "strip", z.ZodTypeAny, {
|
|
191
231
|
seq?: number | undefined;
|
|
@@ -193,7 +233,7 @@ export declare const RunEvent: z.ZodObject<{
|
|
|
193
233
|
run_id: string;
|
|
194
234
|
task_id: string;
|
|
195
235
|
thread_id?: string | undefined;
|
|
196
|
-
type: "arbitration.completed" | "budget.cash" | "budget.lease.created" | "budget.observation" | "budget.quota_pressure" | "context.pack.created" | "control.applied" | "control.rejected" | "control.requested" | "council.draft" | "council.member.failed" | "council.merged" | "council.started" | "delegation.belt.degraded" | "delegation.belt.unavailable" | "finding.revalidated" | "gate.completed" | "gate.started" | "harness.completed" | "harness.event" | "harness.started" | "interaction.answer_discarded" | "interaction.answered" | "interaction.requested" | "interaction.timeout" | "output.ready" | "plan.brief.materialized" | "plan.progress" | "plan.questions" | "policy.web.upgraded" | "project.claude_bridge.created" | "project.git.initialized" | "review.preflight" | "review.skipped" | "review.started" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.failed" | "reviewer.first_event" | "reviewer.started" | "reviewer.timed_out" | "route.fallback.auth_switched" | "route.fallback.completed" | "route.fallback.exhausted" | "route.fallback.started" | "route.pool.degraded" | "route.primary.diverged" | "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.profile.rotation_exhausted" | "route.transient.detected" | "route.transient.exhausted" | "route.transient.retry_scheduled" | "run.blocked" | "run.completed" | "run.continuation" | "run.continuation.denied" | "run.created" | "run.failed" | "session.continuity" | "synthesis.started" | "task.contract.created" | "work_product.adopted" | "work_product.emitted";
|
|
236
|
+
type: "arbitration.completed" | "budget.cash" | "budget.lease.created" | "budget.observation" | "budget.quota_pressure" | "context.pack.created" | "control.applied" | "control.rejected" | "control.requested" | "council.draft" | "council.member.failed" | "council.merged" | "council.started" | "delegation.belt.degraded" | "delegation.belt.unavailable" | "finding.revalidated" | "gate.completed" | "gate.started" | "harness.completed" | "harness.event" | "harness.started" | "interaction.answer_discarded" | "interaction.answered" | "interaction.requested" | "interaction.timeout" | "output.ready" | "plan.brief.materialized" | "plan.progress" | "plan.questions" | "policy.web.upgraded" | "project.claude_bridge.created" | "project.git.initialized" | "review.preflight" | "review.skipped" | "review.started" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.failed" | "reviewer.first_event" | "reviewer.started" | "reviewer.timed_out" | "route.account.lane_switch" | "route.account.pool_exhausted" | "route.account.pool_selected" | "route.fallback.auth_switched" | "route.fallback.completed" | "route.fallback.exhausted" | "route.fallback.started" | "route.pool.degraded" | "route.primary.diverged" | "route.profile.credential_unusable" | "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.profile.rotation_exhausted" | "route.transient.detected" | "route.transient.exhausted" | "route.transient.retry_scheduled" | "run.blocked" | "run.completed" | "run.continuation" | "run.continuation.denied" | "run.created" | "run.failed" | "session.continuity" | "synthesis.started" | "task.contract.created" | "work_product.adopted" | "work_product.emitted";
|
|
197
237
|
payload: Record<string, unknown>;
|
|
198
238
|
}, {
|
|
199
239
|
seq?: number | undefined;
|
|
@@ -201,7 +241,7 @@ export declare const RunEvent: z.ZodObject<{
|
|
|
201
241
|
run_id: string;
|
|
202
242
|
task_id: string;
|
|
203
243
|
thread_id?: string | undefined;
|
|
204
|
-
type: "arbitration.completed" | "budget.cash" | "budget.lease.created" | "budget.observation" | "budget.quota_pressure" | "context.pack.created" | "control.applied" | "control.rejected" | "control.requested" | "council.draft" | "council.member.failed" | "council.merged" | "council.started" | "delegation.belt.degraded" | "delegation.belt.unavailable" | "finding.revalidated" | "gate.completed" | "gate.started" | "harness.completed" | "harness.event" | "harness.started" | "interaction.answer_discarded" | "interaction.answered" | "interaction.requested" | "interaction.timeout" | "output.ready" | "plan.brief.materialized" | "plan.progress" | "plan.questions" | "policy.web.upgraded" | "project.claude_bridge.created" | "project.git.initialized" | "review.preflight" | "review.skipped" | "review.started" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.failed" | "reviewer.first_event" | "reviewer.started" | "reviewer.timed_out" | "route.fallback.auth_switched" | "route.fallback.completed" | "route.fallback.exhausted" | "route.fallback.started" | "route.pool.degraded" | "route.primary.diverged" | "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.profile.rotation_exhausted" | "route.transient.detected" | "route.transient.exhausted" | "route.transient.retry_scheduled" | "run.blocked" | "run.completed" | "run.continuation" | "run.continuation.denied" | "run.created" | "run.failed" | "session.continuity" | "synthesis.started" | "task.contract.created" | "work_product.adopted" | "work_product.emitted";
|
|
244
|
+
type: "arbitration.completed" | "budget.cash" | "budget.lease.created" | "budget.observation" | "budget.quota_pressure" | "context.pack.created" | "control.applied" | "control.rejected" | "control.requested" | "council.draft" | "council.member.failed" | "council.merged" | "council.started" | "delegation.belt.degraded" | "delegation.belt.unavailable" | "finding.revalidated" | "gate.completed" | "gate.started" | "harness.completed" | "harness.event" | "harness.started" | "interaction.answer_discarded" | "interaction.answered" | "interaction.requested" | "interaction.timeout" | "output.ready" | "plan.brief.materialized" | "plan.progress" | "plan.questions" | "policy.web.upgraded" | "project.claude_bridge.created" | "project.git.initialized" | "review.preflight" | "review.skipped" | "review.started" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.failed" | "reviewer.first_event" | "reviewer.started" | "reviewer.timed_out" | "route.account.lane_switch" | "route.account.pool_exhausted" | "route.account.pool_selected" | "route.fallback.auth_switched" | "route.fallback.completed" | "route.fallback.exhausted" | "route.fallback.started" | "route.pool.degraded" | "route.primary.diverged" | "route.profile.credential_unusable" | "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.profile.rotation_exhausted" | "route.transient.detected" | "route.transient.exhausted" | "route.transient.retry_scheduled" | "run.blocked" | "run.completed" | "run.continuation" | "run.continuation.denied" | "run.created" | "run.failed" | "session.continuity" | "synthesis.started" | "task.contract.created" | "work_product.adopted" | "work_product.emitted";
|
|
205
245
|
payload?: Record<string, unknown> | undefined;
|
|
206
246
|
}>;
|
|
207
247
|
export type RunEvent = z.infer<typeof RunEvent>;
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAK3B,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAU4C,CAAC;AAC7E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KA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AK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,iDAAiD;AACjD,eAAO,MAAM,QAAQ;IAEjB;;;;OAIG;;;;;IAYH;6EACyE;;;;;;;;;;;;;;;;;;;;EAKO,CAAC;AACrF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
package/dist/events.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod/v3";
|
|
2
2
|
import { FallbackReason, Id } from "./primitives.js";
|
|
3
3
|
import { AuthMode } from "./budget.js";
|
|
4
|
+
import { CredentialUnusableObservation } from "./credential-profile.js";
|
|
4
5
|
export const ControlJournalEvent = z
|
|
5
6
|
.object({
|
|
6
7
|
schemaVersion: z.literal(1),
|
|
@@ -59,6 +60,25 @@ export const RunEventType = z
|
|
|
59
60
|
"route.profile.headroom_exceeded",
|
|
60
61
|
"route.profile.rotated",
|
|
61
62
|
"route.profile.rotation_exhausted",
|
|
63
|
+
/** A7 differential probe: on a rotation-eligible failure the CURRENT
|
|
64
|
+
* credential subject was probed (existing poller/doctor evidence only —
|
|
65
|
+
* never a quota-spending mini-run) and found UNUSABLE (dead credential,
|
|
66
|
+
* not spent quota). Payload: RouteCredentialUnusablePayload. */
|
|
67
|
+
"route.profile.credential_unusable",
|
|
68
|
+
/** Unified account model (D-U1): an unpinned run's pool selection — the
|
|
69
|
+
* quota-aware pool of enabled+ready rows picked this account. */
|
|
70
|
+
"route.account.pool_selected",
|
|
71
|
+
/** Q1=A disclosed lane switch: the thread's bound account became
|
|
72
|
+
* disabled/deleted/revoked/exhausted and the run moved to a pool sibling
|
|
73
|
+
* (the vendor session starts fresh; continuity hydration is disclosed on
|
|
74
|
+
* the turn). Never silent. */
|
|
75
|
+
"route.account.lane_switch",
|
|
76
|
+
/** Q3=A: the pool is empty or every ready row is exhausted. A null
|
|
77
|
+
* fallback precedes the typed `credential_pool_exhausted` terminal
|
|
78
|
+
* (waiting for the earliest reset is the default);
|
|
79
|
+
* `fallback: "api_key_route"` means the EXPLICIT api_key preference opted
|
|
80
|
+
* the run onto the typed PAID route (INV-061) — never silently under auto. */
|
|
81
|
+
"route.account.pool_exhausted",
|
|
62
82
|
"route.transient.exhausted",
|
|
63
83
|
/** A subscription->API (or harness->harness) auth switch driven by a typed
|
|
64
84
|
* quota/money signal. Distinct from a plain harness rotation; never silent. */
|
|
@@ -172,6 +192,20 @@ export const OutputReadyPayload = z
|
|
|
172
192
|
})
|
|
173
193
|
.strict()
|
|
174
194
|
.describe("Validated payload of an output.ready run event.");
|
|
195
|
+
/**
|
|
196
|
+
* Typed payload for `route.profile.credential_unusable` (A7): the differential
|
|
197
|
+
* probe's observation plus the attempt it fired in. The rotation module
|
|
198
|
+
* validates this before stamping it onto the RunEvent payload, so the
|
|
199
|
+
* unusable verdict is always evidence-backed — code, source, and expiry come
|
|
200
|
+
* from the observation itself, never invented at emit time.
|
|
201
|
+
*/
|
|
202
|
+
export const RouteCredentialUnusablePayload = CredentialUnusableObservation.extend({
|
|
203
|
+
attempt_id: z
|
|
204
|
+
.string()
|
|
205
|
+
.nullable()
|
|
206
|
+
.default(null)
|
|
207
|
+
.describe("Attempt whose rotation-eligible failure triggered the probe, when known."),
|
|
208
|
+
}).describe("Typed payload for route.profile.credential_unusable: the differential probe's typed observation of a dead credential, validated before being stamped onto the RunEvent payload.");
|
|
175
209
|
/**
|
|
176
210
|
* Typed payload for `route.fallback.*` events. The orchestrator validates this
|
|
177
211
|
* before stamping it onto the (otherwise free-form) RunEvent.payload, so a
|
package/dist/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,a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,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IAC3C,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAChD,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IAChD;6EACyE;IACzE,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAC5E,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,8BAA8B,CAAC;CAChG,CAAC;KACD,QAAQ,CAAC,uEAAuE,CAAC,CAAC"}
|
package/dist/harness.d.ts
CHANGED
|
@@ -1869,7 +1869,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1869
1869
|
credential_profile_id: z.ZodOptional<z.ZodString>;
|
|
1870
1870
|
/** Vendor-owned quota windows. All reported windows remain independent. */
|
|
1871
1871
|
quota: z.ZodOptional<z.ZodObject<{
|
|
1872
|
-
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage"]>;
|
|
1872
|
+
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit"]>;
|
|
1873
1873
|
plan_label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1874
1874
|
subject_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1875
1875
|
constraints: z.ZodArray<z.ZodObject<{
|
|
@@ -1901,7 +1901,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1901
1901
|
cooldown_until?: string | null | undefined;
|
|
1902
1902
|
}>, "many">;
|
|
1903
1903
|
}, "strict", z.ZodTypeAny, {
|
|
1904
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
1904
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
1905
1905
|
plan_label: string | null;
|
|
1906
1906
|
subject_id: string | null;
|
|
1907
1907
|
constraints: {
|
|
@@ -1915,7 +1915,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1915
1915
|
cooldown_until: string | null;
|
|
1916
1916
|
}[];
|
|
1917
1917
|
}, {
|
|
1918
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
1918
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
1919
1919
|
plan_label?: string | null | undefined;
|
|
1920
1920
|
subject_id?: string | null | undefined;
|
|
1921
1921
|
constraints: {
|
|
@@ -2114,7 +2114,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
2114
2114
|
credential_source?: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | undefined;
|
|
2115
2115
|
credential_profile_id?: string | undefined;
|
|
2116
2116
|
quota?: {
|
|
2117
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
2117
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
2118
2118
|
plan_label: string | null;
|
|
2119
2119
|
subject_id: string | null;
|
|
2120
2120
|
constraints: {
|
|
@@ -2217,7 +2217,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
2217
2217
|
credential_source?: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | undefined;
|
|
2218
2218
|
credential_profile_id?: string | undefined;
|
|
2219
2219
|
quota?: {
|
|
2220
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
2220
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
2221
2221
|
plan_label?: string | null | undefined;
|
|
2222
2222
|
subject_id?: string | null | undefined;
|
|
2223
2223
|
constraints: {
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from "./output-schema.js";
|
|
|
13
13
|
export * from "./output-schema-dialect.js";
|
|
14
14
|
export * from "./auth.js";
|
|
15
15
|
export * from "./harness-confinement.js";
|
|
16
|
+
export * from "./accounts-migration.js";
|
|
16
17
|
export * from "./credential-profile.js";
|
|
17
18
|
export * from "./credential-profile-snapshot.js";
|
|
18
19
|
export * from "./git-capability.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AA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C;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export * from "./output-schema.js";
|
|
|
13
13
|
export * from "./output-schema-dialect.js";
|
|
14
14
|
export * from "./auth.js";
|
|
15
15
|
export * from "./harness-confinement.js";
|
|
16
|
+
export * from "./accounts-migration.js";
|
|
16
17
|
export * from "./credential-profile.js";
|
|
17
18
|
export * from "./credential-profile-snapshot.js";
|
|
18
19
|
export * from "./git-capability.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAA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cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
package/dist/mcp-run-result.d.ts
CHANGED
|
@@ -475,7 +475,7 @@ export declare const McpRunToolResult: z.ZodObject<{
|
|
|
475
475
|
failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
476
476
|
phase: z.ZodDefault<z.ZodString>;
|
|
477
477
|
category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
|
|
478
|
-
code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete"]>>>;
|
|
478
|
+
code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "credential_pool_exhausted", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete"]>>>;
|
|
479
479
|
harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
480
480
|
attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
481
481
|
safeMessage: z.ZodString;
|
|
@@ -488,7 +488,7 @@ export declare const McpRunToolResult: z.ZodObject<{
|
|
|
488
488
|
}, "strip", z.ZodTypeAny, {
|
|
489
489
|
phase: string;
|
|
490
490
|
category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
|
|
491
|
-
code: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
|
|
491
|
+
code: "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
|
|
492
492
|
harnessId: string | null;
|
|
493
493
|
attemptId: string | null;
|
|
494
494
|
safeMessage: string;
|
|
@@ -501,7 +501,7 @@ export declare const McpRunToolResult: z.ZodObject<{
|
|
|
501
501
|
}, {
|
|
502
502
|
phase?: string | undefined;
|
|
503
503
|
category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
|
|
504
|
-
code?: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
|
|
504
|
+
code?: "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
|
|
505
505
|
harnessId?: string | null | undefined;
|
|
506
506
|
attemptId?: string | null | undefined;
|
|
507
507
|
safeMessage: string;
|
|
@@ -731,7 +731,7 @@ export declare const McpRunToolResult: z.ZodObject<{
|
|
|
731
731
|
failure: {
|
|
732
732
|
phase: string;
|
|
733
733
|
category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
|
|
734
|
-
code: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
|
|
734
|
+
code: "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
|
|
735
735
|
harnessId: string | null;
|
|
736
736
|
attemptId: string | null;
|
|
737
737
|
safeMessage: string;
|
|
@@ -875,7 +875,7 @@ export declare const McpRunToolResult: z.ZodObject<{
|
|
|
875
875
|
failure?: {
|
|
876
876
|
phase?: string | undefined;
|
|
877
877
|
category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
|
|
878
|
-
code?: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
|
|
878
|
+
code?: "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
|
|
879
879
|
harnessId?: string | null | undefined;
|
|
880
880
|
attemptId?: string | null | undefined;
|
|
881
881
|
safeMessage: string;
|
|
@@ -1392,7 +1392,7 @@ export declare const McpRunHandleResult: z.ZodObject<{
|
|
|
1392
1392
|
failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1393
1393
|
phase: z.ZodDefault<z.ZodString>;
|
|
1394
1394
|
category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
|
|
1395
|
-
code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete"]>>>;
|
|
1395
|
+
code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout", "subscription_window_exhausted", "credential_pool_exhausted", "delegated_home_unavailable", "delegated_confinement_unavailable", "delegated_evidence_incomplete"]>>>;
|
|
1396
1396
|
harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1397
1397
|
attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1398
1398
|
safeMessage: z.ZodString;
|
|
@@ -1405,7 +1405,7 @@ export declare const McpRunHandleResult: z.ZodObject<{
|
|
|
1405
1405
|
}, "strip", z.ZodTypeAny, {
|
|
1406
1406
|
phase: string;
|
|
1407
1407
|
category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
|
|
1408
|
-
code: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
|
|
1408
|
+
code: "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
|
|
1409
1409
|
harnessId: string | null;
|
|
1410
1410
|
attemptId: string | null;
|
|
1411
1411
|
safeMessage: string;
|
|
@@ -1418,7 +1418,7 @@ export declare const McpRunHandleResult: z.ZodObject<{
|
|
|
1418
1418
|
}, {
|
|
1419
1419
|
phase?: string | undefined;
|
|
1420
1420
|
category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
|
|
1421
|
-
code?: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
|
|
1421
|
+
code?: "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
|
|
1422
1422
|
harnessId?: string | null | undefined;
|
|
1423
1423
|
attemptId?: string | null | undefined;
|
|
1424
1424
|
safeMessage: string;
|
|
@@ -1703,7 +1703,7 @@ export declare const McpRunHandleResult: z.ZodObject<{
|
|
|
1703
1703
|
failure: {
|
|
1704
1704
|
phase: string;
|
|
1705
1705
|
category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
|
|
1706
|
-
code: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
|
|
1706
|
+
code: "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
|
|
1707
1707
|
harnessId: string | null;
|
|
1708
1708
|
attemptId: string | null;
|
|
1709
1709
|
safeMessage: string;
|
|
@@ -1864,7 +1864,7 @@ export declare const McpRunHandleResult: z.ZodObject<{
|
|
|
1864
1864
|
failure?: {
|
|
1865
1865
|
phase?: string | undefined;
|
|
1866
1866
|
category?: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation" | undefined;
|
|
1867
|
-
code?: "budget_overshoot" | "cost_unverifiable" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
|
|
1867
|
+
code?: "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null | undefined;
|
|
1868
1868
|
harnessId?: string | null | undefined;
|
|
1869
1869
|
attemptId?: string | null | undefined;
|
|
1870
1870
|
safeMessage: string;
|
package/dist/quota.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod/v3";
|
|
2
|
-
export declare const QuotaSource: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage"]>;
|
|
2
|
+
export declare const QuotaSource: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit"]>;
|
|
3
3
|
export type QuotaSource = z.infer<typeof QuotaSource>;
|
|
4
4
|
/** Orthogonal capabilities of every quota evidence source. Keep this
|
|
5
5
|
* exhaustive registry beside the QuotaSource vocabulary so consumers cannot
|
|
@@ -46,8 +46,29 @@ export declare const QUOTA_SOURCE_TRAITS: {
|
|
|
46
46
|
readonly refreshDemandHarness: "agy";
|
|
47
47
|
readonly producedByRefresher: true;
|
|
48
48
|
};
|
|
49
|
+
readonly cursor_rate_limit: {
|
|
50
|
+
readonly vendorAuthenticated: false;
|
|
51
|
+
readonly refreshDemandHarness: null;
|
|
52
|
+
readonly producedByRefresher: false;
|
|
53
|
+
};
|
|
49
54
|
};
|
|
50
55
|
export declare function quotaSourceTraits(source: QuotaSource): QuotaSourceTraits;
|
|
56
|
+
/** Harness → source label for reactive `rate_limit` cooldown evidence. This
|
|
57
|
+
* map IS the daemon's cooldown-ingest allowlist and its expiry-predicate
|
|
58
|
+
* scope: agy stays deliberately absent because its adapter emits no
|
|
59
|
+
* `rate_limit` event, and a branch with no producer is a dead knob
|
|
60
|
+
* (INV-022/023) — a harness joins in the same change that makes its adapter
|
|
61
|
+
* emit one (cursor joined with the A1 retry-signals classifier). */
|
|
62
|
+
export declare const REACTIVE_COOLDOWN_SOURCE: Partial<Record<string, QuotaSource>>;
|
|
63
|
+
/** Durable-journal source label the strict v3.2.0 rollback runtime can parse.
|
|
64
|
+
* `cursor_rate_limit` postdates that enum, so a base upsert record carrying it
|
|
65
|
+
* would crash a rolled-back engine's replay; the base record carries the
|
|
66
|
+
* nearest v3.2.0 vocabulary instead (claude_api_retry has the same
|
|
67
|
+
* reactive-spool trait row), while the paired scoped-prepare record preserves
|
|
68
|
+
* the true source for current runtimes. `agy_command_usage` also postdates
|
|
69
|
+
* v3.2.0 but predates this mapping: remapping it now would orphan its already
|
|
70
|
+
* journaled prepare/commit hashes, so it stays a disclosed rollback residual. */
|
|
71
|
+
export declare function legacyV320QuotaSource(source: QuotaSource): QuotaSource;
|
|
51
72
|
export declare function quotaRefreshDemandHarnesses(): Array<"claude" | "codex" | "agy">;
|
|
52
73
|
export declare function quotaSourcesProducedByRefreshers(): QuotaSource[];
|
|
53
74
|
export declare const QuotaFreshness: z.ZodEnum<["fresh", "stale", "unknown"]>;
|
|
@@ -179,7 +200,7 @@ export declare const QuotaSnapshot: z.ZodObject<{
|
|
|
179
200
|
resets_at: string | null;
|
|
180
201
|
cooldown_until?: string | null | undefined;
|
|
181
202
|
}>, "many">;
|
|
182
|
-
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage"]>;
|
|
203
|
+
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit"]>;
|
|
183
204
|
observed_at: z.ZodString;
|
|
184
205
|
freshness: z.ZodEnum<["fresh", "stale", "unknown"]>;
|
|
185
206
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -199,7 +220,7 @@ export declare const QuotaSnapshot: z.ZodObject<{
|
|
|
199
220
|
resets_at: string | null;
|
|
200
221
|
cooldown_until: string | null;
|
|
201
222
|
}[];
|
|
202
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
223
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
203
224
|
observed_at: string;
|
|
204
225
|
freshness: "fresh" | "stale" | "unknown";
|
|
205
226
|
}, {
|
|
@@ -219,7 +240,7 @@ export declare const QuotaSnapshot: z.ZodObject<{
|
|
|
219
240
|
resets_at: string | null;
|
|
220
241
|
cooldown_until?: string | null | undefined;
|
|
221
242
|
}[];
|
|
222
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
243
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
223
244
|
observed_at: string;
|
|
224
245
|
freshness: "fresh" | "stale" | "unknown";
|
|
225
246
|
}>;
|
|
@@ -390,7 +411,7 @@ export declare const ControlQuotaSnapshot: z.ZodObject<{
|
|
|
390
411
|
resets_at: string | null;
|
|
391
412
|
cooldown_until?: string | null | undefined;
|
|
392
413
|
}>, "many">;
|
|
393
|
-
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage"]>;
|
|
414
|
+
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit"]>;
|
|
394
415
|
observed_at: z.ZodString;
|
|
395
416
|
freshness: z.ZodEnum<["fresh", "stale", "unknown"]>;
|
|
396
417
|
} & {
|
|
@@ -447,7 +468,7 @@ export declare const ControlQuotaSnapshot: z.ZodObject<{
|
|
|
447
468
|
resets_at: string | null;
|
|
448
469
|
cooldown_until: string | null;
|
|
449
470
|
}[];
|
|
450
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
471
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
451
472
|
observed_at: string;
|
|
452
473
|
freshness: "fresh" | "stale" | "unknown";
|
|
453
474
|
availability?: {
|
|
@@ -477,7 +498,7 @@ export declare const ControlQuotaSnapshot: z.ZodObject<{
|
|
|
477
498
|
resets_at: string | null;
|
|
478
499
|
cooldown_until?: string | null | undefined;
|
|
479
500
|
}[];
|
|
480
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
501
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
481
502
|
observed_at: string;
|
|
482
503
|
freshness: "fresh" | "stale" | "unknown";
|
|
483
504
|
availability?: {
|
|
@@ -564,7 +585,7 @@ export declare const ControlQuotaResponse: z.ZodObject<{
|
|
|
564
585
|
resets_at: string | null;
|
|
565
586
|
cooldown_until?: string | null | undefined;
|
|
566
587
|
}>, "many">;
|
|
567
|
-
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage"]>;
|
|
588
|
+
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit"]>;
|
|
568
589
|
observed_at: z.ZodString;
|
|
569
590
|
freshness: z.ZodEnum<["fresh", "stale", "unknown"]>;
|
|
570
591
|
} & {
|
|
@@ -621,7 +642,7 @@ export declare const ControlQuotaResponse: z.ZodObject<{
|
|
|
621
642
|
resets_at: string | null;
|
|
622
643
|
cooldown_until: string | null;
|
|
623
644
|
}[];
|
|
624
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
645
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
625
646
|
observed_at: string;
|
|
626
647
|
freshness: "fresh" | "stale" | "unknown";
|
|
627
648
|
availability?: {
|
|
@@ -651,7 +672,7 @@ export declare const ControlQuotaResponse: z.ZodObject<{
|
|
|
651
672
|
resets_at: string | null;
|
|
652
673
|
cooldown_until?: string | null | undefined;
|
|
653
674
|
}[];
|
|
654
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
675
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
655
676
|
observed_at: string;
|
|
656
677
|
freshness: "fresh" | "stale" | "unknown";
|
|
657
678
|
availability?: {
|
|
@@ -731,7 +752,7 @@ export declare const ControlQuotaResponse: z.ZodObject<{
|
|
|
731
752
|
resets_at: string | null;
|
|
732
753
|
cooldown_until: string | null;
|
|
733
754
|
}[];
|
|
734
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
755
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
735
756
|
observed_at: string;
|
|
736
757
|
freshness: "fresh" | "stale" | "unknown";
|
|
737
758
|
availability?: {
|
|
@@ -775,7 +796,7 @@ export declare const ControlQuotaResponse: z.ZodObject<{
|
|
|
775
796
|
resets_at: string | null;
|
|
776
797
|
cooldown_until?: string | null | undefined;
|
|
777
798
|
}[];
|
|
778
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout";
|
|
799
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_statusline" | "codex_app_server" | "codex_rollout" | "cursor_rate_limit";
|
|
779
800
|
observed_at: string;
|
|
780
801
|
freshness: "fresh" | "stale" | "unknown";
|
|
781
802
|
availability?: {
|
package/dist/quota.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../src/quota.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../src/quota.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,eAAO,MAAM,WAAW,2JAUoE,CAAC;AAC7F,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD;;uDAEuD;AACvD,MAAM,WAAW,iBAAiB;IAChC;oEACgE;IAChE,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACtC;2EACuE;IACvE,QAAQ,CAAC,oBAAoB,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC;IACjE;6EACyE;IACzE,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;CACvC;AAED,eAAO,MAAM,mBAAmB;;iBAE5B,mBAAmB;iBACnB,oBAAoB,EAAE,OAAO;iBAC7B,mBAAmB;;;iBAGnB,mBAAmB;iBACnB,oBAAoB;iBACpB,mBAAmB;;;iBAGnB,mBAAmB;iBACnB,oBAAoB;iBACpB,mBAAmB;;;iBAGnB,mBAAmB;iBACnB,oBAAoB;iBACpB,mBAAmB;;;iBAGnB,mBAAmB;iBACnB,oBAAoB,EAAE,QAAQ;iBAC9B,mBAAmB;;;iBAMnB,mBAAmB;iBACnB,oBAAoB,EAAE,KAAK;iBAC3B,mBAAmB;;;iBAOnB,mBAAmB;iBACnB,oBAAoB;iBACpB,mBAAmB;;CAEoC,CAAC;AAE5D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,iBAAiB,CAExE;AAED;;;;;oEAKoE;AACpE,eAAO,MAAM,wBAAwB,EAAE,OAAO,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA9BH;;;;;2DAK+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4JmB,CAAC;AACvE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AA4BxE;;;;;;;;;;;;;kFAakF;AAClF,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,EAC5C,IAAI,GAAE;IAAE,GAAG,CAAC,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAO,GAC/C,iBAAiB,CAmEnB;AAED;;iEAEiE;AACjE,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,oBAAoB,EAC9B,IAAI,GAAE;IAAE,GAAG,CAAC,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAO,GAC/C,oBAAoB,CAQtB"}
|
package/dist/quota.js
CHANGED
|
@@ -8,6 +8,7 @@ export const QuotaSource = z
|
|
|
8
8
|
"claude_api_retry",
|
|
9
9
|
"claude_oauth_usage",
|
|
10
10
|
"agy_command_usage",
|
|
11
|
+
"cursor_rate_limit",
|
|
11
12
|
])
|
|
12
13
|
.describe("Machine-readable source of quota evidence, classified by schema-owned traits.");
|
|
13
14
|
export const QUOTA_SOURCE_TRAITS = {
|
|
@@ -44,10 +45,41 @@ export const QUOTA_SOURCE_TRAITS = {
|
|
|
44
45
|
refreshDemandHarness: "agy",
|
|
45
46
|
producedByRefresher: true,
|
|
46
47
|
},
|
|
48
|
+
cursor_rate_limit: {
|
|
49
|
+
// Reactive spool evidence classified from cursor-agent's vendor-limit
|
|
50
|
+
// prose (A1/A4): cursor exposes no quota API, so no refresher can produce
|
|
51
|
+
// or refresh this source — like claude_api_retry it exists only while a
|
|
52
|
+
// typed `rate_limit` event's cooldown does.
|
|
53
|
+
vendorAuthenticated: false,
|
|
54
|
+
refreshDemandHarness: null,
|
|
55
|
+
producedByRefresher: false,
|
|
56
|
+
},
|
|
47
57
|
};
|
|
48
58
|
export function quotaSourceTraits(source) {
|
|
49
59
|
return QUOTA_SOURCE_TRAITS[source];
|
|
50
60
|
}
|
|
61
|
+
/** Harness → source label for reactive `rate_limit` cooldown evidence. This
|
|
62
|
+
* map IS the daemon's cooldown-ingest allowlist and its expiry-predicate
|
|
63
|
+
* scope: agy stays deliberately absent because its adapter emits no
|
|
64
|
+
* `rate_limit` event, and a branch with no producer is a dead knob
|
|
65
|
+
* (INV-022/023) — a harness joins in the same change that makes its adapter
|
|
66
|
+
* emit one (cursor joined with the A1 retry-signals classifier). */
|
|
67
|
+
export const REACTIVE_COOLDOWN_SOURCE = {
|
|
68
|
+
codex: "codex_rollout",
|
|
69
|
+
claude: "claude_api_retry",
|
|
70
|
+
cursor: "cursor_rate_limit",
|
|
71
|
+
};
|
|
72
|
+
/** Durable-journal source label the strict v3.2.0 rollback runtime can parse.
|
|
73
|
+
* `cursor_rate_limit` postdates that enum, so a base upsert record carrying it
|
|
74
|
+
* would crash a rolled-back engine's replay; the base record carries the
|
|
75
|
+
* nearest v3.2.0 vocabulary instead (claude_api_retry has the same
|
|
76
|
+
* reactive-spool trait row), while the paired scoped-prepare record preserves
|
|
77
|
+
* the true source for current runtimes. `agy_command_usage` also postdates
|
|
78
|
+
* v3.2.0 but predates this mapping: remapping it now would orphan its already
|
|
79
|
+
* journaled prepare/commit hashes, so it stays a disclosed rollback residual. */
|
|
80
|
+
export function legacyV320QuotaSource(source) {
|
|
81
|
+
return source === "cursor_rate_limit" ? "claude_api_retry" : source;
|
|
82
|
+
}
|
|
51
83
|
export function quotaRefreshDemandHarnesses() {
|
|
52
84
|
return [
|
|
53
85
|
...new Set(Object.values(QUOTA_SOURCE_TRAITS)
|