jeopi-cli 16.6.1 → 16.6.2

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.
@@ -2,7 +2,7 @@ import type { Api, Context, Model, ModelSpec, RemoteCompactionConfig, SimpleStre
2
2
  import type { AssistantMessageEventStream } from "jeopi-ai/utils/event-stream";
3
3
  import { type ModelRefreshStrategy } from "jeopi-catalog/model-manager";
4
4
  import type { ApiKeyResolver, FetchImpl } from "jeopi-ai";
5
- import type { OAuthCredentials, OAuthLoginCallbacks } from "jeopi-ai/oauth/types";
5
+ import type { OAuthCredentials, OAuthLoginCallbacks, OAuthProviderId } from "jeopi-ai/oauth/types";
6
6
  import type { AuthStorage } from "../session/auth-storage";
7
7
  import { type ApiKeyResolverModel, type ApiKeyResolverOptions } from "./api-key-resolver";
8
8
  import type { ConfigError } from "./config-file";
@@ -73,6 +73,8 @@ export declare class ModelRegistry {
73
73
  constructor(authStorage: AuthStorage, modelsPath?: string, options?: {
74
74
  fetch?: FetchImpl;
75
75
  });
76
+ /** Save login credentials, then bypass the catalog TTL for the authenticated provider. */
77
+ login(providerId: OAuthProviderId, callbacks: OAuthLoginCallbacks): Promise<void>;
76
78
  /**
77
79
  * Reload models from disk (built-in + custom config).
78
80
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "jeopi-cli",
4
- "version": "16.6.1",
4
+ "version": "16.6.2",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://github.com/akillness/jeopi",
7
7
  "author": "Can Boluk",
@@ -57,17 +57,17 @@
57
57
  "@agentclientprotocol/sdk": "0.25.0",
58
58
  "@babel/parser": "^7.29.7",
59
59
  "@mozilla/readability": "^0.6.0",
60
- "jeopi-hashline": "16.6.1",
61
- "jeopi-stats": "16.6.1",
62
- "jeopi-agent-core": "16.6.1",
63
- "jeopi-ai": "16.6.1",
64
- "jeopi-catalog": "16.6.1",
65
- "jeopi-mnemopi": "16.6.1",
66
- "jeopi-natives": "16.6.1",
67
- "jeopi-tui": "16.6.1",
68
- "jeopi-utils": "16.6.1",
69
- "jeopi-wire": "16.6.1",
70
- "jeopi-snapcompact": "16.6.1",
60
+ "jeopi-hashline": "16.6.2",
61
+ "jeopi-stats": "16.6.2",
62
+ "jeopi-agent-core": "16.6.2",
63
+ "jeopi-ai": "16.6.2",
64
+ "jeopi-catalog": "16.6.2",
65
+ "jeopi-mnemopi": "16.6.2",
66
+ "jeopi-natives": "16.6.2",
67
+ "jeopi-tui": "16.6.2",
68
+ "jeopi-utils": "16.6.2",
69
+ "jeopi-wire": "16.6.2",
70
+ "jeopi-snapcompact": "16.6.2",
71
71
  "@opentelemetry/api": "^1.9.1",
72
72
  "@opentelemetry/context-async-hooks": "^2.7.1",
73
73
  "@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
@@ -50,8 +50,8 @@ const STARTUP_MODEL_CACHE_PROVIDER_IDS: readonly string[] = [
50
50
  const LOCAL_PROVIDER_PLACEHOLDERS = new Set<string>(["llama-cpp-local", "lm-studio-local", "vllm-local"]);
51
51
 
52
52
  import type { ApiKeyResolver, FetchImpl } from "jeopi-ai";
53
- import { registerOAuthProvider, unregisterOAuthProviders } from "jeopi-ai/oauth";
54
- import type { OAuthCredentials, OAuthLoginCallbacks } from "jeopi-ai/oauth/types";
53
+ import { getOAuthProviders, registerOAuthProvider, unregisterOAuthProviders } from "jeopi-ai/oauth";
54
+ import type { OAuthCredentials, OAuthLoginCallbacks, OAuthProviderId } from "jeopi-ai/oauth/types";
55
55
  import { getBundledModelReferenceIndex, resolveModelReference } from "jeopi-catalog/identity";
56
56
  import { isBunTestRuntime, isRecord, logger, wrapFetchForExtraCa } from "jeopi-utils";
57
57
  import { parseModelString, resolveProviderModelReference } from "../config/model-resolver";
@@ -788,6 +788,14 @@ export class ModelRegistry {
788
788
  this.#loadModels();
789
789
  }
790
790
 
791
+ /** Save login credentials, then bypass the catalog TTL for the authenticated provider. */
792
+ async login(providerId: OAuthProviderId, callbacks: OAuthLoginCallbacks): Promise<void> {
793
+ await this.authStorage.login(providerId, callbacks);
794
+ const modelProviderId =
795
+ getOAuthProviders().find(provider => provider.id === providerId)?.storeCredentialsAs ?? providerId;
796
+ await this.refreshProvider(modelProviderId, "online");
797
+ }
798
+
791
799
  /**
792
800
  * Reload models from disk (built-in + custom config).
793
801
  */