lua-cli 3.9.0 → 3.9.1

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.
@@ -0,0 +1,122 @@
1
+ import { FinishReason, LanguageModelUsage, ReasoningOutput, CallWarning, UserContent } from 'ai';
2
+
3
+ /**
4
+ * Channel type.
5
+ * Represents the communication channel through which a request originated.
6
+ * Known channels are typed as string literals, unrecognized channels are unknown.
7
+ */
8
+ type Channel = 'web' | 'whatsapp' | 'facebook' | 'instagram' | 'slack' | 'teams' | 'messagebird' | 'front' | 'api' | 'dev' | 'email' | 'rcs' | 'sms' | 'mms' | string;
9
+
10
+ /**
11
+ * MIME types supported by Unstructured.io for document text extraction.
12
+ * Source: https://docs.unstructured.io/api-reference/supported-file-types
13
+ *
14
+ * Shared across lua-core (FileConversionService) and lua-agents (UnstructuredService).
15
+ */
16
+ declare const UNSTRUCTURED_SUPPORTED_MEDIA_TYPES: Set<string>;
17
+
18
+ /**
19
+ * Wire-format input for sandbox `AI.generate` / `POST .../generate` (JSON-serializable).
20
+ * Serializable subset of AI SDK `generateText` parameters.
21
+ * `messages` is untyped over HTTP; callers typically send AI SDK `ModelMessage[]`.
22
+ */
23
+ interface AiGenerateInput {
24
+ model?: string;
25
+ system?: string;
26
+ prompt?: string;
27
+ messages?: unknown[];
28
+ temperature?: number;
29
+ maxOutputTokens?: number;
30
+ }
31
+ /**
32
+ * URL source from Google Search grounding.
33
+ * Mirrors `LanguageModelV2Source` (AI SDK `Source` type — not exported from `ai` as of v5).
34
+ */
35
+ interface AiGenerateSource {
36
+ sourceType: 'url';
37
+ id: string;
38
+ url: string;
39
+ title?: string;
40
+ }
41
+ /**
42
+ * Serializable tool call. Mirrors `TypedToolCall` without generics.
43
+ * `input` matches the AI SDK field name (renamed from `args` in v5).
44
+ */
45
+ interface AiGenerateToolCall {
46
+ type: 'tool-call';
47
+ toolCallId: string;
48
+ toolName: string;
49
+ input: unknown;
50
+ }
51
+ /**
52
+ * Serializable tool result. Mirrors `TypedToolResult` without generics.
53
+ * `output` matches the AI SDK field name.
54
+ */
55
+ interface AiGenerateToolResult {
56
+ type: 'tool-result';
57
+ toolCallId: string;
58
+ toolName: string;
59
+ output: unknown;
60
+ isError?: boolean;
61
+ }
62
+ /**
63
+ * Wire-format output from `AI.generate` / `POST .../generate`.
64
+ * Fields mirror AI SDK `GenerateTextResult` — uses AI SDK types where exported.
65
+ * See https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text
66
+ */
67
+ interface AiGenerateOutput {
68
+ text: string;
69
+ /** AI SDK `FinishReason` */
70
+ finishReason: FinishReason;
71
+ /** AI SDK `LanguageModelUsage` */
72
+ usage: LanguageModelUsage;
73
+ /** Model reasoning steps (e.g. Gemini thinking) */
74
+ reasoning?: ReasoningOutput[];
75
+ /** Concatenated reasoning text */
76
+ reasoningText?: string;
77
+ /** URL sources from Google Search grounding */
78
+ sources?: AiGenerateSource[];
79
+ /** Tool calls made during generation */
80
+ toolCalls?: AiGenerateToolCall[];
81
+ /** Tool results from generation */
82
+ toolResults?: AiGenerateToolResult[];
83
+ /** Provider warnings (e.g. unsupported settings) — AI SDK `CallWarning[]` */
84
+ warnings?: CallWarning[];
85
+ }
86
+
87
+ /**
88
+ * Maps simplified `AI.generate(prompt, content?)` calls to wire-format input.
89
+ */
90
+ declare function aiGenerateInputFromSimplified(prompt: string, content?: UserContent): AiGenerateInput;
91
+
92
+ /**
93
+ * Sandbox contract: defines what every sandbox MUST expose.
94
+ * Both lua-cli and lua-core test against this contract.
95
+ * Update this file when adding new globals or primitives.
96
+ */
97
+ declare const REQUIRED_PRIMITIVE_SHIMS: readonly ["LuaTool", "LuaSkill", "LuaJob", "LuaWebhook", "PreProcessor", "LuaPreprocessor", "PostProcessor", "LuaPostprocessor", "LuaMCPServer", "defineTool", "defineSkill", "defineJob", "defineWebhook", "definePreProcessor", "definePostProcessor", "defineMCPServer"];
98
+ declare const REQUIRED_PLATFORM_APIS: {
99
+ readonly User: readonly ["get", "getChatHistory"];
100
+ readonly Products: readonly ["get", "create", "delete", "search", "getById"];
101
+ readonly Baskets: readonly ["create", "get", "addItem", "removeItem", "clear", "updateStatus", "updateMetadata", "placeOrder", "getById"];
102
+ readonly Orders: readonly ["create", "updateStatus", "updateData", "get", "getById"];
103
+ readonly Data: readonly ["create", "get", "getEntry", "update", "search", "delete"];
104
+ readonly Jobs: readonly ["create", "getJob", "getAll"];
105
+ readonly AI: readonly ["generate"];
106
+ readonly CDN: readonly ["upload", "get"];
107
+ };
108
+ declare const REQUIRED_NESTED_APIS: {
109
+ readonly Templates: {
110
+ readonly whatsapp: readonly ["list", "get", "send"];
111
+ };
112
+ readonly Lua: {
113
+ readonly request: readonly ["channel"];
114
+ };
115
+ };
116
+ declare const REQUIRED_ENUMS: {
117
+ readonly BasketStatus: readonly ["ACTIVE", "CHECKED_OUT", "ABANDONED", "EXPIRED"];
118
+ readonly OrderStatus: readonly ["PENDING", "CONFIRMED", "FULFILLED", "CANCELLED"];
119
+ };
120
+ declare const REQUIRED_UTILITIES: readonly ["env"];
121
+
122
+ export { type AiGenerateInput, type AiGenerateOutput, type AiGenerateSource, type AiGenerateToolCall, type AiGenerateToolResult, type Channel, REQUIRED_ENUMS, REQUIRED_NESTED_APIS, REQUIRED_PLATFORM_APIS, REQUIRED_PRIMITIVE_SHIMS, REQUIRED_UTILITIES, UNSTRUCTURED_SUPPORTED_MEDIA_TYPES, aiGenerateInputFromSimplified };
@@ -0,0 +1,122 @@
1
+ import { FinishReason, LanguageModelUsage, ReasoningOutput, CallWarning, UserContent } from 'ai';
2
+
3
+ /**
4
+ * Channel type.
5
+ * Represents the communication channel through which a request originated.
6
+ * Known channels are typed as string literals, unrecognized channels are unknown.
7
+ */
8
+ type Channel = 'web' | 'whatsapp' | 'facebook' | 'instagram' | 'slack' | 'teams' | 'messagebird' | 'front' | 'api' | 'dev' | 'email' | 'rcs' | 'sms' | 'mms' | string;
9
+
10
+ /**
11
+ * MIME types supported by Unstructured.io for document text extraction.
12
+ * Source: https://docs.unstructured.io/api-reference/supported-file-types
13
+ *
14
+ * Shared across lua-core (FileConversionService) and lua-agents (UnstructuredService).
15
+ */
16
+ declare const UNSTRUCTURED_SUPPORTED_MEDIA_TYPES: Set<string>;
17
+
18
+ /**
19
+ * Wire-format input for sandbox `AI.generate` / `POST .../generate` (JSON-serializable).
20
+ * Serializable subset of AI SDK `generateText` parameters.
21
+ * `messages` is untyped over HTTP; callers typically send AI SDK `ModelMessage[]`.
22
+ */
23
+ interface AiGenerateInput {
24
+ model?: string;
25
+ system?: string;
26
+ prompt?: string;
27
+ messages?: unknown[];
28
+ temperature?: number;
29
+ maxOutputTokens?: number;
30
+ }
31
+ /**
32
+ * URL source from Google Search grounding.
33
+ * Mirrors `LanguageModelV2Source` (AI SDK `Source` type — not exported from `ai` as of v5).
34
+ */
35
+ interface AiGenerateSource {
36
+ sourceType: 'url';
37
+ id: string;
38
+ url: string;
39
+ title?: string;
40
+ }
41
+ /**
42
+ * Serializable tool call. Mirrors `TypedToolCall` without generics.
43
+ * `input` matches the AI SDK field name (renamed from `args` in v5).
44
+ */
45
+ interface AiGenerateToolCall {
46
+ type: 'tool-call';
47
+ toolCallId: string;
48
+ toolName: string;
49
+ input: unknown;
50
+ }
51
+ /**
52
+ * Serializable tool result. Mirrors `TypedToolResult` without generics.
53
+ * `output` matches the AI SDK field name.
54
+ */
55
+ interface AiGenerateToolResult {
56
+ type: 'tool-result';
57
+ toolCallId: string;
58
+ toolName: string;
59
+ output: unknown;
60
+ isError?: boolean;
61
+ }
62
+ /**
63
+ * Wire-format output from `AI.generate` / `POST .../generate`.
64
+ * Fields mirror AI SDK `GenerateTextResult` — uses AI SDK types where exported.
65
+ * See https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text
66
+ */
67
+ interface AiGenerateOutput {
68
+ text: string;
69
+ /** AI SDK `FinishReason` */
70
+ finishReason: FinishReason;
71
+ /** AI SDK `LanguageModelUsage` */
72
+ usage: LanguageModelUsage;
73
+ /** Model reasoning steps (e.g. Gemini thinking) */
74
+ reasoning?: ReasoningOutput[];
75
+ /** Concatenated reasoning text */
76
+ reasoningText?: string;
77
+ /** URL sources from Google Search grounding */
78
+ sources?: AiGenerateSource[];
79
+ /** Tool calls made during generation */
80
+ toolCalls?: AiGenerateToolCall[];
81
+ /** Tool results from generation */
82
+ toolResults?: AiGenerateToolResult[];
83
+ /** Provider warnings (e.g. unsupported settings) — AI SDK `CallWarning[]` */
84
+ warnings?: CallWarning[];
85
+ }
86
+
87
+ /**
88
+ * Maps simplified `AI.generate(prompt, content?)` calls to wire-format input.
89
+ */
90
+ declare function aiGenerateInputFromSimplified(prompt: string, content?: UserContent): AiGenerateInput;
91
+
92
+ /**
93
+ * Sandbox contract: defines what every sandbox MUST expose.
94
+ * Both lua-cli and lua-core test against this contract.
95
+ * Update this file when adding new globals or primitives.
96
+ */
97
+ declare const REQUIRED_PRIMITIVE_SHIMS: readonly ["LuaTool", "LuaSkill", "LuaJob", "LuaWebhook", "PreProcessor", "LuaPreprocessor", "PostProcessor", "LuaPostprocessor", "LuaMCPServer", "defineTool", "defineSkill", "defineJob", "defineWebhook", "definePreProcessor", "definePostProcessor", "defineMCPServer"];
98
+ declare const REQUIRED_PLATFORM_APIS: {
99
+ readonly User: readonly ["get", "getChatHistory"];
100
+ readonly Products: readonly ["get", "create", "delete", "search", "getById"];
101
+ readonly Baskets: readonly ["create", "get", "addItem", "removeItem", "clear", "updateStatus", "updateMetadata", "placeOrder", "getById"];
102
+ readonly Orders: readonly ["create", "updateStatus", "updateData", "get", "getById"];
103
+ readonly Data: readonly ["create", "get", "getEntry", "update", "search", "delete"];
104
+ readonly Jobs: readonly ["create", "getJob", "getAll"];
105
+ readonly AI: readonly ["generate"];
106
+ readonly CDN: readonly ["upload", "get"];
107
+ };
108
+ declare const REQUIRED_NESTED_APIS: {
109
+ readonly Templates: {
110
+ readonly whatsapp: readonly ["list", "get", "send"];
111
+ };
112
+ readonly Lua: {
113
+ readonly request: readonly ["channel"];
114
+ };
115
+ };
116
+ declare const REQUIRED_ENUMS: {
117
+ readonly BasketStatus: readonly ["ACTIVE", "CHECKED_OUT", "ABANDONED", "EXPIRED"];
118
+ readonly OrderStatus: readonly ["PENDING", "CONFIRMED", "FULFILLED", "CANCELLED"];
119
+ };
120
+ declare const REQUIRED_UTILITIES: readonly ["env"];
121
+
122
+ export { type AiGenerateInput, type AiGenerateOutput, type AiGenerateSource, type AiGenerateToolCall, type AiGenerateToolResult, type Channel, REQUIRED_ENUMS, REQUIRED_NESTED_APIS, REQUIRED_PLATFORM_APIS, REQUIRED_PRIMITIVE_SHIMS, REQUIRED_UTILITIES, UNSTRUCTURED_SUPPORTED_MEDIA_TYPES, aiGenerateInputFromSimplified };
@@ -0,0 +1,218 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ REQUIRED_ENUMS: () => REQUIRED_ENUMS,
24
+ REQUIRED_NESTED_APIS: () => REQUIRED_NESTED_APIS,
25
+ REQUIRED_PLATFORM_APIS: () => REQUIRED_PLATFORM_APIS,
26
+ REQUIRED_PRIMITIVE_SHIMS: () => REQUIRED_PRIMITIVE_SHIMS,
27
+ REQUIRED_UTILITIES: () => REQUIRED_UTILITIES,
28
+ UNSTRUCTURED_SUPPORTED_MEDIA_TYPES: () => UNSTRUCTURED_SUPPORTED_MEDIA_TYPES,
29
+ aiGenerateInputFromSimplified: () => aiGenerateInputFromSimplified
30
+ });
31
+ module.exports = __toCommonJS(index_exports);
32
+
33
+ // src/unstructured-types.ts
34
+ var UNSTRUCTURED_SUPPORTED_MEDIA_TYPES = /* @__PURE__ */ new Set([
35
+ // PDF
36
+ "application/pdf",
37
+ // Word processing (.doc, .docx, .dot, .dotm, .zabw)
38
+ "application/msword",
39
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
40
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
41
+ "application/vnd.oasis.opendocument.text",
42
+ "application/rtf",
43
+ "text/rtf",
44
+ "application/x-abiword",
45
+ // Spreadsheets (.xls, .xlsx, .fods, .csv, .tsv, .dbf, .et, .mw)
46
+ "application/vnd.ms-excel",
47
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
48
+ "application/vnd.oasis.opendocument.spreadsheet",
49
+ "text/csv",
50
+ "text/tab-separated-values",
51
+ "application/dbase",
52
+ "application/x-et",
53
+ // Presentations (.ppt, .pptx, .pptm, .pot)
54
+ "application/vnd.ms-powerpoint",
55
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
56
+ "application/vnd.openxmlformats-officedocument.presentationml.template",
57
+ // Images — OCR (.bmp, .heic, .jpeg, .jpg, .png, .prn, .tiff)
58
+ "image/jpeg",
59
+ "image/jpg",
60
+ "image/png",
61
+ "image/tiff",
62
+ "image/bmp",
63
+ "image/heic",
64
+ // Email (.eml, .msg, .p7s)
65
+ "message/rfc822",
66
+ "application/vnd.ms-outlook",
67
+ "application/pkcs7-signature",
68
+ // Web/Markup (.htm, .html, .md, .rst, .xml, .org)
69
+ "text/html",
70
+ "text/markdown",
71
+ "text/x-rst",
72
+ "text/x-org",
73
+ "application/xml",
74
+ "text/xml",
75
+ // Text (.txt)
76
+ "text/plain",
77
+ // eBook (.epub)
78
+ "application/epub+zip",
79
+ // Other (.hwp, .json, .cwk, .mcw, .dif, .sxg)
80
+ "application/json",
81
+ "application/x-hwp",
82
+ "application/clarisworks",
83
+ "application/x-dif",
84
+ "application/vnd.sun.xml.writer.global"
85
+ ]);
86
+
87
+ // src/ai-generate.utils.ts
88
+ function aiGenerateInputFromSimplified(prompt, content) {
89
+ if (content === void 0) {
90
+ return {
91
+ prompt
92
+ };
93
+ }
94
+ return {
95
+ system: prompt,
96
+ messages: [
97
+ {
98
+ role: "user",
99
+ content
100
+ }
101
+ ]
102
+ };
103
+ }
104
+ __name(aiGenerateInputFromSimplified, "aiGenerateInputFromSimplified");
105
+
106
+ // src/sandbox-contract.ts
107
+ var REQUIRED_PRIMITIVE_SHIMS = [
108
+ // Class-based
109
+ "LuaTool",
110
+ "LuaSkill",
111
+ "LuaJob",
112
+ "LuaWebhook",
113
+ "PreProcessor",
114
+ "LuaPreprocessor",
115
+ "PostProcessor",
116
+ "LuaPostprocessor",
117
+ "LuaMCPServer",
118
+ // Function-based
119
+ "defineTool",
120
+ "defineSkill",
121
+ "defineJob",
122
+ "defineWebhook",
123
+ "definePreProcessor",
124
+ "definePostProcessor",
125
+ "defineMCPServer"
126
+ ];
127
+ var REQUIRED_PLATFORM_APIS = {
128
+ User: [
129
+ "get",
130
+ "getChatHistory"
131
+ ],
132
+ Products: [
133
+ "get",
134
+ "create",
135
+ "delete",
136
+ "search",
137
+ "getById"
138
+ ],
139
+ Baskets: [
140
+ "create",
141
+ "get",
142
+ "addItem",
143
+ "removeItem",
144
+ "clear",
145
+ "updateStatus",
146
+ "updateMetadata",
147
+ "placeOrder",
148
+ "getById"
149
+ ],
150
+ Orders: [
151
+ "create",
152
+ "updateStatus",
153
+ "updateData",
154
+ "get",
155
+ "getById"
156
+ ],
157
+ Data: [
158
+ "create",
159
+ "get",
160
+ "getEntry",
161
+ "update",
162
+ "search",
163
+ "delete"
164
+ ],
165
+ Jobs: [
166
+ "create",
167
+ "getJob",
168
+ "getAll"
169
+ ],
170
+ AI: [
171
+ "generate"
172
+ ],
173
+ CDN: [
174
+ "upload",
175
+ "get"
176
+ ]
177
+ };
178
+ var REQUIRED_NESTED_APIS = {
179
+ Templates: {
180
+ whatsapp: [
181
+ "list",
182
+ "get",
183
+ "send"
184
+ ]
185
+ },
186
+ Lua: {
187
+ request: [
188
+ "channel"
189
+ ]
190
+ }
191
+ };
192
+ var REQUIRED_ENUMS = {
193
+ BasketStatus: [
194
+ "ACTIVE",
195
+ "CHECKED_OUT",
196
+ "ABANDONED",
197
+ "EXPIRED"
198
+ ],
199
+ OrderStatus: [
200
+ "PENDING",
201
+ "CONFIRMED",
202
+ "FULFILLED",
203
+ "CANCELLED"
204
+ ]
205
+ };
206
+ var REQUIRED_UTILITIES = [
207
+ "env"
208
+ ];
209
+ // Annotate the CommonJS export names for ESM import in node:
210
+ 0 && (module.exports = {
211
+ REQUIRED_ENUMS,
212
+ REQUIRED_NESTED_APIS,
213
+ REQUIRED_PLATFORM_APIS,
214
+ REQUIRED_PRIMITIVE_SHIMS,
215
+ REQUIRED_UTILITIES,
216
+ UNSTRUCTURED_SUPPORTED_MEDIA_TYPES,
217
+ aiGenerateInputFromSimplified
218
+ });
@@ -0,0 +1,188 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ // src/unstructured-types.ts
5
+ var UNSTRUCTURED_SUPPORTED_MEDIA_TYPES = /* @__PURE__ */ new Set([
6
+ // PDF
7
+ "application/pdf",
8
+ // Word processing (.doc, .docx, .dot, .dotm, .zabw)
9
+ "application/msword",
10
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
11
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
12
+ "application/vnd.oasis.opendocument.text",
13
+ "application/rtf",
14
+ "text/rtf",
15
+ "application/x-abiword",
16
+ // Spreadsheets (.xls, .xlsx, .fods, .csv, .tsv, .dbf, .et, .mw)
17
+ "application/vnd.ms-excel",
18
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
19
+ "application/vnd.oasis.opendocument.spreadsheet",
20
+ "text/csv",
21
+ "text/tab-separated-values",
22
+ "application/dbase",
23
+ "application/x-et",
24
+ // Presentations (.ppt, .pptx, .pptm, .pot)
25
+ "application/vnd.ms-powerpoint",
26
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
27
+ "application/vnd.openxmlformats-officedocument.presentationml.template",
28
+ // Images — OCR (.bmp, .heic, .jpeg, .jpg, .png, .prn, .tiff)
29
+ "image/jpeg",
30
+ "image/jpg",
31
+ "image/png",
32
+ "image/tiff",
33
+ "image/bmp",
34
+ "image/heic",
35
+ // Email (.eml, .msg, .p7s)
36
+ "message/rfc822",
37
+ "application/vnd.ms-outlook",
38
+ "application/pkcs7-signature",
39
+ // Web/Markup (.htm, .html, .md, .rst, .xml, .org)
40
+ "text/html",
41
+ "text/markdown",
42
+ "text/x-rst",
43
+ "text/x-org",
44
+ "application/xml",
45
+ "text/xml",
46
+ // Text (.txt)
47
+ "text/plain",
48
+ // eBook (.epub)
49
+ "application/epub+zip",
50
+ // Other (.hwp, .json, .cwk, .mcw, .dif, .sxg)
51
+ "application/json",
52
+ "application/x-hwp",
53
+ "application/clarisworks",
54
+ "application/x-dif",
55
+ "application/vnd.sun.xml.writer.global"
56
+ ]);
57
+
58
+ // src/ai-generate.utils.ts
59
+ function aiGenerateInputFromSimplified(prompt, content) {
60
+ if (content === void 0) {
61
+ return {
62
+ prompt
63
+ };
64
+ }
65
+ return {
66
+ system: prompt,
67
+ messages: [
68
+ {
69
+ role: "user",
70
+ content
71
+ }
72
+ ]
73
+ };
74
+ }
75
+ __name(aiGenerateInputFromSimplified, "aiGenerateInputFromSimplified");
76
+
77
+ // src/sandbox-contract.ts
78
+ var REQUIRED_PRIMITIVE_SHIMS = [
79
+ // Class-based
80
+ "LuaTool",
81
+ "LuaSkill",
82
+ "LuaJob",
83
+ "LuaWebhook",
84
+ "PreProcessor",
85
+ "LuaPreprocessor",
86
+ "PostProcessor",
87
+ "LuaPostprocessor",
88
+ "LuaMCPServer",
89
+ // Function-based
90
+ "defineTool",
91
+ "defineSkill",
92
+ "defineJob",
93
+ "defineWebhook",
94
+ "definePreProcessor",
95
+ "definePostProcessor",
96
+ "defineMCPServer"
97
+ ];
98
+ var REQUIRED_PLATFORM_APIS = {
99
+ User: [
100
+ "get",
101
+ "getChatHistory"
102
+ ],
103
+ Products: [
104
+ "get",
105
+ "create",
106
+ "delete",
107
+ "search",
108
+ "getById"
109
+ ],
110
+ Baskets: [
111
+ "create",
112
+ "get",
113
+ "addItem",
114
+ "removeItem",
115
+ "clear",
116
+ "updateStatus",
117
+ "updateMetadata",
118
+ "placeOrder",
119
+ "getById"
120
+ ],
121
+ Orders: [
122
+ "create",
123
+ "updateStatus",
124
+ "updateData",
125
+ "get",
126
+ "getById"
127
+ ],
128
+ Data: [
129
+ "create",
130
+ "get",
131
+ "getEntry",
132
+ "update",
133
+ "search",
134
+ "delete"
135
+ ],
136
+ Jobs: [
137
+ "create",
138
+ "getJob",
139
+ "getAll"
140
+ ],
141
+ AI: [
142
+ "generate"
143
+ ],
144
+ CDN: [
145
+ "upload",
146
+ "get"
147
+ ]
148
+ };
149
+ var REQUIRED_NESTED_APIS = {
150
+ Templates: {
151
+ whatsapp: [
152
+ "list",
153
+ "get",
154
+ "send"
155
+ ]
156
+ },
157
+ Lua: {
158
+ request: [
159
+ "channel"
160
+ ]
161
+ }
162
+ };
163
+ var REQUIRED_ENUMS = {
164
+ BasketStatus: [
165
+ "ACTIVE",
166
+ "CHECKED_OUT",
167
+ "ABANDONED",
168
+ "EXPIRED"
169
+ ],
170
+ OrderStatus: [
171
+ "PENDING",
172
+ "CONFIRMED",
173
+ "FULFILLED",
174
+ "CANCELLED"
175
+ ]
176
+ };
177
+ var REQUIRED_UTILITIES = [
178
+ "env"
179
+ ];
180
+ export {
181
+ REQUIRED_ENUMS,
182
+ REQUIRED_NESTED_APIS,
183
+ REQUIRED_PLATFORM_APIS,
184
+ REQUIRED_PRIMITIVE_SHIMS,
185
+ REQUIRED_UTILITIES,
186
+ UNSTRUCTURED_SUPPORTED_MEDIA_TYPES,
187
+ aiGenerateInputFromSimplified
188
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lua-cli",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "description": "Build, test, and deploy AI agents with custom tools, webhooks, and scheduled jobs. Features LuaAgent unified configuration, streaming chat, and batch deployment.",
5
5
  "readmeFilename": "README.md",
6
6
  "main": "dist/api-exports.js",
@@ -61,7 +61,7 @@
61
61
  "LICENSE"
62
62
  ],
63
63
  "dependencies": {
64
- "@lua/shared-types": "0.0.1",
64
+ "@lua/shared-types": "workspace:*",
65
65
  "@tailwindcss/postcss": "^4.1.14",
66
66
  "@tanstack/react-query": "^5.90.11",
67
67
  "ai": "^5.0.76",
@@ -20,7 +20,7 @@
20
20
  "inquirer": "^12.9.6",
21
21
  "stripe": "^17.5.0",
22
22
  "js-yaml": "^4.1.0",
23
- "lua-cli": "^3.9.0",
23
+ "lua-cli": "^3.9.1",
24
24
  "openai": "^5.23.0",
25
25
  "uuid": "^13.0.0",
26
26
  "zod": "^3.24.1"