lua-cli 2.5.8 → 3.0.0-alpha.1

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 (98) hide show
  1. package/dist/api/job.api.service.d.ts +210 -0
  2. package/dist/api/job.api.service.js +200 -0
  3. package/dist/api/lazy-instances.d.ts +24 -0
  4. package/dist/api/lazy-instances.js +48 -0
  5. package/dist/api/postprocessor.api.service.d.ts +98 -0
  6. package/dist/api/postprocessor.api.service.js +76 -0
  7. package/dist/api/preprocessor.api.service.d.ts +98 -0
  8. package/dist/api/preprocessor.api.service.js +76 -0
  9. package/dist/api/user.data.api.service.d.ts +13 -0
  10. package/dist/api/user.data.api.service.js +20 -0
  11. package/dist/api/webhook.api.service.d.ts +151 -0
  12. package/dist/api/webhook.api.service.js +134 -0
  13. package/dist/api-exports.d.ts +156 -41
  14. package/dist/api-exports.js +182 -21
  15. package/dist/cli/command-definitions.js +75 -5
  16. package/dist/commands/compile.js +124 -5
  17. package/dist/commands/index.d.ts +4 -0
  18. package/dist/commands/index.js +4 -0
  19. package/dist/commands/init.js +53 -7
  20. package/dist/commands/jobs.d.ts +20 -0
  21. package/dist/commands/jobs.js +533 -0
  22. package/dist/commands/logs.js +2 -5
  23. package/dist/commands/postprocessors.d.ts +8 -0
  24. package/dist/commands/postprocessors.js +431 -0
  25. package/dist/commands/preprocessors.d.ts +8 -0
  26. package/dist/commands/preprocessors.js +431 -0
  27. package/dist/commands/push.js +684 -5
  28. package/dist/commands/test.d.ts +9 -18
  29. package/dist/commands/test.js +558 -82
  30. package/dist/commands/webhooks.d.ts +18 -0
  31. package/dist/commands/webhooks.js +424 -0
  32. package/dist/common/job.instance.d.ts +77 -0
  33. package/dist/common/job.instance.js +108 -0
  34. package/dist/common/user.instance.d.ts +1 -0
  35. package/dist/common/user.instance.js +9 -0
  36. package/dist/config/constants.d.ts +2 -2
  37. package/dist/config/constants.js +4 -4
  38. package/dist/interfaces/agent.d.ts +2 -1
  39. package/dist/interfaces/chat.d.ts +22 -0
  40. package/dist/interfaces/index.d.ts +10 -0
  41. package/dist/interfaces/index.js +7 -0
  42. package/dist/interfaces/jobs.d.ts +172 -0
  43. package/dist/interfaces/jobs.js +5 -0
  44. package/dist/interfaces/postprocessors.d.ts +35 -0
  45. package/dist/interfaces/postprocessors.js +4 -0
  46. package/dist/interfaces/preprocessors.d.ts +35 -0
  47. package/dist/interfaces/preprocessors.js +4 -0
  48. package/dist/interfaces/webhooks.d.ts +104 -0
  49. package/dist/interfaces/webhooks.js +5 -0
  50. package/dist/types/api-contracts.d.ts +5 -0
  51. package/dist/types/compile.types.d.ts +49 -0
  52. package/dist/types/index.d.ts +1 -1
  53. package/dist/types/index.js +1 -1
  54. package/dist/types/skill.d.ts +502 -0
  55. package/dist/types/skill.js +477 -0
  56. package/dist/utils/agent-management.d.ts +25 -0
  57. package/dist/utils/agent-management.js +67 -0
  58. package/dist/utils/bundling.d.ts +31 -1
  59. package/dist/utils/bundling.js +653 -10
  60. package/dist/utils/compile.d.ts +63 -0
  61. package/dist/utils/compile.js +691 -36
  62. package/dist/utils/deployment.d.ts +2 -1
  63. package/dist/utils/deployment.js +16 -2
  64. package/dist/utils/init-agent.d.ts +3 -1
  65. package/dist/utils/init-agent.js +6 -4
  66. package/dist/utils/init-prompts.d.ts +2 -1
  67. package/dist/utils/init-prompts.js +14 -9
  68. package/dist/utils/job-management.d.ts +24 -0
  69. package/dist/utils/job-management.js +264 -0
  70. package/dist/utils/postprocessor-management.d.ts +9 -0
  71. package/dist/utils/postprocessor-management.js +118 -0
  72. package/dist/utils/preprocessor-management.d.ts +9 -0
  73. package/dist/utils/preprocessor-management.js +118 -0
  74. package/dist/utils/sandbox.d.ts +61 -1
  75. package/dist/utils/sandbox.js +283 -72
  76. package/dist/utils/tool-detection.d.ts +3 -2
  77. package/dist/utils/tool-detection.js +18 -4
  78. package/dist/utils/webhook-management.d.ts +24 -0
  79. package/dist/utils/webhook-management.js +256 -0
  80. package/package.json +1 -1
  81. package/template/AGENT_CONFIGURATION.md +251 -0
  82. package/template/COMPLEX_JOB_EXAMPLES.md +795 -0
  83. package/template/DYNAMIC_JOB_CREATION.md +371 -0
  84. package/template/README.md +30 -2
  85. package/template/WEBHOOKS_JOBS_QUICKSTART.md +318 -0
  86. package/template/WEBHOOK_JOB_EXAMPLES.md +817 -0
  87. package/template/src/index-agent-example.ts +201 -0
  88. package/template/src/index.ts +39 -0
  89. package/template/src/jobs/AbandonedBasketProcessorJob.ts +139 -0
  90. package/template/src/jobs/DailyCleanupJob.ts +100 -0
  91. package/template/src/jobs/DataMigrationJob.ts +133 -0
  92. package/template/src/jobs/HealthCheckJob.ts +87 -0
  93. package/template/src/postprocessors/ResponseFormatter.ts +151 -0
  94. package/template/src/preprocessors/MessageFilter.ts +91 -0
  95. package/template/src/tools/GameScoreTrackerTool.ts +356 -0
  96. package/template/src/tools/SmartBasketTool.ts +188 -0
  97. package/template/src/webhooks/PaymentWebhook.ts +113 -0
  98. package/template/src/webhooks/UserEventWebhook.ts +77 -0
@@ -35,3 +35,66 @@ export declare function extractToolFromNewExpressionSync(newExpr: any, project:
35
35
  * Extracts skills metadata from index file
36
36
  */
37
37
  export declare function extractSkillsMetadata(indexFile: any): any[];
38
+ /**
39
+ * Extracts webhooks metadata from index file
40
+ */
41
+ export declare function extractWebhooksMetadata(indexFile: any): any[];
42
+ /**
43
+ * Extracts jobs metadata from index file
44
+ */
45
+ export declare function extractJobsMetadata(indexFile: any): any[];
46
+ /**
47
+ * Extracts preprocessors metadata from index file
48
+ */
49
+ export declare function extractPreProcessorsMetadata(indexFile: any): any[];
50
+ /**
51
+ * Extracts postprocessors metadata from index file
52
+ */
53
+ export declare function extractPostProcessorsMetadata(indexFile: any): any[];
54
+ /**
55
+ * Extracts LuaAgent metadata from index file.
56
+ * Returns the unified agent configuration if found, otherwise null.
57
+ * This function looks for either:
58
+ * - A LuaAgent constructor call: new LuaAgent({ ... })
59
+ * - A variable assigned to LuaAgent: const agent = new LuaAgent({ ... })
60
+ */
61
+ export declare function extractLuaAgentMetadata(indexFile: any): {
62
+ name: string;
63
+ persona: string;
64
+ welcomeMessage?: string;
65
+ skills: any[];
66
+ webhooks: any[];
67
+ jobs: any[];
68
+ preProcessors: any[];
69
+ postProcessors: any[];
70
+ } | null;
71
+ /**
72
+ * Gets the file paths where skills are defined in a LuaAgent.
73
+ * This is used to scan those files for tools.
74
+ * Returns deduplicated file paths.
75
+ *
76
+ * @param agentMetadata - Agent metadata from extractLuaAgentMetadata
77
+ * @param indexFile - The index source file
78
+ * @returns Array of unique file paths where skills are defined
79
+ */
80
+ export declare function getSkillFilePaths(agentMetadata: {
81
+ skills: any[];
82
+ }, indexFile: any): string[];
83
+ /**
84
+ * Resolves references in LuaAgent metadata to actual definitions.
85
+ * When a LuaAgent contains references like `skills: [userSkill]`, this function
86
+ * finds where `userSkill` is defined and extracts its metadata.
87
+ */
88
+ export declare function resolveLuaAgentReferences(agentMetadata: {
89
+ skills: any[];
90
+ webhooks: any[];
91
+ jobs: any[];
92
+ preProcessors: any[];
93
+ postProcessors: any[];
94
+ }, indexFile: any, project: Project): {
95
+ skills: any[];
96
+ webhooks: any[];
97
+ jobs: any[];
98
+ preProcessors: any[];
99
+ postProcessors: any[];
100
+ };