@llmops/sdk 1.0.0-beta.1 → 1.0.0-beta.11

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.
Files changed (43) hide show
  1. package/dist/agents.cjs +1 -1
  2. package/dist/agents.d.cts +1 -1
  3. package/dist/agents.d.mts +1 -1
  4. package/dist/agents.mjs +1 -1
  5. package/dist/constants--ywcWP7q.cjs +18 -0
  6. package/dist/constants-B8e4mnT7.mjs +12 -0
  7. package/dist/express.cjs +29 -2
  8. package/dist/express.d.cts +7 -3
  9. package/dist/express.d.mts +7 -3
  10. package/dist/express.mjs +28 -1
  11. package/dist/hono.d.cts +2 -2
  12. package/dist/hono.d.mts +2 -2
  13. package/dist/{index-C7J-9Jvp.d.cts → index-B5aeZ4Jb.d.mts} +1 -1
  14. package/dist/{index-D0LVaLA4.d.mts → index-sjRozlIk.d.cts} +1 -1
  15. package/dist/index.cjs +4 -10
  16. package/dist/index.d.cts +4 -5
  17. package/dist/index.d.mts +4 -5
  18. package/dist/index.mjs +4 -4
  19. package/dist/interface-B0KYptxO.d.cts +223 -0
  20. package/dist/interface-DFchZZQP.d.mts +223 -0
  21. package/dist/nextjs.d.cts +2 -2
  22. package/dist/nextjs.d.mts +2 -2
  23. package/dist/store/d1.cjs +491 -0
  24. package/dist/store/d1.d.cts +60 -0
  25. package/dist/store/d1.d.mts +60 -0
  26. package/dist/store/d1.mjs +490 -0
  27. package/dist/store/pg.cjs +13636 -0
  28. package/dist/store/pg.d.cts +38 -0
  29. package/dist/store/pg.d.mts +38 -0
  30. package/dist/store/pg.mjs +13637 -0
  31. package/dist/types.cjs +0 -0
  32. package/dist/types.d.cts +2 -0
  33. package/dist/types.d.mts +2 -0
  34. package/dist/types.mjs +1 -0
  35. package/package.json +44 -3
  36. package/dist/express-B-wbCza5.cjs +0 -35
  37. package/dist/express-ClEIbLM9.mjs +0 -30
  38. package/dist/index-1uemrw2P.d.cts +0 -7
  39. package/dist/index-BeDbCYjz.d.mts +0 -7
  40. /package/dist/{agents-exporter-B-ADoC7t.d.cts → agents-exporter-B3dyZc2j.d.mts} +0 -0
  41. /package/dist/{agents-exporter-CxbWY6xN.mjs → agents-exporter-Cte-NArh.mjs} +0 -0
  42. /package/dist/{agents-exporter-BuTq2n2y.cjs → agents-exporter-DizRE7CQ.cjs} +0 -0
  43. /package/dist/{agents-exporter-BZjfVkaH.d.mts → agents-exporter-vuQine9v.d.cts} +0 -0
package/dist/types.cjs ADDED
File without changes
@@ -0,0 +1,2 @@
1
+ import { t as TelemetryStore } from "./interface-B0KYptxO.cjs";
2
+ export { type TelemetryStore };
@@ -0,0 +1,2 @@
1
+ import { t as TelemetryStore } from "./interface-DFchZZQP.mjs";
2
+ export { type TelemetryStore };
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": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.11",
4
4
  "description": "An LLMOps toolkit for TypeScript applications",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -78,17 +78,58 @@
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
+ "./store/d1": {
92
+ "import": {
93
+ "types": "./dist/store/d1.d.mts",
94
+ "default": "./dist/store/d1.mjs"
95
+ },
96
+ "require": {
97
+ "types": "./dist/store/d1.d.cts",
98
+ "default": "./dist/store/d1.cjs"
99
+ }
100
+ },
101
+ "./types": {
102
+ "import": {
103
+ "types": "./dist/types.d.mts",
104
+ "default": "./dist/types.mjs"
105
+ },
106
+ "require": {
107
+ "types": "./dist/types.d.cts",
108
+ "default": "./dist/types.cjs"
109
+ }
110
+ },
81
111
  "./*": "./*"
82
112
  },
83
113
  "publishConfig": {
84
114
  "access": "public"
85
115
  },
86
116
  "dependencies": {
87
- "@llmops/app": "^1.0.0-beta.1",
88
- "@llmops/core": "^1.0.0-beta.1"
117
+ "@llmops/app": "^1.0.0-beta.11",
118
+ "@llmops/core": "^1.0.0-beta.11"
119
+ },
120
+ "peerDependencies": {
121
+ "pg": "*"
122
+ },
123
+ "peerDependenciesMeta": {
124
+ "pg": {
125
+ "optional": true
126
+ }
89
127
  },
90
128
  "devDependencies": {
129
+ "@tsqx/cli": "^0.0.5",
130
+ "@tsqx/kit": "^0.0.5",
91
131
  "@types/express": "^5.0.6",
132
+ "@types/pg": "^8.15.6",
92
133
  "hono": "^4.7.0"
93
134
  },
94
135
  "scripts": {
@@ -1,35 +0,0 @@
1
- let node_stream = require("node:stream");
2
-
3
- //#region src/lib/express/index.ts
4
- function createLLMOpsMiddleware(client) {
5
- const basePath = client.config.basePath;
6
- return async (req, res, next) => {
7
- let urlPath = req.originalUrl;
8
- if (basePath && urlPath.startsWith(basePath)) urlPath = urlPath.slice(basePath.length) || "/";
9
- const url = new URL(urlPath, `${req.protocol}://${req.get("host")}`);
10
- const request = new Request(url, {
11
- method: req.method,
12
- headers: req.headers,
13
- body: ["GET", "HEAD"].includes(req.method) ? void 0 : JSON.stringify(req.body)
14
- });
15
- const response = await client.handler(request);
16
- if (response.status === 404) return next();
17
- response.headers?.forEach((value, key) => {
18
- res.setHeader(key, value);
19
- });
20
- res.status(response.status);
21
- if ((response.headers?.get("content-type"))?.includes("text/event-stream") && response.body) node_stream.Readable.fromWeb(response.body).pipe(res);
22
- else {
23
- const body = await response.text();
24
- res.send(body);
25
- }
26
- };
27
- }
28
-
29
- //#endregion
30
- Object.defineProperty(exports, 'createLLMOpsMiddleware', {
31
- enumerable: true,
32
- get: function () {
33
- return createLLMOpsMiddleware;
34
- }
35
- });
@@ -1,30 +0,0 @@
1
- import { Readable } from "node:stream";
2
-
3
- //#region src/lib/express/index.ts
4
- function createLLMOpsMiddleware(client) {
5
- const basePath = client.config.basePath;
6
- return async (req, res, next) => {
7
- let urlPath = req.originalUrl;
8
- if (basePath && urlPath.startsWith(basePath)) urlPath = urlPath.slice(basePath.length) || "/";
9
- const url = new URL(urlPath, `${req.protocol}://${req.get("host")}`);
10
- const request = new Request(url, {
11
- method: req.method,
12
- headers: req.headers,
13
- body: ["GET", "HEAD"].includes(req.method) ? void 0 : JSON.stringify(req.body)
14
- });
15
- const response = await client.handler(request);
16
- if (response.status === 404) return next();
17
- response.headers?.forEach((value, key) => {
18
- res.setHeader(key, value);
19
- });
20
- res.status(response.status);
21
- if ((response.headers?.get("content-type"))?.includes("text/event-stream") && response.body) Readable.fromWeb(response.body).pipe(res);
22
- else {
23
- const body = await response.text();
24
- res.send(body);
25
- }
26
- };
27
- }
28
-
29
- //#endregion
30
- export { createLLMOpsMiddleware as t };
@@ -1,7 +0,0 @@
1
- import { t as LLMOpsClient } from "./index-C7J-9Jvp.cjs";
2
- import { NextFunction, Request, Response } from "express";
3
-
4
- //#region src/lib/express/index.d.ts
5
- declare function createLLMOpsMiddleware(client: LLMOpsClient): (req: Request, res: Response, next: NextFunction) => Promise<void>;
6
- //#endregion
7
- export { createLLMOpsMiddleware as t };
@@ -1,7 +0,0 @@
1
- import { t as LLMOpsClient } from "./index-D0LVaLA4.mjs";
2
- import { NextFunction, Request, Response } from "express";
3
-
4
- //#region src/lib/express/index.d.ts
5
- declare function createLLMOpsMiddleware(client: LLMOpsClient): (req: Request, res: Response, next: NextFunction) => Promise<void>;
6
- //#endregion
7
- export { createLLMOpsMiddleware as t };