lua-cli 3.1.0-alpha.4 → 3.1.0-alpha.5

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 (97) hide show
  1. package/dist/api/cdn.api.service.d.ts +18 -0
  2. package/dist/api/cdn.api.service.js +43 -0
  3. package/dist/api/custom.data.api.service.d.ts +4 -3
  4. package/dist/api/custom.data.api.service.js +4 -3
  5. package/dist/api/developer.api.service.d.ts +54 -1
  6. package/dist/api/developer.api.service.js +89 -0
  7. package/dist/api/job.api.service.d.ts +10 -0
  8. package/dist/api/job.api.service.js +14 -0
  9. package/dist/api/lazy-instances.d.ts +8 -0
  10. package/dist/api/lazy-instances.js +16 -0
  11. package/dist/api/postprocessor.api.service.d.ts +3 -6
  12. package/dist/api/postprocessor.api.service.js +2 -3
  13. package/dist/api-exports.d.ts +74 -6
  14. package/dist/api-exports.js +87 -7
  15. package/dist/cli/command-definitions.js +34 -7
  16. package/dist/commands/admin.js +1 -1
  17. package/dist/commands/channels.js +1 -1
  18. package/dist/commands/compile.js +23 -4
  19. package/dist/commands/evals.d.ts +8 -0
  20. package/dist/commands/evals.js +41 -0
  21. package/dist/commands/index.d.ts +2 -0
  22. package/dist/commands/index.js +2 -0
  23. package/dist/commands/init.d.ts +10 -1
  24. package/dist/commands/init.js +13 -3
  25. package/dist/commands/mcp.d.ts +18 -0
  26. package/dist/commands/mcp.js +393 -0
  27. package/dist/commands/push.js +172 -14
  28. package/dist/common/data.entry.instance.d.ts +1 -1
  29. package/dist/common/data.entry.instance.js +4 -4
  30. package/dist/common/job.instance.d.ts +24 -0
  31. package/dist/common/job.instance.js +38 -0
  32. package/dist/config/constants.d.ts +1 -0
  33. package/dist/config/constants.js +1 -0
  34. package/dist/index.js +1 -0
  35. package/dist/interfaces/cdn.d.ts +24 -0
  36. package/dist/interfaces/cdn.js +5 -0
  37. package/dist/interfaces/compile.d.ts +1 -0
  38. package/dist/interfaces/custom.data.d.ts +3 -3
  39. package/dist/interfaces/index.d.ts +1 -0
  40. package/dist/interfaces/mcp.d.ts +64 -0
  41. package/dist/interfaces/mcp.js +5 -0
  42. package/dist/types/api-contracts.d.ts +36 -14
  43. package/dist/types/compile.types.d.ts +5 -0
  44. package/dist/types/index.d.ts +2 -2
  45. package/dist/types/index.js +3 -1
  46. package/dist/types/skill.d.ts +120 -13
  47. package/dist/types/skill.js +95 -5
  48. package/dist/utils/bundling.d.ts +4 -11
  49. package/dist/utils/bundling.js +19 -27
  50. package/dist/utils/compile.d.ts +17 -8
  51. package/dist/utils/compile.js +71 -37
  52. package/dist/utils/deployment.js +13 -6
  53. package/dist/utils/dev-api.js +1 -2
  54. package/dist/utils/dev-server.js +1 -1
  55. package/dist/utils/files.d.ts +8 -1
  56. package/dist/utils/files.js +13 -2
  57. package/dist/utils/init-helpers.d.ts +3 -1
  58. package/dist/utils/init-helpers.js +7 -2
  59. package/dist/utils/mcp-server-management.d.ts +23 -0
  60. package/dist/utils/mcp-server-management.js +212 -0
  61. package/dist/utils/sandbox.d.ts +4 -2
  62. package/dist/utils/sandbox.js +22 -3
  63. package/dist/web/app.css +1505 -14
  64. package/dist/web/app.js +79 -64
  65. package/package.json +2 -6
  66. package/template/QUICKSTART.md +57 -761
  67. package/template/README.md +80 -906
  68. package/template/examples/README.md +106 -0
  69. package/template/{src → examples}/jobs/AbandonedBasketProcessorJob.ts +67 -11
  70. package/template/{src → examples}/postprocessors/modifyResponse.ts +3 -3
  71. package/template/{src → examples}/skills/tools/GameScoreTrackerTool.ts +11 -15
  72. package/template/{src → examples}/skills/tools/OrderTool.ts +25 -0
  73. package/template/examples/skills/tools/PremiumFeatureTool.ts +98 -0
  74. package/template/{src → examples}/skills/tools/UserDataTool.ts +34 -0
  75. package/template/examples/webhooks/FileUploadWebhook.ts +86 -0
  76. package/template/package-lock.json +7895 -0
  77. package/template/package.json +1 -1
  78. package/template/src/index.ts +40 -22
  79. /package/template/{src → examples}/jobs/DailyCleanupJob.ts +0 -0
  80. /package/template/{src → examples}/jobs/DataMigrationJob.ts +0 -0
  81. /package/template/{src → examples}/jobs/HealthCheckJob.ts +0 -0
  82. /package/template/{src → examples}/preprocessors/messageMatching.ts +0 -0
  83. /package/template/{src → examples}/services/ApiService.ts +0 -0
  84. /package/template/{src → examples}/services/GetWeather.ts +0 -0
  85. /package/template/{src → examples}/skills/basket.skill.ts +0 -0
  86. /package/template/{src → examples}/skills/product.skill.ts +0 -0
  87. /package/template/{src → examples}/skills/tools/BasketTool.ts +0 -0
  88. /package/template/{src → examples}/skills/tools/CreateInlineJob.ts +0 -0
  89. /package/template/{src → examples}/skills/tools/CreatePostTool.ts +0 -0
  90. /package/template/{src → examples}/skills/tools/CustomDataTool.ts +0 -0
  91. /package/template/{src → examples}/skills/tools/GetWeatherTool.ts +0 -0
  92. /package/template/{src → examples}/skills/tools/PaymentTool.ts +0 -0
  93. /package/template/{src → examples}/skills/tools/ProductsTool.ts +0 -0
  94. /package/template/{src → examples}/skills/tools/SmartBasketTool.ts +0 -0
  95. /package/template/{src → examples}/skills/user.skill.ts +0 -0
  96. /package/template/{src → examples}/webhooks/PaymentWebhook.ts +0 -0
  97. /package/template/{src → examples}/webhooks/UserEventWebhook.ts +0 -0
@@ -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.3",
23
+ "lua-cli": "^3.1.0-alpha.5",
24
24
  "openai": "^5.23.0",
25
25
  "uuid": "^13.0.0",
26
26
  "zod": "^3.24.1"
@@ -1,31 +1,49 @@
1
1
  import { LuaAgent } from "lua-cli";
2
- import userSkill from "./skills/user.skill";
3
- import productSkill from "./skills/product.skill";
4
- import basketSkill from "./skills/basket.skill";
5
- import userEventWebhook from "./webhooks/UserEventWebhook";
6
- import healthCheckJob from "./jobs/HealthCheckJob";
7
- import messageMatchingPreProcessor from "./preprocessors/messageMatching";
8
- import modifyResponsePostProcessor from "./postprocessors/modifyResponse";
9
2
 
3
+ /**
4
+ * Your Lua AI Agent
5
+ *
6
+ * This is a minimal agent ready for you to customize.
7
+ * Add skills, webhooks, jobs, and processors as needed.
8
+ *
9
+ * Quick start:
10
+ * 1. Create a tool in src/skills/tools/MyTool.ts
11
+ * 2. Create a skill in src/skills/my.skill.ts
12
+ * 3. Import and add it to the skills array below
13
+ * 4. Run `lua test` to test your tool
14
+ * 5. Run `lua chat` to chat with your agent
15
+ *
16
+ * Need examples? Run `lua init --with-examples` in a new project
17
+ * or see: https://docs.heylua.ai/examples
18
+ */
10
19
  const agent = new LuaAgent({
11
- name: ``,
12
- persona: ``,
13
- skills: [ userSkill, productSkill, basketSkill ],
14
- webhooks: [ userEventWebhook ],
15
- jobs: [ healthCheckJob ],
16
- preProcessors: [ messageMatchingPreProcessor ],
17
- postProcessors: [ modifyResponsePostProcessor ]
20
+ name: ``, // Set during lua init
21
+ persona: ``, // Set during lua init
22
+
23
+ // Add your skills here
24
+ skills: [],
25
+
26
+ // Optional: Add webhooks for external integrations
27
+ // webhooks: [],
28
+
29
+ // Optional: Add scheduled jobs
30
+ // jobs: [],
31
+
32
+ // Optional: Add message preprocessors
33
+ // preProcessors: [],
34
+
35
+ // Optional: Add response postprocessors
36
+ // postProcessors: [],
18
37
  });
19
38
 
20
-
21
39
  async function main() {
22
- try {
23
-
24
- } catch (error) {
25
- console.error("💥 Unexpected error:", error);
26
- process.exit(1);
27
- }
40
+ // Your agent is ready!
41
+ //
42
+ // Next steps:
43
+ // 1. Create your first skill with tools
44
+ // 2. Run `lua test` to test tools interactively
45
+ // 3. Run `lua chat` to chat with your agent
46
+ // 4. Run `lua push` to deploy
28
47
  }
29
48
 
30
49
  main().catch(console.error);
31
-
File without changes