@cortexkit/anthropic-auth-core 2.0.2 → 2.0.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 (52) hide show
  1. package/dist/accounts.d.ts +7 -1
  2. package/dist/cache1h.d.ts +2 -0
  3. package/dist/cachekeep-registry.d.ts +3 -0
  4. package/dist/dump.d.ts +2 -0
  5. package/dist/fast.d.ts +2 -0
  6. package/dist/index.d.ts +9 -4
  7. package/dist/index.js +27333 -25202
  8. package/dist/internal-types/auth-menu/terminal.d.ts +43 -0
  9. package/dist/internal-types/claustrum/consumer.d.ts +132 -0
  10. package/dist/internal-types/claustrum/custody.d.ts +178 -0
  11. package/dist/internal-types/claustrum/enrollment.d.ts +164 -0
  12. package/dist/internal-types/claustrum/errors.d.ts +16 -0
  13. package/dist/internal-types/claustrum/host-slot.d.ts +39 -0
  14. package/dist/internal-types/claustrum/index.d.ts +19 -0
  15. package/dist/internal-types/claustrum/insula.d.ts +69 -0
  16. package/dist/internal-types/claustrum/interlock.d.ts +27 -0
  17. package/dist/internal-types/claustrum/roster.d.ts +221 -0
  18. package/dist/internal-types/fs/refresh-file-lock.d.ts +8 -2
  19. package/dist/internal-types/quota/format.d.ts +26 -0
  20. package/dist/internal-types/quota/index.d.ts +2 -2
  21. package/dist/internal-types/routing/admission.d.ts +93 -0
  22. package/dist/internal-types/routing/index.d.ts +8 -0
  23. package/dist/internal-types/routing/ordered.d.ts +47 -0
  24. package/dist/internal-types/routing/pins.d.ts +22 -0
  25. package/dist/internal-types/routing/sticky.d.ts +158 -0
  26. package/dist/internal-types/setup/command-error.d.ts +17 -0
  27. package/dist/internal-types/setup/command.d.ts +3 -0
  28. package/dist/internal-types/setup/detect.d.ts +6 -0
  29. package/dist/internal-types/setup/index.d.ts +6 -0
  30. package/dist/internal-types/setup/process-fence.d.ts +43 -0
  31. package/dist/internal-types/setup/register.d.ts +11 -0
  32. package/dist/internal-types/setup/types.d.ts +138 -0
  33. package/dist/internal-types/store/pool.d.ts +1 -1
  34. package/dist/internal-types/store/refresh-lock.d.ts +0 -1
  35. package/dist/logging.d.ts +2 -0
  36. package/dist/mid-conversation-output-config.d.ts +35 -0
  37. package/dist/native-account-runtime.d.ts +6 -2
  38. package/dist/native-account-view.d.ts +19 -3
  39. package/dist/native-custody-activation.d.ts +1 -1
  40. package/dist/native-menu-executor.d.ts +1 -1
  41. package/dist/native-migration.d.ts +25 -4
  42. package/dist/native-quota-observations.d.ts +26 -0
  43. package/dist/native-transient-account.d.ts +3 -4
  44. package/dist/native-ui.d.ts +2 -0
  45. package/dist/native-usage-publication.d.ts +5 -0
  46. package/dist/native-vault-runtime.d.ts +4 -0
  47. package/dist/network-errors.d.ts +1 -0
  48. package/dist/pool-authority.d.ts +25 -7
  49. package/dist/pool-paths.d.ts +2 -0
  50. package/dist/quotas.d.ts +15 -2
  51. package/dist/relay.d.ts +20 -0
  52. package/package.json +2 -2
package/dist/quotas.d.ts CHANGED
@@ -1,5 +1,19 @@
1
- import type { AccountStorage, OAuthQuotaSnapshot, QuotaMoney } from './accounts.ts';
1
+ import { formatQuota, type ProjectedQuota, quotaTextParts, quotaWindowParts } from "./internal-types/quota/index.js";
2
+ import type { AccountQuotaWindow, AccountScopedQuotaWindow, AccountStorage, OAuthQuotaSnapshot } from './accounts.ts';
2
3
  export declare const CLAUDE_QUOTAS_COMMAND_NAME = "claude-quota";
4
+ export type { QuotaWindowPart } from "./internal-types/quota/index.js";
5
+ export { formatQuota, quotaTextParts, quotaWindowParts };
6
+ type DisplayWindow = Omit<AccountQuotaWindow, 'checkedAt'> & {
7
+ checkedAt?: number;
8
+ };
9
+ /** Sidebar files written by older versions may not retain reading times. */
10
+ export type QuotaDisplaySnapshot = Pick<OAuthQuotaSnapshot, 'checkedAt' | 'extraUsage' | 'bindingWindow'> & {
11
+ five_hour?: DisplayWindow;
12
+ seven_day?: DisplayWindow;
13
+ scoped?: (Omit<AccountScopedQuotaWindow, 'checkedAt'> & DisplayWindow)[];
14
+ };
15
+ /** Adapt every reported window without projecting away other model families. */
16
+ export declare function quotaDisplayProjection(snapshot: QuotaDisplaySnapshot | null | undefined, now: number): ProjectedQuota | undefined;
3
17
  export type QuotaAccountSummary = {
4
18
  name: string;
5
19
  role: 'main' | 'fallback';
@@ -9,7 +23,6 @@ export type QuotaAccountSummary = {
9
23
  error?: string;
10
24
  tierLabel?: string;
11
25
  };
12
- export declare function formatQuotaMoney(money: QuotaMoney): string;
13
26
  export declare function buildFallbackQuotaSummaries(storage: AccountStorage | null, errors?: ReadonlyMap<string, string>): {
14
27
  name: string;
15
28
  role: 'fallback';
package/dist/relay.d.ts CHANGED
@@ -6,6 +6,26 @@ export type RelayConfig = {
6
6
  fallbackToDirect: boolean;
7
7
  transport: 'http' | 'websocket';
8
8
  };
9
+ /**
10
+ * The transport a stored relay configuration selects. A stored `http` or
11
+ * `websocket` value always wins. Without one (missing or unrecognized), the
12
+ * URL decides: a `ws://` or `wss://` URL selects WebSocket, so hand-edited
13
+ * WebSocket configurations keep working; any other URL selects HTTP, the
14
+ * documented default. Request dispatch and the relay status shown to users
15
+ * both call this, so they cannot report different transports.
16
+ */
17
+ export declare function effectiveRelayTransport(stored: unknown, url: unknown): RelayConfig['transport'];
18
+ /**
19
+ * Secret-free relay status for displays such as the OpenCode sidebar: the
20
+ * transport requests will use, or null when requests cannot use the relay
21
+ * because it is disabled, has no URL or has no token. Native account
22
+ * snapshots never carry the private token; they set `tokenConfigured` to say
23
+ * whether one is stored.
24
+ */
25
+ export declare function effectiveRelayStatus(relay: AccountStorage['relay'] | undefined): {
26
+ enabled: true;
27
+ transport: RelayConfig['transport'];
28
+ } | null;
9
29
  export type RelayPatch = {
10
30
  start: number;
11
31
  deleteCount: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/anthropic-auth-core",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,7 +30,7 @@
30
30
  "prepublishOnly": "bun run build"
31
31
  },
32
32
  "devDependencies": {
33
- "@cortexkit/common-auth": "0.17.0"
33
+ "@cortexkit/common-auth": "0.18.0"
34
34
  },
35
35
  "dependencies": {
36
36
  "@cortexkit/claustrum-client": "0.9.0",