@bodhiapp/bodhi-js-core 0.0.32 → 0.0.34
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/api/anthropic.cjs.js +1 -0
- package/dist/api/anthropic.d.ts +7 -0
- package/dist/api/anthropic.esm.js +1 -0
- package/dist/api/gemini.cjs.js +1 -0
- package/dist/api/gemini.d.ts +7 -0
- package/dist/api/gemini.esm.js +1 -0
- package/dist/api/index.d.ts +5 -2
- package/dist/api/openai.cjs.js +1 -0
- package/dist/api/openai.d.ts +7 -0
- package/dist/api/openai.esm.js +1 -0
- package/dist/bodhi-core.cjs.js +3 -3
- package/dist/bodhi-core.esm.js +16 -16
- package/dist/cli/setup-modal.js +2 -2
- package/dist/errors.d.ts +3 -3
- package/dist/openai-client-compat.d.ts +2 -1
- package/dist/types/index.d.ts +0 -1
- package/package.json +19 -4
package/dist/errors.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { BodhiError, BodhiApiError } from '@bodhiapp/bodhi-browser-types';
|
|
2
|
-
import {
|
|
2
|
+
import { BodhiErrorResponse } from '@bodhiapp/ts-client';
|
|
3
3
|
/**
|
|
4
4
|
* Create API error (HTTP 4xx/5xx from server)
|
|
5
5
|
* Extracts Error.message from body.error.message automatically.
|
|
6
6
|
*
|
|
7
7
|
* @param status - HTTP status code
|
|
8
|
-
* @param body - Error body from server (
|
|
8
|
+
* @param body - Error body from server (Bodhi error format, superset of OpenAI)
|
|
9
9
|
* @param headers - Optional response headers
|
|
10
10
|
* @returns BodhiApiError instance
|
|
11
11
|
*/
|
|
12
|
-
export declare const createApiError: (status: number, body:
|
|
12
|
+
export declare const createApiError: (status: number, body: BodhiErrorResponse, headers?: Record<string, string>) => BodhiApiError;
|
|
13
13
|
/**
|
|
14
14
|
* Create operation error (network/extension level)
|
|
15
15
|
* Thrown when HTTP request couldn't complete
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListMcpsResponse } from '@bodhiapp/ts-client';
|
|
2
|
+
import { CreateChatCompletionRequest, CreateChatCompletionResponse, CreateChatCompletionStreamResponse, CreateEmbeddingRequest, CreateEmbeddingResponse, Model } from '@bodhiapp/ts-client/openai';
|
|
2
3
|
import { ApiResponse } from '@bodhiapp/bodhi-browser-types';
|
|
3
4
|
/**
|
|
4
5
|
* Minimal client interface required by resource classes
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export type { BackendServerState, ClientState, ConnectionMode, DirectState, Exte
|
|
|
10
10
|
export { INITIAL_AUTH_STATE, isAuthError, isAuthLoading, isAuthenticated } from './auth';
|
|
11
11
|
export type { AuthError, AuthState, AuthStatus } from './auth';
|
|
12
12
|
export type { Tokens, UserInfo } from './user-info';
|
|
13
|
-
export type { FlowType, RequestedResourcesV1, UserScope } from '@bodhiapp/ts-client';
|
|
14
13
|
export type { ClientConfig, DiscoveryResult, LogLevel } from './config';
|
|
15
14
|
export type LoginProgressStage = 'requesting' | 'reviewing' | 'authenticating';
|
|
16
15
|
export type LoginProgressCallback = (stage: LoginProgressStage) => void;
|
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.34",
|
|
4
4
|
"description": "Core types and interfaces for Bodhi Browser SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/bodhi-core.cjs.js",
|
|
@@ -25,6 +25,21 @@
|
|
|
25
25
|
"import": "./dist/api/index.esm.js",
|
|
26
26
|
"require": "./dist/api/index.cjs.js"
|
|
27
27
|
},
|
|
28
|
+
"./api/openai": {
|
|
29
|
+
"types": "./dist/api/openai.d.ts",
|
|
30
|
+
"import": "./dist/api/openai.esm.js",
|
|
31
|
+
"require": "./dist/api/openai.cjs.js"
|
|
32
|
+
},
|
|
33
|
+
"./api/anthropic": {
|
|
34
|
+
"types": "./dist/api/anthropic.d.ts",
|
|
35
|
+
"import": "./dist/api/anthropic.esm.js",
|
|
36
|
+
"require": "./dist/api/anthropic.cjs.js"
|
|
37
|
+
},
|
|
38
|
+
"./api/gemini": {
|
|
39
|
+
"types": "./dist/api/gemini.d.ts",
|
|
40
|
+
"import": "./dist/api/gemini.esm.js",
|
|
41
|
+
"require": "./dist/api/gemini.cjs.js"
|
|
42
|
+
},
|
|
28
43
|
"./mcp": {
|
|
29
44
|
"types": "./dist/mcp.d.ts",
|
|
30
45
|
"import": "./dist/mcp.esm.js",
|
|
@@ -70,9 +85,9 @@
|
|
|
70
85
|
}
|
|
71
86
|
},
|
|
72
87
|
"dependencies": {
|
|
73
|
-
"@bodhiapp/bodhi-browser-types": "0.0.
|
|
74
|
-
"@bodhiapp/setup-modal-types": "0.0.
|
|
75
|
-
"@bodhiapp/ts-client": "0.1.
|
|
88
|
+
"@bodhiapp/bodhi-browser-types": "0.0.34",
|
|
89
|
+
"@bodhiapp/setup-modal-types": "0.0.34",
|
|
90
|
+
"@bodhiapp/ts-client": "0.1.31",
|
|
76
91
|
"ua-parser-js": "^1.0.40"
|
|
77
92
|
},
|
|
78
93
|
"devDependencies": {
|