lua-cli 2.3.0 → 2.4.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/products.api.service.js +1 -0
- package/dist/cli/command-definitions.d.ts +0 -8
- package/dist/cli/command-definitions.js +51 -18
- package/dist/commands/chat.d.ts +17 -0
- package/dist/commands/chat.js +236 -0
- package/dist/commands/chatClear.d.ts +15 -0
- package/dist/commands/chatClear.js +75 -0
- package/dist/commands/deploy.d.ts +7 -5
- package/dist/commands/deploy.js +34 -15
- package/dist/commands/env.d.ts +19 -0
- package/dist/commands/env.js +434 -0
- package/dist/commands/index.d.ts +6 -0
- package/dist/commands/index.js +6 -0
- package/dist/commands/init.js +6 -6
- package/dist/commands/persona.d.ts +15 -0
- package/dist/commands/persona.js +503 -0
- package/dist/commands/production.d.ts +15 -0
- package/dist/commands/production.js +532 -0
- package/dist/commands/push.d.ts +7 -5
- package/dist/commands/push.js +100 -21
- package/dist/commands/resources.d.ts +17 -0
- package/dist/commands/resources.js +361 -0
- package/dist/common/data.entry.instance.js +6 -2
- package/dist/common/http.client.js +7 -0
- package/dist/config/compile.constants.d.ts +4 -3
- package/dist/config/compile.constants.js +3 -7
- package/dist/config/constants.d.ts +6 -0
- package/dist/config/constants.js +11 -0
- package/dist/errors/auth.error.d.ts +15 -0
- package/dist/errors/auth.error.js +27 -0
- package/dist/errors/index.d.ts +4 -0
- package/dist/errors/index.js +4 -0
- package/dist/index.d.ts +0 -9
- package/dist/index.js +30 -11
- package/dist/interfaces/agent.d.ts +33 -49
- package/dist/services/auth.d.ts +1 -2
- package/dist/services/auth.js +3 -4
- package/dist/utils/bundling.js +61 -0
- package/dist/utils/cli.js +6 -0
- package/dist/utils/deploy-helpers.d.ts +22 -0
- package/dist/utils/deploy-helpers.js +61 -2
- package/dist/utils/deployment.js +33 -1
- package/dist/utils/dev-server.js +255 -0
- package/dist/utils/init-agent.js +3 -3
- package/dist/utils/prompt-handler.d.ts +12 -0
- package/dist/utils/prompt-handler.js +31 -0
- package/dist/utils/push-helpers.d.ts +47 -3
- package/dist/utils/push-helpers.js +167 -10
- package/dist/utils/sandbox.js +18 -5
- package/dist/web/app.css +1302 -465
- package/dist/web/app.js +53 -46
- package/package.json +1 -1
- package/template/package.json +1 -1
- package/template/src/tools/BasketTool.ts +4 -1
- package/template/src/tools/ProductsTool.ts +7 -7
- package/dist/web/tools-page.css +0 -381
package/package.json
CHANGED
package/template/package.json
CHANGED
|
@@ -25,7 +25,10 @@ export class GetBasketsTool implements LuaTool {
|
|
|
25
25
|
status: z.enum(['active', 'checked_out', 'abandoned', 'expired']).optional()
|
|
26
26
|
});
|
|
27
27
|
async execute(input: z.infer<typeof this.inputSchema>) {
|
|
28
|
-
|
|
28
|
+
const baskets = await Baskets.get(input.status as BasketStatus);
|
|
29
|
+
return {
|
|
30
|
+
baskets: baskets
|
|
31
|
+
};
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
|
|
@@ -9,7 +9,7 @@ export class SearchProductsTool implements LuaTool {
|
|
|
9
9
|
query: z.string()
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
constructor() {}
|
|
12
|
+
constructor() { }
|
|
13
13
|
|
|
14
14
|
async execute(input: z.infer<typeof this.inputSchema>) {
|
|
15
15
|
return await Products.search(input.query);
|
|
@@ -19,13 +19,13 @@ export class SearchProductsTool implements LuaTool {
|
|
|
19
19
|
export class GetAllProductsTool implements LuaTool {
|
|
20
20
|
name = "get_all_products";
|
|
21
21
|
description = "Get all products";
|
|
22
|
-
inputSchema = z.object({
|
|
22
|
+
inputSchema = z.object({
|
|
23
23
|
page: z.number().optional(),
|
|
24
24
|
limit: z.number().optional()
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
async execute(input: z.infer<typeof this.inputSchema>) {
|
|
28
|
-
return await Products.get(input.
|
|
28
|
+
return await Products.get(input.limit, input.limit);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -41,8 +41,8 @@ export class CreateProductTool implements LuaTool {
|
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
async execute(input: z.infer<typeof this.inputSchema>) {
|
|
44
|
-
return Products.create({...input.product, id: uuidv4()});
|
|
45
|
-
}
|
|
44
|
+
return Products.create({ ...input.product, id: uuidv4() });
|
|
45
|
+
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export class UpdateProductTool implements LuaTool {
|
|
@@ -58,7 +58,7 @@ export class UpdateProductTool implements LuaTool {
|
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
async execute(input: z.infer<typeof this.inputSchema>) {
|
|
61
|
-
return Products.update({...input.product
|
|
61
|
+
return Products.update({ ...input.product }, input.product.id);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -73,7 +73,7 @@ export class GetProductByIdTool implements LuaTool {
|
|
|
73
73
|
return Products.getById(input.id);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
export class DeleteProductTool implements LuaTool {
|
|
78
78
|
name = "delete_product";
|
|
79
79
|
description = "Delete an existing product";
|
package/dist/web/tools-page.css
DELETED
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
/* Tools Page Styles */
|
|
2
|
-
.tools-page {
|
|
3
|
-
flex: 1;
|
|
4
|
-
background: #1e1e1e;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.tools-loading {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
height: 100%;
|
|
16
|
-
gap: 16px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/* Tools List View */
|
|
21
|
-
.tools-list-view {
|
|
22
|
-
flex: 1;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.tools-header {
|
|
29
|
-
background: #2d2d30;
|
|
30
|
-
color: #cccccc;
|
|
31
|
-
padding: 16px 20px;
|
|
32
|
-
border-bottom: 1px solid #3e3e42;
|
|
33
|
-
flex-shrink: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.tools-header h3 {
|
|
37
|
-
margin: 0 0 4px 0;
|
|
38
|
-
font-size: 14px;
|
|
39
|
-
font-weight: 600;
|
|
40
|
-
color: #ffffff;
|
|
41
|
-
font-family: inherit;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.tools-header p {
|
|
45
|
-
margin: 0;
|
|
46
|
-
font-size: 12px;
|
|
47
|
-
color: #cccccc;
|
|
48
|
-
font-family: inherit;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.tools-grid {
|
|
52
|
-
flex: 1;
|
|
53
|
-
padding: 20px;
|
|
54
|
-
display: grid;
|
|
55
|
-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
56
|
-
gap: 12px;
|
|
57
|
-
overflow-y: auto;
|
|
58
|
-
align-content: start;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.tool-card {
|
|
62
|
-
background: #252526;
|
|
63
|
-
border: 1px solid #3e3e42;
|
|
64
|
-
border-radius: 8px;
|
|
65
|
-
padding: 8px 12px;
|
|
66
|
-
cursor: pointer;
|
|
67
|
-
transition: all 0.2s;
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
height: fit-content;
|
|
71
|
-
min-height: 50px;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.tool-card:hover {
|
|
75
|
-
background: #2d2d30;
|
|
76
|
-
border-color: #007acc;
|
|
77
|
-
transform: translateY(-2px);
|
|
78
|
-
box-shadow: 0 4px 12px rgba(0, 122, 204, 0.1);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.tool-card-header {
|
|
82
|
-
margin-bottom: 0;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.tool-card-header h4 {
|
|
86
|
-
margin: 0;
|
|
87
|
-
font-size: 13px;
|
|
88
|
-
font-weight: 600;
|
|
89
|
-
color: #ffffff;
|
|
90
|
-
font-family: inherit;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Tool card body styles removed - now empty for compact design */
|
|
94
|
-
|
|
95
|
-
/* Tool Form View */
|
|
96
|
-
.tool-form {
|
|
97
|
-
flex: 1;
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.tool-form-header {
|
|
104
|
-
background: #2d2d30;
|
|
105
|
-
color: #cccccc;
|
|
106
|
-
padding: 16px 20px;
|
|
107
|
-
border-bottom: 1px solid #3e3e42;
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
gap: 16px;
|
|
111
|
-
flex-shrink: 0;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.back-button {
|
|
115
|
-
background: #333333;
|
|
116
|
-
color: #cccccc;
|
|
117
|
-
border: none;
|
|
118
|
-
border-radius: 4px;
|
|
119
|
-
padding: 6px;
|
|
120
|
-
font-size: 14px;
|
|
121
|
-
font-family: inherit;
|
|
122
|
-
cursor: pointer;
|
|
123
|
-
transition: background-color 0.2s;
|
|
124
|
-
width: 28px;
|
|
125
|
-
height: 28px;
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
justify-content: center;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.back-button:hover:not(:disabled) {
|
|
132
|
-
background: #000000;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.back-button:disabled {
|
|
136
|
-
background: #2d2d30;
|
|
137
|
-
color: #8c8c8c;
|
|
138
|
-
cursor: not-allowed;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.tool-form-header h3 {
|
|
142
|
-
margin: 0;
|
|
143
|
-
font-size: 14px;
|
|
144
|
-
font-weight: 600;
|
|
145
|
-
color: #ffffff;
|
|
146
|
-
font-family: inherit;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.tool-form-content {
|
|
150
|
-
flex: 1;
|
|
151
|
-
padding: 20px;
|
|
152
|
-
overflow-y: auto;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.tool-info {
|
|
156
|
-
margin-bottom: 24px;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.tool-info p {
|
|
160
|
-
margin: 0;
|
|
161
|
-
font-size: 12px;
|
|
162
|
-
color: #cccccc;
|
|
163
|
-
line-height: 1.5;
|
|
164
|
-
font-family: inherit;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.tool-inputs {
|
|
168
|
-
margin-bottom: 24px;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.tool-inputs h4 {
|
|
172
|
-
margin: 0 0 16px 0;
|
|
173
|
-
font-size: 13px;
|
|
174
|
-
font-weight: 600;
|
|
175
|
-
color: #ffffff;
|
|
176
|
-
font-family: inherit;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.input-fields {
|
|
180
|
-
display: flex;
|
|
181
|
-
flex-direction: column;
|
|
182
|
-
gap: 16px;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.input-field {
|
|
186
|
-
display: flex;
|
|
187
|
-
flex-direction: column;
|
|
188
|
-
gap: 6px;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.input-field label {
|
|
192
|
-
font-size: 12px;
|
|
193
|
-
font-weight: 500;
|
|
194
|
-
color: #cccccc;
|
|
195
|
-
font-family: inherit;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.required {
|
|
199
|
-
color: #f85149;
|
|
200
|
-
margin-left: 4px;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.tool-input {
|
|
204
|
-
background: #1e1e1e;
|
|
205
|
-
color: #cccccc;
|
|
206
|
-
border: 1px solid #3e3e42;
|
|
207
|
-
border-radius: 4px;
|
|
208
|
-
padding: 6px 10px;
|
|
209
|
-
font-size: 12px;
|
|
210
|
-
font-family: inherit;
|
|
211
|
-
outline: none;
|
|
212
|
-
transition: border-color 0.2s;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.tool-input:focus {
|
|
216
|
-
border-color: #007acc;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.tool-checkbox {
|
|
220
|
-
width: 16px;
|
|
221
|
-
height: 16px;
|
|
222
|
-
accent-color: #007acc;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.input-description {
|
|
226
|
-
font-size: 10px;
|
|
227
|
-
color: #8c8c8c;
|
|
228
|
-
font-style: italic;
|
|
229
|
-
font-family: inherit;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/* Nested Object Styles */
|
|
233
|
-
.nested-object {
|
|
234
|
-
background: #252526;
|
|
235
|
-
border: 1px solid #3e3e42;
|
|
236
|
-
border-radius: 6px;
|
|
237
|
-
padding: 12px;
|
|
238
|
-
margin-top: 8px;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.nested-object-label {
|
|
242
|
-
font-size: 12px;
|
|
243
|
-
font-weight: 600;
|
|
244
|
-
color: #ffffff;
|
|
245
|
-
margin-bottom: 12px;
|
|
246
|
-
font-family: inherit;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.nested-fields {
|
|
250
|
-
display: flex;
|
|
251
|
-
flex-direction: column;
|
|
252
|
-
gap: 12px;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.nested-field {
|
|
256
|
-
display: flex;
|
|
257
|
-
flex-direction: column;
|
|
258
|
-
gap: 6px;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.nested-label {
|
|
262
|
-
font-size: 11px;
|
|
263
|
-
font-weight: 500;
|
|
264
|
-
color: #cccccc;
|
|
265
|
-
font-family: inherit;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.no-inputs {
|
|
269
|
-
font-size: 12px;
|
|
270
|
-
color: #8c8c8c;
|
|
271
|
-
font-style: italic;
|
|
272
|
-
font-family: inherit;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.tool-actions {
|
|
276
|
-
margin-bottom: 24px;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.test-button {
|
|
280
|
-
background: #007acc;
|
|
281
|
-
color: white;
|
|
282
|
-
border: none;
|
|
283
|
-
border-radius: 6px;
|
|
284
|
-
padding: 8px 16px;
|
|
285
|
-
font-size: 12px;
|
|
286
|
-
font-weight: 500;
|
|
287
|
-
font-family: inherit;
|
|
288
|
-
cursor: pointer;
|
|
289
|
-
transition: background-color 0.2s;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.test-button:hover:not(:disabled) {
|
|
293
|
-
background: #005a9e;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.test-button:disabled {
|
|
297
|
-
background: #3e3e42;
|
|
298
|
-
color: #8c8c8c;
|
|
299
|
-
cursor: not-allowed;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.test-result {
|
|
303
|
-
background: #252526;
|
|
304
|
-
border-radius: 6px;
|
|
305
|
-
padding: 16px;
|
|
306
|
-
border: 1px solid #3e3e42;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.test-result h4 {
|
|
310
|
-
margin: 0 0 12px 0;
|
|
311
|
-
font-size: 13px;
|
|
312
|
-
font-weight: 600;
|
|
313
|
-
color: #ffffff;
|
|
314
|
-
font-family: inherit;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.result-content {
|
|
318
|
-
padding: 12px;
|
|
319
|
-
border-radius: 4px;
|
|
320
|
-
font-family: inherit;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.result-content.success {
|
|
324
|
-
background: #0d4429;
|
|
325
|
-
border: 1px solid #238636;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.result-content.error {
|
|
329
|
-
background: #5d1a1a;
|
|
330
|
-
border: 1px solid #da3633;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.result-label {
|
|
334
|
-
font-size: 12px;
|
|
335
|
-
font-weight: 600;
|
|
336
|
-
margin-bottom: 8px;
|
|
337
|
-
font-family: inherit;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.result-content.success .result-label {
|
|
341
|
-
color: #3fb950;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.result-content.error .result-label {
|
|
345
|
-
color: #f85149;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.result-data {
|
|
349
|
-
background: #1e1e1e;
|
|
350
|
-
color: #cccccc;
|
|
351
|
-
padding: 12px;
|
|
352
|
-
border-radius: 4px;
|
|
353
|
-
font-size: 10px;
|
|
354
|
-
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
355
|
-
overflow-x: auto;
|
|
356
|
-
margin: 0;
|
|
357
|
-
white-space: pre-wrap;
|
|
358
|
-
word-break: break-word;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.result-error {
|
|
362
|
-
color: #f85149;
|
|
363
|
-
font-size: 12px;
|
|
364
|
-
font-family: inherit;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
/* Responsive design */
|
|
368
|
-
@media (max-width: 768px) {
|
|
369
|
-
.tools-grid {
|
|
370
|
-
grid-template-columns: 1fr;
|
|
371
|
-
padding: 16px;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.tool-form-content {
|
|
375
|
-
padding: 16px;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
.tool-form-header {
|
|
379
|
-
padding: 12px 16px;
|
|
380
|
-
}
|
|
381
|
-
}
|