@kwirthmagnify/kwirth-common-ai 0.5.7 → 0.5.9

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/back.d.ts CHANGED
@@ -4,4 +4,6 @@ import { LanguageModel } from 'ai';
4
4
  import { z } from 'zod';
5
5
  export declare const buildModel: (llm: ILlm, providers: ILlmProvider[]) => LanguageModel | null;
6
6
  export declare const loadModels: (providers: ILlmProvider[], log: IBackChannelObject) => Promise<void>;
7
+ export { generateText, Output, stepCountIs } from 'ai';
8
+ export { z } from 'zod';
7
9
  export declare const zodFromExample: (example: Record<string, unknown>) => z.ZodObject<Record<string, z.ZodTypeAny>>;
package/dist/back.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zodFromExample = exports.loadModels = exports.buildModel = void 0;
3
+ exports.zodFromExample = exports.z = exports.stepCountIs = exports.Output = exports.generateText = exports.loadModels = exports.buildModel = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const openai_1 = require("@ai-sdk/openai");
6
6
  const groq_1 = require("@ai-sdk/groq");
@@ -119,6 +119,13 @@ const inferZod = (value) => {
119
119
  return (0, exports.zodFromExample)(value);
120
120
  return zod_1.z.unknown();
121
121
  };
122
+ // Re-export AI SDK symbols so plugins can use them without bundling the SDK
123
+ var ai_1 = require("ai");
124
+ Object.defineProperty(exports, "generateText", { enumerable: true, get: function () { return ai_1.generateText; } });
125
+ Object.defineProperty(exports, "Output", { enumerable: true, get: function () { return ai_1.Output; } });
126
+ Object.defineProperty(exports, "stepCountIs", { enumerable: true, get: function () { return ai_1.stepCountIs; } });
127
+ var zod_2 = require("zod");
128
+ Object.defineProperty(exports, "z", { enumerable: true, get: function () { return zod_2.z; } });
122
129
  const zodFromExample = (example) => {
123
130
  const shape = {};
124
131
  for (const [key, value] of Object.entries(example)) {
package/dist/front.js CHANGED
@@ -104,7 +104,7 @@ const AiConfigLlm = (props) => {
104
104
  setLlms(llms.filter((_, i) => i !== selectedIndex));
105
105
  onNew();
106
106
  };
107
- return (react_1.default.createElement(material_1.Dialog, { open: true, onClose: () => props.onClose(undefined), PaperProps: { sx: { width: '80vw', maxWidth: '800px', height: '55vh' } } },
107
+ return (react_1.default.createElement(material_1.Dialog, { open: true, onClose: () => props.onClose(undefined), PaperProps: { sx: { width: '80vw', maxWidth: '800px', height: '78vh' } } },
108
108
  react_1.default.createElement(material_1.DialogTitle, null, "AI \u2014 LLM config"),
109
109
  react_1.default.createElement(material_1.DialogContent, { style: { display: 'flex', height: '100%' } },
110
110
  react_1.default.createElement(material_1.Box, { sx: { flex: 1, display: 'flex', flexDirection: 'column', boxSizing: 'border-box', maxWidth: '40%' } },
package/package.json CHANGED
@@ -1,45 +1,51 @@
1
- {
2
- "name": "@kwirthmagnify/kwirth-common-ai",
3
- "version": "0.5.7",
4
- "description": "Shared AI/LLM types and utilities for Kwirth AI plugins",
5
- "scripts": {
6
- "build": "del .\\dist\\* /s /q 2>nul & tsc"
7
- },
8
- "publishConfig": {
9
- "access": "public"
10
- },
11
- "main": "dist/index.js",
12
- "module": "dist/index.js",
13
- "types": "dist/index.d.ts",
14
- "exports": {
15
- ".": "./dist/index.js",
16
- "./back": "./dist/back.js",
17
- "./front": "./dist/front.js"
18
- },
19
- "files": [
20
- "dist"
21
- ],
22
- "author": "Julio Fernandez",
23
- "license": "ISC",
24
- "dependencies": {
25
- "@ai-sdk/deepseek": "^2.0.29",
26
- "@ai-sdk/google": "^3.0.64",
27
- "@ai-sdk/groq": "^3.0.35",
28
- "@ai-sdk/mistral": "^3.0.30",
29
- "@ai-sdk/openai": "^3.0.53",
30
- "@openrouter/ai-sdk-provider": "^2.8.0",
31
- "ai": "^6.0.174",
32
- "zod": "^4.3.6"
33
- },
34
- "peerDependencies": {
35
- "react": ">=18.0.0"
36
- },
37
- "devDependencies": {
38
- "@kwirthmagnify/kwirth-common": "^0.5.1",
39
- "@mui/icons-material": "7.1.2",
40
- "@mui/material": "7.1.2",
41
- "@types/react": "^18.3.0",
42
- "react": "^18.3.0",
43
- "typescript": "^5.4.0"
44
- }
45
- }
1
+ {
2
+ "name": "@kwirthmagnify/kwirth-common-ai",
3
+ "version": "0.5.9",
4
+ "description": "Shared AI/LLM types and utilities for Kwirth AI plugins",
5
+ "scripts": {
6
+ "build": "del .\\dist\\* /s /q 2>nul & tsc"
7
+ },
8
+ "publishConfig": {
9
+ "access": "public"
10
+ },
11
+ "main": "dist/index.js",
12
+ "module": "dist/index.js",
13
+ "types": "dist/index.d.ts",
14
+ "exports": {
15
+ ".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
16
+ "./back": { "types": "./dist/back.d.ts", "default": "./dist/back.js" },
17
+ "./front": { "types": "./dist/front.d.ts", "default": "./dist/front.js" }
18
+ },
19
+ "typesVersions": {
20
+ "*": {
21
+ "back": ["dist/back.d.ts"],
22
+ "front": ["dist/front.d.ts"]
23
+ }
24
+ },
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "author": "Julio Fernandez",
29
+ "license": "ISC",
30
+ "dependencies": {
31
+ "@ai-sdk/deepseek": "^2.0.29",
32
+ "@ai-sdk/google": "^3.0.64",
33
+ "@ai-sdk/groq": "^3.0.35",
34
+ "@ai-sdk/mistral": "^3.0.30",
35
+ "@ai-sdk/openai": "^3.0.53",
36
+ "@openrouter/ai-sdk-provider": "^2.8.0",
37
+ "ai": "^6.0.174",
38
+ "zod": "^4.3.6"
39
+ },
40
+ "peerDependencies": {
41
+ "react": ">=18.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@kwirthmagnify/kwirth-common": "^0.5.1",
45
+ "@mui/icons-material": "7.1.2",
46
+ "@mui/material": "7.1.2",
47
+ "@types/react": "^18.3.0",
48
+ "react": "^18.3.0",
49
+ "typescript": "^5.4.0"
50
+ }
51
+ }