@cortexkit/opencode-antigravity-auth 3.1.10 → 3.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +357 -58
- package/dist/cli.js.map +3 -3
- package/dist/cli.meta.json +42 -32
- package/dist/index.js +1115 -493
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +98 -65
- package/dist/server.js +1266 -616
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +1 -1
- package/dist/src/cli.d.ts +3 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +19 -6
- package/dist/src/cli.js.map +1 -1
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +20 -1
- package/dist/src/common-auth-embedded/claustrum/consumer.js +32 -0
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +39 -1
- package/dist/src/common-auth-embedded/claustrum/custody.js +145 -8
- package/dist/src/common-auth-embedded/claustrum/host.js +8 -0
- package/dist/src/common-auth-embedded/claustrum/hub.d.ts +3 -2
- package/dist/src/common-auth-embedded/claustrum/hub.js +10 -0
- package/dist/src/common-auth-embedded/claustrum/index.d.ts +1 -1
- package/dist/src/common-auth-embedded/routing-accessor/index.js +5 -3
- package/dist/src/common-auth-embedded/source-output.json +35 -35
- package/dist/src/ga/rpc/protocol.d.ts +11 -5
- package/dist/src/ga/rpc/protocol.d.ts.map +1 -1
- package/dist/src/ga/rpc/protocol.js +11 -3
- package/dist/src/ga/rpc/protocol.js.map +1 -1
- package/dist/src/ga/server/index.d.ts.map +1 -1
- package/dist/src/ga/server/index.js +30 -14
- package/dist/src/ga/server/index.js.map +1 -1
- package/dist/src/ga/tui/host-ga.d.ts +2 -1
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
- package/dist/src/ga/tui/host-ga.js +9 -4
- package/dist/src/ga/tui/host-ga.js.map +1 -1
- package/dist/src/plugin/__fixtures__/verified-store.js +2 -2
- package/dist/src/plugin/account-access.d.ts +1 -0
- package/dist/src/plugin/account-access.d.ts.map +1 -1
- package/dist/src/plugin/account-access.js +28 -0
- package/dist/src/plugin/account-access.js.map +1 -1
- package/dist/src/plugin/auth-loader.d.ts.map +1 -1
- package/dist/src/plugin/auth-loader.js +21 -12
- package/dist/src/plugin/auth-loader.js.map +1 -1
- package/dist/src/plugin/background-quota-refresh.d.ts +11 -24
- package/dist/src/plugin/background-quota-refresh.d.ts.map +1 -1
- package/dist/src/plugin/background-quota-refresh.js +54 -60
- package/dist/src/plugin/background-quota-refresh.js.map +1 -1
- package/dist/src/plugin/background-vault-quota-refresh.d.ts.map +1 -1
- package/dist/src/plugin/background-vault-quota-refresh.js +6 -3
- package/dist/src/plugin/background-vault-quota-refresh.js.map +1 -1
- package/dist/src/plugin/cache/signature-cache.d.ts +3 -0
- package/dist/src/plugin/cache/signature-cache.d.ts.map +1 -1
- package/dist/src/plugin/cache/signature-cache.js +73 -46
- package/dist/src/plugin/cache/signature-cache.js.map +1 -1
- package/dist/src/plugin/cache.d.ts.map +1 -1
- package/dist/src/plugin/cache.js +17 -7
- package/dist/src/plugin/cache.js.map +1 -1
- package/dist/src/plugin/core/streaming/displayed-thinking.d.ts +23 -0
- package/dist/src/plugin/core/streaming/displayed-thinking.d.ts.map +1 -0
- package/dist/src/plugin/core/streaming/displayed-thinking.js +58 -0
- package/dist/src/plugin/core/streaming/displayed-thinking.js.map +1 -0
- package/dist/src/plugin/fetch/warmup.d.ts +9 -2
- package/dist/src/plugin/fetch/warmup.d.ts.map +1 -1
- package/dist/src/plugin/fetch/warmup.js +22 -14
- package/dist/src/plugin/fetch/warmup.js.map +1 -1
- package/dist/src/plugin/ga-location-services.d.ts +1 -0
- package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/src/plugin/ga-location-services.js +2 -0
- package/dist/src/plugin/ga-location-services.js.map +1 -1
- package/dist/src/plugin/ga-shared-vault-custody.d.ts.map +1 -1
- package/dist/src/plugin/ga-shared-vault-custody.js +7 -1
- package/dist/src/plugin/ga-shared-vault-custody.js.map +1 -1
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +6 -1
- package/dist/src/plugin/index.js.map +1 -1
- package/dist/src/plugin/quota.d.ts +10 -2
- package/dist/src/plugin/quota.d.ts.map +1 -1
- package/dist/src/plugin/quota.js +38 -10
- package/dist/src/plugin/quota.js.map +1 -1
- package/dist/src/plugin/request-helpers.d.ts.map +1 -1
- package/dist/src/plugin/request-helpers.js +51 -19
- package/dist/src/plugin/request-helpers.js.map +1 -1
- package/dist/src/plugin/request.d.ts +12 -1
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +27 -42
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/shared/request-services.d.ts +4 -1
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/src/plugin/shared/request-services.js +142 -24
- package/dist/src/plugin/shared/request-services.js.map +1 -1
- package/dist/src/plugin/shared/runtime.d.ts +3 -4
- package/dist/src/plugin/shared/runtime.d.ts.map +1 -1
- package/dist/src/plugin/shared/runtime.js +2 -2
- package/dist/src/plugin/shared/runtime.js.map +1 -1
- package/dist/src/plugin/shared/vault-request-credentials.d.ts +25 -15
- package/dist/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
- package/dist/src/plugin/shared/vault-request-credentials.js +141 -68
- package/dist/src/plugin/shared/vault-request-credentials.js.map +1 -1
- package/dist/src/plugin/vault-sidebar-projection.d.ts.map +1 -1
- package/dist/src/setup.d.ts +3 -0
- package/dist/src/setup.d.ts.map +1 -1
- package/dist/src/setup.js +18 -6
- package/dist/src/setup.js.map +1 -1
- package/dist/src/sidebar-state.d.ts +20 -7
- package/dist/src/sidebar-state.d.ts.map +1 -1
- package/dist/src/sidebar-state.js +57 -8
- package/dist/src/sidebar-state.js.map +1 -1
- package/dist/src/tui.d.ts.map +1 -1
- package/dist/src/tui.js +43 -23
- package/dist/src/tui.js.map +1 -1
- package/dist/tui-build-map.json +9 -9
- package/dist/tui-ga-build-map.json +5 -5
- package/dist/types/src/cli.d.ts +3 -1
- package/dist/types/src/cli.d.ts.map +1 -1
- package/dist/types/src/common-auth-embedded/claustrum/consumer.d.ts +20 -1
- package/dist/types/src/common-auth-embedded/claustrum/custody.d.ts +39 -1
- package/dist/types/src/common-auth-embedded/claustrum/hub.d.ts +3 -2
- package/dist/types/src/common-auth-embedded/claustrum/index.d.ts +1 -1
- package/dist/types/src/ga/rpc/protocol.d.ts +11 -5
- package/dist/types/src/ga/rpc/protocol.d.ts.map +1 -1
- package/dist/types/src/ga/server/index.d.ts.map +1 -1
- package/dist/types/src/plugin/account-access.d.ts +1 -0
- package/dist/types/src/plugin/account-access.d.ts.map +1 -1
- package/dist/types/src/plugin/auth-loader.d.ts.map +1 -1
- package/dist/types/src/plugin/background-quota-refresh.d.ts +11 -24
- package/dist/types/src/plugin/background-quota-refresh.d.ts.map +1 -1
- package/dist/types/src/plugin/background-vault-quota-refresh.d.ts.map +1 -1
- package/dist/types/src/plugin/cache/signature-cache.d.ts +3 -0
- package/dist/types/src/plugin/cache/signature-cache.d.ts.map +1 -1
- package/dist/types/src/plugin/cache.d.ts.map +1 -1
- package/dist/types/src/plugin/core/streaming/displayed-thinking.d.ts +23 -0
- package/dist/types/src/plugin/core/streaming/displayed-thinking.d.ts.map +1 -0
- package/dist/types/src/plugin/fetch/warmup.d.ts +9 -2
- package/dist/types/src/plugin/fetch/warmup.d.ts.map +1 -1
- package/dist/types/src/plugin/ga-location-services.d.ts +1 -0
- package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
- package/dist/types/src/plugin/ga-shared-vault-custody.d.ts.map +1 -1
- package/dist/types/src/plugin/index.d.ts.map +1 -1
- package/dist/types/src/plugin/quota.d.ts +10 -2
- package/dist/types/src/plugin/quota.d.ts.map +1 -1
- package/dist/types/src/plugin/request-helpers.d.ts.map +1 -1
- package/dist/types/src/plugin/request.d.ts +12 -1
- package/dist/types/src/plugin/request.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/request-services.d.ts +4 -1
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/runtime.d.ts +3 -4
- package/dist/types/src/plugin/shared/runtime.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts +25 -15
- package/dist/types/src/plugin/shared/vault-request-credentials.d.ts.map +1 -1
- package/dist/types/src/plugin/vault-sidebar-projection.d.ts.map +1 -1
- package/dist/types/src/setup.d.ts +3 -0
- package/dist/types/src/setup.d.ts.map +1 -1
- package/dist/types/src/sidebar-state.d.ts +20 -7
- package/dist/types/src/sidebar-state.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/common-auth-embedded/claustrum/consumer.d.ts +20 -1
- package/src/common-auth-embedded/claustrum/consumer.js +32 -0
- package/src/common-auth-embedded/claustrum/custody.d.ts +39 -1
- package/src/common-auth-embedded/claustrum/custody.js +145 -8
- package/src/common-auth-embedded/claustrum/host.js +8 -0
- package/src/common-auth-embedded/claustrum/hub.d.ts +3 -2
- package/src/common-auth-embedded/claustrum/hub.js +10 -0
- package/src/common-auth-embedded/claustrum/index.d.ts +1 -1
- package/src/common-auth-embedded/routing-accessor/index.js +5 -3
- package/src/common-auth-embedded/source-output.json +35 -35
- package/src/sidebar-state.ts +77 -8
- package/src/tui-compiled/sidebar-state.js +40 -1
- package/src/tui-compiled/tui.js +49 -24
- package/src/tui-ga-compiled/host-ga.js +11 -5
- package/src/tui-ga-raw/host-ga.tsx +17 -6
- package/src/tui-raw/sidebar-state.js +40 -1
- package/src/tui-raw/tui.tsx +40 -24
- package/src/tui.tsx +40 -24
package/src/tui.tsx
CHANGED
|
@@ -53,7 +53,11 @@ import { createSlot } from '@opentui/solid'
|
|
|
53
53
|
import { createSignal, type JSX, onCleanup, onMount } from 'solid-js'
|
|
54
54
|
|
|
55
55
|
import { getRpcDir } from './rpc/rpc-dir'
|
|
56
|
-
import {
|
|
56
|
+
import {
|
|
57
|
+
createSidebarStateReader,
|
|
58
|
+
readSidebarStateWithBaseline,
|
|
59
|
+
type SidebarStateV1,
|
|
60
|
+
} from './sidebar-state'
|
|
57
61
|
import { createTuiFileLogger, type TuiLogger } from './tui/file-logger'
|
|
58
62
|
import {
|
|
59
63
|
createV1MenuTransport,
|
|
@@ -219,7 +223,6 @@ export interface SidebarController {
|
|
|
219
223
|
|
|
220
224
|
interface InternalState {
|
|
221
225
|
loaded: SidebarStateV1
|
|
222
|
-
lastReadAt: number
|
|
223
226
|
lastError: string | null
|
|
224
227
|
}
|
|
225
228
|
|
|
@@ -347,7 +350,8 @@ function formatError(value: unknown): string {
|
|
|
347
350
|
|
|
348
351
|
export function SidebarPanel(props: SidebarPanelProps): JSX.Element {
|
|
349
352
|
const logger = resolveLogger(props.logger)
|
|
350
|
-
const
|
|
353
|
+
const clock = props.now ?? Date.now
|
|
354
|
+
const [now, setNow] = createSignal(clock())
|
|
351
355
|
const pollMs = props.pollIntervalMs ?? POLL_INTERVAL_MS
|
|
352
356
|
const controller = props.controller ?? getSidebarController()
|
|
353
357
|
const collapsed = controller.collapsed
|
|
@@ -359,32 +363,44 @@ export function SidebarPanel(props: SidebarPanelProps): JSX.Element {
|
|
|
359
363
|
|
|
360
364
|
const [state, setState] = createSignal<InternalState>({
|
|
361
365
|
loaded: EMPTY_STATE,
|
|
362
|
-
lastReadAt: 0,
|
|
363
366
|
lastError: null,
|
|
364
367
|
})
|
|
365
368
|
|
|
366
|
-
const refresh = (): void => {
|
|
367
|
-
try {
|
|
368
|
-
const loaded = readSidebarState(props.stateFile)
|
|
369
|
-
setState({
|
|
370
|
-
loaded,
|
|
371
|
-
lastReadAt: now(),
|
|
372
|
-
lastError: null,
|
|
373
|
-
})
|
|
374
|
-
} catch (error) {
|
|
375
|
-
logger.warn('sidebar-poll-failed', { error: formatError(error) })
|
|
376
|
-
setState((prev) => ({
|
|
377
|
-
...prev,
|
|
378
|
-
lastReadAt: now(),
|
|
379
|
-
lastError: formatError(error),
|
|
380
|
-
}))
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
369
|
onMount(() => {
|
|
385
|
-
|
|
370
|
+
// Read synchronously once so the first frame already draws the quota bars;
|
|
371
|
+
// the polls below reread only when the file has changed since.
|
|
372
|
+
const first = readSidebarStateWithBaseline(props.stateFile)
|
|
373
|
+
setState({ loaded: first.state, lastError: null })
|
|
374
|
+
const readChanged = createSidebarStateReader(first.baseline)
|
|
375
|
+
let mounted = true
|
|
376
|
+
let reading = false
|
|
377
|
+
const refresh = async (): Promise<void> => {
|
|
378
|
+
if (!mounted) return
|
|
379
|
+
setNow(clock())
|
|
380
|
+
if (reading) return
|
|
381
|
+
reading = true
|
|
382
|
+
try {
|
|
383
|
+
const loaded = await readChanged(props.stateFile)
|
|
384
|
+
if (!mounted) return
|
|
385
|
+
if (loaded) setState({ loaded, lastError: null })
|
|
386
|
+
else if (state().lastError !== null) {
|
|
387
|
+
setState((prev) => ({ ...prev, lastError: null }))
|
|
388
|
+
}
|
|
389
|
+
} catch (error) {
|
|
390
|
+
if (!mounted) return
|
|
391
|
+
const message = formatError(error)
|
|
392
|
+
logger.warn('sidebar-poll-failed', { error: message })
|
|
393
|
+
setState((prev) => ({ ...prev, lastError: message }))
|
|
394
|
+
} finally {
|
|
395
|
+
reading = false
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
void refresh()
|
|
386
399
|
const interval = setInterval(refresh, pollMs)
|
|
387
|
-
onCleanup(() =>
|
|
400
|
+
onCleanup(() => {
|
|
401
|
+
mounted = false
|
|
402
|
+
clearInterval(interval)
|
|
403
|
+
})
|
|
388
404
|
})
|
|
389
405
|
|
|
390
406
|
const lastError = () => state().lastError ?? state().loaded.lastError
|