@cortexkit/opencode-antigravity-auth 3.0.20 → 3.0.21
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 +75 -32
- package/dist/cli.js.map +3 -3
- package/dist/cli.meta.json +31 -11
- package/dist/index.js +75 -32
- package/dist/index.js.map +3 -3
- package/dist/index.meta.json +31 -11
- package/dist/server.js +75 -32
- package/dist/server.js.map +3 -3
- package/dist/server.meta.json +1 -1
- package/dist/src/common-auth-embedded/claustrum/custody.js +25 -0
- package/dist/src/common-auth-embedded/claustrum/hub.js +20 -1
- package/dist/src/common-auth-embedded/claustrum/insula.js +6 -0
- package/dist/src/common-auth-embedded/quota-sidebar/index.d.ts +86 -0
- package/dist/src/common-auth-embedded/quota-sidebar/index.tsx +630 -0
- package/dist/src/common-auth-embedded/source-output.json +37 -17
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
- package/dist/src/ga/tui/host-ga.js +2 -2
- package/dist/src/ga/tui/host-ga.js.map +1 -1
- package/dist/src/plugin/__fixtures__/verified-store.js +2 -2
- package/dist/src/tui/quota-layout.d.ts +4 -58
- package/dist/src/tui/quota-layout.d.ts.map +1 -1
- package/dist/src/tui/quota-layout.js +4 -90
- package/dist/src/tui/quota-layout.js.map +1 -1
- package/dist/src/tui/sidebar-frame.d.ts +4 -34
- package/dist/src/tui/sidebar-frame.d.ts.map +1 -1
- package/dist/src/tui/sidebar-frame.js +91 -167
- package/dist/src/tui/sidebar-frame.js.map +1 -1
- package/dist/src/tui.js +2 -2
- package/dist/src/tui.js.map +1 -1
- package/dist/tui-build-map.json +27 -13
- package/dist/tui-ga-build-map.json +28 -13
- package/package.json +2 -2
- package/src/common-auth-embedded/claustrum/custody.js +25 -0
- package/src/common-auth-embedded/claustrum/hub.js +20 -1
- package/src/common-auth-embedded/claustrum/insula.js +6 -0
- package/src/common-auth-embedded/quota-sidebar/index.d.ts +86 -0
- package/src/common-auth-embedded/quota-sidebar/index.tsx +630 -0
- package/src/common-auth-embedded/source-output.json +37 -17
- package/src/tui-compiled/common-auth-embedded/quota-sidebar/index.js +666 -0
- package/src/tui-compiled/tui/quota-layout.js +5 -330
- package/src/tui-compiled/tui/sidebar-frame.js +241 -466
- package/src/tui-compiled/tui.js +2 -2
- package/src/tui-ga-compiled/host-ga.js +2 -2
- package/src/tui-ga-compiled/shared/ced204104a639c9c-sidebar-frame.js +241 -466
- package/src/tui-ga-compiled/shared/dd4c9e1a907f8ef0-quota-layout.js +5 -330
- package/src/tui-ga-compiled/shared/e4ec36f367492969-index.js +666 -0
- package/src/tui-ga-raw/host-ga.tsx +2 -2
- package/src/tui-ga-raw/shared/ced204104a639c9c-sidebar-frame.tsx +211 -399
- package/src/tui-ga-raw/shared/dd4c9e1a907f8ef0-quota-layout.tsx +10 -301
- package/src/tui-ga-raw/shared/e4ec36f367492969-index.tsx +630 -0
- package/src/tui-raw/common-auth-embedded/quota-sidebar/index.tsx +630 -0
- package/src/tui-raw/tui/quota-layout.tsx +10 -301
- package/src/tui-raw/tui/sidebar-frame.tsx +211 -399
- package/src/tui-raw/tui.tsx +2 -2
- package/src/tui.tsx +2 -2
package/dist/cli.js
CHANGED
|
@@ -12517,7 +12517,7 @@ function createEngine(options) {
|
|
|
12517
12517
|
});
|
|
12518
12518
|
}, 500);
|
|
12519
12519
|
}
|
|
12520
|
-
function emit(
|
|
12520
|
+
function emit(channel3, level, message, data) {
|
|
12521
12521
|
if (logFileSource === void 0 && captureSink === void 0)
|
|
12522
12522
|
return;
|
|
12523
12523
|
try {
|
|
@@ -12530,10 +12530,10 @@ function createEngine(options) {
|
|
|
12530
12530
|
} catch {
|
|
12531
12531
|
scrubbedData = "[unserializable]";
|
|
12532
12532
|
}
|
|
12533
|
-
const line = `[${(/* @__PURE__ */ new Date()).toISOString()}] ${level.toUpperCase()} [${
|
|
12533
|
+
const line = `[${(/* @__PURE__ */ new Date()).toISOString()}] ${level.toUpperCase()} [${channel3}] ${scrubbedMessage}` + (data === void 0 ? "" : safeSerialize(scrubbedData)) + "\n";
|
|
12534
12534
|
try {
|
|
12535
12535
|
captureSink?.({
|
|
12536
|
-
channel,
|
|
12536
|
+
channel: channel3,
|
|
12537
12537
|
level,
|
|
12538
12538
|
message: scrubbedMessage,
|
|
12539
12539
|
data: scrubbedData
|
|
@@ -12553,13 +12553,13 @@ function createEngine(options) {
|
|
|
12553
12553
|
} catch {
|
|
12554
12554
|
}
|
|
12555
12555
|
}
|
|
12556
|
-
function createLogger5(
|
|
12556
|
+
function createLogger5(channel3) {
|
|
12557
12557
|
return {
|
|
12558
|
-
error: (m, d) => emit(
|
|
12559
|
-
warn: (m, d) => emit(
|
|
12560
|
-
info: (m, d) => emit(
|
|
12561
|
-
debug: (m, d) => emit(
|
|
12562
|
-
trace: (m, d) => emit(
|
|
12558
|
+
error: (m, d) => emit(channel3, "error", m, d),
|
|
12559
|
+
warn: (m, d) => emit(channel3, "warn", m, d),
|
|
12560
|
+
info: (m, d) => emit(channel3, "info", m, d),
|
|
12561
|
+
debug: (m, d) => emit(channel3, "debug", m, d),
|
|
12562
|
+
trace: (m, d) => emit(channel3, "trace", m, d)
|
|
12563
12563
|
};
|
|
12564
12564
|
}
|
|
12565
12565
|
function reset() {
|
|
@@ -12597,8 +12597,8 @@ function setLogLevel(l) {
|
|
|
12597
12597
|
function flushLogs() {
|
|
12598
12598
|
return defaultEngine.flushLogs();
|
|
12599
12599
|
}
|
|
12600
|
-
function createLogger2(
|
|
12601
|
-
return defaultEngine.createLogger(
|
|
12600
|
+
function createLogger2(channel3) {
|
|
12601
|
+
return defaultEngine.createLogger(channel3);
|
|
12602
12602
|
}
|
|
12603
12603
|
async function flushForTest() {
|
|
12604
12604
|
return defaultEngine.flushLogs();
|
|
@@ -16806,6 +16806,8 @@ var init_insula = __esm({
|
|
|
16806
16806
|
...typeof entry.source === "string" && { source: entry.source }
|
|
16807
16807
|
}
|
|
16808
16808
|
};
|
|
16809
|
+
if (entry.stale !== void 0 && (!record2(entry.stale) || entry.stale.class !== "local_source_unavailable"))
|
|
16810
|
+
return { miss: "upstream-failed", reading };
|
|
16809
16811
|
return now >= fetchedAt + MAX_AGE || entry.stale !== void 0 ? { miss: "stale", reading } : { reading };
|
|
16810
16812
|
}
|
|
16811
16813
|
if (this.#completeProviders.has(provider2))
|
|
@@ -17648,6 +17650,7 @@ var init_shutdown = __esm({
|
|
|
17648
17650
|
});
|
|
17649
17651
|
|
|
17650
17652
|
// ../core/dist/common-auth-embedded/claustrum/custody.js
|
|
17653
|
+
import { channel } from "node:diagnostics_channel";
|
|
17651
17654
|
import { ClaustrumCredentialError as ClaustrumCredentialError3 } from "@cortexkit/claustrum-client";
|
|
17652
17655
|
function isScopedCredentialRotation(served, current) {
|
|
17653
17656
|
return current !== void 0 && !current.fromKeptReceipt && !served.fromKeptReceipt && current.credentialId === served.credentialId && current.accountIdentity === served.accountIdentity && current.recordVersion !== served.recordVersion;
|
|
@@ -17761,7 +17764,7 @@ function grantReachOf(listed) {
|
|
|
17761
17764
|
tuples: Object.freeze(grantTuples.map(({ selectorKind, selector, operation }) => Object.freeze({ selectorKind, selector, operation })))
|
|
17762
17765
|
});
|
|
17763
17766
|
}
|
|
17764
|
-
var defaultLogger, SERVING_MARGIN_MS, KEPT_RECEIPT_MARGIN_MS, ClaustrumScopedCustody;
|
|
17767
|
+
var defaultLogger, phaseDiagnostics, SERVING_MARGIN_MS, KEPT_RECEIPT_MARGIN_MS, ClaustrumScopedCustody;
|
|
17765
17768
|
var init_custody = __esm({
|
|
17766
17769
|
"../core/dist/common-auth-embedded/claustrum/custody.js"() {
|
|
17767
17770
|
"use strict";
|
|
@@ -17773,6 +17776,7 @@ var init_custody = __esm({
|
|
|
17773
17776
|
init_shutdown();
|
|
17774
17777
|
init_watch();
|
|
17775
17778
|
defaultLogger = createLogger2("claustrum");
|
|
17779
|
+
phaseDiagnostics = channel("common-auth.claustrum.phases");
|
|
17776
17780
|
SERVING_MARGIN_MS = 3e5;
|
|
17777
17781
|
KEPT_RECEIPT_MARGIN_MS = 6e4;
|
|
17778
17782
|
ClaustrumScopedCustody = class {
|
|
@@ -17876,6 +17880,11 @@ var init_custody = __esm({
|
|
|
17876
17880
|
}
|
|
17877
17881
|
async #token(signal) {
|
|
17878
17882
|
this.#check(signal);
|
|
17883
|
+
if (phaseDiagnostics.hasSubscribers)
|
|
17884
|
+
phaseDiagnostics.publish({
|
|
17885
|
+
logger: this.#logger,
|
|
17886
|
+
phase: "token read begin"
|
|
17887
|
+
});
|
|
17879
17888
|
const pending = this.#readToken();
|
|
17880
17889
|
this.#tokenReads.add(pending);
|
|
17881
17890
|
let value;
|
|
@@ -17883,6 +17892,11 @@ var init_custody = __esm({
|
|
|
17883
17892
|
value = await pending;
|
|
17884
17893
|
} finally {
|
|
17885
17894
|
this.#tokenReads.delete(pending);
|
|
17895
|
+
if (phaseDiagnostics.hasSubscribers)
|
|
17896
|
+
phaseDiagnostics.publish({
|
|
17897
|
+
logger: this.#logger,
|
|
17898
|
+
phase: "token read end"
|
|
17899
|
+
});
|
|
17886
17900
|
}
|
|
17887
17901
|
this.#check(signal);
|
|
17888
17902
|
if (!/^[0-9a-f]{64}$/.test(value.token) || !Number.isSafeInteger(value.token_generation) || value.token_generation < 1) {
|
|
@@ -17944,11 +17958,22 @@ var init_custody = __esm({
|
|
|
17944
17958
|
this.#kept.clear();
|
|
17945
17959
|
throw error;
|
|
17946
17960
|
}
|
|
17961
|
+
if (phaseDiagnostics.hasSubscribers)
|
|
17962
|
+
phaseDiagnostics.publish({
|
|
17963
|
+
logger: this.#logger,
|
|
17964
|
+
phase: "list scoped begin"
|
|
17965
|
+
});
|
|
17947
17966
|
try {
|
|
17948
17967
|
inventory = await this.#call(() => this.#client.listScoped(token), signal);
|
|
17949
17968
|
} catch (error) {
|
|
17950
17969
|
this.listFailed(error);
|
|
17951
17970
|
throw error;
|
|
17971
|
+
} finally {
|
|
17972
|
+
if (phaseDiagnostics.hasSubscribers)
|
|
17973
|
+
phaseDiagnostics.publish({
|
|
17974
|
+
logger: this.#logger,
|
|
17975
|
+
phase: "list scoped end"
|
|
17976
|
+
});
|
|
17952
17977
|
}
|
|
17953
17978
|
const skipped = [];
|
|
17954
17979
|
const refused2 = [];
|
|
@@ -19968,6 +19993,7 @@ var init_consumer = __esm({
|
|
|
19968
19993
|
|
|
19969
19994
|
// ../core/dist/common-auth-embedded/claustrum/hub.js
|
|
19970
19995
|
import { createHash as createHash7 } from "node:crypto";
|
|
19996
|
+
import { channel as channel2 } from "node:diagnostics_channel";
|
|
19971
19997
|
import { readdir, stat as stat6 } from "node:fs/promises";
|
|
19972
19998
|
import { dirname as dirname10, join as join7, resolve as resolve9 } from "node:path";
|
|
19973
19999
|
function canonicalJson3(value, path2 = /* @__PURE__ */ new Set()) {
|
|
@@ -20634,7 +20660,24 @@ var init_hub = __esm({
|
|
|
20634
20660
|
throw closed("Claustrum hub member has no base view");
|
|
20635
20661
|
if (base instanceof Error)
|
|
20636
20662
|
throw base;
|
|
20637
|
-
|
|
20663
|
+
let seed;
|
|
20664
|
+
if (!base.file) {
|
|
20665
|
+
const phaseDiagnostics2 = channel2("common-auth.claustrum.phases");
|
|
20666
|
+
if (phaseDiagnostics2.hasSubscribers)
|
|
20667
|
+
phaseDiagnostics2.publish({
|
|
20668
|
+
logger: this.#logger,
|
|
20669
|
+
phase: `seed read ${entry.provider} begin`
|
|
20670
|
+
});
|
|
20671
|
+
try {
|
|
20672
|
+
seed = await this.#seed(entry);
|
|
20673
|
+
} finally {
|
|
20674
|
+
if (phaseDiagnostics2.hasSubscribers)
|
|
20675
|
+
phaseDiagnostics2.publish({
|
|
20676
|
+
logger: this.#logger,
|
|
20677
|
+
phase: `seed read ${entry.provider} end`
|
|
20678
|
+
});
|
|
20679
|
+
}
|
|
20680
|
+
}
|
|
20638
20681
|
const roster = await refreshVaultRoster({
|
|
20639
20682
|
path: entry.path,
|
|
20640
20683
|
custody: { discover: async () => share },
|
|
@@ -23308,7 +23351,7 @@ function createEngine2(options) {
|
|
|
23308
23351
|
});
|
|
23309
23352
|
}, 500);
|
|
23310
23353
|
}
|
|
23311
|
-
function emit(
|
|
23354
|
+
function emit(channel3, level, message, data) {
|
|
23312
23355
|
if (logFileSource === void 0 && captureSink === void 0)
|
|
23313
23356
|
return;
|
|
23314
23357
|
try {
|
|
@@ -23321,10 +23364,10 @@ function createEngine2(options) {
|
|
|
23321
23364
|
} catch {
|
|
23322
23365
|
scrubbedData = "[unserializable]";
|
|
23323
23366
|
}
|
|
23324
|
-
const line = `[${(/* @__PURE__ */ new Date()).toISOString()}] ${level.toUpperCase()} [${
|
|
23367
|
+
const line = `[${(/* @__PURE__ */ new Date()).toISOString()}] ${level.toUpperCase()} [${channel3}] ${scrubbedMessage}` + (data === void 0 ? "" : safeSerialize2(scrubbedData)) + "\n";
|
|
23325
23368
|
try {
|
|
23326
23369
|
captureSink?.({
|
|
23327
|
-
channel,
|
|
23370
|
+
channel: channel3,
|
|
23328
23371
|
level,
|
|
23329
23372
|
message: scrubbedMessage,
|
|
23330
23373
|
data: scrubbedData
|
|
@@ -23344,13 +23387,13 @@ function createEngine2(options) {
|
|
|
23344
23387
|
} catch {
|
|
23345
23388
|
}
|
|
23346
23389
|
}
|
|
23347
|
-
function createLogger5(
|
|
23390
|
+
function createLogger5(channel3) {
|
|
23348
23391
|
return {
|
|
23349
|
-
error: (m, d) => emit(
|
|
23350
|
-
warn: (m, d) => emit(
|
|
23351
|
-
info: (m, d) => emit(
|
|
23352
|
-
debug: (m, d) => emit(
|
|
23353
|
-
trace: (m, d) => emit(
|
|
23392
|
+
error: (m, d) => emit(channel3, "error", m, d),
|
|
23393
|
+
warn: (m, d) => emit(channel3, "warn", m, d),
|
|
23394
|
+
info: (m, d) => emit(channel3, "info", m, d),
|
|
23395
|
+
debug: (m, d) => emit(channel3, "debug", m, d),
|
|
23396
|
+
trace: (m, d) => emit(channel3, "trace", m, d)
|
|
23354
23397
|
};
|
|
23355
23398
|
}
|
|
23356
23399
|
function reset() {
|
|
@@ -26255,10 +26298,10 @@ function createLocationLogger(options) {
|
|
|
26255
26298
|
const engine = createLoggerInstance2({
|
|
26256
26299
|
level: () => configuredLevel,
|
|
26257
26300
|
extraSecretKeys: isProviderSecretKey,
|
|
26258
|
-
captureSink: ({ channel, level, message, data }) => {
|
|
26301
|
+
captureSink: ({ channel: channel3, level, message, data }) => {
|
|
26259
26302
|
const extra = data !== null && typeof data === "object" && !Array.isArray(data) ? Object.fromEntries(Object.entries(data)) : void 0;
|
|
26260
26303
|
emit({
|
|
26261
|
-
service:
|
|
26304
|
+
service: channel3,
|
|
26262
26305
|
level: level === "trace" ? "debug" : level,
|
|
26263
26306
|
message,
|
|
26264
26307
|
extra
|
|
@@ -26267,12 +26310,12 @@ function createLocationLogger(options) {
|
|
|
26267
26310
|
});
|
|
26268
26311
|
return {
|
|
26269
26312
|
createLogger(module) {
|
|
26270
|
-
const
|
|
26313
|
+
const channel3 = engine.createLogger(`antigravity.${module}`);
|
|
26271
26314
|
return {
|
|
26272
|
-
debug: (message, extra) =>
|
|
26273
|
-
info: (message, extra) =>
|
|
26274
|
-
warn: (message, extra) =>
|
|
26275
|
-
error: (message, extra) =>
|
|
26315
|
+
debug: (message, extra) => channel3.debug(message, extra),
|
|
26316
|
+
info: (message, extra) => channel3.info(message, extra),
|
|
26317
|
+
warn: (message, extra) => channel3.warn(message, extra),
|
|
26318
|
+
error: (message, extra) => channel3.error(message, extra)
|
|
26276
26319
|
};
|
|
26277
26320
|
},
|
|
26278
26321
|
setLevel(level) {
|
|
@@ -26306,10 +26349,10 @@ function getLegacyLogger() {
|
|
|
26306
26349
|
return legacyLogger;
|
|
26307
26350
|
}
|
|
26308
26351
|
function createLogger4(module) {
|
|
26309
|
-
let
|
|
26352
|
+
let channel3;
|
|
26310
26353
|
const log8 = (level, message, extra) => {
|
|
26311
|
-
|
|
26312
|
-
|
|
26354
|
+
channel3 ??= getLegacyLogger().createLogger(module);
|
|
26355
|
+
channel3[level](message, extra);
|
|
26313
26356
|
};
|
|
26314
26357
|
return {
|
|
26315
26358
|
debug: (message, extra) => log8("debug", message, extra),
|