@cortexkit/opencode-antigravity-auth 3.0.9 → 3.0.10
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/cli.js +489 -175
- package/dist/cli.js.map +4 -4
- package/dist/cli.meta.json +101 -37
- package/dist/index.js +666 -269
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +106 -42
- package/dist/server.js +697 -300
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +1 -1
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +3 -1
- package/dist/src/common-auth-embedded/claustrum/consumer.js +25 -21
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +1 -0
- package/dist/src/common-auth-embedded/claustrum/index.js +1 -0
- package/dist/src/common-auth-embedded/claustrum/quota-writer.d.ts +18 -0
- package/dist/src/common-auth-embedded/claustrum/quota-writer.js +253 -0
- package/dist/src/common-auth-embedded/claustrum/roster.d.ts +18 -2
- package/dist/src/common-auth-embedded/claustrum/roster.js +100 -43
- package/dist/src/common-auth-embedded/fs/with-lock.d.ts +1 -0
- package/dist/src/common-auth-embedded/fs/with-lock.js +2 -0
- package/dist/src/common-auth-embedded/quota/format.d.ts +19 -0
- package/dist/src/common-auth-embedded/quota/format.js +50 -5
- package/dist/src/common-auth-embedded/quota/index.d.ts +3 -3
- package/dist/src/common-auth-embedded/quota/index.js +2 -2
- package/dist/src/common-auth-embedded/quota/map.d.ts +24 -1
- package/dist/src/common-auth-embedded/quota/map.js +31 -6
- package/dist/src/common-auth-embedded/quota/merge.d.ts +6 -1
- package/dist/src/common-auth-embedded/quota/merge.js +17 -3
- package/dist/src/common-auth-embedded/quota/projection.d.ts +3 -1
- package/dist/src/common-auth-embedded/quota/projection.js +3 -1
- package/dist/src/common-auth-embedded/setup/process-fence.d.ts +7 -0
- package/dist/src/common-auth-embedded/setup/process-fence.js +5 -3
- package/dist/src/common-auth-embedded/source-output.json +83 -67
- package/dist/src/plugin/request-helpers.d.ts +5 -0
- package/dist/src/plugin/request-helpers.d.ts.map +1 -1
- package/dist/src/plugin/request-helpers.js +1 -0
- package/dist/src/plugin/request-helpers.js.map +1 -1
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/src/plugin/shared/request-services.js +123 -5
- package/dist/src/plugin/shared/request-services.js.map +1 -1
- package/dist/tui-build-map.json +21 -21
- package/dist/tui-ga-build-map.json +21 -21
- package/dist/types/src/common-auth-embedded/claustrum/consumer.d.ts +3 -1
- package/dist/types/src/common-auth-embedded/claustrum/index.d.ts +1 -0
- package/dist/types/src/common-auth-embedded/claustrum/quota-writer.d.ts +18 -0
- package/dist/types/src/common-auth-embedded/claustrum/roster.d.ts +18 -2
- package/dist/types/src/common-auth-embedded/quota/format.d.ts +19 -0
- package/dist/types/src/common-auth-embedded/quota/index.d.ts +3 -3
- package/dist/types/src/common-auth-embedded/quota/map.d.ts +24 -1
- package/dist/types/src/common-auth-embedded/quota/merge.d.ts +6 -1
- package/dist/types/src/common-auth-embedded/quota/projection.d.ts +3 -1
- package/dist/types/src/common-auth-embedded/setup/process-fence.d.ts +7 -0
- package/dist/types/src/plugin/config/schema.d.ts +2 -2
- package/dist/types/src/plugin/request-helpers.d.ts +5 -0
- package/dist/types/src/plugin/request-helpers.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/common-auth-embedded/claustrum/consumer.d.ts +3 -1
- package/src/common-auth-embedded/claustrum/consumer.js +25 -21
- package/src/common-auth-embedded/claustrum/index.d.ts +1 -0
- package/src/common-auth-embedded/claustrum/index.js +1 -0
- package/src/common-auth-embedded/claustrum/quota-writer.d.ts +18 -0
- package/src/common-auth-embedded/claustrum/quota-writer.js +253 -0
- package/src/common-auth-embedded/claustrum/roster.d.ts +18 -2
- package/src/common-auth-embedded/claustrum/roster.js +100 -43
- package/src/common-auth-embedded/fs/with-lock.d.ts +1 -0
- package/src/common-auth-embedded/fs/with-lock.js +2 -0
- package/src/common-auth-embedded/quota/format.d.ts +19 -0
- package/src/common-auth-embedded/quota/format.js +50 -5
- package/src/common-auth-embedded/quota/index.d.ts +3 -3
- package/src/common-auth-embedded/quota/index.js +2 -2
- package/src/common-auth-embedded/quota/map.d.ts +24 -1
- package/src/common-auth-embedded/quota/map.js +31 -6
- package/src/common-auth-embedded/quota/merge.d.ts +6 -1
- package/src/common-auth-embedded/quota/merge.js +17 -3
- package/src/common-auth-embedded/quota/projection.d.ts +3 -1
- package/src/common-auth-embedded/quota/projection.js +3 -1
- package/src/common-auth-embedded/setup/process-fence.d.ts +7 -0
- package/src/common-auth-embedded/setup/process-fence.js +5 -3
- package/src/common-auth-embedded/source-output.json +83 -67
- package/src/tui-compiled/common-auth-embedded/quota/format.js +50 -5
- package/src/tui-compiled/common-auth-embedded/quota/index.js +2 -2
- package/src/tui-compiled/common-auth-embedded/quota/map.js +31 -6
- package/src/tui-compiled/common-auth-embedded/quota/merge.js +17 -3
- package/src/tui-compiled/common-auth-embedded/quota/projection.js +3 -1
- package/src/tui-ga-compiled/shared/1ff34afa7c42d196-projection.js +3 -1
- package/src/tui-ga-compiled/shared/77138df80c7ae006-map.js +31 -6
- package/src/tui-ga-compiled/shared/aef2402f8fc342f0-format.js +50 -5
- package/src/tui-ga-compiled/shared/bf17cbee28e58197-index.js +2 -2
- package/src/tui-ga-compiled/shared/ecc214300932dfb6-merge.js +17 -3
- package/src/tui-ga-raw/shared/1ff34afa7c42d196-projection.js +3 -1
- package/src/tui-ga-raw/shared/77138df80c7ae006-map.js +31 -6
- package/src/tui-ga-raw/shared/aef2402f8fc342f0-format.js +50 -5
- package/src/tui-ga-raw/shared/bf17cbee28e58197-index.js +2 -2
- package/src/tui-ga-raw/shared/ecc214300932dfb6-merge.js +17 -3
- package/src/tui-raw/common-auth-embedded/quota/format.js +50 -5
- package/src/tui-raw/common-auth-embedded/quota/index.js +2 -2
- package/src/tui-raw/common-auth-embedded/quota/map.js +31 -6
- package/src/tui-raw/common-auth-embedded/quota/merge.js +17 -3
- package/src/tui-raw/common-auth-embedded/quota/projection.js +3 -1
|
@@ -2,6 +2,8 @@ import { type QuotaMap, type QuotaObservation } from '../quota/index.js';
|
|
|
2
2
|
import type { RoutingRow } from '../routing/index.js';
|
|
3
3
|
import type { ClaustrumScopedAttempt, ClaustrumScopedCustody, SkippedVaultRecord, VaultCredential, VaultCredentialType, VaultInventory } from './custody.js';
|
|
4
4
|
import { type DeclinedAccount } from './interlock.js';
|
|
5
|
+
import { type VaultQuotaPublication } from './quota-writer.js';
|
|
6
|
+
export { drainVaultQuota } from './quota-writer.js';
|
|
5
7
|
/**
|
|
6
8
|
* One vault account as the pool sees it. It carries no bearer material: the
|
|
7
9
|
* access token is fetched from the vault for every send. Several vault
|
|
@@ -91,6 +93,7 @@ export interface VaultRosterLockContext {
|
|
|
91
93
|
assertOwned: () => Promise<void>;
|
|
92
94
|
}
|
|
93
95
|
export interface MutateVaultRosterOptions {
|
|
96
|
+
signal?: AbortSignal;
|
|
94
97
|
/**
|
|
95
98
|
* Runs when the new roster is fully staged on disk, immediately before the
|
|
96
99
|
* rename that publishes it, so a caller can confirm a lease of its own at
|
|
@@ -127,7 +130,10 @@ export type QuotaReceipt = Pick<ClaustrumScopedAttempt, 'credentialId' | 'accoun
|
|
|
127
130
|
* write is fenced on the receipt the reading was taken with: it lands only
|
|
128
131
|
* while the row still holds that receipt's credential (as representative or
|
|
129
132
|
* alias) and account, so a slow read for a replaced account can never land on
|
|
130
|
-
* its successor.
|
|
133
|
+
* its successor. Resolves false when the fence refuses the reading against the
|
|
134
|
+
* roster as it stands now (on disk, plus readings this process has not
|
|
135
|
+
* written yet), and true once the reading is queued for the next write. The
|
|
136
|
+
* write applies the fence again, so a rebind between the two still refuses.
|
|
131
137
|
*/
|
|
132
138
|
export declare function recordVaultQuota(path: string, input: QuotaReceipt & {
|
|
133
139
|
routeId: string;
|
|
@@ -139,19 +145,28 @@ export declare function recordVaultQuota(path: string, input: QuotaReceipt & {
|
|
|
139
145
|
* lands only while the row is still bound to that exact known account, so a
|
|
140
146
|
* reading taken before a replacement never reaches the successor. Unlike
|
|
141
147
|
* `recordVaultQuota` it never binds an account: a row without a known account
|
|
142
|
-
* is refused.
|
|
148
|
+
* is refused. Resolves false when the row is not bound to that account now,
|
|
149
|
+
* and true once the reading is queued, as `recordVaultQuota` does.
|
|
143
150
|
*/
|
|
144
151
|
export declare function recordVaultAccountQuota(path: string, input: {
|
|
145
152
|
routeId: string;
|
|
146
153
|
accountIdentity: string;
|
|
147
154
|
observation: QuotaObservation;
|
|
148
155
|
}): Promise<boolean>;
|
|
156
|
+
/** Apply the same identity fence to memory overlays and durable quota batches. */
|
|
157
|
+
export declare function applyVaultQuota(current: VaultRosterFile | undefined, input: VaultQuotaPublication): {
|
|
158
|
+
roster: VaultRosterFile | undefined;
|
|
159
|
+
kept: boolean;
|
|
160
|
+
};
|
|
161
|
+
export declare function forgetPendingVaultDiscovery(path: string): void;
|
|
149
162
|
/**
|
|
150
163
|
* Discover and commit the roster. The lease covers the list call and the
|
|
151
164
|
* commit, not just the write: an opaque view cannot tell a delayed old reply
|
|
152
165
|
* from a newer one, so a run that lost its lease is refused at commit. A
|
|
153
166
|
* failed list, or custody switching off mid-run, never writes anything; a
|
|
154
167
|
* peer holding the lease means its last committed roster is served instead.
|
|
168
|
+
* A write-lock timeout keeps the discovered inventory for the next poll,
|
|
169
|
+
* unless a peer has superseded its base view in the meantime.
|
|
155
170
|
*/
|
|
156
171
|
export declare function refreshVaultRoster(options: {
|
|
157
172
|
path: string;
|
|
@@ -159,6 +174,7 @@ export declare function refreshVaultRoster(options: {
|
|
|
159
174
|
isActive?: () => boolean | Promise<boolean>;
|
|
160
175
|
signal?: AbortSignal;
|
|
161
176
|
projection?: ProjectionOptions | (() => ProjectionOptions);
|
|
177
|
+
onInventory?: (inventory: VaultInventory) => void;
|
|
162
178
|
}): Promise<VaultRosterFile | undefined>;
|
|
163
179
|
/**
|
|
164
180
|
* A host-owned main account as last verified from the vault: the plugin's
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type QuotaCredits } from './map.js';
|
|
1
2
|
import type { ProjectedLimit, ProjectedQuota } from './projection.js';
|
|
2
3
|
/** A reading older than this is marked with its age. */
|
|
3
4
|
export declare const QUOTA_STALE_AFTER_MS: number;
|
|
@@ -31,6 +32,13 @@ export interface QuotaWindowPart {
|
|
|
31
32
|
kind: 'window' | 'budget';
|
|
32
33
|
/** The display name of a quota window, or `credits` for the budget. */
|
|
33
34
|
name: string;
|
|
35
|
+
/**
|
|
36
|
+
* The label the narrow line gives this item: an account-wide window keeps
|
|
37
|
+
* its name (`5h`), a model-scoped window reads as its model's short name
|
|
38
|
+
* (`Fa` for Fable, extended until names in the same reading differ), and
|
|
39
|
+
* the budget reads `cr`. For layouts too narrow for the full name.
|
|
40
|
+
*/
|
|
41
|
+
short: string;
|
|
34
42
|
/** The shared figure wording, including `credits` for budget figures. */
|
|
35
43
|
figure: string;
|
|
36
44
|
/** The unrounded remaining percentage, clamped to 0–100, when known. */
|
|
@@ -84,3 +92,14 @@ export declare function quotaTextParts(quota: ProjectedQuota | undefined, option
|
|
|
84
92
|
* provider answered without a limit for any window.
|
|
85
93
|
*/
|
|
86
94
|
export declare function formatQuota(quota: ProjectedQuota | undefined, options: QuotaTextOptions): string;
|
|
95
|
+
/**
|
|
96
|
+
* Prepaid credits as one short value, worded as the official Codex client's
|
|
97
|
+
* status view words them: `Unlimited` for unlimited credits, `<n> credits`
|
|
98
|
+
* for a finite positive balance (rounded to a whole number), `Available` when
|
|
99
|
+
* the account has credits but no usable balance was reported, and undefined
|
|
100
|
+
* when the account has no credits (or `credits` is undefined), so a caller
|
|
101
|
+
* shows no credits row at all. Unlimited wins even when `hasCredits` is false.
|
|
102
|
+
* No other formatter adds this text; a caller that wants a credits row asks
|
|
103
|
+
* for it.
|
|
104
|
+
*/
|
|
105
|
+
export declare function quotaCreditsText(credits: Pick<QuotaCredits, 'hasCredits' | 'unlimited' | 'balance'> | undefined): string | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type { QuotaCodec } from './codec.js';
|
|
2
2
|
export { quotaCodec } from './codec.js';
|
|
3
3
|
export type { QuotaParts, QuotaTextForm, QuotaTextOptions, QuotaWindowPart, } from './format.js';
|
|
4
|
-
export { formatQuota, isQuotaStale, NO_LIMITS_REPORTED, NO_QUOTA_READING, QUOTA_STALE_AFTER_MS, quotaTextParts, quotaWindowName, quotaWindowParts, } from './format.js';
|
|
5
|
-
export type { CreditBudgetCleared, CreditBudgetEntry, CreditBudgetReading, QuotaAbsentEntry, QuotaCounter, QuotaEntry, QuotaMap, QuotaReadingEntry, QuotaRetiredEntry, } from './map.js';
|
|
6
|
-
export { ALL_SCOPE, DEFAULT_REQUIRED_LABELS, decodeQuotaMap, emptyQuotaMap, isQuotaMap, } from './map.js';
|
|
4
|
+
export { formatQuota, isQuotaStale, NO_LIMITS_REPORTED, NO_QUOTA_READING, QUOTA_STALE_AFTER_MS, quotaCreditsText, quotaTextParts, quotaWindowName, quotaWindowParts, } from './format.js';
|
|
5
|
+
export type { CreditBudgetCleared, CreditBudgetEntry, CreditBudgetReading, QuotaAbsentEntry, QuotaCounter, QuotaCredits, QuotaEntry, QuotaMap, QuotaReadingEntry, QuotaRetiredEntry, } from './map.js';
|
|
6
|
+
export { ALL_SCOPE, DEFAULT_REQUIRED_LABELS, decodeQuotaMap, emptyQuotaMap, isQuotaCredits, isQuotaMap, } from './map.js';
|
|
7
7
|
export type { ObservedBudget, ObservedPair, ObservedReading, QuotaObservation, } from './merge.js';
|
|
8
8
|
export { isQuotaObservation, mergeQuotaObservation, QuotaCodecError, } from './merge.js';
|
|
9
9
|
export type { ExhaustionReset, ProjectedBudget, ProjectedLimit, ProjectedQuota, QuotaGroup, } from './projection.js';
|
|
@@ -48,12 +48,30 @@ export interface QuotaCounter {
|
|
|
48
48
|
value: number;
|
|
49
49
|
checkedAt: number;
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Prepaid credits a provider account holds beside its rate-limit windows (for
|
|
53
|
+
* example a ChatGPT workspace's credits, which keep requests working after a
|
|
54
|
+
* window is used up). This is a state, not a count or the spend budget: the
|
|
55
|
+
* account has credits or not, they may be unlimited, and the provider may
|
|
56
|
+
* report a balance. It carries its own observation time.
|
|
57
|
+
*/
|
|
58
|
+
export interface QuotaCredits {
|
|
59
|
+
hasCredits: boolean;
|
|
60
|
+
unlimited: boolean;
|
|
61
|
+
/** The balance the provider reported, when it reported one. */
|
|
62
|
+
balance?: number;
|
|
63
|
+
/** The provider's verdict that the overage allowance is used up. */
|
|
64
|
+
overageLimitReached?: boolean;
|
|
65
|
+
checkedAt: number;
|
|
66
|
+
}
|
|
51
67
|
export interface QuotaMap {
|
|
52
68
|
limits: QuotaEntry[];
|
|
53
69
|
/** Absent means no observation has reported on the budget yet. */
|
|
54
70
|
budget?: CreditBudgetEntry;
|
|
55
71
|
/** Provider-named counts, each with its own observation time. */
|
|
56
72
|
counters?: Record<string, QuotaCounter>;
|
|
73
|
+
/** Absent means no observation has reported on prepaid credits yet. */
|
|
74
|
+
credits?: QuotaCredits;
|
|
57
75
|
}
|
|
58
76
|
export declare function emptyQuotaMap(): QuotaMap;
|
|
59
77
|
/** The time an entry speaks for: its reading, retirement or absence time. */
|
|
@@ -61,9 +79,14 @@ export declare function entryTime(entry: QuotaEntry): number;
|
|
|
61
79
|
export declare function limitKey(scope: string, label: string): string;
|
|
62
80
|
export declare function isCreditBudgetEntry(value: unknown): value is CreditBudgetEntry;
|
|
63
81
|
export declare function isQuotaCounters(value: unknown): value is Record<string, QuotaCounter>;
|
|
82
|
+
/** True when `value` is a well-formed prepaid-credits record. */
|
|
83
|
+
export declare function isQuotaCredits(value: unknown): value is QuotaCredits;
|
|
64
84
|
/** Keep usable counters without letting one malformed count hide a quota map. */
|
|
65
85
|
export declare function readQuotaCounters(value: unknown): Record<string, QuotaCounter> | undefined;
|
|
66
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* Decode persisted quota, dropping malformed counters or a malformed credits
|
|
88
|
+
* record but not limit or budget evidence.
|
|
89
|
+
*/
|
|
67
90
|
export declare function decodeQuotaMap(value: unknown): QuotaMap | undefined;
|
|
68
91
|
/**
|
|
69
92
|
* True when `value` is a well-formed quota map. Unrecognised top-level keys
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type QuotaCounter, type QuotaMap } from './map.js';
|
|
1
|
+
import { type QuotaCounter, type QuotaCredits, type QuotaMap } from './map.js';
|
|
2
2
|
export interface ObservedReading {
|
|
3
3
|
/** Defaults to `all`. */
|
|
4
4
|
scope?: string;
|
|
@@ -34,6 +34,11 @@ export interface QuotaObservation {
|
|
|
34
34
|
budget?: ObservedBudget;
|
|
35
35
|
/** Each named count uses its own time, independently of limits and budget. */
|
|
36
36
|
counters?: Record<string, QuotaCounter>;
|
|
37
|
+
/**
|
|
38
|
+
* Prepaid credits, judged by their own time independently of limits, budget
|
|
39
|
+
* and counters. Absent means the observation says nothing about credits.
|
|
40
|
+
*/
|
|
41
|
+
credits?: QuotaCredits;
|
|
37
42
|
}
|
|
38
43
|
/** Thrown by `mergeQuotaObservation` when either argument is malformed. */
|
|
39
44
|
export declare class QuotaCodecError extends TypeError {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type QuotaCounter, type QuotaMap } from './map.js';
|
|
1
|
+
import { type QuotaCounter, type QuotaCredits, type QuotaMap } from './map.js';
|
|
2
2
|
export interface ProjectedLimit {
|
|
3
3
|
scope: string;
|
|
4
4
|
label: string;
|
|
@@ -40,6 +40,8 @@ export interface ProjectedQuota {
|
|
|
40
40
|
/** Present only when the stored budget is a reading, not cleared. */
|
|
41
41
|
budget?: ProjectedBudget;
|
|
42
42
|
counters?: Record<string, QuotaCounter>;
|
|
43
|
+
/** The stored prepaid credits, unchanged in every scope. */
|
|
44
|
+
credits?: QuotaCredits;
|
|
43
45
|
/**
|
|
44
46
|
* The named groups the windows belong to, in the order the plugin lists
|
|
45
47
|
* them. Set only by a plugin whose windows all belong to such groups; the
|
|
@@ -33,11 +33,18 @@ export declare function listSetupProcesses(runner?: CommandRunner, options?: {
|
|
|
33
33
|
onStep?: (details: ProcessInspectionStep) => void;
|
|
34
34
|
/** False skips the Windows PowerShell query for Node and Bun command lines. */
|
|
35
35
|
inspectRuntimes?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The process to leave out, the running setup itself. Defaults to
|
|
38
|
+
* `process.pid`; tests pass a value no listed process can have, because in
|
|
39
|
+
* a container this process can hold any small PID a fixture uses.
|
|
40
|
+
*/
|
|
41
|
+
selfPid?: number;
|
|
36
42
|
}): Promise<Array<{
|
|
37
43
|
pid: number;
|
|
38
44
|
command: string;
|
|
39
45
|
}>>;
|
|
40
46
|
export declare function createProcessFence(runner?: CommandRunner, options?: {
|
|
41
47
|
platform?: string;
|
|
48
|
+
selfPid?: number;
|
|
42
49
|
}): ProcessFence;
|
|
43
50
|
export declare function assertHostsStopped(fence: ProcessFence, env?: SetupEnvironment): Promise<void>;
|
|
@@ -43,8 +43,8 @@ export type ToastScope = z.infer<typeof ToastScopeSchema>;
|
|
|
43
43
|
* - `performance_first`: Round-robin distribution for maximum throughput.
|
|
44
44
|
*/
|
|
45
45
|
export declare const SchedulingModeSchema: z.ZodEnum<{
|
|
46
|
-
cache_first: "cache_first";
|
|
47
46
|
balance: "balance";
|
|
47
|
+
cache_first: "cache_first";
|
|
48
48
|
performance_first: "performance_first";
|
|
49
49
|
}>;
|
|
50
50
|
export type SchedulingMode = z.infer<typeof SchedulingModeSchema>;
|
|
@@ -100,8 +100,8 @@ export declare const AntigravityConfigSchema: z.ZodObject<{
|
|
|
100
100
|
switch_on_first_rate_limit: z.ZodDefault<z.ZodBoolean>;
|
|
101
101
|
max_account_switches: z.ZodDefault<z.ZodNumber>;
|
|
102
102
|
scheduling_mode: z.ZodDefault<z.ZodEnum<{
|
|
103
|
-
cache_first: "cache_first";
|
|
104
103
|
balance: "balance";
|
|
104
|
+
cache_first: "cache_first";
|
|
105
105
|
performance_first: "performance_first";
|
|
106
106
|
}>>;
|
|
107
107
|
max_cache_first_wait_seconds: z.ZodDefault<z.ZodNumber>;
|
|
@@ -286,6 +286,11 @@ type NativeGoogleErrorOptions = {
|
|
|
286
286
|
reason: 'operator_policy' | 'soft_quota' | 'pool_unavailable';
|
|
287
287
|
/** Remaining milliseconds until a known reset; omit unknown resets. Do not substitute a retry sleep or cap this value at the configured maximum wait. */
|
|
288
288
|
resetAfterMs?: number | null;
|
|
289
|
+
} | {
|
|
290
|
+
status: 412;
|
|
291
|
+
reason: 'model_unavailable';
|
|
292
|
+
/** No account has the model, so there is no quota reset to wait for. */
|
|
293
|
+
resetAfterMs?: never;
|
|
289
294
|
} | {
|
|
290
295
|
status: 401;
|
|
291
296
|
reason: 'missing_access_token';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-helpers.d.ts","sourceRoot":"","sources":["../../../../src/plugin/request-helpers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAiP3D;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,CAgB9D;AAMD,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,o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AC3B,wEAAwE;IACxE,YAAY,CAAC,EAAE,KAAK,CAAA;CACrB,GACD;IAAE,MAAM,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,sBAAsB,CAAA;CAAE,GAC/C;IAAE,MAAM,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAA;AA8B7C;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,wBAAwB,GAChC,QAAQ,CAyCV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-services.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/shared/request-services.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,cAAc,IAAI,kBAAkB,EAGzC,KAAK,WAAW,EAIhB,KAAK,kBAAkB,EAIvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAGrB,KAAK,oBAAoB,EAKzB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAMjB,KAAK,kBAAkB,EAExB,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"request-services.d.ts","sourceRoot":"","sources":["../../../../../src/plugin/shared/request-services.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,cAAc,IAAI,kBAAkB,EAGzC,KAAK,WAAW,EAIhB,KAAK,kBAAkB,EAIvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAGrB,KAAK,oBAAoB,EAKzB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAMjB,KAAK,kBAAkB,EAExB,MAAM,kCAAkC,CAAA;AAMzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,KAAK,EAAE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,GAAG,SAAS,CAatE;AAmBD,+CAA+C;AAC/C,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,OAAO,CACL,KAAK,EAAE,WAAW,GAAG,GAAG,EACxB,IAAI,CAAC,EAAE,WAAW,EAClB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,QAAQ,CAAC,CAAA;IACpB;;;;;;OAMG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACvB;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB;AAkHD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,IAAI,CAClB,kBAAkB,EAChB,aAAa,GACb,0BAA0B,GAC1B,kBAAkB,GAClB,mBAAmB,CACtB,EACD,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,gBAAgB,CAAC,EACrE,GAAG,EAAE,MAAM,GACV,CACD,OAAO,EAAE,cAAc,EACvB,eAAe,EAAE,MAAM,EACvB,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,IAAI,CAAC,CA0DjB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,iBAAiB,EAC/D,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAC3B,0BAA0B,CAkqE5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/opencode-antigravity-auth",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"description": "Google Antigravity OAuth auth plugin for OpenCode - access Gemini and Claude models using Google credentials",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"dependencies": {
|
|
131
131
|
"@cortexkit/claustrum-client": "0.12.0",
|
|
132
132
|
"@cortexkit/subc-client": "0.22.5",
|
|
133
|
-
"@cortexkit/antigravity-auth-core": "3.0.
|
|
133
|
+
"@cortexkit/antigravity-auth-core": "3.0.10",
|
|
134
134
|
"@cortexkit/private-files": "0.2.1",
|
|
135
135
|
"jsonc-parser": "^3.3.1",
|
|
136
136
|
"xdg-basedir": "^5.1.0",
|
|
@@ -169,8 +169,10 @@ export declare class ClaustrumConsumer<Q = QuotaObservation> {
|
|
|
169
169
|
* a served credential (an insula reading from `cachedInsulaQuotaForRoute`).
|
|
170
170
|
* It lands only while the route is still bound to that known account, so no
|
|
171
171
|
* credential fetch is needed and a replaced account's reading is dropped.
|
|
172
|
-
*
|
|
172
|
+
* Memory updates immediately; durable publication is detached and coalesced.
|
|
173
173
|
*/
|
|
174
174
|
recordAccountQuota(routeId: string, accountIdentity: string, observation: QuotaObservation): Promise<boolean>;
|
|
175
175
|
close(): void;
|
|
176
|
+
/** Close immediately; the last consumer also waits for the writer's bounded drain. */
|
|
177
|
+
dispose(): Promise<void>;
|
|
176
178
|
}
|
|
@@ -4,7 +4,8 @@ import { ClaustrumScopedCustody, decideScopedRetryAfter401, } from './custody.js
|
|
|
4
4
|
import { readClaustrumEnrollmentToken } from './enrollment.js';
|
|
5
5
|
import { ClaustrumConsumerError } from './errors.js';
|
|
6
6
|
import { acquireInsulaQuotaSource, } from './insula.js';
|
|
7
|
-
import {
|
|
7
|
+
import { pendingVaultQuota, retainVaultQuotaWriter } from './quota-writer.js';
|
|
8
|
+
import { acceptVaultRoute, applyVaultQuota, declineVaultRoute, forgetPendingVaultDiscovery, readVaultRoster, recordVaultAccountQuota, recordVaultQuota, refreshVaultRoster, vaultRoutingRows, } from './roster.js';
|
|
8
9
|
import { SAFETY_POLL_MS } from './watch.js';
|
|
9
10
|
/**
|
|
10
11
|
* One plugin host's view of its vault accounts. It turns vault credentials
|
|
@@ -35,9 +36,13 @@ export class ClaustrumConsumer {
|
|
|
35
36
|
#insulaSkips = new Map();
|
|
36
37
|
/** When this instance last completed a discovery, by `now`. */
|
|
37
38
|
#discoveredAt;
|
|
39
|
+
#releaseQuotaWriter;
|
|
38
40
|
constructor(options) {
|
|
39
41
|
this.#options = options;
|
|
40
42
|
this.#logger = options.logger ?? createLogger('claustrum');
|
|
43
|
+
this.#releaseQuotaWriter = retainVaultQuotaWriter(options.rosterPath, (publication) => {
|
|
44
|
+
this.#roster = applyVaultQuota(this.#roster, publication).roster;
|
|
45
|
+
});
|
|
41
46
|
}
|
|
42
47
|
#assertOpen(signal) {
|
|
43
48
|
this.#shutdown.signal.throwIfAborted();
|
|
@@ -176,11 +181,9 @@ export class ClaustrumConsumer {
|
|
|
176
181
|
let discovered;
|
|
177
182
|
const roster = await refreshVaultRoster({
|
|
178
183
|
path: this.#options.rosterPath,
|
|
179
|
-
custody
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
return discovered;
|
|
183
|
-
},
|
|
184
|
+
custody,
|
|
185
|
+
onInventory: (inventory) => {
|
|
186
|
+
discovered = inventory;
|
|
184
187
|
},
|
|
185
188
|
isActive: () => this.#active(),
|
|
186
189
|
signal: this.#shutdown.signal,
|
|
@@ -193,7 +196,7 @@ export class ClaustrumConsumer {
|
|
|
193
196
|
});
|
|
194
197
|
this.#assertOpen();
|
|
195
198
|
const changed = roster?.view !== this.#roster?.view;
|
|
196
|
-
this.#roster = roster;
|
|
199
|
+
this.#roster = pendingVaultQuota(this.#options.rosterPath, roster);
|
|
197
200
|
custody.retain(roster?.rows ?? []);
|
|
198
201
|
// Each discovery replaces the previous value, including with unknown. A
|
|
199
202
|
// refresh that served a peer's roster discovered nothing and leaves it;
|
|
@@ -349,7 +352,7 @@ export class ClaustrumConsumer {
|
|
|
349
352
|
return undefined;
|
|
350
353
|
try {
|
|
351
354
|
await readClaustrumEnrollmentToken(this.#options.tokenPath);
|
|
352
|
-
const roster = await readVaultRoster(this.#options.rosterPath);
|
|
355
|
+
const roster = pendingVaultQuota(this.#options.rosterPath, await readVaultRoster(this.#options.rosterPath));
|
|
353
356
|
const row = roster?.rows.find((entry) => entry.routeId === routeId);
|
|
354
357
|
return this.#normalizeInsulaQuota(row?.accountIdentity);
|
|
355
358
|
}
|
|
@@ -364,7 +367,7 @@ export class ClaustrumConsumer {
|
|
|
364
367
|
return { miss: 'unreachable' };
|
|
365
368
|
try {
|
|
366
369
|
await readClaustrumEnrollmentToken(this.#options.tokenPath);
|
|
367
|
-
const roster = await readVaultRoster(this.#options.rosterPath);
|
|
370
|
+
const roster = pendingVaultQuota(this.#options.rosterPath, await readVaultRoster(this.#options.rosterPath));
|
|
368
371
|
const account = roster?.rows.find((row) => row.routeId === routeId)?.accountIdentity;
|
|
369
372
|
if (!account || !this.#insula)
|
|
370
373
|
return { miss: 'unreachable' };
|
|
@@ -419,7 +422,7 @@ export class ClaustrumConsumer {
|
|
|
419
422
|
this.#insula = undefined;
|
|
420
423
|
throw new ClaustrumConsumerError('not-active', 'Claustrum scoped custody is not active');
|
|
421
424
|
}
|
|
422
|
-
const current = await readVaultRoster(this.#options.rosterPath);
|
|
425
|
+
const current = pendingVaultQuota(this.#options.rosterPath, await readVaultRoster(this.#options.rosterPath));
|
|
423
426
|
this.#assertOpen(signal);
|
|
424
427
|
const observed = roster.rows.find((row) => row.routeId === routeId);
|
|
425
428
|
const configured = current?.rows.find((row) => row.routeId === routeId);
|
|
@@ -511,13 +514,13 @@ export class ClaustrumConsumer {
|
|
|
511
514
|
async decline(routeId) {
|
|
512
515
|
this.#assertOpen();
|
|
513
516
|
await declineVaultRoute(this.#options.rosterPath, routeId);
|
|
514
|
-
this.#roster = await readVaultRoster(this.#options.rosterPath);
|
|
517
|
+
this.#roster = pendingVaultQuota(this.#options.rosterPath, await readVaultRoster(this.#options.rosterPath));
|
|
515
518
|
this.#custody?.retain(this.#roster?.rows ?? []);
|
|
516
519
|
}
|
|
517
520
|
async accept(routeId) {
|
|
518
521
|
this.#assertOpen();
|
|
519
522
|
await acceptVaultRoute(this.#options.rosterPath, routeId);
|
|
520
|
-
this.#roster = await readVaultRoster(this.#options.rosterPath);
|
|
523
|
+
this.#roster = pendingVaultQuota(this.#options.rosterPath, await readVaultRoster(this.#options.rosterPath));
|
|
521
524
|
}
|
|
522
525
|
/**
|
|
523
526
|
* Store a quota or profile observation for a vault route. The receipt the
|
|
@@ -527,7 +530,7 @@ export class ClaustrumConsumer {
|
|
|
527
530
|
*/
|
|
528
531
|
async recordQuota(routeId, observation, attempt) {
|
|
529
532
|
this.#assertOpen();
|
|
530
|
-
|
|
533
|
+
return recordVaultQuota(this.#options.rosterPath, {
|
|
531
534
|
routeId,
|
|
532
535
|
observation,
|
|
533
536
|
credentialId: attempt.credentialId,
|
|
@@ -539,27 +542,21 @@ export class ClaustrumConsumer {
|
|
|
539
542
|
expectedAccountIdentity: attempt.expectedAccountIdentity,
|
|
540
543
|
}),
|
|
541
544
|
});
|
|
542
|
-
if (kept)
|
|
543
|
-
this.#roster = await readVaultRoster(this.#options.rosterPath);
|
|
544
|
-
return kept;
|
|
545
545
|
}
|
|
546
546
|
/**
|
|
547
547
|
* Store a background observation that belongs to an account rather than to
|
|
548
548
|
* a served credential (an insula reading from `cachedInsulaQuotaForRoute`).
|
|
549
549
|
* It lands only while the route is still bound to that known account, so no
|
|
550
550
|
* credential fetch is needed and a replaced account's reading is dropped.
|
|
551
|
-
*
|
|
551
|
+
* Memory updates immediately; durable publication is detached and coalesced.
|
|
552
552
|
*/
|
|
553
553
|
async recordAccountQuota(routeId, accountIdentity, observation) {
|
|
554
554
|
this.#assertOpen();
|
|
555
|
-
|
|
555
|
+
return recordVaultAccountQuota(this.#options.rosterPath, {
|
|
556
556
|
routeId,
|
|
557
557
|
accountIdentity,
|
|
558
558
|
observation,
|
|
559
559
|
});
|
|
560
|
-
if (kept)
|
|
561
|
-
this.#roster = await readVaultRoster(this.#options.rosterPath);
|
|
562
|
-
return kept;
|
|
563
560
|
}
|
|
564
561
|
close() {
|
|
565
562
|
if (this.#shutdown.signal.aborted)
|
|
@@ -574,5 +571,12 @@ export class ClaustrumConsumer {
|
|
|
574
571
|
this.#insula = undefined;
|
|
575
572
|
this.#roster = undefined;
|
|
576
573
|
this.#grantReach = undefined;
|
|
574
|
+
void this.#releaseQuotaWriter();
|
|
575
|
+
forgetPendingVaultDiscovery(this.#options.rosterPath);
|
|
576
|
+
}
|
|
577
|
+
/** Close immediately; the last consumer also waits for the writer's bounded drain. */
|
|
578
|
+
async dispose() {
|
|
579
|
+
this.close();
|
|
580
|
+
await this.#releaseQuotaWriter();
|
|
577
581
|
}
|
|
578
582
|
}
|
|
@@ -9,6 +9,7 @@ export { ClaustrumConsumerError, type ClaustrumConsumerFailureKind, type Claustr
|
|
|
9
9
|
export { assertHostSlotMatchesMode, assertNotCustodyPlaceholder, CUSTODY_PLACEHOLDER_PREFIX, classifyHostSlot, custodyPlaceholder, custodyPlaceholderKey, type HostSlotContent, isCustodyPlaceholder, isCustodyPlaceholderValue, } from './host-slot.js';
|
|
10
10
|
export { acquireInsulaQuotaSource, type InsulaQuotaContext, type InsulaQuotaLookup, type InsulaQuotaMiss, type InsulaQuotaOptions, type InsulaQuotaReading, type InsulaQuotaResult, type InsulaQuotaSource, type InsulaUsageEntry, type InsulaUsageTransport, type InsulaUsageWatch, type InsulaUsageWindow, type InsulaWatchOptions, } from './insula.js';
|
|
11
11
|
export { acceptAccount, type DeclinedAccount, declineAccount, isDeclined, } from './interlock.js';
|
|
12
|
+
export { drainVaultQuota } from './quota-writer.js';
|
|
12
13
|
export { type AccountMapper, acceptVaultRoute, DEFAULT_ROUTE_PREFIX, declineVaultRoute, type MutateVaultRosterOptions, mutateVaultRoster, type ProjectionOptions, projectVaultRoster, type QuotaReceipt, readVaultRoster, recordVaultAccountQuota, recordVaultQuota, refreshVaultRoster, resolveVaultPrimary, type VaultPrimary, type VaultPrimaryBinding, type VaultPrimaryUnavailableReason, type VaultRosterFile, type VaultRosterLockContext, type VaultRosterRow, vaultRoutingRows, } from './roster.js';
|
|
13
14
|
export { type ChangeNotice, ChangeNoticeReader, RESUBSCRIBE_BACKOFF_MS, SAFETY_POLL_MS, ScopedRosterWatch, type ScopedRosterWatchOptions, type ScopedWatchEnd, type ScopedWatchHandle, type ScopedWatchNoticeShape, type ScopedWatchSource, WATCH_RETRY_MS, type WatchMode, } from './watch.js';
|
|
14
15
|
/**
|
|
@@ -14,6 +14,7 @@ export { ClaustrumConsumerError, } from './errors.js';
|
|
|
14
14
|
export { assertHostSlotMatchesMode, assertNotCustodyPlaceholder, CUSTODY_PLACEHOLDER_PREFIX, classifyHostSlot, custodyPlaceholder, custodyPlaceholderKey, isCustodyPlaceholder, isCustodyPlaceholderValue, } from './host-slot.js';
|
|
15
15
|
export { acquireInsulaQuotaSource, } from './insula.js';
|
|
16
16
|
export { acceptAccount, declineAccount, isDeclined, } from './interlock.js';
|
|
17
|
+
export { drainVaultQuota } from './quota-writer.js';
|
|
17
18
|
export { acceptVaultRoute, DEFAULT_ROUTE_PREFIX, declineVaultRoute, mutateVaultRoster, projectVaultRoster, readVaultRoster, recordVaultAccountQuota, recordVaultQuota, refreshVaultRoster, resolveVaultPrimary, vaultRoutingRows, } from './roster.js';
|
|
18
19
|
export { ChangeNoticeReader, RESUBSCRIBE_BACKOFF_MS, SAFETY_POLL_MS, ScopedRosterWatch, WATCH_RETRY_MS, } from './watch.js';
|
|
19
20
|
/**
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type QuotaObservation } from '../quota/index.js';
|
|
2
|
+
import { type QuotaReceipt, type VaultRosterFile } from './roster.js';
|
|
3
|
+
export type VaultQuotaPublication = {
|
|
4
|
+
routeId: string;
|
|
5
|
+
accountIdentity?: string;
|
|
6
|
+
receipt?: QuotaReceipt;
|
|
7
|
+
observation: QuotaObservation;
|
|
8
|
+
};
|
|
9
|
+
type Listener = (publication: VaultQuotaPublication) => void;
|
|
10
|
+
/** Retain the shared writer; the last consumer's close drains it. */
|
|
11
|
+
export declare function retainVaultQuotaWriter(path: string, listener: Listener): () => Promise<void>;
|
|
12
|
+
/** Enqueue without filesystem work; each quota field retains its own receipt fence. */
|
|
13
|
+
export declare function enqueueVaultQuota(path: string, publication: VaultQuotaPublication): Promise<boolean>;
|
|
14
|
+
/** Overlay uncommitted observations when a consumer reloads the durable roster. */
|
|
15
|
+
export declare function pendingVaultQuota(path: string, roster: VaultRosterFile | undefined): VaultRosterFile | undefined;
|
|
16
|
+
/** Wait at most timeoutMs for detached publication; shutdown loss is acceptable. */
|
|
17
|
+
export declare function drainVaultQuota(path: string, timeoutMs?: number): Promise<void>;
|
|
18
|
+
export {};
|