lua-cli 2.1.0-alpha.3 → 2.1.0-alpha.6

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/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  export { user, UserDataAPI } from './user-data-api.js';
3
+ export { product, ProductAPI } from './product-api.js';
package/dist/index.js CHANGED
@@ -45,3 +45,4 @@ program
45
45
  program.parse(process.argv);
46
46
  // Export user data API for use in projects
47
47
  export { user, UserDataAPI } from './user-data-api.js';
48
+ export { product, ProductAPI } from './product-api.js';
@@ -0,0 +1,48 @@
1
+ export interface Product {
2
+ id: string;
3
+ [key: string]: any;
4
+ }
5
+ export interface ProductsResponse {
6
+ success: boolean;
7
+ data: Product[];
8
+ pagination: {
9
+ currentPage: number;
10
+ totalPages: number;
11
+ totalCount: number;
12
+ limit: number;
13
+ hasNextPage: boolean;
14
+ hasPrevPage: boolean;
15
+ nextPage: number | null;
16
+ prevPage: number | null;
17
+ };
18
+ }
19
+ export interface CreateProductResponse {
20
+ updated: boolean;
21
+ isNew: boolean;
22
+ product: Product;
23
+ }
24
+ export interface UpdateProductResponse {
25
+ updated: boolean;
26
+ isNew: boolean;
27
+ product: Product;
28
+ }
29
+ export interface DeleteProductResponse {
30
+ deleted: boolean;
31
+ }
32
+ export interface SearchProductsResponse {
33
+ success: boolean;
34
+ message: string;
35
+ data: Product[];
36
+ }
37
+ export declare class ProductAPI {
38
+ products: any;
39
+ constructor();
40
+ get(page?: number, limit?: number): Promise<ProductsResponse>;
41
+ create(data: Record<string, any>): Promise<CreateProductResponse>;
42
+ update(data: Record<string, any>, productId: string): Promise<UpdateProductResponse>;
43
+ delete(productId: string): Promise<DeleteProductResponse>;
44
+ search(searchQuery: string): Promise<SearchProductsResponse>;
45
+ }
46
+ export declare const product: {
47
+ data: ProductAPI;
48
+ };
@@ -0,0 +1,27 @@
1
+ export class ProductAPI {
2
+ constructor() {
3
+ this.products = {};
4
+ }
5
+ async get(page = 1, limit = 10) {
6
+ return { success: true, data: this.products, pagination: { currentPage: page, totalPages: 1, totalCount: this.products.length, limit: limit, hasNextPage: false, hasPrevPage: false, nextPage: null, prevPage: null } };
7
+ }
8
+ async create(data) {
9
+ this.products = data;
10
+ return { updated: true, isNew: true, product: this.products };
11
+ }
12
+ async update(data, productId) {
13
+ // Update is the same as create for this API
14
+ this.products = { ...this.products, ...data };
15
+ return { updated: true, isNew: false, product: this.products };
16
+ }
17
+ async delete(productId) {
18
+ this.products = this.products.filter((product) => product.id !== productId);
19
+ return { deleted: true };
20
+ }
21
+ async search(searchQuery) {
22
+ return { success: true, message: 'Products searched successfully', data: this.products };
23
+ }
24
+ }
25
+ export const product = {
26
+ data: new ProductAPI()
27
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lua-cli",
3
- "version": "2.1.0-alpha.3",
3
+ "version": "2.1.0-alpha.6",
4
4
  "description": "Command-line interface for Lua AI platform - develop, test, and deploy LuaSkills with custom tools",
5
5
  "readmeFilename": "README.md",
6
6
  "main": "dist/index.js",
@@ -1,15 +1,13 @@
1
1
  agent:
2
- agentId: baseAgent_agent_1758705162448_cyu7ybbhx
3
- orgId: ae25d3f8-5446-4135-806f-daf4ec55d010
4
- persona: Your name is Stefan always remember that
5
- welcomeMessage: 'Hi, I am your AI assistant. How can I help you today?'
2
+ agentId: baseAgent_agent_1759165790010_cmu8t35ta
3
+ orgId: 845c77a8-88b9-4381-ba4a-fd7496ef1f57
6
4
  skills:
7
5
  - name: general-skill
8
6
  version: 0.0.2
9
- skillId: 24294a5a-bd95-4167-89b1-aebad352196a
7
+ skillId: 5d990e43-6204-43af-8246-67dedeb80c68
10
8
  - name: user-data-skill
11
9
  version: 0.0.1
12
- skillId: 5c167305-9f59-4e20-84e9-fd1b50856ec4
10
+ skillId: 457bb68a-a136-4671-9bb0-9263a262eb41
13
11
  - name: eccomerce-skill
14
12
  version: 0.0.1
15
- skillId: dbec43db-9786-4223-9eac-8087d976d22d
13
+ skillId: e1976320-2bdb-4622-bfde-fe20eabe8360