lua-cli 3.8.0 → 3.9.0

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 (57) hide show
  1. package/README.md +90 -2
  2. package/dist/cli/command-definitions.js +14 -14
  3. package/dist/cli/command-definitions.js.map +1 -1
  4. package/dist/commands/agents.d.ts.map +1 -1
  5. package/dist/commands/agents.js +2 -11
  6. package/dist/commands/agents.js.map +1 -1
  7. package/dist/commands/apiKey.d.ts +1 -21
  8. package/dist/commands/apiKey.d.ts.map +1 -1
  9. package/dist/commands/apiKey.js +7 -25
  10. package/dist/commands/apiKey.js.map +1 -1
  11. package/dist/commands/compile.d.ts.map +1 -1
  12. package/dist/commands/compile.js +11 -3
  13. package/dist/commands/compile.js.map +1 -1
  14. package/dist/commands/configure.d.ts +2 -2
  15. package/dist/commands/configure.js +2 -2
  16. package/dist/commands/destroy.d.ts +0 -24
  17. package/dist/commands/destroy.d.ts.map +1 -1
  18. package/dist/commands/destroy.js +8 -30
  19. package/dist/commands/destroy.js.map +1 -1
  20. package/dist/commands/jobs.js +29 -9
  21. package/dist/commands/jobs.js.map +1 -1
  22. package/dist/config/constants.d.ts +7 -11
  23. package/dist/config/constants.d.ts.map +1 -1
  24. package/dist/config/constants.js +7 -11
  25. package/dist/config/constants.js.map +1 -1
  26. package/dist/index.js +0 -0
  27. package/dist/services/analytics.d.ts.map +1 -1
  28. package/dist/services/analytics.js +6 -2
  29. package/dist/services/analytics.js.map +1 -1
  30. package/dist/services/auth.d.ts +16 -26
  31. package/dist/services/auth.d.ts.map +1 -1
  32. package/dist/services/auth.js +45 -101
  33. package/dist/services/auth.js.map +1 -1
  34. package/dist/utils/auth-flows.d.ts.map +1 -1
  35. package/dist/utils/auth-flows.js +8 -12
  36. package/dist/utils/auth-flows.js.map +1 -1
  37. package/dist/utils/cli.d.ts.map +1 -1
  38. package/dist/utils/cli.js +2 -3
  39. package/dist/utils/cli.js.map +1 -1
  40. package/dist/utils/command-utils.d.ts +4 -3
  41. package/dist/utils/command-utils.d.ts.map +1 -1
  42. package/dist/utils/command-utils.js +9 -20
  43. package/dist/utils/command-utils.js.map +1 -1
  44. package/dist/utils/sandbox-storage.d.ts +18 -18
  45. package/dist/utils/sandbox-storage.d.ts.map +1 -1
  46. package/dist/utils/sandbox-storage.js +77 -101
  47. package/dist/utils/sandbox-storage.js.map +1 -1
  48. package/package.json +4 -6
  49. package/template/package.json +1 -1
  50. package/dist/utils/keytar-loader.d.ts +0 -20
  51. package/dist/utils/keytar-loader.d.ts.map +0 -1
  52. package/dist/utils/keytar-loader.js +0 -35
  53. package/dist/utils/keytar-loader.js.map +0 -1
  54. package/node_modules/@lua/shared-types/dist/index.d.mts +0 -122
  55. package/node_modules/@lua/shared-types/dist/index.d.ts +0 -122
  56. package/node_modules/@lua/shared-types/dist/index.js +0 -218
  57. package/node_modules/@lua/shared-types/dist/index.mjs +0 -188
@@ -1,35 +0,0 @@
1
- /**
2
- * Lazy Keytar Loader
3
- *
4
- * Defers the native keytar module import until first use and skips it
5
- * entirely when LUA_SKIP_KEYCHAIN is set. This allows lua-cli to run
6
- * in environments where native Node.js addons are unavailable
7
- * (StackBlitz WebContainers, certain CI runners, etc.).
8
- *
9
- * The promise is cached so the dynamic import runs at most once per
10
- * process, even under concurrent calls.
11
- */
12
- let _keytarPromise = null;
13
- /**
14
- * Returns the keytar module or null.
15
- *
16
- * - Returns null immediately if LUA_SKIP_KEYCHAIN is set.
17
- * - Caches the import promise so concurrent callers share the same
18
- * in-flight request and failed imports are not retried.
19
- */
20
- export async function getKeytar() {
21
- if (process.env.LUA_SKIP_KEYCHAIN)
22
- return null;
23
- if (!_keytarPromise) {
24
- _keytarPromise = import("keytar").then((mod) => {
25
- // Handle ESM/CJS interop: keytar methods may live on mod.default
26
- if (typeof mod.setPassword === 'function')
27
- return mod;
28
- if (mod.default && typeof mod.default.setPassword === 'function')
29
- return mod.default;
30
- return null;
31
- }).catch(() => null);
32
- }
33
- return _keytarPromise;
34
- }
35
- //# sourceMappingURL=keytar-loader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keytar-loader.js","sourceRoot":"","sources":["../../src/utils/keytar-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,IAAI,cAAc,GAAmD,IAAI,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB;QAAE,OAAO,IAAI,CAAC;IAC/C,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YAC7C,iEAAiE;YACjE,IAAI,OAAO,GAAG,CAAC,WAAW,KAAK,UAAU;gBAAE,OAAO,GAAG,CAAC;YACtD,IAAI,GAAG,CAAC,OAAO,IAAI,OAAO,GAAG,CAAC,OAAO,CAAC,WAAW,KAAK,UAAU;gBAAE,OAAO,GAAG,CAAC,OAAqB,CAAC;YACnG,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC"}
@@ -1,122 +0,0 @@
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 };
@@ -1,122 +0,0 @@
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 };
@@ -1,218 +0,0 @@
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
- });
@@ -1,188 +0,0 @@
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
- };