lua-cli 3.16.2 → 3.17.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.
- package/dist/api-exports.d.ts +28 -0
- package/dist/api-exports.js +2 -1
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +1307 -210
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/template/lua.skill.yaml +7 -0
- package/template/package.json +1 -1
package/dist/api-exports.d.ts
CHANGED
|
@@ -165,8 +165,21 @@ declare interface AiGenerateInput {
|
|
|
165
165
|
messages?: unknown[];
|
|
166
166
|
temperature?: number;
|
|
167
167
|
maxOutputTokens?: number;
|
|
168
|
+
/**
|
|
169
|
+
* When set, constrains the response to match the JSON Schema. The parsed result
|
|
170
|
+
* lands on `AiGenerateOutput.output`. Mirrors AI SDK `Output.object({ schema })`.
|
|
171
|
+
* Object-mode only in this version — array/choice modes are future extensions.
|
|
172
|
+
*/
|
|
173
|
+
structuredOutput?: AiGenerateStructuredOutput;
|
|
168
174
|
}
|
|
169
175
|
|
|
176
|
+
/**
|
|
177
|
+
* JSON Schema 7-shaped object describing the structured output the model must return.
|
|
178
|
+
* Kept as `Record<string, unknown>` to avoid pulling `@types/json-schema` into the
|
|
179
|
+
* published lua-cli surface; callers typically produce this via `zodToJsonSchema`.
|
|
180
|
+
*/
|
|
181
|
+
declare type AiGenerateJsonSchema = Record<string, unknown>;
|
|
182
|
+
|
|
170
183
|
/**
|
|
171
184
|
* Wire-format output from `AI.generate` / `POST .../generate`.
|
|
172
185
|
* Fields mirror AI SDK `GenerateTextResult` — uses AI SDK types where exported.
|
|
@@ -188,6 +201,11 @@ declare interface AiGenerateOutput {
|
|
|
188
201
|
toolCalls?: AiGenerateToolCall[];
|
|
189
202
|
/** Tool results from generation */
|
|
190
203
|
toolResults?: AiGenerateToolResult[];
|
|
204
|
+
/**
|
|
205
|
+
* Parsed structured result when `AiGenerateInput.structuredOutput` was set.
|
|
206
|
+
* Shape conforms to the supplied JSON Schema. Mirrors AI SDK `result.output`.
|
|
207
|
+
*/
|
|
208
|
+
output?: unknown;
|
|
191
209
|
/** Provider warnings (e.g. unsupported settings) — AI SDK `CallWarning[]` */
|
|
192
210
|
warnings?: CallWarning[];
|
|
193
211
|
}
|
|
@@ -203,6 +221,15 @@ declare interface AiGenerateSource {
|
|
|
203
221
|
title?: string;
|
|
204
222
|
}
|
|
205
223
|
|
|
224
|
+
/**
|
|
225
|
+
* Structured-output spec. Maps to AI SDK `output: Output.object({ schema })` on `generateText`.
|
|
226
|
+
* Result lands on `AiGenerateOutput.output`.
|
|
227
|
+
*/
|
|
228
|
+
declare interface AiGenerateStructuredOutput {
|
|
229
|
+
/** JSON Schema 7 describing the expected object shape. */
|
|
230
|
+
schema: AiGenerateJsonSchema;
|
|
231
|
+
}
|
|
232
|
+
|
|
206
233
|
/**
|
|
207
234
|
* Serializable tool call. Mirrors `TypedToolCall` without generics.
|
|
208
235
|
* `input` matches the AI SDK field name (renamed from `args` in v5).
|
|
@@ -255,6 +282,7 @@ declare interface ApiResponse<T = any> {
|
|
|
255
282
|
data?: T;
|
|
256
283
|
error?: {
|
|
257
284
|
message: string;
|
|
285
|
+
code?: string;
|
|
258
286
|
statusCode?: number;
|
|
259
287
|
error?: string;
|
|
260
288
|
};
|
package/dist/api-exports.js
CHANGED
|
@@ -27,13 +27,14 @@ var init_baskets = __esm({
|
|
|
27
27
|
// src/config/constants.ts
|
|
28
28
|
import { join } from "path";
|
|
29
29
|
import { homedir } from "os";
|
|
30
|
-
var CLI_CONFIG_DIR, VERSION_CHECK_FILE, TELEMETRY_FILE, BASE_URLS, CREDENTIALS_FILE, SANDBOX_STORAGE_FILE;
|
|
30
|
+
var CLI_CONFIG_DIR, VERSION_CHECK_FILE, TELEMETRY_FILE, CLI_CACHE_FILE, BASE_URLS, CREDENTIALS_FILE, SANDBOX_STORAGE_FILE;
|
|
31
31
|
var init_constants = __esm({
|
|
32
32
|
"src/config/constants.ts"() {
|
|
33
33
|
"use strict";
|
|
34
34
|
CLI_CONFIG_DIR = join(homedir(), ".lua-cli");
|
|
35
35
|
VERSION_CHECK_FILE = join(CLI_CONFIG_DIR, "version-check.json");
|
|
36
36
|
TELEMETRY_FILE = join(CLI_CONFIG_DIR, "telemetry.json");
|
|
37
|
+
CLI_CACHE_FILE = join(CLI_CONFIG_DIR, "cache.json");
|
|
37
38
|
BASE_URLS = {
|
|
38
39
|
API: process.env.LUA_API_URL || "https://api.heylua.ai",
|
|
39
40
|
AUTH: process.env.LUA_AUTH_URL || "https://auth.heylua.ai",
|