@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/errors.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { BodhiError, BodhiApiError } from '@bodhiapp/bodhi-browser-types';
2
- import { OpenAiApiError } from '@bodhiapp/ts-client';
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 (OpenAI error format)
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: OpenAiApiError, headers?: Record<string, string>) => BodhiApiError;
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 { CreateChatCompletionRequest, CreateChatCompletionResponse, CreateChatCompletionStreamResponse, CreateEmbeddingRequest, CreateEmbeddingResponse, Model, ListMcpsResponse } from '@bodhiapp/ts-client';
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
@@ -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.32",
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.32",
74
- "@bodhiapp/setup-modal-types": "0.0.32",
75
- "@bodhiapp/ts-client": "0.1.26",
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": {