@bodhiapp/bodhi-js-core 0.0.40 → 0.0.42
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/bodhi-core.cjs.js +7 -7
- package/dist/bodhi-core.esm.js +214 -173
- package/dist/cli/setup-modal.js +1 -1
- package/dist/direct-client.d.ts +28 -0
- package/dist/index.d.ts +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DirectClientBase } from './direct-client-base';
|
|
2
|
+
import { McpTransportConfig } from './mcp-fetch';
|
|
3
|
+
import { AuthState, IStorage, InitialTokens, LogLevel, StateChangeCallback } from './types';
|
|
4
|
+
export interface DirectClientConfig {
|
|
5
|
+
authClientId: string;
|
|
6
|
+
authServerUrl: string;
|
|
7
|
+
/** Optional: pre-bind the server URL so MCP transport works before `init()`. */
|
|
8
|
+
serverUrl?: string;
|
|
9
|
+
/** Returned by `_getRedirectUri()`; unused in headless mode. Defaults to ''. */
|
|
10
|
+
redirectUri?: string;
|
|
11
|
+
storagePrefix?: string;
|
|
12
|
+
logLevel?: LogLevel;
|
|
13
|
+
apiTimeoutMs?: number;
|
|
14
|
+
/** Defaults to a fresh `InMemoryStorage`. */
|
|
15
|
+
storage?: IStorage;
|
|
16
|
+
initialTokens?: InitialTokens;
|
|
17
|
+
}
|
|
18
|
+
export declare class DirectClient extends DirectClientBase {
|
|
19
|
+
private _redirectUri;
|
|
20
|
+
constructor(config: DirectClientConfig, onStateChange?: StateChangeCallback);
|
|
21
|
+
/**
|
|
22
|
+
* Direct-mode MCP transport: standard fetch with Bearer-token injection
|
|
23
|
+
* (token pulled fresh from getAuthState() so auto-refresh applies).
|
|
24
|
+
*/
|
|
25
|
+
createMcpTransportConfig(mcp_path: string): McpTransportConfig;
|
|
26
|
+
login(): Promise<AuthState>;
|
|
27
|
+
protected _getRedirectUri(): string;
|
|
28
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './storage';
|
|
|
17
17
|
export * from './onboarding';
|
|
18
18
|
export * from './oauth';
|
|
19
19
|
export * from './direct-client-base';
|
|
20
|
+
export * from './direct-client';
|
|
20
21
|
export * from './facade-client-base';
|
|
21
22
|
export * from './openai-client-compat';
|
|
22
23
|
export { createDirectMcpFetch, createExtensionMcpFetch } from './mcp-fetch';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bodhiapp/bodhi-js-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"description": "Core types and interfaces for Bodhi Browser SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/bodhi-core.cjs.js",
|
|
@@ -85,10 +85,10 @@
|
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@bodhiapp/bodhi-browser-types": "0.0.
|
|
89
|
-
"@bodhiapp/setup-modal-types": "0.0.
|
|
90
|
-
"@bodhiapp/setup-modal-v2-types": "0.0.
|
|
91
|
-
"@bodhiapp/ts-client": "0.1.
|
|
88
|
+
"@bodhiapp/bodhi-browser-types": "0.0.42",
|
|
89
|
+
"@bodhiapp/setup-modal-types": "0.0.42",
|
|
90
|
+
"@bodhiapp/setup-modal-v2-types": "0.0.42",
|
|
91
|
+
"@bodhiapp/ts-client": "0.1.37",
|
|
92
92
|
"ua-parser-js": "^1.0.40"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|