lua-cli 3.12.2 → 3.14.0
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 +14 -13
- package/dist/api/agent.api.service.d.ts +20 -20
- package/dist/api/agent.api.service.d.ts.map +1 -1
- package/dist/api/agent.api.service.js +1 -1
- package/dist/api/agent.api.service.js.map +1 -1
- package/dist/api/agents.api.service.d.ts +3 -3
- package/dist/api/agents.api.service.d.ts.map +1 -1
- package/dist/api/agents.api.service.js +11 -9
- package/dist/api/agents.api.service.js.map +1 -1
- package/dist/api/ai.api.service.d.ts +4 -4
- package/dist/api/ai.api.service.d.ts.map +1 -1
- package/dist/api/ai.api.service.js +10 -8
- package/dist/api/ai.api.service.js.map +1 -1
- package/dist/api/auth.api.service.d.ts +3 -3
- package/dist/api/auth.api.service.d.ts.map +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.map +1 -1
- package/dist/api/backup.api.service.js +21 -7
- package/dist/api/backup.api.service.js.map +1 -1
- package/dist/api/basket.api.service.d.ts +5 -5
- package/dist/api/basket.api.service.d.ts.map +1 -1
- package/dist/api/basket.api.service.js +4 -4
- package/dist/api/basket.api.service.js.map +1 -1
- package/dist/api/cdn.api.service.d.ts +1 -1
- package/dist/api/cdn.api.service.js +3 -3
- package/dist/api/cdn.api.service.js.map +1 -1
- package/dist/api/chat.api.service.d.ts +4 -4
- package/dist/api/chat.api.service.js +3 -3
- package/dist/api/chat.api.service.js.map +1 -1
- package/dist/api/credentials.js +3 -3
- package/dist/api/custom.data.api.service.d.ts +4 -4
- package/dist/api/custom.data.api.service.d.ts.map +1 -1
- package/dist/api/custom.data.api.service.js +2 -2
- package/dist/api/custom.data.api.service.js.map +1 -1
- package/dist/api/developer.api.service.d.ts +3 -3
- package/dist/api/developer.api.service.d.ts.map +1 -1
- package/dist/api/developer.api.service.js +7 -3
- package/dist/api/developer.api.service.js.map +1 -1
- package/dist/api/device-trigger.api.service.d.ts +3 -3
- package/dist/api/device-trigger.api.service.d.ts.map +1 -1
- package/dist/api/device-trigger.api.service.js +1 -1
- package/dist/api/device-trigger.api.service.js.map +1 -1
- package/dist/api/device.api.service.d.ts +3 -3
- package/dist/api/device.api.service.d.ts.map +1 -1
- package/dist/api/device.api.service.js +1 -1
- package/dist/api/device.api.service.js.map +1 -1
- package/dist/api/http.client.d.ts +1 -1
- package/dist/api/http.client.d.ts.map +1 -1
- package/dist/api/http.client.js +6 -6
- package/dist/api/http.client.js.map +1 -1
- package/dist/api/job.api.service.d.ts +13 -14
- package/dist/api/job.api.service.d.ts.map +1 -1
- package/dist/api/job.api.service.js +12 -20
- package/dist/api/job.api.service.js.map +1 -1
- package/dist/api/lazy-instances.d.ts +12 -12
- package/dist/api/lazy-instances.js +14 -14
- package/dist/api/logs.api.service.d.ts +9 -6
- package/dist/api/logs.api.service.d.ts.map +1 -1
- package/dist/api/logs.api.service.js +12 -11
- package/dist/api/logs.api.service.js.map +1 -1
- package/dist/api/marketplace.api.service.d.ts +1 -1
- package/dist/api/marketplace.api.service.d.ts.map +1 -1
- package/dist/api/marketplace.api.service.js +18 -18
- package/dist/api/marketplace.api.service.js.map +1 -1
- package/dist/api/order.api.service.d.ts +4 -4
- package/dist/api/order.api.service.d.ts.map +1 -1
- package/dist/api/order.api.service.js +2 -2
- package/dist/api/order.api.service.js.map +1 -1
- package/dist/api/persona.api.service.d.ts +3 -3
- package/dist/api/persona.api.service.d.ts.map +1 -1
- package/dist/api/persona.api.service.js +2 -2
- package/dist/api/persona.api.service.js.map +1 -1
- package/dist/api/postprocessor.api.service.d.ts +8 -9
- package/dist/api/postprocessor.api.service.d.ts.map +1 -1
- package/dist/api/postprocessor.api.service.js +1 -2
- package/dist/api/postprocessor.api.service.js.map +1 -1
- package/dist/api/preprocessor.api.service.d.ts +8 -9
- package/dist/api/preprocessor.api.service.d.ts.map +1 -1
- package/dist/api/preprocessor.api.service.js +1 -2
- package/dist/api/preprocessor.api.service.js.map +1 -1
- package/dist/api/products.api.service.d.ts +9 -9
- package/dist/api/products.api.service.d.ts.map +1 -1
- package/dist/api/products.api.service.js +10 -10
- package/dist/api/products.api.service.js.map +1 -1
- package/dist/api/resource.api.service.d.ts +2 -2
- package/dist/api/resource.api.service.js +1 -1
- package/dist/api/skills.api.service.d.ts +4 -4
- package/dist/api/skills.api.service.d.ts.map +1 -1
- 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 +2 -2
- package/dist/api/tool.api.service.js +1 -1
- package/dist/api/unifiedto.api.service.d.ts +3 -3
- package/dist/api/unifiedto.api.service.d.ts.map +1 -1
- package/dist/api/unifiedto.api.service.js +28 -10
- package/dist/api/unifiedto.api.service.js.map +1 -1
- package/dist/api/user.data.api.service.d.ts +6 -6
- package/dist/api/user.data.api.service.d.ts.map +1 -1
- package/dist/api/user.data.api.service.js +5 -5
- package/dist/api/user.data.api.service.js.map +1 -1
- package/dist/api/webhook.api.service.d.ts +3 -3
- package/dist/api/webhook.api.service.d.ts.map +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 +3 -3
- package/dist/api/whatsapp-templates.api.service.js +1 -1
- package/dist/api-exports.d.ts +25 -25
- package/dist/api-exports.d.ts.map +1 -1
- package/dist/api-exports.js +26 -26
- package/dist/api-exports.js.map +1 -1
- package/dist/cli/command-definitions.d.ts +1 -1
- package/dist/cli/command-definitions.d.ts.map +1 -1
- package/dist/cli/command-definitions.js +209 -196
- package/dist/cli/command-definitions.js.map +1 -1
- package/dist/commands/agents.js +2 -2
- package/dist/commands/apiKey.js +12 -12
- package/dist/commands/channels.d.ts.map +1 -1
- package/dist/commands/channels.js +165 -174
- package/dist/commands/channels.js.map +1 -1
- package/dist/commands/chat-log-probe.d.ts +59 -0
- package/dist/commands/chat-log-probe.d.ts.map +1 -0
- package/dist/commands/chat-log-probe.js +87 -0
- package/dist/commands/chat-log-probe.js.map +1 -0
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +143 -40
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/chatClear.d.ts.map +1 -1
- package/dist/commands/chatClear.js +10 -6
- package/dist/commands/chatClear.js.map +1 -1
- package/dist/commands/compile.d.ts +7 -0
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +49 -12
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +8 -9
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/configure.js +5 -5
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +132 -35
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/destroy.d.ts.map +1 -1
- package/dist/commands/destroy.js +27 -17
- package/dist/commands/destroy.js.map +1 -1
- package/dist/commands/devices.d.ts.map +1 -1
- package/dist/commands/devices.js +4 -5
- package/dist/commands/devices.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +101 -80
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/features.d.ts.map +1 -1
- package/dist/commands/features.js +71 -82
- package/dist/commands/features.js.map +1 -1
- package/dist/commands/governance.d.ts.map +1 -1
- package/dist/commands/governance.js +17 -15
- package/dist/commands/governance.js.map +1 -1
- package/dist/commands/index.d.ts +37 -36
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +37 -36
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +80 -70
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/integrations.d.ts.map +1 -1
- package/dist/commands/integrations.js +373 -341
- package/dist/commands/integrations.js.map +1 -1
- package/dist/commands/jobs.d.ts.map +1 -1
- package/dist/commands/jobs.js +110 -78
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/log-tip.d.ts +79 -0
- package/dist/commands/log-tip.d.ts.map +1 -0
- package/dist/commands/log-tip.js +83 -0
- package/dist/commands/log-tip.js.map +1 -0
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +166 -198
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/marketplace.d.ts.map +1 -1
- package/dist/commands/marketplace.js +381 -427
- package/dist/commands/marketplace.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +54 -56
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/models.d.ts.map +1 -1
- package/dist/commands/models.js +4 -3
- package/dist/commands/models.js.map +1 -1
- package/dist/commands/persona.d.ts.map +1 -1
- package/dist/commands/persona.js +100 -126
- package/dist/commands/persona.js.map +1 -1
- package/dist/commands/postprocessors.d.ts.map +1 -1
- package/dist/commands/postprocessors.js +87 -61
- package/dist/commands/postprocessors.js.map +1 -1
- package/dist/commands/preprocessors.d.ts.map +1 -1
- package/dist/commands/preprocessors.js +87 -61
- package/dist/commands/preprocessors.js.map +1 -1
- package/dist/commands/production.d.ts.map +1 -1
- package/dist/commands/production.js +101 -113
- package/dist/commands/production.js.map +1 -1
- package/dist/commands/push-helpers.d.ts +42 -0
- package/dist/commands/push-helpers.d.ts.map +1 -0
- package/dist/commands/push-helpers.js +48 -0
- package/dist/commands/push-helpers.js.map +1 -0
- package/dist/commands/push.d.ts +2 -0
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +388 -124
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/pushBackup.d.ts.map +1 -1
- package/dist/commands/pushBackup.js +8 -4
- package/dist/commands/pushBackup.js.map +1 -1
- package/dist/commands/resources.d.ts.map +1 -1
- package/dist/commands/resources.js +47 -60
- package/dist/commands/resources.js.map +1 -1
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +117 -89
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/status.d.ts +14 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +731 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +70 -30
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/telemetry.d.ts.map +1 -1
- package/dist/commands/telemetry.js +4 -0
- package/dist/commands/telemetry.js.map +1 -1
- package/dist/commands/test-output.helpers.d.ts +24 -0
- package/dist/commands/test-output.helpers.d.ts.map +1 -0
- package/dist/commands/test-output.helpers.js +62 -0
- package/dist/commands/test-output.helpers.js.map +1 -0
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +291 -121
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +15 -3
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/webhooks.d.ts.map +1 -1
- package/dist/commands/webhooks.js +94 -87
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/compiler/agent-traverser.d.ts +50 -14
- package/dist/compiler/agent-traverser.d.ts.map +1 -1
- package/dist/compiler/agent-traverser.js +189 -86
- package/dist/compiler/agent-traverser.js.map +1 -1
- package/dist/compiler/bundler.d.ts.map +1 -1
- package/dist/compiler/bundler.js +5 -5
- package/dist/compiler/bundler.js.map +1 -1
- package/dist/compiler/compiler.d.ts +32 -0
- package/dist/compiler/compiler.d.ts.map +1 -1
- package/dist/compiler/compiler.js +154 -28
- package/dist/compiler/compiler.js.map +1 -1
- package/dist/compiler/index.d.ts +3 -3
- package/dist/compiler/index.d.ts.map +1 -1
- package/dist/compiler/index.js +3 -3
- package/dist/compiler/index.js.map +1 -1
- package/dist/compiler/plugins/agent.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/agent.plugin.js +2 -4
- package/dist/compiler/plugins/agent.plugin.js.map +1 -1
- package/dist/compiler/plugins/base.d.ts +21 -0
- package/dist/compiler/plugins/base.d.ts.map +1 -1
- package/dist/compiler/plugins/base.js +13 -3
- package/dist/compiler/plugins/base.js.map +1 -1
- package/dist/compiler/plugins/device-trigger.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/device-trigger.plugin.js +8 -4
- package/dist/compiler/plugins/device-trigger.plugin.js.map +1 -1
- package/dist/compiler/plugins/device.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/device.plugin.js +4 -4
- package/dist/compiler/plugins/device.plugin.js.map +1 -1
- package/dist/compiler/plugins/job.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/job.plugin.js +15 -11
- package/dist/compiler/plugins/job.plugin.js.map +1 -1
- package/dist/compiler/plugins/mcp-server.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/mcp-server.plugin.js +10 -4
- package/dist/compiler/plugins/mcp-server.plugin.js.map +1 -1
- package/dist/compiler/plugins/registry.js +2 -2
- package/dist/compiler/plugins/registry.js.map +1 -1
- package/dist/compiler/plugins/skill.plugin.d.ts +35 -9
- package/dist/compiler/plugins/skill.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/skill.plugin.js +129 -87
- package/dist/compiler/plugins/skill.plugin.js.map +1 -1
- package/dist/compiler/plugins/tool.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/tool.plugin.js +13 -9
- package/dist/compiler/plugins/tool.plugin.js.map +1 -1
- package/dist/compiler/plugins/webhook.plugin.d.ts.map +1 -1
- package/dist/compiler/plugins/webhook.plugin.js +7 -5
- package/dist/compiler/plugins/webhook.plugin.js.map +1 -1
- package/dist/compiler/source-writer.d.ts.map +1 -1
- package/dist/compiler/source-writer.js +2 -4
- package/dist/compiler/source-writer.js.map +1 -1
- package/dist/compiler/types.d.ts +33 -0
- package/dist/compiler/types.d.ts.map +1 -1
- package/dist/compiler/types.js.map +1 -1
- package/dist/compiler/utils/ast-helpers.d.ts +1 -16
- package/dist/compiler/utils/ast-helpers.d.ts.map +1 -1
- package/dist/compiler/utils/ast-helpers.js +14 -38
- package/dist/compiler/utils/ast-helpers.js.map +1 -1
- package/dist/compiler/utils/common.d.ts +14 -0
- package/dist/compiler/utils/common.d.ts.map +1 -1
- package/dist/compiler/utils/common.js +39 -11
- package/dist/compiler/utils/common.js.map +1 -1
- package/dist/compiler/utils/file-discovery.d.ts.map +1 -1
- package/dist/compiler/utils/file-discovery.js +2 -10
- package/dist/compiler/utils/file-discovery.js.map +1 -1
- package/dist/compiler/utils/path-resolver.d.ts +67 -10
- package/dist/compiler/utils/path-resolver.d.ts.map +1 -1
- package/dist/compiler/utils/path-resolver.js +120 -24
- package/dist/compiler/utils/path-resolver.js.map +1 -1
- package/dist/compiler/utils/reference-resolver.d.ts +196 -0
- package/dist/compiler/utils/reference-resolver.d.ts.map +1 -0
- package/dist/compiler/utils/reference-resolver.js +1026 -0
- package/dist/compiler/utils/reference-resolver.js.map +1 -0
- package/dist/compiler/utils/schema-converter.d.ts +25 -0
- package/dist/compiler/utils/schema-converter.d.ts.map +1 -1
- package/dist/compiler/utils/schema-converter.js +80 -4
- package/dist/compiler/utils/schema-converter.js.map +1 -1
- package/dist/compiler/utils/workspace.d.ts +35 -0
- package/dist/compiler/utils/workspace.d.ts.map +1 -0
- package/dist/compiler/utils/workspace.js +121 -0
- package/dist/compiler/utils/workspace.js.map +1 -0
- package/dist/compiler/utils/zod-runtime.mjs +5334 -0
- package/dist/config/compile.constants.d.ts.map +1 -1
- package/dist/config/compile.constants.js +3 -1
- package/dist/config/compile.constants.js.map +1 -1
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +1 -5
- package/dist/config/constants.js.map +1 -1
- package/dist/errors/auth.error.d.ts.map +1 -1
- package/dist/errors/auth.error.js +3 -5
- package/dist/errors/auth.error.js.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/instances/basket.instance.d.ts +3 -3
- package/dist/instances/basket.instance.d.ts.map +1 -1
- package/dist/instances/basket.instance.js +26 -8
- package/dist/instances/basket.instance.js.map +1 -1
- package/dist/instances/data.entry.instance.d.ts +2 -2
- package/dist/instances/data.entry.instance.d.ts.map +1 -1
- package/dist/instances/data.entry.instance.js +5 -5
- package/dist/instances/data.entry.instance.js.map +1 -1
- package/dist/instances/order.instance.d.ts +2 -2
- package/dist/instances/order.instance.d.ts.map +1 -1
- package/dist/instances/order.instance.js +20 -9
- package/dist/instances/order.instance.js.map +1 -1
- package/dist/instances/product.instance.d.ts +1 -1
- package/dist/instances/product.instance.d.ts.map +1 -1
- package/dist/instances/product.instance.js +3 -3
- package/dist/instances/product.instance.js.map +1 -1
- package/dist/instances/product.pagination.instance.d.ts +2 -2
- package/dist/instances/product.pagination.instance.d.ts.map +1 -1
- package/dist/instances/product.pagination.instance.js +6 -7
- package/dist/instances/product.pagination.instance.js.map +1 -1
- package/dist/instances/product.search.instance.d.ts +3 -3
- package/dist/instances/product.search.instance.d.ts.map +1 -1
- package/dist/instances/product.search.instance.js +3 -4
- package/dist/instances/product.search.instance.js.map +1 -1
- package/dist/instances/user.instance.d.ts +3 -3
- package/dist/instances/user.instance.d.ts.map +1 -1
- package/dist/instances/user.instance.js +19 -36
- package/dist/instances/user.instance.js.map +1 -1
- package/dist/interfaces/agent.d.ts +8 -8
- package/dist/interfaces/agent.d.ts.map +1 -1
- package/dist/interfaces/backup.d.ts +19 -1
- package/dist/interfaces/backup.d.ts.map +1 -1
- package/dist/interfaces/device-triggers.d.ts +0 -2
- package/dist/interfaces/device-triggers.d.ts.map +1 -1
- package/dist/interfaces/devices.d.ts +0 -1
- package/dist/interfaces/devices.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts +8 -8
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/jobs.d.ts +2 -3
- package/dist/interfaces/jobs.d.ts.map +1 -1
- package/dist/interfaces/logs.d.ts +7 -4
- package/dist/interfaces/logs.d.ts.map +1 -1
- package/dist/interfaces/message.d.ts +3 -3
- package/dist/interfaces/message.d.ts.map +1 -1
- package/dist/interfaces/orders.d.ts +1 -1
- package/dist/interfaces/webhooks.d.ts +2 -2
- package/dist/interfaces/webhooks.d.ts.map +1 -1
- package/dist/primitives/agent.handler.d.ts.map +1 -1
- package/dist/primitives/agent.handler.js +1 -1
- package/dist/primitives/agent.handler.js.map +1 -1
- package/dist/primitives/base.handler.d.ts +12 -2
- package/dist/primitives/base.handler.d.ts.map +1 -1
- package/dist/primitives/base.handler.js +104 -73
- package/dist/primitives/base.handler.js.map +1 -1
- package/dist/primitives/device-trigger.handler.d.ts +1 -1
- package/dist/primitives/device-trigger.handler.d.ts.map +1 -1
- package/dist/primitives/device-trigger.handler.js +2 -3
- package/dist/primitives/device-trigger.handler.js.map +1 -1
- package/dist/primitives/device.handler.d.ts +1 -1
- package/dist/primitives/device.handler.d.ts.map +1 -1
- package/dist/primitives/device.handler.js +2 -3
- package/dist/primitives/device.handler.js.map +1 -1
- package/dist/primitives/index.d.ts +1 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +2 -3
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/job.handler.d.ts +6 -1
- package/dist/primitives/job.handler.d.ts.map +1 -1
- package/dist/primitives/job.handler.js +9 -3
- package/dist/primitives/job.handler.js.map +1 -1
- package/dist/primitives/mcp-server.handler.d.ts.map +1 -1
- package/dist/primitives/mcp-server.handler.js +2 -2
- package/dist/primitives/mcp-server.handler.js.map +1 -1
- package/dist/primitives/postprocessor.handler.d.ts.map +1 -1
- package/dist/primitives/postprocessor.handler.js.map +1 -1
- package/dist/primitives/preprocessor.handler.d.ts +1 -1
- package/dist/primitives/preprocessor.handler.d.ts.map +1 -1
- package/dist/primitives/preprocessor.handler.js +2 -3
- package/dist/primitives/preprocessor.handler.js.map +1 -1
- package/dist/primitives/skill.handler.d.ts +1 -1
- package/dist/primitives/skill.handler.d.ts.map +1 -1
- package/dist/primitives/skill.handler.js +34 -13
- package/dist/primitives/skill.handler.js.map +1 -1
- package/dist/primitives/types.d.ts +1 -1
- package/dist/primitives/types.d.ts.map +1 -1
- package/dist/primitives/types.js.map +1 -1
- package/dist/primitives/webhook.handler.d.ts +3 -2
- package/dist/primitives/webhook.handler.d.ts.map +1 -1
- package/dist/primitives/webhook.handler.js +9 -4
- package/dist/primitives/webhook.handler.js.map +1 -1
- package/dist/services/analytics.d.ts.map +1 -1
- package/dist/services/analytics.js +4 -5
- package/dist/services/analytics.js.map +1 -1
- package/dist/services/auth.d.ts +9 -1
- package/dist/services/auth.d.ts.map +1 -1
- package/dist/services/auth.js +26 -7
- package/dist/services/auth.js.map +1 -1
- package/dist/services/sandbox.service.d.ts.map +1 -1
- package/dist/services/sandbox.service.js +132 -80
- package/dist/services/sandbox.service.js.map +1 -1
- package/dist/types/api-contracts.d.ts +4 -4
- package/dist/types/api-contracts.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/skill.d.ts +7 -7
- package/dist/types/skill.d.ts.map +1 -1
- package/dist/types/skill.js +2 -2
- package/dist/types/skill.js.map +1 -1
- package/dist/types/tool-validation.js.map +1 -1
- package/dist/types/yaml.types.js +0 -1
- package/dist/types/yaml.types.js.map +1 -1
- package/dist/utils/aliases.d.ts +7 -0
- package/dist/utils/aliases.d.ts.map +1 -0
- package/dist/utils/aliases.js +492 -0
- package/dist/utils/aliases.js.map +1 -0
- package/dist/utils/artifact-loader.d.ts +9 -0
- package/dist/utils/artifact-loader.d.ts.map +1 -1
- package/dist/utils/artifact-loader.js +16 -6
- package/dist/utils/artifact-loader.js.map +1 -1
- package/dist/utils/auth-flows.d.ts.map +1 -1
- package/dist/utils/auth-flows.js +54 -54
- package/dist/utils/auth-flows.js.map +1 -1
- package/dist/utils/backup-helpers.d.ts +24 -0
- package/dist/utils/backup-helpers.d.ts.map +1 -1
- package/dist/utils/backup-helpers.js +102 -22
- package/dist/utils/backup-helpers.js.map +1 -1
- package/dist/utils/bundle-upload.d.ts +42 -0
- package/dist/utils/bundle-upload.d.ts.map +1 -0
- package/dist/utils/bundle-upload.js +90 -0
- package/dist/utils/bundle-upload.js.map +1 -0
- package/dist/utils/chat-attachments.js +1 -1
- package/dist/utils/chat-attachments.js.map +1 -1
- package/dist/utils/cli.d.ts +24 -6
- package/dist/utils/cli.d.ts.map +1 -1
- package/dist/utils/cli.js +26 -14
- package/dist/utils/cli.js.map +1 -1
- package/dist/utils/command-utils.d.ts.map +1 -1
- package/dist/utils/command-utils.js +4 -4
- package/dist/utils/command-utils.js.map +1 -1
- package/dist/utils/deploy-helpers.d.ts.map +1 -1
- package/dist/utils/deploy-helpers.js +13 -13
- package/dist/utils/deploy-helpers.js.map +1 -1
- package/dist/utils/env-loader.utils.d.ts +1 -1
- package/dist/utils/env-loader.utils.d.ts.map +1 -1
- package/dist/utils/env-loader.utils.js +15 -22
- package/dist/utils/env-loader.utils.js.map +1 -1
- package/dist/utils/files.d.ts.map +1 -1
- package/dist/utils/files.js +23 -13
- package/dist/utils/files.js.map +1 -1
- package/dist/utils/hints.d.ts +81 -0
- package/dist/utils/hints.d.ts.map +1 -0
- package/dist/utils/hints.js +81 -0
- package/dist/utils/hints.js.map +1 -0
- package/dist/utils/init-agent.d.ts.map +1 -1
- package/dist/utils/init-agent.js +18 -20
- package/dist/utils/init-agent.js.map +1 -1
- package/dist/utils/init-helpers.d.ts.map +1 -1
- package/dist/utils/init-helpers.js +11 -11
- package/dist/utils/init-helpers.js.map +1 -1
- package/dist/utils/init-prompts.d.ts.map +1 -1
- package/dist/utils/init-prompts.js +34 -36
- package/dist/utils/init-prompts.js.map +1 -1
- package/dist/utils/prompt-handler.js +1 -1
- package/dist/utils/prompt-handler.js.map +1 -1
- package/dist/utils/sandbox-storage.d.ts.map +1 -1
- package/dist/utils/sandbox-storage.js.map +1 -1
- package/dist/utils/sandbox.d.ts +1 -1
- package/dist/utils/sandbox.d.ts.map +1 -1
- package/dist/utils/sandbox.js +107 -106
- package/dist/utils/sandbox.js.map +1 -1
- package/dist/utils/semver.js +1 -1
- package/dist/utils/semver.js.map +1 -1
- package/dist/utils/suggest.d.ts +3 -0
- package/dist/utils/suggest.d.ts.map +1 -0
- package/dist/utils/suggest.js +32 -0
- package/dist/utils/suggest.js.map +1 -0
- package/dist/utils/sync-display.d.ts.map +1 -1
- package/dist/utils/sync-display.js +15 -13
- package/dist/utils/sync-display.js.map +1 -1
- package/dist/utils/sync-fetch.d.ts.map +1 -1
- package/dist/utils/sync-fetch.js +33 -24
- package/dist/utils/sync-fetch.js.map +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/write-info.d.ts +9 -0
- package/dist/utils/write-info.d.ts.map +1 -0
- package/dist/utils/write-info.js +11 -0
- package/dist/utils/write-info.js.map +1 -0
- package/docs/README.md +1 -1
- package/node_modules/@lua/shared-types/dist/index.d.mts +76 -2
- package/node_modules/@lua/shared-types/dist/index.d.ts +76 -2
- package/node_modules/@lua/shared-types/dist/index.js +27 -0
- package/node_modules/@lua/shared-types/dist/index.mjs +24 -0
- package/node_modules/@lua/shared-types/src/ai-generate.types.ts +1 -6
- package/node_modules/@lua/shared-types/src/ai-generate.utils.ts +1 -4
- package/node_modules/@lua/shared-types/src/channel.type.ts +1 -0
- package/node_modules/@lua/shared-types/src/chat-stream.types.ts +11 -0
- package/node_modules/@lua/shared-types/src/client-tools.types.ts +47 -0
- package/node_modules/@lua/shared-types/src/device.types.ts +6 -6
- package/node_modules/@lua/shared-types/src/index.ts +3 -0
- package/node_modules/@lua/shared-types/src/sandbox-contract.ts +26 -5
- package/node_modules/@lua/shared-types/src/vm-execution-log.types.ts +41 -0
- package/package.json +10 -6
- package/scripts/build-vendor.mjs +53 -0
- package/scripts/vendor-entry.mjs +11 -0
- package/template/QUICKSTART.md +33 -33
- package/template/README.md +35 -34
- package/template/examples/README.md +44 -38
- package/template/examples/jobs/AbandonedBasketProcessorJob.ts +30 -31
- package/template/examples/jobs/DailyCleanupJob.ts +17 -18
- package/template/examples/jobs/DataMigrationJob.ts +18 -23
- package/template/examples/jobs/HealthCheckJob.ts +13 -14
- package/template/examples/postprocessors/modifyResponse.ts +14 -15
- package/template/examples/preprocessors/messageMatching.ts +28 -29
- package/template/examples/services/ApiService.ts +68 -64
- package/template/examples/services/GetWeather.ts +39 -33
- package/template/examples/skills/basket.skill.ts +27 -7
- package/template/examples/skills/product.skill.ts +21 -8
- package/template/examples/skills/tools/BasketTool.ts +97 -98
- package/template/examples/skills/tools/CreateInlineJob.ts +38 -36
- package/template/examples/skills/tools/CreatePostTool.ts +27 -28
- package/template/examples/skills/tools/CustomDataTool.ts +72 -67
- package/template/examples/skills/tools/GameScoreTrackerTool.ts +72 -78
- package/template/examples/skills/tools/GetWeatherTool.ts +43 -45
- package/template/examples/skills/tools/OrderTool.ts +58 -58
- package/template/examples/skills/tools/PaymentTool.ts +43 -43
- package/template/examples/skills/tools/PremiumFeatureTool.ts +81 -79
- package/template/examples/skills/tools/ProductsTool.ts +68 -69
- package/template/examples/skills/tools/SmartBasketTool.ts +43 -44
- package/template/examples/skills/tools/UserDataTool.ts +97 -98
- package/template/examples/skills/user.skill.ts +7 -8
- package/template/examples/webhooks/FileUploadWebhook.ts +38 -31
- package/template/examples/webhooks/PaymentWebhook.ts +23 -22
- package/template/examples/webhooks/UserEventWebhook.ts +16 -19
- package/template/lua.skill.yaml +2 -2
- package/template/package.json +1 -1
- package/template/src/index.ts +28 -28
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-Injected Tools
|
|
3
|
+
*
|
|
4
|
+
* Lets a chat client (Lua Desktop, custom front-ends, future surfaces) declare
|
|
5
|
+
* tools that the agent can call but the *client* renders/handles. Mirrors the
|
|
6
|
+
* pattern used by Claude Code, OpenAI Apps SDK, and Anthropic's MCP — the
|
|
7
|
+
* surface the user sees gets to add capabilities to the agent without changing
|
|
8
|
+
* the agent itself.
|
|
9
|
+
*
|
|
10
|
+
* Tool calls flow through Mastra's existing `tool-call` stream chunks; the
|
|
11
|
+
* server registers the tool with a no-op `execute` (returns `{ ok: true,
|
|
12
|
+
* clientHandled: true }`) so the model sees a clean ack and can continue. The
|
|
13
|
+
* actual rendering / side-effect happens on the client when it sees the
|
|
14
|
+
* tool-call chunk.
|
|
15
|
+
*
|
|
16
|
+
* Tool names are namespaced server-side as `client__<name>` to avoid collisions
|
|
17
|
+
* with built-in tools (skills, MCP, devices, voice). Same pattern as device
|
|
18
|
+
* tools (`device__<name>__<command>`).
|
|
19
|
+
*/
|
|
20
|
+
export interface ClientToolDef {
|
|
21
|
+
/** Unprefixed tool name as the client refers to it (e.g. "create_artifact"). Server prefixes with `client__`. */
|
|
22
|
+
name: string;
|
|
23
|
+
|
|
24
|
+
/** Human/LLM-readable description of when to call this tool. */
|
|
25
|
+
description: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* JSON Schema for the tool's input. Hydrated server-side into a Zod schema
|
|
29
|
+
* via the shared `jsonSchemaToZod` util. Same subset supported as device
|
|
30
|
+
* tools — object with string/number/boolean/array properties, `required`,
|
|
31
|
+
* `default`, `description`, `enum`.
|
|
32
|
+
*/
|
|
33
|
+
parameters: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Server-side prefix for client tool names. Keeps client tools from
|
|
38
|
+
* shadowing skills, MCP tools, devices (`device__`), or voice tools.
|
|
39
|
+
*/
|
|
40
|
+
export const CLIENT_TOOL_PREFIX = 'client__';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Maximum number of client tools accepted per request. Keeps the model's
|
|
44
|
+
* tool list bounded — at this many tools the model starts losing precision
|
|
45
|
+
* picking the right one anyway.
|
|
46
|
+
*/
|
|
47
|
+
export const CLIENT_TOOLS_MAX = 20;
|
|
@@ -64,11 +64,11 @@ export type DeviceStatus = 'online' | 'offline' | 'registered' | 'disabled';
|
|
|
64
64
|
|
|
65
65
|
/** State of a command in the Valkey state machine */
|
|
66
66
|
export type CommandState =
|
|
67
|
-
| 'PENDING'
|
|
68
|
-
| 'SENT'
|
|
69
|
-
| 'ACK'
|
|
70
|
-
| 'COMPLETED'
|
|
71
|
-
| 'FAILED'
|
|
67
|
+
| 'PENDING' // Command written to stream, not yet consumed
|
|
68
|
+
| 'SENT' // Consumed by target pod, emitted to socket
|
|
69
|
+
| 'ACK' // Device acknowledged receipt via Socket.IO ack
|
|
70
|
+
| 'COMPLETED' // Device responded successfully
|
|
71
|
+
| 'FAILED' // Device responded with error, or validation failed
|
|
72
72
|
| 'TIMED_OUT'; // No response within timeout period
|
|
73
73
|
|
|
74
74
|
// =============================================================================
|
|
@@ -111,7 +111,7 @@ export interface CommandStreamEntry {
|
|
|
111
111
|
export interface ResponseStreamEntry {
|
|
112
112
|
commandId: string;
|
|
113
113
|
success: string; // 'true' or 'false' (Redis streams store strings)
|
|
114
|
-
data?: string;
|
|
114
|
+
data?: string; // JSON-serialized
|
|
115
115
|
error?: string;
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -5,6 +5,9 @@ export * from './ai-generate.utils';
|
|
|
5
5
|
export * from './agent-invocation.types';
|
|
6
6
|
export * from './sandbox-contract';
|
|
7
7
|
export * from './device.types';
|
|
8
|
+
export * from './client-tools.types';
|
|
8
9
|
export * from './model-registry';
|
|
9
10
|
export * from './agent-config.types';
|
|
10
11
|
export * from './persona-defaults';
|
|
12
|
+
export * from './vm-execution-log.types';
|
|
13
|
+
export * from './chat-stream.types';
|
|
@@ -7,19 +7,40 @@
|
|
|
7
7
|
// Required primitive shim names (both class-based and function-based)
|
|
8
8
|
export const REQUIRED_PRIMITIVE_SHIMS = [
|
|
9
9
|
// Class-based
|
|
10
|
-
'LuaTool',
|
|
11
|
-
'
|
|
10
|
+
'LuaTool',
|
|
11
|
+
'LuaSkill',
|
|
12
|
+
'LuaJob',
|
|
13
|
+
'LuaWebhook',
|
|
14
|
+
'PreProcessor',
|
|
15
|
+
'LuaPreprocessor',
|
|
16
|
+
'PostProcessor',
|
|
17
|
+
'LuaPostprocessor',
|
|
12
18
|
'LuaMCPServer',
|
|
13
19
|
// Function-based
|
|
14
|
-
'defineTool',
|
|
15
|
-
'
|
|
20
|
+
'defineTool',
|
|
21
|
+
'defineSkill',
|
|
22
|
+
'defineJob',
|
|
23
|
+
'defineWebhook',
|
|
24
|
+
'definePreProcessor',
|
|
25
|
+
'definePostProcessor',
|
|
26
|
+
'defineMCPServer',
|
|
16
27
|
] as const;
|
|
17
28
|
|
|
18
29
|
// Required platform API globals with their expected methods
|
|
19
30
|
export const REQUIRED_PLATFORM_APIS = {
|
|
20
31
|
User: ['get', 'getChatHistory'],
|
|
21
32
|
Products: ['get', 'create', 'delete', 'search', 'getById'],
|
|
22
|
-
Baskets: [
|
|
33
|
+
Baskets: [
|
|
34
|
+
'create',
|
|
35
|
+
'get',
|
|
36
|
+
'addItem',
|
|
37
|
+
'removeItem',
|
|
38
|
+
'clear',
|
|
39
|
+
'updateStatus',
|
|
40
|
+
'updateMetadata',
|
|
41
|
+
'placeOrder',
|
|
42
|
+
'getById',
|
|
43
|
+
],
|
|
23
44
|
Orders: ['create', 'updateStatus', 'updateData', 'get', 'getById'],
|
|
24
45
|
Data: ['create', 'get', 'getEntry', 'update', 'search', 'delete'],
|
|
25
46
|
Jobs: ['create', 'getJob', 'getAll'],
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// ─── Canonical log-source enum ────────────────────────────────────────────────
|
|
2
|
+
// Single source of truth for all `logSource` values written to the
|
|
3
|
+
// `vmExecutionLogs` collection. Every consumer (lua-core, lua-api, lua-cli,
|
|
4
|
+
// lua-web) must import from here — never define the union inline elsewhere.
|
|
5
|
+
//
|
|
6
|
+
// NOTE: This lives in shared-types (not shared-schemas) so that lightweight
|
|
7
|
+
// consumers such as lua-cli can import it without pulling in Mongoose schemas.
|
|
8
|
+
|
|
9
|
+
export const AGENT_LOG_SOURCES = [
|
|
10
|
+
'skill', // User-defined skill executions
|
|
11
|
+
'job', // Scheduled job executions
|
|
12
|
+
'webhook', // HTTP webhook endpoint executions
|
|
13
|
+
'preprocessor', // Message preprocessor executions
|
|
14
|
+
'postprocessor', // Response postprocessor executions
|
|
15
|
+
'user_message', // Incoming user messages
|
|
16
|
+
'agent_response', // Outgoing agent responses
|
|
17
|
+
'agent_error', // Chat pipeline errors (billing, validation, LLM failures)
|
|
18
|
+
'runtime', // Agent runtime / LLM SDK / MCP transport / framework-level logs
|
|
19
|
+
'mcp', // MCP tool executions
|
|
20
|
+
'rag', // RAG knowledge-base search executions
|
|
21
|
+
'device', // Device command executions
|
|
22
|
+
'device-trigger', // Device trigger handler executions
|
|
23
|
+
] as const;
|
|
24
|
+
|
|
25
|
+
export type AgentLogSource = (typeof AGENT_LOG_SOURCES)[number];
|
|
26
|
+
|
|
27
|
+
export interface AgentLogMetadata {
|
|
28
|
+
userId?: string;
|
|
29
|
+
agentId?: string;
|
|
30
|
+
/** Agent runtime / conversation thread ID for distributed tracing */
|
|
31
|
+
runId?: string;
|
|
32
|
+
logSource?: AgentLogSource;
|
|
33
|
+
/** The ID of the source entity (skillId, jobId, webhookId, etc.) */
|
|
34
|
+
primitiveId?: string;
|
|
35
|
+
/** The display name of the source entity */
|
|
36
|
+
primitiveName?: string;
|
|
37
|
+
toolId?: string;
|
|
38
|
+
toolName?: string;
|
|
39
|
+
/** Messaging channel: 'whatsapp', 'slack', 'email', etc. */
|
|
40
|
+
channel?: string;
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lua-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
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",
|
|
7
7
|
"bin": {
|
|
8
|
-
"lua": "./dist/index.js"
|
|
8
|
+
"lua": "./dist/index.js",
|
|
9
|
+
"heylua": "./dist/index.js",
|
|
10
|
+
"lua-ai": "./dist/index.js"
|
|
9
11
|
},
|
|
10
12
|
"exports": {
|
|
11
13
|
".": "./dist/api-exports.js"
|
|
12
14
|
},
|
|
13
15
|
"scripts": {
|
|
14
16
|
"clean": "rm -rf dist",
|
|
15
|
-
"build": "npm run clean && tsc && chmod +x dist/index.js",
|
|
17
|
+
"build": "npm run clean && tsc && npm run build:vendor && chmod +x dist/index.js",
|
|
18
|
+
"build:vendor": "node scripts/build-vendor.mjs",
|
|
16
19
|
"prepack": "node scripts/resolve-workspace-deps.cjs",
|
|
17
20
|
"postpack": "git checkout package.json",
|
|
18
21
|
"prepublishOnly": "npm run build",
|
|
@@ -61,7 +64,7 @@
|
|
|
61
64
|
"LICENSE"
|
|
62
65
|
],
|
|
63
66
|
"dependencies": {
|
|
64
|
-
"@lua/shared-types": "
|
|
67
|
+
"@lua/shared-types": "0.0.1",
|
|
65
68
|
"@tailwindcss/postcss": "^4.1.14",
|
|
66
69
|
"@tanstack/react-query": "^5.90.11",
|
|
67
70
|
"@truestamp/canonify": "^2.1.0",
|
|
@@ -78,13 +81,15 @@
|
|
|
78
81
|
"posthog-node": "^5.26.0",
|
|
79
82
|
"ts-evaluator": "^2.0.0",
|
|
80
83
|
"ts-morph": "^27.0.0",
|
|
81
|
-
"zod": "^3.
|
|
84
|
+
"zod": "^3.25.76",
|
|
82
85
|
"zod-to-json-schema": "^3.24.6"
|
|
83
86
|
},
|
|
84
87
|
"bundledDependencies": [
|
|
85
88
|
"@lua/shared-types"
|
|
86
89
|
],
|
|
87
90
|
"devDependencies": {
|
|
91
|
+
"@swc/core": "^1.15.0",
|
|
92
|
+
"@swc/jest": "^0.2.39",
|
|
88
93
|
"@types/diff": "^7.0.2",
|
|
89
94
|
"@types/inquirer": "^9.0.9",
|
|
90
95
|
"@types/jest": "^29.5.8",
|
|
@@ -96,7 +101,6 @@
|
|
|
96
101
|
"lodash": "^4.17.21",
|
|
97
102
|
"nock": "^14.0.11",
|
|
98
103
|
"stripe": "^19.2.0",
|
|
99
|
-
"ts-jest": "^29.1.1",
|
|
100
104
|
"ts-node": "^10.9.2",
|
|
101
105
|
"typescript": "^5.9.2"
|
|
102
106
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Bundles `zod` and `zod-to-json-schema` into a single self-contained ESM
|
|
4
|
+
* file at `dist/compiler/utils/zod-runtime.mjs`.
|
|
5
|
+
*
|
|
6
|
+
* Why: `schema-converter.ts` previously did `await import('zod')` at runtime,
|
|
7
|
+
* which made the compiler depend on the user's `lua-cli/node_modules/zod`
|
|
8
|
+
* being intact. Real-world npm/pnpm installs are sometimes corrupted (empty
|
|
9
|
+
* package dirs, partial extracts, hoisting conflicts), causing the dynamic
|
|
10
|
+
* import to throw `ERR_MODULE_NOT_FOUND` and tools to ship with no
|
|
11
|
+
* `inputSchema` — a silent failure that breaks deployed agents.
|
|
12
|
+
*
|
|
13
|
+
* This script ships zod inside lua-cli's own dist folder so resolution is
|
|
14
|
+
* anchored to a path lua-cli fully controls (`import.meta.url`-relative).
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { build } from 'esbuild';
|
|
18
|
+
import { fileURLToPath } from 'node:url';
|
|
19
|
+
import path from 'node:path';
|
|
20
|
+
import fs from 'node:fs/promises';
|
|
21
|
+
|
|
22
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
23
|
+
const __dirname = path.dirname(__filename);
|
|
24
|
+
|
|
25
|
+
const packageRoot = path.resolve(__dirname, '..');
|
|
26
|
+
const entry = path.join(packageRoot, 'scripts', 'vendor-entry.mjs');
|
|
27
|
+
const outdir = path.join(packageRoot, 'dist', 'compiler', 'utils');
|
|
28
|
+
const outfile = path.join(outdir, 'zod-runtime.mjs');
|
|
29
|
+
|
|
30
|
+
await fs.mkdir(outdir, { recursive: true });
|
|
31
|
+
|
|
32
|
+
const result = await build({
|
|
33
|
+
entryPoints: [entry],
|
|
34
|
+
outfile,
|
|
35
|
+
bundle: true,
|
|
36
|
+
format: 'esm',
|
|
37
|
+
platform: 'node',
|
|
38
|
+
target: 'node18',
|
|
39
|
+
// Keep readable bundle so stack traces remain useful when something goes
|
|
40
|
+
// wrong in user-supplied zod schemas.
|
|
41
|
+
minify: false,
|
|
42
|
+
sourcemap: false,
|
|
43
|
+
legalComments: 'none',
|
|
44
|
+
metafile: true,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const stat = await fs.stat(outfile);
|
|
48
|
+
const sizeKb = (stat.size / 1024).toFixed(1);
|
|
49
|
+
|
|
50
|
+
const inputs = Object.keys(result.metafile.inputs).filter(
|
|
51
|
+
(p) => p.includes('node_modules/zod') || p.includes('node_modules/zod-to-json-schema'),
|
|
52
|
+
);
|
|
53
|
+
console.log(`✅ Vendored ${inputs.length} files into dist/compiler/utils/zod-runtime.mjs (${sizeKb} KB)`);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vendor entry point for the schema converter runtime.
|
|
3
|
+
*
|
|
4
|
+
* Bundled by `scripts/build-vendor.mjs` into
|
|
5
|
+
* `dist/compiler/utils/zod-runtime.mjs` so the compiler does not depend on
|
|
6
|
+
* `node_modules/zod` resolution at runtime. See
|
|
7
|
+
* `src/compiler/utils/schema-converter.ts` for the consumer.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export { z } from 'zod';
|
|
11
|
+
export { zodToJsonSchema } from 'zod-to-json-schema';
|
package/template/QUICKSTART.md
CHANGED
|
@@ -21,47 +21,47 @@ mkdir -p src/skills/tools
|
|
|
21
21
|
### Create a tool (`src/skills/tools/MyTool.ts`):
|
|
22
22
|
|
|
23
23
|
```typescript
|
|
24
|
-
import { LuaTool } from
|
|
25
|
-
import { z } from
|
|
24
|
+
import { LuaTool } from 'lua-cli';
|
|
25
|
+
import { z } from 'zod';
|
|
26
26
|
|
|
27
27
|
export default class MyTool implements LuaTool {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
name = 'my_tool';
|
|
29
|
+
description = 'Does something useful';
|
|
30
|
+
|
|
31
|
+
inputSchema = z.object({
|
|
32
|
+
input: z.string().describe('What to process'),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
async execute(input: z.infer<typeof this.inputSchema>) {
|
|
36
|
+
return { result: `Processed: ${input.input}` };
|
|
37
|
+
}
|
|
38
38
|
}
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
### Create a skill (`src/skills/my.skill.ts`):
|
|
42
42
|
|
|
43
43
|
```typescript
|
|
44
|
-
import { LuaSkill } from
|
|
45
|
-
import MyTool from
|
|
44
|
+
import { LuaSkill } from 'lua-cli';
|
|
45
|
+
import MyTool from './tools/MyTool';
|
|
46
46
|
|
|
47
47
|
export default new LuaSkill({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
name: 'my-skill',
|
|
49
|
+
description: 'My custom skill',
|
|
50
|
+
context: 'Use these tools when...',
|
|
51
|
+
tools: [new MyTool()],
|
|
52
52
|
});
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
### Add to your agent (`src/index.ts`):
|
|
56
56
|
|
|
57
57
|
```typescript
|
|
58
|
-
import { LuaAgent } from
|
|
59
|
-
import mySkill from
|
|
58
|
+
import { LuaAgent } from 'lua-cli';
|
|
59
|
+
import mySkill from './skills/my.skill';
|
|
60
60
|
|
|
61
61
|
const agent = new LuaAgent({
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
name: `My Agent`,
|
|
63
|
+
persona: `You are a helpful assistant.`,
|
|
64
|
+
skills: [mySkill],
|
|
65
65
|
});
|
|
66
66
|
```
|
|
67
67
|
|
|
@@ -92,16 +92,16 @@ Or check the documentation: https://docs.heylua.ai/examples
|
|
|
92
92
|
|
|
93
93
|
## 📖 Commands Reference
|
|
94
94
|
|
|
95
|
-
| Command
|
|
96
|
-
|
|
97
|
-
| `lua test`
|
|
98
|
-
| `lua chat`
|
|
99
|
-
| `lua compile` | Compile your code
|
|
100
|
-
| `lua push`
|
|
101
|
-
| `lua deploy`
|
|
102
|
-
| `lua logs`
|
|
103
|
-
| `lua env`
|
|
104
|
-
| `lua persona` | Update agent persona
|
|
95
|
+
| Command | What it does |
|
|
96
|
+
| ------------- | ---------------------------- |
|
|
97
|
+
| `lua test` | Test tools interactively |
|
|
98
|
+
| `lua chat` | Chat with your agent |
|
|
99
|
+
| `lua compile` | Compile your code |
|
|
100
|
+
| `lua push` | Upload to server |
|
|
101
|
+
| `lua deploy` | Deploy to production |
|
|
102
|
+
| `lua logs` | View logs |
|
|
103
|
+
| `lua env` | Manage environment variables |
|
|
104
|
+
| `lua persona` | Update agent persona |
|
|
105
105
|
|
|
106
106
|
## 🔗 Resources
|
|
107
107
|
|
package/template/README.md
CHANGED
|
@@ -37,22 +37,22 @@ mkdir -p src/skills/tools
|
|
|
37
37
|
Create `src/skills/tools/GreetingTool.ts`:
|
|
38
38
|
|
|
39
39
|
```typescript
|
|
40
|
-
import { LuaTool } from
|
|
41
|
-
import { z } from
|
|
40
|
+
import { LuaTool } from 'lua-cli';
|
|
41
|
+
import { z } from 'zod';
|
|
42
42
|
|
|
43
43
|
export default class GreetingTool implements LuaTool {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
name = 'greet_user';
|
|
45
|
+
description = 'Generate a personalized greeting';
|
|
46
|
+
|
|
47
|
+
inputSchema = z.object({
|
|
48
|
+
name: z.string().describe('The name of the person to greet'),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
async execute(input: z.infer<typeof this.inputSchema>) {
|
|
52
|
+
return {
|
|
53
|
+
greeting: `Hello, ${input.name}! How can I help you today?`,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
56
|
}
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -61,14 +61,14 @@ export default class GreetingTool implements LuaTool {
|
|
|
61
61
|
Create `src/skills/greeting.skill.ts`:
|
|
62
62
|
|
|
63
63
|
```typescript
|
|
64
|
-
import { LuaSkill } from
|
|
65
|
-
import GreetingTool from
|
|
64
|
+
import { LuaSkill } from 'lua-cli';
|
|
65
|
+
import GreetingTool from './tools/GreetingTool';
|
|
66
66
|
|
|
67
67
|
const greetingSkill = new LuaSkill({
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
name: 'greeting-skill',
|
|
69
|
+
description: 'Tools for greeting users',
|
|
70
|
+
context: 'Use these tools when the user wants to be greeted',
|
|
71
|
+
tools: [new GreetingTool()],
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
export default greetingSkill;
|
|
@@ -79,13 +79,13 @@ export default greetingSkill;
|
|
|
79
79
|
Update `src/index.ts`:
|
|
80
80
|
|
|
81
81
|
```typescript
|
|
82
|
-
import { LuaAgent } from
|
|
83
|
-
import greetingSkill from
|
|
82
|
+
import { LuaAgent } from 'lua-cli';
|
|
83
|
+
import greetingSkill from './skills/greeting.skill';
|
|
84
84
|
|
|
85
85
|
const agent = new LuaAgent({
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
name: `My Agent`,
|
|
87
|
+
persona: `You are a friendly assistant.`,
|
|
88
|
+
skills: [greetingSkill],
|
|
89
89
|
});
|
|
90
90
|
```
|
|
91
91
|
|
|
@@ -98,14 +98,14 @@ lua chat # Chat with your agent
|
|
|
98
98
|
|
|
99
99
|
## 📖 Essential Commands
|
|
100
100
|
|
|
101
|
-
| Command
|
|
102
|
-
|
|
103
|
-
| `lua test`
|
|
104
|
-
| `lua chat`
|
|
105
|
-
| `lua compile` | Compile your code
|
|
106
|
-
| `lua push`
|
|
107
|
-
| `lua deploy`
|
|
108
|
-
| `lua logs`
|
|
101
|
+
| Command | Purpose |
|
|
102
|
+
| ------------- | ----------------------------------- |
|
|
103
|
+
| `lua test` | Test individual tools interactively |
|
|
104
|
+
| `lua chat` | Interactive chat with your agent |
|
|
105
|
+
| `lua compile` | Compile your code |
|
|
106
|
+
| `lua push` | Upload to server |
|
|
107
|
+
| `lua deploy` | Deploy to production |
|
|
108
|
+
| `lua logs` | View execution logs |
|
|
109
109
|
|
|
110
110
|
## 🎯 Want Examples?
|
|
111
111
|
|
|
@@ -117,6 +117,7 @@ lua init --with-examples
|
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
This includes:
|
|
120
|
+
|
|
120
121
|
- ✅ 30+ example tools
|
|
121
122
|
- ✅ Example webhooks (HTTP endpoints)
|
|
122
123
|
- ✅ Example scheduled jobs
|
|
@@ -138,4 +139,4 @@ This includes:
|
|
|
138
139
|
|
|
139
140
|
---
|
|
140
141
|
|
|
141
|
-
|
|
142
|
+
_Built with [Lua CLI](https://www.npmjs.com/package/lua-cli)_
|
|
@@ -5,74 +5,80 @@ This folder contains example implementations of all Lua AI Agent features. Use t
|
|
|
5
5
|
## 📁 What's Inside
|
|
6
6
|
|
|
7
7
|
### skills/
|
|
8
|
+
|
|
8
9
|
Example skills and tools demonstrating platform APIs:
|
|
9
10
|
|
|
10
|
-
| File
|
|
11
|
-
|
|
12
|
-
| `tools/GetWeatherTool.ts`
|
|
13
|
-
| `tools/UserDataTool.ts`
|
|
14
|
-
| `tools/ProductsTool.ts`
|
|
15
|
-
| `tools/BasketTool.ts`
|
|
16
|
-
| `tools/OrderTool.ts`
|
|
17
|
-
| `tools/CustomDataTool.ts`
|
|
18
|
-
| `tools/PaymentTool.ts`
|
|
19
|
-
| `tools/SmartBasketTool.ts`
|
|
20
|
-
| `tools/GameScoreTrackerTool.ts` | Jobs API - interval jobs, deactivation, getAll
|
|
11
|
+
| File | What it shows |
|
|
12
|
+
| ------------------------------- | ------------------------------------------------------------ |
|
|
13
|
+
| `tools/GetWeatherTool.ts` | External API integration |
|
|
14
|
+
| `tools/UserDataTool.ts` | User API - get/update user data, chat history, AI generation |
|
|
15
|
+
| `tools/ProductsTool.ts` | Products API - CRUD operations |
|
|
16
|
+
| `tools/BasketTool.ts` | Baskets API - shopping cart |
|
|
17
|
+
| `tools/OrderTool.ts` | Orders API - order management, status & data updates |
|
|
18
|
+
| `tools/CustomDataTool.ts` | Data API - custom collections with semantic search |
|
|
19
|
+
| `tools/PaymentTool.ts` | Stripe integration, environment variables |
|
|
20
|
+
| `tools/SmartBasketTool.ts` | Dynamic job creation from tools |
|
|
21
|
+
| `tools/GameScoreTrackerTool.ts` | Jobs API - interval jobs, deactivation, getAll |
|
|
21
22
|
|
|
22
23
|
### webhooks/
|
|
24
|
+
|
|
23
25
|
HTTP endpoints for external integrations:
|
|
24
26
|
|
|
25
|
-
| File
|
|
26
|
-
|
|
27
|
-
| `PaymentWebhook.ts`
|
|
28
|
-
| `UserEventWebhook.ts`
|
|
29
|
-
| `FileUploadWebhook.ts` | **CDN API** - file uploads, Data API
|
|
27
|
+
| File | What it shows |
|
|
28
|
+
| ---------------------- | --------------------------------------------- |
|
|
29
|
+
| `PaymentWebhook.ts` | Stripe payment notifications, Orders API |
|
|
30
|
+
| `UserEventWebhook.ts` | External events, **Templates API** (WhatsApp) |
|
|
31
|
+
| `FileUploadWebhook.ts` | **CDN API** - file uploads, Data API |
|
|
30
32
|
|
|
31
33
|
### jobs/
|
|
34
|
+
|
|
32
35
|
Scheduled background tasks:
|
|
33
36
|
|
|
34
|
-
| File
|
|
35
|
-
|
|
36
|
-
| `HealthCheckJob.ts`
|
|
37
|
-
| `DailyCleanupJob.ts`
|
|
38
|
-
| `DataMigrationJob.ts`
|
|
37
|
+
| File | What it shows |
|
|
38
|
+
| -------------------------------- | --------------------------------------------- |
|
|
39
|
+
| `HealthCheckJob.ts` | Interval schedule, health monitoring |
|
|
40
|
+
| `DailyCleanupJob.ts` | Cron schedule, data cleanup |
|
|
41
|
+
| `DataMigrationJob.ts` | One-time schedule, batch processing |
|
|
39
42
|
| `AbandonedBasketProcessorJob.ts` | **Templates API** (WhatsApp), batch reminders |
|
|
40
43
|
|
|
41
44
|
### preprocessors/
|
|
45
|
+
|
|
42
46
|
Message filtering before the agent:
|
|
43
47
|
|
|
44
|
-
| File
|
|
45
|
-
|
|
48
|
+
| File | What it shows |
|
|
49
|
+
| -------------------- | -------------------------------------- |
|
|
46
50
|
| `messageMatching.ts` | Modify/block messages based on content |
|
|
47
51
|
|
|
48
52
|
### postprocessors/
|
|
53
|
+
|
|
49
54
|
Response transformation after the agent:
|
|
50
55
|
|
|
51
|
-
| File
|
|
52
|
-
|
|
56
|
+
| File | What it shows |
|
|
57
|
+
| ------------------- | ------------------------- |
|
|
53
58
|
| `modifyResponse.ts` | Transform agent responses |
|
|
54
59
|
|
|
55
60
|
### services/
|
|
61
|
+
|
|
56
62
|
Helper utilities:
|
|
57
63
|
|
|
58
|
-
| File
|
|
59
|
-
|
|
60
|
-
| `ApiService.ts` | HTTP client wrapper
|
|
64
|
+
| File | What it shows |
|
|
65
|
+
| --------------- | ------------------------ |
|
|
66
|
+
| `ApiService.ts` | HTTP client wrapper |
|
|
61
67
|
| `GetWeather.ts` | Mock service for testing |
|
|
62
68
|
|
|
63
69
|
## 🎯 API Coverage
|
|
64
70
|
|
|
65
|
-
| API
|
|
66
|
-
|
|
67
|
-
| **User**
|
|
68
|
-
| **Products**
|
|
69
|
-
| **Baskets**
|
|
70
|
-
| **Orders**
|
|
71
|
-
| **Data**
|
|
72
|
-
| **Jobs**
|
|
73
|
-
| **AI**
|
|
71
|
+
| API | Where it's demonstrated |
|
|
72
|
+
| ------------- | ------------------------------------------------------- |
|
|
73
|
+
| **User** | `UserDataTool.ts` |
|
|
74
|
+
| **Products** | `ProductsTool.ts` |
|
|
75
|
+
| **Baskets** | `BasketTool.ts`, `SmartBasketTool.ts` |
|
|
76
|
+
| **Orders** | `OrderTool.ts`, `PaymentWebhook.ts` |
|
|
77
|
+
| **Data** | `CustomDataTool.ts`, `FileUploadWebhook.ts` |
|
|
78
|
+
| **Jobs** | `SmartBasketTool.ts`, `GameScoreTrackerTool.ts` |
|
|
79
|
+
| **AI** | `UserDataTool.ts` |
|
|
74
80
|
| **Templates** | `UserEventWebhook.ts`, `AbandonedBasketProcessorJob.ts` |
|
|
75
|
-
| **CDN**
|
|
81
|
+
| **CDN** | `FileUploadWebhook.ts` |
|
|
76
82
|
|
|
77
83
|
## 🚀 How to Use
|
|
78
84
|
|