lua-cli 3.0.2 → 3.0.3

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.
@@ -18,7 +18,7 @@ export default class UserDataApi extends HttpClient implements UserDataAPI {
18
18
  * @returns Promise resolving to a UserDataInstance containing the user's data
19
19
  * @throws Error if the user data cannot be retrieved or the request fails
20
20
  */
21
- get(): Promise<UserDataInstance>;
21
+ get(userId?: string): Promise<UserDataInstance>;
22
22
  /**
23
23
  * Updates the current user's data for the specific agent
24
24
  * @param data - The data object containing fields to update or add to user data
@@ -18,8 +18,12 @@ export default class UserDataApi extends HttpClient {
18
18
  * @returns Promise resolving to a UserDataInstance containing the user's data
19
19
  * @throws Error if the user data cannot be retrieved or the request fails
20
20
  */
21
- async get() {
22
- const response = await this.httpGet(`/developer/user/data/agent/${this.agentId}`, {
21
+ async get(userId) {
22
+ let url = `/developer/user/data/agent/${this.agentId}`;
23
+ if (userId) {
24
+ url += `/user/${userId}`;
25
+ }
26
+ const response = await this.httpGet(url, {
23
27
  Authorization: `Bearer ${this.apiKey}`,
24
28
  });
25
29
  if (!response.success) {
@@ -46,7 +46,7 @@ export declare const User: {
46
46
  *
47
47
  * @returns Promise resolving to user data
48
48
  */
49
- get(): Promise<UserDataInstance>;
49
+ get(userId?: string): Promise<UserDataInstance>;
50
50
  /**
51
51
  * Gets the chat history for the current user.
52
52
  *
@@ -42,9 +42,9 @@ export const User = {
42
42
  *
43
43
  * @returns Promise resolving to user data
44
44
  */
45
- async get() {
45
+ async get(userId) {
46
46
  const instance = await getUserInstance();
47
- return instance.get();
47
+ return instance.get(userId);
48
48
  },
49
49
  /**
50
50
  * Gets the chat history for the current user.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lua-cli",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
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",
@@ -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.0.2",
23
+ "lua-cli": "^3.0.3",
24
24
  "openai": "^5.23.0",
25
25
  "uuid": "^13.0.0",
26
26
  "zod": "^3.24.1"