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
|
@@ -1,747 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Channels Command
|
|
3
|
-
* Manages agent communication channels (list, create)
|
|
4
|
-
*/
|
|
5
|
-
import inquirer from 'inquirer';
|
|
6
|
-
import open from 'open';
|
|
7
|
-
import { withErrorHandling, writeSuccess, writeInfo, clearPromptLines, writeProgress } from '../utils/cli.js';
|
|
8
|
-
import { initializeCommand } from '../utils/command-utils.js';
|
|
9
|
-
import AgentApi from '../api/agent.api.service.js';
|
|
10
|
-
import { BASE_URLS } from '../config/constants.js';
|
|
11
|
-
import { trackEvent } from '../services/analytics.js';
|
|
12
|
-
import { validateOrSuggest } from '../utils/aliases.js';
|
|
13
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
14
|
-
// Main Command Entry
|
|
15
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
16
|
-
/**
|
|
17
|
-
* Main channels command - manages agent communication channels.
|
|
18
|
-
*
|
|
19
|
-
* Supports both interactive and non-interactive modes:
|
|
20
|
-
* - Interactive: prompts for operation selection
|
|
21
|
-
* - Non-interactive: use 'list' action to display channels
|
|
22
|
-
*/
|
|
23
|
-
export async function channelsCommand(action) {
|
|
24
|
-
return withErrorHandling(async () => {
|
|
25
|
-
// Initialize command (validates config + auth)
|
|
26
|
-
const { config, agentId, apiKey } = await initializeCommand();
|
|
27
|
-
const agentApi = new AgentApi(BASE_URLS.API, apiKey);
|
|
28
|
-
// Determine mode
|
|
29
|
-
if (action) {
|
|
30
|
-
await executeNonInteractive(agentApi, agentId, action);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
await channelsInteractive(agentApi, agentId, apiKey, config);
|
|
34
|
-
}
|
|
35
|
-
trackEvent('cli_channels_action', { action: action || 'interactive', non_interactive: !!action });
|
|
36
|
-
}, 'channels management');
|
|
37
|
-
}
|
|
38
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
39
|
-
// Shared Core Functions
|
|
40
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
41
|
-
/**
|
|
42
|
-
* Fetches all channels from the API.
|
|
43
|
-
*/
|
|
44
|
-
async function fetchChannelsCore(agentApi, agentId) {
|
|
45
|
-
const response = await agentApi.getAgentChannels(agentId);
|
|
46
|
-
if (!response.success) {
|
|
47
|
-
console.error(`❌ Error: ${response.error?.message || 'Unknown error'}`);
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
return response.data.channels;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Gets the emoji icon for a channel type
|
|
54
|
-
*/
|
|
55
|
-
function getChannelIcon(type) {
|
|
56
|
-
const icons = {
|
|
57
|
-
whatsapp: '📱',
|
|
58
|
-
facebook: '💬',
|
|
59
|
-
instagram: '📸',
|
|
60
|
-
slack: '💼',
|
|
61
|
-
email: '📧',
|
|
62
|
-
webchat: '💻',
|
|
63
|
-
};
|
|
64
|
-
return icons[type] || '📡';
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Gets a human-readable label for a channel
|
|
68
|
-
*/
|
|
69
|
-
function getChannelLabel(channel) {
|
|
70
|
-
switch (channel.type) {
|
|
71
|
-
case 'whatsapp':
|
|
72
|
-
return channel.whatsapp || channel.identifier;
|
|
73
|
-
case 'facebook':
|
|
74
|
-
return channel.facebook || channel.identifier;
|
|
75
|
-
case 'instagram':
|
|
76
|
-
return channel.instagram || channel.identifier;
|
|
77
|
-
case 'slack':
|
|
78
|
-
return channel.data?.botName || channel.data?.url || channel.identifier;
|
|
79
|
-
case 'email':
|
|
80
|
-
return channel.identifier;
|
|
81
|
-
default:
|
|
82
|
-
return channel.identifier;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Displays all channels (non-interactive).
|
|
87
|
-
*/
|
|
88
|
-
function displayChannelsCore(channels) {
|
|
89
|
-
console.log('\n' + '='.repeat(60));
|
|
90
|
-
console.log('📡 Agent Channels');
|
|
91
|
-
console.log('='.repeat(60) + '\n');
|
|
92
|
-
if (channels.length === 0) {
|
|
93
|
-
console.log('ℹ️ No channels configured for this agent.');
|
|
94
|
-
console.log("💡 Use 'lua channels' (interactive) to add channels.\n");
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
channels.forEach((channel, index) => {
|
|
98
|
-
const icon = getChannelIcon(channel.type);
|
|
99
|
-
const label = getChannelLabel(channel);
|
|
100
|
-
const created = new Date(channel.createdAt).toLocaleDateString();
|
|
101
|
-
console.log(`${index + 1}. ${icon} ${channel.type.toUpperCase()}`);
|
|
102
|
-
console.log(` Label: ${label}`);
|
|
103
|
-
console.log(` Identifier: ${channel.identifier}`);
|
|
104
|
-
console.log(` Created: ${created}`);
|
|
105
|
-
console.log();
|
|
106
|
-
});
|
|
107
|
-
console.log('='.repeat(60));
|
|
108
|
-
console.log(`Total: ${channels.length} channel(s)`);
|
|
109
|
-
}
|
|
110
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
111
|
-
// Non-Interactive Mode
|
|
112
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
113
|
-
async function executeNonInteractive(agentApi, agentId, action) {
|
|
114
|
-
action = validateOrSuggest('channels.action', action);
|
|
115
|
-
writeInfo(`📡 Fetching channels for agent: ${agentId}...`);
|
|
116
|
-
const channels = await fetchChannelsCore(agentApi, agentId);
|
|
117
|
-
if (!channels)
|
|
118
|
-
throw new Error('Operation failed');
|
|
119
|
-
displayChannelsCore(channels);
|
|
120
|
-
}
|
|
121
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
122
|
-
// Interactive Mode
|
|
123
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
124
|
-
async function channelsInteractive(agentApi, agentId, apiKey, config) {
|
|
125
|
-
const { operation } = await inquirer.prompt([
|
|
126
|
-
{
|
|
127
|
-
type: 'list',
|
|
128
|
-
name: 'operation',
|
|
129
|
-
message: 'What would you like to do?',
|
|
130
|
-
choices: [
|
|
131
|
-
{ name: '📋 List channels', value: 'list' },
|
|
132
|
-
{ name: '🔗 Link new channel', value: 'create' },
|
|
133
|
-
{ name: '🌐 Link on admin dashboard', value: 'admin' },
|
|
134
|
-
],
|
|
135
|
-
},
|
|
136
|
-
]);
|
|
137
|
-
clearPromptLines(2);
|
|
138
|
-
trackEvent('cli_channels_interactive_action', { operation });
|
|
139
|
-
if (operation === 'list') {
|
|
140
|
-
await listChannelsInteractive(agentApi, agentId, config);
|
|
141
|
-
}
|
|
142
|
-
else if (operation === 'create') {
|
|
143
|
-
await createChannel(agentApi, agentId);
|
|
144
|
-
}
|
|
145
|
-
else if (operation === 'admin') {
|
|
146
|
-
await openAdminDashboard(apiKey, config);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Opens the admin dashboard for channel management
|
|
151
|
-
*/
|
|
152
|
-
async function openAdminDashboard(apiKey, config) {
|
|
153
|
-
writeProgress('🌐 Opening Lua Admin Dashboard...');
|
|
154
|
-
const agentId = config?.agent?.agentId;
|
|
155
|
-
const orgId = config?.agent?.orgId;
|
|
156
|
-
if (!agentId) {
|
|
157
|
-
throw new Error('No agentId found in lua.skill.yaml. Please ensure your configuration is valid.');
|
|
158
|
-
}
|
|
159
|
-
if (!orgId) {
|
|
160
|
-
throw new Error('No orgId found in lua.skill.yaml. Please ensure your configuration is valid.');
|
|
161
|
-
}
|
|
162
|
-
const adminUrl = `https://admin.heylua.ai/validate-token/${apiKey}?redirect=/admin/usage?&agentId=${agentId}&orgId=${orgId}`;
|
|
163
|
-
await open(adminUrl);
|
|
164
|
-
writeSuccess('✅ Lua Admin Dashboard opened in your browser');
|
|
165
|
-
console.log(`\n Dashboard URL: https://admin.heylua.ai`);
|
|
166
|
-
console.log(` Agent ID: ${agentId}`);
|
|
167
|
-
console.log(` Organization ID: ${orgId}\n`);
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Lists all channels for a specific agent (interactive with selection)
|
|
171
|
-
*/
|
|
172
|
-
async function listChannelsInteractive(agentApi, agentId, config) {
|
|
173
|
-
writeInfo(`📡 Fetching channels for agent: ${agentId}...`);
|
|
174
|
-
const channels = await fetchChannelsCore(agentApi, agentId);
|
|
175
|
-
if (!channels)
|
|
176
|
-
throw new Error('Operation failed');
|
|
177
|
-
writeSuccess(`✅ Found ${channels.length} channel(s)\n`);
|
|
178
|
-
if (channels.length === 0) {
|
|
179
|
-
writeInfo('No channels configured for this agent.');
|
|
180
|
-
writeInfo("\n💡 Use the 'Create new channel' option to add channels.\n");
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
const channelChoices = channels.map((channel, index) => {
|
|
184
|
-
const icon = getChannelIcon(channel.type);
|
|
185
|
-
const label = getChannelLabel(channel);
|
|
186
|
-
return {
|
|
187
|
-
name: `${icon} ${channel.type.toUpperCase()} - ${label}`,
|
|
188
|
-
value: index,
|
|
189
|
-
};
|
|
190
|
-
});
|
|
191
|
-
channelChoices.push({
|
|
192
|
-
name: '← Back to main menu',
|
|
193
|
-
value: -1,
|
|
194
|
-
});
|
|
195
|
-
const { selectedIndex } = await inquirer.prompt([
|
|
196
|
-
{
|
|
197
|
-
type: 'list',
|
|
198
|
-
name: 'selectedIndex',
|
|
199
|
-
message: 'Select a channel to view details:',
|
|
200
|
-
choices: channelChoices,
|
|
201
|
-
},
|
|
202
|
-
]);
|
|
203
|
-
if (selectedIndex === -1) {
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
|
-
clearPromptLines(2);
|
|
207
|
-
const selectedChannel = channels[selectedIndex];
|
|
208
|
-
displayChannelDetails(selectedChannel);
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Displays detailed information about a channel
|
|
212
|
-
*/
|
|
213
|
-
function displayChannelDetails(channel) {
|
|
214
|
-
const icon = getChannelIcon(channel.type);
|
|
215
|
-
writeSuccess(`\n${icon} ${channel.type.toUpperCase()} Channel Details\n`);
|
|
216
|
-
writeInfo(`${'─'.repeat(50)}`);
|
|
217
|
-
writeInfo(`Type: ${channel.type}`);
|
|
218
|
-
writeInfo(`Identifier: ${channel.identifier}`);
|
|
219
|
-
writeInfo(`Created: ${new Date(channel.createdAt).toLocaleString()}`);
|
|
220
|
-
switch (channel.type) {
|
|
221
|
-
case 'whatsapp':
|
|
222
|
-
displayWhatsAppDetails(channel);
|
|
223
|
-
break;
|
|
224
|
-
case 'facebook':
|
|
225
|
-
displayFacebookDetails(channel);
|
|
226
|
-
break;
|
|
227
|
-
case 'instagram':
|
|
228
|
-
displayInstagramDetails(channel);
|
|
229
|
-
break;
|
|
230
|
-
case 'slack':
|
|
231
|
-
displaySlackDetails(channel);
|
|
232
|
-
break;
|
|
233
|
-
case 'email':
|
|
234
|
-
displayEmailDetails(channel);
|
|
235
|
-
break;
|
|
236
|
-
default:
|
|
237
|
-
writeInfo(`\nRaw data:`);
|
|
238
|
-
console.log(JSON.stringify(channel, null, 2));
|
|
239
|
-
}
|
|
240
|
-
writeInfo(`${'─'.repeat(50)}\n`);
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Displays WhatsApp-specific details
|
|
244
|
-
*/
|
|
245
|
-
function displayWhatsAppDetails(channel) {
|
|
246
|
-
if (channel.whatsapp) {
|
|
247
|
-
writeInfo(`Phone Number: ${channel.whatsapp}`);
|
|
248
|
-
}
|
|
249
|
-
if (channel.data) {
|
|
250
|
-
if (channel.data.number) {
|
|
251
|
-
writeInfo(`Number: ${channel.data.number}`);
|
|
252
|
-
}
|
|
253
|
-
if (channel.data.phoneId) {
|
|
254
|
-
writeInfo(`Phone ID: ${channel.data.phoneId}`);
|
|
255
|
-
}
|
|
256
|
-
if (channel.data.global !== undefined) {
|
|
257
|
-
writeInfo(`Global: ${channel.data.global ? 'Yes' : 'No'}`);
|
|
258
|
-
}
|
|
259
|
-
if (channel.data.country) {
|
|
260
|
-
writeInfo(`Country: ${channel.data.country}`);
|
|
261
|
-
}
|
|
262
|
-
if (channel.data.metadata) {
|
|
263
|
-
const meta = channel.data.metadata;
|
|
264
|
-
writeInfo(`\nMetadata:`);
|
|
265
|
-
if (meta.verified_name) {
|
|
266
|
-
writeInfo(` Verified Name: ${meta.verified_name}`);
|
|
267
|
-
}
|
|
268
|
-
if (meta.status) {
|
|
269
|
-
writeInfo(` Status: ${meta.status}`);
|
|
270
|
-
}
|
|
271
|
-
if (meta.quality_rating) {
|
|
272
|
-
writeInfo(` Quality: ${meta.quality_rating}`);
|
|
273
|
-
}
|
|
274
|
-
if (meta.wabaId) {
|
|
275
|
-
writeInfo(` WABA ID: ${meta.wabaId}`);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Displays Facebook-specific details
|
|
282
|
-
*/
|
|
283
|
-
function displayFacebookDetails(channel) {
|
|
284
|
-
if (channel.facebook) {
|
|
285
|
-
writeInfo(`Page Name: ${channel.facebook}`);
|
|
286
|
-
}
|
|
287
|
-
if (channel.data) {
|
|
288
|
-
if (channel.data.name) {
|
|
289
|
-
writeInfo(`Name: ${channel.data.name}`);
|
|
290
|
-
}
|
|
291
|
-
if (channel.data.pageId) {
|
|
292
|
-
writeInfo(`Page ID: ${channel.data.pageId}`);
|
|
293
|
-
}
|
|
294
|
-
if (channel.data.category) {
|
|
295
|
-
writeInfo(`Category: ${channel.data.category}`);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Displays Instagram-specific details
|
|
301
|
-
*/
|
|
302
|
-
function displayInstagramDetails(channel) {
|
|
303
|
-
if (channel.instagram) {
|
|
304
|
-
writeInfo(`Username: ${channel.instagram}`);
|
|
305
|
-
}
|
|
306
|
-
if (channel.data) {
|
|
307
|
-
if (channel.data.username) {
|
|
308
|
-
writeInfo(`Username: ${channel.data.username}`);
|
|
309
|
-
}
|
|
310
|
-
if (channel.data.account_type) {
|
|
311
|
-
writeInfo(`Account Type: ${channel.data.account_type}`);
|
|
312
|
-
}
|
|
313
|
-
if (channel.data.account_id) {
|
|
314
|
-
writeInfo(`Account ID: ${channel.data.account_id}`);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* Displays Slack-specific details
|
|
320
|
-
*/
|
|
321
|
-
function displaySlackDetails(channel) {
|
|
322
|
-
if (channel.data) {
|
|
323
|
-
if (channel.data.type) {
|
|
324
|
-
writeInfo(`Type: ${channel.data.type}`);
|
|
325
|
-
}
|
|
326
|
-
if (channel.data.botName) {
|
|
327
|
-
writeInfo(`Bot Name: ${channel.data.botName}`);
|
|
328
|
-
}
|
|
329
|
-
if (channel.data.url) {
|
|
330
|
-
writeInfo(`Workspace: ${channel.data.url}`);
|
|
331
|
-
}
|
|
332
|
-
if (channel.data.teamId) {
|
|
333
|
-
writeInfo(`Team ID: ${channel.data.teamId}`);
|
|
334
|
-
}
|
|
335
|
-
if (channel.data.appId) {
|
|
336
|
-
writeInfo(`App ID: ${channel.data.appId}`);
|
|
337
|
-
}
|
|
338
|
-
if (channel.data.botId) {
|
|
339
|
-
writeInfo(`Bot ID: ${channel.data.botId}`);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* Displays Email-specific details
|
|
345
|
-
*/
|
|
346
|
-
function displayEmailDetails(channel) {
|
|
347
|
-
if (channel.data) {
|
|
348
|
-
if (channel.data.from) {
|
|
349
|
-
writeInfo(`From Address: ${channel.data.from}`);
|
|
350
|
-
}
|
|
351
|
-
if (channel.data.name) {
|
|
352
|
-
writeInfo(`Name: ${channel.data.name}`);
|
|
353
|
-
}
|
|
354
|
-
if (channel.data.templateId) {
|
|
355
|
-
writeInfo(`Template ID: ${channel.data.templateId}`);
|
|
356
|
-
}
|
|
357
|
-
if (channel.data.active !== undefined) {
|
|
358
|
-
writeInfo(`Active: ${channel.data.active ? 'Yes' : 'No'}`);
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* Creates a new channel for a specific agent
|
|
364
|
-
*/
|
|
365
|
-
async function createChannel(agentApi, agentId) {
|
|
366
|
-
const { channelType } = await inquirer.prompt([
|
|
367
|
-
{
|
|
368
|
-
type: 'list',
|
|
369
|
-
name: 'channelType',
|
|
370
|
-
message: 'Select channel type:',
|
|
371
|
-
choices: [
|
|
372
|
-
{ name: '📱 WhatsApp', value: 'whatsapp' },
|
|
373
|
-
{ name: '💬 Facebook Messenger', value: 'facebook' },
|
|
374
|
-
{ name: '📧 Email', value: 'email' },
|
|
375
|
-
{ name: '🔒 Slack (Private)', value: 'slack-private' },
|
|
376
|
-
{ name: '🌐 Slack (Public)', value: 'slack-public' },
|
|
377
|
-
],
|
|
378
|
-
},
|
|
379
|
-
]);
|
|
380
|
-
clearPromptLines(2);
|
|
381
|
-
trackEvent('cli_channel_created', { channel_type: channelType });
|
|
382
|
-
switch (channelType) {
|
|
383
|
-
case 'whatsapp':
|
|
384
|
-
await createWhatsAppChannel(agentApi, agentId);
|
|
385
|
-
break;
|
|
386
|
-
case 'facebook':
|
|
387
|
-
await createFacebookChannel(agentApi, agentId);
|
|
388
|
-
break;
|
|
389
|
-
case 'email':
|
|
390
|
-
await createEmailChannel(agentApi, agentId);
|
|
391
|
-
break;
|
|
392
|
-
case 'slack-private':
|
|
393
|
-
await createSlackPrivateChannel(agentApi, agentId);
|
|
394
|
-
break;
|
|
395
|
-
case 'slack-public':
|
|
396
|
-
await createSlackPublicChannel(agentApi, agentId);
|
|
397
|
-
break;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* Creates a WhatsApp channel
|
|
402
|
-
*/
|
|
403
|
-
async function createWhatsAppChannel(agentApi, agentId) {
|
|
404
|
-
writeInfo('📱 Creating WhatsApp Channel\n');
|
|
405
|
-
const answers = await inquirer.prompt([
|
|
406
|
-
{
|
|
407
|
-
type: 'input',
|
|
408
|
-
name: 'phoneNumberId',
|
|
409
|
-
message: 'Enter phone number ID:',
|
|
410
|
-
validate: (input) => {
|
|
411
|
-
return input.trim().length > 0 || 'Phone number ID is required';
|
|
412
|
-
},
|
|
413
|
-
},
|
|
414
|
-
{
|
|
415
|
-
type: 'input',
|
|
416
|
-
name: 'wabaId',
|
|
417
|
-
message: 'Enter WhatsApp Business Account ID (WABA ID):',
|
|
418
|
-
validate: (input) => {
|
|
419
|
-
return input.trim().length > 0 || 'WABA ID is required';
|
|
420
|
-
},
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
type: 'password',
|
|
424
|
-
name: 'accessToken',
|
|
425
|
-
message: 'Enter access token:',
|
|
426
|
-
mask: '*',
|
|
427
|
-
validate: (input) => {
|
|
428
|
-
return input.trim().length > 0 || 'Access token is required';
|
|
429
|
-
},
|
|
430
|
-
},
|
|
431
|
-
]);
|
|
432
|
-
const channelData = {
|
|
433
|
-
type: 'whatsapp',
|
|
434
|
-
whatsapp: {
|
|
435
|
-
phoneNumberId: answers.phoneNumberId.trim(),
|
|
436
|
-
wabaId: answers.wabaId.trim(),
|
|
437
|
-
accessToken: answers.accessToken.trim(),
|
|
438
|
-
},
|
|
439
|
-
isManual: true,
|
|
440
|
-
};
|
|
441
|
-
writeInfo('\n📡 Creating WhatsApp channel...');
|
|
442
|
-
const response = await agentApi.createWhatsAppChannel(agentId, channelData);
|
|
443
|
-
if (!response.success) {
|
|
444
|
-
const error = response.error;
|
|
445
|
-
if (error?.statusCode === 400 && error?.message?.includes('already exists')) {
|
|
446
|
-
console.error(`\n❌ Channel already exists`);
|
|
447
|
-
console.error(`💡 This WhatsApp number is already connected to this agent.`);
|
|
448
|
-
console.error(` Use 'lua channels' to list existing channels.\n`);
|
|
449
|
-
}
|
|
450
|
-
else {
|
|
451
|
-
console.error(`\n❌ Error: ${error?.message || 'Unknown error'}`);
|
|
452
|
-
if (error?.error) {
|
|
453
|
-
console.error(` ${error.error}\n`);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
throw new Error('Operation failed');
|
|
457
|
-
}
|
|
458
|
-
const data = response.data;
|
|
459
|
-
writeSuccess('\n✅ WhatsApp channel created successfully!\n');
|
|
460
|
-
writeInfo(`📞 Phone Number: ${data.whatsapp.number}`);
|
|
461
|
-
writeInfo(`🆔 Identifier: ${data.identifier}`);
|
|
462
|
-
writeInfo(`✅ Status: ${data.whatsapp.metadata.status}`);
|
|
463
|
-
writeInfo(`🔗 Webhook URL: ${data.webhookUrl}\n`);
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* Creates a Facebook Messenger channel
|
|
467
|
-
*/
|
|
468
|
-
async function createFacebookChannel(agentApi, agentId) {
|
|
469
|
-
writeInfo('💬 Creating Facebook Messenger Channel\n');
|
|
470
|
-
const answers = await inquirer.prompt([
|
|
471
|
-
{
|
|
472
|
-
type: 'password',
|
|
473
|
-
name: 'accessToken',
|
|
474
|
-
message: 'Enter Facebook page access token:',
|
|
475
|
-
mask: '*',
|
|
476
|
-
validate: (input) => {
|
|
477
|
-
return input.trim().length > 0 || 'Access token is required';
|
|
478
|
-
},
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
type: 'input',
|
|
482
|
-
name: 'pageId',
|
|
483
|
-
message: 'Enter Facebook page ID:',
|
|
484
|
-
validate: (input) => {
|
|
485
|
-
return input.trim().length > 0 || 'Page ID is required';
|
|
486
|
-
},
|
|
487
|
-
},
|
|
488
|
-
]);
|
|
489
|
-
const channelData = {
|
|
490
|
-
type: 'facebook',
|
|
491
|
-
facebook: {
|
|
492
|
-
accessToken: answers.accessToken.trim(),
|
|
493
|
-
pageId: answers.pageId.trim(),
|
|
494
|
-
},
|
|
495
|
-
};
|
|
496
|
-
writeInfo('\n📡 Creating Facebook channel...');
|
|
497
|
-
const response = await agentApi.createFacebookChannel(agentId, channelData);
|
|
498
|
-
if (!response.success) {
|
|
499
|
-
const error = response.error;
|
|
500
|
-
if (error?.statusCode === 400 && error?.message?.includes('already exists')) {
|
|
501
|
-
console.error(`\n❌ Channel already exists`);
|
|
502
|
-
console.error(`💡 This Facebook page is already connected to this agent.`);
|
|
503
|
-
console.error(` Use 'lua channels' to list existing channels.\n`);
|
|
504
|
-
}
|
|
505
|
-
else {
|
|
506
|
-
console.error(`\n❌ Error: ${error?.message || 'Unknown error'}`);
|
|
507
|
-
if (error?.error) {
|
|
508
|
-
console.error(` ${error.error}\n`);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
throw new Error('Operation failed');
|
|
512
|
-
}
|
|
513
|
-
const data = response.data;
|
|
514
|
-
writeSuccess('\n✅ Facebook channel created successfully!\n');
|
|
515
|
-
writeInfo(`📄 Page Name: ${data.facebook.name}`);
|
|
516
|
-
writeInfo(`🆔 Identifier: ${data.identifier}`);
|
|
517
|
-
writeInfo(`📋 Category: ${data.facebook.category}`);
|
|
518
|
-
writeInfo(`🔗 Webhook URL: ${data.webhookUrl}\n`);
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Creates an Email channel
|
|
522
|
-
*/
|
|
523
|
-
async function createEmailChannel(agentApi, agentId) {
|
|
524
|
-
writeInfo('📧 Creating Email Channel\n');
|
|
525
|
-
const { mode } = await inquirer.prompt([
|
|
526
|
-
{
|
|
527
|
-
type: 'list',
|
|
528
|
-
name: 'mode',
|
|
529
|
-
message: 'Select email channel mode:',
|
|
530
|
-
choices: [
|
|
531
|
-
{ name: '📬 Generate new inbox (Lua creates an email address for you)', value: 'generated' },
|
|
532
|
-
{ name: '📧 Use existing email (forward from your own address)', value: 'existing' },
|
|
533
|
-
],
|
|
534
|
-
},
|
|
535
|
-
]);
|
|
536
|
-
clearPromptLines(2);
|
|
537
|
-
const { displayName } = await inquirer.prompt([
|
|
538
|
-
{
|
|
539
|
-
type: 'input',
|
|
540
|
-
name: 'displayName',
|
|
541
|
-
message: 'Enter display name (shown in email header):',
|
|
542
|
-
validate: (input) => {
|
|
543
|
-
return input.trim().length > 0 || 'Display name is required';
|
|
544
|
-
},
|
|
545
|
-
},
|
|
546
|
-
]);
|
|
547
|
-
const channelData = {
|
|
548
|
-
type: 'email',
|
|
549
|
-
email: {
|
|
550
|
-
mode: mode,
|
|
551
|
-
displayName: displayName.trim(),
|
|
552
|
-
},
|
|
553
|
-
};
|
|
554
|
-
if (mode === 'existing') {
|
|
555
|
-
const { email } = await inquirer.prompt([
|
|
556
|
-
{
|
|
557
|
-
type: 'input',
|
|
558
|
-
name: 'email',
|
|
559
|
-
message: 'Enter sender email address:',
|
|
560
|
-
validate: (input) => {
|
|
561
|
-
if (input.trim().length === 0) {
|
|
562
|
-
return 'Email address is required';
|
|
563
|
-
}
|
|
564
|
-
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
565
|
-
if (!emailRegex.test(input.trim())) {
|
|
566
|
-
return 'Please enter a valid email address';
|
|
567
|
-
}
|
|
568
|
-
return true;
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
]);
|
|
572
|
-
channelData.email.email = email.trim();
|
|
573
|
-
}
|
|
574
|
-
writeInfo('\n📡 Creating Email channel...');
|
|
575
|
-
const response = await agentApi.createEmailChannel(agentId, channelData);
|
|
576
|
-
if (!response.success) {
|
|
577
|
-
const error = response.error;
|
|
578
|
-
if (error?.statusCode === 400 && error?.message?.includes('already exists')) {
|
|
579
|
-
console.error(`\n❌ Channel already exists`);
|
|
580
|
-
console.error(`💡 This email address is already connected to this agent.`);
|
|
581
|
-
console.error(` Use 'lua channels' to list existing channels.\n`);
|
|
582
|
-
}
|
|
583
|
-
else {
|
|
584
|
-
console.error(`\n❌ Error: ${error?.message || 'Unknown error'}`);
|
|
585
|
-
if (error?.error) {
|
|
586
|
-
console.error(` ${error.error}\n`);
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
throw new Error('Operation failed');
|
|
590
|
-
}
|
|
591
|
-
const data = response.data;
|
|
592
|
-
writeSuccess('\n✅ Email channel created successfully!\n');
|
|
593
|
-
writeInfo(`📧 Display Name: ${displayName}`);
|
|
594
|
-
if (mode === 'generated') {
|
|
595
|
-
const generatedData = data;
|
|
596
|
-
writeInfo(`📬 Email Address: ${generatedData.emailAddress}\n`);
|
|
597
|
-
writeInfo(`${'─'.repeat(60)}`);
|
|
598
|
-
writeInfo(`Your agent's email inbox has been created.`);
|
|
599
|
-
writeInfo(`${'─'.repeat(60)}`);
|
|
600
|
-
writeInfo(`\nShare this address with your customers or use it in your workflows:`);
|
|
601
|
-
writeInfo(` ${generatedData.emailAddress}`);
|
|
602
|
-
writeInfo(`\nEmails sent to this address will be handled by your agent.\n`);
|
|
603
|
-
writeInfo(`${'─'.repeat(60)}\n`);
|
|
604
|
-
}
|
|
605
|
-
else {
|
|
606
|
-
const existingData = data;
|
|
607
|
-
writeInfo(`📧 Sender Email: ${channelData.email.email}`);
|
|
608
|
-
writeInfo(`📬 Forward To: ${existingData.forwardTo}\n`);
|
|
609
|
-
writeInfo(`${'─'.repeat(60)}`);
|
|
610
|
-
writeInfo(`⚠️ IMPORTANT: Email Forwarding Setup Required`);
|
|
611
|
-
writeInfo(`${'─'.repeat(60)}`);
|
|
612
|
-
writeInfo(`\nTo complete the email channel setup, configure email forwarding:`);
|
|
613
|
-
writeInfo(`\n1. Log into your email provider's settings`);
|
|
614
|
-
writeInfo(`2. Set up email forwarding or filtering`);
|
|
615
|
-
writeInfo(`3. Forward all emails from ${channelData.email.email} to:`);
|
|
616
|
-
writeInfo(` ${existingData.forwardTo}`);
|
|
617
|
-
writeInfo(`\n4. Test by sending an email to ${channelData.email.email}`);
|
|
618
|
-
writeInfo(` Your agent will respond automatically!\n`);
|
|
619
|
-
writeInfo(`${'─'.repeat(60)}\n`);
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
/**
|
|
623
|
-
* Creates a private Slack channel
|
|
624
|
-
*/
|
|
625
|
-
async function createSlackPrivateChannel(agentApi, agentId) {
|
|
626
|
-
writeInfo('🔒 Creating Private Slack Channel\n');
|
|
627
|
-
const answers = await inquirer.prompt([
|
|
628
|
-
{
|
|
629
|
-
type: 'password',
|
|
630
|
-
name: 'accessToken',
|
|
631
|
-
message: 'Enter Slack bot access token (xoxb-...):',
|
|
632
|
-
mask: '*',
|
|
633
|
-
validate: (input) => {
|
|
634
|
-
if (input.trim().length === 0) {
|
|
635
|
-
return 'Access token is required';
|
|
636
|
-
}
|
|
637
|
-
if (!input.trim().startsWith('xoxb-')) {
|
|
638
|
-
return "Bot token should start with 'xoxb-'";
|
|
639
|
-
}
|
|
640
|
-
return true;
|
|
641
|
-
},
|
|
642
|
-
},
|
|
643
|
-
]);
|
|
644
|
-
const channelData = {
|
|
645
|
-
type: 'slack',
|
|
646
|
-
slack: {
|
|
647
|
-
type: 'private',
|
|
648
|
-
accessToken: answers.accessToken.trim(),
|
|
649
|
-
},
|
|
650
|
-
};
|
|
651
|
-
writeInfo('\n📡 Creating Slack private channel...');
|
|
652
|
-
const response = await agentApi.createSlackChannel(agentId, channelData);
|
|
653
|
-
if (!response.success) {
|
|
654
|
-
const error = response.error;
|
|
655
|
-
if (error?.statusCode === 400 && error?.message?.includes('already exists')) {
|
|
656
|
-
console.error(`\n❌ Channel already exists`);
|
|
657
|
-
console.error(`💡 This Slack workspace is already connected to this agent.`);
|
|
658
|
-
console.error(` Use 'lua channels' to list existing channels.\n`);
|
|
659
|
-
}
|
|
660
|
-
else {
|
|
661
|
-
console.error(`\n❌ Error: ${error?.message || 'Unknown error'}`);
|
|
662
|
-
if (error?.error) {
|
|
663
|
-
console.error(` ${error.error}\n`);
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
throw new Error('Operation failed');
|
|
667
|
-
}
|
|
668
|
-
const data = response.data;
|
|
669
|
-
if ('slack' in data && 'botName' in data.slack) {
|
|
670
|
-
writeSuccess('\n✅ Slack private channel created successfully!\n');
|
|
671
|
-
writeInfo(`🤖 Bot Name: ${data.slack.botName}`);
|
|
672
|
-
writeInfo(`🏢 Workspace: ${data.slack.url}`);
|
|
673
|
-
writeInfo(`🆔 Bot ID: ${data.slack.botId}`);
|
|
674
|
-
writeInfo(`Ensure your app Manifest is configured correctly. Below is an example:\n`);
|
|
675
|
-
writeInfo(JSON.stringify(data.slack.manifest, null, 2));
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
/**
|
|
679
|
-
* Creates a public Slack channel
|
|
680
|
-
*/
|
|
681
|
-
async function createSlackPublicChannel(agentApi, agentId) {
|
|
682
|
-
writeInfo('🌐 Creating Public Slack Channel\n');
|
|
683
|
-
const answers = await inquirer.prompt([
|
|
684
|
-
{
|
|
685
|
-
type: 'input',
|
|
686
|
-
name: 'appId',
|
|
687
|
-
message: 'Enter Slack app ID:',
|
|
688
|
-
validate: (input) => {
|
|
689
|
-
return input.trim().length > 0 || 'App ID is required';
|
|
690
|
-
},
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
type: 'input',
|
|
694
|
-
name: 'clientId',
|
|
695
|
-
message: 'Enter Slack client ID:',
|
|
696
|
-
validate: (input) => {
|
|
697
|
-
return input.trim().length > 0 || 'Client ID is required';
|
|
698
|
-
},
|
|
699
|
-
},
|
|
700
|
-
{
|
|
701
|
-
type: 'password',
|
|
702
|
-
name: 'clientSecret',
|
|
703
|
-
message: 'Enter Slack client secret:',
|
|
704
|
-
mask: '*',
|
|
705
|
-
validate: (input) => {
|
|
706
|
-
return input.trim().length > 0 || 'Client secret is required';
|
|
707
|
-
},
|
|
708
|
-
},
|
|
709
|
-
]);
|
|
710
|
-
const channelData = {
|
|
711
|
-
type: 'slack',
|
|
712
|
-
slack: {
|
|
713
|
-
type: 'public',
|
|
714
|
-
appId: answers.appId.trim(),
|
|
715
|
-
clientId: answers.clientId.trim(),
|
|
716
|
-
clientSecret: answers.clientSecret.trim(),
|
|
717
|
-
},
|
|
718
|
-
};
|
|
719
|
-
writeInfo('\n📡 Creating Slack public channel...');
|
|
720
|
-
const response = await agentApi.createSlackChannel(agentId, channelData);
|
|
721
|
-
if (!response.success) {
|
|
722
|
-
const error = response.error;
|
|
723
|
-
if (error?.statusCode === 400 && error?.message?.includes('already exists')) {
|
|
724
|
-
console.error(`\n❌ Channel already exists`);
|
|
725
|
-
console.error(`💡 This Slack app is already connected to this agent.`);
|
|
726
|
-
console.error(` Use 'lua channels' to list existing channels.\n`);
|
|
727
|
-
}
|
|
728
|
-
else {
|
|
729
|
-
console.error(`\n❌ Error: ${error?.message || 'Unknown error'}`);
|
|
730
|
-
if (error?.error) {
|
|
731
|
-
console.error(` ${error.error}\n`);
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
throw new Error('Operation failed');
|
|
735
|
-
}
|
|
736
|
-
const data = response.data;
|
|
737
|
-
if ('redirectUri' in data) {
|
|
738
|
-
writeSuccess('\n✅ Slack public channel created successfully!\n');
|
|
739
|
-
writeInfo(`🆔 App ID: ${data.appId}`);
|
|
740
|
-
writeInfo(`🔗 Redirect URI: ${data.redirectUri}`);
|
|
741
|
-
writeInfo(`🔗 Webhook URL: ${data.webhookUrl}\n`);
|
|
742
|
-
writeInfo(`🔗 Install URL: https://auth.heylua.ai/slack/install/${data.appId}`);
|
|
743
|
-
writeInfo(`Ensure your app Manifest is configured correctly. Below is an example:\n`);
|
|
744
|
-
writeInfo(JSON.stringify(data.manifest, null, 2));
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
//# sourceMappingURL=channels.js.map
|