lua-cli 3.5.0-alpha.3 → 3.5.0-beta.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/README.md +137 -689
- package/dist/api/agent.api.service.d.ts +1 -8
- package/dist/api/agent.api.service.js +1 -11
- package/dist/api/agent.api.service.js.map +1 -1
- package/dist/api/auth.api.service.d.ts +1 -1
- package/dist/api/auth.api.service.js +1 -1
- package/dist/api/auth.api.service.js.map +1 -1
- package/dist/api/backup.api.service.d.ts +80 -0
- package/dist/api/backup.api.service.js +101 -0
- package/dist/api/backup.api.service.js.map +1 -0
- package/dist/api/basket.api.service.d.ts +4 -5
- package/dist/api/basket.api.service.js +13 -18
- package/dist/api/basket.api.service.js.map +1 -1
- package/dist/api/cdn.api.service.d.ts +2 -0
- package/dist/api/cdn.api.service.js +2 -0
- package/dist/api/cdn.api.service.js.map +1 -1
- package/dist/api/chat.api.service.d.ts +10 -2
- package/dist/api/chat.api.service.js +21 -2
- package/dist/api/chat.api.service.js.map +1 -1
- package/dist/api/credentials.js +5 -8
- package/dist/api/credentials.js.map +1 -1
- package/dist/api/custom.data.api.service.d.ts +3 -3
- package/dist/api/custom.data.api.service.js +9 -10
- package/dist/api/custom.data.api.service.js.map +1 -1
- package/dist/api/developer.api.service.d.ts +1 -1
- package/dist/api/developer.api.service.js +1 -1
- package/dist/api/developer.api.service.js.map +1 -1
- package/dist/api/http.client.js.map +1 -0
- package/dist/api/job.api.service.d.ts +2 -2
- package/dist/api/job.api.service.js +2 -2
- package/dist/api/job.api.service.js.map +1 -1
- package/dist/api/logs.api.service.d.ts +1 -1
- package/dist/api/logs.api.service.js +1 -1
- package/dist/api/logs.api.service.js.map +1 -1
- package/dist/api/marketplace.api.service.d.ts +6 -6
- package/dist/api/marketplace.api.service.js.map +1 -1
- package/dist/api/order.api.service.d.ts +3 -4
- package/dist/api/order.api.service.js +8 -10
- package/dist/api/order.api.service.js.map +1 -1
- package/dist/api/persona.api.service.d.ts +1 -1
- package/dist/api/persona.api.service.js +1 -1
- package/dist/api/persona.api.service.js.map +1 -1
- package/dist/api/postprocessor.api.service.d.ts +1 -1
- package/dist/api/postprocessor.api.service.js +1 -1
- package/dist/api/postprocessor.api.service.js.map +1 -1
- package/dist/api/preprocessor.api.service.d.ts +1 -1
- package/dist/api/preprocessor.api.service.js +1 -1
- package/dist/api/preprocessor.api.service.js.map +1 -1
- package/dist/api/products.api.service.d.ts +4 -4
- package/dist/api/products.api.service.js +6 -6
- package/dist/api/products.api.service.js.map +1 -1
- package/dist/api/resource.api.service.d.ts +76 -0
- package/dist/api/resource.api.service.js +74 -0
- package/dist/api/resource.api.service.js.map +1 -0
- package/dist/api/skills.api.service.d.ts +7 -15
- package/dist/api/skills.api.service.js +1 -1
- package/dist/api/skills.api.service.js.map +1 -1
- package/dist/api/tool.api.service.d.ts +1 -1
- package/dist/api/tool.api.service.js +1 -1
- package/dist/api/tool.api.service.js.map +1 -1
- package/dist/api/unifiedto.api.service.d.ts +1 -1
- package/dist/api/unifiedto.api.service.js +1 -1
- package/dist/api/unifiedto.api.service.js.map +1 -1
- package/dist/api/user.data.api.service.d.ts +7 -8
- package/dist/api/user.data.api.service.js +2 -3
- package/dist/api/user.data.api.service.js.map +1 -1
- package/dist/api/webhook.api.service.d.ts +1 -1
- package/dist/api/webhook.api.service.js +1 -1
- package/dist/api/webhook.api.service.js.map +1 -1
- package/dist/api/whatsapp-templates.api.service.d.ts +1 -1
- package/dist/api/whatsapp-templates.api.service.js +1 -1
- package/dist/api/whatsapp-templates.api.service.js.map +1 -1
- package/dist/api-exports.d.ts +14 -12
- package/dist/api-exports.js +8 -8
- package/dist/api-exports.js.map +1 -1
- package/dist/cli/command-definitions.js +32 -17
- package/dist/cli/command-definitions.js.map +1 -1
- package/dist/commands/admin.js +3 -24
- package/dist/commands/admin.js.map +1 -1
- package/dist/commands/agents.d.ts +8 -7
- package/dist/commands/agents.js +63 -21
- package/dist/commands/agents.js.map +1 -1
- package/dist/commands/channels.js +11 -23
- package/dist/commands/channels.js.map +1 -1
- package/dist/commands/chat.js +33 -47
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/chatClear.js +11 -41
- package/dist/commands/chatClear.js.map +1 -1
- package/dist/commands/compile.d.ts +26 -23
- package/dist/commands/compile.js +98 -403
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/completion.js +1 -1
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/deploy.js +55 -25
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.js +29 -45
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/env.js +12 -25
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/evals.js +3 -20
- package/dist/commands/evals.js.map +1 -1
- package/dist/commands/features.js +10 -23
- package/dist/commands/features.js.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.js +1 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +135 -19
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/integrations.js +26 -37
- package/dist/commands/integrations.js.map +1 -1
- package/dist/commands/jobs.js +32 -56
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/logs.js +9 -20
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/marketplace.js +34 -52
- package/dist/commands/marketplace.js.map +1 -1
- package/dist/commands/mcp.js +10 -23
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/persona.js +43 -74
- package/dist/commands/persona.js.map +1 -1
- package/dist/commands/postprocessors.js +15 -28
- package/dist/commands/postprocessors.js.map +1 -1
- package/dist/commands/preprocessors.js +15 -28
- package/dist/commands/preprocessors.js.map +1 -1
- package/dist/commands/production.js +30 -63
- package/dist/commands/production.js.map +1 -1
- package/dist/commands/push.js +294 -1241
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/pushBackup.d.ts +22 -0
- package/dist/commands/pushBackup.js +133 -0
- package/dist/commands/pushBackup.js.map +1 -0
- package/dist/commands/resources.js +29 -72
- package/dist/commands/resources.js.map +1 -1
- package/dist/commands/skills.d.ts +1 -1
- package/dist/commands/skills.js +58 -70
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/sync.d.ts +1 -3
- package/dist/commands/sync.js +12 -24
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/test.js +135 -104
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/webhooks.js +15 -28
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/compiler/agent-traverser.d.ts +104 -0
- package/dist/compiler/agent-traverser.js +311 -0
- package/dist/compiler/agent-traverser.js.map +1 -0
- package/dist/compiler/bundler.d.ts +42 -0
- package/dist/compiler/bundler.js +187 -0
- package/dist/compiler/bundler.js.map +1 -0
- package/dist/compiler/compiler.d.ts +177 -0
- package/dist/compiler/compiler.js +580 -0
- package/dist/compiler/compiler.js.map +1 -0
- package/dist/compiler/index.d.ts +36 -0
- package/dist/compiler/index.js +42 -0
- package/dist/compiler/index.js.map +1 -0
- package/dist/compiler/plugins/base.d.ts +264 -0
- package/dist/compiler/plugins/base.js +307 -0
- package/dist/compiler/plugins/base.js.map +1 -0
- package/dist/compiler/plugins/job.plugin.d.ts +33 -0
- package/dist/compiler/plugins/job.plugin.js +143 -0
- package/dist/compiler/plugins/job.plugin.js.map +1 -0
- package/dist/compiler/plugins/mcp-server.plugin.d.ts +50 -0
- package/dist/compiler/plugins/mcp-server.plugin.js +186 -0
- package/dist/compiler/plugins/mcp-server.plugin.js.map +1 -0
- package/dist/compiler/plugins/postprocessor.plugin.d.ts +20 -0
- package/dist/compiler/plugins/postprocessor.plugin.js +39 -0
- package/dist/compiler/plugins/postprocessor.plugin.js.map +1 -0
- package/dist/compiler/plugins/preprocessor.plugin.d.ts +20 -0
- package/dist/compiler/plugins/preprocessor.plugin.js +48 -0
- package/dist/compiler/plugins/preprocessor.plugin.js.map +1 -0
- package/dist/compiler/plugins/processor-base.d.ts +16 -0
- package/dist/compiler/plugins/processor-base.js +34 -0
- package/dist/compiler/plugins/processor-base.js.map +1 -0
- package/dist/compiler/plugins/registry.d.ts +61 -0
- package/dist/compiler/plugins/registry.js +107 -0
- package/dist/compiler/plugins/registry.js.map +1 -0
- package/dist/compiler/plugins/skill.plugin.d.ts +71 -0
- package/dist/compiler/plugins/skill.plugin.js +243 -0
- package/dist/compiler/plugins/skill.plugin.js.map +1 -0
- package/dist/compiler/plugins/tool.plugin.d.ts +67 -0
- package/dist/compiler/plugins/tool.plugin.js +279 -0
- package/dist/compiler/plugins/tool.plugin.js.map +1 -0
- package/dist/compiler/plugins/webhook.plugin.d.ts +37 -0
- package/dist/compiler/plugins/webhook.plugin.js +127 -0
- package/dist/compiler/plugins/webhook.plugin.js.map +1 -0
- package/dist/compiler/source-writer.d.ts +98 -0
- package/dist/compiler/source-writer.js +223 -0
- package/dist/compiler/source-writer.js.map +1 -0
- package/dist/compiler/types.d.ts +289 -0
- package/dist/compiler/types.js +20 -0
- package/dist/compiler/types.js.map +1 -0
- package/dist/compiler/utils/ast-helpers.d.ts +57 -0
- package/dist/compiler/utils/ast-helpers.js +164 -0
- package/dist/compiler/utils/ast-helpers.js.map +1 -0
- package/dist/compiler/utils/common.d.ts +23 -0
- package/dist/compiler/utils/common.js +66 -0
- package/dist/compiler/utils/common.js.map +1 -0
- package/dist/compiler/utils/file-discovery.d.ts +34 -0
- package/dist/compiler/utils/file-discovery.js +68 -0
- package/dist/compiler/utils/file-discovery.js.map +1 -0
- package/dist/compiler/utils/path-resolver.d.ts +25 -0
- package/dist/compiler/utils/path-resolver.js +66 -0
- package/dist/compiler/utils/path-resolver.js.map +1 -0
- package/dist/compiler/utils/schema-converter.d.ts +26 -0
- package/dist/compiler/utils/schema-converter.js +94 -0
- package/dist/compiler/utils/schema-converter.js.map +1 -0
- package/dist/config/compile.constants.d.ts +2 -22
- package/dist/config/compile.constants.js +2 -49
- package/dist/config/compile.constants.js.map +1 -1
- package/dist/config/constants.d.ts +18 -2
- package/dist/config/constants.js +28 -8
- package/dist/config/constants.js.map +1 -1
- package/dist/config/dev.constants.d.ts +0 -10
- package/dist/config/dev.constants.js +0 -10
- package/dist/config/dev.constants.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/instances/basket.instance.js.map +1 -0
- package/dist/instances/data.entry.instance.js.map +1 -0
- package/dist/instances/job.instance.js.map +1 -0
- package/dist/instances/order.instance.js.map +1 -0
- package/dist/instances/product.instance.js.map +1 -0
- package/dist/instances/product.pagination.instance.js.map +1 -0
- package/dist/instances/product.search.instance.js.map +1 -0
- package/dist/instances/user.instance.js.map +1 -0
- package/dist/interfaces/admin.d.ts +0 -38
- package/dist/interfaces/backup.d.ts +125 -0
- package/dist/interfaces/backup.js +8 -0
- package/dist/interfaces/backup.js.map +1 -0
- package/dist/interfaces/baskets.d.ts +0 -56
- package/dist/interfaces/common.d.ts +1 -0
- package/dist/interfaces/deploy.d.ts +0 -15
- package/dist/interfaces/index.d.ts +1 -1
- package/dist/interfaces/marketplace.d.ts +51 -0
- package/dist/interfaces/marketplace.js +1 -1
- package/dist/interfaces/marketplace.js.map +1 -1
- package/dist/interfaces/message.d.ts +0 -3
- package/dist/interfaces/orders.d.ts +0 -24
- package/dist/interfaces/postprocessors.d.ts +0 -18
- package/dist/interfaces/preprocessors.d.ts +0 -18
- package/dist/interfaces/skills.d.ts +61 -0
- package/dist/interfaces/user.d.ts +25 -0
- package/dist/interfaces/webhooks.d.ts +0 -9
- package/dist/primitives/base.handler.d.ts +106 -0
- package/dist/primitives/base.handler.js +370 -0
- package/dist/primitives/base.handler.js.map +1 -0
- package/dist/primitives/index.d.ts +47 -0
- package/dist/primitives/index.js +78 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/primitives/job.handler.d.ts +52 -0
- package/dist/primitives/job.handler.js +118 -0
- package/dist/primitives/job.handler.js.map +1 -0
- package/dist/primitives/mcp-server.handler.d.ts +54 -0
- package/dist/primitives/mcp-server.handler.js +91 -0
- package/dist/primitives/mcp-server.handler.js.map +1 -0
- package/dist/primitives/postprocessor.handler.d.ts +49 -0
- package/dist/primitives/postprocessor.handler.js +81 -0
- package/dist/primitives/postprocessor.handler.js.map +1 -0
- package/dist/primitives/preprocessor.handler.d.ts +54 -0
- package/dist/primitives/preprocessor.handler.js +95 -0
- package/dist/primitives/preprocessor.handler.js.map +1 -0
- package/dist/primitives/skill.handler.d.ts +44 -0
- package/dist/primitives/skill.handler.js +192 -0
- package/dist/primitives/skill.handler.js.map +1 -0
- package/dist/primitives/types.d.ts +72 -0
- package/dist/primitives/types.js +17 -0
- package/dist/primitives/types.js.map +1 -0
- package/dist/primitives/webhook.handler.d.ts +50 -0
- package/dist/primitives/webhook.handler.js +96 -0
- package/dist/primitives/webhook.handler.js.map +1 -0
- package/dist/services/auth.js +1 -2
- package/dist/services/auth.js.map +1 -1
- package/dist/services/sandbox.service.d.ts +103 -0
- package/dist/services/sandbox.service.js +479 -0
- package/dist/services/sandbox.service.js.map +1 -0
- package/dist/types/api-contracts.d.ts +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/skill.d.ts +8 -2
- package/dist/types/skill.js +8 -0
- package/dist/types/skill.js.map +1 -1
- package/dist/types/yaml.types.d.ts +69 -0
- package/dist/types/yaml.types.js +6 -0
- package/dist/types/yaml.types.js.map +1 -0
- package/dist/utils/artifact-loader.d.ts +108 -0
- package/dist/utils/artifact-loader.js +188 -0
- package/dist/utils/artifact-loader.js.map +1 -0
- package/dist/utils/backup-helpers.d.ts +122 -0
- package/dist/utils/backup-helpers.js +274 -0
- package/dist/utils/backup-helpers.js.map +1 -0
- package/dist/utils/cli.d.ts +8 -0
- package/dist/utils/cli.js +19 -2
- package/dist/utils/cli.js.map +1 -1
- package/dist/utils/command-utils.d.ts +42 -0
- package/dist/utils/command-utils.js +83 -0
- package/dist/utils/command-utils.js.map +1 -0
- package/dist/utils/deploy-helpers.d.ts +0 -29
- package/dist/utils/deploy-helpers.js +0 -70
- package/dist/utils/deploy-helpers.js.map +1 -1
- package/dist/utils/dev-api.d.ts +3 -99
- package/dist/utils/dev-api.js +3 -430
- package/dist/utils/dev-api.js.map +1 -1
- package/dist/utils/dev-server.d.ts +3 -1
- package/dist/utils/dev-server.js +69 -145
- package/dist/utils/dev-server.js.map +1 -1
- package/dist/utils/dev-watcher.d.ts +0 -1
- package/dist/utils/dev-watcher.js +23 -8
- package/dist/utils/dev-watcher.js.map +1 -1
- package/dist/utils/env-loader.utils.d.ts +10 -1
- package/dist/utils/env-loader.utils.js +39 -31
- package/dist/utils/env-loader.utils.js.map +1 -1
- package/dist/utils/files.d.ts +47 -3
- package/dist/utils/files.js +98 -40
- package/dist/utils/files.js.map +1 -1
- package/dist/utils/init-agent.js +1 -2
- package/dist/utils/init-agent.js.map +1 -1
- package/dist/utils/init-helpers.d.ts +2 -10
- package/dist/utils/init-helpers.js +9 -17
- package/dist/utils/init-helpers.js.map +1 -1
- package/dist/utils/init-prompts.d.ts +0 -8
- package/dist/utils/init-prompts.js +0 -22
- package/dist/utils/init-prompts.js.map +1 -1
- package/dist/utils/prompt-handler.d.ts +3 -0
- package/dist/utils/prompt-handler.js +13 -0
- package/dist/utils/prompt-handler.js.map +1 -1
- package/dist/utils/sandbox-storage.d.ts +6 -5
- package/dist/utils/sandbox-storage.js +12 -12
- package/dist/utils/sandbox-storage.js.map +1 -1
- package/dist/utils/sandbox.d.ts +7 -30
- package/dist/utils/sandbox.js +247 -223
- package/dist/utils/sandbox.js.map +1 -1
- package/dist/utils/semver.d.ts +12 -0
- package/dist/utils/semver.js +23 -0
- package/dist/utils/semver.js.map +1 -1
- package/dist/utils/sync-display.d.ts +9 -0
- package/dist/utils/sync-display.js +67 -0
- package/dist/utils/sync-display.js.map +1 -0
- package/dist/utils/sync-fetch.d.ts +23 -0
- package/dist/utils/sync-fetch.js +64 -0
- package/dist/utils/sync-fetch.js.map +1 -0
- package/dist/utils/sync-helpers.d.ts +4 -59
- package/dist/utils/sync-helpers.js +4 -206
- package/dist/utils/sync-helpers.js.map +1 -1
- package/dist/web/app.css +912 -186
- package/dist/web/app.js +46 -46
- package/docs/API_INDEX.md +100 -0
- package/docs/API_REFERENCE.md +773 -0
- package/docs/CLI_REFERENCE.md +924 -0
- package/docs/GETTING_STARTED.md +862 -0
- package/docs/README.md +270 -0
- package/docs/api/AI.md +882 -0
- package/docs/api/Baskets.md +511 -0
- package/docs/api/CDN.md +524 -0
- package/docs/api/Data.md +446 -0
- package/docs/api/Jobs.md +524 -0
- package/docs/api/LuaAgent.md +454 -0
- package/docs/api/LuaJob.md +604 -0
- package/docs/api/LuaSkill.md +396 -0
- package/docs/api/LuaTool.md +521 -0
- package/docs/api/LuaWebhook.md +601 -0
- package/docs/api/Orders.md +514 -0
- package/docs/api/PostProcessor.md +565 -0
- package/docs/api/PreProcessor.md +630 -0
- package/docs/api/Products.md +507 -0
- package/docs/api/Templates.md +662 -0
- package/docs/api/User.md +567 -0
- package/docs/archive/DEVELOPMENT_GUIDE_V1.md +1294 -0
- package/docs/compiler-v2/ASSESSMENT.md +205 -0
- package/docs/compiler-v2/TEST_PLAN.md +306 -0
- package/package.json +3 -7
- package/template/tsconfig.json +1 -1
- package/dist/common/basket.instance.js.map +0 -1
- package/dist/common/data.entry.instance.js.map +0 -1
- package/dist/common/http.client.js.map +0 -1
- package/dist/common/job.instance.js.map +0 -1
- package/dist/common/order.instance.js.map +0 -1
- package/dist/common/product.instance.js.map +0 -1
- package/dist/common/product.pagination.instance.js.map +0 -1
- package/dist/common/product.search.instance.js.map +0 -1
- package/dist/common/user.instance.js.map +0 -1
- package/dist/config/auth.constants.d.ts +0 -11
- package/dist/config/auth.constants.js +0 -12
- package/dist/config/auth.constants.js.map +0 -1
- package/dist/config/init.constants.d.ts +0 -15
- package/dist/config/init.constants.js +0 -20
- package/dist/config/init.constants.js.map +0 -1
- package/dist/interfaces/compile.d.ts +0 -12
- package/dist/interfaces/compile.js +0 -5
- package/dist/interfaces/compile.js.map +0 -1
- package/dist/types/compile.types.d.ts +0 -131
- package/dist/types/compile.types.js +0 -6
- package/dist/types/compile.types.js.map +0 -1
- package/dist/utils/agent-code-utils.d.ts +0 -25
- package/dist/utils/agent-code-utils.js +0 -107
- package/dist/utils/agent-code-utils.js.map +0 -1
- package/dist/utils/bundling.d.ts +0 -89
- package/dist/utils/bundling.js +0 -1068
- package/dist/utils/bundling.js.map +0 -1
- package/dist/utils/compile.d.ts +0 -116
- package/dist/utils/compile.js +0 -1062
- package/dist/utils/compile.js.map +0 -1
- package/dist/utils/deploy-api.d.ts +0 -26
- package/dist/utils/deploy-api.js +0 -54
- package/dist/utils/deploy-api.js.map +0 -1
- package/dist/utils/deployment.d.ts +0 -26
- package/dist/utils/deployment.js +0 -218
- package/dist/utils/deployment.js.map +0 -1
- package/dist/utils/dev-helpers.d.ts +0 -47
- package/dist/utils/dev-helpers.js +0 -82
- package/dist/utils/dev-helpers.js.map +0 -1
- package/dist/utils/job-management.d.ts +0 -27
- package/dist/utils/job-management.js +0 -248
- package/dist/utils/job-management.js.map +0 -1
- package/dist/utils/mcp-server-management.d.ts +0 -26
- package/dist/utils/mcp-server-management.js +0 -197
- package/dist/utils/mcp-server-management.js.map +0 -1
- package/dist/utils/postprocessor-management.d.ts +0 -9
- package/dist/utils/postprocessor-management.js +0 -117
- package/dist/utils/postprocessor-management.js.map +0 -1
- package/dist/utils/pre-bundle-jobs.d.ts +0 -27
- package/dist/utils/pre-bundle-jobs.js +0 -189
- package/dist/utils/pre-bundle-jobs.js.map +0 -1
- package/dist/utils/preprocessor-management.d.ts +0 -9
- package/dist/utils/preprocessor-management.js +0 -117
- package/dist/utils/preprocessor-management.js.map +0 -1
- package/dist/utils/push-api.d.ts +0 -15
- package/dist/utils/push-api.js +0 -49
- package/dist/utils/push-api.js.map +0 -1
- package/dist/utils/push-helpers.d.ts +0 -82
- package/dist/utils/push-helpers.js +0 -246
- package/dist/utils/push-helpers.js.map +0 -1
- package/dist/utils/skill-management.d.ts +0 -39
- package/dist/utils/skill-management.js +0 -299
- package/dist/utils/skill-management.js.map +0 -1
- package/dist/utils/test-helpers.d.ts +0 -33
- package/dist/utils/test-helpers.js +0 -84
- package/dist/utils/test-helpers.js.map +0 -1
- package/dist/utils/test-prompts.d.ts +0 -23
- package/dist/utils/test-prompts.js +0 -187
- package/dist/utils/test-prompts.js.map +0 -1
- package/dist/utils/tool-detection.d.ts +0 -19
- package/dist/utils/tool-detection.js +0 -125
- package/dist/utils/tool-detection.js.map +0 -1
- package/dist/utils/webhook-management.d.ts +0 -27
- package/dist/utils/webhook-management.js +0 -241
- package/dist/utils/webhook-management.js.map +0 -1
- /package/dist/{common → api}/http.client.d.ts +0 -0
- /package/dist/{common → api}/http.client.js +0 -0
- /package/dist/{common → instances}/basket.instance.d.ts +0 -0
- /package/dist/{common → instances}/basket.instance.js +0 -0
- /package/dist/{common → instances}/data.entry.instance.d.ts +0 -0
- /package/dist/{common → instances}/data.entry.instance.js +0 -0
- /package/dist/{common → instances}/job.instance.d.ts +0 -0
- /package/dist/{common → instances}/job.instance.js +0 -0
- /package/dist/{common → instances}/order.instance.d.ts +0 -0
- /package/dist/{common → instances}/order.instance.js +0 -0
- /package/dist/{common → instances}/product.instance.d.ts +0 -0
- /package/dist/{common → instances}/product.instance.js +0 -0
- /package/dist/{common → instances}/product.pagination.instance.d.ts +0 -0
- /package/dist/{common → instances}/product.pagination.instance.js +0 -0
- /package/dist/{common → instances}/product.search.instance.d.ts +0 -0
- /package/dist/{common → instances}/product.search.instance.js +0 -0
- /package/dist/{common → instances}/user.instance.d.ts +0 -0
- /package/dist/{common → instances}/user.instance.js +0 -0
package/README.md
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# lua-cli
|
|
2
2
|
|
|
3
3
|
> Build, test, and deploy AI agents with custom tools, webhooks, and scheduled jobs
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/lua-cli)
|
|
6
|
-
[](https://github.com/
|
|
6
|
+
[](https://github.com/lua-ai-global/lua-cli/blob/main/LICENSE)
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**lua-cli** is the official command-line tool for building intelligent AI agents on the Lua platform. Create custom tools, integrate with external APIs, schedule automated tasks, and deploy to production—all from your terminal.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Features
|
|
13
13
|
|
|
14
14
|
- 🤖 **LuaAgent** - Unified agent configuration with persona, skills, webhooks, and jobs
|
|
15
|
-
- 🛒 **Marketplace** - Publish and install verified skills from the community
|
|
16
15
|
- 🛠️ **Custom Tools** - Build TypeScript tools with full type safety and Zod validation
|
|
17
16
|
- 🪝 **Webhooks** - HTTP endpoints for external integrations (Stripe, Shopify, etc.)
|
|
18
17
|
- ⏰ **Scheduled Jobs** - Cron-based and one-time background tasks
|
|
19
18
|
- 📥 **Preprocessors** - Filter and route messages before they reach your agent
|
|
20
19
|
- 📤 **Postprocessors** - Transform and format agent responses
|
|
21
20
|
- 💬 **Streaming Chat** - Real-time chat interface with typing indicators
|
|
22
|
-
- 🧪 **Local Testing** - Test tools, webhooks, and jobs before deploying
|
|
21
|
+
- 🧪 **Local Testing** - Test tools, webhooks, and jobs in sandbox before deploying
|
|
23
22
|
- 🚀 **Batch Deployment** - Push all components with one command
|
|
24
|
-
-
|
|
23
|
+
- 🛒 **Marketplace** - Publish and install verified skills from the community
|
|
25
24
|
- 🌐 **CI/CD Ready** - Environment variable support for automated deployments
|
|
26
25
|
|
|
27
26
|
---
|
|
28
27
|
|
|
29
|
-
##
|
|
28
|
+
## Installation
|
|
30
29
|
|
|
31
30
|
### Global Installation (Recommended)
|
|
32
31
|
|
|
@@ -34,12 +33,6 @@
|
|
|
34
33
|
npm install -g lua-cli
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
### Project Installation
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
npm install lua-cli
|
|
41
|
-
```
|
|
42
|
-
|
|
43
36
|
### Verify Installation
|
|
44
37
|
|
|
45
38
|
```bash
|
|
@@ -48,7 +41,7 @@ lua --version
|
|
|
48
41
|
|
|
49
42
|
---
|
|
50
43
|
|
|
51
|
-
##
|
|
44
|
+
## Quick Start
|
|
52
45
|
|
|
53
46
|
### 1. Authenticate
|
|
54
47
|
|
|
@@ -56,48 +49,60 @@ lua --version
|
|
|
56
49
|
lua auth configure
|
|
57
50
|
```
|
|
58
51
|
|
|
59
|
-
Enter your API key when prompted (get one at https://admin.heylua.ai).
|
|
52
|
+
Enter your API key when prompted (get one at [admin.heylua.ai](https://admin.heylua.ai)).
|
|
60
53
|
|
|
61
54
|
### 2. Initialize Project
|
|
62
55
|
|
|
63
56
|
```bash
|
|
64
|
-
mkdir my-agent
|
|
65
|
-
cd my-agent
|
|
57
|
+
mkdir my-agent && cd my-agent
|
|
66
58
|
lua init
|
|
67
59
|
```
|
|
68
60
|
|
|
69
|
-
Follow the prompts to
|
|
70
|
-
- Select or create an agent
|
|
71
|
-
- Configure persona and welcome message
|
|
72
|
-
- Set up your project
|
|
61
|
+
Follow the prompts to configure your agent.
|
|
73
62
|
|
|
74
|
-
### 3.
|
|
63
|
+
### 3. Create a Tool
|
|
75
64
|
|
|
76
|
-
|
|
77
|
-
# Test individual tools
|
|
78
|
-
lua test
|
|
65
|
+
Create `src/skills/tools/WeatherTool.ts`:
|
|
79
66
|
|
|
80
|
-
|
|
81
|
-
lua
|
|
67
|
+
```typescript
|
|
68
|
+
import { LuaTool } from 'lua-cli/skill';
|
|
69
|
+
import { z } from 'zod';
|
|
70
|
+
|
|
71
|
+
export default class WeatherTool implements LuaTool {
|
|
72
|
+
name = 'get_weather';
|
|
73
|
+
description = 'Get current weather for any city';
|
|
74
|
+
|
|
75
|
+
inputSchema = z.object({
|
|
76
|
+
city: z.string()
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
async execute(input: z.infer<typeof this.inputSchema>) {
|
|
80
|
+
return { temperature: 72, condition: 'sunny' };
|
|
81
|
+
}
|
|
82
|
+
}
|
|
82
83
|
```
|
|
83
84
|
|
|
84
|
-
### 4.
|
|
85
|
+
### 4. Test Locally
|
|
85
86
|
|
|
86
87
|
```bash
|
|
87
|
-
#
|
|
88
|
-
lua
|
|
88
|
+
lua test # Test individual tools
|
|
89
|
+
lua chat # Interactive chat with your agent
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 5. Deploy to Production
|
|
89
93
|
|
|
90
|
-
|
|
94
|
+
```bash
|
|
95
|
+
lua compile
|
|
91
96
|
lua push all --force --auto-deploy
|
|
92
97
|
```
|
|
93
98
|
|
|
94
|
-
|
|
99
|
+
Your agent is now live! 🎉
|
|
95
100
|
|
|
96
|
-
|
|
101
|
+
---
|
|
97
102
|
|
|
98
|
-
|
|
103
|
+
## Core Concepts
|
|
99
104
|
|
|
100
|
-
|
|
105
|
+
### LuaAgent - Unified Configuration
|
|
101
106
|
|
|
102
107
|
```typescript
|
|
103
108
|
import { LuaAgent, LuaSkill, LuaWebhook, LuaJob } from 'lua-cli';
|
|
@@ -105,617 +110,145 @@ import { LuaAgent, LuaSkill, LuaWebhook, LuaJob } from 'lua-cli';
|
|
|
105
110
|
export const agent = new LuaAgent({
|
|
106
111
|
name: 'my-assistant',
|
|
107
112
|
persona: 'You are a helpful AI assistant...',
|
|
108
|
-
|
|
109
113
|
skills: [customerSupportSkill, productSkill],
|
|
110
114
|
webhooks: [paymentWebhook],
|
|
111
|
-
jobs: [dailyReportJob]
|
|
112
|
-
preProcessors: [messageFilter],
|
|
113
|
-
postProcessors: [responseFormatter]
|
|
115
|
+
jobs: [dailyReportJob]
|
|
114
116
|
});
|
|
115
117
|
```
|
|
116
118
|
|
|
117
|
-
### Skills
|
|
118
|
-
|
|
119
|
-
Group related tools together:
|
|
119
|
+
### Skills - Tool Collections
|
|
120
120
|
|
|
121
121
|
```typescript
|
|
122
122
|
import { LuaSkill } from 'lua-cli';
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
export default new LuaSkill({
|
|
125
125
|
name: 'weather-skill',
|
|
126
126
|
description: 'Weather information tools',
|
|
127
|
-
|
|
128
|
-
tools: [
|
|
129
|
-
new GetWeatherTool(),
|
|
130
|
-
new GetForecastTool()
|
|
131
|
-
]
|
|
132
|
-
});
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Tools
|
|
136
|
-
|
|
137
|
-
Individual functions your agent can use:
|
|
138
|
-
|
|
139
|
-
```typescript
|
|
140
|
-
import { LuaTool } from 'lua-cli/skill';
|
|
141
|
-
import { z } from 'zod';
|
|
142
|
-
|
|
143
|
-
export default class GetWeatherTool implements LuaTool {
|
|
144
|
-
name = 'get_weather';
|
|
145
|
-
description = 'Get current weather for a city';
|
|
146
|
-
|
|
147
|
-
inputSchema = z.object({
|
|
148
|
-
city: z.string()
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
async execute(input: z.infer<typeof this.inputSchema>) {
|
|
152
|
-
// Your logic here
|
|
153
|
-
return { temperature: 72, condition: 'sunny' };
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Webhooks
|
|
159
|
-
|
|
160
|
-
Receive HTTP requests from external systems:
|
|
161
|
-
|
|
162
|
-
```typescript
|
|
163
|
-
import { LuaWebhook } from 'lua-cli';
|
|
164
|
-
import { z } from 'zod';
|
|
165
|
-
|
|
166
|
-
export default new LuaWebhook({
|
|
167
|
-
name: 'payment-webhook',
|
|
168
|
-
description: 'Handle payment notifications',
|
|
169
|
-
|
|
170
|
-
bodySchema: z.object({
|
|
171
|
-
orderId: z.string(),
|
|
172
|
-
amount: z.number(),
|
|
173
|
-
status: z.string()
|
|
174
|
-
}),
|
|
175
|
-
|
|
176
|
-
execute: async ({ body, headers, query }) => {
|
|
177
|
-
// Process payment event
|
|
178
|
-
return {
|
|
179
|
-
status: 200,
|
|
180
|
-
body: { received: true }
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### Jobs
|
|
187
|
-
|
|
188
|
-
Schedule automated tasks:
|
|
189
|
-
|
|
190
|
-
```typescript
|
|
191
|
-
import { LuaJob } from 'lua-cli';
|
|
192
|
-
|
|
193
|
-
export default new LuaJob({
|
|
194
|
-
name: 'daily-cleanup',
|
|
195
|
-
description: 'Clean up old data daily',
|
|
196
|
-
|
|
197
|
-
schedule: {
|
|
198
|
-
type: 'cron',
|
|
199
|
-
pattern: '0 0 * * *' // Midnight every day
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
execute: async (job) => {
|
|
203
|
-
// Cleanup logic
|
|
204
|
-
return { success: true, deleted: 42 };
|
|
205
|
-
}
|
|
127
|
+
tools: [new GetWeatherTool(), new GetForecastTool()]
|
|
206
128
|
});
|
|
207
129
|
```
|
|
208
130
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
## 📚 Available APIs
|
|
131
|
+
### Runtime APIs
|
|
212
132
|
|
|
213
|
-
Access powerful APIs in your tools
|
|
133
|
+
Access powerful APIs in your tools:
|
|
214
134
|
|
|
215
|
-
### User API
|
|
216
135
|
```typescript
|
|
217
|
-
import { User } from 'lua-cli';
|
|
136
|
+
import { User, Products, Data, Orders } from 'lua-cli';
|
|
218
137
|
|
|
138
|
+
// User data
|
|
219
139
|
const user = await User.get();
|
|
220
|
-
await user.update({ preferences: 'dark-mode' });
|
|
221
140
|
await user.send([{ type: 'text', text: 'Hello!' }]);
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### Products API
|
|
225
|
-
```typescript
|
|
226
|
-
import { Products } from 'lua-cli';
|
|
227
141
|
|
|
142
|
+
// Products
|
|
228
143
|
const products = await Products.get();
|
|
229
|
-
|
|
230
|
-
await product.update({ price: 24.99 });
|
|
231
|
-
await product.delete();
|
|
232
|
-
```
|
|
144
|
+
await Products.create({ name: 'Widget', price: 29.99 });
|
|
233
145
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const basket = await Baskets.create();
|
|
239
|
-
await basket.addItem({ productId: '123', quantity: 2 });
|
|
240
|
-
await basket.placeOrder();
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### Orders API
|
|
244
|
-
```typescript
|
|
245
|
-
import { Orders } from 'lua-cli';
|
|
246
|
-
|
|
247
|
-
const orders = await Orders.get();
|
|
248
|
-
await Orders.updateStatus('confirmed', orderId);
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
### Custom Data API
|
|
252
|
-
```typescript
|
|
253
|
-
import { Data } from 'lua-cli';
|
|
254
|
-
|
|
255
|
-
const movies = await Data.get('movies');
|
|
256
|
-
await Data.create('movies', { title: 'Inception', year: 2010 });
|
|
257
|
-
const results = await Data.search('movies', 'action thriller');
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### Jobs API
|
|
261
|
-
```typescript
|
|
262
|
-
import { Jobs } from 'lua-cli';
|
|
263
|
-
|
|
264
|
-
const job = await Jobs.create({
|
|
265
|
-
name: 'remind-user',
|
|
266
|
-
metadata: { message: 'Meeting in 1 hour' },
|
|
267
|
-
schedule: {
|
|
268
|
-
type: 'once',
|
|
269
|
-
executeAt: new Date(Date.now() + 3600000)
|
|
270
|
-
},
|
|
271
|
-
execute: async (job) => {
|
|
272
|
-
const user = await job.user();
|
|
273
|
-
await user.send([{ type: 'text', text: job.metadata.message }]);
|
|
274
|
-
return { success: true };
|
|
275
|
-
}
|
|
276
|
-
});
|
|
146
|
+
// Custom data storage
|
|
147
|
+
await Data.create('notes', { text: 'Hello' });
|
|
148
|
+
const results = await Data.search('notes', 'query');
|
|
277
149
|
```
|
|
278
150
|
|
|
279
151
|
---
|
|
280
152
|
|
|
281
|
-
##
|
|
282
|
-
|
|
283
|
-
### Project Setup
|
|
153
|
+
## Key Commands
|
|
284
154
|
|
|
285
155
|
```bash
|
|
286
|
-
|
|
156
|
+
# Project Setup
|
|
287
157
|
lua init # Initialize new project
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
### Marketplace
|
|
291
|
-
|
|
292
|
-
```bash
|
|
293
|
-
lua marketplace # Access the skills marketplace (Creator & Installer)
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### Development
|
|
297
|
-
|
|
298
|
-
```bash
|
|
299
|
-
lua compile # Compile TypeScript to deployable format
|
|
300
|
-
lua test # Test tools/webhooks/jobs interactively
|
|
301
|
-
lua chat # Interactive chat with your agent
|
|
302
|
-
```
|
|
158
|
+
lua compile # Compile TypeScript
|
|
303
159
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
lua
|
|
308
|
-
lua push all --force # Push all components without prompts
|
|
309
|
-
lua deploy # Deploy version to production
|
|
310
|
-
```
|
|
160
|
+
# Development
|
|
161
|
+
lua test # Test tools interactively
|
|
162
|
+
lua chat # Chat with your agent
|
|
163
|
+
lua dev # Dev server with live reload
|
|
311
164
|
|
|
312
|
-
|
|
165
|
+
# Deployment
|
|
166
|
+
lua push # Push to server (interactive)
|
|
167
|
+
lua push all --force # Push all without prompts
|
|
168
|
+
lua deploy # Deploy to production
|
|
313
169
|
|
|
314
|
-
|
|
170
|
+
# Management
|
|
315
171
|
lua production # View production status
|
|
316
172
|
lua env # Manage environment variables
|
|
317
|
-
lua
|
|
318
|
-
lua
|
|
319
|
-
lua skills # Manage skills
|
|
320
|
-
lua webhooks # Manage webhooks
|
|
321
|
-
lua jobs # Manage scheduled jobs
|
|
322
|
-
lua integrations # Connect third-party accounts (Linear, Discord, etc.)
|
|
173
|
+
lua logs # View agent logs
|
|
174
|
+
lua marketplace # Browse and install skills
|
|
323
175
|
```
|
|
324
176
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
```bash
|
|
328
|
-
lua admin # Open admin dashboard
|
|
329
|
-
lua docs # Open documentation
|
|
330
|
-
lua channels # Manage chat channels
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
---
|
|
334
|
-
|
|
335
|
-
## 🔧 Advanced Features
|
|
336
|
-
|
|
337
|
-
### Streaming Chat
|
|
338
|
-
|
|
339
|
-
Real-time chat responses with typing indicators:
|
|
340
|
-
|
|
341
|
-
```bash
|
|
342
|
-
lua chat
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
- ✅ Animated typing indicator while waiting
|
|
346
|
-
- ✅ Text streams character-by-character as AI generates
|
|
347
|
-
- ✅ Custom welcome message from `lua.skill.yaml`
|
|
348
|
-
- ✅ Sandbox and production environments
|
|
349
|
-
|
|
350
|
-
### Batch Deployment
|
|
351
|
-
|
|
352
|
-
Deploy all components at once:
|
|
353
|
-
|
|
354
|
-
```bash
|
|
355
|
-
# Push everything without prompts
|
|
356
|
-
lua push all --force
|
|
357
|
-
|
|
358
|
-
# Push and deploy to production
|
|
359
|
-
lua push all --force --auto-deploy
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
Perfect for CI/CD pipelines:
|
|
363
|
-
- ✅ Auto-bumps patch versions
|
|
364
|
-
- ✅ No user interaction required
|
|
365
|
-
- ✅ Handles all component types
|
|
366
|
-
- ✅ Comprehensive error handling
|
|
367
|
-
|
|
368
|
-
### API Key Fallback
|
|
369
|
-
|
|
370
|
-
Flexible authentication for different environments:
|
|
371
|
-
|
|
372
|
-
**Priority:**
|
|
373
|
-
1. System keychain (macOS Keychain, Windows Credential Vault, Linux libsecret)
|
|
374
|
-
2. `LUA_API_KEY` environment variable
|
|
375
|
-
3. `LUA_API_KEY` in `.env` file
|
|
376
|
-
|
|
377
|
-
```bash
|
|
378
|
-
# CI/CD usage
|
|
379
|
-
export LUA_API_KEY=your-api-key
|
|
380
|
-
lua push all --force --auto-deploy
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
### Auto-Sync Configuration
|
|
384
|
-
|
|
385
|
-
Your `lua.skill.yaml` and `LuaAgent` stay synchronized:
|
|
386
|
-
|
|
387
|
-
- Run `lua init` → Syncs agent metadata to both YAML and code
|
|
388
|
-
- Run `lua compile` → Syncs LuaAgent changes back to YAML
|
|
389
|
-
- Edit either file → Changes propagate automatically
|
|
177
|
+
[**→ Full CLI Reference**](docs/CLI_REFERENCE.md)
|
|
390
178
|
|
|
391
179
|
---
|
|
392
180
|
|
|
393
|
-
##
|
|
181
|
+
## Documentation
|
|
394
182
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
export default class WeatherTool implements LuaTool {
|
|
401
|
-
name = 'get_weather';
|
|
402
|
-
description = 'Get current weather for any city';
|
|
403
|
-
|
|
404
|
-
inputSchema = z.object({
|
|
405
|
-
city: z.string().describe('City name'),
|
|
406
|
-
units: z.enum(['metric', 'imperial']).optional()
|
|
407
|
-
});
|
|
408
|
-
|
|
409
|
-
outputSchema = z.object({
|
|
410
|
-
temperature: z.number(),
|
|
411
|
-
condition: z.string(),
|
|
412
|
-
city: z.string()
|
|
413
|
-
});
|
|
414
|
-
|
|
415
|
-
async execute(input: z.infer<typeof this.inputSchema>) {
|
|
416
|
-
const response = await axios.get('https://api.weather.com/current', {
|
|
417
|
-
params: {
|
|
418
|
-
city: input.city,
|
|
419
|
-
units: input.units || 'metric',
|
|
420
|
-
apiKey: process.env.WEATHER_API_KEY
|
|
421
|
-
}
|
|
422
|
-
});
|
|
423
|
-
|
|
424
|
-
return {
|
|
425
|
-
temperature: response.data.temp,
|
|
426
|
-
condition: response.data.condition,
|
|
427
|
-
city: input.city
|
|
428
|
-
};
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
---
|
|
434
|
-
|
|
435
|
-
## 🏗️ Project Structure
|
|
436
|
-
|
|
437
|
-
```
|
|
438
|
-
your-project/
|
|
439
|
-
├── src/
|
|
440
|
-
│ ├── index.ts # LuaAgent configuration
|
|
441
|
-
│ ├── skills/ # Tool collections
|
|
442
|
-
│ │ ├── tools/ # Individual tools
|
|
443
|
-
│ │ └── *.skill.ts # Skill definitions
|
|
444
|
-
│ ├── webhooks/ # HTTP endpoints
|
|
445
|
-
│ ├── jobs/ # Scheduled tasks
|
|
446
|
-
│ ├── preprocessors/ # Message filters
|
|
447
|
-
│ ├── postprocessors/ # Response formatters
|
|
448
|
-
│ └── services/ # Shared utilities
|
|
449
|
-
├── lua.skill.yaml # Agent metadata
|
|
450
|
-
├── .env # Environment variables
|
|
451
|
-
├── package.json
|
|
452
|
-
└── tsconfig.json
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
---
|
|
456
|
-
|
|
457
|
-
## 🔐 Security
|
|
458
|
-
|
|
459
|
-
### API Keys
|
|
460
|
-
|
|
461
|
-
- ✅ Stored securely in system keychain
|
|
462
|
-
- ✅ Never committed to version control
|
|
463
|
-
- ✅ Environment variable fallback for CI/CD
|
|
464
|
-
- ✅ Per-environment configuration
|
|
465
|
-
|
|
466
|
-
### Webhooks
|
|
467
|
-
|
|
468
|
-
- ✅ Signature validation support
|
|
469
|
-
- ✅ Request body validation with Zod
|
|
470
|
-
- ✅ HTTPS endpoints only
|
|
471
|
-
- ✅ Rate limiting ready
|
|
472
|
-
|
|
473
|
-
### User Data
|
|
474
|
-
|
|
475
|
-
- ✅ Encrypted at rest
|
|
476
|
-
- ✅ Scoped to authenticated users
|
|
477
|
-
- ✅ GDPR-compliant deletion
|
|
478
|
-
- ✅ Privacy-first design
|
|
479
|
-
|
|
480
|
-
---
|
|
481
|
-
|
|
482
|
-
## 🧪 Testing
|
|
483
|
-
|
|
484
|
-
### Test Individual Components
|
|
485
|
-
|
|
486
|
-
```bash
|
|
487
|
-
# Test a tool
|
|
488
|
-
lua test
|
|
489
|
-
# Select: Tool → get_weather
|
|
490
|
-
# Input: { city: "London" }
|
|
491
|
-
# Output: { temperature: 15, condition: "cloudy" }
|
|
492
|
-
|
|
493
|
-
# Test a webhook
|
|
494
|
-
lua test
|
|
495
|
-
# Select: Webhook → payment-webhook
|
|
496
|
-
# Input body, headers, query
|
|
497
|
-
# See response
|
|
498
|
-
|
|
499
|
-
# Test a job
|
|
500
|
-
lua test
|
|
501
|
-
# Select: Job → daily-cleanup
|
|
502
|
-
# Execute immediately
|
|
503
|
-
# See results
|
|
504
|
-
```
|
|
505
|
-
|
|
506
|
-
### Interactive Chat Testing
|
|
183
|
+
### Getting Started
|
|
184
|
+
- [**Getting Started Guide**](docs/GETTING_STARTED.md) - Complete step-by-step tutorial
|
|
185
|
+
- [**CLI Reference**](docs/CLI_REFERENCE.md) - All available commands
|
|
186
|
+
- [**API Reference**](docs/API_REFERENCE.md) - Platform API overview
|
|
507
187
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
188
|
+
### API Documentation
|
|
189
|
+
- [LuaAgent](docs/api/LuaAgent.md) - Agent configuration
|
|
190
|
+
- [LuaSkill](docs/api/LuaSkill.md) - Tool collections
|
|
191
|
+
- [LuaTool](docs/api/LuaTool.md) - Creating tools
|
|
192
|
+
- [LuaWebhook](docs/api/LuaWebhook.md) - HTTP endpoints
|
|
193
|
+
- [LuaJob](docs/api/LuaJob.md) - Scheduled tasks
|
|
194
|
+
- [User API](docs/api/User.md) - User data management
|
|
195
|
+
- [Products API](docs/api/Products.md) - Product catalog
|
|
196
|
+
- [Data API](docs/api/Data.md) - Custom data storage
|
|
197
|
+
- [Jobs API](docs/api/Jobs.md) - Dynamic job creation
|
|
198
|
+
- [AI API](docs/api/AI.md) - AI text generation
|
|
199
|
+
|
|
200
|
+
[**→ Complete API Documentation**](docs/README.md)
|
|
514
201
|
|
|
515
202
|
---
|
|
516
203
|
|
|
517
|
-
##
|
|
518
|
-
|
|
519
|
-
### Development Workflow
|
|
520
|
-
|
|
521
|
-
```bash
|
|
522
|
-
# 1. Make changes to your code
|
|
523
|
-
vim src/skills/tools/MyTool.ts
|
|
524
|
-
|
|
525
|
-
# 2. Test locally
|
|
526
|
-
lua test
|
|
527
|
-
|
|
528
|
-
# 3. Test with chat
|
|
529
|
-
lua chat # Sandbox mode
|
|
530
|
-
|
|
531
|
-
# 4. Compile
|
|
532
|
-
lua compile
|
|
533
|
-
|
|
534
|
-
# 5. Push to server
|
|
535
|
-
lua push
|
|
536
|
-
|
|
537
|
-
# 6. Deploy to production
|
|
538
|
-
lua deploy
|
|
539
|
-
```
|
|
204
|
+
## CI/CD Integration
|
|
540
205
|
|
|
541
|
-
|
|
206
|
+
Perfect for automated deployments:
|
|
542
207
|
|
|
543
208
|
```yaml
|
|
544
209
|
# .github/workflows/deploy.yml
|
|
545
210
|
- name: Deploy Agent
|
|
546
|
-
run: lua push all --force --auto-deploy
|
|
211
|
+
run: lua push all --ci --force --auto-deploy
|
|
547
212
|
env:
|
|
548
213
|
LUA_API_KEY: ${{ secrets.LUA_API_KEY }}
|
|
549
214
|
```
|
|
550
215
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
## 📝 Configuration
|
|
554
|
-
|
|
555
|
-
### lua.skill.yaml
|
|
556
|
-
|
|
557
|
-
Central configuration file:
|
|
558
|
-
|
|
559
|
-
```yaml
|
|
560
|
-
agent:
|
|
561
|
-
agentId: your-agent-id
|
|
562
|
-
orgId: your-org-id
|
|
563
|
-
|
|
564
|
-
skills:
|
|
565
|
-
- name: general-skill
|
|
566
|
-
version: 1.0.0
|
|
567
|
-
skillId: skill-id-123
|
|
568
|
-
|
|
569
|
-
webhooks:
|
|
570
|
-
- name: payment-webhook
|
|
571
|
-
version: 1.0.0
|
|
572
|
-
webhookId: webhook-id-456
|
|
573
|
-
|
|
574
|
-
jobs:
|
|
575
|
-
- name: daily-cleanup
|
|
576
|
-
version: 1.0.0
|
|
577
|
-
jobId: job-id-789
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
State-only: YAML tracks names, IDs, and server versions. Persona, env vars, and schedules live in code (for sandbox) or on the server (for production).
|
|
581
|
-
|
|
582
|
-
### Environment Variables
|
|
583
|
-
|
|
584
|
-
```.env
|
|
585
|
-
# Lua Platform
|
|
586
|
-
LUA_API_KEY=your-lua-api-key # Optional: for CI/CD
|
|
587
|
-
|
|
588
|
-
# External Services
|
|
589
|
-
OPENAI_API_KEY=sk-...
|
|
590
|
-
STRIPE_SECRET_KEY=sk_live_...
|
|
591
|
-
PINECONE_API_KEY=...
|
|
592
|
-
|
|
593
|
-
# Custom Configuration
|
|
594
|
-
BASE_URL=https://api.example.com
|
|
595
|
-
```
|
|
596
|
-
|
|
597
|
-
---
|
|
598
|
-
|
|
599
|
-
## 🎓 Documentation
|
|
600
|
-
|
|
601
|
-
### Getting Started
|
|
602
|
-
- **[Quick Start Guide](template/QUICKSTART.md)** - Complete step-by-step tutorial
|
|
603
|
-
- **[Template README](template/README.md)** - Comprehensive project guide
|
|
604
|
-
- **[CLI Reference](#cli-commands)** - All available commands
|
|
605
|
-
|
|
606
|
-
### API Documentation
|
|
607
|
-
- **[Complete API Reference](docs/README.md)** - Full API documentation
|
|
608
|
-
- **[API Index](docs/API_INDEX.md)** - Quick reference table
|
|
609
|
-
- **Core APIs:**
|
|
610
|
-
- [LuaAgent](docs/api/LuaAgent.md) - Agent configuration
|
|
611
|
-
- [LuaSkill](docs/api/LuaSkill.md) - Tool collections
|
|
612
|
-
- [LuaTool](docs/api/LuaTool.md) - Creating tools
|
|
613
|
-
- **Runtime APIs:**
|
|
614
|
-
- [AI API](docs/api/AI.md) - AI text generation and analysis
|
|
615
|
-
- [User API](docs/api/User.md) - User data management
|
|
616
|
-
- [Products API](docs/api/Products.md) - Product catalog
|
|
617
|
-
- [Data API](docs/api/Data.md) - Custom data storage
|
|
618
|
-
- [Jobs API](docs/api/Jobs.md) - Dynamic job creation
|
|
619
|
-
|
|
620
|
-
### Advanced Topics
|
|
621
|
-
- [Webhooks & Jobs Guide](WEBHOOKS_JOBS_USAGE_GUIDE.md) - External integrations
|
|
622
|
-
- [Processors Guide](PROCESSORS_GUIDE.md) - Message processing
|
|
623
|
-
- [Dynamic Jobs](DYNAMIC_JOB_CREATION_API.md) - Creating jobs programmatically
|
|
624
|
-
- [Agent Configuration](LUAAGENT_IMPLEMENTATION.md) - LuaAgent deep dive
|
|
625
|
-
|
|
626
|
-
### Examples
|
|
627
|
-
- [Template Project](template/) - Full working example with 30+ tools
|
|
628
|
-
- [Example Skills](template/src/skills/) - Organized skill examples
|
|
629
|
-
- [Example Webhooks](template/src/webhooks/) - Webhook patterns
|
|
630
|
-
- [Example Jobs](template/src/jobs/) - Scheduled task examples
|
|
216
|
+
**Global `--ci` flag**: Fails loudly on missing required flags instead of silently canceling in non-TTY environments.
|
|
631
217
|
|
|
632
218
|
---
|
|
633
219
|
|
|
634
|
-
##
|
|
635
|
-
|
|
636
|
-
### Prerequisites
|
|
637
|
-
|
|
638
|
-
- Node.js 16+
|
|
639
|
-
- npm or yarn
|
|
640
|
-
- TypeScript 5+
|
|
641
|
-
|
|
642
|
-
### Building from Source
|
|
643
|
-
|
|
644
|
-
```bash
|
|
645
|
-
# Clone repository
|
|
646
|
-
git clone https://github.com/heylua/lua-cli.git
|
|
647
|
-
cd lua-cli
|
|
220
|
+
## Example: E-commerce Agent
|
|
648
221
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
# Build
|
|
653
|
-
npm run build
|
|
654
|
-
|
|
655
|
-
# Link globally
|
|
656
|
-
npm link
|
|
222
|
+
```typescript
|
|
223
|
+
import { LuaAgent, LuaSkill } from 'lua-cli';
|
|
224
|
+
import { Products, Baskets, Orders } from 'lua-cli';
|
|
657
225
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
226
|
+
const productSkill = new LuaSkill({
|
|
227
|
+
name: 'product-skill',
|
|
228
|
+
description: 'Product browsing and search',
|
|
229
|
+
tools: [new SearchProductsTool(), new GetProductTool()]
|
|
230
|
+
});
|
|
661
231
|
|
|
662
|
-
|
|
232
|
+
const orderSkill = new LuaSkill({
|
|
233
|
+
name: 'order-skill',
|
|
234
|
+
description: 'Order management',
|
|
235
|
+
tools: [new PlaceOrderTool(), new TrackOrderTool()]
|
|
236
|
+
});
|
|
663
237
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
238
|
+
export const agent = new LuaAgent({
|
|
239
|
+
name: 'ecommerce-assistant',
|
|
240
|
+
persona: 'You are an e-commerce assistant helping customers browse products and place orders.',
|
|
241
|
+
skills: [productSkill, orderSkill],
|
|
242
|
+
webhooks: [orderWebhook],
|
|
243
|
+
jobs: [inventoryCheckJob]
|
|
244
|
+
});
|
|
669
245
|
```
|
|
670
246
|
|
|
671
247
|
---
|
|
672
248
|
|
|
673
|
-
##
|
|
674
|
-
|
|
675
|
-
### Major Features
|
|
676
|
-
|
|
677
|
-
#### LuaAgent - Unified Configuration
|
|
678
|
-
- ✅ Single source of truth for all agent components
|
|
679
|
-
- ✅ Cleaner, more intuitive API
|
|
680
|
-
- ✅ Automatic sync with `lua.skill.yaml`
|
|
681
|
-
|
|
682
|
-
#### Streaming Chat Interface
|
|
683
|
-
- ✅ Real-time text streaming as AI generates responses
|
|
684
|
-
- ✅ Animated typing indicators
|
|
685
|
-
- ✅ Custom welcome messages from YAML
|
|
686
|
-
- ✅ Improved user experience
|
|
687
|
-
|
|
688
|
-
#### Batch Deployment
|
|
689
|
-
- ✅ `lua push all --force` - Deploy everything at once
|
|
690
|
-
- ✅ Auto-bump patch versions
|
|
691
|
-
- ✅ `--auto-deploy` flag for production
|
|
692
|
-
- ✅ Perfect for CI/CD pipelines
|
|
693
|
-
|
|
694
|
-
#### Enhanced Bundling
|
|
695
|
-
- ✅ Optimized bundle sizes (excludes lua-cli internals)
|
|
696
|
-
- ✅ Better import resolution
|
|
697
|
-
- ✅ Faster compilation
|
|
698
|
-
- ✅ Reduced deployment size
|
|
699
|
-
|
|
700
|
-
#### Improved Authentication
|
|
701
|
-
- ✅ Multi-source API key loading
|
|
702
|
-
- ✅ Environment variable support
|
|
703
|
-
- ✅ `.env` file fallback
|
|
704
|
-
- ✅ CI/CD friendly
|
|
705
|
-
|
|
706
|
-
### Breaking Changes from v2.x
|
|
707
|
-
|
|
708
|
-
- **LuaAgent required** - Use `new LuaAgent()` instead of exporting individual skills
|
|
709
|
-
- **Streaming endpoints** - Chat uses `/chat/stream` instead of `/chat/generate`
|
|
710
|
-
- **Jobs.create signature** - Metadata field recommended for passing data
|
|
711
|
-
|
|
712
|
-
See [CHANGELOG.md](CHANGELOG.md) for complete list of changes.
|
|
713
|
-
|
|
714
|
-
---
|
|
249
|
+
## Contributing
|
|
715
250
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
We welcome contributions! Please see our contributing guidelines:
|
|
251
|
+
We welcome contributions!
|
|
719
252
|
|
|
720
253
|
1. Fork the repository
|
|
721
254
|
2. Create a feature branch
|
|
@@ -726,140 +259,55 @@ We welcome contributions! Please see our contributing guidelines:
|
|
|
726
259
|
### Development Setup
|
|
727
260
|
|
|
728
261
|
```bash
|
|
729
|
-
git clone https://github.com/
|
|
262
|
+
git clone https://github.com/lua-ai-global/lua-cli.git
|
|
730
263
|
cd lua-cli
|
|
731
264
|
npm install
|
|
732
265
|
npm run build
|
|
733
266
|
npm link
|
|
267
|
+
npm test
|
|
734
268
|
```
|
|
735
269
|
|
|
736
270
|
---
|
|
737
271
|
|
|
738
|
-
##
|
|
272
|
+
## Architecture
|
|
739
273
|
|
|
740
|
-
|
|
741
|
-
- Handle product queries
|
|
742
|
-
- Process returns and refunds
|
|
743
|
-
- Escalate complex issues
|
|
744
|
-
- Track support tickets
|
|
274
|
+
lua-cli is part of a distributed platform:
|
|
745
275
|
|
|
746
|
-
|
|
747
|
-
-
|
|
748
|
-
-
|
|
749
|
-
-
|
|
750
|
-
-
|
|
276
|
+
- **lua-cli** - Developer tool (this repo)
|
|
277
|
+
- **lua-api** - API gateway
|
|
278
|
+
- **lua-agents** - Business logic service (CRUD, MongoDB)
|
|
279
|
+
- **lua-core** - Agent runtime (Mastra, VM sandbox, streaming)
|
|
280
|
+
- **lua-auth** - Authentication service
|
|
751
281
|
|
|
752
|
-
|
|
753
|
-
- Query databases
|
|
754
|
-
- Generate reports
|
|
755
|
-
- Visualize data
|
|
756
|
-
- Schedule analytics jobs
|
|
757
|
-
|
|
758
|
-
### Automation
|
|
759
|
-
- Scheduled reminders
|
|
760
|
-
- Data synchronization
|
|
761
|
-
- Health monitoring
|
|
762
|
-
- Batch processing
|
|
282
|
+
[**→ Architecture Details**](CLAUDE.md)
|
|
763
283
|
|
|
764
284
|
---
|
|
765
285
|
|
|
766
|
-
##
|
|
767
|
-
|
|
768
|
-
### Getting Help
|
|
769
|
-
|
|
770
|
-
- **Documentation:** https://docs.heylua.ai
|
|
771
|
-
- **Email:** support@heylua.ai
|
|
772
|
-
- **GitHub Issues:** https://github.com/heylua/lua-cli/issues
|
|
773
|
-
- **Community:** https://community.heylua.ai
|
|
774
|
-
|
|
775
|
-
### Common Issues
|
|
776
|
-
|
|
777
|
-
**Q: How do I get an API key?**
|
|
778
|
-
Visit https://admin.heylua.ai and create an account.
|
|
779
|
-
|
|
780
|
-
**Q: Can I use this in production?**
|
|
781
|
-
Yes! v3.0.0 is production-ready with comprehensive testing and error handling.
|
|
286
|
+
## Support
|
|
782
287
|
|
|
783
|
-
**
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
**Q: Does this work with TypeScript?**
|
|
789
|
-
Yes! Full TypeScript support with type definitions included.
|
|
790
|
-
|
|
791
|
-
**Q: Can I deploy from CI/CD?**
|
|
792
|
-
Yes! Use environment variables and `lua push all --force --auto-deploy`.
|
|
288
|
+
- **Documentation**: [docs.heylua.ai](https://docs.heylua.ai)
|
|
289
|
+
- **Email**: support@heylua.ai
|
|
290
|
+
- **GitHub Issues**: [github.com/lua-ai-global/lua-cli/issues](https://github.com/lua-ai-global/lua-cli/issues)
|
|
291
|
+
- **Admin Dashboard**: [admin.heylua.ai](https://admin.heylua.ai)
|
|
793
292
|
|
|
794
293
|
---
|
|
795
294
|
|
|
796
|
-
##
|
|
295
|
+
## License
|
|
797
296
|
|
|
798
297
|
MIT License - see [LICENSE](LICENSE) file for details.
|
|
799
298
|
|
|
800
299
|
---
|
|
801
300
|
|
|
802
|
-
##
|
|
803
|
-
|
|
804
|
-
Built with:
|
|
805
|
-
- [TypeScript](https://www.typescriptlang.org/)
|
|
806
|
-
- [Zod](https://zod.dev/) - Schema validation
|
|
807
|
-
- [esbuild](https://esbuild.github.io/) - Fast bundling
|
|
808
|
-
- [Commander.js](https://github.com/tj/commander.js/) - CLI framework
|
|
809
|
-
- [Inquirer](https://github.com/SBoudrias/Inquirer.js/) - Interactive prompts
|
|
810
|
-
|
|
811
|
-
---
|
|
812
|
-
|
|
813
|
-
## 🔗 Links
|
|
301
|
+
## Links
|
|
814
302
|
|
|
815
|
-
- **Website
|
|
816
|
-
- **Documentation
|
|
817
|
-
- **
|
|
818
|
-
- **
|
|
819
|
-
- **GitHub:** https://github.com/heylua/lua-cli
|
|
820
|
-
|
|
821
|
-
---
|
|
822
|
-
|
|
823
|
-
## 📈 Roadmap
|
|
824
|
-
|
|
825
|
-
### Coming Soon
|
|
826
|
-
- 🔄 Real-time collaboration tools
|
|
827
|
-
- 📊 Built-in analytics dashboard
|
|
828
|
-
- 🎨 Visual skill builder
|
|
829
|
-
- 🔌 More integration templates
|
|
830
|
-
- 📱 Mobile SDK
|
|
831
|
-
|
|
832
|
-
### In Progress
|
|
833
|
-
- ✅ Enhanced error reporting
|
|
834
|
-
- ✅ Performance optimizations
|
|
835
|
-
- ✅ More example templates
|
|
836
|
-
- ✅ Improved documentation
|
|
837
|
-
|
|
838
|
-
---
|
|
839
|
-
|
|
840
|
-
## 💬 Community
|
|
841
|
-
|
|
842
|
-
Join the Lua community:
|
|
843
|
-
|
|
844
|
-
- **Discord:** Coming soon
|
|
845
|
-
- **Twitter:** @heylua_ai
|
|
846
|
-
- **Blog:** https://heylua.ai/blog
|
|
847
|
-
|
|
848
|
-
Share your agents, get help, and learn from others!
|
|
303
|
+
- **Website**: [heylua.ai](https://heylua.ai)
|
|
304
|
+
- **Documentation**: [docs.heylua.ai](https://docs.heylua.ai)
|
|
305
|
+
- **npm Package**: [npmjs.com/package/lua-cli](https://www.npmjs.com/package/lua-cli)
|
|
306
|
+
- **GitHub**: [github.com/lua-ai-global/lua-cli](https://github.com/lua-ai-global/lua-cli)
|
|
849
307
|
|
|
850
308
|
---
|
|
851
309
|
|
|
852
310
|
*Made with ❤️ by the Lua team*
|
|
853
311
|
|
|
854
|
-
**Version:** 3.0.
|
|
855
|
-
**Last Updated:**
|
|
856
|
-
|
|
857
|
-
---
|
|
858
|
-
|
|
859
|
-
## Quick Links
|
|
860
|
-
|
|
861
|
-
- [Quick Start →](template/QUICKSTART.md)
|
|
862
|
-
- [API Documentation →](API_REFERENCE.md)
|
|
863
|
-
- [Template Examples →](template/)
|
|
864
|
-
- [Changelog →](CHANGELOG.md)
|
|
865
|
-
|
|
312
|
+
**Version:** 3.5.0-alpha.3
|
|
313
|
+
**Last Updated:** February 2026
|