lua-cli 3.15.2 → 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 -19
- 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 -86
- package/dist/api/skills.api.service.d.ts.map +0 -1
- package/dist/api/skills.api.service.js +0 -112
- 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 -935
- 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 -486
- 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 -19
- package/dist/commands/push.d.ts.map +0 -1
- package/dist/commands/push.js +0 -1145
- 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 -38
- package/dist/compiler/utils/common.d.ts.map +0 -1
- package/dist/compiler/utils/common.js +0 -94
- 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 -143
- package/dist/interfaces/backup.d.ts.map +0 -1
- package/dist/interfaces/backup.js +0 -8
- 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 -290
- package/dist/utils/backup-helpers.d.ts.map +0 -1
- package/dist/utils/backup-helpers.js +0 -827
- package/dist/utils/backup-helpers.js.map +0 -1
- package/dist/utils/build-manifest-from-disk.d.ts +0 -17
- package/dist/utils/build-manifest-from-disk.d.ts.map +0 -1
- package/dist/utils/build-manifest-from-disk.js +0 -111
- 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-types/dist/index.d.mts +0 -606
- package/node_modules/@lua/shared-types/dist/index.d.ts +0 -606
- 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 -11
- 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 -20
- 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
|
@@ -1,606 +0,0 @@
|
|
|
1
|
-
import { FinishReason, LanguageModelUsage, ReasoningOutput, CallWarning, UserContent } from 'ai';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Channel type.
|
|
5
|
-
* Represents the communication channel through which a request originated.
|
|
6
|
-
* Known channels are typed as string literals, unrecognized channels are unknown.
|
|
7
|
-
*/
|
|
8
|
-
type Channel = 'web' | 'meeting' | 'whatsapp' | 'facebook' | 'instagram' | 'slack' | 'teams' | 'messagebird' | 'front' | 'api' | 'dev' | 'email' | 'rcs' | 'sms' | 'mms' | 'device' | string;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Polymorphic shape used by `LuaAgent.persona`. String form is the legacy
|
|
12
|
-
* single-channel persona; object form lets the customer split prose per
|
|
13
|
-
* channel (`base` always rendered; `voice` appended on voice; `text`
|
|
14
|
-
* appended on text channels).
|
|
15
|
-
*/
|
|
16
|
-
type PersonaText = string | {
|
|
17
|
-
base?: string;
|
|
18
|
-
voice?: string;
|
|
19
|
-
text?: string;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Same shape as `PersonaText`, exported separately because skill `context`
|
|
23
|
-
* and agent `persona` play different semantic roles. Sharing the structural
|
|
24
|
-
* shape today keeps the runtime lean; future divergence is a one-line change.
|
|
25
|
-
*/
|
|
26
|
-
type SkillContextText = string | {
|
|
27
|
-
base?: string;
|
|
28
|
-
voice?: string;
|
|
29
|
-
text?: string;
|
|
30
|
-
};
|
|
31
|
-
declare function isPersonaTextObject(value: unknown): value is {
|
|
32
|
-
base?: string;
|
|
33
|
-
voice?: string;
|
|
34
|
-
text?: string;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Flatten `PersonaText` or `SkillContextText` to a plain string suitable for
|
|
38
|
-
* LLM prompt injection. `base` is always emitted; `voice` is appended on
|
|
39
|
-
* voice channels and `text` on text channels. Strict — missing channel keys
|
|
40
|
-
* render nothing (no cross-channel fallback).
|
|
41
|
-
*/
|
|
42
|
-
declare function flattenPersonaText(input: PersonaText | SkillContextText | null | undefined, isVoice?: boolean): string;
|
|
43
|
-
/**
|
|
44
|
-
* Channel-agnostic flatten — concatenates every non-empty channel's content
|
|
45
|
-
* (base + voice + text) for paths that aren't a render-time prompt injection,
|
|
46
|
-
* e.g. AI persona enhancement (storytelling, instructions, website-derived).
|
|
47
|
-
* Use this whenever the call has no channel context but still wants the full
|
|
48
|
-
* persona content — `flattenPersonaText` would silently drop voice or text
|
|
49
|
-
* branches because it defaults to text-channel rendering.
|
|
50
|
-
*/
|
|
51
|
-
declare function flattenPersonaTextAll(input: PersonaText | SkillContextText | null | undefined): string;
|
|
52
|
-
/**
|
|
53
|
-
* True when the persona has ANY non-empty content on any channel. Used at
|
|
54
|
-
* push/skip boundaries where channel context is not yet known.
|
|
55
|
-
*/
|
|
56
|
-
declare function hasPersonaTextContent(input: PersonaText | SkillContextText | null | undefined): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Convert a PersonaText into a TypeScript source-code literal suitable
|
|
59
|
-
* for ts-morph setInitializer or template rendering.
|
|
60
|
-
*
|
|
61
|
-
* - String form → `"..."` (double-quoted) or template literal (when newlines present)
|
|
62
|
-
* - Object form → `{ base: ..., voice: ..., text: ... }` with same per-key rule
|
|
63
|
-
*/
|
|
64
|
-
declare function personaToLiteral(persona: PersonaText): string;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* MIME types supported by Unstructured.io for document text extraction.
|
|
68
|
-
* Source: https://docs.unstructured.io/api-reference/supported-file-types
|
|
69
|
-
*
|
|
70
|
-
* Shared across lua-core (FileConversionService) and lua-agents (UnstructuredService).
|
|
71
|
-
*/
|
|
72
|
-
declare const UNSTRUCTURED_SUPPORTED_MEDIA_TYPES: Set<string>;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Wire-format input for sandbox `AI.generate` / `POST .../generate` (JSON-serializable).
|
|
76
|
-
* Serializable subset of AI SDK `generateText` parameters.
|
|
77
|
-
* `messages` is untyped over HTTP; callers typically send AI SDK `ModelMessage[]`.
|
|
78
|
-
*/
|
|
79
|
-
interface AiGenerateInput {
|
|
80
|
-
model?: string;
|
|
81
|
-
system?: string;
|
|
82
|
-
prompt?: string;
|
|
83
|
-
messages?: unknown[];
|
|
84
|
-
temperature?: number;
|
|
85
|
-
maxOutputTokens?: number;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* URL source from Google Search grounding.
|
|
89
|
-
* Mirrors `LanguageModelV2Source` (AI SDK `Source` type — not exported from `ai` as of v5).
|
|
90
|
-
*/
|
|
91
|
-
interface AiGenerateSource {
|
|
92
|
-
sourceType: 'url';
|
|
93
|
-
id: string;
|
|
94
|
-
url: string;
|
|
95
|
-
title?: string;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Serializable tool call. Mirrors `TypedToolCall` without generics.
|
|
99
|
-
* `input` matches the AI SDK field name (renamed from `args` in v5).
|
|
100
|
-
*/
|
|
101
|
-
interface AiGenerateToolCall {
|
|
102
|
-
type: 'tool-call';
|
|
103
|
-
toolCallId: string;
|
|
104
|
-
toolName: string;
|
|
105
|
-
input: unknown;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Serializable tool result. Mirrors `TypedToolResult` without generics.
|
|
109
|
-
* `output` matches the AI SDK field name.
|
|
110
|
-
*/
|
|
111
|
-
interface AiGenerateToolResult {
|
|
112
|
-
type: 'tool-result';
|
|
113
|
-
toolCallId: string;
|
|
114
|
-
toolName: string;
|
|
115
|
-
output: unknown;
|
|
116
|
-
isError?: boolean;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Wire-format output from `AI.generate` / `POST .../generate`.
|
|
120
|
-
* Fields mirror AI SDK `GenerateTextResult` — uses AI SDK types where exported.
|
|
121
|
-
* See https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text
|
|
122
|
-
*/
|
|
123
|
-
interface AiGenerateOutput {
|
|
124
|
-
text: string;
|
|
125
|
-
/** AI SDK `FinishReason` */
|
|
126
|
-
finishReason: FinishReason;
|
|
127
|
-
/** AI SDK `LanguageModelUsage` */
|
|
128
|
-
usage: LanguageModelUsage;
|
|
129
|
-
/** Model reasoning steps (e.g. Gemini thinking) */
|
|
130
|
-
reasoning?: ReasoningOutput[];
|
|
131
|
-
/** Concatenated reasoning text */
|
|
132
|
-
reasoningText?: string;
|
|
133
|
-
/** URL sources from Google Search grounding */
|
|
134
|
-
sources?: AiGenerateSource[];
|
|
135
|
-
/** Tool calls made during generation */
|
|
136
|
-
toolCalls?: AiGenerateToolCall[];
|
|
137
|
-
/** Tool results from generation */
|
|
138
|
-
toolResults?: AiGenerateToolResult[];
|
|
139
|
-
/** Provider warnings (e.g. unsupported settings) — AI SDK `CallWarning[]` */
|
|
140
|
-
warnings?: CallWarning[];
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Maps simplified `AI.generate(prompt, content?)` calls to wire-format input.
|
|
145
|
-
*/
|
|
146
|
-
declare function aiGenerateInputFromSimplified(prompt: string, content?: UserContent): AiGenerateInput;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Wire-format input for sandbox `Agents.invoke` / `POST /chat/generate/:agentId`
|
|
150
|
-
* when triggered programmatically by another agent/skill/tool.
|
|
151
|
-
*
|
|
152
|
-
* Intentionally a narrow, safe subset of the public `ChatMessageDto` — omits
|
|
153
|
-
* sandbox-only overrides (`skillOverride`, `preprocessorOverride`, etc.),
|
|
154
|
-
* webhook payloads, navigation hints, and persona override.
|
|
155
|
-
*
|
|
156
|
-
* Either `prompt` or `messages` must be provided. When `prompt` is given, it is
|
|
157
|
-
* converted into a single `{ role: 'user', content: [{ type: 'text', text: prompt }] }`
|
|
158
|
-
* message downstream.
|
|
159
|
-
*/
|
|
160
|
-
interface AgentInvocationInput {
|
|
161
|
-
/** Shortcut: plain-text prompt. Mutually exclusive with `messages`. */
|
|
162
|
-
prompt?: string;
|
|
163
|
-
/** AI SDK `UserContent` (text/image/file parts). Mutually exclusive with `prompt`. */
|
|
164
|
-
messages?: UserContent;
|
|
165
|
-
/** Override the target agent's system prompt for this invocation. */
|
|
166
|
-
systemPrompt?: string;
|
|
167
|
-
/** Additional runtime context attached to the request. */
|
|
168
|
-
runtimeContext?: string;
|
|
169
|
-
/**
|
|
170
|
-
* Optional thread ID suffix for conversation scoping. When omitted, the
|
|
171
|
-
* invocation flows into the caller-user's default chat thread with the
|
|
172
|
-
* target agent (same behavior as a direct `POST /chat/generate/:agentId`
|
|
173
|
-
* call with no `threadId`). Pass a custom value to isolate invocations.
|
|
174
|
-
*/
|
|
175
|
-
threadId?: string;
|
|
176
|
-
/** Channel identifier, defaults to `'agent-invocation'`. */
|
|
177
|
-
channel?: string;
|
|
178
|
-
/** Free-form request tag persisted on the stored Message record (e.g. a UUID
|
|
179
|
-
* or external trace id for correlation). Not a user identifier. Omitted
|
|
180
|
-
* by default. */
|
|
181
|
-
identifier?: string;
|
|
182
|
-
/**
|
|
183
|
-
* Explicit user to invoke as. Use from context-less triggers (webhooks,
|
|
184
|
-
* pre-defined jobs) where there is no ambient user — mirrors the `User.get(userId)`
|
|
185
|
-
* contract. When omitted from a webhook/pre-defined job, the invocation runs in
|
|
186
|
-
* system scope (no per-user identity, no conversation history). Ignored during
|
|
187
|
-
* a user-authenticated turn — the turn's user is always used, no impersonation.
|
|
188
|
-
*/
|
|
189
|
-
userId?: string;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Narrowed, wire-safe output for `Agents.invoke`. A slice of the internal
|
|
193
|
-
* `FullOutput` shape — raw Mastra steps / tripwire payloads are intentionally
|
|
194
|
-
* not exposed to skill code.
|
|
195
|
-
*/
|
|
196
|
-
interface AgentInvocationOutput {
|
|
197
|
-
/** Final response text (post-processor-modified, if applicable). */
|
|
198
|
-
text: string;
|
|
199
|
-
/** AI SDK `FinishReason` (or `'preprocessor_blocked'` / `'governance_blocked'`). */
|
|
200
|
-
finishReason?: string;
|
|
201
|
-
/** Token usage summary. */
|
|
202
|
-
usage?: {
|
|
203
|
-
inputTokens?: number;
|
|
204
|
-
outputTokens?: number;
|
|
205
|
-
totalTokens?: number;
|
|
206
|
-
reasoningTokens?: number;
|
|
207
|
-
cachedInputTokens?: number;
|
|
208
|
-
};
|
|
209
|
-
/** Names of tools invoked during generation. */
|
|
210
|
-
toolsUsed?: string[];
|
|
211
|
-
/**
|
|
212
|
-
* Echoes back the `threadId` suffix the caller passed in (if any). When the
|
|
213
|
-
* caller omitted `threadId`, this is undefined — the invocation ran in the
|
|
214
|
-
* user's default chat thread with the target agent.
|
|
215
|
-
*/
|
|
216
|
-
threadId?: string;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Wire-format types for `GET /chat/history/:agentId` and the VM-sandbox
|
|
221
|
-
* `User.getChatHistory()` API. Both paths return the same shape.
|
|
222
|
-
*
|
|
223
|
-
* Shared between lua-core (HTTP controller + VM devtools) and lua-cli
|
|
224
|
-
* (HTTP client typing for `lua test`). Also shared with lua-api's
|
|
225
|
-
* `thread.service.ts` (admin org-thread listing) so the parser never
|
|
226
|
-
* diverges across services.
|
|
227
|
-
*/
|
|
228
|
-
/**
|
|
229
|
-
* One content part of a chat-history message.
|
|
230
|
-
*
|
|
231
|
-
* `text` parts carry plain text. Media parts (`image` / `video` / `audio`
|
|
232
|
-
* / `file`) carry a URL or base64 payload in `data` (or `image` / `video`
|
|
233
|
-
* for legacy reasons) plus a `mediaType` MIME string.
|
|
234
|
-
*/
|
|
235
|
-
interface ChatHistoryContent {
|
|
236
|
-
type: 'text' | 'image' | 'video' | 'audio' | 'file';
|
|
237
|
-
text?: string;
|
|
238
|
-
image?: string;
|
|
239
|
-
video?: string;
|
|
240
|
-
data?: string;
|
|
241
|
-
mediaType?: string;
|
|
242
|
-
latitude?: number;
|
|
243
|
-
longitude?: number;
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* One message returned by chat-history endpoints.
|
|
247
|
-
*
|
|
248
|
-
* Only `user` and `assistant` roles surface — system / tool messages are
|
|
249
|
-
* filtered out before transport.
|
|
250
|
-
*/
|
|
251
|
-
interface ChatHistoryMessage {
|
|
252
|
-
id: string;
|
|
253
|
-
role: 'user' | 'assistant';
|
|
254
|
-
/** ISO-8601 timestamp string. */
|
|
255
|
-
createdAt: string;
|
|
256
|
-
content: ChatHistoryContent[];
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Strip `::: navigate …:::` blocks from a text string.
|
|
260
|
-
*
|
|
261
|
-
* Exposed because both lua-core's chat-history transform and any future
|
|
262
|
-
* external transform may need it independently.
|
|
263
|
-
*/
|
|
264
|
-
declare function removeNavigateBlock(input: string): string;
|
|
265
|
-
/**
|
|
266
|
-
* Transform raw Mastra `MastraMessageContentV2.parts[]` into the
|
|
267
|
-
* `ChatHistoryContent[]` wire shape.
|
|
268
|
-
*
|
|
269
|
-
* Single source of truth for the conversion: used by lua-core's
|
|
270
|
-
* `toChatHistoryMessage` (HTTP + VM sandbox paths) and lua-api's
|
|
271
|
-
* `thread.service.ts` admin org-thread listing. Any future divergence
|
|
272
|
-
* starts here.
|
|
273
|
-
*
|
|
274
|
-
* Parts are deliberately typed `unknown` because callers may either pass
|
|
275
|
-
* Mastra v5 `MastraMessagePart` instances (lua-core, via `@mastra/core`)
|
|
276
|
-
* or raw JSON parsed from a SQL row (lua-api, reading `mastra_messages`
|
|
277
|
-
* directly). The function only inspects `.type`, `.text`, `.data`, and
|
|
278
|
-
* `.mimeType` via property access, so both shapes work.
|
|
279
|
-
*/
|
|
280
|
-
declare function transformChatHistoryContentParts(parts: unknown[] | undefined | null): ChatHistoryContent[];
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Sandbox contract: defines what every sandbox MUST expose.
|
|
284
|
-
* Both lua-cli and lua-core test against this contract.
|
|
285
|
-
* Update this file when adding new globals or primitives.
|
|
286
|
-
*/
|
|
287
|
-
declare const REQUIRED_PRIMITIVE_SHIMS: readonly ["LuaTool", "LuaSkill", "LuaJob", "LuaWebhook", "PreProcessor", "LuaPreprocessor", "PostProcessor", "LuaPostprocessor", "LuaMCPServer", "defineTool", "defineSkill", "defineJob", "defineWebhook", "definePreProcessor", "definePostProcessor", "defineMCPServer"];
|
|
288
|
-
declare const REQUIRED_PLATFORM_APIS: {
|
|
289
|
-
readonly User: readonly ["get", "getChatHistory"];
|
|
290
|
-
readonly Products: readonly ["get", "create", "delete", "search", "getById"];
|
|
291
|
-
readonly Baskets: readonly ["create", "get", "addItem", "removeItem", "clear", "updateStatus", "updateMetadata", "placeOrder", "getById"];
|
|
292
|
-
readonly Orders: readonly ["create", "updateStatus", "updateData", "get", "getById"];
|
|
293
|
-
readonly Data: readonly ["create", "get", "getEntry", "update", "search", "delete"];
|
|
294
|
-
readonly Jobs: readonly ["create", "getJob", "getAll"];
|
|
295
|
-
readonly AI: readonly ["generate"];
|
|
296
|
-
readonly CDN: readonly ["upload", "get"];
|
|
297
|
-
};
|
|
298
|
-
declare const REQUIRED_NESTED_APIS: {
|
|
299
|
-
readonly Templates: {
|
|
300
|
-
readonly whatsapp: readonly ["list", "get", "send"];
|
|
301
|
-
};
|
|
302
|
-
readonly Lua: {
|
|
303
|
-
readonly request: readonly ["channel"];
|
|
304
|
-
};
|
|
305
|
-
};
|
|
306
|
-
declare const REQUIRED_ENUMS: {
|
|
307
|
-
readonly BasketStatus: readonly ["ACTIVE", "CHECKED_OUT", "ABANDONED", "EXPIRED"];
|
|
308
|
-
readonly OrderStatus: readonly ["PENDING", "CONFIRMED", "FULFILLED", "CANCELLED"];
|
|
309
|
-
};
|
|
310
|
-
declare const REQUIRED_UTILITIES: readonly ["env"];
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Device Gateway Types
|
|
314
|
-
*
|
|
315
|
-
* Types for bidirectional communication between AI agents and external devices.
|
|
316
|
-
* Used across lua-api (gateway), lua-core (runtime), and lua-cli (compilation).
|
|
317
|
-
*/
|
|
318
|
-
/** Command message sent from the server to a device */
|
|
319
|
-
interface DeviceCommandMessage {
|
|
320
|
-
/** Unique identifier for this command (UUID). Used for idempotency. */
|
|
321
|
-
commandId: string;
|
|
322
|
-
/** Command name (must match a command defined in defineDevice) */
|
|
323
|
-
command: string;
|
|
324
|
-
/** Command payload (validated against inputSchema if defined) */
|
|
325
|
-
payload: any;
|
|
326
|
-
/** Timeout in milliseconds (defaults to 30000) */
|
|
327
|
-
timeout?: number;
|
|
328
|
-
}
|
|
329
|
-
/** Response message sent from a device back to the server */
|
|
330
|
-
interface DeviceResponseMessage {
|
|
331
|
-
/** Must match the commandId of the original command */
|
|
332
|
-
commandId: string;
|
|
333
|
-
/** Whether the command executed successfully on the device */
|
|
334
|
-
success: boolean;
|
|
335
|
-
/** Response data (present when success=true) */
|
|
336
|
-
data?: any;
|
|
337
|
-
/** Error message (present when success=false) */
|
|
338
|
-
error?: string;
|
|
339
|
-
}
|
|
340
|
-
/** Trigger message sent from a device to the server */
|
|
341
|
-
interface DeviceTriggerMessage {
|
|
342
|
-
/** Trigger name (must match a trigger defined in defineDevice) */
|
|
343
|
-
triggerName: string;
|
|
344
|
-
/** Trigger payload (validated against payloadSchema if defined) */
|
|
345
|
-
payload: any;
|
|
346
|
-
}
|
|
347
|
-
/** Acknowledgment sent from the server back to the device after receiving a trigger */
|
|
348
|
-
interface DeviceTriggerAckMessage {
|
|
349
|
-
/** Server-generated unique identifier for this trigger event */
|
|
350
|
-
triggerId: string;
|
|
351
|
-
/** Whether the trigger was received and queued for processing */
|
|
352
|
-
received: boolean;
|
|
353
|
-
/** Error details if the trigger was rejected */
|
|
354
|
-
error?: string;
|
|
355
|
-
}
|
|
356
|
-
/** Device connection status */
|
|
357
|
-
type DeviceStatus = 'online' | 'offline' | 'registered' | 'disabled';
|
|
358
|
-
/** State of a command in the Valkey state machine */
|
|
359
|
-
type CommandState = 'PENDING' | 'SENT' | 'ACK' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT';
|
|
360
|
-
/** Device information returned by API endpoints */
|
|
361
|
-
interface DeviceInfo {
|
|
362
|
-
/** Unique device name within the agent */
|
|
363
|
-
name: string;
|
|
364
|
-
/** Agent this device belongs to */
|
|
365
|
-
agentId: string;
|
|
366
|
-
/** Current connection status */
|
|
367
|
-
status: DeviceStatus;
|
|
368
|
-
/** Device group (optional, for fan-out commands) */
|
|
369
|
-
group?: string;
|
|
370
|
-
/** Device capabilities */
|
|
371
|
-
capabilities: string[];
|
|
372
|
-
/** Free-form device metadata */
|
|
373
|
-
metadata: Record<string, any>;
|
|
374
|
-
/** Last time the device was seen (heartbeat or connect) */
|
|
375
|
-
lastSeenAt: Date | null;
|
|
376
|
-
}
|
|
377
|
-
/** Entry written to the device command stream */
|
|
378
|
-
interface CommandStreamEntry {
|
|
379
|
-
commandId: string;
|
|
380
|
-
command: string;
|
|
381
|
-
payload: string;
|
|
382
|
-
originPodId: string;
|
|
383
|
-
agentId: string;
|
|
384
|
-
deviceName: string;
|
|
385
|
-
}
|
|
386
|
-
/** Entry written to the device response stream */
|
|
387
|
-
interface ResponseStreamEntry {
|
|
388
|
-
commandId: string;
|
|
389
|
-
success: string;
|
|
390
|
-
data?: string;
|
|
391
|
-
error?: string;
|
|
392
|
-
}
|
|
393
|
-
/** Entry written to the device trigger stream */
|
|
394
|
-
interface TriggerStreamEntry {
|
|
395
|
-
triggerId: string;
|
|
396
|
-
agentId: string;
|
|
397
|
-
deviceName: string;
|
|
398
|
-
deviceId: string;
|
|
399
|
-
triggerName: string;
|
|
400
|
-
payload: string;
|
|
401
|
-
timestamp: string;
|
|
402
|
-
}
|
|
403
|
-
/** Data stored in the Valkey hash for a command's state */
|
|
404
|
-
interface CommandHashData {
|
|
405
|
-
status: CommandState;
|
|
406
|
-
agentId: string;
|
|
407
|
-
deviceName: string;
|
|
408
|
-
originPodId: string;
|
|
409
|
-
timestamp: number;
|
|
410
|
-
}
|
|
411
|
-
/** Device definition as stored in Redis cache */
|
|
412
|
-
interface CachedDeviceDefinition {
|
|
413
|
-
name: string;
|
|
414
|
-
description?: string;
|
|
415
|
-
group?: string;
|
|
416
|
-
commands: CachedDeviceCommand[];
|
|
417
|
-
triggers: CachedDeviceTrigger[];
|
|
418
|
-
/** Compressed (gzip + base64) compiled artifact containing trigger handlers */
|
|
419
|
-
artifact: string;
|
|
420
|
-
/** Environment variables for the device */
|
|
421
|
-
env: Record<string, string>;
|
|
422
|
-
}
|
|
423
|
-
interface CachedDeviceCommand {
|
|
424
|
-
name: string;
|
|
425
|
-
description: string;
|
|
426
|
-
inputSchema?: Record<string, any>;
|
|
427
|
-
retry?: {
|
|
428
|
-
maxAttempts: number;
|
|
429
|
-
backoffMs: number;
|
|
430
|
-
};
|
|
431
|
-
timeoutMs?: number;
|
|
432
|
-
}
|
|
433
|
-
interface CachedDeviceTrigger {
|
|
434
|
-
name: string;
|
|
435
|
-
description: string;
|
|
436
|
-
payloadSchema?: Record<string, any>;
|
|
437
|
-
hasExecute: boolean;
|
|
438
|
-
}
|
|
439
|
-
/** Command definition sent by a device at connect time (self-describing) */
|
|
440
|
-
interface DeviceCommandDefinition {
|
|
441
|
-
name: string;
|
|
442
|
-
description: string;
|
|
443
|
-
inputSchema?: Record<string, any>;
|
|
444
|
-
timeoutMs?: number;
|
|
445
|
-
retry?: {
|
|
446
|
-
maxAttempts: number;
|
|
447
|
-
backoffMs: number;
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
/** Standalone device trigger definition (compiled agent-side primitive) */
|
|
451
|
-
interface CachedDeviceTriggerDefinition {
|
|
452
|
-
name: string;
|
|
453
|
-
description: string;
|
|
454
|
-
payloadSchema?: Record<string, any>;
|
|
455
|
-
artifact: string;
|
|
456
|
-
env: Record<string, string>;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Client-Injected Tools
|
|
461
|
-
*
|
|
462
|
-
* Lets a chat client (Lua Desktop, custom front-ends, future surfaces) declare
|
|
463
|
-
* tools that the agent can call but the *client* renders/handles. Mirrors the
|
|
464
|
-
* pattern used by Claude Code, OpenAI Apps SDK, and Anthropic's MCP — the
|
|
465
|
-
* surface the user sees gets to add capabilities to the agent without changing
|
|
466
|
-
* the agent itself.
|
|
467
|
-
*
|
|
468
|
-
* Tool calls flow through Mastra's existing `tool-call` stream chunks; the
|
|
469
|
-
* server registers the tool with a no-op `execute` (returns `{ ok: true,
|
|
470
|
-
* clientHandled: true }`) so the model sees a clean ack and can continue. The
|
|
471
|
-
* actual rendering / side-effect happens on the client when it sees the
|
|
472
|
-
* tool-call chunk.
|
|
473
|
-
*
|
|
474
|
-
* Tool names are namespaced server-side as `client__<name>` to avoid collisions
|
|
475
|
-
* with built-in tools (skills, MCP, devices, voice). Same pattern as device
|
|
476
|
-
* tools (`device__<name>__<command>`).
|
|
477
|
-
*/
|
|
478
|
-
interface ClientToolDef {
|
|
479
|
-
/** Unprefixed tool name as the client refers to it (e.g. "create_artifact"). Server prefixes with `client__`. */
|
|
480
|
-
name: string;
|
|
481
|
-
/** Human/LLM-readable description of when to call this tool. */
|
|
482
|
-
description: string;
|
|
483
|
-
/**
|
|
484
|
-
* JSON Schema for the tool's input. Hydrated server-side into a Zod schema
|
|
485
|
-
* via the shared `jsonSchemaToZod` util. Same subset supported as device
|
|
486
|
-
* tools — object with string/number/boolean/array properties, `required`,
|
|
487
|
-
* `default`, `description`, `enum`.
|
|
488
|
-
*/
|
|
489
|
-
parameters: Record<string, unknown>;
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* Server-side prefix for client tool names. Keeps client tools from
|
|
493
|
-
* shadowing skills, MCP tools, devices (`device__`), or voice tools.
|
|
494
|
-
*/
|
|
495
|
-
declare const CLIENT_TOOL_PREFIX = "client__";
|
|
496
|
-
/**
|
|
497
|
-
* Maximum number of client tools accepted per request. Keeps the model's
|
|
498
|
-
* tool list bounded — at this many tools the model starts losing precision
|
|
499
|
-
* picking the right one anyway.
|
|
500
|
-
*/
|
|
501
|
-
declare const CLIENT_TOOLS_MAX = 20;
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* Shared type definitions for the model registry.
|
|
505
|
-
*
|
|
506
|
-
* Runtime data (provider configs, context windows, approved model list) lives
|
|
507
|
-
* exclusively in the MongoDB `approvedModels` collection. lua-core loads it at
|
|
508
|
-
* startup via initModelRegistry() in mastra/common/model-registry.ts.
|
|
509
|
-
*/
|
|
510
|
-
interface ApprovedModelDef {
|
|
511
|
-
provider: string;
|
|
512
|
-
/** Full user-facing model string, e.g. "zhipuai/glm-5". */
|
|
513
|
-
code: string;
|
|
514
|
-
/** Model ID portion for display, e.g. "glm-5". */
|
|
515
|
-
model: string;
|
|
516
|
-
description: string;
|
|
517
|
-
/** Advertised input token context window (raw, from provider docs). */
|
|
518
|
-
contextWindow?: number;
|
|
519
|
-
/** If set, route requests through a gateway instead of calling the provider directly. */
|
|
520
|
-
gateway?: {
|
|
521
|
-
via: string;
|
|
522
|
-
modelPrefix: string;
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Per-agent message batching/debounce configuration.
|
|
528
|
-
* Overrides platform-wide env var defaults for this specific agent.
|
|
529
|
-
*/
|
|
530
|
-
interface BatchingConfig {
|
|
531
|
-
/** Hold first message N ms before processing, to allow rapid follow-ups to batch together. 0 = disabled. */
|
|
532
|
-
firstMessageDelayMs?: number;
|
|
533
|
-
/** Window to collect subsequent messages while one is in-flight (ms). 0 = batching disabled. */
|
|
534
|
-
debounceWindowMs?: number;
|
|
535
|
-
/** Maximum messages collected in a single batch. */
|
|
536
|
-
maxBatchMessages?: number;
|
|
537
|
-
/**
|
|
538
|
-
* Strict sequential turn execution. When `true`, a new message arriving while a turn is
|
|
539
|
-
* in-flight does NOT abort the running turn — it waits in a batch until the current turn
|
|
540
|
-
* completes, then runs against the post-reply state. Trades latency for correctness:
|
|
541
|
-
* eliminates duplicate/contradictory replies and side-effect-then-no-reply failures from
|
|
542
|
-
* mid-tool aborts. No effect when `debounceWindowMs` is 0 (batching disabled).
|
|
543
|
-
*
|
|
544
|
-
* Most useful with the stream endpoint. Generate callers (e.g. lua-whatsapp, sync HTTP)
|
|
545
|
-
* may hit ingress / client timeouts on long waits regardless of backend serialization.
|
|
546
|
-
*
|
|
547
|
-
* Per-agent only — there is no platform-wide env var override (deliberate: a global
|
|
548
|
-
* switch would silently flip every batching-enabled agent at once). Default: `false`.
|
|
549
|
-
*/
|
|
550
|
-
serializeProcessing?: boolean;
|
|
551
|
-
}
|
|
552
|
-
/**
|
|
553
|
-
* Governance SDK configuration persisted on the SubAgent document.
|
|
554
|
-
*
|
|
555
|
-
* The API-mode bearer token is NEVER stored here. At runtime the
|
|
556
|
-
* platform resolves it from the `GOVERNANCE_API_KEY` env var. This
|
|
557
|
-
* keeps secrets out of MongoDB, support logs, and backups.
|
|
558
|
-
*/
|
|
559
|
-
interface GovernanceConfig {
|
|
560
|
-
mode: 'sdk' | 'api';
|
|
561
|
-
/** SDK mode — local in-memory policy rules */
|
|
562
|
-
rules?: {
|
|
563
|
-
blockTools?: string[];
|
|
564
|
-
requireApproval?: string[];
|
|
565
|
-
tokenBudget?: number;
|
|
566
|
-
};
|
|
567
|
-
/** API mode — remote enforcement server URL */
|
|
568
|
-
serverUrl?: string;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* Build a default persona guide with the agent name filled in.
|
|
573
|
-
*/
|
|
574
|
-
declare function buildDefaultPersona(agentName: string): string;
|
|
575
|
-
|
|
576
|
-
declare const AGENT_LOG_SOURCES: readonly ["skill", "job", "webhook", "preprocessor", "postprocessor", "user_message", "agent_response", "agent_error", "runtime", "mcp", "rag", "device", "device-trigger"];
|
|
577
|
-
type AgentLogSource = (typeof AGENT_LOG_SOURCES)[number];
|
|
578
|
-
interface AgentLogMetadata {
|
|
579
|
-
userId?: string;
|
|
580
|
-
agentId?: string;
|
|
581
|
-
/** Agent runtime / conversation thread ID for distributed tracing */
|
|
582
|
-
runId?: string;
|
|
583
|
-
logSource?: AgentLogSource;
|
|
584
|
-
/** The ID of the source entity (skillId, jobId, webhookId, etc.) */
|
|
585
|
-
primitiveId?: string;
|
|
586
|
-
/** The display name of the source entity */
|
|
587
|
-
primitiveName?: string;
|
|
588
|
-
toolId?: string;
|
|
589
|
-
toolName?: string;
|
|
590
|
-
/** Messaging channel: 'whatsapp', 'slack', 'email', etc. */
|
|
591
|
-
channel?: string;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
/**
|
|
595
|
-
* Wire-format contract for `type: 'error'` chunks emitted by lua-core's chat
|
|
596
|
-
* stream. Single source of truth — consumed by lua-whatsapp and any other
|
|
597
|
-
* service that reads the NDJSON chat stream.
|
|
598
|
-
*/
|
|
599
|
-
interface ChatErrorChunk {
|
|
600
|
-
type: 'error';
|
|
601
|
-
textDelta: string;
|
|
602
|
-
error: string;
|
|
603
|
-
timestamp: number;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
export { AGENT_LOG_SOURCES, type AgentInvocationInput, type AgentInvocationOutput, type AgentLogMetadata, type AgentLogSource, type AiGenerateInput, type AiGenerateOutput, type AiGenerateSource, type AiGenerateToolCall, type AiGenerateToolResult, type ApprovedModelDef, type BatchingConfig, CLIENT_TOOLS_MAX, CLIENT_TOOL_PREFIX, type CachedDeviceCommand, type CachedDeviceDefinition, type CachedDeviceTrigger, type CachedDeviceTriggerDefinition, type Channel, type ChatErrorChunk, type ChatHistoryContent, type ChatHistoryMessage, type ClientToolDef, type CommandHashData, type CommandState, type CommandStreamEntry, type DeviceCommandDefinition, type DeviceCommandMessage, type DeviceInfo, type DeviceResponseMessage, type DeviceStatus, type DeviceTriggerAckMessage, type DeviceTriggerMessage, type GovernanceConfig, type PersonaText, REQUIRED_ENUMS, REQUIRED_NESTED_APIS, REQUIRED_PLATFORM_APIS, REQUIRED_PRIMITIVE_SHIMS, REQUIRED_UTILITIES, type ResponseStreamEntry, type SkillContextText, type TriggerStreamEntry, UNSTRUCTURED_SUPPORTED_MEDIA_TYPES, aiGenerateInputFromSimplified, buildDefaultPersona, flattenPersonaText, flattenPersonaTextAll, hasPersonaTextContent, isPersonaTextObject, personaToLiteral, removeNavigateBlock, transformChatHistoryContentParts };
|