dsh-agy 0.4.1 → 0.4.3

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 (33) hide show
  1. package/README.md +5 -1
  2. package/lib/{accounts-BjdDqUq1.mjs → accounts-CB4blXpP.mjs} +10 -10
  3. package/lib/{accounts-BjdDqUq1.mjs.map → accounts-CB4blXpP.mjs.map} +1 -1
  4. package/lib/{catalog-BgdDVJEB.mjs → catalog-BRHHLLd5.mjs} +13 -3
  5. package/lib/{catalog-BgdDVJEB.mjs.map → catalog-BRHHLLd5.mjs.map} +1 -1
  6. package/lib/cli/index.mjs +6 -6
  7. package/lib/client.js +1479 -170
  8. package/lib/{constants-BpyRirvk.mjs → constants-CmA9wXNe.mjs} +3 -3
  9. package/lib/{constants-BpyRirvk.mjs.map → constants-CmA9wXNe.mjs.map} +1 -1
  10. package/lib/{exchange-LzEyxve1.mjs → exchange-C-tndv7j.mjs} +3 -3
  11. package/lib/{exchange-LzEyxve1.mjs.map → exchange-C-tndv7j.mjs.map} +1 -1
  12. package/lib/{import-CotRHNDk.mjs → import-SxPDjH3u.mjs} +4 -4
  13. package/lib/{import-CotRHNDk.mjs.map → import-SxPDjH3u.mjs.map} +1 -1
  14. package/lib/index.mjs +2 -2
  15. package/lib/{models-Qn0-sh6X.mjs → models-CjB0rXtI.mjs} +4 -4
  16. package/lib/{models-Qn0-sh6X.mjs.map → models-CjB0rXtI.mjs.map} +1 -1
  17. package/lib/parse-38V1zT1B.mjs +270 -0
  18. package/lib/parse-38V1zT1B.mjs.map +1 -0
  19. package/lib/{plugin-common-B7OSfnyl.mjs → plugin-common-D2NWMsX6.mjs} +10 -9
  20. package/lib/plugin-common-D2NWMsX6.mjs.map +1 -0
  21. package/lib/{proxy-DfaL73mL.mjs → proxy-BbuQX5U9.mjs} +28 -8
  22. package/lib/proxy-BbuQX5U9.mjs.map +1 -0
  23. package/lib/{quota-summary-adID82I2.mjs → quota-summary-DEA3P3Zh.mjs} +3 -3
  24. package/lib/{quota-summary-adID82I2.mjs.map → quota-summary-DEA3P3Zh.mjs.map} +1 -1
  25. package/lib/{translate-YhGDUuVa.mjs → translate-B9ZOauqw.mjs} +2 -2
  26. package/lib/{translate-YhGDUuVa.mjs.map → translate-B9ZOauqw.mjs.map} +1 -1
  27. package/lib/web/plugin.mjs +102 -8
  28. package/lib/web/plugin.mjs.map +1 -1
  29. package/package.json +4 -5
  30. package/lib/parse-Bs4rPkHA.mjs +0 -190
  31. package/lib/parse-Bs4rPkHA.mjs.map +0 -1
  32. package/lib/plugin-common-B7OSfnyl.mjs.map +0 -1
  33. package/lib/proxy-DfaL73mL.mjs.map +0 -1
package/README.md CHANGED
@@ -24,6 +24,10 @@ fingerprinting, and both CLI and web management.
24
24
  calls, fingerprint and proxy management), models (per-model visibility), usage
25
25
  (cumulative token and request statistics), and credentials (import/export).
26
26
  No separate page: the surface only exists where DSH Settings does.
27
+ - **Quota badge in the session header**: the tightest of the active account's
28
+ tracked windows (5-hour vs weekly) as a single figure, with the per-window
29
+ breakdown and reset walls on hover. It reads the same grouped quota windows the
30
+ Settings section shows, so the header and the panel cannot disagree.
27
31
  - **Model visibility toggles**: hide individual models from the DSH model
28
32
  selector. Blacklist semantics — only models you switch off are hidden, so
29
33
  models the server adds later stay visible.
@@ -233,7 +237,7 @@ counter.
233
237
 
234
238
  | Env | Effect |
235
239
  |---|---|
236
- | `DSH_AGY_DISABLE=1` | Kill switch: the plugin registers nothing (provider + Settings section + OAuth callback) and the CLI refuses to run. |
240
+ | `DSH_AGY_DISABLE=1` | Kill switch: the plugin registers nothing (provider + Settings section + header quota badge + OAuth callback) and the CLI refuses to run. |
237
241
  | `DSH_AGY_FINGERPRINT_MODE=stable` | One fixed client identity per account — no per-request header randomization, no fingerprint regeneration (OMP-style fixed-client posture). Default `dynamic` keeps per-request randomization. |
238
242
  | `DSH_AGY_HEALTH_INTERVAL_MS=<ms>` | Background batch health probe inside the harness (refresh + userinfo on the configured interval); off by default. |
239
243
  | `AGY_CLIENT_ID` / `AGY_CLIENT_SECRET` | BYO OAuth app escape hatch: override the embedded public Antigravity client credentials. |
@@ -1,5 +1,5 @@
1
- import { _ as setResolvedAgyVersion, a as AGY_PLATFORM_ENUM, b as QUOTA_WINDOWS, d as antigravityUserAgent, g as resolveAgyClientCredentials, l as OAUTH_TOKEN_URL, p as currentAgyVersion, t as AGY_CLIENT_ID, v as AgyAuthError, x as isProxyRouted, y as AgyPoolBlockedError } from "./constants-BpyRirvk.mjs";
2
- import { a as probeFetch, l as redactCredentials, o as proxiedFetch, r as isProxyUnreachableError, t as accountFetch } from "./proxy-DfaL73mL.mjs";
1
+ import { _ as setResolvedAgyVersion, a as AGY_PLATFORM_ENUM, b as QUOTA_WINDOWS, d as antigravityUserAgent, g as resolveAgyClientCredentials, l as OAUTH_TOKEN_URL, p as currentAgyVersion, t as AGY_CLIENT_ID, v as AgyAuthError, x as isProxyRouted, y as AgyPoolBlockedError } from "./constants-CmA9wXNe.mjs";
2
+ import { a as probeFetch, l as redactCredentials, o as proxiedFetch, r as isProxyUnreachableError, t as accountFetch } from "./proxy-BbuQX5U9.mjs";
3
3
  import { i as generateAntigravityRequestId, r as deriveAntigravitySessionId } from "./identity-Ci8EGc1F.mjs";
4
4
  import { i as parseRefreshParts, n as calculateTokenExpiry, r as formatRefreshParts, t as accessTokenExpired } from "./auth-DPPVFwio.mjs";
5
5
  import { createCipheriv, createDecipheriv, createHash, randomBytes, randomUUID } from "node:crypto";
@@ -2107,7 +2107,7 @@ var AgySessionManager = class AgySessionManager {
2107
2107
  try {
2108
2108
  const auth = await this.accessTokenFor(account);
2109
2109
  if (!auth) return [];
2110
- const { fetchQuotaSummary } = await import("./quota-summary-adID82I2.mjs");
2110
+ const { fetchQuotaSummary } = await import("./quota-summary-DEA3P3Zh.mjs");
2111
2111
  const routed = accountFetch({ proxyUrl: account.proxy });
2112
2112
  const bounded = (input, init) => {
2113
2113
  const timeout = AbortSignal.timeout(AgySessionManager.QUOTA_FETCH_TIMEOUT_MS);
@@ -2245,7 +2245,7 @@ var AgySessionManager = class AgySessionManager {
2245
2245
  try {
2246
2246
  const auth = await this.accessTokenFor(account);
2247
2247
  if (!auth) return null;
2248
- const { fetchAvailableModels } = await import("./models-Qn0-sh6X.mjs").then((n) => n.r);
2248
+ const { fetchAvailableModels } = await import("./models-CjB0rXtI.mjs").then((n) => n.r);
2249
2249
  const routed = accountFetch({ proxyUrl: account.proxy });
2250
2250
  const bounded = (input, init) => {
2251
2251
  const timeout = AbortSignal.timeout(AgySessionManager.QUOTA_FETCH_TIMEOUT_MS);
@@ -2427,7 +2427,7 @@ var AgySessionManager = class AgySessionManager {
2427
2427
  }
2428
2428
  const key = this.accountKey(picked.account);
2429
2429
  if (!picked.account.projectId && !this.projectRetryFailed.has(key)) try {
2430
- const { loadCodeAssist } = await import("./exchange-LzEyxve1.mjs").then((n) => n.n);
2430
+ const { loadCodeAssist } = await import("./exchange-C-tndv7j.mjs").then((n) => n.n);
2431
2431
  const { projectId } = await loadCodeAssist(auth.access, { proxyUrl: picked.account.proxy });
2432
2432
  if (projectId) {
2433
2433
  await this.store.mutate((s) => {
@@ -2590,9 +2590,9 @@ var AgySessionManager = class AgySessionManager {
2590
2590
  };
2591
2591
  try {
2592
2592
  const account = session.account.email ?? session.account.id;
2593
- const { toAgyRequestBody } = await import("./translate-YhGDUuVa.mjs").then((n) => n.n);
2594
- const { fetchAgyFirstOk } = await import("./constants-BpyRirvk.mjs").then((n) => n.f);
2595
- const { parseAgySse } = await import("./parse-Bs4rPkHA.mjs").then((n) => n.n);
2593
+ const { toAgyRequestBody } = await import("./translate-B9ZOauqw.mjs").then((n) => n.n);
2594
+ const { fetchAgyFirstOk } = await import("./constants-CmA9wXNe.mjs").then((n) => n.f);
2595
+ const { parseAgySse } = await import("./parse-38V1zT1B.mjs").then((n) => n.r);
2596
2596
  const requestId = generateAntigravityRequestId();
2597
2597
  const body = toAgyRequestBody({
2598
2598
  provider: "agy",
@@ -3031,6 +3031,6 @@ var JsonAccountStore = class {
3031
3031
  }
3032
3032
  };
3033
3033
  //#endregion
3034
- export { isSessionAccumulationOverflow as S, resolveDshHome as _, generateFingerprint as a, classifyHttpError as b, resolveAntigravityVersionBounded as c, migrateToAgyDir as d, MASTER_KEY_REF as f, persistMasterKey as g, loadMasterKey as h, isAgyDisabled as i, clearExpiredState as l, deriveKey as m, maskProxyUrl as n, recordFingerprintVersion as o, createAesGcmCodec as p, AgySessionManager as r, resolveAntigravityVersion as s, JsonAccountStore as t, pickProbeProxyUrl as u, resolveMasterKeyCodec as v, describeFetchError as x, classifyFetchError as y };
3034
+ export { isSessionAccumulationOverflow as C, describeFetchError as S, persistMasterKey as _, generateFingerprint as a, classifyFetchError as b, resolveAntigravityVersionBounded as c, agyDataFile as d, migrateToAgyDir as f, loadMasterKey as g, deriveKey as h, isAgyDisabled as i, clearExpiredState as l, createAesGcmCodec as m, maskProxyUrl as n, recordFingerprintVersion as o, MASTER_KEY_REF as p, AgySessionManager as r, resolveAntigravityVersion as s, JsonAccountStore as t, pickProbeProxyUrl as u, resolveDshHome as v, classifyHttpError as x, resolveMasterKeyCodec as y };
3035
3035
 
3036
- //# sourceMappingURL=accounts-BjdDqUq1.mjs.map
3036
+ //# sourceMappingURL=accounts-CB4blXpP.mjs.map