dsh-keys-manager 0.4.4 → 0.4.6

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/lib/index.d.ts CHANGED
@@ -9,8 +9,8 @@ export declare const provide: string[];
9
9
  export declare const OAUTH_GRANT_RECORD_SCOPE = "llm-pi-ai";
10
10
  /**
11
11
  * The credential-record scope the llm-omp transports package owns: one
12
- * `llm-omp-transports/<route>` grant per transport route (its
13
- * `CURSOR_CREDENTIAL_KEY` is `llm-omp-transports/cursor`). Keys Manager reads
12
+ * `llm-omp-transports/<route>` grant per transport route (devin's key is
13
+ * `llm-omp-transports/devin`). Keys Manager reads
14
14
  * those records to list/verify an account and deletes one on removal; it
15
15
  * never writes one and never projects one into `llm-pi-ai/<provider>`, so a
16
16
  * transport route keeps serving from its own adapter-owned credential.
package/lib/index.js CHANGED
@@ -15,7 +15,6 @@
15
15
  */
16
16
  import { AsyncLocalStorage } from 'node:async_hooks';
17
17
  import { createHash, randomBytes } from 'node:crypto';
18
- import { CURSOR_ROUTE, cursorCatalogModels } from 'dsh-llm-omp-transports';
19
18
  import * as transportModule from 'dsh-llm-omp-transports';
20
19
  import { mergeModelCapabilities, repairModelCapabilities as repairModelRows, sanitizeReasoningEfforts } from './capabilities.js';
21
20
  import { KEY_LIMIT, TEST_SUCCESS_FINISH_KINDS, accountRef, applyFailureCooldown, bindingKey, classifyOAuthFailure, isSelectable, markKeySuccess, markKeyUsed, normalizeSettings, patchSettings, pickHealthyExcluding, pickRoundRobin, quotaRank, rankCandidates, shouldFailover, statusOfKey, statusOfProvider, validateKeyInput, validateKeyPatch, } from './core.js';
@@ -71,8 +70,8 @@ const INTENTIONAL_REMOVAL_TTL_MS = 5_000;
71
70
  export const OAUTH_GRANT_RECORD_SCOPE = 'llm-pi-ai';
72
71
  /**
73
72
  * The credential-record scope the llm-omp transports package owns: one
74
- * `llm-omp-transports/<route>` grant per transport route (its
75
- * `CURSOR_CREDENTIAL_KEY` is `llm-omp-transports/cursor`). Keys Manager reads
73
+ * `llm-omp-transports/<route>` grant per transport route (devin's key is
74
+ * `llm-omp-transports/devin`). Keys Manager reads
76
75
  * those records to list/verify an account and deletes one on removal; it
77
76
  * never writes one and never projects one into `llm-pi-ai/<provider>`, so a
78
77
  * transport route keeps serving from its own adapter-owned credential.
@@ -584,8 +583,8 @@ function transportAccountOf(flow, record, now) {
584
583
  const status = grant === undefined
585
584
  ? record === undefined ? 'signed-out' : 'needs-reauth'
586
585
  : grant.expires === undefined
587
- // Only the devin resolver serves an expiry-less record; cursor's needs a
588
- // dated grant and throws on one, so there the row is not usable.
586
+ // Only the devin resolver serves an expiry-less record; the other routes
587
+ // need a dated grant, so there the row is not usable.
589
588
  ? route === DEVIN_ROUTE ? 'active' : 'needs-reauth'
590
589
  : grant.expires > now
591
590
  ? 'active'
@@ -618,10 +617,10 @@ const DEVIN_ROUTE = 'devin';
618
617
  /**
619
618
  * The catalog accessor each transport route ships in the transports package.
620
619
  *
621
- * One exported function per route, the `cursorCatalogModels`/`devinCatalogModels`
622
- * shape. An installed transport build may predate a route's export (every route
623
- * added after the installed build, including the Google pair, `factory-droid`
624
- * and the GitLab pair), so a probe can legitimately find nothing.
620
+ * One exported function per route, the `devinCatalogModels` shape. An installed
621
+ * transport build may predate a route's export (every route added after the
622
+ * installed build, including the Google pair, `factory-droid` and the GitLab
623
+ * pair), so a probe can legitimately find nothing.
625
624
  */
626
625
  /**
627
626
  * The catalog *refresh* accessor a transport route may ship.
@@ -636,8 +635,7 @@ const TRANSPORT_CATALOG_REFRESH = Object.freeze({
636
635
  });
637
636
  const TRANSPORT_CATALOG_EXPORTS = Object.freeze({
638
637
  [DEVIN_ROUTE]: 'devinCatalogModels',
639
- 'google-gemini-cli': 'googleGeminiCliCatalogModels',
640
- 'google-antigravity': 'googleAntigravityCatalogModels',
638
+ 'antigravity-cli': 'antigravityCliCatalogModels',
641
639
  'factory-droid': 'factoryDroidCatalogModels',
642
640
  'gitlab-duo': 'gitlabDuoCatalogModels',
643
641
  'gitlab-duo-agent': 'gitlabDuoAgentCatalogModels',
@@ -655,8 +653,6 @@ const TRANSPORT_CATALOG_EXPORTS = Object.freeze({
655
653
  * silent `[]`.
656
654
  */
657
655
  function transportCatalogOf(route, onMissing) {
658
- if (route === CURSOR_ROUTE)
659
- return cursorCatalogModels();
660
656
  // Own keys only: a prototype-colliding id ("toString") must take the
661
657
  // missing-catalog path, not read an inherited value as an export name.
662
658
  const exportName = Object.hasOwn(TRANSPORT_CATALOG_EXPORTS, route) ? TRANSPORT_CATALOG_EXPORTS[route] : undefined;