@llmops/sdk 0.6.10 → 1.0.0-beta.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.
- package/dist/agents.d.cts +1 -1
- package/dist/agents.d.mts +1 -1
- package/dist/agents.mjs +1 -1
- package/dist/express.d.cts +3 -3
- package/dist/express.d.mts +3 -3
- package/dist/express.mjs +1 -1
- package/dist/hono.d.cts +2 -2
- package/dist/hono.d.mts +2 -2
- package/dist/{index-D0LVaLA4.d.mts → index-05byZKeu.d.mts} +1 -1
- package/dist/{index-C7J-9Jvp.d.cts → index-Beb26ZNG.d.cts} +1 -1
- package/dist/{index-1uemrw2P.d.cts → index-DnWGper4.d.cts} +1 -1
- package/dist/{index-BeDbCYjz.d.mts → index-Dvz-L2Hf.d.mts} +1 -1
- package/dist/index.cjs +0 -13
- package/dist/index.d.cts +5 -173
- package/dist/index.d.mts +5 -173
- package/dist/index.mjs +3 -15
- package/dist/nextjs.d.cts +2 -2
- package/dist/nextjs.d.mts +2 -2
- package/dist/store/pg.cjs +8 -0
- package/dist/store/pg.d.cts +2 -0
- package/dist/store/pg.d.mts +2 -0
- package/dist/store/pg.mjs +3 -0
- package/dist/types.cjs +0 -0
- package/dist/types.d.cts +2 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +1 -0
- package/package.json +23 -3
- /package/dist/{agents-exporter-B-ADoC7t.d.cts → agents-exporter-BZHCcFSd.d.mts} +0 -0
- /package/dist/{agents-exporter-BZjfVkaH.d.mts → agents-exporter-uzN3bkth.d.cts} +0 -0
- /package/dist/{agents-exporter-CxbWY6xN.mjs → agents-exporter-vcpgCF69.mjs} +0 -0
- /package/dist/{express-ClEIbLM9.mjs → express-DMtc0d_Y.mjs} +0 -0
package/dist/agents.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AgentsTracingExporter, i as AgentsTrace, n as AgentsSpanData, o as LLMOpsAgentsExporterConfig, r as AgentsSpanError, s as createLLMOpsAgentsExporter, t as AgentsSpan } from "./agents-exporter-
|
|
1
|
+
import { a as AgentsTracingExporter, i as AgentsTrace, n as AgentsSpanData, o as LLMOpsAgentsExporterConfig, r as AgentsSpanError, s as createLLMOpsAgentsExporter, t as AgentsSpan } from "./agents-exporter-uzN3bkth.cjs";
|
|
2
2
|
export { AgentsSpan, AgentsSpanData, AgentsSpanError, AgentsTrace, AgentsTracingExporter, LLMOpsAgentsExporterConfig, createLLMOpsAgentsExporter };
|
package/dist/agents.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AgentsTracingExporter, i as AgentsTrace, n as AgentsSpanData, o as LLMOpsAgentsExporterConfig, r as AgentsSpanError, s as createLLMOpsAgentsExporter, t as AgentsSpan } from "./agents-exporter-
|
|
1
|
+
import { a as AgentsTracingExporter, i as AgentsTrace, n as AgentsSpanData, o as LLMOpsAgentsExporterConfig, r as AgentsSpanError, s as createLLMOpsAgentsExporter, t as AgentsSpan } from "./agents-exporter-BZHCcFSd.mjs";
|
|
2
2
|
export { AgentsSpan, AgentsSpanData, AgentsSpanError, AgentsTrace, AgentsTracingExporter, LLMOpsAgentsExporterConfig, createLLMOpsAgentsExporter };
|
package/dist/agents.mjs
CHANGED
package/dist/express.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./agents-exporter-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { t as createLLMOpsMiddleware } from "./index-
|
|
1
|
+
import "./agents-exporter-uzN3bkth.cjs";
|
|
2
|
+
import "./index-Beb26ZNG.cjs";
|
|
3
|
+
import { t as createLLMOpsMiddleware } from "./index-DnWGper4.cjs";
|
|
4
4
|
export { createLLMOpsMiddleware };
|
package/dist/express.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./agents-exporter-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { t as createLLMOpsMiddleware } from "./index-
|
|
1
|
+
import "./agents-exporter-BZHCcFSd.mjs";
|
|
2
|
+
import "./index-05byZKeu.mjs";
|
|
3
|
+
import { t as createLLMOpsMiddleware } from "./index-Dvz-L2Hf.mjs";
|
|
4
4
|
export { createLLMOpsMiddleware };
|
package/dist/express.mjs
CHANGED
package/dist/hono.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./agents-exporter-
|
|
2
|
-
import { t as LLMOpsClient } from "./index-
|
|
1
|
+
import "./agents-exporter-uzN3bkth.cjs";
|
|
2
|
+
import { t as LLMOpsClient } from "./index-Beb26ZNG.cjs";
|
|
3
3
|
import { MiddlewareHandler } from "hono";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/hono/index.d.ts
|
package/dist/hono.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./agents-exporter-
|
|
2
|
-
import { t as LLMOpsClient } from "./index-
|
|
1
|
+
import "./agents-exporter-BZHCcFSd.mjs";
|
|
2
|
+
import { t as LLMOpsClient } from "./index-05byZKeu.mjs";
|
|
3
3
|
import { MiddlewareHandler } from "hono";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/hono/index.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AgentsTracingExporter } from "./agents-exporter-
|
|
1
|
+
import { a as AgentsTracingExporter } from "./agents-exporter-BZHCcFSd.mjs";
|
|
2
2
|
import { LLMOpsConfig, ValidatedLLMOpsConfig } from "@llmops/core";
|
|
3
3
|
|
|
4
4
|
//#region src/telemetry/langchain-client.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AgentsTracingExporter } from "./agents-exporter-
|
|
1
|
+
import { a as AgentsTracingExporter } from "./agents-exporter-uzN3bkth.cjs";
|
|
2
2
|
import { LLMOpsConfig, ValidatedLLMOpsConfig } from "@llmops/core";
|
|
3
3
|
|
|
4
4
|
//#region src/telemetry/langchain-client.d.ts
|
package/dist/index.cjs
CHANGED
|
@@ -3,18 +3,6 @@ const require_agents_exporter = require('./agents-exporter-BuTq2n2y.cjs');
|
|
|
3
3
|
let __llmops_core = require("@llmops/core");
|
|
4
4
|
let __llmops_app = require("@llmops/app");
|
|
5
5
|
|
|
6
|
-
//#region src/lib/auth/client.ts
|
|
7
|
-
/**
|
|
8
|
-
* Error thrown when a feature is not available in the current auth implementation
|
|
9
|
-
*/
|
|
10
|
-
var AuthFeatureNotAvailableError = class extends Error {
|
|
11
|
-
constructor(feature, authType) {
|
|
12
|
-
super(`The "${feature}" feature is not available with "${authType}" auth. Upgrade to @llmops/enterprise for full auth functionality.`);
|
|
13
|
-
this.name = "AuthFeatureNotAvailableError";
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
6
|
//#region src/telemetry/langchain-client.ts
|
|
19
7
|
/**
|
|
20
8
|
* Create a LangSmithTracingClientInterface-compatible client that sends
|
|
@@ -241,7 +229,6 @@ function createLLMOpsSpanExporter(config) {
|
|
|
241
229
|
}
|
|
242
230
|
|
|
243
231
|
//#endregion
|
|
244
|
-
exports.AuthFeatureNotAvailableError = AuthFeatureNotAvailableError;
|
|
245
232
|
exports.createLLMOpsAgentsExporter = require_agents_exporter.createLLMOpsAgentsExporter;
|
|
246
233
|
exports.createLLMOpsLangChainClient = createLLMOpsLangChainClient;
|
|
247
234
|
exports.createLLMOpsMiddleware = require_express.createLLMOpsMiddleware;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,177 +1,9 @@
|
|
|
1
|
-
import { a as AgentsTracingExporter, o as LLMOpsAgentsExporterConfig, s as createLLMOpsAgentsExporter } from "./agents-exporter-
|
|
2
|
-
import { a as LLMOpsLangChainClientConfig, i as createLLMOps, n as ProviderOptions, o as LangChainTracingClient, r as TraceContext, s as createLLMOpsLangChainClient, t as LLMOpsClient } from "./index-
|
|
3
|
-
import { t as createLLMOpsMiddleware } from "./index-
|
|
1
|
+
import { a as AgentsTracingExporter, o as LLMOpsAgentsExporterConfig, s as createLLMOpsAgentsExporter } from "./agents-exporter-uzN3bkth.cjs";
|
|
2
|
+
import { a as LLMOpsLangChainClientConfig, i as createLLMOps, n as ProviderOptions, o as LangChainTracingClient, r as TraceContext, s as createLLMOpsLangChainClient, t as LLMOpsClient } from "./index-Beb26ZNG.cjs";
|
|
3
|
+
import { t as createLLMOpsMiddleware } from "./index-DnWGper4.cjs";
|
|
4
4
|
|
|
5
|
-
//#region src/lib/auth/client.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Auth Client - Extensible authentication client for LLMOps
|
|
9
|
-
*
|
|
10
|
-
* Provides an interface that can be extended for different auth providers.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* User representation
|
|
14
|
-
*/
|
|
15
|
-
interface User {
|
|
16
|
-
id: string;
|
|
17
|
-
email: string;
|
|
18
|
-
name: string;
|
|
19
|
-
role: string | null;
|
|
20
|
-
emailVerified: boolean;
|
|
21
|
-
image: string | null;
|
|
22
|
-
banned: boolean | null;
|
|
23
|
-
banReason: string | null;
|
|
24
|
-
createdAt: Date;
|
|
25
|
-
updatedAt: Date;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Session representation
|
|
29
|
-
*/
|
|
30
|
-
interface Session {
|
|
31
|
-
id: string;
|
|
32
|
-
userId: string;
|
|
33
|
-
expiresAt: Date;
|
|
34
|
-
createdAt: Date;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Permission check result
|
|
38
|
-
*/
|
|
39
|
-
interface Permission {
|
|
40
|
-
resource: string;
|
|
41
|
-
action: string;
|
|
42
|
-
allowed: boolean;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Pagination options
|
|
46
|
-
*/
|
|
47
|
-
interface PaginationOptions {
|
|
48
|
-
limit?: number;
|
|
49
|
-
offset?: number;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Paginated response
|
|
53
|
-
*/
|
|
54
|
-
interface PaginatedResponse<T> {
|
|
55
|
-
data: T[];
|
|
56
|
-
total: number;
|
|
57
|
-
limit: number;
|
|
58
|
-
offset: number;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Base auth client interface
|
|
62
|
-
* All auth implementations must implement this interface
|
|
63
|
-
*/
|
|
64
|
-
interface AuthClient {
|
|
65
|
-
/**
|
|
66
|
-
* The type of auth client
|
|
67
|
-
*/
|
|
68
|
-
readonly type: string;
|
|
69
|
-
/**
|
|
70
|
-
* Get the current session
|
|
71
|
-
* @returns Current session or null if not authenticated
|
|
72
|
-
*/
|
|
73
|
-
getSession(): Promise<Session | null>;
|
|
74
|
-
/**
|
|
75
|
-
* Get the current authenticated user
|
|
76
|
-
* @returns Current user or null if not authenticated
|
|
77
|
-
*/
|
|
78
|
-
getCurrentUser(): Promise<User | null>;
|
|
79
|
-
/**
|
|
80
|
-
* Check if currently authenticated
|
|
81
|
-
*/
|
|
82
|
-
isAuthenticated(): Promise<boolean>;
|
|
83
|
-
/**
|
|
84
|
-
* Get a user by ID
|
|
85
|
-
* @param userId - The user ID
|
|
86
|
-
*/
|
|
87
|
-
getUser(userId: string): Promise<User | null>;
|
|
88
|
-
/**
|
|
89
|
-
* List all users (paginated)
|
|
90
|
-
* @param options - Pagination options
|
|
91
|
-
*/
|
|
92
|
-
listUsers(options?: PaginationOptions): Promise<PaginatedResponse<User>>;
|
|
93
|
-
/**
|
|
94
|
-
* Create a new user
|
|
95
|
-
* @param data - User data
|
|
96
|
-
*/
|
|
97
|
-
createUser(data: {
|
|
98
|
-
email: string;
|
|
99
|
-
name: string;
|
|
100
|
-
password: string;
|
|
101
|
-
role?: string;
|
|
102
|
-
}): Promise<User>;
|
|
103
|
-
/**
|
|
104
|
-
* Update a user
|
|
105
|
-
* @param userId - The user ID
|
|
106
|
-
* @param data - Fields to update
|
|
107
|
-
*/
|
|
108
|
-
updateUser(userId: string, data: Partial<Pick<User, 'name' | 'email' | 'role' | 'image'>>): Promise<User>;
|
|
109
|
-
/**
|
|
110
|
-
* Delete a user
|
|
111
|
-
* @param userId - The user ID
|
|
112
|
-
*/
|
|
113
|
-
deleteUser(userId: string): Promise<void>;
|
|
114
|
-
/**
|
|
115
|
-
* Get user's role
|
|
116
|
-
* @param userId - The user ID (optional, defaults to current user)
|
|
117
|
-
*/
|
|
118
|
-
getRole(userId?: string): Promise<string | null>;
|
|
119
|
-
/**
|
|
120
|
-
* Set user's role
|
|
121
|
-
* @param userId - The user ID
|
|
122
|
-
* @param role - The role to set
|
|
123
|
-
*/
|
|
124
|
-
setRole(userId: string, role: string): Promise<void>;
|
|
125
|
-
/**
|
|
126
|
-
* Check if user has permission
|
|
127
|
-
* @param permission - Permission to check (e.g., { resource: 'configs', action: 'create' })
|
|
128
|
-
* @param userId - The user ID (optional, defaults to current user)
|
|
129
|
-
*/
|
|
130
|
-
hasPermission(permission: {
|
|
131
|
-
resource: string;
|
|
132
|
-
action: string;
|
|
133
|
-
}, userId?: string): Promise<boolean>;
|
|
134
|
-
/**
|
|
135
|
-
* Get all permissions for a user
|
|
136
|
-
* @param userId - The user ID (optional, defaults to current user)
|
|
137
|
-
*/
|
|
138
|
-
getPermissions(userId?: string): Promise<Permission[]>;
|
|
139
|
-
/**
|
|
140
|
-
* Ban a user
|
|
141
|
-
* @param userId - The user ID
|
|
142
|
-
* @param reason - Optional ban reason
|
|
143
|
-
* @param expiresAt - Optional expiration date
|
|
144
|
-
*/
|
|
145
|
-
banUser(userId: string, reason?: string, expiresAt?: Date): Promise<void>;
|
|
146
|
-
/**
|
|
147
|
-
* Unban a user
|
|
148
|
-
* @param userId - The user ID
|
|
149
|
-
*/
|
|
150
|
-
unbanUser(userId: string): Promise<void>;
|
|
151
|
-
/**
|
|
152
|
-
* List all sessions for a user
|
|
153
|
-
* @param userId - The user ID
|
|
154
|
-
*/
|
|
155
|
-
listUserSessions(userId: string): Promise<Session[]>;
|
|
156
|
-
/**
|
|
157
|
-
* Revoke a specific session
|
|
158
|
-
* @param sessionId - The session ID
|
|
159
|
-
*/
|
|
160
|
-
revokeSession(sessionId: string): Promise<void>;
|
|
161
|
-
/**
|
|
162
|
-
* Revoke all sessions for a user
|
|
163
|
-
* @param userId - The user ID
|
|
164
|
-
*/
|
|
165
|
-
revokeAllSessions(userId: string): Promise<void>;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Error thrown when a feature is not available in the current auth implementation
|
|
169
|
-
*/
|
|
170
|
-
declare class AuthFeatureNotAvailableError extends Error {
|
|
171
|
-
constructor(feature: string, authType: string);
|
|
172
|
-
}
|
|
173
|
-
//#endregion
|
|
174
5
|
//#region src/telemetry/exporter.d.ts
|
|
6
|
+
|
|
175
7
|
/**
|
|
176
8
|
* LLMOps OTLP Span Exporter
|
|
177
9
|
*
|
|
@@ -260,4 +92,4 @@ interface LLMOpsExporterConfig {
|
|
|
260
92
|
*/
|
|
261
93
|
declare function createLLMOpsSpanExporter(config: LLMOpsExporterConfig): SpanExporter;
|
|
262
94
|
//#endregion
|
|
263
|
-
export { type AgentsTracingExporter,
|
|
95
|
+
export { type AgentsTracingExporter, type LLMOpsAgentsExporterConfig, type LLMOpsClient, type LLMOpsExporterConfig, type LLMOpsLangChainClientConfig, type LangChainTracingClient, type ProviderOptions, type SpanExporter, type TraceContext, createLLMOpsAgentsExporter, createLLMOpsLangChainClient, createLLMOpsMiddleware, createLLMOpsSpanExporter, createLLMOps as llmops };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,177 +1,9 @@
|
|
|
1
|
-
import { a as AgentsTracingExporter, o as LLMOpsAgentsExporterConfig, s as createLLMOpsAgentsExporter } from "./agents-exporter-
|
|
2
|
-
import { a as LLMOpsLangChainClientConfig, i as createLLMOps, n as ProviderOptions, o as LangChainTracingClient, r as TraceContext, s as createLLMOpsLangChainClient, t as LLMOpsClient } from "./index-
|
|
3
|
-
import { t as createLLMOpsMiddleware } from "./index-
|
|
1
|
+
import { a as AgentsTracingExporter, o as LLMOpsAgentsExporterConfig, s as createLLMOpsAgentsExporter } from "./agents-exporter-BZHCcFSd.mjs";
|
|
2
|
+
import { a as LLMOpsLangChainClientConfig, i as createLLMOps, n as ProviderOptions, o as LangChainTracingClient, r as TraceContext, s as createLLMOpsLangChainClient, t as LLMOpsClient } from "./index-05byZKeu.mjs";
|
|
3
|
+
import { t as createLLMOpsMiddleware } from "./index-Dvz-L2Hf.mjs";
|
|
4
4
|
|
|
5
|
-
//#region src/lib/auth/client.d.ts
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Auth Client - Extensible authentication client for LLMOps
|
|
9
|
-
*
|
|
10
|
-
* Provides an interface that can be extended for different auth providers.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* User representation
|
|
14
|
-
*/
|
|
15
|
-
interface User {
|
|
16
|
-
id: string;
|
|
17
|
-
email: string;
|
|
18
|
-
name: string;
|
|
19
|
-
role: string | null;
|
|
20
|
-
emailVerified: boolean;
|
|
21
|
-
image: string | null;
|
|
22
|
-
banned: boolean | null;
|
|
23
|
-
banReason: string | null;
|
|
24
|
-
createdAt: Date;
|
|
25
|
-
updatedAt: Date;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Session representation
|
|
29
|
-
*/
|
|
30
|
-
interface Session {
|
|
31
|
-
id: string;
|
|
32
|
-
userId: string;
|
|
33
|
-
expiresAt: Date;
|
|
34
|
-
createdAt: Date;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Permission check result
|
|
38
|
-
*/
|
|
39
|
-
interface Permission {
|
|
40
|
-
resource: string;
|
|
41
|
-
action: string;
|
|
42
|
-
allowed: boolean;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Pagination options
|
|
46
|
-
*/
|
|
47
|
-
interface PaginationOptions {
|
|
48
|
-
limit?: number;
|
|
49
|
-
offset?: number;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Paginated response
|
|
53
|
-
*/
|
|
54
|
-
interface PaginatedResponse<T> {
|
|
55
|
-
data: T[];
|
|
56
|
-
total: number;
|
|
57
|
-
limit: number;
|
|
58
|
-
offset: number;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Base auth client interface
|
|
62
|
-
* All auth implementations must implement this interface
|
|
63
|
-
*/
|
|
64
|
-
interface AuthClient {
|
|
65
|
-
/**
|
|
66
|
-
* The type of auth client
|
|
67
|
-
*/
|
|
68
|
-
readonly type: string;
|
|
69
|
-
/**
|
|
70
|
-
* Get the current session
|
|
71
|
-
* @returns Current session or null if not authenticated
|
|
72
|
-
*/
|
|
73
|
-
getSession(): Promise<Session | null>;
|
|
74
|
-
/**
|
|
75
|
-
* Get the current authenticated user
|
|
76
|
-
* @returns Current user or null if not authenticated
|
|
77
|
-
*/
|
|
78
|
-
getCurrentUser(): Promise<User | null>;
|
|
79
|
-
/**
|
|
80
|
-
* Check if currently authenticated
|
|
81
|
-
*/
|
|
82
|
-
isAuthenticated(): Promise<boolean>;
|
|
83
|
-
/**
|
|
84
|
-
* Get a user by ID
|
|
85
|
-
* @param userId - The user ID
|
|
86
|
-
*/
|
|
87
|
-
getUser(userId: string): Promise<User | null>;
|
|
88
|
-
/**
|
|
89
|
-
* List all users (paginated)
|
|
90
|
-
* @param options - Pagination options
|
|
91
|
-
*/
|
|
92
|
-
listUsers(options?: PaginationOptions): Promise<PaginatedResponse<User>>;
|
|
93
|
-
/**
|
|
94
|
-
* Create a new user
|
|
95
|
-
* @param data - User data
|
|
96
|
-
*/
|
|
97
|
-
createUser(data: {
|
|
98
|
-
email: string;
|
|
99
|
-
name: string;
|
|
100
|
-
password: string;
|
|
101
|
-
role?: string;
|
|
102
|
-
}): Promise<User>;
|
|
103
|
-
/**
|
|
104
|
-
* Update a user
|
|
105
|
-
* @param userId - The user ID
|
|
106
|
-
* @param data - Fields to update
|
|
107
|
-
*/
|
|
108
|
-
updateUser(userId: string, data: Partial<Pick<User, 'name' | 'email' | 'role' | 'image'>>): Promise<User>;
|
|
109
|
-
/**
|
|
110
|
-
* Delete a user
|
|
111
|
-
* @param userId - The user ID
|
|
112
|
-
*/
|
|
113
|
-
deleteUser(userId: string): Promise<void>;
|
|
114
|
-
/**
|
|
115
|
-
* Get user's role
|
|
116
|
-
* @param userId - The user ID (optional, defaults to current user)
|
|
117
|
-
*/
|
|
118
|
-
getRole(userId?: string): Promise<string | null>;
|
|
119
|
-
/**
|
|
120
|
-
* Set user's role
|
|
121
|
-
* @param userId - The user ID
|
|
122
|
-
* @param role - The role to set
|
|
123
|
-
*/
|
|
124
|
-
setRole(userId: string, role: string): Promise<void>;
|
|
125
|
-
/**
|
|
126
|
-
* Check if user has permission
|
|
127
|
-
* @param permission - Permission to check (e.g., { resource: 'configs', action: 'create' })
|
|
128
|
-
* @param userId - The user ID (optional, defaults to current user)
|
|
129
|
-
*/
|
|
130
|
-
hasPermission(permission: {
|
|
131
|
-
resource: string;
|
|
132
|
-
action: string;
|
|
133
|
-
}, userId?: string): Promise<boolean>;
|
|
134
|
-
/**
|
|
135
|
-
* Get all permissions for a user
|
|
136
|
-
* @param userId - The user ID (optional, defaults to current user)
|
|
137
|
-
*/
|
|
138
|
-
getPermissions(userId?: string): Promise<Permission[]>;
|
|
139
|
-
/**
|
|
140
|
-
* Ban a user
|
|
141
|
-
* @param userId - The user ID
|
|
142
|
-
* @param reason - Optional ban reason
|
|
143
|
-
* @param expiresAt - Optional expiration date
|
|
144
|
-
*/
|
|
145
|
-
banUser(userId: string, reason?: string, expiresAt?: Date): Promise<void>;
|
|
146
|
-
/**
|
|
147
|
-
* Unban a user
|
|
148
|
-
* @param userId - The user ID
|
|
149
|
-
*/
|
|
150
|
-
unbanUser(userId: string): Promise<void>;
|
|
151
|
-
/**
|
|
152
|
-
* List all sessions for a user
|
|
153
|
-
* @param userId - The user ID
|
|
154
|
-
*/
|
|
155
|
-
listUserSessions(userId: string): Promise<Session[]>;
|
|
156
|
-
/**
|
|
157
|
-
* Revoke a specific session
|
|
158
|
-
* @param sessionId - The session ID
|
|
159
|
-
*/
|
|
160
|
-
revokeSession(sessionId: string): Promise<void>;
|
|
161
|
-
/**
|
|
162
|
-
* Revoke all sessions for a user
|
|
163
|
-
* @param userId - The user ID
|
|
164
|
-
*/
|
|
165
|
-
revokeAllSessions(userId: string): Promise<void>;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Error thrown when a feature is not available in the current auth implementation
|
|
169
|
-
*/
|
|
170
|
-
declare class AuthFeatureNotAvailableError extends Error {
|
|
171
|
-
constructor(feature: string, authType: string);
|
|
172
|
-
}
|
|
173
|
-
//#endregion
|
|
174
5
|
//#region src/telemetry/exporter.d.ts
|
|
6
|
+
|
|
175
7
|
/**
|
|
176
8
|
* LLMOps OTLP Span Exporter
|
|
177
9
|
*
|
|
@@ -260,4 +92,4 @@ interface LLMOpsExporterConfig {
|
|
|
260
92
|
*/
|
|
261
93
|
declare function createLLMOpsSpanExporter(config: LLMOpsExporterConfig): SpanExporter;
|
|
262
94
|
//#endregion
|
|
263
|
-
export { type AgentsTracingExporter,
|
|
95
|
+
export { type AgentsTracingExporter, type LLMOpsAgentsExporterConfig, type LLMOpsClient, type LLMOpsExporterConfig, type LLMOpsLangChainClientConfig, type LangChainTracingClient, type ProviderOptions, type SpanExporter, type TraceContext, createLLMOpsAgentsExporter, createLLMOpsLangChainClient, createLLMOpsMiddleware, createLLMOpsSpanExporter, createLLMOps as llmops };
|
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
import { t as createLLMOpsMiddleware } from "./express-
|
|
2
|
-
import { t as createLLMOpsAgentsExporter } from "./agents-exporter-
|
|
1
|
+
import { t as createLLMOpsMiddleware } from "./express-DMtc0d_Y.mjs";
|
|
2
|
+
import { t as createLLMOpsAgentsExporter } from "./agents-exporter-vcpgCF69.mjs";
|
|
3
3
|
import { LLMOPS_INTERNAL_HEADER, LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER } from "@llmops/core";
|
|
4
4
|
import { createApp } from "@llmops/app";
|
|
5
5
|
|
|
6
|
-
//#region src/lib/auth/client.ts
|
|
7
|
-
/**
|
|
8
|
-
* Error thrown when a feature is not available in the current auth implementation
|
|
9
|
-
*/
|
|
10
|
-
var AuthFeatureNotAvailableError = class extends Error {
|
|
11
|
-
constructor(feature, authType) {
|
|
12
|
-
super(`The "${feature}" feature is not available with "${authType}" auth. Upgrade to @llmops/enterprise for full auth functionality.`);
|
|
13
|
-
this.name = "AuthFeatureNotAvailableError";
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
6
|
//#region src/telemetry/langchain-client.ts
|
|
19
7
|
/**
|
|
20
8
|
* Create a LangSmithTracingClientInterface-compatible client that sends
|
|
@@ -241,4 +229,4 @@ function createLLMOpsSpanExporter(config) {
|
|
|
241
229
|
}
|
|
242
230
|
|
|
243
231
|
//#endregion
|
|
244
|
-
export {
|
|
232
|
+
export { createLLMOpsAgentsExporter, createLLMOpsLangChainClient, createLLMOpsMiddleware, createLLMOpsSpanExporter, createLLMOps as llmops };
|
package/dist/nextjs.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./agents-exporter-
|
|
2
|
-
import { t as LLMOpsClient } from "./index-
|
|
1
|
+
import "./agents-exporter-uzN3bkth.cjs";
|
|
2
|
+
import { t as LLMOpsClient } from "./index-Beb26ZNG.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/nextjs/index.d.ts
|
|
5
5
|
declare function toNextJsHandler(client: LLMOpsClient): {
|
package/dist/nextjs.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./agents-exporter-
|
|
2
|
-
import { t as LLMOpsClient } from "./index-
|
|
1
|
+
import "./agents-exporter-BZHCcFSd.mjs";
|
|
2
|
+
import { t as LLMOpsClient } from "./index-05byZKeu.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/nextjs/index.d.ts
|
|
5
5
|
declare function toNextJsHandler(client: LLMOpsClient): {
|
package/dist/types.cjs
ADDED
|
File without changes
|
package/dist/types.d.cts
ADDED
package/dist/types.d.mts
ADDED
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmops/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"description": "An LLMOps toolkit for TypeScript applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -78,14 +78,34 @@
|
|
|
78
78
|
"default": "./dist/nextjs.cjs"
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
+
"./store/pg": {
|
|
82
|
+
"import": {
|
|
83
|
+
"types": "./dist/store/pg.d.mts",
|
|
84
|
+
"default": "./dist/store/pg.mjs"
|
|
85
|
+
},
|
|
86
|
+
"require": {
|
|
87
|
+
"types": "./dist/store/pg.d.cts",
|
|
88
|
+
"default": "./dist/store/pg.cjs"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"./types": {
|
|
92
|
+
"import": {
|
|
93
|
+
"types": "./dist/types.d.mts",
|
|
94
|
+
"default": "./dist/types.mjs"
|
|
95
|
+
},
|
|
96
|
+
"require": {
|
|
97
|
+
"types": "./dist/types.d.cts",
|
|
98
|
+
"default": "./dist/types.cjs"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
81
101
|
"./*": "./*"
|
|
82
102
|
},
|
|
83
103
|
"publishConfig": {
|
|
84
104
|
"access": "public"
|
|
85
105
|
},
|
|
86
106
|
"dependencies": {
|
|
87
|
-
"@llmops/app": "^0.
|
|
88
|
-
"@llmops/core": "^0.
|
|
107
|
+
"@llmops/app": "^1.0.0-beta.2",
|
|
108
|
+
"@llmops/core": "^1.0.0-beta.2"
|
|
89
109
|
},
|
|
90
110
|
"devDependencies": {
|
|
91
111
|
"@types/express": "^5.0.6",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|