lua-cli 2.5.7 → 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.
- package/dist/api/agent.api.service.d.ts +45 -0
- package/dist/api/agent.api.service.js +54 -0
- package/dist/api/job.api.service.d.ts +210 -0
- package/dist/api/job.api.service.js +200 -0
- package/dist/api/lazy-instances.d.ts +24 -0
- package/dist/api/lazy-instances.js +48 -0
- package/dist/api/postprocessor.api.service.d.ts +98 -0
- package/dist/api/postprocessor.api.service.js +76 -0
- package/dist/api/preprocessor.api.service.d.ts +98 -0
- package/dist/api/preprocessor.api.service.js +76 -0
- package/dist/api/user.data.api.service.d.ts +28 -0
- package/dist/api/user.data.api.service.js +51 -0
- package/dist/api/webhook.api.service.d.ts +151 -0
- package/dist/api/webhook.api.service.js +134 -0
- package/dist/api-exports.d.ts +156 -41
- package/dist/api-exports.js +182 -21
- package/dist/cli/command-definitions.js +149 -7
- package/dist/commands/compile.js +124 -5
- package/dist/commands/completion.d.ts +11 -0
- package/dist/commands/completion.js +209 -0
- package/dist/commands/env.d.ts +3 -2
- package/dist/commands/env.js +42 -17
- package/dist/commands/features.d.ts +16 -0
- package/dist/commands/features.js +352 -0
- package/dist/commands/index.d.ts +7 -0
- package/dist/commands/index.js +7 -0
- package/dist/commands/init.js +53 -7
- package/dist/commands/jobs.d.ts +20 -0
- package/dist/commands/jobs.js +533 -0
- package/dist/commands/logs.js +2 -5
- package/dist/commands/persona.d.ts +3 -2
- package/dist/commands/persona.js +43 -18
- package/dist/commands/postprocessors.d.ts +8 -0
- package/dist/commands/postprocessors.js +431 -0
- package/dist/commands/preprocessors.d.ts +8 -0
- package/dist/commands/preprocessors.js +431 -0
- package/dist/commands/push.d.ts +9 -13
- package/dist/commands/push.js +937 -69
- package/dist/commands/skills.d.ts +16 -0
- package/dist/commands/skills.js +438 -0
- package/dist/commands/test.d.ts +9 -18
- package/dist/commands/test.js +558 -82
- package/dist/commands/webhooks.d.ts +18 -0
- package/dist/commands/webhooks.js +424 -0
- package/dist/common/data.entry.instance.d.ts +7 -0
- package/dist/common/data.entry.instance.js +15 -0
- package/dist/common/job.instance.d.ts +77 -0
- package/dist/common/job.instance.js +108 -0
- package/dist/common/order.instance.d.ts +6 -0
- package/dist/common/order.instance.js +14 -0
- package/dist/common/product.instance.d.ts +6 -0
- package/dist/common/product.instance.js +14 -0
- package/dist/common/user.instance.d.ts +15 -0
- package/dist/common/user.instance.js +38 -0
- package/dist/config/constants.d.ts +2 -2
- package/dist/config/constants.js +4 -4
- package/dist/index.js +14 -3
- package/dist/interfaces/agent.d.ts +33 -1
- package/dist/interfaces/chat.d.ts +22 -0
- package/dist/interfaces/index.d.ts +10 -0
- package/dist/interfaces/index.js +7 -0
- package/dist/interfaces/jobs.d.ts +172 -0
- package/dist/interfaces/jobs.js +5 -0
- package/dist/interfaces/message.d.ts +18 -0
- package/dist/interfaces/message.js +1 -0
- package/dist/interfaces/postprocessors.d.ts +35 -0
- package/dist/interfaces/postprocessors.js +4 -0
- package/dist/interfaces/preprocessors.d.ts +35 -0
- package/dist/interfaces/preprocessors.js +4 -0
- package/dist/interfaces/webhooks.d.ts +104 -0
- package/dist/interfaces/webhooks.js +5 -0
- package/dist/types/api-contracts.d.ts +14 -0
- package/dist/types/api-contracts.js +0 -7
- package/dist/types/compile.types.d.ts +49 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/skill.d.ts +502 -0
- package/dist/types/skill.js +477 -0
- package/dist/utils/agent-management.d.ts +25 -0
- package/dist/utils/agent-management.js +67 -0
- package/dist/utils/bundling.d.ts +31 -1
- package/dist/utils/bundling.js +653 -10
- package/dist/utils/compile.d.ts +63 -0
- package/dist/utils/compile.js +691 -36
- package/dist/utils/deployment.d.ts +2 -1
- package/dist/utils/deployment.js +16 -2
- package/dist/utils/init-agent.d.ts +3 -1
- package/dist/utils/init-agent.js +6 -4
- package/dist/utils/init-prompts.d.ts +2 -1
- package/dist/utils/init-prompts.js +14 -9
- package/dist/utils/job-management.d.ts +24 -0
- package/dist/utils/job-management.js +264 -0
- package/dist/utils/postprocessor-management.d.ts +9 -0
- package/dist/utils/postprocessor-management.js +118 -0
- package/dist/utils/preprocessor-management.d.ts +9 -0
- package/dist/utils/preprocessor-management.js +118 -0
- package/dist/utils/sandbox.d.ts +61 -1
- package/dist/utils/sandbox.js +283 -72
- package/dist/utils/tool-detection.d.ts +3 -2
- package/dist/utils/tool-detection.js +18 -4
- package/dist/utils/webhook-management.d.ts +24 -0
- package/dist/utils/webhook-management.js +256 -0
- package/dist/web/app.css +152 -736
- package/dist/web/app.js +45 -45
- package/package.json +2 -2
- package/template/AGENT_CONFIGURATION.md +251 -0
- package/template/COMPLEX_JOB_EXAMPLES.md +795 -0
- package/template/DYNAMIC_JOB_CREATION.md +371 -0
- package/template/README.md +30 -2
- package/template/WEBHOOKS_JOBS_QUICKSTART.md +318 -0
- package/template/WEBHOOK_JOB_EXAMPLES.md +817 -0
- package/template/package.json +1 -1
- package/template/src/index-agent-example.ts +201 -0
- package/template/src/index.ts +39 -0
- package/template/src/jobs/AbandonedBasketProcessorJob.ts +139 -0
- package/template/src/jobs/DailyCleanupJob.ts +100 -0
- package/template/src/jobs/DataMigrationJob.ts +133 -0
- package/template/src/jobs/HealthCheckJob.ts +87 -0
- package/template/src/postprocessors/ResponseFormatter.ts +151 -0
- package/template/src/preprocessors/MessageFilter.ts +91 -0
- package/template/src/tools/GameScoreTrackerTool.ts +356 -0
- package/template/src/tools/SmartBasketTool.ts +188 -0
- package/template/src/webhooks/PaymentWebhook.ts +113 -0
- package/template/src/webhooks/UserEventWebhook.ts +77 -0
package/dist/utils/compile.d.ts
CHANGED
|
@@ -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
|
+
};
|