@cortexkit/opencode-antigravity-auth 3.0.20 → 3.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/cli.js +354 -278
  2. package/dist/cli.js.map +3 -3
  3. package/dist/cli.meta.json +66 -21
  4. package/dist/index.js +841 -392
  5. package/dist/index.js.map +4 -4
  6. package/dist/index.meta.json +123 -28
  7. package/dist/server.js +860 -411
  8. package/dist/server.js.map +4 -4
  9. package/dist/server.meta.json +1 -1
  10. package/dist/src/common-auth-embedded/claustrum/custody.js +25 -0
  11. package/dist/src/common-auth-embedded/claustrum/hub.js +20 -1
  12. package/dist/src/common-auth-embedded/claustrum/insula.js +6 -0
  13. package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +2 -2
  14. package/dist/src/common-auth-embedded/fs/with-lock.js +37 -10
  15. package/dist/src/common-auth-embedded/quota/format.d.ts +9 -4
  16. package/dist/src/common-auth-embedded/quota/format.js +45 -26
  17. package/dist/src/common-auth-embedded/quota-sidebar/index.d.ts +86 -0
  18. package/dist/src/common-auth-embedded/quota-sidebar/index.tsx +654 -0
  19. package/dist/src/common-auth-embedded/routing-accessor/index.d.ts +62 -0
  20. package/dist/src/common-auth-embedded/routing-accessor/index.js +128 -0
  21. package/dist/src/common-auth-embedded/source-output.json +69 -29
  22. package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
  23. package/dist/src/ga/tui/host-ga.js +2 -2
  24. package/dist/src/ga/tui/host-ga.js.map +1 -1
  25. package/dist/src/plugin/__fixtures__/verified-store.js +2 -2
  26. package/dist/src/plugin/index.d.ts.map +1 -1
  27. package/dist/src/plugin/index.js +2 -0
  28. package/dist/src/plugin/index.js.map +1 -1
  29. package/dist/src/plugin/request.d.ts.map +1 -1
  30. package/dist/src/plugin/request.js +1 -0
  31. package/dist/src/plugin/request.js.map +1 -1
  32. package/dist/src/plugin/shared/request-services.d.ts +6 -0
  33. package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
  34. package/dist/src/plugin/shared/request-services.js +89 -2
  35. package/dist/src/plugin/shared/request-services.js.map +1 -1
  36. package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
  37. package/dist/src/plugin/shared/vault-request-credentials.js +4 -0
  38. package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -1
  39. package/dist/src/plugin/shared/vault-routing-purpose.d.ts +12 -0
  40. package/dist/src/plugin/shared/vault-routing-purpose.d.ts.map +1 -0
  41. package/dist/src/plugin/shared/vault-routing-purpose.js +18 -0
  42. package/dist/src/plugin/shared/vault-routing-purpose.js.map +1 -0
  43. package/dist/src/plugin/shared/vault-routing.d.ts +36 -0
  44. package/dist/src/plugin/shared/vault-routing.d.ts.map +1 -0
  45. package/dist/src/plugin/shared/vault-routing.js +213 -0
  46. package/dist/src/plugin/shared/vault-routing.js.map +1 -0
  47. package/dist/src/plugin/types.d.ts +1 -0
  48. package/dist/src/plugin/types.d.ts.map +1 -1
  49. package/dist/src/tui/quota-layout.d.ts +4 -58
  50. package/dist/src/tui/quota-layout.d.ts.map +1 -1
  51. package/dist/src/tui/quota-layout.js +4 -90
  52. package/dist/src/tui/quota-layout.js.map +1 -1
  53. package/dist/src/tui/sidebar-frame.d.ts +4 -34
  54. package/dist/src/tui/sidebar-frame.d.ts.map +1 -1
  55. package/dist/src/tui/sidebar-frame.js +93 -167
  56. package/dist/src/tui/sidebar-frame.js.map +1 -1
  57. package/dist/src/tui.js +2 -2
  58. package/dist/src/tui.js.map +1 -1
  59. package/dist/tui-build-map.json +31 -17
  60. package/dist/tui-ga-build-map.json +32 -17
  61. package/dist/types/src/common-auth-embedded/quota/format.d.ts +9 -4
  62. package/dist/types/src/common-auth-embedded/routing-accessor/index.d.ts +62 -0
  63. package/dist/types/src/plugin/index.d.ts.map +1 -1
  64. package/dist/types/src/plugin/request.d.ts.map +1 -1
  65. package/dist/types/src/plugin/shared/request-services.d.ts +6 -0
  66. package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
  67. package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
  68. package/dist/types/src/plugin/shared/vault-routing-purpose.d.ts +12 -0
  69. package/dist/types/src/plugin/shared/vault-routing-purpose.d.ts.map +1 -0
  70. package/dist/types/src/plugin/shared/vault-routing.d.ts +36 -0
  71. package/dist/types/src/plugin/shared/vault-routing.d.ts.map +1 -0
  72. package/dist/types/src/plugin/types.d.ts +1 -0
  73. package/dist/types/src/plugin/types.d.ts.map +1 -1
  74. package/package.json +2 -2
  75. package/src/common-auth-embedded/claustrum/custody.js +25 -0
  76. package/src/common-auth-embedded/claustrum/hub.js +20 -1
  77. package/src/common-auth-embedded/claustrum/insula.js +6 -0
  78. package/src/common-auth-embedded/fs/refresh-file-lock.js +2 -2
  79. package/src/common-auth-embedded/fs/with-lock.js +37 -10
  80. package/src/common-auth-embedded/quota/format.d.ts +9 -4
  81. package/src/common-auth-embedded/quota/format.js +45 -26
  82. package/src/common-auth-embedded/quota-sidebar/index.d.ts +86 -0
  83. package/src/common-auth-embedded/quota-sidebar/index.tsx +654 -0
  84. package/src/common-auth-embedded/routing-accessor/index.d.ts +62 -0
  85. package/src/common-auth-embedded/routing-accessor/index.js +128 -0
  86. package/src/common-auth-embedded/source-output.json +69 -29
  87. package/src/tui-compiled/common-auth-embedded/quota/format.js +45 -26
  88. package/src/tui-compiled/common-auth-embedded/quota-sidebar/index.js +683 -0
  89. package/src/tui-compiled/tui/quota-layout.js +5 -330
  90. package/src/tui-compiled/tui/sidebar-frame.js +243 -467
  91. package/src/tui-compiled/tui.js +2 -2
  92. package/src/tui-ga-compiled/host-ga.js +2 -2
  93. package/src/tui-ga-compiled/shared/aef2402f8fc342f0-format.js +45 -26
  94. package/src/tui-ga-compiled/shared/ced204104a639c9c-sidebar-frame.js +243 -467
  95. package/src/tui-ga-compiled/shared/dd4c9e1a907f8ef0-quota-layout.js +5 -330
  96. package/src/tui-ga-compiled/shared/e4ec36f367492969-index.js +683 -0
  97. package/src/tui-ga-raw/host-ga.tsx +2 -2
  98. package/src/tui-ga-raw/shared/aef2402f8fc342f0-format.js +45 -26
  99. package/src/tui-ga-raw/shared/ced204104a639c9c-sidebar-frame.tsx +214 -400
  100. package/src/tui-ga-raw/shared/dd4c9e1a907f8ef0-quota-layout.tsx +10 -301
  101. package/src/tui-ga-raw/shared/e4ec36f367492969-index.tsx +654 -0
  102. package/src/tui-raw/common-auth-embedded/quota/format.js +45 -26
  103. package/src/tui-raw/common-auth-embedded/quota-sidebar/index.tsx +654 -0
  104. package/src/tui-raw/tui/quota-layout.tsx +10 -301
  105. package/src/tui-raw/tui/sidebar-frame.tsx +214 -400
  106. package/src/tui-raw/tui.tsx +2 -2
  107. package/src/tui.tsx +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-routing-purpose.d.ts","sourceRoot":"","sources":["../../../../src/plugin/shared/vault-routing-purpose.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,2CACC,CAAA;AAE1C,wGAAwG;AACxG,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,IAExD,OAAO;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EACvD,QAAQ;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,mBAQ9C;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAIT"}
@@ -0,0 +1,18 @@
1
+ export const VAULT_ROUTING_PURPOSE_HEADER = 'x-antigravity-internal-request-purpose';
2
+ /** Only known agent turns positively identify primary work; unknown and maintenance agents stay out. */
3
+ export function createVaultRoutingHeaders(providerId) {
4
+ return async (input, output) => {
5
+ if (input.model.providerID !== providerId)
6
+ return;
7
+ output.headers[VAULT_ROUTING_PURPOSE_HEADER] =
8
+ input.agent === 'build' || input.agent === 'plan'
9
+ ? 'primary'
10
+ : 'auxiliary';
11
+ };
12
+ }
13
+ export function isPrimaryVaultRequest(kind, headers) {
14
+ return kind === undefined
15
+ ? new Headers(headers).get(VAULT_ROUTING_PURPOSE_HEADER) === 'primary'
16
+ : kind === 'primary';
17
+ }
18
+ //# sourceMappingURL=vault-routing-purpose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-routing-purpose.js","sourceRoot":"","sources":["../../../../src/plugin/shared/vault-routing-purpose.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,4BAA4B,GACvC,wCAAwC,CAAA;AAE1C,wGAAwG;AACxG,MAAM,UAAU,yBAAyB,CAAC,UAAkB;IAC1D,OAAO,KAAK,EACV,KAAuD,EACvD,MAA2C,EAC3C,EAAE;QACF,IAAI,KAAK,CAAC,KAAK,CAAC,UAAU,KAAK,UAAU;YAAE,OAAM;QACjD,MAAM,CAAC,OAAO,CAAC,4BAA4B,CAAC;YAC1C,KAAK,CAAC,KAAK,KAAK,OAAO,IAAI,KAAK,CAAC,KAAK,KAAK,MAAM;gBAC/C,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,WAAW,CAAA;IACnB,CAAC,CAAA;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,IAAwB,EACxB,OAAqB;IAErB,OAAO,IAAI,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,4BAA4B,CAAC,KAAK,SAAS;QACtE,CAAC,CAAC,IAAI,KAAK,SAAS,CAAA;AACxB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { QuotaGroup, QuotaGroupSummary } from '@cortexkit/antigravity-auth-core';
2
+ import { type RoutingCandidate, reportRouting } from '../../common-auth-embedded/routing-accessor/index.js';
3
+ export declare const ROUTING_GROUP_SCOPED_EXHAUSTION = false;
4
+ /** The bridge may arrive or disappear after plugin load; never cache its presence. */
5
+ export declare function hasVaultRoutingAccessor(): boolean;
6
+ export interface RoutingIdentity extends RoutingCandidate {
7
+ sessionId: string;
8
+ }
9
+ export declare function routingQuotaScope(group: QuotaGroup, window: string): {
10
+ pool: 'gemini' | '3p' | 'gemini-argon';
11
+ limitWindow: 'five_hour' | 'seven_day';
12
+ } | undefined;
13
+ /** common-auth 0.33.0 carries pool separately from the window length; its routing relay translates 5h/7d. */
14
+ export declare function routingExhaustionFields(scope: NonNullable<ReturnType<typeof routingQuotaScope>>): {
15
+ pool: string;
16
+ window: '5h' | '7d';
17
+ };
18
+ /** A refusal alone does not establish exhaustion: large requests can fail while quota remains. */
19
+ export declare function reportVaultExhaustion(input: {
20
+ identity: RoutingIdentity;
21
+ status: number;
22
+ reason: string;
23
+ group: QuotaGroup;
24
+ quota?: QuotaGroupSummary;
25
+ observedAt?: number;
26
+ signal?: AbortSignal | null;
27
+ }, groupScopedExhaustion?: boolean, report?: typeof reportRouting): void;
28
+ export interface VaultUpstreamObservation {
29
+ response: Response;
30
+ completedSuccessfully(): boolean;
31
+ }
32
+ /** transformAntigravityResponse can stop at a finish reason before upstream EOF, hiding a later error. */
33
+ export declare function observeVaultUpstream(response: Response, signal?: AbortSignal | null): VaultUpstreamObservation | undefined;
34
+ /** Observe only the body the caller consumes; cancellation and failed reads never count as served. */
35
+ export declare function observeVaultServed(identity: RoutingIdentity, response: Response, signal?: AbortSignal | null, upstream?: VaultUpstreamObservation): Response;
36
+ //# sourceMappingURL=vault-routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-routing.d.ts","sourceRoot":"","sources":["../../../../src/plugin/shared/vault-routing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EAClB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,KAAK,gBAAgB,EACrB,aAAa,EACd,MAAM,sDAAsD,CAAA;AAI7D,eAAO,MAAM,+BAA+B,QAAQ,CAAA;AAEpD,sFAAsF;AACtF,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AW,GAAG,IAAI,EAC3B,QAAQ,CAAC,EAAE,wBAAwB,GAClC,QAAQ,CAkBV"}
@@ -0,0 +1,213 @@
1
+ import { reportRouting, } from '../../common-auth-embedded/routing-accessor/index.js';
2
+ // The external routing relay (THALAMUS) must forward the quota-group pool field
3
+ // before scoped exhaustion is enabled; losing it would block the whole account.
4
+ export const ROUTING_GROUP_SCOPED_EXHAUSTION = false;
5
+ /** The bridge may arrive or disappear after plugin load; never cache its presence. */
6
+ export function hasVaultRoutingAccessor() {
7
+ try {
8
+ return (typeof Reflect.get(globalThis, Symbol.for('cortexkit.routing')) ===
9
+ 'function');
10
+ }
11
+ catch {
12
+ return false;
13
+ }
14
+ }
15
+ export function routingQuotaScope(group, window) {
16
+ const limitWindow = window === '5h'
17
+ ? 'five_hour'
18
+ : window === 'weekly'
19
+ ? 'seven_day'
20
+ : undefined;
21
+ return limitWindow
22
+ ? { pool: group === 'non-gemini' ? '3p' : group, limitWindow }
23
+ : undefined;
24
+ }
25
+ /** common-auth 0.33.0 carries pool separately from the window length; its routing relay translates 5h/7d. */
26
+ export function routingExhaustionFields(scope) {
27
+ return {
28
+ pool: scope.pool,
29
+ window: scope.limitWindow === 'five_hour' ? '5h' : '7d',
30
+ };
31
+ }
32
+ /** A refusal alone does not establish exhaustion: large requests can fail while quota remains. */
33
+ export function reportVaultExhaustion(input, groupScopedExhaustion = ROUTING_GROUP_SCOPED_EXHAUSTION, report = reportRouting) {
34
+ if (!hasVaultRoutingAccessor() ||
35
+ input.signal?.aborted ||
36
+ input.status !== 429 ||
37
+ input.reason !== 'QUOTA_EXHAUSTED' ||
38
+ !Number.isFinite(input.observedAt) ||
39
+ (input.observedAt ?? 0) <= 0 ||
40
+ (input.observedAt ?? Infinity) > Date.now())
41
+ return;
42
+ for (const window of input.quota?.windows ?? []) {
43
+ if (window.remainingFraction !== 0)
44
+ continue;
45
+ const scope = routingQuotaScope(input.group, window.window);
46
+ const resetsAt = Date.parse(window.resetTime);
47
+ if (!scope || !Number.isFinite(resetsAt) || resetsAt <= Date.now())
48
+ continue;
49
+ if (groupScopedExhaustion)
50
+ report({
51
+ ...input.identity,
52
+ outcome: 'exhausted',
53
+ ...routingExhaustionFields(scope),
54
+ resetsAt,
55
+ });
56
+ }
57
+ }
58
+ const RATE_LIMIT_HEADERS = [
59
+ 'retry-after',
60
+ 'retry-after-ms',
61
+ 'ratelimit-limit',
62
+ 'ratelimit-remaining',
63
+ 'ratelimit-reset',
64
+ 'ratelimit-policy',
65
+ 'x-ratelimit-limit',
66
+ 'x-ratelimit-remaining',
67
+ 'x-ratelimit-reset',
68
+ 'x-ratelimit-limit-requests',
69
+ 'x-ratelimit-remaining-requests',
70
+ 'x-ratelimit-reset-requests',
71
+ 'x-ratelimit-limit-tokens',
72
+ 'x-ratelimit-remaining-tokens',
73
+ 'x-ratelimit-reset-tokens',
74
+ ];
75
+ function streamFailure(value) {
76
+ if (!value || typeof value !== 'object')
77
+ return false;
78
+ if (Array.isArray(value))
79
+ return value.some(streamFailure);
80
+ const event = value;
81
+ return (event.error != null ||
82
+ event.type === 'error' ||
83
+ event.type === 'response.failed' ||
84
+ event.status === 'failed' ||
85
+ streamFailure(event.response));
86
+ }
87
+ /** transformAntigravityResponse can stop at a finish reason before upstream EOF, hiding a later error. */
88
+ export function observeVaultUpstream(response, signal) {
89
+ if (!hasVaultRoutingAccessor() || !response.ok || signal?.aborted)
90
+ return undefined;
91
+ let completed = false;
92
+ return {
93
+ response: observeBody(response, () => {
94
+ completed = !signal?.aborted;
95
+ }),
96
+ completedSuccessfully: () => completed,
97
+ };
98
+ }
99
+ /** Observe only the body the caller consumes; cancellation and failed reads never count as served. */
100
+ export function observeVaultServed(identity, response, signal, upstream) {
101
+ if (!hasVaultRoutingAccessor() || !response.ok || signal?.aborted)
102
+ return response;
103
+ const report = () => {
104
+ if (signal?.aborted ||
105
+ (upstream && !upstream.completedSuccessfully()) ||
106
+ !hasVaultRoutingAccessor())
107
+ return;
108
+ const headers = {};
109
+ for (const name of RATE_LIMIT_HEADERS) {
110
+ const value = response.headers.get(name);
111
+ if (value !== null)
112
+ headers[name] = value;
113
+ }
114
+ reportRouting({ ...identity, outcome: 'served', headers });
115
+ };
116
+ return observeBody(response, report);
117
+ }
118
+ function observeBody(response, complete) {
119
+ if (!response.body) {
120
+ complete();
121
+ return response;
122
+ }
123
+ const sse = response.headers
124
+ .get('content-type')
125
+ ?.includes('text/event-stream');
126
+ const reader = response.body.getReader();
127
+ const decoder = new TextDecoder();
128
+ let pending = '';
129
+ let failed = false;
130
+ const inspect = (line) => {
131
+ if (line.length > 1024 * 1024) {
132
+ failed = true;
133
+ return;
134
+ }
135
+ if (line.startsWith('event:') && line.slice(6).trim() === 'error')
136
+ failed = true;
137
+ if (!line.startsWith('data:') ||
138
+ !/"(?:error|response.failed|failed)"/.test(line))
139
+ return;
140
+ try {
141
+ failed ||= streamFailure(JSON.parse(line.slice(5)));
142
+ }
143
+ catch {
144
+ failed = true;
145
+ }
146
+ };
147
+ const body = new ReadableStream({
148
+ async pull(controller) {
149
+ try {
150
+ const chunk = await reader.read();
151
+ if (chunk.done) {
152
+ if (sse)
153
+ inspect(pending + decoder.decode());
154
+ else if (/"(?:error|response.failed|failed)"/.test(pending)) {
155
+ try {
156
+ failed ||= streamFailure(JSON.parse(pending + decoder.decode()));
157
+ }
158
+ catch {
159
+ failed = true;
160
+ }
161
+ }
162
+ if (!failed)
163
+ complete();
164
+ controller.close();
165
+ reader.releaseLock();
166
+ return;
167
+ }
168
+ if (!failed) {
169
+ pending += decoder.decode(chunk.value, { stream: true });
170
+ if (sse) {
171
+ let newline = pending.indexOf('\n');
172
+ while (newline >= 0) {
173
+ inspect(pending.slice(0, newline));
174
+ pending = pending.slice(newline + 1);
175
+ newline = pending.indexOf('\n');
176
+ }
177
+ }
178
+ // A malformed, unbounded event cannot establish successful completion.
179
+ if (pending.length > 1024 * 1024) {
180
+ failed = true;
181
+ pending = '';
182
+ }
183
+ }
184
+ controller.enqueue(chunk.value);
185
+ }
186
+ catch (error) {
187
+ failed = true;
188
+ controller.error(error);
189
+ reader.releaseLock();
190
+ }
191
+ },
192
+ async cancel(reason) {
193
+ failed = true;
194
+ try {
195
+ await reader.cancel(reason);
196
+ }
197
+ finally {
198
+ reader.releaseLock();
199
+ }
200
+ },
201
+ }, { highWaterMark: 0 });
202
+ const observed = new Response(body, {
203
+ status: response.status,
204
+ statusText: response.statusText,
205
+ headers: response.headers,
206
+ });
207
+ Object.defineProperties(observed, {
208
+ url: { value: response.url },
209
+ redirected: { value: response.redirected },
210
+ });
211
+ return observed;
212
+ }
213
+ //# sourceMappingURL=vault-routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault-routing.js","sourceRoot":"","sources":["../../../../src/plugin/shared/vault-routing.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,aAAa,GACd,MAAM,sDAAsD,CAAA;AAE7D,gFAAgF;AAChF,gFAAgF;AAChF,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,CAAA;AAEpD,sFAAsF;AACtF,MAAM,UAAU,uBAAuB;IACrC,IAAI,CAAC;QACH,OAAO,CACL,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;YAC/D,UAAU,CACX,CAAA;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AAMD,MAAM,UAAU,iBAAiB,CAC/B,KAAiB,EACjB,MAAc;IAOd,MAAM,WAAW,GACf,MAAM,KAAK,IAAI;QACb,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,MAAM,KAAK,QAAQ;YACnB,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,SAAS,CAAA;IACjB,OAAO,WAAW;QAChB,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,WAAW,EAAE;QAC9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ACH,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;YAC7B,CAAC;oBAAS,CAAC;gBACT,MAAM,CAAC,WAAW,EAAE,CAAA;YACtB,CAAC;QACH,CAAC;KACF,EACD,EAAE,aAAa,EAAE,CAAC,EAAE,CACrB,CAAA;IACD,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,EAAE;QAClC,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO;KAC1B,CAAC,CAAA;IACF,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE;QAChC,GAAG,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE;QAC5B,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,UAAU,EAAE;KAC3C,CAAC,CAAA;IACF,OAAO,QAAQ,CAAA;AACjB,CAAC"}
@@ -32,5 +32,6 @@ export type PluginResult = {
32
32
  event: NonNullable<Hooks['event']>;
33
33
  dispose: NonNullable<Hooks['dispose']>;
34
34
  'command.execute.before': NonNullable<Hooks['command.execute.before']>;
35
+ 'chat.headers'?: Hooks['chat.headers'];
35
36
  };
36
37
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugin/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,MAAM,EACN,KAAK,EACL,WAAW,EACX,cAAc,EACf,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE/D,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,YAAY,GACb,MAAM,kCAAkC,CAAA;AAEzC,YAAY,EACV,QAAQ,EACR,e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,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAA;AAElC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;CACjE;AAED,KAAK,gBAAgB,GAAG,QAAQ,GAAG;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAA;IACvC,OAAO,EAAE,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,gBAAgB,CAAA;IACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IACpC,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;IACpC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;IAClC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;IACtC,wBAAwB,EAAE,WAAW,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAA;IACtE,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAA;CACvC,CAAA"}
@@ -1,38 +1,7 @@
1
- /** @jsxImportSource @opentui/solid */
2
- /**
3
- * Quota layout shared by the OpenCode 1 sidebar (`tui.tsx`) and the OpenCode 2
4
- * sidebar (`ga/tui/host-ga.tsx`): one account block with its header line, the
5
- * reading age once per account, plain-word group headers and one width-fitted
6
- * row per quota window.
7
- *
8
- * Each renderer supplies its own data source and colors. This module imports
9
- * only the pure quota presentation helpers, so it stays inside both TUI
10
- * import graphs: no sidebar file, preferences file, RPC, account store,
11
- * OAuth, token or host SDK module, and nothing that writes to the terminal.
12
- */
13
- import type { RGBA } from '@opentui/core';
14
- import { type JSX } from 'solid-js';
1
+ /** Pure account-window inputs shared by the two sidebar hosts. */
2
+ import type { SidebarAppearance, Tone } from '../common-auth-embedded/quota-sidebar/index.js';
15
3
  import { type QuotaReading, type QuotaWindowText } from '../quota-presentation.js';
16
- export type QuotaTone = 'ok' | 'warn' | 'err' | 'muted' | 'accent' | 'text';
17
- /** A text color; `undefined` leaves the host's default color in place. */
18
- export type QuotaColor = string | RGBA | undefined;
19
- /**
20
- * How a renderer colors the quota layout. OpenCode 1 maps these onto its live
21
- * host theme; a renderer without a theme returns `undefined` everywhere.
22
- */
23
- export interface QuotaPalette {
24
- readonly text: () => QuotaColor;
25
- readonly muted: () => QuotaColor;
26
- readonly tone: (tone: QuotaTone) => QuotaColor;
27
- }
28
- /** The bar and threshold settings the layout reads. */
29
- export interface QuotaAppearance {
30
- readonly barWidth: number;
31
- readonly barFilledChar: string;
32
- readonly barEmptyChar: string;
33
- readonly warnThreshold: number;
34
- readonly errorThreshold: number;
35
- }
4
+ export type QuotaAppearance = SidebarAppearance;
36
5
  /**
37
6
  * The OpenCode 1 preference defaults for the quota bar, for a renderer that
38
7
  * has no preferences file. A test keeps it equal to `DEFAULT_PREFS.appearance`.
@@ -63,34 +32,11 @@ export interface QuotaLayoutAccount {
63
32
  }
64
33
  export declare const GROUP_NAMES: Record<QuotaGroupKey, string>;
65
34
  export declare const QUOTA_ORDER: readonly QuotaGroupKey[];
66
- export declare const RESET_SINCE_READING = "reset since last check";
67
- export declare const ASSUMED_CONTENT_WIDTH = 28;
68
- export declare function quotaTone(usedPct: number, appearance: QuotaAppearance): QuotaTone;
35
+ export declare function quotaTone(usedPct: number, appearance: QuotaAppearance): Tone;
69
36
  export interface AccountWindow {
70
37
  key: QuotaGroupKey;
71
38
  reading: QuotaReading;
72
39
  text: QuotaWindowText;
73
40
  }
74
41
  export declare function accountWindows(account: QuotaLayoutAccount, now: number): AccountWindow[];
75
- export declare function showsFigure(window: AccountWindow): boolean;
76
- export declare function fitLabel(label: string, max: number): string;
77
- /**
78
- * One account's quota block. The header line is the account label, the
79
- * reading age when the oldest reading is stale, and the caller's status word
80
- * right-aligned; the age moves to its own dim line when the three do not
81
- * fit. Below it each quota group present gets a plain-word header and one
82
- * row per window, or a single dim line when there is no reading at all.
83
- * `children`, when given, render after the quota rows.
84
- */
85
- export declare function QuotaAccountBlock(props: {
86
- palette: QuotaPalette;
87
- appearance: QuotaAppearance;
88
- account: QuotaLayoutAccount;
89
- status: string;
90
- statusTone: QuotaTone;
91
- now: () => number;
92
- width: () => number;
93
- marginTop?: number;
94
- children?: JSX.Element;
95
- }): JSX.Element;
96
42
  //# sourceMappingURL=quota-layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"quota-layout.d.ts","sourceRoot":"","sources":["../../../src/tui/quota-layout.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAO,KAAK,GAAG,EAAQ,MAAM,UAAU,CAAA;AAC9C,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,eAAe,EAGrB,MAAM,uBAAuB,CAAA;AAE9B,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE3E,0EAA0E;AAC1E,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;AAElD;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,UAAU,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,UAAU,CAAA;IAChC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,UAAU,CAAA;CAC/C;AAED,uDAAuD;AACvD,MAAM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,YAAY,CAAA;IACrB,IAAI,EAAE,eAAe,CAAA;CACtB;AAID,wBAAgB,cAAc,CAC5B,OAAO,EAAE,kBAAkB,EAC3B,GAAG,EAAE,MAAM,GACV,aAAa,EAAE,CAwBjB"}
@@ -1,6 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@opentui/solid/jsx-runtime";
2
- import { For, Show } from 'solid-js';
3
- import { NO_QUOTA_READING, quotaReadingAge, quotaWindowText, } from '../quota-presentation';
1
+ import { quotaWindowText, } from '../quota-presentation';
4
2
  /**
5
3
  * The OpenCode 1 preference defaults for the quota bar, for a renderer that
6
4
  * has no preferences file. A test keeps it equal to `DEFAULT_PREFS.appearance`.
@@ -23,33 +21,12 @@ export const QUOTA_ORDER = [
23
21
  'non-gemini',
24
22
  'gemini-argon',
25
23
  ];
26
- // Shown instead of a stored figure once the window has reset since it was
27
- // read: the stored figure describes the window before the reset.
28
- export const RESET_SINCE_READING = 'reset since last check';
29
- // Content width used until the first layout pass reports the real one. It
30
- // fits the narrowest OpenCode sidebar.
31
- export const ASSUMED_CONTENT_WIDTH = 28;
32
- // A window row is `<name> <bar> <figure> <reset>`. The bar shrinks to this
33
- // before the reset column is dropped; below it the bar is dropped too.
34
- const MIN_BAR_WIDTH = 4;
35
- // The widest figure the formatter writes: `100% left`.
36
- const FIGURE_WIDTH = 9;
37
- // A window name (`5h`, `7d`) and the space after it.
38
- const NAME_WIDTH = 3;
39
24
  export function quotaTone(usedPct, appearance) {
40
25
  if (usedPct < appearance.warnThreshold)
41
- return 'ok';
26
+ return 'success';
42
27
  if (usedPct < appearance.errorThreshold)
43
- return 'warn';
44
- return 'err';
45
- }
46
- function quotaBarSegments(remainingPct, width, appearance) {
47
- const usedCells = Math.max(0, Math.min(Math.round((remainingPct / 100) * width), width));
48
- const tone = quotaTone(100 - remainingPct, appearance);
49
- return [
50
- { text: appearance.barFilledChar.repeat(usedCells), tone },
51
- { text: appearance.barEmptyChar.repeat(width - usedCells), tone },
52
- ].filter((segment) => segment.text.length > 0);
28
+ return 'warning';
29
+ return 'error';
53
30
  }
54
31
  // One entry per stored window, in group order. A pool stored before
55
32
  // per-window readings existed contributes one window without a name.
@@ -78,67 +55,4 @@ export function accountWindows(account, now) {
78
55
  }
79
56
  return result;
80
57
  }
81
- // A window shows its figure only while no reset has happened since it was
82
- // read and it has a read time at all.
83
- export function showsFigure(window) {
84
- return window.text.remaining != null && !window.text.resetSinceReading;
85
- }
86
- // Column widths for one `<name> <bar> <figure> <reset>` row within `width`
87
- // cells. The bar shrinks first, down to MIN_BAR_WIDTH; then the reset column
88
- // is dropped; when even that leaves less than MIN_BAR_WIDTH cells for the
89
- // bar, the bar is left out and the row is just the name and figure.
90
- function windowRowLayout(width, named, resetWidth, maxBar) {
91
- const room = width - (named ? NAME_WIDTH : 0) - FIGURE_WIDTH;
92
- if (resetWidth > 0) {
93
- const bar = Math.min(maxBar, room - resetWidth - 2);
94
- if (bar >= MIN_BAR_WIDTH)
95
- return { bar, reset: true };
96
- }
97
- const bar = Math.min(maxBar, room - 1);
98
- return { bar: bar >= MIN_BAR_WIDTH ? bar : 0, reset: false };
99
- }
100
- // Shorten a label to `max` cells, marking the cut with an ellipsis.
101
- export function fitLabel(label, max) {
102
- if (label.length <= max)
103
- return label;
104
- if (max <= 0)
105
- return '';
106
- if (max === 1)
107
- return '…';
108
- return `${label.slice(0, max - 1)}…`;
109
- }
110
- // One quota window on one line. The bar fills with remaining quota; the
111
- // figure and reset come from the shared formatter. A window that reset since
112
- // its reading shows that fact, dim, in place of the stale figure.
113
- function WindowRow(props) {
114
- const text = () => props.window.text;
115
- const tone = () => quotaTone(100 - (text().remaining ?? 0), props.appearance);
116
- return (_jsxs("box", { width: '100%', flexDirection: 'row', children: [_jsx(Show, { when: text().name !== '', children: _jsx("text", { width: NAME_WIDTH, flexShrink: 0, wrapMode: 'none', fg: props.palette.muted(), children: text().name }) }), _jsxs(Show, { when: showsFigure(props.window), fallback: _jsx("text", { flexShrink: 1, wrapMode: 'none', fg: props.palette.muted(), children: text().resetSinceReading ? RESET_SINCE_READING : text().figure }), children: [_jsx(Show, { when: props.layout.bar > 0, children: _jsx("box", { width: props.layout.bar + 1, flexShrink: 0, flexDirection: 'row', children: _jsx(For, { each: quotaBarSegments(text().remaining ?? 0, props.layout.bar, props.appearance), children: (segment) => (_jsx("text", { wrapMode: 'none', fg: props.palette.tone(segment.tone), children: segment.text })) }) }) }), _jsx("text", { flexShrink: 0, wrapMode: 'none', fg: props.palette.tone(tone()), children: text().figure }), _jsx("box", { flexGrow: 1 }), _jsx(Show, { when: props.layout.reset && text().reset !== '', children: _jsx("text", { flexShrink: 0, wrapMode: 'none', fg: props.palette.muted(), children: text().reset }) })] })] }));
117
- }
118
- /**
119
- * One account's quota block. The header line is the account label, the
120
- * reading age when the oldest reading is stale, and the caller's status word
121
- * right-aligned; the age moves to its own dim line when the three do not
122
- * fit. Below it each quota group present gets a plain-word header and one
123
- * row per window, or a single dim line when there is no reading at all.
124
- * `children`, when given, render after the quota rows.
125
- */
126
- export function QuotaAccountBlock(props) {
127
- const windows = () => accountWindows(props.account, props.now());
128
- const age = () => quotaReadingAge(windows().map((window) => window.reading), props.now());
129
- const ageInline = () => age() !== '' &&
130
- props.account.label.length + 3 + age().length + 1 + props.status.length <=
131
- props.width();
132
- const label = () => fitLabel(props.account.label, props.width() - 1 - props.status.length);
133
- // One reset column width per account, so bars line up across its rows.
134
- const resetWidth = () => Math.max(0, ...windows()
135
- .filter(showsFigure)
136
- .map((window) => window.text.reset.length));
137
- const layoutFor = (window) => windowRowLayout(props.width(), window.text.name !== '', resetWidth(), props.appearance.barWidth);
138
- const groups = () => QUOTA_ORDER.map((key) => ({
139
- key,
140
- windows: windows().filter((window) => window.key === key),
141
- })).filter((group) => group.windows.length > 0);
142
- return (_jsxs("box", { width: '100%', flexDirection: 'column', marginTop: props.marginTop ?? 0, children: [_jsxs("box", { width: '100%', flexDirection: 'row', children: [_jsx("text", { flexShrink: 0, wrapMode: 'none', fg: props.palette.text(), children: _jsx("b", { children: label() }) }), _jsx(Show, { when: ageInline(), children: _jsx("text", { flexShrink: 0, wrapMode: 'none', fg: props.palette.muted(), children: ` · ${age()}` }) }), _jsx("box", { flexGrow: 1 }), _jsx("text", { flexShrink: 0, wrapMode: 'none', fg: props.palette.tone(props.statusTone), children: _jsx("b", { children: props.status }) })] }), _jsx(Show, { when: age() !== '' && !ageInline(), children: _jsx("text", { wrapMode: 'none', fg: props.palette.muted(), children: age() }) }), _jsx(Show, { when: groups().length > 0, fallback: _jsx("text", { wrapMode: 'none', fg: props.palette.muted(), children: NO_QUOTA_READING }), children: _jsx(For, { each: groups(), children: (group) => (_jsxs(_Fragment, { children: [_jsx("text", { wrapMode: 'none', fg: props.palette.muted(), children: GROUP_NAMES[group.key] }), _jsx(For, { each: group.windows, children: (window) => (_jsx(WindowRow, { palette: props.palette, appearance: props.appearance, window: window, layout: layoutFor(window) })) })] })) }) }), props.children] }));
143
- }
144
58
  //# sourceMappingURL=quota-layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"quota-layout.js","sourceRoot":"","sources":["../../../src/tui/quota-layout.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,GAAG,EAAY,IAAI,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EACL,gBAAgB,EAGhB,eAAe,EACf,eAAe,GAChB,MAAM,uBAAuB,CAAA;AA0B9B;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAoB;IACvD,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,GAAG;IAClB,YAAY,EAAE,GAAG;IACjB,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,EAAE;CACnB,CAAA;AA6BD,qDAAqD;AACrD,MAAM,CAAC,MAAM,WAAW,GAAkC;IACxD,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,cAAc;IAC5B,cAAc,EAAE,OAAO;CACxB,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAA6B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E,CAAC,CAAC;gBAC7B,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;gBACzC,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,SAAS,EAAE,MAAM,CAAC,SAAS;aAC5B,CAAC,CAAC;YACL,CAAC,CAAC;gBACE;oBACE,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;oBACxC,OAAO,EAAE,KAAK,CAAC,OAAO;oBACtB,SAAS,EAAE,KAAK,CAAC,SAAS;iBAC3B;aACF,CAAA;QACP,KAAK,MAAM,OAAO,IAAI,QAAQ;YAC5B,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC,CAAA;IACtE,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1,27 +1,9 @@
1
1
  /** @jsxImportSource @opentui/solid */
2
- /**
3
- * The Antigravity sidebar frame, shared by the OpenCode 1 sidebar (`tui.tsx`)
4
- * and the OpenCode 2 sidebar (`ga/tui/host-ga.tsx`): the padded
5
- * panel, the clickable `▼`/`▶` header badge with the optional plugin version
6
- * at the right, one line per account when collapsed, and the
7
- * `Quota`, `Routing` and `Health` sections when expanded.
8
- *
9
- * Each renderer reads its own data source (the sidebar file, or the
10
- * location's `state` answer), maps its own host theme onto `FrameTheme` and
11
- * owns its own collapse state; everything drawn is decided here, so a change
12
- * of shape is made once for both hosts.
13
- *
14
- * This module stays inside both TUI import graphs: besides Solid and
15
- * OpenTUI it imports only the pure quota and sidebar-projection helpers and
16
- * the shared layouts. No sidebar file, preferences file, RPC, account
17
- * store, OAuth, token or host SDK module, no Node built-in, and nothing
18
- * that writes to the terminal.
19
- */
2
+ /** Plugin-owned projection and Routing/Health sections for the shared quota frame. */
20
3
  import type { RGBA } from '@opentui/core';
21
4
  import { type JSX } from 'solid-js';
22
5
  import { type ProjectedQuota } from '../common-auth-embedded/quota/index.js';
23
- import { type QuotaAppearance, type QuotaLayoutAccount, type QuotaPalette, type QuotaTone } from './quota-layout.js';
24
- type Tone = QuotaTone;
6
+ import { type QuotaAppearance, type QuotaLayoutAccount } from './quota-layout.js';
25
7
  /** A theme color; `undefined` leaves the host's default color in place. */
26
8
  export type FrameColor = string | RGBA | undefined;
27
9
  /**
@@ -39,10 +21,9 @@ export interface FrameTheme {
39
21
  readonly warning: FrameColor;
40
22
  readonly error: FrameColor;
41
23
  }
42
- export declare function toneColor(theme: FrameTheme, tone: Tone): FrameColor;
43
- export declare function themePalette(theme: () => FrameTheme): QuotaPalette;
44
24
  /** The account fields the frame reads: the quota layout's plus the state. */
45
25
  export interface FrameAccount extends QuotaLayoutAccount {
26
+ readonly id: string;
46
27
  readonly enabled: boolean;
47
28
  readonly current: boolean;
48
29
  readonly cooldownUntil?: number;
@@ -76,16 +57,6 @@ export interface FrameSettings {
76
57
  * `DEFAULT_PREFS`.
77
58
  */
78
59
  export declare const DEFAULT_FRAME_SETTINGS: FrameSettings;
79
- export declare function SectionHeader(props: {
80
- theme: () => FrameTheme;
81
- title: string;
82
- }): JSX.Element;
83
- export declare function StatRow(props: {
84
- theme: () => FrameTheme;
85
- label: string;
86
- value: string;
87
- tone?: Tone;
88
- }): JSX.Element;
89
60
  export declare function sidebarQuotaProjection(account: QuotaLayoutAccount, now: number): ProjectedQuota | undefined;
90
61
  export interface SidebarFrameProps {
91
62
  readonly theme: () => FrameTheme;
@@ -103,6 +74,5 @@ export interface SidebarFrameProps {
103
74
  readonly lastError: () => string | null | undefined;
104
75
  readonly now: () => number;
105
76
  }
106
- export declare function SidebarFrame(props: SidebarFrameProps): JSX.Element;
107
- export {};
77
+ export declare function AntigravitySidebar(props: SidebarFrameProps): JSX.Element;
108
78
  //# sourceMappingURL=sidebar-frame.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar-frame.d.ts","sourceRoot":"","sources":["../../../src/tui/sidebar-frame.tsx"],"names":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