lua-cli 3.15.3 → 3.16.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/dist/api-exports.d.ts +5029 -698
- package/dist/api-exports.js +6509 -772
- package/dist/api-exports.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +41174 -82
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +1217 -0
- package/dist/voice/test/index.js +386 -0
- package/dist/voice/test/index.js.map +1 -0
- package/dist/voice-exports.d.ts +40 -0
- package/dist/voice-exports.js +16 -0
- package/dist/voice-exports.js.map +1 -0
- package/docs/README.md +1 -1
- package/package.json +38 -21
- package/scripts/build-vendor.mjs +6 -3
- package/scripts/run-api-extractor.mjs +79 -0
- package/template/.gitignore +21 -0
- package/template/package.json +1 -1
- package/dist/api/agent.api.service.d.ts +0 -165
- package/dist/api/agent.api.service.d.ts.map +0 -1
- package/dist/api/agent.api.service.js +0 -207
- package/dist/api/agent.api.service.js.map +0 -1
- package/dist/api/agents.api.service.d.ts +0 -21
- package/dist/api/agents.api.service.d.ts.map +0 -1
- package/dist/api/agents.api.service.js +0 -51
- package/dist/api/agents.api.service.js.map +0 -1
- package/dist/api/ai.api.service.d.ts +0 -20
- package/dist/api/ai.api.service.d.ts.map +0 -1
- package/dist/api/ai.api.service.js +0 -40
- package/dist/api/ai.api.service.js.map +0 -1
- package/dist/api/auth.api.service.d.ts +0 -49
- package/dist/api/auth.api.service.d.ts.map +0 -1
- package/dist/api/auth.api.service.js +0 -55
- package/dist/api/auth.api.service.js.map +0 -1
- package/dist/api/backup.api.service.d.ts +0 -78
- package/dist/api/backup.api.service.d.ts.map +0 -1
- package/dist/api/backup.api.service.js +0 -115
- package/dist/api/backup.api.service.js.map +0 -1
- package/dist/api/basket.api.service.d.ts +0 -85
- package/dist/api/basket.api.service.d.ts.map +0 -1
- package/dist/api/basket.api.service.js +0 -160
- package/dist/api/basket.api.service.js.map +0 -1
- package/dist/api/cdn.api.service.d.ts +0 -21
- package/dist/api/cdn.api.service.d.ts.map +0 -1
- package/dist/api/cdn.api.service.js +0 -46
- package/dist/api/cdn.api.service.js.map +0 -1
- package/dist/api/chat.api.service.d.ts +0 -40
- package/dist/api/chat.api.service.d.ts.map +0 -1
- package/dist/api/chat.api.service.js +0 -121
- package/dist/api/chat.api.service.js.map +0 -1
- package/dist/api/credentials.d.ts +0 -25
- package/dist/api/credentials.d.ts.map +0 -1
- package/dist/api/credentials.js +0 -44
- package/dist/api/credentials.js.map +0 -1
- package/dist/api/custom.data.api.service.d.ts +0 -71
- package/dist/api/custom.data.api.service.d.ts.map +0 -1
- package/dist/api/custom.data.api.service.js +0 -126
- package/dist/api/custom.data.api.service.js.map +0 -1
- package/dist/api/developer.api.service.d.ts +0 -121
- package/dist/api/developer.api.service.d.ts.map +0 -1
- package/dist/api/developer.api.service.js +0 -162
- package/dist/api/developer.api.service.js.map +0 -1
- package/dist/api/device-trigger.api.service.d.ts +0 -136
- package/dist/api/device-trigger.api.service.d.ts.map +0 -1
- package/dist/api/device-trigger.api.service.js +0 -120
- package/dist/api/device-trigger.api.service.js.map +0 -1
- package/dist/api/device.api.service.d.ts +0 -61
- package/dist/api/device.api.service.d.ts.map +0 -1
- package/dist/api/device.api.service.js +0 -72
- package/dist/api/device.api.service.js.map +0 -1
- package/dist/api/http.client.d.ts +0 -90
- package/dist/api/http.client.d.ts.map +0 -1
- package/dist/api/http.client.js +0 -265
- package/dist/api/http.client.js.map +0 -1
- package/dist/api/job.api.service.d.ts +0 -154
- package/dist/api/job.api.service.d.ts.map +0 -1
- package/dist/api/job.api.service.js +0 -230
- package/dist/api/job.api.service.js.map +0 -1
- package/dist/api/lazy-instances.d.ts +0 -107
- package/dist/api/lazy-instances.d.ts.map +0 -1
- package/dist/api/lazy-instances.js +0 -220
- package/dist/api/lazy-instances.js.map +0 -1
- package/dist/api/logs.api.service.d.ts +0 -38
- package/dist/api/logs.api.service.d.ts.map +0 -1
- package/dist/api/logs.api.service.js +0 -50
- package/dist/api/logs.api.service.js.map +0 -1
- package/dist/api/marketplace.api.service.d.ts +0 -28
- package/dist/api/marketplace.api.service.d.ts.map +0 -1
- package/dist/api/marketplace.api.service.js +0 -112
- package/dist/api/marketplace.api.service.js.map +0 -1
- package/dist/api/order.api.service.d.ts +0 -53
- package/dist/api/order.api.service.d.ts.map +0 -1
- package/dist/api/order.api.service.js +0 -94
- package/dist/api/order.api.service.js.map +0 -1
- package/dist/api/persona.api.service.d.ts +0 -56
- package/dist/api/persona.api.service.d.ts.map +0 -1
- package/dist/api/persona.api.service.js +0 -90
- package/dist/api/persona.api.service.js.map +0 -1
- package/dist/api/postprocessor.api.service.d.ts +0 -151
- package/dist/api/postprocessor.api.service.d.ts.map +0 -1
- package/dist/api/postprocessor.api.service.js +0 -109
- package/dist/api/postprocessor.api.service.js.map +0 -1
- package/dist/api/preprocessor.api.service.d.ts +0 -155
- package/dist/api/preprocessor.api.service.d.ts.map +0 -1
- package/dist/api/preprocessor.api.service.js +0 -111
- package/dist/api/preprocessor.api.service.js.map +0 -1
- package/dist/api/products.api.service.d.ts +0 -80
- package/dist/api/products.api.service.d.ts.map +0 -1
- package/dist/api/products.api.service.js +0 -126
- package/dist/api/products.api.service.js.map +0 -1
- package/dist/api/resource.api.service.d.ts +0 -77
- package/dist/api/resource.api.service.d.ts.map +0 -1
- package/dist/api/resource.api.service.js +0 -74
- package/dist/api/resource.api.service.js.map +0 -1
- package/dist/api/skills.api.service.d.ts +0 -94
- package/dist/api/skills.api.service.d.ts.map +0 -1
- package/dist/api/skills.api.service.js +0 -120
- package/dist/api/skills.api.service.js.map +0 -1
- package/dist/api/tool.api.service.d.ts +0 -53
- package/dist/api/tool.api.service.d.ts.map +0 -1
- package/dist/api/tool.api.service.js +0 -74
- package/dist/api/tool.api.service.js.map +0 -1
- package/dist/api/unifiedto.api.service.d.ts +0 -133
- package/dist/api/unifiedto.api.service.d.ts.map +0 -1
- package/dist/api/unifiedto.api.service.js +0 -166
- package/dist/api/unifiedto.api.service.js.map +0 -1
- package/dist/api/user.data.api.service.d.ts +0 -69
- package/dist/api/user.data.api.service.d.ts.map +0 -1
- package/dist/api/user.data.api.service.js +0 -158
- package/dist/api/user.data.api.service.js.map +0 -1
- package/dist/api/webhook.api.service.d.ts +0 -163
- package/dist/api/webhook.api.service.d.ts.map +0 -1
- package/dist/api/webhook.api.service.js +0 -140
- package/dist/api/webhook.api.service.js.map +0 -1
- package/dist/api/whatsapp-templates.api.service.d.ts +0 -41
- package/dist/api/whatsapp-templates.api.service.d.ts.map +0 -1
- package/dist/api/whatsapp-templates.api.service.js +0 -79
- package/dist/api/whatsapp-templates.api.service.js.map +0 -1
- package/dist/api-exports.d.ts.map +0 -1
- package/dist/cli/command-definitions.d.ts +0 -29
- package/dist/cli/command-definitions.d.ts.map +0 -1
- package/dist/cli/command-definitions.js +0 -943
- package/dist/cli/command-definitions.js.map +0 -1
- package/dist/commands/admin.d.ts +0 -24
- package/dist/commands/admin.d.ts.map +0 -1
- package/dist/commands/admin.js +0 -44
- package/dist/commands/admin.js.map +0 -1
- package/dist/commands/agents.d.ts +0 -23
- package/dist/commands/agents.d.ts.map +0 -1
- package/dist/commands/agents.js +0 -83
- package/dist/commands/agents.js.map +0 -1
- package/dist/commands/apiKey.d.ts +0 -8
- package/dist/commands/apiKey.d.ts.map +0 -1
- package/dist/commands/apiKey.js +0 -43
- package/dist/commands/apiKey.js.map +0 -1
- package/dist/commands/channels.d.ts +0 -13
- package/dist/commands/channels.d.ts.map +0 -1
- package/dist/commands/channels.js +0 -747
- package/dist/commands/channels.js.map +0 -1
- package/dist/commands/chat-log-probe.d.ts +0 -59
- package/dist/commands/chat-log-probe.d.ts.map +0 -1
- package/dist/commands/chat-log-probe.js +0 -87
- package/dist/commands/chat-log-probe.js.map +0 -1
- package/dist/commands/chat.d.ts +0 -20
- package/dist/commands/chat.d.ts.map +0 -1
- package/dist/commands/chat.js +0 -618
- package/dist/commands/chat.js.map +0 -1
- package/dist/commands/chatClear.d.ts +0 -25
- package/dist/commands/chatClear.d.ts.map +0 -1
- package/dist/commands/chatClear.js +0 -71
- package/dist/commands/chatClear.js.map +0 -1
- package/dist/commands/compile.d.ts +0 -48
- package/dist/commands/compile.d.ts.map +0 -1
- package/dist/commands/compile.js +0 -216
- package/dist/commands/compile.js.map +0 -1
- package/dist/commands/completion.d.ts +0 -12
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js +0 -211
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/configure.d.ts +0 -42
- package/dist/commands/configure.d.ts.map +0 -1
- package/dist/commands/configure.js +0 -76
- package/dist/commands/configure.js.map +0 -1
- package/dist/commands/deploy.d.ts +0 -14
- package/dist/commands/deploy.d.ts.map +0 -1
- package/dist/commands/deploy.js +0 -517
- package/dist/commands/deploy.js.map +0 -1
- package/dist/commands/destroy.d.ts +0 -8
- package/dist/commands/destroy.d.ts.map +0 -1
- package/dist/commands/destroy.js +0 -66
- package/dist/commands/destroy.js.map +0 -1
- package/dist/commands/devices.d.ts +0 -6
- package/dist/commands/devices.d.ts.map +0 -1
- package/dist/commands/devices.js +0 -265
- package/dist/commands/devices.js.map +0 -1
- package/dist/commands/docs.d.ts +0 -20
- package/dist/commands/docs.d.ts.map +0 -1
- package/dist/commands/docs.js +0 -33
- package/dist/commands/docs.js.map +0 -1
- package/dist/commands/env.d.ts +0 -34
- package/dist/commands/env.d.ts.map +0 -1
- package/dist/commands/env.js +0 -612
- package/dist/commands/env.js.map +0 -1
- package/dist/commands/evals.d.ts +0 -9
- package/dist/commands/evals.d.ts.map +0 -1
- package/dist/commands/evals.js +0 -27
- package/dist/commands/evals.js.map +0 -1
- package/dist/commands/features.d.ts +0 -13
- package/dist/commands/features.d.ts.map +0 -1
- package/dist/commands/features.js +0 -455
- package/dist/commands/features.js.map +0 -1
- package/dist/commands/governance.d.ts +0 -7
- package/dist/commands/governance.d.ts.map +0 -1
- package/dist/commands/governance.js +0 -258
- package/dist/commands/governance.js.map +0 -1
- package/dist/commands/index.d.ts +0 -38
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -38
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/init.d.ts +0 -53
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -992
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/integrations.d.ts +0 -18
- package/dist/commands/integrations.d.ts.map +0 -1
- package/dist/commands/integrations.js +0 -2666
- package/dist/commands/integrations.js.map +0 -1
- package/dist/commands/jobs.d.ts +0 -13
- package/dist/commands/jobs.d.ts.map +0 -1
- package/dist/commands/jobs.js +0 -736
- package/dist/commands/jobs.js.map +0 -1
- package/dist/commands/log-tip.d.ts +0 -79
- package/dist/commands/log-tip.d.ts.map +0 -1
- package/dist/commands/log-tip.js +0 -83
- package/dist/commands/log-tip.js.map +0 -1
- package/dist/commands/logs.d.ts +0 -13
- package/dist/commands/logs.d.ts.map +0 -1
- package/dist/commands/logs.js +0 -493
- package/dist/commands/logs.js.map +0 -1
- package/dist/commands/marketplace.d.ts +0 -34
- package/dist/commands/marketplace.d.ts.map +0 -1
- package/dist/commands/marketplace.js +0 -2105
- package/dist/commands/marketplace.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -32
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -395
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/models.d.ts +0 -18
- package/dist/commands/models.d.ts.map +0 -1
- package/dist/commands/models.js +0 -207
- package/dist/commands/models.js.map +0 -1
- package/dist/commands/persona.d.ts +0 -13
- package/dist/commands/persona.d.ts.map +0 -1
- package/dist/commands/persona.js +0 -560
- package/dist/commands/persona.js.map +0 -1
- package/dist/commands/postprocessors.d.ts +0 -13
- package/dist/commands/postprocessors.d.ts.map +0 -1
- package/dist/commands/postprocessors.js +0 -558
- package/dist/commands/postprocessors.js.map +0 -1
- package/dist/commands/preprocessors.d.ts +0 -13
- package/dist/commands/preprocessors.d.ts.map +0 -1
- package/dist/commands/preprocessors.js +0 -558
- package/dist/commands/preprocessors.js.map +0 -1
- package/dist/commands/production.d.ts +0 -13
- package/dist/commands/production.d.ts.map +0 -1
- package/dist/commands/production.js +0 -588
- package/dist/commands/production.js.map +0 -1
- package/dist/commands/push-helpers.d.ts +0 -42
- package/dist/commands/push-helpers.d.ts.map +0 -1
- package/dist/commands/push-helpers.js +0 -48
- package/dist/commands/push-helpers.js.map +0 -1
- package/dist/commands/push.d.ts +0 -31
- package/dist/commands/push.d.ts.map +0 -1
- package/dist/commands/push.js +0 -1262
- package/dist/commands/push.js.map +0 -1
- package/dist/commands/pushBackup.d.ts +0 -78
- package/dist/commands/pushBackup.d.ts.map +0 -1
- package/dist/commands/pushBackup.js +0 -274
- package/dist/commands/pushBackup.js.map +0 -1
- package/dist/commands/resources.d.ts +0 -13
- package/dist/commands/resources.d.ts.map +0 -1
- package/dist/commands/resources.js +0 -377
- package/dist/commands/resources.js.map +0 -1
- package/dist/commands/skills.d.ts +0 -13
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js +0 -618
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/source.d.ts +0 -72
- package/dist/commands/source.d.ts.map +0 -1
- package/dist/commands/source.js +0 -134
- package/dist/commands/source.js.map +0 -1
- package/dist/commands/status.d.ts +0 -14
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -731
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/sync.d.ts +0 -28
- package/dist/commands/sync.d.ts.map +0 -1
- package/dist/commands/sync.js +0 -802
- package/dist/commands/sync.js.map +0 -1
- package/dist/commands/telemetry.d.ts +0 -6
- package/dist/commands/telemetry.d.ts.map +0 -1
- package/dist/commands/telemetry.js +0 -42
- package/dist/commands/telemetry.js.map +0 -1
- package/dist/commands/test-output.helpers.d.ts +0 -24
- package/dist/commands/test-output.helpers.d.ts.map +0 -1
- package/dist/commands/test-output.helpers.js +0 -62
- package/dist/commands/test-output.helpers.js.map +0 -1
- package/dist/commands/test.d.ts +0 -9
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js +0 -787
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/update.d.ts +0 -14
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -97
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/webhooks.d.ts +0 -13
- package/dist/commands/webhooks.d.ts.map +0 -1
- package/dist/commands/webhooks.js +0 -691
- package/dist/commands/webhooks.js.map +0 -1
- package/dist/compiler/agent-traverser.d.ts +0 -140
- package/dist/compiler/agent-traverser.d.ts.map +0 -1
- package/dist/compiler/agent-traverser.js +0 -420
- package/dist/compiler/agent-traverser.js.map +0 -1
- package/dist/compiler/bundler.d.ts +0 -43
- package/dist/compiler/bundler.d.ts.map +0 -1
- package/dist/compiler/bundler.js +0 -188
- package/dist/compiler/bundler.js.map +0 -1
- package/dist/compiler/compiler.d.ts +0 -208
- package/dist/compiler/compiler.d.ts.map +0 -1
- package/dist/compiler/compiler.js +0 -706
- package/dist/compiler/compiler.js.map +0 -1
- package/dist/compiler/index.d.ts +0 -38
- package/dist/compiler/index.d.ts.map +0 -1
- package/dist/compiler/index.js +0 -43
- package/dist/compiler/index.js.map +0 -1
- package/dist/compiler/plugins/agent.plugin.d.ts +0 -58
- package/dist/compiler/plugins/agent.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/agent.plugin.js +0 -161
- package/dist/compiler/plugins/agent.plugin.js.map +0 -1
- package/dist/compiler/plugins/base.d.ts +0 -334
- package/dist/compiler/plugins/base.d.ts.map +0 -1
- package/dist/compiler/plugins/base.js +0 -353
- package/dist/compiler/plugins/base.js.map +0 -1
- package/dist/compiler/plugins/device-trigger.plugin.d.ts +0 -38
- package/dist/compiler/plugins/device-trigger.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/device-trigger.plugin.js +0 -107
- package/dist/compiler/plugins/device-trigger.plugin.js.map +0 -1
- package/dist/compiler/plugins/device.plugin.d.ts +0 -39
- package/dist/compiler/plugins/device.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/device.plugin.js +0 -77
- package/dist/compiler/plugins/device.plugin.js.map +0 -1
- package/dist/compiler/plugins/job.plugin.d.ts +0 -34
- package/dist/compiler/plugins/job.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/job.plugin.js +0 -108
- package/dist/compiler/plugins/job.plugin.js.map +0 -1
- package/dist/compiler/plugins/mcp-server.plugin.d.ts +0 -38
- package/dist/compiler/plugins/mcp-server.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/mcp-server.plugin.js +0 -107
- package/dist/compiler/plugins/mcp-server.plugin.js.map +0 -1
- package/dist/compiler/plugins/postprocessor.plugin.d.ts +0 -21
- package/dist/compiler/plugins/postprocessor.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/postprocessor.plugin.js +0 -36
- package/dist/compiler/plugins/postprocessor.plugin.js.map +0 -1
- package/dist/compiler/plugins/preprocessor.plugin.d.ts +0 -21
- package/dist/compiler/plugins/preprocessor.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/preprocessor.plugin.js +0 -38
- package/dist/compiler/plugins/preprocessor.plugin.js.map +0 -1
- package/dist/compiler/plugins/processor-base.d.ts +0 -17
- package/dist/compiler/plugins/processor-base.d.ts.map +0 -1
- package/dist/compiler/plugins/processor-base.js +0 -27
- package/dist/compiler/plugins/processor-base.js.map +0 -1
- package/dist/compiler/plugins/registry.d.ts +0 -62
- package/dist/compiler/plugins/registry.d.ts.map +0 -1
- package/dist/compiler/plugins/registry.js +0 -113
- package/dist/compiler/plugins/registry.js.map +0 -1
- package/dist/compiler/plugins/skill.plugin.d.ts +0 -106
- package/dist/compiler/plugins/skill.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/skill.plugin.js +0 -316
- package/dist/compiler/plugins/skill.plugin.js.map +0 -1
- package/dist/compiler/plugins/tool.plugin.d.ts +0 -69
- package/dist/compiler/plugins/tool.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/tool.plugin.js +0 -262
- package/dist/compiler/plugins/tool.plugin.js.map +0 -1
- package/dist/compiler/plugins/webhook.plugin.d.ts +0 -38
- package/dist/compiler/plugins/webhook.plugin.d.ts.map +0 -1
- package/dist/compiler/plugins/webhook.plugin.js +0 -117
- package/dist/compiler/plugins/webhook.plugin.js.map +0 -1
- package/dist/compiler/source-writer.d.ts +0 -129
- package/dist/compiler/source-writer.d.ts.map +0 -1
- package/dist/compiler/source-writer.js +0 -329
- package/dist/compiler/source-writer.js.map +0 -1
- package/dist/compiler/types.d.ts +0 -391
- package/dist/compiler/types.d.ts.map +0 -1
- package/dist/compiler/types.js +0 -30
- package/dist/compiler/types.js.map +0 -1
- package/dist/compiler/utils/ast-helpers.d.ts +0 -106
- package/dist/compiler/utils/ast-helpers.d.ts.map +0 -1
- package/dist/compiler/utils/ast-helpers.js +0 -356
- package/dist/compiler/utils/ast-helpers.js.map +0 -1
- package/dist/compiler/utils/common.d.ts +0 -22
- package/dist/compiler/utils/common.d.ts.map +0 -1
- package/dist/compiler/utils/common.js +0 -55
- package/dist/compiler/utils/common.js.map +0 -1
- package/dist/compiler/utils/file-discovery.d.ts +0 -35
- package/dist/compiler/utils/file-discovery.d.ts.map +0 -1
- package/dist/compiler/utils/file-discovery.js +0 -60
- package/dist/compiler/utils/file-discovery.js.map +0 -1
- package/dist/compiler/utils/path-resolver.d.ts +0 -83
- package/dist/compiler/utils/path-resolver.d.ts.map +0 -1
- package/dist/compiler/utils/path-resolver.js +0 -162
- package/dist/compiler/utils/path-resolver.js.map +0 -1
- package/dist/compiler/utils/reference-resolver.d.ts +0 -196
- package/dist/compiler/utils/reference-resolver.d.ts.map +0 -1
- package/dist/compiler/utils/reference-resolver.js +0 -1026
- package/dist/compiler/utils/reference-resolver.js.map +0 -1
- package/dist/compiler/utils/schema-converter.d.ts +0 -52
- package/dist/compiler/utils/schema-converter.d.ts.map +0 -1
- package/dist/compiler/utils/schema-converter.js +0 -170
- package/dist/compiler/utils/schema-converter.js.map +0 -1
- package/dist/compiler/utils/workspace.d.ts +0 -35
- package/dist/compiler/utils/workspace.d.ts.map +0 -1
- package/dist/compiler/utils/workspace.js +0 -121
- package/dist/compiler/utils/workspace.js.map +0 -1
- package/dist/config/compile.constants.d.ts +0 -75
- package/dist/config/compile.constants.d.ts.map +0 -1
- package/dist/config/compile.constants.js +0 -95
- package/dist/config/compile.constants.js.map +0 -1
- package/dist/config/constants.d.ts +0 -49
- package/dist/config/constants.d.ts.map +0 -1
- package/dist/config/constants.js +0 -69
- package/dist/config/constants.js.map +0 -1
- package/dist/errors/auth.error.d.ts +0 -34
- package/dist/errors/auth.error.d.ts.map +0 -1
- package/dist/errors/auth.error.js +0 -29
- package/dist/errors/auth.error.js.map +0 -1
- package/dist/errors/index.d.ts +0 -5
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js +0 -5
- package/dist/errors/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/instances/basket.instance.d.ts +0 -82
- package/dist/instances/basket.instance.d.ts.map +0 -1
- package/dist/instances/basket.instance.js +0 -245
- package/dist/instances/basket.instance.js.map +0 -1
- package/dist/instances/data.entry.instance.d.ts +0 -50
- package/dist/instances/data.entry.instance.d.ts.map +0 -1
- package/dist/instances/data.entry.instance.js +0 -163
- package/dist/instances/data.entry.instance.js.map +0 -1
- package/dist/instances/job.instance.d.ts +0 -133
- package/dist/instances/job.instance.d.ts.map +0 -1
- package/dist/instances/job.instance.js +0 -180
- package/dist/instances/job.instance.js.map +0 -1
- package/dist/instances/order.instance.d.ts +0 -50
- package/dist/instances/order.instance.d.ts.map +0 -1
- package/dist/instances/order.instance.js +0 -199
- package/dist/instances/order.instance.js.map +0 -1
- package/dist/instances/product.instance.d.ts +0 -43
- package/dist/instances/product.instance.d.ts.map +0 -1
- package/dist/instances/product.instance.js +0 -145
- package/dist/instances/product.instance.js.map +0 -1
- package/dist/instances/product.pagination.instance.d.ts +0 -102
- package/dist/instances/product.pagination.instance.d.ts.map +0 -1
- package/dist/instances/product.pagination.instance.js +0 -156
- package/dist/instances/product.pagination.instance.js.map +0 -1
- package/dist/instances/product.search.instance.d.ts +0 -81
- package/dist/instances/product.search.instance.d.ts.map +0 -1
- package/dist/instances/product.search.instance.js +0 -121
- package/dist/instances/product.search.instance.js.map +0 -1
- package/dist/instances/user.instance.d.ts +0 -56
- package/dist/instances/user.instance.d.ts.map +0 -1
- package/dist/instances/user.instance.js +0 -188
- package/dist/instances/user.instance.js.map +0 -1
- package/dist/interfaces/admin.d.ts +0 -64
- package/dist/interfaces/admin.d.ts.map +0 -1
- package/dist/interfaces/admin.js +0 -6
- package/dist/interfaces/admin.js.map +0 -1
- package/dist/interfaces/agent.d.ts +0 -399
- package/dist/interfaces/agent.d.ts.map +0 -1
- package/dist/interfaces/agent.js +0 -6
- package/dist/interfaces/agent.js.map +0 -1
- package/dist/interfaces/backup.d.ts +0 -17
- package/dist/interfaces/backup.d.ts.map +0 -1
- package/dist/interfaces/backup.js +0 -7
- package/dist/interfaces/backup.js.map +0 -1
- package/dist/interfaces/baskets.d.ts +0 -80
- package/dist/interfaces/baskets.d.ts.map +0 -1
- package/dist/interfaces/baskets.js +0 -20
- package/dist/interfaces/baskets.js.map +0 -1
- package/dist/interfaces/cdn.d.ts +0 -25
- package/dist/interfaces/cdn.d.ts.map +0 -1
- package/dist/interfaces/cdn.js +0 -6
- package/dist/interfaces/cdn.js.map +0 -1
- package/dist/interfaces/chat.d.ts +0 -98
- package/dist/interfaces/chat.d.ts.map +0 -1
- package/dist/interfaces/chat.js +0 -6
- package/dist/interfaces/chat.js.map +0 -1
- package/dist/interfaces/common.d.ts +0 -64
- package/dist/interfaces/common.d.ts.map +0 -1
- package/dist/interfaces/common.js +0 -9
- package/dist/interfaces/common.js.map +0 -1
- package/dist/interfaces/custom.data.d.ts +0 -83
- package/dist/interfaces/custom.data.d.ts.map +0 -1
- package/dist/interfaces/custom.data.js +0 -6
- package/dist/interfaces/custom.data.js.map +0 -1
- package/dist/interfaces/deploy.d.ts +0 -15
- package/dist/interfaces/deploy.d.ts.map +0 -1
- package/dist/interfaces/deploy.js +0 -5
- package/dist/interfaces/deploy.js.map +0 -1
- package/dist/interfaces/dev.d.ts +0 -54
- package/dist/interfaces/dev.d.ts.map +0 -1
- package/dist/interfaces/dev.js +0 -6
- package/dist/interfaces/dev.js.map +0 -1
- package/dist/interfaces/device-triggers.d.ts +0 -80
- package/dist/interfaces/device-triggers.d.ts.map +0 -1
- package/dist/interfaces/device-triggers.js +0 -6
- package/dist/interfaces/device-triggers.js.map +0 -1
- package/dist/interfaces/devices.d.ts +0 -74
- package/dist/interfaces/devices.d.ts.map +0 -1
- package/dist/interfaces/devices.js +0 -5
- package/dist/interfaces/devices.js.map +0 -1
- package/dist/interfaces/index.d.ts +0 -15
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/index.js +0 -8
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/init.d.ts +0 -42
- package/dist/interfaces/init.d.ts.map +0 -1
- package/dist/interfaces/init.js +0 -5
- package/dist/interfaces/init.js.map +0 -1
- package/dist/interfaces/jobs.d.ts +0 -149
- package/dist/interfaces/jobs.d.ts.map +0 -1
- package/dist/interfaces/jobs.js +0 -6
- package/dist/interfaces/jobs.js.map +0 -1
- package/dist/interfaces/logs.d.ts +0 -44
- package/dist/interfaces/logs.d.ts.map +0 -1
- package/dist/interfaces/logs.js +0 -6
- package/dist/interfaces/logs.js.map +0 -1
- package/dist/interfaces/lua.d.ts +0 -37
- package/dist/interfaces/lua.d.ts.map +0 -1
- package/dist/interfaces/lua.js +0 -6
- package/dist/interfaces/lua.js.map +0 -1
- package/dist/interfaces/marketplace.d.ts +0 -171
- package/dist/interfaces/marketplace.d.ts.map +0 -1
- package/dist/interfaces/marketplace.js +0 -3
- package/dist/interfaces/marketplace.js.map +0 -1
- package/dist/interfaces/mcp.d.ts +0 -96
- package/dist/interfaces/mcp.d.ts.map +0 -1
- package/dist/interfaces/mcp.js +0 -9
- package/dist/interfaces/mcp.js.map +0 -1
- package/dist/interfaces/message.d.ts +0 -16
- package/dist/interfaces/message.d.ts.map +0 -1
- package/dist/interfaces/message.js +0 -2
- package/dist/interfaces/message.js.map +0 -1
- package/dist/interfaces/orders.d.ts +0 -68
- package/dist/interfaces/orders.d.ts.map +0 -1
- package/dist/interfaces/orders.js +0 -20
- package/dist/interfaces/orders.js.map +0 -1
- package/dist/interfaces/persona.d.ts +0 -44
- package/dist/interfaces/persona.d.ts.map +0 -1
- package/dist/interfaces/persona.js +0 -6
- package/dist/interfaces/persona.js.map +0 -1
- package/dist/interfaces/postprocessors.d.ts +0 -15
- package/dist/interfaces/postprocessors.d.ts.map +0 -1
- package/dist/interfaces/postprocessors.js +0 -5
- package/dist/interfaces/postprocessors.js.map +0 -1
- package/dist/interfaces/preprocessors.d.ts +0 -15
- package/dist/interfaces/preprocessors.d.ts.map +0 -1
- package/dist/interfaces/preprocessors.js +0 -5
- package/dist/interfaces/preprocessors.js.map +0 -1
- package/dist/interfaces/product.d.ts +0 -92
- package/dist/interfaces/product.d.ts.map +0 -1
- package/dist/interfaces/product.js +0 -6
- package/dist/interfaces/product.js.map +0 -1
- package/dist/interfaces/push.d.ts +0 -27
- package/dist/interfaces/push.d.ts.map +0 -1
- package/dist/interfaces/push.js +0 -5
- package/dist/interfaces/push.js.map +0 -1
- package/dist/interfaces/skills.d.ts +0 -137
- package/dist/interfaces/skills.d.ts.map +0 -1
- package/dist/interfaces/skills.js +0 -6
- package/dist/interfaces/skills.js.map +0 -1
- package/dist/interfaces/test.d.ts +0 -37
- package/dist/interfaces/test.d.ts.map +0 -1
- package/dist/interfaces/test.js +0 -5
- package/dist/interfaces/test.js.map +0 -1
- package/dist/interfaces/unifiedto.d.ts +0 -141
- package/dist/interfaces/unifiedto.d.ts.map +0 -1
- package/dist/interfaces/unifiedto.js +0 -6
- package/dist/interfaces/unifiedto.js.map +0 -1
- package/dist/interfaces/user.d.ts +0 -75
- package/dist/interfaces/user.d.ts.map +0 -1
- package/dist/interfaces/user.js +0 -2
- package/dist/interfaces/user.js.map +0 -1
- package/dist/interfaces/webhooks.d.ts +0 -97
- package/dist/interfaces/webhooks.d.ts.map +0 -1
- package/dist/interfaces/webhooks.js +0 -6
- package/dist/interfaces/webhooks.js.map +0 -1
- package/dist/interfaces/whatsapp-templates.d.ts +0 -105
- package/dist/interfaces/whatsapp-templates.d.ts.map +0 -1
- package/dist/interfaces/whatsapp-templates.js +0 -6
- package/dist/interfaces/whatsapp-templates.js.map +0 -1
- package/dist/primitives/agent.handler.d.ts +0 -71
- package/dist/primitives/agent.handler.d.ts.map +0 -1
- package/dist/primitives/agent.handler.js +0 -226
- package/dist/primitives/agent.handler.js.map +0 -1
- package/dist/primitives/base.handler.d.ts +0 -229
- package/dist/primitives/base.handler.d.ts.map +0 -1
- package/dist/primitives/base.handler.js +0 -620
- package/dist/primitives/base.handler.js.map +0 -1
- package/dist/primitives/device-trigger.handler.d.ts +0 -56
- package/dist/primitives/device-trigger.handler.d.ts.map +0 -1
- package/dist/primitives/device-trigger.handler.js +0 -99
- package/dist/primitives/device-trigger.handler.js.map +0 -1
- package/dist/primitives/device.handler.d.ts +0 -57
- package/dist/primitives/device.handler.d.ts.map +0 -1
- package/dist/primitives/device.handler.js +0 -103
- package/dist/primitives/device.handler.js.map +0 -1
- package/dist/primitives/index.d.ts +0 -51
- package/dist/primitives/index.d.ts.map +0 -1
- package/dist/primitives/index.js +0 -75
- package/dist/primitives/index.js.map +0 -1
- package/dist/primitives/job.handler.d.ts +0 -53
- package/dist/primitives/job.handler.d.ts.map +0 -1
- package/dist/primitives/job.handler.js +0 -110
- package/dist/primitives/job.handler.js.map +0 -1
- package/dist/primitives/mcp-server.handler.d.ts +0 -93
- package/dist/primitives/mcp-server.handler.d.ts.map +0 -1
- package/dist/primitives/mcp-server.handler.js +0 -216
- package/dist/primitives/mcp-server.handler.js.map +0 -1
- package/dist/primitives/postprocessor.handler.d.ts +0 -44
- package/dist/primitives/postprocessor.handler.d.ts.map +0 -1
- package/dist/primitives/postprocessor.handler.js +0 -71
- package/dist/primitives/postprocessor.handler.js.map +0 -1
- package/dist/primitives/preprocessor.handler.d.ts +0 -44
- package/dist/primitives/preprocessor.handler.d.ts.map +0 -1
- package/dist/primitives/preprocessor.handler.js +0 -72
- package/dist/primitives/preprocessor.handler.js.map +0 -1
- package/dist/primitives/skill.handler.d.ts +0 -47
- package/dist/primitives/skill.handler.d.ts.map +0 -1
- package/dist/primitives/skill.handler.js +0 -229
- package/dist/primitives/skill.handler.js.map +0 -1
- package/dist/primitives/types.d.ts +0 -91
- package/dist/primitives/types.d.ts.map +0 -1
- package/dist/primitives/types.js +0 -17
- package/dist/primitives/types.js.map +0 -1
- package/dist/primitives/webhook.handler.d.ts +0 -47
- package/dist/primitives/webhook.handler.d.ts.map +0 -1
- package/dist/primitives/webhook.handler.js +0 -87
- package/dist/primitives/webhook.handler.js.map +0 -1
- package/dist/services/analytics.d.ts +0 -57
- package/dist/services/analytics.d.ts.map +0 -1
- package/dist/services/analytics.js +0 -317
- package/dist/services/analytics.js.map +0 -1
- package/dist/services/auth.d.ts +0 -72
- package/dist/services/auth.d.ts.map +0 -1
- package/dist/services/auth.js +0 -173
- package/dist/services/auth.js.map +0 -1
- package/dist/services/sandbox.service.d.ts +0 -105
- package/dist/services/sandbox.service.d.ts.map +0 -1
- package/dist/services/sandbox.service.js +0 -531
- package/dist/services/sandbox.service.js.map +0 -1
- package/dist/types/api-contracts.d.ts +0 -287
- package/dist/types/api-contracts.d.ts.map +0 -1
- package/dist/types/api-contracts.js +0 -2
- package/dist/types/api-contracts.js.map +0 -1
- package/dist/types/index.d.ts +0 -28
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -30
- package/dist/types/index.js.map +0 -1
- package/dist/types/skill.d.ts +0 -1079
- package/dist/types/skill.d.ts.map +0 -1
- package/dist/types/skill.js +0 -688
- package/dist/types/skill.js.map +0 -1
- package/dist/types/tool-validation.d.ts +0 -35
- package/dist/types/tool-validation.d.ts.map +0 -1
- package/dist/types/tool-validation.js +0 -43
- package/dist/types/tool-validation.js.map +0 -1
- package/dist/types/yaml.types.d.ts +0 -91
- package/dist/types/yaml.types.d.ts.map +0 -1
- package/dist/types/yaml.types.js +0 -5
- package/dist/types/yaml.types.js.map +0 -1
- package/dist/utils/aliases.d.ts +0 -7
- package/dist/utils/aliases.d.ts.map +0 -1
- package/dist/utils/aliases.js +0 -492
- package/dist/utils/aliases.js.map +0 -1
- package/dist/utils/artifact-loader.d.ts +0 -152
- package/dist/utils/artifact-loader.d.ts.map +0 -1
- package/dist/utils/artifact-loader.js +0 -284
- package/dist/utils/artifact-loader.js.map +0 -1
- package/dist/utils/auth-flows.d.ts +0 -55
- package/dist/utils/auth-flows.d.ts.map +0 -1
- package/dist/utils/auth-flows.js +0 -246
- package/dist/utils/auth-flows.js.map +0 -1
- package/dist/utils/backup-helpers.d.ts +0 -238
- package/dist/utils/backup-helpers.d.ts.map +0 -1
- package/dist/utils/backup-helpers.js +0 -704
- package/dist/utils/backup-helpers.js.map +0 -1
- package/dist/utils/build-manifest-from-disk.d.ts +0 -8
- package/dist/utils/build-manifest-from-disk.d.ts.map +0 -1
- package/dist/utils/build-manifest-from-disk.js +0 -21
- package/dist/utils/build-manifest-from-disk.js.map +0 -1
- package/dist/utils/bundle-upload.d.ts +0 -42
- package/dist/utils/bundle-upload.d.ts.map +0 -1
- package/dist/utils/bundle-upload.js +0 -90
- package/dist/utils/bundle-upload.js.map +0 -1
- package/dist/utils/chat-attachments.d.ts +0 -15
- package/dist/utils/chat-attachments.d.ts.map +0 -1
- package/dist/utils/chat-attachments.js +0 -116
- package/dist/utils/chat-attachments.js.map +0 -1
- package/dist/utils/cli.d.ts +0 -62
- package/dist/utils/cli.d.ts.map +0 -1
- package/dist/utils/cli.js +0 -198
- package/dist/utils/cli.js.map +0 -1
- package/dist/utils/command-utils.d.ts +0 -46
- package/dist/utils/command-utils.d.ts.map +0 -1
- package/dist/utils/command-utils.js +0 -74
- package/dist/utils/command-utils.js.map +0 -1
- package/dist/utils/deploy-helpers.d.ts +0 -40
- package/dist/utils/deploy-helpers.d.ts.map +0 -1
- package/dist/utils/deploy-helpers.js +0 -76
- package/dist/utils/deploy-helpers.js.map +0 -1
- package/dist/utils/env-loader.utils.d.ts +0 -19
- package/dist/utils/env-loader.utils.d.ts.map +0 -1
- package/dist/utils/env-loader.utils.js +0 -90
- package/dist/utils/env-loader.utils.js.map +0 -1
- package/dist/utils/files.d.ts +0 -65
- package/dist/utils/files.d.ts.map +0 -1
- package/dist/utils/files.js +0 -193
- package/dist/utils/files.js.map +0 -1
- package/dist/utils/hints.d.ts +0 -81
- package/dist/utils/hints.d.ts.map +0 -1
- package/dist/utils/hints.js +0 -81
- package/dist/utils/hints.js.map +0 -1
- package/dist/utils/init-agent.d.ts +0 -86
- package/dist/utils/init-agent.d.ts.map +0 -1
- package/dist/utils/init-agent.js +0 -201
- package/dist/utils/init-agent.js.map +0 -1
- package/dist/utils/init-helpers.d.ts +0 -37
- package/dist/utils/init-helpers.d.ts.map +0 -1
- package/dist/utils/init-helpers.js +0 -78
- package/dist/utils/init-helpers.js.map +0 -1
- package/dist/utils/init-prompts.d.ts +0 -74
- package/dist/utils/init-prompts.d.ts.map +0 -1
- package/dist/utils/init-prompts.js +0 -256
- package/dist/utils/init-prompts.js.map +0 -1
- package/dist/utils/prompt-handler.d.ts +0 -17
- package/dist/utils/prompt-handler.d.ts.map +0 -1
- package/dist/utils/prompt-handler.js +0 -49
- package/dist/utils/prompt-handler.js.map +0 -1
- package/dist/utils/sandbox-storage.d.ts +0 -83
- package/dist/utils/sandbox-storage.d.ts.map +0 -1
- package/dist/utils/sandbox-storage.js +0 -211
- package/dist/utils/sandbox-storage.js.map +0 -1
- package/dist/utils/sandbox.d.ts +0 -76
- package/dist/utils/sandbox.d.ts.map +0 -1
- package/dist/utils/sandbox.js +0 -664
- package/dist/utils/sandbox.js.map +0 -1
- package/dist/utils/semver.d.ts +0 -40
- package/dist/utils/semver.d.ts.map +0 -1
- package/dist/utils/semver.js +0 -99
- package/dist/utils/semver.js.map +0 -1
- package/dist/utils/suggest.d.ts +0 -3
- package/dist/utils/suggest.d.ts.map +0 -1
- package/dist/utils/suggest.js +0 -32
- package/dist/utils/suggest.js.map +0 -1
- package/dist/utils/sync-display.d.ts +0 -28
- package/dist/utils/sync-display.d.ts.map +0 -1
- package/dist/utils/sync-display.js +0 -168
- package/dist/utils/sync-display.js.map +0 -1
- package/dist/utils/sync-fetch.d.ts +0 -108
- package/dist/utils/sync-fetch.d.ts.map +0 -1
- package/dist/utils/sync-fetch.js +0 -294
- package/dist/utils/sync-fetch.js.map +0 -1
- package/dist/utils/sync-helpers.d.ts +0 -7
- package/dist/utils/sync-helpers.d.ts.map +0 -1
- package/dist/utils/sync-helpers.js +0 -7
- package/dist/utils/sync-helpers.js.map +0 -1
- package/dist/utils/version-check.d.ts +0 -37
- package/dist/utils/version-check.d.ts.map +0 -1
- package/dist/utils/version-check.js +0 -117
- package/dist/utils/version-check.js.map +0 -1
- package/dist/utils/write-info.d.ts +0 -9
- package/dist/utils/write-info.d.ts.map +0 -1
- package/dist/utils/write-info.js +0 -11
- package/dist/utils/write-info.js.map +0 -1
- package/node_modules/@lua/shared-source-sync/dist/index.d.mts +0 -424
- package/node_modules/@lua/shared-source-sync/dist/index.d.ts +0 -424
- package/node_modules/@lua/shared-source-sync/dist/index.js +0 -536
- package/node_modules/@lua/shared-source-sync/dist/index.mjs +0 -491
- package/node_modules/@lua/shared-source-sync/package.json +0 -26
- package/node_modules/@lua/shared-source-sync/src/archive.ts +0 -98
- package/node_modules/@lua/shared-source-sync/src/filter.ts +0 -72
- package/node_modules/@lua/shared-source-sync/src/hash.ts +0 -40
- package/node_modules/@lua/shared-source-sync/src/http.ts +0 -132
- package/node_modules/@lua/shared-source-sync/src/index.ts +0 -56
- package/node_modules/@lua/shared-source-sync/src/pull.ts +0 -50
- package/node_modules/@lua/shared-source-sync/src/push.ts +0 -94
- package/node_modules/@lua/shared-source-sync/src/restore.ts +0 -83
- package/node_modules/@lua/shared-source-sync/src/skill-source.ts +0 -55
- package/node_modules/@lua/shared-source-sync/src/transfer.ts +0 -92
- package/node_modules/@lua/shared-source-sync/src/types.ts +0 -88
- package/node_modules/@lua/shared-source-sync/src/walk.ts +0 -91
- package/node_modules/@lua/shared-source-sync/tests/archive.test.ts +0 -108
- package/node_modules/@lua/shared-source-sync/tests/hash.test.ts +0 -40
- package/node_modules/@lua/shared-source-sync/tests/http.test.ts +0 -77
- package/node_modules/@lua/shared-source-sync/tests/push.test.ts +0 -162
- package/node_modules/@lua/shared-source-sync/tests/walk.test.ts +0 -84
- package/node_modules/@lua/shared-source-sync/tsconfig.json +0 -12
- package/node_modules/@lua/shared-source-sync/tsup.config.ts +0 -9
- package/node_modules/@lua/shared-source-sync/vitest.config.ts +0 -8
- package/node_modules/@lua/shared-types/dist/index.d.mts +0 -619
- package/node_modules/@lua/shared-types/dist/index.d.ts +0 -619
- package/node_modules/@lua/shared-types/dist/index.js +0 -435
- package/node_modules/@lua/shared-types/dist/index.mjs +0 -394
- package/node_modules/@lua/shared-types/package.json +0 -26
- package/node_modules/@lua/shared-types/src/agent-config.types.ts +0 -45
- package/node_modules/@lua/shared-types/src/agent-invocation.types.ts +0 -73
- package/node_modules/@lua/shared-types/src/ai-generate.types.ts +0 -74
- package/node_modules/@lua/shared-types/src/ai-generate.utils.ts +0 -16
- package/node_modules/@lua/shared-types/src/channel.type.ts +0 -23
- package/node_modules/@lua/shared-types/src/chat-history.types.ts +0 -112
- package/node_modules/@lua/shared-types/src/chat-stream.types.ts +0 -18
- package/node_modules/@lua/shared-types/src/client-tools.types.ts +0 -47
- package/node_modules/@lua/shared-types/src/device.types.ts +0 -190
- package/node_modules/@lua/shared-types/src/index.ts +0 -15
- package/node_modules/@lua/shared-types/src/model-registry.ts +0 -26
- package/node_modules/@lua/shared-types/src/persona-defaults.ts +0 -59
- package/node_modules/@lua/shared-types/src/persona-text.type.ts +0 -92
- package/node_modules/@lua/shared-types/src/sandbox-contract.ts +0 -63
- package/node_modules/@lua/shared-types/src/unstructured-types.ts +0 -58
- package/node_modules/@lua/shared-types/src/vm-execution-log.types.ts +0 -41
- package/node_modules/@lua/shared-types/tsconfig.json +0 -12
- package/node_modules/@lua/shared-types/tsup.config.ts +0 -9
- package/scripts/resolve-workspace-deps.cjs +0 -61
- /package/dist/{compiler/utils/zod-runtime.mjs → zod-runtime.mjs} +0 -0
package/dist/types/skill.d.ts
DELETED
|
@@ -1,1079 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lua Skill System
|
|
3
|
-
* Core types and classes for building Lua AI skills
|
|
4
|
-
*/
|
|
5
|
-
import { ZodType } from 'zod';
|
|
6
|
-
import UserDataInstance from '../instances/user.instance.js';
|
|
7
|
-
import { JobInstance } from '../instances/job.instance.js';
|
|
8
|
-
import type { LuaRequest } from '../interfaces/lua.js';
|
|
9
|
-
import type { PersonaText, SkillContextText } from '@lua/shared-types';
|
|
10
|
-
/**
|
|
11
|
-
* Safe environment variable access function.
|
|
12
|
-
* Gets injected at runtime with skill-specific environment variables.
|
|
13
|
-
*
|
|
14
|
-
* Checks process environment variables (.env file)
|
|
15
|
-
*
|
|
16
|
-
* @param key - The environment variable key to retrieve
|
|
17
|
-
* @returns The environment variable value or undefined if not found
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```typescript
|
|
21
|
-
* const baseUrl = env('BASE_URL');
|
|
22
|
-
* const apiKey = env('API_KEY');
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export declare const env: (key: string) => string | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Lua Tool interface.
|
|
28
|
-
* Defines the structure of a tool that can be added to a LuaSkill.
|
|
29
|
-
*
|
|
30
|
-
* @template TInput - Zod schema type for input validation
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* import { z } from 'zod';
|
|
35
|
-
* import { LuaTool } from 'lua-cli';
|
|
36
|
-
*
|
|
37
|
-
* const weatherTool: LuaTool = {
|
|
38
|
-
* name: 'get_weather',
|
|
39
|
-
* description: 'Gets current weather for a city',
|
|
40
|
-
* inputSchema: z.object({
|
|
41
|
-
* city: z.string(),
|
|
42
|
-
* units: z.enum(['metric', 'imperial']).optional()
|
|
43
|
-
* }),
|
|
44
|
-
* execute: async (input) => {
|
|
45
|
-
* // Fetch weather data...
|
|
46
|
-
* return { temperature: 72, condition: 'sunny' };
|
|
47
|
-
* }
|
|
48
|
-
* };
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```typescript
|
|
53
|
-
* // Tool with condition - only available to premium users
|
|
54
|
-
* class PremiumSearchTool implements LuaTool {
|
|
55
|
-
* name = "premium_search";
|
|
56
|
-
* description = "Advanced search for premium users";
|
|
57
|
-
* inputSchema = z.object({ query: z.string() });
|
|
58
|
-
*
|
|
59
|
-
* // Condition runs before tool is offered to LLM
|
|
60
|
-
* condition = async () => {
|
|
61
|
-
* const user = await User.get();
|
|
62
|
-
* return user.data?.isPremium === true;
|
|
63
|
-
* };
|
|
64
|
-
*
|
|
65
|
-
* execute = async (input) => { ... };
|
|
66
|
-
* }
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
export interface LuaTool<TInput extends ZodType = ZodType> {
|
|
70
|
-
/** Unique tool name (alphanumeric, hyphens, underscores only) */
|
|
71
|
-
name: string;
|
|
72
|
-
/** Description of what the tool does */
|
|
73
|
-
description: string;
|
|
74
|
-
/** Zod schema for input validation */
|
|
75
|
-
inputSchema: TInput;
|
|
76
|
-
/** Async function that executes the tool logic */
|
|
77
|
-
execute: (input: any) => Promise<any>;
|
|
78
|
-
/** Optional async function that determines if the tool should be available */
|
|
79
|
-
condition?: () => Promise<boolean>;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Lua Skill configuration.
|
|
83
|
-
* Used to initialize a new LuaSkill instance.
|
|
84
|
-
*/
|
|
85
|
-
export interface LuaSkillConfig {
|
|
86
|
-
/** Skill name (optional, defaults to 'unnamed-skill') */
|
|
87
|
-
name?: string;
|
|
88
|
-
/** Short description of the skill (1-2 sentences) */
|
|
89
|
-
description: string;
|
|
90
|
-
/** Detailed context for how the agent should use the tools */
|
|
91
|
-
context: SkillContextText;
|
|
92
|
-
/** Optional array of tools to add during construction */
|
|
93
|
-
tools?: LuaTool<any>[];
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Lua Skill class.
|
|
97
|
-
* Main class for building AI skills with tools.
|
|
98
|
-
*
|
|
99
|
-
* A skill is a collection of tools that the AI agent can use to accomplish tasks.
|
|
100
|
-
* Tools are functions with validated inputs and well-defined outputs.
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* ```typescript
|
|
104
|
-
* import { LuaSkill } from 'lua-cli';
|
|
105
|
-
*
|
|
106
|
-
* const skill = new LuaSkill({
|
|
107
|
-
* name: 'weather-skill',
|
|
108
|
-
* description: "Weather and calculator utilities",
|
|
109
|
-
* context: "This skill provides weather information and math operations. " +
|
|
110
|
-
* "Use get_weather for current conditions and calculator for arithmetic.",
|
|
111
|
-
* tools: [weatherTool, calculatorTool]
|
|
112
|
-
* });
|
|
113
|
-
*
|
|
114
|
-
* // Or add tools after construction
|
|
115
|
-
* skill.addTool(anotherTool);
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
export declare class LuaSkill {
|
|
119
|
-
private readonly tools;
|
|
120
|
-
private readonly name;
|
|
121
|
-
private readonly description;
|
|
122
|
-
private readonly context;
|
|
123
|
-
/**
|
|
124
|
-
* Creates a new LuaSkill instance.
|
|
125
|
-
*
|
|
126
|
-
* @param config - Configuration object containing skill metadata
|
|
127
|
-
* @param config.name - Skill name (optional, defaults to 'unnamed-skill')
|
|
128
|
-
* @param config.description - Short description of what the skill does (1-2 sentences)
|
|
129
|
-
* @param config.context - Detailed explanation of how the agent should use the tools
|
|
130
|
-
* @param config.tools - Optional array of tools to add immediately
|
|
131
|
-
*/
|
|
132
|
-
constructor(config: LuaSkillConfig);
|
|
133
|
-
getContext(): SkillContextText;
|
|
134
|
-
/**
|
|
135
|
-
* Adds a single tool to the skill.
|
|
136
|
-
* Tool name is validated before being added.
|
|
137
|
-
*
|
|
138
|
-
* @param tool - Tool to add
|
|
139
|
-
* @throws Error if tool name is invalid
|
|
140
|
-
*/
|
|
141
|
-
addTool<TInput extends ZodType>(tool: LuaTool<TInput>): void;
|
|
142
|
-
/**
|
|
143
|
-
* Adds multiple tools to the skill.
|
|
144
|
-
* All tool names are validated before being added.
|
|
145
|
-
*
|
|
146
|
-
* @param tools - Array of tools to add
|
|
147
|
-
* @throws Error if any tool name is invalid
|
|
148
|
-
*/
|
|
149
|
-
addTools(tools: LuaTool<any>[]): void;
|
|
150
|
-
/**
|
|
151
|
-
* Executes a tool by name with provided input.
|
|
152
|
-
* Input is validated against the tool's Zod schema.
|
|
153
|
-
*
|
|
154
|
-
* @param input - Input object containing tool name and parameters
|
|
155
|
-
* @param input.tool - Name of the tool to execute
|
|
156
|
-
* @returns Promise resolving to tool execution result
|
|
157
|
-
* @throws Error if tool not found or input validation fails
|
|
158
|
-
*/
|
|
159
|
-
run(input: Record<string, any>): Promise<any>;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Job schedule configuration
|
|
163
|
-
* Supports either cron-style recurring schedules or one-time execution
|
|
164
|
-
*/
|
|
165
|
-
export type JobSchedule = {
|
|
166
|
-
type: 'cron';
|
|
167
|
-
expression: string;
|
|
168
|
-
timezone?: string;
|
|
169
|
-
} | {
|
|
170
|
-
type: 'once';
|
|
171
|
-
executeAt: Date | string;
|
|
172
|
-
} | {
|
|
173
|
-
type: 'interval';
|
|
174
|
-
seconds: number;
|
|
175
|
-
};
|
|
176
|
-
/**
|
|
177
|
-
* Lua Job configuration.
|
|
178
|
-
* Used to initialize a new LuaJob instance.
|
|
179
|
-
*/
|
|
180
|
-
export interface LuaJobConfig {
|
|
181
|
-
/** Job name (optional, defaults to 'unnamed-job') */
|
|
182
|
-
name?: string;
|
|
183
|
-
/** Short description of the job (1-2 sentences) */
|
|
184
|
-
description: string;
|
|
185
|
-
/** Schedule configuration - cron, once, or interval */
|
|
186
|
-
schedule: JobSchedule;
|
|
187
|
-
/**
|
|
188
|
-
* Function that executes the job logic.
|
|
189
|
-
* Receives metadata as parameter for accessing job configuration.
|
|
190
|
-
*/
|
|
191
|
-
execute: (job: JobInstance) => Promise<any>;
|
|
192
|
-
/** Optional timeout in seconds (default: 300) */
|
|
193
|
-
timeout?: number;
|
|
194
|
-
/** Optional retry configuration */
|
|
195
|
-
retry?: {
|
|
196
|
-
maxAttempts: number;
|
|
197
|
-
backoffSeconds?: number;
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* Optional metadata for the job.
|
|
201
|
-
* Can store any custom data (tags, config, context, etc.)
|
|
202
|
-
* Sent to server and accessible during execution.
|
|
203
|
-
*/
|
|
204
|
-
metadata?: Record<string, any>;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Lua Job class.
|
|
208
|
-
* Main class for building scheduled jobs (cron jobs, one-time tasks, intervals).
|
|
209
|
-
*
|
|
210
|
-
* A job is a scheduled task that executes at specific times or intervals.
|
|
211
|
-
* Jobs can run once, on a recurring schedule (cron), or at fixed intervals.
|
|
212
|
-
*
|
|
213
|
-
* @example
|
|
214
|
-
* ```typescript
|
|
215
|
-
* import { LuaJob } from 'lua-cli';
|
|
216
|
-
*
|
|
217
|
-
* // Daily cleanup job at 2 AM
|
|
218
|
-
* const dailyCleanup = new LuaJob({
|
|
219
|
-
* name: 'daily-cleanup',
|
|
220
|
-
* description: "Daily database cleanup job",
|
|
221
|
-
* schedule: {
|
|
222
|
-
* type: 'cron',
|
|
223
|
-
* expression: '0 2 * * *', // 2 AM every day
|
|
224
|
-
* timezone: 'America/New_York'
|
|
225
|
-
* },
|
|
226
|
-
* timeout: 600, // 10 minutes
|
|
227
|
-
* retry: {
|
|
228
|
-
* maxAttempts: 3,
|
|
229
|
-
* backoffSeconds: 60
|
|
230
|
-
* },
|
|
231
|
-
* execute: async () => {
|
|
232
|
-
* // Cleanup logic
|
|
233
|
-
* console.log('Running cleanup...');
|
|
234
|
-
* return { recordsDeleted: 150 };
|
|
235
|
-
* }
|
|
236
|
-
* });
|
|
237
|
-
*
|
|
238
|
-
* // One-time job
|
|
239
|
-
* const sendWelcome = new LuaJob({
|
|
240
|
-
* name: 'send-welcome',
|
|
241
|
-
* description: "Send welcome email to new users",
|
|
242
|
-
* schedule: {
|
|
243
|
-
* type: 'once',
|
|
244
|
-
* executeAt: new Date('2025-12-31T10:00:00Z')
|
|
245
|
-
* },
|
|
246
|
-
* execute: async () => {
|
|
247
|
-
* console.log('Sending welcome emails...');
|
|
248
|
-
* return { emailsSent: 100 };
|
|
249
|
-
* }
|
|
250
|
-
* });
|
|
251
|
-
*
|
|
252
|
-
* // Interval-based job (every 5 minutes)
|
|
253
|
-
* const healthCheck = new LuaJob({
|
|
254
|
-
* name: 'health-check',
|
|
255
|
-
* description: "System health check",
|
|
256
|
-
* schedule: {
|
|
257
|
-
* type: 'interval',
|
|
258
|
-
* seconds: 300 // 5 minutes
|
|
259
|
-
* },
|
|
260
|
-
* execute: async () => {
|
|
261
|
-
* return { status: 'healthy' };
|
|
262
|
-
* }
|
|
263
|
-
* });
|
|
264
|
-
* ```
|
|
265
|
-
*/
|
|
266
|
-
export declare class LuaJob {
|
|
267
|
-
private readonly name;
|
|
268
|
-
private readonly description;
|
|
269
|
-
private readonly schedule;
|
|
270
|
-
private readonly timeout;
|
|
271
|
-
private readonly retry?;
|
|
272
|
-
private readonly metadata?;
|
|
273
|
-
private readonly executeFunction;
|
|
274
|
-
/**
|
|
275
|
-
* Creates a new LuaJob instance.
|
|
276
|
-
*
|
|
277
|
-
* @param config - Configuration object containing job metadata
|
|
278
|
-
* @param config.name - Job name (optional, defaults to 'unnamed-job')
|
|
279
|
-
* @param config.description - Short description of what the job does (1-2 sentences)
|
|
280
|
-
* @param config.schedule - Schedule configuration (cron, once, or interval)
|
|
281
|
-
* @param config.timeout - Optional timeout in seconds (default: 300)
|
|
282
|
-
* @param config.retry - Optional retry configuration
|
|
283
|
-
* @param config.metadata - Optional metadata for the job
|
|
284
|
-
* @param config.execute - Function that processes the job (receives job instance as parameter)
|
|
285
|
-
*/
|
|
286
|
-
constructor(config: LuaJobConfig);
|
|
287
|
-
/**
|
|
288
|
-
* Gets the job name.
|
|
289
|
-
*/
|
|
290
|
-
getName(): string;
|
|
291
|
-
/**
|
|
292
|
-
* Gets the job description.
|
|
293
|
-
*/
|
|
294
|
-
getDescription(): string;
|
|
295
|
-
/**
|
|
296
|
-
* Gets the job schedule.
|
|
297
|
-
*/
|
|
298
|
-
getSchedule(): JobSchedule;
|
|
299
|
-
/**
|
|
300
|
-
* Gets the job timeout in seconds.
|
|
301
|
-
*/
|
|
302
|
-
getTimeout(): number;
|
|
303
|
-
/**
|
|
304
|
-
* Gets the retry configuration.
|
|
305
|
-
*/
|
|
306
|
-
getRetry(): {
|
|
307
|
-
maxAttempts: number;
|
|
308
|
-
backoffSeconds?: number;
|
|
309
|
-
} | undefined;
|
|
310
|
-
/**
|
|
311
|
-
* Gets the job metadata.
|
|
312
|
-
*/
|
|
313
|
-
getMetadata(): Record<string, any> | undefined;
|
|
314
|
-
/**
|
|
315
|
-
* Executes the job with the provided job instance.
|
|
316
|
-
* @param job - Job instance with metadata and context
|
|
317
|
-
* @returns Promise resolving to job execution result
|
|
318
|
-
*/
|
|
319
|
-
execute(job: JobInstance): Promise<any>;
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Event payload delivered to webhook execute functions.
|
|
323
|
-
*/
|
|
324
|
-
export interface LuaWebhookEvent {
|
|
325
|
-
/** Parsed query parameters */
|
|
326
|
-
query?: Record<string, any>;
|
|
327
|
-
/** Request headers */
|
|
328
|
-
headers?: Record<string, any>;
|
|
329
|
-
/** Request body (JSON or raw data) */
|
|
330
|
-
body?: any;
|
|
331
|
-
/** ISO timestamp when the webhook was received */
|
|
332
|
-
timestamp: string;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Lua Webhook configuration.
|
|
336
|
-
* Used to initialize a new LuaWebhook instance.
|
|
337
|
-
*/
|
|
338
|
-
export interface LuaWebhookConfig {
|
|
339
|
-
/** Webhook name (optional, defaults to 'unnamed-webhook') */
|
|
340
|
-
name?: string;
|
|
341
|
-
/** Short description of the webhook (1-2 sentences) */
|
|
342
|
-
description: string;
|
|
343
|
-
/** Optional Zod schema for query parameter validation */
|
|
344
|
-
querySchema?: ZodType;
|
|
345
|
-
/** Optional Zod schema for header validation */
|
|
346
|
-
headerSchema?: ZodType;
|
|
347
|
-
/** Optional Zod schema for body validation */
|
|
348
|
-
bodySchema?: ZodType;
|
|
349
|
-
/** Function that executes the webhook logic */
|
|
350
|
-
execute: (event: LuaWebhookEvent) => Promise<any>;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Lua Webhook class.
|
|
354
|
-
* Main class for building webhooks with validated inputs.
|
|
355
|
-
*
|
|
356
|
-
* A webhook is an HTTP endpoint that can receive requests with validated
|
|
357
|
-
* query parameters, headers, and body. The execute function processes the
|
|
358
|
-
* validated input and returns a response.
|
|
359
|
-
*
|
|
360
|
-
* @example
|
|
361
|
-
* ```typescript
|
|
362
|
-
* import { LuaWebhook } from 'lua-cli';
|
|
363
|
-
* import { z } from 'zod';
|
|
364
|
-
*
|
|
365
|
-
* const webhook = new LuaWebhook({
|
|
366
|
-
* name: 'user-created',
|
|
367
|
-
* description: "Webhook that handles user creation events",
|
|
368
|
-
* querySchema: z.object({
|
|
369
|
-
* source: z.string().optional()
|
|
370
|
-
* }),
|
|
371
|
-
* headerSchema: z.object({
|
|
372
|
-
* 'x-api-key': z.string(),
|
|
373
|
-
* 'content-type': z.string().optional()
|
|
374
|
-
* }),
|
|
375
|
-
* bodySchema: z.object({
|
|
376
|
-
* userId: z.string(),
|
|
377
|
-
* email: z.string().email(),
|
|
378
|
-
* name: z.string()
|
|
379
|
-
* }),
|
|
380
|
-
* execute: async (event) => {
|
|
381
|
-
* const { query, headers, body } = event;
|
|
382
|
-
* // Process the webhook...
|
|
383
|
-
* console.log('New user:', body.email);
|
|
384
|
-
* return { success: true, userId: body.userId };
|
|
385
|
-
* }
|
|
386
|
-
* });
|
|
387
|
-
*
|
|
388
|
-
* // Execute the webhook with validated inputs
|
|
389
|
-
* const result = await webhook.execute(
|
|
390
|
-
* { source: 'mobile' },
|
|
391
|
-
* { 'x-api-key': 'secret-key' },
|
|
392
|
-
* { userId: '123', email: 'user@example.com', name: 'John' }
|
|
393
|
-
* );
|
|
394
|
-
* ```
|
|
395
|
-
*/
|
|
396
|
-
export declare class LuaWebhook {
|
|
397
|
-
private readonly name;
|
|
398
|
-
private readonly description;
|
|
399
|
-
private readonly querySchema?;
|
|
400
|
-
private readonly headerSchema?;
|
|
401
|
-
private readonly bodySchema?;
|
|
402
|
-
private readonly executeFunction;
|
|
403
|
-
/**
|
|
404
|
-
* Creates a new LuaWebhook instance.
|
|
405
|
-
*
|
|
406
|
-
* @param config - Configuration object containing webhook metadata
|
|
407
|
-
* @param config.name - Webhook name (optional, defaults to 'unnamed-webhook')
|
|
408
|
-
* @param config.description - Short description of what the webhook does (1-2 sentences)
|
|
409
|
-
* @param config.querySchema - Optional Zod schema for query parameter validation
|
|
410
|
-
* @param config.headerSchema - Optional Zod schema for header validation
|
|
411
|
-
* @param config.bodySchema - Optional Zod schema for body validation
|
|
412
|
-
* @param config.execute - Function that processes the webhook request
|
|
413
|
-
*/
|
|
414
|
-
constructor(config: LuaWebhookConfig);
|
|
415
|
-
/**
|
|
416
|
-
* Gets the webhook name.
|
|
417
|
-
*/
|
|
418
|
-
getName(): string;
|
|
419
|
-
/**
|
|
420
|
-
* Gets the webhook description.
|
|
421
|
-
*/
|
|
422
|
-
getDescription(): string;
|
|
423
|
-
/**
|
|
424
|
-
* Executes the webhook with validated input.
|
|
425
|
-
* Validates query parameters, headers, and body against their respective schemas
|
|
426
|
-
* before executing the webhook function.
|
|
427
|
-
*
|
|
428
|
-
* @param query - Query parameters object
|
|
429
|
-
* @param headers - Headers object
|
|
430
|
-
* @param body - Request body
|
|
431
|
-
* @returns Promise resolving to webhook execution result
|
|
432
|
-
* @throws Error if validation fails for any input
|
|
433
|
-
*
|
|
434
|
-
* @example
|
|
435
|
-
* ```typescript
|
|
436
|
-
* const result = await webhook.execute(
|
|
437
|
-
* { limit: '10' },
|
|
438
|
-
* { 'x-api-key': 'secret' },
|
|
439
|
-
* { data: 'value' }
|
|
440
|
-
* );
|
|
441
|
-
* ```
|
|
442
|
-
*/
|
|
443
|
-
execute(query?: Record<string, any>, headers?: Record<string, any>, body?: any): Promise<any>;
|
|
444
|
-
}
|
|
445
|
-
export type PreProcessorAction = 'proceed' | 'block';
|
|
446
|
-
export type PreProcessorBlockResponse = {
|
|
447
|
-
/** Stop processing immediately */
|
|
448
|
-
action: 'block';
|
|
449
|
-
/** Message to show to the user */
|
|
450
|
-
response: string;
|
|
451
|
-
/** Optional metadata */
|
|
452
|
-
metadata?: Record<string, any>;
|
|
453
|
-
};
|
|
454
|
-
export type PreProcessorProceedResponse = {
|
|
455
|
-
/** Proceed to next preprocessor or agent */
|
|
456
|
-
action: 'proceed';
|
|
457
|
-
/** Optional modified message (if not provided, uses original/current message) */
|
|
458
|
-
modifiedMessage?: import('../interfaces/chat.js').ChatMessage[];
|
|
459
|
-
/** Optional metadata to pass along */
|
|
460
|
-
metadata?: Record<string, any>;
|
|
461
|
-
};
|
|
462
|
-
/**
|
|
463
|
-
* Result returned by the preprocessor
|
|
464
|
-
*/
|
|
465
|
-
export type PreProcessorResult = PreProcessorBlockResponse | PreProcessorProceedResponse;
|
|
466
|
-
/**
|
|
467
|
-
* PreProcessor configuration.
|
|
468
|
-
*/
|
|
469
|
-
export interface PreProcessorConfig {
|
|
470
|
-
/** PreProcessor name (optional, defaults to 'unnamed-preprocessor') */
|
|
471
|
-
name?: string;
|
|
472
|
-
/** Short description of the preprocessor */
|
|
473
|
-
description: string;
|
|
474
|
-
/**
|
|
475
|
-
* Async flag - indicates if processor should run in background on server:
|
|
476
|
-
* - true: Run asynchronously (non-blocking, for slow operations like API calls)
|
|
477
|
-
* - false: Run synchronously (blocking, for fast operations like text filtering)
|
|
478
|
-
* Default: false (synchronous)
|
|
479
|
-
*/
|
|
480
|
-
async?: boolean;
|
|
481
|
-
/**
|
|
482
|
-
* Execution priority (lower runs first).
|
|
483
|
-
* Default: 100
|
|
484
|
-
*/
|
|
485
|
-
priority?: number;
|
|
486
|
-
/**
|
|
487
|
-
* Function that processes messages before sending to agent.
|
|
488
|
-
*/
|
|
489
|
-
execute: (user: UserDataInstance, messages: import('../interfaces/chat.js').ChatMessage[], channel: string) => Promise<PreProcessorResult>;
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* PreProcessor class.
|
|
493
|
-
* Processes user messages before they reach the agent.
|
|
494
|
-
* Can handle rich content (text, images, files).
|
|
495
|
-
*
|
|
496
|
-
* @example
|
|
497
|
-
* ```typescript
|
|
498
|
-
* const contentFilter = new PreProcessor({
|
|
499
|
-
* name: 'content-filter',
|
|
500
|
-
* description: 'Filters and processes message content',
|
|
501
|
-
* priority: 10,
|
|
502
|
-
* execute: async (user, messages, channel) => {
|
|
503
|
-
* // Check for spam
|
|
504
|
-
* const hasSpam = messages.some(msg =>
|
|
505
|
-
* msg.type === 'text' && msg.text.includes('spam')
|
|
506
|
-
* );
|
|
507
|
-
*
|
|
508
|
-
* if (hasSpam) {
|
|
509
|
-
* return {
|
|
510
|
-
* action: 'block',
|
|
511
|
-
* response: "Message blocked due to spam content"
|
|
512
|
-
* };
|
|
513
|
-
* }
|
|
514
|
-
*
|
|
515
|
-
* // Return messages to proceed
|
|
516
|
-
* return { action: 'proceed' };
|
|
517
|
-
* }
|
|
518
|
-
* });
|
|
519
|
-
* ```
|
|
520
|
-
*/
|
|
521
|
-
export declare class PreProcessor {
|
|
522
|
-
private readonly name;
|
|
523
|
-
private readonly description;
|
|
524
|
-
private readonly asyncMode;
|
|
525
|
-
private readonly priority;
|
|
526
|
-
private readonly executeFunction;
|
|
527
|
-
constructor(config: PreProcessorConfig);
|
|
528
|
-
getName(): string;
|
|
529
|
-
getDescription(): string;
|
|
530
|
-
getAsync(): boolean;
|
|
531
|
-
getPriority(): number;
|
|
532
|
-
execute(user: UserDataInstance, messages: import('../interfaces/chat.js').ChatMessage[], channel: string): Promise<PreProcessorResult>;
|
|
533
|
-
}
|
|
534
|
-
/**
|
|
535
|
-
* PostProcessor response type.
|
|
536
|
-
* The execute function must return an object with the modified response.
|
|
537
|
-
*/
|
|
538
|
-
export interface PostProcessorResponse {
|
|
539
|
-
modifiedResponse: string;
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* PostProcessor configuration.
|
|
543
|
-
*/
|
|
544
|
-
export interface PostProcessorConfig {
|
|
545
|
-
/** PostProcessor name (optional, defaults to 'unnamed-postprocessor') */
|
|
546
|
-
name?: string;
|
|
547
|
-
/** Short description of the postprocessor */
|
|
548
|
-
description: string;
|
|
549
|
-
/**
|
|
550
|
-
* Execution priority (lower runs first).
|
|
551
|
-
* Default: 100
|
|
552
|
-
*/
|
|
553
|
-
priority?: number;
|
|
554
|
-
/**
|
|
555
|
-
* Function that processes the agent's response before sending to user.
|
|
556
|
-
* MUST return { modifiedResponse: string } - the formatted response text.
|
|
557
|
-
*/
|
|
558
|
-
execute: (user: UserDataInstance, message: string, response: string, channel: string) => Promise<PostProcessorResponse>;
|
|
559
|
-
}
|
|
560
|
-
/**
|
|
561
|
-
* PostProcessor class.
|
|
562
|
-
* Processes agent responses before they reach the user.
|
|
563
|
-
*
|
|
564
|
-
* @example
|
|
565
|
-
* ```typescript
|
|
566
|
-
* const responseFormatter = new PostProcessor({
|
|
567
|
-
* name: 'response-formatter',
|
|
568
|
-
* description: 'Formats responses with branding',
|
|
569
|
-
* execute: async (user, message, response, channel) => {
|
|
570
|
-
* return { modifiedResponse: response + '\n\n---\nPowered by Acme Corp' };
|
|
571
|
-
* }
|
|
572
|
-
* });
|
|
573
|
-
* ```
|
|
574
|
-
*/
|
|
575
|
-
export declare class PostProcessor {
|
|
576
|
-
private readonly name;
|
|
577
|
-
private readonly description;
|
|
578
|
-
private readonly priority;
|
|
579
|
-
private readonly executeFunction;
|
|
580
|
-
constructor(config: PostProcessorConfig);
|
|
581
|
-
getName(): string;
|
|
582
|
-
getDescription(): string;
|
|
583
|
-
getPriority(): number;
|
|
584
|
-
execute(user: UserDataInstance, message: string, response: string, channel: string): Promise<PostProcessorResponse>;
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* MCP Server transport type - determines how to connect to the server.
|
|
588
|
-
*
|
|
589
|
-
* - 'streamable-http': Modern MCP standard (recommended) - single endpoint for bidirectional communication
|
|
590
|
-
* - 'sse': Legacy Server-Sent Events transport - for older MCP servers
|
|
591
|
-
*
|
|
592
|
-
* Note: 'stdio' transport is not supported yet.
|
|
593
|
-
*/
|
|
594
|
-
export type MCPTransport = 'sse' | 'streamable-http';
|
|
595
|
-
/**
|
|
596
|
-
* Base configuration for all MCP servers.
|
|
597
|
-
*/
|
|
598
|
-
export interface MCPServerBaseConfig {
|
|
599
|
-
/** Unique identifier for this MCP server */
|
|
600
|
-
name: string;
|
|
601
|
-
/** Optional timeout in milliseconds (default: 60000) */
|
|
602
|
-
timeout?: number;
|
|
603
|
-
}
|
|
604
|
-
/**
|
|
605
|
-
* Function type for resolving environment variables at runtime.
|
|
606
|
-
* Use env() inside to access agent environment variables.
|
|
607
|
-
*
|
|
608
|
-
* @example
|
|
609
|
-
* ```typescript
|
|
610
|
-
* env: () => ({
|
|
611
|
-
* API_KEY: env("MY_API_KEY"),
|
|
612
|
-
* DEBUG: "true"
|
|
613
|
-
* })
|
|
614
|
-
* ```
|
|
615
|
-
*/
|
|
616
|
-
export type EnvResolverFunction = () => Record<string, string>;
|
|
617
|
-
/**
|
|
618
|
-
* Function type for resolving headers at runtime.
|
|
619
|
-
* Use env() inside to access agent environment variables.
|
|
620
|
-
*
|
|
621
|
-
* @example
|
|
622
|
-
* ```typescript
|
|
623
|
-
* headers: () => ({
|
|
624
|
-
* 'Authorization': `Bearer ${env("API_TOKEN")}`
|
|
625
|
-
* })
|
|
626
|
-
* ```
|
|
627
|
-
*/
|
|
628
|
-
export type HeadersResolverFunction = () => Record<string, string>;
|
|
629
|
-
/**
|
|
630
|
-
* Function type for resolving URL at runtime.
|
|
631
|
-
* Use env() inside to access agent environment variables.
|
|
632
|
-
*
|
|
633
|
-
* @example
|
|
634
|
-
* ```typescript
|
|
635
|
-
* url: () => env("MCP_SERVER_URL") || "https://default.example.com/mcp"
|
|
636
|
-
* ```
|
|
637
|
-
*/
|
|
638
|
-
export type UrlResolverFunction = () => string;
|
|
639
|
-
/**
|
|
640
|
-
* Configuration for SSE-based MCP servers (legacy remote endpoints)
|
|
641
|
-
*
|
|
642
|
-
* Use this for older MCP servers that don't support Streamable HTTP.
|
|
643
|
-
* For new integrations, prefer MCPStreamableHttpServerConfig.
|
|
644
|
-
*/
|
|
645
|
-
export interface MCPSSEServerConfig extends MCPServerBaseConfig {
|
|
646
|
-
transport: 'sse';
|
|
647
|
-
/**
|
|
648
|
-
* URL of the MCP server endpoint.
|
|
649
|
-
* Can be a static string or a function that returns the URL at runtime.
|
|
650
|
-
*
|
|
651
|
-
* @example
|
|
652
|
-
* // Static
|
|
653
|
-
* url: "https://api.example.com/mcp"
|
|
654
|
-
*
|
|
655
|
-
* // Function (evaluated at runtime)
|
|
656
|
-
* url: () => env("MCP_SERVER_URL")
|
|
657
|
-
*/
|
|
658
|
-
url: string | UrlResolverFunction;
|
|
659
|
-
/**
|
|
660
|
-
* Optional headers to send with requests.
|
|
661
|
-
* Can be a static object or a function that returns headers at runtime.
|
|
662
|
-
* Use a function to access env() for dynamic resolution from agent env vars.
|
|
663
|
-
*
|
|
664
|
-
* @example
|
|
665
|
-
* // Static (NOT recommended for secrets)
|
|
666
|
-
* headers: { 'X-Custom': 'value' }
|
|
667
|
-
*
|
|
668
|
-
* // Function (evaluated at runtime - recommended for auth)
|
|
669
|
-
* headers: () => ({
|
|
670
|
-
* 'Authorization': `Bearer ${env("API_TOKEN")}`
|
|
671
|
-
* })
|
|
672
|
-
*/
|
|
673
|
-
headers?: Record<string, string> | HeadersResolverFunction;
|
|
674
|
-
}
|
|
675
|
-
/**
|
|
676
|
-
* Configuration for Streamable HTTP MCP servers (modern standard - RECOMMENDED)
|
|
677
|
-
*
|
|
678
|
-
* This is the recommended transport for new MCP server integrations.
|
|
679
|
-
* Streamable HTTP is the modern MCP standard (spec 2025-03-26) that provides:
|
|
680
|
-
* - Single endpoint for bidirectional communication
|
|
681
|
-
* - Session management via Mcp-Session-Id header
|
|
682
|
-
* - Resumability via SSE event IDs
|
|
683
|
-
*
|
|
684
|
-
* @example
|
|
685
|
-
* ```typescript
|
|
686
|
-
* const docsServer = new LuaMCPServer({
|
|
687
|
-
* name: 'docs',
|
|
688
|
-
* transport: 'streamable-http',
|
|
689
|
-
* url: 'https://mcp.example.com/mcp',
|
|
690
|
-
* headers: () => ({
|
|
691
|
-
* 'Authorization': `Bearer ${env("MCP_API_TOKEN")}`
|
|
692
|
-
* })
|
|
693
|
-
* });
|
|
694
|
-
* ```
|
|
695
|
-
*/
|
|
696
|
-
export interface MCPStreamableHttpServerConfig extends MCPServerBaseConfig {
|
|
697
|
-
transport: 'streamable-http';
|
|
698
|
-
/**
|
|
699
|
-
* URL of the MCP server endpoint.
|
|
700
|
-
* Can be a static string or a function that returns the URL at runtime.
|
|
701
|
-
*
|
|
702
|
-
* @example
|
|
703
|
-
* // Static
|
|
704
|
-
* url: "https://api.example.com/mcp"
|
|
705
|
-
*
|
|
706
|
-
* // Function (evaluated at runtime)
|
|
707
|
-
* url: () => env("MCP_SERVER_URL")
|
|
708
|
-
*/
|
|
709
|
-
url: string | UrlResolverFunction;
|
|
710
|
-
/**
|
|
711
|
-
* Optional headers to send with requests.
|
|
712
|
-
* Can be a static object or a function that returns headers at runtime.
|
|
713
|
-
* Use a function to access env() for dynamic resolution from agent env vars.
|
|
714
|
-
*
|
|
715
|
-
* @example
|
|
716
|
-
* // Static (NOT recommended for secrets)
|
|
717
|
-
* headers: { 'X-Custom': 'value' }
|
|
718
|
-
*
|
|
719
|
-
* // Function (evaluated at runtime - recommended for auth)
|
|
720
|
-
* headers: () => ({
|
|
721
|
-
* 'Authorization': `Bearer ${env("API_TOKEN")}`
|
|
722
|
-
* })
|
|
723
|
-
*/
|
|
724
|
-
headers?: Record<string, string> | HeadersResolverFunction;
|
|
725
|
-
}
|
|
726
|
-
/**
|
|
727
|
-
* Union type for all MCP server configurations.
|
|
728
|
-
*
|
|
729
|
-
* Note: stdio transport is not supported yet.
|
|
730
|
-
* Use 'streamable-http' (recommended) or 'sse' (legacy) instead.
|
|
731
|
-
*/
|
|
732
|
-
export type LuaMCPServerConfig = MCPSSEServerConfig | MCPStreamableHttpServerConfig;
|
|
733
|
-
/**
|
|
734
|
-
* LuaMCPServer class.
|
|
735
|
-
* Defines an MCP (Model Context Protocol) server connection.
|
|
736
|
-
*
|
|
737
|
-
* MCP servers provide tools that can be used by your agent at runtime.
|
|
738
|
-
* Connect to remote MCP servers via Streamable HTTP (recommended) or SSE (legacy).
|
|
739
|
-
*
|
|
740
|
-
* Environment variables can be provided as static values or as functions that
|
|
741
|
-
* resolve at runtime using the env() API (consistent with tool execute functions).
|
|
742
|
-
*
|
|
743
|
-
* @example
|
|
744
|
-
* ```typescript
|
|
745
|
-
* import { LuaMCPServer, env } from 'lua-cli';
|
|
746
|
-
*
|
|
747
|
-
* // Remote MCP server via Streamable HTTP (recommended)
|
|
748
|
-
* const docsServer = new LuaMCPServer({
|
|
749
|
-
* name: 'docs',
|
|
750
|
-
* transport: 'streamable-http',
|
|
751
|
-
* url: 'https://mcp.example.com/mcp',
|
|
752
|
-
* headers: () => ({
|
|
753
|
-
* 'Authorization': `Bearer ${env("MCP_API_TOKEN")}`
|
|
754
|
-
* })
|
|
755
|
-
* });
|
|
756
|
-
*
|
|
757
|
-
* // Remote MCP server via SSE (legacy)
|
|
758
|
-
* const legacyServer = new LuaMCPServer({
|
|
759
|
-
* name: 'legacy-api',
|
|
760
|
-
* transport: 'sse',
|
|
761
|
-
* url: 'https://old-mcp.example.com/sse',
|
|
762
|
-
* headers: () => ({
|
|
763
|
-
* 'Authorization': `Bearer ${env("API_KEY")}`
|
|
764
|
-
* })
|
|
765
|
-
* });
|
|
766
|
-
* ```
|
|
767
|
-
*/
|
|
768
|
-
export declare class LuaMCPServer {
|
|
769
|
-
private readonly config;
|
|
770
|
-
constructor(config: LuaMCPServerConfig);
|
|
771
|
-
getName(): string;
|
|
772
|
-
getTransport(): MCPTransport;
|
|
773
|
-
getTimeout(): number | undefined;
|
|
774
|
-
getConfig(): LuaMCPServerConfig;
|
|
775
|
-
/**
|
|
776
|
-
* Returns the server configuration in a format suitable for serialization.
|
|
777
|
-
* Environment variable references (${env.VAR_NAME}) are preserved for runtime resolution.
|
|
778
|
-
*/
|
|
779
|
-
toJSON(): Record<string, any>;
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* LuaAgent configuration interface.
|
|
783
|
-
* Provides a simplified, unified way to configure an agent with all its components.
|
|
784
|
-
*
|
|
785
|
-
* This is the recommended approach for defining your agent. Instead of exporting
|
|
786
|
-
* individual skills, jobs, webhooks, etc., you export a single LuaAgent object
|
|
787
|
-
* that contains everything.
|
|
788
|
-
*/
|
|
789
|
-
/**
|
|
790
|
-
* Per-agent message batching/debounce configuration.
|
|
791
|
-
* Overrides platform-wide env var defaults for this specific agent.
|
|
792
|
-
* Any field left undefined falls back to the env var, then to the hardcoded default.
|
|
793
|
-
*
|
|
794
|
-
* @example
|
|
795
|
-
* ```typescript
|
|
796
|
-
* export default new LuaAgent({
|
|
797
|
-
* name: 'my-agent',
|
|
798
|
-
* persona: '...',
|
|
799
|
-
* batching: {
|
|
800
|
-
* firstMessageDelayMs: 200, // hold first message 200ms to allow batch formation
|
|
801
|
-
* debounceWindowMs: 1500, // extend window 1.5s per new message while in-flight
|
|
802
|
-
* maxBatchMessages: 5,
|
|
803
|
-
* }
|
|
804
|
-
* });
|
|
805
|
-
* ```
|
|
806
|
-
*/
|
|
807
|
-
import type { BatchingConfig, GovernanceConfig } from '@lua/shared-types';
|
|
808
|
-
/**
|
|
809
|
-
* Type for the agent's model property.
|
|
810
|
-
*
|
|
811
|
-
* Can be either:
|
|
812
|
-
* - A static `'provider/model'` string (e.g., `'openai/gpt-4o'`)
|
|
813
|
-
* - A resolver function that receives `LuaRequest` and returns a model string.
|
|
814
|
-
* The function runs in the full sandbox with access to all APIs (User, Baskets, etc.)
|
|
815
|
-
*
|
|
816
|
-
* @example
|
|
817
|
-
* ```typescript
|
|
818
|
-
* // Static model
|
|
819
|
-
* model: 'openai/gpt-4o'
|
|
820
|
-
*
|
|
821
|
-
* // Dynamic model based on channel
|
|
822
|
-
* model: async (request) => {
|
|
823
|
-
* if (request.channel === 'whatsapp') return 'openai/gpt-4o-mini';
|
|
824
|
-
* return 'openai/gpt-4o';
|
|
825
|
-
* }
|
|
826
|
-
* ```
|
|
827
|
-
*/
|
|
828
|
-
export type LuaAgentModel = string | ((request: LuaRequest) => string | Promise<string>);
|
|
829
|
-
export interface LuaAgentConfig {
|
|
830
|
-
/** Agent name (used for identification) */
|
|
831
|
-
name: string;
|
|
832
|
-
/** Agent persona - defines the agent's behavior and personality */
|
|
833
|
-
persona: PersonaText;
|
|
834
|
-
/** LLM model to use — 'provider/model' string or resolver function */
|
|
835
|
-
model?: LuaAgentModel;
|
|
836
|
-
/** Array of skills (each with tools) */
|
|
837
|
-
skills?: LuaSkill[];
|
|
838
|
-
/** Array of webhooks */
|
|
839
|
-
webhooks?: LuaWebhook[];
|
|
840
|
-
/** Array of scheduled jobs */
|
|
841
|
-
jobs?: LuaJob[];
|
|
842
|
-
/** Array of preprocessors (run before messages reach the agent) */
|
|
843
|
-
preProcessors?: PreProcessor[];
|
|
844
|
-
/** Array of postprocessors (run after agent generates responses) */
|
|
845
|
-
postProcessors?: PostProcessor[];
|
|
846
|
-
/** Array of MCP servers (Model Context Protocol) for external tool integrations */
|
|
847
|
-
mcpServers?: LuaMCPServer[];
|
|
848
|
-
/** Array of devices (external hardware that the agent can send commands to and receive triggers from) */
|
|
849
|
-
devices?: LuaDevice[];
|
|
850
|
-
/** Standalone device triggers — agent-side logic that any device can fire */
|
|
851
|
-
deviceTriggers?: LuaDeviceTrigger[];
|
|
852
|
-
/** Per-agent message batching/debounce configuration. Overrides platform env var defaults. */
|
|
853
|
-
batching?: BatchingConfig;
|
|
854
|
-
/** Governance policy configuration. When set, tool calls, preprocessors, and postprocessors are governed. */
|
|
855
|
-
governance?: GovernanceConfig;
|
|
856
|
-
}
|
|
857
|
-
/**
|
|
858
|
-
* LuaAgent class.
|
|
859
|
-
* Unified agent configuration that consolidates skills, webhooks, jobs, and processors.
|
|
860
|
-
*
|
|
861
|
-
* This is the simplest way to define an agent. Instead of exporting multiple separate
|
|
862
|
-
* components, you create one LuaAgent that contains everything.
|
|
863
|
-
*
|
|
864
|
-
* @example
|
|
865
|
-
* ```typescript
|
|
866
|
-
* import { LuaAgent, LuaSkill, LuaJob, LuaWebhook } from 'lua-cli';
|
|
867
|
-
*
|
|
868
|
-
* // Define your skills, jobs, webhooks in separate files
|
|
869
|
-
* import { userSkill } from './skills/user-skill';
|
|
870
|
-
* import { healthCheckJob } from './jobs/health-check';
|
|
871
|
-
* import { webhookHandler } from './webhooks/handler';
|
|
872
|
-
*
|
|
873
|
-
* // Create a single agent configuration
|
|
874
|
-
* export const agent = new LuaAgent({
|
|
875
|
-
* name: 'my-assistant',
|
|
876
|
-
* persona: 'You are a helpful AI assistant that can manage users and products.',
|
|
877
|
-
* skills: [userSkill],
|
|
878
|
-
* jobs: [healthCheckJob],
|
|
879
|
-
* webhooks: [webhookHandler],
|
|
880
|
-
* preProcessors: [],
|
|
881
|
-
* postProcessors: []
|
|
882
|
-
* });
|
|
883
|
-
* ```
|
|
884
|
-
*/
|
|
885
|
-
export declare class LuaAgent {
|
|
886
|
-
private readonly name;
|
|
887
|
-
private readonly persona;
|
|
888
|
-
private readonly model?;
|
|
889
|
-
private readonly skills;
|
|
890
|
-
private readonly webhooks;
|
|
891
|
-
private readonly jobs;
|
|
892
|
-
private readonly preProcessors;
|
|
893
|
-
private readonly postProcessors;
|
|
894
|
-
private readonly mcpServers;
|
|
895
|
-
private readonly devices;
|
|
896
|
-
private readonly deviceTriggers;
|
|
897
|
-
private readonly batching?;
|
|
898
|
-
private readonly governance?;
|
|
899
|
-
/**
|
|
900
|
-
* Creates a new LuaAgent instance.
|
|
901
|
-
*
|
|
902
|
-
* @param config - Agent configuration
|
|
903
|
-
* @param config.name - Agent name
|
|
904
|
-
* @param config.persona - Agent persona (behavior and personality)
|
|
905
|
-
* @param config.model - Optional LLM model ('provider/model' string or resolver function)
|
|
906
|
-
* @param config.skills - Optional array of skills
|
|
907
|
-
* @param config.webhooks - Optional array of webhooks
|
|
908
|
-
* @param config.jobs - Optional array of jobs
|
|
909
|
-
* @param config.preProcessors - Optional array of preprocessors
|
|
910
|
-
* @param config.postProcessors - Optional array of postprocessors
|
|
911
|
-
* @param config.mcpServers - Optional array of MCP servers
|
|
912
|
-
* @param config.devices - Optional array of devices (external hardware)
|
|
913
|
-
* @param config.batching - Optional per-agent batching/debounce configuration
|
|
914
|
-
*/
|
|
915
|
-
constructor(config: LuaAgentConfig);
|
|
916
|
-
getName(): string;
|
|
917
|
-
getPersona(): PersonaText;
|
|
918
|
-
getModel(): LuaAgentModel | undefined;
|
|
919
|
-
getSkills(): LuaSkill[];
|
|
920
|
-
getWebhooks(): LuaWebhook[];
|
|
921
|
-
getJobs(): LuaJob[];
|
|
922
|
-
getPreProcessors(): PreProcessor[];
|
|
923
|
-
getPostProcessors(): PostProcessor[];
|
|
924
|
-
getMCPServers(): LuaMCPServer[];
|
|
925
|
-
getBatching(): BatchingConfig | undefined;
|
|
926
|
-
getDevices(): LuaDevice[];
|
|
927
|
-
}
|
|
928
|
-
/** Configuration for a single device command (agent → device) */
|
|
929
|
-
export interface DeviceCommandConfig {
|
|
930
|
-
/** Description of what this command does */
|
|
931
|
-
description: string;
|
|
932
|
-
/** Zod schema for command input validation */
|
|
933
|
-
inputSchema?: ZodType;
|
|
934
|
-
/** Retry configuration for failed commands */
|
|
935
|
-
retry?: {
|
|
936
|
-
maxAttempts: number;
|
|
937
|
-
backoffMs: number;
|
|
938
|
-
};
|
|
939
|
-
/** Timeout in milliseconds (default: 30000) */
|
|
940
|
-
timeoutMs?: number;
|
|
941
|
-
}
|
|
942
|
-
/** Configuration for a single device trigger (device → agent) */
|
|
943
|
-
export interface DeviceTriggerConfig {
|
|
944
|
-
/** Description of when this trigger fires */
|
|
945
|
-
description: string;
|
|
946
|
-
/** Zod schema for trigger payload validation */
|
|
947
|
-
payloadSchema?: ZodType;
|
|
948
|
-
/**
|
|
949
|
-
* Handler that runs on lua-core when the device fires this trigger.
|
|
950
|
-
* Has full access to agent context (can call agent.chat(), use tools, etc.)
|
|
951
|
-
*/
|
|
952
|
-
execute?: (payload: any, context: {
|
|
953
|
-
agent: any;
|
|
954
|
-
device: any;
|
|
955
|
-
trigger: any;
|
|
956
|
-
}) => Promise<any>;
|
|
957
|
-
}
|
|
958
|
-
/**
|
|
959
|
-
* Configuration for defining a device that an agent can communicate with.
|
|
960
|
-
*
|
|
961
|
-
* @example
|
|
962
|
-
* ```typescript
|
|
963
|
-
* import { defineDevice } from 'lua-cli';
|
|
964
|
-
* import { z } from 'zod';
|
|
965
|
-
*
|
|
966
|
-
* export const printer = defineDevice({
|
|
967
|
-
* name: 'label-printer',
|
|
968
|
-
* description: 'Thermal label printer on Raspberry Pi',
|
|
969
|
-
* group: 'printers',
|
|
970
|
-
* commands: {
|
|
971
|
-
* print: {
|
|
972
|
-
* description: 'Print a label',
|
|
973
|
-
* inputSchema: z.object({ text: z.string(), copies: z.number().default(1) }),
|
|
974
|
-
* retry: { maxAttempts: 3, backoffMs: 1000 },
|
|
975
|
-
* timeoutMs: 30000,
|
|
976
|
-
* },
|
|
977
|
-
* status: {
|
|
978
|
-
* description: 'Get printer status',
|
|
979
|
-
* timeoutMs: 5000,
|
|
980
|
-
* },
|
|
981
|
-
* },
|
|
982
|
-
* triggers: {
|
|
983
|
-
* paper_low: {
|
|
984
|
-
* description: 'Fired when paper level drops below threshold',
|
|
985
|
-
* payloadSchema: z.object({ level: z.number(), threshold: z.number() }),
|
|
986
|
-
* execute: async (payload, { agent }) => {
|
|
987
|
-
* await agent.chat(\`Printer paper low: \${payload.level}%\`);
|
|
988
|
-
* },
|
|
989
|
-
* },
|
|
990
|
-
* },
|
|
991
|
-
* });
|
|
992
|
-
* ```
|
|
993
|
-
*/
|
|
994
|
-
export interface LuaDeviceConfig {
|
|
995
|
-
/** Unique device name (lowercase, hyphens, e.g., 'label-printer') */
|
|
996
|
-
name: string;
|
|
997
|
-
/** Description of the device */
|
|
998
|
-
description?: string;
|
|
999
|
-
/** Optional group name for fan-out commands (e.g., 'printers') */
|
|
1000
|
-
group?: string;
|
|
1001
|
-
/** Commands the agent can send to the device */
|
|
1002
|
-
commands?: Record<string, DeviceCommandConfig>;
|
|
1003
|
-
/** Triggers the device can fire to the agent */
|
|
1004
|
-
triggers?: Record<string, DeviceTriggerConfig>;
|
|
1005
|
-
}
|
|
1006
|
-
/**
|
|
1007
|
-
* LuaDevice class — represents an external device that an agent can communicate with.
|
|
1008
|
-
*
|
|
1009
|
-
* Used in two ways:
|
|
1010
|
-
* - Class-based: `export default new LuaDevice({ ... })`
|
|
1011
|
-
* - Function-based: `export const myDevice = defineDevice({ ... })` (preferred)
|
|
1012
|
-
*/
|
|
1013
|
-
export declare class LuaDevice {
|
|
1014
|
-
readonly name: string;
|
|
1015
|
-
readonly description: string;
|
|
1016
|
-
readonly group?: string;
|
|
1017
|
-
readonly commands: Record<string, DeviceCommandConfig>;
|
|
1018
|
-
readonly triggers: Record<string, DeviceTriggerConfig>;
|
|
1019
|
-
constructor(config: LuaDeviceConfig);
|
|
1020
|
-
}
|
|
1021
|
-
/**
|
|
1022
|
-
* Configuration for a standalone device trigger primitive.
|
|
1023
|
-
*
|
|
1024
|
-
* Device triggers represent events fired from a device to an agent.
|
|
1025
|
-
* Unlike triggers defined inline within a `defineDevice()`, standalone
|
|
1026
|
-
* device triggers are first-class primitives that can be compiled,
|
|
1027
|
-
* versioned, and pushed independently.
|
|
1028
|
-
*
|
|
1029
|
-
* @example
|
|
1030
|
-
* ```typescript
|
|
1031
|
-
* import { defineDeviceTrigger } from 'lua-cli';
|
|
1032
|
-
* import { z } from 'zod';
|
|
1033
|
-
*
|
|
1034
|
-
* export const paperLow = defineDeviceTrigger({
|
|
1035
|
-
* name: 'paper-low',
|
|
1036
|
-
* description: 'Fired when printer paper drops below threshold',
|
|
1037
|
-
* payloadSchema: z.object({ level: z.number() }),
|
|
1038
|
-
* execute: async (payload, { agent, device }) => {
|
|
1039
|
-
* await agent.chat(`Printer ${device.name} paper low: ${payload.level}%`);
|
|
1040
|
-
* },
|
|
1041
|
-
* });
|
|
1042
|
-
* ```
|
|
1043
|
-
*/
|
|
1044
|
-
export interface LuaDeviceTriggerConfig {
|
|
1045
|
-
/** Trigger name (lowercase, hyphens, e.g., 'paper-low') */
|
|
1046
|
-
name: string;
|
|
1047
|
-
/** Description of when this trigger fires */
|
|
1048
|
-
description?: string;
|
|
1049
|
-
/** Zod schema for trigger payload validation */
|
|
1050
|
-
payloadSchema?: ZodType;
|
|
1051
|
-
/** Function that executes when the trigger fires */
|
|
1052
|
-
execute: (payload: any, context: {
|
|
1053
|
-
agent: any;
|
|
1054
|
-
device: {
|
|
1055
|
-
name: string;
|
|
1056
|
-
};
|
|
1057
|
-
}) => Promise<any>;
|
|
1058
|
-
}
|
|
1059
|
-
/**
|
|
1060
|
-
* Lua Device Trigger class.
|
|
1061
|
-
*
|
|
1062
|
-
* Standalone device trigger primitive. Can be used with either:
|
|
1063
|
-
* - Class-based: `export default new LuaDeviceTrigger({ ... })`
|
|
1064
|
-
* - Function-based: `export const myTrigger = defineDeviceTrigger({ ... })` (preferred)
|
|
1065
|
-
*/
|
|
1066
|
-
export declare class LuaDeviceTrigger {
|
|
1067
|
-
config: LuaDeviceTriggerConfig;
|
|
1068
|
-
readonly name: string;
|
|
1069
|
-
readonly description: string;
|
|
1070
|
-
readonly payloadSchema?: ZodType;
|
|
1071
|
-
readonly execute: (payload: any, context: {
|
|
1072
|
-
agent: any;
|
|
1073
|
-
device: {
|
|
1074
|
-
name: string;
|
|
1075
|
-
};
|
|
1076
|
-
}) => Promise<any>;
|
|
1077
|
-
constructor(config: LuaDeviceTriggerConfig);
|
|
1078
|
-
}
|
|
1079
|
-
//# sourceMappingURL=skill.d.ts.map
|